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

Function init

packages/computer/src/git/diff.test.ts:28–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

diff.test.tsFile · 0.70

Calls 2

mkdirMethod · 0.65
initMethod · 0.65

Tested by

no test coverage detected