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

Function loadBundler

packages/computerd/src/cli/bundle-port.test.ts:23–34  ·  view source on GitHub ↗
(ctx: {
  skip: (reason?: string) => void;
})

Source from the content-addressed store, hash-verified

21}) => Promise<void>;
22
23async function loadBundler(ctx: {
24 skip: (reason?: string) => void;
25}): Promise<BundleComputerd | undefined> {
26 try {
27 await fs.access(distEntry);
28 } catch {
29 ctx.skip("dist/cli/computerd.cjs not built; run `npm run build` first");
30 return undefined;
31 }
32 const mod = (await import(bundleScript)) as { bundleComputerd: BundleComputerd };
33 return mod.bundleComputerd;
34}
35
36test("COMPUTERD_DEFAULT_PORT stamps into the SEA bundle", async (ctx) => {
37 const bundleComputerd = await loadBundler(ctx);

Callers 1

Calls 1

accessMethod · 0.65

Tested by

no test coverage detected