@vercel/node 5.4.1 → 5.5.1

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.
@@ -1278,7 +1278,7 @@ async function createEventHandler(entrypoint2, config, options) {
1278
1278
  async function hasWebHandlers(getExports) {
1279
1279
  const exports = await getExports().catch(() => []);
1280
1280
  for (const name of exports) {
1281
- if (HTTP_METHODS.includes(name)) {
1281
+ if (HTTP_METHODS.includes(name) || name === "default" || name === "fetch") {
1282
1282
  return true;
1283
1283
  }
1284
1284
  }
@@ -1347,6 +1347,7 @@ async function onDevRequest(req, res) {
1347
1347
  try {
1348
1348
  const { headers, body, status: status2 } = await handleEvent(req);
1349
1349
  res.statusCode = status2;
1350
+ headers.delete("transfer-encoding");
1350
1351
  for (const [key, value] of headers) {
1351
1352
  if (value !== void 0)
1352
1353
  res.setHeader(
@@ -1383,6 +1384,12 @@ process.on("message", async (m) => {
1383
1384
  break;
1384
1385
  }
1385
1386
  });
1387
+ process.on("SIGTERM", async () => {
1388
+ if (onExit) {
1389
+ await onExit();
1390
+ }
1391
+ process.exit(0);
1392
+ });
1386
1393
  /*! Bundled license information:
1387
1394
 
1388
1395
  content-type/index.js: