update electron to v43

This commit is contained in:
olcxja 2026-07-09 22:38:33 +02:00
commit fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions

View file

@ -1,18 +1,18 @@
#! /usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.installAppDeps = exports.configureInstallAppDepsCommand = void 0;
const version_1 = require("app-builder-lib/out/version");
const builder_util_1 = require("builder-util");
const promise_1 = require("builder-util/out/promise");
const config_1 = require("app-builder-lib/out/util/config");
exports.configureInstallAppDepsCommand = configureInstallAppDepsCommand;
exports.installAppDeps = installAppDeps;
const electronVersion_1 = require("app-builder-lib/out/electron/electronVersion");
const packageDependencies_1 = require("app-builder-lib/out/util/packageDependencies");
const config_1 = require("app-builder-lib/out/util/config/config");
const load_1 = require("app-builder-lib/out/util/config/load");
const yarn_1 = require("app-builder-lib/out/util/yarn");
const version_1 = require("app-builder-lib/out/version");
const node_module_collector_1 = require("app-builder-lib/out/node-module-collector");
const builder_util_1 = require("builder-util");
const fs_extra_1 = require("fs-extra");
const lazy_val_1 = require("lazy-val");
const path = require("path");
const read_config_file_1 = require("read-config-file");
const yargs = require("yargs");
/** @internal */
function configureInstallAppDepsCommand(yargs) {
@ -28,14 +28,14 @@ function configureInstallAppDepsCommand(yargs) {
description: "The target platform",
})
.option("arch", {
choices: builder_util_1.getArchCliNames().concat("all"),
choices: (0, builder_util_1.getArchCliNames)().concat("all"),
default: process.arch === "arm" ? "armv7l" : process.arch,
description: "The target arch",
});
}
exports.configureInstallAppDepsCommand = configureInstallAppDepsCommand;
/** @internal */
async function installAppDeps(args) {
var _a;
try {
builder_util_1.log.info({ version: version_1.PACKAGE_VERSION }, "electron-builder");
}
@ -46,26 +46,26 @@ async function installAppDeps(args) {
}
}
const projectDir = process.cwd();
const packageMetadata = new lazy_val_1.Lazy(() => read_config_file_1.orNullIfFileNotExist(fs_extra_1.readJson(path.join(projectDir, "package.json"))));
const config = await config_1.getConfig(projectDir, null, null, packageMetadata);
const [appDir, version] = await Promise.all([
config_1.computeDefaultAppDirectory(projectDir, builder_util_1.use(config.directories, it => it.app)),
electronVersion_1.getElectronVersion(projectDir, config, packageMetadata),
]);
const packageMetadata = new lazy_val_1.Lazy(() => (0, load_1.orNullIfFileNotExist)((0, fs_extra_1.readJson)(path.join(projectDir, "package.json"))));
const config = await (0, config_1.getConfig)(projectDir, null, null, packageMetadata);
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)]);
const packageManagerEnv = (0, node_module_collector_1.determinePackageManagerEnv)({ projectDir, appDir, workspaceRoot: undefined });
// if two package.json — force full install (user wants to install/update app deps in addition to dev)
await yarn_1.installOrRebuild(config, appDir, {
await (0, yarn_1.installOrRebuild)(config, {
appDir,
projectDir,
workspaceRoot: await (await packageManagerEnv.value).workspaceRoot,
}, {
frameworkInfo: { version, useCustomDist: true },
platform: args.platform,
arch: args.arch,
productionDeps: packageDependencies_1.createLazyProductionDeps(appDir, null),
}, appDir !== projectDir);
}, appDir !== projectDir, {});
}
exports.installAppDeps = installAppDeps;
function main() {
return installAppDeps(configureInstallAppDepsCommand(yargs).argv);
}
if (require.main === module) {
builder_util_1.log.warn("please use as subcommand: electron-builder install-app-deps");
main().catch(promise_1.printErrorAndExit);
main().catch(builder_util_1.printErrorAndExit);
}
//# sourceMappingURL=install-app-deps.js.map