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

Function getPublishedDocShotRefs

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

Source from the content-addressed store, hash-verified

86};
87
88const getPublishedDocShotRefs = (outDir: string): Map<string, string[]> => {
89 const refs = new Map<string, string[]>();
90 DOC_SHOT_OUTPUT_PATHS.forEach((extension) =>
91 forEachDeepFile(
92 outDir,
93 (filePath) => {
94 const matches = readFileSync(filePath, UTF8).match(DOC_SHOT_REFS) ?? [];
95 matches.forEach((ref) => {
96 const files = refs.get(ref) ?? [];
97 files.push(filePath);
98 refs.set(ref, files);
99 });
100 },
101 extension,
102 ),
103 );
104 return refs;
105};
106
107export const rewriteAndValidatePublishedDocShots = (outDir: string): void => {
108 syncPublishedDocShots(outDir);

Callers 1

Calls 2

getMethod · 0.80
forEachDeepFileFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…