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

Function init

packages/computer/src/git/reads.test.ts:27–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25const isogit = git as unknown as IsomorphicGitReadsClient;
26
27async function init() {
28 await memfs.promises.mkdir(DIR, { recursive: true });
29 await git.init({ fs: memfs, dir: DIR, defaultBranch: "main" });
30}
31
32async function commit(path: string, content: string, message: string): Promise<string> {
33 await memfs.promises.writeFile(`${DIR}/${path}`, content);

Callers 1

reads.test.tsFile · 0.70

Calls 2

mkdirMethod · 0.65
initMethod · 0.65

Tested by

no test coverage detected