Socket
Socket
Sign inDemoInstall

electron-builder-util

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-builder-util - npm Package Compare versions

Comparing version 18.7.0 to 18.8.0

21

out/binDownload.js

@@ -24,3 +24,3 @@ "use strict";

let doGetBin = (() => {
var _ref = (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* (name, dirName, url, sha2) {
var _ref = (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* (name, dirName, url, checksum) {
const cachePath = _path.join((0, (_util || _load_util()).getCacheDirectory)(), name);

@@ -40,7 +40,12 @@ const dirPath = _path.join(cachePath, dirName);

yield (0, (_fsExtraP || _load_fsExtraP()).emptyDir)(tempUnpackDir);
yield (_nodeHttpExecutor || _load_nodeHttpExecutor()).httpExecutor.download(url, archiveName, {
const options = {
skipDirCreation: true,
sha2: sha2,
cancellationToken: new (_CancellationToken || _load_CancellationToken()).CancellationToken()
});
};
if (checksum.length === 64 && !(checksum.indexOf("+") !== -1) && !(checksum.indexOf("Z") !== -1) && !(checksum.indexOf("=") !== -1)) {
options.sha2 = checksum;
} else {
options.sha512 = checksum;
}
yield (_nodeHttpExecutor || _load_nodeHttpExecutor()).httpExecutor.download(url, archiveName, options);
yield (0, (_util || _load_util()).spawn)((_zipBin || _load_zipBin()).path7za, (0, (_util || _load_util()).debug7zArgs)("x").concat(archiveName, `-o${tempUnpackDir}`), {

@@ -114,7 +119,7 @@ cwd: cachePath

}
function getBinFromGithub(name, version, sha2) {
function getBinFromGithub(name, version, checksum) {
const dirName = `${name}-${version}`;
return getBin(name, dirName, `https://github.com/electron-userland/electron-builder-binaries/releases/download/${dirName}/${dirName}.7z`, sha2);
return getBin(name, dirName, `https://github.com/electron-userland/electron-builder-binaries/releases/download/${dirName}/${dirName}.7z`, checksum);
}
function getBin(name, dirName, url, sha2) {
function getBin(name, dirName, url, checksum) {
let promise = versionToPromise.get(dirName);

@@ -125,5 +130,5 @@ // if rejected, we will try to download again

}
promise = doGetBin(name, dirName, url, sha2);
promise = doGetBin(name, dirName, url, checksum);
versionToPromise.set(dirName, promise);
return promise;
}

@@ -147,5 +147,5 @@ declare module "electron-builder-util/out/log" {

export function getBinFromGithub(name: string, version: string, sha2: string): Promise<string>
export function getBinFromGithub(name: string, version: string, checksum: string): Promise<string>
export function getBin(name: string, dirName: string, url: string, sha2: string): Promise<string>
export function getBin(name: string, dirName: string, url: string, checksum: string): Promise<string>
}

@@ -152,0 +152,0 @@

{
"name": "electron-builder-util",
"version": "18.7.0",
"version": "18.8.0",
"main": "out/util.js",

@@ -22,3 +22,3 @@ "author": "Vladimir Krivosheev",

"node-emoji": "^1.5.1",
"electron-builder-http": "~18.7.0",
"electron-builder-http": "~18.8.0",
"source-map-support": "^0.4.15",

@@ -25,0 +25,0 @@ "7zip-bin": "^2.1.0",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc