route.ts — astro Source File
Architecture documentation for route.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR c9f3ad08_4c57_f6eb_93b3_1d403445dc56["route.ts"] 135a8084_d596_67c2_9209_cca6693604e6["../types/public/common.js"] c9f3ad08_4c57_f6eb_93b3_1d403445dc56 --> 135a8084_d596_67c2_9209_cca6693604e6 4a188169_db01_767e_98b1_f9cf67180716["../actions/runtime/server.js"] c9f3ad08_4c57_f6eb_93b3_1d403445dc56 --> 4a188169_db01_767e_98b1_f9cf67180716 style c9f3ad08_4c57_f6eb_93b3_1d403445dc56 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { APIRoute } from '../../../types/public/common.js';
import { getActionContext } from '../server.js';
export const POST: APIRoute = async (context) => {
const { action, serializeActionResult } = getActionContext(context);
if (action?.calledFrom !== 'rpc') {
return new Response('Not found', { status: 404 });
}
const result = await action.handler();
const serialized = serializeActionResult(result);
if (serialized.type === 'empty') {
return new Response(null, {
status: serialized.status,
});
}
return new Response(serialized.body, {
status: serialized.status,
headers: {
'Content-Type': serialized.contentType,
},
});
};
Domain
Subdomains
Functions
Dependencies
- ../actions/runtime/server.js
- ../types/public/common.js
Source
Frequently Asked Questions
What does route.ts do?
route.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in route.ts?
route.ts defines 1 function(s): POST.
What does route.ts depend on?
route.ts imports 2 module(s): ../actions/runtime/server.js, ../types/public/common.js.
Where is route.ts in the architecture?
route.ts is located at packages/astro/src/actions/runtime/entrypoints/route.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/actions/runtime/entrypoints).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free