update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
12
electron/node_modules/builder-util/out/promise.js
generated
vendored
12
electron/node_modules/builder-util/out/promise.js
generated
vendored
|
|
@ -1,12 +1,15 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.orIfFileNotExist = exports.orNullIfFileNotExist = exports.NestedError = exports.executeFinally = exports.printErrorAndExit = void 0;
|
||||
exports.NestedError = void 0;
|
||||
exports.printErrorAndExit = printErrorAndExit;
|
||||
exports.executeFinally = executeFinally;
|
||||
exports.orNullIfFileNotExist = orNullIfFileNotExist;
|
||||
exports.orIfFileNotExist = orIfFileNotExist;
|
||||
const chalk = require("chalk");
|
||||
function printErrorAndExit(error) {
|
||||
console.error(chalk.red((error.stack || error).toString()));
|
||||
process.exit(1);
|
||||
}
|
||||
exports.printErrorAndExit = printErrorAndExit;
|
||||
// you don't need to handle error in your task - it is passed only indicate status of promise
|
||||
async function executeFinally(promise, task) {
|
||||
let result = null;
|
||||
|
|
@ -25,7 +28,6 @@ async function executeFinally(promise, task) {
|
|||
await task(false);
|
||||
return result;
|
||||
}
|
||||
exports.executeFinally = executeFinally;
|
||||
class NestedError extends Error {
|
||||
constructor(errors, message = "Compound error: ") {
|
||||
let m = message;
|
||||
|
|
@ -41,14 +43,12 @@ exports.NestedError = NestedError;
|
|||
function orNullIfFileNotExist(promise) {
|
||||
return orIfFileNotExist(promise, null);
|
||||
}
|
||||
exports.orNullIfFileNotExist = orNullIfFileNotExist;
|
||||
function orIfFileNotExist(promise, fallbackValue) {
|
||||
return promise.catch(e => {
|
||||
return promise.catch((e) => {
|
||||
if (e.code === "ENOENT" || e.code === "ENOTDIR") {
|
||||
return fallbackValue;
|
||||
}
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
exports.orIfFileNotExist = orIfFileNotExist;
|
||||
//# sourceMappingURL=promise.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue