@clawcard/cli 2.0.3 → 2.0.4
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/package.json +1 -1
- package/src/splash.js +1 -11
package/package.json
CHANGED
package/src/splash.js
CHANGED
|
@@ -42,20 +42,10 @@ export async function checkForUpdate() {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export async function performAutoUpdate() {
|
|
45
|
-
const config = getConfig() || {};
|
|
46
|
-
const lastCheck = config.lastUpdateCheck || 0;
|
|
47
|
-
const now = Date.now();
|
|
48
|
-
|
|
49
|
-
// Skip if checked within last hour
|
|
50
|
-
if (now - lastCheck < 3600000) return;
|
|
51
|
-
|
|
52
|
-
// Save check time
|
|
53
|
-
saveConfig({ ...config, lastUpdateCheck: now });
|
|
54
|
-
|
|
55
45
|
const latest = await checkForUpdate();
|
|
56
46
|
if (!latest) return;
|
|
57
47
|
|
|
58
|
-
console.log(` Updating
|
|
48
|
+
console.log(` Updating to v${latest}...`);
|
|
59
49
|
|
|
60
50
|
try {
|
|
61
51
|
execSync("npm i -g @clawcard/cli@latest", {
|