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

Function ensureBundle

e2e/setup/desktop-macos.globalsetup.ts:40–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38/** Build the packaged mac bundle if it isn't on disk (slow; reuse an existing
39 * dist/ while iterating). Mirrors desktop-packaged.globalsetup. */
40const 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
57const provisionMac = async (): Promise<ProvisionedGuest> => {
58 ensureBundle();

Callers 1

provisionMacFunction · 0.70

Calls 2

hostBundleFunction · 0.70
runFunction · 0.70

Tested by

no test coverage detected