@vercel/next 3.3.3 → 3.3.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 +33 -32
- package/dist/server-build.js +1 -11
- package/dist/utils.js +16 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -43970,6 +43970,20 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
|
|
43970
43970
|
});
|
43971
43971
|
}
|
43972
43972
|
(0, build_utils_1.debug)('build command exited');
|
43973
|
+
let buildOutputVersion;
|
43974
|
+
try {
|
43975
|
+
const data = await (0, fs_extra_1.readJSON)(path_1.default.join(outputDirectory, 'output/config.json'));
|
43976
|
+
buildOutputVersion = data.version;
|
43977
|
+
}
|
43978
|
+
catch (_) {
|
43979
|
+
// tolerate for older versions
|
43980
|
+
}
|
43981
|
+
if (buildOutputVersion) {
|
43982
|
+
return {
|
43983
|
+
buildOutputPath: path_1.default.join(outputDirectory, 'output'),
|
43984
|
+
buildOutputVersion,
|
43985
|
+
};
|
43986
|
+
}
|
43973
43987
|
let appMountPrefixNoTrailingSlash = path_1.default.posix
|
43974
43988
|
.join('/', entryDirectory)
|
43975
43989
|
.replace(/\/+$/, '');
|
@@ -44214,16 +44228,7 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
|
|
44214
44228
|
});
|
44215
44229
|
return {
|
44216
44230
|
output,
|
44217
|
-
images: imagesManifest
|
44218
|
-
? {
|
44219
|
-
domains: imagesManifest.images.domains,
|
44220
|
-
sizes: imagesManifest.images.sizes,
|
44221
|
-
remotePatterns: imagesManifest.images.remotePatterns,
|
44222
|
-
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
|
44223
|
-
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
|
44224
|
-
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
|
44225
|
-
}
|
44226
|
-
: undefined,
|
44231
|
+
images: (0, utils_1.getImagesConfig)(imagesManifest),
|
44227
44232
|
routes: [
|
44228
44233
|
...privateOutputs.routes,
|
44229
44234
|
...headers,
|
@@ -45165,16 +45170,7 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
|
|
45165
45170
|
...privateOutputs.files,
|
45166
45171
|
},
|
45167
45172
|
wildcard: wildcardConfig,
|
45168
|
-
images: imagesManifest
|
45169
|
-
? {
|
45170
|
-
domains: imagesManifest.images.domains,
|
45171
|
-
sizes: imagesManifest.images.sizes,
|
45172
|
-
remotePatterns: imagesManifest.images.remotePatterns,
|
45173
|
-
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
|
45174
|
-
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
|
45175
|
-
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
|
45176
|
-
}
|
45177
|
-
: undefined,
|
45173
|
+
images: (0, utils_1.getImagesConfig)(imagesManifest),
|
45178
45174
|
/*
|
45179
45175
|
Desired routes order
|
45180
45176
|
- Runtime headers
|
@@ -46590,17 +46586,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
46590
46586
|
}
|
46591
46587
|
return {
|
46592
46588
|
wildcard: wildcardConfig,
|
46593
|
-
images: imagesManifest
|
46594
|
-
? {
|
46595
|
-
domains: imagesManifest.images.domains,
|
46596
|
-
sizes: imagesManifest.images.sizes,
|
46597
|
-
remotePatterns: imagesManifest.images.remotePatterns,
|
46598
|
-
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
|
46599
|
-
formats: imagesManifest.images.formats,
|
46600
|
-
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
|
46601
|
-
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
|
46602
|
-
}
|
46603
|
-
: undefined,
|
46589
|
+
images: (0, utils_1.getImagesConfig)(imagesManifest),
|
46604
46590
|
output: {
|
46605
46591
|
...publicDirectoryFiles,
|
46606
46592
|
...lambdas,
|
@@ -47173,7 +47159,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47173
47159
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
47174
47160
|
};
|
47175
47161
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
47176
|
-
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 = exports.prettyBytes = exports.MIB = exports.KIB = void 0;
|
47162
|
+
exports.upgradeMiddlewareManifest = exports.getMiddlewareManifest = exports.getMiddlewareBundle = exports.getSourceFilePathFromPage = exports.isDynamicRoute = exports.normalizePage = exports.getImagesConfig = 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 = exports.prettyBytes = exports.MIB = exports.KIB = void 0;
|
47177
47163
|
const build_utils_1 = __webpack_require__(3445);
|
47178
47164
|
const async_sema_1 = __webpack_require__(7916);
|
47179
47165
|
const buffer_crc32_1 = __importDefault(__webpack_require__(360));
|
@@ -47281,6 +47267,21 @@ async function getNextConfig(workPath, entryPath) {
|
|
47281
47267
|
return null;
|
47282
47268
|
}
|
47283
47269
|
exports.getNextConfig = getNextConfig;
|
47270
|
+
function getImagesConfig(imagesManifest) {
|
47271
|
+
return imagesManifest?.images?.loader === 'default' &&
|
47272
|
+
imagesManifest.images?.unoptimized !== true
|
47273
|
+
? {
|
47274
|
+
domains: imagesManifest.images.domains,
|
47275
|
+
sizes: imagesManifest.images.sizes,
|
47276
|
+
remotePatterns: imagesManifest.images.remotePatterns,
|
47277
|
+
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
|
47278
|
+
formats: imagesManifest.images.formats,
|
47279
|
+
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
|
47280
|
+
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
|
47281
|
+
}
|
47282
|
+
: undefined;
|
47283
|
+
}
|
47284
|
+
exports.getImagesConfig = getImagesConfig;
|
47284
47285
|
function normalizePage(page) {
|
47285
47286
|
// Resolve on anything that doesn't start with `/`
|
47286
47287
|
if (!page.startsWith('/')) {
|
package/dist/server-build.js
CHANGED
@@ -680,17 +680,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
680
680
|
}
|
681
681
|
return {
|
682
682
|
wildcard: wildcardConfig,
|
683
|
-
images: imagesManifest
|
684
|
-
? {
|
685
|
-
domains: imagesManifest.images.domains,
|
686
|
-
sizes: imagesManifest.images.sizes,
|
687
|
-
remotePatterns: imagesManifest.images.remotePatterns,
|
688
|
-
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
|
689
|
-
formats: imagesManifest.images.formats,
|
690
|
-
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
|
691
|
-
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
|
692
|
-
}
|
693
|
-
: undefined,
|
683
|
+
images: (0, utils_1.getImagesConfig)(imagesManifest),
|
694
684
|
output: {
|
695
685
|
...publicDirectoryFiles,
|
696
686
|
...lambdas,
|
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.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 = exports.prettyBytes = exports.MIB = exports.KIB = void 0;
|
25
|
+
exports.upgradeMiddlewareManifest = exports.getMiddlewareManifest = exports.getMiddlewareBundle = exports.getSourceFilePathFromPage = exports.isDynamicRoute = exports.normalizePage = exports.getImagesConfig = 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 = exports.prettyBytes = exports.MIB = exports.KIB = 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"));
|
@@ -130,6 +130,21 @@ async function getNextConfig(workPath, entryPath) {
|
|
130
130
|
return null;
|
131
131
|
}
|
132
132
|
exports.getNextConfig = getNextConfig;
|
133
|
+
function getImagesConfig(imagesManifest) {
|
134
|
+
return imagesManifest?.images?.loader === 'default' &&
|
135
|
+
imagesManifest.images?.unoptimized !== true
|
136
|
+
? {
|
137
|
+
domains: imagesManifest.images.domains,
|
138
|
+
sizes: imagesManifest.images.sizes,
|
139
|
+
remotePatterns: imagesManifest.images.remotePatterns,
|
140
|
+
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
|
141
|
+
formats: imagesManifest.images.formats,
|
142
|
+
dangerouslyAllowSVG: imagesManifest.images.dangerouslyAllowSVG,
|
143
|
+
contentSecurityPolicy: imagesManifest.images.contentSecurityPolicy,
|
144
|
+
}
|
145
|
+
: undefined;
|
146
|
+
}
|
147
|
+
exports.getImagesConfig = getImagesConfig;
|
133
148
|
function normalizePage(page) {
|
134
149
|
// Resolve on anything that doesn't start with `/`
|
135
150
|
if (!page.startsWith('/')) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.3.
|
3
|
+
"version": "3.3.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.7.
|
48
|
+
"@vercel/build-utils": "5.7.2",
|
49
49
|
"@vercel/nft": "0.22.1",
|
50
50
|
"@vercel/routing-utils": "2.1.3",
|
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": "cb29bfdd684893cace5454f50a11a777407a9e45"
|
74
74
|
}
|