Dev tooling tweaks

This commit is contained in:
Glen Maddern 2025-07-04 14:45:30 +10:00
commit 448e633eef
11 changed files with 186 additions and 30 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ dist
.aider*
**/.claude/settings.local.json
/public

View file

@ -1,12 +1,17 @@
# use-mcp Project Guidelines
## Build, Lint, and Test Commands
- `pnpm dev`: Run development build with watch mode
- `pnpm dev`: Run development build with watch mode and start all examples/servers
- Chat UI: http://localhost:5002
- Inspector: http://localhost:5001
- Hono MCP Server: http://localhost:5101
- CF Agents MCP Server: http://localhost:5102
- `pnpm build`: Build the project
- `pnpm check`: Run prettier checks and TypeScript type checking
### Integration Tests (in /test directory)
- `cd test && pnpm test`: Run integration tests with visible browser
- `cd test && pnpm test`: Run integration tests headlessly (default)
- `cd test && pnpm test:headed`: Run integration tests with visible browser
- `cd test && pnpm test:headless`: Run integration tests headlessly
- `cd test && pnpm test:watch`: Run integration tests in watch mode
- `cd test && pnpm test:ui`: Run integration tests with interactive UI

View file

@ -8,7 +8,7 @@
A lightweight React hook for connecting to [Model Context Protocol (MCP)](https://github.com/modelcontextprotocol) servers. Simplifies authentication and tool calling for AI systems implementing the MCP standard.
Try it out: [MCP Inspector](https://inspector.use-mcp.dev) | [Cloudflare Workers AI Playground](https://playground.ai.cloudflare.com/)
Try it out: [Chat Demo](https://chat.use-mcp.dev) | [MCP Inspector](https://inspector.use-mcp.dev) | [Cloudflare Workers AI Playground](https://playground.ai.cloudflare.com/)
## Installation
@ -20,6 +20,31 @@ pnpm add use-mcp
yarn add use-mcp
```
## Development
To run the development environment with all examples and servers:
```bash
pnpm dev
```
This starts:
- **Inspector**: http://localhost:5001 - MCP server debugging tool
- **Chat UI**: http://localhost:5002 - Example chat interface
- **Hono MCP Server**: http://localhost:5101 - Example MCP server
- **CF Agents MCP Server**: http://localhost:5102 - Cloudflare Workers AI MCP server
### Testing
Integration tests are located in the `test/` directory and run headlessly by default:
```bash
cd test && pnpm test # Run tests headlessly (default)
cd test && pnpm test:headed # Run tests with visible browser
cd test && pnpm test:watch # Run tests in watch mode
cd test && pnpm test:ui # Run tests with interactive UI
```
## Features
- 🔄 Automatic connection management with reconnection and retries

View file

@ -4,7 +4,7 @@
"private": true,
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
"dev": "wrangler dev --port 5102",
"format": "biome format --write",
"lint:fix": "biome lint --fix",
"start": "wrangler dev",
@ -22,6 +22,6 @@
"agents": "^0.0.100",
"hono": "^4.8.3",
"typescript": "^5.8.3",
"wrangler": "^4.22.0"
"wrangler": "^4.23.0"
}
}

View file

@ -34,8 +34,8 @@ importers:
specifier: ^5.8.3
version: 5.8.3
wrangler:
specifier: ^4.22.0
version: 4.22.0(@cloudflare/workers-types@4.20250628.0)
specifier: ^4.23.0
version: 4.23.0(@cloudflare/workers-types@4.20250628.0)
packages:
@ -765,8 +765,8 @@ packages:
engines: {node: '>=10.0.0'}
hasBin: true
miniflare@4.20250617.4:
resolution: {integrity: sha512-IAoApFKxOJlaaFkym5ETstVX3qWzVt3xyqCDj6vSSTgEH3zxZJ5417jZGg8iQfMHosKCcQH1doPPqqnOZm/yrw==}
miniflare@4.20250617.5:
resolution: {integrity: sha512-Qqn30jR6dCjXaKVizT6vH4KOb+GyLccoxLNOJEfu63yBPn8eoXa7PrdiSGTmjs2RY8/tr7eTO8Wu/Yr14k0xVA==}
engines: {node: '>=18.0.0'}
hasBin: true
@ -1009,8 +1009,8 @@ packages:
engines: {node: '>=16'}
hasBin: true
wrangler@4.22.0:
resolution: {integrity: sha512-m8qVO3YxhUTII+4U889G/f5UuLSvMkUkCNatupV2f/SJ+iqaWtP1QbuQII8bs2J/O4rqxsz46Wu2S50u7tKB5Q==}
wrangler@4.23.0:
resolution: {integrity: sha512-JSeDt3IwA4TEmg/V3tRblImPjdxynBt9PUVO/acQJ83XGlMMSwswDKL1FuwvbFzgX6+JXc3GMHeu7r8AQIxw9w==}
engines: {node: '>=18.0.0'}
hasBin: true
peerDependencies:
@ -1673,7 +1673,7 @@ snapshots:
mime@3.0.0: {}
miniflare@4.20250617.4:
miniflare@4.20250617.5:
dependencies:
'@cspotcode/source-map-support': 0.8.1
acorn: 8.14.0
@ -1943,13 +1943,13 @@ snapshots:
'@cloudflare/workerd-linux-arm64': 1.20250617.0
'@cloudflare/workerd-windows-64': 1.20250617.0
wrangler@4.22.0(@cloudflare/workers-types@4.20250628.0):
wrangler@4.23.0(@cloudflare/workers-types@4.20250628.0):
dependencies:
'@cloudflare/kv-asset-handler': 0.4.0
'@cloudflare/unenv-preset': 2.3.3(unenv@2.0.0-rc.17)(workerd@1.20250617.0)
blake3-wasm: 2.1.5
esbuild: 0.25.4
miniflare: 4.20250617.4
miniflare: 4.20250617.5
path-to-regexp: 6.3.0
unenv: 2.0.0-rc.17
workerd: 1.20250617.0

View file

@ -1,7 +1,7 @@
{
"name": "vengabus",
"scripts": {
"dev": "wrangler dev",
"dev": "wrangler dev --port 5101",
"deploy": "wrangler deploy --minify",
"cf-typegen": "wrangler types --env-interface CloudflareBindings"
},
@ -11,7 +11,7 @@
"devDependencies": {
"@hono/mcp": "^0.1.0",
"@modelcontextprotocol/sdk": "^1.13.3",
"wrangler": "^4.21.0",
"wrangler": "^4.23.0",
"zod": "^3.25.67"
}
}

View file

@ -19,8 +19,8 @@ importers:
specifier: ^1.13.3
version: 1.13.3
wrangler:
specifier: ^4.21.0
version: 4.21.0
specifier: ^4.23.0
version: 4.23.0
zod:
specifier: ^3.25.67
version: 3.25.67
@ -623,8 +623,8 @@ packages:
engines: {node: '>=10.0.0'}
hasBin: true
miniflare@4.20250617.3:
resolution: {integrity: sha512-j+LZycT11UdlVeNdaqD0XdNnYnqAL+wXmboz+tNPFgTq6zhD489Ujj3BfSDyEHDCA9UFBLbkc5ByGWBh+pYZ5Q==}
miniflare@4.20250617.5:
resolution: {integrity: sha512-Qqn30jR6dCjXaKVizT6vH4KOb+GyLccoxLNOJEfu63yBPn8eoXa7PrdiSGTmjs2RY8/tr7eTO8Wu/Yr14k0xVA==}
engines: {node: '>=18.0.0'}
hasBin: true
@ -820,8 +820,8 @@ packages:
engines: {node: '>=16'}
hasBin: true
wrangler@4.21.0:
resolution: {integrity: sha512-37xm0CG2qMvsJUNZYQKje6HbCsJFYuE8dQSnu7981iDRT4DLrEIL1DAUnZJG9HiXteKPvrSj96AkZyomi5sYHw==}
wrangler@4.23.0:
resolution: {integrity: sha512-JSeDt3IwA4TEmg/V3tRblImPjdxynBt9PUVO/acQJ83XGlMMSwswDKL1FuwvbFzgX6+JXc3GMHeu7r8AQIxw9w==}
engines: {node: '>=18.0.0'}
hasBin: true
peerDependencies:
@ -1368,7 +1368,7 @@ snapshots:
mime@3.0.0: {}
miniflare@4.20250617.3:
miniflare@4.20250617.5:
dependencies:
'@cspotcode/source-map-support': 0.8.1
acorn: 8.14.0
@ -1605,13 +1605,13 @@ snapshots:
'@cloudflare/workerd-linux-arm64': 1.20250617.0
'@cloudflare/workerd-windows-64': 1.20250617.0
wrangler@4.21.0:
wrangler@4.23.0:
dependencies:
'@cloudflare/kv-asset-handler': 0.4.0
'@cloudflare/unenv-preset': 2.3.3(unenv@2.0.0-rc.17)(workerd@1.20250617.0)
blake3-wasm: 2.1.5
esbuild: 0.25.4
miniflare: 4.20250617.3
miniflare: 4.20250617.5
path-to-regexp: 6.3.0
unenv: 2.0.0-rc.17
workerd: 1.20250617.0

View file

@ -21,7 +21,10 @@
}
},
"scripts": {
"dev": "tsup --watch",
"install:all": "concurrently 'pnpm install' 'cd examples/chat-ui && pnpm install' 'cd examples/inspector && pnpm install' 'cd examples/servers/hono-mcp && pnpm install' 'cd examples/servers/cf-agents && pnpm install'",
"dev": "concurrently 'pnpm:build:watch' 'cd examples/chat-ui && pnpm dev' 'cd examples/inspector && pnpm dev' 'sleep 1 && cd examples/servers/hono-mcp && pnpm dev' 'sleep 2 && cd examples/servers/cf-agents && pnpm dev'",
"deploy:all": "concurrently 'pnpm build:site && pnpm deploy:site' 'cd examples/chat-ui && pnpm run deploy' 'cd examples/inspector && pnpm run deploy'",
"build:watch": "tsup --watch",
"build": "tsup",
"check": "prettier --check . && tsc",
"prettier:fix": "prettier --write .",
@ -37,6 +40,7 @@
"devDependencies": {
"@axodotdev/oranda": "^0.6.5",
"@types/react": "^19.0.12",
"concurrently": "^9.2.0",
"husky": "^9.1.7",
"prettier": "^3.5.3",
"react": "^19.0.0",

124
pnpm-lock.yaml generated
View file

@ -21,6 +21,9 @@ importers:
'@types/react':
specifier: ^19.0.12
version: 19.0.12
concurrently:
specifier: ^9.2.0
version: 9.2.0
husky:
specifier: ^9.1.7
version: 9.1.7
@ -729,6 +732,10 @@ packages:
resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==}
engines: {node: '>= 0.4'}
chalk@4.1.2:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
chokidar@4.0.3:
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
engines: {node: '>= 14.16.0'}
@ -737,6 +744,10 @@ packages:
resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==}
engines: {node: '>=18'}
cliui@8.0.1:
resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
engines: {node: '>=12'}
clone@1.0.4:
resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==}
engines: {node: '>=0.8'}
@ -763,6 +774,11 @@ packages:
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
engines: {node: '>= 6'}
concurrently@9.2.0:
resolution: {integrity: sha512-IsB/fiXTupmagMW4MNp2lx2cdSN2FfZq78vF90LBB+zZHArbIQZjQtzXCiXnvTxCZSvXanTqFLWBjw2UkLx1SQ==}
engines: {node: '>=18'}
hasBin: true
consola@3.4.0:
resolution: {integrity: sha512-EiPU8G6dQG0GFHNR8ljnZFki/8a+cQwEQ+7wpxdChl02Q8HXlwEZWD5lqAF8vC2sEC3Tehr8hy7vErz88LHyUA==}
engines: {node: ^14.18.0 || >=16.10.0}
@ -877,6 +893,10 @@ packages:
engines: {node: '>=18'}
hasBin: true
escalade@3.2.0:
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
engines: {node: '>=6'}
escape-html@1.0.3:
resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}
@ -960,6 +980,10 @@ packages:
function-bind@1.1.2:
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
get-caller-file@2.0.5:
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
engines: {node: 6.* || 8.* || >= 10.*}
get-intrinsic@1.3.0:
resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==}
engines: {node: '>= 0.4'}
@ -985,6 +1009,10 @@ packages:
resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
engines: {node: '>= 0.4'}
has-flag@4.0.0:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
has-symbols@1.1.0:
resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
engines: {node: '>= 0.4'}
@ -1054,6 +1082,9 @@ packages:
lodash.sortby@4.7.0:
resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==}
lodash@4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
lru-cache@10.4.3:
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
@ -1241,6 +1272,10 @@ packages:
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
engines: {node: '>= 14.18.0'}
require-directory@2.1.1:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
resolve-from@5.0.0:
resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
engines: {node: '>=8'}
@ -1261,6 +1296,9 @@ packages:
resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==}
engines: {node: '>= 18'}
rxjs@7.8.2:
resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==}
safe-buffer@5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
@ -1295,6 +1333,10 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
shell-quote@1.8.3:
resolution: {integrity: sha512-ObmnIF4hXNg1BqhnHmgbDETF8dLPCggZWBjkQfhZpbszZnYur5DUljTcCHii5LC3J5E0yeO/1LIMyH+UvHQgyw==}
engines: {node: '>= 0.4'}
side-channel-list@1.0.0:
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
engines: {node: '>= 0.4'}
@ -1365,6 +1407,14 @@ packages:
engines: {node: '>=16 || 14 >=14.17'}
hasBin: true
supports-color@7.2.0:
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
engines: {node: '>=8'}
supports-color@8.1.1:
resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
engines: {node: '>=10'}
tar@7.4.3:
resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==}
engines: {node: '>=18'}
@ -1510,10 +1560,22 @@ packages:
utf-8-validate:
optional: true
y18n@5.0.8:
resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
engines: {node: '>=10'}
yallist@5.0.0:
resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==}
engines: {node: '>=18'}
yargs-parser@21.1.1:
resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
engines: {node: '>=12'}
yargs@17.7.2:
resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
engines: {node: '>=12'}
youch@3.3.4:
resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==}
@ -2007,12 +2069,23 @@ snapshots:
call-bind-apply-helpers: 1.0.2
get-intrinsic: 1.3.0
chalk@4.1.2:
dependencies:
ansi-styles: 4.3.0
supports-color: 7.2.0
chokidar@4.0.3:
dependencies:
readdirp: 4.1.2
chownr@3.0.0: {}
cliui@8.0.1:
dependencies:
string-width: 4.2.3
strip-ansi: 6.0.1
wrap-ansi: 7.0.0
clone@1.0.4:
optional: true
@ -2038,6 +2111,16 @@ snapshots:
commander@4.1.1: {}
concurrently@9.2.0:
dependencies:
chalk: 4.1.2
lodash: 4.17.21
rxjs: 7.8.2
shell-quote: 1.8.3
supports-color: 8.1.1
tree-kill: 1.2.2
yargs: 17.7.2
consola@3.4.0: {}
console.table@0.10.0:
@ -2177,6 +2260,8 @@ snapshots:
'@esbuild/win32-ia32': 0.25.4
'@esbuild/win32-x64': 0.25.4
escalade@3.2.0: {}
escape-html@1.0.3: {}
etag@1.8.1: {}
@ -2270,6 +2355,8 @@ snapshots:
function-bind@1.1.2: {}
get-caller-file@2.0.5: {}
get-intrinsic@1.3.0:
dependencies:
call-bind-apply-helpers: 1.0.2
@ -2310,6 +2397,8 @@ snapshots:
gopd@1.2.0: {}
has-flag@4.0.0: {}
has-symbols@1.1.0: {}
has-tostringtag@1.0.2:
@ -2364,6 +2453,8 @@ snapshots:
lodash.sortby@4.7.0: {}
lodash@4.17.21: {}
lru-cache@10.4.3: {}
math-intrinsics@1.1.0: {}
@ -2503,6 +2594,8 @@ snapshots:
readdirp@4.1.2: {}
require-directory@2.1.1: {}
resolve-from@5.0.0: {}
resolve-pkg-maps@1.0.0: {}
@ -2546,6 +2639,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
rxjs@7.8.2:
dependencies:
tslib: 2.8.1
safe-buffer@5.2.1: {}
safer-buffer@2.1.2: {}
@ -2611,6 +2708,8 @@ snapshots:
shebang-regex@3.0.0: {}
shell-quote@1.8.3: {}
side-channel-list@1.0.0:
dependencies:
es-errors: 1.3.0
@ -2694,6 +2793,14 @@ snapshots:
pirates: 4.0.6
ts-interface-checker: 0.1.13
supports-color@7.2.0:
dependencies:
has-flag: 4.0.0
supports-color@8.1.1:
dependencies:
has-flag: 4.0.0
tar@7.4.3:
dependencies:
'@isaacs/fs-minipass': 4.0.1
@ -2728,8 +2835,7 @@ snapshots:
ts-interface-checker@0.1.13: {}
tslib@2.8.1:
optional: true
tslib@2.8.1: {}
tsup@8.4.0(tsx@4.19.3)(typescript@5.8.2):
dependencies:
@ -2853,8 +2959,22 @@ snapshots:
ws@8.18.0: {}
y18n@5.0.8: {}
yallist@5.0.0: {}
yargs-parser@21.1.1: {}
yargs@17.7.2:
dependencies:
cliui: 8.0.1
escalade: 3.2.0
get-caller-file: 2.0.5
require-directory: 2.1.1
string-width: 4.2.3
y18n: 5.0.8
yargs-parser: 21.1.1
youch@3.3.4:
dependencies:
cookie: 0.7.1

View file

@ -105,7 +105,7 @@ export function findAvailablePortFromBase(basePort: number): Promise<number> {
* Spawn a server process in development mode
*/
export function spawnDevServer(serverName: string, directory: string, port: number, onOutput?: (data: string) => void): ChildProcess {
const server = spawn('pnpm', ['dev', `--port=${port}`], {
const server = spawn('pnpm', ['wrangler', 'dev', `--port=${port}`], {
cwd: directory,
stdio: ['ignore', 'pipe', 'pipe'],
shell: true,

View file

@ -3,7 +3,8 @@
"private": true,
"type": "module",
"scripts": {
"test": "vitest --run",
"test": "pnpm test:headless",
"test:headed": "vitest --run",
"test:headless": "HEADLESS=true vitest --run",
"test:watch": "vitest",
"test:ui": "vitest --ui",