builder-util-runtime
Advanced tools
Comparing version 9.2.5-alpha.2 to 9.2.5-alpha.3
@@ -10,3 +10,3 @@ "use strict"; | ||
const CancellationToken_1 = require("./CancellationToken"); | ||
const index_1 = require("./index"); | ||
const error_1 = require("./error"); | ||
const ProgressCallbackTransform_1 = require("./ProgressCallbackTransform"); | ||
@@ -325,6 +325,6 @@ const debug = (0, debug_1.default)("electron-builder"); | ||
if (this._actual == null) { | ||
throw (0, index_1.newError)("Not finished yet", "ERR_STREAM_NOT_FINISHED"); | ||
throw (0, error_1.newError)("Not finished yet", "ERR_STREAM_NOT_FINISHED"); | ||
} | ||
if (this._actual !== this.expected) { | ||
throw (0, index_1.newError)(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`, "ERR_CHECKSUM_MISMATCH"); | ||
throw (0, error_1.newError)(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`, "ERR_CHECKSUM_MISMATCH"); | ||
} | ||
@@ -331,0 +331,0 @@ return null; |
@@ -10,5 +10,5 @@ export { CancellationToken, CancellationError } from "./CancellationToken"; | ||
export { BlockMap } from "./blockMapApi"; | ||
export { newError } from "./error"; | ||
export declare const CURRENT_APP_INSTALLER_FILE_NAME = "installer.exe"; | ||
export declare const CURRENT_APP_PACKAGE_FILE_NAME = "package.7z"; | ||
export declare function asArray<T>(v: null | undefined | T | Array<T>): Array<T>; | ||
export declare function newError(message: string, code: string): Error; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.newError = exports.asArray = exports.CURRENT_APP_PACKAGE_FILE_NAME = exports.CURRENT_APP_INSTALLER_FILE_NAME = exports.XElement = exports.parseXml = exports.ProgressCallbackTransform = exports.UUID = exports.parseDn = exports.githubUrl = exports.getS3LikeProviderBaseUrl = exports.configureRequestUrl = exports.parseJson = exports.safeStringifyJson = exports.configureRequestOptionsFromUrl = exports.configureRequestOptions = exports.safeGetHeader = exports.DigestTransform = exports.HttpExecutor = exports.createHttpError = exports.HttpError = exports.CancellationError = exports.CancellationToken = void 0; | ||
exports.asArray = exports.CURRENT_APP_PACKAGE_FILE_NAME = exports.CURRENT_APP_INSTALLER_FILE_NAME = exports.newError = exports.XElement = exports.parseXml = exports.ProgressCallbackTransform = exports.UUID = exports.parseDn = exports.githubUrl = exports.getS3LikeProviderBaseUrl = exports.configureRequestUrl = exports.parseJson = exports.safeStringifyJson = exports.configureRequestOptionsFromUrl = exports.configureRequestOptions = exports.safeGetHeader = exports.DigestTransform = exports.HttpExecutor = exports.createHttpError = exports.HttpError = exports.CancellationError = exports.CancellationToken = void 0; | ||
var CancellationToken_1 = require("./CancellationToken"); | ||
@@ -30,2 +30,4 @@ Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return CancellationToken_1.CancellationToken; } }); | ||
Object.defineProperty(exports, "XElement", { enumerable: true, get: function () { return xml_1.XElement; } }); | ||
var error_1 = require("./error"); | ||
Object.defineProperty(exports, "newError", { enumerable: true, get: function () { return error_1.newError; } }); | ||
// nsis | ||
@@ -47,8 +49,2 @@ exports.CURRENT_APP_INSTALLER_FILE_NAME = "installer.exe"; | ||
exports.asArray = asArray; | ||
function newError(message, code) { | ||
const error = new Error(message); | ||
error.code = code; | ||
return error; | ||
} | ||
exports.newError = newError; | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
const crypto_1 = require("crypto"); | ||
const index_1 = require("./index"); | ||
const error_1 = require("./error"); | ||
const invalidName = "options.name must be either a string or a Buffer"; | ||
@@ -84,3 +84,3 @@ // Node ID according to rfc4122#section-4.5 | ||
} | ||
throw (0, index_1.newError)("Unknown type of uuid", "ERR_UNKNOWN_UUID_TYPE"); | ||
throw (0, error_1.newError)("Unknown type of uuid", "ERR_UNKNOWN_UUID_TYPE"); | ||
} | ||
@@ -130,3 +130,3 @@ // read stringified uuid into a Buffer | ||
if (nameIsNotAString && !Buffer.isBuffer(name)) { | ||
throw (0, index_1.newError)(invalidName, "ERR_INVALID_UUID_NAME"); | ||
throw (0, error_1.newError)(invalidName, "ERR_INVALID_UUID_NAME"); | ||
} | ||
@@ -133,0 +133,0 @@ hash.update(namespace); |
@@ -5,3 +5,3 @@ "use strict"; | ||
const sax = require("sax"); | ||
const index_1 = require("./index"); | ||
const error_1 = require("./error"); | ||
class XElement { | ||
@@ -15,6 +15,6 @@ constructor(name) { | ||
if (!name) { | ||
throw (0, index_1.newError)("Element name cannot be empty", "ERR_XML_ELEMENT_NAME_EMPTY"); | ||
throw (0, error_1.newError)("Element name cannot be empty", "ERR_XML_ELEMENT_NAME_EMPTY"); | ||
} | ||
if (!isValidName(name)) { | ||
throw (0, index_1.newError)(`Invalid element name: ${name}`, "ERR_XML_ELEMENT_INVALID_NAME"); | ||
throw (0, error_1.newError)(`Invalid element name: ${name}`, "ERR_XML_ELEMENT_INVALID_NAME"); | ||
} | ||
@@ -25,3 +25,3 @@ } | ||
if (result == null) { | ||
throw (0, index_1.newError)(`No attribute "${name}"`, "ERR_XML_MISSED_ATTRIBUTE"); | ||
throw (0, error_1.newError)(`No attribute "${name}"`, "ERR_XML_MISSED_ATTRIBUTE"); | ||
} | ||
@@ -38,3 +38,3 @@ return result; | ||
if (result === null) { | ||
throw (0, index_1.newError)(errorIfMissed || `No element "${name}"`, "ERR_XML_MISSED_ELEMENT"); | ||
throw (0, error_1.newError)(errorIfMissed || `No element "${name}"`, "ERR_XML_MISSED_ELEMENT"); | ||
} | ||
@@ -41,0 +41,0 @@ return result; |
{ | ||
"name": "builder-util-runtime", | ||
"version": "9.2.5-alpha.2", | ||
"version": "9.2.5-alpha.3", | ||
"main": "out/index.js", | ||
@@ -5,0 +5,0 @@ "author": "Vladimir Krivosheev", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
151270
36
1675