@vercel/node
Advanced tools
+18
-1
@@ -1095,2 +1095,3 @@ var __create = Object.create; | ||
| import { promisify } from "util"; | ||
| import http from "http"; | ||
| var toHeaders2 = buildToHeaders2({ Headers: Headers3 }); | ||
@@ -1107,3 +1108,8 @@ var HTTP_METHODS = [ | ||
| async function createServerlessServer(userCode) { | ||
| const server = createServer(userCode); | ||
| let server; | ||
| if (typeof userCode === "function") { | ||
| server = createServer(userCode); | ||
| } else { | ||
| server = userCode; | ||
| } | ||
| return { | ||
@@ -1116,3 +1122,11 @@ url: await listen(server, { host: "127.0.0.1", port: 0 }), | ||
| const id = isAbsolute(entrypointPath) ? pathToFileURL(entrypointPath).href : entrypointPath; | ||
| let server = null; | ||
| const originalListen = http.Server.prototype.listen; | ||
| http.Server.prototype.listen = function() { | ||
| server = this; | ||
| http.Server.prototype.listen = originalListen; | ||
| return this; | ||
| }; | ||
| let listener = await import(id); | ||
| http.Server.prototype.listen = originalListen; | ||
| for (let i = 0; i < 5; i++) { | ||
@@ -1147,2 +1161,5 @@ if (listener.default) | ||
| } | ||
| if (server) { | ||
| return server; | ||
| } | ||
| return async (req, res) => { | ||
@@ -1149,0 +1166,0 @@ if (options.shouldAddHelpers && typeof listener.listen !== "function") { |
+1
-1
| { | ||
| "name": "@vercel/node", | ||
| "version": "5.3.16", | ||
| "version": "5.3.17", | ||
| "license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index", |
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2782014
0.05%72259
0.06%12
-14.29%4
-33.33%