@netlify/plugin-nextjs 5.8.0 → 5.9.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 (47) hide show
  1. package/README.md +3 -2
  2. package/dist/build/advanced-api-routes.js +4 -136
  3. package/dist/build/cache.js +4 -25
  4. package/dist/build/content/prerendered.js +11 -272
  5. package/dist/build/content/server.js +11 -219
  6. package/dist/build/content/static.js +14 -97
  7. package/dist/build/functions/edge.js +7 -534
  8. package/dist/build/functions/server.js +11 -130
  9. package/dist/build/image-cdn.js +3 -1599
  10. package/dist/build/plugin-context.js +6 -266
  11. package/dist/build/templates/handler-monorepo.tmpl.js +1 -1
  12. package/dist/build/templates/handler.tmpl.js +1 -1
  13. package/dist/build/verification.js +9 -104
  14. package/dist/esm-chunks/chunk-72ZI2IVI.js +36 -0
  15. package/dist/esm-chunks/chunk-AMY4NOT5.js +1610 -0
  16. package/dist/esm-chunks/chunk-BEIUVQZK.js +212 -0
  17. package/dist/esm-chunks/chunk-BFYMHE3E.js +548 -0
  18. package/dist/esm-chunks/chunk-BVYZSEV6.js +306 -0
  19. package/dist/esm-chunks/chunk-DLVROEVU.js +144 -0
  20. package/dist/esm-chunks/chunk-GFYWJNQR.js +305 -0
  21. package/dist/esm-chunks/chunk-HWMLYAVP.js +122 -0
  22. package/dist/esm-chunks/chunk-IJZEDP6B.js +235 -0
  23. package/dist/esm-chunks/chunk-K4RDUZYO.js +609 -0
  24. package/dist/esm-chunks/chunk-KBX7SJLC.js +73 -0
  25. package/dist/esm-chunks/chunk-NDSDIXRD.js +122 -0
  26. package/dist/esm-chunks/chunk-TYCYFZ22.js +25 -0
  27. package/dist/esm-chunks/chunk-UYKENJEU.js +19 -0
  28. package/dist/esm-chunks/chunk-XS27YRA5.js +34 -0
  29. package/dist/esm-chunks/chunk-ZENB67PD.js +148 -0
  30. package/dist/esm-chunks/chunk-ZSVHJNNY.js +120 -0
  31. package/dist/esm-chunks/next-4L47PQSM.js +569 -0
  32. package/dist/esm-chunks/{package-4GFWM3PF.js → package-LCNINN36.js} +8 -7
  33. package/dist/index.js +39 -18
  34. package/dist/run/config.js +4 -1
  35. package/dist/run/constants.js +5 -7
  36. package/dist/run/handlers/cache.cjs +1618 -31
  37. package/dist/run/handlers/request-context.cjs +6 -2
  38. package/dist/run/handlers/server.js +40 -20
  39. package/dist/run/handlers/tracer.cjs +83 -2
  40. package/dist/run/handlers/tracing.js +4 -2
  41. package/dist/run/handlers/wait-until.cjs +122 -0
  42. package/dist/run/headers.js +9 -194
  43. package/dist/run/next.cjs +1604 -18
  44. package/dist/run/regional-blob-store.cjs +1 -1
  45. package/dist/run/revalidate.js +3 -24
  46. package/dist/shared/blobkey.js +3 -15
  47. package/package.json +4 -4
@@ -601,7 +601,7 @@ var getDeployStore = (input = {}) => {
601
601
  if (clientOptions.edgeURL || clientOptions.uncachedEdgeURL) {
602
602
  if (!context.primaryRegion) {
603
603
  throw new Error(
604
- "When accessing a deploy store, the Netlify Blobs client needs to be configured with a region, and one was not found in the environment. To manually set the region, set the `region` property in the `getDeployStore` options."
604
+ "When accessing a deploy store, the Netlify Blobs client needs to be configured with a region, and one was not found in the environment. To manually set the region, set the `region` property in the `getDeployStore` options. If you are using the Netlify CLI, you may have an outdated version; run `npm install -g netlify-cli@latest` to update and try again."
605
605
  );
606
606
  }
607
607
  clientOptions.region = context.primaryRegion;
@@ -4,31 +4,10 @@
4
4
  return createRequire(import.meta.url);
5
5
  })();
6
6
 
7
+ import {
8
+ nextResponseProxy
9
+ } from "../esm-chunks/chunk-XS27YRA5.js";
7
10
  import "../esm-chunks/chunk-OEQOKJGE.js";
8
-
9
- // src/run/revalidate.ts
10
- import { isPromise } from "node:util/types";
11
- function isRevalidateMethod(key, nextResponseField) {
12
- return key === "revalidate" && typeof nextResponseField === "function";
13
- }
14
- var nextResponseProxy = (res, requestContext) => {
15
- return new Proxy(res, {
16
- get(target, key) {
17
- const originalValue = Reflect.get(target, key);
18
- if (isRevalidateMethod(key, originalValue)) {
19
- return function newRevalidate(...args) {
20
- requestContext.didPagesRouterOnDemandRevalidate = true;
21
- const result = originalValue.apply(target, args);
22
- if (result && isPromise(result)) {
23
- requestContext.trackBackgroundWork(result);
24
- }
25
- return result;
26
- };
27
- }
28
- return originalValue;
29
- }
30
- });
31
- };
32
11
  export {
33
12
  nextResponseProxy
34
13
  };
@@ -4,22 +4,10 @@
4
4
  return createRequire(import.meta.url);
5
5
  })();
6
6
 
7
+ import {
8
+ encodeBlobKey
9
+ } from "../esm-chunks/chunk-TYCYFZ22.js";
7
10
  import "../esm-chunks/chunk-OEQOKJGE.js";
8
-
9
- // src/shared/blobkey.ts
10
- import { Buffer } from "node:buffer";
11
- import { webcrypto as crypto } from "node:crypto";
12
- var maxLength = 180;
13
- async function encodeBlobKey(key) {
14
- const buffer = Buffer.from(key);
15
- const base64 = buffer.toString("base64url");
16
- if (base64.length <= maxLength) {
17
- return base64;
18
- }
19
- const digest = await crypto.subtle.digest("SHA-256", buffer);
20
- const hash = Buffer.from(digest).toString("base64url");
21
- return `${base64.slice(0, maxLength - hash.length - 1)}-${hash}`;
22
- }
23
11
  export {
24
12
  encodeBlobKey
25
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "5.8.0",
3
+ "version": "5.9.0",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://github.com/netlify/next-runtime.git"
17
+ "url": "git+https://github.com/opennextjs/opennextjs-netlify.git"
18
18
  },
19
19
  "keywords": [
20
20
  "nextjs",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "license": "MIT",
26
26
  "bugs": {
27
- "url": "https://github.com/netlify/next-runtime/issues"
27
+ "url": "https://github.com/opennextjs/opennextjs-netlify/issues"
28
28
  },
29
- "homepage": "https://github.com/netlify/next-runtime#readme"
29
+ "homepage": "https://opennext.js.org/netlify"
30
30
  }