Skip to content

Commit 4c1c758

Browse files
committed
fix(types): align node typings and bookmark cost import
1 parent 753358d commit 4c1c758

6 files changed

Lines changed: 26 additions & 7 deletions

File tree

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,23 @@ curl -fsSL https://raw.githubusercontent.com/0xNyk/xint/main/install.sh | bash
3737
Optional pinned version:
3838

3939
```bash
40-
XINT_INSTALL_VERSION=2026.2.19.6 \
40+
XINT_INSTALL_VERSION=<version-tag> \
4141
curl -fsSL https://raw.githubusercontent.com/0xNyk/xint/main/install.sh | bash
4242
```
4343

44-
Homebrew (managed binary path via Rust build):
44+
Homebrew (lightweight prebuilt binary on Apple Silicon):
4545

4646
```bash
4747
brew tap 0xNyk/xint
4848
brew install xint
4949
```
5050

51+
Rust variant explicitly:
52+
53+
```bash
54+
brew install xint-rs
55+
```
56+
5157
Manual source install:
5258

5359
```bash

bun.lock

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export interface Tweet {
6767
}
6868

6969
interface RawResponse {
70-
data?: any[];
70+
data?: any;
7171
includes?: { users?: any[] };
7272
meta?: { next_token?: string; result_count?: number };
7373
errors?: any[];
@@ -77,7 +77,7 @@ interface RawResponse {
7777
}
7878

7979
export function parseTweets(raw: RawResponse): Tweet[] {
80-
if (!raw.data) return [];
80+
if (!Array.isArray(raw.data)) return [];
8181
const users: Record<string, any> = {};
8282
for (const u of raw.includes?.users || []) {
8383
users[u.id] = u;

lib/bookmarks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type { Tweet } from "./api";
1010
import { getValidToken, loadTokens } from "./oauth";
1111
import * as cache from "./cache";
1212
import * as fmt from "./format";
13+
import { trackCost } from "./costs";
1314

1415
const SKILL_DIR = join(import.meta.dir, "..");
1516
const DRAFTS_DIR = join(SKILL_DIR, "data", "exports");

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
"@modelcontextprotocol/sdk": "1.26.0"
5555
},
5656
"devDependencies": {
57-
"@changesets/cli": "^2.29.8"
57+
"@changesets/cli": "^2.29.8",
58+
"@types/node": "^25.3.0",
59+
"bun-types": "^1.3.9"
5860
}
5961
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"resolveJsonModule": true,
1111
"declaration": false,
1212
"noEmit": true,
13-
"types": ["bun-types"]
13+
"types": ["bun-types", "node"]
1414
},
1515
"include": ["**/*.ts"],
1616
"exclude": ["node_modules"]

0 commit comments

Comments
 (0)