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

Function payload

__tests__/ui-program-model.test.ts:33–49  ·  view source on GitHub ↗
(steps: WireStep[], root: WireBlock)

Source from the content-addressed store, hash-verified

31const arm = (when: string, body: WireBlock, over: Partial<WireArm> = {}): WireArm => ({ when, ends: null, body, ...over });
32
33function payload(steps: WireStep[], root: WireBlock): WireStepsPayload {
34 return {
35 anchor: { id: 'anchor', kind: 'route', name: 'POST /login', qualifiedName: 'POST /login', file: 'r.js', line: 1, endLine: 1, language: 'javascript', test: false },
36 ambiguous: [],
37 project: 'api',
38 steps: [step('anchor', { kind: 'anchor', anchor: true, label: 'POST /login' }), ...steps],
39 links: [],
40 program: { root, truncated: 0 },
41 defaultView: 'order',
42 depth: 8,
43 limit: 120,
44 through: false,
45 truncated: { steps: 0, hubs: 0, chrome: 0 },
46 index: { lastIndexedAt: null, edges: 0, files: 0 },
47 timing: { elapsedMs: 1 },
48 };
49}
50
51/** The graph as `from → to` lines, each with what has to hold. */
52function shape(root: WireBlock): string[] {

Callers 1

Calls 1

stepFunction · 0.70

Tested by

no test coverage detected