@codebakers/cli 3.9.9 → 3.9.10
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/commands/go.js +1 -1
- package/dist/index.js +18 -3
- package/package.json +1 -1
- package/src/commands/go.ts +1 -1
- package/src/index.ts +17 -3
package/dist/commands/go.js
CHANGED
|
@@ -936,7 +936,7 @@ function log(message, options) {
|
|
|
936
936
|
}
|
|
937
937
|
}
|
|
938
938
|
// Current CLI version - must match package.json
|
|
939
|
-
const CURRENT_VERSION = '3.9.
|
|
939
|
+
const CURRENT_VERSION = '3.9.10';
|
|
940
940
|
/**
|
|
941
941
|
* Check for updates and install them automatically
|
|
942
942
|
* This makes "codebakers go" the magic phrase that keeps everything updated
|
package/dist/index.js
CHANGED
|
@@ -34,12 +34,27 @@ const api_js_1 = require("./lib/api.js");
|
|
|
34
34
|
// ============================================
|
|
35
35
|
// Automatic Update Notification
|
|
36
36
|
// ============================================
|
|
37
|
-
const CURRENT_VERSION = '3.9.
|
|
37
|
+
const CURRENT_VERSION = '3.9.10';
|
|
38
|
+
// Simple semver comparison: returns true if v1 > v2
|
|
39
|
+
function isNewerVersion(v1, v2) {
|
|
40
|
+
const parts1 = v1.split('.').map(Number);
|
|
41
|
+
const parts2 = v2.split('.').map(Number);
|
|
42
|
+
for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
|
|
43
|
+
const p1 = parts1[i] || 0;
|
|
44
|
+
const p2 = parts2[i] || 0;
|
|
45
|
+
if (p1 > p2)
|
|
46
|
+
return true;
|
|
47
|
+
if (p1 < p2)
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
38
52
|
async function checkForUpdatesInBackground() {
|
|
39
53
|
// Check if we have a valid cached result first (fast path)
|
|
40
54
|
const cached = (0, config_js_2.getCachedUpdateInfo)();
|
|
41
55
|
if (cached) {
|
|
42
|
-
if
|
|
56
|
+
// Only show banner if cached version is actually NEWER than current
|
|
57
|
+
if (isNewerVersion(cached.latestVersion, CURRENT_VERSION)) {
|
|
43
58
|
showUpdateBanner(CURRENT_VERSION, cached.latestVersion, false);
|
|
44
59
|
}
|
|
45
60
|
return;
|
|
@@ -195,7 +210,7 @@ const program = new commander_1.Command();
|
|
|
195
210
|
program
|
|
196
211
|
.name('codebakers')
|
|
197
212
|
.description('CodeBakers CLI - Production patterns for AI-assisted development')
|
|
198
|
-
.version('3.9.
|
|
213
|
+
.version('3.9.10');
|
|
199
214
|
// Zero-friction trial entry (no signup required)
|
|
200
215
|
program
|
|
201
216
|
.command('go')
|
package/package.json
CHANGED
package/src/commands/go.ts
CHANGED
|
@@ -1053,7 +1053,7 @@ function log(message: string, options?: GoOptions): void {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
|
|
1055
1055
|
// Current CLI version - must match package.json
|
|
1056
|
-
const CURRENT_VERSION = '3.9.
|
|
1056
|
+
const CURRENT_VERSION = '3.9.10';
|
|
1057
1057
|
|
|
1058
1058
|
/**
|
|
1059
1059
|
* Check for updates and install them automatically
|
package/src/index.ts
CHANGED
|
@@ -34,13 +34,27 @@ import { join } from 'path';
|
|
|
34
34
|
// Automatic Update Notification
|
|
35
35
|
// ============================================
|
|
36
36
|
|
|
37
|
-
const CURRENT_VERSION = '3.9.
|
|
37
|
+
const CURRENT_VERSION = '3.9.10';
|
|
38
|
+
|
|
39
|
+
// Simple semver comparison: returns true if v1 > v2
|
|
40
|
+
function isNewerVersion(v1: string, v2: string): boolean {
|
|
41
|
+
const parts1 = v1.split('.').map(Number);
|
|
42
|
+
const parts2 = v2.split('.').map(Number);
|
|
43
|
+
for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
|
|
44
|
+
const p1 = parts1[i] || 0;
|
|
45
|
+
const p2 = parts2[i] || 0;
|
|
46
|
+
if (p1 > p2) return true;
|
|
47
|
+
if (p1 < p2) return false;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
38
51
|
|
|
39
52
|
async function checkForUpdatesInBackground(): Promise<void> {
|
|
40
53
|
// Check if we have a valid cached result first (fast path)
|
|
41
54
|
const cached = getCachedUpdateInfo();
|
|
42
55
|
if (cached) {
|
|
43
|
-
if
|
|
56
|
+
// Only show banner if cached version is actually NEWER than current
|
|
57
|
+
if (isNewerVersion(cached.latestVersion, CURRENT_VERSION)) {
|
|
44
58
|
showUpdateBanner(CURRENT_VERSION, cached.latestVersion, false);
|
|
45
59
|
}
|
|
46
60
|
return;
|
|
@@ -216,7 +230,7 @@ const program = new Command();
|
|
|
216
230
|
program
|
|
217
231
|
.name('codebakers')
|
|
218
232
|
.description('CodeBakers CLI - Production patterns for AI-assisted development')
|
|
219
|
-
.version('3.9.
|
|
233
|
+
.version('3.9.10');
|
|
220
234
|
|
|
221
235
|
// Zero-friction trial entry (no signup required)
|
|
222
236
|
program
|