app-builder-lib 26.17.0 → 26.18.1
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/out/asar/asarUtil.js +7 -2
- package/out/asar/asarUtil.js.map +1 -1
- package/out/codeSign/windowsSignToolManager.d.ts +11 -0
- package/out/codeSign/windowsSignToolManager.js +26 -14
- package/out/codeSign/windowsSignToolManager.js.map +1 -1
- package/out/electron/ElectronFramework.d.ts +15 -0
- package/out/electron/ElectronFramework.js +36 -2
- package/out/electron/ElectronFramework.js.map +1 -1
- package/out/electron/electronMac.js +2 -28
- package/out/electron/electronMac.js.map +1 -1
- package/out/electron/electronMacUtils.d.ts +8 -0
- package/out/electron/electronMacUtils.js +40 -0
- package/out/electron/electronMacUtils.js.map +1 -0
- package/out/forge-maker.d.ts +64 -0
- package/out/forge-maker.js +108 -2
- package/out/forge-maker.js.map +1 -1
- package/out/index.d.ts +1 -1
- package/out/index.js +3 -1
- package/out/index.js.map +1 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +37 -0
- package/out/node-module-collector/pnpmNodeModulesCollector.js +102 -24
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/out/options/winOptions.d.ts +2 -1
- package/out/options/winOptions.js.map +1 -1
- package/out/targets/archive.d.ts +6 -0
- package/out/targets/archive.js +12 -2
- package/out/targets/archive.js.map +1 -1
- package/out/targets/blockmap/blockmap.d.ts +43 -3
- package/out/targets/blockmap/blockmap.js +143 -16
- package/out/targets/blockmap/blockmap.js.map +1 -1
- package/out/targets/blockmap/verbatimRange.d.ts +43 -0
- package/out/targets/blockmap/verbatimRange.js +122 -0
- package/out/targets/blockmap/verbatimRange.js.map +1 -0
- package/out/targets/differentialUpdateInfoBuilder.d.ts +27 -2
- package/out/targets/differentialUpdateInfoBuilder.js +81 -5
- package/out/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/out/targets/nsis/NsisTarget.d.ts +35 -2
- package/out/targets/nsis/NsisTarget.js +121 -29
- package/out/targets/nsis/NsisTarget.js.map +1 -1
- package/out/targets/nsis/nsisOptions.d.ts +8 -3
- package/out/targets/nsis/nsisOptions.js.map +1 -1
- package/out/targets/nsis/nsisUtil.d.ts +7 -0
- package/out/targets/nsis/nsisUtil.js +14 -3
- package/out/targets/nsis/nsisUtil.js.map +1 -1
- package/out/targets/snap/core24.d.ts +2 -0
- package/out/targets/snap/core24.js +30 -7
- package/out/targets/snap/core24.js.map +1 -1
- package/out/targets/snap/coreLegacy.js +1 -2
- package/out/targets/snap/coreLegacy.js.map +1 -1
- package/out/util/appFileCopier.js +1 -1
- package/out/util/appFileCopier.js.map +1 -1
- package/out/version.d.ts +1 -1
- package/out/version.js +1 -1
- package/out/version.js.map +1 -1
- package/package.json +11 -9
- package/scheme.json +6 -6
|
@@ -9,6 +9,7 @@ const appInfo_1 = require("../appInfo");
|
|
|
9
9
|
const platformPackager_1 = require("../platformPackager");
|
|
10
10
|
const plist_1 = require("../util/plist");
|
|
11
11
|
const ElectronFramework_1 = require("./ElectronFramework");
|
|
12
|
+
const electronMacUtils_1 = require("./electronMacUtils");
|
|
12
13
|
function doRename(basePath, oldName, newName) {
|
|
13
14
|
return (0, promises_1.rename)(path.join(basePath, oldName), path.join(basePath, newName));
|
|
14
15
|
}
|
|
@@ -94,7 +95,7 @@ async function createMacApp(packager, appOutDir, asarIntegrity, isMas) {
|
|
|
94
95
|
await packager.applyCommonInfo(appPlist, contentsPath);
|
|
95
96
|
// required for electron-updater proxy
|
|
96
97
|
if (!isMas) {
|
|
97
|
-
configureLocalhostAts(appPlist);
|
|
98
|
+
(0, electronMacUtils_1.configureLocalhostAts)(appPlist);
|
|
98
99
|
}
|
|
99
100
|
if (helperPlist != null) {
|
|
100
101
|
helperPlist.CFBundleExecutable = `${appFilename} Helper`;
|
|
@@ -228,31 +229,4 @@ async function createMacApp(packager, appOutDir, asarIntegrity, isMas) {
|
|
|
228
229
|
const now = Date.now() / 1000;
|
|
229
230
|
await (0, promises_1.utimes)(appPath, now, now);
|
|
230
231
|
}
|
|
231
|
-
function configureLocalhostAts(appPlist) {
|
|
232
|
-
// https://bencoding.com/2015/07/20/app-transport-security-and-localhost/
|
|
233
|
-
let ats = appPlist.NSAppTransportSecurity;
|
|
234
|
-
if (ats == null) {
|
|
235
|
-
ats = {};
|
|
236
|
-
appPlist.NSAppTransportSecurity = ats;
|
|
237
|
-
}
|
|
238
|
-
ats.NSAllowsLocalNetworking = true;
|
|
239
|
-
// https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814
|
|
240
|
-
ats.NSAllowsArbitraryLoads = true;
|
|
241
|
-
let exceptionDomains = ats.NSExceptionDomains;
|
|
242
|
-
if (exceptionDomains == null) {
|
|
243
|
-
exceptionDomains = {};
|
|
244
|
-
ats.NSExceptionDomains = exceptionDomains;
|
|
245
|
-
}
|
|
246
|
-
if (exceptionDomains.localhost == null) {
|
|
247
|
-
const allowHttp = {
|
|
248
|
-
NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,
|
|
249
|
-
NSIncludesSubdomains: false,
|
|
250
|
-
NSTemporaryExceptionAllowsInsecureHTTPLoads: true,
|
|
251
|
-
NSTemporaryExceptionMinimumTLSVersion: "1.0",
|
|
252
|
-
NSTemporaryExceptionRequiresForwardSecrecy: false,
|
|
253
|
-
};
|
|
254
|
-
exceptionDomains.localhost = allowHttp;
|
|
255
|
-
exceptionDomains["127.0.0.1"] = allowHttp;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
232
|
//# sourceMappingURL=electronMac.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"electronMac.js","sourceRoot":"","sources":["../../src/electron/electronMac.ts"],"names":[],"mappings":";;AAmDA,oCAwOC;AA3RD,+CAA+G;AAC/G,0CAA4C;AAC5C,6BAA4B;AAC5B,yBAAwB;AACxB,wCAAqD;AAGrD,0DAAkD;AAClD,yCAAsF;AACtF,2DAAwD;AAExD,SAAS,QAAQ,CAAC,QAA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C","sourcesContent":["import { asArray, copyOrLinkFile, getPlatformIconFileName, InvalidConfigurationError, log } from \"builder-util\"\nimport { rename, utimes } from \"fs/promises\"\nimport * as path from \"path\"\nimport * as fs from \"fs\"\nimport { filterCFBundleIdentifier } from \"../appInfo\"\nimport { AsarIntegrity } from \"../asar/integrity\"\nimport { MacPackager } from \"../macPackager\"\nimport { normalizeExt } from \"../platformPackager\"\nimport { savePlistFile, parsePlistFile, PlistObject, PlistValue } from \"../util/plist\"\nimport { createBrandingOpts } from \"./ElectronFramework\"\n\nfunction doRename(basePath: string, oldName: string, newName: string) {\n return rename(path.join(basePath, oldName), path.join(basePath, newName))\n}\n\nfunction moveHelpers(helperSuffixes: Array<string>, frameworksPath: string, appName: string, prefix: string): Promise<any> {\n return Promise.all(\n helperSuffixes.map(suffix => {\n const executableBasePath = path.join(frameworksPath, `${prefix}${suffix}.app`, \"Contents\", \"MacOS\")\n return doRename(executableBasePath, `${prefix}${suffix}`, appName + suffix).then(() => doRename(frameworksPath, `${prefix}${suffix}.app`, `${appName}${suffix}.app`))\n })\n )\n}\n\nfunction getAvailableHelperSuffixes(\n helperEHPlist: PlistObject | null,\n helperNPPlist: PlistObject | null,\n helperRendererPlist: PlistObject | null,\n helperPluginPlist: PlistObject | null,\n helperGPUPlist: PlistObject | null\n) {\n const result = [\" Helper\"]\n if (helperEHPlist != null) {\n result.push(\" Helper EH\")\n }\n if (helperNPPlist != null) {\n result.push(\" Helper NP\")\n }\n if (helperRendererPlist != null) {\n result.push(\" Helper (Renderer)\")\n }\n if (helperPluginPlist != null) {\n result.push(\" Helper (Plugin)\")\n }\n if (helperGPUPlist != null) {\n result.push(\" Helper (GPU)\")\n }\n return result\n}\n\n/** @internal */\nexport async function createMacApp(packager: MacPackager, appOutDir: string, asarIntegrity: AsarIntegrity | null, isMas: boolean) {\n const appInfo = packager.appInfo\n // Electon uses the application name (CFBundleName) to resolve helper apps\n // https://github.com/electron/electron/blob/main/shell/app/electron_main_delegate_mac.mm\n // https://github.com/electron-userland/electron-builder/issues/6962\n const appFilename = appInfo.sanitizedProductName\n const electronBranding = createBrandingOpts(packager.config)\n\n const contentsPath = path.join(appOutDir, packager.info.framework.distMacOsAppName, \"Contents\")\n const frameworksPath = path.join(contentsPath, \"Frameworks\")\n const loginItemPath = path.join(contentsPath, \"Library\", \"LoginItems\")\n\n const appPlistFilename = path.join(contentsPath, \"Info.plist\")\n const helperPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper.app`, \"Contents\", \"Info.plist\")\n const helperEHPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper EH.app`, \"Contents\", \"Info.plist\")\n const helperNPPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper NP.app`, \"Contents\", \"Info.plist\")\n const helperRendererPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Renderer).app`, \"Contents\", \"Info.plist\")\n const helperPluginPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Plugin).app`, \"Contents\", \"Info.plist\")\n const helperGPUPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (GPU).app`, \"Contents\", \"Info.plist\")\n const helperLoginPlistFilename = path.join(loginItemPath, `${electronBranding.productName} Login Helper.app`, \"Contents\", \"Info.plist\")\n\n const safeParsePlistFile = async (filePath: string): Promise<PlistObject | null> => {\n if (!fs.existsSync(filePath)) {\n return null\n }\n return await parsePlistFile(filePath)\n }\n\n const appPlist = (await safeParsePlistFile(appPlistFilename))!\n if (appPlist == null) {\n throw new Error(\"corrupted Electron dist\")\n }\n\n // Replace the multiple parsePlistFile calls with:\n const helperPlist = await safeParsePlistFile(helperPlistFilename)\n const helperEHPlist = await safeParsePlistFile(helperEHPlistFilename)\n const helperNPPlist = await safeParsePlistFile(helperNPPlistFilename)\n const helperRendererPlist = await safeParsePlistFile(helperRendererPlistFilename)\n const helperPluginPlist = await safeParsePlistFile(helperPluginPlistFilename)\n const helperGPUPlist = await safeParsePlistFile(helperGPUPlistFilename)\n const helperLoginPlist = await safeParsePlistFile(helperLoginPlistFilename)\n\n const buildMetadata = packager.config\n\n /**\n * Configure bundleIdentifier for the generic Electron Helper process\n *\n * This was the only Helper in Electron 5 and before. Allow users to configure\n * the bundleIdentifier for continuity.\n */\n\n const oldHelperBundleId = (buildMetadata as any)[\"helper-bundle-id\"]\n if (oldHelperBundleId != null) {\n log.warn(\"build.helper-bundle-id is deprecated, please set as build.mac.helperBundleId\")\n }\n\n const defaultAppId = packager.platformSpecificBuildOptions.appId\n const cfBundleIdentifier = filterCFBundleIdentifier((isMas ? packager.config.mas?.appId : defaultAppId) || defaultAppId || appInfo.macBundleIdentifier)\n\n const defaultHelperId = packager.platformSpecificBuildOptions.helperBundleId\n const helperBundleIdentifier = filterCFBundleIdentifier(\n (isMas ? packager.config.mas?.helperBundleId : defaultHelperId) || defaultHelperId || oldHelperBundleId || `${cfBundleIdentifier}.helper`\n )\n\n appPlist.CFBundleIdentifier = cfBundleIdentifier\n\n await packager.applyCommonInfo(appPlist, contentsPath)\n\n // required for electron-updater proxy\n if (!isMas) {\n configureLocalhostAts(appPlist)\n }\n\n if (helperPlist != null) {\n helperPlist.CFBundleExecutable = `${appFilename} Helper`\n helperPlist.CFBundleDisplayName = `${appInfo.productName} Helper`\n helperPlist.CFBundleIdentifier = helperBundleIdentifier\n helperPlist.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n /**\n * Configure bundleIdentifier for Electron 5+ Helper processes\n *\n * In Electron 6, parts of the generic Electron Helper process were split into\n * individual helper processes. Allow users to configure the bundleIdentifiers\n * for continuity, specifically because macOS keychain access relies on\n * bundleIdentifiers not changing (i.e. across versions of Electron).\n */\n\n function configureHelper(helper: any, postfix: string, userProvidedBundleIdentifier?: string | null) {\n helper.CFBundleExecutable = `${appFilename} Helper ${postfix}`\n helper.CFBundleDisplayName = `${appInfo.productName} Helper ${postfix}`\n helper.CFBundleIdentifier = userProvidedBundleIdentifier\n ? filterCFBundleIdentifier(userProvidedBundleIdentifier)\n : filterCFBundleIdentifier(`${helperBundleIdentifier}.${postfix}`)\n helper.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n if (helperRendererPlist != null) {\n configureHelper(helperRendererPlist, \"(Renderer)\", packager.platformSpecificBuildOptions.helperRendererBundleId)\n }\n if (helperPluginPlist != null) {\n configureHelper(helperPluginPlist, \"(Plugin)\", packager.platformSpecificBuildOptions.helperPluginBundleId)\n }\n if (helperGPUPlist != null) {\n configureHelper(helperGPUPlist, \"(GPU)\", packager.platformSpecificBuildOptions.helperGPUBundleId)\n }\n if (helperEHPlist != null) {\n configureHelper(helperEHPlist, \"EH\", packager.platformSpecificBuildOptions.helperEHBundleId)\n }\n if (helperNPPlist != null) {\n configureHelper(helperNPPlist, \"NP\", packager.platformSpecificBuildOptions.helperNPBundleId)\n }\n if (helperLoginPlist != null) {\n helperLoginPlist.CFBundleExecutable = `${appFilename} Login Helper`\n helperLoginPlist.CFBundleDisplayName = `${appInfo.productName} Login Helper`\n // noinspection SpellCheckingInspection\n helperLoginPlist.CFBundleIdentifier = `${cfBundleIdentifier}.loginhelper`\n helperLoginPlist.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n const protocols = asArray(buildMetadata.protocols).concat(asArray(packager.platformSpecificBuildOptions.protocols))\n if (protocols.length > 0) {\n appPlist.CFBundleURLTypes = protocols.map(protocol => {\n const schemes = asArray(protocol.schemes)\n if (schemes.length === 0) {\n throw new InvalidConfigurationError(`Protocol \"${protocol.name}\": must be at least one scheme specified`)\n }\n return {\n CFBundleURLName: protocol.name,\n CFBundleTypeRole: protocol.role || \"Editor\",\n CFBundleURLSchemes: schemes.slice(),\n }\n })\n }\n\n const fileAssociations = packager.fileAssociations\n if (fileAssociations.length > 0) {\n const documentTypes = await Promise.all(\n fileAssociations.map(async fileAssociation => {\n const extensions = asArray(fileAssociation.ext).map(normalizeExt)\n const customIcon = await packager.getResource(getPlatformIconFileName(fileAssociation.icon, true), `${extensions[0]}.icns`)\n let iconFile = appPlist.CFBundleIconFile\n if (customIcon != null) {\n iconFile = path.basename(customIcon)\n await copyOrLinkFile(customIcon, path.join(path.join(contentsPath, \"Resources\"), iconFile))\n }\n\n const result = {\n CFBundleTypeExtensions: extensions,\n CFBundleTypeName: fileAssociation.name || extensions[0],\n CFBundleTypeRole: fileAssociation.role || \"Editor\",\n LSHandlerRank: fileAssociation.rank || \"Default\",\n CFBundleTypeIconFile: iconFile,\n } as any\n\n if (fileAssociation.isPackage) {\n result.LSTypeIsPackage = true\n }\n return result\n })\n )\n\n // `CFBundleDocumentTypes` may be defined in `mac.extendInfo`, so we need to merge it in that case\n appPlist.CFBundleDocumentTypes = [...((appPlist.CFBundleDocumentTypes as PlistValue[]) || []), ...documentTypes]\n }\n\n const toPlistObject = (asarIntegrity: AsarIntegrity): PlistObject => {\n const result: PlistObject = {}\n for (const [filePath, headerHash] of Object.entries(asarIntegrity)) {\n result[filePath] = {\n algorithm: headerHash.algorithm,\n hash: headerHash.hash,\n }\n }\n return result\n }\n\n if (asarIntegrity != null) {\n appPlist.ElectronAsarIntegrity = toPlistObject(asarIntegrity)\n }\n\n if (helperEHPlist != null) {\n await savePlistFile(helperEHPlistFilename, helperEHPlist)\n }\n\n if (helperNPPlist != null) {\n await savePlistFile(helperNPPlistFilename, helperNPPlist)\n }\n\n if (helperRendererPlist != null) {\n await savePlistFile(helperRendererPlistFilename, helperRendererPlist)\n }\n\n if (helperPluginPlist != null) {\n await savePlistFile(helperPluginPlistFilename, helperPluginPlist)\n }\n\n if (helperGPUPlist != null) {\n await savePlistFile(helperGPUPlistFilename, helperGPUPlist)\n }\n\n if (helperLoginPlist != null) {\n await savePlistFile(helperLoginPlistFilename, helperLoginPlist)\n }\n\n await savePlistFile(appPlistFilename, appPlist)\n if (helperPlist != null) {\n await savePlistFile(helperPlistFilename, helperPlist)\n }\n\n await doRename(path.join(contentsPath, \"MacOS\"), electronBranding.productName, appPlist.CFBundleExecutable as string)\n\n await moveHelpers(\n getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist),\n frameworksPath,\n appFilename,\n electronBranding.productName\n )\n\n if (helperLoginPlist != null) {\n const prefix = electronBranding.productName\n const suffix = \" Login Helper\"\n const executableBasePath = path.join(loginItemPath, `${prefix}${suffix}.app`, \"Contents\", \"MacOS\")\n await doRename(executableBasePath, `${prefix}${suffix}`, appFilename + suffix).then(() => doRename(loginItemPath, `${prefix}${suffix}.app`, `${appFilename}${suffix}.app`))\n }\n\n const appPath = path.join(appOutDir, `${appInfo.productFilename}.app`)\n await rename(path.dirname(contentsPath), appPath)\n // https://github.com/electron-userland/electron-builder/issues/840\n const now = Date.now() / 1000\n await utimes(appPath, now, now)\n}\n\nfunction configureLocalhostAts(appPlist: any) {\n // https://bencoding.com/2015/07/20/app-transport-security-and-localhost/\n let ats = appPlist.NSAppTransportSecurity\n if (ats == null) {\n ats = {}\n appPlist.NSAppTransportSecurity = ats\n }\n\n ats.NSAllowsLocalNetworking = true\n // https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814\n ats.NSAllowsArbitraryLoads = true\n\n let exceptionDomains = ats.NSExceptionDomains\n if (exceptionDomains == null) {\n exceptionDomains = {}\n ats.NSExceptionDomains = exceptionDomains\n }\n\n if (exceptionDomains.localhost == null) {\n const allowHttp = {\n NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,\n NSIncludesSubdomains: false,\n NSTemporaryExceptionAllowsInsecureHTTPLoads: true,\n NSTemporaryExceptionMinimumTLSVersion: \"1.0\",\n NSTemporaryExceptionRequiresForwardSecrecy: false,\n }\n exceptionDomains.localhost = allowHttp\n exceptionDomains[\"127.0.0.1\"] = allowHttp\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"electronMac.js","sourceRoot":"","sources":["../../src/electron/electronMac.ts"],"names":[],"mappings":";;AAoDA,oCAwOC;AA5RD,+CAA+G;AAC/G,0CAA4C;AAC5C,6BAA4B;AAC5B,yBAAwB;AACxB,wCAAqD;AAGrD,0DAAkD;AAClD,y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AAM,MAAM,EAAE,GAAG,WAAW,GAAG,MAAM,MAAM,CAAC,CAAC,CAAA;IAC7K,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,OAAO,CAAC,eAAe,MAAM,CAAC,CAAA;IACtE,MAAM,IAAA,iBAAM,EAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,CAAA;IACjD,mEAAmE;IACnE,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA;IAC7B,MAAM,IAAA,iBAAM,EAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AACjC,CAAC","sourcesContent":["import { asArray, copyOrLinkFile, getPlatformIconFileName, InvalidConfigurationError, log } from \"builder-util\"\nimport { rename, utimes } from \"fs/promises\"\nimport * as path from \"path\"\nimport * as fs from \"fs\"\nimport { filterCFBundleIdentifier } from \"../appInfo\"\nimport { AsarIntegrity } from \"../asar/integrity\"\nimport { MacPackager } from \"../macPackager\"\nimport { normalizeExt } from \"../platformPackager\"\nimport { savePlistFile, parsePlistFile, PlistObject, PlistValue } from \"../util/plist\"\nimport { createBrandingOpts } from \"./ElectronFramework\"\nimport { configureLocalhostAts } from \"./electronMacUtils\"\n\nfunction doRename(basePath: string, oldName: string, newName: string) {\n return rename(path.join(basePath, oldName), path.join(basePath, newName))\n}\n\nfunction moveHelpers(helperSuffixes: Array<string>, frameworksPath: string, appName: string, prefix: string): Promise<any> {\n return Promise.all(\n helperSuffixes.map(suffix => {\n const executableBasePath = path.join(frameworksPath, `${prefix}${suffix}.app`, \"Contents\", \"MacOS\")\n return doRename(executableBasePath, `${prefix}${suffix}`, appName + suffix).then(() => doRename(frameworksPath, `${prefix}${suffix}.app`, `${appName}${suffix}.app`))\n })\n )\n}\n\nfunction getAvailableHelperSuffixes(\n helperEHPlist: PlistObject | null,\n helperNPPlist: PlistObject | null,\n helperRendererPlist: PlistObject | null,\n helperPluginPlist: PlistObject | null,\n helperGPUPlist: PlistObject | null\n) {\n const result = [\" Helper\"]\n if (helperEHPlist != null) {\n result.push(\" Helper EH\")\n }\n if (helperNPPlist != null) {\n result.push(\" Helper NP\")\n }\n if (helperRendererPlist != null) {\n result.push(\" Helper (Renderer)\")\n }\n if (helperPluginPlist != null) {\n result.push(\" Helper (Plugin)\")\n }\n if (helperGPUPlist != null) {\n result.push(\" Helper (GPU)\")\n }\n return result\n}\n\n/** @internal */\nexport async function createMacApp(packager: MacPackager, appOutDir: string, asarIntegrity: AsarIntegrity | null, isMas: boolean) {\n const appInfo = packager.appInfo\n // Electon uses the application name (CFBundleName) to resolve helper apps\n // https://github.com/electron/electron/blob/main/shell/app/electron_main_delegate_mac.mm\n // https://github.com/electron-userland/electron-builder/issues/6962\n const appFilename = appInfo.sanitizedProductName\n const electronBranding = createBrandingOpts(packager.config)\n\n const contentsPath = path.join(appOutDir, packager.info.framework.distMacOsAppName, \"Contents\")\n const frameworksPath = path.join(contentsPath, \"Frameworks\")\n const loginItemPath = path.join(contentsPath, \"Library\", \"LoginItems\")\n\n const appPlistFilename = path.join(contentsPath, \"Info.plist\")\n const helperPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper.app`, \"Contents\", \"Info.plist\")\n const helperEHPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper EH.app`, \"Contents\", \"Info.plist\")\n const helperNPPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper NP.app`, \"Contents\", \"Info.plist\")\n const helperRendererPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Renderer).app`, \"Contents\", \"Info.plist\")\n const helperPluginPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Plugin).app`, \"Contents\", \"Info.plist\")\n const helperGPUPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (GPU).app`, \"Contents\", \"Info.plist\")\n const helperLoginPlistFilename = path.join(loginItemPath, `${electronBranding.productName} Login Helper.app`, \"Contents\", \"Info.plist\")\n\n const safeParsePlistFile = async (filePath: string): Promise<PlistObject | null> => {\n if (!fs.existsSync(filePath)) {\n return null\n }\n return await parsePlistFile(filePath)\n }\n\n const appPlist = (await safeParsePlistFile(appPlistFilename))!\n if (appPlist == null) {\n throw new Error(\"corrupted Electron dist\")\n }\n\n // Replace the multiple parsePlistFile calls with:\n const helperPlist = await safeParsePlistFile(helperPlistFilename)\n const helperEHPlist = await safeParsePlistFile(helperEHPlistFilename)\n const helperNPPlist = await safeParsePlistFile(helperNPPlistFilename)\n const helperRendererPlist = await safeParsePlistFile(helperRendererPlistFilename)\n const helperPluginPlist = await safeParsePlistFile(helperPluginPlistFilename)\n const helperGPUPlist = await safeParsePlistFile(helperGPUPlistFilename)\n const helperLoginPlist = await safeParsePlistFile(helperLoginPlistFilename)\n\n const buildMetadata = packager.config\n\n /**\n * Configure bundleIdentifier for the generic Electron Helper process\n *\n * This was the only Helper in Electron 5 and before. Allow users to configure\n * the bundleIdentifier for continuity.\n */\n\n const oldHelperBundleId = (buildMetadata as any)[\"helper-bundle-id\"]\n if (oldHelperBundleId != null) {\n log.warn(\"build.helper-bundle-id is deprecated, please set as build.mac.helperBundleId\")\n }\n\n const defaultAppId = packager.platformSpecificBuildOptions.appId\n const cfBundleIdentifier = filterCFBundleIdentifier((isMas ? packager.config.mas?.appId : defaultAppId) || defaultAppId || appInfo.macBundleIdentifier)\n\n const defaultHelperId = packager.platformSpecificBuildOptions.helperBundleId\n const helperBundleIdentifier = filterCFBundleIdentifier(\n (isMas ? packager.config.mas?.helperBundleId : defaultHelperId) || defaultHelperId || oldHelperBundleId || `${cfBundleIdentifier}.helper`\n )\n\n appPlist.CFBundleIdentifier = cfBundleIdentifier\n\n await packager.applyCommonInfo(appPlist, contentsPath)\n\n // required for electron-updater proxy\n if (!isMas) {\n configureLocalhostAts(appPlist)\n }\n\n if (helperPlist != null) {\n helperPlist.CFBundleExecutable = `${appFilename} Helper`\n helperPlist.CFBundleDisplayName = `${appInfo.productName} Helper`\n helperPlist.CFBundleIdentifier = helperBundleIdentifier\n helperPlist.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n /**\n * Configure bundleIdentifier for Electron 5+ Helper processes\n *\n * In Electron 6, parts of the generic Electron Helper process were split into\n * individual helper processes. Allow users to configure the bundleIdentifiers\n * for continuity, specifically because macOS keychain access relies on\n * bundleIdentifiers not changing (i.e. across versions of Electron).\n */\n\n function configureHelper(helper: any, postfix: string, userProvidedBundleIdentifier?: string | null) {\n helper.CFBundleExecutable = `${appFilename} Helper ${postfix}`\n helper.CFBundleDisplayName = `${appInfo.productName} Helper ${postfix}`\n helper.CFBundleIdentifier = userProvidedBundleIdentifier\n ? filterCFBundleIdentifier(userProvidedBundleIdentifier)\n : filterCFBundleIdentifier(`${helperBundleIdentifier}.${postfix}`)\n helper.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n if (helperRendererPlist != null) {\n configureHelper(helperRendererPlist, \"(Renderer)\", packager.platformSpecificBuildOptions.helperRendererBundleId)\n }\n if (helperPluginPlist != null) {\n configureHelper(helperPluginPlist, \"(Plugin)\", packager.platformSpecificBuildOptions.helperPluginBundleId)\n }\n if (helperGPUPlist != null) {\n configureHelper(helperGPUPlist, \"(GPU)\", packager.platformSpecificBuildOptions.helperGPUBundleId)\n }\n if (helperEHPlist != null) {\n configureHelper(helperEHPlist, \"EH\", packager.platformSpecificBuildOptions.helperEHBundleId)\n }\n if (helperNPPlist != null) {\n configureHelper(helperNPPlist, \"NP\", packager.platformSpecificBuildOptions.helperNPBundleId)\n }\n if (helperLoginPlist != null) {\n helperLoginPlist.CFBundleExecutable = `${appFilename} Login Helper`\n helperLoginPlist.CFBundleDisplayName = `${appInfo.productName} Login Helper`\n // noinspection SpellCheckingInspection\n helperLoginPlist.CFBundleIdentifier = `${cfBundleIdentifier}.loginhelper`\n helperLoginPlist.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n const protocols = asArray(buildMetadata.protocols).concat(asArray(packager.platformSpecificBuildOptions.protocols))\n if (protocols.length > 0) {\n appPlist.CFBundleURLTypes = protocols.map(protocol => {\n const schemes = asArray(protocol.schemes)\n if (schemes.length === 0) {\n throw new InvalidConfigurationError(`Protocol \"${protocol.name}\": must be at least one scheme specified`)\n }\n return {\n CFBundleURLName: protocol.name,\n CFBundleTypeRole: protocol.role || \"Editor\",\n CFBundleURLSchemes: schemes.slice(),\n }\n })\n }\n\n const fileAssociations = packager.fileAssociations\n if (fileAssociations.length > 0) {\n const documentTypes = await Promise.all(\n fileAssociations.map(async fileAssociation => {\n const extensions = asArray(fileAssociation.ext).map(normalizeExt)\n const customIcon = await packager.getResource(getPlatformIconFileName(fileAssociation.icon, true), `${extensions[0]}.icns`)\n let iconFile = appPlist.CFBundleIconFile\n if (customIcon != null) {\n iconFile = path.basename(customIcon)\n await copyOrLinkFile(customIcon, path.join(path.join(contentsPath, \"Resources\"), iconFile))\n }\n\n const result = {\n CFBundleTypeExtensions: extensions,\n CFBundleTypeName: fileAssociation.name || extensions[0],\n CFBundleTypeRole: fileAssociation.role || \"Editor\",\n LSHandlerRank: fileAssociation.rank || \"Default\",\n CFBundleTypeIconFile: iconFile,\n } as any\n\n if (fileAssociation.isPackage) {\n result.LSTypeIsPackage = true\n }\n return result\n })\n )\n\n // `CFBundleDocumentTypes` may be defined in `mac.extendInfo`, so we need to merge it in that case\n appPlist.CFBundleDocumentTypes = [...((appPlist.CFBundleDocumentTypes as PlistValue[]) || []), ...documentTypes]\n }\n\n const toPlistObject = (asarIntegrity: AsarIntegrity): PlistObject => {\n const result: PlistObject = {}\n for (const [filePath, headerHash] of Object.entries(asarIntegrity)) {\n result[filePath] = {\n algorithm: headerHash.algorithm,\n hash: headerHash.hash,\n }\n }\n return result\n }\n\n if (asarIntegrity != null) {\n appPlist.ElectronAsarIntegrity = toPlistObject(asarIntegrity)\n }\n\n if (helperEHPlist != null) {\n await savePlistFile(helperEHPlistFilename, helperEHPlist)\n }\n\n if (helperNPPlist != null) {\n await savePlistFile(helperNPPlistFilename, helperNPPlist)\n }\n\n if (helperRendererPlist != null) {\n await savePlistFile(helperRendererPlistFilename, helperRendererPlist)\n }\n\n if (helperPluginPlist != null) {\n await savePlistFile(helperPluginPlistFilename, helperPluginPlist)\n }\n\n if (helperGPUPlist != null) {\n await savePlistFile(helperGPUPlistFilename, helperGPUPlist)\n }\n\n if (helperLoginPlist != null) {\n await savePlistFile(helperLoginPlistFilename, helperLoginPlist)\n }\n\n await savePlistFile(appPlistFilename, appPlist)\n if (helperPlist != null) {\n await savePlistFile(helperPlistFilename, helperPlist)\n }\n\n await doRename(path.join(contentsPath, \"MacOS\"), electronBranding.productName, appPlist.CFBundleExecutable as string)\n\n await moveHelpers(\n getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist),\n frameworksPath,\n appFilename,\n electronBranding.productName\n )\n\n if (helperLoginPlist != null) {\n const prefix = electronBranding.productName\n const suffix = \" Login Helper\"\n const executableBasePath = path.join(loginItemPath, `${prefix}${suffix}.app`, \"Contents\", \"MacOS\")\n await doRename(executableBasePath, `${prefix}${suffix}`, appFilename + suffix).then(() => doRename(loginItemPath, `${prefix}${suffix}.app`, `${appFilename}${suffix}.app`))\n }\n\n const appPath = path.join(appOutDir, `${appInfo.productFilename}.app`)\n await rename(path.dirname(contentsPath), appPath)\n // https://github.com/electron-userland/electron-builder/issues/840\n const now = Date.now() / 1000\n await utimes(appPath, now, now)\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds the App Transport Security entries that electron-updater's local update proxy needs: local networking, and
|
|
3
|
+
* plain-HTTP exceptions for `localhost` and `127.0.0.1`.
|
|
4
|
+
*
|
|
5
|
+
* `NSAllowsArbitraryLoads` is set to `true` only when the app has not set it already, for example through
|
|
6
|
+
* `mac.extendInfo`, so an explicit `false` is kept.
|
|
7
|
+
*/
|
|
8
|
+
export declare function configureLocalhostAts(appPlist: any): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureLocalhostAts = configureLocalhostAts;
|
|
4
|
+
/**
|
|
5
|
+
* Adds the App Transport Security entries that electron-updater's local update proxy needs: local networking, and
|
|
6
|
+
* plain-HTTP exceptions for `localhost` and `127.0.0.1`.
|
|
7
|
+
*
|
|
8
|
+
* `NSAllowsArbitraryLoads` is set to `true` only when the app has not set it already, for example through
|
|
9
|
+
* `mac.extendInfo`, so an explicit `false` is kept.
|
|
10
|
+
*/
|
|
11
|
+
function configureLocalhostAts(appPlist) {
|
|
12
|
+
// https://bencoding.com/2015/07/20/app-transport-security-and-localhost/
|
|
13
|
+
let ats = appPlist.NSAppTransportSecurity;
|
|
14
|
+
if (ats == null) {
|
|
15
|
+
ats = {};
|
|
16
|
+
appPlist.NSAppTransportSecurity = ats;
|
|
17
|
+
}
|
|
18
|
+
ats.NSAllowsLocalNetworking = true;
|
|
19
|
+
// https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814
|
|
20
|
+
if (ats.NSAllowsArbitraryLoads == null) {
|
|
21
|
+
ats.NSAllowsArbitraryLoads = true;
|
|
22
|
+
}
|
|
23
|
+
let exceptionDomains = ats.NSExceptionDomains;
|
|
24
|
+
if (exceptionDomains == null) {
|
|
25
|
+
exceptionDomains = {};
|
|
26
|
+
ats.NSExceptionDomains = exceptionDomains;
|
|
27
|
+
}
|
|
28
|
+
if (exceptionDomains.localhost == null) {
|
|
29
|
+
const allowHttp = {
|
|
30
|
+
NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,
|
|
31
|
+
NSIncludesSubdomains: false,
|
|
32
|
+
NSTemporaryExceptionAllowsInsecureHTTPLoads: true,
|
|
33
|
+
NSTemporaryExceptionMinimumTLSVersion: "1.0",
|
|
34
|
+
NSTemporaryExceptionRequiresForwardSecrecy: false,
|
|
35
|
+
};
|
|
36
|
+
exceptionDomains.localhost = allowHttp;
|
|
37
|
+
exceptionDomains["127.0.0.1"] = allowHttp;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=electronMacUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electronMacUtils.js","sourceRoot":"","sources":["../../src/electron/electronMacUtils.ts"],"names":[],"mappings":";;AAOA,sDA+BC;AAtCD;;;;;;GAMG;AACH,SAAgB,qBAAqB,CAAC,QAAa;IACjD,yEAAyE;IACzE,IAAI,GAAG,GAAG,QAAQ,CAAC,sBAAsB,CAAA;IACzC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAChB,GAAG,GAAG,EAAE,CAAA;QACR,QAAQ,CAAC,sBAAsB,GAAG,GAAG,CAAA;IACvC,CAAC;IAED,GAAG,CAAC,uBAAuB,GAAG,IAAI,CAAA;IAClC,2FAA2F;IAC3F,IAAI,GAAG,CAAC,sBAAsB,IAAI,IAAI,EAAE,CAAC;QACvC,GAAG,CAAC,sBAAsB,GAAG,IAAI,CAAA;IACnC,CAAC;IAED,IAAI,gBAAgB,GAAG,GAAG,CAAC,kBAAkB,CAAA;IAC7C,IAAI,gBAAgB,IAAI,IAAI,EAAE,CAAC;QAC7B,gBAAgB,GAAG,EAAE,CAAA;QACrB,GAAG,CAAC,kBAAkB,GAAG,gBAAgB,CAAA;IAC3C,CAAC;IAED,IAAI,gBAAgB,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG;YAChB,4CAA4C,EAAE,KAAK;YACnD,oBAAoB,EAAE,KAAK;YAC3B,2CAA2C,EAAE,IAAI;YACjD,qCAAqC,EAAE,KAAK;YAC5C,0CAA0C,EAAE,KAAK;SAClD,CAAA;QACD,gBAAgB,CAAC,SAAS,GAAG,SAAS,CAAA;QACtC,gBAAgB,CAAC,WAAW,CAAC,GAAG,SAAS,CAAA;IAC3C,CAAC;AACH,CAAC","sourcesContent":["/**\n * Adds the App Transport Security entries that electron-updater's local update proxy needs: local networking, and\n * plain-HTTP exceptions for `localhost` and `127.0.0.1`.\n *\n * `NSAllowsArbitraryLoads` is set to `true` only when the app has not set it already, for example through\n * `mac.extendInfo`, so an explicit `false` is kept.\n */\nexport function configureLocalhostAts(appPlist: any): void {\n // https://bencoding.com/2015/07/20/app-transport-security-and-localhost/\n let ats = appPlist.NSAppTransportSecurity\n if (ats == null) {\n ats = {}\n appPlist.NSAppTransportSecurity = ats\n }\n\n ats.NSAllowsLocalNetworking = true\n // https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814\n if (ats.NSAllowsArbitraryLoads == null) {\n ats.NSAllowsArbitraryLoads = true\n }\n\n let exceptionDomains = ats.NSExceptionDomains\n if (exceptionDomains == null) {\n exceptionDomains = {}\n ats.NSExceptionDomains = exceptionDomains\n }\n\n if (exceptionDomains.localhost == null) {\n const allowHttp = {\n NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,\n NSIncludesSubdomains: false,\n NSTemporaryExceptionAllowsInsecureHTTPLoads: true,\n NSTemporaryExceptionMinimumTLSVersion: \"1.0\",\n NSTemporaryExceptionRequiresForwardSecrecy: false,\n }\n exceptionDomains.localhost = allowHttp\n exceptionDomains[\"127.0.0.1\"] = allowHttp\n }\n}\n"]}
|
package/out/forge-maker.d.ts
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
|
+
import type { Configuration } from "./configuration";
|
|
1
2
|
import { PackagerOptions } from "./packagerApi";
|
|
2
3
|
export interface ForgeOptions {
|
|
3
4
|
readonly dir: string;
|
|
4
5
|
}
|
|
6
|
+
/** Platforms Electron Forge makes for (`ForgePlatform` in `@electron-forge/shared-types`). */
|
|
7
|
+
export type ForgePlatform = "darwin" | "mas" | "win32" | "linux";
|
|
8
|
+
/**
|
|
9
|
+
* The options Electron Forge passes to a maker's `make()` (`MakerOptions` in `@electron-forge/maker-base`).
|
|
10
|
+
* Only the fields electron-builder reads are declared.
|
|
11
|
+
*/
|
|
12
|
+
export interface ForgeMakerOptions extends ForgeOptions {
|
|
13
|
+
/** Where Forge expects artifacts. Defaults to a `make` directory next to `dir`. */
|
|
14
|
+
readonly makeDir?: string;
|
|
15
|
+
/** The sanitized app name Forge packaged the app with. */
|
|
16
|
+
readonly appName?: string;
|
|
17
|
+
readonly targetPlatform?: string;
|
|
18
|
+
readonly targetArch: string;
|
|
19
|
+
readonly forgeConfig?: {
|
|
20
|
+
readonly packagerConfig?: {
|
|
21
|
+
readonly executableName?: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** A maker config, or a function returning one for the target arch (as accepted by Forge's `MakerBase`). */
|
|
26
|
+
export type ForgeMakerConfig<C> = C | ((targetArch: string) => C | Promise<C>);
|
|
27
|
+
/** The electron-builder targets and target configuration a maker builds for one arch. */
|
|
28
|
+
export interface ForgeMakerTarget {
|
|
29
|
+
readonly win?: Array<string>;
|
|
30
|
+
readonly linux?: Array<string>;
|
|
31
|
+
readonly config: Configuration;
|
|
32
|
+
}
|
|
5
33
|
export declare function buildForge(forgeOptions: ForgeOptions, options: PackagerOptions): Promise<string[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Base class for electron-builder's Electron Forge makers. Structurally compatible with `MakerBase` from
|
|
36
|
+
* `@electron-forge/maker-base` (Forge 6+), without depending on it: Forge instantiates the package's default export
|
|
37
|
+
* with `new Maker(config, platforms)`, or accepts an instance directly in `makers`.
|
|
38
|
+
*/
|
|
39
|
+
export declare abstract class ElectronBuilderForgeMaker<C extends object = object> {
|
|
40
|
+
private readonly configOrConfigFetcher?;
|
|
41
|
+
protected readonly platformsToMakeOn?: (ReadonlyArray<string> | null) | undefined;
|
|
42
|
+
abstract readonly name: string;
|
|
43
|
+
abstract readonly defaultPlatforms: ForgePlatform[];
|
|
44
|
+
readonly requiredExternalBinaries: string[];
|
|
45
|
+
/** The resolved maker config, set by `prepareConfig()`. */
|
|
46
|
+
config: C | undefined;
|
|
47
|
+
private isConfigPrepared;
|
|
48
|
+
constructor(configOrConfigFetcher?: ForgeMakerConfig<C> | undefined, platformsToMakeOn?: (ReadonlyArray<string> | null) | undefined);
|
|
49
|
+
/** Forge identifies maker instances in `makers` by this flag. */
|
|
50
|
+
get __isElectronForgeMaker(): true;
|
|
51
|
+
get platforms(): ForgePlatform[];
|
|
52
|
+
prepareConfig(targetArch: string): Promise<void>;
|
|
53
|
+
isSupportedOnCurrentPlatform(): boolean;
|
|
54
|
+
externalBinariesExist(): boolean;
|
|
55
|
+
ensureExternalBinariesExist(): void;
|
|
56
|
+
clone(): ElectronBuilderForgeMaker<C>;
|
|
57
|
+
make(options: ForgeMakerOptions): Promise<string[]>;
|
|
58
|
+
/** Maps Forge's `make()` options onto the electron-builder `build()` options for this maker's target. */
|
|
59
|
+
getBuildOptions(options: ForgeMakerOptions): PackagerOptions;
|
|
60
|
+
/** The electron-builder targets for `targetArch`, with the maker config applied to the target's configuration key. */
|
|
61
|
+
protected abstract getTarget(targetArch: string, config: C | undefined): ForgeMakerTarget;
|
|
62
|
+
}
|
|
63
|
+
type ForgeMakerClass = new (...args: never[]) => ElectronBuilderForgeMaker;
|
|
64
|
+
/**
|
|
65
|
+
* Lets the maker class also be called as a function, as Electron Forge 5 called a maker module's default export
|
|
66
|
+
* (`maker.default(options)`). Forge 6+ constructs it with `new`, which is passed through unchanged.
|
|
67
|
+
*/
|
|
68
|
+
export declare function withLegacyForgeCall<T extends ForgeMakerClass>(MakerClass: T): T;
|
|
69
|
+
export {};
|
package/out/forge-maker.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElectronBuilderForgeMaker = void 0;
|
|
3
4
|
exports.buildForge = buildForge;
|
|
5
|
+
exports.withLegacyForgeCall = withLegacyForgeCall;
|
|
4
6
|
const path = require("path");
|
|
5
7
|
const index_1 = require("./index");
|
|
8
|
+
function forgeOutputDir(appDir) {
|
|
9
|
+
// https://github.com/electron/forge/blob/main/packages/api/core/src/api/make.ts (`makeDir`)
|
|
10
|
+
return path.join(path.dirname(appDir), "make");
|
|
11
|
+
}
|
|
6
12
|
function buildForge(forgeOptions, options) {
|
|
7
13
|
// Resolve appDir to an absolute canonical path before deriving any sibling
|
|
8
14
|
// directories from it. Using path.dirname avoids embedding ".." in the
|
|
@@ -13,11 +19,111 @@ function buildForge(forgeOptions, options) {
|
|
|
13
19
|
prepackaged: appDir,
|
|
14
20
|
config: {
|
|
15
21
|
directories: {
|
|
16
|
-
|
|
17
|
-
output: path.join(path.dirname(appDir), "make"),
|
|
22
|
+
output: forgeOutputDir(appDir),
|
|
18
23
|
},
|
|
19
24
|
},
|
|
20
25
|
...options,
|
|
21
26
|
});
|
|
22
27
|
}
|
|
28
|
+
const FORGE_PLATFORMS = ["darwin", "mas", "win32", "linux"];
|
|
29
|
+
function isForgePlatform(platform) {
|
|
30
|
+
return FORGE_PLATFORMS.includes(platform);
|
|
31
|
+
}
|
|
32
|
+
function isConfigFetcher(config) {
|
|
33
|
+
return typeof config === "function";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Base class for electron-builder's Electron Forge makers. Structurally compatible with `MakerBase` from
|
|
37
|
+
* `@electron-forge/maker-base` (Forge 6+), without depending on it: Forge instantiates the package's default export
|
|
38
|
+
* with `new Maker(config, platforms)`, or accepts an instance directly in `makers`.
|
|
39
|
+
*/
|
|
40
|
+
class ElectronBuilderForgeMaker {
|
|
41
|
+
constructor(configOrConfigFetcher,
|
|
42
|
+
// Forge 7 types platforms as `string`; Forge 8 narrows them to `ForgePlatform`
|
|
43
|
+
platformsToMakeOn) {
|
|
44
|
+
this.configOrConfigFetcher = configOrConfigFetcher;
|
|
45
|
+
this.platformsToMakeOn = platformsToMakeOn;
|
|
46
|
+
this.requiredExternalBinaries = [];
|
|
47
|
+
this.isConfigPrepared = false;
|
|
48
|
+
}
|
|
49
|
+
/** Forge identifies maker instances in `makers` by this flag. */
|
|
50
|
+
get __isElectronForgeMaker() {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
get platforms() {
|
|
54
|
+
return this.platformsToMakeOn == null ? this.defaultPlatforms : this.platformsToMakeOn.filter(isForgePlatform);
|
|
55
|
+
}
|
|
56
|
+
async prepareConfig(targetArch) {
|
|
57
|
+
const config = this.configOrConfigFetcher;
|
|
58
|
+
this.config = isConfigFetcher(config) ? await config(targetArch) : config;
|
|
59
|
+
this.isConfigPrepared = true;
|
|
60
|
+
}
|
|
61
|
+
isSupportedOnCurrentPlatform() {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
externalBinariesExist() {
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
ensureExternalBinariesExist() {
|
|
68
|
+
// electron-builder downloads the tools it needs
|
|
69
|
+
}
|
|
70
|
+
clone() {
|
|
71
|
+
const clone = Reflect.construct(this.constructor, [this.configOrConfigFetcher, this.platformsToMakeOn]);
|
|
72
|
+
if (!(clone instanceof ElectronBuilderForgeMaker)) {
|
|
73
|
+
throw new Error(`Cannot clone maker ${this.name}`);
|
|
74
|
+
}
|
|
75
|
+
return clone;
|
|
76
|
+
}
|
|
77
|
+
async make(options) {
|
|
78
|
+
if (!this.isConfigPrepared) {
|
|
79
|
+
await this.prepareConfig(options.targetArch);
|
|
80
|
+
}
|
|
81
|
+
return (0, index_1.build)(this.getBuildOptions(options));
|
|
82
|
+
}
|
|
83
|
+
/** Maps Forge's `make()` options onto the electron-builder `build()` options for this maker's target. */
|
|
84
|
+
getBuildOptions(options) {
|
|
85
|
+
var _a, _b, _c, _d;
|
|
86
|
+
const appDir = path.resolve(options.dir);
|
|
87
|
+
// Forge configs commonly pass `config: {}`; leave the target's own defaults in place for it (an empty `snapcraft` is invalid)
|
|
88
|
+
const makerConfig = this.config == null || Object.keys(this.config).length === 0 ? undefined : this.config;
|
|
89
|
+
const { config, ...targets } = this.getTarget(options.targetArch, makerConfig);
|
|
90
|
+
// The packaged binary is named by Forge (`packagerConfig.executableName`, else the app name), not by electron-builder's defaults.
|
|
91
|
+
const executableName = (_c = (_b = (_a = options.forgeConfig) === null || _a === void 0 ? void 0 : _a.packagerConfig) === null || _b === void 0 ? void 0 : _b.executableName) !== null && _c !== void 0 ? _c : options.appName;
|
|
92
|
+
return {
|
|
93
|
+
...targets,
|
|
94
|
+
prepackaged: appDir,
|
|
95
|
+
config: {
|
|
96
|
+
...(executableName == null ? {} : { executableName }),
|
|
97
|
+
...config,
|
|
98
|
+
directories: {
|
|
99
|
+
output: (_d = options.makeDir) !== null && _d !== void 0 ? _d : forgeOutputDir(appDir),
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.ElectronBuilderForgeMaker = ElectronBuilderForgeMaker;
|
|
106
|
+
/**
|
|
107
|
+
* Lets the maker class also be called as a function, as Electron Forge 5 called a maker module's default export
|
|
108
|
+
* (`maker.default(options)`). Forge 6+ constructs it with `new`, which is passed through unchanged.
|
|
109
|
+
*/
|
|
110
|
+
function withLegacyForgeCall(MakerClass) {
|
|
111
|
+
return new Proxy(MakerClass, {
|
|
112
|
+
apply(_target, _thisArg, args) {
|
|
113
|
+
const options = args[0];
|
|
114
|
+
if (options == null || typeof options !== "object" || !("dir" in options) || typeof options.dir !== "string") {
|
|
115
|
+
throw new TypeError(`${MakerClass.name} must be constructed with "new" (Electron Forge 6+) or called with Electron Forge 5 maker options`);
|
|
116
|
+
}
|
|
117
|
+
const maker = Reflect.construct(MakerClass, []);
|
|
118
|
+
if (!(maker instanceof ElectronBuilderForgeMaker)) {
|
|
119
|
+
throw new TypeError(`${MakerClass.name} is not an electron-builder Forge maker`);
|
|
120
|
+
}
|
|
121
|
+
return maker.make({
|
|
122
|
+
dir: options.dir,
|
|
123
|
+
targetArch: "targetArch" in options && typeof options.targetArch === "string" ? options.targetArch : process.arch,
|
|
124
|
+
appName: "appName" in options && typeof options.appName === "string" ? options.appName : undefined,
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
}
|
|
23
129
|
//# sourceMappingURL=forge-maker.js.map
|
package/out/forge-maker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge-maker.js","sourceRoot":"","sources":["../src/forge-maker.ts"],"names":[],"mappings":";;AAQA,gCAgBC;AAxBD,6BAA4B;AAC5B,mCAA+B;AAO/B,SAAgB,UAAU,CAAC,YAA0B,EAAE,OAAwB;IAC7E,2EAA2E;IAC3E,wEAAwE;IACxE,0EAA0E;IAC1E,4BAA4B;IAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAC7C,OAAO,IAAA,aAAK,EAAC;QACX,WAAW,EAAE,MAAM;QACnB,MAAM,EAAE;YACN,WAAW,EAAE;gBACX,4FAA4F;gBAC5F,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;aAChD;SACF;QACD,GAAG,OAAO;KACX,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import * as path from \"path\"\nimport { build } from \"./index\"\nimport { PackagerOptions } from \"./packagerApi\"\n\nexport interface ForgeOptions {\n readonly dir: string\n}\n\nexport function buildForge(forgeOptions: ForgeOptions, options: PackagerOptions) {\n // Resolve appDir to an absolute canonical path before deriving any sibling\n // directories from it. Using path.dirname avoids embedding \"..\" in the\n // resolved path, which keeps downstream path comparisons and CodeQL taint\n // tracking straightforward.\n const appDir = path.resolve(forgeOptions.dir)\n return build({\n prepackaged: appDir,\n config: {\n directories: {\n // https://github.com/electron-userland/electron-forge/blob/master/src/makers/generic/zip.js\n output: path.join(path.dirname(appDir), \"make\"),\n },\n },\n ...options,\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"forge-maker.js","sourceRoot":"","sources":["../src/forge-maker.ts"],"names":[],"mappings":";;;AA2CA,gCAeC;AA4GD,kDAkBC;AAtLD,6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I,CAAC;YACD,MAAM,KAAK,GAAY,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;YACxD,IAAI,CAAC,CAAC,KAAK,YAAY,yBAAyB,CAAC,EAAE,CAAC;gBAClD,MAAM,IAAI,SAAS,CAAC,GAAG,UAAU,CAAC,IAAI,yCAAyC,CAAC,CAAA;YAClF,CAAC;YACD,OAAO,KAAK,CAAC,IAAI,CAAC;gBAChB,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,UAAU,EAAE,YAAY,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI;gBACjH,OAAO,EAAE,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;aACnG,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import type { MakerBase, MakerOptions } from \"@electron-forge/maker-base\"\nimport type { ForgeConfig, ForgePlatform as ForgeOwnPlatform } from \"@electron-forge/shared-types\"\nimport * as path from \"path\"\nimport type { Configuration } from \"./configuration\"\nimport { build } from \"./index\"\nimport { PackagerOptions } from \"./packagerApi\"\n\nexport interface ForgeOptions {\n readonly dir: string\n}\n\n/** Platforms Electron Forge makes for (`ForgePlatform` in `@electron-forge/shared-types`). */\nexport type ForgePlatform = \"darwin\" | \"mas\" | \"win32\" | \"linux\"\n\n/**\n * The options Electron Forge passes to a maker's `make()` (`MakerOptions` in `@electron-forge/maker-base`).\n * Only the fields electron-builder reads are declared.\n */\nexport interface ForgeMakerOptions extends ForgeOptions {\n /** Where Forge expects artifacts. Defaults to a `make` directory next to `dir`. */\n readonly makeDir?: string\n /** The sanitized app name Forge packaged the app with. */\n readonly appName?: string\n readonly targetPlatform?: string\n readonly targetArch: string\n readonly forgeConfig?: { readonly packagerConfig?: { readonly executableName?: string } }\n}\n\n/** A maker config, or a function returning one for the target arch (as accepted by Forge's `MakerBase`). */\nexport type ForgeMakerConfig<C> = C | ((targetArch: string) => C | Promise<C>)\n\n/** The electron-builder targets and target configuration a maker builds for one arch. */\nexport interface ForgeMakerTarget {\n readonly win?: Array<string>\n readonly linux?: Array<string>\n readonly config: Configuration\n}\n\nfunction forgeOutputDir(appDir: string): string {\n // https://github.com/electron/forge/blob/main/packages/api/core/src/api/make.ts (`makeDir`)\n return path.join(path.dirname(appDir), \"make\")\n}\n\nexport function buildForge(forgeOptions: ForgeOptions, options: PackagerOptions) {\n // Resolve appDir to an absolute canonical path before deriving any sibling\n // directories from it. Using path.dirname avoids embedding \"..\" in the\n // resolved path, which keeps downstream path comparisons and CodeQL taint\n // tracking straightforward.\n const appDir = path.resolve(forgeOptions.dir)\n return build({\n prepackaged: appDir,\n config: {\n directories: {\n output: forgeOutputDir(appDir),\n },\n },\n ...options,\n })\n}\n\nconst FORGE_PLATFORMS: ReadonlyArray<string> = [\"darwin\", \"mas\", \"win32\", \"linux\"] satisfies ReadonlyArray<ForgePlatform>\n\nfunction isForgePlatform(platform: string): platform is ForgePlatform {\n return FORGE_PLATFORMS.includes(platform)\n}\n\nfunction isConfigFetcher<C>(config: ForgeMakerConfig<C> | undefined): config is (targetArch: string) => C | Promise<C> {\n return typeof config === \"function\"\n}\n\n/**\n * Base class for electron-builder's Electron Forge makers. Structurally compatible with `MakerBase` from\n * `@electron-forge/maker-base` (Forge 6+), without depending on it: Forge instantiates the package's default export\n * with `new Maker(config, platforms)`, or accepts an instance directly in `makers`.\n */\nexport abstract class ElectronBuilderForgeMaker<C extends object = object> {\n abstract readonly name: string\n\n abstract readonly defaultPlatforms: ForgePlatform[]\n\n readonly requiredExternalBinaries: string[] = []\n\n /** The resolved maker config, set by `prepareConfig()`. */\n config: C | undefined\n\n private isConfigPrepared = false\n\n constructor(\n private readonly configOrConfigFetcher?: ForgeMakerConfig<C>,\n // Forge 7 types platforms as `string`; Forge 8 narrows them to `ForgePlatform`\n protected readonly platformsToMakeOn?: ReadonlyArray<string> | null\n ) {}\n\n /** Forge identifies maker instances in `makers` by this flag. */\n get __isElectronForgeMaker(): true {\n return true\n }\n\n get platforms(): ForgePlatform[] {\n return this.platformsToMakeOn == null ? this.defaultPlatforms : this.platformsToMakeOn.filter(isForgePlatform)\n }\n\n async prepareConfig(targetArch: string): Promise<void> {\n const config = this.configOrConfigFetcher\n this.config = isConfigFetcher(config) ? await config(targetArch) : config\n this.isConfigPrepared = true\n }\n\n isSupportedOnCurrentPlatform(): boolean {\n return true\n }\n\n externalBinariesExist(): boolean {\n return true\n }\n\n ensureExternalBinariesExist(): void {\n // electron-builder downloads the tools it needs\n }\n\n clone(): ElectronBuilderForgeMaker<C> {\n const clone: unknown = Reflect.construct(this.constructor, [this.configOrConfigFetcher, this.platformsToMakeOn])\n if (!(clone instanceof ElectronBuilderForgeMaker)) {\n throw new Error(`Cannot clone maker ${this.name}`)\n }\n return clone\n }\n\n async make(options: ForgeMakerOptions): Promise<string[]> {\n if (!this.isConfigPrepared) {\n await this.prepareConfig(options.targetArch)\n }\n return build(this.getBuildOptions(options))\n }\n\n /** Maps Forge's `make()` options onto the electron-builder `build()` options for this maker's target. */\n getBuildOptions(options: ForgeMakerOptions): PackagerOptions {\n const appDir = path.resolve(options.dir)\n // Forge configs commonly pass `config: {}`; leave the target's own defaults in place for it (an empty `snapcraft` is invalid)\n const makerConfig = this.config == null || Object.keys(this.config).length === 0 ? undefined : this.config\n const { config, ...targets } = this.getTarget(options.targetArch, makerConfig)\n // The packaged binary is named by Forge (`packagerConfig.executableName`, else the app name), not by electron-builder's defaults.\n const executableName = options.forgeConfig?.packagerConfig?.executableName ?? options.appName\n return {\n ...targets,\n prepackaged: appDir,\n config: {\n ...(executableName == null ? {} : { executableName }),\n ...config,\n directories: {\n output: options.makeDir ?? forgeOutputDir(appDir),\n },\n },\n }\n }\n\n /** The electron-builder targets for `targetArch`, with the maker config applied to the target's configuration key. */\n protected abstract getTarget(targetArch: string, config: C | undefined): ForgeMakerTarget\n}\n\ntype ForgeMakerClass = new (...args: never[]) => ElectronBuilderForgeMaker\n\n/**\n * Lets the maker class also be called as a function, as Electron Forge 5 called a maker module's default export\n * (`maker.default(options)`). Forge 6+ constructs it with `new`, which is passed through unchanged.\n */\nexport function withLegacyForgeCall<T extends ForgeMakerClass>(MakerClass: T): T {\n return new Proxy(MakerClass, {\n apply(_target, _thisArg, args: unknown[]): Promise<string[]> {\n const options: unknown = args[0]\n if (options == null || typeof options !== \"object\" || !(\"dir\" in options) || typeof options.dir !== \"string\") {\n throw new TypeError(`${MakerClass.name} must be constructed with \"new\" (Electron Forge 6+) or called with Electron Forge 5 maker options`)\n }\n const maker: unknown = Reflect.construct(MakerClass, [])\n if (!(maker instanceof ElectronBuilderForgeMaker)) {\n throw new TypeError(`${MakerClass.name} is not an electron-builder Forge maker`)\n }\n return maker.make({\n dir: options.dir,\n targetArch: \"targetArch\" in options && typeof options.targetArch === \"string\" ? options.targetArch : process.arch,\n appName: \"appName\" in options && typeof options.appName === \"string\" ? options.appName : undefined,\n })\n },\n })\n}\n\n// Compile-time check against the Electron Forge devDependencies (type-only, stripped from the published declarations):\n// a renovate bump of @electron-forge/* fails `pnpm compile` if Forge's maker contract drifts from ours.\ntype Expect<T extends true> = T\ntype IsAssignable<From, To> = [From] extends [To] ? true : false\n/** The MakerBase members Forge's `make` uses (packages/api/core/src/api/make.ts). */\ntype ForgeUsedMakerMembers =\n | \"name\"\n | \"defaultPlatforms\"\n | \"requiredExternalBinaries\"\n | \"__isElectronForgeMaker\"\n | \"platforms\"\n | \"prepareConfig\"\n | \"isSupportedOnCurrentPlatform\"\n | \"externalBinariesExist\"\n | \"ensureExternalBinariesExist\"\n | \"make\"\ntype ForgeUsedMaker = Pick<MakerBase<object>, ForgeUsedMakerMembers>\n\n/** @internal */\nexport type ForgeMakerCompatibility = [\n Expect<IsAssignable<ElectronBuilderForgeMaker, ForgeUsedMaker>>,\n Expect<IsAssignable<ReturnType<ElectronBuilderForgeMaker[\"clone\"]>, ForgeUsedMaker>>,\n Expect<IsAssignable<ElectronBuilderForgeMaker, NonNullable<ForgeConfig[\"makers\"]>[number]>>,\n Expect<IsAssignable<MakerOptions, ForgeMakerOptions>>,\n Expect<IsAssignable<ForgePlatform, ForgeOwnPlatform>>,\n Expect<IsAssignable<ForgeOwnPlatform, ForgePlatform>>,\n]\n"]}
|
package/out/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export { PublishOptions, UploadTask } from "electron-publish";
|
|
|
28
28
|
export { WindowsSignOptions } from "./codeSign/windowsCodeSign";
|
|
29
29
|
export { CertificateFromStoreInfo, CustomWindowsSign, CustomWindowsSignTaskConfiguration, FileCodeSigningInfo, WindowsSignTaskConfiguration, WindowsSignToolManager, } from "./codeSign/windowsSignToolManager";
|
|
30
30
|
export { ToolInfo } from "./util/bundledTool";
|
|
31
|
-
export { ForgeOptions, buildForge } from "./forge-maker";
|
|
31
|
+
export { ElectronBuilderForgeMaker, ForgeMakerConfig, ForgeMakerOptions, ForgeMakerTarget, ForgeOptions, ForgePlatform, buildForge, withLegacyForgeCall } from "./forge-maker";
|
|
32
32
|
export { Framework, PrepareApplicationStageDirectoryOptions } from "./Framework";
|
|
33
33
|
export { LinuxPackager } from "./linuxPackager";
|
|
34
34
|
export { CustomMacSign, CustomMacSignOptions, MacPackager } from "./macPackager";
|
package/out/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WinPackager = exports.PublishManager = exports.PlatformPackager = exports.MacPackager = exports.LinuxPackager = exports.buildForge = exports.WindowsSignToolManager = exports.CancellationToken = exports.Packager = exports.Target = exports.Platform = exports.DIR_TARGET = exports.DEFAULT_TARGET = exports.AppInfo = exports.getArchSuffix = exports.archFromString = exports.Arch = void 0;
|
|
3
|
+
exports.WinPackager = exports.PublishManager = exports.PlatformPackager = exports.MacPackager = exports.LinuxPackager = exports.withLegacyForgeCall = exports.buildForge = exports.ElectronBuilderForgeMaker = exports.WindowsSignToolManager = exports.CancellationToken = exports.Packager = exports.Target = exports.Platform = exports.DIR_TARGET = exports.DEFAULT_TARGET = exports.AppInfo = exports.getArchSuffix = exports.archFromString = exports.Arch = void 0;
|
|
4
4
|
exports.checkBuildRequestOptions = checkBuildRequestOptions;
|
|
5
5
|
exports.build = build;
|
|
6
6
|
const builder_util_1 = require("builder-util");
|
|
@@ -26,7 +26,9 @@ Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: fun
|
|
|
26
26
|
var windowsSignToolManager_1 = require("./codeSign/windowsSignToolManager");
|
|
27
27
|
Object.defineProperty(exports, "WindowsSignToolManager", { enumerable: true, get: function () { return windowsSignToolManager_1.WindowsSignToolManager; } });
|
|
28
28
|
var forge_maker_1 = require("./forge-maker");
|
|
29
|
+
Object.defineProperty(exports, "ElectronBuilderForgeMaker", { enumerable: true, get: function () { return forge_maker_1.ElectronBuilderForgeMaker; } });
|
|
29
30
|
Object.defineProperty(exports, "buildForge", { enumerable: true, get: function () { return forge_maker_1.buildForge; } });
|
|
31
|
+
Object.defineProperty(exports, "withLegacyForgeCall", { enumerable: true, get: function () { return forge_maker_1.withLegacyForgeCall; } });
|
|
30
32
|
var linuxPackager_1 = require("./linuxPackager");
|
|
31
33
|
Object.defineProperty(exports, "LinuxPackager", { enumerable: true, get: function () { return linuxPackager_1.LinuxPackager; } });
|
|
32
34
|
var macPackager_1 = require("./macPackager");
|
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAsFA,4DAMC;AAED,sBAgEC;AA9JD,+CAA6E;AAC7E,+DAA8C;AAE9C,yCAAqC;AAErC,6DAAyD;AACzD,4CAAgD;AAEhD,6CAAkE;AAAzD,oG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AO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACjC,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,cAAc,CAAC,UAAU,EAAE,CAAA;QACvC,CAAC;QAED,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE;YACvB,QAAQ,CAAC,2BAA2B,EAAE,CAAA;YACtC,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAA;QACjD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidConfigurationError, executeFinally, log } from \"builder-util\"\nimport { asArray } from \"builder-util-runtime\"\nimport { PublishOptions } from \"electron-publish\"\nimport { Packager } from \"./packager\"\nimport { PackagerOptions } from \"./packagerApi\"\nimport { PublishManager } from \"./publish/PublishManager\"\nimport { resolveFunction } from \"./util/resolve\"\n\nexport { Arch, archFromString, getArchSuffix } from \"builder-util\"\nexport { AppInfo } from \"./appInfo\"\nexport {\n AfterExtractContext,\n AfterPackContext,\n BeforePackContext,\n CommonConfiguration,\n Configuration,\n FuseOptionsV1,\n Hook,\n Hooks,\n MetadataDirectories,\n PackContext,\n ToolsetConfig,\n} from \"./configuration\"\nexport {\n BeforeBuildContext,\n CompressionLevel,\n DEFAULT_TARGET,\n DIR_TARGET,\n Platform,\n SourceRepositoryInfo,\n Target,\n TargetConfigType,\n TargetConfiguration,\n TargetSpecificOptions,\n} from \"./core\"\nexport { ElectronBrandingOptions, ElectronPlatformName } from \"./electron/ElectronFramework\"\nexport { ElectronDownloadOptions } from \"./util/electronGet\"\nexport { AppXOptions } from \"./options/AppXOptions\"\nexport { CommonWindowsInstallerConfiguration } from \"./options/CommonWindowsInstallerConfiguration\"\nexport { FileAssociation } from \"./options/FileAssociation\"\nexport {\n AppImageOptions,\n CommonLinuxOptions,\n DebOptions,\n FlatpakOptions,\n LinuxConfiguration,\n LinuxDesktopFile,\n LinuxTargetSpecificOptions,\n PacmanOptions,\n RpmOptions,\n} from \"./options/linuxOptions\"\nexport { DmgContent, DmgOptions, DmgWindow, MacConfiguration, MacOsTargetName, MasConfiguration } from \"./options/macOptions\"\nexport { AuthorMetadata, Metadata, RepositoryInfo } from \"./options/metadata\"\nexport { MsiOptions } from \"./options/MsiOptions\"\nexport { MsiWrappedOptions } from \"./options/MsiWrappedOptions\"\nexport { BackgroundAlignment, BackgroundScaling, PkgBackgroundOptions, PkgOptions } from \"./options/pkgOptions\"\nexport { AsarOptions, FileSet, FilesBuildOptions, PlatformSpecificBuildOptions, Protocol, ReleaseInfo } from \"./options/PlatformSpecificBuildOptions\"\nexport { PlugDescriptor, SlotDescriptor, SnapcraftOptions, SnapOptions } from \"./options/SnapOptions\"\nexport { SquirrelWindowsOptions } from \"./options/SquirrelWindowsOptions\"\nexport { WindowsAzureSigningConfiguration, WindowsConfiguration, WindowsSigntoolConfiguration } from \"./options/winOptions\"\nexport { BuildResult, Packager } from \"./packager\"\nexport { ArtifactBuildStarted, ArtifactCreated, PackagerOptions } from \"./packagerApi\"\nexport { CommonNsisOptions, CustomNsisBinary, NsisOptions, NsisWebOptions, PortableOptions } from \"./targets/nsis/nsisOptions\"\n\nexport { CancellationToken, ProgressInfo } from \"builder-util-runtime\"\nexport { PublishOptions, UploadTask } from \"electron-publish\"\nexport { WindowsSignOptions } from \"./codeSign/windowsCodeSign\"\nexport {\n CertificateFromStoreInfo,\n CustomWindowsSign,\n CustomWindowsSignTaskConfiguration,\n FileCodeSigningInfo,\n WindowsSignTaskConfiguration,\n WindowsSignToolManager,\n} from \"./codeSign/windowsSignToolManager\"\nexport { ToolInfo } from \"./util/bundledTool\"\nexport { ElectronBuilderForgeMaker, ForgeMakerConfig, ForgeMakerOptions, ForgeMakerTarget, ForgeOptions, ForgePlatform, buildForge, withLegacyForgeCall } from \"./forge-maker\"\nexport { Framework, PrepareApplicationStageDirectoryOptions } from \"./Framework\"\nexport { LinuxPackager } from \"./linuxPackager\"\nexport { CustomMacSign, CustomMacSignOptions, MacPackager } from \"./macPackager\"\nexport { PlatformPackager } from \"./platformPackager\"\nexport { PublishManager } from \"./publish/PublishManager\"\nexport { WinPackager } from \"./winPackager\"\n\nconst expectedOptions = new Set([\"publish\", \"targets\", \"mac\", \"win\", \"linux\", \"projectDir\", \"platformPackagerFactory\", \"config\", \"effectiveOptionComputed\", \"prepackaged\"])\n\nexport function checkBuildRequestOptions(options: PackagerOptions & PublishOptions) {\n for (const optionName of Object.keys(options)) {\n if (!expectedOptions.has(optionName) && (options as any)[optionName] !== undefined) {\n throw new InvalidConfigurationError(`Unknown option \"${optionName}\"`)\n }\n }\n}\n\nexport function build(options: PackagerOptions & PublishOptions, packager: Packager = new Packager(options)): Promise<Array<string>> {\n checkBuildRequestOptions(options)\n\n const publishManager = new PublishManager(packager, options)\n const sigIntHandler = () => {\n log.warn(\"cancelled by SIGINT\")\n packager.cancellationToken.cancel()\n publishManager.cancelTasks()\n }\n process.once(\"SIGINT\", sigIntHandler)\n\n const promise = packager.build().then(async buildResult => {\n const afterAllArtifactBuild = await resolveFunction(\n packager.appInfo.type,\n buildResult.configuration.afterAllArtifactBuild,\n \"afterAllArtifactBuild\",\n await packager.getWorkspaceRoot()\n )\n if (afterAllArtifactBuild != null) {\n const newArtifacts = asArray(await Promise.resolve(afterAllArtifactBuild(buildResult)))\n if (newArtifacts.length === 0 || !publishManager.isPublish) {\n return buildResult.artifactPaths\n }\n\n const publishConfigurations = await publishManager.getGlobalPublishConfigurations()\n if (publishConfigurations == null || publishConfigurations.length === 0) {\n return buildResult.artifactPaths\n }\n\n for (const newArtifact of newArtifacts) {\n if (buildResult.artifactPaths.includes(newArtifact)) {\n log.warn({ newArtifact }, \"skipping publish of artifact, already published\")\n continue\n }\n buildResult.artifactPaths.push(newArtifact)\n for (const publishConfiguration of publishConfigurations) {\n await publishManager.scheduleUpload(\n publishConfiguration,\n {\n file: newArtifact,\n arch: null,\n },\n packager.appInfo\n )\n }\n }\n }\n return buildResult.artifactPaths\n })\n\n return executeFinally(promise, isErrorOccurred => {\n let promise: Promise<any>\n if (isErrorOccurred) {\n publishManager.cancelTasks()\n promise = Promise.resolve(null)\n } else {\n promise = publishManager.awaitTasks()\n }\n\n return promise.then(() => {\n packager.clearPackagerEventListeners()\n process.removeListener(\"SIGINT\", sigIntHandler)\n })\n })\n}\n"]}
|
|
@@ -50,6 +50,8 @@ export declare class PnpmNodeModulesCollector extends NodeModulesCollector<PnpmD
|
|
|
50
50
|
/** Reverse index of `allDependencies` keyed by package name (without version). Built once on
|
|
51
51
|
* first access inside `extractProductionDependencyGraph`, after `allDependencies` is settled. */
|
|
52
52
|
private _allDepsByName;
|
|
53
|
+
/** The app's own node of the `pnpm list` output (the root of the production graph), set by `getTreeFromWorkspaces`. */
|
|
54
|
+
private rootTree;
|
|
53
55
|
/**
|
|
54
56
|
* Returns the workspace packages to iterate over, gated by detected pnpm version:
|
|
55
57
|
* - pnpm v11+: multi-entry workspace output → return the full parsed array
|
|
@@ -65,6 +67,22 @@ export declare class PnpmNodeModulesCollector extends NodeModulesCollector<PnpmD
|
|
|
65
67
|
* versions of a dep exist in the workspace.
|
|
66
68
|
*/
|
|
67
69
|
private locateFromDepOrRoot;
|
|
70
|
+
/**
|
|
71
|
+
* Resolve a located package to its real directory (the symlink target), leaving a non-symlinked
|
|
72
|
+
* hit untouched.
|
|
73
|
+
*
|
|
74
|
+
* `locatePackageVersion` returns the path it *walked*, which in pnpm's isolated store is the
|
|
75
|
+
* `node_modules/<name>` symlink rather than `.pnpm/<name>@<ver>/node_modules/<name>`. That
|
|
76
|
+
* distinction matters because the store keeps a package's dependencies as SIBLINGS inside
|
|
77
|
+
* `.pnpm/<name>@<ver>/node_modules/`, reachable only from the real path: searching upward from
|
|
78
|
+
* the symlink walks the dependent's directory instead, and finds the dependency only by accident
|
|
79
|
+
* (through pnpm's hidden `.pnpm/node_modules` hoist, possibly at the wrong version). `visitDep`
|
|
80
|
+
* resolves the deps of every package pnpm printed without children (deduped stubs) from disk
|
|
81
|
+
* through here.
|
|
82
|
+
*
|
|
83
|
+
* Resolving the link is what Node itself does (`--preserve-symlinks` is off by default).
|
|
84
|
+
*/
|
|
85
|
+
private toRealPackage;
|
|
68
86
|
protected extractProductionDependencyGraph(tree: PnpmDependency, dependencyId: string): Promise<void>;
|
|
69
87
|
/**
|
|
70
88
|
* Resolve a dependency that `pnpm list` left out of a package's tree to its `allDependencies` entry.
|
|
@@ -80,6 +98,25 @@ export declare class PnpmNodeModulesCollector extends NodeModulesCollector<PnpmD
|
|
|
80
98
|
*/
|
|
81
99
|
private resolveOmittedDependency;
|
|
82
100
|
protected collectAllDependencies(_tree: PnpmDependency, _appPackageName: string): Promise<void>;
|
|
101
|
+
private readPackageJsonAt;
|
|
102
|
+
/**
|
|
103
|
+
* Visit a single dependency node, adding it and its transitive deps to allDependencies.
|
|
104
|
+
*
|
|
105
|
+
* pnpm 10.29.3+ prints a repeated subtree only once; every later occurrence is a childless
|
|
106
|
+
* `deduped` stub. Stubs must still be registered here: the one full print can sit under a node
|
|
107
|
+
* this walk skips, e.g. a second peer variant of a package with the same `name@version` (the
|
|
108
|
+
* guard below), so a package seen only as stubs was dropped from the asar together with its whole
|
|
109
|
+
* closure (#10253). For a stub (and every dependency discovered beneath one, `fromDisk`), we fall
|
|
110
|
+
* back to the on-disk package.json to discover transitive deps, resolving each one from the
|
|
111
|
+
* package's own store directory first (where pnpm placed them).
|
|
112
|
+
*
|
|
113
|
+
* Other childless entries keep the tree walk. A `link:` package is also printed without children,
|
|
114
|
+
* but its declared deps resolve from the link target's own `node_modules` (e.g. a linked
|
|
115
|
+
* electron-updater checkout's monorepo store), outside the app. Walking them would register those
|
|
116
|
+
* foreign copies under `name@version`, so the guard below then skips the app's own copy of the same
|
|
117
|
+
* `name@version` together with its subtree (`jsonfile` vanished from under `fs-extra`).
|
|
118
|
+
*/
|
|
119
|
+
private visitDep;
|
|
83
120
|
private collectDepsRecursively;
|
|
84
121
|
protected getTreeFromWorkspaces(tree: PnpmDependency, packageName: string): PnpmDependency;
|
|
85
122
|
protected parseDependenciesTree(jsonBlob: string): Promise<PnpmDependency>;
|