MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / requestTrigger

Function requestTrigger

src/ui-server/api/steps.ts:629–637  ·  view source on GitHub ↗
(route: Node, root: Node | null)

Source from the content-addressed store, hash-verified

627
628 /** The request a route's handler serves, as its trigger; a Next page's own work fires from its load. */
629 const requestTrigger = async (route: Node, root: Node | null): Promise<WireStepTrigger | null> => {
630 const { method, path } = splitRouteName(route.name);
631 if (method === null) {
632 if (nextRouteForFile(route.filePath)?.kind === 'page') return { kind: 'load', name: 'GET', of: path, in: basename(route.filePath) };
633 return null;
634 }
635 const after = await chainFor(route, root);
636 return { kind: 'request', name: method, of: path, in: basename(route.filePath), ...(after.length > 0 ? { after } : {}) };
637 };
638
639 /** A job, an event, a message or a schedule that fires a function, from its decorators. */
640 const consumerTrigger = async (node: Node): Promise<WireStepTrigger | null> => {

Callers 1

buildStepsFunction · 0.85

Calls 4

splitRouteNameFunction · 0.90
nextRouteForFileFunction · 0.90
chainForFunction · 0.85
basenameFunction · 0.70

Tested by

no test coverage detected