app-builder-lib 27.0.0-alpha.3 → 27.0.0-alpha.4

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 (116) hide show
  1. package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
  2. package/dist/codeSign/win/signtoolBaseSignManager.js +9 -2
  3. package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
  4. package/dist/configuration.d.ts +3 -3
  5. package/dist/configuration.js.map +1 -1
  6. package/dist/indexInternal.d.ts +1 -1
  7. package/dist/indexInternal.d.ts.map +1 -1
  8. package/dist/indexInternal.js +1 -1
  9. package/dist/indexInternal.js.map +1 -1
  10. package/dist/macPackager.d.ts +5 -0
  11. package/dist/macPackager.d.ts.map +1 -1
  12. package/dist/macPackager.js +35 -0
  13. package/dist/macPackager.js.map +1 -1
  14. package/dist/node-module-collector/moduleManager.d.ts +2 -1
  15. package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
  16. package/dist/node-module-collector/moduleManager.js +2 -0
  17. package/dist/node-module-collector/moduleManager.js.map +1 -1
  18. package/dist/node-module-collector/nodeModulesCollector.d.ts +13 -23
  19. package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
  20. package/dist/node-module-collector/nodeModulesCollector.js +52 -122
  21. package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
  22. package/dist/node-module-collector/types.d.ts +2 -0
  23. package/dist/node-module-collector/types.d.ts.map +1 -1
  24. package/dist/node-module-collector/types.js.map +1 -1
  25. package/dist/options/linuxOptions.d.ts +0 -10
  26. package/dist/options/linuxOptions.d.ts.map +1 -1
  27. package/dist/options/linuxOptions.js.map +1 -1
  28. package/dist/packager.js +1 -1
  29. package/dist/packager.js.map +1 -1
  30. package/dist/platformPackager.d.ts +1 -0
  31. package/dist/platformPackager.d.ts.map +1 -1
  32. package/dist/platformPackager.js +5 -6
  33. package/dist/platformPackager.js.map +1 -1
  34. package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
  35. package/dist/targets/linux/FlatpakTarget.js +4 -1
  36. package/dist/targets/linux/FlatpakTarget.js.map +1 -1
  37. package/dist/targets/linux/FpmTarget.d.ts +6 -0
  38. package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
  39. package/dist/targets/linux/FpmTarget.js +25 -3
  40. package/dist/targets/linux/FpmTarget.js.map +1 -1
  41. package/dist/targets/linux/LinuxTargetHelper.d.ts +14 -0
  42. package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -1
  43. package/dist/targets/linux/LinuxTargetHelper.js +38 -59
  44. package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
  45. package/dist/targets/linux/appimage/AppImageTarget.d.ts +1 -0
  46. package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
  47. package/dist/targets/linux/appimage/AppImageTarget.js +8 -9
  48. package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
  49. package/dist/targets/linux/appimage/appImageUtil.d.ts +4 -0
  50. package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -1
  51. package/dist/targets/linux/appimage/appImageUtil.js +11 -4
  52. package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
  53. package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -1
  54. package/dist/targets/linux/appimage/appLauncher.js +5 -11
  55. package/dist/targets/linux/appimage/appLauncher.js.map +1 -1
  56. package/dist/targets/linux/launcherScript.d.ts +32 -0
  57. package/dist/targets/linux/launcherScript.d.ts.map +1 -0
  58. package/dist/targets/linux/launcherScript.js +24 -0
  59. package/dist/targets/linux/launcherScript.js.map +1 -0
  60. package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
  61. package/dist/targets/linux/snap/coreLegacy.js +6 -6
  62. package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
  63. package/dist/targets/linux/snap/snapCommand.d.ts +2 -2
  64. package/dist/targets/linux/snap/snapCommand.d.ts.map +1 -1
  65. package/dist/targets/linux/snap/snapCommand.js +4 -10
  66. package/dist/targets/linux/snap/snapCommand.js.map +1 -1
  67. package/dist/targets/win/AppxTarget.d.ts.map +1 -1
  68. package/dist/targets/win/AppxTarget.js +6 -6
  69. package/dist/targets/win/AppxTarget.js.map +1 -1
  70. package/dist/targets/win/MsiTarget.d.ts.map +1 -1
  71. package/dist/targets/win/MsiTarget.js +8 -11
  72. package/dist/targets/win/MsiTarget.js.map +1 -1
  73. package/dist/targets/win/nsis/NsisTarget.js +3 -3
  74. package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
  75. package/dist/targets/win/nsis/nsisScriptGenerator.js +1 -1
  76. package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
  77. package/dist/toolsets/icons.d.ts.map +1 -1
  78. package/dist/toolsets/icons.js +10 -2
  79. package/dist/toolsets/icons.js.map +1 -1
  80. package/dist/util/appFileCopier.d.ts.map +1 -1
  81. package/dist/util/appFileCopier.js +9 -4
  82. package/dist/util/appFileCopier.js.map +1 -1
  83. package/dist/util/archCompatibility.d.ts +42 -0
  84. package/dist/util/archCompatibility.d.ts.map +1 -0
  85. package/dist/util/archCompatibility.js +202 -0
  86. package/dist/util/archCompatibility.js.map +1 -0
  87. package/dist/util/installOrRebuild.d.ts +38 -0
  88. package/dist/util/installOrRebuild.d.ts.map +1 -0
  89. package/dist/util/{yarn.js → installOrRebuild.js} +65 -14
  90. package/dist/util/installOrRebuild.js.map +1 -0
  91. package/dist/util/langs.d.ts.map +1 -1
  92. package/dist/util/langs.js +1 -0
  93. package/dist/util/langs.js.map +1 -1
  94. package/dist/util/mac/macosIconComposer.d.ts +2 -1
  95. package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
  96. package/dist/util/mac/macosIconComposer.js +40 -58
  97. package/dist/util/mac/macosIconComposer.js.map +1 -1
  98. package/dist/util/streamSpawnToFile.d.ts +47 -0
  99. package/dist/util/streamSpawnToFile.d.ts.map +1 -0
  100. package/dist/util/streamSpawnToFile.js +110 -0
  101. package/dist/util/streamSpawnToFile.js.map +1 -0
  102. package/dist/util/toolsetLock.d.ts +2 -0
  103. package/dist/util/toolsetLock.d.ts.map +1 -1
  104. package/dist/util/toolsetLock.js +31 -5
  105. package/dist/util/toolsetLock.js.map +1 -1
  106. package/dist/version.d.ts +1 -1
  107. package/dist/version.js +1 -1
  108. package/dist/version.js.map +1 -1
  109. package/package.json +8 -8
  110. package/scheme.json +3 -8
  111. package/templates/appx/appxmanifest.xml +1 -2
  112. package/templates/nsis/assistedMessages.yml +17 -0
  113. package/templates/nsis/messages.yml +5 -0
  114. package/dist/util/yarn.d.ts +0 -23
  115. package/dist/util/yarn.d.ts.map +0 -1
  116. package/dist/util/yarn.js.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { exists, log, retry, stripSensitiveEnvVars } from "builder-util";
2
- import * as childProcess from "child_process";
3
- import { createWriteStream } from "node:fs";
4
2
  import _fsExtra from "fs-extra";
5
3
  import { Lazy } from "lazy-val";
6
4
  import * as path from "path";
7
5
  import { hoist } from "./hoist.js";
8
6
  import { LogMessageByKey, ModuleManager } from "./moduleManager.js";
9
7
  import { getPackageManagerCommand } from "./packageManager.js";
