tokentracker-cli 0.14.0 → 0.14.2
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/README.md +1 -1
- package/bin/tracker.js +11 -1
- package/package.json +4 -2
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/proxy-env.js +50 -0
- package/src/lib/rollout.js +7 -1
package/README.md
CHANGED
|
@@ -399,7 +399,7 @@ Once granted, the permission is remembered. Note that ad-hoc signed builds re-pr
|
|
|
399
399
|
|
|
400
400
|
## 🙏 Credits
|
|
401
401
|
|
|
402
|
-
|
|
402
|
+
The Clawd character design belongs to Anthropic. This is a community project with no official affiliation with Anthropic.
|
|
403
403
|
|
|
404
404
|
## License
|
|
405
405
|
|
package/bin/tracker.js
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
const { run } = require('../src/cli');
|
|
5
5
|
const { stripDebugFlag } = require('../src/lib/debug-flags');
|
|
6
|
-
const {
|
|
6
|
+
const {
|
|
7
|
+
relaunchWithProxyEnvIfNeeded,
|
|
8
|
+
applyUndiciProxyIfNeeded,
|
|
9
|
+
} = require('../src/lib/proxy-env');
|
|
7
10
|
|
|
8
11
|
const { argv, debug } = stripDebugFlag(process.argv.slice(2));
|
|
9
12
|
if (debug) process.env.TOKENTRACKER_DEBUG = '1';
|
|
@@ -21,6 +24,13 @@ if (relaunch) {
|
|
|
21
24
|
process.exit(0);
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
// NODE_USE_ENV_PROXY only works on Node 22.21+/24.5+. For older runtimes
|
|
28
|
+
// (including community users on stale Node, and the embedded Node shipped
|
|
29
|
+
// with older macOS app builds), set an undici ProxyAgent so fetch() actually
|
|
30
|
+
// honors HTTPS_PROXY. Safe to run on modern Node too — explicit dispatcher
|
|
31
|
+
// takes precedence over the env-var-driven default.
|
|
32
|
+
applyUndiciProxyIfNeeded();
|
|
33
|
+
|
|
24
34
|
run(argv).catch((err) => {
|
|
25
35
|
console.error(err?.stack || String(err));
|
|
26
36
|
if (debug) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokentracker-cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "Token usage tracker for AI agent CLIs (Claude Code, Codex, Cursor, Gemini, Kiro, OpenCode, OpenClaw, Every Code, Hermes, GitHub Copilot, Kimi Code, CodeBuddy, oh-my-pi, pi, Craft Agents, Kilo CLI, Kilo Code)",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
"validate:retros": "node scripts/validate-retros.cjs",
|
|
41
41
|
"validate:ui-hardcode": "node scripts/ops/validate-ui-hardcode.cjs"
|
|
42
42
|
},
|
|
43
|
-
"dependencies": {
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"undici": "^8.2.0"
|
|
45
|
+
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@sourcegraph/scip-typescript": "^0.3.6",
|
|
46
48
|
"esbuild": "0.27.2"
|