@runtypelabs/cli 1.8.4 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -17765,11 +17765,13 @@ function compareVersions(left, right) {
|
|
|
17765
17765
|
function isUpdateAvailable(currentVersion, latestVersion) {
|
|
17766
17766
|
return Boolean(latestVersion && compareVersions(latestVersion, currentVersion) > 0);
|
|
17767
17767
|
}
|
|
17768
|
-
function shouldSkipUpdateCheck(args, isTTY2) {
|
|
17768
|
+
function shouldSkipUpdateCheck(args, isTTY2, bypassEnvChecks = false) {
|
|
17769
17769
|
if (!isTTY2) return true;
|
|
17770
|
-
if (
|
|
17771
|
-
|
|
17772
|
-
|
|
17770
|
+
if (!bypassEnvChecks) {
|
|
17771
|
+
if (process.env.NODE_ENV === "test") return true;
|
|
17772
|
+
if (process.env.CI === "true") return true;
|
|
17773
|
+
if (process.env.RUNTYPE_DISABLE_UPDATE_CHECK === "true") return true;
|
|
17774
|
+
}
|
|
17773
17775
|
if (args.includes("--json")) return true;
|
|
17774
17776
|
if (args.includes("--help") || args.includes("-h")) return true;
|
|
17775
17777
|
if (args.includes("--version") || args.includes("-V")) return true;
|
|
@@ -17804,7 +17806,8 @@ function shouldNotifyForVersion(store, latestVersion, now) {
|
|
|
17804
17806
|
}
|
|
17805
17807
|
function notifyFromCachedCliUpdate(args, options = {}) {
|
|
17806
17808
|
const isTTY2 = options.isTTY ?? process.stdout.isTTY ?? false;
|
|
17807
|
-
|
|
17809
|
+
const bypassEnvChecks = options.isTTY !== void 0 && options.store !== void 0;
|
|
17810
|
+
if (shouldSkipUpdateCheck(args, isTTY2, bypassEnvChecks)) {
|
|
17808
17811
|
return false;
|
|
17809
17812
|
}
|
|
17810
17813
|
const store = options.store ?? createUpdateStore();
|
|
@@ -17852,7 +17855,8 @@ async function refreshCliUpdateMetadata(options = {}) {
|
|
|
17852
17855
|
}
|
|
17853
17856
|
function maybeNotifyAboutCliUpdate(args, options = {}) {
|
|
17854
17857
|
const isTTY2 = options.isTTY ?? process.stdout.isTTY ?? false;
|
|
17855
|
-
|
|
17858
|
+
const bypassEnvChecks = options.isTTY !== void 0 && options.store !== void 0;
|
|
17859
|
+
if (shouldSkipUpdateCheck(args, isTTY2, bypassEnvChecks)) {
|
|
17856
17860
|
return;
|
|
17857
17861
|
}
|
|
17858
17862
|
notifyFromCachedCliUpdate(args, { ...options, isTTY: isTTY2 });
|