ccusage 0.4.2 → 0.6.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.
Files changed (43) hide show
  1. package/README.md +106 -1
  2. package/dist/arktype-C-GObzDh-Dj1DVoqC.js +5 -0
  3. package/dist/calculate-cost.d.ts +5 -5
  4. package/dist/calculate-cost.js +1 -1
  5. package/dist/core-BgFXUe_h.js +693 -0
  6. package/dist/{data-loader-B8mdiY5r.js → data-loader-CDv0IYZx.js} +59 -22
  7. package/dist/{data-loader-DtCt7sNl.d.ts → data-loader-aUOjeZ06.d.ts} +17 -6
  8. package/dist/data-loader.d.ts +5 -5
  9. package/dist/data-loader.js +5 -5
  10. package/dist/{debug-Oce2b5bO.js → debug-Dk36WQTw.js} +4 -4
  11. package/dist/debug.js +5 -5
  12. package/dist/dist-C_i5I27w.js +469 -0
  13. package/dist/{dist-D6rk8Ra5.js → dist-FwNhpFrW.js} +30 -1
  14. package/dist/effect-WSjEuzC9-BsxP11fz.js +10 -0
  15. package/dist/esm-vjyZjnpZ.js +1090 -0
  16. package/dist/index-CISmcbXk-BotItq1T.js +23 -0
  17. package/dist/index.js +171 -23
  18. package/dist/{logger-nCODI08N.js → logger-DhDyJEC5.js} +2 -2
  19. package/dist/logger.js +1 -1
  20. package/dist/mcp-G-TIOcuj.js +37580 -0
  21. package/dist/mcp.d.ts +15 -0
  22. package/dist/mcp.js +10 -0
  23. package/dist/{pricing-fetcher-bvi4lbXl.js → pricing-fetcher-BCv1Vods.js} +2 -2
  24. package/dist/{pricing-fetcher-BqlslEH3.d.ts → pricing-fetcher-DygIroMj.d.ts} +1 -1
  25. package/dist/pricing-fetcher.d.ts +2 -2
  26. package/dist/pricing-fetcher.js +3 -3
  27. package/dist/{shared-args-DWaGio0e.js → shared-args-BtMSktLn.js} +10 -3
  28. package/dist/shared-args.d.ts +14 -0
  29. package/dist/shared-args.js +6 -6
  30. package/dist/sury-DmrZ3_Oj-DhGOjCNc.js +10 -0
  31. package/dist/{types-DjlBTM5P.js → types-BcXIBMQk.js} +3 -2
  32. package/dist/types-CFnCBr2I.js +3586 -0
  33. package/dist/{types-BfZ5dOy7.d.ts → types-y1JQzaKZ.d.ts} +4 -2
  34. package/dist/types.d.ts +3 -3
  35. package/dist/types.js +3 -3
  36. package/dist/utils.js +1 -1
  37. package/dist/valibot-CQk-M5rL-Cq5E7F3g.js +10 -0
  38. package/dist/zod-Db63SLXj-BWdcigdx.js +30 -0
  39. package/package.json +2 -1
  40. /package/dist/{calculate-cost-BnufbprY.js → calculate-cost-2IwHSzmi.js} +0 -0
  41. /package/dist/{index-Bazt8Nfd.d.ts → index-BurjgCfW.d.ts} +0 -0
  42. /package/dist/{prompt-BwcIpzWm.js → prompt-IToGuko2.js} +0 -0
  43. /package/dist/{utils-BeihwpHn.js → utils-C7kg8MXN.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { BooleanSchema, InferOutput, NumberSchema, ObjectSchema, OptionalSchema, RecordSchema, RegexAction, SchemaWithPipe, StringSchema, UnionSchema } from "./index-Bazt8Nfd.js";
1
+ import { BooleanSchema, InferOutput, NumberSchema, ObjectSchema, OptionalSchema, RecordSchema, RegexAction, SchemaWithPipe, StringSchema, UnionSchema } from "./index-BurjgCfW.js";
2
2
 
3
3
  //#region src/types.d.ts
4
4
  declare const ModelSpecSchema: ObjectSchema<{
@@ -75,5 +75,7 @@ interface TokenData {
75
75
  }
76
76
  declare const CostModes: readonly ["auto", "calculate", "display"];
77
77
  type CostMode = (typeof CostModes)[number];
78
+ declare const SortOrders: readonly ["desc", "asc"];
79
+ type SortOrder = (typeof SortOrders)[number];
78
80
  //#endregion
79
- export { CostMode, CostModes as CostModes$1, LiteLLMModelPrices, LiteLLMModelPricesSchema as LiteLLMModelPricesSchema$1, ModelSpec, ModelSpecSchema as ModelSpecSchema$1, TokenData, TokenTotals, dateSchema as dateSchema$1 };
81
+ export { CostMode, CostModes as CostModes$1, LiteLLMModelPrices, LiteLLMModelPricesSchema as LiteLLMModelPricesSchema$1, ModelSpec, ModelSpecSchema as ModelSpecSchema$1, SortOrder, SortOrders as SortOrders$1, TokenData, TokenTotals, dateSchema as dateSchema$1 };
package/dist/types.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import "./index-Bazt8Nfd.js";
2
- import { CostMode, CostModes$1 as CostModes, LiteLLMModelPrices, LiteLLMModelPricesSchema$1 as LiteLLMModelPricesSchema, ModelSpec, ModelSpecSchema$1 as ModelSpecSchema, TokenData, TokenTotals, dateSchema$1 as dateSchema } from "./types-BfZ5dOy7.js";
3
- export { CostMode, CostModes, LiteLLMModelPrices, LiteLLMModelPricesSchema, ModelSpec, ModelSpecSchema, TokenData, TokenTotals, dateSchema };
1
+ import "./index-BurjgCfW.js";
2
+ import { CostMode, CostModes$1 as CostModes, LiteLLMModelPrices, LiteLLMModelPricesSchema$1 as LiteLLMModelPricesSchema, ModelSpec, ModelSpecSchema$1 as ModelSpecSchema, SortOrder, SortOrders$1 as SortOrders, TokenData, TokenTotals, dateSchema$1 as dateSchema } from "./types-y1JQzaKZ.js";
3
+ export { CostMode, CostModes, LiteLLMModelPrices, LiteLLMModelPricesSchema, ModelSpec, ModelSpecSchema, SortOrder, SortOrders, TokenData, TokenTotals, dateSchema };
package/dist/types.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./dist-D6rk8Ra5.js";
2
- import { CostModes, LiteLLMModelPricesSchema, ModelSpecSchema, dateSchema } from "./types-DjlBTM5P.js";
1
+ import "./dist-FwNhpFrW.js";
2
+ import { CostModes, LiteLLMModelPricesSchema, ModelSpecSchema, SortOrders, dateSchema } from "./types-BcXIBMQk.js";
3
3
 
4
- export { CostModes, LiteLLMModelPricesSchema, ModelSpecSchema, dateSchema };
4
+ export { CostModes, LiteLLMModelPricesSchema, ModelSpecSchema, SortOrders, dateSchema };
package/dist/utils.js CHANGED
@@ -1,3 +1,3 @@
1
- import { formatCurrency, formatNumber } from "./utils-BeihwpHn.js";
1
+ import { formatCurrency, formatNumber } from "./utils-C7kg8MXN.js";
2
2
 
3
3
  export { formatCurrency, formatNumber };
@@ -0,0 +1,10 @@
1
+ import { tryImport } from "./index-CISmcbXk-BotItq1T.js";
2
+
3
+ //#region node_modules/xsschema/dist/valibot-CQk-M5rL.js
4
+ const getToJsonSchemaFn = async () => {
5
+ const { toJsonSchema } = await tryImport(import("./dist-C_i5I27w.js"), "@valibot/to-json-schema");
6
+ return (schema) => toJsonSchema(schema);
7
+ };
8
+
9
+ //#endregion
10
+ export { getToJsonSchemaFn };
@@ -0,0 +1,30 @@
1
+ import { missingDependenciesUrl } from "./index-CISmcbXk-BotItq1T.js";
2
+
3
+ //#region node_modules/xsschema/dist/zod-Db63SLXj.js
4
+ const getToJsonSchemaFn = async () => {
5
+ let zodV4toJSONSchema = (_schema) => {
6
+ throw new Error(`xsschema: Missing zod v4 dependencies "zod". see ${missingDependenciesUrl}`);
7
+ };
8
+ let zodV3ToJSONSchema = (_schema) => {
9
+ throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${missingDependenciesUrl}`);
10
+ };
11
+ try {
12
+ const { toJSONSchema } = await import("./core-BgFXUe_h.js");
13
+ zodV4toJSONSchema = toJSONSchema;
14
+ } catch (err) {
15
+ if (err instanceof Error) console.error(err.message);
16
+ }
17
+ try {
18
+ const { zodToJsonSchema } = await import("./esm-vjyZjnpZ.js");
19
+ zodV3ToJSONSchema = zodToJsonSchema;
20
+ } catch (err) {
21
+ if (err instanceof Error) console.error(err.message);
22
+ }
23
+ return async (schema) => {
24
+ if ("_zod" in schema) return zodV4toJSONSchema(schema);
25
+ else return zodV3ToJSONSchema(schema);
26
+ };
27
+ };
28
+
29
+ //#endregion
30
+ export { getToJsonSchemaFn };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccusage",
3
- "version": "0.4.2",
3
+ "version": "0.6.0",
4
4
  "description": "Usage analysis tool for Claude Code",
5
5
  "homepage": "https://github.com/ryoppippi/ccusage#readme",
6
6
  "bugs": {
@@ -20,6 +20,7 @@
20
20
  "./data-loader": "./dist/data-loader.js",
21
21
  "./debug": "./dist/debug.js",
22
22
  "./logger": "./dist/logger.js",
23
+ "./mcp": "./dist/mcp.js",
23
24
  "./pricing-fetcher": "./dist/pricing-fetcher.js",
24
25
  "./shared-args": "./dist/shared-args.js",
25
26
  "./types": "./dist/types.js",
File without changes
File without changes