ccusage 18.0.9 → 18.0.10
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/dist/{_types-BFL_bTNX.js → _types-DY3gqCWm.js} +21 -1
- package/dist/{calculate-cost-CKH-OC_c.js → calculate-cost-DWGfKMSD.js} +1 -1
- package/dist/calculate-cost.d.ts +1 -1
- package/dist/calculate-cost.js +2 -2
- package/dist/{data-loader-sVkn4Ind.js → data-loader-B58Zt4YE.js} +23 -13
- package/dist/{data-loader-BRnqe1-8.d.ts → data-loader-CdGrTB0Q.d.ts} +61 -0
- package/dist/data-loader.d.ts +1 -1
- package/dist/data-loader.js +3 -3
- package/dist/{debug-Cf-lkCu_.js → debug-0PxspX9a.js} +3 -3
- package/dist/debug.js +4 -4
- package/dist/index.js +5 -5
- package/dist/{logger-BjbQOSox.js → logger-TGVysPie.js} +1 -1
- package/dist/logger.js +1 -1
- package/package.json +1 -1
|
@@ -431,6 +431,26 @@ function optional(wrapped, default_) {
|
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
433
|
/* @__NO_SIDE_EFFECTS__ */
|
|
434
|
+
function picklist(options, message2) {
|
|
435
|
+
return {
|
|
436
|
+
kind: "schema",
|
|
437
|
+
type: "picklist",
|
|
438
|
+
reference: picklist,
|
|
439
|
+
expects: /* @__PURE__ */ _joinExpects(options.map(_stringify), "|"),
|
|
440
|
+
async: false,
|
|
441
|
+
options,
|
|
442
|
+
message: message2,
|
|
443
|
+
get "~standard"() {
|
|
444
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
445
|
+
},
|
|
446
|
+
"~run"(dataset, config2) {
|
|
447
|
+
if (this.options.includes(dataset.value)) dataset.typed = true;
|
|
448
|
+
else _addIssue(this, "type", dataset, config2);
|
|
449
|
+
return dataset;
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
434
454
|
function string(message2) {
|
|
435
455
|
return {
|
|
436
456
|
kind: "schema",
|
|
@@ -585,4 +605,4 @@ const statuslineHookJsonSchema = /* @__PURE__ */ object({
|
|
|
585
605
|
context_window_size: /* @__PURE__ */ number()
|
|
586
606
|
}))
|
|
587
607
|
});
|
|
588
|
-
export { object as A, boolean as C, maxValue as D, integer as E,
|
|
608
|
+
export { object as A, getTotalTokens as B, boolean as C, maxValue as D, integer as E, safeParse as F, string as I, transform as L, parse as M, picklist as N, minValue as O, pipe as P, trim as R, array as S, flatten as T, requestIdSchema as _, createDailyDate as a, versionSchema as b, createSessionId as c, filterDateSchema as d, isoTimestampSchema as f, projectPathSchema as g, monthlyDateSchema as h, createBucket as i, optional as j, number as k, createWeeklyDate as l, modelNameSchema as m, SortOrders as n, createMonthlyDate as o, messageIdSchema as p, activityDateSchema as r, createProjectPath as s, CostModes as t, dailyDateSchema as u, sessionIdSchema as v, check as w, weeklyDateSchema as x, statuslineHookJsonSchema as y, union as z };
|
package/dist/calculate-cost.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as SessionUsage, n as DailyUsage, s as MonthlyUsage, u as WeeklyUsage } from "./data-loader-
|
|
1
|
+
import { c as SessionUsage, n as DailyUsage, s as MonthlyUsage, u as WeeklyUsage } from "./data-loader-CdGrTB0Q.js";
|
|
2
2
|
|
|
3
3
|
//#region src/_token-utils.d.ts
|
|
4
4
|
|
package/dist/calculate-cost.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as createTotalsObject, t as calculateTotals } from "./calculate-cost-
|
|
1
|
+
import { B as getTotalTokens } from "./_types-DY3gqCWm.js";
|
|
2
|
+
import { n as createTotalsObject, t as calculateTotals } from "./calculate-cost-DWGfKMSD.js";
|
|
3
3
|
export { calculateTotals, createTotalsObject, getTotalTokens };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as object, C as boolean, F as string, M as parse$2,
|
|
2
|
-
import { n as logger } from "./logger-
|
|
1
|
+
import { A as object, B as getTotalTokens, C as boolean, F as safeParse, I as string, M as parse$2, N as picklist, S as array, _ as requestIdSchema, a as createDailyDate, b as versionSchema, c as createSessionId, f as isoTimestampSchema, g as projectPathSchema, h as monthlyDateSchema, i as createBucket, j as optional, k as number, l as createWeeklyDate, m as modelNameSchema, o as createMonthlyDate, p as messageIdSchema, r as activityDateSchema, s as createProjectPath, u as dailyDateSchema, v as sessionIdSchema, x as weeklyDateSchema, z as union } from "./_types-DY3gqCWm.js";
|
|
2
|
+
import { n as logger } from "./logger-TGVysPie.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import * as nativeFs from "node:fs";
|
|
5
5
|
import b, { createReadStream } from "node:fs";
|
|
@@ -4622,7 +4622,8 @@ const liteLLMModelPricingSchema = object({
|
|
|
4622
4622
|
cache_creation_input_token_cost_above_200k_tokens: optional(number()),
|
|
4623
4623
|
cache_read_input_token_cost_above_200k_tokens: optional(number()),
|
|
4624
4624
|
input_cost_per_token_above_128k_tokens: optional(number()),
|
|
4625
|
-
output_cost_per_token_above_128k_tokens: optional(number())
|
|
4625
|
+
output_cost_per_token_above_128k_tokens: optional(number()),
|
|
4626
|
+
provider_specific_entry: optional(object({ fast: optional(number()) }))
|
|
4626
4627
|
});
|
|
4627
4628
|
const DEFAULT_PROVIDER_PREFIXES = [
|
|
4628
4629
|
"anthropic/",
|
|
@@ -4753,11 +4754,11 @@ var LiteLLMPricingFetcher = class {
|
|
|
4753
4754
|
const cacheReadCost = calculateTieredCost(tokens.cache_read_input_tokens, pricing.cache_read_input_token_cost, pricing.cache_read_input_token_cost_above_200k_tokens);
|
|
4754
4755
|
return inputCost + outputCost + cacheCreationCost + cacheReadCost;
|
|
4755
4756
|
}
|
|
4756
|
-
async calculateCostFromTokens(tokens, modelName) {
|
|
4757
|
+
async calculateCostFromTokens(tokens, modelName, options) {
|
|
4757
4758
|
if (modelName == null || modelName === "") return succeed(0);
|
|
4758
4759
|
return pipe(this.getModelPricing(modelName), andThen((pricing) => {
|
|
4759
4760
|
if (pricing == null) return fail(/* @__PURE__ */ new Error(`Model pricing not found for ${modelName}`));
|
|
4760
|
-
return succeed(this.calculateCostFromPricing(tokens, pricing));
|
|
4761
|
+
return succeed(this.calculateCostFromPricing(tokens, pricing) * (options?.speed === "fast" ? pricing.provider_specific_entry?.fast ?? 1 : 1));
|
|
4761
4762
|
}));
|
|
4762
4763
|
}
|
|
4763
4764
|
};
|
|
@@ -5205,7 +5206,8 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
5205
5206
|
"input_cost_per_token_above_200k_tokens": 1e-5,
|
|
5206
5207
|
"output_cost_per_token_above_200k_tokens": 375e-7,
|
|
5207
5208
|
"cache_creation_input_token_cost_above_200k_tokens": 125e-7,
|
|
5208
|
-
"cache_read_input_token_cost_above_200k_tokens": 1e-6
|
|
5209
|
+
"cache_read_input_token_cost_above_200k_tokens": 1e-6,
|
|
5210
|
+
"provider_specific_entry": { "fast": 6 }
|
|
5209
5211
|
},
|
|
5210
5212
|
"claude-opus-4-6-20260205": {
|
|
5211
5213
|
"input_cost_per_token": 5e-6,
|
|
@@ -5218,7 +5220,8 @@ const PREFETCHED_CLAUDE_PRICING = {
|
|
|
5218
5220
|
"input_cost_per_token_above_200k_tokens": 1e-5,
|
|
5219
5221
|
"output_cost_per_token_above_200k_tokens": 375e-7,
|
|
5220
5222
|
"cache_creation_input_token_cost_above_200k_tokens": 125e-7,
|
|
5221
|
-
"cache_read_input_token_cost_above_200k_tokens": 1e-6
|
|
5223
|
+
"cache_read_input_token_cost_above_200k_tokens": 1e-6,
|
|
5224
|
+
"provider_specific_entry": { "fast": 6 }
|
|
5222
5225
|
},
|
|
5223
5226
|
"claude-sonnet-4-20250514": {
|
|
5224
5227
|
"input_cost_per_token": 3e-6,
|
|
@@ -5437,7 +5440,8 @@ const usageDataSchema = object({
|
|
|
5437
5440
|
input_tokens: number(),
|
|
5438
5441
|
output_tokens: number(),
|
|
5439
5442
|
cache_creation_input_tokens: optional(number()),
|
|
5440
|
-
cache_read_input_tokens: optional(number())
|
|
5443
|
+
cache_read_input_tokens: optional(number()),
|
|
5444
|
+
speed: optional(picklist(["standard", "fast"]))
|
|
5441
5445
|
}),
|
|
5442
5446
|
model: optional(modelNameSchema),
|
|
5443
5447
|
id: optional(messageIdSchema),
|
|
@@ -5522,6 +5526,11 @@ const bucketUsageSchema = object({
|
|
|
5522
5526
|
modelBreakdowns: array(modelBreakdownSchema),
|
|
5523
5527
|
project: optional(string())
|
|
5524
5528
|
});
|
|
5529
|
+
function getDisplayModelName(data) {
|
|
5530
|
+
const model = data.message.model;
|
|
5531
|
+
if (model == null) return;
|
|
5532
|
+
return data.message.usage.speed === "fast" ? `${model}-fast` : model;
|
|
5533
|
+
}
|
|
5525
5534
|
function aggregateByModel(entries, getModel, getUsage, getCost) {
|
|
5526
5535
|
const modelAggregates = /* @__PURE__ */ new Map();
|
|
5527
5536
|
const defaultStats = {
|
|
@@ -5662,14 +5671,15 @@ async function sortFilesByTimestamp(files) {
|
|
|
5662
5671
|
}).map((item) => item.file);
|
|
5663
5672
|
}
|
|
5664
5673
|
async function calculateCostForEntry(data, mode, fetcher) {
|
|
5674
|
+
const speed = data.message.usage.speed;
|
|
5665
5675
|
if (mode === "display") return data.costUSD ?? 0;
|
|
5666
5676
|
if (mode === "calculate") {
|
|
5667
|
-
if (data.message.model != null) return unwrap(fetcher.calculateCostFromTokens(data.message.usage, data.message.model), 0);
|
|
5677
|
+
if (data.message.model != null) return unwrap(fetcher.calculateCostFromTokens(data.message.usage, data.message.model, { speed }), 0);
|
|
5668
5678
|
return 0;
|
|
5669
5679
|
}
|
|
5670
5680
|
if (mode === "auto") {
|
|
5671
5681
|
if (data.costUSD != null) return data.costUSD;
|
|
5672
|
-
if (data.message.model != null) return unwrap(fetcher.calculateCostFromTokens(data.message.usage, data.message.model), 0);
|
|
5682
|
+
if (data.message.model != null) return unwrap(fetcher.calculateCostFromTokens(data.message.usage, data.message.model, { speed }), 0);
|
|
5673
5683
|
return 0;
|
|
5674
5684
|
}
|
|
5675
5685
|
unreachable(mode);
|
|
@@ -5724,7 +5734,7 @@ async function loadDailyUsageData(options) {
|
|
|
5724
5734
|
data,
|
|
5725
5735
|
date,
|
|
5726
5736
|
cost,
|
|
5727
|
-
model: data
|
|
5737
|
+
model: getDisplayModelName(data),
|
|
5728
5738
|
project
|
|
5729
5739
|
});
|
|
5730
5740
|
} catch {}
|
|
@@ -5790,7 +5800,7 @@ async function loadSessionData(options) {
|
|
|
5790
5800
|
projectPath,
|
|
5791
5801
|
cost,
|
|
5792
5802
|
timestamp: data.timestamp,
|
|
5793
|
-
model: data
|
|
5803
|
+
model: getDisplayModelName(data)
|
|
5794
5804
|
});
|
|
5795
5805
|
} catch {}
|
|
5796
5806
|
});
|
|
@@ -5986,7 +5996,7 @@ async function loadSessionBlockData(options) {
|
|
|
5986
5996
|
cacheReadInputTokens: data.message.usage.cache_read_input_tokens ?? 0
|
|
5987
5997
|
},
|
|
5988
5998
|
costUSD: cost,
|
|
5989
|
-
model: data
|
|
5999
|
+
model: getDisplayModelName(data) ?? "unknown",
|
|
5990
6000
|
version: data.version,
|
|
5991
6001
|
usageLimitResetTime: usageLimitResetTime ?? void 0
|
|
5992
6002
|
});
|
|
@@ -1649,6 +1649,66 @@ declare function optionalAsync<const TWrapped$1 extends BaseSchema<unknown, unkn
|
|
|
1649
1649
|
/**
|
|
1650
1650
|
* Picklist options type.
|
|
1651
1651
|
*/
|
|
1652
|
+
type PicklistOptions = MaybeReadonly<(string | number | bigint)[]>;
|
|
1653
|
+
/**
|
|
1654
|
+
* Picklist issue interface.
|
|
1655
|
+
*/
|
|
1656
|
+
interface PicklistIssue extends BaseIssue<unknown> {
|
|
1657
|
+
/**
|
|
1658
|
+
* The issue kind.
|
|
1659
|
+
*/
|
|
1660
|
+
readonly kind: 'schema';
|
|
1661
|
+
/**
|
|
1662
|
+
* The issue type.
|
|
1663
|
+
*/
|
|
1664
|
+
readonly type: 'picklist';
|
|
1665
|
+
/**
|
|
1666
|
+
* The expected property.
|
|
1667
|
+
*/
|
|
1668
|
+
readonly expected: string;
|
|
1669
|
+
}
|
|
1670
|
+
/**
|
|
1671
|
+
* Picklist schema interface.
|
|
1672
|
+
*/
|
|
1673
|
+
interface PicklistSchema<TOptions$1 extends PicklistOptions, TMessage extends ErrorMessage<PicklistIssue> | undefined> extends BaseSchema<TOptions$1[number], TOptions$1[number], PicklistIssue> {
|
|
1674
|
+
/**
|
|
1675
|
+
* The schema type.
|
|
1676
|
+
*/
|
|
1677
|
+
readonly type: 'picklist';
|
|
1678
|
+
/**
|
|
1679
|
+
* The schema reference.
|
|
1680
|
+
*/
|
|
1681
|
+
readonly reference: typeof picklist;
|
|
1682
|
+
/**
|
|
1683
|
+
* The picklist options.
|
|
1684
|
+
*/
|
|
1685
|
+
readonly options: TOptions$1;
|
|
1686
|
+
/**
|
|
1687
|
+
* The error message.
|
|
1688
|
+
*/
|
|
1689
|
+
readonly message: TMessage;
|
|
1690
|
+
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Creates a picklist schema.
|
|
1693
|
+
*
|
|
1694
|
+
* @param options The picklist options.
|
|
1695
|
+
*
|
|
1696
|
+
* @returns A picklist schema.
|
|
1697
|
+
*/
|
|
1698
|
+
declare function picklist<const TOptions$1 extends PicklistOptions>(options: TOptions$1): PicklistSchema<TOptions$1, undefined>;
|
|
1699
|
+
/**
|
|
1700
|
+
* Creates a picklist schema.
|
|
1701
|
+
*
|
|
1702
|
+
* @param options The picklist options.
|
|
1703
|
+
* @param message The error message.
|
|
1704
|
+
*
|
|
1705
|
+
* @returns A picklist schema.
|
|
1706
|
+
*/
|
|
1707
|
+
declare function picklist<const TOptions$1 extends PicklistOptions, const TMessage extends ErrorMessage<PicklistIssue> | undefined>(options: TOptions$1, message: TMessage): PicklistSchema<TOptions$1, TMessage>;
|
|
1708
|
+
|
|
1709
|
+
/**
|
|
1710
|
+
* Promise issue interface.
|
|
1711
|
+
*/
|
|
1652
1712
|
|
|
1653
1713
|
/**
|
|
1654
1714
|
* String issue interface.
|
|
@@ -1994,6 +2054,7 @@ declare const usageDataSchema: ObjectSchema<{
|
|
|
1994
2054
|
readonly output_tokens: NumberSchema<undefined>;
|
|
1995
2055
|
readonly cache_creation_input_tokens: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
1996
2056
|
readonly cache_read_input_tokens: OptionalSchema<NumberSchema<undefined>, undefined>;
|
|
2057
|
+
readonly speed: OptionalSchema<PicklistSchema<["standard", "fast"], undefined>, undefined>;
|
|
1997
2058
|
}, undefined>;
|
|
1998
2059
|
readonly model: OptionalSchema<SchemaWithPipe<readonly [StringSchema<undefined>, MinLengthAction<string, 1, "Model name cannot be empty">, BrandAction<string, "ModelName">]>, undefined>;
|
|
1999
2060
|
readonly id: OptionalSchema<SchemaWithPipe<readonly [StringSchema<undefined>, MinLengthAction<string, 1, "Message ID cannot be empty">, BrandAction<string, "MessageId">]>, undefined>;
|
package/dist/data-loader.d.ts
CHANGED
|
@@ -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-
|
|
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-CdGrTB0Q.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 };
|
package/dist/data-loader.js
CHANGED
|
@@ -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-
|
|
2
|
-
import "./_types-
|
|
3
|
-
import "./logger-
|
|
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-B58Zt4YE.js";
|
|
2
|
+
import "./_types-DY3gqCWm.js";
|
|
3
|
+
import "./logger-TGVysPie.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 { A as PricingFetcher, J as CLAUDE_PROJECTS_DIR_NAME, W as _usingCtx, X as DEBUG_MATCH_THRESHOLD_PERCENT, at as try_, ft as isFailure, it as unwrap, rt as glob, s as getClaudePaths, tt as USAGE_DATA_GLOB_PATTERN, w as usageDataSchema } from "./data-loader-
|
|
2
|
-
import {
|
|
3
|
-
import { n as logger } from "./logger-
|
|
1
|
+
import { A as PricingFetcher, J as CLAUDE_PROJECTS_DIR_NAME, W as _usingCtx, X as DEBUG_MATCH_THRESHOLD_PERCENT, at as try_, ft as isFailure, it as unwrap, rt as glob, s as getClaudePaths, tt as USAGE_DATA_GLOB_PATTERN, w as usageDataSchema } from "./data-loader-B58Zt4YE.js";
|
|
2
|
+
import { F as safeParse } from "./_types-DY3gqCWm.js";
|
|
3
|
+
import { n as logger } from "./logger-TGVysPie.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-
|
|
2
|
-
import "./_types-
|
|
3
|
-
import "./logger-
|
|
4
|
-
import { n as printMismatchReport, t as detectMismatches } from "./debug-
|
|
1
|
+
import "./data-loader-B58Zt4YE.js";
|
|
2
|
+
import "./_types-DY3gqCWm.js";
|
|
3
|
+
import "./logger-TGVysPie.js";
|
|
4
|
+
import { n as printMismatchReport, t as detectMismatches } from "./debug-0PxspX9a.js";
|
|
5
5
|
export { detectMismatches, printMismatchReport };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as DEFAULT_RECENT_DAYS, B as pushBreakdownRows, D as calculateBurnRate, E as DEFAULT_SESSION_DURATION_HOURS, F as formatDateCompact, G as BLOCKS_COMPACT_WIDTH_THRESHOLD, H as getFileModifiedTime, I as formatModelsDisplayMultiline, K as BLOCKS_DEFAULT_TERMINAL_WIDTH, L as formatNumber, M as addEmptySeparatorRow, N as createUsageReportTable, O as filterRecentBlocks, P as formatCurrency, Q as DEFAULT_LOCALE, R as formatTotalsRow, U as unreachable, V as require_picocolors, W as _usingCtx, Y as CONFIG_FILE_NAME, Z as DEFAULT_CONTEXT_USAGE_THRESHOLDS, _ as loadWeeklyUsageData, at as try_, ct as inspectError, dt as isSuccess, et as DEFAULT_REFRESH_INTERVAL_SECONDS, f as loadDailyUsageData, ft as isFailure, g as loadSessionUsageById, h as loadSessionData, it as unwrap, j as ResponsiveTable, k as projectBlockUsage, lt as inspect, m as loadSessionBlockData, mt as __toESM, n as calculateContextTokens, nt as WEEK_DAYS, ot as pipe, p as loadMonthlyUsageData, pt as toArray, q as BLOCKS_WARNING_THRESHOLD, s as getClaudePaths, st as map$1, ut as succeed, z as formatUsageDataRow } from "./data-loader-
|
|
3
|
-
import { D as maxValue, E as integer$1, F as
|
|
4
|
-
import { n as createTotalsObject, t as calculateTotals } from "./calculate-cost-
|
|
5
|
-
import { a as version, i as name, n as logger, r as description, t as log } from "./logger-
|
|
6
|
-
import { n as printMismatchReport, t as detectMismatches } from "./debug-
|
|
2
|
+
import { $ as DEFAULT_RECENT_DAYS, B as pushBreakdownRows, D as calculateBurnRate, E as DEFAULT_SESSION_DURATION_HOURS, F as formatDateCompact, G as BLOCKS_COMPACT_WIDTH_THRESHOLD, H as getFileModifiedTime, I as formatModelsDisplayMultiline, K as BLOCKS_DEFAULT_TERMINAL_WIDTH, L as formatNumber, M as addEmptySeparatorRow, N as createUsageReportTable, O as filterRecentBlocks, P as formatCurrency, Q as DEFAULT_LOCALE, R as formatTotalsRow, U as unreachable, V as require_picocolors, W as _usingCtx, Y as CONFIG_FILE_NAME, Z as DEFAULT_CONTEXT_USAGE_THRESHOLDS, _ as loadWeeklyUsageData, at as try_, ct as inspectError, dt as isSuccess, et as DEFAULT_REFRESH_INTERVAL_SECONDS, f as loadDailyUsageData, ft as isFailure, g as loadSessionUsageById, h as loadSessionData, it as unwrap, j as ResponsiveTable, k as projectBlockUsage, lt as inspect, m as loadSessionBlockData, mt as __toESM, n as calculateContextTokens, nt as WEEK_DAYS, ot as pipe, p as loadMonthlyUsageData, pt as toArray, q as BLOCKS_WARNING_THRESHOLD, s as getClaudePaths, st as map$1, ut as succeed, z as formatUsageDataRow } from "./data-loader-B58Zt4YE.js";
|
|
3
|
+
import { B as getTotalTokens, D as maxValue, E as integer$1, F as safeParse, I as string, L as transform, M as parse$1, O as minValue, P as pipe$1, R as trim, T as flatten, d as filterDateSchema, k as number, n as SortOrders, t as CostModes, w as check, y as statuslineHookJsonSchema, z as union } from "./_types-DY3gqCWm.js";
|
|
4
|
+
import { n as createTotalsObject, t as calculateTotals } from "./calculate-cost-DWGfKMSD.js";
|
|
5
|
+
import { a as version, i as name, n as logger, r as description, t as log } from "./logger-TGVysPie.js";
|
|
6
|
+
import { n as printMismatchReport, t as detectMismatches } from "./debug-0PxspX9a.js";
|
|
7
7
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
import a from "node:fs/promises";
|
|
9
9
|
import path, { join } from "node:path";
|
|
@@ -866,7 +866,7 @@ function createLogger(name$1) {
|
|
|
866
866
|
}
|
|
867
867
|
const log = console.log;
|
|
868
868
|
var name = "ccusage";
|
|
869
|
-
var version = "18.0.
|
|
869
|
+
var version = "18.0.10";
|
|
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-
|
|
1
|
+
import { n as logger, t as log } from "./logger-TGVysPie.js";
|
|
2
2
|
export { log, logger };
|