claude-token-saver 3.40.1 → 3.41.0
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 +8 -4
- package/src/update-check.js +4 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-token-saver",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.41.0",
|
|
4
|
+
"description": "Legacy name of sprag-cli (Sprag) - same tool, kept publishing so existing installs stay current. Prefer: npm i -g sprag-cli",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sprag": "bin/cli.js",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "node --test",
|
|
12
12
|
"docs:statusline": "node scripts/docs-statusline.mjs",
|
|
13
|
-
"postinstall": "node bin/cli.js install || true"
|
|
13
|
+
"postinstall": "node bin/cli.js install || true",
|
|
14
|
+
"publish:legacy": "node scripts/publish-legacy.mjs"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
17
|
"bin/",
|
|
@@ -25,6 +26,10 @@
|
|
|
25
26
|
"node": ">=18"
|
|
26
27
|
},
|
|
27
28
|
"keywords": [
|
|
29
|
+
"sprag",
|
|
30
|
+
"ratchet",
|
|
31
|
+
"harness",
|
|
32
|
+
"ai-agent",
|
|
28
33
|
"claude",
|
|
29
34
|
"claude-code",
|
|
30
35
|
"anthropic",
|
|
@@ -43,7 +48,6 @@
|
|
|
43
48
|
"claude-code-statusline",
|
|
44
49
|
"claude-code-cost",
|
|
45
50
|
"model-fitting",
|
|
46
|
-
"ratchet",
|
|
47
51
|
"agent-harness"
|
|
48
52
|
],
|
|
49
53
|
"license": "MIT",
|
package/src/update-check.js
CHANGED
|
@@ -23,7 +23,10 @@ import { fileURLToPath } from 'node:url';
|
|
|
23
23
|
import { userDataDir } from './paths.js';
|
|
24
24
|
import { debug } from './debug.js';
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
// Whichever name this copy was installed under (sprag-cli or the legacy
|
|
27
|
+
// claude-token-saver) is the one whose registry entry must be consulted.
|
|
28
|
+
import { createRequire } from 'node:module';
|
|
29
|
+
const PKG_NAME = createRequire(import.meta.url)('../package.json').name;
|
|
27
30
|
const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24h — the registry is not a health endpoint
|
|
28
31
|
const FETCH_TIMEOUT_MS = 5000;
|
|
29
32
|
|