ccusage 17.1.5 → 17.1.7

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.
@@ -1,2 +1,2 @@
1
- import { A as sessionUsageSchema, C as loadMonthlyUsageData, D as loadWeeklyUsageData, E as loadSessionUsageById, F as weeklyUsageSchema, M as transcriptMessageSchema, N as transcriptUsageSchema, O as modelBreakdownSchema, P as usageDataSchema, S as loadDailyUsageData, T as loadSessionData, _ as getClaudePaths, a as LoadOptions, b as globUsageFiles, c as SessionUsage, d as bucketUsageSchema, f as calculateContextTokens, g as extractProjectFromPath, h as dailyUsageSchema, i as GlobResult, j as sortFilesByTimestamp, k as monthlyUsageSchema, l as UsageData, m as createUniqueHash, n as DailyUsage, o as ModelBreakdown, p as calculateCostForEntry, r as DateFilter, s as MonthlyUsage, t as BucketUsage, u as WeeklyUsage, v as getEarliestTimestamp, w as loadSessionBlockData, x as loadBucketUsageData, y as getUsageLimitResetTime } from "./data-loader-qw155z_a.js";
1
+ import { A as sessionUsageSchema, C as loadMonthlyUsageData, D as loadWeeklyUsageData, E as loadSessionUsageById, F as weeklyUsageSchema, M as transcriptMessageSchema, N as transcriptUsageSchema, O as modelBreakdownSchema, P as usageDataSchema, S as loadDailyUsageData, T as loadSessionData, _ as getClaudePaths, a as LoadOptions, b as globUsageFiles, c as SessionUsage, d as bucketUsageSchema, f as calculateContextTokens, g as extractProjectFromPath, h as dailyUsageSchema, i as GlobResult, j as sortFilesByTimestamp, k as monthlyUsageSchema, l as UsageData, m as createUniqueHash, n as DailyUsage, o as ModelBreakdown, p as calculateCostForEntry, r as DateFilter, s as MonthlyUsage, t as BucketUsage, u as WeeklyUsage, v as getEarliestTimestamp, w as loadSessionBlockData, x as loadBucketUsageData, y as getUsageLimitResetTime } from "./data-loader-fDs6JbEv.js";
2
2
  export { BucketUsage, DailyUsage, DateFilter, GlobResult, LoadOptions, ModelBreakdown, MonthlyUsage, SessionUsage, UsageData, WeeklyUsage, bucketUsageSchema, calculateContextTokens, calculateCostForEntry, createUniqueHash, dailyUsageSchema, extractProjectFromPath, getClaudePaths, getEarliestTimestamp, getUsageLimitResetTime, globUsageFiles, loadBucketUsageData, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, loadSessionUsageById, loadWeeklyUsageData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, transcriptMessageSchema, transcriptUsageSchema, usageDataSchema, weeklyUsageSchema };
@@ -1,4 +1,4 @@
1
- import { C as transcriptUsageSchema, S as transcriptMessageSchema, T as weeklyUsageSchema, _ as loadWeeklyUsageData, a as dailyUsageSchema, b as sessionUsageSchema, c as getEarliestTimestamp, d as loadBucketUsageData, f as loadDailyUsageData, g as loadSessionUsageById, h as loadSessionData, i as createUniqueHash, l as getUsageLimitResetTime, m as loadSessionBlockData, n as calculateContextTokens, o as extractProjectFromPath, p as loadMonthlyUsageData, r as calculateCostForEntry, s as getClaudePaths, t as bucketUsageSchema, u as globUsageFiles, v as modelBreakdownSchema, w as usageDataSchema, x as sortFilesByTimestamp, y as monthlyUsageSchema } from "./data-loader-1S6PM6Nj.js";
2
- import "./_types-Ds2jjKYK.js";
3
- import "./logger-_VjiKYLh.js";
1
+ import { C as transcriptUsageSchema, S as transcriptMessageSchema, T as weeklyUsageSchema, _ as loadWeeklyUsageData, a as dailyUsageSchema, b as sessionUsageSchema, c as getEarliestTimestamp, d as loadBucketUsageData, f as loadDailyUsageData, g as loadSessionUsageById, h as loadSessionData, i as createUniqueHash, l as getUsageLimitResetTime, m as loadSessionBlockData, n as calculateContextTokens, o as extractProjectFromPath, p as loadMonthlyUsageData, r as calculateCostForEntry, s as getClaudePaths, t as bucketUsageSchema, u as globUsageFiles, v as modelBreakdownSchema, w as usageDataSchema, x as sortFilesByTimestamp, y as monthlyUsageSchema } from "./data-loader-DbW9eql2.js";
2
+ import "./_types-pJw1UnFi.js";
3
+ import "./logger-C7kqABy7.js";
4
4
  export { bucketUsageSchema, calculateContextTokens, calculateCostForEntry, createUniqueHash, dailyUsageSchema, extractProjectFromPath, getClaudePaths, getEarliestTimestamp, getUsageLimitResetTime, globUsageFiles, loadBucketUsageData, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, loadSessionUsageById, loadWeeklyUsageData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, transcriptMessageSchema, transcriptUsageSchema, usageDataSchema, weeklyUsageSchema };
