runHookConfigDone() — astro Function Reference
Architecture documentation for the runHookConfigDone() function in hooks.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 75e8c00d_96e6_cdbc_dc65_9834f84707d0["runHookConfigDone()"] 19f4084c_157f_a15d_f001_5d8088b75dee["hooks.ts"] 75e8c00d_96e6_cdbc_dc65_9834f84707d0 -->|defined in| 19f4084c_157f_a15d_f001_5d8088b75dee 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa["runHookInternal()"] 75e8c00d_96e6_cdbc_dc65_9834f84707d0 -->|calls| 1e1ca282_3771_2cb3_ede6_ff5ab0d382fa 1443f867_b3af_7eca_2ca8_c993c323ecbd["normalizeInjectedTypeFilename()"] 75e8c00d_96e6_cdbc_dc65_9834f84707d0 -->|calls| 1443f867_b3af_7eca_2ca8_c993c323ecbd style 75e8c00d_96e6_cdbc_dc65_9834f84707d0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/integrations/hooks.ts lines 362–420
export async function runHookConfigDone({
settings,
logger,
command,
}: {
settings: AstroSettings;
logger: Logger;
command?: 'dev' | 'build' | 'preview' | 'sync';
}) {
for (const integration of settings.config.integrations) {
await runHookInternal({
integration,
hookName: 'astro:config:done',
logger,
params: () => ({
config: settings.config,
setAdapter(adapter) {
validateSetAdapter(logger, settings, adapter, integration.name, command);
if (adapter.adapterFeatures?.buildOutput !== 'static') {
settings.buildOutput = 'server';
}
if (!adapter.supportedAstroFeatures) {
throw new Error(
`The adapter ${adapter.name} doesn't provide a feature map. It is required in Astro 4.0.`,
);
} else {
validateSupportedFeatures(
adapter.name,
adapter.supportedAstroFeatures,
settings,
logger,
);
}
settings.adapter = adapter;
},
injectTypes(injectedType) {
const normalizedFilename = normalizeInjectedTypeFilename(
injectedType.filename,
integration.name,
);
settings.injectedTypes.push({
filename: normalizedFilename,
content: injectedType.content,
});
// It must be relative to dotAstroDir here and not inside normalizeInjectedTypeFilename
// because injectedTypes are handled relatively to the dotAstroDir already
return new URL(normalizedFilename, settings.dotAstroDir);
},
get buildOutput() {
return settings.buildOutput!; // settings.buildOutput is always set at this point
},
}),
});
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does runHookConfigDone() do?
runHookConfigDone() is a function in the astro codebase, defined in packages/astro/src/integrations/hooks.ts.
Where is runHookConfigDone() defined?
runHookConfigDone() is defined in packages/astro/src/integrations/hooks.ts at line 362.
What does runHookConfigDone() call?
runHookConfigDone() calls 2 function(s): normalizeInjectedTypeFilename, runHookInternal.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free