(trail: WireTrail)
| 177 | * is all an id has ever been here. |
| 178 | */ |
| 179 | export 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 | } |
no test coverage detected