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,13 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.macPathToParallelsWindows = exports.ParallelsVmManager = exports.parseVmList = void 0;
exports.ParallelsVmManager = void 0;
exports.parseVmList = parseVmList;
exports.macPathToParallelsWindows = macPathToParallelsWindows;
const builder_util_1 = require("builder-util");
const child_process_1 = require("child_process");
const vm_1 = require("./vm");
/** @internal */
async function parseVmList(debugLogger) {
// do not log output if debug - it is huge, logged using debugLogger
let rawList = await builder_util_1.exec("prlctl", ["list", "-i", "-s", "name"], undefined, false);
let rawList = await (0, builder_util_1.exec)("prlctl", ["list", "-i", "-s", "name"], undefined, false);
debugLogger.add("parallels.list", rawList);
rawList = rawList.substring(rawList.indexOf("ID:"));
// let match: Array<string> | null
@ -31,8 +33,6 @@ async function parseVmList(debugLogger) {
}
return result;
}
exports.parseVmList = parseVmList;
/** @internal */
class ParallelsVmManager extends vm_1.VmManager {
constructor(vm) {
super();
@ -53,11 +53,11 @@ class ParallelsVmManager extends vm_1.VmManager {
async exec(file, args, options) {
await this.ensureThatVmStarted();
// it is important to use "--current-user" to execute command under logged in user - to access certs.
return await builder_util_1.exec("prlctl", ["exec", this.vm.id, "--current-user", file.startsWith("/") ? macPathToParallelsWindows(file) : file].concat(args), options).catch(error => this.handleExecuteError(error));
return await (0, builder_util_1.exec)("prlctl", ["exec", this.vm.id, "--current-user", file.startsWith("/") ? macPathToParallelsWindows(file) : file].concat(args), options).catch(error => this.handleExecuteError(error));
}
async spawn(file, args, options, extraOptions) {
await this.ensureThatVmStarted();
return await builder_util_1.spawn("prlctl", ["exec", this.vm.id, file].concat(args), options, extraOptions).catch(error => this.handleExecuteError(error));
return await (0, builder_util_1.spawn)("prlctl", ["exec", this.vm.id, file].concat(args), options, extraOptions).catch(error => this.handleExecuteError(error));
}
async doStartVm() {
const vmId = this.vm.id;
@ -67,18 +67,17 @@ class ParallelsVmManager extends vm_1.VmManager {
}
if (!this.isExitHookAdded) {
this.isExitHookAdded = true;
// eslint-disable-next-line @typescript-eslint/no-var-requires
require("async-exit-hook")((callback) => {
const stopArgs = ["suspend", vmId];
if (callback == null) {
child_process_1.execFileSync("prlctl", stopArgs);
(0, child_process_1.execFileSync)("prlctl", stopArgs);
}
else {
builder_util_1.exec("prlctl", stopArgs).then(callback).catch(callback);
(0, builder_util_1.exec)("prlctl", stopArgs).then(callback).catch(callback);
}
});
}
await builder_util_1.exec("prlctl", ["start", vmId]);
await (0, builder_util_1.exec)("prlctl", ["start", vmId]);
}
ensureThatVmStarted() {
let startPromise = this.startPromise;
@ -100,5 +99,4 @@ function macPathToParallelsWindows(file) {
}
return "\\\\Mac\\Host\\" + file.replace(/\//g, "\\");
}
exports.macPathToParallelsWindows = macPathToParallelsWindows;
//# sourceMappingURL=ParallelsVm.js.map