diff --git a/package.json b/package.json index 619064a..7c492b5 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ ] }, "dependencies": { - "@types/connect-history-api-fallback": "^1.5.4", "@types/ws": "^8.18.1", "chokidar": "^5.0.0", "connect-history-api-fallback": "^2.0.0", @@ -65,7 +64,6 @@ "@rstest/core": "^0.9.2", "@types/mime-types": "3.0.1", "@types/node": "^24.12.0", - "@types/node-forge": "^1.3.14", "@types/serve-static": "^2.2.0", "@types/trusted-types": "^2.0.7", "@types/ws": "8.18.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99056ed..c067edf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: dependencies: - '@types/connect-history-api-fallback': - specifier: ^1.5.4 - version: 1.5.4 '@types/ws': specifier: ^8.18.1 version: 8.18.1 @@ -63,9 +60,6 @@ importers: '@types/node': specifier: ^24.12.0 version: 24.12.0 - '@types/node-forge': - specifier: ^1.3.14 - version: 1.3.14 '@types/serve-static': specifier: ^2.2.0 version: 2.2.0 @@ -638,9 +632,6 @@ packages: '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} - '@types/connect-history-api-fallback@1.5.4': - resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} - '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} @@ -653,9 +644,6 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/express-serve-static-core@4.19.8': - resolution: {integrity: sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==} - '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} @@ -668,24 +656,9 @@ packages: '@types/mime-types@3.0.1': resolution: {integrity: sha512-xRMsfuQbnRq1Ef+C+RKaENOxXX87Ygl38W1vDfPHRku02TgQr+Qd8iivLtAMcR0KF5/29xlnFihkTlbqFrGOVQ==} - '@types/mime@1.3.5': - resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} - - '@types/node-forge@1.3.14': - resolution: {integrity: sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==} - '@types/node@24.12.0': resolution: {integrity: sha512-GYDxsZi3ChgmckRT9HPU0WEhKLP08ev/Yfcq2AstjrDASOYCSXeyjDsHg4v5t4jOj7cyDX3vmprafKlWIG9MXQ==} - '@types/qs@6.9.16': - resolution: {integrity: sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==} - - '@types/range-parser@1.2.7': - resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} - - '@types/send@0.17.4': - resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} - '@types/serve-static@2.2.0': resolution: {integrity: sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==} @@ -2492,11 +2465,6 @@ snapshots: '@types/deep-eql': 4.0.2 assertion-error: 2.0.1 - '@types/connect-history-api-fallback@1.5.4': - dependencies: - '@types/express-serve-static-core': 4.19.8 - '@types/node': 24.12.0 - '@types/deep-eql@4.0.2': {} '@types/eslint-scope@3.7.7': @@ -2511,13 +2479,6 @@ snapshots: '@types/estree@1.0.8': {} - '@types/express-serve-static-core@4.19.8': - dependencies: - '@types/node': 24.12.0 - '@types/qs': 6.9.16 - '@types/range-parser': 1.2.7 - '@types/send': 0.17.4 - '@types/http-errors@2.0.4': {} '@types/http-proxy@1.17.17': @@ -2528,25 +2489,10 @@ snapshots: '@types/mime-types@3.0.1': {} - '@types/mime@1.3.5': {} - - '@types/node-forge@1.3.14': - dependencies: - '@types/node': 24.12.0 - '@types/node@24.12.0': dependencies: undici-types: 7.16.0 - '@types/qs@6.9.16': {} - - '@types/range-parser@1.2.7': {} - - '@types/send@0.17.4': - dependencies: - '@types/mime': 1.3.5 - '@types/node': 24.12.0 - '@types/serve-static@2.2.0': dependencies: '@types/http-errors': 2.0.4 diff --git a/src/types.ts b/src/types.ts index 4aa826e..8c48463 100644 --- a/src/types.ts +++ b/src/types.ts @@ -5,12 +5,12 @@ import type { } from 'node:http'; import type { ServerOptions } from 'node:https'; import type { + DevServer, DevServerMiddlewareHandler, DevServerOpenOptions, DevServerStaticItem, } from '@rspack/core'; import type { FSWatcher, ChokidarOptions as WatchOptions } from 'chokidar'; -import type { Options as ConnectHistoryApiFallbackOptions } from 'connect-history-api-fallback'; import type { Server as ConnectApplication, IncomingMessage as ConnectIncomingMessage, @@ -29,7 +29,6 @@ export type { ServerOptions, IncomingMessage, ConnectApplication, - ConnectHistoryApiFallbackOptions, }; export type { IPv6 } from 'ipaddr.js'; export type { Socket } from 'node:net'; @@ -53,6 +52,11 @@ type BasicServer = import('node:net').Server | import('node:tls').Server; /** https://github.com/microsoft/TypeScript/issues/29729 */ export type LiteralUnion = T | (U & Record); +export type ConnectHistoryApiFallbackOptions = Exclude< + NonNullable, + boolean +>; + // type-level helpers, inferred as util types export type Request = T extends ConnectApplication ? ConnectIncomingMessage : IncomingMessage;