MCPcopy Index your code
hub / github.com/tinyplex/tinybase / rewriteAndValidatePublishedDocShots

Function rewriteAndValidatePublishedDocShots

site/shots.ts:107–123  ·  view source on GitHub ↗
(outDir: string)

Source from the content-addressed store, hash-verified

105};
106
107export const rewriteAndValidatePublishedDocShots = (outDir: string): void => {
108 syncPublishedDocShots(outDir);
109 rewritePublishedDocShots(outDir);
110 const missing = [...getPublishedDocShotRefs(outDir).entries()].filter(
111 ([ref]) => !existsSync(join(outDir, ref)),
112 );
113 if (missing.length > 0) {
114 throw new Error(
115 missing
116 .map(
117 ([ref, files]) =>
118 `Missing doc shot ${ref} referenced from ${files.join(', ')}`,
119 )
120 .join('\n'),
121 );
122 }
123};

Callers 1

buildFunction · 0.90

Calls 4

syncPublishedDocShotsFunction · 0.85
rewritePublishedDocShotsFunction · 0.85
getPublishedDocShotRefsFunction · 0.85
joinFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…