()
| 38 | /** Build the packaged mac bundle if it isn't on disk (slow; reuse an existing |
| 39 | * dist/ while iterating). Mirrors desktop-packaged.globalsetup. */ |
| 40 | const ensureBundle = (): void => { |
| 41 | if (existsSync(hostBundle().app)) return; |
| 42 | const run = (cmd: string, args: string[]) => |
| 43 | execFileSync(cmd, args, { cwd: appDir, stdio: "inherit", env: { ...process.env } }); |
| 44 | run("bun", ["./scripts/build-sidecar.ts"]); |
| 45 | run("bunx", ["--bun", "electron-vite", "build"]); |
| 46 | execFileSync( |
| 47 | "bunx", |
| 48 | ["--bun", "electron-builder", "--config", "electron-builder.e2e.config.ts", "--mac"], |
| 49 | { |
| 50 | cwd: appDir, |
| 51 | stdio: "inherit", |
| 52 | env: { ...process.env, CSC_IDENTITY_AUTO_DISCOVERY: "false" }, |
| 53 | }, |
| 54 | ); |
| 55 | }; |
| 56 | |
| 57 | const provisionMac = async (): Promise<ProvisionedGuest> => { |
| 58 | ensureBundle(); |
no test coverage detected