MCPcopy Create free account
hub / github.com/cloudflare/computer / init

Function init

packages/computer/src/git/commit.test.ts:14–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12const DIR = "/repo";
13
14async function init() {
15 await memfs.promises.mkdir(DIR, { recursive: true });
16 await git.init({ fs: memfs, dir: DIR, defaultBranch: "main" });
17}
18
19async function stage(name: string, content: string) {
20 await memfs.promises.writeFile(`${DIR}/${name}`, content);

Callers 1

commit.test.tsFile · 0.70

Calls 2

mkdirMethod · 0.65
initMethod · 0.65

Tested by

no test coverage detected