fix price and modular
This commit is contained in:
+13
-6
@@ -411,7 +411,9 @@ function readRawBody(event, encoding = "utf8") {
|
||||
});
|
||||
return encoding ? promise2.then((buff) => buff.toString(encoding)) : promise2;
|
||||
}
|
||||
if (!Number.parseInt(event.node.req.headers["content-length"] || "") && !String(event.node.req.headers["transfer-encoding"] ?? "").split(",").map((e) => e.trim()).filter(Boolean).includes("chunked")) {
|
||||
if (!Number.parseInt(event.node.req.headers["content-length"] || "") && !/\bchunked\b/i.test(
|
||||
String(event.node.req.headers["transfer-encoding"] ?? "")
|
||||
)) {
|
||||
return Promise.resolve(void 0);
|
||||
}
|
||||
const promise = event.node.req[RawBodySymbol] = new Promise(
|
||||
@@ -1433,11 +1435,16 @@ async function updateSession(event, config, update) {
|
||||
async function sealSession(event, config) {
|
||||
const sessionName = config.name || DEFAULT_NAME;
|
||||
const session = event.context.sessions?.[sessionName] || await getSession(event, config);
|
||||
const sealed = await seal(config.crypto || crypto, session, config.password, {
|
||||
...defaults,
|
||||
ttl: config.maxAge ? config.maxAge * 1e3 : 0,
|
||||
...config.seal
|
||||
});
|
||||
const sealed = await seal(
|
||||
config.crypto || crypto,
|
||||
session,
|
||||
config.password,
|
||||
{
|
||||
...defaults,
|
||||
ttl: config.maxAge ? config.maxAge * 1e3 : 0,
|
||||
...config.seal
|
||||
}
|
||||
);
|
||||
return sealed;
|
||||
}
|
||||
async function unsealSession(_event, config, sealed) {
|
||||
|
||||
+28
-25
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "h3",
|
||||
"version": "1.15.4",
|
||||
"version": "1.15.5",
|
||||
"description": "Minimal H(TTP) framework built for high performance and portability.",
|
||||
"repository": "h3js/h3",
|
||||
"license": "MIT",
|
||||
@@ -24,10 +24,12 @@
|
||||
"dev": "vitest",
|
||||
"lint": "eslint --cache . && prettier -c src test playground examples docs",
|
||||
"lint:fix": "eslint --cache . --fix && prettier -c src test playground examples docs -w",
|
||||
"prepack": "pnpm build",
|
||||
"play": "listhen -w ./playground/app.ts",
|
||||
"profile": "0x -o -D .profile -P 'autocannon -c 100 -p 10 -d 40 http://localhost:$PORT' ./playground/server.cjs",
|
||||
"release": "pnpm test && pnpm build && changelogen --release --publish --publishTag latest && git push --follow-tags",
|
||||
"test": "pnpm lint && vitest --run --coverage"
|
||||
"release": "pnpm test && pnpm build && changelogen --release --publish --publishTag 1x && git push --follow-tags",
|
||||
"test": "pnpm lint && vitest --run --coverage && pnpm test:types",
|
||||
"test:types": "tsgo --noEmit"
|
||||
},
|
||||
"resolutions": {
|
||||
"h3": "^1.14.0"
|
||||
@@ -38,38 +40,39 @@
|
||||
"defu": "^6.1.4",
|
||||
"destr": "^2.0.5",
|
||||
"iron-webcrypto": "^1.2.1",
|
||||
"node-mock-http": "^1.0.2",
|
||||
"node-mock-http": "^1.0.4",
|
||||
"radix3": "^1.1.2",
|
||||
"ufo": "^1.6.1",
|
||||
"ufo": "^1.6.3",
|
||||
"uncrypto": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"0x": "^6.0.0",
|
||||
"@types/express": "^5.0.3",
|
||||
"@types/node": "^24.1.0",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/node": "^25.0.8",
|
||||
"@types/supertest": "^6.0.3",
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260115.1",
|
||||
"@vitest/coverage-v8": "^4.0.17",
|
||||
"autocannon": "^8.0.0",
|
||||
"automd": "^0.4.0",
|
||||
"automd": "^0.4.2",
|
||||
"changelogen": "^0.6.2",
|
||||
"connect": "^3.7.0",
|
||||
"eslint": "^9.32.0",
|
||||
"eslint-config-unjs": "^0.5.0",
|
||||
"express": "^5.1.0",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-config-unjs": "^0.6.2",
|
||||
"express": "^5.2.1",
|
||||
"get-port": "^7.1.0",
|
||||
"h3": "^1.15.3",
|
||||
"jiti": "^2.5.1",
|
||||
"h3": "^2.0.1-rc.8",
|
||||
"jiti": "^2.6.1",
|
||||
"listhen": "^1.9.0",
|
||||
"node-fetch-native": "^1.6.6",
|
||||
"prettier": "^3.6.2",
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"supertest": "^7.1.4",
|
||||
"typescript": "^5.8.3",
|
||||
"unbuild": "^3.6.0",
|
||||
"undici": "^7.12.0",
|
||||
"vitest": "^3.2.4",
|
||||
"zod": "^4.0.14"
|
||||
"node-fetch-native": "^1.6.7",
|
||||
"prettier": "^3.8.0",
|
||||
"react": "^19.2.3",
|
||||
"react-dom": "^19.2.3",
|
||||
"supertest": "^7.2.2",
|
||||
"typescript": "^5.9.3",
|
||||
"unbuild": "^3.6.1",
|
||||
"undici": "^7.18.2",
|
||||
"vitest": "^4.0.17",
|
||||
"zod": "^4.3.5"
|
||||
},
|
||||
"packageManager": "pnpm@10.2.0"
|
||||
"packageManager": "pnpm@10.28.0"
|
||||
}
|
||||
Reference in New Issue
Block a user