token-rats 0.0.1 → 0.0.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/index.js +0 -15
- package/package.json +16 -7
package/dist/index.js
CHANGED
|
@@ -4223,8 +4223,6 @@ var ENDPOINTS = {
|
|
|
4223
4223
|
authCliPoll: "/v1/auth/cli/poll",
|
|
4224
4224
|
// Phase 2 Track G+H
|
|
4225
4225
|
meRooms: "/v1/me/rooms",
|
|
4226
|
-
// Referral tracking
|
|
4227
|
-
meReferrals: "/v1/me/referrals",
|
|
4228
4226
|
leaveRoom: (code) => `/v1/rooms/${code}/leave`,
|
|
4229
4227
|
renameRoom: (code) => `/v1/rooms/${code}`,
|
|
4230
4228
|
roomActivity: (code) => `/v1/rooms/${code}/activity`,
|
|
@@ -4307,19 +4305,6 @@ var LiveEvent = z.discriminatedUnion("kind", [
|
|
|
4307
4305
|
})
|
|
4308
4306
|
]);
|
|
4309
4307
|
|
|
4310
|
-
// ../contracts/src/referrals.ts
|
|
4311
|
-
var Referral = z.object({
|
|
4312
|
-
handle: z.string(),
|
|
4313
|
-
avatarUrl: z.string().url().nullable(),
|
|
4314
|
-
/** Unix ms when the referee created their account. */
|
|
4315
|
-
joinedAt: z.number().int().positive()
|
|
4316
|
-
});
|
|
4317
|
-
var GetReferralsResponse = z.object({
|
|
4318
|
-
count: z.number().int().nonnegative(),
|
|
4319
|
-
/** Most-recent first, up to 20. */
|
|
4320
|
-
recent: z.array(Referral)
|
|
4321
|
-
});
|
|
4322
|
-
|
|
4323
4308
|
// src/lib/api.ts
|
|
4324
4309
|
var DEFAULT_API_URL = "https://api.tokenrats.com";
|
|
4325
4310
|
function isTransient(status) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "token-rats",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Sync your Claude Code + Cursor token usage to your Token Rats leaderboard.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -8,16 +8,22 @@
|
|
|
8
8
|
"token-rats": "./dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"files": ["dist", "README.md"],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/hsalberti/token-rats.git",
|
|
14
|
+
"directory": "packages/cli"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://tokenrats.com",
|
|
17
|
+
"keywords": ["claude", "claude-code", "cursor", "tokens", "leaderboard", "ai-usage"],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
11
21
|
"scripts": {
|
|
12
22
|
"build": "tsc --noEmit -p tsconfig.json && node build.mjs",
|
|
13
23
|
"typecheck": "tsc --noEmit",
|
|
14
24
|
"dev": "tsx src/index.ts",
|
|
15
|
-
"test": "vitest run"
|
|
16
|
-
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"@token-rats/contracts": "workspace:*",
|
|
19
|
-
"@token-rats/parsers": "workspace:*",
|
|
20
|
-
"@token-rats/pricing": "workspace:*"
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"prepublishOnly": "node build.mjs"
|
|
21
27
|
},
|
|
22
28
|
"optionalDependencies": {
|
|
23
29
|
"better-sqlite3": "^9.4.3",
|
|
@@ -26,6 +32,9 @@
|
|
|
26
32
|
"open": "^10.1.0"
|
|
27
33
|
},
|
|
28
34
|
"devDependencies": {
|
|
35
|
+
"@token-rats/contracts": "workspace:*",
|
|
36
|
+
"@token-rats/parsers": "workspace:*",
|
|
37
|
+
"@token-rats/pricing": "workspace:*",
|
|
29
38
|
"@types/better-sqlite3": "^7.6.12",
|
|
30
39
|
"@types/node": "22.10.2",
|
|
31
40
|
"esbuild": "^0.24.2",
|