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,38 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkFileInArchive = void 0;
const fs_1 = require("builder-util/out/fs");
const asar_1 = require("./asar");
/** @internal */
exports.checkFileInArchive = checkFileInArchive;
const dynamicImport_1 = require("../util/dynamicImport");
async function checkFileInArchive(asarFile, relativeFile, messagePrefix) {
const asar = await (0, dynamicImport_1.dynamicImport)("@electron/asar");
function error(text) {
return new Error(`${messagePrefix} "${relativeFile}" in the "${asarFile}" ${text}`);
}
let fs;
try {
fs = await asar_1.readAsar(asarFile);
}
catch (e) {
throw error(`is corrupted: ${e}`);
}
let stat;
try {
stat = fs.getFile(relativeFile);
stat = asar.statFile(asarFile, relativeFile, false);
}
catch (e) {
const fileStat = await fs_1.statOrNull(asarFile);
if (fileStat == null) {
throw error(`does not exist. Seems like a wrong configuration.`);
if (e.message.includes("Cannot read properties of undefined (reading 'link')")) {
throw error("does not exist. Seems like a wrong configuration.");
}
// asar throws error on access to undefined object (info.link)
stat = null;
}
if (stat == null) {
throw error(`does not exist. Seems like a wrong configuration.`);
throw error(`is corrupted: ${e}`);
}
if (stat.size === 0) {
throw error(`is corrupted: size 0`);
}
return stat;
}
exports.checkFileInArchive = checkFileInArchive;
//# sourceMappingURL=asarFileChecker.js.map