@vercel/node 5.1.16 → 5.2.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.
Files changed (2) hide show
  1. package/dist/index.js +16 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -70089,16 +70089,31 @@ var build = async ({
70089
70089
  output = new import_build_utils3.NodejsLambda({
70090
70090
  files: preparedFiles,
70091
70091
  handler,
70092
+ architecture: staticConfig?.architecture,
70092
70093
  runtime: nodeVersion.runtime,
70093
70094
  shouldAddHelpers,
70094
70095
  shouldAddSourcemapSupport,
70095
70096
  awsLambdaHandler,
70096
70097
  supportsResponseStreaming,
70097
- maxDuration: staticConfig?.maxDuration
70098
+ maxDuration: staticConfig?.maxDuration,
70099
+ regions: normalizeRequestedRegions(
70100
+ staticConfig?.preferredRegion ?? staticConfig?.regions
70101
+ )
70098
70102
  });
70099
70103
  }
70100
70104
  return { routes, output };
70101
70105
  };
70106
+ function normalizeRequestedRegions(regions) {
70107
+ if (regions === "all") {
70108
+ return ["all"];
70109
+ } else if (regions === "auto" || regions === "default") {
70110
+ return void 0;
70111
+ }
70112
+ if (typeof regions === "string") {
70113
+ return [regions];
70114
+ }
70115
+ return regions;
70116
+ }
70102
70117
 
70103
70118
  // src/prepare-cache.ts
70104
70119
  var import_build_utils4 = require("@vercel/build-utils");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/node",
3
- "version": "5.1.16",
3
+ "version": "5.2.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -17,10 +17,10 @@
17
17
  "@edge-runtime/primitives": "4.1.0",
18
18
  "@edge-runtime/vm": "3.2.0",
19
19
  "@types/node": "16.18.11",
20
- "@vercel/build-utils": "10.5.1",
20
+ "@vercel/build-utils": "10.6.0",
21
21
  "@vercel/error-utils": "2.0.3",
22
22
  "@vercel/nft": "0.29.2",
23
- "@vercel/static-config": "3.0.0",
23
+ "@vercel/static-config": "3.1.1",
24
24
  "async-listen": "3.0.0",
25
25
  "cjs-module-lexer": "1.2.3",
26
26
  "edge-runtime": "2.5.9",
@@ -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.0.3"
60
+ "@vercel/functions": "2.1.0"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "node build.mjs",