@sveltejs/adapter-node
Advanced tools
Comparing version 5.1.1 to 5.2.0
@@ -1159,4 +1159,18 @@ import 'SHIMS'; | ||
const port_header = env('PORT_HEADER', '').toLowerCase(); | ||
const body_size_limit = Number(env('BODY_SIZE_LIMIT', '524288')); | ||
/** | ||
* @param {string} bytes | ||
*/ | ||
function parse_body_size_limit(bytes) { | ||
const multiplier = | ||
{ | ||
K: 1024, | ||
M: 1024 * 1024, | ||
G: 1024 * 1024 * 1024 | ||
}[bytes[bytes.length - 1]?.toUpperCase()] ?? 1; | ||
return Number(multiplier != 1 ? bytes.substring(0, bytes.length - 1) : bytes) * multiplier; | ||
} | ||
const body_size_limit = parse_body_size_limit(env('BODY_SIZE_LIMIT', '512K')); | ||
if (isNaN(body_size_limit)) { | ||
@@ -1163,0 +1177,0 @@ throw new Error( |
{ | ||
"name": "@sveltejs/adapter-node", | ||
"version": "5.1.1", | ||
"version": "5.2.0", | ||
"description": "Adapter for SvelteKit apps that generates a standalone Node server", | ||
@@ -42,3 +42,3 @@ "keywords": [ | ||
"vitest": "^1.6.0", | ||
"@sveltejs/kit": "^2.5.16" | ||
"@sveltejs/kit": "^2.5.17" | ||
}, | ||
@@ -45,0 +45,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53855
1648