@vercel/next 3.1.21 → 3.1.22
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 +112 -53
- package/dist/utils.js +80 -35
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -12114,7 +12114,7 @@ async function analyze(id, code, job) {
|
|
12114
12114
|
.filter(name => !excludeAssetExtensions.has(path_1.default.extname(name)) &&
|
12115
12115
|
!excludeAssetFiles.has(path_1.default.basename(name)) &&
|
12116
12116
|
!name.endsWith('/'))
|
12117
|
-
.forEach(file =>
|
12117
|
+
.forEach(file => deps.add(file));
|
12118
12118
|
});
|
12119
12119
|
}
|
12120
12120
|
async function processRequireArg(expression, isImport = false) {
|
@@ -12147,7 +12147,7 @@ async function analyze(id, code, job) {
|
|
12147
12147
|
let scope = rollup_pluginutils_1.attachScopes(ast, 'scope');
|
12148
12148
|
if (isAst(ast)) {
|
12149
12149
|
wrappers_1.handleWrappers(ast);
|
12150
|
-
await special_cases_1.default({ id, ast, emitAsset: path => assets.add(path), emitAssetDirectory, job });
|
12150
|
+
await special_cases_1.default({ id, ast, emitDependency: path => deps.add(path), emitAsset: path => assets.add(path), emitAssetDirectory, job });
|
12151
12151
|
}
|
12152
12152
|
async function backtrack(parent, context) {
|
12153
12153
|
// computing a static expression outward
|
@@ -12234,6 +12234,18 @@ async function analyze(id, code, job) {
|
|
12234
12234
|
await processRequireArg(node.arguments[0]);
|
12235
12235
|
return;
|
12236
12236
|
}
|
12237
|
+
else if ((!isESM || job.mixedModules) &&
|
12238
|
+
node.callee.type === 'MemberExpression' &&
|
12239
|
+
node.callee.object.type === 'Identifier' &&
|
12240
|
+
node.callee.object.name === 'require' &&
|
12241
|
+
knownBindings.require.shadowDepth === 0 &&
|
12242
|
+
node.callee.property.type === 'Identifier' &&
|
12243
|
+
!node.callee.computed &&
|
12244
|
+
node.callee.property.name === 'resolve' &&
|
12245
|
+
node.arguments.length) {
|
12246
|
+
await processRequireArg(node.arguments[0]);
|
12247
|
+
return;
|
12248
|
+
}
|
12237
12249
|
const calleeValue = job.analysis.evaluatePureExpressions && await computePureStaticValue(node.callee, false);
|
12238
12250
|
// if we have a direct pure static function,
|
12239
12251
|
// and that function has a [TRIGGER] symbol -> trigger asset emission from it
|
@@ -12918,12 +12930,15 @@ class Job {
|
|
12918
12930
|
return;
|
12919
12931
|
if (path.endsWith('.node'))
|
12920
12932
|
return await sharedlib_emit_1.sharedLibEmit(path, this);
|
12921
|
-
|
12922
|
-
|
12923
|
-
|
12924
|
-
|
12925
|
-
|
12926
|
-
|
12933
|
+
const handlePjsonBoundary = async (item) => {
|
12934
|
+
// js files require the "type": "module" lookup, so always emit the package.json
|
12935
|
+
if (item.endsWith(".js")) {
|
12936
|
+
const pjsonBoundary = await this.getPjsonBoundary(item);
|
12937
|
+
if (pjsonBoundary)
|
12938
|
+
await this.emitFile(pjsonBoundary + path_1.sep + "package.json", "resolve", item);
|
12939
|
+
}
|
12940
|
+
};
|
12941
|
+
await handlePjsonBoundary(path);
|
12927
12942
|
let analyzeResult;
|
12928
12943
|
const cachedAnalysis = this.analysisCache.get(path);
|
12929
12944
|
if (cachedAnalysis) {
|
@@ -12933,6 +12948,9 @@ class Job {
|
|
12933
12948
|
const source = await this.readFile(path);
|
12934
12949
|
if (source === null)
|
12935
12950
|
throw new Error('File ' + path + ' does not exist.');
|
12951
|
+
// analyze should not have any side-effects e.g. calling `job.emitFile`
|
12952
|
+
// directly as this will not be included in the cachedAnalysis and won't
|
12953
|
+
// be emit for successive runs that leverage the cache
|
12936
12954
|
analyzeResult = await analyze_1.default(path, source.toString(), this);
|
12937
12955
|
this.analysisCache.set(path, analyzeResult);
|
12938
12956
|
}
|
@@ -12941,12 +12959,8 @@ class Job {
|
|
12941
12959
|
this.esmFileList.add(path_1.relative(this.base, path));
|
12942
12960
|
await Promise.all([
|
12943
12961
|
...[...assets].map(async (asset) => {
|
12944
|
-
|
12945
|
-
|
12946
|
-
this.ts && (ext === '.ts' || ext === '.tsx') && asset.startsWith(this.base) && asset.slice(this.base.length).indexOf(path_1.sep + 'node_modules' + path_1.sep) === -1)
|
12947
|
-
await this.emitDependency(asset, path);
|
12948
|
-
else
|
12949
|
-
await this.emitFile(asset, 'asset', path);
|
12962
|
+
await handlePjsonBoundary(asset);
|
12963
|
+
await this.emitFile(asset, 'asset', path);
|
12950
12964
|
}),
|
12951
12965
|
...[...deps].map(async (dep) => {
|
12952
12966
|
try {
|
@@ -13777,18 +13791,18 @@ const specialCases = {
|
|
13777
13791
|
emitAsset(path_1.resolve(path_1.dirname(id), '../data/geo.dat'));
|
13778
13792
|
}
|
13779
13793
|
},
|
13780
|
-
'pixelmatch'({ id,
|
13794
|
+
'pixelmatch'({ id, emitDependency }) {
|
13781
13795
|
if (id.endsWith('pixelmatch/index.js')) {
|
13782
|
-
|
13796
|
+
emitDependency(path_1.resolve(path_1.dirname(id), 'bin/pixelmatch'));
|
13783
13797
|
}
|
13784
13798
|
}
|
13785
13799
|
};
|
13786
|
-
async function handleSpecialCases({ id, ast, emitAsset, emitAssetDirectory, job }) {
|
13800
|
+
async function handleSpecialCases({ id, ast, emitDependency, emitAsset, emitAssetDirectory, job }) {
|
13787
13801
|
const pkgName = get_package_base_1.getPackageName(id);
|
13788
13802
|
const specialCase = specialCases[pkgName || ''];
|
13789
13803
|
id = id.replace(/\\/g, '/');
|
13790
13804
|
if (specialCase)
|
13791
|
-
await specialCase({ id, ast, emitAsset, emitAssetDirectory, job });
|
13805
|
+
await specialCase({ id, ast, emitDependency, emitAsset, emitAssetDirectory, job });
|
13792
13806
|
}
|
13793
13807
|
exports.default = handleSpecialCases;
|
13794
13808
|
;
|
@@ -46006,7 +46020,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
46006
46020
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
46007
46021
|
};
|
46008
46022
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
46009
|
-
exports.getMiddlewareManifest = exports.getMiddlewareBundle = exports.getSourceFilePathFromPage = exports.isDynamicRoute = exports.normalizePage = exports.getNextConfig = exports.normalizePackageJson = exports.validateEntrypoint = exports.excludeFiles = exports.getPrivateOutputs = exports.updateRouteSrc = exports.getNextServerPath = exports.normalizeIndexOutput = exports.getStaticFiles = exports.onPrerenderRoute = exports.onPrerenderRouteInitial = exports.detectLambdaLimitExceeding = exports.outputFunctionFileSizeInfo = exports.getPageLambdaGroups = exports.MAX_UNCOMPRESSED_LAMBDA_SIZE = exports.addLocaleOrDefault = exports.normalizeLocalePath = exports.getPrerenderManifest = exports.getRequiredServerFilesManifest = exports.getExportStatus = exports.getExportIntent = exports.createLambdaFromPseudoLayers = exports.createPseudoLayer = exports.ExperimentalTraceVersion = exports.collectTracedFiles = exports.getFilesMapFromReasons = exports.filterStaticPages = exports.getImagesManifest = exports.localizeDynamicRoutes = exports.getDynamicRoutes = exports.getRoutesManifest = void 0;
|
46023
|
+
exports.upgradeMiddlewareManifest = exports.getMiddlewareManifest = exports.getMiddlewareBundle = exports.getSourceFilePathFromPage = exports.isDynamicRoute = exports.normalizePage = exports.getNextConfig = exports.normalizePackageJson = exports.validateEntrypoint = exports.excludeFiles = exports.getPrivateOutputs = exports.updateRouteSrc = exports.getNextServerPath = exports.normalizeIndexOutput = exports.getStaticFiles = exports.onPrerenderRoute = exports.onPrerenderRouteInitial = exports.detectLambdaLimitExceeding = exports.outputFunctionFileSizeInfo = exports.getPageLambdaGroups = exports.MAX_UNCOMPRESSED_LAMBDA_SIZE = exports.addLocaleOrDefault = exports.normalizeLocalePath = exports.getPrerenderManifest = exports.getRequiredServerFilesManifest = exports.getExportStatus = exports.getExportIntent = exports.createLambdaFromPseudoLayers = exports.createPseudoLayer = exports.ExperimentalTraceVersion = exports.collectTracedFiles = exports.getFilesMapFromReasons = exports.filterStaticPages = exports.getImagesManifest = exports.localizeDynamicRoutes = exports.getDynamicRoutes = exports.getRoutesManifest = void 0;
|
46010
46024
|
const build_utils_1 = __webpack_require__(3445);
|
46011
46025
|
const async_sema_1 = __webpack_require__(7916);
|
46012
46026
|
const buffer_crc32_1 = __importDefault(__webpack_require__(360));
|
@@ -47423,7 +47437,7 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
47423
47437
|
}),
|
47424
47438
|
});
|
47425
47439
|
})(),
|
47426
|
-
|
47440
|
+
routeMatchers: getRouteMatchers(edgeFunction, routesManifest),
|
47427
47441
|
};
|
47428
47442
|
}
|
47429
47443
|
catch (e) {
|
@@ -47446,26 +47460,29 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
47446
47460
|
if (worker.type === 'function') {
|
47447
47461
|
continue;
|
47448
47462
|
}
|
47449
|
-
const
|
47450
|
-
|
47451
|
-
|
47452
|
-
|
47453
|
-
|
47454
|
-
|
47455
|
-
|
47456
|
-
|
47457
|
-
|
47458
|
-
|
47459
|
-
|
47460
|
-
|
47461
|
-
|
47462
|
-
route.
|
47463
|
-
|
47464
|
-
|
47465
|
-
|
47466
|
-
|
47467
|
-
|
47468
|
-
|
47463
|
+
for (const matcher of worker.routeMatchers) {
|
47464
|
+
const route = {
|
47465
|
+
continue: true,
|
47466
|
+
src: matcher.regexp,
|
47467
|
+
has: matcher.has,
|
47468
|
+
missing: [
|
47469
|
+
{
|
47470
|
+
type: 'header',
|
47471
|
+
key: 'x-prerender-revalidate',
|
47472
|
+
value: prerenderBypassToken,
|
47473
|
+
},
|
47474
|
+
],
|
47475
|
+
};
|
47476
|
+
route.middlewarePath = shortPath;
|
47477
|
+
if (isCorrectMiddlewareOrder) {
|
47478
|
+
route.override = true;
|
47479
|
+
}
|
47480
|
+
if (routesManifest.version > 3 && isDynamicRoute(worker.page)) {
|
47481
|
+
source.dynamicRouteMap.set(worker.page, route);
|
47482
|
+
}
|
47483
|
+
else {
|
47484
|
+
source.staticRoutes.push(route);
|
47485
|
+
}
|
47469
47486
|
}
|
47470
47487
|
}
|
47471
47488
|
return source;
|
@@ -47491,28 +47508,70 @@ async function getMiddlewareManifest(entryPath, outputDirectory) {
|
|
47491
47508
|
if (!hasManifest) {
|
47492
47509
|
return;
|
47493
47510
|
}
|
47494
|
-
|
47511
|
+
const manifest = (await fs_extra_1.default.readJSON(middlewareManifestPath));
|
47512
|
+
return manifest.version === 1
|
47513
|
+
? upgradeMiddlewareManifest(manifest)
|
47514
|
+
: manifest;
|
47495
47515
|
}
|
47496
47516
|
exports.getMiddlewareManifest = getMiddlewareManifest;
|
47517
|
+
function upgradeMiddlewareManifest(v1) {
|
47518
|
+
function updateInfo(v1Info) {
|
47519
|
+
const { regexp, ...rest } = v1Info;
|
47520
|
+
return {
|
47521
|
+
...rest,
|
47522
|
+
matchers: [{ regexp }],
|
47523
|
+
};
|
47524
|
+
}
|
47525
|
+
const middleware = Object.fromEntries(Object.entries(v1.middleware).map(([p, info]) => [p, updateInfo(info)]));
|
47526
|
+
const functions = v1.functions
|
47527
|
+
? Object.fromEntries(Object.entries(v1.functions).map(([p, info]) => [p, updateInfo(info)]))
|
47528
|
+
: undefined;
|
47529
|
+
return {
|
47530
|
+
...v1,
|
47531
|
+
version: 2,
|
47532
|
+
middleware,
|
47533
|
+
functions,
|
47534
|
+
};
|
47535
|
+
}
|
47536
|
+
exports.upgradeMiddlewareManifest = upgradeMiddlewareManifest;
|
47497
47537
|
/**
|
47498
47538
|
* For an object containing middleware info and a routes manifest this will
|
47499
47539
|
* generate a string with the route that will activate the middleware on
|
47500
47540
|
* Vercel Proxy.
|
47501
47541
|
*
|
47502
|
-
* @param param0 The middleware info including
|
47542
|
+
* @param param0 The middleware info including matchers and page.
|
47503
47543
|
* @param param1 The routes manifest
|
47504
|
-
* @returns
|
47544
|
+
* @returns matchers for the middleware route.
|
47505
47545
|
*/
|
47506
|
-
function
|
47507
|
-
|
47508
|
-
|
47509
|
-
|
47510
|
-
|
47511
|
-
|
47512
|
-
|
47513
|
-
|
47514
|
-
|
47515
|
-
|
47546
|
+
function getRouteMatchers(info, { basePath = '', i18n }) {
|
47547
|
+
function getRegexp(regexp) {
|
47548
|
+
if (info.page === '/') {
|
47549
|
+
return regexp;
|
47550
|
+
}
|
47551
|
+
const locale = i18n?.locales.length
|
47552
|
+
? `(?:/(${i18n.locales
|
47553
|
+
.map(locale => (0, escape_string_regexp_1.default)(locale))
|
47554
|
+
.join('|')}))?`
|
47555
|
+
: '';
|
47556
|
+
return `(?:^${basePath}${locale}${regexp.substring(1)})`;
|
47557
|
+
}
|
47558
|
+
function normalizeHas(has) {
|
47559
|
+
return has.map(v => v.type === 'header'
|
47560
|
+
? {
|
47561
|
+
...v,
|
47562
|
+
key: v.key.toLowerCase(),
|
47563
|
+
}
|
47564
|
+
: v);
|
47565
|
+
}
|
47566
|
+
return info.matchers.map(matcher => {
|
47567
|
+
const m = {
|
47568
|
+
regexp: getRegexp(matcher.regexp),
|
47569
|
+
};
|
47570
|
+
if (matcher.has) {
|
47571
|
+
m.has = normalizeHas(matcher.has);
|
47572
|
+
}
|
47573
|
+
return m;
|
47574
|
+
});
|
47516
47575
|
}
|
47517
47576
|
/**
|
47518
47577
|
* Makes the sources more human-readable in the source map
|
package/dist/utils.js
CHANGED
@@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
23
23
|
};
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25
|
-
exports.getMiddlewareManifest = exports.getMiddlewareBundle = exports.getSourceFilePathFromPage = exports.isDynamicRoute = exports.normalizePage = exports.getNextConfig = exports.normalizePackageJson = exports.validateEntrypoint = exports.excludeFiles = exports.getPrivateOutputs = exports.updateRouteSrc = exports.getNextServerPath = exports.normalizeIndexOutput = exports.getStaticFiles = exports.onPrerenderRoute = exports.onPrerenderRouteInitial = exports.detectLambdaLimitExceeding = exports.outputFunctionFileSizeInfo = exports.getPageLambdaGroups = exports.MAX_UNCOMPRESSED_LAMBDA_SIZE = exports.addLocaleOrDefault = exports.normalizeLocalePath = exports.getPrerenderManifest = exports.getRequiredServerFilesManifest = exports.getExportStatus = exports.getExportIntent = exports.createLambdaFromPseudoLayers = exports.createPseudoLayer = exports.ExperimentalTraceVersion = exports.collectTracedFiles = exports.getFilesMapFromReasons = exports.filterStaticPages = exports.getImagesManifest = exports.localizeDynamicRoutes = exports.getDynamicRoutes = exports.getRoutesManifest = void 0;
|
25
|
+
exports.upgradeMiddlewareManifest = exports.getMiddlewareManifest = exports.getMiddlewareBundle = exports.getSourceFilePathFromPage = exports.isDynamicRoute = exports.normalizePage = exports.getNextConfig = exports.normalizePackageJson = exports.validateEntrypoint = exports.excludeFiles = exports.getPrivateOutputs = exports.updateRouteSrc = exports.getNextServerPath = exports.normalizeIndexOutput = exports.getStaticFiles = exports.onPrerenderRoute = exports.onPrerenderRouteInitial = exports.detectLambdaLimitExceeding = exports.outputFunctionFileSizeInfo = exports.getPageLambdaGroups = exports.MAX_UNCOMPRESSED_LAMBDA_SIZE = exports.addLocaleOrDefault = exports.normalizeLocalePath = exports.getPrerenderManifest = exports.getRequiredServerFilesManifest = exports.getExportStatus = exports.getExportIntent = exports.createLambdaFromPseudoLayers = exports.createPseudoLayer = exports.ExperimentalTraceVersion = exports.collectTracedFiles = exports.getFilesMapFromReasons = exports.filterStaticPages = exports.getImagesManifest = exports.localizeDynamicRoutes = exports.getDynamicRoutes = exports.getRoutesManifest = void 0;
|
26
26
|
const build_utils_1 = require("@vercel/build-utils");
|
27
27
|
const async_sema_1 = require("async-sema");
|
28
28
|
const buffer_crc32_1 = __importDefault(require("buffer-crc32"));
|
@@ -1439,7 +1439,7 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
1439
1439
|
}),
|
1440
1440
|
});
|
1441
1441
|
})(),
|
1442
|
-
|
1442
|
+
routeMatchers: getRouteMatchers(edgeFunction, routesManifest),
|
1443
1443
|
};
|
1444
1444
|
}
|
1445
1445
|
catch (e) {
|
@@ -1462,26 +1462,29 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
1462
1462
|
if (worker.type === 'function') {
|
1463
1463
|
continue;
|
1464
1464
|
}
|
1465
|
-
const
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
route.
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1465
|
+
for (const matcher of worker.routeMatchers) {
|
1466
|
+
const route = {
|
1467
|
+
continue: true,
|
1468
|
+
src: matcher.regexp,
|
1469
|
+
has: matcher.has,
|
1470
|
+
missing: [
|
1471
|
+
{
|
1472
|
+
type: 'header',
|
1473
|
+
key: 'x-prerender-revalidate',
|
1474
|
+
value: prerenderBypassToken,
|
1475
|
+
},
|
1476
|
+
],
|
1477
|
+
};
|
1478
|
+
route.middlewarePath = shortPath;
|
1479
|
+
if (isCorrectMiddlewareOrder) {
|
1480
|
+
route.override = true;
|
1481
|
+
}
|
1482
|
+
if (routesManifest.version > 3 && isDynamicRoute(worker.page)) {
|
1483
|
+
source.dynamicRouteMap.set(worker.page, route);
|
1484
|
+
}
|
1485
|
+
else {
|
1486
|
+
source.staticRoutes.push(route);
|
1487
|
+
}
|
1485
1488
|
}
|
1486
1489
|
}
|
1487
1490
|
return source;
|
@@ -1507,28 +1510,70 @@ async function getMiddlewareManifest(entryPath, outputDirectory) {
|
|
1507
1510
|
if (!hasManifest) {
|
1508
1511
|
return;
|
1509
1512
|
}
|
1510
|
-
|
1513
|
+
const manifest = (await fs_extra_1.default.readJSON(middlewareManifestPath));
|
1514
|
+
return manifest.version === 1
|
1515
|
+
? upgradeMiddlewareManifest(manifest)
|
1516
|
+
: manifest;
|
1511
1517
|
}
|
1512
1518
|
exports.getMiddlewareManifest = getMiddlewareManifest;
|
1519
|
+
function upgradeMiddlewareManifest(v1) {
|
1520
|
+
function updateInfo(v1Info) {
|
1521
|
+
const { regexp, ...rest } = v1Info;
|
1522
|
+
return {
|
1523
|
+
...rest,
|
1524
|
+
matchers: [{ regexp }],
|
1525
|
+
};
|
1526
|
+
}
|
1527
|
+
const middleware = Object.fromEntries(Object.entries(v1.middleware).map(([p, info]) => [p, updateInfo(info)]));
|
1528
|
+
const functions = v1.functions
|
1529
|
+
? Object.fromEntries(Object.entries(v1.functions).map(([p, info]) => [p, updateInfo(info)]))
|
1530
|
+
: undefined;
|
1531
|
+
return {
|
1532
|
+
...v1,
|
1533
|
+
version: 2,
|
1534
|
+
middleware,
|
1535
|
+
functions,
|
1536
|
+
};
|
1537
|
+
}
|
1538
|
+
exports.upgradeMiddlewareManifest = upgradeMiddlewareManifest;
|
1513
1539
|
/**
|
1514
1540
|
* For an object containing middleware info and a routes manifest this will
|
1515
1541
|
* generate a string with the route that will activate the middleware on
|
1516
1542
|
* Vercel Proxy.
|
1517
1543
|
*
|
1518
|
-
* @param param0 The middleware info including
|
1544
|
+
* @param param0 The middleware info including matchers and page.
|
1519
1545
|
* @param param1 The routes manifest
|
1520
|
-
* @returns
|
1546
|
+
* @returns matchers for the middleware route.
|
1521
1547
|
*/
|
1522
|
-
function
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1548
|
+
function getRouteMatchers(info, { basePath = '', i18n }) {
|
1549
|
+
function getRegexp(regexp) {
|
1550
|
+
if (info.page === '/') {
|
1551
|
+
return regexp;
|
1552
|
+
}
|
1553
|
+
const locale = i18n?.locales.length
|
1554
|
+
? `(?:/(${i18n.locales
|
1555
|
+
.map(locale => (0, escape_string_regexp_1.default)(locale))
|
1556
|
+
.join('|')}))?`
|
1557
|
+
: '';
|
1558
|
+
return `(?:^${basePath}${locale}${regexp.substring(1)})`;
|
1559
|
+
}
|
1560
|
+
function normalizeHas(has) {
|
1561
|
+
return has.map(v => v.type === 'header'
|
1562
|
+
? {
|
1563
|
+
...v,
|
1564
|
+
key: v.key.toLowerCase(),
|
1565
|
+
}
|
1566
|
+
: v);
|
1567
|
+
}
|
1568
|
+
return info.matchers.map(matcher => {
|
1569
|
+
const m = {
|
1570
|
+
regexp: getRegexp(matcher.regexp),
|
1571
|
+
};
|
1572
|
+
if (matcher.has) {
|
1573
|
+
m.has = normalizeHas(matcher.has);
|
1574
|
+
}
|
1575
|
+
return m;
|
1576
|
+
});
|
1532
1577
|
}
|
1533
1578
|
/**
|
1534
1579
|
* Makes the sources more human-readable in the source map
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.22",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -44,8 +44,8 @@
|
|
44
44
|
"@types/semver": "6.0.0",
|
45
45
|
"@types/text-table": "0.2.1",
|
46
46
|
"@types/webpack-sources": "3.2.0",
|
47
|
-
"@vercel/build-utils": "5.
|
48
|
-
"@vercel/nft": "0.
|
47
|
+
"@vercel/build-utils": "5.4.0",
|
48
|
+
"@vercel/nft": "0.22.0",
|
49
49
|
"@vercel/routing-utils": "2.0.2",
|
50
50
|
"async-sema": "3.0.1",
|
51
51
|
"buffer-crc32": "0.2.13",
|
@@ -69,5 +69,5 @@
|
|
69
69
|
"typescript": "4.5.2",
|
70
70
|
"webpack-sources": "3.2.3"
|
71
71
|
},
|
72
|
-
"gitHead": "
|
72
|
+
"gitHead": "e7e0a55b72bc73c26661f7b2a3caa0884a5d1764"
|
73
73
|
}
|