MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / createRepo

Function createRepo

dev/local/env-sync/plan.test.ts:21–30  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

19function writeFile(root: string, relPath: string, content: string): void {
20 const filePath = path.join(root, relPath);
21 fs.mkdirSync(path.dirname(filePath), { recursive: true });
22 fs.writeFileSync(filePath, content, 'utf-8');
23}
24
25function createRepo(files: Record<string, string>): TestRepo {
26 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'env-sync-plan-'));
27 for (const [relPath, content] of Object.entries(files)) {
28 writeFile(root, relPath, content);
29 }
30 return {
31 root,
32 cleanup: () => fs.rmSync(root, { recursive: true, force: true }),
33 };

Callers 3

createCloudAgentNextRepoFunction · 0.70
plan.test.tsFile · 0.70

Calls 2

joinMethod · 0.80
writeFileFunction · 0.70

Tested by

no test coverage detected