@vercel/node 5.3.7 → 5.3.10
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/index.js +21 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -67324,7 +67324,7 @@ var require_import_meta_resolve = __commonJS({
|
|
|
67324
67324
|
} = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [null, null, null];
|
|
67325
67325
|
return mimeToFormat(mime);
|
|
67326
67326
|
}
|
|
67327
|
-
function
|
|
67327
|
+
function extname4(url2) {
|
|
67328
67328
|
const pathname = url2.pathname;
|
|
67329
67329
|
let index = pathname.length;
|
|
67330
67330
|
while (index--) {
|
|
@@ -67339,7 +67339,7 @@ var require_import_meta_resolve = __commonJS({
|
|
|
67339
67339
|
return "";
|
|
67340
67340
|
}
|
|
67341
67341
|
function getFileProtocolModuleFormat(url2, _context, ignoreErrors) {
|
|
67342
|
-
const ext =
|
|
67342
|
+
const ext = extname4(url2);
|
|
67343
67343
|
if (ext === ".js") {
|
|
67344
67344
|
const packageType = getPackageType(url2);
|
|
67345
67345
|
if (packageType !== "none") {
|
|
@@ -70069,10 +70069,26 @@ var build = async ({
|
|
|
70069
70069
|
];
|
|
70070
70070
|
}
|
|
70071
70071
|
if (shim) {
|
|
70072
|
-
|
|
70073
|
-
|
|
70072
|
+
const handlerFilename = (0, import_path3.basename)(handler);
|
|
70073
|
+
const handlerDir = (0, import_path3.dirname)(handler);
|
|
70074
|
+
const extension = (0, import_path3.extname)(handlerFilename);
|
|
70075
|
+
const extMap = {
|
|
70076
|
+
".ts": ".js",
|
|
70077
|
+
".mts": ".mjs",
|
|
70078
|
+
".mjs": ".mjs",
|
|
70079
|
+
".cjs": ".cjs",
|
|
70080
|
+
".js": ".js"
|
|
70081
|
+
};
|
|
70082
|
+
const ext = extMap[extension];
|
|
70083
|
+
if (!ext) {
|
|
70084
|
+
throw new Error(`Unsupported extension for ${entrypoint}`);
|
|
70085
|
+
}
|
|
70086
|
+
const filename = `shim${ext}`;
|
|
70087
|
+
const shimHandler = handlerDir === "." ? filename : (0, import_path3.join)(handlerDir, filename);
|
|
70088
|
+
preparedFiles[shimHandler] = new import_build_utils3.FileBlob({
|
|
70089
|
+
data: shim(handlerFilename)
|
|
70074
70090
|
});
|
|
70075
|
-
handler =
|
|
70091
|
+
handler = shimHandler;
|
|
70076
70092
|
}
|
|
70077
70093
|
if (isEdgeFunction) {
|
|
70078
70094
|
output = new import_build_utils3.EdgeFunction({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/node",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.10",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"tree-kill": "1.2.2",
|
|
58
58
|
"vite": "^5.1.6",
|
|
59
59
|
"vitest": "^2.0.1",
|
|
60
|
-
"@vercel/functions": "2.2.
|
|
60
|
+
"@vercel/functions": "2.2.7"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "node build.mjs",
|