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

Function trailExport

ui/src/lib/trails-model.ts:179–202  ·  view source on GitHub ↗
(trail: WireTrail)

Source from the content-addressed store, hash-verified

177 * is all an id has ever been here.
178 */
179export function trailExport(trail: WireTrail): string {
180 return `${JSON.stringify(
181 {
182 version: 1,
183 id: trail.id,
184 name: trail.name,
185 note: trail.note,
186 author: trail.author,
187 createdAt: trail.createdAt,
188 updatedAt: trail.updatedAt,
189 hops: trail.hops.map((hop) => ({
190 dir: hop.dir,
191 name: hop.name,
192 qualifiedName: hop.qualifiedName,
193 kind: hop.kind,
194 file: hop.savedFile,
195 line: hop.savedLine,
196 id: hop.id ?? '',
197 })),
198 },
199 null,
200 2
201 )}\n`;
202}

Callers 1

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected