app-builder-lib 27.0.0-alpha.6 → 27.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/codeSign/win/signtoolBaseSignManager.d.ts +23 -0
  2. package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
  3. package/dist/codeSign/win/signtoolBaseSignManager.js +71 -0
  4. package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
  5. package/dist/configuration.d.ts +42 -5
  6. package/dist/configuration.d.ts.map +1 -1
  7. package/dist/configuration.js.map +1 -1
  8. package/dist/fileMatcher.d.ts +15 -0
  9. package/dist/fileMatcher.d.ts.map +1 -1
  10. package/dist/fileMatcher.js +41 -2
  11. package/dist/fileMatcher.js.map +1 -1
  12. package/dist/indexInternal.d.ts +2 -1
  13. package/dist/indexInternal.d.ts.map +1 -1
  14. package/dist/indexInternal.js +2 -1
  15. package/dist/indexInternal.js.map +1 -1
  16. package/dist/macPackager.d.ts.map +1 -1
  17. package/dist/macPackager.js +2 -3
  18. package/dist/macPackager.js.map +1 -1
  19. package/dist/node-module-collector/nodeModulesCollector.d.ts +11 -1
  20. package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
  21. package/dist/node-module-collector/nodeModulesCollector.js +28 -5
  22. package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
  23. package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
  24. package/dist/node-module-collector/pnpmNodeModulesCollector.js +3 -1
  25. package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
  26. package/dist/options/SnapOptions.d.ts +8 -4
  27. package/dist/options/SnapOptions.d.ts.map +1 -1
  28. package/dist/options/SnapOptions.js.map +1 -1
  29. package/dist/options/macOptions.d.ts +17 -7
  30. package/dist/options/macOptions.d.ts.map +1 -1
  31. package/dist/options/macOptions.js.map +1 -1
  32. package/dist/options/winOptions.d.ts +5 -4
  33. package/dist/options/winOptions.d.ts.map +1 -1
  34. package/dist/options/winOptions.js.map +1 -1
  35. package/dist/packager.js +1 -1
  36. package/dist/packager.js.map +1 -1
  37. package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
  38. package/dist/publish/updateInfoBuilder.js +3 -1
  39. package/dist/publish/updateInfoBuilder.js.map +1 -1
  40. package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
  41. package/dist/targets/linux/FlatpakTarget.js +4 -1
  42. package/dist/targets/linux/FlatpakTarget.js.map +1 -1
  43. package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
  44. package/dist/targets/linux/FpmTarget.js +9 -0
  45. package/dist/targets/linux/FpmTarget.js.map +1 -1
  46. package/dist/targets/linux/appimage/appImageUtil.d.ts +1 -1
  47. package/dist/targets/linux/appimage/appImageUtil.js +3 -3
  48. package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
  49. package/dist/targets/linux/snap/core24.d.ts +27 -0
  50. package/dist/targets/linux/snap/core24.d.ts.map +1 -1
  51. package/dist/targets/linux/snap/core24.js +92 -57
  52. package/dist/targets/linux/snap/core24.js.map +1 -1
  53. package/dist/targets/mac/MacTargetHelper.d.ts +12 -2
  54. package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
  55. package/dist/targets/mac/MacTargetHelper.js +20 -11
  56. package/dist/targets/mac/MacTargetHelper.js.map +1 -1
  57. package/dist/targets/win/MsiTarget.js +2 -2
  58. package/dist/targets/win/MsiTarget.js.map +1 -1
  59. package/dist/toolsets/custom.js +4 -2
  60. package/dist/toolsets/custom.js.map +1 -1
  61. package/dist/toolsets/icons.d.ts.map +1 -1
  62. package/dist/toolsets/icons.js +4 -1
  63. package/dist/toolsets/icons.js.map +1 -1
  64. package/dist/util/appFileCopier.d.ts.map +1 -1
  65. package/dist/util/appFileCopier.js +63 -2
  66. package/dist/util/appFileCopier.js.map +1 -1
  67. package/dist/util/electronGet.d.ts +5 -0
  68. package/dist/util/electronGet.d.ts.map +1 -1
  69. package/dist/util/electronGet.js +107 -7
  70. package/dist/util/electronGet.js.map +1 -1
  71. package/dist/util/packageMetadata.js +46 -21
  72. package/dist/util/packageMetadata.js.map +1 -1
  73. package/dist/version.d.ts +1 -1
  74. package/dist/version.js +1 -1
  75. package/dist/version.js.map +1 -1
  76. package/package.json +8 -8
  77. package/scheme.json +36 -10
