astroIntegrationActionsRouteHandler() — astro Function Reference
Architecture documentation for the astroIntegrationActionsRouteHandler() function in integration.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 8b6a6d21_6ac3_3a40_7d8c_18647102952d["astroIntegrationActionsRouteHandler()"] a3d8e3d5_bbb1_8fff_a02f_17b550fd5672["integration.ts"] 8b6a6d21_6ac3_3a40_7d8c_18647102952d -->|defined in| a3d8e3d5_bbb1_8fff_a02f_17b550fd5672 style 8b6a6d21_6ac3_3a40_7d8c_18647102952d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/actions/integration.ts lines 13–50
export default function astroIntegrationActionsRouteHandler({
settings,
filename,
}: {
settings: AstroSettings;
filename: string;
}): AstroIntegration {
return {
name: VIRTUAL_MODULE_ID,
hooks: {
async 'astro:config:setup'() {
settings.injectedRoutes.push({
pattern: ACTION_RPC_ROUTE_PATTERN,
entrypoint: 'astro/actions/runtime/entrypoints/route.js',
prerender: false,
origin: 'internal',
});
},
'astro:config:done': async (params) => {
if (params.buildOutput === 'static') {
const error = new AstroError(ActionsWithoutServerOutputError);
error.stack = undefined;
throw error;
}
const stringifiedActionsImport = JSON.stringify(
viteID(new URL(`./${filename}`, params.config.srcDir)),
);
settings.injectedTypes.push({
filename: ACTIONS_TYPES_FILE,
content: `declare module "astro:actions" {
export const actions: typeof import(${stringifiedActionsImport})["server"];
}`,
});
},
},
};
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does astroIntegrationActionsRouteHandler() do?
astroIntegrationActionsRouteHandler() is a function in the astro codebase, defined in packages/astro/src/actions/integration.ts.
Where is astroIntegrationActionsRouteHandler() defined?
astroIntegrationActionsRouteHandler() is defined in packages/astro/src/actions/integration.ts at line 13.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free