ccusage 20.0.43 → 20.0.45
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 +7 -7
- package/src/cli.js +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccusage",
|
|
3
|
-
"version": "20.0.
|
|
3
|
+
"version": "20.0.45",
|
|
4
4
|
"description": "Analyze coding (agent) CLI token usage and costs from local data",
|
|
5
5
|
"homepage": "https://github.com/ccusage/ccusage#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"@types/node": "^24.19.2"
|
|
27
27
|
},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@ccusage/ccusage-darwin-arm64": "20.0.
|
|
30
|
-
"@ccusage/ccusage-darwin-x64": "20.0.
|
|
31
|
-
"@ccusage/ccusage-linux-arm64": "20.0.
|
|
32
|
-
"@ccusage/ccusage-linux-x64": "20.0.
|
|
33
|
-
"@ccusage/ccusage-win32-arm64": "20.0.
|
|
34
|
-
"@ccusage/ccusage-win32-x64": "20.0.
|
|
29
|
+
"@ccusage/ccusage-darwin-arm64": "20.0.45",
|
|
30
|
+
"@ccusage/ccusage-darwin-x64": "20.0.45",
|
|
31
|
+
"@ccusage/ccusage-linux-arm64": "20.0.45",
|
|
32
|
+
"@ccusage/ccusage-linux-x64": "20.0.45",
|
|
33
|
+
"@ccusage/ccusage-win32-arm64": "20.0.45",
|
|
34
|
+
"@ccusage/ccusage-win32-x64": "20.0.45"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "scripts/ensure-native-binary.nu && publint"
|
package/src/cli.js
CHANGED
|
@@ -7,6 +7,9 @@ import process from 'node:process';
|
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
|
|
9
9
|
const require = createRequire(import.meta.url);
|
|
10
|
+
/** @type {{ version: string }} */
|
|
11
|
+
const packageJson = require('../package.json');
|
|
12
|
+
const wrapperVersion = packageJson.version;
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
15
|
* @typedef {{ args: string[]; command: string } | { errorMessage: string }} CliRuntime
|
|
@@ -103,8 +106,16 @@ function resolveCliRuntime({
|
|
|
103
106
|
};
|
|
104
107
|
}
|
|
105
108
|
|
|
109
|
+
const target = `${platform}-${arch}`;
|
|
110
|
+
const packageName = getNativePackageName(platform, arch);
|
|
111
|
+
if (packageName == null) {
|
|
112
|
+
return {
|
|
113
|
+
errorMessage: `ccusage does not provide a native binary for ${target}.\n`,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
106
117
|
return {
|
|
107
|
-
errorMessage: `
|
|
118
|
+
errorMessage: `Missing optional native package "${packageName}@${wrapperVersion}" for ${target}. It may be absent because of npm --before/--min-release-age, mise minimum_release_age, or --omit=optional. Reinstall ccusage with optional dependencies enabled and no release-age cutoff.\n`,
|
|
108
119
|
};
|
|
109
120
|
}
|
|
110
121
|
|