mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-23 15:32:22 +00:00
Merge pull request #2679 from balena-io/bump-oclif-to-latest
Bump oclif to ^3.17.1
This commit is contained in:
commit
efe0a018d7
111
npm-shrinkwrap.json
generated
111
npm-shrinkwrap.json
generated
@ -167,7 +167,7 @@
|
||||
"mocha": "^8.4.0",
|
||||
"mock-require": "^3.0.3",
|
||||
"nock": "^13.2.1",
|
||||
"oclif": "^3.15.0",
|
||||
"oclif": "^3.17.1",
|
||||
"parse-link-header": "^2.0.0",
|
||||
"pkg": "^5.8.1",
|
||||
"publish-release": "^1.6.1",
|
||||
@ -2793,9 +2793,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sigstore/sign/node_modules/glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -4268,6 +4268,24 @@
|
||||
"lodash": "^4.17.14"
|
||||
}
|
||||
},
|
||||
"node_modules/async-retry": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz",
|
||||
"integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"retry": "0.13.1"
|
||||
}
|
||||
},
|
||||
"node_modules/async-retry/node_modules/retry": {
|
||||
"version": "0.13.1",
|
||||
"resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
|
||||
"integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
@ -14122,15 +14140,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/oclif": {
|
||||
"version": "3.15.0",
|
||||
"resolved": "https://registry.npmjs.org/oclif/-/oclif-3.15.0.tgz",
|
||||
"integrity": "sha512-iwIjseO6Zuw1X66bN268yVuT6U7Qfwcp4CP4FZ/fd/a81eqQ6CTSCfeInjn/uDhfC/U01KrbNZPIZCMkjWHzxA==",
|
||||
"version": "3.17.1",
|
||||
"resolved": "https://registry.npmjs.org/oclif/-/oclif-3.17.1.tgz",
|
||||
"integrity": "sha512-qwop0W9s5nJJ9tTdLsYXxxvGSNc9xKjXccEAGCXM+x8NmGtZ4P89FwqDY4PIG7IeV9VNpYhZKQArpZNwPGn0CQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@oclif/core": "^2.11.4",
|
||||
"@oclif/plugin-help": "^5.2.14",
|
||||
"@oclif/plugin-not-found": "^2.3.32",
|
||||
"@oclif/plugin-warn-if-update-available": "^2.0.44",
|
||||
"async-retry": "^1.3.3",
|
||||
"aws-sdk": "^2.1231.0",
|
||||
"concurrently": "^7.6.0",
|
||||
"debug": "^4.3.3",
|
||||
@ -16441,9 +16460,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/read-package-json/node_modules/glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -17822,9 +17841,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sigstore/node_modules/glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -19851,9 +19870,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tuf-js/node_modules/glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -22140,9 +22159,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/yeoman-generator/node_modules/cacache/node_modules/glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -25102,9 +25121,9 @@
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -26404,6 +26423,23 @@
|
||||
"lodash": "^4.17.14"
|
||||
}
|
||||
},
|
||||
"async-retry": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz",
|
||||
"integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"retry": "0.13.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"retry": {
|
||||
"version": "0.13.1",
|
||||
"resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
|
||||
"integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
@ -34166,15 +34202,16 @@
|
||||
}
|
||||
},
|
||||
"oclif": {
|
||||
"version": "3.15.0",
|
||||
"resolved": "https://registry.npmjs.org/oclif/-/oclif-3.15.0.tgz",
|
||||
"integrity": "sha512-iwIjseO6Zuw1X66bN268yVuT6U7Qfwcp4CP4FZ/fd/a81eqQ6CTSCfeInjn/uDhfC/U01KrbNZPIZCMkjWHzxA==",
|
||||
"version": "3.17.1",
|
||||
"resolved": "https://registry.npmjs.org/oclif/-/oclif-3.17.1.tgz",
|
||||
"integrity": "sha512-qwop0W9s5nJJ9tTdLsYXxxvGSNc9xKjXccEAGCXM+x8NmGtZ4P89FwqDY4PIG7IeV9VNpYhZKQArpZNwPGn0CQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@oclif/core": "^2.11.4",
|
||||
"@oclif/plugin-help": "^5.2.14",
|
||||
"@oclif/plugin-not-found": "^2.3.32",
|
||||
"@oclif/plugin-warn-if-update-available": "^2.0.44",
|
||||
"async-retry": "^1.3.3",
|
||||
"aws-sdk": "^2.1231.0",
|
||||
"concurrently": "^7.6.0",
|
||||
"debug": "^4.3.3",
|
||||
@ -35892,9 +35929,9 @@
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -37024,9 +37061,9 @@
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -38624,9 +38661,9 @@
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"foreground-child": "^3.1.0",
|
||||
@ -40359,9 +40396,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"glob": {
|
||||
"version": "10.3.9",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.9.tgz",
|
||||
"integrity": "sha512-2tU/LKevAQvDVuVJ9pg9Yv9xcbSh+TqHuTaXTNbQwf+0kDl9Fm6bMovi4Nm5c8TVvfxo2LLcqCGtmO9KoJaGWg==",
|
||||
"version": "10.3.10",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
|
||||
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"foreground-child": "^3.1.0",
|
||||
|
@ -180,7 +180,7 @@
|
||||
"mocha": "^8.4.0",
|
||||
"mock-require": "^3.0.3",
|
||||
"nock": "^13.2.1",
|
||||
"oclif": "^3.15.0",
|
||||
"oclif": "^3.17.1",
|
||||
"parse-link-header": "^2.0.0",
|
||||
"pkg": "^5.8.1",
|
||||
"publish-release": "^1.6.1",
|
||||
|
@ -170,22 +170,18 @@ index 216759d..cab0e6e 100644
|
||||
return path.join(base, [target.platform, target.arch].join('-'), (0, upload_util_1.templateShortKey)('baseDir', { bin: config.bin }));
|
||||
return path.join(base, (0, upload_util_1.templateShortKey)('baseDir', { bin: config.bin }));
|
||||
diff --git a/node_modules/oclif/lib/tarballs/node.js b/node_modules/oclif/lib/tarballs/node.js
|
||||
index 1a4e09b..2d0566f 100644
|
||||
index 35f1d0c..5349eaa 100644
|
||||
--- a/node_modules/oclif/lib/tarballs/node.js
|
||||
+++ b/node_modules/oclif/lib/tarballs/node.js
|
||||
@@ -11,9 +11,10 @@ const node_util_1 = require("node:util");
|
||||
const got_1 = require("got");
|
||||
const pipeline = (0, node_util_1.promisify)(node_stream_1.pipeline);
|
||||
const exec = (0, node_util_1.promisify)(node_child_process_1.exec);
|
||||
@@ -12,6 +12,7 @@ const retry = require("async-retry");
|
||||
const util_2 = require("../util");
|
||||
const pipeline = (0, util_1.promisify)(stream_1.pipeline);
|
||||
const exec = (0, util_1.promisify)(child_process_1.exec);
|
||||
+const { isMSYS2, msysExec, toMsysPath } = require("../util");
|
||||
async function checkFor7Zip() {
|
||||
try {
|
||||
- await exec('7z');
|
||||
+ await msysExec('7z', { stdio: [0, null, 2] });
|
||||
}
|
||||
catch (error) {
|
||||
if (error.code === 127)
|
||||
@@ -51,8 +52,10 @@ async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
|
||||
const RETRY_TIMEOUT_MS = 1000;
|
||||
async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
|
||||
if (arch === 'arm')
|
||||
@@ -42,8 +43,10 @@ async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
|
||||
const basedir = path.dirname(tarball);
|
||||
await fs.promises.mkdir(basedir, { recursive: true });
|
||||
await pipeline(got_1.default.stream(url), fs.createWriteStream(tarball));
|
||||
@ -198,7 +194,7 @@ index 1a4e09b..2d0566f 100644
|
||||
};
|
||||
const extract = async () => {
|
||||
(0, log_1.log)(`extracting ${nodeBase}`);
|
||||
@@ -60,7 +63,7 @@ async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
|
||||
@@ -51,7 +54,7 @@ async function fetchNodeBinary({ nodeVersion, output, platform, arch, tmp }) {
|
||||
await fs.promises.mkdir(nodeTmp, { recursive: true });
|
||||
await fs.promises.mkdir(path.dirname(cache), { recursive: true });
|
||||
if (platform === 'win32') {
|
||||
@ -227,13 +223,25 @@ index 6963e4d..430472d 100644
|
||||
};
|
||||
return _.template(templates[type])(Object.assign({}, options));
|
||||
diff --git a/node_modules/oclif/lib/util.js b/node_modules/oclif/lib/util.js
|
||||
index 75bf3c6..c6a9c49 100644
|
||||
index 816c71b..1384aa6 100644
|
||||
--- a/node_modules/oclif/lib/util.js
|
||||
+++ b/node_modules/oclif/lib/util.js
|
||||
@@ -74,6 +74,51 @@ const sortVersionsObjectByKeysDesc = (input) => {
|
||||
}
|
||||
return result;
|
||||
@@ -95,9 +95,10 @@ const hash = async (algo, fp) => {
|
||||
});
|
||||
};
|
||||
exports.hash = hash;
|
||||
+
|
||||
async function checkFor7Zip() {
|
||||
try {
|
||||
- await exec('7z');
|
||||
+ await msysExec('7z', { stdio: [0, null, 2] });
|
||||
}
|
||||
catch (error) {
|
||||
if (error.code === 127)
|
||||
@@ -107,3 +108,44 @@ async function checkFor7Zip() {
|
||||
}
|
||||
}
|
||||
exports.checkFor7Zip = checkFor7Zip;
|
||||
+
|
||||
+// OSTYPE is 'msys' for MSYS 1.0 and for MSYS2, or 'cygwin' for Cygwin
|
||||
+// but note that OSTYPE is not "exported" by default, so run: export OSTYPE=$OSTYPE
|
||||
@ -251,10 +259,6 @@ index 75bf3c6..c6a9c49 100644
|
||||
+exports.isMSYS2 = isMSYS2;
|
||||
+console.error(`[debug] oclif MSYSSHELLPATH=${MSYSSHELLPATH} MSYSTEM=${process.env.MSYSTEM} OSTYPE=${process.env.OSTYPE} isMSYS2=${isMSYS2} isMingGW=${isMinGW} isCygwin=${isCygwin}`);
|
||||
+
|
||||
+const child_process_1 = require("child_process");
|
||||
+const node_util_1 = require("node:util");
|
||||
+const exec = (0, node_util_1.promisify)(child_process_1.exec);
|
||||
+
|
||||
+/* Convert a Windows path like 'C:\tmp' to a MSYS path like '/c/tmp' */
|
||||
+function toMsysPath(windowsPath) {
|
||||
+ // 'c:\myfolder' -> '/c/myfolder' or '/cygdrive/c/myfolder'
|
||||
@ -279,6 +283,3 @@ index 75bf3c6..c6a9c49 100644
|
||||
+ return exec(`"${sh}" "${args.join('" "')}"`, options);
|
||||
+}
|
||||
+exports.msysExec = msysExec;
|
||||
exports.sortVersionsObjectByKeysDesc = sortVersionsObjectByKeysDesc;
|
||||
const homeRegexp = new RegExp(`\\B${os.homedir().replace('/', '\\/')}`, 'g');
|
||||
const curRegexp = new RegExp(`\\B${process.cwd()}`, 'g');
|
Loading…
Reference in New Issue
Block a user