cursor-usage 0.1.0 → 0.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/cli.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * CLI command routing and argument handling
3
3
  */
4
- import { getCursorCredentials, fetchUsageData } from './data-loader';
5
- import { showDailyReport, showMonthlyReport, showWeeklyReport, showDateReport, } from './commands';
6
- import { logger } from './logger';
7
- import { parseArgs, getNumberFlag, getDateFlag, getBoolFlag, } from './args-parser';
4
+ import { getCursorCredentials, fetchUsageData } from './data-loader.js';
5
+ import { showDailyReport, showMonthlyReport, showWeeklyReport, showDateReport, } from './commands.js';
6
+ import { logger } from './logger.js';
7
+ import { parseArgs, getNumberFlag, getDateFlag, getBoolFlag, } from './args-parser.js';
8
8
  export async function runCLI(argv) {
9
9
  const parsed = parseArgs(argv);
10
10
  const { command, params, flags } = parsed;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * CLI command handlers
3
3
  */
4
- import type { CursorCredentials } from './_types';
4
+ import type { CursorCredentials } from './_types.js';
5
5
  /**
6
6
  * Convert stats to JSON
7
7
  */
package/dist/commands.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * CLI command handlers
3
3
  */
4
- import { fetchUsageEvents, groupByDay, calculateDailyStats, groupByMonth, calculateMonthlyStats, formatMonthlyStatsTable, groupByWeek, calculateWeeklyStats, formatWeeklyStatsTable, calculateModelBreakdown, formatModelBreakdownTable, } from './event-loader';
5
- import { createTable } from './table-formatter';
6
- import { logger } from './logger';
4
+ import { fetchUsageEvents, groupByDay, calculateDailyStats, groupByMonth, calculateMonthlyStats, formatMonthlyStatsTable, groupByWeek, calculateWeeklyStats, formatWeeklyStatsTable, calculateModelBreakdown, formatModelBreakdownTable, } from './event-loader.js';
5
+ import { createTable } from './table-formatter.js';
6
+ import { logger } from './logger.js';
7
7
  /**
8
8
  * Convert stats to JSON
9
9
  */
@@ -2,7 +2,7 @@
2
2
  * Data loading utilities for Cursor usage analysis
3
3
  * Extracts credentials from local database and fetches usage data from API
4
4
  */
5
- import type { CursorCredentials, UsageSummary } from './_types';
5
+ import type { CursorCredentials, UsageSummary } from './_types.js';
6
6
  /**
7
7
  * Extract Cursor credentials from local database
8
8
  */
@@ -3,8 +3,8 @@
3
3
  * Extracts credentials from local database and fetches usage data from API
4
4
  */
5
5
  import { readFileSync } from 'node:fs';
6
- import { CURSOR_API_URL, CURSOR_DB_PATH, DB_KEY_ACCESS_TOKEN, DB_KEY_EMAIL, DB_KEY_MEMBERSHIP, DB_KEY_STATSIG_BOOTSTRAP, DEFAULT_TIMEOUT, USER_AGENT, } from './_consts';
7
- import { logger } from './logger';
6
+ import { CURSOR_API_URL, CURSOR_DB_PATH, DB_KEY_ACCESS_TOKEN, DB_KEY_EMAIL, DB_KEY_MEMBERSHIP, DB_KEY_STATSIG_BOOTSTRAP, DEFAULT_TIMEOUT, USER_AGENT, } from './_consts.js';
7
+ import { logger } from './logger.js';
8
8
  import initSqlJs from 'sql.js';
9
9
  let sqlJs = null;
10
10
  /**
@@ -2,7 +2,7 @@
2
2
  * Event loading utilities for detailed usage analysis
3
3
  * Fetches granular usage events for building daily/weekly reports
4
4
  */
5
- import type { CursorCredentials } from './_types';
5
+ import type { CursorCredentials } from './_types.js';
6
6
  export interface UsageEvent {
7
7
  id: string;
8
8
  timestamp: number;
@@ -2,8 +2,8 @@
2
2
  * Event loading utilities for detailed usage analysis
3
3
  * Fetches granular usage events for building daily/weekly reports
4
4
  */
5
- import { CURSOR_API_URL_EVENTS, DEFAULT_TIMEOUT, USER_AGENT, } from './_consts';
6
- import { logger } from './logger';
5
+ import { CURSOR_API_URL_EVENTS, DEFAULT_TIMEOUT, USER_AGENT, } from './_consts.js';
6
+ import { logger } from './logger.js';
7
7
  /**
8
8
  * Fetch usage events for a date range
9
9
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cursor-usage",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "description": "CLI tool for analyzing Cursor usage and token consumption",
6
6
  "author": "yifen <anthonyeef@gmail.com>",
7
7
  "license": "MIT",