@nomad-e/bluma-cli 0.0.17 → 0.0.18
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/main.js +6 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -2479,13 +2479,16 @@ async function checkForUpdates() {
|
|
|
2479
2479
|
const result = await readPackageUp({ cwd: __dirname });
|
|
2480
2480
|
const pkg = result?.packageJson;
|
|
2481
2481
|
if (!pkg?.name || !pkg?.version) return null;
|
|
2482
|
+
const isCI = Boolean(process.env.CI);
|
|
2483
|
+
const isNoCache = process.env.BLUMA_UPDATE_NO_CACHE === "1";
|
|
2484
|
+
const isDev = process.env.NODE_ENV !== "production";
|
|
2485
|
+
const updateCheckInterval = isNoCache || isDev ? 0 : 1e3 * 60 * 60 * 24;
|
|
2482
2486
|
const notifier = updateNotifier({
|
|
2483
2487
|
pkg: { name: pkg.name, version: pkg.version },
|
|
2484
|
-
|
|
2485
|
-
updateCheckInterval: 1e3 * 60 * 60 * 24,
|
|
2488
|
+
updateCheckInterval,
|
|
2486
2489
|
shouldNotifyInNpmScript: true
|
|
2487
2490
|
});
|
|
2488
|
-
if (notifier.update && !
|
|
2491
|
+
if (notifier.update && !isCI) {
|
|
2489
2492
|
return `Update available for ${pkg.name}! ${notifier.update.current} \u2192 ${notifier.update.latest}
|
|
2490
2493
|
Run npm i -g ${pkg.name} to update.`;
|
|
2491
2494
|
}
|