()
| 36 | }; |
| 37 | |
| 38 | const 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 | |
| 48 | const createPackedWorkerBundlerSource = async (distPath: string): Promise<string> => { |
| 49 | const esbuildPath = join(repoRoot, "node_modules/.bun/node_modules/esbuild/lib/main.js"); |
no test coverage detected