MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resolveWorkerBundlerDistPath

Function resolveWorkerBundlerDistPath

apps/cli/src/build.ts:64–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62};
63
64const resolveWorkerBundlerDistPath = (): string => {
65 const req = createRequire(join(repoRoot, "apps/cli/package.json"));
66 const pkgJson = req.resolve("@cloudflare/worker-bundler/package.json");
67 const distPath = join(dirname(pkgJson), "dist");
68 if (!existsSync(join(distPath, "index.js")) || !existsSync(join(distPath, "esbuild.wasm"))) {
69 throw new Error(`@cloudflare/worker-bundler dist files not found at ${distPath}`);
70 }
71 return distPath;
72};
73
74const createPackedWorkerBundlerSource = async (distPath: string): Promise<string> => {
75 const esbuildPath = join(repoRoot, "node_modules/.bun/node_modules/esbuild/lib/main.js");

Callers 1

buildBinariesFunction · 0.85

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected