Commit c665dcc
fix(build): resolve TS2589 in server.ts and axios header type drift
package-lock.json is gitignored, so CI's fresh npm install resolves newer
zod/axios than long-lived local node_modules and surfaced two type errors
(same pair as upstream InstaWP#22, fix adapted to keep the tool
description argument):
- server.tool's generic resolves ShapeOutput<Args> against the SDK's z3|z4
union schema type, exploding instantiation depth (TS2589); call through
an explicitly-typed cast.
- axios headers['content-type'] is AxiosHeaderValue (can be null/number);
narrow to string before normalizeMimeType.
Verified with tsc --noEmit against both a fresh npm install and the
existing local node_modules, plus a stdio protocol probe (164-byte
initialize, 43/43 tool descriptions intact).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 076540b commit c665dcc
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| |||
0 commit comments