import { mkdir, writeFile } from "node:fs/promises"; import { join } from "node:path"; import { thinMach } from "../../src/domain/binaryTarget.fixture.js"; /** Write a synthetic app shell; each caller supplies its own plist and archives. */ export const writeInterfaceBuilderBundle = async ( app: string, executable: string, infoPlist: string, ): Promise => { const contents = join(app, "Contents"); const resources = join(contents, "Resources"); await mkdir(resources, { recursive: true }); await mkdir(join(contents, "MacOS")); await writeFile( join(contents, "MacOS", executable), thinMach(0xfeedfacf, 0x0100000c), ); await writeFile(join(contents, "Info.plist"), infoPlist); return resources; };