@vercel/next 4.2.18 → 4.3.0

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 +29 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -11698,6 +11698,7 @@ var src_exports = {};
11698
11698
  __export(src_exports, {
11699
11699
  MAX_AGE_ONE_YEAR: () => MAX_AGE_ONE_YEAR,
11700
11700
  build: () => build,
11701
+ diagnostics: () => diagnostics,
11701
11702
  htmlContentType: () => htmlContentType,
11702
11703
  prepareCache: () => prepareCache,
11703
11704
  version: () => version
@@ -18187,6 +18188,33 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18187
18188
  framework: { version: nextVersion }
18188
18189
  };
18189
18190
  };
18191
+ var diagnostics = async ({
18192
+ config,
18193
+ entrypoint,
18194
+ workPath,
18195
+ repoRootPath
18196
+ }) => {
18197
+ const entryDirectory = import_path5.default.dirname(entrypoint);
18198
+ const entryPath = import_path5.default.join(workPath, entryDirectory);
18199
+ const outputDirectory = import_path5.default.join("./", config.outputDirectory || ".next");
18200
+ const basePath = repoRootPath || workPath;
18201
+ const diagnosticsEntrypoint = import_path5.default.relative(basePath, entryPath);
18202
+ (0, import_build_utils3.debug)(
18203
+ `Reading diagnostics file in diagnosticsEntrypoint=${diagnosticsEntrypoint}`
18204
+ );
18205
+ return {
18206
+ // Collect output in `.next/diagnostics`
18207
+ ...await (0, import_build_utils3.glob)(
18208
+ "diagnostics/*",
18209
+ import_path5.default.join(basePath, diagnosticsEntrypoint, outputDirectory, "diagnostics")
18210
+ ),
18211
+ // Collect `.next/trace` file
18212
+ ...await (0, import_build_utils3.glob)(
18213
+ "trace",
18214
+ import_path5.default.join(basePath, diagnosticsEntrypoint, outputDirectory)
18215
+ )
18216
+ };
18217
+ };
18190
18218
  var prepareCache = async ({
18191
18219
  workPath,
18192
18220
  repoRootPath,
@@ -18223,6 +18251,7 @@ var prepareCache = async ({
18223
18251
  0 && (module.exports = {
18224
18252
  MAX_AGE_ONE_YEAR,
18225
18253
  build,
18254
+ diagnostics,
18226
18255
  htmlContentType,
18227
18256
  prepareCache,
18228
18257
  version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.2.18",
3
+ "version": "4.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -30,7 +30,7 @@
30
30
  "@types/semver": "6.0.0",
31
31
  "@types/text-table": "0.2.1",
32
32
  "@types/webpack-sources": "3.2.0",
33
- "@vercel/build-utils": "8.2.2",
33
+ "@vercel/build-utils": "8.3.0",
34
34
  "@vercel/routing-utils": "3.1.0",
35
35
  "async-sema": "3.0.1",
36
36
  "buffer-crc32": "0.2.13",