@keepgoingdev/cli 0.3.2 → 0.3.3
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 +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -632,7 +632,7 @@ import { spawn } from "child_process";
|
|
|
632
632
|
import { readFileSync, existsSync } from "fs";
|
|
633
633
|
import path6 from "path";
|
|
634
634
|
import os2 from "os";
|
|
635
|
-
var CLI_VERSION = "0.3.
|
|
635
|
+
var CLI_VERSION = "0.3.3";
|
|
636
636
|
var NPM_REGISTRY_URL = "https://registry.npmjs.org/@keepgoingdev/cli/latest";
|
|
637
637
|
var FETCH_TIMEOUT_MS = 5e3;
|
|
638
638
|
var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -654,7 +654,7 @@ function getCachedUpdateInfo() {
|
|
|
654
654
|
const cache = JSON.parse(raw);
|
|
655
655
|
if (!cache.latest || !cache.checkedAt) return null;
|
|
656
656
|
const age = Date.now() - new Date(cache.checkedAt).getTime();
|
|
657
|
-
if (age > CHECK_INTERVAL_MS) return null;
|
|
657
|
+
if (age > CHECK_INTERVAL_MS || cache.current !== CLI_VERSION) return null;
|
|
658
658
|
return {
|
|
659
659
|
current: CLI_VERSION,
|
|
660
660
|
latest: cache.latest,
|
|
@@ -670,7 +670,7 @@ function spawnBackgroundCheck() {
|
|
|
670
670
|
const raw = readFileSync(CACHE_PATH, "utf-8");
|
|
671
671
|
const cache = JSON.parse(raw);
|
|
672
672
|
const age = Date.now() - new Date(cache.checkedAt).getTime();
|
|
673
|
-
if (age < CHECK_INTERVAL_MS) return;
|
|
673
|
+
if (age < CHECK_INTERVAL_MS && cache.current === CLI_VERSION) return;
|
|
674
674
|
}
|
|
675
675
|
} catch {
|
|
676
676
|
}
|
|
@@ -1103,7 +1103,7 @@ async function main() {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
break;
|
|
1105
1105
|
case "version":
|
|
1106
|
-
console.log(`keepgoing v${"0.3.
|
|
1106
|
+
console.log(`keepgoing v${"0.3.3"}`);
|
|
1107
1107
|
break;
|
|
1108
1108
|
case "activate":
|
|
1109
1109
|
await activateCommand({ licenseKey: subcommand });
|