runHookInternal() — astro Function Reference
Architecture documentation for the runHookInternal() function in hooks.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa["runHookInternal()"] 19f4084c_157f_a15d_f001_5d8088b75dee["hooks.ts"] 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa -->|defined in| 19f4084c_157f_a15d_f001_5d8088b75dee be77f595_7989_6e12_ba52_33627e2d9d4d["runHookConfigSetup()"] be77f595_7989_6e12_ba52_33627e2d9d4d -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 75e8c00d_96e6_cdbc_dc65_9834f84707d0["runHookConfigDone()"] 75e8c00d_96e6_cdbc_dc65_9834f84707d0 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 2142ce6a_584b_4a1e_0cf7_3de445c9b816["runHookServerSetup()"] 2142ce6a_584b_4a1e_0cf7_3de445c9b816 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 38d87c7b_c05f_fdfa_60c1_9328c98ee5c2["runHookServerStart()"] 38d87c7b_c05f_fdfa_60c1_9328c98ee5c2 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa ca2964fd_f4ca_2dad_7f75_27026e1485e8["runHookServerDone()"] ca2964fd_f4ca_2dad_7f75_27026e1485e8 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 8501709a_5c1a_8cbd_3287_77d4d23f4bb7["runHookBuildStart()"] 8501709a_5c1a_8cbd_3287_77d4d23f4bb7 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 562b2787_2a55_bed0_3dec_a785e1f27122["runHookBuildSetup()"] 562b2787_2a55_bed0_3dec_a785e1f27122 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 1d178148_ce2d_984c_321a_b29effa85305["runHookBuildSsr()"] 1d178148_ce2d_984c_321a_b29effa85305 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 3a63569e_5db6_5e7f_ebe5_1ae13d46dd30["runHookBuildGenerated()"] 3a63569e_5db6_5e7f_ebe5_1ae13d46dd30 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 7a4b4eeb_ca98_3321_c74e_f20935a63013["runHookBuildDone()"] 7a4b4eeb_ca98_3321_c74e_f20935a63013 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 8c3ff101_ae7b_f043_be60_9202e6bb8d5f["runHookRouteSetup()"] 8c3ff101_ae7b_f043_be60_9202e6bb8d5f -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa f41f800a_ba75_9363_1ed3_86d98af0660b["runHookRoutesResolved()"] f41f800a_ba75_9363_1ed3_86d98af0660b -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa bbee8557_fe56_5f66_5d34_3e7ebb38af0e["getLogger()"] 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa -->|calls| bbee8557_fe56_5f66_5d34_3e7ebb38af0e style 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/integrations/hooks.ts lines 74–97
async function runHookInternal<THook extends keyof BaseIntegrationHooks>({
integration,
hookName,
logger,
params,
}: {
integration: AstroIntegration;
hookName: THook;
logger: Logger;
params: () => Omit<HookParameters<NoInfer<THook>>, 'logger'>;
}) {
const hook = integration?.hooks?.[hookName];
const integrationLogger = getLogger(integration, logger);
if (hook) {
await withTakingALongTimeMsg({
name: integration.name,
hookName,
hookFn: () => hook(Object.assign(params(), { logger: integrationLogger }) as any),
logger,
integrationLogger,
});
}
return { integrationLogger };
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does runHookInternal() do?
runHookInternal() is a function in the astro codebase, defined in packages/astro/src/integrations/hooks.ts.
Where is runHookInternal() defined?
runHookInternal() is defined in packages/astro/src/integrations/hooks.ts at line 74.
What does runHookInternal() call?
runHookInternal() calls 2 function(s): getLogger, withTakingALongTimeMsg.
What calls runHookInternal()?
runHookInternal() is called by 12 function(s): runHookBuildDone, runHookBuildGenerated, runHookBuildSetup, runHookBuildSsr, runHookBuildStart, runHookConfigDone, runHookConfigSetup, runHookRouteSetup, and 4 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free