@vercel/next 3.1.4 → 3.1.5
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/index.js +17 -0
- package/dist/utils.js +16 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -42668,6 +42668,7 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
|
|
42668
42668
|
const env = { ...spawnOpts.env };
|
42669
42669
|
const memoryToConsume = Math.floor(os_1.default.totalmem() / 1024 ** 2) - 128;
|
42670
42670
|
env.NODE_OPTIONS = `--max_old_space_size=${memoryToConsume}`;
|
42671
|
+
env.NEXT_EDGE_RUNTIME_PROVIDER = 'vercel';
|
42671
42672
|
if (target) {
|
42672
42673
|
// Since version v10.0.8-canary.15 of Next.js the NEXT_PRIVATE_TARGET env
|
42673
42674
|
// value can be used to override the target set in next.config.js
|
@@ -47030,6 +47031,15 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
47030
47031
|
});
|
47031
47032
|
return acc;
|
47032
47033
|
}, {});
|
47034
|
+
const assetFiles = (edgeFunction.assets ?? []).reduce((acc, { filePath, name }) => {
|
47035
|
+
const fullFilePath = path_1.default.join(entryPath, outputDirectory, filePath);
|
47036
|
+
acc[`assets/${name}`] = new build_utils_1.FileFsRef({
|
47037
|
+
mode: 0o644,
|
47038
|
+
contentType: 'application/octet-stream',
|
47039
|
+
fsPath: fullFilePath,
|
47040
|
+
});
|
47041
|
+
return acc;
|
47042
|
+
}, {});
|
47033
47043
|
return new build_utils_1.EdgeFunction({
|
47034
47044
|
deploymentTarget: 'v8-worker',
|
47035
47045
|
name: edgeFunction.name,
|
@@ -47047,9 +47057,16 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
47047
47057
|
}),
|
47048
47058
|
}),
|
47049
47059
|
...wasmFiles,
|
47060
|
+
...assetFiles,
|
47050
47061
|
},
|
47051
47062
|
entrypoint: 'index.js',
|
47052
47063
|
envVarsInUse: edgeFunction.env,
|
47064
|
+
assets: (edgeFunction.assets ?? []).map(({ name }) => {
|
47065
|
+
return {
|
47066
|
+
name,
|
47067
|
+
path: `assets/${name}`,
|
47068
|
+
};
|
47069
|
+
}),
|
47053
47070
|
});
|
47054
47071
|
})(),
|
47055
47072
|
routeSrc: getRouteSrc(edgeFunction, routesManifest),
|
package/dist/utils.js
CHANGED
@@ -1379,6 +1379,15 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
1379
1379
|
});
|
1380
1380
|
return acc;
|
1381
1381
|
}, {});
|
1382
|
+
const assetFiles = (edgeFunction.assets ?? []).reduce((acc, { filePath, name }) => {
|
1383
|
+
const fullFilePath = path_1.default.join(entryPath, outputDirectory, filePath);
|
1384
|
+
acc[`assets/${name}`] = new build_utils_1.FileFsRef({
|
1385
|
+
mode: 0o644,
|
1386
|
+
contentType: 'application/octet-stream',
|
1387
|
+
fsPath: fullFilePath,
|
1388
|
+
});
|
1389
|
+
return acc;
|
1390
|
+
}, {});
|
1382
1391
|
return new build_utils_1.EdgeFunction({
|
1383
1392
|
deploymentTarget: 'v8-worker',
|
1384
1393
|
name: edgeFunction.name,
|
@@ -1396,9 +1405,16 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
1396
1405
|
}),
|
1397
1406
|
}),
|
1398
1407
|
...wasmFiles,
|
1408
|
+
...assetFiles,
|
1399
1409
|
},
|
1400
1410
|
entrypoint: 'index.js',
|
1401
1411
|
envVarsInUse: edgeFunction.env,
|
1412
|
+
assets: (edgeFunction.assets ?? []).map(({ name }) => {
|
1413
|
+
return {
|
1414
|
+
name,
|
1415
|
+
path: `assets/${name}`,
|
1416
|
+
};
|
1417
|
+
}),
|
1402
1418
|
});
|
1403
1419
|
})(),
|
1404
1420
|
routeSrc: getRouteSrc(edgeFunction, routesManifest),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.5",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"@types/semver": "6.0.0",
|
46
46
|
"@types/text-table": "0.2.1",
|
47
47
|
"@types/webpack-sources": "3.2.0",
|
48
|
-
"@vercel/build-utils": "5.0.
|
48
|
+
"@vercel/build-utils": "5.0.2",
|
49
49
|
"@vercel/nft": "0.20.1",
|
50
50
|
"@vercel/routing-utils": "1.13.5",
|
51
51
|
"async-sema": "3.0.1",
|
@@ -70,5 +70,5 @@
|
|
70
70
|
"typescript": "4.5.2",
|
71
71
|
"webpack-sources": "3.2.3"
|
72
72
|
},
|
73
|
-
"gitHead": "
|
73
|
+
"gitHead": "d2f8d178f77e15cb490cce73f5766537d892f763"
|
74
74
|
}
|