builder-util
Advanced tools
Comparing version 3.0.12 to 3.0.13
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
//# sourceMappingURL=api.js.map | ||
//# sourceMappingURL=api.js.map | ||
"use strict"; |
@@ -14,3 +14,3 @@ "use strict"; | ||
Arch[Arch["armv7l"] = 2] = "armv7l"; | ||
})(exports.Arch = Arch = Arch || (exports.Arch = Arch = {})); | ||
})(Arch || (exports.Arch = Arch = {})); | ||
function toLinuxArchString(arch) { | ||
@@ -17,0 +17,0 @@ return arch === Arch.ia32 ? "i386" : arch === Arch.x64 ? "amd64" : "armv7l"; |
@@ -44,3 +44,3 @@ "use strict"; | ||
}; | ||
if (checksum.length === 64 && !(checksum.indexOf("+") !== -1) && !(checksum.indexOf("Z") !== -1) && !(checksum.indexOf("=") !== -1)) { | ||
if (checksum.length === 64 && !checksum.includes("+") && !checksum.includes("Z") && !checksum.includes("=")) { | ||
options.sha2 = checksum; | ||
@@ -47,0 +47,0 @@ } else { |
@@ -29,5 +29,3 @@ "use strict"; | ||
class DebugLogger { | ||
constructor() { | ||
let enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; | ||
constructor(enabled = true) { | ||
this.enabled = enabled; | ||
@@ -34,0 +32,0 @@ this.data = {}; |
@@ -168,5 +168,3 @@ "use strict"; | ||
const _isUseHardLink = process.platform !== "win32" && process.env.USE_HARD_LINKS !== "false" && ((_isCi || _load_isCi()).default || process.env.USE_HARD_LINKS === "true"); | ||
function copyFile(src, dest) { | ||
let isEnsureDir = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; | ||
function copyFile(src, dest, isEnsureDir = true) { | ||
return (isEnsureDir ? (0, (_fsExtraP || _load_fsExtraP()).ensureDir)(_path.dirname(dest)) : (_bluebirdLst2 || _load_bluebirdLst2()).default.resolve()).then(() => copyOrLinkFile(src, dest, null, false)); | ||
@@ -180,6 +178,3 @@ } | ||
*/ | ||
function copyOrLinkFile(src, dest, stats) { | ||
let isUseHardLink = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _isUseHardLink; | ||
let exDevErrorHandler = arguments[4]; | ||
function copyOrLinkFile(src, dest, stats, isUseHardLink = _isUseHardLink, exDevErrorHandler) { | ||
if (stats != null) { | ||
@@ -287,5 +282,3 @@ const originalModeNumber = stats.mode; | ||
function copyDir(src, destination) { | ||
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
function copyDir(src, destination, options = {}) { | ||
const fileCopier = new FileCopier(options.isUseHardLink, options.transformer); | ||
@@ -315,3 +308,3 @@ if ((_util || _load_util()).debug.enabled) { | ||
return function consume(_x9, _x10, _x11) { | ||
return function consume(_x6, _x7, _x8) { | ||
return _ref4.apply(this, arguments); | ||
@@ -318,0 +311,0 @@ }; |
@@ -28,7 +28,3 @@ "use strict"; | ||
function hashFile(file) { | ||
let algorithm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "sha512"; | ||
let encoding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "base64"; | ||
let options = arguments[3]; | ||
function hashFile(file, algorithm = "sha512", encoding = "base64", options) { | ||
return new (_bluebirdLst || _load_bluebirdLst()).default((resolve, reject) => { | ||
@@ -35,0 +31,0 @@ const hash = (0, (_crypto || _load_crypto()).createHash)(algorithm); |
@@ -13,3 +13,3 @@ "use strict"; | ||
function toLangWithRegion(lang) { | ||
if (lang.indexOf("_") !== -1) { | ||
if (lang.includes("_")) { | ||
return lang; | ||
@@ -16,0 +16,0 @@ } |
@@ -43,4 +43,4 @@ "use strict"; | ||
return fileNames.sort((a, b) => { | ||
const aW = a.indexOf("_en") !== -1 ? 0 : 100; | ||
const bW = b.indexOf("_en") !== -1 ? 0 : 100; | ||
const aW = a.includes("_en") ? 0 : 100; | ||
const bW = b.includes("_en") ? 0 : 100; | ||
return aW === bW ? a.localeCompare(b) : aW - bW; | ||
@@ -50,3 +50,3 @@ }).map(file => { | ||
let langWithRegion; | ||
if (lang.indexOf("_") !== -1) { | ||
if (lang.includes("_")) { | ||
langWithRegion = lang; | ||
@@ -53,0 +53,0 @@ lang = langWithRegion.substring(0, lang.indexOf("_")); |
@@ -117,6 +117,5 @@ "use strict"; | ||
class NodeHttpExecutor extends (_builderUtilRuntime || _load_builderUtilRuntime()).HttpExecutor { | ||
download(url, destination) { | ||
download(url, destination, options = { cancellationToken: new (_builderUtilRuntime || _load_builderUtilRuntime()).CancellationToken() }) { | ||
var _this = this; | ||
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { cancellationToken: new (_builderUtilRuntime || _load_builderUtilRuntime()).CancellationToken() }; | ||
return (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () { | ||
@@ -123,0 +122,0 @@ if (!options.skipDirCreation) { |
@@ -55,5 +55,3 @@ "use strict"; | ||
}class NestedError extends Error { | ||
constructor(errors) { | ||
let message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "Compound error: "; | ||
constructor(errors, message = "Compound error: ") { | ||
let m = message; | ||
@@ -60,0 +58,0 @@ let i = 1; |
@@ -238,4 +238,2 @@ "use strict"; | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } } | ||
const debug = exports.debug = (0, _debug2.default)("electron-builder"); | ||
@@ -264,5 +262,3 @@ const debug7z = exports.debug7z = (0, _debug2.default)("electron-builder:7z"); | ||
} | ||
function exec(file, args, options) { | ||
let isLogOutIfDebug = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; | ||
function exec(file, args, options, isLogOutIfDebug = true) { | ||
if (debug.enabled) { | ||
@@ -315,3 +311,3 @@ debug(`Executing ${file} ${args == null ? "" : removePassword(args.join(" "))}`); | ||
function removeWineSpam(out) { | ||
return out.toString().split("\n").filter(it => !(it.indexOf("wine: cannot find L\"C:\\\\windows\\\\system32\\\\winemenubuilder.exe\"") !== -1) && !(it.indexOf("err:wineboot:ProcessRunKeys Error running cmd L\"C:\\\\windows\\\\system32\\\\winemenubuilder.exe") !== -1)).join("\n"); | ||
return out.toString().split("\n").filter(it => !it.includes("wine: cannot find L\"C:\\\\windows\\\\system32\\\\winemenubuilder.exe\"") && !it.includes("err:wineboot:ProcessRunKeys Error running cmd L\"C:\\\\windows\\\\system32\\\\winemenubuilder.exe")).join("\n"); | ||
} | ||
@@ -342,5 +338,3 @@ function doSpawn(command, args, options, extraOptions) { | ||
} | ||
function spawnAndWrite(command, args, data, options) { | ||
let isDebugEnabled = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; | ||
function spawnAndWrite(command, args, data, options, isDebugEnabled = false) { | ||
const childProcess = doSpawn(command, args, options, { isPipeInput: true, isDebugEnabled }); | ||
@@ -437,3 +431,3 @@ const timeout = setTimeout(() => childProcess.kill(), 4 * 60 * 1000); | ||
// https://github.com/electron-userland/electron-builder/issues/1164 | ||
if (localappdata.toLowerCase().indexOf("\\windows\\system32\\") !== -1 || (process.env.USERNAME || "").toLowerCase() === "system") { | ||
if (localappdata.toLowerCase().includes("\\windows\\system32\\") || (process.env.USERNAME || "").toLowerCase() === "system") { | ||
return _path.join((0, (_os || _load_os()).tmpdir)(), "electron-builder-cache"); | ||
@@ -462,3 +456,3 @@ } | ||
map.set(key, [value]); | ||
} else if (!(list.indexOf(value) !== -1)) { | ||
} else if (!list.includes(value)) { | ||
list.push(value); | ||
@@ -474,5 +468,5 @@ } | ||
const list = inList.slice(0, index); | ||
list.push.apply(list, _toConsumableArray(defaultList)); | ||
list.push(...defaultList); | ||
if (index !== inList.length - 1) { | ||
list.push.apply(list, _toConsumableArray(inList.slice(index + 1))); | ||
list.push(...inList.slice(index + 1)); | ||
} | ||
@@ -490,3 +484,3 @@ inList = list; | ||
} | ||
if (!(value.indexOf(".") !== -1)) { | ||
if (!value.includes(".")) { | ||
return `${value}.${isMac ? "icns" : "ico"}`; | ||
@@ -493,0 +487,0 @@ } |
@@ -49,3 +49,3 @@ "use strict"; | ||
return function checkWineVersion(_x2) { | ||
return function checkWineVersion(_x) { | ||
return _ref2.apply(this, arguments); | ||
@@ -129,5 +129,3 @@ }; | ||
/** @private */ | ||
function execWine(file, args) { | ||
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : (_bundledTool || _load_bundledTool()).EXEC_TIMEOUT; | ||
function execWine(file, args, options = (_bundledTool || _load_bundledTool()).EXEC_TIMEOUT) { | ||
if (process.platform === "win32") { | ||
@@ -134,0 +132,0 @@ return (0, (_util || _load_util()).exec)(file, args, options); |
{ | ||
"name": "builder-util", | ||
"version": "3.0.12", | ||
"version": "3.0.13", | ||
"main": "out/util.js", | ||
@@ -18,7 +18,7 @@ "author": "Vladimir Krivosheev", | ||
"stat-mode": "^0.2.2", | ||
"bluebird-lst": "^1.0.4", | ||
"chalk": "^2.1.0", | ||
"bluebird-lst": "^1.0.5", | ||
"chalk": "2.1.0", | ||
"debug": "^3.1.0", | ||
"node-emoji": "^1.8.1", | ||
"builder-util-runtime": "^2.0.1", | ||
"builder-util-runtime": "^2.3.0", | ||
"source-map-support": "^0.5.0", | ||
@@ -25,0 +25,0 @@ "7zip-bin": "^2.2.7", |
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
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
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
188200
2382
+ Addedchalk@2.1.0(transitive)
+ Addedhas-flag@2.0.0(transitive)
+ Addedsupports-color@4.5.0(transitive)
- Removedchalk@2.4.2(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)
Updatedbluebird-lst@^1.0.5
Updatedbuilder-util-runtime@^2.3.0
Updatedchalk@2.1.0