8
+ import { streamSpawnToFile } from "../util/streamSpawnToFile.js";
9
+ import { isPackageCompatible } from "../util/archCompatibility.js";
10
10
  export class NodeModulesCollector {
11
11
  constructor(rootDir, tempDirManager) {
12
12
  this.rootDir = rootDir;
@@ -42,7 +42,7 @@ export class NodeModulesCollector {
42
42
  * 5. Hoisting the dependencies to their final locations
43
43
  * 6. Resolving and returning module information
44
44
  */
45
- async getNodeModules({ packageName }) {
45
+ async getNodeModules({ packageName, archFilter }) {
46
46
  const tree = await this.getDependenciesTree(this.installOptions.manager);
47
47
  await this.collectAllDependencies(tree, packageName);
48
48
  const realTree = this.getTreeFromWorkspaces(tree, packageName);
@@ -50,7 +50,7 @@ export class NodeModulesCollector {
50
50
  const hoisterResult = hoist(this.transformToHoisterTree(this.productionGraph, packageName), {
51
51
  check: log.isDebugEnabled,
52
52
  });
53
- await this._getNodeModules(hoisterResult.dependencies, this.nodeModules);
53
+ await this._getNodeModules(hoisterResult.dependencies, this.nodeModules, archFilter);
54
54
  log.debug({ packageName, depCount: this.nodeModules.length }, "node modules collection complete");
55
55
  return { nodeModules: this.nodeModules, logSummary: this.cache.logSummary };
56
56
  }
@@ -238,7 +238,7 @@ export class NodeModulesCollector {
238
238
  }
239
239
  return node;
240
240
  }
241
- async _getNodeModules(dependencies, result) {
241
+ async _getNodeModules(dependencies, result, archFilter) {
242
242
  if (dependencies.size === 0) {
243
243
  return;
244
244
  }
@@ -258,15 +258,28 @@ export class NodeModulesCollector {
258
258
  this.logMissingDependency(key);
259
259
  continue;
260
260
  }
261
+ const dir = await this.cache.realPath[p];
262
+ // Drop packages whose declared `cpu`/`os` is incompatible with the target arch/platform (and their
263
+ // subtree). npm/pnpm install only the host's platform-specific optional packages, so without this an
264
+ // arm64-only binary (e.g. `@esbuild/darwin-arm64`) would be bundled into the x64 build too — and into
265
+ // both slices of a universal build, which `@electron/universal` then refuses to merge. Reuses the
266
+ // memoized `package.json` cache populated during collection.
267
+ if (archFilter != null) {
268
+ const pkgJson = await this.cache.json[path.join(dir, "package.json")];
269
+ if (pkgJson != null && !isPackageCompatible(pkgJson, archFilter.cpu, archFilter.os)) {
270
+ this.cache.logSummary[LogMessageByKey.PKG_INCOMPATIBLE_PLATFORM].push(key);
271
+ continue;
272
+ }
273
+ }
261
274
  const node = {
262
275
  name: d.name,
263
276
  version: reference,
264
- dir: await this.cache.realPath[p],
277
+ dir,
265
278
  };
266
279
  result.push(node);
267
280
  if (d.dependencies.size > 0) {
268
281
  node.dependencies = [];
269
- await this._getNodeModules(d.dependencies, node.dependencies);
282
+ await this._getNodeModules(d.dependencies, node.dependencies, archFilter);
270
283
  }
271
284
  }
272
285
  result.sort((a, b) => a.name.localeCompare(b.name));
@@ -289,133 +302,50 @@ export class NodeModulesCollector {
289
302
  }
290
303
  }
291
304
  /**
292
- * Executes a command and streams its output to a file.
293
- *
294
- * Spawns a child process to execute the specified command with arguments, capturing stdout
295
- * to a file. On Windows, wraps the invocation in `powershell.exe -EncodedCommand` (UTF-16LE
296
- * base64) to avoid spawning `.cmd` shims directly and to eliminate shell-injection surface area.
297
- * Enables corepack strict mode by default but allows process.env overrides.
305
+ * Executes a package-manager command and streams its stdout to a file.
298
306
  *
299
- * Special handling for `npm list` exit code 1, which is expected in certain scenarios.
307
+ * Delegates the spawn/stream/flush mechanics (including the Windows `powershell.exe -EncodedCommand`
308
+ * wrapping) to {@link streamSpawnToFile}, and layers on the collector-specific interpretation of the
309
+ * result: corepack is silenced for these invocations, `npm list` exit code 1 is tolerated, and any
310
+ * stderr is surfaced as a collector warning only when the exit code is genuinely unexpected.
300
311
  *
301
312
  * @param command - The command to execute
302
313
  * @param args - Array of command-line arguments
303
314
  * @param cwd - The working directory to execute the command in
304
315
  * @param tempOutputFile - The path to the temporary file where stdout will be written
305
316
  * @returns Promise that resolves when the command completes successfully or rejects if it fails
306
- * @throws {Error} If the child process spawn fails or exits with a non-zero code
317
+ * @throws {Error} If the child process spawn fails or exits with a non-zero, unexpected code
307
318
  */
308
319
  async streamCollectorCommandToFile(command, args, cwd, tempOutputFile) {
309
320
  // Derive execName from the original command so the npm-list shouldIgnore check below keys off the
310
- // real invocation (e.g. "npm"), not the "powershell" wrapper we spawn on Windows.
321
+ // real invocation (e.g. "npm"), not the "powershell" wrapper streamSpawnToFile uses on Windows.
311
322
  const execName = path.basename(command, path.extname(command));
312
- // On Windows the package-manager command is typically a `.cmd` shim (npm.cmd/pnpm.cmd/yarn.cmd),
313
- // which Node can no longer spawn directly (CVE-2024-27980). Rather than spawn with `shell: true` —
314
- // which emits the DEP0190 "args with shell" deprecation warning and forces manual metacharacter
315
- // escaping — wrap the invocation in a single PowerShell `-EncodedCommand`. The base64 (UTF-16LE)
316
- // payload sidesteps every shell-quoting layer, and `powershell.exe` is a real executable we spawn
317
- // directly with no shell. See buildPowerShellEncodedArgs for the UTF-8 / exit-code handling.
318
- const [spawnCommand, spawnArgs] = process.platform === "win32" ? ["powershell.exe", buildPowerShellEncodedArgs(command, args)] : [command, args];
319
- await new Promise((resolve, reject) => {
320
- const outStream = createWriteStream(tempOutputFile);
321
- const child = childProcess.spawn(spawnCommand, spawnArgs, {
322
- cwd,
323
- // Package manager invocations do not need signing/publishing credentials.
324
- env: { ...stripSensitiveEnvVars(process.env), COREPACK_ENABLE_STRICT: "0" },
325
- });
326
- let stderr = "";
327
- // The process can close before all piped stdout has been flushed to disk. Resolving on the
328
- // child's "close" alone races the write stream and lets the caller read a TRUNCATED file
329
- // (manifesting as "No JSON content found in output"). Gate the settle on BOTH the child exit
330
- // (for the code/stderr) and the write stream's "finish" (all bytes flushed).
331
- let exitCode = null;
332
- let childClosed = false;
333
- let streamFinished = false;
334
- let settled = false;
335
- // `pipe` ends `outStream` when stdout EOFs, which triggers its "finish" once flushed.
336
- child.stdout.pipe(outStream);
337
- child.stderr.on("data", chunk => {
338
- stderr += chunk.toString();
339
- });
340
- const fail = (err) => {
341
- if (settled) {
342
- return;
343
- }
344
- settled = true;
345
- // Best-effort cleanup: stop the child and close the stream so we don't
346
- // waste CPU writing to a broken fd after rejection.
347
- try {
348
- child.kill();
349
- }
350
- catch {
351
- // ignore
352
- }
353
- try {
354
- outStream.destroy();
355
- }
356
- catch {
357
- // ignore
358
- }
359
- reject(err);
360
- };
361
- const settle = () => {
362
- if (settled || !childClosed || !streamFinished) {
363
- return;
364
- }
365
- const code = exitCode;
366
- // https://github.com/npm/npm/issues/17624
367
- const shouldIgnore = code === 1 && "npm" === execName.toLowerCase() && args.includes("list");
368
- if (shouldIgnore) {
369
- log.debug(null, "`npm list` returned non-zero exit code, but it MIGHT be expected (https://github.com/npm/npm/issues/17624). Check stderr for details.");
370
- }
371
- if (stderr.length > 0) {
372
- log.debug({ stderr }, "note: there was node module collector output on stderr");
373
- // Only surface stderr as a user-visible warning when the exit code itself is unexpected.
374
- // When shouldIgnore is true (npm list exit code 1) the stderr is an anticipated side
375
- // effect of package-manager features like yarn resolutions or npm overrides that cause
376
- // npm to report ELSPROBLEMS for aliased packages it considers "invalid".
377
- if (!shouldIgnore) {
378
- this.cache.logSummary[LogMessageByKey.PKG_COLLECTOR_OUTPUT].push(stderr);
379
- }
380
- }
381
- settled = true;
382
- const shouldResolve = code === 0 || shouldIgnore;
383
- return shouldResolve ? resolve() : reject(new Error(`Node module collector process exited with code ${code}:\n${stderr}`));
384
- };
385
- outStream.on("error", err => fail(new Error(`Node module collector failed writing output (${command}): ${err.message}`)));
386
- outStream.on("finish", () => {
387
- streamFinished = true;
388
- settle();
389
- });
390
- child.on("error", err => {
391
- fail(new Error(`Node module collector spawn (${command} ${JSON.stringify(args)}) failed: ${err.message}`));
392
- });
393
- child.on("close", code => {
394
- exitCode = code;
395
- childClosed = true;
396
- settle();
397
- });
323
+ const { code, stderr } = await streamSpawnToFile(command, args, cwd, tempOutputFile, {
324
+ // Package manager invocations do not need signing/publishing credentials. Silence corepack:
325
+ // strict=0 so a project's `packageManager` pin can't abort our read-only queries, and the
326
+ // download prompt/notice off so corepack doesn't flood stdout/stderr with activation chatter.
327
+ ...stripSensitiveEnvVars(process.env),
328
+ COREPACK_ENABLE_STRICT: "0",
329
+ COREPACK_ENABLE_DOWNLOAD_PROMPT: "0",
398
330
  });
331
+ // https://github.com/npm/npm/issues/17624
332
+ const shouldIgnore = code === 1 && "npm" === execName.toLowerCase() && args.includes("list");
333
+ if (shouldIgnore) {
334
+ log.debug(null, "`npm list` returned non-zero exit code, but it MIGHT be expected (https://github.com/npm/npm/issues/17624). Check stderr for details.");
335
+ }
336
+ if (stderr.length > 0) {
337
+ log.debug({ stderr }, "note: there was node module collector output on stderr");
338
+ // Only surface stderr as a user-visible warning when the exit code itself is unexpected.
339
+ // When shouldIgnore is true (npm list exit code 1) the stderr is an anticipated side
340
+ // effect of package-manager features like yarn resolutions or npm overrides that cause
341
+ // npm to report ELSPROBLEMS for aliased packages it considers "invalid".
342
+ if (!shouldIgnore) {
343
+ this.cache.logSummary[LogMessageByKey.PKG_COLLECTOR_OUTPUT].push(stderr);
344
+ }
345
+ }
346
+ if (code !== 0 && !shouldIgnore) {
347
+ throw new Error(`Node module collector process exited with code ${code}:\n${stderr}`);
348
+ }
399
349
  }
400
350
  }
401
- /**
402
- * Build the argv for invoking a Windows command through `powershell.exe -EncodedCommand`.
403
- *
404
- * Each token is wrapped in a PowerShell single-quoted string (with embedded single quotes doubled),
405
- * so no character is interpreted by a shell. The script:
406
- * - pins `[Console]::OutputEncoding` to UTF-8 *without* a BOM so the JSON dependency tree is not
407
- * corrupted by the console's OEM code page (and no BOM is prepended to break `JSON.parse`),
408
- * - invokes the command via the call operator `&`,
409
- * - re-emits the command's own exit code via `exit $LASTEXITCODE` (e.g. `npm list` returns 1 in
410
- * expected scenarios, which the caller's shouldIgnore logic relies on).
411
- *
412
- * The whole script is base64-encoded as UTF-16LE per PowerShell's `-EncodedCommand` contract.
413
- */
414
- export function buildPowerShellEncodedArgs(command, args) {
415
- const psQuote = (value) => `'${value.replace(/'/g, "''")}'`;
416
- const invocation = ["&", psQuote(command), ...args.map(psQuote)].join(" ");
417
- const script = `[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new($false); ${invocation}; exit $LASTEXITCODE`;
418
- const encoded = Buffer.from(script, "utf16le").toString("base64");
419
- return ["-NoProfile", "-NonInteractive", "-EncodedCommand", encoded];
420
- }
421
351
  //# sourceMappingURL=nodeModulesCollector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nodeModulesCollector.js","sourceRoot":"","sources":["../../src/node-module-collector/nodeModulesCollector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,qBAAqB,EAAU,MAAM,cAAc,CAAA;AAChF,OAAO,KAAK,YAAY,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,OA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AC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;gBACtB,IAAI,CAAC,IAAI,KAAK,CAAC,gCAAgC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;YAC5G,CAAC,CAAC,CAAA;YACF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;gBACvB,QAAQ,GAAG,IAAI,CAAA;gBACf,WAAW,GAAG,IAAI,CAAA;gBAClB,MAAM,EAAE,CAAA;YACV,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,0BAA0B,CAAC,OAAe,EAAE,IAAc;IACxE,MAAM,OAAO,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAA;IACnE,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC1E,MAAM,MAAM,GAAG,sEAAsE,UAAU,sBAAsB,CAAA;IACrH,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IACjE,OAAO,CAAC,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAA;AACtE,CAAC","sourcesContent":["import { exists, log, retry, stripSensitiveEnvVars, TmpDir } from \"builder-util\"\nimport * as childProcess from \"child_process\"\nimport { createWriteStream } from \"node:fs\"\nimport _fsExtra from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { hoist, type HoisterResult, type HoisterTree } from \"./hoist.js\"\nimport { LogMessageByKey, ModuleManager } from \"./moduleManager.js\"\nimport { getPackageManagerCommand, PM } from \"./packageManager.js\"\nimport type { Dependency, DependencyGraph, NodeModuleInfo, PackageJson } from \"./types.js\"\n\nexport abstract class NodeModulesCollector<ProdDepType extends Dependency<ProdDepType, OptionalDepType>, OptionalDepType> {\n private readonly nodeModules: NodeModuleInfo[] = []\n protected readonly allDependencies: Map<string, ProdDepType> = new Map()\n protected readonly productionGraph: DependencyGraph = {}\n protected readonly cache: ModuleManager = new ModuleManager()\n\n protected isHoisted = new Lazy<boolean>(async () => {\n const { manager } = this.installOptions\n const command = getPackageManagerCommand(manager)\n const config = (await this.asyncExec(command, [\"config\", \"list\"])).stdout\n if (config == null) {\n log.debug({ manager }, \"unable to determine node-linker setting; assuming non-hoisted (virtual store) layout\")\n return false\n }\n const lines = Object.fromEntries(config.split(\"\\n\").map(line => line.split(\"=\").map(s => s.trim())))\n if (lines[\"node-linker\"] === \"hoisted\") {\n log.debug({ manager }, \"node_modules are hoisted\")\n return true\n }\n return false\n })\n\n constructor(\n protected readonly rootDir: string,\n private readonly tempDirManager: TmpDir\n ) {}\n\n /**\n * Retrieves and collects all Node.js modules for a given package.\n *\n * This method orchestrates the entire module collection process by:\n * 1. Fetching the dependency tree from the package manager\n * 2. Collecting all dependencies recursively\n * 3. Extracting workspace references if applicable\n * 4. Building a production dependency graph\n * 5. Hoisting the dependencies to their final locations\n * 6. Resolving and returning module information\n */\n public async getNodeModules({ packageName }: { packageName: string }): Promise<{\n nodeModules: NodeModuleInfo[]\n logSummary: ModuleManager[\"logSummary\"]\n }> {\n const tree: ProdDepType = await this.getDependenciesTree(this.installOptions.manager)\n\n await this.collectAllDependencies(tree, packageName)\n const realTree: ProdDepType = this.getTreeFromWorkspaces(tree, packageName)\n await this.extractProductionDependencyGraph(realTree, packageName)\n\n const hoisterResult: HoisterResult = hoist(this.transformToHoisterTree(this.productionGraph, packageName), {\n check: log.isDebugEnabled,\n })\n\n await this._getNodeModules(hoisterResult.dependencies, this.nodeModules)\n\n log.debug({ packageName, depCount: this.nodeModules.length }, \"node modules collection complete\")\n\n return { nodeModules: this.nodeModules, logSummary: this.cache.logSummary }\n }\n\n public abstract readonly installOptions: {\n manager: PM\n lockfile: string\n }\n\n protected abstract getArgs(): string[]\n protected abstract extractProductionDependencyGraph(tree: Dependency<ProdDepType, OptionalDepType>, dependencyId: string): Promise<void>\n protected abstract collectAllDependencies(tree: Dependency<ProdDepType, OptionalDepType>, appPackageName: string): Promise<void>\n\n /**\n * Retrieves the dependency tree from the package manager.\n *\n * Executes the appropriate package manager command to fetch the dependency tree and writes\n * the output to a temporary file. Includes retry logic to handle transient failures such as\n * incomplete JSON output or missing files. Will retry up to 1 time with exponential backoff.\n */\n protected async getDependenciesTree(pm: PM): Promise<ProdDepType> {\n const command = getPackageManagerCommand(pm)\n const args = this.getArgs()\n\n const tempOutputFile = await this.tempDirManager.getTempFile({\n prefix: path.basename(command, path.extname(command)),\n suffix: \"output.json\",\n })\n\n return retry(\n async () => {\n await this.streamCollectorCommandToFile(command, args, this.rootDir, tempOutputFile)\n const shellOutput = await _fsExtra.readFile(tempOutputFile, { encoding: \"utf8\" })\n const result = await Promise.resolve(this.parseDependenciesTree(shellOutput))\n return result\n },\n {\n retries: 1,\n interval: 2000,\n backoff: 2000,\n shouldRetry: async (error: any) => {\n const fields: Record<string, string> = { error: error.message, tempOutputFile, cwd: this.rootDir, packageManager: pm }\n\n if (!(await exists(tempOutputFile))) {\n log.debug(fields, \"dependency tree output file missing, retrying\")\n return true\n }\n\n const fileContent = await _fsExtra.readFile(tempOutputFile, { encoding: \"utf8\" })\n fields.fileContentLength = fileContent.length.toString()\n\n if (fileContent.trim().length === 0) {\n log.debug(fields, \"dependency tree output file empty, retrying\")\n return true\n }\n\n // extract small start/end sample for debugging purposes (e.g. polluted console output)\n const lines = fileContent.split(\"\\n\")\n const lineSampleSize = Math.min(5, lines.length / 2)\n if (2 * lineSampleSize > 5) {\n fields.sampleStart = lines.slice(0, lineSampleSize).join(\"\\n\")\n fields.sampleEnd = lines.slice(-lineSampleSize).join(\"\\n\")\n } else {\n fields.content = fileContent\n }\n\n // Both indicate truncated/polluted PM output (a transient that re-running the command clears).\n if (error.message?.includes(\"Unexpected end of JSON input\") || error.message?.includes(\"No JSON content found in output\")) {\n log.debug(fields, \"JSON parse error in dependency tree, retrying\")\n return true\n }\n\n log.error(fields, \"error parsing dependencies tree\")\n return false\n },\n }\n )\n }\n\n /**\n * Parses the dependencies tree from shell command output.\n *\n **/\n protected parseDependenciesTree(shellOutput: string): ProdDepType | Promise<ProdDepType> {\n return this.extractJsonFromPollutedOutput<ProdDepType>(shellOutput)\n }\n\n protected extractJsonFromPollutedOutput<T>(shellOutput: string): T {\n const consoleOutput = shellOutput.trim()\n try {\n // Please for the love of all that is holy, this should cover 99% of cases where npm/pnpm/yarn output is clean JSON\n return JSON.parse(consoleOutput)\n } catch {\n // ignore\n }\n\n // DEDICATED FALLBACK FOR POLLUTED OUTPUT, non-trivial to implement correctly, not needed in most cases, and highly inefficient\n\n // Find the first index that starts with { or [\n const bracketOpen = Math.max(consoleOutput.indexOf(\"{\"), 0)\n const bracketOpenSquare = Math.max(consoleOutput.indexOf(\"[\"), 0)\n const start = Math.min(bracketOpen, bracketOpenSquare) // always non-negative due to Math.max above\n\n for (let i = start; i < consoleOutput.length; i++) {\n const slice = consoleOutput.slice(start, i + 1)\n try {\n return JSON.parse(slice)\n } catch {\n // ignore, try next\n }\n }\n throw new Error(\"No JSON content found in output\")\n }\n\n protected cacheKey(pkg: Pick<ProdDepType, \"name\" | \"version\" | \"path\">): string {\n const rel = path.relative(this.rootDir, pkg.path)\n return `${pkg.name}::${pkg.version}::${rel ?? \".\"}`\n }\n\n // We use the key (alias name) instead of value.name for npm aliased packages\n // e.g., { \"foo\": { name: \"@scope/bar\", ... } } should be stored as \"foo@version\"\n protected normalizePackageVersion(key: string, pkg: ProdDepType) {\n return { id: `${key}@${pkg.version}`, pkgOverride: { ...pkg, name: key } }\n }\n\n /**\n * Determines if a given dependency is a production dependency of a package.\n *\n * Checks both the dependencies and optionalDependencies of a package to see if\n * the specified dependency name is listed.\n *\n * @param depName - The name of the dependency to check\n * @param pkg - The package to search for the dependency in\n * @returns True if the dependency is found in either dependencies or optionalDependencies, false otherwise\n */\n protected isProdDependency(depName: string, pkg: ProdDepType): boolean {\n const prodDeps = { ...pkg.dependencies, ...pkg.optionalDependencies }\n return prodDeps[depName] != null\n }\n\n protected async locatePackageWithVersion(depTree: Pick<ProdDepType, \"name\" | \"version\" | \"path\">): Promise<{ packageDir: string; packageJson: PackageJson } | null> {\n const result = await this.cache.locatePackageVersion({\n parentDir: depTree.path,\n pkgName: depTree.name,\n requiredRange: depTree.version,\n })\n return result\n }\n /**\n * Parses a dependency identifier string into name and version components.\n *\n * Handles both scoped packages (e.g., \"@scope/pkg@1.2.3\") and regular packages (e.g., \"pkg@1.2.3\").\n * If the identifier is malformed or cannot be parsed, defaults to treating the entire string as\n * the package name with an \"unknown\" version.\n */\n protected parseNameVersion(identifier: string): { name: string; version: string } {\n let at: number\n if (identifier.startsWith(\"@\")) {\n // Scoped package: find the version separator after the scope (e.g. \"@scope/pkg@1.2.3\")\n const slashIndex = identifier.indexOf(\"/\")\n if (slashIndex === -1) {\n return { name: identifier, version: \"unknown\" }\n }\n at = identifier.indexOf(\"@\", slashIndex + 1)\n } else {\n at = identifier.indexOf(\"@\")\n }\n if (at <= 0) {\n return { name: identifier, version: \"unknown\" }\n }\n return { name: identifier.slice(0, at), version: identifier.slice(at + 1) }\n }\n\n /**\n * Retrieves the dependency tree and handles workspace package self-references.\n *\n * If the project is a workspace project, this method removes the root package's self-reference\n * from the dependency tree to avoid circular dependencies. It promotes the root package's\n * direct dependencies to the top level of the tree.\n *\n * @param tree - The original dependency tree\n * @param packageName - The name of the package to check for and remove from the tree\n * @returns The extracted dependency subtree\n */\n protected getTreeFromWorkspaces(tree: ProdDepType, packageName: string): ProdDepType {\n if (tree.workspaces && tree.dependencies) {\n for (const [key, value] of Object.entries(tree.dependencies)) {\n if (key === packageName) {\n return value\n }\n }\n }\n\n return tree\n }\n\n private transformToHoisterTree(obj: DependencyGraph, key: string, nodes: Map<string, HoisterTree> = new Map()): HoisterTree {\n let node = nodes.get(key)\n const { name, version } = this.parseNameVersion(key)\n\n if (!node) {\n node = {\n name,\n identName: name,\n reference: version,\n dependencies: new Set<HoisterTree>(),\n peerNames: new Set<string>(),\n }\n\n nodes.set(key, node)\n\n const deps = (obj[key] || {}).dependencies || []\n for (const dep of deps) {\n const child = this.transformToHoisterTree(obj, dep, nodes)\n node.dependencies.add(child)\n }\n }\n\n return node\n }\n\n private async _getNodeModules(dependencies: Set<HoisterResult>, result: NodeModuleInfo[]) {\n if (dependencies.size === 0) {\n return\n }\n\n for (const d of dependencies.values()) {\n const reference = [...d.references][0]\n const key = `${d.name}@${reference}`\n // Normalize the path to handle mixed separators from pnpm JSON output on Windows\n const rawPath = this.allDependencies.get(key)?.path\n const p = rawPath != null ? path.normalize(rawPath) : undefined\n if (p === undefined) {\n this.cache.logSummary[LogMessageByKey.PKG_NOT_FOUND].push(key)\n continue\n }\n\n // fix npm list issue\n // https://github.com/npm/cli/issues/8535\n if (!(await this.cache.exists[p])) {\n this.logMissingDependency(key)\n continue\n }\n\n const node: NodeModuleInfo = {\n name: d.name,\n version: reference,\n dir: await this.cache.realPath[p],\n }\n result.push(node)\n if (d.dependencies.size > 0) {\n node.dependencies = []\n await this._getNodeModules(d.dependencies, node.dependencies)\n }\n }\n result.sort((a, b) => a.name.localeCompare(b.name))\n }\n\n protected logMissingDependency(pkgName: string) {\n const PLATFORM_PACKAGE_RE = /(linux|win32|darwin|freebsd|android)[-_](x64|arm64|ia32|arm|ppc64|s390x|loong64|riscv64|universal)/\n const diskLogKey = PLATFORM_PACKAGE_RE.test(pkgName) ? LogMessageByKey.PKG_OPTIONAL_PLATFORM_NOT_INSTALLED : LogMessageByKey.PKG_NOT_ON_DISK\n this.cache.logSummary[diskLogKey].push(pkgName)\n }\n\n protected async asyncExec(command: string, args: string[], cwd: string = this.rootDir): Promise<{ stdout: string | undefined; stderr: string | undefined }> {\n const file = await this.tempDirManager.getTempFile({ prefix: \"exec-\", suffix: \".txt\" })\n try {\n await this.streamCollectorCommandToFile(command, args, cwd, file)\n const result = await _fsExtra.readFile(file, { encoding: \"utf8\" })\n return { stdout: result?.trim(), stderr: undefined }\n } catch (error: any) {\n log.debug({ error: error.message }, \"failed to execute command\")\n return { stdout: undefined, stderr: error.message }\n }\n }\n\n /**\n * Executes a command and streams its output to a file.\n *\n * Spawns a child process to execute the specified command with arguments, capturing stdout\n * to a file. On Windows, wraps the invocation in `powershell.exe -EncodedCommand` (UTF-16LE\n * base64) to avoid spawning `.cmd` shims directly and to eliminate shell-injection surface area.\n * Enables corepack strict mode by default but allows process.env overrides.\n *\n * Special handling for `npm list` exit code 1, which is expected in certain scenarios.\n *\n * @param command - The command to execute\n * @param args - Array of command-line arguments\n * @param cwd - The working directory to execute the command in\n * @param tempOutputFile - The path to the temporary file where stdout will be written\n * @returns Promise that resolves when the command completes successfully or rejects if it fails\n * @throws {Error} If the child process spawn fails or exits with a non-zero code\n */\n protected async streamCollectorCommandToFile(command: string, args: string[], cwd: string, tempOutputFile: string) {\n // Derive execName from the original command so the npm-list shouldIgnore check below keys off the\n // real invocation (e.g. \"npm\"), not the \"powershell\" wrapper we spawn on Windows.\n const execName = path.basename(command, path.extname(command))\n\n // On Windows the package-manager command is typically a `.cmd` shim (npm.cmd/pnpm.cmd/yarn.cmd),\n // which Node can no longer spawn directly (CVE-2024-27980). Rather than spawn with `shell: true` —\n // which emits the DEP0190 \"args with shell\" deprecation warning and forces manual metacharacter\n // escaping — wrap the invocation in a single PowerShell `-EncodedCommand`. The base64 (UTF-16LE)\n // payload sidesteps every shell-quoting layer, and `powershell.exe` is a real executable we spawn\n // directly with no shell. See buildPowerShellEncodedArgs for the UTF-8 / exit-code handling.\n const [spawnCommand, spawnArgs] = process.platform === \"win32\" ? ([\"powershell.exe\", buildPowerShellEncodedArgs(command, args)] as const) : ([command, args] as const)\n\n await new Promise<void>((resolve, reject) => {\n const outStream = createWriteStream(tempOutputFile)\n\n const child = childProcess.spawn(spawnCommand, spawnArgs, {\n cwd,\n // Package manager invocations do not need signing/publishing credentials.\n env: { ...stripSensitiveEnvVars(process.env), COREPACK_ENABLE_STRICT: \"0\" },\n })\n\n let stderr = \"\"\n // The process can close before all piped stdout has been flushed to disk. Resolving on the\n // child's \"close\" alone races the write stream and lets the caller read a TRUNCATED file\n // (manifesting as \"No JSON content found in output\"). Gate the settle on BOTH the child exit\n // (for the code/stderr) and the write stream's \"finish\" (all bytes flushed).\n let exitCode: number | null = null\n let childClosed = false\n let streamFinished = false\n let settled = false\n\n // `pipe` ends `outStream` when stdout EOFs, which triggers its \"finish\" once flushed.\n child.stdout.pipe(outStream)\n child.stderr.on(\"data\", chunk => {\n stderr += chunk.toString()\n })\n\n const fail = (err: Error) => {\n if (settled) {\n return\n }\n settled = true\n // Best-effort cleanup: stop the child and close the stream so we don't\n // waste CPU writing to a broken fd after rejection.\n try {\n child.kill()\n } catch {\n // ignore\n }\n try {\n outStream.destroy()\n } catch {\n // ignore\n }\n reject(err)\n }\n\n const settle = () => {\n if (settled || !childClosed || !streamFinished) {\n return\n }\n const code = exitCode\n // https://github.com/npm/npm/issues/17624\n const shouldIgnore = code === 1 && \"npm\" === execName.toLowerCase() && args.includes(\"list\")\n if (shouldIgnore) {\n log.debug(null, \"`npm list` returned non-zero exit code, but it MIGHT be expected (https://github.com/npm/npm/issues/17624). Check stderr for details.\")\n }\n if (stderr.length > 0) {\n log.debug({ stderr }, \"note: there was node module collector output on stderr\")\n // Only surface stderr as a user-visible warning when the exit code itself is unexpected.\n // When shouldIgnore is true (npm list exit code 1) the stderr is an anticipated side\n // effect of package-manager features like yarn resolutions or npm overrides that cause\n // npm to report ELSPROBLEMS for aliased packages it considers \"invalid\".\n if (!shouldIgnore) {\n this.cache.logSummary[LogMessageByKey.PKG_COLLECTOR_OUTPUT].push(stderr)\n }\n }\n settled = true\n const shouldResolve = code === 0 || shouldIgnore\n return shouldResolve ? resolve() : reject(new Error(`Node module collector process exited with code ${code}:\\n${stderr}`))\n }\n\n outStream.on(\"error\", err => fail(new Error(`Node module collector failed writing output (${command}): ${err.message}`)))\n outStream.on(\"finish\", () => {\n streamFinished = true\n settle()\n })\n child.on(\"error\", err => {\n fail(new Error(`Node module collector spawn (${command} ${JSON.stringify(args)}) failed: ${err.message}`))\n })\n child.on(\"close\", code => {\n exitCode = code\n childClosed = true\n settle()\n })\n })\n }\n}\n\n/**\n * Build the argv for invoking a Windows command through `powershell.exe -EncodedCommand`.\n *\n * Each token is wrapped in a PowerShell single-quoted string (with embedded single quotes doubled),\n * so no character is interpreted by a shell. The script:\n * - pins `[Console]::OutputEncoding` to UTF-8 *without* a BOM so the JSON dependency tree is not\n * corrupted by the console's OEM code page (and no BOM is prepended to break `JSON.parse`),\n * - invokes the command via the call operator `&`,\n * - re-emits the command's own exit code via `exit $LASTEXITCODE` (e.g. `npm list` returns 1 in\n * expected scenarios, which the caller's shouldIgnore logic relies on).\n *\n * The whole script is base64-encoded as UTF-16LE per PowerShell's `-EncodedCommand` contract.\n */\nexport function buildPowerShellEncodedArgs(command: string, args: string[]): string[] {\n const psQuote = (value: string) => `'${value.replace(/'/g, \"''\")}'`\n const invocation = [\"&\", psQuote(command), ...args.map(psQuote)].join(\" \")\n const script = `[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new($false); ${invocation}; exit $LASTEXITCODE`\n const encoded = Buffer.from(script, \"utf16le\").toString(\"base64\")\n return [\"-NoProfile\", \"-NonInteractive\", \"-EncodedCommand\", encoded]\n}\n"]}
1
+ {"version":3,"file":"nodeModulesCollector.js","sourceRoot":"","sources":["../../src/node-module-collector/nodeModulesCollector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,qBAAqB,EAAU,MAAM,cAAc,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E,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,kDAAkD,IAAI,MAAM,MAAM,EAAE,CAAC,CAAA;QACvF,CAAC;IACH,CAAC;CACF","sourcesContent":["import { exists, log, retry, stripSensitiveEnvVars, TmpDir } from \"builder-util\"\nimport _fsExtra from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { hoist, type HoisterResult, type HoisterTree } from \"./hoist.js\"\nimport { LogMessageByKey, ModuleManager } from \"./moduleManager.js\"\nimport { getPackageManagerCommand, PM } from \"./packageManager.js\"\nimport { streamSpawnToFile } from \"../util/streamSpawnToFile.js\"\nimport type { Dependency, DependencyGraph, NodeModuleInfo, PackageJson } from \"./types.js\"\nimport { isPackageCompatible } from \"../util/archCompatibility.js\"\n\n/** Target arch/platform used to drop `cpu`/`os`-incompatible packages while collecting. */\nexport interface ArchFilter {\n cpu: string | null\n os: string\n}\n\nexport abstract class NodeModulesCollector<ProdDepType extends Dependency<ProdDepType, OptionalDepType>, OptionalDepType> {\n private readonly nodeModules: NodeModuleInfo[] = []\n protected readonly allDependencies: Map<string, ProdDepType> = new Map()\n protected readonly productionGraph: DependencyGraph = {}\n protected readonly cache: ModuleManager = new ModuleManager()\n\n protected isHoisted = new Lazy<boolean>(async () => {\n const { manager } = this.installOptions\n const command = getPackageManagerCommand(manager)\n const config = (await this.asyncExec(command, [\"config\", \"list\"])).stdout\n if (config == null) {\n log.debug({ manager }, \"unable to determine node-linker setting; assuming non-hoisted (virtual store) layout\")\n return false\n }\n const lines = Object.fromEntries(config.split(\"\\n\").map(line => line.split(\"=\").map(s => s.trim())))\n if (lines[\"node-linker\"] === \"hoisted\") {\n log.debug({ manager }, \"node_modules are hoisted\")\n return true\n }\n return false\n })\n\n constructor(\n protected readonly rootDir: string,\n private readonly tempDirManager: TmpDir\n ) {}\n\n /**\n * Retrieves and collects all Node.js modules for a given package.\n *\n * This method orchestrates the entire module collection process by:\n * 1. Fetching the dependency tree from the package manager\n * 2. Collecting all dependencies recursively\n * 3. Extracting workspace references if applicable\n * 4. Building a production dependency graph\n * 5. Hoisting the dependencies to their final locations\n * 6. Resolving and returning module information\n */\n public async getNodeModules({ packageName, archFilter }: { packageName: string; archFilter?: ArchFilter }): Promise<{\n nodeModules: NodeModuleInfo[]\n logSummary: ModuleManager[\"logSummary\"]\n }> {\n const tree: ProdDepType = await this.getDependenciesTree(this.installOptions.manager)\n\n await this.collectAllDependencies(tree, packageName)\n const realTree: ProdDepType = this.getTreeFromWorkspaces(tree, packageName)\n await this.extractProductionDependencyGraph(realTree, packageName)\n\n const hoisterResult: HoisterResult = hoist(this.transformToHoisterTree(this.productionGraph, packageName), {\n check: log.isDebugEnabled,\n })\n\n await this._getNodeModules(hoisterResult.dependencies, this.nodeModules, archFilter)\n\n log.debug({ packageName, depCount: this.nodeModules.length }, \"node modules collection complete\")\n\n return { nodeModules: this.nodeModules, logSummary: this.cache.logSummary }\n }\n\n public abstract readonly installOptions: {\n manager: PM\n lockfile: string\n }\n\n protected abstract getArgs(): string[]\n protected abstract extractProductionDependencyGraph(tree: Dependency<ProdDepType, OptionalDepType>, dependencyId: string): Promise<void>\n protected abstract collectAllDependencies(tree: Dependency<ProdDepType, OptionalDepType>, appPackageName: string): Promise<void>\n\n /**\n * Retrieves the dependency tree from the package manager.\n *\n * Executes the appropriate package manager command to fetch the dependency tree and writes\n * the output to a temporary file. Includes retry logic to handle transient failures such as\n * incomplete JSON output or missing files. Will retry up to 1 time with exponential backoff.\n */\n protected async getDependenciesTree(pm: PM): Promise<ProdDepType> {\n const command = getPackageManagerCommand(pm)\n const args = this.getArgs()\n\n const tempOutputFile = await this.tempDirManager.getTempFile({\n prefix: path.basename(command, path.extname(command)),\n suffix: \"output.json\",\n })\n\n return retry(\n async () => {\n await this.streamCollectorCommandToFile(command, args, this.rootDir, tempOutputFile)\n const shellOutput = await _fsExtra.readFile(tempOutputFile, { encoding: \"utf8\" })\n const result = await Promise.resolve(this.parseDependenciesTree(shellOutput))\n return result\n },\n {\n retries: 1,\n interval: 2000,\n backoff: 2000,\n shouldRetry: async (error: any) => {\n const fields: Record<string, string> = { error: error.message, tempOutputFile, cwd: this.rootDir, packageManager: pm }\n\n if (!(await exists(tempOutputFile))) {\n log.debug(fields, \"dependency tree output file missing, retrying\")\n return true\n }\n\n const fileContent = await _fsExtra.readFile(tempOutputFile, { encoding: \"utf8\" })\n fields.fileContentLength = fileContent.length.toString()\n\n if (fileContent.trim().length === 0) {\n log.debug(fields, \"dependency tree output file empty, retrying\")\n return true\n }\n\n // extract small start/end sample for debugging purposes (e.g. polluted console output)\n const lines = fileContent.split(\"\\n\")\n const lineSampleSize = Math.min(5, lines.length / 2)\n if (2 * lineSampleSize > 5) {\n fields.sampleStart = lines.slice(0, lineSampleSize).join(\"\\n\")\n fields.sampleEnd = lines.slice(-lineSampleSize).join(\"\\n\")\n } else {\n fields.content = fileContent\n }\n\n // Both indicate truncated/polluted PM output (a transient that re-running the command clears).\n if (error.message?.includes(\"Unexpected end of JSON input\") || error.message?.includes(\"No JSON content found in output\")) {\n log.debug(fields, \"JSON parse error in dependency tree, retrying\")\n return true\n }\n\n log.error(fields, \"error parsing dependencies tree\")\n return false\n },\n }\n )\n }\n\n /**\n * Parses the dependencies tree from shell command output.\n *\n **/\n protected parseDependenciesTree(shellOutput: string): ProdDepType | Promise<ProdDepType> {\n return this.extractJsonFromPollutedOutput<ProdDepType>(shellOutput)\n }\n\n protected extractJsonFromPollutedOutput<T>(shellOutput: string): T {\n const consoleOutput = shellOutput.trim()\n try {\n // Please for the love of all that is holy, this should cover 99% of cases where npm/pnpm/yarn output is clean JSON\n return JSON.parse(consoleOutput)\n } catch {\n // ignore\n }\n\n // DEDICATED FALLBACK FOR POLLUTED OUTPUT, non-trivial to implement correctly, not needed in most cases, and highly inefficient\n\n // Find the first index that starts with { or [\n const bracketOpen = Math.max(consoleOutput.indexOf(\"{\"), 0)\n const bracketOpenSquare = Math.max(consoleOutput.indexOf(\"[\"), 0)\n const start = Math.min(bracketOpen, bracketOpenSquare) // always non-negative due to Math.max above\n\n for (let i = start; i < consoleOutput.length; i++) {\n const slice = consoleOutput.slice(start, i + 1)\n try {\n return JSON.parse(slice)\n } catch {\n // ignore, try next\n }\n }\n throw new Error(\"No JSON content found in output\")\n }\n\n protected cacheKey(pkg: Pick<ProdDepType, \"name\" | \"version\" | \"path\">): string {\n const rel = path.relative(this.rootDir, pkg.path)\n return `${pkg.name}::${pkg.version}::${rel ?? \".\"}`\n }\n\n // We use the key (alias name) instead of value.name for npm aliased packages\n // e.g., { \"foo\": { name: \"@scope/bar\", ... } } should be stored as \"foo@version\"\n protected normalizePackageVersion(key: string, pkg: ProdDepType) {\n return { id: `${key}@${pkg.version}`, pkgOverride: { ...pkg, name: key } }\n }\n\n /**\n * Determines if a given dependency is a production dependency of a package.\n *\n * Checks both the dependencies and optionalDependencies of a package to see if\n * the specified dependency name is listed.\n *\n * @param depName - The name of the dependency to check\n * @param pkg - The package to search for the dependency in\n * @returns True if the dependency is found in either dependencies or optionalDependencies, false otherwise\n */\n protected isProdDependency(depName: string, pkg: ProdDepType): boolean {\n const prodDeps = { ...pkg.dependencies, ...pkg.optionalDependencies }\n return prodDeps[depName] != null\n }\n\n protected async locatePackageWithVersion(depTree: Pick<ProdDepType, \"name\" | \"version\" | \"path\">): Promise<{ packageDir: string; packageJson: PackageJson } | null> {\n const result = await this.cache.locatePackageVersion({\n parentDir: depTree.path,\n pkgName: depTree.name,\n requiredRange: depTree.version,\n })\n return result\n }\n /**\n * Parses a dependency identifier string into name and version components.\n *\n * Handles both scoped packages (e.g., \"@scope/pkg@1.2.3\") and regular packages (e.g., \"pkg@1.2.3\").\n * If the identifier is malformed or cannot be parsed, defaults to treating the entire string as\n * the package name with an \"unknown\" version.\n */\n protected parseNameVersion(identifier: string): { name: string; version: string } {\n let at: number\n if (identifier.startsWith(\"@\")) {\n // Scoped package: find the version separator after the scope (e.g. \"@scope/pkg@1.2.3\")\n const slashIndex = identifier.indexOf(\"/\")\n if (slashIndex === -1) {\n return { name: identifier, version: \"unknown\" }\n }\n at = identifier.indexOf(\"@\", slashIndex + 1)\n } else {\n at = identifier.indexOf(\"@\")\n }\n if (at <= 0) {\n return { name: identifier, version: \"unknown\" }\n }\n return { name: identifier.slice(0, at), version: identifier.slice(at + 1) }\n }\n\n /**\n * Retrieves the dependency tree and handles workspace package self-references.\n *\n * If the project is a workspace project, this method removes the root package's self-reference\n * from the dependency tree to avoid circular dependencies. It promotes the root package's\n * direct dependencies to the top level of the tree.\n *\n * @param tree - The original dependency tree\n * @param packageName - The name of the package to check for and remove from the tree\n * @returns The extracted dependency subtree\n */\n protected getTreeFromWorkspaces(tree: ProdDepType, packageName: string): ProdDepType {\n if (tree.workspaces && tree.dependencies) {\n for (const [key, value] of Object.entries(tree.dependencies)) {\n if (key === packageName) {\n return value\n }\n }\n }\n\n return tree\n }\n\n private transformToHoisterTree(obj: DependencyGraph, key: string, nodes: Map<string, HoisterTree> = new Map()): HoisterTree {\n let node = nodes.get(key)\n const { name, version } = this.parseNameVersion(key)\n\n if (!node) {\n node = {\n name,\n identName: name,\n reference: version,\n dependencies: new Set<HoisterTree>(),\n peerNames: new Set<string>(),\n }\n\n nodes.set(key, node)\n\n const deps = (obj[key] || {}).dependencies || []\n for (const dep of deps) {\n const child = this.transformToHoisterTree(obj, dep, nodes)\n node.dependencies.add(child)\n }\n }\n\n return node\n }\n\n private async _getNodeModules(dependencies: Set<HoisterResult>, result: NodeModuleInfo[], archFilter?: ArchFilter) {\n if (dependencies.size === 0) {\n return\n }\n\n for (const d of dependencies.values()) {\n const reference = [...d.references][0]\n const key = `${d.name}@${reference}`\n // Normalize the path to handle mixed separators from pnpm JSON output on Windows\n const rawPath = this.allDependencies.get(key)?.path\n const p = rawPath != null ? path.normalize(rawPath) : undefined\n if (p === undefined) {\n this.cache.logSummary[LogMessageByKey.PKG_NOT_FOUND].push(key)\n continue\n }\n\n // fix npm list issue\n // https://github.com/npm/cli/issues/8535\n if (!(await this.cache.exists[p])) {\n this.logMissingDependency(key)\n continue\n }\n\n const dir = await this.cache.realPath[p]\n\n // Drop packages whose declared `cpu`/`os` is incompatible with the target arch/platform (and their\n // subtree). npm/pnpm install only the host's platform-specific optional packages, so without this an\n // arm64-only binary (e.g. `@esbuild/darwin-arm64`) would be bundled into the x64 build too — and into\n // both slices of a universal build, which `@electron/universal` then refuses to merge. Reuses the\n // memoized `package.json` cache populated during collection.\n if (archFilter != null) {\n const pkgJson = await this.cache.json[path.join(dir, \"package.json\")]\n if (pkgJson != null && !isPackageCompatible(pkgJson, archFilter.cpu, archFilter.os)) {\n this.cache.logSummary[LogMessageByKey.PKG_INCOMPATIBLE_PLATFORM].push(key)\n continue\n }\n }\n\n const node: NodeModuleInfo = {\n name: d.name,\n version: reference,\n dir,\n }\n result.push(node)\n if (d.dependencies.size > 0) {\n node.dependencies = []\n await this._getNodeModules(d.dependencies, node.dependencies, archFilter)\n }\n }\n result.sort((a, b) => a.name.localeCompare(b.name))\n }\n\n protected logMissingDependency(pkgName: string) {\n const PLATFORM_PACKAGE_RE = /(linux|win32|darwin|freebsd|android)[-_](x64|arm64|ia32|arm|ppc64|s390x|loong64|riscv64|universal)/\n const diskLogKey = PLATFORM_PACKAGE_RE.test(pkgName) ? LogMessageByKey.PKG_OPTIONAL_PLATFORM_NOT_INSTALLED : LogMessageByKey.PKG_NOT_ON_DISK\n this.cache.logSummary[diskLogKey].push(pkgName)\n }\n\n protected async asyncExec(command: string, args: string[], cwd: string = this.rootDir): Promise<{ stdout: string | undefined; stderr: string | undefined }> {\n const file = await this.tempDirManager.getTempFile({ prefix: \"exec-\", suffix: \".txt\" })\n try {\n await this.streamCollectorCommandToFile(command, args, cwd, file)\n const result = await _fsExtra.readFile(file, { encoding: \"utf8\" })\n return { stdout: result?.trim(), stderr: undefined }\n } catch (error: any) {\n log.debug({ error: error.message }, \"failed to execute command\")\n return { stdout: undefined, stderr: error.message }\n }\n }\n\n /**\n * Executes a package-manager command and streams its stdout to a file.\n *\n * Delegates the spawn/stream/flush mechanics (including the Windows `powershell.exe -EncodedCommand`\n * wrapping) to {@link streamSpawnToFile}, and layers on the collector-specific interpretation of the\n * result: corepack is silenced for these invocations, `npm list` exit code 1 is tolerated, and any\n * stderr is surfaced as a collector warning only when the exit code is genuinely unexpected.\n *\n * @param command - The command to execute\n * @param args - Array of command-line arguments\n * @param cwd - The working directory to execute the command in\n * @param tempOutputFile - The path to the temporary file where stdout will be written\n * @returns Promise that resolves when the command completes successfully or rejects if it fails\n * @throws {Error} If the child process spawn fails or exits with a non-zero, unexpected code\n */\n protected async streamCollectorCommandToFile(command: string, args: string[], cwd: string, tempOutputFile: string) {\n // Derive execName from the original command so the npm-list shouldIgnore check below keys off the\n // real invocation (e.g. \"npm\"), not the \"powershell\" wrapper streamSpawnToFile uses on Windows.\n const execName = path.basename(command, path.extname(command))\n\n const { code, stderr } = await streamSpawnToFile(command, args, cwd, tempOutputFile, {\n // Package manager invocations do not need signing/publishing credentials. Silence corepack:\n // strict=0 so a project's `packageManager` pin can't abort our read-only queries, and the\n // download prompt/notice off so corepack doesn't flood stdout/stderr with activation chatter.\n ...stripSensitiveEnvVars(process.env),\n COREPACK_ENABLE_STRICT: \"0\",\n COREPACK_ENABLE_DOWNLOAD_PROMPT: \"0\",\n })\n\n // https://github.com/npm/npm/issues/17624\n const shouldIgnore = code === 1 && \"npm\" === execName.toLowerCase() && args.includes(\"list\")\n if (shouldIgnore) {\n log.debug(null, \"`npm list` returned non-zero exit code, but it MIGHT be expected (https://github.com/npm/npm/issues/17624). Check stderr for details.\")\n }\n if (stderr.length > 0) {\n log.debug({ stderr }, \"note: there was node module collector output on stderr\")\n // Only surface stderr as a user-visible warning when the exit code itself is unexpected.\n // When shouldIgnore is true (npm list exit code 1) the stderr is an anticipated side\n // effect of package-manager features like yarn resolutions or npm overrides that cause\n // npm to report ELSPROBLEMS for aliased packages it considers \"invalid\".\n if (!shouldIgnore) {\n this.cache.logSummary[LogMessageByKey.PKG_COLLECTOR_OUTPUT].push(stderr)\n }\n }\n if (code !== 0 && !shouldIgnore) {\n throw new Error(`Node module collector process exited with code ${code}:\\n${stderr}`)\n }\n }\n}\n"]}
@@ -8,6 +8,8 @@ export type PackageJson = {
8
8
  workspaces?: string[] | {
9
9
  packages: string[];
10
10
  };
11
+ os?: string | string[];
12
+ cpu?: string | string[];
11
13
  };
12
14
  export interface NodeModuleInfo {
13
15
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/node-module-collector/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7C,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAC/C,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;CACrC;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG;QAAE,QAAQ,EAAE,MAAM,EAA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AAC,EAAE,MAAM,CAAA;IAE1B,QAAQ,CAAC,aAAa,CAAC,EAAE;QACvB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;KAC9B,CAAA;CACF;AAGD,MAAM,WAAW,mBAAoB,SAAQ,UAAU,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CAAG;AAEpG,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,oBAAoB,CAAA;AAExE,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,IAAI;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE;QACtB,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,CAAA;KACzB,CAAA;IACD,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QAC9B,CAAC,WAAW,EAAE,MAAM,GAAG,CAAC,CAAA;KACzB,CAAA;CACF,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,qBAAqB,EAAE,MAAM,GAAG;QAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAA;KAChC,CAAA;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/node-module-collector/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PackageJson = {\n name: string\n version: string\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n peerDependencies?: Record<string, string>\n optionalDependencies?: Record<string, string>\n workspaces?: string[] | { packages: string[] }\n}\n\nexport interface NodeModuleInfo {\n name: string\n version: string\n dir: string\n dependencies?: Array<NodeModuleInfo>\n}\n\nexport type ParsedDependencyTree = {\n readonly name: string\n readonly version: string\n readonly path: string\n readonly workspaces?: string[] | { packages: string[] } // we only use this at root level\n}\n\n// Note: `PnpmDependency` and `NpmDependency` include the output of `JSON.parse(...)` of `pnpm list` and `npm list` respectively\n// This object has a TON of info - a majority, if not all, of each dependency's package.json\n// We extract only what we need when constructing DependencyTree in `extractProductionDependencyTree`\nexport interface PnpmDependency extends Dependency<PnpmDependency, PnpmDependency> {\n readonly from: string\n readonly resolved: string\n // Present in pnpm 10.29.3+ `pnpm list --json` output for deduped references.\n // Context: https://github.com/pnpm/pnpm/issues/10601\n readonly dedupedDependenciesCount?: number\n}\n\nexport interface NpmDependency extends Dependency<NpmDependency, string> {\n readonly resolved?: string\n // implicit dependencies, returned only through `npm list`\n readonly _dependencies?: {\n [packageName: string]: string\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TraversedDependency extends Dependency<TraversedDependency, TraversedDependency> {}\n\nexport type Dependency<T, V> = Dependencies<T, V> & ParsedDependencyTree\n\nexport type Dependencies<T, V> = {\n readonly dependencies?: {\n [packageName: string]: T\n }\n readonly optionalDependencies?: {\n [packageName: string]: V\n }\n}\n\nexport interface DependencyGraph {\n [packageNameAndVersion: string]: {\n readonly dependencies: string[]\n }\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/node-module-collector/types.ts"],"names":[],"mappings":"","sourcesContent":["export type PackageJson = {\n name: string\n version: string\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n peerDependencies?: Record<string, string>\n optionalDependencies?: Record<string, string>\n workspaces?: string[] | { packages: string[] }\n // npm platform constraints (e.g. `@esbuild/darwin-arm64` declares `cpu: [\"arm64\"], os: [\"darwin\"]`)\n os?: string | string[]\n cpu?: string | string[]\n}\n\nexport interface NodeModuleInfo {\n name: string\n version: string\n dir: string\n dependencies?: Array<NodeModuleInfo>\n}\n\nexport type ParsedDependencyTree = {\n readonly name: string\n readonly version: string\n readonly path: string\n readonly workspaces?: string[] | { packages: string[] } // we only use this at root level\n}\n\n// Note: `PnpmDependency` and `NpmDependency` include the output of `JSON.parse(...)` of `pnpm list` and `npm list` respectively\n// This object has a TON of info - a majority, if not all, of each dependency's package.json\n// We extract only what we need when constructing DependencyTree in `extractProductionDependencyTree`\nexport interface PnpmDependency extends Dependency<PnpmDependency, PnpmDependency> {\n readonly from: string\n readonly resolved: string\n // Present in pnpm 10.29.3+ `pnpm list --json` output for deduped references.\n // Context: https://github.com/pnpm/pnpm/issues/10601\n readonly dedupedDependenciesCount?: number\n}\n\nexport interface NpmDependency extends Dependency<NpmDependency, string> {\n readonly resolved?: string\n // implicit dependencies, returned only through `npm list`\n readonly _dependencies?: {\n [packageName: string]: string\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TraversedDependency extends Dependency<TraversedDependency, TraversedDependency> {}\n\nexport type Dependency<T, V> = Dependencies<T, V> & ParsedDependencyTree\n\nexport type Dependencies<T, V> = {\n readonly dependencies?: {\n [packageName: string]: T\n }\n readonly optionalDependencies?: {\n [packageName: string]: V\n }\n}\n\nexport interface DependencyGraph {\n [packageNameAndVersion: string]: {\n readonly dependencies: string[]\n }\n}\n"]}
@@ -50,16 +50,6 @@ export interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecific
50
50
  * By default will be generated automatically based on the macOS icns file.
51
51
  */
52
52
  readonly icon?: string;
53
- /**
54
- * When `true`, the installed `.desktop` filename is derived from `desktopName` in `package.json`
55
- * (minus the `.desktop` suffix) so that it matches `StartupWMClass` and Electron's `app_id`.
56
- * Falls back to `executableName` when `desktopName` is absent.
57
- *
58
- * @default false
59
- * @see https://github.com/electron-userland/electron-builder/issues/9103
60
- * @remarks In v27 the default will change to `true`.
61
- */
62
- readonly syncDesktopName?: boolean;
63
53
  }
64
54
  /**
65
55
  * Desktop-entry and runtime fields shared by all Linux targets and all snap core strategies.
@@ -1 +1 @@
1
- {"version":3,"file":"linuxOptions.d.ts","sourceRoot":"","sources":["../../src/options/linuxOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAA;AAEhF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;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;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;CACrD;AAED,MAAM,WAAW,cAAe,SAAQ,kBAAkB,EAAE,qBAAqB;IAC/E;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IAEzB;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;IAErB;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IAEtB;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IAExB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE,CAAA;IAEnC;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;IAEnC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;IAEtC;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CACnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"linuxOptions.js","sourceRoot":"","sources":["../../src/options/linuxOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetConfigType, TargetSpecificOptions } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\n\n/**\n * Example Spec: https://specifications.freedesktop.org/desktop-entry-spec/latest/example.html\n */\nexport interface LinuxDesktopFile {\n /**\n * `[Desktop Entry]` metadata entries (name to value). Overwrites default values calculated by electron-builder\n */\n entry?: {\n [k: string]: string\n } | null\n /**\n * `[Desktop Actions <ActionName>]` metadata entries (name to value).\n *\n * Config Example:\n * ```js\n * desktopActions: {\n * NewWindow: {\n * Name: 'New Window',\n * Exec: 'app --new-window',\n * }\n * }\n * ```\n */\n desktopActions?: {\n [ActionName: string]: any\n } | null\n}\n\nexport interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecificBuildOptions {\n /**\n * Target package type: list of `AppImage`, `flatpak`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n *\n * electron-builder [docker image](https://www.electron.build/multi-platform-build#docker) can be used to build Linux targets on any platform.\n *\n * Please [do not put an AppImage into another archive](https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages#common-mistake) like a .zip or .tar.gz.\n * @default AppImage\n */\n readonly target?: TargetConfigType\n\n /**\n * The maintainer. Defaults to [author](https://www.electron.build/configuration#author).\n */\n readonly maintainer?: string | null\n\n /**\n * The vendor. Defaults to [author](https://www.electron.build/configuration#author).\n */\n readonly vendor?: string | null\n\n /**\n * The path to icon set directory or one png file, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.\n * By default will be generated automatically based on the macOS icns file.\n */\n readonly icon?: string\n\n /**\n * @private\n * @internal Allows specifying an FPM-only package category for all FPM targets in one place.\n * For user-facing category configuration use the target-specific options (e.g. {@link DebOptions}).\n */\n readonly packageCategory?: string | null\n\n /**\n * When `true`, the installed `.desktop` filename is derived from `desktopName` in `package.json`\n * (minus the `.desktop` suffix) so that it matches `StartupWMClass` and Electron's `app_id`.\n * Falls back to `executableName` when `desktopName` is absent.\n *\n * @default false\n * @see https://github.com/electron-userland/electron-builder/issues/9103\n * @remarks In v27 the default will change to `true`.\n */\n readonly syncDesktopName?: boolean\n}\n\n/**\n * Desktop-entry and runtime fields shared by all Linux targets and all snap core strategies.\n *\n * Fields set under `linux.*` in your build config (i.e. on {@link LinuxConfiguration}) are\n * automatically cascaded into each snap core's options by `LinuxTargetHelper.getSnapCore()`.\n * You do not need to duplicate them under `snapcraft.core24.*`, `snapcraft.core22.*`, etc.\n * Per-core values always take precedence when both are set.\n */\nexport interface CommonLinuxOptions {\n /**\n * The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).\n */\n readonly synopsis?: string | null\n\n /**\n * As [description](https://www.electron.build/configuration#description) from application package.json, but allows you to specify different for Linux.\n */\n readonly description?: string | null\n\n /**\n * The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).\n */\n readonly category?: string | null\n\n /**\n * The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing.\n */\n readonly mimeTypes?: Array<string> | null\n\n /**\n * The [Desktop file](https://developer.gnome.org/documentation/guidelines/maintainer/integrating.html#desktop-files)\n */\n readonly desktop?: LinuxDesktopFile | null\n\n /**\n * The executable parameters. Pass to executableName\n */\n readonly executableArgs?: Array<string> | null\n}\n\n// fpm-only specific options\nexport interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Package dependencies.\n * `rpm` defaults to `[\"gtk3\", \"libnotify\", \"nss\", \"libXScrnSaver\", \"(libXtst or libXtst6)\", \"xdg-utils\", \"at-spi2-core\", \"(libuuid or libuuid1)\"]`\n * `pacman` defaults to `[\"c-ares\", \"ffmpeg\", \"gtk3\", \"http-parser\", \"libevent\", \"libvpx\", \"libxslt\", \"libxss\", \"minizip\", \"nss\", \"re2\", \"snappy\", \"libnotify\", \"libappindicator-gtk3\"]`\n */\n readonly depends?: Array<string> | null\n\n /**\n * The compression type passed to fpm. For `deb`, `rpm`, and `pacman` targets prefer the\n * typed per-format interfaces (`DebOptions`, `RpmOptions`, `PacmanOptions`) which narrow\n * this to only the values that fpm actually accepts for that format.\n * @default xz\n */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"xzmt\" | \"gzip\" | \"zst\" | \"zstd\" | null\n\n readonly icon?: string\n\n /**\n * The package category.\n */\n readonly packageCategory?: string | null\n\n /**\n * The name of the package.\n */\n readonly packageName?: string | null\n\n readonly vendor?: string | null\n readonly maintainer?: string | null\n\n /**\n * File path to script to be passed to FPM for `--after-install` arg.\n */\n readonly afterInstall?: string | null\n /**\n * File path to script to be passed to FPM for `--after-remove` arg.\n */\n readonly afterRemove?: string | null\n /**\n * File path to custom AppArmor profile (Ubuntu 24+)\n */\n readonly appArmorProfile?: string | null\n\n /**\n * *Advanced only* The [fpm](https://fpm.readthedocs.io/en/latest/cli-reference.html) options.\n *\n * Example: `[\"--before-install=build/deb-preinstall.sh\", \"--after-upgrade=build/deb-postinstall.sh\"]`\n */\n readonly fpm?: Array<string> | null\n}\nexport interface DebOptions extends LinuxTargetSpecificOptions {\n /**\n * Package dependencies.\n * If need to support Debian, `libappindicator1` should be removed, it is [deprecated in Debian](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037).\n * If need to support KDE, `gconf2` and `gconf-service` should be removed as it's no longer used [by GNOME](https://packages.debian.org/bullseye/gconf2).\n * @default [\"libgtk-3-0\", \"libnotify4\", \"libnss3\", \"libxss1\", \"libxtst6\", \"xdg-utils\", \"libatspi2.0-0\", \"libuuid1\", \"libsecret-1-0\"]\n */\n readonly depends?: Array<string> | null\n\n /**\n * The [recommended package dependencies](https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps).\n * @default [\"libappindicator3-1\"]\n */\n readonly recommends?: Array<string> | null\n\n /**\n * The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).\n */\n readonly packageCategory?: string | null\n\n /**\n * The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.\n */\n readonly priority?: string | null\n\n /** @default xz */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"zst\" | null\n}\n\nexport interface RpmOptions extends LinuxTargetSpecificOptions {\n /**\n * Passed to fpm via `--rpm-compression`. `\"xzmt\"` uses multi-threaded xz (fpm's RPM default).\n * `\"xz\"` is automatically promoted to `\"xzmt\"`. `\"gzip\"` and `\"bzip2\"` pass through as-is.\n * @default xzmt\n */\n readonly compression?: \"xz\" | \"xzmt\" | \"gzip\" | \"bzip2\" | null\n}\n\nexport interface PacmanOptions extends LinuxTargetSpecificOptions {\n /** @default xz */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"zstd\" | null\n}\n\nexport interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n /**\n * The compression algorithm passed to the AppImage build tool.\n *\n * **FUSE2 toolset (`\"0.0.0\"` or unset):** only `\"xz\"` and `\"gzip\"` are forwarded\n * to mksquashfs (`-comp <value>`); `\"xz\"` additionally passes `-Xdict-size 100% -b 1048576`.\n * `\"zstd\"`, `null`, and unset fall through to the root-level `compression` option:\n * - `\"maximum\"` → `\"xz\"`\n * - anything else → flag omitted (mksquashfs defaults to gzip)\n *\n * **Static-runtime toolsets (`>= 1.0.0`):** `\"gzip\"` and `\"zstd\"` are forwarded\n * directly. `\"xz\"` is mapped to `\"zstd\"` (nearest supported equivalent). `null`\n * or unset falls through to the root-level `compression` option:\n * - `\"store\"` → `\"gzip\"`\n * - `\"normal\"` / `\"maximum\"` / unset → `\"zstd\"`\n */\n readonly compression?: \"gzip\" | \"xz\" | \"zstd\" | null\n}\n\nexport interface FlatpakOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n\n /**\n * The name of the runtime that the application uses. Defaults to `org.freedesktop.Platform`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtime?: string\n\n /**\n * The version of the runtime that the application uses. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtimeVersion?: string\n\n /**\n * The name of the development runtime that the application builds with. Defaults to `org.freedesktop.Sdk`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly sdk?: string\n\n /**\n * Start with the files from the specified application. This can be used to create applications that extend another application.\n * Defaults to [org.electronjs.Electron2.BaseApp](https://github.com/flathub/org.electronjs.Electron2.BaseApp).\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly base?: string\n\n /**\n * Use this specific version of the application specified in base. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly baseVersion?: string\n\n /**\n * The branch to use when exporting the application. Defaults to `master`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly branch?: string\n\n /**\n * An array of arguments passed to the flatpak build-finish command. Defaults to:\n * ```json\n * [\n * // Wayland/X11 Rendering\n * \"--socket=wayland\",\n * \"--socket=x11\",\n * \"--share=ipc\",\n * // Open GL\n * \"--device=dri\",\n * // Audio output\n * \"--socket=pulseaudio\",\n * // Read/write home directory access\n * \"--filesystem=home\",\n * // Allow communication with network\n * \"--share=network\",\n * // System notifications with libnotify\n * \"--talk-name=org.freedesktop.Notifications\",\n * ]\n * ```\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly finishArgs?: string[]\n\n /**\n * An array of objects specifying the modules to be built in order.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly modules?: (string | any)[]\n\n /**\n * Files to copy directly into the app. Should be a list of [source, dest] tuples. Source should be a relative/absolute path to a file/directory to copy into the flatpak, and dest should be the path inside the app install prefix (e.g. /share/applications/).\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly files?: [string, string][]\n\n /**\n * Symlinks to create in the app files. Should be a list of [target, location] symlink tuples. Target can be either a relative or absolute path inside the app install prefix, and location should be a absolute path inside the prefix to create the symlink at.\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly symlinks?: [string, string][]\n\n /**\n * Whether to enable the Wayland specific flags (`--enable-features=UseOzonePlatform --ozone-platform=wayland`) in the wrapper script. These flags are only available starting with Electron version 12. Defaults to `false`.\n */\n readonly useWaylandFlags?: boolean\n}\n"]}
1
+ {"version":3,"file":"linuxOptions.js","sourceRoot":"","sources":["../../src/options/linuxOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetConfigType, TargetSpecificOptions } from \"../core.js\"\nimport { PlatformSpecificBuildOptions } from \"./PlatformSpecificBuildOptions.js\"\n\n/**\n * Example Spec: https://specifications.freedesktop.org/desktop-entry-spec/latest/example.html\n */\nexport interface LinuxDesktopFile {\n /**\n * `[Desktop Entry]` metadata entries (name to value). Overwrites default values calculated by electron-builder\n */\n entry?: {\n [k: string]: string\n } | null\n /**\n * `[Desktop Actions <ActionName>]` metadata entries (name to value).\n *\n * Config Example:\n * ```js\n * desktopActions: {\n * NewWindow: {\n * Name: 'New Window',\n * Exec: 'app --new-window',\n * }\n * }\n * ```\n */\n desktopActions?: {\n [ActionName: string]: any\n } | null\n}\n\nexport interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecificBuildOptions {\n /**\n * Target package type: list of `AppImage`, `flatpak`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n *\n * electron-builder [docker image](https://www.electron.build/multi-platform-build#docker) can be used to build Linux targets on any platform.\n *\n * Please [do not put an AppImage into another archive](https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages#common-mistake) like a .zip or .tar.gz.\n * @default AppImage\n */\n readonly target?: TargetConfigType\n\n /**\n * The maintainer. Defaults to [author](https://www.electron.build/configuration#author).\n */\n readonly maintainer?: string | null\n\n /**\n * The vendor. Defaults to [author](https://www.electron.build/configuration#author).\n */\n readonly vendor?: string | null\n\n /**\n * The path to icon set directory or one png file, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.\n * By default will be generated automatically based on the macOS icns file.\n */\n readonly icon?: string\n\n /**\n * @private\n * @internal Allows specifying an FPM-only package category for all FPM targets in one place.\n * For user-facing category configuration use the target-specific options (e.g. {@link DebOptions}).\n */\n readonly packageCategory?: string | null\n}\n\n/**\n * Desktop-entry and runtime fields shared by all Linux targets and all snap core strategies.\n *\n * Fields set under `linux.*` in your build config (i.e. on {@link LinuxConfiguration}) are\n * automatically cascaded into each snap core's options by `LinuxTargetHelper.getSnapCore()`.\n * You do not need to duplicate them under `snapcraft.core24.*`, `snapcraft.core22.*`, etc.\n * Per-core values always take precedence when both are set.\n */\nexport interface CommonLinuxOptions {\n /**\n * The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).\n */\n readonly synopsis?: string | null\n\n /**\n * As [description](https://www.electron.build/configuration#description) from application package.json, but allows you to specify different for Linux.\n */\n readonly description?: string | null\n\n /**\n * The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).\n */\n readonly category?: string | null\n\n /**\n * The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing.\n */\n readonly mimeTypes?: Array<string> | null\n\n /**\n * The [Desktop file](https://developer.gnome.org/documentation/guidelines/maintainer/integrating.html#desktop-files)\n */\n readonly desktop?: LinuxDesktopFile | null\n\n /**\n * The executable parameters. Pass to executableName\n */\n readonly executableArgs?: Array<string> | null\n}\n\n// fpm-only specific options\nexport interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Package dependencies.\n * `rpm` defaults to `[\"gtk3\", \"libnotify\", \"nss\", \"libXScrnSaver\", \"(libXtst or libXtst6)\", \"xdg-utils\", \"at-spi2-core\", \"(libuuid or libuuid1)\"]`\n * `pacman` defaults to `[\"c-ares\", \"ffmpeg\", \"gtk3\", \"http-parser\", \"libevent\", \"libvpx\", \"libxslt\", \"libxss\", \"minizip\", \"nss\", \"re2\", \"snappy\", \"libnotify\", \"libappindicator-gtk3\"]`\n */\n readonly depends?: Array<string> | null\n\n /**\n * The compression type passed to fpm. For `deb`, `rpm`, and `pacman` targets prefer the\n * typed per-format interfaces (`DebOptions`, `RpmOptions`, `PacmanOptions`) which narrow\n * this to only the values that fpm actually accepts for that format.\n * @default xz\n */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"xzmt\" | \"gzip\" | \"zst\" | \"zstd\" | null\n\n readonly icon?: string\n\n /**\n * The package category.\n */\n readonly packageCategory?: string | null\n\n /**\n * The name of the package.\n */\n readonly packageName?: string | null\n\n readonly vendor?: string | null\n readonly maintainer?: string | null\n\n /**\n * File path to script to be passed to FPM for `--after-install` arg.\n */\n readonly afterInstall?: string | null\n /**\n * File path to script to be passed to FPM for `--after-remove` arg.\n */\n readonly afterRemove?: string | null\n /**\n * File path to custom AppArmor profile (Ubuntu 24+)\n */\n readonly appArmorProfile?: string | null\n\n /**\n * *Advanced only* The [fpm](https://fpm.readthedocs.io/en/latest/cli-reference.html) options.\n *\n * Example: `[\"--before-install=build/deb-preinstall.sh\", \"--after-upgrade=build/deb-postinstall.sh\"]`\n */\n readonly fpm?: Array<string> | null\n}\nexport interface DebOptions extends LinuxTargetSpecificOptions {\n /**\n * Package dependencies.\n * If need to support Debian, `libappindicator1` should be removed, it is [deprecated in Debian](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037).\n * If need to support KDE, `gconf2` and `gconf-service` should be removed as it's no longer used [by GNOME](https://packages.debian.org/bullseye/gconf2).\n * @default [\"libgtk-3-0\", \"libnotify4\", \"libnss3\", \"libxss1\", \"libxtst6\", \"xdg-utils\", \"libatspi2.0-0\", \"libuuid1\", \"libsecret-1-0\"]\n */\n readonly depends?: Array<string> | null\n\n /**\n * The [recommended package dependencies](https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps).\n * @default [\"libappindicator3-1\"]\n */\n readonly recommends?: Array<string> | null\n\n /**\n * The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).\n */\n readonly packageCategory?: string | null\n\n /**\n * The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.\n */\n readonly priority?: string | null\n\n /** @default xz */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"zst\" | null\n}\n\nexport interface RpmOptions extends LinuxTargetSpecificOptions {\n /**\n * Passed to fpm via `--rpm-compression`. `\"xzmt\"` uses multi-threaded xz (fpm's RPM default).\n * `\"xz\"` is automatically promoted to `\"xzmt\"`. `\"gzip\"` and `\"bzip2\"` pass through as-is.\n * @default xzmt\n */\n readonly compression?: \"xz\" | \"xzmt\" | \"gzip\" | \"bzip2\" | null\n}\n\nexport interface PacmanOptions extends LinuxTargetSpecificOptions {\n /** @default xz */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"zstd\" | null\n}\n\nexport interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n /**\n * The compression algorithm passed to the AppImage build tool.\n *\n * **FUSE2 toolset (`\"0.0.0\"` or unset):** only `\"xz\"` and `\"gzip\"` are forwarded\n * to mksquashfs (`-comp <value>`); `\"xz\"` additionally passes `-Xdict-size 100% -b 1048576`.\n * `\"zstd\"`, `null`, and unset fall through to the root-level `compression` option:\n * - `\"maximum\"` → `\"xz\"`\n * - anything else → flag omitted (mksquashfs defaults to gzip)\n *\n * **Static-runtime toolsets (`>= 1.0.0`):** `\"gzip\"` and `\"zstd\"` are forwarded\n * directly. `\"xz\"` is mapped to `\"zstd\"` (nearest supported equivalent). `null`\n * or unset falls through to the root-level `compression` option:\n * - `\"store\"` → `\"gzip\"`\n * - `\"normal\"` / `\"maximum\"` / unset → `\"zstd\"`\n */\n readonly compression?: \"gzip\" | \"xz\" | \"zstd\" | null\n}\n\nexport interface FlatpakOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n\n /**\n * The name of the runtime that the application uses. Defaults to `org.freedesktop.Platform`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtime?: string\n\n /**\n * The version of the runtime that the application uses. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtimeVersion?: string\n\n /**\n * The name of the development runtime that the application builds with. Defaults to `org.freedesktop.Sdk`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly sdk?: string\n\n /**\n * Start with the files from the specified application. This can be used to create applications that extend another application.\n * Defaults to [org.electronjs.Electron2.BaseApp](https://github.com/flathub/org.electronjs.Electron2.BaseApp).\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly base?: string\n\n /**\n * Use this specific version of the application specified in base. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly baseVersion?: string\n\n /**\n * The branch to use when exporting the application. Defaults to `master`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly branch?: string\n\n /**\n * An array of arguments passed to the flatpak build-finish command. Defaults to:\n * ```json\n * [\n * // Wayland/X11 Rendering\n * \"--socket=wayland\",\n * \"--socket=x11\",\n * \"--share=ipc\",\n * // Open GL\n * \"--device=dri\",\n * // Audio output\n * \"--socket=pulseaudio\",\n * // Read/write home directory access\n * \"--filesystem=home\",\n * // Allow communication with network\n * \"--share=network\",\n * // System notifications with libnotify\n * \"--talk-name=org.freedesktop.Notifications\",\n * ]\n * ```\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly finishArgs?: string[]\n\n /**\n * An array of objects specifying the modules to be built in order.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly modules?: (string | any)[]\n\n /**\n * Files to copy directly into the app. Should be a list of [source, dest] tuples. Source should be a relative/absolute path to a file/directory to copy into the flatpak, and dest should be the path inside the app install prefix (e.g. /share/applications/).\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly files?: [string, string][]\n\n /**\n * Symlinks to create in the app files. Should be a list of [target, location] symlink tuples. Target can be either a relative or absolute path inside the app install prefix, and location should be a absolute path inside the prefix to create the symlink at.\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly symlinks?: [string, string][]\n\n /**\n * Whether to enable the Wayland specific flags (`--enable-features=UseOzonePlatform --ozone-platform=wayland`) in the wrapper script. These flags are only available starting with Electron version 12. Defaults to `false`.\n */\n readonly useWaylandFlags?: boolean\n}\n"]}
package/dist/packager.js CHANGED
@@ -14,7 +14,7 @@ import { expandMacro } from "./util/macroExpander.js";
14
14
  import { checkMetadata, readPackageJson } from "./util/packageMetadata.js";
15
15
  import { getRepositoryInfo } from "./util/repositoryInfo.js";
16
16
  import { resolveFunction } from "./util/resolve.js";
17
- import { installOrRebuild, nodeGypRebuild } from "./util/yarn.js";
17
+ import { installOrRebuild, nodeGypRebuild } from "./util/installOrRebuild.js";
18
18
  import { PACKAGE_VERSION } from "./version.js";
19
19
  import { AsyncEventEmitter } from "./util/asyncEventEmitter.js";
20
20
  import asyncPool from "tiny-async-pool";