| 29 | let trustedRendererHost: string | null = null |
| 30 | |
| 31 | async function buildDevWebBridge() { |
| 32 | await mkdir(path.dirname(bridgeBuildPath), { recursive: true }) |
| 33 | const result = await Bun.build({ |
| 34 | entrypoints: [path.join(projectRoot, 'scripts', 'dev-web-bridge-node.ts')], |
| 35 | outdir: path.dirname(bridgeBuildPath), |
| 36 | naming: path.basename(bridgeBuildPath), |
| 37 | target: 'node', |
| 38 | format: 'esm', |
| 39 | packages: 'external', |
| 40 | sourcemap: 'linked', |
| 41 | throw: true, |
| 42 | }) |
| 43 | |
| 44 | console.log(`Built dev:web bridge (${result.outputs.length} output(s)).`) |
| 45 | } |
| 46 | |
| 47 | async function shutdown(exitCode = 0) { |
| 48 | if (isShuttingDown) { |