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

Function resolveWorkerBundlerDistPath

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

Source from the content-addressed store, hash-verified

36};
37
38const resolveWorkerBundlerDistPath = (): string => {
39 const req = createRequire(join(repoRoot, "packages/plugins/apps/package.json"));
40 const pkgJson = req.resolve("@cloudflare/worker-bundler/package.json");
41 const distPath = join(dirname(pkgJson), "dist");
42 if (!existsSync(join(distPath, "index.js")) || !existsSync(join(distPath, "esbuild.wasm"))) {
43 throw new Error(`@cloudflare/worker-bundler dist files not found at ${distPath}`);
44 }
45 return distPath;
46};
47
48const createPackedWorkerBundlerSource = async (distPath: string): Promise<string> => {
49 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