Socket
Socket
Sign inDemoInstall

@vercel/node-bridge

Package Overview
Dependencies
Maintainers
55
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/node-bridge - npm Package Compare versions

Comparing version 2.0.1-canary.1 to 2.0.1-canary.2

33

launcher.js

@@ -29,2 +29,3 @@ const { parse } = require('url');

const helpersPath = ${JSON.stringify(helpersPath)};
const useRequire = false;

@@ -42,2 +43,3 @@ const func = (${getVercelLauncher(config).toString()})();

shouldAddHelpers = false,
useRequire = false,
}) {

@@ -63,10 +65,18 @@ return function () {

import(entrypointPath)
async function getListener() {
let listener = useRequire
? require(entrypointPath)
: await import(entrypointPath);
// In some cases we might have nested default props
// due to TS => JS
for (let i = 0; i < 5; i++) {
if (listener.default) listener = listener.default;
}
return listener;
}
getListener()
.then(listener => {
// In some cases we might have nested default props
// due to TS => JS
for (let i = 0; i < 5; i++) {
if (listener.default) listener = listener.default;
}
if (typeof listener.listen === 'function') {

@@ -149,5 +159,8 @@ Server.prototype.listen = originalListen;

function internal(e, context, callback) {
const { path, method: httpMethod, body, headers } = JSON.parse(
e.body || '{}'
);
const {
path,
method: httpMethod,
body,
headers,
} = JSON.parse(e.body || '{}');
const { query } = parse(path, true);

@@ -154,0 +167,0 @@ /**

{
"name": "@vercel/node-bridge",
"version": "2.0.1-canary.1",
"version": "2.0.1-canary.2",
"license": "MIT",

@@ -25,3 +25,3 @@ "main": "./index.js",

},
"gitHead": "cf827a8b919ff6eed383863af39c26d51b2aa16e"
"gitHead": "0a09a5232c9ffddcc68475bf05fccd56ebe946d1"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc