electron-builder 26.2.0 → 26.3.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.
|
@@ -9,6 +9,7 @@ const load_1 = require("app-builder-lib/out/util/config/load");
|
|
|
9
9
|
const packageDependencies_1 = require("app-builder-lib/out/util/packageDependencies");
|
|
10
10
|
const yarn_1 = require("app-builder-lib/out/util/yarn");
|
|
11
11
|
const version_1 = require("app-builder-lib/out/version");
|
|
12
|
+
const node_module_collector_1 = require("app-builder-lib/out/node-module-collector");
|
|
12
13
|
const builder_util_1 = require("builder-util");
|
|
13
14
|
const fs_extra_1 = require("fs-extra");
|
|
14
15
|
const lazy_val_1 = require("lazy-val");
|
|
@@ -35,6 +36,7 @@ function configureInstallAppDepsCommand(yargs) {
|
|
|
35
36
|
}
|
|
36
37
|
/** @internal */
|
|
37
38
|
async function installAppDeps(args) {
|
|
39
|
+
var _a;
|
|
38
40
|
try {
|
|
39
41
|
builder_util_1.log.info({ version: version_1.PACKAGE_VERSION }, "electron-builder");
|
|
40
42
|
}
|
|
@@ -47,20 +49,19 @@ async function installAppDeps(args) {
|
|
|
47
49
|
const projectDir = process.cwd();
|
|
48
50
|
const packageMetadata = new lazy_val_1.Lazy(() => (0, load_1.orNullIfFileNotExist)((0, fs_extra_1.readJson)(path.join(projectDir, "package.json"))));
|
|
49
51
|
const config = await (0, config_1.getConfig)(projectDir, null, null, packageMetadata);
|
|
50
|
-
const [appDir, version] = await Promise.all([
|
|
51
|
-
|
|
52
|
-
(0, electronVersion_1.getElectronVersion)(projectDir, config),
|
|
53
|
-
]);
|
|
52
|
+
const [appDir, version] = await Promise.all([(0, config_1.computeDefaultAppDirectory)(projectDir, (_a = config.directories) === null || _a === void 0 ? void 0 : _a.app), (0, electronVersion_1.getElectronVersion)(projectDir, config)]);
|
|
53
|
+
const packageManagerEnv = (0, node_module_collector_1.determinePackageManagerEnv)({ projectDir, appDir, workspaceRoot: undefined });
|
|
54
54
|
// if two package.json — force full install (user wants to install/update app deps in addition to dev)
|
|
55
55
|
await (0, yarn_1.installOrRebuild)(config, {
|
|
56
56
|
appDir,
|
|
57
57
|
projectDir,
|
|
58
|
+
workspaceRoot: await (await packageManagerEnv.value).workspaceRoot,
|
|
58
59
|
}, {
|
|
59
60
|
frameworkInfo: { version, useCustomDist: true },
|
|
60
61
|
platform: args.platform,
|
|
61
62
|
arch: args.arch,
|
|
62
63
|
productionDeps: (0, packageDependencies_1.createLazyProductionDeps)(appDir, null, false),
|
|
63
|
-
}, appDir !== projectDir);
|
|
64
|
+
}, appDir !== projectDir, {});
|
|
64
65
|
}
|
|
65
66
|
function main() {
|
|
66
67
|
return installAppDeps(configureInstallAppDepsCommand(yargs).argv);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-app-deps.js","sourceRoot":"","sources":["../../src/cli/install-app-deps.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"install-app-deps.js","sourceRoot":"","sources":["../../src/cli/install-app-deps.ts"],"names":[],"mappings":";;;AAgBA,wEAiBC;AAGD,wCAkCC;AApED,kFAAiF;AACjF,mEAA8F;AAC9F,+DAA2E;AAC3E,sFAAuF;AACvF,wDAAgE;AAChE,yDAA6D;AAC7D,qFAAsF;AACtF,+CAAsE;AACtE,uCAAmC;AACnC,uCAA+B;AAC/B,6BAA4B;AAC5B,+BAA8B;AAE9B,gBAAgB;AAChB,SAAgB,8BAA8B,CAAC,KAAiB;IAC9D,4CAA4C;IAC5C,qCAAqC;IACrC,OAAO,KAAK;SACT,mBAAmB,CAAC;QACnB,sBAAsB,EAAE,KAAK;KAC9B,CAAC;SACD,MAAM,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;QACrC,OAAO,EAAE,OAAO,CAAC,QAAQ;QACzB,WAAW,EAAE,qBAAqB;KACnC,CAAC;SACD,MAAM,CAAC,MAAM,EAAE;QACd,OAAO,EAAE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MAAM,IAAA,uBAAgB,EACpB,MAAM,EACN;QACE,MAAM;QACN,UAAU;QACV,aAAa,EAAE,MAAM,CAAC,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAAC,aAAa;KACnE,EACD;QACE,aAAa,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE;QAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAA,8CAAwB,EAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC;KAC9D,EACD,MAAM,KAAK,UAAU,EACrB,EAAE,CACH,CAAA;AACH,CAAC;AAED,SAAS,IAAI;IACX,OAAO,cAAc,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;AACnE,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,kBAAG,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAA;IACvE,IAAI,EAAE,CAAC,KAAK,CAAC,gCAAiB,CAAC,CAAA;AACjC,CAAC","sourcesContent":["#! /usr/bin/env node\n\nimport { getElectronVersion } from \"app-builder-lib/out/electron/electronVersion\"\nimport { computeDefaultAppDirectory, getConfig } from \"app-builder-lib/out/util/config/config\"\nimport { orNullIfFileNotExist } from \"app-builder-lib/out/util/config/load\"\nimport { createLazyProductionDeps } from \"app-builder-lib/out/util/packageDependencies\"\nimport { installOrRebuild } from \"app-builder-lib/out/util/yarn\"\nimport { PACKAGE_VERSION } from \"app-builder-lib/out/version\"\nimport { determinePackageManagerEnv } from \"app-builder-lib/out/node-module-collector\"\nimport { getArchCliNames, log, printErrorAndExit } from \"builder-util\"\nimport { readJson } from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport * as yargs from \"yargs\"\n\n/** @internal */\nexport function configureInstallAppDepsCommand(yargs: yargs.Argv): yargs.Argv {\n // https://github.com/yargs/yargs/issues/760\n // demandOption is required to be set\n return yargs\n .parserConfiguration({\n \"camel-case-expansion\": false,\n })\n .option(\"platform\", {\n choices: [\"linux\", \"darwin\", \"win32\"],\n default: process.platform,\n description: \"The target platform\",\n })\n .option(\"arch\", {\n choices: getArchCliNames().concat(\"all\"),\n default: process.arch === \"arm\" ? \"armv7l\" : process.arch,\n description: \"The target arch\",\n })\n}\n\n/** @internal */\nexport async function installAppDeps(args: any) {\n try {\n log.info({ version: PACKAGE_VERSION }, \"electron-builder\")\n } catch (e: any) {\n // error in dev mode without babel\n if (!(e instanceof ReferenceError)) {\n throw e\n }\n }\n\n const projectDir = process.cwd()\n const packageMetadata = new Lazy(() => orNullIfFileNotExist(readJson(path.join(projectDir, \"package.json\"))))\n const config = await getConfig(projectDir, null, null, packageMetadata)\n const [appDir, version] = await Promise.all<string>([computeDefaultAppDirectory(projectDir, config.directories?.app), getElectronVersion(projectDir, config)])\n\n const packageManagerEnv = determinePackageManagerEnv({ projectDir, appDir, workspaceRoot: undefined })\n\n // if two package.json — force full install (user wants to install/update app deps in addition to dev)\n await installOrRebuild(\n config,\n {\n appDir,\n projectDir,\n workspaceRoot: await (await packageManagerEnv.value).workspaceRoot,\n },\n {\n frameworkInfo: { version, useCustomDist: true },\n platform: args.platform,\n arch: args.arch,\n productionDeps: createLazyProductionDeps(appDir, null, false),\n },\n appDir !== projectDir,\n {}\n )\n}\n\nfunction main() {\n return installAppDeps(configureInstallAppDepsCommand(yargs).argv)\n}\n\nif (require.main === module) {\n log.warn(\"please use as subcommand: electron-builder install-app-deps\")\n main().catch(printErrorAndExit)\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "electron-builder",
|
|
3
3
|
"description": "A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out of the box",
|
|
4
|
-
"version": "26.
|
|
4
|
+
"version": "26.3.1",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"out"
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"lazy-val": "^1.0.5",
|
|
58
58
|
"simple-update-notifier": "2.0.0",
|
|
59
59
|
"yargs": "^17.6.2",
|
|
60
|
-
"app-builder-lib": "26.
|
|
61
|
-
"builder-util": "
|
|
62
|
-
"dmg-builder": "26.
|
|
63
|
-
"builder-util
|
|
60
|
+
"app-builder-lib": "26.3.1",
|
|
61
|
+
"builder-util-runtime": "9.5.1",
|
|
62
|
+
"dmg-builder": "26.3.1",
|
|
63
|
+
"builder-util": "26.3.1"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/fs-extra": "9.0.13",
|