@vercel/next 4.16.0 → 4.16.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.
- package/dist/adapter/index.js +32 -4
- package/package.json +2 -2
package/dist/adapter/index.js
CHANGED
|
@@ -9548,6 +9548,36 @@ var writeIfNotExists = async (filePath, content) => {
|
|
|
9548
9548
|
writeLock.set(filePath, writePromise);
|
|
9549
9549
|
return writePromise;
|
|
9550
9550
|
};
|
|
9551
|
+
var vercelFunctionRegionsVar = process.env.VERCEL_FUNCTION_REGIONS;
|
|
9552
|
+
var vercelFunctionRegions;
|
|
9553
|
+
if (vercelFunctionRegionsVar) {
|
|
9554
|
+
vercelFunctionRegions = vercelFunctionRegionsVar.split(",");
|
|
9555
|
+
}
|
|
9556
|
+
function normalizeRegions(regions) {
|
|
9557
|
+
if (typeof regions === "string") {
|
|
9558
|
+
regions = [regions];
|
|
9559
|
+
}
|
|
9560
|
+
const newRegions = [];
|
|
9561
|
+
for (const region of regions) {
|
|
9562
|
+
if (region === "home") {
|
|
9563
|
+
if (vercelFunctionRegions) {
|
|
9564
|
+
newRegions.push(...vercelFunctionRegions);
|
|
9565
|
+
}
|
|
9566
|
+
continue;
|
|
9567
|
+
}
|
|
9568
|
+
if (region === "global") {
|
|
9569
|
+
return "all";
|
|
9570
|
+
}
|
|
9571
|
+
if (region === "auto") {
|
|
9572
|
+
return "auto";
|
|
9573
|
+
}
|
|
9574
|
+
newRegions.push(region);
|
|
9575
|
+
}
|
|
9576
|
+
if (newRegions.length === 0) {
|
|
9577
|
+
return void 0;
|
|
9578
|
+
}
|
|
9579
|
+
return newRegions;
|
|
9580
|
+
}
|
|
9551
9581
|
function normalizeIndexPathname(pathname, config) {
|
|
9552
9582
|
if (pathname === config.basePath && config.basePath !== "/") {
|
|
9553
9583
|
return import_node_path.default.posix.join(config.basePath, "/index");
|
|
@@ -9932,7 +9962,6 @@ async function handlePrerenderOutputs(prerenderOutputs, {
|
|
|
9932
9962
|
}
|
|
9933
9963
|
async function handleEdgeOutputs(edgeOutputs, {
|
|
9934
9964
|
config,
|
|
9935
|
-
distDir,
|
|
9936
9965
|
repoRoot,
|
|
9937
9966
|
projectDir,
|
|
9938
9967
|
nextVersion,
|
|
@@ -10006,7 +10035,7 @@ async function handleEdgeOutputs(edgeOutputs, {
|
|
|
10006
10035
|
assets: nonJsAssetFiles,
|
|
10007
10036
|
deploymentTarget: "v8-worker",
|
|
10008
10037
|
environment: output.config.env || {},
|
|
10009
|
-
regions: output.config.preferredRegion,
|
|
10038
|
+
regions: output.config.preferredRegion ? normalizeRegions(output.config.preferredRegion) : void 0,
|
|
10010
10039
|
framework: {
|
|
10011
10040
|
slug: "nextjs",
|
|
10012
10041
|
version: nextVersion
|
|
@@ -10521,8 +10550,7 @@ var myAdapter = {
|
|
|
10521
10550
|
projectDir,
|
|
10522
10551
|
vercelOutputDir,
|
|
10523
10552
|
nextVersion,
|
|
10524
|
-
config
|
|
10525
|
-
distDir
|
|
10553
|
+
config
|
|
10526
10554
|
});
|
|
10527
10555
|
const prerenderFallbackFalseMap = {};
|
|
10528
10556
|
for (const prerender of outputs.prerenders) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/next",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@vercel/nft": "1.1.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@next-community/adapter-vercel": "0.0.1-beta.
|
|
19
|
+
"@next-community/adapter-vercel": "0.0.1-beta.14",
|
|
20
20
|
"@types/aws-lambda": "8.10.19",
|
|
21
21
|
"@types/buffer-crc32": "0.2.0",
|
|
22
22
|
"@types/bytes": "3.1.1",
|