ccusage 15.9.2 → 15.9.4
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 +3 -3
- package/dist/_token-utils-WjkbrjKv.js +1 -8
- package/dist/{_types-B-1t4mxD.js → _types-C0oFKDO-.js} +497 -1082
- package/dist/calculate-cost-BDqO4yWA.js +0 -10
- package/dist/calculate-cost.d.ts +2 -2
- package/dist/calculate-cost.js +1 -1
- package/dist/{data-loader-PvTcFbip.d.ts → data-loader-B2FL7oh0.d.ts} +2 -2
- package/dist/{data-loader-KL1zbb-w.js → data-loader-CY2f8ZBq.js} +455 -1870
- package/dist/data-loader.d.ts +2 -2
- package/dist/data-loader.js +4 -4
- package/dist/debug-mIvd8kZa.js +109 -0
- package/dist/debug.js +5 -5
- package/dist/index.js +729 -2332
- package/dist/{logger-BrRa0CCy.js → logger-QcakA1fc.js} +70 -267
- package/dist/logger.js +1 -1
- package/dist/{mcp-BBhsgnNL.js → mcp-COJ_l32e.js} +1343 -4013
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +5 -5
- package/dist/{pricing-fetcher-C9P2YKDv.d.ts → pricing-fetcher-B5m_kEpz.d.ts} +1 -1
- package/dist/pricing-fetcher-DzkXdtDF.js +342 -0
- package/dist/pricing-fetcher.d.ts +1 -1
- package/dist/pricing-fetcher.js +3 -3
- package/dist/{prompt-lm8M58zJ.js → prompt-DsUFNEY7.js} +25 -49
- package/package.json +1 -1
- package/dist/debug-zMK0YYJP.js +0 -162
- package/dist/pricing-fetcher-DXFi0Cxk.js +0 -575
package/README.md
CHANGED
|
@@ -106,11 +106,11 @@ Full documentation is available at **[ccusage.com](https://ccusage.com/)**
|
|
|
106
106
|
|
|
107
107
|
### Featured Sponsor
|
|
108
108
|
|
|
109
|
-
Check out
|
|
109
|
+
Check out [ccusage: The Claude Code cost scorecard that went viral](https://www.youtube.com/watch?v=Ak6qpQ5qdgk)
|
|
110
110
|
|
|
111
111
|
<p align="center">
|
|
112
|
-
<a href="https://www.youtube.com/watch?v=
|
|
113
|
-
<img src="https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/public/
|
|
112
|
+
<a href="https://www.youtube.com/watch?v=Ak6qpQ5qdgk">
|
|
113
|
+
<img src="https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/public/ccusage_thumbnail.png" alt="ccusage: The Claude Code cost scorecard that went viral" width="600">
|
|
114
114
|
</a>
|
|
115
115
|
</p>
|
|
116
116
|
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Calculates the total number of tokens across all token types
|
|
3
|
-
* Supports both raw usage data format and aggregated data format
|
|
4
|
-
* @param tokenCounts - Object containing counts for each token type
|
|
5
|
-
* @returns Total number of tokens
|
|
6
|
-
*/
|
|
7
1
|
function getTotalTokens(tokenCounts) {
|
|
8
|
-
const cacheCreation = "cacheCreationInputTokens" in tokenCounts ? tokenCounts.cacheCreationInputTokens : tokenCounts.cacheCreationTokens;
|
|
9
|
-
const cacheRead = "cacheReadInputTokens" in tokenCounts ? tokenCounts.cacheReadInputTokens : tokenCounts.cacheReadTokens;
|
|
2
|
+
const cacheCreation = "cacheCreationInputTokens" in tokenCounts ? tokenCounts.cacheCreationInputTokens : tokenCounts.cacheCreationTokens, cacheRead = "cacheReadInputTokens" in tokenCounts ? tokenCounts.cacheReadInputTokens : tokenCounts.cacheReadTokens;
|
|
10
3
|
return tokenCounts.inputTokens + tokenCounts.outputTokens + cacheCreation + cacheRead;
|
|
11
4
|
}
|
|
12
5
|
export { getTotalTokens };
|