app-builder-lib 26.0.20 → 26.2.0
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/helpers/dynamic-import.d.ts +3 -0
- package/helpers/dynamic-import.js +23 -0
- package/helpers/remote-rebuild.js +38 -0
- package/out/binDownload.js +1 -1
- package/out/binDownload.js.map +1 -1
- package/out/codeSign/windowsCodeSign.js +1 -1
- package/out/codeSign/windowsCodeSign.js.map +1 -1
- package/out/electron/electronVersion.js +1 -1
- package/out/electron/electronVersion.js.map +1 -1
- package/out/electron/search-module.d.ts +23 -0
- package/out/electron/search-module.js +73 -0
- package/out/electron/search-module.js.map +1 -0
- package/out/linuxPackager.js +1 -1
- package/out/linuxPackager.js.map +1 -1
- package/out/macPackager.d.ts +1 -0
- package/out/macPackager.js +50 -13
- package/out/macPackager.js.map +1 -1
- package/out/node-module-collector/index.js +14 -2
- package/out/node-module-collector/index.js.map +1 -1
- package/out/node-module-collector/nodeModulesCollector.js +6 -0
- package/out/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/packageManager.d.ts +4 -2
- package/out/node-module-collector/packageManager.js +41 -26
- package/out/node-module-collector/packageManager.js.map +1 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +2 -1
- package/out/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/out/options/macOptions.d.ts +2 -0
- package/out/options/macOptions.js.map +1 -1
- package/out/options/winOptions.d.ts +1 -1
- package/out/options/winOptions.js.map +1 -1
- package/out/platformPackager.d.ts +5 -0
- package/out/platformPackager.js +50 -0
- package/out/platformPackager.js.map +1 -1
- package/out/publish/PublishManager.js +7 -0
- package/out/publish/PublishManager.js.map +1 -1
- package/out/targets/LinuxTargetHelper.js +2 -1
- package/out/targets/LinuxTargetHelper.js.map +1 -1
- package/out/targets/nsis/nsisUtil.js +6 -0
- package/out/targets/nsis/nsisUtil.js.map +1 -1
- package/out/targets/snap.js +13 -2
- package/out/targets/snap.js.map +1 -1
- package/out/util/macosIconComposer.d.ts +10 -0
- package/out/util/macosIconComposer.js +95 -0
- package/out/util/macosIconComposer.js.map +1 -0
- package/out/util/{rebuild/rebuild.js → rebuild.js} +1 -1
- package/out/util/rebuild.js.map +1 -0
- package/out/util/resolve.js +5 -16
- package/out/util/resolve.js.map +1 -1
- package/out/util/yarn.js +1 -1
- package/out/util/yarn.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 +12 -11
- package/scheme.json +33 -12
- package/templates/nsis/uninstaller.nsh +7 -0
- package/out/util/rebuild/rebuild.js.map +0 -1
- package/out/util/rebuild/remote-rebuild.d.ts +0 -1
- package/out/util/rebuild/remote-rebuild.js +0 -30
- package/out/util/rebuild/remote-rebuild.js.map +0 -1
- /package/out/util/{rebuild/rebuild.d.ts → rebuild.d.ts} +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Adapted from https://github.com/electron/packager/pull/1806
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.generateAssetCatalogForIcon = generateAssetCatalogForIcon;
|
|
5
|
+
const builder_util_1 = require("builder-util");
|
|
6
|
+
const fs = require("fs/promises");
|
|
7
|
+
const os = require("node:os");
|
|
8
|
+
const path = require("node:path");
|
|
9
|
+
const plist = require("plist");
|
|
10
|
+
const semver = require("semver");
|
|
11
|
+
const INVALID_ACTOOL_VERSION_ERROR = new Error("Failed to check actool version. Is Xcode 26 or higher installed? See output of the `actool --version` CLI command for more details.");
|
|
12
|
+
async function checkActoolVersion(tmpDir) {
|
|
13
|
+
const acToolOutputFileName = path.resolve(tmpDir, "actool.log");
|
|
14
|
+
let versionInfo = undefined;
|
|
15
|
+
try {
|
|
16
|
+
const acToolOutputFile = await fs.open(acToolOutputFileName, "w");
|
|
17
|
+
await (0, builder_util_1.spawn)("actool", ["--version"], { stdio: ["ignore", acToolOutputFile.fd, acToolOutputFile.fd] });
|
|
18
|
+
const acToolVersionOutput = await fs.readFile(acToolOutputFileName, "utf8");
|
|
19
|
+
versionInfo = plist.parse(acToolVersionOutput);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
throw INVALID_ACTOOL_VERSION_ERROR;
|
|
23
|
+
}
|
|
24
|
+
if (!versionInfo || !versionInfo["com.apple.actool.version"] || !versionInfo["com.apple.actool.version"]["short-bundle-version"]) {
|
|
25
|
+
throw INVALID_ACTOOL_VERSION_ERROR;
|
|
26
|
+
}
|
|
27
|
+
const acToolVersion = versionInfo["com.apple.actool.version"]["short-bundle-version"];
|
|
28
|
+
if (!semver.gte(semver.coerce(acToolVersion), "26.0.0")) {
|
|
29
|
+
throw new Error(`Unsupported actool version. Must be on actool 26.0.0 or higher but found ${acToolVersion}. Install Xcode 26 or higher to get a supported version of actool.`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generates an asset catalog and extra assets that are useful for packaging the app.
|
|
34
|
+
* @param inputPath The path to the `.icon` file
|
|
35
|
+
* @returns The asset catalog and extra assets
|
|
36
|
+
*/
|
|
37
|
+
async function generateAssetCatalogForIcon(inputPath) {
|
|
38
|
+
const tmpDir = await fs.mkdtemp(path.resolve(os.tmpdir(), "icon-compile-"));
|
|
39
|
+
const cleanup = async () => {
|
|
40
|
+
await fs.rm(tmpDir, {
|
|
41
|
+
recursive: true,
|
|
42
|
+
force: true,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
try {
|
|
46
|
+
await checkActoolVersion(tmpDir);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
await cleanup();
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
const iconPath = path.resolve(tmpDir, "Icon.icon");
|
|
53
|
+
const outputPath = path.resolve(tmpDir, "out");
|
|
54
|
+
try {
|
|
55
|
+
await fs.cp(inputPath, iconPath, {
|
|
56
|
+
recursive: true,
|
|
57
|
+
});
|
|
58
|
+
await fs.mkdir(outputPath, {
|
|
59
|
+
recursive: true,
|
|
60
|
+
});
|
|
61
|
+
await (0, builder_util_1.spawn)("actool", [
|
|
62
|
+
iconPath,
|
|
63
|
+
"--compile",
|
|
64
|
+
outputPath,
|
|
65
|
+
"--output-format",
|
|
66
|
+
"human-readable-text",
|
|
67
|
+
"--notices",
|
|
68
|
+
"--warnings",
|
|
69
|
+
"--output-partial-info-plist",
|
|
70
|
+
path.resolve(outputPath, "assetcatalog_generated_info.plist"),
|
|
71
|
+
"--app-icon",
|
|
72
|
+
"Icon",
|
|
73
|
+
"--include-all-app-icons",
|
|
74
|
+
"--accent-color",
|
|
75
|
+
"AccentColor",
|
|
76
|
+
"--enable-on-demand-resources",
|
|
77
|
+
"NO",
|
|
78
|
+
"--development-region",
|
|
79
|
+
"en",
|
|
80
|
+
"--target-device",
|
|
81
|
+
"mac",
|
|
82
|
+
"--minimum-deployment-target",
|
|
83
|
+
"26.0",
|
|
84
|
+
"--platform",
|
|
85
|
+
"macosx",
|
|
86
|
+
]);
|
|
87
|
+
const assetCatalog = await fs.readFile(path.resolve(outputPath, "Assets.car"));
|
|
88
|
+
const icnsFile = await fs.readFile(path.resolve(outputPath, "Icon.icns"));
|
|
89
|
+
return { assetCatalog, icnsFile };
|
|
90
|
+
}
|
|
91
|
+
finally {
|
|
92
|
+
await cleanup();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=macosIconComposer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macosIconComposer.js","sourceRoot":"","sources":["../../src/util/macosIconComposer.ts"],"names":[],"mappings":";AAAA,8DAA8D;;AA+C9D,kEA8DC;AA3GD,+CAAoC;AACpC,kCAAiC;AACjC,8BAA6B;AAC7B,kCAAiC;AACjC,+BAA8B;AAC9B,iCAAgC;AAOhC,MAAM,4BAA4B,GAAG,IAAI,KAAK,CAC5C,qIAAqI,CACtI,CAAA;AAED,KAAK,UAAU,k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C,OAAO,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAA;QAC9E,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAA;QAEzE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAA;IACnC,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,EAAE,CAAA;IACjB,CAAC;AACH,CAAC","sourcesContent":["// Adapted from https://github.com/electron/packager/pull/1806\n\nimport { spawn } from \"builder-util\"\nimport * as fs from \"fs/promises\"\nimport * as os from \"node:os\"\nimport * as path from \"node:path\"\nimport * as plist from \"plist\"\nimport * as semver from \"semver\"\n\nexport interface AssetCatalogResult {\n assetCatalog: Buffer\n icnsFile: Buffer\n}\n\nconst INVALID_ACTOOL_VERSION_ERROR = new Error(\n \"Failed to check actool version. Is Xcode 26 or higher installed? See output of the `actool --version` CLI command for more details.\"\n)\n\nasync function checkActoolVersion(tmpDir: string) {\n const acToolOutputFileName = path.resolve(tmpDir, \"actool.log\")\n\n let versionInfo: Record<string, Record<string, string>> | undefined = undefined\n\n try {\n const acToolOutputFile = await fs.open(acToolOutputFileName, \"w\")\n await spawn(\"actool\", [\"--version\"], { stdio: [\"ignore\", acToolOutputFile.fd, acToolOutputFile.fd] })\n const acToolVersionOutput = await fs.readFile(acToolOutputFileName, \"utf8\")\n versionInfo = plist.parse(acToolVersionOutput) as Record<string, Record<string, string>>\n } catch {\n throw INVALID_ACTOOL_VERSION_ERROR\n }\n\n if (!versionInfo || !versionInfo[\"com.apple.actool.version\"] || !versionInfo[\"com.apple.actool.version\"][\"short-bundle-version\"]) {\n throw INVALID_ACTOOL_VERSION_ERROR\n }\n\n const acToolVersion = versionInfo[\"com.apple.actool.version\"][\"short-bundle-version\"]\n if (!semver.gte(semver.coerce(acToolVersion)!, \"26.0.0\")) {\n throw new Error(`Unsupported actool version. Must be on actool 26.0.0 or higher but found ${acToolVersion}. Install Xcode 26 or higher to get a supported version of actool.`)\n }\n}\n\n/**\n * Generates an asset catalog and extra assets that are useful for packaging the app.\n * @param inputPath The path to the `.icon` file\n * @returns The asset catalog and extra assets\n */\nexport async function generateAssetCatalogForIcon(inputPath: string): Promise<AssetCatalogResult> {\n const tmpDir = await fs.mkdtemp(path.resolve(os.tmpdir(), \"icon-compile-\"))\n const cleanup = async () => {\n await fs.rm(tmpDir, {\n recursive: true,\n force: true,\n })\n }\n\n try {\n await checkActoolVersion(tmpDir)\n } catch (error) {\n await cleanup()\n throw error\n }\n\n const iconPath = path.resolve(tmpDir, \"Icon.icon\")\n const outputPath = path.resolve(tmpDir, \"out\")\n\n try {\n await fs.cp(inputPath, iconPath, {\n recursive: true,\n })\n\n await fs.mkdir(outputPath, {\n recursive: true,\n })\n\n await spawn(\"actool\", [\n iconPath,\n \"--compile\",\n outputPath,\n \"--output-format\",\n \"human-readable-text\",\n \"--notices\",\n \"--warnings\",\n \"--output-partial-info-plist\",\n path.resolve(outputPath, \"assetcatalog_generated_info.plist\"),\n \"--app-icon\",\n \"Icon\",\n \"--include-all-app-icons\",\n \"--accent-color\",\n \"AccentColor\",\n \"--enable-on-demand-resources\",\n \"NO\",\n \"--development-region\",\n \"en\",\n \"--target-device\",\n \"mac\",\n \"--minimum-deployment-target\",\n \"26.0\",\n \"--platform\",\n \"macosx\",\n ])\n\n const assetCatalog = await fs.readFile(path.resolve(outputPath, \"Assets.car\"))\n const icnsFile = await fs.readFile(path.resolve(outputPath, \"Icon.icns\"))\n\n return { assetCatalog, icnsFile }\n } finally {\n await cleanup()\n }\n}\n"]}
|
|
@@ -8,7 +8,7 @@ const rebuild = async (options) => {
|
|
|
8
8
|
var _a, _b;
|
|
9
9
|
const { arch } = options;
|
|
10
10
|
builder_util_1.log.info({ arch }, `installing native dependencies`);
|
|
11
|
-
const child = cp.fork(path.resolve(__dirname, "remote-rebuild.js"), [JSON.stringify(options)], {
|
|
11
|
+
const child = cp.fork(path.resolve(__dirname, "../../helpers/remote-rebuild.js"), [JSON.stringify(options)], {
|
|
12
12
|
stdio: ["pipe", "pipe", "pipe", "ipc"],
|
|
13
13
|
});
|
|
14
14
|
let pendingError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rebuild.js","sourceRoot":"","sources":["../../src/util/rebuild.ts"],"names":[],"mappings":";;;AACA,+CAAkC;AAClC,oCAAmC;AACnC,6BAA4B;AAErB,MAAM,OAAO,GAAG,KAAK,EAAE,OAAuB,EAAiB,EAAE;;IACtE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;IACxB,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,gCAAgC,CAAC,CAAA;IAEpD,MAAM,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iCAAiC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE;QAC3G,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;KACvC,CAAC,CAAA;IAEF,IAAI,YAAmB,CAAA;IAEvB,MAAA,KAAK,CAAC,MAAM,0CAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;QAC/B,kBAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;IACF,MAAA,KAAK,CAAC,MAAM,0CAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;QAC/B,kBAAG,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC7B,CAAC,CAAC,CAAA;IAEF,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAqF,EAAE,EAAE;;QAC5G,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,OAAO,CAAA;QACnC,QAAQ,GAAG,EAAE,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DnB","sourcesContent":["import { RebuildOptions } from \"@electron/rebuild\"\nimport { log } from \"builder-util\"\nimport * as cp from \"child_process\"\nimport * as path from \"path\"\n\nexport const rebuild = async (options: RebuildOptions): Promise<void> => {\n const { arch } = options\n log.info({ arch }, `installing native dependencies`)\n\n const child = cp.fork(path.resolve(__dirname, \"../../helpers/remote-rebuild.js\"), [JSON.stringify(options)], {\n stdio: [\"pipe\", \"pipe\", \"pipe\", \"ipc\"],\n })\n\n let pendingError: Error\n\n child.stdout?.on(\"data\", chunk => {\n log.info(chunk.toString())\n })\n child.stderr?.on(\"data\", chunk => {\n log.error(chunk.toString())\n })\n\n child.on(\"message\", (message: { msg: string; moduleName: string; err: { message: string; stack: string } }) => {\n const { moduleName, msg } = message\n switch (msg) {\n case \"module-found\": {\n log.info({ moduleName, arch }, \"preparing\")\n break\n }\n case \"module-done\": {\n log.info({ moduleName, arch }, \"finished\")\n break\n }\n case \"module-skip\": {\n log.debug?.({ moduleName, arch }, \"skipped. set ENV=electron-rebuild to determine why\")\n break\n }\n case \"rebuild-error\": {\n pendingError = new Error(message.err.message)\n pendingError.stack = message.err.stack\n break\n }\n case \"rebuild-done\": {\n log.info(\"completed installing native dependencies\")\n break\n }\n }\n })\n\n await new Promise<void>((resolve, reject) => {\n child.on(\"exit\", code => {\n if (code === 0 && !pendingError) {\n resolve()\n } else {\n reject(pendingError || new Error(`Rebuilder failed with exit code: ${code}`))\n }\n })\n })\n}\n"]}
|
package/out/util/resolve.js
CHANGED
|
@@ -5,26 +5,15 @@ exports.resolveFunction = resolveFunction;
|
|
|
5
5
|
const log_1 = require("builder-util/out/log");
|
|
6
6
|
const debug_1 = require("debug");
|
|
7
7
|
const path = require("path");
|
|
8
|
-
const
|
|
8
|
+
const requireMaybe = require("../../helpers/dynamic-import");
|
|
9
9
|
async function resolveModule(type, name) {
|
|
10
|
-
var _a
|
|
11
|
-
const extension = path.extname(name).toLowerCase();
|
|
12
|
-
const isModuleType = type === "module";
|
|
10
|
+
var _a;
|
|
13
11
|
try {
|
|
14
|
-
|
|
15
|
-
const fileUrl = (0, url_1.pathToFileURL)(name).href;
|
|
16
|
-
return await eval("import ('" + fileUrl + "')");
|
|
17
|
-
}
|
|
12
|
+
return requireMaybe.dynamicImportMaybe(name);
|
|
18
13
|
}
|
|
19
14
|
catch (error) {
|
|
20
|
-
log_1.log.
|
|
21
|
-
|
|
22
|
-
try {
|
|
23
|
-
return require(name);
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
log_1.log.error({ moduleName: name, message: (_b = error.message) !== null && _b !== void 0 ? _b : error.stack }, "Unable to `require`");
|
|
27
|
-
throw new Error((_c = error.message) !== null && _c !== void 0 ? _c : error.stack);
|
|
15
|
+
log_1.log.error({ moduleName: name, message: (_a = error.message) !== null && _a !== void 0 ? _a : error.stack }, "Unable to dynamically `import` or `require`");
|
|
16
|
+
throw error;
|
|
28
17
|
}
|
|
29
18
|
}
|
|
30
19
|
async function resolveFunction(type, executor, name) {
|
package/out/util/resolve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/util/resolve.ts"],"names":[],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/util/resolve.ts"],"names":[],"mappings":";;AAKA,sCAOC;AAED,0CAyBC;AAvCD,8CAA0C;AAC1C,iCAAyB;AACzB,6BAA4B;AAC5B,6DAA4D;AAErD,KAAK,UAAU,aAAa,CAAI,IAAwB,EAAE,IAAY;;IAC3E,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAA;IAC9C,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,SAAG,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAA,KAAK,CAAC,OAAO,mCAAI,KAAK,CAAC,KAAK,EAAE,EAAE,6CAA6C,CAAC,CAAA;QACrH,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,eAAe,CAAI,IAAwB,EAAE,QAAoB,EAAE,IAAY;IACnG,IAAI,QAAQ,IAAI,IAAI,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACrD,oDAAoD;QACpD,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,IAAI,CAAC,GAAG,QAAkB,CAAA;IAC1B,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACrB,CAAC;IAED,IAAI,CAAC;QACH,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACxB,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAA,eAAK,EAAC,CAAC,CAAC,CAAA;QACR,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IACrB,CAAC;IAED,MAAM,CAAC,GAAQ,MAAM,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAC3C,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QACxB,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC,CAAA;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,WAAW,CAAA;IACpB,CAAC;AACH,CAAC","sourcesContent":["import { log } from \"builder-util/out/log\"\nimport debug from \"debug\"\nimport * as path from \"path\"\nimport * as requireMaybe from \"../../helpers/dynamic-import\"\n\nexport async function resolveModule<T>(type: string | undefined, name: string): Promise<T> {\n try {\n return requireMaybe.dynamicImportMaybe(name)\n } catch (error: any) {\n log.error({ moduleName: name, message: error.message ?? error.stack }, \"Unable to dynamically `import` or `require`\")\n throw error\n }\n}\n\nexport async function resolveFunction<T>(type: string | undefined, executor: T | string, name: string): Promise<T> {\n if (executor == null || typeof executor !== \"string\") {\n // is already function or explicitly ignored by user\n return executor\n }\n\n let p = executor as string\n if (p.startsWith(\".\")) {\n p = path.resolve(p)\n }\n\n try {\n p = require.resolve(p)\n } catch (e: any) {\n debug(e)\n p = path.resolve(p)\n }\n\n const m: any = await resolveModule(type, p)\n const namedExport = m[name]\n if (namedExport == null) {\n return m.default || m\n } else {\n return namedExport\n }\n}\n"]}
|
package/out/util/yarn.js
CHANGED
|
@@ -11,7 +11,7 @@ const os_1 = require("os");
|
|
|
11
11
|
const path = require("path");
|
|
12
12
|
const appBuilder_1 = require("./appBuilder");
|
|
13
13
|
const node_module_collector_1 = require("../node-module-collector");
|
|
14
|
-
const rebuild_1 = require("./rebuild
|
|
14
|
+
const rebuild_1 = require("./rebuild");
|
|
15
15
|
const which = require("which");
|
|
16
16
|
async function installOrRebuild(config, { appDir, projectDir }, options, forceInstall = false) {
|
|
17
17
|
const effectiveOptions = {
|
package/out/util/yarn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yarn.js","sourceRoot":"","sources":["../../src/util/yarn.ts"],"names":[],"mappings":";;AAcA,4CAqBC;AAWD,8BAiCC;AAED,kDA+BC;AAED,wCAiBC;AAmBD,0BAuCC;AA3LD,+CAAkD;AAClD,uCAAqC;AAErC,2BAA4B;AAC5B,6BAA4B;AAE5B,6CAA4D;AAC5D,oEAA6F;AAE7F,+CAA4D;AAC5D,+BAA8B;AAEvB,KAAK,UAAU,gBAAgB,CAAC,MAAqB,EAAE,EAAE,MAAM,EAAE,UAAU,EAAkB,EAAE,OAAuB,EAAE,YAAY,GAAG,KAAK;IACjJ,MAAM,gBAAgB,GAAmB;QACvC,eAAe,EAAE,MAAM,CAAC,2BAA2B,KAAK,IAAI;QAC5D,cAAc,EAAE,IAAA,sBAAO,EAAC,MAAM,CAAC,OAAO,CAAC;QACvC,GAAG,OAAO;KACX,CAAA;IACD,IAAI,uBAAuB,GAAG,KAAK,CAAA;IA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AA6B,EAAC,CAAC,sBAAsB,CAAC,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;IACrG,CAAC;IAED,MAAM,EACJ,aAAa,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,GAC5C,GAAG,OAAO,CAAA;IACX,MAAM,OAAO,GAAG;QACd,eAAe;QACf,IAAI;QACJ,eAAe;QACf,MAAM,EAAE,kBAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI;KACrC,CAAA;IACD,kBAAG,CAAC,IAAI,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAA;IAEhD,MAAM,cAAc,GAAmC;QACrD,SAAS,EAAE,MAAM;QACjB,eAAe;QACf,IAAI;QACJ,QAAQ;QACR,eAAe;QACf,eAAe,EAAE,UAAU;QAC3B,IAAI,EAAG,MAAM,CAAC,eAA+B,IAAI,YAAY;QAC7D,iBAAiB,EAAE,IAAI;KACxB,CAAA;IACD,OAAO,IAAA,iBAAa,EAAC,cAAc,CAAC,CAAA;AACtC,CAAC","sourcesContent":["import * as electronRebuild from \"@electron/rebuild\"\nimport { RebuildMode } from \"@electron/rebuild/lib/types\"\nimport { asArray, log, spawn } from \"builder-util\"\nimport { pathExists } from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport { homedir } from \"os\"\nimport * as path from \"path\"\nimport { Configuration } from \"../configuration\"\nimport { executeAppBuilderAndWriteJson } from \"./appBuilder\"\nimport { PM, detectPackageManager, getPackageManagerCommand } from \"../node-module-collector\"\nimport { NodeModuleDirInfo } from \"./packageDependencies\"\nimport { rebuild as remoteRebuild } from \"./rebuild/rebuild\"\nimport * as which from \"which\"\n\nexport async function installOrRebuild(config: Configuration, { appDir, projectDir }: DirectoryPaths, options: RebuildOptions, forceInstall = false) {\n const effectiveOptions: RebuildOptions = {\n buildFromSource: config.buildDependenciesFromSource === true,\n additionalArgs: asArray(config.npmArgs),\n ...options,\n }\n let isDependenciesInstalled = false\n\n for (const fileOrDir of [\"node_modules\", \".pnp.js\"]) {\n if ((await pathExists(path.join(projectDir, fileOrDir))) || (await pathExists(path.join(appDir, fileOrDir)))) {\n isDependenciesInstalled = true\n\n break\n }\n }\n\n if (forceInstall || !isDependenciesInstalled) {\n await installDependencies(config, { appDir, projectDir }, effectiveOptions)\n } else {\n await rebuild(config, { appDir, projectDir }, effectiveOptions)\n }\n}\n\nexport interface DesktopFrameworkInfo {\n version: string\n useCustomDist: boolean\n}\n\nfunction getElectronGypCacheDir() {\n return path.join(homedir(), \".electron-gyp\")\n}\n\nexport function getGypEnv(frameworkInfo: DesktopFrameworkInfo, platform: NodeJS.Platform, arch: string, buildFromSource: boolean) {\n const npmConfigArch = arch === \"armv7l\" ? \"arm\" : arch\n const common: any = {\n ...process.env,\n npm_config_arch: npmConfigArch,\n npm_config_target_arch: npmConfigArch,\n npm_config_platform: platform,\n npm_config_build_from_source: buildFromSource,\n // required for node-pre-gyp\n npm_config_target_platform: platform,\n npm_config_update_binary: true,\n npm_config_fallback_to_build: true,\n }\n\n if (platform !== process.platform) {\n common.npm_config_force = \"true\"\n }\n if (platform === \"win32\" || platform === \"darwin\") {\n common.npm_config_target_libc = \"unknown\"\n }\n\n if (!frameworkInfo.useCustomDist) {\n return common\n }\n\n // https://github.com/nodejs/node-gyp/issues/21\n return {\n ...common,\n npm_config_disturl: common.npm_config_electron_mirror || \"https://electronjs.org/headers\",\n npm_config_target: frameworkInfo.version,\n npm_config_runtime: \"electron\",\n npm_config_devdir: getElectronGypCacheDir(),\n }\n}\n\nexport async function installDependencies(config: Configuration, { appDir, projectDir }: DirectoryPaths, options: RebuildOptions): Promise<any> {\n const platform = options.platform || process.platform\n const arch = options.arch || process.arch\n const additionalArgs = options.additionalArgs\n\n const pm = detectPackageManager([projectDir])\n log.info({ pm, platform, arch, projectDir, appDir }, `installing production dependencies`)\n const execArgs = [\"install\"]\n if (pm === PM.YARN_BERRY) {\n if (process.env.NPM_NO_BIN_LINKS === \"true\") {\n execArgs.push(\"--no-bin-links\")\n }\n }\n\n if (pm === PM.YARN) {\n execArgs.push(\"--prefer-offline\")\n }\n\n const execPath = getPackageManagerCommand(pm)\n\n if (additionalArgs != null) {\n execArgs.push(...additionalArgs)\n }\n await spawn(execPath, execArgs, {\n cwd: appDir,\n env: getGypEnv(options.frameworkInfo, platform, arch, options.buildFromSource === true),\n })\n\n // Some native dependencies no longer use `install` hook for building their native module, (yarn 3+ removed implicit link of `install` and `rebuild` steps)\n // https://github.com/electron-userland/electron-builder/issues/8024\n return rebuild(config, { appDir, projectDir }, options)\n}\n\nexport async function nodeGypRebuild(platform: NodeJS.Platform, arch: string, frameworkInfo: DesktopFrameworkInfo) {\n log.info({ platform, arch }, \"executing node-gyp rebuild\")\n // this script must be used only for electron\n const nodeGyp = process.platform === \"win32\" ? which.sync(\"node-gyp\") : \"node-gyp\"\n const args = [\"rebuild\"]\n // headers of old Electron versions do not have a valid config.gypi file\n // and --force-process-config must be passed to node-gyp >= 8.4.0 to\n // correctly build modules for them.\n // see also https://github.com/nodejs/node-gyp/pull/2497\n const [major, minor] = frameworkInfo.version\n .split(\".\")\n .slice(0, 2)\n .map(n => parseInt(n, 10))\n if (major <= 13 || (major == 14 && minor <= 1) || (major == 15 && minor <= 2)) {\n args.push(\"--force-process-config\")\n }\n await spawn(nodeGyp, args, { env: getGypEnv(frameworkInfo, platform, arch, true) })\n}\nexport interface RebuildOptions {\n frameworkInfo: DesktopFrameworkInfo\n productionDeps: Lazy<Array<NodeModuleDirInfo>>\n\n platform?: NodeJS.Platform\n arch?: string\n\n buildFromSource?: boolean\n\n additionalArgs?: Array<string> | null\n}\n\nexport interface DirectoryPaths {\n appDir: string\n projectDir: string\n}\n\n/** @internal */\nexport async function rebuild(config: Configuration, { appDir, projectDir }: DirectoryPaths, options: RebuildOptions) {\n const configuration = {\n dependencies: await options.productionDeps.value,\n nodeExecPath: process.execPath,\n platform: options.platform || process.platform,\n arch: options.arch || process.arch,\n additionalArgs: options.additionalArgs,\n execPath: process.env.npm_execpath || process.env.NPM_CLI_JS,\n buildFromSource: options.buildFromSource === true,\n }\n const { arch, buildFromSource, platform } = configuration\n\n if (config.nativeRebuilder === \"legacy\") {\n const env = getGypEnv(options.frameworkInfo, platform, arch, buildFromSource)\n return executeAppBuilderAndWriteJson([\"rebuild-node-modules\"], configuration, { env, cwd: appDir })\n }\n\n const {\n frameworkInfo: { version: electronVersion },\n } = options\n const logInfo = {\n electronVersion,\n arch,\n buildFromSource,\n appDir: log.filePath(appDir) || \"./\",\n }\n log.info(logInfo, \"executing @electron/rebuild\")\n\n const rebuildOptions: electronRebuild.RebuildOptions = {\n buildPath: appDir,\n electronVersion,\n arch,\n platform,\n buildFromSource,\n projectRootPath: projectDir,\n mode: (config.nativeRebuilder as RebuildMode) || \"sequential\",\n disablePreGypCopy: true,\n }\n return remoteRebuild(rebuildOptions)\n}\n"]}
|
|
1
|
+
{"version":3,"file":"yarn.js","sourceRoot":"","sources":["../../src/util/yarn.ts"],"names":[],"mappings":";;AAaA,4CAqBC;AAWD,8BAiCC;AAED,kDA+BC;AAED,wCAiBC;AAmBD,0BAuCC;AA5LD,+CAAkD;AAClD,uCAAqC;AAErC,2BAA4B;AAC5B,6BAA4B;AAE5B,6CAA4D;AAC5D,oEAA6F;AAE7F,uCAAoD;AACpD,+BAA8B;AAGvB,KAAK,UAAU,gBAAgB,CAAC,MAAqB,EAAE,EAAE,MAAM,EAAE,UAAU,EAAkB,EAAE,OAAuB,EAAE,YAAY,GAAG,KAAK;IACjJ,MAAM,gBAAgB,GAAmB;QACvC,eAAe,EAAE,MAAM,CAAC,2BAA2B,KAAK,IAAI;QAC5D,cAAc,EAAE,IAAA,sBAAO,EAAC,MAAM,CAAC,OAAO,CAAC;QACvC,GAAG,OAAO;KACX,CAAA;IACD,IAAI,uBAAuB,GAAG,KAAK,CAAA;IAEnC,KAAK,MAAM,SAAS,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,EAAE,CAAC;QACpD,I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E,MAAM,EAAE,CAAC,CAAA;IACrG,CAAC;IAED,MAAM,EACJ,aAAa,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,GAC5C,GAAG,OAAO,CAAA;IACX,MAAM,OAAO,GAAG;QACd,eAAe;QACf,IAAI;QACJ,eAAe;QACf,MAAM,EAAE,kBAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI;KACrC,CAAA;IACD,kBAAG,CAAC,IAAI,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAA;IAEhD,MAAM,cAAc,GAA2B;QAC7C,SAAS,EAAE,MAAM;QACjB,eAAe;QACf,IAAI;QACJ,QAAQ;QACR,eAAe;QACf,eAAe,EAAE,UAAU;QAC3B,IAAI,EAAE,MAAM,CAAC,eAAe,IAAI,YAAY;QAC5C,iBAAiB,EAAE,IAAI;KACxB,CAAA;IACD,OAAO,IAAA,iBAAa,EAAC,cAAc,CAAC,CAAA;AACtC,CAAC","sourcesContent":["import { asArray, log, spawn } from \"builder-util\"\nimport { pathExists } from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport { homedir } from \"os\"\nimport * as path from \"path\"\nimport { Configuration } from \"../configuration\"\nimport { executeAppBuilderAndWriteJson } from \"./appBuilder\"\nimport { PM, detectPackageManager, getPackageManagerCommand } from \"../node-module-collector\"\nimport { NodeModuleDirInfo } from \"./packageDependencies\"\nimport { rebuild as remoteRebuild } from \"./rebuild\"\nimport * as which from \"which\"\nimport { RebuildOptions as ElectronRebuildOptions } from \"@electron/rebuild\"\n\nexport async function installOrRebuild(config: Configuration, { appDir, projectDir }: DirectoryPaths, options: RebuildOptions, forceInstall = false) {\n const effectiveOptions: RebuildOptions = {\n buildFromSource: config.buildDependenciesFromSource === true,\n additionalArgs: asArray(config.npmArgs),\n ...options,\n }\n let isDependenciesInstalled = false\n\n for (const fileOrDir of [\"node_modules\", \".pnp.js\"]) {\n if ((await pathExists(path.join(projectDir, fileOrDir))) || (await pathExists(path.join(appDir, fileOrDir)))) {\n isDependenciesInstalled = true\n\n break\n }\n }\n\n if (forceInstall || !isDependenciesInstalled) {\n await installDependencies(config, { appDir, projectDir }, effectiveOptions)\n } else {\n await rebuild(config, { appDir, projectDir }, effectiveOptions)\n }\n}\n\nexport interface DesktopFrameworkInfo {\n version: string\n useCustomDist: boolean\n}\n\nfunction getElectronGypCacheDir() {\n return path.join(homedir(), \".electron-gyp\")\n}\n\nexport function getGypEnv(frameworkInfo: DesktopFrameworkInfo, platform: NodeJS.Platform, arch: string, buildFromSource: boolean) {\n const npmConfigArch = arch === \"armv7l\" ? \"arm\" : arch\n const common: any = {\n ...process.env,\n npm_config_arch: npmConfigArch,\n npm_config_target_arch: npmConfigArch,\n npm_config_platform: platform,\n npm_config_build_from_source: buildFromSource,\n // required for node-pre-gyp\n npm_config_target_platform: platform,\n npm_config_update_binary: true,\n npm_config_fallback_to_build: true,\n }\n\n if (platform !== process.platform) {\n common.npm_config_force = \"true\"\n }\n if (platform === \"win32\" || platform === \"darwin\") {\n common.npm_config_target_libc = \"unknown\"\n }\n\n if (!frameworkInfo.useCustomDist) {\n return common\n }\n\n // https://github.com/nodejs/node-gyp/issues/21\n return {\n ...common,\n npm_config_disturl: common.npm_config_electron_mirror || \"https://electronjs.org/headers\",\n npm_config_target: frameworkInfo.version,\n npm_config_runtime: \"electron\",\n npm_config_devdir: getElectronGypCacheDir(),\n }\n}\n\nexport async function installDependencies(config: Configuration, { appDir, projectDir }: DirectoryPaths, options: RebuildOptions): Promise<any> {\n const platform = options.platform || process.platform\n const arch = options.arch || process.arch\n const additionalArgs = options.additionalArgs\n\n const pm = detectPackageManager([projectDir])\n log.info({ pm, platform, arch, projectDir, appDir }, `installing production dependencies`)\n const execArgs = [\"install\"]\n if (pm === PM.YARN_BERRY) {\n if (process.env.NPM_NO_BIN_LINKS === \"true\") {\n execArgs.push(\"--no-bin-links\")\n }\n }\n\n if (pm === PM.YARN) {\n execArgs.push(\"--prefer-offline\")\n }\n\n const execPath = getPackageManagerCommand(pm)\n\n if (additionalArgs != null) {\n execArgs.push(...additionalArgs)\n }\n await spawn(execPath, execArgs, {\n cwd: appDir,\n env: getGypEnv(options.frameworkInfo, platform, arch, options.buildFromSource === true),\n })\n\n // Some native dependencies no longer use `install` hook for building their native module, (yarn 3+ removed implicit link of `install` and `rebuild` steps)\n // https://github.com/electron-userland/electron-builder/issues/8024\n return rebuild(config, { appDir, projectDir }, options)\n}\n\nexport async function nodeGypRebuild(platform: NodeJS.Platform, arch: string, frameworkInfo: DesktopFrameworkInfo) {\n log.info({ platform, arch }, \"executing node-gyp rebuild\")\n // this script must be used only for electron\n const nodeGyp = process.platform === \"win32\" ? which.sync(\"node-gyp\") : \"node-gyp\"\n const args = [\"rebuild\"]\n // headers of old Electron versions do not have a valid config.gypi file\n // and --force-process-config must be passed to node-gyp >= 8.4.0 to\n // correctly build modules for them.\n // see also https://github.com/nodejs/node-gyp/pull/2497\n const [major, minor] = frameworkInfo.version\n .split(\".\")\n .slice(0, 2)\n .map(n => parseInt(n, 10))\n if (major <= 13 || (major == 14 && minor <= 1) || (major == 15 && minor <= 2)) {\n args.push(\"--force-process-config\")\n }\n await spawn(nodeGyp, args, { env: getGypEnv(frameworkInfo, platform, arch, true) })\n}\nexport interface RebuildOptions {\n frameworkInfo: DesktopFrameworkInfo\n productionDeps: Lazy<Array<NodeModuleDirInfo>>\n\n platform?: NodeJS.Platform\n arch?: string\n\n buildFromSource?: boolean\n\n additionalArgs?: Array<string> | null\n}\n\nexport interface DirectoryPaths {\n appDir: string\n projectDir: string\n}\n\n/** @internal */\nexport async function rebuild(config: Configuration, { appDir, projectDir }: DirectoryPaths, options: RebuildOptions) {\n const configuration = {\n dependencies: await options.productionDeps.value,\n nodeExecPath: process.execPath,\n platform: options.platform || process.platform,\n arch: options.arch || process.arch,\n additionalArgs: options.additionalArgs,\n execPath: process.env.npm_execpath || process.env.NPM_CLI_JS,\n buildFromSource: options.buildFromSource === true,\n }\n const { arch, buildFromSource, platform } = configuration\n\n if (config.nativeRebuilder === \"legacy\") {\n const env = getGypEnv(options.frameworkInfo, platform, arch, buildFromSource)\n return executeAppBuilderAndWriteJson([\"rebuild-node-modules\"], configuration, { env, cwd: appDir })\n }\n\n const {\n frameworkInfo: { version: electronVersion },\n } = options\n const logInfo = {\n electronVersion,\n arch,\n buildFromSource,\n appDir: log.filePath(appDir) || \"./\",\n }\n log.info(logInfo, \"executing @electron/rebuild\")\n\n const rebuildOptions: ElectronRebuildOptions = {\n buildPath: appDir,\n electronVersion,\n arch,\n platform,\n buildFromSource,\n projectRootPath: projectDir,\n mode: config.nativeRebuilder || \"sequential\",\n disablePreGypCopy: true,\n }\n return remoteRebuild(rebuildOptions)\n}\n"]}
|
package/out/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "26.0
|
|
1
|
+
export declare const PACKAGE_VERSION = "26.2.0";
|
package/out/version.js
CHANGED
package/out/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,QAAQ,CAAA","sourcesContent":["export const PACKAGE_VERSION = \"26.2.0\"\n"]}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app-builder-lib",
|
|
3
3
|
"description": "electron-builder lib",
|
|
4
|
-
"version": "26.0
|
|
4
|
+
"version": "26.2.0",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"out",
|
|
8
8
|
"templates",
|
|
9
|
+
"helpers",
|
|
9
10
|
"scheme.json",
|
|
10
11
|
"certs/root_certs.keychain"
|
|
11
12
|
],
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"@electron/fuses": "^1.8.0",
|
|
52
53
|
"@electron/notarize": "2.5.0",
|
|
53
54
|
"@electron/osx-sign": "1.3.3",
|
|
54
|
-
"@electron/rebuild": "
|
|
55
|
+
"@electron/rebuild": "4.0.1",
|
|
55
56
|
"@electron/universal": "2.0.3",
|
|
56
57
|
"@malept/flatpak-bundler": "^0.4.0",
|
|
57
58
|
"@types/fs-extra": "9.0.13",
|
|
@@ -72,14 +73,14 @@
|
|
|
72
73
|
"minimatch": "^10.0.3",
|
|
73
74
|
"plist": "3.1.0",
|
|
74
75
|
"resedit": "^1.7.0",
|
|
75
|
-
"semver": "
|
|
76
|
+
"semver": "7.7.2",
|
|
76
77
|
"tar": "^6.1.12",
|
|
77
78
|
"temp-file": "^3.4.0",
|
|
78
79
|
"tiny-async-pool": "1.3.0",
|
|
79
80
|
"which": "^5.0.0",
|
|
80
|
-
"builder-util": "
|
|
81
|
-
"
|
|
82
|
-
"
|
|
81
|
+
"builder-util-runtime": "9.5.0",
|
|
82
|
+
"electron-publish": "26.1.0",
|
|
83
|
+
"builder-util": "26.1.0"
|
|
83
84
|
},
|
|
84
85
|
"///": "babel in devDependencies for proton tests",
|
|
85
86
|
"devDependencies": {
|
|
@@ -107,17 +108,17 @@
|
|
|
107
108
|
"@types/hosted-git-info": "3.0.2",
|
|
108
109
|
"@types/js-yaml": "4.0.3",
|
|
109
110
|
"@types/plist": "3.0.5",
|
|
110
|
-
"@types/semver": "7.
|
|
111
|
+
"@types/semver": "7.7.1",
|
|
111
112
|
"@types/tar": "^6.1.3",
|
|
112
113
|
"@types/tiny-async-pool": "^1",
|
|
113
114
|
"@types/which": "^3.0.4",
|
|
114
115
|
"toml": "^3.0.0",
|
|
115
|
-
"
|
|
116
|
-
"
|
|
116
|
+
"electron-builder-squirrel-windows": "26.2.0",
|
|
117
|
+
"dmg-builder": "26.2.0"
|
|
117
118
|
},
|
|
118
119
|
"peerDependencies": {
|
|
119
|
-
"
|
|
120
|
-
"
|
|
120
|
+
"electron-builder-squirrel-windows": "26.2.0",
|
|
121
|
+
"dmg-builder": "26.2.0"
|
|
121
122
|
},
|
|
122
123
|
"//": "electron-builder-squirrel-windows and dmg-builder added as dev dep for tests (as otherwise `require` doesn't work using Yarn 2)",
|
|
123
124
|
"typings": "./out/index.d.ts"
|
package/scheme.json
CHANGED
|
@@ -1628,15 +1628,16 @@
|
|
|
1628
1628
|
},
|
|
1629
1629
|
"host": {
|
|
1630
1630
|
"default": "gitlab.com",
|
|
1631
|
-
"description": "The host (including the port if
|
|
1631
|
+
"description": "The GitLab host (including the port if need).",
|
|
1632
1632
|
"type": [
|
|
1633
1633
|
"null",
|
|
1634
1634
|
"string"
|
|
1635
1635
|
]
|
|
1636
1636
|
},
|
|
1637
1637
|
"projectId": {
|
|
1638
|
-
"description": "The GitLab project ID or namespace/project
|
|
1638
|
+
"description": "The GitLab project ID or path (e.g., \"12345678\" or \"namespace/project\").",
|
|
1639
1639
|
"type": [
|
|
1640
|
+
"null",
|
|
1640
1641
|
"string",
|
|
1641
1642
|
"number"
|
|
1642
1643
|
]
|
|
@@ -1677,7 +1678,7 @@
|
|
|
1677
1678
|
]
|
|
1678
1679
|
},
|
|
1679
1680
|
"token": {
|
|
1680
|
-
"description": "The access token to support auto-update from private GitLab repositories. Never specify it in the configuration files.
|
|
1681
|
+
"description": "The access token to support auto-update from private GitLab repositories. Never specify it in the configuration files.",
|
|
1681
1682
|
"type": [
|
|
1682
1683
|
"null",
|
|
1683
1684
|
"string"
|
|
@@ -1688,10 +1689,30 @@
|
|
|
1688
1689
|
"null",
|
|
1689
1690
|
"string"
|
|
1690
1691
|
]
|
|
1692
|
+
},
|
|
1693
|
+
"uploadTarget": {
|
|
1694
|
+
"anyOf": [
|
|
1695
|
+
{
|
|
1696
|
+
"enum": [
|
|
1697
|
+
"generic_package",
|
|
1698
|
+
"project_upload"
|
|
1699
|
+
],
|
|
1700
|
+
"type": "string"
|
|
1701
|
+
},
|
|
1702
|
+
{
|
|
1703
|
+
"type": "null"
|
|
1704
|
+
}
|
|
1705
|
+
],
|
|
1706
|
+
"default": "project_upload",
|
|
1707
|
+
"description": "Upload target method. Can be \"project_upload\" for GitLab project uploads or \"generic_package\" for GitLab generic packages."
|
|
1708
|
+
},
|
|
1709
|
+
"vPrefixedTagName": {
|
|
1710
|
+
"default": true,
|
|
1711
|
+
"description": "Whether to use `v`-prefixed tag name.",
|
|
1712
|
+
"type": "boolean"
|
|
1691
1713
|
}
|
|
1692
1714
|
},
|
|
1693
1715
|
"required": [
|
|
1694
|
-
"projectId",
|
|
1695
1716
|
"provider"
|
|
1696
1717
|
],
|
|
1697
1718
|
"type": "object"
|
|
@@ -1944,7 +1965,7 @@
|
|
|
1944
1965
|
"description": "The executable parameters. Pass to executableName"
|
|
1945
1966
|
},
|
|
1946
1967
|
"executableName": {
|
|
1947
|
-
"description": "The executable name. Defaults to `productName
|
|
1968
|
+
"description": "The executable name. Defaults to `productName`\nNote: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068",
|
|
1948
1969
|
"type": [
|
|
1949
1970
|
"null",
|
|
1950
1971
|
"string"
|
|
@@ -2638,7 +2659,7 @@
|
|
|
2638
2659
|
]
|
|
2639
2660
|
},
|
|
2640
2661
|
"executableName": {
|
|
2641
|
-
"description": "The executable name. Defaults to `productName
|
|
2662
|
+
"description": "The executable name. Defaults to `productName`\nNote: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068",
|
|
2642
2663
|
"type": [
|
|
2643
2664
|
"null",
|
|
2644
2665
|
"string"
|
|
@@ -2828,7 +2849,7 @@
|
|
|
2828
2849
|
},
|
|
2829
2850
|
"icon": {
|
|
2830
2851
|
"default": "build/icon.icns",
|
|
2831
|
-
"description": "The path to application icon.",
|
|
2852
|
+
"description": "The path to application icon.\nAccepts `.icns` (legacy) or `.icon` (Icon Composer asset).\nIf a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.",
|
|
2832
2853
|
"type": [
|
|
2833
2854
|
"null",
|
|
2834
2855
|
"string"
|
|
@@ -3273,7 +3294,7 @@
|
|
|
3273
3294
|
]
|
|
3274
3295
|
},
|
|
3275
3296
|
"executableName": {
|
|
3276
|
-
"description": "The executable name. Defaults to `productName
|
|
3297
|
+
"description": "The executable name. Defaults to `productName`\nNote: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068",
|
|
3277
3298
|
"type": [
|
|
3278
3299
|
"null",
|
|
3279
3300
|
"string"
|
|
@@ -3463,7 +3484,7 @@
|
|
|
3463
3484
|
},
|
|
3464
3485
|
"icon": {
|
|
3465
3486
|
"default": "build/icon.icns",
|
|
3466
|
-
"description": "The path to application icon.",
|
|
3487
|
+
"description": "The path to application icon.\nAccepts `.icns` (legacy) or `.icon` (Icon Composer asset).\nIf a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.",
|
|
3467
3488
|
"type": [
|
|
3468
3489
|
"null",
|
|
3469
3490
|
"string"
|
|
@@ -6515,7 +6536,7 @@
|
|
|
6515
6536
|
"type": "null"
|
|
6516
6537
|
}
|
|
6517
6538
|
],
|
|
6518
|
-
"description": "Options for usage of Azure Trusted Signing
|
|
6539
|
+
"description": "Options for usage of Azure Trusted Signing service\nCannot be used in conjunction with `signtoolOptions`, signing will default to Azure Trusted Signing"
|
|
6519
6540
|
},
|
|
6520
6541
|
"compression": {
|
|
6521
6542
|
"anyOf": [
|
|
@@ -6584,7 +6605,7 @@
|
|
|
6584
6605
|
]
|
|
6585
6606
|
},
|
|
6586
6607
|
"executableName": {
|
|
6587
|
-
"description": "The executable name. Defaults to `productName
|
|
6608
|
+
"description": "The executable name. Defaults to `productName`\nNote: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068",
|
|
6588
6609
|
"type": [
|
|
6589
6610
|
"null",
|
|
6590
6611
|
"string"
|
|
@@ -7359,7 +7380,7 @@
|
|
|
7359
7380
|
]
|
|
7360
7381
|
},
|
|
7361
7382
|
"executableName": {
|
|
7362
|
-
"description": "The executable name. Defaults to `productName
|
|
7383
|
+
"description": "The executable name. Defaults to `productName`\nNote: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068",
|
|
7363
7384
|
"type": [
|
|
7364
7385
|
"null",
|
|
7365
7386
|
"string"
|
|
@@ -8,6 +8,13 @@ Function un.onInit
|
|
|
8
8
|
|
|
9
9
|
!insertmacro check64BitAndSetRegView
|
|
10
10
|
|
|
11
|
+
# Parse command line for /S flag and set silent mode
|
|
12
|
+
${GetParameters} $R0
|
|
13
|
+
${GetOptions} $R0 "/S" $R1
|
|
14
|
+
${IfNot} ${Errors}
|
|
15
|
+
SetSilent silent
|
|
16
|
+
${EndIf}
|
|
17
|
+
|
|
11
18
|
${If} ${Silent}
|
|
12
19
|
call un.checkAppRunning
|
|
13
20
|
${else}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rebuild.js","sourceRoot":"","sources":["../../../src/util/rebuild/rebuild.ts"],"names":[],"mappings":";;;AACA,+CAAkC;AAClC,oCAAmC;AACnC,6BAA4B;AAErB,MAAM,OAAO,GAAG,KAAK,EAAE,OAAuB,EAAiB,EAAE;;IACtE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAA;IACxB,kBAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,gCAAgC,CAAC,CAAA;IAEpD,MAAM,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,mBAAmB,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE;QAC7F,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EA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CAAC;YACD,KAAK,cAAc,CAAC,CAAC,CAAC;gBACpB,kBAAG,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAA;gBACpD,MAAK;YACP,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAA;IAEF,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1C,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;YACtB,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;gBAChC,OAAO,EAAE,CAAA;YACX,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,YAAY,IAAI,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC,CAAA;YAC/E,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AArDY,QAAA,OAAO,WAqDnB","sourcesContent":["import { RebuildOptions } from \"@electron/rebuild\"\nimport { log } from \"builder-util\"\nimport * as cp from \"child_process\"\nimport * as path from \"path\"\n\nexport const rebuild = async (options: RebuildOptions): Promise<void> => {\n const { arch } = options\n log.info({ arch }, `installing native dependencies`)\n\n const child = cp.fork(path.resolve(__dirname, \"remote-rebuild.js\"), [JSON.stringify(options)], {\n stdio: [\"pipe\", \"pipe\", \"pipe\", \"ipc\"],\n })\n\n let pendingError: Error\n\n child.stdout?.on(\"data\", chunk => {\n log.info(chunk.toString())\n })\n child.stderr?.on(\"data\", chunk => {\n log.error(chunk.toString())\n })\n\n child.on(\"message\", (message: { msg: string; moduleName: string; err: { message: string; stack: string } }) => {\n const { moduleName, msg } = message\n switch (msg) {\n case \"module-found\": {\n log.info({ moduleName, arch }, \"preparing\")\n break\n }\n case \"module-done\": {\n log.info({ moduleName, arch }, \"finished\")\n break\n }\n case \"module-skip\": {\n log.debug?.({ moduleName, arch }, \"skipped. set ENV=electron-rebuild to determine why\")\n break\n }\n case \"rebuild-error\": {\n pendingError = new Error(message.err.message)\n pendingError.stack = message.err.stack\n break\n }\n case \"rebuild-done\": {\n log.info(\"completed installing native dependencies\")\n break\n }\n }\n })\n\n await new Promise<void>((resolve, reject) => {\n child.on(\"exit\", code => {\n if (code === 0 && !pendingError) {\n resolve()\n } else {\n reject(pendingError || new Error(`Rebuilder failed with exit code: ${code}`))\n }\n })\n })\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const rebuild_1 = require("@electron/rebuild");
|
|
4
|
-
if (!process.send) {
|
|
5
|
-
console.error("The remote rebuilder expects to be spawned with an IPC channel");
|
|
6
|
-
process.exit(1);
|
|
7
|
-
}
|
|
8
|
-
const options = JSON.parse(process.argv[2]);
|
|
9
|
-
const rebuilder = (0, rebuild_1.rebuild)(options);
|
|
10
|
-
rebuilder.lifecycle.on("module-found", (moduleName) => { var _a; return (_a = process.send) === null || _a === void 0 ? void 0 : _a.call(process, { msg: "module-found", moduleName }); });
|
|
11
|
-
rebuilder.lifecycle.on("module-done", (moduleName) => { var _a; return (_a = process.send) === null || _a === void 0 ? void 0 : _a.call(process, { msg: "module-done", moduleName }); });
|
|
12
|
-
rebuilder.lifecycle.on("module-skip", (moduleName) => { var _a; return (_a = process.send) === null || _a === void 0 ? void 0 : _a.call(process, { msg: "module-skip", moduleName }); });
|
|
13
|
-
rebuilder
|
|
14
|
-
.then(() => {
|
|
15
|
-
var _a;
|
|
16
|
-
(_a = process.send) === null || _a === void 0 ? void 0 : _a.call(process, { msg: "rebuild-done" });
|
|
17
|
-
return process.exit(0);
|
|
18
|
-
})
|
|
19
|
-
.catch(err => {
|
|
20
|
-
var _a;
|
|
21
|
-
(_a = process.send) === null || _a === void 0 ? void 0 : _a.call(process, {
|
|
22
|
-
msg: "rebuild-error",
|
|
23
|
-
err: {
|
|
24
|
-
message: err.message,
|
|
25
|
-
stack: err.stack,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
process.exit(0);
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=remote-rebuild.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-rebuild.js","sourceRoot":"","sources":["../../../src/util/rebuild/remote-rebuild.ts"],"names":[],"mappings":";;AAAA,+CAA2D;AAE3D,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAA;IAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC;AAED,MAAM,OAAO,GAAmB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAE3D,MAAM,SAAS,GAAG,IAAA,iBAAO,EAAC,OAAO,CAAC,CAAA;AAElC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,UAAkB,EAAE,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,IAAI,wDAAG,EAAE,GAAG,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAA,EAAA,CAAC,CAAA;AACnH,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC,UAAkB,EAAE,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,IAAI,wDAAG,EAAE,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAA,EAAA,CAAC,CAAA;AACjH,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC,UAAkB,EAAE,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,IAAI,wDAAG,EAAE,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC,CAAA,EAAA,CAAC,CAAA;AAEjH,SAAS;KACN,IAAI,CAAC,GAAG,EAAE;;IACT,MAAA,OAAO,CAAC,IAAI,wDAAG,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC,CAAA;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACxB,CAAC,CAAC;KACD,KAAK,CAAC,GAAG,CAAC,EAAE;;IACX,MAAA,OAAO,CAAC,IAAI,wDAAG;QACb,GAAG,EAAE,eAAe;QACpB,GAAG,EAAE;YACH,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,KAAK,EAAE,GAAG,CAAC,KAAK;SACjB;KACF,CAAC,CAAA;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA","sourcesContent":["import { rebuild, RebuildOptions } from \"@electron/rebuild\"\n\nif (!process.send) {\n console.error(\"The remote rebuilder expects to be spawned with an IPC channel\")\n process.exit(1)\n}\n\nconst options: RebuildOptions = JSON.parse(process.argv[2])\n\nconst rebuilder = rebuild(options)\n\nrebuilder.lifecycle.on(\"module-found\", (moduleName: string) => process.send?.({ msg: \"module-found\", moduleName }))\nrebuilder.lifecycle.on(\"module-done\", (moduleName: string) => process.send?.({ msg: \"module-done\", moduleName }))\nrebuilder.lifecycle.on(\"module-skip\", (moduleName: string) => process.send?.({ msg: \"module-skip\", moduleName }))\n\nrebuilder\n .then(() => {\n process.send?.({ msg: \"rebuild-done\" })\n return process.exit(0)\n })\n .catch(err => {\n process.send?.({\n msg: \"rebuild-error\",\n err: {\n message: err.message,\n stack: err.stack,\n },\n })\n process.exit(0)\n })\n"]}
|
|
File without changes
|