()
| 62 | }; |
| 63 | |
| 64 | const 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 | |
| 74 | const createPackedWorkerBundlerSource = async (distPath: string): Promise<string> => { |
| 75 | const esbuildPath = join(repoRoot, "node_modules/.bun/node_modules/esbuild/lib/main.js"); |
no test coverage detected