@@ -1 +1 @@
1
- {"version":3,"file":"pnpmNodeModulesCollector.js","sourceRoot":"","sources":["../../src/node-module-collector/pnpmNodeModulesCollector.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAgB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,OAAO,wBAAyB,SAAQ,oBAAoD;IAAlG;;QACkB,mBAAc,GAAG;YAC/B,OAAO,EAAE,EAAE,CAAC,IAAI;YAChB,QAAQ,EAAE,gBAAgB;SAC3B,CAAA;QAED,0DAA0D;QAClD,0BAAqB,GAAqB,EAAE,CAAA;QACpD,4FAA4F;QACpF,sBAAiB,GAAG,CAAC,CAAA;QAC7B,iEAAiE;QAChD,gBAAW,GAAG,IAAI,IAAI,CAAS,KAAK,IAAI,EAAE;YACzD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAA;YACrF,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CA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C,CAAA;QACjC,CAAC;IACH,CAAC;IAEkB,qBAAqB,CAAC,IAAoB,EAAE,WAAmB;QAChF,oFAAoF;QACpF,MAAM,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;QAC7D,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YACpB,OAAO,MAAM,CAAA;QACf,CAAC;QACD,kFAAkF;QAClF,4FAA4F;QAC5F,MAAM,KAAK,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC,CAAA;QACzG,OAAO,KAAK,IAAI,IAAI,CAAA;IACtB,CAAC;IAES,KAAK,CAAC,qBAAqB,CAAC,QAAgB;QACpD,MAAM,cAAc,GAAG,IAAI,CAAC,6BAA6B,CAAmB,QAAQ,CAAC,CAAA;QACrF,IAAI,CAAC,qBAAqB,GAAG,cAAc,CAAA;QAC3C,IAAI,CAAC,iBAAiB,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAA;QACrD,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;IAC1B,CAAC;CACF","sourcesContent":["import _fsExtra from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { LogMessageByKey, type Package, readJsonOrNull } from \"./moduleManager.js\"\nimport { NodeModulesCollector } from \"./nodeModulesCollector.js\"\nimport { getPackageManagerCommand, PM } from \"./packageManager.js\"\nimport type { PackageJson, PnpmDependency } from \"./types.js\"\nimport { isValidKey } from \"builder-util\"\n\nexport class PnpmNodeModulesCollector extends NodeModulesCollector<PnpmDependency, PnpmDependency> {\n public readonly installOptions = {\n manager: PM.PNPM,\n lockfile: \"pnpm-lock.yaml\",\n }\n\n // Raw backing field — all entries from `pnpm list --json`\n private _allWorkspacePackages: PnpmDependency[] = []\n // Cached after parseDependenciesTree resolves the Lazy; 0 = safe default (treated as < v11)\n private _pnpmMajorVersion = 0\n // Runs `pnpm --version` once and caches the major version number\n private readonly pnpmVersion = new Lazy<number>(async () => {\n const result = await this.asyncExec(getPackageManagerCommand(PM.PNPM), [\"--version\"])\n const major = parseInt((result.stdout ?? \"0\").split(\".\")[0], 10)\n return isNaN(major) ? 0 : major\n })\n\n /**\n * Detect pnpm's installed layout from the on-disk structure rather than `pnpm config list`.\n * pnpm 11 no longer echoes `node-linker` (from `.npmrc`) in `config list`, so the base-class\n * config-parsing detection silently reports \"not hoisted\" for a hoisted install, which would\n * disable the downward search needed to find version-conflicted nested deps.\n *\n * In the default isolated store every regular top-level package resolves — through a symlink\n * on POSIX, a junction on Windows — into `node_modules/.pnpm/<name>@<ver>/node_modules/<name>`.\n * In a hoisted layout the same package is a real directory directly under `node_modules`.\n * `realpath` transparently follows both symlinks and junctions, so a layout is isolated iff\n * *any* top-level package's real path routes through `.pnpm`. We scan rather than sample the\n * first entry because `link:` packages resolve to their source (never under `.pnpm`) and could\n * otherwise mask an isolated store.\n */\n protected override isHoisted = new Lazy<boolean>(async () => {\n const nmDir = path.join(this.rootDir, \"node_modules\")\n const entries = await _fsExtra.readdir(nmDir).catch(() => [] as string[])\n let sawPackage = false\n for (const name of entries) {\n if (name.startsWith(\".\")) {\n continue // .pnpm, .bin, .modules.yaml\n }\n const entryPath = path.join(nmDir, name)\n // A scoped dir (@scope) is not a package itself; descend to its packages.\n const candidates = name.startsWith(\"@\") ? (await _fsExtra.readdir(entryPath).catch(() => [] as string[])).map(s => path.join(entryPath, s)) : [entryPath]\n for (const candidate of candidates) {\n const real = await _fsExtra.realpath(candidate).catch(() => null)\n if (real == null) {\n continue\n }\n sawPackage = true\n if (real.split(path.sep).includes(\".pnpm\")) {\n return false // isolated store: a package routes through the virtual store\n }\n }\n }\n // Packages exist and none route through `.pnpm` → hoisted. No packages → flat default.\n return sawPackage\n })\n\n /**\n * Memo for `locateFromDepOrRoot`, keyed by `name@version`. pnpm's content-addressed virtual\n * store guarantees that any given `name@version` resolves to a single location on disk, so\n * once we've resolved a package we can short-circuit every subsequent lookup. This is the\n * dominant speedup for large workspaces where the `pnpm list --json` tree contains the same\n * `name@version` thousands of times (one entry per dependent).\n */\n private readonly locateMemo: Map<string, Promise<Package | null>> = new Map()\n\n /**\n * Visited set for `collectDepsRecursively`, keyed by `name@version`. Without this we re-walk\n * every shared subtree of the pnpm list output, exploding work in deep workspaces.\n */\n private readonly collectedDeps: Set<string> = new Set()\n\n /** Reverse index of `allDependencies` keyed by package name (without version). Built once on\n * first access inside `extractProductionDependencyGraph`, after `allDependencies` is settled. */\n private _allDepsByName: Map<string, PnpmDependency> | null = null\n\n /**\n * Returns the workspace packages to iterate over, gated by detected pnpm version:\n * - pnpm v11+: multi-entry workspace output → return the full parsed array\n * - pnpm < v11 / non-workspace / detection failure: single-tree behavior → return only [0]\n */\n private get allWorkspacePackages(): PnpmDependency[] {\n if (this._pnpmMajorVersion >= 11) {\n return this._allWorkspacePackages\n }\n return this._allWorkspacePackages.slice(0, 1)\n }\n\n protected getArgs(): string[] {\n return [\"list\", \"--prod\", \"--json\", \"--depth\", \"Infinity\", \"--silent\", \"--loglevel=error\"]\n }\n\n private getAllDepsByName(): Map<string, PnpmDependency> {\n if (!this._allDepsByName) {\n this._allDepsByName = new Map()\n for (const [id, dep] of this.allDependencies.entries()) {\n const { name } = this.parseNameVersion(id)\n if (!this._allDepsByName.has(name)) {\n this._allDepsByName.set(name, dep)\n }\n }\n }\n return this._allDepsByName\n }\n\n /**\n * Locate a package version, preferring the dep's own reported path before falling back to rootDir.\n * This is critical for pnpm non-hoisted (virtual store) setups where each package has its own\n * nested node_modules. Searching only from rootDir can resolve the wrong version when multiple\n * versions of a dep exist in the workspace.\n */\n private async locateFromDepOrRoot(pkgName: string, parentPath: string | undefined, requiredRange?: string) {\n // pnpm's virtual store is content-addressed: every `name@version` lookup is deterministic,\n // so memoize on the exact version. `requiredRange` is normally an exact version coming from\n // the pnpm list output (e.g. `value.version`), which makes this cache hit on duplicates.\n // Only memoize when we have a concrete version — semver ranges could resolve differently\n // depending on what's installed at `parentPath` vs root, so skip the cache for those.\n const memoKey = requiredRange && /^\\d/.test(requiredRange) ? `${pkgName}@${requiredRange}` : null\n if (memoKey != null) {\n const cached = this.locateMemo.get(memoKey)\n if (cached != null) {\n return cached\n }\n }\n\n // pnpm's default `.pnpm` virtual store is flat, so `downwardSearch` would burn thousands\n // of `readdir`/`lstat` calls finding nothing. With `nodeLinker: hoisted`, however, the\n // layout is a traditional nested `node_modules` tree where version-conflicted packages\n // land at `<root>/node_modules/A/node_modules/B` — downward BFS is needed to find them.\n const skipDownwardSearch = !(await this.isHoisted.value)\n const promise = (async (): Promise<Package | null> => {\n // Phase 1: find a version that SATISFIES requiredRange, trying the dep's own location\n // first, then the workspace root. Crucially, neither pass accepts an out-of-range override\n // here — so a wrong-version copy reachable via upward search from `parentPath` (e.g. a\n // hoisted top-level dep) can't shadow the correct nested copy under root. Without this, a\n // package that pnpm deduped to a peer's node_modules resolves its transitive deps to the\n // wrong hoisted version (see jsonfile under two fs-extra majors). The root pass uses the\n // same `skipDownwardSearch` as everywhere else: in a hoisted layout it is already false, so\n // the nested `<root>/node_modules/A/node_modules/B` copy is found via BFS; in the flat\n // `.pnpm` virtual store it stays true (forcing it on there would burn thousands of\n // readdir/lstat calls — and on Windows, where pnpm uses junctions that `lstat` reports as\n // directories, the BFS walks the entire store and resolves the wrong paths).\n const satisfying =\n (parentPath ? await this.cache.locatePackageVersion({ pkgName, parentDir: parentPath, requiredRange, skipDownwardSearch, skipOverrideFallback: true }) : null) ??\n (await this.cache.locatePackageVersion({ pkgName, parentDir: this.rootDir, requiredRange, skipDownwardSearch, skipOverrideFallback: true }))\n if (satisfying) {\n return satisfying\n }\n // Phase 2: no version satisfies requiredRange (package-manager override, or no range\n // given). Fall back to the original dep-then-root order, now allowing override versions.\n const fromDep = parentPath ? await this.cache.locatePackageVersion({ pkgName, parentDir: parentPath, requiredRange, skipDownwardSearch }) : null\n if (fromDep) {\n return fromDep\n }\n return this.cache.locatePackageVersion({ pkgName, parentDir: this.rootDir, requiredRange, skipDownwardSearch })\n })()\n\n if (memoKey != null) {\n this.locateMemo.set(memoKey, promise)\n }\n return promise\n }\n\n // pnpm 10+ does not automatically preserve transitive optional platform-specific\n // packages (e.g. sass-embedded-linux-x64) across lock file regeneration. Users\n // must list them as direct optionalDependencies. Missing ones are emitted as\n // PKG_OPTIONAL_PLATFORM_NOT_INSTALLED warnings in the log summary.\n protected async extractProductionDependencyGraph(tree: PnpmDependency, dependencyId: string) {\n if (this.productionGraph[dependencyId]) {\n return\n }\n this.productionGraph[dependencyId] = { dependencies: [] }\n\n if ((tree.dedupedDependenciesCount ?? 0) > 0) {\n const realDep = this.allDependencies.get(dependencyId)\n if (realDep) {\n this.cache.logSummary[LogMessageByKey.PKG_DUPLICATE_REF].push(dependencyId)\n tree = realDep\n } else {\n this.cache.logSummary[LogMessageByKey.PKG_DUPLICATE_REF_UNRESOLVED].push(dependencyId)\n return\n }\n }\n\n const packageName = tree.name || tree.from\n const { packageJson: locatedJson } = (await this.locateFromDepOrRoot(packageName, tree.path, tree.version)) || {}\n // Fallback: the app root package is never installed inside a node_modules directory, so\n // the name-based lookup above returns null. Reading directly from tree.path ensures that\n // link: dependencies — which some pnpm versions omit from `pnpm list --prod` output —\n // still appear in `all` and therefore reach the production graph.\n const packageJson = locatedJson ?? (tree.path ? await readJsonOrNull<PackageJson>(path.join(tree.path, \"package.json\")) : null)\n\n const all = packageJson ? { ...packageJson.dependencies, ...packageJson.optionalDependencies } : { ...tree.dependencies, ...tree.optionalDependencies }\n const optional = packageJson ? { ...packageJson.optionalDependencies } : {}\n\n const deps: Record<string, PnpmDependency> = { ...(tree.dependencies || {}), ...(tree.optionalDependencies || {}) }\n\n // pnpm --prod omits sub-deps for link: packages (and synthetic entries derived from them).\n // For any dep declared in the package.json (all) that pnpm left out of the tree, recover\n // the resolved entry from allDependencies so it lands in the production graph.\n const byName = this.getAllDepsByName()\n for (const depName of Object.keys(all)) {\n if (!deps[depName]) {\n const dep = byName.get(depName)\n if (dep && isValidKey(depName)) {\n deps[depName] = dep\n }\n }\n }\n\n this.productionGraph[dependencyId] = { dependencies: [] }\n const depPromises = Object.entries(deps).map(async ([packageName, dependency]) => {\n // First check if it's in production dependencies\n if (!all[packageName]) {\n return undefined\n }\n\n // Then check if optional dependency path exists (using actual resolved path)\n if (optional[packageName]) {\n const pkg = await this.locateFromDepOrRoot(packageName, tree.path, dependency.version)\n if (!pkg) {\n this.logMissingDependency(`${packageName}@${dependency.version}`)\n return undefined\n }\n }\n const { id: childDependencyId, pkgOverride } = this.normalizePackageVersion(packageName, dependency)\n await this.extractProductionDependencyGraph(pkgOverride, childDependencyId)\n return childDependencyId\n })\n\n const collectedDependencies: string[] = []\n for (const dep of depPromises) {\n const result = await dep\n if (result !== undefined) {\n collectedDependencies.push(result)\n }\n }\n this.productionGraph[dependencyId] = { dependencies: collectedDependencies }\n }\n\n protected async collectAllDependencies(_tree: PnpmDependency, _appPackageName: string): Promise<void> {\n for (const root of this.allWorkspacePackages) {\n await this.collectDepsRecursively(root)\n }\n // pnpm --prod omits link: packages from its JSON output entirely; pick them up from the\n // app's package.json so their transitive deps are included in allDependencies.\n await this.collectOmittedLinkPackages()\n }\n\n /**\n * Resolve a `link:` dependency to its real on-disk source directory — never the `node_modules`\n * junction pnpm creates for it. Returns null for non-link deps.\n *\n * Why this matters: resolving a link: dep through `node_modules` (locateFromDepOrRoot) yields the\n * junction, which CI cannot read across drives. CI checks out the repo on `D:` but installs the\n * app under `C:\\…\\Temp`, so the junction is a cross-volume link that `realpath`/`stat` fail on,\n * silently dropping the package from the asar. The link target is a plain directory that reads\n * fine from any drive, so we resolve straight to it.\n */\n private resolveLinkTarget(value: PnpmDependency): string | null {\n const version = value.version\n if (typeof version !== \"string\" || !version.startsWith(\"link:\")) {\n return null\n }\n const spec = version.slice(\"link:\".length)\n // A cross-drive link cannot be expressed relative, so pnpm reports it as an absolute path —\n // use it directly. Otherwise prefer pnpm's already-resolved absolute `path` (the source dir,\n // never the junction), falling back to resolving the relative spec against the workspace root.\n if (path.isAbsolute(spec)) {\n return path.normalize(spec)\n }\n if (value.path && path.isAbsolute(value.path)) {\n return path.normalize(value.path)\n }\n return path.resolve(this.rootDir, spec)\n }\n\n private async readPackageJsonAt(dir: string): Promise<Package | null> {\n const packageJson = await readJsonOrNull<PackageJson>(path.join(dir, \"package.json\"))\n return packageJson ? { packageDir: dir, packageJson } : null\n }\n\n /**\n * Visit a single dependency node, adding it and its transitive deps to allDependencies.\n *\n * For packages that pnpm list did NOT expand (link: packages and the synthetic entries\n * derived from them), the tree has empty dependencies/optionalDependencies. In that case\n * we fall back to the on-disk package.json to discover transitive deps, resolving each one\n * from the package's own node_modules first (where pnpm placed them).\n */\n private async visitDep(key: string, value: PnpmDependency): Promise<void> {\n const id = `${key}@${value.version}`\n // The pnpm list output can include the same `name@version` thousands of times across a\n // deep workspace; without this guard we re-resolve and re-recurse each occurrence.\n if (this.collectedDeps.has(id)) {\n return\n }\n this.collectedDeps.add(id)\n\n const located = await this.locateFromDepOrRoot(key, value.path, value.version)\n // For a link: dep, store the real source dir (the link target) rather than the located path,\n // which is the node_modules junction. Across drives that junction is unreadable (see\n // resolveLinkTarget), so storing it makes the package vanish from the asar.\n const linkTarget = this.resolveLinkTarget(value)\n const resolvedPath = linkTarget ?? located?.packageDir ?? value.path\n this.allDependencies.set(id, { ...value, path: resolvedPath })\n\n // For transitive-dep discovery of entries pnpm did not expand (link: packages), use the\n // located package.json; fall back to the link target's own package.json when the junction\n // could not be resolved (again, the cross-drive case).\n const pkg = located ?? (linkTarget != null ? await this.readPackageJsonAt(linkTarget) : null)\n const hasTreeDeps = Object.keys(value.dependencies ?? {}).length > 0 || Object.keys(value.optionalDependencies ?? {}).length > 0\n if (!hasTreeDeps && pkg?.packageJson) {\n // pnpm list omits sub-deps for link: packages and for entries where the reported path\n // doesn't expand transitive deps (e.g. a link: package's nested dep). Use the on-disk\n // package.json to discover what to include, and pass the declared version range so that\n // resolution skips wrong-version hoisted packages and finds the correct nested copy.\n const pkgDepsDecl = { ...(pkg.packageJson.dependencies || {}), ...(pkg.packageJson.optionalDependencies || {}) }\n for (const [depName, depRange] of Object.entries(pkgDepsDecl)) {\n const resolved = await this.locateFromDepOrRoot(depName, pkg.packageDir, typeof depRange === \"string\" ? depRange : undefined)\n if (!resolved) {\n continue\n }\n await this.visitDep(depName, {\n from: depName,\n name: depName,\n version: resolved.packageJson.version,\n path: resolved.packageDir,\n dependencies: {},\n optionalDependencies: {},\n } as unknown as PnpmDependency)\n }\n } else {\n await this.collectDepsRecursively(value)\n }\n }\n\n private async collectDepsRecursively(tree: PnpmDependency): Promise<void> {\n for (const [key, value] of Object.entries(tree.dependencies || {})) {\n await this.visitDep(key, value)\n }\n for (const [key, value] of Object.entries(tree.optionalDependencies || {})) {\n await this.visitDep(key, value)\n }\n }\n\n /**\n * pnpm excludes link: packages from `pnpm list --prod` output. Read the app's package.json\n * directly to find any link: deps that were silently omitted and visit them so their\n * transitive deps end up in allDependencies.\n */\n private async collectOmittedLinkPackages(): Promise<void> {\n const appPkgJson = await readJsonOrNull<PackageJson>(path.join(this.rootDir, \"package.json\"))\n if (!appPkgJson) {\n return\n }\n const allDeps = { ...(appPkgJson.dependencies || {}), ...(appPkgJson.optionalDependencies || {}) }\n for (const [name, version] of Object.entries(allDeps)) {\n if (typeof version !== \"string\" || !version.startsWith(\"link:\")) {\n continue\n }\n // Resolve the link: target path directly — bypasses potentially broken cross-drive\n // Windows junctions (C:→D:) that locateFromDepOrRoot would traverse through\n // node_modules and silently fail on (readJson returns null via .catch).\n const linkRelPath = version.slice(\"link:\".length)\n const linkTarget = path.isAbsolute(linkRelPath) ? linkRelPath : path.resolve(this.rootDir, linkRelPath)\n const directPkg = await readJsonOrNull<PackageJson>(path.join(linkTarget, \"package.json\"))\n const resolved = directPkg ? { packageDir: linkTarget, packageJson: directPkg } : await this.locateFromDepOrRoot(name, this.rootDir, undefined)\n if (!resolved) {\n continue\n }\n await this.visitDep(name, {\n from: name,\n name,\n version: resolved.packageJson.version,\n path: resolved.packageDir,\n dependencies: {},\n optionalDependencies: {},\n } as unknown as PnpmDependency)\n }\n }\n\n protected override getTreeFromWorkspaces(tree: PnpmDependency, packageName: string): PnpmDependency {\n // pnpm v10 workspace: app is nested as a dependency of root — handled by base class\n const result = super.getTreeFromWorkspaces(tree, packageName)\n if (result !== tree) {\n return result\n }\n // pnpm v11 workspace: each workspace package is a separate top-level array entry;\n // non-workspace (single-tree): find returns the one entry or undefined → falls back to tree\n const match = this.allWorkspacePackages.find(pkg => pkg.name === packageName || pkg.from === packageName)\n return match ?? tree\n }\n\n protected async parseDependenciesTree(jsonBlob: string): Promise<PnpmDependency> {\n const dependencyTree = this.extractJsonFromPollutedOutput<PnpmDependency[]>(jsonBlob)\n this._allWorkspacePackages = dependencyTree\n this._pnpmMajorVersion = await this.pnpmVersion.value\n return dependencyTree[0]\n }\n}\n"]}
1
+ {"version":3,"file":"pnpmNodeModulesCollector.js","sourceRoot":"","sources":["../../src/node-module-collector/pnpmNodeModulesCollector.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAgB,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,OAAO,wBAAyB,SAAQ,oBAAoD;IAAlG;;QACkB,mBAAc,GAAG;YAC/B,OAAO,EAAE,EAAE,CAAC,IAAI;YAChB,QAAQ,EAAE,gBA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esContent":["import _fsExtra from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { LogMessageByKey, type Package, readJsonOrNull } from \"./moduleManager.js\"\nimport { NodeModulesCollector } from \"./nodeModulesCollector.js\"\nimport { getPackageManagerCommand, PM } from \"./packageManager.js\"\nimport type { PackageJson, PnpmDependency } from \"./types.js\"\nimport { isValidKey } from \"builder-util\"\n\nexport class PnpmNodeModulesCollector extends NodeModulesCollector<PnpmDependency, PnpmDependency> {\n public readonly installOptions = {\n manager: PM.PNPM,\n lockfile: \"pnpm-lock.yaml\",\n }\n\n // Raw backing field — all entries from `pnpm list --json`\n private _allWorkspacePackages: PnpmDependency[] = []\n // Cached after parseDependenciesTree resolves the Lazy; 0 = safe default (treated as < v11)\n private _pnpmMajorVersion = 0\n // Runs `pnpm --version` once and caches the major version number\n private readonly pnpmVersion = new Lazy<number>(async () => {\n const result = await this.asyncExec(getPackageManagerCommand(PM.PNPM), [\"--version\"])\n const major = parseInt((result.stdout ?? \"0\").split(\".\")[0], 10)\n return isNaN(major) ? 0 : major\n })\n\n /**\n * Detect pnpm's installed layout from the on-disk structure rather than `pnpm config list`.\n * pnpm 11 no longer echoes `node-linker` (from `.npmrc`) in `config list`, so the base-class\n * config-parsing detection silently reports \"not hoisted\" for a hoisted install, which would\n * disable the downward search needed to find version-conflicted nested deps.\n *\n * In the default isolated store every regular top-level package resolves — through a symlink\n * on POSIX, a junction on Windows — into `node_modules/.pnpm/<name>@<ver>/node_modules/<name>`.\n * In a hoisted layout the same package is a real directory directly under `node_modules`.\n * `realpath` transparently follows both symlinks and junctions, so a layout is isolated iff\n * *any* top-level package's real path routes through `.pnpm`. We scan rather than sample the\n * first entry because `link:` packages resolve to their source (never under `.pnpm`) and could\n * otherwise mask an isolated store.\n */\n protected override isHoisted = new Lazy<boolean>(async () => {\n const nmDir = path.join(this.rootDir, \"node_modules\")\n const entries = await _fsExtra.readdir(nmDir).catch(() => [] as string[])\n let sawPackage = false\n for (const name of entries) {\n if (name.startsWith(\".\")) {\n continue // .pnpm, .bin, .modules.yaml\n }\n const entryPath = path.join(nmDir, name)\n // A scoped dir (@scope) is not a package itself; descend to its packages.\n const candidates = name.startsWith(\"@\") ? (await _fsExtra.readdir(entryPath).catch(() => [] as string[])).map(s => path.join(entryPath, s)) : [entryPath]\n for (const candidate of candidates) {\n const real = await _fsExtra.realpath(candidate).catch(() => null)\n if (real == null) {\n continue\n }\n sawPackage = true\n if (real.split(path.sep).includes(\".pnpm\")) {\n return false // isolated store: a package routes through the virtual store\n }\n }\n }\n // Packages exist and none route through `.pnpm` → hoisted. No packages → flat default.\n return sawPackage\n })\n\n /**\n * Memo for `locateFromDepOrRoot`, keyed by `name@version`. pnpm's content-addressed virtual\n * store guarantees that any given `name@version` resolves to a single location on disk, so\n * once we've resolved a package we can short-circuit every subsequent lookup. This is the\n * dominant speedup for large workspaces where the `pnpm list --json` tree contains the same\n * `name@version` thousands of times (one entry per dependent).\n */\n private readonly locateMemo: Map<string, Promise<Package | null>> = new Map()\n\n /**\n * Visited set for `collectDepsRecursively`, keyed by `name@version`. Without this we re-walk\n * every shared subtree of the pnpm list output, exploding work in deep workspaces.\n */\n private readonly collectedDeps: Set<string> = new Set()\n\n /** Reverse index of `allDependencies` keyed by package name (without version). Built once on\n * first access inside `extractProductionDependencyGraph`, after `allDependencies` is settled. */\n private _allDepsByName: Map<string, PnpmDependency> | null = null\n\n /**\n * Returns the workspace packages to iterate over, gated by detected pnpm version:\n * - pnpm v11+: multi-entry workspace output → return the full parsed array\n * - pnpm < v11 / non-workspace / detection failure: single-tree behavior → return only [0]\n */\n private get allWorkspacePackages(): PnpmDependency[] {\n if (this._pnpmMajorVersion >= 11) {\n return this._allWorkspacePackages\n }\n return this._allWorkspacePackages.slice(0, 1)\n }\n\n protected getArgs(): string[] {\n return [\"list\", \"--prod\", \"--json\", \"--depth\", \"Infinity\", \"--silent\", \"--loglevel=error\"]\n }\n\n private getAllDepsByName(): Map<string, PnpmDependency> {\n if (!this._allDepsByName) {\n this._allDepsByName = new Map()\n for (const [id, dep] of this.allDependencies.entries()) {\n const { name } = this.parseNameVersion(id)\n if (!this._allDepsByName.has(name)) {\n this._allDepsByName.set(name, dep)\n }\n }\n }\n return this._allDepsByName\n }\n\n /**\n * Locate a package version, preferring the dep's own reported path before falling back to rootDir.\n * This is critical for pnpm non-hoisted (virtual store) setups where each package has its own\n * nested node_modules. Searching only from rootDir can resolve the wrong version when multiple\n * versions of a dep exist in the workspace.\n */\n private async locateFromDepOrRoot(pkgName: string, parentPath: string | undefined, requiredRange?: string) {\n // pnpm's virtual store is content-addressed: every `name@version` lookup is deterministic,\n // so memoize on the exact version. `requiredRange` is normally an exact version coming from\n // the pnpm list output (e.g. `value.version`), which makes this cache hit on duplicates.\n // Only memoize when we have a concrete version — semver ranges could resolve differently\n // depending on what's installed at `parentPath` vs root, so skip the cache for those.\n const memoKey = requiredRange && /^\\d/.test(requiredRange) ? `${pkgName}@${requiredRange}` : null\n if (memoKey != null) {\n const cached = this.locateMemo.get(memoKey)\n if (cached != null) {\n return cached\n }\n }\n\n // pnpm's default `.pnpm` virtual store is flat, so `downwardSearch` would burn thousands\n // of `readdir`/`lstat` calls finding nothing. With `nodeLinker: hoisted`, however, the\n // layout is a traditional nested `node_modules` tree where version-conflicted packages\n // land at `<root>/node_modules/A/node_modules/B` — downward BFS is needed to find them.\n const skipDownwardSearch = !(await this.isHoisted.value)\n const promise = (async (): Promise<Package | null> => {\n // Phase 1: find a version that SATISFIES requiredRange, trying the dep's own location\n // first, then the workspace root. Crucially, neither pass accepts an out-of-range override\n // here — so a wrong-version copy reachable via upward search from `parentPath` (e.g. a\n // hoisted top-level dep) can't shadow the correct nested copy under root. Without this, a\n // package that pnpm deduped to a peer's node_modules resolves its transitive deps to the\n // wrong hoisted version (see jsonfile under two fs-extra majors). The root pass uses the\n // same `skipDownwardSearch` as everywhere else: in a hoisted layout it is already false, so\n // the nested `<root>/node_modules/A/node_modules/B` copy is found via BFS; in the flat\n // `.pnpm` virtual store it stays true (forcing it on there would burn thousands of\n // readdir/lstat calls — and on Windows, where pnpm uses junctions that `lstat` reports as\n // directories, the BFS walks the entire store and resolves the wrong paths).\n const satisfying =\n (parentPath ? await this.cache.locatePackageVersion({ pkgName, parentDir: parentPath, requiredRange, skipDownwardSearch, skipOverrideFallback: true }) : null) ??\n (await this.cache.locatePackageVersion({ pkgName, parentDir: this.rootDir, requiredRange, skipDownwardSearch, skipOverrideFallback: true }))\n if (satisfying) {\n return satisfying\n }\n // Phase 2: no version satisfies requiredRange (package-manager override, or no range\n // given). Fall back to the original dep-then-root order, now allowing override versions.\n const fromDep = parentPath ? await this.cache.locatePackageVersion({ pkgName, parentDir: parentPath, requiredRange, skipDownwardSearch }) : null\n if (fromDep) {\n return fromDep\n }\n return this.cache.locatePackageVersion({ pkgName, parentDir: this.rootDir, requiredRange, skipDownwardSearch })\n })()\n\n if (memoKey != null) {\n this.locateMemo.set(memoKey, promise)\n }\n return promise\n }\n\n // pnpm 10+ does not automatically preserve transitive optional platform-specific\n // packages (e.g. sass-embedded-linux-x64) across lock file regeneration. Users\n // must list them as direct optionalDependencies. Missing ones are emitted as\n // PKG_OPTIONAL_PLATFORM_NOT_INSTALLED warnings in the log summary.\n protected async extractProductionDependencyGraph(tree: PnpmDependency, dependencyId: string) {\n if (this.productionGraph[dependencyId]) {\n return\n }\n this.productionGraph[dependencyId] = { dependencies: [] }\n\n if ((tree.dedupedDependenciesCount ?? 0) > 0) {\n const realDep = this.allDependencies.get(dependencyId)\n if (realDep) {\n this.cache.logSummary[LogMessageByKey.PKG_DUPLICATE_REF].push(dependencyId)\n tree = realDep\n } else {\n this.cache.logSummary[LogMessageByKey.PKG_DUPLICATE_REF_UNRESOLVED].push(dependencyId)\n return\n }\n }\n\n const packageName = tree.name || tree.from\n const { packageJson: locatedJson } = (await this.locateFromDepOrRoot(packageName, tree.path, tree.version)) || {}\n // Fallback: the app root package is never installed inside a node_modules directory, so\n // the name-based lookup above returns null. Reading directly from tree.path ensures that\n // link: dependencies — which some pnpm versions omit from `pnpm list --prod` output —\n // still appear in `all` and therefore reach the production graph.\n const packageJson = locatedJson ?? (tree.path ? await readJsonOrNull<PackageJson>(path.join(tree.path, \"package.json\")) : null)\n\n const all = packageJson ? { ...packageJson.dependencies, ...packageJson.optionalDependencies } : { ...tree.dependencies, ...tree.optionalDependencies }\n const optional = packageJson ? { ...packageJson.optionalDependencies } : {}\n\n const deps: Record<string, PnpmDependency> = { ...(tree.dependencies || {}), ...(tree.optionalDependencies || {}) }\n\n // pnpm --prod omits sub-deps for link: packages (and synthetic entries derived from them).\n // For any dep declared in the package.json (all) that pnpm left out of the tree, recover\n // the resolved entry from allDependencies so it lands in the production graph.\n const byName = this.getAllDepsByName()\n for (const depName of Object.keys(all)) {\n if (!deps[depName]) {\n const dep = byName.get(depName)\n if (dep && isValidKey(depName)) {\n deps[depName] = dep\n }\n }\n }\n\n this.productionGraph[dependencyId] = { dependencies: [] }\n const depPromises = Object.entries(deps).map(async ([packageName, dependency]) => {\n // First check if it's in production dependencies\n if (!all[packageName]) {\n return undefined\n }\n\n // Then check if optional dependency path exists (using actual resolved path)\n if (optional[packageName]) {\n const pkg = await this.locateFromDepOrRoot(packageName, tree.path, dependency.version)\n if (!pkg) {\n // Declared in `optionalDependencies`, so a miss is an expected condition (e.g. fsevents\n // on Linux/Windows) — classify it as a missing optional dependency, not PKG_NOT_ON_DISK.\n this.logMissingDependency(`${packageName}@${dependency.version}`, true)\n return undefined\n }\n }\n const { id: childDependencyId, pkgOverride } = this.normalizePackageVersion(packageName, dependency)\n await this.extractProductionDependencyGraph(pkgOverride, childDependencyId)\n return childDependencyId\n })\n\n const collectedDependencies: string[] = []\n for (const dep of depPromises) {\n const result = await dep\n if (result !== undefined) {\n collectedDependencies.push(result)\n }\n }\n this.productionGraph[dependencyId] = { dependencies: collectedDependencies }\n }\n\n protected async collectAllDependencies(_tree: PnpmDependency, _appPackageName: string): Promise<void> {\n for (const root of this.allWorkspacePackages) {\n await this.collectDepsRecursively(root)\n }\n // pnpm --prod omits link: packages from its JSON output entirely; pick them up from the\n // app's package.json so their transitive deps are included in allDependencies.\n await this.collectOmittedLinkPackages()\n }\n\n /**\n * Resolve a `link:` dependency to its real on-disk source directory — never the `node_modules`\n * junction pnpm creates for it. Returns null for non-link deps.\n *\n * Why this matters: resolving a link: dep through `node_modules` (locateFromDepOrRoot) yields the\n * junction, which CI cannot read across drives. CI checks out the repo on `D:` but installs the\n * app under `C:\\…\\Temp`, so the junction is a cross-volume link that `realpath`/`stat` fail on,\n * silently dropping the package from the asar. The link target is a plain directory that reads\n * fine from any drive, so we resolve straight to it.\n */\n private resolveLinkTarget(value: PnpmDependency): string | null {\n const version = value.version\n if (typeof version !== \"string\" || !version.startsWith(\"link:\")) {\n return null\n }\n const spec = version.slice(\"link:\".length)\n // A cross-drive link cannot be expressed relative, so pnpm reports it as an absolute path —\n // use it directly. Otherwise prefer pnpm's already-resolved absolute `path` (the source dir,\n // never the junction), falling back to resolving the relative spec against the workspace root.\n if (path.isAbsolute(spec)) {\n return path.normalize(spec)\n }\n if (value.path && path.isAbsolute(value.path)) {\n return path.normalize(value.path)\n }\n return path.resolve(this.rootDir, spec)\n }\n\n private async readPackageJsonAt(dir: string): Promise<Package | null> {\n const packageJson = await readJsonOrNull<PackageJson>(path.join(dir, \"package.json\"))\n return packageJson ? { packageDir: dir, packageJson } : null\n }\n\n /**\n * Visit a single dependency node, adding it and its transitive deps to allDependencies.\n *\n * For packages that pnpm list did NOT expand (link: packages and the synthetic entries\n * derived from them), the tree has empty dependencies/optionalDependencies. In that case\n * we fall back to the on-disk package.json to discover transitive deps, resolving each one\n * from the package's own node_modules first (where pnpm placed them).\n */\n private async visitDep(key: string, value: PnpmDependency): Promise<void> {\n const id = `${key}@${value.version}`\n // The pnpm list output can include the same `name@version` thousands of times across a\n // deep workspace; without this guard we re-resolve and re-recurse each occurrence.\n if (this.collectedDeps.has(id)) {\n return\n }\n this.collectedDeps.add(id)\n\n const located = await this.locateFromDepOrRoot(key, value.path, value.version)\n // For a link: dep, store the real source dir (the link target) rather than the located path,\n // which is the node_modules junction. Across drives that junction is unreadable (see\n // resolveLinkTarget), so storing it makes the package vanish from the asar.\n const linkTarget = this.resolveLinkTarget(value)\n const resolvedPath = linkTarget ?? located?.packageDir ?? value.path\n this.allDependencies.set(id, { ...value, path: resolvedPath })\n\n // For transitive-dep discovery of entries pnpm did not expand (link: packages), use the\n // located package.json; fall back to the link target's own package.json when the junction\n // could not be resolved (again, the cross-drive case).\n const pkg = located ?? (linkTarget != null ? await this.readPackageJsonAt(linkTarget) : null)\n const hasTreeDeps = Object.keys(value.dependencies ?? {}).length > 0 || Object.keys(value.optionalDependencies ?? {}).length > 0\n if (!hasTreeDeps && pkg?.packageJson) {\n // pnpm list omits sub-deps for link: packages and for entries where the reported path\n // doesn't expand transitive deps (e.g. a link: package's nested dep). Use the on-disk\n // package.json to discover what to include, and pass the declared version range so that\n // resolution skips wrong-version hoisted packages and finds the correct nested copy.\n const pkgDepsDecl = { ...(pkg.packageJson.dependencies || {}), ...(pkg.packageJson.optionalDependencies || {}) }\n for (const [depName, depRange] of Object.entries(pkgDepsDecl)) {\n const resolved = await this.locateFromDepOrRoot(depName, pkg.packageDir, typeof depRange === \"string\" ? depRange : undefined)\n if (!resolved) {\n continue\n }\n await this.visitDep(depName, {\n from: depName,\n name: depName,\n version: resolved.packageJson.version,\n path: resolved.packageDir,\n dependencies: {},\n optionalDependencies: {},\n } as unknown as PnpmDependency)\n }\n } else {\n await this.collectDepsRecursively(value)\n }\n }\n\n private async collectDepsRecursively(tree: PnpmDependency): Promise<void> {\n for (const [key, value] of Object.entries(tree.dependencies || {})) {\n await this.visitDep(key, value)\n }\n for (const [key, value] of Object.entries(tree.optionalDependencies || {})) {\n await this.visitDep(key, value)\n }\n }\n\n /**\n * pnpm excludes link: packages from `pnpm list --prod` output. Read the app's package.json\n * directly to find any link: deps that were silently omitted and visit them so their\n * transitive deps end up in allDependencies.\n */\n private async collectOmittedLinkPackages(): Promise<void> {\n const appPkgJson = await readJsonOrNull<PackageJson>(path.join(this.rootDir, \"package.json\"))\n if (!appPkgJson) {\n return\n }\n const allDeps = { ...(appPkgJson.dependencies || {}), ...(appPkgJson.optionalDependencies || {}) }\n for (const [name, version] of Object.entries(allDeps)) {\n if (typeof version !== \"string\" || !version.startsWith(\"link:\")) {\n continue\n }\n // Resolve the link: target path directly — bypasses potentially broken cross-drive\n // Windows junctions (C:→D:) that locateFromDepOrRoot would traverse through\n // node_modules and silently fail on (readJson returns null via .catch).\n const linkRelPath = version.slice(\"link:\".length)\n const linkTarget = path.isAbsolute(linkRelPath) ? linkRelPath : path.resolve(this.rootDir, linkRelPath)\n const directPkg = await readJsonOrNull<PackageJson>(path.join(linkTarget, \"package.json\"))\n const resolved = directPkg ? { packageDir: linkTarget, packageJson: directPkg } : await this.locateFromDepOrRoot(name, this.rootDir, undefined)\n if (!resolved) {\n continue\n }\n await this.visitDep(name, {\n from: name,\n name,\n version: resolved.packageJson.version,\n path: resolved.packageDir,\n dependencies: {},\n optionalDependencies: {},\n } as unknown as PnpmDependency)\n }\n }\n\n protected override getTreeFromWorkspaces(tree: PnpmDependency, packageName: string): PnpmDependency {\n // pnpm v10 workspace: app is nested as a dependency of root — handled by base class\n const result = super.getTreeFromWorkspaces(tree, packageName)\n if (result !== tree) {\n return result\n }\n // pnpm v11 workspace: each workspace package is a separate top-level array entry;\n // non-workspace (single-tree): find returns the one entry or undefined → falls back to tree\n const match = this.allWorkspacePackages.find(pkg => pkg.name === packageName || pkg.from === packageName)\n return match ?? tree\n }\n\n protected async parseDependenciesTree(jsonBlob: string): Promise<PnpmDependency> {\n const dependencyTree = this.extractJsonFromPollutedOutput<PnpmDependency[]>(jsonBlob)\n this._allWorkspacePackages = dependencyTree\n this._pnpmMajorVersion = await this.pnpmVersion.value\n return dependencyTree[0]\n }\n}\n"]}
@@ -210,9 +210,11 @@ export interface SnapOptionsLegacy extends CommonLinuxOptions, TargetSpecificOpt
210
210
  * Configuration for a remote snap build on [Launchpad](https://launchpad.net/).
211
211
  * Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.
212
212
  *
213
- * Each electron-builder build invocation targets exactly one architecture — to build for multiple
214
- * architectures, configure the top-level `arch` option (e.g. `arch: ["x64", "arm64"]`); each arch
215
- * spawns a separate `snapcraft remote-build` job on Launchpad.
213
+ * A single remote build can target one or more architectures. Set `buildFor` to a string for one
214
+ * arch, or to an array (e.g. `["amd64", "arm64"]`) to build several architectures in a single
215
+ * `snapcraft remote-build` job on Launchpad that emits a separate snap artifact per arch.
216
+ * Alternatively, the top-level `arch` option (e.g. `arch: ["x64", "arm64"]`) spawns a separate
217
+ * remote-build job per architecture — do not combine that with a `buildFor` array (mutually exclusive).
216
218
  *
217
219
  * Authentication is resolved in this order:
218
220
  * 1. `cscLink` config field — base64-encoded credentials or a file path
@@ -325,7 +327,9 @@ export interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions
325
327
  /**
326
328
  * Configuration for a remote build on [Launchpad](https://launchpad.net/).
327
329
  * Enables cross-architecture builds in CI without native hardware or nested virtualisation.
328
- * Each build invocation targets one arch; use `arch: ["x64", "arm64"]` to build for multiple.
330
+ * Set `remoteBuild.buildFor: ["amd64", "arm64"]` to build several architectures in one Launchpad
331
+ * job, or the top-level `arch: ["x64", "arm64"]` option to spawn a separate job per architecture
332
+ * (the two are mutually exclusive).
329
333
  */
330
334
  readonly remoteBuild?: RemoteBuildOptions | null;
331
335
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"SnapOptions.d.ts","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD;;;GAGG;AACH,MAAM,WAAW,gBAA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,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,CAAA;CAC7C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,CAAA;CAC7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core.js\"\nimport { SnapcraftYAML } from \"../targets/linux/snap/snapcraft.js\"\nimport { CommonLinuxOptions } from \"./linuxOptions.js\"\n\n/**\n * New-style snap configuration. Use this via the `snapcraft` key in your build config.\n * Selects the snapcraft core version and its per-core options.\n */\nexport interface SnapcraftOptions extends TargetSpecificOptions {\n /**\n * The snap base to use as the execution environment. Determines which set of per-core options\n * (`core18`, `core20`, `core22`, `core24`, `custom`) is active.\n *\n * Only one core may be selected per build target.\n */\n readonly base: \"core18\" | \"core20\" | \"core22\" | \"core24\" | \"custom\"\n\n /**\n * Snapcraft Store credentials — base64-encoded credentials string or file path.\n * Accepts the same formats as `WIN_CSC_LINK` / `CSC_LINK`: base64 data,\n * absolute/relative/`~/` file paths, and `file://` URIs.\n * Relative paths are resolved against the build resources directory.\n *\n * Injected as `SNAPCRAFT_STORE_CREDENTIALS` into every snapcraft subprocess\n * (core18/core20/core22/core24 builds and `snapcraft upload`).\n * Not applied for `base: \"custom\"` — inject credentials manually via environment variables.\n *\n * The `SNAP_CSC_LINK` environment variable is the CI-friendly alternative.\n * Generate with: `snapcraft export-login - | base64 -w0`\n */\n readonly cscLink?: string\n\n /**\n * Configuration for a core18 build. Only active when `base` is `\"core18\"`.\n */\n readonly core18?: SnapOptionsLegacy | null\n /**\n * Configuration for a core20 build. Only active when `base` is `\"core20\"`.\n */\n readonly core20?: SnapOptionsLegacy | null\n /**\n * Configuration for a core22 build. Only active when `base` is `\"core22\"`.\n */\n readonly core22?: SnapOptionsLegacy | null\n\n /**\n * Options for building a core24 snap. Uses the snapcraft CLI directly.\n * Inherits desktop-entry fields from `CommonLinuxOptions` and publish config from `TargetSpecificOptions`.\n */\n readonly core24?: SnapOptions24 | null\n /**\n * Pass-through custom snap configuration. electron-builder will read the\n * snapcraft.yaml at `yamlPath` and use it verbatim — no plugs, extensions,\n * organize mappings, or desktop files are injected.\n */\n readonly custom?: SnapOptionsCustom | null\n}\n\nexport interface SnapOptionsCustom {\n /**\n * Supports 2 routes:\n * - Path to an existing `snapcraft.yaml` file, relative to `buildResourcesDir`. electron-builder reads the file and passes it through without modification.\n * - A `SnapcraftYAML` object directly in the configuration. electron-builder uses the object to generate a `snapcraft.yaml` file, which is then passed through without modification.\n */\n readonly yaml?: string | SnapcraftYAML | null\n}\n\nexport interface SnapOptionsLegacy extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Whether to use the pre-built Electron snap template for faster builds.\n * When `true`, electron-builder delegates snap assembly to the upstream Electron snap\n * template rather than running a full snapcraft build, significantly reducing build time.\n * Defaults to `true` when `stagePackages` is not customised.\n * Only applicable to x64 and armv7l builds.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * The type of [snap confinement](https://snapcraft.io/docs/reference/confinement).\n * - `strict` — recommended; the snap runs in a fully isolated sandbox.\n * - `devmode` — sandbox violations are logged but not enforced; for development only.\n * - `classic` — no confinement; equivalent to a traditionally packaged application.\n * Requires Snap Store approval before publishing.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * Environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder default `{ TMPDIR: \"$XDG_RUNTIME_DIR\" }`.\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * A short summary of the snap (max 78 characters).\n * Defaults to [productName](./configuration.md#productName).\n */\n readonly summary?: string | null\n\n /**\n * The quality grade of the snap.\n * - `stable` — suitable for all channels, including `stable` and `candidate`.\n * - `devel` — development snapshot; cannot be promoted to `stable` or `candidate`.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * [Snapd features](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes) that must\n * be present on the host before the snap can be installed.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * Use the `\"default\"` keyword to extend the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory (`build/`).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) to declare\n * for the app entry point.\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\",\n * \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * Use `\"default\"` in the list to keep the defaults and append extras:\n * `[\"default\", \"camera\"]` adds `camera` to the standard set.\n *\n * To configure plug attributes (e.g. `allow-sandbox` for Chromium's internal sandbox),\n * use a descriptor object:\n * ```json\n * [\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } },\n * \"another-simple-plug-name\"\n * ]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) to declare\n * for the app.\n *\n * To expose an MPRIS player under the Chromium bus name (required for strict confinement):\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n * Chromium [hard-codes](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1)\n * the bus name `chromium`, so the slot name must match for snapd to\n * [allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7).\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * Names of snapcraft parts that must be built before the app part.\n * Defaults to `[\"desktop-gtk2\"]`.\n *\n * Use `\"default\"` to keep the default and add extras:\n * `[\"default\", \"my-helper-part\"]`.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace, making libraries or config at `/usr`, `/var`, `/etc`, etc.\n * accessible inside the confined environment.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports individual files, directories, globs, globstars, and exclusions (prefix `!`).\n * See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets).\n * When not set, the snap template's default stage list is used for legacy bases (core18/core20/core22).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Display title for the snap (may contain uppercase letters and spaces).\n * Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (good for distribution).\n * - `lzo` — larger file, faster decompression (good for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow the snap to run with native Wayland support (`--ozone-platform=wayland`).\n * Defaults to `false` for Electron < 38 (legacy behaviour); `true` for Electron ≥ 38.\n * Set explicitly to override the version-based default.\n */\n readonly allowNativeWayland?: boolean | null\n}\n\n/**\n * Configuration for a remote snap build on [Launchpad](https://launchpad.net/).\n * Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.\n *\n * Each electron-builder build invocation targets exactly one architecture — to build for multiple\n * architectures, configure the top-level `arch` option (e.g. `arch: [\"x64\", \"arm64\"]`); each arch\n * spawns a separate `snapcraft remote-build` job on Launchpad.\n *\n * Authentication is resolved in this order:\n * 1. `cscLink` config field — base64-encoded credentials or a file path\n * 2. `SNAP_CSC_LINK` environment variable — same format as `cscLink`\n * (CI-recommended; follows the same pattern as `WIN_CSC_LINK` for Windows code signing)\n * 3. `SNAPCRAFT_STORE_CREDENTIALS` environment variable (read directly by snapcraft)\n * 4. An active interactive `snapcraft login` session\n *\n * **CI setup** (set once as a CI secret):\n * ```sh\n * export SNAP_CSC_LINK=$(snapcraft export-login - | base64 -w0)\n * ```\n * The resolved credentials are injected only into the spawned `snapcraft` subprocess\n * environment and never exposed through `process.env`.\n */\nexport interface RemoteBuildOptions {\n /**\n * Whether to enable remote build on Launchpad. Must be set explicitly to `true` to opt in.\n */\n enabled: boolean\n\n /**\n * Your Launchpad username. Used to select the correct Launchpad account when more than\n * one set of credentials is available.\n */\n launchpadUsername?: string\n\n /**\n * Target architecture (or architectures) for the remote build.\n *\n * - **Single string** (e.g. `\"amd64\"`): one Launchpad job, one output snap.\n * - **Array** (e.g. `[\"amd64\", \"arm64\"]`): one Launchpad job that builds all listed\n * architectures and downloads each resulting snap. All produced snaps are emitted as\n * separate build artifacts.\n *\n * Using an array here is mutually exclusive with setting `arch: [\"x64\", \"arm64\"]` at the\n * electron-builder top level — the top-level `arch` option spawns a separate remote-build\n * job per architecture, which would duplicate work.\n *\n * @example \"amd64\"\n * @example [\"amd64\", \"arm64\"]\n */\n buildFor?: string | string[]\n\n /**\n * Suppress the Launchpad public-upload consent prompt by automatically accepting it.\n * Your source code will be uploaded to a **public** Launchpad repository.\n * Set to `true` in CI once you understand the implications.\n */\n acceptPublicUpload?: boolean\n\n /**\n * Launchpad project name to use for a **private** source upload.\n * The project must already exist and you must have write access.\n */\n privateProject?: string\n\n /**\n * Resume a previously interrupted remote build rather than starting a new one.\n */\n recover?: boolean\n\n /**\n * Maximum time in seconds to wait for the remote build to complete before aborting.\n * Passed to `snapcraft remote-build` as `--timeout <seconds>`.\n *\n * @example 1800 // 30 minutes\n */\n timeout?: number\n\n /**\n * Controls whether snapcraft may fall back to a different remote build strategy.\n * - `\"disable-fallback\"` — always use the primary strategy, fail if unavailable.\n * - `\"force-fallback\"` — always use the fallback strategy.\n */\n strategy?: \"disable-fallback\" | \"force-fallback\"\n}\n\n/**\n * Options for building a core24 snap. This interface does not extend the legacy\n * `SnapBaseOptions` — it uses the snapcraft CLI directly.\n *\n * Fields inherited from {@link CommonLinuxOptions} (`description`, `category`, `mimeTypes`,\n * `executableArgs`, `desktop`, `synopsis`) are automatically populated from the root `linux.*`\n * configuration. You do not need to duplicate them here; values set directly on this interface\n * take precedence over the cascaded `linux.*` values.\n */\nexport interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions {\n // ─── Build environment (mutually exclusive) ─────────────────────────────────\n\n /**\n * Use [LXD](https://canonical.com/lxd) as the isolated build environment.\n * Preferred over Multipass on most Linux CI systems where nested virtualisation is unavailable.\n * Mutually exclusive with `useMultipass` and `useDestructiveMode`.\n */\n readonly useLXD?: boolean | null\n\n /**\n * Use [Multipass](https://multipass.run/) as the isolated build environment.\n * Mutually exclusive with `useLXD` and `useDestructiveMode`.\n */\n readonly useMultipass?: boolean | null\n\n /**\n * Build directly on the host without an isolated VM or container (snapcraft `--destructive-mode`).\n * Equivalent to setting `SNAPCRAFT_BUILD_ENVIRONMENT=host`.\n *\n * **Not recommended for most use cases.** Destructive mode pollutes the host environment\n * and produces builds that are difficult to reproduce — any library or tool present on the\n * host at build time can silently end up in the snap. Prefer `useLXD` or `useMultipass`\n * for clean, reproducible builds; use `remoteBuild` for multi-architecture CI.\n *\n * Valid reasons to enable this option:\n * - Building inside a Docker container where nested virtualisation (LXD / Multipass) is\n * unavailable and a remote Launchpad build is not acceptable.\n * - Running test suites in CI where the environment is already fully controlled.\n *\n * The `gnome` extension is incompatible with this mode enabled — do not include it in `extensions`.\n * @see https://snapcraft.io/docs/build-options\n */\n readonly useDestructiveMode?: boolean | null\n\n /**\n * Configuration for a remote build on [Launchpad](https://launchpad.net/).\n * Enables cross-architecture builds in CI without native hardware or nested virtualisation.\n * Each build invocation targets one arch; use `arch: [\"x64\", \"arm64\"]` to build for multiple.\n */\n readonly remoteBuild?: RemoteBuildOptions | null\n\n // ─── Snapcraft extensions ────────────────────────────────────────────────────\n\n /**\n * [Snapcraft extensions](https://snapcraft.io/docs/snapcraft-extensions) to apply to the app.\n * Defaults to `[\"gnome\"]` in normal builds (recommended for Electron apps on Ubuntu 24.04+).\n * Automatically set to `[]` in `useDestructiveMode` builds, where the gnome extension is\n * incompatible. Explicitly including `\"gnome\"` while `useDestructiveMode` is set will throw.\n * See: https://snapcraft.io/docs/gnome-extension\n */\n readonly extensions?: Array<string> | null\n\n // ─── Snap metadata ───────────────────────────────────────────────────────────\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The quality grade of the snap.\n * `devel` — not publishable to stable/candidate channels.\n * `stable` — suitable for all channels.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * A short summary of the snap (max 78 characters). Defaults to `productName`.\n */\n readonly summary?: string | null\n\n /**\n * An optional display title (may contain uppercase letters and spaces). Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (recommended for distribution).\n * - `lzo` — larger file, faster decompression (useful for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Features that must be supported by the host snapd before the snap can be installed.\n * See [assumes](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes).\n */\n readonly assumes?: Array<string> | string | null\n\n // ─── Build packages / stage packages ────────────────────────────────────────\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n * Supports the `\"default\"` keyword to reference the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports glob patterns and exclusions. See [filesets](https://snapcraft.io/docs/snapcraft-filesets).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Names of other snapcraft parts that must be built before the app part.\n */\n readonly after?: Array<string> | null\n\n // ─── Snap interfaces ─────────────────────────────────────────────────────────\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) for the app.\n * When the `gnome` extension is active, content-snap plugs (themes, GNOME platform, GPU)\n * are added automatically — only list custom plugs here.\n * Without any extension, defaults to the standard Electron plug set.\n *\n * Supports descriptor objects for plugs with attributes:\n * ```json\n * [{ \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) for the app.\n * Use for MPRIS, D-Bus services, etc.\n *\n * Example — expose MPRIS under the Chromium bus name:\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace. User-provided layouts always override the extension defaults.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n // ─── Runtime environment ─────────────────────────────────────────────────────\n\n /**\n * Additional environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder defaults (`TMPDIR=$XDG_RUNTIME_DIR`).\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * Whether the app should auto-start on login (creates an autostart desktop entry).\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * Set to `true` to force X11 by injecting `--ozone-platform=x11` into the snap command line.\n * When unset or `false`, no flag is injected and native Wayland is allowed.\n * Unlike the legacy `snap.allowNativeWayland`, there is no electron-version-based default here —\n * core24 always allows Wayland unless this is explicitly `true`.\n */\n readonly forceX11?: boolean | null\n\n // ─── Hooks ───────────────────────────────────────────────────────────────────\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory.\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n}\n\n/**\n * Maps a named plug to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }\n * ```\n */\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\n/**\n * Maps a named slot to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"mpris\": { \"name\": \"chromium\" } }\n * ```\n */\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
1
+ {"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core.js\"\nimport { SnapcraftYAML } from \"../targets/linux/snap/snapcraft.js\"\nimport { CommonLinuxOptions } from \"./linuxOptions.js\"\n\n/**\n * New-style snap configuration. Use this via the `snapcraft` key in your build config.\n * Selects the snapcraft core version and its per-core options.\n */\nexport interface SnapcraftOptions extends TargetSpecificOptions {\n /**\n * The snap base to use as the execution environment. Determines which set of per-core options\n * (`core18`, `core20`, `core22`, `core24`, `custom`) is active.\n *\n * Only one core may be selected per build target.\n */\n readonly base: \"core18\" | \"core20\" | \"core22\" | \"core24\" | \"custom\"\n\n /**\n * Snapcraft Store credentials — base64-encoded credentials string or file path.\n * Accepts the same formats as `WIN_CSC_LINK` / `CSC_LINK`: base64 data,\n * absolute/relative/`~/` file paths, and `file://` URIs.\n * Relative paths are resolved against the build resources directory.\n *\n * Injected as `SNAPCRAFT_STORE_CREDENTIALS` into every snapcraft subprocess\n * (core18/core20/core22/core24 builds and `snapcraft upload`).\n * Not applied for `base: \"custom\"` — inject credentials manually via environment variables.\n *\n * The `SNAP_CSC_LINK` environment variable is the CI-friendly alternative.\n * Generate with: `snapcraft export-login - | base64 -w0`\n */\n readonly cscLink?: string\n\n /**\n * Configuration for a core18 build. Only active when `base` is `\"core18\"`.\n */\n readonly core18?: SnapOptionsLegacy | null\n /**\n * Configuration for a core20 build. Only active when `base` is `\"core20\"`.\n */\n readonly core20?: SnapOptionsLegacy | null\n /**\n * Configuration for a core22 build. Only active when `base` is `\"core22\"`.\n */\n readonly core22?: SnapOptionsLegacy | null\n\n /**\n * Options for building a core24 snap. Uses the snapcraft CLI directly.\n * Inherits desktop-entry fields from `CommonLinuxOptions` and publish config from `TargetSpecificOptions`.\n */\n readonly core24?: SnapOptions24 | null\n /**\n * Pass-through custom snap configuration. electron-builder will read the\n * snapcraft.yaml at `yamlPath` and use it verbatim — no plugs, extensions,\n * organize mappings, or desktop files are injected.\n */\n readonly custom?: SnapOptionsCustom | null\n}\n\nexport interface SnapOptionsCustom {\n /**\n * Supports 2 routes:\n * - Path to an existing `snapcraft.yaml` file, relative to `buildResourcesDir`. electron-builder reads the file and passes it through without modification.\n * - A `SnapcraftYAML` object directly in the configuration. electron-builder uses the object to generate a `snapcraft.yaml` file, which is then passed through without modification.\n */\n readonly yaml?: string | SnapcraftYAML | null\n}\n\nexport interface SnapOptionsLegacy extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Whether to use the pre-built Electron snap template for faster builds.\n * When `true`, electron-builder delegates snap assembly to the upstream Electron snap\n * template rather than running a full snapcraft build, significantly reducing build time.\n * Defaults to `true` when `stagePackages` is not customised.\n * Only applicable to x64 and armv7l builds.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * The type of [snap confinement](https://snapcraft.io/docs/reference/confinement).\n * - `strict` — recommended; the snap runs in a fully isolated sandbox.\n * - `devmode` — sandbox violations are logged but not enforced; for development only.\n * - `classic` — no confinement; equivalent to a traditionally packaged application.\n * Requires Snap Store approval before publishing.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * Environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder default `{ TMPDIR: \"$XDG_RUNTIME_DIR\" }`.\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * A short summary of the snap (max 78 characters).\n * Defaults to [productName](./configuration.md#productName).\n */\n readonly summary?: string | null\n\n /**\n * The quality grade of the snap.\n * - `stable` — suitable for all channels, including `stable` and `candidate`.\n * - `devel` — development snapshot; cannot be promoted to `stable` or `candidate`.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * [Snapd features](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes) that must\n * be present on the host before the snap can be installed.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * Use the `\"default\"` keyword to extend the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory (`build/`).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) to declare\n * for the app entry point.\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\",\n * \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * Use `\"default\"` in the list to keep the defaults and append extras:\n * `[\"default\", \"camera\"]` adds `camera` to the standard set.\n *\n * To configure plug attributes (e.g. `allow-sandbox` for Chromium's internal sandbox),\n * use a descriptor object:\n * ```json\n * [\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } },\n * \"another-simple-plug-name\"\n * ]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) to declare\n * for the app.\n *\n * To expose an MPRIS player under the Chromium bus name (required for strict confinement):\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n * Chromium [hard-codes](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1)\n * the bus name `chromium`, so the slot name must match for snapd to\n * [allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7).\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * Names of snapcraft parts that must be built before the app part.\n * Defaults to `[\"desktop-gtk2\"]`.\n *\n * Use `\"default\"` to keep the default and add extras:\n * `[\"default\", \"my-helper-part\"]`.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace, making libraries or config at `/usr`, `/var`, `/etc`, etc.\n * accessible inside the confined environment.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports individual files, directories, globs, globstars, and exclusions (prefix `!`).\n * See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets).\n * When not set, the snap template's default stage list is used for legacy bases (core18/core20/core22).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Display title for the snap (may contain uppercase letters and spaces).\n * Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (good for distribution).\n * - `lzo` — larger file, faster decompression (good for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow the snap to run with native Wayland support (`--ozone-platform=wayland`).\n * Defaults to `false` for Electron < 38 (legacy behaviour); `true` for Electron ≥ 38.\n * Set explicitly to override the version-based default.\n */\n readonly allowNativeWayland?: boolean | null\n}\n\n/**\n * Configuration for a remote snap build on [Launchpad](https://launchpad.net/).\n * Remote builds run on Canonical's infrastructure without requiring native hardware or nested virtualisation.\n *\n * A single remote build can target one or more architectures. Set `buildFor` to a string for one\n * arch, or to an array (e.g. `[\"amd64\", \"arm64\"]`) to build several architectures in a single\n * `snapcraft remote-build` job on Launchpad that emits a separate snap artifact per arch.\n * Alternatively, the top-level `arch` option (e.g. `arch: [\"x64\", \"arm64\"]`) spawns a separate\n * remote-build job per architecture — do not combine that with a `buildFor` array (mutually exclusive).\n *\n * Authentication is resolved in this order:\n * 1. `cscLink` config field — base64-encoded credentials or a file path\n * 2. `SNAP_CSC_LINK` environment variable — same format as `cscLink`\n * (CI-recommended; follows the same pattern as `WIN_CSC_LINK` for Windows code signing)\n * 3. `SNAPCRAFT_STORE_CREDENTIALS` environment variable (read directly by snapcraft)\n * 4. An active interactive `snapcraft login` session\n *\n * **CI setup** (set once as a CI secret):\n * ```sh\n * export SNAP_CSC_LINK=$(snapcraft export-login - | base64 -w0)\n * ```\n * The resolved credentials are injected only into the spawned `snapcraft` subprocess\n * environment and never exposed through `process.env`.\n */\nexport interface RemoteBuildOptions {\n /**\n * Whether to enable remote build on Launchpad. Must be set explicitly to `true` to opt in.\n */\n enabled: boolean\n\n /**\n * Your Launchpad username. Used to select the correct Launchpad account when more than\n * one set of credentials is available.\n */\n launchpadUsername?: string\n\n /**\n * Target architecture (or architectures) for the remote build.\n *\n * - **Single string** (e.g. `\"amd64\"`): one Launchpad job, one output snap.\n * - **Array** (e.g. `[\"amd64\", \"arm64\"]`): one Launchpad job that builds all listed\n * architectures and downloads each resulting snap. All produced snaps are emitted as\n * separate build artifacts.\n *\n * Using an array here is mutually exclusive with setting `arch: [\"x64\", \"arm64\"]` at the\n * electron-builder top level — the top-level `arch` option spawns a separate remote-build\n * job per architecture, which would duplicate work.\n *\n * @example \"amd64\"\n * @example [\"amd64\", \"arm64\"]\n */\n buildFor?: string | string[]\n\n /**\n * Suppress the Launchpad public-upload consent prompt by automatically accepting it.\n * Your source code will be uploaded to a **public** Launchpad repository.\n * Set to `true` in CI once you understand the implications.\n */\n acceptPublicUpload?: boolean\n\n /**\n * Launchpad project name to use for a **private** source upload.\n * The project must already exist and you must have write access.\n */\n privateProject?: string\n\n /**\n * Resume a previously interrupted remote build rather than starting a new one.\n */\n recover?: boolean\n\n /**\n * Maximum time in seconds to wait for the remote build to complete before aborting.\n * Passed to `snapcraft remote-build` as `--timeout <seconds>`.\n *\n * @example 1800 // 30 minutes\n */\n timeout?: number\n\n /**\n * Controls whether snapcraft may fall back to a different remote build strategy.\n * - `\"disable-fallback\"` — always use the primary strategy, fail if unavailable.\n * - `\"force-fallback\"` — always use the fallback strategy.\n */\n strategy?: \"disable-fallback\" | \"force-fallback\"\n}\n\n/**\n * Options for building a core24 snap. This interface does not extend the legacy\n * `SnapBaseOptions` — it uses the snapcraft CLI directly.\n *\n * Fields inherited from {@link CommonLinuxOptions} (`description`, `category`, `mimeTypes`,\n * `executableArgs`, `desktop`, `synopsis`) are automatically populated from the root `linux.*`\n * configuration. You do not need to duplicate them here; values set directly on this interface\n * take precedence over the cascaded `linux.*` values.\n */\nexport interface SnapOptions24 extends CommonLinuxOptions, TargetSpecificOptions {\n // ─── Build environment (mutually exclusive) ─────────────────────────────────\n\n /**\n * Use [LXD](https://canonical.com/lxd) as the isolated build environment.\n * Preferred over Multipass on most Linux CI systems where nested virtualisation is unavailable.\n * Mutually exclusive with `useMultipass` and `useDestructiveMode`.\n */\n readonly useLXD?: boolean | null\n\n /**\n * Use [Multipass](https://multipass.run/) as the isolated build environment.\n * Mutually exclusive with `useLXD` and `useDestructiveMode`.\n */\n readonly useMultipass?: boolean | null\n\n /**\n * Build directly on the host without an isolated VM or container (snapcraft `--destructive-mode`).\n * Equivalent to setting `SNAPCRAFT_BUILD_ENVIRONMENT=host`.\n *\n * **Not recommended for most use cases.** Destructive mode pollutes the host environment\n * and produces builds that are difficult to reproduce — any library or tool present on the\n * host at build time can silently end up in the snap. Prefer `useLXD` or `useMultipass`\n * for clean, reproducible builds; use `remoteBuild` for multi-architecture CI.\n *\n * Valid reasons to enable this option:\n * - Building inside a Docker container where nested virtualisation (LXD / Multipass) is\n * unavailable and a remote Launchpad build is not acceptable.\n * - Running test suites in CI where the environment is already fully controlled.\n *\n * The `gnome` extension is incompatible with this mode enabled — do not include it in `extensions`.\n * @see https://snapcraft.io/docs/build-options\n */\n readonly useDestructiveMode?: boolean | null\n\n /**\n * Configuration for a remote build on [Launchpad](https://launchpad.net/).\n * Enables cross-architecture builds in CI without native hardware or nested virtualisation.\n * Set `remoteBuild.buildFor: [\"amd64\", \"arm64\"]` to build several architectures in one Launchpad\n * job, or the top-level `arch: [\"x64\", \"arm64\"]` option to spawn a separate job per architecture\n * (the two are mutually exclusive).\n */\n readonly remoteBuild?: RemoteBuildOptions | null\n\n // ─── Snapcraft extensions ────────────────────────────────────────────────────\n\n /**\n * [Snapcraft extensions](https://snapcraft.io/docs/snapcraft-extensions) to apply to the app.\n * Defaults to `[\"gnome\"]` in normal builds (recommended for Electron apps on Ubuntu 24.04+).\n * Automatically set to `[]` in `useDestructiveMode` builds, where the gnome extension is\n * incompatible. Explicitly including `\"gnome\"` while `useDestructiveMode` is set will throw.\n * See: https://snapcraft.io/docs/gnome-extension\n */\n readonly extensions?: Array<string> | null\n\n // ─── Snap metadata ───────────────────────────────────────────────────────────\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The quality grade of the snap.\n * `devel` — not publishable to stable/candidate channels.\n * `stable` — suitable for all channels.\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * A short summary of the snap (max 78 characters). Defaults to `productName`.\n */\n readonly summary?: string | null\n\n /**\n * An optional display title (may contain uppercase letters and spaces). Defaults to `productName`.\n * See [snap format](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Compression algorithm for the snap SquashFS image.\n * - `xz` — smaller file, slower decompression (recommended for distribution).\n * - `lzo` — larger file, faster decompression (useful for development iteration).\n * Omit to use snapcraft's default (`xz`).\n *\n * When not set, `linux.compression` is mapped automatically:\n * `\"store\"` → `\"lzo\"`, `\"maximum\"` → `\"xz\"`, `\"normal\"` → snapcraft default.\n * Explicitly setting this field always overrides the mapped value.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Features that must be supported by the host snapd before the snap can be installed.\n * See [assumes](https://snapcraft.io/docs/snapcraft-yaml-reference#assumes).\n */\n readonly assumes?: Array<string> | string | null\n\n // ─── Build packages / stage packages ────────────────────────────────────────\n\n /**\n * Debian packages required at **build** time (installed inside the build environment).\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * Ubuntu packages to **stage** alongside the app (equivalent to `depends` for deb).\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n * Supports the `\"default\"` keyword to reference the default list:\n * `[\"default\", \"my-extra-lib\"]` appends `my-extra-lib` to the defaults.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * Filesets controlling which files from the app part are staged into the snap.\n * Supports glob patterns and exclusions. See [filesets](https://snapcraft.io/docs/snapcraft-filesets).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * Names of other snapcraft parts that must be built before the app part.\n */\n readonly after?: Array<string> | null\n\n // ─── Snap interfaces ─────────────────────────────────────────────────────────\n\n /**\n * [Plugs](https://snapcraft.io/docs/reference/interfaces) (consumed interfaces) for the app.\n * When the `gnome` extension is active, content-snap plugs (themes, GNOME platform, GPU)\n * are added automatically — only list custom plugs here.\n * Without any extension, defaults to the standard Electron plug set.\n *\n * Supports descriptor objects for plugs with attributes:\n * ```json\n * [{ \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * [Slots](https://snapcraft.io/docs/reference/interfaces) (provided interfaces) for the app.\n * Use for MPRIS, D-Bus services, etc.\n *\n * Example — expose MPRIS under the Chromium bus name:\n * ```json\n * [{ \"mpris\": { \"name\": \"chromium\" } }]\n * ```\n */\n readonly slots?: Array<string | SlotDescriptor> | SlotDescriptor | null\n\n /**\n * [Snap layouts](https://snapcraft.io/docs/snap-layouts) — bind-mount or symlink host paths\n * into the snap's namespace. User-provided layouts always override the extension defaults.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n // ─── Runtime environment ─────────────────────────────────────────────────────\n\n /**\n * Additional environment variables injected into the snap's runtime environment.\n * Merged with the electron-builder defaults (`TMPDIR=$XDG_RUNTIME_DIR`).\n * User-supplied values take precedence.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * Whether the app should auto-start on login (creates an autostart desktop entry).\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * Set to `true` to force X11 by injecting `--ozone-platform=x11` into the snap command line.\n * When unset or `false`, no flag is injected and native Wayland is allowed.\n * Unlike the legacy `snap.allowNativeWayland`, there is no electron-version-based default here —\n * core24 always allows Wayland unless this is explicitly `true`.\n */\n readonly forceX11?: boolean | null\n\n // ─── Hooks ───────────────────────────────────────────────────────────────────\n\n /**\n * Directory containing [snap hooks](https://snapcraft.io/docs/snap-hooks), relative to\n * the build resources directory.\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n}\n\n/**\n * Maps a named plug to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }\n * ```\n */\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\n/**\n * Maps a named slot to its attribute object.\n * `null` uses snapd defaults for that interface.\n *\n * @example\n * ```json\n * { \"mpris\": { \"name\": \"chromium\" } }\n * ```\n */\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { TargetConfiguration, TargetSpecificOptions } from "../core.js";
2
2
  import { PlatformSpecificBuildOptions } from "./PlatformSpecificBuildOptions.js";
3
3
  import { CustomMacSign } from "../macPackager.js";
4
- import type { OnlySignOptions } from "@electron/osx-sign";
4
+ import type { OnlySignOptions, SigningDistributionType } from "@electron/osx-sign";
5
5
  import type { MakeUniversalOpts } from "@electron/universal";
6
6
  /**
7
7
  * Options forwarded to `@electron/universal`'s `makeUniversalApp`.
@@ -20,15 +20,27 @@ export interface ElectronUniversalOptions extends Omit<MakeUniversalOpts, "x64Ap
20
20
  }
21
21
  /**
22
22
  * Signing options passed to `@electron/osx-sign`. Electron-builder owns the fields it must control
23
- * itself — `app`, `keychain`, `platform`, `version`, `optionsForFile`, and `type` (derived from the
24
- * build flavor: `mas-dev` → `development`, otherwise `distribution`) — and forwards everything else.
23
+ * itself — `app`, `keychain`, `platform`, `version`, and `optionsForFile` — and forwards everything else.
25
24
  *
26
25
  * Additionally exposes a small set of per-file convenience fields that electron-builder maps
27
26
  * internally through `optionsForFile`.
28
27
  *
29
28
  * @see https://packages.electronjs.org/osx-sign
30
29
  */
31
- export interface ElectronSignOptions extends Omit<OnlySignOptions, "optionsForFile" | "version" | "type"> {
30
+ export interface ElectronSignOptions extends Omit<OnlySignOptions, "optionsForFile" | "version"> {
31
+ /**
32
+ * The type of certificate to use when signing: `development` or `distribution`.
33
+ *
34
+ * Defaults to a value derived from the build flavor: `mas-dev` → `development`, otherwise `distribution`.
35
+ * Set it explicitly to override — e.g. `development` on a darwin build signs with a `Mac Developer` or
36
+ * `Apple Development` certificate instead of `Developer ID Application` and embeds a matching
37
+ * development provisioning profile.
38
+ *
39
+ * Development-signed apps are blocked by Gatekeeper on other machines; users must use the
40
+ * right-click → Open workaround documented at https://support.apple.com/en-us/guide/mac-help/mh40616/mac.
41
+ * Such builds are not suitable for production distribution and cannot be notarized.
42
+ */
43
+ readonly type?: SigningDistributionType;
32
44
  /**
33
45
  * The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.
34
46
  * Prefer the environment variables `CSC_LINK` / `CSC_NAME` over hardcoding this value.
@@ -59,9 +71,7 @@ export interface ElectronSignOptions extends Omit<OnlySignOptions, "optionsForFi
59
71
  * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime).
60
72
  *
61
73
  * Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).
62
- * Defaults to `true` for `darwin` builds and `false` for `mas-dev`.
63
- *
64
- * @see https://github.com/electron/fuses
74
+ * Defaults to `true` for `darwin` builds and `false` for MAS builds (`mas` and `mas-dev`).
65
75
  */
66
76
  readonly hardenedRuntime?: boolean;
67
77
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"macOptions.d.ts","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,GAAG,OAAO,CAAC;IAC/H;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,SAAS,GAAG,MAAM,CAAC;IACvG;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI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CAAC,EAAE,MAAM,CAAA;IAEV;;;OAGG;IACH,CAAC,CAAC,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;IAE9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAGD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetConfiguration, TargetSpecificOptions } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\nimport { CustomMacSign } from \"../macPackager.js\"\nimport type { OnlySignOptions } from \"@electron/osx-sign\"\nimport type { MakeUniversalOpts } from \"@electron/universal\"\n\n/**\n * Options forwarded to `@electron/universal`'s `makeUniversalApp`.\n * Electron-builder fills in the app paths and `force`; everything else is configurable here\n * and auto-tracks upstream additions to `MakeUniversalOpts`.\n *\n * @see https://github.com/electron/universal\n */\nexport interface ElectronUniversalOptions extends Omit<MakeUniversalOpts, \"x64AppPath\" | \"arm64AppPath\" | \"outAppPath\" | \"force\"> {\n /**\n * Whether to merge x64 and arm64 ASARs into one.\n *\n * @default true\n */\n mergeASARs?: boolean\n}\n\n/**\n * Signing options passed to `@electron/osx-sign`. Electron-builder owns the fields it must control\n * itself — `app`, `keychain`, `platform`, `version`, `optionsForFile`, and `type` (derived from the\n * build flavor: `mas-dev` → `development`, otherwise `distribution`) — and forwards everything else.\n *\n * Additionally exposes a small set of per-file convenience fields that electron-builder maps\n * internally through `optionsForFile`.\n *\n * @see https://packages.electronjs.org/osx-sign\n */\nexport interface ElectronSignOptions extends Omit<OnlySignOptions, \"optionsForFile\" | \"version\" | \"type\"> {\n /**\n * The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.\n * Prefer the environment variables `CSC_LINK` / `CSC_NAME` over hardcoding this value.\n *\n * - **Not set** (default): electron-builder searches the keychain for a valid certificate.\n * - **`null`**: skip signing entirely.\n * - **`\"-\"`**: ad-hoc signing (requires disabling library validation — see `hardenedRuntime`).\n */\n readonly identity?: string | null\n /**\n * Path to the main app entitlements file.\n * Falls back to `build/entitlements.mac.plist` if it exists, then to `@electron/osx-sign`'s\n * built-in defaults.\n */\n readonly entitlements?: string | null\n /**\n * Path to child entitlements inherited by embedded frameworks and bundles.\n * Falls back to `build/entitlements.mac.inherit.plist` if it exists.\n */\n readonly entitlementsInherit?: string | null\n /**\n * Path to entitlements for the Login Helper.\n * Required when using App Sandbox, because the Login Helper cannot inherit entitlements.\n * Defaults to the value of `entitlements`.\n */\n readonly entitlementsLoginHelper?: string | null\n /**\n * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime).\n *\n * Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).\n * Defaults to `true` for `darwin` builds and `false` for `mas-dev`.\n *\n * @see https://github.com/electron/fuses\n */\n readonly hardenedRuntime?: boolean\n /**\n * Path to a [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html).\n * Not applicable for MAS.\n */\n readonly requirements?: string | null\n /**\n * URL of the timestamp authority server. Passed per-file to `codesign --timestamp=<url>`.\n */\n readonly timestamp?: string | null\n /**\n * Extra arguments passed to each `codesign` invocation.\n * @example [\"--deep\"]\n */\n readonly additionalArguments?: Array<string> | null\n}\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n * @default default (dmg and zip for Squirrel.Mac)\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Codesigning configuration. The signing certificate is selected via `sign.identity` (or the\n * `CSC_LINK` / `CSC_NAME` environment variables).\n *\n * - **Not set** (default): electron-builder auto-discovers a valid certificate in the keychain. If none is found, signing is skipped.\n * - **`null`**: skip signing entirely.\n * - **`string`**: path or module ID of a file that exports a {@link CustomMacSign} function.\n * - **{@link CustomMacSign}**: inline custom signing function (JS/TS config only).\n * - **{@link ElectronSignOptions}**: options forwarded directly to `@electron/osx-sign`.\n *\n * @see {@link ElectronSignOptions}\n * @see https://www.electron.build/code-signing\n */\n readonly sign?: CustomMacSign | ElectronSignOptions | string | null\n\n /**\n * Options forwarded to `@electron/universal` when building a universal (multi-arch) app.\n * Has no effect unless the target arch is `universal`.\n *\n * @see {@link ElectronUniversalOptions}\n * @see https://github.com/electron/universal\n */\n readonly universal?: ElectronUniversalOptions | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Used when no background image is set.\n * @default #ffffff\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n */\n badgeIcon?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)). `ULMO` (lzma-compressed image (macOS 10.15+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\" | \"ULMO\"\n\n /**\n * The filesystem for the DMG volume (e.g. `\"APFS\"` or `\"HFS+\"`)\n * As of v27 this defaults to APFS. Set it explicitly to `\"HFS+\"` if you need compatibility with older macOS versions (pre-10.13 High Sierra cannot mount APFS volumes).\n * @default APFS\n */\n readonly filesystem?: \"HFS+\" | \"APFS\" | null\n\n /**\n * The initial size of the DMG filesystem. Accepts the same syntax as the `-size` argument to `hdiutil`, e.g. `\"150m\"`, `\"4g\"`.\n * If not specified, the size is calculated automatically.\n * Set this explicitly for large apps or apps with sparse files to avoid \"No space left on device\" errors.\n */\n readonly size?: string | null\n\n /**\n * Whether to shrink the DMG filesystem to the minimum size after copying files.\n * Set to `false` to preserve the explicit `size` you specified.\n * @default true\n */\n readonly shrink?: boolean\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * License agreement to display when the DMG is mounted.\n *\n * Accepts a single file path (`.rtf`, `.txt`, or `.html`) used as the English/default license,\n * or a language-code → file-path map for multi-language builds.\n *\n * When set, this takes precedence over the file-naming convention\n * (`license_en.txt`, etc. in the build resources directory).\n * Paths are resolved relative to the build resources directory or project root.\n *\n * @example Single language\n * ```yaml\n * dmg:\n * license: \"build/license.rtf\"\n * ```\n *\n * @example Multi-language\n * ```yaml\n * dmg:\n * license:\n * en_US: \"build/license.rtf\"\n * de_DE: \"build/license_de.txt\"\n * ja_JP: \"build/license_ja.txt\"\n * ```\n *\n * If not set, electron-builder scans the build resources directory for\n * `license_LANG.{rtf,txt,html}` files automatically.\n */\n license?: string | Record<string, string> | null\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface MasConfiguration extends MacConfiguration {}\n"]}
1
+ {"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetConfiguration, TargetSpecificOptions } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\nimport { CustomMacSign } from \"../macPackager.js\"\nimport type { OnlySignOptions, SigningDistributionType } from \"@electron/osx-sign\"\nimport type { MakeUniversalOpts } from \"@electron/universal\"\n\n/**\n * Options forwarded to `@electron/universal`'s `makeUniversalApp`.\n * Electron-builder fills in the app paths and `force`; everything else is configurable here\n * and auto-tracks upstream additions to `MakeUniversalOpts`.\n *\n * @see https://github.com/electron/universal\n */\nexport interface ElectronUniversalOptions extends Omit<MakeUniversalOpts, \"x64AppPath\" | \"arm64AppPath\" | \"outAppPath\" | \"force\"> {\n /**\n * Whether to merge x64 and arm64 ASARs into one.\n *\n * @default true\n */\n mergeASARs?: boolean\n}\n\n/**\n * Signing options passed to `@electron/osx-sign`. Electron-builder owns the fields it must control\n * itself — `app`, `keychain`, `platform`, `version`, and `optionsForFile` — and forwards everything else.\n *\n * Additionally exposes a small set of per-file convenience fields that electron-builder maps\n * internally through `optionsForFile`.\n *\n * @see https://packages.electronjs.org/osx-sign\n */\nexport interface ElectronSignOptions extends Omit<OnlySignOptions, \"optionsForFile\" | \"version\"> {\n /**\n * The type of certificate to use when signing: `development` or `distribution`.\n *\n * Defaults to a value derived from the build flavor: `mas-dev` → `development`, otherwise `distribution`.\n * Set it explicitly to override — e.g. `development` on a darwin build signs with a `Mac Developer` or\n * `Apple Development` certificate instead of `Developer ID Application` and embeds a matching\n * development provisioning profile.\n *\n * Development-signed apps are blocked by Gatekeeper on other machines; users must use the\n * right-click → Open workaround documented at https://support.apple.com/en-us/guide/mac-help/mh40616/mac.\n * Such builds are not suitable for production distribution and cannot be notarized.\n */\n readonly type?: SigningDistributionType\n /**\n * The signing identity (certificate name or SHA-1 hash). Applies to both app signing and DMG signing.\n * Prefer the environment variables `CSC_LINK` / `CSC_NAME` over hardcoding this value.\n *\n * - **Not set** (default): electron-builder searches the keychain for a valid certificate.\n * - **`null`**: skip signing entirely.\n * - **`\"-\"`**: ad-hoc signing (requires disabling library validation — see `hardenedRuntime`).\n */\n readonly identity?: string | null\n /**\n * Path to the main app entitlements file.\n * Falls back to `build/entitlements.mac.plist` if it exists, then to `@electron/osx-sign`'s\n * built-in defaults.\n */\n readonly entitlements?: string | null\n /**\n * Path to child entitlements inherited by embedded frameworks and bundles.\n * Falls back to `build/entitlements.mac.inherit.plist` if it exists.\n */\n readonly entitlementsInherit?: string | null\n /**\n * Path to entitlements for the Login Helper.\n * Required when using App Sandbox, because the Login Helper cannot inherit entitlements.\n * Defaults to the value of `entitlements`.\n */\n readonly entitlementsLoginHelper?: string | null\n /**\n * Whether to enable [Hardened Runtime](https://developer.apple.com/documentation/security/hardened_runtime).\n *\n * Hardened Runtime is a prerequisite for notarization (mandatory on macOS 10.15+).\n * Defaults to `true` for `darwin` builds and `false` for MAS builds (`mas` and `mas-dev`).\n */\n readonly hardenedRuntime?: boolean\n /**\n * Path to a [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html).\n * Not applicable for MAS.\n */\n readonly requirements?: string | null\n /**\n * URL of the timestamp authority server. Passed per-file to `codesign --timestamp=<url>`.\n */\n readonly timestamp?: string | null\n /**\n * Extra arguments passed to each `codesign` invocation.\n * @example [\"--deep\"]\n */\n readonly additionalArguments?: Array<string> | null\n}\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n * @default default (dmg and zip for Squirrel.Mac)\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Codesigning configuration. The signing certificate is selected via `sign.identity` (or the\n * `CSC_LINK` / `CSC_NAME` environment variables).\n *\n * - **Not set** (default): electron-builder auto-discovers a valid certificate in the keychain. If none is found, signing is skipped.\n * - **`null`**: skip signing entirely.\n * - **`string`**: path or module ID of a file that exports a {@link CustomMacSign} function.\n * - **{@link CustomMacSign}**: inline custom signing function (JS/TS config only).\n * - **{@link ElectronSignOptions}**: options forwarded directly to `@electron/osx-sign`.\n *\n * @see {@link ElectronSignOptions}\n * @see https://www.electron.build/code-signing\n */\n readonly sign?: CustomMacSign | ElectronSignOptions | string | null\n\n /**\n * Options forwarded to `@electron/universal` when building a universal (multi-arch) app.\n * Has no effect unless the target arch is `universal`.\n *\n * @see {@link ElectronUniversalOptions}\n * @see https://github.com/electron/universal\n */\n readonly universal?: ElectronUniversalOptions | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Used when no background image is set.\n * @default #ffffff\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n */\n badgeIcon?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)). `ULMO` (lzma-compressed image (macOS 10.15+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\" | \"ULMO\"\n\n /**\n * The filesystem for the DMG volume (e.g. `\"APFS\"` or `\"HFS+\"`)\n * As of v27 this defaults to APFS. Set it explicitly to `\"HFS+\"` if you need compatibility with older macOS versions (pre-10.13 High Sierra cannot mount APFS volumes).\n * @default APFS\n */\n readonly filesystem?: \"HFS+\" | \"APFS\" | null\n\n /**\n * The initial size of the DMG filesystem. Accepts the same syntax as the `-size` argument to `hdiutil`, e.g. `\"150m\"`, `\"4g\"`.\n * If not specified, the size is calculated automatically.\n * Set this explicitly for large apps or apps with sparse files to avoid \"No space left on device\" errors.\n */\n readonly size?: string | null\n\n /**\n * Whether to shrink the DMG filesystem to the minimum size after copying files.\n * Set to `false` to preserve the explicit `size` you specified.\n * @default true\n */\n readonly shrink?: boolean\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use `\"x\": 0, \"y\": 100000` as the x, y co-ordinates.\n * It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the user’s screen.\n */\n window?: DmgWindow\n\n /**\n * Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * License agreement to display when the DMG is mounted.\n *\n * Accepts a single file path (`.rtf`, `.txt`, or `.html`) used as the English/default license,\n * or a language-code → file-path map for multi-language builds.\n *\n * When set, this takes precedence over the file-naming convention\n * (`license_en.txt`, etc. in the build resources directory).\n * Paths are resolved relative to the build resources directory or project root.\n *\n * @example Single language\n * ```yaml\n * dmg:\n * license: \"build/license.rtf\"\n * ```\n *\n * @example Multi-language\n * ```yaml\n * dmg:\n * license:\n * en_US: \"build/license.rtf\"\n * de_DE: \"build/license_de.txt\"\n * ja_JP: \"build/license_ja.txt\"\n * ```\n *\n * If not set, electron-builder scans the build resources directory for\n * `license_LANG.{rtf,txt,html}` files automatically.\n */\n license?: string | Record<string, string> | null\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface MasConfiguration extends MacConfiguration {}\n"]}
@@ -32,10 +32,11 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
32
32
  * `https://` URL, or a base64-encoded certificate. This is the recommended setup for CI.
33
33
  * - Set to `false` or `null` to **disable** code signing entirely (executable resources such as
34
34
  * the icon and metadata are still edited).
35
- * - Set to an **object** to configure signing explicitly. The `type` field selects the signing
36
- * backend (`signtool` is the implicit default) and dispatches to a dedicated sign manager;
37
- * provide exactly one of the modes below. Each output artifact is signed individually, and by
38
- * default executables are dual-signed (see `signingHashAlgorithms`).
35
+ * - Set to an **object** to configure signing explicitly. The **required** `type` field selects the
36
+ * signing backend (`signtool`, `hsm`, `pkcs11`, or `azure`) and dispatches to a dedicated sign
37
+ * manager; provide exactly one of the modes below. When `win.sign` is left unset, the `signtool`
38
+ * backend is used with env-discovered credentials. Each output artifact is signed individually,
39
+ * and by default executables are dual-signed (see `signingHashAlgorithms`).
39
40
  *
40
41
  * - `{ type: "signtool", ... }` — Sign with a local certificate file (.pfx/.p12) or a
41
42
  * certificate from the Windows certificate store. Uses Microsoft `signtool.exe` on Windows and
@@ -1 +1 @@
1
- {"version":3,"file":"winOptions.d.ts","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAEhF,MAAM,WAAW,oBAAqB,SAAQ,4BAA4B;IACxE;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAA;IAElC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE7B;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,2BAA2B,GAAG,KAAK,GAAG,IAAI,CAAA;IAE1D;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAA;IAE5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