getAdapter() — astro Function Reference
Architecture documentation for the getAdapter() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD bd0b5522_a8a8_7b48_264b_eea043facf72["getAdapter()"] 9b72c5c7_3349_4acd_8ca1_afe541842abe["index.ts"] bd0b5522_a8a8_7b48_264b_eea043facf72 -->|defined in| 9b72c5c7_3349_4acd_8ca1_afe541842abe 0219003e_0431_f5b2_9b31_f2db70f1ade0["vercelAdapter()"] 0219003e_0431_f5b2_9b31_f2db70f1ade0 -->|calls| bd0b5522_a8a8_7b48_264b_eea043facf72 style bd0b5522_a8a8_7b48_264b_eea043facf72 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/vercel/src/index.ts lines 99–142
function getAdapter({
edgeMiddleware,
skewProtection,
buildOutput,
staticHeaders,
}: {
buildOutput: 'server' | 'static';
edgeMiddleware: NonNullable<VercelServerlessConfig['edgeMiddleware']>;
skewProtection: boolean;
staticHeaders: NonNullable<VercelServerlessConfig['staticHeaders']>;
}): AstroAdapter {
return {
name: PACKAGE_NAME,
entryType: 'self',
adapterFeatures: {
edgeMiddleware,
buildOutput,
staticHeaders,
},
supportedAstroFeatures: {
hybridOutput: 'stable',
staticOutput: 'stable',
serverOutput: 'stable',
sharpImageService: 'stable',
i18nDomains: 'experimental',
envGetSecret: 'stable',
},
client: {
internalFetchHeaders: skewProtection
? (): Record<string, string> => {
const deploymentId = process.env.VERCEL_DEPLOYMENT_ID;
if (deploymentId) {
return { 'x-deployment-id': deploymentId };
}
return {};
}
: undefined,
assetQueryParams:
skewProtection && process.env.VERCEL_DEPLOYMENT_ID
? new URLSearchParams({ dpl: process.env.VERCEL_DEPLOYMENT_ID })
: undefined,
},
};
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does getAdapter() do?
getAdapter() is a function in the astro codebase, defined in packages/integrations/vercel/src/index.ts.
Where is getAdapter() defined?
getAdapter() is defined in packages/integrations/vercel/src/index.ts at line 99.
What calls getAdapter()?
getAdapter() is called by 1 function(s): vercelAdapter.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free