@codebakers/cli 3.9.35 → 3.9.36
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/config.js +11 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/src/config.ts +10 -1
- package/src/index.ts +2 -1
- package/tmpclaude-2729-cwd +1 -0
- package/tmpclaude-8253-cwd +1 -0
package/dist/config.js
CHANGED
|
@@ -462,7 +462,17 @@ function setCachedUpdateInfo(latestVersion) {
|
|
|
462
462
|
* Get the current CLI version from package.json
|
|
463
463
|
*/
|
|
464
464
|
function getCliVersion() {
|
|
465
|
-
|
|
465
|
+
try {
|
|
466
|
+
// Read version from package.json at runtime using path relative to this file
|
|
467
|
+
const path = require('path');
|
|
468
|
+
const packageJsonPath = path.join(__dirname, '..', 'package.json');
|
|
469
|
+
const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf-8'));
|
|
470
|
+
return packageJson.version || '0.0.0';
|
|
471
|
+
}
|
|
472
|
+
catch {
|
|
473
|
+
// Fallback if package.json can't be read
|
|
474
|
+
return '3.9.35';
|
|
475
|
+
}
|
|
466
476
|
}
|
|
467
477
|
// ============================================
|
|
468
478
|
// Pattern Auto-Update Cache
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,8 @@ const api_js_1 = require("./lib/api.js");
|
|
|
35
35
|
// ============================================
|
|
36
36
|
// Automatic Update Notification
|
|
37
37
|
// ============================================
|
|
38
|
-
|
|
38
|
+
// Get version dynamically from package.json via getCliVersion()
|
|
39
|
+
const CURRENT_VERSION = (0, config_js_2.getCliVersion)();
|
|
39
40
|
// Simple semver comparison: returns true if v1 > v2
|
|
40
41
|
function isNewerVersion(v1, v2) {
|
|
41
42
|
const parts1 = v1.split('.').map(Number);
|
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -542,7 +542,16 @@ export function setCachedUpdateInfo(latestVersion: string): void {
|
|
|
542
542
|
* Get the current CLI version from package.json
|
|
543
543
|
*/
|
|
544
544
|
export function getCliVersion(): string {
|
|
545
|
-
|
|
545
|
+
try {
|
|
546
|
+
// Read version from package.json at runtime using path relative to this file
|
|
547
|
+
const path = require('path');
|
|
548
|
+
const packageJsonPath = path.join(__dirname, '..', 'package.json');
|
|
549
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
550
|
+
return packageJson.version || '0.0.0';
|
|
551
|
+
} catch {
|
|
552
|
+
// Fallback if package.json can't be read
|
|
553
|
+
return '3.9.35';
|
|
554
|
+
}
|
|
546
555
|
}
|
|
547
556
|
|
|
548
557
|
// ============================================
|
package/src/index.ts
CHANGED
|
@@ -35,7 +35,8 @@ import { join } from 'path';
|
|
|
35
35
|
// Automatic Update Notification
|
|
36
36
|
// ============================================
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
// Get version dynamically from package.json via getCliVersion()
|
|
39
|
+
const CURRENT_VERSION = getCliVersion();
|
|
39
40
|
|
|
40
41
|
// Simple semver comparison: returns true if v1 > v2
|
|
41
42
|
function isNewerVersion(v1: string, v2: string): boolean {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/c/dev/1 - CodeBakers/codebakers-server/cli
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/c/dev/1 - CodeBakers/codebakers-server/cli
|