ccusage 14.1.1 → 14.1.2
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/{data-loader-Cfgw5huk.js → data-loader-BFS_JSqd.js} +2 -2
- package/dist/data-loader.js +3 -3
- package/dist/{debug-CM0KZJQf.js → debug-DIfzQVQt.js} +3 -3
- package/dist/debug.js +4 -4
- package/dist/index.js +8 -12
- package/dist/{logger-Bn_f0htg.js → logger-CIYlc309.js} +1 -1
- package/dist/logger.js +1 -1
- package/dist/{mcp-hY4UqfJ-.js → mcp-BI0xh4oM.js} +3 -3
- package/dist/mcp.js +4 -4
- package/dist/{pricing-fetcher-BqZed0a8.js → pricing-fetcher-XdvIG0to.js} +1 -1
- package/dist/pricing-fetcher.js +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CLAUDE_CONFIG_DIR_ENV, CLAUDE_PROJECTS_DIR_NAME, DEFAULT_CLAUDE_CODE_PATH, DEFAULT_CLAUDE_CONFIG_PATH, DEFAULT_RECENT_DAYS, PricingFetcher, USAGE_DATA_GLOB_PATTERN, USER_HOME_DIR, __commonJSMin, __require, __toESM, require_usingCtx } from "./pricing-fetcher-
|
|
1
|
+
import { CLAUDE_CONFIG_DIR_ENV, CLAUDE_PROJECTS_DIR_NAME, DEFAULT_CLAUDE_CODE_PATH, DEFAULT_CLAUDE_CONFIG_PATH, DEFAULT_RECENT_DAYS, PricingFetcher, USAGE_DATA_GLOB_PATTERN, USER_HOME_DIR, __commonJSMin, __require, __toESM, require_usingCtx } from "./pricing-fetcher-XdvIG0to.js";
|
|
2
2
|
import { activityDateSchema, arrayType, createDailyDate, createMonthlyDate, createProjectPath, createSessionId, dailyDateSchema, isoTimestampSchema, messageIdSchema, modelNameSchema, monthlyDateSchema, numberType, objectType, projectPathSchema, requestIdSchema, sessionIdSchema, versionSchema } from "./_types-Cr2YEzKm.js";
|
|
3
|
-
import { logger } from "./logger-
|
|
3
|
+
import { logger } from "./logger-CIYlc309.js";
|
|
4
4
|
import a, { readFile } from "node:fs/promises";
|
|
5
5
|
import F, { homedir } from "node:os";
|
|
6
6
|
import path, { posix } from "node:path";
|
package/dist/data-loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./pricing-fetcher-
|
|
1
|
+
import "./pricing-fetcher-XdvIG0to.js";
|
|
2
2
|
import "./_types-Cr2YEzKm.js";
|
|
3
|
-
import { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getClaudePaths, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema } from "./data-loader-
|
|
4
|
-
import "./logger-
|
|
3
|
+
import { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getClaudePaths, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema } from "./data-loader-BFS_JSqd.js";
|
|
4
|
+
import "./logger-CIYlc309.js";
|
|
5
5
|
export { calculateCostForEntry, createUniqueHash, dailyUsageSchema, formatDate, formatDateCompact, getClaudePaths, getDefaultClaudePath, getEarliestTimestamp, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, modelBreakdownSchema, monthlyUsageSchema, sessionUsageSchema, sortFilesByTimestamp, usageDataSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CLAUDE_PROJECTS_DIR_NAME, DEBUG_MATCH_THRESHOLD_PERCENT, PricingFetcher, USAGE_DATA_GLOB_PATTERN, __toESM, require_usingCtx } from "./pricing-fetcher-
|
|
2
|
-
import { getDefaultClaudePath, glob, usageDataSchema } from "./data-loader-
|
|
3
|
-
import { logger } from "./logger-
|
|
1
|
+
import { CLAUDE_PROJECTS_DIR_NAME, DEBUG_MATCH_THRESHOLD_PERCENT, PricingFetcher, USAGE_DATA_GLOB_PATTERN, __toESM, require_usingCtx } from "./pricing-fetcher-XdvIG0to.js";
|
|
2
|
+
import { getDefaultClaudePath, glob, usageDataSchema } from "./data-loader-BFS_JSqd.js";
|
|
3
|
+
import { logger } from "./logger-CIYlc309.js";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
var import_usingCtx = __toESM(require_usingCtx(), 1);
|
package/dist/debug.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./pricing-fetcher-
|
|
1
|
+
import "./pricing-fetcher-XdvIG0to.js";
|
|
2
2
|
import "./_types-Cr2YEzKm.js";
|
|
3
|
-
import "./data-loader-
|
|
4
|
-
import "./logger-
|
|
5
|
-
import { detectMismatches, printMismatchReport } from "./debug-
|
|
3
|
+
import "./data-loader-BFS_JSqd.js";
|
|
4
|
+
import "./logger-CIYlc309.js";
|
|
5
|
+
import { detectMismatches, printMismatchReport } from "./debug-DIfzQVQt.js";
|
|
6
6
|
export { detectMismatches, printMismatchReport };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { BLOCKS_COMPACT_WIDTH_THRESHOLD, BLOCKS_DEFAULT_TERMINAL_WIDTH, BLOCKS_WARNING_THRESHOLD, DEFAULT_RECENT_DAYS, MCP_DEFAULT_PORT, __commonJSMin, __require, __toESM } from "./pricing-fetcher-
|
|
2
|
+
import { BLOCKS_COMPACT_WIDTH_THRESHOLD, BLOCKS_DEFAULT_TERMINAL_WIDTH, BLOCKS_WARNING_THRESHOLD, DEFAULT_RECENT_DAYS, MCP_DEFAULT_PORT, __commonJSMin, __require, __toESM } from "./pricing-fetcher-XdvIG0to.js";
|
|
3
3
|
import { CostModes, SortOrders, dateSchema } from "./_types-Cr2YEzKm.js";
|
|
4
4
|
import { calculateTotals, createTotalsObject, getTotalTokens } from "./calculate-cost-CoS7we68.js";
|
|
5
|
-
import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage, uniq } from "./data-loader-
|
|
6
|
-
import { description, log, logger, name, version } from "./logger-
|
|
7
|
-
import { detectMismatches, printMismatchReport } from "./debug-
|
|
8
|
-
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-
|
|
5
|
+
import { DEFAULT_SESSION_DURATION_HOURS, calculateBurnRate, filterRecentBlocks, formatDateCompact, getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, projectBlockUsage, uniq } from "./data-loader-BFS_JSqd.js";
|
|
6
|
+
import { description, log, logger, name, version } from "./logger-CIYlc309.js";
|
|
7
|
+
import { detectMismatches, printMismatchReport } from "./debug-DIfzQVQt.js";
|
|
8
|
+
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-BI0xh4oM.js";
|
|
9
9
|
import process$1 from "node:process";
|
|
10
10
|
import { createServer } from "node:http";
|
|
11
11
|
import { Http2ServerRequest } from "node:http2";
|
|
@@ -3260,7 +3260,6 @@ const blocksCommand = define({
|
|
|
3260
3260
|
let blocks = await loadSessionBlockData({
|
|
3261
3261
|
since: ctx.values.since,
|
|
3262
3262
|
until: ctx.values.until,
|
|
3263
|
-
claudePath: getDefaultClaudePath(),
|
|
3264
3263
|
mode: ctx.values.mode,
|
|
3265
3264
|
order: ctx.values.order,
|
|
3266
3265
|
offline: ctx.values.offline,
|
|
@@ -3474,7 +3473,6 @@ const dailyCommand = define({
|
|
|
3474
3473
|
const dailyData = await loadDailyUsageData({
|
|
3475
3474
|
since: ctx.values.since,
|
|
3476
3475
|
until: ctx.values.until,
|
|
3477
|
-
claudePath: getDefaultClaudePath(),
|
|
3478
3476
|
mode: ctx.values.mode,
|
|
3479
3477
|
order: ctx.values.order,
|
|
3480
3478
|
offline: ctx.values.offline
|
|
@@ -3486,7 +3484,7 @@ const dailyCommand = define({
|
|
|
3486
3484
|
}
|
|
3487
3485
|
const totals = calculateTotals(dailyData);
|
|
3488
3486
|
if (ctx.values.debug && !ctx.values.json) {
|
|
3489
|
-
const mismatchStats = await detectMismatches(
|
|
3487
|
+
const mismatchStats = await detectMismatches(void 0);
|
|
3490
3488
|
printMismatchReport(mismatchStats, ctx.values.debugSamples);
|
|
3491
3489
|
}
|
|
3492
3490
|
if (ctx.values.json) {
|
|
@@ -4004,7 +4002,6 @@ const monthlyCommand = define({
|
|
|
4004
4002
|
const monthlyData = await loadMonthlyUsageData({
|
|
4005
4003
|
since: ctx.values.since,
|
|
4006
4004
|
until: ctx.values.until,
|
|
4007
|
-
claudePath: getDefaultClaudePath(),
|
|
4008
4005
|
mode: ctx.values.mode,
|
|
4009
4006
|
order: ctx.values.order,
|
|
4010
4007
|
offline: ctx.values.offline
|
|
@@ -4028,7 +4025,7 @@ const monthlyCommand = define({
|
|
|
4028
4025
|
}
|
|
4029
4026
|
const totals = calculateTotals(monthlyData);
|
|
4030
4027
|
if (ctx.values.debug && !ctx.values.json) {
|
|
4031
|
-
const mismatchStats = await detectMismatches(
|
|
4028
|
+
const mismatchStats = await detectMismatches(void 0);
|
|
4032
4029
|
printMismatchReport(mismatchStats, ctx.values.debugSamples);
|
|
4033
4030
|
}
|
|
4034
4031
|
if (ctx.values.json) {
|
|
@@ -4139,7 +4136,6 @@ const sessionCommand = define({
|
|
|
4139
4136
|
const sessionData = await loadSessionData({
|
|
4140
4137
|
since: ctx.values.since,
|
|
4141
4138
|
until: ctx.values.until,
|
|
4142
|
-
claudePath: getDefaultClaudePath(),
|
|
4143
4139
|
mode: ctx.values.mode,
|
|
4144
4140
|
order: ctx.values.order,
|
|
4145
4141
|
offline: ctx.values.offline
|
|
@@ -4151,7 +4147,7 @@ const sessionCommand = define({
|
|
|
4151
4147
|
}
|
|
4152
4148
|
const totals = calculateTotals(sessionData);
|
|
4153
4149
|
if (ctx.values.debug && !ctx.values.json) {
|
|
4154
|
-
const mismatchStats = await detectMismatches(
|
|
4150
|
+
const mismatchStats = await detectMismatches(void 0);
|
|
4155
4151
|
printMismatchReport(mismatchStats, ctx.values.debugSamples);
|
|
4156
4152
|
}
|
|
4157
4153
|
if (ctx.values.json) {
|
|
@@ -951,7 +951,7 @@ function _getDefaultLogLevel() {
|
|
|
951
951
|
}
|
|
952
952
|
const consola = createConsola$1();
|
|
953
953
|
var name = "ccusage";
|
|
954
|
-
var version = "14.1.
|
|
954
|
+
var version = "14.1.2";
|
|
955
955
|
var description = "Usage analysis tool for Claude Code";
|
|
956
956
|
/**
|
|
957
957
|
* Application logger instance with package name tag
|
package/dist/logger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { log, logger } from "./logger-
|
|
1
|
+
import { log, logger } from "./logger-CIYlc309.js";
|
|
2
2
|
export { log, logger };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJSMin, __toESM, require_usingCtx } from "./pricing-fetcher-
|
|
1
|
+
import { __commonJSMin, __toESM, require_usingCtx } from "./pricing-fetcher-XdvIG0to.js";
|
|
2
2
|
import { ZodFirstPartyTypeKind, ZodOptional, ZodType, arrayType, booleanType, dateSchema, discriminatedUnionType, enumType, literalType, numberType, objectType, optionalType, recordType, stringType, unionType, unknownType } from "./_types-Cr2YEzKm.js";
|
|
3
|
-
import { getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData } from "./data-loader-
|
|
4
|
-
import { name, version } from "./logger-
|
|
3
|
+
import { getDefaultClaudePath, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData } from "./data-loader-BFS_JSqd.js";
|
|
4
|
+
import { name, version } from "./logger-CIYlc309.js";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
const LATEST_PROTOCOL_VERSION = "2025-03-26";
|
|
7
7
|
const SUPPORTED_PROTOCOL_VERSIONS = [
|
package/dist/mcp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./pricing-fetcher-
|
|
1
|
+
import "./pricing-fetcher-XdvIG0to.js";
|
|
2
2
|
import "./_types-Cr2YEzKm.js";
|
|
3
|
-
import "./data-loader-
|
|
4
|
-
import "./logger-
|
|
5
|
-
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-
|
|
3
|
+
import "./data-loader-BFS_JSqd.js";
|
|
4
|
+
import "./logger-CIYlc309.js";
|
|
5
|
+
import { createMcpHttpApp, createMcpServer, startMcpServerStdio } from "./mcp-BI0xh4oM.js";
|
|
6
6
|
export { createMcpHttpApp, createMcpServer, startMcpServerStdio };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { modelPricingSchema } from "./_types-Cr2YEzKm.js";
|
|
2
|
-
import { logger } from "./logger-
|
|
2
|
+
import { logger } from "./logger-CIYlc309.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import F, { homedir } from "node:os";
|
|
5
5
|
import path from "node:path";
|
package/dist/pricing-fetcher.js
CHANGED