@senoldogann/context-manager 0.1.27 → 0.1.29
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/bin/ccm.js +23 -1
- package/package.json +1 -1
package/bin/ccm.js
CHANGED
|
@@ -7,7 +7,29 @@ const os = require('os');
|
|
|
7
7
|
const https = require('https');
|
|
8
8
|
const crypto = require('crypto');
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
function resolvePackageVersion() {
|
|
11
|
+
if (process.env.CCM_BINARY_VERSION && process.env.CCM_BINARY_VERSION.trim() !== '') {
|
|
12
|
+
return process.env.CCM_BINARY_VERSION.trim();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (process.env.npm_package_version && process.env.npm_package_version.trim() !== '') {
|
|
16
|
+
return process.env.npm_package_version.trim();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const pkgPath = path.join(__dirname, '..', 'package.json');
|
|
21
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
22
|
+
if (pkg.version && String(pkg.version).trim() !== '') {
|
|
23
|
+
return String(pkg.version).trim();
|
|
24
|
+
}
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.warn('[CCM] Failed to resolve package version from package.json.');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
throw new Error('Unable to resolve package version for binary download.');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const VERSION = resolvePackageVersion();
|
|
11
33
|
const REPO = 'senoldogann/LLM-Context-Manager';
|
|
12
34
|
const BIN_DIR = path.join(os.homedir(), '.ccm', 'bin');
|
|
13
35
|
const CHECKSUMS_FILE = 'checksums.txt';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@senoldogann/context-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"description": "LLM Context Manager MCP Server & CLI wrapper using npx",
|
|
5
5
|
"repository": "https://github.com/senoldogann/LLM-Context-Manager",
|
|
6
6
|
"homepage": "https://github.com/senoldogann/LLM-Context-Manager",
|