ccusage 16.2.0 → 16.2.1
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 -0
- package/dist/calculate-cost.d.ts +2 -2
- package/dist/{data-loader-DewcQaMm.d.ts → data-loader-D1FVB4Lp.d.ts} +7 -21
- package/dist/{data-loader-C7KK9Yu0.js → data-loader-DzuyD9Va.js} +148 -214
- package/dist/data-loader.d.ts +3 -3
- package/dist/data-loader.js +4 -4
- package/dist/{debug-BOv8jTQu.js → debug-CWK-ECNy.js} +3 -3
- package/dist/debug.js +4 -4
- package/dist/index.js +260 -377
- package/dist/{logger-DKCIi_ai.js → logger-Cl0x4-O7.js} +1 -1
- package/dist/logger.js +1 -1
- package/dist/{mcp-DDHqWuGb.js → mcp-CzT8_3kj.js} +4 -4
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +4 -4
- package/dist/{pricing-fetcher-BgDfBZ05.d.ts → pricing-fetcher-DK8lcI1w.d.ts} +1 -1
- package/dist/{pricing-fetcher-CoBMgxFA.js → pricing-fetcher-_ZIEzYHY.js} +3 -3
- package/dist/pricing-fetcher.d.ts +1 -1
- package/dist/pricing-fetcher.js +2 -2
- package/package.json +1 -1
|
@@ -761,7 +761,7 @@ function _getDefaultLogLevel() {
|
|
|
761
761
|
return g ? LogLevels.debug : R ? LogLevels.warn : LogLevels.info;
|
|
762
762
|
}
|
|
763
763
|
const consola = createConsola$1();
|
|
764
|
-
var name = "ccusage", version = "16.2.
|
|
764
|
+
var name = "ccusage", version = "16.2.1", description = "Usage analysis tool for Claude Code";
|
|
765
765
|
const logger = consola.withTag(name);
|
|
766
766
|
if (process$1.env.LOG_LEVEL != null) {
|
|
767
767
|
const level = Number.parseInt(process$1.env.LOG_LEVEL, 10);
|
package/dist/logger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { log, logger } from "./logger-
|
|
1
|
+
import { log, logger } from "./logger-Cl0x4-O7.js";
|
|
2
2
|
export { log, logger };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { __commonJSMin, __toESM, require_usingCtx } from "./pricing-fetcher-
|
|
1
|
+
import { DEFAULT_LOCALE, __commonJSMin, __toESM, require_usingCtx } from "./pricing-fetcher-_ZIEzYHY.js";
|
|
2
2
|
import { getTotalTokens } from "./_token-utils-WjkbrjKv.js";
|
|
3
3
|
import { ZodFirstPartyTypeKind, ZodOptional, ZodType, arrayType, booleanType, discriminatedUnionType, enumType, filterDateSchema, literalType, numberType, objectType, optionalType, recordType, stringType, unionType, unknownType } from "./_types-DIdtMJ6V.js";
|
|
4
4
|
import { calculateTotals, createTotalsObject } from "./calculate-cost-BDqO4yWA.js";
|
|
5
|
-
import { getClaudePaths, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData } from "./data-loader-
|
|
6
|
-
import { name, version } from "./logger-
|
|
5
|
+
import { getClaudePaths, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData } from "./data-loader-DzuyD9Va.js";
|
|
6
|
+
import { name, version } from "./logger-Cl0x4-O7.js";
|
|
7
7
|
import process from "node:process";
|
|
8
8
|
const LATEST_PROTOCOL_VERSION = "2025-06-18", SUPPORTED_PROTOCOL_VERSIONS = [
|
|
9
9
|
LATEST_PROTOCOL_VERSION,
|
|
@@ -6688,7 +6688,7 @@ function createMcpServer(options) {
|
|
|
6688
6688
|
"display"
|
|
6689
6689
|
]).default("auto").optional(),
|
|
6690
6690
|
timezone: stringType().optional(),
|
|
6691
|
-
locale: stringType().default(
|
|
6691
|
+
locale: stringType().default(DEFAULT_LOCALE).optional()
|
|
6692
6692
|
}, { claudePath } = options ?? defaultOptions();
|
|
6693
6693
|
return server.registerTool("daily", {
|
|
6694
6694
|
description: "Show usage report grouped by date",
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
1
|
+
import { LoadOptions } from "./data-loader-D1FVB4Lp.js";
|
|
2
|
+
import "./pricing-fetcher-DK8lcI1w.js";
|
|
3
3
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
4
|
import { Hono } from "hono/tiny";
|
|
5
5
|
|
package/dist/mcp.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./pricing-fetcher-
|
|
1
|
+
import "./pricing-fetcher-_ZIEzYHY.js";
|
|
2
2
|
import "./_token-utils-WjkbrjKv.js";
|
|
3
3
|
import "./_types-DIdtMJ6V.js";
|
|
4
4
|
import "./calculate-cost-BDqO4yWA.js";
|
|
5
|
-
import "./data-loader-
|
|
6
|
-
import "./logger-
|
|
7
|
-
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-
|
|
5
|
+
import "./data-loader-DzuyD9Va.js";
|
|
6
|
+
import "./logger-Cl0x4-O7.js";
|
|
7
|
+
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-CzT8_3kj.js";
|
|
8
8
|
export { createMcpHttpApp, createMcpServer, startMcpServerStdio };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { modelPricingSchema } from "./_types-DIdtMJ6V.js";
|
|
2
|
-
import { logger } from "./logger-
|
|
2
|
+
import { logger } from "./logger-Cl0x4-O7.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import F, { homedir } from "node:os";
|
|
@@ -107,7 +107,7 @@ const LITELLM_PRICING_URL = "https://raw.githubusercontent.com/BerriAI/litellm/m
|
|
|
107
107
|
"thursday",
|
|
108
108
|
"friday",
|
|
109
109
|
"saturday"
|
|
110
|
-
], CONFIG_FILE_NAME = "ccusage.json";
|
|
110
|
+
], CONFIG_FILE_NAME = "ccusage.json", DEFAULT_LOCALE = "en-CA";
|
|
111
111
|
var require_usingCtx = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
112
112
|
function _usingCtx() {
|
|
113
113
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) {
|
|
@@ -399,4 +399,4 @@ var require_usingCtx = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
399
399
|
return cost;
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
|
-
export { BLOCKS_COMPACT_WIDTH_THRESHOLD, BLOCKS_DEFAULT_TERMINAL_WIDTH, BLOCKS_WARNING_THRESHOLD, BURN_RATE_THRESHOLDS, CLAUDE_CONFIG_DIR_ENV, CLAUDE_PROJECTS_DIR_NAME, CONFIG_FILE_NAME, DEBUG_MATCH_THRESHOLD_PERCENT, DEFAULT_CLAUDE_CODE_PATH, DEFAULT_CLAUDE_CONFIG_PATH, DEFAULT_CONTEXT_USAGE_THRESHOLDS, DEFAULT_RECENT_DAYS, DEFAULT_REFRESH_INTERVAL_SECONDS, MAX_REFRESH_INTERVAL_SECONDS, MCP_DEFAULT_PORT, MIN_REFRESH_INTERVAL_SECONDS, MIN_RENDER_INTERVAL_MS, PricingFetcher, USAGE_DATA_GLOB_PATTERN, USER_HOME_DIR, WEEK_DAYS, __commonJSMin, __require, __toESM, andThen, fail, inspect, inspectError, isFailure, isPromise, isSuccess, map, pipe, require_usingCtx, succeed, try_ };
|
|
402
|
+
export { BLOCKS_COMPACT_WIDTH_THRESHOLD, BLOCKS_DEFAULT_TERMINAL_WIDTH, BLOCKS_WARNING_THRESHOLD, BURN_RATE_THRESHOLDS, CLAUDE_CONFIG_DIR_ENV, CLAUDE_PROJECTS_DIR_NAME, CONFIG_FILE_NAME, DEBUG_MATCH_THRESHOLD_PERCENT, DEFAULT_CLAUDE_CODE_PATH, DEFAULT_CLAUDE_CONFIG_PATH, DEFAULT_CONTEXT_USAGE_THRESHOLDS, DEFAULT_LOCALE, DEFAULT_RECENT_DAYS, DEFAULT_REFRESH_INTERVAL_SECONDS, MAX_REFRESH_INTERVAL_SECONDS, MCP_DEFAULT_PORT, MIN_REFRESH_INTERVAL_SECONDS, MIN_RENDER_INTERVAL_MS, PricingFetcher, USAGE_DATA_GLOB_PATTERN, USER_HOME_DIR, WEEK_DAYS, __commonJSMin, __require, __toESM, andThen, fail, inspect, inspectError, isFailure, isPromise, isSuccess, map, pipe, require_usingCtx, succeed, try_ };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PricingFetcher } from "./pricing-fetcher-
|
|
1
|
+
import { PricingFetcher } from "./pricing-fetcher-DK8lcI1w.js";
|
|
2
2
|
export { PricingFetcher };
|
package/dist/pricing-fetcher.js
CHANGED