@vercel/node 5.7.13 → 5.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev-server.mjs +11 -2
- package/dist/index.js +41712 -26948
- package/package.json +8 -9
package/dist/dev-server.mjs
CHANGED
|
@@ -881,7 +881,6 @@ import { createServer as createServer2 } from "http";
|
|
|
881
881
|
// src/serverless-functions/helpers.ts
|
|
882
882
|
var import_content_type = __toESM(require_content_type());
|
|
883
883
|
import { PassThrough } from "stream";
|
|
884
|
-
import { parse as parseURL } from "url";
|
|
885
884
|
import { parse as parseQS } from "querystring";
|
|
886
885
|
import etag from "etag";
|
|
887
886
|
var ApiError = class extends Error {
|
|
@@ -920,7 +919,17 @@ function getBodyParser(body, contentType) {
|
|
|
920
919
|
}
|
|
921
920
|
function getQueryParser({ url = "/" }) {
|
|
922
921
|
return function parseQuery() {
|
|
923
|
-
|
|
922
|
+
const urlObj = new URL(url, "http://localhost");
|
|
923
|
+
const query = {};
|
|
924
|
+
urlObj.searchParams.forEach((value, key) => {
|
|
925
|
+
const existing = query[key];
|
|
926
|
+
if (existing !== void 0) {
|
|
927
|
+
query[key] = Array.isArray(existing) ? [...existing, value] : [existing, value];
|
|
928
|
+
} else {
|
|
929
|
+
query[key] = value;
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
return query;
|
|
924
933
|
};
|
|
925
934
|
}
|
|
926
935
|
function getCookieParser(req) {
|