MCPcopy Create free account
hub / github.com/ayush-that/sub-agents.directory / syncContent

Function syncContent

scripts/sync-upstream.ts:65–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65async function syncContent(): Promise<void> {
66 const extractedPath = await cloneRepo();
67 const commitSha = getLatestCommit();
68
69 // Create content directory if it doesn't exist (don't delete existing)
70 await mkdir(LOCAL_CONTENT_PATH, { recursive: true });
71
72 await copyDirectory(extractedPath, LOCAL_CONTENT_PATH);
73 await writeFile(".upstream-commit", commitSha);
74 await rm(TEMP_DIR, { recursive: true });
75
76 execSync("bun format", { stdio: "pipe" });
77}
78
79syncContent().catch(() => {
80 process.exit(1);

Callers 1

sync-upstream.tsFile · 0.85

Calls 3

cloneRepoFunction · 0.85
getLatestCommitFunction · 0.85
copyDirectoryFunction · 0.85

Tested by

no test coverage detected