diff --git a/examples/child-process/package.json b/examples/child-process/package.json index 03b2d4f..5ec472b 100644 --- a/examples/child-process/package.json +++ b/examples/child-process/package.json @@ -9,8 +9,9 @@ "test-e2e": "playwright test", "test-e2e-preview": "E2E_PREVIEW=1 playwright test" }, - "dependencies": {}, - "devDependencies": {}, + "devDependencies": { + "@types/bun": "^1.1.10" + }, "volta": { "extends": "../../package.json" } diff --git a/examples/child-process/src/lib/vite/runtime/bun.js b/examples/child-process/src/lib/vite/runtime/bun.js index 53eea4f..3087ca3 100644 --- a/examples/child-process/src/lib/vite/runtime/bun.js +++ b/examples/child-process/src/lib/vite/runtime/bun.js @@ -44,7 +44,6 @@ async function main() { return mod.default(new Request(meta.url, { ...request, headers })); } - // @ts-ignore const server = Bun.serve({ port: 0, fetch: handler }); await bridgeRpc("register", `http://localhost:${server.port}`); } diff --git a/examples/child-process/tsconfig.json b/examples/child-process/tsconfig.json index 2f9026d..982e8b6 100644 --- a/examples/child-process/tsconfig.json +++ b/examples/child-process/tsconfig.json @@ -9,7 +9,7 @@ "module": "ESNext", "target": "ESNext", "lib": ["ESNext", "DOM"], - "types": ["vite/client", "react/experimental"], + "types": ["vite/client", "react/experimental", "@types/bun"], "jsx": "react-jsx" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ddd3ab..f2aa31f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -80,7 +80,11 @@ importers: examples/browser-cli: {} - examples/child-process: {} + examples/child-process: + devDependencies: + '@types/bun': + specifier: ^1.1.10 + version: 1.1.10 examples/react-server: devDependencies: @@ -1296,6 +1300,9 @@ packages: '@types/babel__traverse@7.20.6': resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==} + '@types/bun@1.1.10': + resolution: {integrity: sha512-76KYVSwrHwr9zsnk6oLXOGs9KvyBg3U066GLO4rk6JZk1ypEPGCUDZ5yOiESyIHWs9cx9iC8r01utYN32XdmgA==} + '@types/eslint-scope@3.7.7': resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} @@ -1314,6 +1321,9 @@ packages: '@types/node-forge@1.3.11': resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} + '@types/node@20.12.14': + resolution: {integrity: sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg==} + '@types/node@20.14.11': resolution: {integrity: sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==} @@ -1326,6 +1336,9 @@ packages: '@types/react@18.3.10': resolution: {integrity: sha512-02sAAlBnP39JgXwkAq3PeU9DVaaGpZyF3MGcC0MKgQVkZor5IiiDAipVaxQHtDJAmO4GIy/rVBy/LzVj76Cyqg==} + '@types/ws@8.5.12': + resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} + '@unocss/astro@0.61.5': resolution: {integrity: sha512-keyh6/EsPMBEiLguaOsh47UcMkWCGT0rW3KV5aYRUfYXlgccSzDd4SLmTNsdlGXIso2XCl/14BJQuwjP0UEU0Q==} version: 0.61.5 @@ -1636,6 +1649,9 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + bun-types@1.1.29: + resolution: {integrity: sha512-En3/TzSPMPyl5UlUB1MHzHpcrZDakTm7mS203eLoX1fBoEa3PW+aSS8GAqVJ7Is/m34Z5ogL+ECniLY0uDaCPw==} + bundle-require@5.0.0: resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -3673,6 +3689,10 @@ snapshots: dependencies: '@babel/types': 7.24.9 + '@types/bun@1.1.10': + dependencies: + bun-types: 1.1.29 + '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 8.56.10 @@ -3693,6 +3713,10 @@ snapshots: dependencies: '@types/node': 20.14.11 + '@types/node@20.12.14': + dependencies: + undici-types: 5.26.5 + '@types/node@20.14.11': dependencies: undici-types: 5.26.5 @@ -3708,6 +3732,10 @@ snapshots: '@types/prop-types': 15.7.12 csstype: 3.1.3 + '@types/ws@8.5.12': + dependencies: + '@types/node': 20.14.11 + '@unocss/astro@0.61.5(rollup@4.23.0)(vite@https://pkg.pr.new/vite@87949fe(@types/node@20.14.11)(terser@5.31.3))': dependencies: '@unocss/core': 0.61.5 @@ -4148,6 +4176,11 @@ snapshots: buffer-from@1.1.2: {} + bun-types@1.1.29: + dependencies: + '@types/node': 20.12.14 + '@types/ws': 8.5.12 + bundle-require@5.0.0(esbuild@0.23.0): dependencies: esbuild: 0.23.0