ccusage 16.1.2 → 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.
@@ -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.1.2", description = "Usage analysis tool for Claude Code";
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-vSpPcCiQ.js";
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-BrJoueZ1.js";
1
+ import { DEFAULT_LOCALE, __commonJSMin, __toESM, require_usingCtx } from "./pricing-fetcher-_ZIEzYHY.js";
2
2
  import { getTotalTokens } from "./_token-utils-WjkbrjKv.js";
3
- import { ZodFirstPartyTypeKind, ZodOptional, ZodType, arrayType, booleanType, discriminatedUnionType, enumType, filterDateSchema, literalType, numberType, objectType, optionalType, recordType, stringType, unionType, unknownType } from "./_types-BXB_jFi9.js";
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-DUaYLdYR.js";
6
- import { name, version } from "./logger-vSpPcCiQ.js";
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("en-CA").optional()
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 "./pricing-fetcher-BgDfBZ05.js";
2
- import { LoadOptions } from "./data-loader--Ga8BPdt.js";
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-BrJoueZ1.js";
1
+ import "./pricing-fetcher-_ZIEzYHY.js";
2
2
  import "./_token-utils-WjkbrjKv.js";
3
- import "./_types-BXB_jFi9.js";
3
+ import "./_types-DIdtMJ6V.js";
4
4
  import "./calculate-cost-BDqO4yWA.js";
5
- import "./data-loader-DUaYLdYR.js";
6
- import "./logger-vSpPcCiQ.js";
7
- import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-D343KJOh.js";
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 };
@@ -216,4 +216,4 @@ declare class PricingFetcher implements Disposable {
216
216
  }, pricing: ModelPricing): number;
217
217
  }
218
218
  //#endregion
219
- export { Bucket, CostMode, PricingFetcher, SortOrder, type TupleToUnion };
219
+ export { Bucket, CostMode, PricingFetcher, SortOrder };
@@ -1,5 +1,5 @@
1
- import { modelPricingSchema } from "./_types-BXB_jFi9.js";
2
- import { logger } from "./logger-vSpPcCiQ.js";
1
+ import { modelPricingSchema } from "./_types-DIdtMJ6V.js";
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";
@@ -99,7 +99,7 @@ const LITELLM_PRICING_URL = "https://raw.githubusercontent.com/BerriAI/litellm/m
99
99
  }, DEFAULT_CONTEXT_USAGE_THRESHOLDS = {
100
100
  LOW: 50,
101
101
  MEDIUM: 80
102
- }, CONTEXT_LOW_THRESHOLD_ENV = "CCUSAGE_CONTEXT_LOW_THRESHOLD", CONTEXT_MEDIUM_THRESHOLD_ENV = "CCUSAGE_CONTEXT_MEDIUM_THRESHOLD", WEEK_DAYS = [
102
+ }, WEEK_DAYS = [
103
103
  "sunday",
104
104
  "monday",
105
105
  "tuesday",
@@ -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, CONTEXT_LOW_THRESHOLD_ENV, CONTEXT_MEDIUM_THRESHOLD_ENV, 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, 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-BgDfBZ05.js";
1
+ import { PricingFetcher } from "./pricing-fetcher-DK8lcI1w.js";
2
2
  export { PricingFetcher };
@@ -1,4 +1,4 @@
1
- import { PricingFetcher } from "./pricing-fetcher-BrJoueZ1.js";
2
- import "./_types-BXB_jFi9.js";
3
- import "./logger-vSpPcCiQ.js";
1
+ import { PricingFetcher } from "./pricing-fetcher-_ZIEzYHY.js";
2
+ import "./_types-DIdtMJ6V.js";
3
+ import "./logger-Cl0x4-O7.js";
4
4
  export { PricingFetcher };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccusage",
3
- "version": "16.1.2",
3
+ "version": "16.2.1",
4
4
  "description": "Usage analysis tool for Claude Code",
5
5
  "homepage": "https://github.com/ryoppippi/ccusage#readme",
6
6
  "bugs": {