MCPcopy Create free account
hub / github.com/SethGammon/Citadel / buildArchiveFile

Function buildArchiveFile

scripts/unharness.js:49–56  ·  view source on GitHub ↗
(source, files, exportedAt)

Source from the content-addressed store, hash-verified

47 if (content) results.push({ name: entry.name, content });
48 }
49 return results;
50}
51
52function buildArchiveFile(source, files, exportedAt) {
53 if (!files.length) return null;
54 const frontmatter = `---\ncitadel-archive: true\nexported-at: ${exportedAt}\nsource: ${source}\n---`;
55 const body = files
56 .map(f => `## ${f.name.replace(/\.md$/, '')}\n\n${f.content}`)
57 .join('\n\n---\n\n');
58 return `${frontmatter}\n\n${body}\n`;
59}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected