ccusage 17.0.3 → 17.1.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/dist/{data-loader-Dbv2k_TI.js → data-loader-CHUXD7Vk.js} +1 -1
- package/dist/data-loader.js +2 -2
- package/dist/{debug-C1hjkdNa.js → debug-Dox3TQDk.js} +2 -2
- package/dist/debug.js +3 -3
- package/dist/index.js +6 -4
- package/dist/{logger-hUJNmrKY.js → logger-6H0qYq6F.js} +1 -1
- package/dist/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { activityDateSchema, array, boolean, createBucket, createDailyDate, createMonthlyDate, createProjectPath, createSessionId, createWeeklyDate, dailyDateSchema, getTotalTokens, isoTimestampSchema, messageIdSchema, modelNameSchema, monthlyDateSchema, number, object, optional, parse as parse$2, projectPathSchema, requestIdSchema, safeParse, sessionIdSchema, string, union, versionSchema, weeklyDateSchema } from "./_types-CV6z8-9_.js";
|
|
2
|
-
import { logger } from "./logger-
|
|
2
|
+
import { logger } from "./logger-6H0qYq6F.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import a, { readFile, stat } from "node:fs/promises";
|
|
5
5
|
import path, { basename, dirname, normalize, posix, relative, resolve, sep } from "node:path";
|
package/dist/data-loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { 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 } from "./data-loader-
|
|
1
|
+
import { 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 } from "./data-loader-CHUXD7Vk.js";
|
|
2
2
|
import "./_types-CV6z8-9_.js";
|
|
3
|
-
import "./logger-
|
|
3
|
+
import "./logger-6H0qYq6F.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 { CLAUDE_PROJECTS_DIR_NAME, DEBUG_MATCH_THRESHOLD_PERCENT, PricingFetcher, USAGE_DATA_GLOB_PATTERN, _usingCtx, getClaudePaths, glob, isFailure, try_, unwrap, usageDataSchema } from "./data-loader-
|
|
1
|
+
import { CLAUDE_PROJECTS_DIR_NAME, DEBUG_MATCH_THRESHOLD_PERCENT, PricingFetcher, USAGE_DATA_GLOB_PATTERN, _usingCtx, getClaudePaths, glob, isFailure, try_, unwrap, usageDataSchema } from "./data-loader-CHUXD7Vk.js";
|
|
2
2
|
import { safeParse } from "./_types-CV6z8-9_.js";
|
|
3
|
-
import { logger } from "./logger-
|
|
3
|
+
import { logger } from "./logger-6H0qYq6F.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-
|
|
1
|
+
import "./data-loader-CHUXD7Vk.js";
|
|
2
2
|
import "./_types-CV6z8-9_.js";
|
|
3
|
-
import "./logger-
|
|
4
|
-
import { detectMismatches, printMismatchReport } from "./debug-
|
|
3
|
+
import "./logger-6H0qYq6F.js";
|
|
4
|
+
import { detectMismatches, printMismatchReport } from "./debug-Dox3TQDk.js";
|
|
5
5
|
export { detectMismatches, printMismatchReport };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { BLOCKS_COMPACT_WIDTH_THRESHOLD, BLOCKS_DEFAULT_TERMINAL_WIDTH, BLOCKS_WARNING_THRESHOLD, BURN_RATE_THRESHOLDS, CONFIG_FILE_NAME, DEFAULT_CONTEXT_USAGE_THRESHOLDS, DEFAULT_LOCALE, DEFAULT_RECENT_DAYS, DEFAULT_REFRESH_INTERVAL_SECONDS, DEFAULT_SESSION_DURATION_HOURS, MAX_REFRESH_INTERVAL_SECONDS, MIN_REFRESH_INTERVAL_SECONDS, MIN_RENDER_INTERVAL_MS, PricingFetcher, WEEK_DAYS, __commonJSMin, __require, __toESM, _usingCtx, andThen, calculateBurnRate, calculateContextTokens, calculateCostForEntry, createUniqueHash, fail, filterRecentBlocks, formatDateCompact, getClaudePaths, getEarliestTimestamp, getFileModifiedTime, getUsageLimitResetTime, globUsageFiles, identifySessionBlocks, inspect, inspectError, isFailure, isSuccess, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, loadSessionUsageById, loadWeeklyUsageData, map as map$2, pipe, projectBlockUsage, sortFilesByTimestamp, succeed, toArray, try_, uniq, unreachable, unwrap, usageDataSchema } from "./data-loader-
|
|
2
|
+
import { BLOCKS_COMPACT_WIDTH_THRESHOLD, BLOCKS_DEFAULT_TERMINAL_WIDTH, BLOCKS_WARNING_THRESHOLD, BURN_RATE_THRESHOLDS, CONFIG_FILE_NAME, DEFAULT_CONTEXT_USAGE_THRESHOLDS, DEFAULT_LOCALE, DEFAULT_RECENT_DAYS, DEFAULT_REFRESH_INTERVAL_SECONDS, DEFAULT_SESSION_DURATION_HOURS, MAX_REFRESH_INTERVAL_SECONDS, MIN_REFRESH_INTERVAL_SECONDS, MIN_RENDER_INTERVAL_MS, PricingFetcher, WEEK_DAYS, __commonJSMin, __require, __toESM, _usingCtx, andThen, calculateBurnRate, calculateContextTokens, calculateCostForEntry, createUniqueHash, fail, filterRecentBlocks, formatDateCompact, getClaudePaths, getEarliestTimestamp, getFileModifiedTime, getUsageLimitResetTime, globUsageFiles, identifySessionBlocks, inspect, inspectError, isFailure, isSuccess, loadDailyUsageData, loadMonthlyUsageData, loadSessionBlockData, loadSessionData, loadSessionUsageById, loadWeeklyUsageData, map as map$2, pipe, projectBlockUsage, sortFilesByTimestamp, succeed, toArray, try_, uniq, unreachable, unwrap, usageDataSchema } from "./data-loader-CHUXD7Vk.js";
|
|
3
3
|
import { CostModes, SortOrders, check, filterDateSchema, flatten, getTotalTokens, integer as integer$1, maxValue, minValue, number, parse as parse$1, pipe as pipe$1, safeParse, statuslineHookJsonSchema, string, transform, trim, union } from "./_types-CV6z8-9_.js";
|
|
4
4
|
import { calculateTotals, createTotalsObject } from "./calculate-cost-CX9KwEZt.js";
|
|
5
|
-
import { description, log, logger, name, version } from "./logger-
|
|
6
|
-
import { detectMismatches, printMismatchReport } from "./debug-
|
|
5
|
+
import { description, log, logger, name, version } from "./logger-6H0qYq6F.js";
|
|
6
|
+
import { detectMismatches, printMismatchReport } from "./debug-Dox3TQDk.js";
|
|
7
7
|
import a, { readFile, stat } from "node:fs/promises";
|
|
8
8
|
import path, { join } from "node:path";
|
|
9
9
|
import process$1 from "node:process";
|
|
@@ -2665,7 +2665,7 @@ function formatCurrency(amount) {
|
|
|
2665
2665
|
return `$${amount.toFixed(2)}`;
|
|
2666
2666
|
}
|
|
2667
2667
|
function formatModelName(modelName) {
|
|
2668
|
-
const match = modelName.match(/claude-(\w+)-(\d+)
|
|
2668
|
+
const match = modelName.match(/claude-(\w+)-([\d-]+)-(\d{8})/);
|
|
2669
2669
|
if (match != null) return `${match[1]}-${match[2]}`;
|
|
2670
2670
|
return modelName;
|
|
2671
2671
|
}
|
|
@@ -3837,6 +3837,8 @@ function renderLiveDisplay(terminal, block, config) {
|
|
|
3837
3837
|
const detailsAvailableWidth = boxWidth - 3 - detailsIndent;
|
|
3838
3838
|
terminal.write(`${marginStr}┌${"─".repeat(boxWidth - 2)}┐\n`);
|
|
3839
3839
|
terminal.write(`${marginStr}│${import_picocolors$4.default.bold(centerText("CLAUDE CODE - LIVE TOKEN USAGE MONITOR", boxWidth - 2))}│\n`);
|
|
3840
|
+
terminal.write(`${marginStr}│${import_picocolors$4.default.yellow(centerText("⚠️ DEPRECATED - Will be removed in next major version", boxWidth - 2))}│\n`);
|
|
3841
|
+
terminal.write(`${marginStr}│${import_picocolors$4.default.gray(centerText("Use https://claude.ai/settings/usage instead", boxWidth - 2))}│\n`);
|
|
3840
3842
|
terminal.write(`${marginStr}├${"─".repeat(boxWidth - 2)}┤\n`);
|
|
3841
3843
|
terminal.write(`${marginStr}│${" ".repeat(boxWidth - 2)}│\n`);
|
|
3842
3844
|
const sessionLabel = `${drawEmoji("⏱️")}${import_picocolors$4.default.bold(" SESSION")}`;
|
|
@@ -869,7 +869,7 @@ function createLogger(name$1) {
|
|
|
869
869
|
}
|
|
870
870
|
const log = console.log;
|
|
871
871
|
var name = "ccusage";
|
|
872
|
-
var version = "17.
|
|
872
|
+
var version = "17.1.1";
|
|
873
873
|
var description = "Usage analysis tool for Claude Code";
|
|
874
874
|
const logger = createLogger(name);
|
|
875
875
|
const log$1 = log;
|
package/dist/logger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { log, logger } from "./logger-
|
|
1
|
+
import { log, logger } from "./logger-6H0qYq6F.js";
|
|
2
2
|
export { log, logger };
|