app-builder-lib 27.0.0-alpha.6 → 27.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts +23 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +71 -0
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/configuration.d.ts +42 -5
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/fileMatcher.d.ts +15 -0
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +41 -2
- package/dist/fileMatcher.js.map +1 -1
- package/dist/indexInternal.d.ts +2 -1
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +2 -1
- package/dist/indexInternal.js.map +1 -1
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +2 -3
- package/dist/macPackager.js.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts +11 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.js +28 -5
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +3 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/dist/options/SnapOptions.d.ts +8 -4
- package/dist/options/SnapOptions.d.ts.map +1 -1
- package/dist/options/SnapOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +17 -7
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +5 -4
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.js +1 -1
- package/dist/packager.js.map +1 -1
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +3 -1
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
- package/dist/targets/linux/FlatpakTarget.js +4 -1
- package/dist/targets/linux/FlatpakTarget.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +9 -0
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.d.ts +1 -1
- package/dist/targets/linux/appimage/appImageUtil.js +3 -3
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
- package/dist/targets/linux/snap/core24.d.ts +27 -0
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +92 -57
- package/dist/targets/linux/snap/core24.js.map +1 -1
- package/dist/targets/mac/MacTargetHelper.d.ts +12 -2
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +20 -11
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/win/MsiTarget.js +2 -2
- package/dist/targets/win/MsiTarget.js.map +1 -1
- package/dist/toolsets/custom.js +4 -2
- package/dist/toolsets/custom.js.map +1 -1
- package/dist/toolsets/icons.d.ts.map +1 -1
- package/dist/toolsets/icons.js +4 -1
- package/dist/toolsets/icons.js.map +1 -1
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +63 -2
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/electronGet.d.ts +5 -0
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +107 -7
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/packageMetadata.js +46 -21
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +8 -8
- package/scheme.json +36 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexInternal.js","sourceRoot":"","sources":["../src/indexInternal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAEvE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAG3G,OAAO,EAAiB,uCAAuC,EAAgC,MAAM,oBAAoB,CAAA;AAEzH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AACvE,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,eAAe,EAEf,mBAAmB,EACnB,8BAA8B,
|
|
1
|
+
{"version":3,"file":"indexInternal.js","sourceRoot":"","sources":["../src/indexInternal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAEvE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAG3G,OAAO,EAAiB,uCAAuC,EAAgC,MAAM,oBAAoB,CAAA;AAEzH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAA;AACvE,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,sBAAsB,EACtB,WAAW,EACX,yBAAyB,EACzB,eAAe,EAEf,mBAAmB,EACnB,8BAA8B,EAC9B,yB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port { _testingOnly, readCertInfo } from \"./codeSign/certInfo.js\"\nexport { createKeychain, findIdentity, isSignAllowed, removeKeychain } from \"./codeSign/mac/macCodeSign.js\"\nexport type { Identity } from \"./codeSign/mac/macCodeSign.js\"\nexport { CustomWindowsSign, WindowsSignTaskConfiguration } from \"./codeSign/win/windowsSignToolManager.js\"\nexport { Configuration, DEFAULT_IGNORED_PRODUCTION_DEPENDENCIES, ToolsetConfig, ToolsetCustom } from \"./configuration.js\"\nexport { Publish } from \"./core.js\"\nexport { getElectronVersion } from \"./electron/electronVersion.js\"\nexport { collectNodeModulesWithLogging } from \"./util/appFileCopier.js\"\nexport {\n collectExplicitReincludes,\n DEFAULT_EXCLUDED_EXTENSIONS,\n DEFAULT_EXCLUDED_NAMES,\n FileMatcher,\n getDefaultIgnoredPatterns,\n getFileMatchers,\n GetFileMatchersOptions,\n getMainFileMatchers,\n getReincludedDefaultExclusions,\n resolveFileSetDestination,\n} from \"./fileMatcher.js\"\nexport { hoist, HoisterDependencyKind, HoisterResult, HoisterTree } from \"./node-module-collector/hoist.js\"\nexport {\n BunNodeModulesCollector,\n determinePackageManagerEnv,\n getCollectorByPackageManager,\n PnpmNodeModulesCollector,\n TraversalNodeModulesCollector,\n YarnBerryNodeModulesCollector,\n YarnNodeModulesCollector,\n} from \"./node-module-collector/index.js\"\nexport { PM } from \"./node-module-collector/packageManager.js\"\nexport type { NodeModuleInfo } from \"./node-module-collector/types.js\"\nexport { computeSafeArtifactNameIfNeeded, DoPackOptions } from \"./platformPackager.js\"\nexport { createPublisher } from \"./publish/PublishManager.js\"\nexport { createUpdateInfoTasks, UpdateInfoFileTask, writeUpdateInfoFiles } from \"./publish/updateInfoBuilder.js\"\nexport { buildBlockMap } from \"./targets/blockmap/blockmap.js\"\nexport { createBlockmap } from \"./targets/differentialUpdateInfoBuilder.js\"\nexport { validateCriticalPathString } from \"./targets/linux/appimage/appImageUtil.js\"\nexport { copyMimeTypes } from \"./targets/linux/appimage/appLauncher.js\"\nexport { MacTargetHelper, type PlatformType } from \"./targets/mac/MacTargetHelper.js\"\nexport { assertSafeHelperName, getAvailableHelperSuffixes, type AvailableHelpers } from \"./electron/mac/electronMacUtils.js\"\nexport { addTargetsForPlatform, computeArchToTargetNamesMap } from \"./targets/targetFactory.js\"\nexport type { Defines } from \"./targets/win/nsis/Defines.js\"\nexport { nsisEscapeString, NsisScriptGenerator } from \"./targets/win/nsis/nsisScriptGenerator.js\"\nexport { ProgIdMaker } from \"./targets/win/nsis/progId.js\"\nexport { checkMakensisOutput, verifyInstallerSize } from \"./targets/win/nsis/nsisValidation.js\"\nexport { getLinuxToolsMacToolset, getLinuxToolsPath } from \"./toolsets/linuxToolsMac.js\"\nexport { getWindowsKitsBundle } from \"./toolsets/winCodeSign.js\"\nexport { CacheState } from \"./util/cacheState.js\"\nexport { computeDefaultAppDirectory, createProjectMetadataLazy, doMergeConfigs, getConfig, validateConfiguration } from \"./util/config/config.js\"\nexport { loadEnv, orNullIfFileNotExist } from \"./util/config/load.js\"\nexport { validateSchema } from \"./util/config/schemaValidator.js\"\nexport {\n ArtifactDownloadOptions,\n download,\n downloadBuilderToolset,\n downloadElectronArtifact,\n ElectronGetOptions,\n getBinariesMirrorUrl,\n isSafeExtractPath,\n reinitializeProxy,\n cacheDirectoryOverrideAllowed,\n getCacheDirectoryInternal,\n resolveBuilderBinaryUrl,\n} from \"./util/electronGet.js\"\nexport { buildSourceCandidates, convertIcon, getPngSize } from \"./util/iconConverter.js\"\nexport { getLicenseAssets, getLicenseFiles } from \"./util/license.js\"\nexport { parsePlistFile, PlistObject } from \"./util/mac/plist.js\"\nexport { expandMacro } from \"./util/macroExpander.js\"\nexport { checkMetadata } from \"./util/packageMetadata.js\"\nexport { getRepositoryInfo } from \"./util/repositoryInfo.js\"\nexport { withToolsetLock } from \"./util/toolsetLock.js\"\nexport { editWindowsResources, ResourceEditOptions } from \"./util/win/resEdit.js\"\nexport { installDependencies, installOrRebuild, nodeGypRebuild } from \"./util/installOrRebuild.js\"\nexport { PACKAGE_VERSION } from \"./version.js\"\nexport { ParallelsVmManager } from \"./vm/ParallelsVm.js\"\nexport { getLinuxVm, getWindowsVm, VmManager } from \"./vm/vm.js\"\nexport { WineVmManager } from \"./vm/WineVm.js\"\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macPackager.d.ts","sourceRoot":"","sources":["../src/macPackager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGrD,OAAO,EACL,IAAI,EACJ,gBAAgB,EAYjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAKxD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,eAAe,EAAkB,qBAAqB,EAAE,QAAQ,EAAuC,MAAM,+BAA+B,CAAA;AACrJ,OAAO,EAAwB,MAAM,EAAE,MAAM,WAAW,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,EAAuB,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AACjG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAiB,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAUtF,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAA;AAC9C,MAAM,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,oBAAoB,EAAE,QAAQ,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAMzG,UAAU,cAAc;IACtB,IAAI,EAAE,YAAY,CAAA;IAClB,MAAM,EAAE,gBAAgB,GAAG,gBAAgB,CAAA;IAC3C,YAAY,EAAE,oBAAoB,CAAA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AG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;cA2E/G,OAAO,CAAC,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;CAgCvH"}
|
package/dist/macPackager.js
CHANGED
|
@@ -336,7 +336,6 @@ export class MacPackager extends PlatformPackager {
|
|
|
336
336
|
// `config` is a custom fn/string module path when it's non-null and not an options object
|
|
337
337
|
const hasCustomSign = config != null && !signOpts;
|
|
338
338
|
const isMas = MacTargetHelper.isMasTarget(targetPlatform);
|
|
339
|
-
const isDevelopment = MacTargetHelper.isMasDevelopment(targetPlatform);
|
|
340
339
|
const identity = await this.helper.findSigningIdentity(targetPlatform, qualifier, keychainFile, hasCustomSign, signOpts);
|
|
341
340
|
if (!identity) {
|
|
342
341
|
return false;
|
|
@@ -346,8 +345,8 @@ export class MacPackager extends PlatformPackager {
|
|
|
346
345
|
}
|
|
347
346
|
const signOptions = await this.helper.buildSignOptions(appPath, identity, signOpts, keychainFile, arch, targetPlatform);
|
|
348
347
|
await this.doSign(signOptions, config, identity);
|
|
349
|
-
// Handle MAS installer creation
|
|
350
|
-
if (
|
|
348
|
+
// Handle MAS installer creation (skipped for development-signed builds)
|
|
349
|
+
if (outDir && MacTargetHelper.shouldCreateMasInstaller(targetPlatform, signOpts?.type)) {
|
|
351
350
|
await this.helper.createMasInstaller(appPath, outDir, this.getPlatformConfig(targetPlatform).config, keychainFile, targetPlatform, arch, qualifier);
|
|
352
351
|
}
|
|
353
352
|
// Handle notarization for non-MAS builds
|
package/dist/macPackager.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macPackager.js","sourceRoot":"","sources":["../src/macPackager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CA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wBACvB,MAAM,IAAI,yBAAyB,CAAC,2CAA2C,IAAI,EAAE,CAAC,CAAA;oBACxF,CAAC;oBACD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAA;oBACrE,MAAM,cAAc,GAAG,eAAe,CAAC,UAAU,EAAE,yBAAyB,CAAC,CAAA;oBAC7E,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;gBACzE,CAAC;YACH,CAAC,CAAC,CACH,CAAA;YACD,OAAO,IAAI,CAAA;QACb,CAAC,CAAA;QAED,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,MAAM,CAAA;QACzD,MAAM,oBAAoB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,CAAA;QACrH,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,IAAI,CAAA;QACb,CAAC;QAED,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAA;QAC1F,MAAM,oBAAoB,CAAC,eAAe,EAAE,MAAM,gBAAgB,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAA;QAEhI,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["import { createRequire } from \"node:module\"\nimport type { SignOptions } from \"@electron/osx-sign\"\n\nconst _require = createRequire(import.meta.url)\nimport {\n Arch,\n AsyncTaskManager,\n copyFile,\n deepAssign,\n exec,\n exists,\n getArchSuffix,\n InvalidConfigurationError,\n log,\n orIfFileNotExist,\n sanitizeDirPath,\n unlinkIfExists,\n use,\n} from \"builder-util\"\nimport { MemoLazy, Nullish } from \"builder-util-runtime\"\nimport * as fs from \"fs/promises\"\nimport { mkdir, readdir } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { AppInfo } from \"./appInfo.js\"\nimport { assertSafeHelperName } from \"./electron/mac/electronMacUtils.js\"\nimport { CodeSigningInfo, createKeychain, CreateKeychainOptions, Identity, isSignAllowed, removeKeychain, sign } from \"./codeSign/mac/macCodeSign.js\"\nimport { DIR_TARGET, Platform, Target } from \"./core.js\"\nimport { AfterPackContext, ElectronPlatformName } from \"./index.js\"\nimport { MacTargetHelper, PlatformType } from \"./targets/mac/MacTargetHelper.js\"\nimport { ElectronSignOptions, MacConfiguration, MasConfiguration } from \"./options/macOptions.js\"\nimport { Packager } from \"./packager.js\"\nimport { chooseNotNull, DoPackOptions, PlatformPackager } from \"./platformPackager.js\"\nimport { ArchiveTarget } from \"./targets/ArchiveTarget.js\"\nimport { PkgTarget, prepareProductBuildArgs } from \"./targets/mac/pkg.js\"\nimport { createCommonTarget, NoOpTarget } from \"./targets/targetFactory.js\"\nimport { isMacOsHighSierra } from \"./util/mac/macosVersion.js\"\nimport { buildSingleArchFilesPattern, collectIdenticalSingleArchMachOFiles, collectSingleArchPackageNames } from \"./util/archCompatibility.js\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander.js\"\nimport { resolveFunction } from \"./util/resolve.js\"\nimport { makeUniversalApp } from \"@electron/universal\"\n\nexport type CustomMacSignOptions = SignOptions\nexport type CustomMacSign = (configuration: CustomMacSignOptions, packager: MacPackager) => Promise<void>\n\nfunction isElectronSignOptions(sign: MacConfiguration[\"sign\"]): sign is ElectronSignOptions {\n return typeof sign === \"object\" && sign !== null\n}\n\ninterface PlatformConfig {\n type: PlatformType\n config: MacConfiguration | MasConfiguration\n platformName: ElectronPlatformName\n}\n\nexport class MacPackager extends PlatformPackager<MacConfiguration | MasConfiguration> {\n readonly codeSigningInfo = new MemoLazy<CreateKeychainOptions | null, CodeSigningInfo>(\n () => {\n const cscLink = this.getCscLink()\n if (cscLink == null || process.platform !== \"darwin\") {\n return null\n }\n\n const selected = {\n tmpDir: this.tempDirManager,\n cscLink,\n cscKeyPassword: this.getCscPassword(),\n cscILink: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerLink, process.env.CSC_INSTALLER_LINK),\n cscIKeyPassword: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerKeyPassword, process.env.CSC_INSTALLER_KEY_PASSWORD),\n currentDir: this.projectDir,\n }\n\n return selected\n },\n async selected => {\n if (selected) {\n return createKeychain(selected).then(result => {\n const keychainFile = result.keychainFile\n if (keychainFile != null) {\n this.info.disposeOnBuildFinish(() => removeKeychain(keychainFile))\n }\n return result\n })\n }\n\n return Promise.resolve({ keychainFile: process.env.CSC_KEYCHAIN || null })\n }\n )\n\n private _iconPath = new Lazy(() => this.getOrConvertIcon(\"icns\"))\n\n readonly helper = new MacTargetHelper(this)\n\n constructor(info: Packager) {\n super(info, Platform.MAC)\n }\n\n get defaultTarget(): Array<string> {\n return this.info.framework.macOsDefaultTargets\n }\n\n /**\n * Get the merged configuration for a specific platform type\n */\n getPlatformConfig(platformType: PlatformType): PlatformConfig {\n let config: MacConfiguration | MasConfiguration\n let platformName: ElectronPlatformName\n\n switch (platformType) {\n case \"mas\":\n config = deepAssign({}, this.platformSpecificBuildOptions, this.config.mas)\n platformName = \"mas\"\n break\n\n case \"mas-dev\":\n // `mas-dev` cascades mac → mas → masDev. The development/distribution distinction is no longer\n // carried as a config field; it is derived from `platformType` wherever signing happens.\n config = deepAssign({}, this.platformSpecificBuildOptions, this.config.mas, this.config.masDev)\n platformName = \"mas\"\n break\n\n case \"mac\":\n default:\n config = this.platformSpecificBuildOptions\n platformName = this.platform.nodeName as ElectronPlatformName\n break\n }\n\n return { type: platformType, config, platformName }\n }\n\n expandArch(pattern: string, arch?: Arch | null): string[] {\n if (arch === Arch.universal) {\n // Universal build has `app-x64.asar.unpacked` & `app-arm64.asar.unpacked`\n return [doExpandMacro(pattern, Arch[Arch.arm64], this.appInfo, {}, false), doExpandMacro(pattern, Arch[Arch.x64], this.appInfo, {}, false)]\n }\n // Every other build keeps the name as `app.asar.unpacked`\n return [doExpandMacro(pattern, null, this.appInfo, {}, false)]\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected prepareAppInfo(appInfo: AppInfo): AppInfo {\n const macAppInfo = new AppInfo(this.info, this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions)\n // Electron discovers its helper apps via `${CFBundleName} Helper.app`. We use the product name\n // verbatim for `CFBundleName` and for the on-disk helper/app bundle names, so a name that\n // filename sanitization would change must be rejected (otherwise the two would diverge and break\n // helper discovery). Fail fast during setup.\n assertSafeHelperName(macAppInfo.productName, \"productName\")\n const executableName = this.platformSpecificBuildOptions.executableName ?? this.info.config.executableName\n if (executableName != null) {\n assertSafeHelperName(executableName, \"executableName\")\n }\n return macAppInfo\n }\n\n async getIconPath(): Promise<string | null> {\n return this._iconPath.value\n }\n\n createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void {\n for (const name of targets) {\n switch (name) {\n case DIR_TARGET:\n break\n\n case \"dmg\": {\n mapper(name, outDir => {\n const { DmgTarget } = _require(\"dmg-builder\")\n return new DmgTarget(this, outDir)\n })\n break\n }\n\n case \"zip\":\n // https://github.com/electron-userland/electron-builder/issues/2313\n mapper(name, outDir => new ArchiveTarget(name, outDir, this, true))\n break\n\n case \"pkg\":\n mapper(name, outDir => new PkgTarget(this, outDir))\n break\n\n default:\n mapper(name, outDir => (MacTargetHelper.isMasTarget(name) ? new NoOpTarget(name) : createCommonTarget(name, outDir, this)))\n break\n }\n }\n }\n\n protected async doPack(config: DoPackOptions<MacConfiguration>): Promise<any> {\n if (config.arch === Arch.universal) {\n return this.doUniversalPack(config)\n }\n return await super.doPack(config)\n }\n\n /**\n * Handle universal build packing\n */\n private async doUniversalPack(config: DoPackOptions<MacConfiguration>): Promise<void> {\n const { outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets } = config\n\n const outDirName = (arch: Arch) => `${appOutDir}-${Arch[arch]}-temp`\n const options = {\n ...config,\n options: {\n sign: false,\n disableAsarIntegrity: true,\n disableFuses: true,\n // Keep both slices symmetric: don't drop platform-mismatched modules per-arch (that asymmetry breaks\n // the universal merge). Single-arch binaries are reconciled below via `computeSingleArchFiles`.\n disableArchFilter: true,\n },\n }\n\n const x64Arch = Arch.x64\n const x64AppOutDir = outDirName(x64Arch)\n await super.doPack({ ...options, appOutDir: x64AppOutDir, arch: x64Arch })\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const arm64Arch = Arch.arm64\n const arm64AppOutPath = outDirName(arm64Arch)\n await super.doPack({ ...options, appOutDir: arm64AppOutPath, arch: arm64Arch })\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const framework = this.info.framework\n log.info(\n {\n platform: platformName,\n arch: Arch[arch],\n [`${framework.name}`]: framework.version,\n appOutDir: log.filePath(appOutDir),\n },\n `packaging`\n )\n const appFile = `${this.appInfo.productFilename}.app`\n\n // Make sure the Assets.car file is the same for both architectures\n const safeX64AppOutDir = sanitizeDirPath(x64AppOutDir)\n const safeArm64AppOutPath = sanitizeDirPath(arm64AppOutPath)\n const safeAppOutDir = sanitizeDirPath(appOutDir)\n\n const sourceCatalogPath = path.join(safeX64AppOutDir, appFile, \"Contents/Resources/Assets.car\")\n if (await exists(sourceCatalogPath)) {\n const targetCatalogPath = path.join(safeArm64AppOutPath, appFile, \"Contents/Resources/Assets.car\")\n await fs.copyFile(sourceCatalogPath, targetCatalogPath)\n }\n\n const universalOpts = platformSpecificBuildOptions.universal\n\n // Single-arch binaries that can't be merged into a universal Mach-O. Two sources:\n // 1. `cpu`/`os`-declared platform packages (e.g. `@esbuild/darwin-arm64`), which the collection filter\n // confines to their native slice — mark the whole package so unique non-binary siblings don't trip the merge.\n // 2. Host binaries identical in both slices inside packages that declare no `cpu`/`os` (e.g. esbuild's\n // install script overwriting `esbuild/bin/esbuild` with the platform binary) — mark the file.\n // Both are reported to `@electron/universal` via `singleArchFiles`; otherwise it aborts on the arch mismatch.\n const singleArchFiles = await this.computeSingleArchFiles(\n path.join(safeX64AppOutDir, appFile),\n path.join(safeArm64AppOutPath, appFile),\n universalOpts?.singleArchFiles ?? undefined\n )\n\n await makeUniversalApp({\n mergeASARs: true, // preserve electron-builder v2 default; user can override via mac.universal.mergeASARs\n ...universalOpts,\n singleArchFiles,\n x64AppPath: path.join(safeX64AppOutDir, appFile),\n arm64AppPath: path.join(safeArm64AppOutPath, appFile),\n outAppPath: path.join(safeAppOutDir, appFile),\n force: true,\n })\n await fs.rm(x64AppOutDir, { recursive: true, force: true })\n await fs.rm(arm64AppOutPath, { recursive: true, force: true })\n\n // Give users a final opportunity to perform things on the combined universal package before signing\n const packContext: AfterPackContext = {\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n }\n await this.info.emitAfterPack(packContext)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n await this.doAddElectronFuses(packContext)\n\n // Mirror the base-class guard: skip signing when the caller explicitly set sign:false\n // (e.g. packMasTargets passes sign:false so that signMas() is the sole signing step).\n if (config.options?.sign ?? true) {\n await this.doSignAfterPack(outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets)\n }\n }\n\n /**\n * Builds the `singleArchFiles` glob passed to `@electron/universal` by scanning both packed slices for\n * single-architecture binaries that can't be lipo-merged. Merges any user-provided `mac.universal.singleArchFiles`.\n */\n private async computeSingleArchFiles(x64AppPath: string, arm64AppPath: string, userPattern: string | undefined): Promise<string | undefined> {\n const unpacked = (appPath: string) => path.join(appPath, \"Contents\", \"Resources\", \"app.asar.unpacked\")\n const x64Unpacked = unpacked(x64AppPath)\n const arm64Unpacked = unpacked(arm64AppPath)\n\n // (1) `cpu`/`os`-declared platform packages confined to one slice — mark the whole package.\n const packageNames = new Set<string>()\n await collectSingleArchPackageNames(path.join(x64Unpacked, \"node_modules\"), packageNames)\n await collectSingleArchPackageNames(path.join(arm64Unpacked, \"node_modules\"), packageNames)\n\n // (2) undeclared host binaries identical in both slices (e.g. `esbuild/bin/esbuild`) — mark the file.\n const machOFiles = await collectIdenticalSingleArchMachOFiles(x64Unpacked, arm64Unpacked)\n\n const patterns = [...Array.from(packageNames).map(name => `**/${name}/**`), ...machOFiles]\n if (patterns.length === 0) {\n return userPattern\n }\n\n log.warn(\n { packages: Array.from(packageNames).sort().join(\", \") || \"(none)\", files: machOFiles.sort().join(\", \") || \"(none)\" },\n \"Universal build contains single-architecture binaries; they are copied as-is per slice (not lipo-merged), so each is only usable on architectures whose platform package was installed on this build host. \" +\n \"If these are build-only tools (e.g. esbuild), move them to `devDependencies` or exclude them via `files` to omit them entirely. \" +\n \"If they are needed at runtime, install every target architecture's variant so the universal app works on both Intel and Apple Silicon (pnpm/yarn: `supportedArchitectures`; npm: `--cpu`/`--os`).\"\n )\n return buildSingleArchFilesPattern(patterns, userPattern)\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<void> {\n const masTargets = targets.filter(it => MacTargetHelper.isMasTarget(it.name))\n const nonMasTargets = targets.filter(it => !MacTargetHelper.isMasTarget(it.name))\n const prepackaged = this.packagerOptions.prepackaged\n const hasMas = masTargets.length > 0\n\n // mas always first\n await this.packMasTargets(outDir, arch, masTargets, prepackaged)\n\n // Mirror master's condition: skip the non-MAS darwin pack only when there are exclusively MAS\n // targets (hasMas=true, targets.length=1). DIR_TARGET passes targets=[] to pack() because\n // MacPackager.createTargets() doesn't call mapper() for it, so hasMas=false and doPack still runs.\n if (!hasMas || targets.length > 1) {\n await this.packMacTargets(outDir, arch, nonMasTargets, prepackaged, taskManager)\n }\n }\n\n private async packMasTargets(outDir: string, arch: Arch, targets: Array<Target>, prepackaged: string | null | undefined): Promise<void> {\n const resolvedOutDir = path.resolve(outDir)\n MacTargetHelper.assertSafePathForCommandUsage(resolvedOutDir, \"output directory\")\n\n for (const target of targets) {\n const platformType = MacTargetHelper.getPlatformTypeFromTarget(target.name)\n const platformConfig = this.getPlatformConfig(platformType)\n const targetOutDir = path.resolve(resolvedOutDir, `${target.name}${getArchSuffix(arch, this.platformSpecificBuildOptions.defaultArch)}`)\n MacTargetHelper.assertSafePathForCommandUsage(targetOutDir, \"target output directory\")\n\n const relativeTargetOutDir = path.relative(resolvedOutDir, targetOutDir)\n if (relativeTargetOutDir.startsWith(\"..\") || path.isAbsolute(relativeTargetOutDir)) {\n throw new InvalidConfigurationError(`Invalid target output directory: ${targetOutDir}`)\n }\n\n let appPath: string = path.join(targetOutDir, `${this.appInfo.productFilename}.app`)\n if (prepackaged != null) {\n appPath = prepackaged\n } else {\n await this.doPack({\n outDir: resolvedOutDir,\n appOutDir: targetOutDir,\n platformName: platformConfig.platformName,\n platformType: platformConfig.type,\n arch,\n platformSpecificBuildOptions: platformConfig.config,\n targets: [target],\n options: { sign: false },\n })\n MacTargetHelper.assertSafePathForCommandUsage(this.appInfo.productFilename, \"product filename\")\n }\n await this.signMas(appPath, targetOutDir, arch, platformType)\n }\n }\n\n private async packMacTargets(outDir: string, arch: Arch, targets: Array<Target>, prepackaged: string | null | undefined, taskManager: AsyncTaskManager): Promise<void> {\n const appPath = prepackaged == null ? path.join(this.computeAppOutDir(outDir, arch), `${path.basename(this.appInfo.productFilename)}.app`) : prepackaged\n\n if (prepackaged == null) {\n const platformConfig = this.getPlatformConfig(\"mac\")\n await this.doPack({\n outDir,\n appOutDir: path.dirname(appPath),\n platformName: platformConfig.platformName,\n platformType: platformConfig.type,\n arch,\n platformSpecificBuildOptions: platformConfig.config,\n targets,\n })\n }\n\n this.packageInDistributableFormat(appPath, arch, targets, taskManager)\n }\n\n private async signMas(appPath: string, outDir: string, arch: Arch, targetPlatform: PlatformType): Promise<boolean> {\n const signed = await this.sign(appPath, outDir, arch, targetPlatform)\n return signed\n }\n\n /**\n * Main signing method with platform awareness\n */\n private async sign(appPath: string, outDir: string | null, arch: Arch, targetPlatform: PlatformType): Promise<boolean> {\n if (!isSignAllowed()) {\n return false\n }\n\n // getPlatformConfig cascades mac → mas → masDev, so `sign` (and `sign.identity`) is already merged for this flavor.\n const config = this.getPlatformConfig(targetPlatform).config.sign\n\n // sign: null → user explicitly disabled signing\n if (config === null) {\n return this.helper.handleNullIdentity()\n }\n\n const signOpts = isElectronSignOptions(config) ? config : undefined\n // sign.identity: null → explicit skip; undefined → auto-discover\n const qualifier = signOpts?.identity\n if (qualifier === null) {\n return this.helper.handleNullIdentity()\n }\n\n const keychainFile = (await this.codeSigningInfo.value).keychainFile\n // `config` is a custom fn/string module path when it's non-null and not an options object\n const hasCustomSign = config != null && !signOpts\n const isMas = MacTargetHelper.isMasTarget(targetPlatform)\n const isDevelopment = MacTargetHelper.isMasDevelopment(targetPlatform)\n\n const identity = await this.helper.findSigningIdentity(targetPlatform, qualifier, keychainFile, hasCustomSign, signOpts)\n\n if (!identity) {\n return false\n }\n\n if (!isMacOsHighSierra()) {\n throw new InvalidConfigurationError(\"macOS High Sierra 10.13.6 is required to sign\")\n }\n\n const signOptions = await this.helper.buildSignOptions(appPath, identity, signOpts, keychainFile, arch, targetPlatform)\n await this.doSign(signOptions, config, identity)\n\n // Handle MAS installer creation\n if (isMas && !isDevelopment && outDir) {\n await this.helper.createMasInstaller(appPath, outDir, this.getPlatformConfig(targetPlatform).config as MasConfiguration, keychainFile, targetPlatform, arch, qualifier)\n }\n\n // Handle notarization for non-MAS builds\n if (!isMas) {\n await this.helper.notarizeIfProvided(appPath)\n }\n\n return true\n }\n\n //noinspection JSMethodCanBeStatic\n protected async doSign(opts: SignOptions, signConfig: MacConfiguration[\"sign\"], identity: Identity | null): Promise<void> {\n // Resolve a custom signer only when signConfig is a function or string module path.\n // ElectronSignOptions objects and undefined use @electron/osx-sign directly.\n const customSign =\n signConfig == null || isElectronSignOptions(signConfig) ? null : await resolveFunction(this.appInfo.type, signConfig, \"sign\", await this.info.getWorkspaceRoot())\n\n const { app, platform, type, provisioningProfile } = opts\n log.info(\n {\n file: log.filePath(app),\n platform,\n type,\n identityName: identity?.name || \"none\",\n identityHash: identity?.hash || \"none\",\n provisioningProfile: provisioningProfile || \"none\",\n },\n customSign ? \"executing custom sign\" : \"signing\"\n )\n\n return customSign ? Promise.resolve(customSign(opts, this)) : sign({ ...opts, identity: identity ? identity.name : undefined })\n }\n\n //noinspection JSMethodCanBeStatic\n public async doFlat(appPath: string, outFile: string, identity: Identity, keychain: string | Nullish): Promise<any> {\n const safeAppPath = sanitizeDirPath(appPath)\n const safeOutFile = sanitizeDirPath(outFile)\n // productbuild doesn't created directory for out file\n await mkdir(path.dirname(safeOutFile), { recursive: true })\n\n const args = prepareProductBuildArgs(identity, keychain)\n args.push(\"--component\", safeAppPath, \"/Applications\")\n args.push(safeOutFile)\n return await exec(\"productbuild\", args)\n }\n\n public getElectronSrcDir(dist: string) {\n return path.resolve(this.projectDir, dist, this.info.framework.distMacOsAppName)\n }\n\n public getElectronDestinationDir(appOutDir: string) {\n return path.join(appOutDir, this.info.framework.distMacOsAppName)\n }\n\n // todo fileAssociations\n async applyCommonInfo(appPlist: any, contentsPath: string, cascadedOptions: MacConfiguration | MasConfiguration): Promise<void> {\n const appInfo = this.appInfo\n const appFilename = appInfo.productFilename\n\n // https://github.com/electron-userland/electron-builder/issues/1278\n appPlist.CFBundleExecutable = appFilename.endsWith(\" Helper\") ? appFilename.substring(0, appFilename.length - \" Helper\".length) : appFilename\n\n const resourcesPath = path.join(contentsPath, \"Resources\")\n\n // Support both legacy `.icns` and modern `.icon` (Icon Composer) inputs via `mac.icon`.\n // Prefer `.icon` if provided; still accept `.icns`.\n const configuredIcon = this.platformSpecificBuildOptions.icon\n const isIconComposer = typeof configuredIcon === \"string\" && configuredIcon.toLowerCase().endsWith(\".icon\")\n\n // Set the app name. The product name is used verbatim (it is validated in `prepareAppInfo` to\n // require no filename sanitization), so `CFBundleName` matches the on-disk helper bundle names\n // that Electron resolves as `${CFBundleName} Helper.app`.\n appPlist.CFBundleName = appInfo.productName\n appPlist.CFBundleDisplayName = appInfo.productName\n\n // Bundle legacy `icns` format - this should also run when `.icon` is provided\n const setIcnsFile = async (iconPath: string) => {\n const oldIcon = appPlist.CFBundleIconFile\n if (oldIcon != null) {\n await unlinkIfExists(path.join(resourcesPath, oldIcon))\n }\n const iconFileName = \"icon.icns\"\n appPlist.CFBundleIconFile = iconFileName\n await copyFile(iconPath, path.join(resourcesPath, iconFileName))\n }\n\n const icnsFilePath = await this.getIconPath()\n if (icnsFilePath != null) {\n await setIcnsFile(icnsFilePath)\n }\n\n // Bundle new `icon` format\n if (isIconComposer && configuredIcon) {\n const iconComposerPath = await this.getResource(configuredIcon)\n if (iconComposerPath) {\n const { assetCatalog } = await this.generateAssetCatalogData(iconComposerPath)\n\n // Create and setup the asset catalog\n appPlist.CFBundleIconName = \"Icon\"\n await fs.writeFile(path.join(resourcesPath, \"Assets.car\"), assetCatalog)\n }\n }\n\n const minimumSystemVersion = this.platformSpecificBuildOptions.minimumSystemVersion\n if (minimumSystemVersion != null) {\n appPlist.LSMinimumSystemVersion = minimumSystemVersion\n }\n\n // const activeOpts = this.getPlatformConfig(distType).config\n appPlist.CFBundleShortVersionString = cascadedOptions.bundleShortVersion || appInfo.version\n appPlist.CFBundleVersion = cascadedOptions.bundleVersion || appInfo.buildVersion\n\n use(this.platformSpecificBuildOptions.category || (this.config as any).category, it => (appPlist.LSApplicationCategoryType = it))\n appPlist.NSHumanReadableCopyright = appInfo.copyright\n\n if (this.platformSpecificBuildOptions.darkModeSupport) {\n appPlist.NSRequiresAquaSystemAppearance = false\n }\n\n const extendInfo = this.platformSpecificBuildOptions.extendInfo\n if (extendInfo != null) {\n deepAssign(appPlist, extendInfo)\n }\n for (const [k, v] of Object.entries(appPlist)) {\n if (v === null || v === undefined) {\n delete appPlist[k]\n }\n }\n }\n\n protected async signApp(packContext: AfterPackContext, isAsar: boolean, platformType?: PlatformType): Promise<boolean> {\n const targetPlatform: PlatformType = platformType ?? (packContext.electronPlatformName === \"mas\" ? \"mas\" : \"mac\")\n const readDirectoryAndSign = async (sourceDirectory: string, directories: string[], shouldSign: (file: string) => boolean): Promise<boolean> => {\n const normalizedSourceDirectory = path.resolve(sourceDirectory)\n MacTargetHelper.assertSafePathForCommandUsage(normalizedSourceDirectory, \"application output directory\")\n await Promise.all(\n directories.map(async (file: string) => {\n if (shouldSign(file)) {\n const entryName = path.basename(file)\n if (file !== entryName) {\n throw new InvalidConfigurationError(`Invalid entry name in source directory: ${file}`)\n }\n const signTarget = path.resolve(normalizedSourceDirectory, entryName)\n const safeSignTarget = sanitizeDirPath(signTarget, normalizedSourceDirectory)\n await this.sign(safeSignTarget, null, packContext.arch, targetPlatform)\n }\n })\n )\n return true\n }\n\n const appFileName = `${this.appInfo.productFilename}.app`\n await readDirectoryAndSign(packContext.appOutDir, await readdir(packContext.appOutDir), file => file === appFileName)\n if (!isAsar) {\n return true\n }\n\n const outResourcesDir = path.join(packContext.appOutDir, \"resources\", \"app.asar.unpacked\")\n await readDirectoryAndSign(outResourcesDir, await orIfFileNotExist(readdir(outResourcesDir), []), file => file.endsWith(\".app\"))\n\n return true\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"macPackager.js","sourceRoot":"","sources":["../src/macPackager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC/C,OAAO,EACL,IAAI,EAEJ,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,MAAM,EACN,aAAa,EACb,yBAAyB,EACzB,GAAG,EACH,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,GAAG,GACJ,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAW,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAA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,WAAW,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;gBACzE,CAAC;YACH,CAAC,CAAC,CACH,CAAA;YACD,OAAO,IAAI,CAAA;QACb,CAAC,CAAA;QAED,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,MAAM,CAAA;QACzD,MAAM,oBAAoB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,CAAA;QACrH,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,IAAI,CAAA;QACb,CAAC;QAED,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAA;QAC1F,MAAM,oBAAoB,CAAC,eAAe,EAAE,MAAM,gBAAgB,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAA;QAEhI,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["import { createRequire } from \"node:module\"\nimport type { SignOptions } from \"@electron/osx-sign\"\n\nconst _require = createRequire(import.meta.url)\nimport {\n Arch,\n AsyncTaskManager,\n copyFile,\n deepAssign,\n exec,\n exists,\n getArchSuffix,\n InvalidConfigurationError,\n log,\n orIfFileNotExist,\n sanitizeDirPath,\n unlinkIfExists,\n use,\n} from \"builder-util\"\nimport { MemoLazy, Nullish } from \"builder-util-runtime\"\nimport * as fs from \"fs/promises\"\nimport { mkdir, readdir } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { AppInfo } from \"./appInfo.js\"\nimport { assertSafeHelperName } from \"./electron/mac/electronMacUtils.js\"\nimport { CodeSigningInfo, createKeychain, CreateKeychainOptions, Identity, isSignAllowed, removeKeychain, sign } from \"./codeSign/mac/macCodeSign.js\"\nimport { DIR_TARGET, Platform, Target } from \"./core.js\"\nimport { AfterPackContext, ElectronPlatformName } from \"./index.js\"\nimport { MacTargetHelper, PlatformType } from \"./targets/mac/MacTargetHelper.js\"\nimport { ElectronSignOptions, MacConfiguration, MasConfiguration } from \"./options/macOptions.js\"\nimport { Packager } from \"./packager.js\"\nimport { chooseNotNull, DoPackOptions, PlatformPackager } from \"./platformPackager.js\"\nimport { ArchiveTarget } from \"./targets/ArchiveTarget.js\"\nimport { PkgTarget, prepareProductBuildArgs } from \"./targets/mac/pkg.js\"\nimport { createCommonTarget, NoOpTarget } from \"./targets/targetFactory.js\"\nimport { isMacOsHighSierra } from \"./util/mac/macosVersion.js\"\nimport { buildSingleArchFilesPattern, collectIdenticalSingleArchMachOFiles, collectSingleArchPackageNames } from \"./util/archCompatibility.js\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander.js\"\nimport { resolveFunction } from \"./util/resolve.js\"\nimport { makeUniversalApp } from \"@electron/universal\"\n\nexport type CustomMacSignOptions = SignOptions\nexport type CustomMacSign = (configuration: CustomMacSignOptions, packager: MacPackager) => Promise<void>\n\nfunction isElectronSignOptions(sign: MacConfiguration[\"sign\"]): sign is ElectronSignOptions {\n return typeof sign === \"object\" && sign !== null\n}\n\ninterface PlatformConfig {\n type: PlatformType\n config: MacConfiguration | MasConfiguration\n platformName: ElectronPlatformName\n}\n\nexport class MacPackager extends PlatformPackager<MacConfiguration | MasConfiguration> {\n readonly codeSigningInfo = new MemoLazy<CreateKeychainOptions | null, CodeSigningInfo>(\n () => {\n const cscLink = this.getCscLink()\n if (cscLink == null || process.platform !== \"darwin\") {\n return null\n }\n\n const selected = {\n tmpDir: this.tempDirManager,\n cscLink,\n cscKeyPassword: this.getCscPassword(),\n cscILink: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerLink, process.env.CSC_INSTALLER_LINK),\n cscIKeyPassword: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerKeyPassword, process.env.CSC_INSTALLER_KEY_PASSWORD),\n currentDir: this.projectDir,\n }\n\n return selected\n },\n async selected => {\n if (selected) {\n return createKeychain(selected).then(result => {\n const keychainFile = result.keychainFile\n if (keychainFile != null) {\n this.info.disposeOnBuildFinish(() => removeKeychain(keychainFile))\n }\n return result\n })\n }\n\n return Promise.resolve({ keychainFile: process.env.CSC_KEYCHAIN || null })\n }\n )\n\n private _iconPath = new Lazy(() => this.getOrConvertIcon(\"icns\"))\n\n readonly helper = new MacTargetHelper(this)\n\n constructor(info: Packager) {\n super(info, Platform.MAC)\n }\n\n get defaultTarget(): Array<string> {\n return this.info.framework.macOsDefaultTargets\n }\n\n /**\n * Get the merged configuration for a specific platform type\n */\n getPlatformConfig(platformType: PlatformType): PlatformConfig {\n let config: MacConfiguration | MasConfiguration\n let platformName: ElectronPlatformName\n\n switch (platformType) {\n case \"mas\":\n config = deepAssign({}, this.platformSpecificBuildOptions, this.config.mas)\n platformName = \"mas\"\n break\n\n case \"mas-dev\":\n // `mas-dev` cascades mac → mas → masDev. The development/distribution distinction is no longer\n // carried as a config field; it is derived from `platformType` wherever signing happens.\n config = deepAssign({}, this.platformSpecificBuildOptions, this.config.mas, this.config.masDev)\n platformName = \"mas\"\n break\n\n case \"mac\":\n default:\n config = this.platformSpecificBuildOptions\n platformName = this.platform.nodeName as ElectronPlatformName\n break\n }\n\n return { type: platformType, config, platformName }\n }\n\n expandArch(pattern: string, arch?: Arch | null): string[] {\n if (arch === Arch.universal) {\n // Universal build has `app-x64.asar.unpacked` & `app-arm64.asar.unpacked`\n return [doExpandMacro(pattern, Arch[Arch.arm64], this.appInfo, {}, false), doExpandMacro(pattern, Arch[Arch.x64], this.appInfo, {}, false)]\n }\n // Every other build keeps the name as `app.asar.unpacked`\n return [doExpandMacro(pattern, null, this.appInfo, {}, false)]\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected prepareAppInfo(appInfo: AppInfo): AppInfo {\n const macAppInfo = new AppInfo(this.info, this.platformSpecificBuildOptions.bundleVersion, this.platformSpecificBuildOptions)\n // Electron discovers its helper apps via `${CFBundleName} Helper.app`. We use the product name\n // verbatim for `CFBundleName` and for the on-disk helper/app bundle names, so a name that\n // filename sanitization would change must be rejected (otherwise the two would diverge and break\n // helper discovery). Fail fast during setup.\n assertSafeHelperName(macAppInfo.productName, \"productName\")\n const executableName = this.platformSpecificBuildOptions.executableName ?? this.info.config.executableName\n if (executableName != null) {\n assertSafeHelperName(executableName, \"executableName\")\n }\n return macAppInfo\n }\n\n async getIconPath(): Promise<string | null> {\n return this._iconPath.value\n }\n\n createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void {\n for (const name of targets) {\n switch (name) {\n case DIR_TARGET:\n break\n\n case \"dmg\": {\n mapper(name, outDir => {\n const { DmgTarget } = _require(\"dmg-builder\")\n return new DmgTarget(this, outDir)\n })\n break\n }\n\n case \"zip\":\n // https://github.com/electron-userland/electron-builder/issues/2313\n mapper(name, outDir => new ArchiveTarget(name, outDir, this, true))\n break\n\n case \"pkg\":\n mapper(name, outDir => new PkgTarget(this, outDir))\n break\n\n default:\n mapper(name, outDir => (MacTargetHelper.isMasTarget(name) ? new NoOpTarget(name) : createCommonTarget(name, outDir, this)))\n break\n }\n }\n }\n\n protected async doPack(config: DoPackOptions<MacConfiguration>): Promise<any> {\n if (config.arch === Arch.universal) {\n return this.doUniversalPack(config)\n }\n return await super.doPack(config)\n }\n\n /**\n * Handle universal build packing\n */\n private async doUniversalPack(config: DoPackOptions<MacConfiguration>): Promise<void> {\n const { outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets } = config\n\n const outDirName = (arch: Arch) => `${appOutDir}-${Arch[arch]}-temp`\n const options = {\n ...config,\n options: {\n sign: false,\n disableAsarIntegrity: true,\n disableFuses: true,\n // Keep both slices symmetric: don't drop platform-mismatched modules per-arch (that asymmetry breaks\n // the universal merge). Single-arch binaries are reconciled below via `computeSingleArchFiles`.\n disableArchFilter: true,\n },\n }\n\n const x64Arch = Arch.x64\n const x64AppOutDir = outDirName(x64Arch)\n await super.doPack({ ...options, appOutDir: x64AppOutDir, arch: x64Arch })\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const arm64Arch = Arch.arm64\n const arm64AppOutPath = outDirName(arm64Arch)\n await super.doPack({ ...options, appOutDir: arm64AppOutPath, arch: arm64Arch })\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const framework = this.info.framework\n log.info(\n {\n platform: platformName,\n arch: Arch[arch],\n [`${framework.name}`]: framework.version,\n appOutDir: log.filePath(appOutDir),\n },\n `packaging`\n )\n const appFile = `${this.appInfo.productFilename}.app`\n\n // Make sure the Assets.car file is the same for both architectures\n const safeX64AppOutDir = sanitizeDirPath(x64AppOutDir)\n const safeArm64AppOutPath = sanitizeDirPath(arm64AppOutPath)\n const safeAppOutDir = sanitizeDirPath(appOutDir)\n\n const sourceCatalogPath = path.join(safeX64AppOutDir, appFile, \"Contents/Resources/Assets.car\")\n if (await exists(sourceCatalogPath)) {\n const targetCatalogPath = path.join(safeArm64AppOutPath, appFile, \"Contents/Resources/Assets.car\")\n await fs.copyFile(sourceCatalogPath, targetCatalogPath)\n }\n\n const universalOpts = platformSpecificBuildOptions.universal\n\n // Single-arch binaries that can't be merged into a universal Mach-O. Two sources:\n // 1. `cpu`/`os`-declared platform packages (e.g. `@esbuild/darwin-arm64`), which the collection filter\n // confines to their native slice — mark the whole package so unique non-binary siblings don't trip the merge.\n // 2. Host binaries identical in both slices inside packages that declare no `cpu`/`os` (e.g. esbuild's\n // install script overwriting `esbuild/bin/esbuild` with the platform binary) — mark the file.\n // Both are reported to `@electron/universal` via `singleArchFiles`; otherwise it aborts on the arch mismatch.\n const singleArchFiles = await this.computeSingleArchFiles(\n path.join(safeX64AppOutDir, appFile),\n path.join(safeArm64AppOutPath, appFile),\n universalOpts?.singleArchFiles ?? undefined\n )\n\n await makeUniversalApp({\n mergeASARs: true, // preserve electron-builder v2 default; user can override via mac.universal.mergeASARs\n ...universalOpts,\n singleArchFiles,\n x64AppPath: path.join(safeX64AppOutDir, appFile),\n arm64AppPath: path.join(safeArm64AppOutPath, appFile),\n outAppPath: path.join(safeAppOutDir, appFile),\n force: true,\n })\n await fs.rm(x64AppOutDir, { recursive: true, force: true })\n await fs.rm(arm64AppOutPath, { recursive: true, force: true })\n\n // Give users a final opportunity to perform things on the combined universal package before signing\n const packContext: AfterPackContext = {\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n }\n await this.info.emitAfterPack(packContext)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n await this.doAddElectronFuses(packContext)\n\n // Mirror the base-class guard: skip signing when the caller explicitly set sign:false\n // (e.g. packMasTargets passes sign:false so that signMas() is the sole signing step).\n if (config.options?.sign ?? true) {\n await this.doSignAfterPack(outDir, appOutDir, platformName, platformType, arch, platformSpecificBuildOptions, targets)\n }\n }\n\n /**\n * Builds the `singleArchFiles` glob passed to `@electron/universal` by scanning both packed slices for\n * single-architecture binaries that can't be lipo-merged. Merges any user-provided `mac.universal.singleArchFiles`.\n */\n private async computeSingleArchFiles(x64AppPath: string, arm64AppPath: string, userPattern: string | undefined): Promise<string | undefined> {\n const unpacked = (appPath: string) => path.join(appPath, \"Contents\", \"Resources\", \"app.asar.unpacked\")\n const x64Unpacked = unpacked(x64AppPath)\n const arm64Unpacked = unpacked(arm64AppPath)\n\n // (1) `cpu`/`os`-declared platform packages confined to one slice — mark the whole package.\n const packageNames = new Set<string>()\n await collectSingleArchPackageNames(path.join(x64Unpacked, \"node_modules\"), packageNames)\n await collectSingleArchPackageNames(path.join(arm64Unpacked, \"node_modules\"), packageNames)\n\n // (2) undeclared host binaries identical in both slices (e.g. `esbuild/bin/esbuild`) — mark the file.\n const machOFiles = await collectIdenticalSingleArchMachOFiles(x64Unpacked, arm64Unpacked)\n\n const patterns = [...Array.from(packageNames).map(name => `**/${name}/**`), ...machOFiles]\n if (patterns.length === 0) {\n return userPattern\n }\n\n log.warn(\n { packages: Array.from(packageNames).sort().join(\", \") || \"(none)\", files: machOFiles.sort().join(\", \") || \"(none)\" },\n \"Universal build contains single-architecture binaries; they are copied as-is per slice (not lipo-merged), so each is only usable on architectures whose platform package was installed on this build host. \" +\n \"If these are build-only tools (e.g. esbuild), move them to `devDependencies` or exclude them via `files` to omit them entirely. \" +\n \"If they are needed at runtime, install every target architecture's variant so the universal app works on both Intel and Apple Silicon (pnpm/yarn: `supportedArchitectures`; npm: `--cpu`/`--os`).\"\n )\n return buildSingleArchFilesPattern(patterns, userPattern)\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<void> {\n const masTargets = targets.filter(it => MacTargetHelper.isMasTarget(it.name))\n const nonMasTargets = targets.filter(it => !MacTargetHelper.isMasTarget(it.name))\n const prepackaged = this.packagerOptions.prepackaged\n const hasMas = masTargets.length > 0\n\n // mas always first\n await this.packMasTargets(outDir, arch, masTargets, prepackaged)\n\n // Mirror master's condition: skip the non-MAS darwin pack only when there are exclusively MAS\n // targets (hasMas=true, targets.length=1). DIR_TARGET passes targets=[] to pack() because\n // MacPackager.createTargets() doesn't call mapper() for it, so hasMas=false and doPack still runs.\n if (!hasMas || targets.length > 1) {\n await this.packMacTargets(outDir, arch, nonMasTargets, prepackaged, taskManager)\n }\n }\n\n private async packMasTargets(outDir: string, arch: Arch, targets: Array<Target>, prepackaged: string | null | undefined): Promise<void> {\n const resolvedOutDir = path.resolve(outDir)\n MacTargetHelper.assertSafePathForCommandUsage(resolvedOutDir, \"output directory\")\n\n for (const target of targets) {\n const platformType = MacTargetHelper.getPlatformTypeFromTarget(target.name)\n const platformConfig = this.getPlatformConfig(platformType)\n const targetOutDir = path.resolve(resolvedOutDir, `${target.name}${getArchSuffix(arch, this.platformSpecificBuildOptions.defaultArch)}`)\n MacTargetHelper.assertSafePathForCommandUsage(targetOutDir, \"target output directory\")\n\n const relativeTargetOutDir = path.relative(resolvedOutDir, targetOutDir)\n if (relativeTargetOutDir.startsWith(\"..\") || path.isAbsolute(relativeTargetOutDir)) {\n throw new InvalidConfigurationError(`Invalid target output directory: ${targetOutDir}`)\n }\n\n let appPath: string = path.join(targetOutDir, `${this.appInfo.productFilename}.app`)\n if (prepackaged != null) {\n appPath = prepackaged\n } else {\n await this.doPack({\n outDir: resolvedOutDir,\n appOutDir: targetOutDir,\n platformName: platformConfig.platformName,\n platformType: platformConfig.type,\n arch,\n platformSpecificBuildOptions: platformConfig.config,\n targets: [target],\n options: { sign: false },\n })\n MacTargetHelper.assertSafePathForCommandUsage(this.appInfo.productFilename, \"product filename\")\n }\n await this.signMas(appPath, targetOutDir, arch, platformType)\n }\n }\n\n private async packMacTargets(outDir: string, arch: Arch, targets: Array<Target>, prepackaged: string | null | undefined, taskManager: AsyncTaskManager): Promise<void> {\n const appPath = prepackaged == null ? path.join(this.computeAppOutDir(outDir, arch), `${path.basename(this.appInfo.productFilename)}.app`) : prepackaged\n\n if (prepackaged == null) {\n const platformConfig = this.getPlatformConfig(\"mac\")\n await this.doPack({\n outDir,\n appOutDir: path.dirname(appPath),\n platformName: platformConfig.platformName,\n platformType: platformConfig.type,\n arch,\n platformSpecificBuildOptions: platformConfig.config,\n targets,\n })\n }\n\n this.packageInDistributableFormat(appPath, arch, targets, taskManager)\n }\n\n private async signMas(appPath: string, outDir: string, arch: Arch, targetPlatform: PlatformType): Promise<boolean> {\n const signed = await this.sign(appPath, outDir, arch, targetPlatform)\n return signed\n }\n\n /**\n * Main signing method with platform awareness\n */\n private async sign(appPath: string, outDir: string | null, arch: Arch, targetPlatform: PlatformType): Promise<boolean> {\n if (!isSignAllowed()) {\n return false\n }\n\n // getPlatformConfig cascades mac → mas → masDev, so `sign` (and `sign.identity`) is already merged for this flavor.\n const config = this.getPlatformConfig(targetPlatform).config.sign\n\n // sign: null → user explicitly disabled signing\n if (config === null) {\n return this.helper.handleNullIdentity()\n }\n\n const signOpts = isElectronSignOptions(config) ? config : undefined\n // sign.identity: null → explicit skip; undefined → auto-discover\n const qualifier = signOpts?.identity\n if (qualifier === null) {\n return this.helper.handleNullIdentity()\n }\n\n const keychainFile = (await this.codeSigningInfo.value).keychainFile\n // `config` is a custom fn/string module path when it's non-null and not an options object\n const hasCustomSign = config != null && !signOpts\n const isMas = MacTargetHelper.isMasTarget(targetPlatform)\n\n const identity = await this.helper.findSigningIdentity(targetPlatform, qualifier, keychainFile, hasCustomSign, signOpts)\n\n if (!identity) {\n return false\n }\n\n if (!isMacOsHighSierra()) {\n throw new InvalidConfigurationError(\"macOS High Sierra 10.13.6 is required to sign\")\n }\n\n const signOptions = await this.helper.buildSignOptions(appPath, identity, signOpts, keychainFile, arch, targetPlatform)\n await this.doSign(signOptions, config, identity)\n\n // Handle MAS installer creation (skipped for development-signed builds)\n if (outDir && MacTargetHelper.shouldCreateMasInstaller(targetPlatform, signOpts?.type)) {\n await this.helper.createMasInstaller(appPath, outDir, this.getPlatformConfig(targetPlatform).config as MasConfiguration, keychainFile, targetPlatform, arch, qualifier)\n }\n\n // Handle notarization for non-MAS builds\n if (!isMas) {\n await this.helper.notarizeIfProvided(appPath)\n }\n\n return true\n }\n\n //noinspection JSMethodCanBeStatic\n protected async doSign(opts: SignOptions, signConfig: MacConfiguration[\"sign\"], identity: Identity | null): Promise<void> {\n // Resolve a custom signer only when signConfig is a function or string module path.\n // ElectronSignOptions objects and undefined use @electron/osx-sign directly.\n const customSign =\n signConfig == null || isElectronSignOptions(signConfig) ? null : await resolveFunction(this.appInfo.type, signConfig, \"sign\", await this.info.getWorkspaceRoot())\n\n const { app, platform, type, provisioningProfile } = opts\n log.info(\n {\n file: log.filePath(app),\n platform,\n type,\n identityName: identity?.name || \"none\",\n identityHash: identity?.hash || \"none\",\n provisioningProfile: provisioningProfile || \"none\",\n },\n customSign ? \"executing custom sign\" : \"signing\"\n )\n\n return customSign ? Promise.resolve(customSign(opts, this)) : sign({ ...opts, identity: identity ? identity.name : undefined })\n }\n\n //noinspection JSMethodCanBeStatic\n public async doFlat(appPath: string, outFile: string, identity: Identity, keychain: string | Nullish): Promise<any> {\n const safeAppPath = sanitizeDirPath(appPath)\n const safeOutFile = sanitizeDirPath(outFile)\n // productbuild doesn't created directory for out file\n await mkdir(path.dirname(safeOutFile), { recursive: true })\n\n const args = prepareProductBuildArgs(identity, keychain)\n args.push(\"--component\", safeAppPath, \"/Applications\")\n args.push(safeOutFile)\n return await exec(\"productbuild\", args)\n }\n\n public getElectronSrcDir(dist: string) {\n return path.resolve(this.projectDir, dist, this.info.framework.distMacOsAppName)\n }\n\n public getElectronDestinationDir(appOutDir: string) {\n return path.join(appOutDir, this.info.framework.distMacOsAppName)\n }\n\n // todo fileAssociations\n async applyCommonInfo(appPlist: any, contentsPath: string, cascadedOptions: MacConfiguration | MasConfiguration): Promise<void> {\n const appInfo = this.appInfo\n const appFilename = appInfo.productFilename\n\n // https://github.com/electron-userland/electron-builder/issues/1278\n appPlist.CFBundleExecutable = appFilename.endsWith(\" Helper\") ? appFilename.substring(0, appFilename.length - \" Helper\".length) : appFilename\n\n const resourcesPath = path.join(contentsPath, \"Resources\")\n\n // Support both legacy `.icns` and modern `.icon` (Icon Composer) inputs via `mac.icon`.\n // Prefer `.icon` if provided; still accept `.icns`.\n const configuredIcon = this.platformSpecificBuildOptions.icon\n const isIconComposer = typeof configuredIcon === \"string\" && configuredIcon.toLowerCase().endsWith(\".icon\")\n\n // Set the app name. The product name is used verbatim (it is validated in `prepareAppInfo` to\n // require no filename sanitization), so `CFBundleName` matches the on-disk helper bundle names\n // that Electron resolves as `${CFBundleName} Helper.app`.\n appPlist.CFBundleName = appInfo.productName\n appPlist.CFBundleDisplayName = appInfo.productName\n\n // Bundle legacy `icns` format - this should also run when `.icon` is provided\n const setIcnsFile = async (iconPath: string) => {\n const oldIcon = appPlist.CFBundleIconFile\n if (oldIcon != null) {\n await unlinkIfExists(path.join(resourcesPath, oldIcon))\n }\n const iconFileName = \"icon.icns\"\n appPlist.CFBundleIconFile = iconFileName\n await copyFile(iconPath, path.join(resourcesPath, iconFileName))\n }\n\n const icnsFilePath = await this.getIconPath()\n if (icnsFilePath != null) {\n await setIcnsFile(icnsFilePath)\n }\n\n // Bundle new `icon` format\n if (isIconComposer && configuredIcon) {\n const iconComposerPath = await this.getResource(configuredIcon)\n if (iconComposerPath) {\n const { assetCatalog } = await this.generateAssetCatalogData(iconComposerPath)\n\n // Create and setup the asset catalog\n appPlist.CFBundleIconName = \"Icon\"\n await fs.writeFile(path.join(resourcesPath, \"Assets.car\"), assetCatalog)\n }\n }\n\n const minimumSystemVersion = this.platformSpecificBuildOptions.minimumSystemVersion\n if (minimumSystemVersion != null) {\n appPlist.LSMinimumSystemVersion = minimumSystemVersion\n }\n\n // const activeOpts = this.getPlatformConfig(distType).config\n appPlist.CFBundleShortVersionString = cascadedOptions.bundleShortVersion || appInfo.version\n appPlist.CFBundleVersion = cascadedOptions.bundleVersion || appInfo.buildVersion\n\n use(this.platformSpecificBuildOptions.category || (this.config as any).category, it => (appPlist.LSApplicationCategoryType = it))\n appPlist.NSHumanReadableCopyright = appInfo.copyright\n\n if (this.platformSpecificBuildOptions.darkModeSupport) {\n appPlist.NSRequiresAquaSystemAppearance = false\n }\n\n const extendInfo = this.platformSpecificBuildOptions.extendInfo\n if (extendInfo != null) {\n deepAssign(appPlist, extendInfo)\n }\n for (const [k, v] of Object.entries(appPlist)) {\n if (v === null || v === undefined) {\n delete appPlist[k]\n }\n }\n }\n\n protected async signApp(packContext: AfterPackContext, isAsar: boolean, platformType?: PlatformType): Promise<boolean> {\n const targetPlatform: PlatformType = platformType ?? (packContext.electronPlatformName === \"mas\" ? \"mas\" : \"mac\")\n const readDirectoryAndSign = async (sourceDirectory: string, directories: string[], shouldSign: (file: string) => boolean): Promise<boolean> => {\n const normalizedSourceDirectory = path.resolve(sourceDirectory)\n MacTargetHelper.assertSafePathForCommandUsage(normalizedSourceDirectory, \"application output directory\")\n await Promise.all(\n directories.map(async (file: string) => {\n if (shouldSign(file)) {\n const entryName = path.basename(file)\n if (file !== entryName) {\n throw new InvalidConfigurationError(`Invalid entry name in source directory: ${file}`)\n }\n const signTarget = path.resolve(normalizedSourceDirectory, entryName)\n const safeSignTarget = sanitizeDirPath(signTarget, normalizedSourceDirectory)\n await this.sign(safeSignTarget, null, packContext.arch, targetPlatform)\n }\n })\n )\n return true\n }\n\n const appFileName = `${this.appInfo.productFilename}.app`\n await readDirectoryAndSign(packContext.appOutDir, await readdir(packContext.appOutDir), file => file === appFileName)\n if (!isAsar) {\n return true\n }\n\n const outResourcesDir = path.join(packContext.appOutDir, \"resources\", \"app.asar.unpacked\")\n await readDirectoryAndSign(outResourcesDir, await orIfFileNotExist(readdir(outResourcesDir), []), file => file.endsWith(\".app\"))\n\n return true\n }\n}\n"]}
|
|
@@ -119,7 +119,17 @@ export declare abstract class NodeModulesCollector<ProdDepType extends Dependenc
|
|
|
119
119
|
private markExcludedModules;
|
|
120
120
|
private transformToHoisterTree;
|
|
121
121
|
private _getNodeModules;
|
|
122
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Records a dependency that could not be resolved on disk in the log summary.
|
|
124
|
+
*
|
|
125
|
+
* A platform-specific package name (e.g. `sass-embedded-linux-x64`) is always classified as a
|
|
126
|
+
* platform-specific optional dependency. Otherwise, `isDeclaredOptional` decides the bucket: a
|
|
127
|
+
* caller that *knows* the dependency was declared in `optionalDependencies` (e.g. the pnpm
|
|
128
|
+
* collector's optional-dependency check) reports a missing *optional* dependency — an expected
|
|
129
|
+
* condition — rather than the `PKG_NOT_ON_DISK` warning reserved for genuinely missing
|
|
130
|
+
* production dependencies.
|
|
131
|
+
*/
|
|
132
|
+
protected logMissingDependency(pkgName: string, isDeclaredOptional?: boolean): void;
|
|
123
133
|
protected asyncExec(command: string, args: string[], cwd?: string): Promise<{
|
|
124
134
|
stdout: string | undefined;
|
|
125
135
|
stderr: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeModulesCollector.d.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,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;CAiClH"}
|
|
@@ -298,16 +298,23 @@ export class NodeModulesCollector {
|
|
|
298
298
|
const deps = (obj[key] || {}).dependencies || [];
|
|
299
299
|
for (const dep of deps) {
|
|
300
300
|
const child = this.transformToHoisterTree(obj, dep, nodes);
|
|
301
|
-
|
|
301
|
+
// a package that declares itself as a dependency (e.g. libsql) must not produce a self-edge
|
|
302
|
+
if (child !== node) {
|
|
303
|
+
node.dependencies.add(child);
|
|
304
|
+
}
|
|
302
305
|
}
|
|
303
306
|
}
|
|
304
307
|
return node;
|
|
305
308
|
}
|
|
306
|
-
async _getNodeModules(dependencies, result, archFilter) {
|
|
309
|
+
async _getNodeModules(dependencies, result, archFilter, ancestors = new Set()) {
|
|
307
310
|
if (dependencies.size === 0) {
|
|
308
311
|
return;
|
|
309
312
|
}
|
|
310
313
|
for (const d of dependencies.values()) {
|
|
314
|
+
// dependency cycles (including self-references) must not recurse
|
|
315
|
+
if (ancestors.has(d)) {
|
|
316
|
+
continue;
|
|
317
|
+
}
|
|
311
318
|
const reference = [...d.references][0];
|
|
312
319
|
const key = `${d.name}@${reference}`;
|
|
313
320
|
// Normalize the path to handle mixed separators from pnpm JSON output on Windows
|
|
@@ -345,14 +352,30 @@ export class NodeModulesCollector {
|
|
|
345
352
|
result.push(node);
|
|
346
353
|
if (d.dependencies.size > 0) {
|
|
347
354
|
node.dependencies = [];
|
|
348
|
-
|
|
355
|
+
ancestors.add(d);
|
|
356
|
+
await this._getNodeModules(d.dependencies, node.dependencies, archFilter, ancestors);
|
|
357
|
+
ancestors.delete(d);
|
|
349
358
|
}
|
|
350
359
|
}
|
|
351
360
|
result.sort((a, b) => a.name.localeCompare(b.name));
|
|
352
361
|
}
|
|
353
|
-
|
|
362
|
+
/**
|
|
363
|
+
* Records a dependency that could not be resolved on disk in the log summary.
|
|
364
|
+
*
|
|
365
|
+
* A platform-specific package name (e.g. `sass-embedded-linux-x64`) is always classified as a
|
|
366
|
+
* platform-specific optional dependency. Otherwise, `isDeclaredOptional` decides the bucket: a
|
|
367
|
+
* caller that *knows* the dependency was declared in `optionalDependencies` (e.g. the pnpm
|
|
368
|
+
* collector's optional-dependency check) reports a missing *optional* dependency — an expected
|
|
369
|
+
* condition — rather than the `PKG_NOT_ON_DISK` warning reserved for genuinely missing
|
|
370
|
+
* production dependencies.
|
|
371
|
+
*/
|
|
372
|
+
logMissingDependency(pkgName, isDeclaredOptional = false) {
|
|
354
373
|
const PLATFORM_PACKAGE_RE = /(linux|win32|darwin|freebsd|android)[-_](x64|arm64|ia32|arm|ppc64|s390x|loong64|riscv64|universal)/;
|
|
355
|
-
const diskLogKey = PLATFORM_PACKAGE_RE.test(pkgName)
|
|
374
|
+
const diskLogKey = PLATFORM_PACKAGE_RE.test(pkgName)
|
|
375
|
+
? LogMessageByKey.PKG_OPTIONAL_PLATFORM_NOT_INSTALLED
|
|
376
|
+
: isDeclaredOptional
|
|
377
|
+
? LogMessageByKey.PKG_OPTIONAL_NOT_INSTALLED
|
|
378
|
+
: LogMessageByKey.PKG_NOT_ON_DISK;
|
|
356
379
|
this.cache.logSummary[diskLogKey].push(pkgName);
|
|
357
380
|
}
|
|
358
381
|
async asyncExec(command, args, cwd = this.rootDir) {
|
|
@@ -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,QAAQ,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,KAAK,EAAwC,MAAM,YAAY,CAAA;AACxE,OAAO,EAAE,eAAe,EA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,EAAE,GAAG,EAAE,cAAc,EAAE;YACnF,4FAA4F;YAC5F,0FAA0F;YAC1F,8FAA8F;YAC9F,GAAG,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC;YACrC,sBAAsB,EAAE,GAAG;YAC3B,+BAA+B,EAAE,GAAG;SACrC,CAAC,CAAA;QAEF,0CAA0C;QAC1C,MAAM,YAAY,GAAG,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QAC5F,IAAI,YAAY,EAAE,CAAC;YACjB,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,uIAAuI,CAAC,CAAA;QAC1J,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,wDAAwD,CAAC,CAAA;YAC/E,yFAAyF;YACzF,qFAAqF;YACrF,uFAAuF;YACvF,yEAAyE;YACzE,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YAC1E,CAAC;QACH,CAAC;QACD,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,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({\n packageName,\n archFilter,\n ignoredDependencies,\n }: {\n packageName: string\n archFilter?: ArchFilter\n ignoredDependencies?: ReadonlyArray<string>\n }): 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 this.markExcludedModules(this.productionGraph, packageName, ignoredDependencies ?? [])\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 /**\n * Flags which modules must be omitted from the *copied* app output for the given `ignoredNames` by\n * setting an `excluded` marker on the pre-hoist graph nodes.\n *\n * Only a *top-level* production dependency (one the app itself declares) can be excluded, together\n * with its exclusively-owned transitive subtree. A package that is merely a transitive dependency of\n * a non-excluded production dependency is never excluded, even if its name is in `ignoredNames`:\n * only the root's own edges to ignored names are severed, so anything still reachable through another\n * production dependency stays reachable and is kept.\n *\n * Runs on the pre-hoist graph, where the true parent->child edges still exist, so a shared (deduped)\n * transitive dependency remains reachable and is kept while an ignored package's exclusive subtree\n * becomes unreachable and is flagged.\n */\n private markExcludedModules(graph: DependencyGraph, rootId: string, ignoredNames: ReadonlyArray<string>): void {\n const ignored = new Set(ignoredNames)\n if (ignored.size === 0) {\n return\n }\n\n const rootDeps = graph[rootId]?.dependencies ?? []\n const ignoredRootEdges = new Set(rootDeps.filter(dep => ignored.has(this.parseNameVersion(dep).name)))\n if (ignoredRootEdges.size === 0) {\n return\n }\n\n const reachable = new Set<string>()\n const stack: string[] = [rootId]\n while (stack.length > 0) {\n const id = stack.pop()!\n if (reachable.has(id)) {\n continue\n }\n reachable.add(id)\n const node = graph[id]\n if (node != null) {\n for (const dep of node.dependencies) {\n if (id === rootId && ignoredRootEdges?.has(dep)) {\n continue\n }\n if (!reachable.has(dep)) {\n stack.push(dep)\n }\n }\n }\n }\n for (const id of Object.keys(graph)) {\n if (!reachable.has(id)) {\n graph[id].excluded = true\n }\n }\n\n // Only directly-declared deps that actually ended up excluded (i.e. not still reachable via a kept\n // dependency) are surfaced to the user; their exclusive transitive subtree is omitted from the log.\n // Report the full `name@version` graph id — like the other logSummary buckets — so the log stays\n // truthful when another version of the same name still ships via a kept dependency (e.g. `debug@4`\n // excluded while `debug@3` remains bundled).\n const topLevelExcluded = new Set<string>()\n for (const dep of ignoredRootEdges) {\n if (!reachable.has(dep)) {\n topLevelExcluded.add(dep)\n }\n }\n if (topLevelExcluded.size > 0) {\n this.cache.logSummary[LogMessageByKey.PKG_EXCLUDED_IGNORED].push(...Array.from(topLevelExcluded).sort())\n }\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 excluded: this.productionGraph[key]?.excluded,\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"]}
|
|
1
|
+
{"version":3,"file":"nodeModulesCollector.js","sourceRoot":"","sources":["../../src/node-module-collector/nodeModulesCollector.ts"],"names":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CAAC;YACtB,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,wDAAwD,CAAC,CAAA;YAC/E,yFAAyF;YACzF,qFAAqF;YACrF,uFAAuF;YACvF,yEAAyE;YACzE,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YAC1E,CAAC;QACH,CAAC;QACD,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,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({\n packageName,\n archFilter,\n ignoredDependencies,\n }: {\n packageName: string\n archFilter?: ArchFilter\n ignoredDependencies?: ReadonlyArray<string>\n }): 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 this.markExcludedModules(this.productionGraph, packageName, ignoredDependencies ?? [])\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 /**\n * Flags which modules must be omitted from the *copied* app output for the given `ignoredNames` by\n * setting an `excluded` marker on the pre-hoist graph nodes.\n *\n * Only a *top-level* production dependency (one the app itself declares) can be excluded, together\n * with its exclusively-owned transitive subtree. A package that is merely a transitive dependency of\n * a non-excluded production dependency is never excluded, even if its name is in `ignoredNames`:\n * only the root's own edges to ignored names are severed, so anything still reachable through another\n * production dependency stays reachable and is kept.\n *\n * Runs on the pre-hoist graph, where the true parent->child edges still exist, so a shared (deduped)\n * transitive dependency remains reachable and is kept while an ignored package's exclusive subtree\n * becomes unreachable and is flagged.\n */\n private markExcludedModules(graph: DependencyGraph, rootId: string, ignoredNames: ReadonlyArray<string>): void {\n const ignored = new Set(ignoredNames)\n if (ignored.size === 0) {\n return\n }\n\n const rootDeps = graph[rootId]?.dependencies ?? []\n const ignoredRootEdges = new Set(rootDeps.filter(dep => ignored.has(this.parseNameVersion(dep).name)))\n if (ignoredRootEdges.size === 0) {\n return\n }\n\n const reachable = new Set<string>()\n const stack: string[] = [rootId]\n while (stack.length > 0) {\n const id = stack.pop()!\n if (reachable.has(id)) {\n continue\n }\n reachable.add(id)\n const node = graph[id]\n if (node != null) {\n for (const dep of node.dependencies) {\n if (id === rootId && ignoredRootEdges?.has(dep)) {\n continue\n }\n if (!reachable.has(dep)) {\n stack.push(dep)\n }\n }\n }\n }\n for (const id of Object.keys(graph)) {\n if (!reachable.has(id)) {\n graph[id].excluded = true\n }\n }\n\n // Only directly-declared deps that actually ended up excluded (i.e. not still reachable via a kept\n // dependency) are surfaced to the user; their exclusive transitive subtree is omitted from the log.\n // Report the full `name@version` graph id — like the other logSummary buckets — so the log stays\n // truthful when another version of the same name still ships via a kept dependency (e.g. `debug@4`\n // excluded while `debug@3` remains bundled).\n const topLevelExcluded = new Set<string>()\n for (const dep of ignoredRootEdges) {\n if (!reachable.has(dep)) {\n topLevelExcluded.add(dep)\n }\n }\n if (topLevelExcluded.size > 0) {\n this.cache.logSummary[LogMessageByKey.PKG_EXCLUDED_IGNORED].push(...Array.from(topLevelExcluded).sort())\n }\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 // a package that declares itself as a dependency (e.g. libsql) must not produce a self-edge\n if (child !== node) {\n node.dependencies.add(child)\n }\n }\n }\n\n return node\n }\n\n private async _getNodeModules(dependencies: Set<HoisterResult>, result: NodeModuleInfo[], archFilter?: ArchFilter, ancestors: Set<HoisterResult> = new Set()) {\n if (dependencies.size === 0) {\n return\n }\n\n for (const d of dependencies.values()) {\n // dependency cycles (including self-references) must not recurse\n if (ancestors.has(d)) {\n continue\n }\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 excluded: this.productionGraph[key]?.excluded,\n }\n result.push(node)\n if (d.dependencies.size > 0) {\n node.dependencies = []\n ancestors.add(d)\n await this._getNodeModules(d.dependencies, node.dependencies, archFilter, ancestors)\n ancestors.delete(d)\n }\n }\n result.sort((a, b) => a.name.localeCompare(b.name))\n }\n\n /**\n * Records a dependency that could not be resolved on disk in the log summary.\n *\n * A platform-specific package name (e.g. `sass-embedded-linux-x64`) is always classified as a\n * platform-specific optional dependency. Otherwise, `isDeclaredOptional` decides the bucket: a\n * caller that *knows* the dependency was declared in `optionalDependencies` (e.g. the pnpm\n * collector's optional-dependency check) reports a missing *optional* dependency — an expected\n * condition — rather than the `PKG_NOT_ON_DISK` warning reserved for genuinely missing\n * production dependencies.\n */\n protected logMissingDependency(pkgName: string, isDeclaredOptional = false) {\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)\n ? LogMessageByKey.PKG_OPTIONAL_PLATFORM_NOT_INSTALLED\n : isDeclaredOptional\n ? LogMessageByKey.PKG_OPTIONAL_NOT_INSTALLED\n : 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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pnpmNodeModulesCollector.d.ts","sourceRoot":"","sources":["../../src/node-module-collector/pnpmNodeModulesCollector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAA4B,EAAE,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,YAAY,CAAA;AAG7D,qBAAa,wBAAyB,SAAQ,oBAAoB,CAAC,cAAc,EAAE,cAAc,CAAC;IAChG,SAAgB,cAAc;;;MAG7B;IAGD,OAAO,CAAC,qBAAqB,CAAuB;IAEpD,OAAO,CAAC,iBAAiB,CAAI;IAE7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAI1B;IAEF;;;;;;;;;;;;;OAaG;IACH,UAAmB,SAAS,gBAwB1B;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkD;IAE7E;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyB;IAEvD;sGACkG;IAClG,OAAO,CAAC,cAAc,CAA2C;IAEjE;;;;OAIG;IACH,OAAO,KAAK,oBAAoB,GAK/B;IAED,SAAS,CAAC,OAAO,IAAI,MAAM,EAAE;IAI7B,OAAO,CAAC,gBAAgB;IAaxB;;;;;OAKG;YACW,mBAAmB;cAwDjB,gCAAgC,CAAC,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"pnpmNodeModulesCollector.d.ts","sourceRoot":"","sources":["../../src/node-module-collector/pnpmNodeModulesCollector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAG/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAA4B,EAAE,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,YAAY,CAAA;AAG7D,qBAAa,wBAAyB,SAAQ,oBAAoB,CAAC,cAAc,EAAE,cAAc,CAAC;IAChG,SAAgB,cAAc;;;MAG7B;IAGD,OAAO,CAAC,qBAAqB,CAAuB;IAEpD,OAAO,CAAC,iBAAiB,CAAI;IAE7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAI1B;IAEF;;;;;;;;;;;;;OAaG;IACH,UAAmB,SAAS,gBAwB1B;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkD;IAE7E;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyB;IAEvD;sGACkG;IAClG,OAAO,CAAC,cAAc,CAA2C;IAEjE;;;;OAIG;IACH,OAAO,KAAK,oBAAoB,GAK/B;IAED,SAAS,CAAC,OAAO,IAAI,MAAM,EAAE;IAI7B,OAAO,CAAC,gBAAgB;IAaxB;;;;;OAKG;YACW,mBAAmB;cAwDjB,gCAAgC,CAAC,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM;cA2E3E,sBAAsB,CAAC,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASrG;;;;;;;;;OASG;IACH,OAAO,CAAC,iBAAiB;YAkBX,iBAAiB;IAK/B;;;;;;;OAOG;YACW,QAAQ;YA+CR,sBAAsB;IASpC;;;;OAIG;YACW,0BAA0B;cA+BrB,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,GAAG,cAAc;cAYnF,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CAMjF"}
|
|
@@ -210,7 +210,9 @@ export class PnpmNodeModulesCollector extends NodeModulesCollector {
|
|
|
210
210
|
if (optional[packageName]) {
|
|
211
211
|
const pkg = await this.locateFromDepOrRoot(packageName, tree.path, dependency.version);
|
|
212
212
|
if (!pkg) {
|
|
213
|
-
|
|
213
|
+
// Declared in `optionalDependencies`, so a miss is an expected condition (e.g. fsevents
|
|
214
|
+
// on Linux/Windows) — classify it as a missing optional dependency, not PKG_NOT_ON_DISK.
|
|
215
|
+
this.logMissingDependency(`${packageName}@${dependency.version}`, true);
|
|
214
216
|
return undefined;
|
|
215
217
|
}
|
|
216
218
|
}
|