@@ -1,6 +1,6 @@
1
- import { B as CLAUDE_PROJECTS_DIR_NAME, F as _usingCtx, H as DEBUG_MATCH_THRESHOLD_PERCENT, Q as glob, X as USAGE_DATA_GLOB_PATTERN, et as unwrap, j as PricingFetcher, s as getClaudePaths, tt as try_, ut as isFailure, w as usageDataSchema } from "./data-loader-1S6PM6Nj.js";
2
- import { P as safeParse } from "./_types-Ds2jjKYK.js";
3
- import { n as logger } from "./logger-_VjiKYLh.js";
1
+ import { B as CLAUDE_PROJECTS_DIR_NAME, F as _usingCtx, H as DEBUG_MATCH_THRESHOLD_PERCENT, Q as glob, X as USAGE_DATA_GLOB_PATTERN, et as unwrap, j as PricingFetcher, s as getClaudePaths, tt as try_, ut as isFailure, w as usageDataSchema } from "./data-loader-DbW9eql2.js";
2
+ import { P as safeParse } from "./_types-pJw1UnFi.js";
3
+ import { n as logger } from "./logger-C7kqABy7.js";
4
4
  import { readFile } from "node:fs/promises";
5
5
  import path from "node:path";
6
6
  async function detectMismatches(claudePath) {
package/dist/debug.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./data-loader-1S6PM6Nj.js";
2
- import "./_types-Ds2jjKYK.js";
3
- import "./logger-_VjiKYLh.js";
4
- import { n as printMismatchReport, t as detectMismatches } from "./debug-BnA62xYa.js";
1
+ import "./data-loader-DbW9eql2.js";
2
+ import "./_types-pJw1UnFi.js";
3
+ import "./logger-C7kqABy7.js";
4
+ import { n as printMismatchReport, t as detectMismatches } from "./debug-BZyKxY0R.js";
5
5
  export { detectMismatches, printMismatchReport };
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- #!/usr/bin/env node
2
- export {};
1
+ export { };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { $ as uniq, A as projectBlockUsage, D as calculateBurnRate, E as DEFAULT_SESSION_DURATION_HOURS, F as _usingCtx, G as DEFAULT_RECENT_DAYS, I as BLOCKS_COMPACT_WIDTH_THRESHOLD, J as MIN_REFRESH_INTERVAL_SECONDS, K as DEFAULT_REFRESH_INTERVAL_SECONDS, L as BLOCKS_DEFAULT_TERMINAL_WIDTH, M as formatDateCompact, N as getFileModifiedTime, O as filterRecentBlocks, P as unreachable, R as BLOCKS_WARNING_THRESHOLD, U as DEFAULT_CONTEXT_USAGE_THRESHOLDS, V as CONFIG_FILE_NAME, W as DEFAULT_LOCALE, Y as MIN_RENDER_INTERVAL_MS, Z as WEEK_DAYS, _ as loadWeeklyUsageData, at as inspect, c as getEarliestTimestamp, ct as isSuccess, dt as toArray, et as unwrap, f as loadDailyUsageData, ft as __commonJSMin, g as loadSessionUsageById, h as loadSessionData, i as createUniqueHash, it as inspectError, j as PricingFetcher, k as identifySessionBlocks, l as getUsageLimitResetTime, lt as andThen, m as loadSessionBlockData, mt as __toESM, n as calculateContextTokens, nt as pipe, ot as fail, p as loadMonthlyUsageData, pt as __require, q as MAX_REFRESH_INTERVAL_SECONDS, r as calculateCostForEntry, rt as map$2, s as getClaudePaths, st as succeed, tt as try_, u as globUsageFiles, ut as isFailure, w as usageDataSchema, x as sortFilesByTimestamp, z as BURN_RATE_THRESHOLDS } from "./data-loader-1S6PM6Nj.js";
3
- import { D as maxValue, E as integer$1, F as string, I as transform, L as trim, M as parse$1, N as pipe$1, O as minValue, P as safeParse, R as union, T as flatten, d as filterDateSchema, k as number, n as SortOrders, t as CostModes, w as check, y as statuslineHookJsonSchema, z as getTotalTokens } from "./_types-Ds2jjKYK.js";
4
- import { n as createTotalsObject, t as calculateTotals } from "./calculate-cost-BI5czHMM.js";
5
- import { a as version, i as name, n as logger, r as description, t as log } from "./logger-_VjiKYLh.js";
6
- import { n as printMismatchReport, t as detectMismatches } from "./debug-BnA62xYa.js";
2
+ import { $ as uniq, A as projectBlockUsage, D as calculateBurnRate, E as DEFAULT_SESSION_DURATION_HOURS, F as _usingCtx, G as DEFAULT_RECENT_DAYS, I as BLOCKS_COMPACT_WIDTH_THRESHOLD, J as MIN_REFRESH_INTERVAL_SECONDS, K as DEFAULT_REFRESH_INTERVAL_SECONDS, L as BLOCKS_DEFAULT_TERMINAL_WIDTH, M as formatDateCompact, N as getFileModifiedTime, O as filterRecentBlocks, P as unreachable, R as BLOCKS_WARNING_THRESHOLD, U as DEFAULT_CONTEXT_USAGE_THRESHOLDS, V as CONFIG_FILE_NAME, W as DEFAULT_LOCALE, Y as MIN_RENDER_INTERVAL_MS, Z as WEEK_DAYS, _ as loadWeeklyUsageData, at as inspect, c as getEarliestTimestamp, ct as isSuccess, dt as toArray, et as unwrap, f as loadDailyUsageData, ft as __commonJSMin, g as loadSessionUsageById, h as loadSessionData, i as createUniqueHash, it as inspectError, j as PricingFetcher, k as identifySessionBlocks, l as getUsageLimitResetTime, lt as andThen, m as loadSessionBlockData, mt as __toESM, n as calculateContextTokens, nt as pipe, ot as fail, p as loadMonthlyUsageData, pt as __require, q as MAX_REFRESH_INTERVAL_SECONDS, r as calculateCostForEntry, rt as map$2, s as getClaudePaths, st as succeed, tt as try_, u as globUsageFiles, ut as isFailure, w as usageDataSchema, x as sortFilesByTimestamp, z as BURN_RATE_THRESHOLDS } from "./data-loader-DbW9eql2.js";
3
+ import { D as maxValue, E as integer$1, F as string, I as transform, L as trim, M as parse$1, N as pipe$1, O as minValue, P as safeParse, R as union, T as flatten, d as filterDateSchema, k as number, n as SortOrders, t as CostModes, w as check, y as statuslineHookJsonSchema, z as getTotalTokens } from "./_types-pJw1UnFi.js";
4
+ import { n as createTotalsObject, t as calculateTotals } from "./calculate-cost-rv80nQ-a.js";
5
+ import { a as version, i as name, n as logger, r as description, t as log } from "./logger-C7kqABy7.js";
6
+ import { n as printMismatchReport, t as detectMismatches } from "./debug-BZyKxY0R.js";
7
7
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
8
8
  import a, { readFile, stat } from "node:fs/promises";
9
9
  import path, { join } from "node:path";
@@ -2906,7 +2906,7 @@ const getOptions = ({ stdin: stdin$2, stdout: stdout$1, stderr, stdio = [
2906
2906
  stdin$2,
2907
2907
  stdout$1,
2908
2908
  stderr
2909
- ], env: envOption, preferLocal, cwd: cwdOption = ".",...options }) => {
2909
+ ], env: envOption, preferLocal, cwd: cwdOption = ".", ...options }) => {
2910
2910
  const cwd = cwdOption instanceof URL ? fileURLToPath(cwdOption) : path.resolve(cwdOption);
2911
2911
  const env$2 = envOption ? {
2912
2912
  ...process$1.env,
@@ -2921,7 +2921,7 @@ const getOptions = ({ stdin: stdin$2, stdout: stdout$1, stderr, stdio = [
2921
2921
  cwd
2922
2922
  };
2923
2923
  };
2924
- const addLocalPath = ({ Path = "", PATH = Path,...env$2 }, cwd) => {
2924
+ const addLocalPath = ({ Path = "", PATH = Path, ...env$2 }, cwd) => {
2925
2925
  const pathParts = PATH.split(path.delimiter);
2926
2926
  const localPaths = getLocalPaths([], path.resolve(cwd)).map((localPath) => path.join(localPath, "node_modules/.bin")).filter((localPath) => !pathParts.includes(localPath));
2927
2927
  return {
@@ -4772,7 +4772,7 @@ function calculateSessionTotalTokens(entries) {
4772
4772
  return sum + usage.input_tokens + usage.output_tokens + (usage.cache_creation_input_tokens ?? 0) + (usage.cache_read_input_tokens ?? 0);
4773
4773
  }, 0);
4774
4774
  }
4775
- const { order: _,...sharedArgs$1 } = sharedCommandConfig.args;
4775
+ const { order: _, ...sharedArgs$1 } = sharedCommandConfig.args;
4776
4776
  const sessionCommand = define({
4777
4777
  name: "session",
4778
4778
  description: "Show usage report grouped by conversation session",
@@ -845,7 +845,7 @@ function createConsola$1(options = {}) {
845
845
  defaults: { level },
846
846
  stdout: process.stdout,
847
847
  stderr: process.stderr,
848
- prompt: (...args) => import("./prompt-HWGZJndy.js").then((m) => m.prompt(...args)),
848
+ prompt: (...args) => import("./prompt-XEKR514o.js").then((m) => m.prompt(...args)),
849
849
  reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
850
850
  ...options
851
851
  });
@@ -866,7 +866,7 @@ function createLogger(name$1) {
866
866
  }
867
867
  const log = console.log;
868
868
  var name = "ccusage";
869
- var version = "17.1.5";
869
+ var version = "17.1.7";
870
870
  var description = "Usage analysis tool for Claude Code";
871
871
  const logger = createLogger(name);
872
872
  const log$1 = log;
package/dist/logger.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as logger, t as log } from "./logger-_VjiKYLh.js";
1
+ import { n as logger, t as log } from "./logger-C7kqABy7.js";
2
2
  export { log, logger };
@@ -444,7 +444,7 @@ var AD = Object.defineProperty, pD = (t, u$1, F$1) => u$1 in t ? AD(t, u$1, {
444
444
  var x = class {
445
445
  constructor(u$1, F$1 = true) {
446
446
  h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
447
- const { input: e$1 = stdin, output: s = stdout, render: i, signal: D,...C$1 } = u$1;
447
+ const { input: e$1 = stdin, output: s = stdout, render: i, signal: D, ...C$1 } = u$1;
448
448
  this.opts = C$1, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = i.bind(this), this._track = F$1, this._abortSignal = D, this.input = e$1, this.output = s;
449
449
  }
450
450
  unsubscribe() {
@@ -840,4 +840,4 @@ async function prompt(message, opts = {}) {
840
840
  }).then(handleCancel);
841
841
  throw new Error(`Unknown prompt type: ${opts.type}`);
842
842
  }
843
- export { kCancel, prompt };
843
+ export { prompt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccusage",
3
- "version": "17.1.5",
3
+ "version": "17.1.7",
4
4
  "description": "Usage analysis tool for Claude Code",
5
5
  "homepage": "https://github.com/ryoppippi/ccusage#readme",
6
6
  "bugs": {
File without changes