All three entry points we import survive the major unchanged: `serve` keeps its `(options, listeningListener)` signature and still accepts `fetch`, `hostname` and `port`; `RESPONSE_ALREADY_SENT` is still exported from `utils/response`; `getConnInfo` is still on `conninfo`. The peer is hono ^4 and the engine >=20, both of which we already meet. What v2 adds is two defaults worth knowing about. `overrideGlobalObjects` swaps in a lighter Request/Response, and `autoCleanupIncoming` destroys an incoming request the app never finished reading -- which is the behaviour you want behind a proxy, and is on by default. Neither is something the unit tests would notice, so this was run rather than reasoned about. Against the mock: login, an /api/events stream, and a POST carrying a body through to upstream. The SSE path is the one that matters, since it writes to the raw ServerResponse and hands back RESPONSE_ALREADY_SENT; it answers with the same headers, the same chunked encoding and the same bytes as 1.19.17 does on the same script.
28 lines
797 B
JSON
28 lines
797 B
JSON
{
|
|
"name": "@ihasmail/server",
|
|
"version": "2.16.0",
|
|
"private": true,
|
|
"license": "AGPL-3.0-or-later",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"dev": "tsx watch --clear-screen=false src/index.ts",
|
|
"build": "tsc -p tsconfig.json",
|
|
"start": "node dist/index.js",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"test": "tsx --test src/*.test.ts src/**/*.test.ts",
|
|
"mock": "tsx src/mock/index.ts",
|
|
"mock:no-future-release": "MOCK_NO_FUTURE_RELEASE=1 tsx src/mock/index.ts",
|
|
"mock:no-keyword-sort": "MOCK_NO_KEYWORD_SORT=1 tsx src/mock/index.ts"
|
|
},
|
|
"dependencies": {
|
|
"@hono/node-server": "^2.1.1",
|
|
"hono": "^4.13.7"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.13.10",
|
|
"tsx": "^4.23.13",
|
|
"typescript": "^7.0.2"
|
|
}
|
|
}
|