@semiont/frontend 0.3.2 → 0.3.4
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/package.json +1 -1
- package/standalone/apps/frontend/.next/BUILD_ID +1 -1
- package/standalone/apps/frontend/.next/app-path-routes-manifest.json +5 -5
- package/standalone/apps/frontend/.next/build-manifest.json +6 -6
- package/standalone/apps/frontend/.next/prerender-manifest.json +3 -3
- package/standalone/apps/frontend/.next/react-loadable-manifest.json +2 -2
- package/standalone/apps/frontend/.next/required-server-files.json +18 -6
- package/standalone/apps/frontend/.next/routes-manifest.json +1 -0
- package/standalone/apps/frontend/.next/server/app/[locale]/about/page.js +776 -516
- package/standalone/apps/frontend/.next/server/app/[locale]/about/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/about/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page.js +1718 -1455
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page.js +724 -461
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/page.js +370 -109
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page.js +581 -318
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page.js +449 -186
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page.js +430 -168
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route.js +31 -16
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page.js +388 -126
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page.js +537 -275
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page.js +388 -126
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page.js +745 -482
- package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page.js +366 -103
- package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/page.js +600 -339
- package/standalone/apps/frontend/.next/server/app/[locale]/know/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page.js +956 -691
- package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page.js +1699 -1436
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page.js +390 -127
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page.js +1779 -1518
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page.js +1601 -1338
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page.js +2048 -1785
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/page.js +462 -204
- package/standalone/apps/frontend/.next/server/app/[locale]/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page.js +476 -216
- package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/terms/page.js +489 -229
- package/standalone/apps/frontend/.next/server/app/[locale]/terms/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/[locale]/terms/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/_global-error/page.js +627 -240
- package/standalone/apps/frontend/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/_global-error.html +1 -2
- package/standalone/apps/frontend/.next/server/app/_global-error.rsc +13 -9
- package/standalone/apps/frontend/.next/server/app/_global-error.segments/_full.segment.rsc +13 -9
- package/standalone/apps/frontend/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/standalone/apps/frontend/.next/server/app/_global-error.segments/_global-error.segment.rsc +2 -1
- package/standalone/apps/frontend/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/standalone/apps/frontend/.next/server/app/_global-error.segments/_index.segment.rsc +2 -1
- package/standalone/apps/frontend/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found/page.js +814 -559
- package/standalone/apps/frontend/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found.html +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found.rsc +8 -6
- package/standalone/apps/frontend/.next/server/app/_not-found.segments/_full.segment.rsc +8 -6
- package/standalone/apps/frontend/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/standalone/apps/frontend/.next/server/app/_not-found.segments/_not-found.segment.rsc +2 -1
- package/standalone/apps/frontend/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route.js +54 -39
- package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route.js +49 -34
- package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/api/cookies/export/route.js +24 -9
- package/standalone/apps/frontend/.next/server/app/api/cookies/export/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/api/cookies/export/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route.js +24 -9
- package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route.js.nft.json +1 -1
- package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route_client-reference-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/app-paths-manifest.json +5 -5
- package/standalone/apps/frontend/.next/server/chunks/2617.js +43 -7
- package/standalone/apps/frontend/.next/server/chunks/3144.js +7 -3
- package/standalone/apps/frontend/.next/server/chunks/4741.js +60 -252
- package/standalone/apps/frontend/.next/server/chunks/730.js +1 -1
- package/standalone/apps/frontend/.next/server/chunks/7420.js +21 -288
- package/standalone/apps/frontend/.next/server/chunks/7873.js +24 -2
- package/standalone/apps/frontend/.next/server/chunks/{7246.js → 8569.js} +1169 -282
- package/standalone/apps/frontend/.next/server/chunks/{2628.js → 9927.js} +11422 -4290
- package/standalone/apps/frontend/.next/server/middleware-build-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/standalone/apps/frontend/.next/server/middleware.js +17991 -10692
- package/standalone/apps/frontend/.next/server/pages/404.html +1 -1
- package/standalone/apps/frontend/.next/server/pages/500.html +1 -2
- package/standalone/apps/frontend/.next/server/prefetch-hints.json +1 -0
- package/standalone/apps/frontend/.next/server/server-reference-manifest.json +1 -1
- package/standalone/apps/frontend/.next/static/I_XveRdyStDMqYJPcAAy5/_buildManifest.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/1315.3f76aa23520d903e.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/{432.4c1d971431c60454.js → 432.8cb455bfe72957a9.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/87c73c54-e11922cda838f8cc.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/{891cff7f-c20ce667b1225aa7.js → 891cff7f-d7677a8f46c597cc.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/admin/{layout-4b67f7b5d5ba4728.js → layout-956ba0ffa1199bff.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/{layout-f76e1916749e66f6.js → layout-262d8dd6c6e33738.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/{layout-a403fd7a4877cc04.js → layout-c072ce8c7aeaa92e.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/app/[locale]/moderate/{layout-2d4e9c2be4b4a4c7.js → layout-b60605082e447f42.js} +1 -1
- package/standalone/apps/frontend/.next/static/chunks/common-42653c14d34c8864.js +69 -0
- package/standalone/apps/frontend/.next/static/chunks/framework-b879567b90d34fb5.js +1 -0
- package/standalone/apps/frontend/.next/static/chunks/vendors-63213253c18580f4.js +40 -0
- package/standalone/apps/frontend/.next/static/chunks/{webpack-abf2ad17f175f867.js → webpack-a0284d55d288650f.js} +1 -1
- package/standalone/apps/frontend/package.json +5 -5
- package/standalone/apps/frontend/server.js +1 -1
- package/standalone/node_modules/@next/env/package.json +1 -1
- package/standalone/node_modules/next/dist/build/adapter/setup-node-env.external.js +15 -0
- package/standalone/node_modules/next/dist/build/analysis/extract-const-value.js +78 -63
- package/standalone/node_modules/next/dist/build/analysis/get-page-static-info.js +64 -40
- package/standalone/node_modules/next/dist/build/create-compiler-aliases.js +2 -0
- package/standalone/node_modules/next/dist/build/define-env.js +29 -11
- package/standalone/node_modules/next/dist/build/duration-to-string.js +1 -1
- package/standalone/node_modules/next/dist/build/entries.js +55 -295
- package/standalone/node_modules/next/dist/build/file-classifier.js +76 -0
- package/standalone/node_modules/next/dist/build/get-supported-browsers.js +38 -0
- package/standalone/node_modules/next/dist/build/load-jsconfig.js +7 -7
- package/standalone/node_modules/next/dist/build/lockfile.js +90 -9
- package/standalone/node_modules/next/dist/build/next-config-ts/transpile-config.js +128 -49
- package/standalone/node_modules/next/dist/build/print-build-errors.js +72 -0
- package/standalone/node_modules/next/dist/build/route-discovery.js +353 -0
- package/standalone/node_modules/next/dist/build/segment-config/app/app-segment-config.js +34 -17
- package/standalone/node_modules/next/dist/build/static-paths/app.js +68 -15
- package/standalone/node_modules/next/dist/build/static-paths/pages.js +3 -3
- package/standalone/node_modules/next/dist/build/swc/index.js +125 -48
- package/standalone/node_modules/next/dist/build/swc/loaderWorkerPool.js +40 -0
- package/standalone/node_modules/next/dist/build/swc/options.js +23 -6
- package/standalone/node_modules/next/dist/build/utils.js +48 -94
- package/standalone/node_modules/next/dist/build/webpack/config/blocks/css/index.js +14 -3
- package/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/global.js +4 -2
- package/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/modules.js +4 -2
- package/standalone/node_modules/next/dist/build/webpack/config/blocks/css/loaders/next-font.js +1 -0
- package/standalone/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js +5 -5
- package/standalone/node_modules/next/dist/build/webpack/config/index.js +3 -2
- package/standalone/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js +2 -1
- package/standalone/node_modules/next/dist/build/webpack/loaders/css-loader/src/plugins/postcss-url-parser.js +8 -1
- package/standalone/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/loader.js +13 -4
- package/standalone/node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js +3 -1
- package/standalone/node_modules/next/dist/build/webpack/plugins/build-manifest-plugin-utils.js +2 -16
- package/standalone/node_modules/next/dist/build/webpack/plugins/build-manifest-plugin.js +2 -2
- package/standalone/node_modules/next/dist/build/webpack/plugins/deferred-entries-plugin.js +106 -0
- package/standalone/node_modules/next/dist/build/webpack/plugins/flight-client-entry-plugin.js +16 -8
- package/standalone/node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.js +24 -11
- package/standalone/node_modules/next/dist/build/webpack/plugins/middleware-plugin.js +21 -2
- package/standalone/node_modules/next/dist/build/webpack/plugins/next-types-plugin/index.js +6 -5
- package/standalone/node_modules/next/dist/build/webpack/plugins/nextjs-require-cache-hot-reloader.js +10 -14
- package/standalone/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.js +18 -4
- package/standalone/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseScss.js +5 -4
- package/standalone/node_modules/next/dist/build/webpack-config.js +18 -8
- package/standalone/node_modules/next/dist/cli/next-test.js +4 -3
- package/standalone/node_modules/next/dist/client/app-find-source-map-url.js +2 -1
- package/standalone/node_modules/next/dist/client/components/app-router-headers.js +10 -0
- package/standalone/node_modules/next/dist/client/components/app-router-instance.js +82 -4
- package/standalone/node_modules/next/dist/client/components/app-router.js +39 -20
- package/standalone/node_modules/next/dist/client/components/builtin/app-error.js +29 -65
- package/standalone/node_modules/next/dist/client/components/builtin/error-styles.js +165 -0
- package/standalone/node_modules/next/dist/client/components/builtin/global-error.js +56 -38
- package/standalone/node_modules/next/dist/client/components/error-boundary.js +16 -6
- package/standalone/node_modules/next/dist/client/components/forbidden.js +1 -1
- package/standalone/node_modules/next/dist/client/components/handle-isr-error.js +3 -4
- package/standalone/node_modules/next/dist/client/components/links.js +7 -0
- package/standalone/node_modules/next/dist/client/components/navigation-untracked.js +2 -0
- package/standalone/node_modules/next/dist/client/components/navigation.js +27 -0
- package/standalone/node_modules/next/dist/client/components/navigation.react-server.js +5 -2
- package/standalone/node_modules/next/dist/client/components/not-found.js +1 -1
- package/standalone/node_modules/next/dist/client/components/redirect-boundary.js +1 -1
- package/standalone/node_modules/next/dist/client/components/redirect-error.js +0 -9
- package/standalone/node_modules/next/dist/client/components/redirect.js +2 -2
- package/standalone/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js +73 -0
- package/standalone/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +102 -8
- package/standalone/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +165 -48
- package/standalone/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +19 -11
- package/standalone/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +669 -457
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/committed-state.js +49 -0
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js +19 -20
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +5 -117
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +34 -19
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +16 -32
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +85 -57
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +12 -10
- package/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +10 -1
- package/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer.js +1 -1
- package/standalone/node_modules/next/dist/client/components/segment-cache/bfcache.js +128 -0
- package/standalone/node_modules/next/dist/client/components/segment-cache/cache.js +732 -231
- package/standalone/node_modules/next/dist/client/components/segment-cache/lru.js +13 -6
- package/standalone/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +194 -0
- package/standalone/node_modules/next/dist/client/components/segment-cache/navigation.js +388 -250
- package/standalone/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +543 -0
- package/standalone/node_modules/next/dist/client/components/segment-cache/scheduler.js +154 -55
- package/standalone/node_modules/next/dist/client/components/segment-cache/vary-path.js +63 -1
- package/standalone/node_modules/next/dist/client/components/unauthorized.js +1 -1
- package/standalone/node_modules/next/dist/client/components/use-action-queue.js +49 -3
- package/standalone/node_modules/next/dist/client/dev/hot-reloader/app/hot-reloader-app.js +9 -1
- package/standalone/node_modules/next/dist/client/flight-data-helpers.js +42 -29
- package/standalone/node_modules/next/dist/client/lib/javascript-url.js +32 -0
- package/standalone/node_modules/next/dist/client/lib/promise.js +53 -0
- package/standalone/node_modules/next/dist/client/{app-build-id.js → navigation-build-id.js} +17 -13
- package/standalone/node_modules/next/dist/client/react-client-callbacks/on-recoverable-error.js +14 -0
- package/standalone/node_modules/next/dist/client/route-loader.js +9 -46
- package/standalone/node_modules/next/dist/client/router.js +1 -1
- package/standalone/node_modules/next/dist/compiled/@next/font/dist/google/font-data.json +74 -3
- package/standalone/node_modules/next/dist/compiled/babel/bundle.js +1 -1
- package/standalone/node_modules/next/dist/compiled/babel-packages/packages-bundle.js +4 -4
- package/standalone/node_modules/next/dist/compiled/browserslist/index.js +1 -1
- package/standalone/node_modules/next/dist/compiled/http-proxy/index.js +5 -5
- package/standalone/node_modules/next/dist/compiled/next-devtools/index.js +2209 -23
- package/standalone/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +42 -12
- package/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +42 -12
- package/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +42 -12
- package/standalone/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +42 -12
- package/standalone/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +2 -2
- package/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +10 -10
- package/standalone/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +10 -10
- package/standalone/node_modules/next/dist/compiled/react-is/package.json +1 -1
- package/standalone/node_modules/next/dist/compiled/tar/index.min.js +1 -0
- package/standalone/node_modules/next/dist/compiled/tar/package.json +1 -1
- package/standalone/node_modules/next/dist/compiled/unistore/unistore.js +1 -1
- package/standalone/node_modules/next/dist/lib/bundler.js +97 -0
- package/standalone/node_modules/next/dist/lib/constants.js +19 -4
- package/standalone/node_modules/next/dist/lib/download-swc.js +2 -2
- package/standalone/node_modules/next/dist/lib/find-root.js +11 -7
- package/standalone/node_modules/next/dist/lib/format-server-error.js +1 -0
- package/standalone/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +3 -20
- package/standalone/node_modules/next/dist/lib/interop-default.js +1 -0
- package/standalone/node_modules/next/dist/lib/is-interception-route-rewrite.js +18 -0
- package/standalone/node_modules/next/dist/lib/load-custom-routes.js +49 -5
- package/standalone/node_modules/next/dist/lib/memory/trace.js +109 -0
- package/standalone/node_modules/next/dist/lib/metadata/get-metadata-route.js +11 -2
- package/standalone/node_modules/next/dist/lib/needs-experimental-react.js +2 -2
- package/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +5 -5
- package/standalone/node_modules/next/dist/lib/try-to-parse-path.js +1 -2
- package/standalone/node_modules/next/dist/lib/turbopack-warning.js +0 -1
- package/standalone/node_modules/next/dist/lib/typescript/diagnosticFormatter.js +6 -3
- package/standalone/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +1 -1
- package/standalone/node_modules/next/dist/lib/typescript/missingDependencyError.js +1 -1
- package/standalone/node_modules/next/dist/lib/typescript/runTypeCheck.js +6 -8
- package/standalone/node_modules/next/dist/lib/typescript/type-paths.js +7 -12
- package/standalone/node_modules/next/dist/lib/typescript/writeAppTypeDeclarations.js +17 -7
- package/standalone/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +9 -12
- package/standalone/node_modules/next/dist/lib/verify-typescript-setup.js +66 -16
- package/standalone/node_modules/next/dist/next-devtools/server/shared.js +6 -10
- package/standalone/node_modules/next/dist/next-devtools/shared/webpack-module-path.js +4 -4
- package/standalone/node_modules/next/dist/next-devtools/userspace/app/app-dev-overlay-error-boundary.js +22 -4
- package/standalone/node_modules/next/dist/next-devtools/userspace/app/errors/stitched-error.js +7 -1
- package/standalone/node_modules/next/dist/next-devtools/userspace/app/forward-logs.js +18 -13
- package/standalone/node_modules/next/dist/next-devtools/userspace/app/segment-explorer-node.js +7 -4
- package/standalone/node_modules/next/dist/server/app-render/action-handler.js +83 -15
- package/standalone/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +0 -82
- package/standalone/node_modules/next/dist/server/app-render/app-render-render-utils.js +45 -81
- package/standalone/node_modules/next/dist/server/app-render/app-render.js +1746 -803
- package/standalone/node_modules/next/dist/server/app-render/create-component-tree.js +136 -50
- package/standalone/node_modules/next/dist/server/app-render/create-error-handler.js +6 -4
- package/standalone/node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js +52 -26
- package/standalone/node_modules/next/dist/server/app-render/csrf-protection.js +14 -3
- package/standalone/node_modules/next/dist/server/app-render/debug-channel-server.js +30 -0
- package/standalone/node_modules/next/dist/server/app-render/debug-channel-server.web.js +71 -0
- package/standalone/node_modules/next/dist/server/app-render/dynamic-rendering.js +353 -37
- package/standalone/node_modules/next/dist/server/app-render/get-asset-query-string.js +2 -2
- package/standalone/node_modules/next/dist/server/app-render/get-layer-assets.js +1 -1
- package/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +13 -0
- package/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +18 -0
- package/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-config.js +181 -0
- package/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-samples-client.js +128 -0
- package/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +432 -0
- package/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-validation-error.js +33 -0
- package/standalone/node_modules/next/dist/server/app-render/instant-validation/stream-utils.js +96 -0
- package/standalone/node_modules/next/dist/server/app-render/manifests-singleton.js +8 -1
- package/standalone/node_modules/next/dist/server/app-render/postponed-state.js +2 -1
- package/standalone/node_modules/next/dist/server/app-render/prospective-render-utils.js +1 -0
- package/standalone/node_modules/next/dist/server/app-render/segment-explorer-path.js +35 -10
- package/standalone/node_modules/next/dist/server/app-render/staged-rendering.js +142 -72
- package/standalone/node_modules/next/dist/server/app-render/stale-time.js +111 -0
- package/standalone/node_modules/next/dist/server/app-render/stream-ops.js +106 -0
- package/standalone/node_modules/next/dist/server/app-render/stream-ops.web.js +163 -0
- package/standalone/node_modules/next/dist/server/app-render/types.js +10 -4
- package/standalone/node_modules/next/dist/server/app-render/use-flight-response.js +3 -1
- package/standalone/node_modules/next/dist/server/app-render/vary-params.js +336 -0
- package/standalone/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +59 -12
- package/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +54 -26
- package/standalone/node_modules/next/dist/server/async-storage/request-store.js +4 -4
- package/standalone/node_modules/next/dist/server/async-storage/work-store.js +2 -5
- package/standalone/node_modules/next/dist/server/base-server.js +65 -53
- package/standalone/node_modules/next/dist/server/config-schema.js +93 -8
- package/standalone/node_modules/next/dist/server/config-shared.js +57 -7
- package/standalone/node_modules/next/dist/server/config.js +96 -25
- package/standalone/node_modules/next/dist/server/dev/browser-logs/file-logger.js +9 -6
- package/standalone/node_modules/next/dist/server/dev/browser-logs/receive-logs.js +46 -0
- package/standalone/node_modules/next/dist/server/dev/browser-logs/source-map.js +1 -4
- package/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +264 -33
- package/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +8 -4
- package/standalone/node_modules/next/dist/server/dev/log-requests.js +10 -2
- package/standalone/node_modules/next/dist/server/dev/middleware-turbopack.js +20 -10
- package/standalone/node_modules/next/dist/server/dev/middleware-webpack.js +13 -3
- package/standalone/node_modules/next/dist/server/dev/next-dev-server.js +19 -6
- package/standalone/node_modules/next/dist/server/dev/on-demand-entry-handler.js +69 -0
- package/standalone/node_modules/next/dist/server/dev/require-cache.js +51 -21
- package/standalone/node_modules/next/dist/server/dev/server-action-logger.js +37 -0
- package/standalone/node_modules/next/dist/server/dev/static-paths-worker.js +1 -0
- package/standalone/node_modules/next/dist/server/dev/turbopack-utils.js +6 -15
- package/standalone/node_modules/next/dist/server/dynamic-rendering-utils.js +22 -0
- package/standalone/node_modules/next/dist/server/image-optimizer.js +157 -27
- package/standalone/node_modules/next/dist/server/lib/app-info-log.js +16 -38
- package/standalone/node_modules/next/dist/server/lib/cache-control.js +1 -1
- package/standalone/node_modules/next/dist/server/lib/clone-response.js +16 -16
- package/standalone/node_modules/next/dist/server/lib/cpu-profile.js +47 -16
- package/standalone/node_modules/next/dist/server/lib/dev-bundler-service.js +2 -2
- package/standalone/node_modules/next/dist/server/lib/disk-lru-cache.external.js +57 -0
- package/standalone/node_modules/next/dist/server/lib/find-page-file.js +27 -7
- package/standalone/node_modules/next/dist/server/lib/implicit-tags.js +3 -3
- package/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +5 -3
- package/standalone/node_modules/next/dist/server/lib/incremental-cache/index.js +32 -10
- package/standalone/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +18 -1
- package/standalone/node_modules/next/dist/server/lib/install-code-frame.js +22 -0
- package/standalone/node_modules/next/dist/server/lib/lru-cache.js +9 -1
- package/standalone/node_modules/next/dist/server/lib/patch-fetch.js +40 -7
- package/standalone/node_modules/next/dist/server/lib/postponed-request-body.js +64 -0
- package/standalone/node_modules/next/dist/server/lib/render-server.js +4 -1
- package/standalone/node_modules/next/dist/server/lib/router-server.js +24 -13
- package/standalone/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +110 -0
- package/standalone/node_modules/next/dist/server/lib/router-utils/filesystem.js +16 -15
- package/standalone/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +32 -11
- package/standalone/node_modules/next/dist/server/lib/router-utils/route-types-utils.js +3 -3
- package/standalone/node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.js +71 -71
- package/standalone/node_modules/next/dist/server/lib/router-utils/typegen.js +247 -2
- package/standalone/node_modules/next/dist/server/lib/server-ipc/utils.js +2 -1
- package/standalone/node_modules/next/dist/server/lib/start-server.js +73 -39
- package/standalone/node_modules/next/dist/server/lib/trace/tracer.js +11 -1
- package/standalone/node_modules/next/dist/server/lib/utils.js +40 -11
- package/standalone/node_modules/next/dist/server/load-components.js +2 -0
- package/standalone/node_modules/next/dist/server/load-manifest.external.js +37 -17
- package/standalone/node_modules/next/dist/server/mcp/tools/get-errors.js +11 -4
- package/standalone/node_modules/next/dist/server/mcp/tools/get-logs.js +9 -3
- package/standalone/node_modules/next/dist/server/mcp/tools/get-page-metadata.js +52 -44
- package/standalone/node_modules/next/dist/server/mcp/tools/get-project-metadata.js +6 -2
- package/standalone/node_modules/next/dist/server/mcp/tools/get-routes.js +44 -79
- package/standalone/node_modules/next/dist/server/mcp/tools/get-server-action-by-id.js +12 -4
- package/standalone/node_modules/next/dist/server/mcp/tools/utils/format-errors.js +62 -72
- package/standalone/node_modules/next/dist/server/next-server.js +69 -99
- package/standalone/node_modules/next/dist/server/next.js +3 -0
- package/standalone/node_modules/next/dist/server/node-environment-extensions/console-dim.external.js +61 -6
- package/standalone/node_modules/next/dist/server/node-environment-extensions/date.js +4 -4
- package/standalone/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +13 -6
- package/standalone/node_modules/next/dist/server/node-environment-extensions/{utils.js → io-utils.js} +14 -5
- package/standalone/node_modules/next/dist/server/node-environment-extensions/node-crypto.js +8 -8
- package/standalone/node_modules/next/dist/server/node-environment-extensions/process-error-handlers.js +91 -0
- package/standalone/node_modules/next/dist/server/node-environment-extensions/random.js +2 -2
- package/standalone/node_modules/next/dist/server/node-environment-extensions/{unhandled-rejection.js → unhandled-rejection.external.js} +23 -4
- package/standalone/node_modules/next/dist/server/node-environment-extensions/web-crypto.js +3 -3
- package/standalone/node_modules/next/dist/server/node-environment.js +1 -1
- package/standalone/node_modules/next/dist/server/normalizers/request/segment-prefix-rsc.js +2 -1
- package/standalone/node_modules/next/dist/server/patch-error-inspect.js +37 -20
- package/standalone/node_modules/next/dist/server/render-result.js +9 -0
- package/standalone/node_modules/next/dist/server/render.js +27 -25
- package/standalone/node_modules/next/dist/server/require-hook.js +19 -8
- package/standalone/node_modules/next/dist/server/response-cache/utils.js +1 -0
- package/standalone/node_modules/next/dist/server/resume-data-cache/cache-store.js +35 -23
- package/standalone/node_modules/next/dist/server/resume-data-cache/resume-data-cache.js +16 -7
- package/standalone/node_modules/next/dist/server/revalidation-utils.js +12 -7
- package/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-page-route-matcher-provider.js +2 -1
- package/standalone/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +4 -1
- package/standalone/node_modules/next/dist/server/route-modules/app-page/module.js +31 -1
- package/standalone/node_modules/next/dist/server/route-modules/app-page/normalize-request-url.js +25 -0
- package/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +31 -8
- package/standalone/node_modules/next/dist/server/route-modules/route-module.js +71 -18
- package/standalone/node_modules/next/dist/server/stream-utils/encoded-tags.js +8 -0
- package/standalone/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +239 -58
- package/standalone/node_modules/next/dist/server/stream-utils/uint8array-helpers.js +7 -2
- package/standalone/node_modules/next/dist/server/typescript/constant.js +1 -0
- package/standalone/node_modules/next/dist/server/typescript/rules/config.js +14 -3
- package/standalone/node_modules/next/dist/server/web/adapter.js +7 -3
- package/standalone/node_modules/next/dist/server/web/next-url.js +6 -2
- package/standalone/node_modules/next/dist/server/web/sandbox/sandbox.js +3 -0
- package/standalone/node_modules/next/dist/shared/lib/app-router-types.js +30 -11
- package/standalone/node_modules/next/dist/shared/lib/constants.js +7 -7
- package/standalone/node_modules/next/dist/shared/lib/deployment-id.js +37 -10
- package/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/standalone/node_modules/next/dist/shared/lib/errors/code-frame.js +20 -0
- package/standalone/node_modules/next/dist/shared/lib/format-webpack-messages.js +22 -2
- package/standalone/node_modules/next/dist/shared/lib/image-config.js +3 -1
- package/standalone/node_modules/next/dist/shared/lib/is-internal.js +2 -0
- package/standalone/node_modules/next/dist/shared/lib/magic-identifier.js +6 -6
- package/standalone/node_modules/next/dist/shared/lib/router/router.js +32 -0
- package/standalone/node_modules/next/dist/shared/lib/router/utils/app-paths.js +11 -0
- package/standalone/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +11 -4
- package/standalone/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +3 -2
- package/standalone/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +9 -2
- package/standalone/node_modules/next/dist/shared/lib/router/utils/parse-url.js +8 -2
- package/standalone/node_modules/next/dist/shared/lib/segment-cache/vary-params-decoding.js +32 -0
- package/standalone/node_modules/next/dist/shared/lib/server-reference-info.js +4 -0
- package/standalone/node_modules/next/dist/shared/lib/size-limit.js +6 -1
- package/standalone/node_modules/next/dist/shared/lib/turbopack/compilation-events.js +47 -10
- package/standalone/node_modules/next/dist/shared/lib/turbopack/manifest-loader.js +90 -116
- package/standalone/node_modules/next/dist/shared/lib/turbopack/utils.js +14 -26
- package/standalone/node_modules/next/dist/shared/lib/utils/reflect-utils.js +69 -0
- package/standalone/node_modules/next/dist/shared/lib/utils.js +2 -2
- package/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/standalone/node_modules/next/dist/trace/index.js +4 -0
- package/standalone/node_modules/next/dist/trace/report/to-json-build.js +11 -108
- package/standalone/node_modules/next/dist/trace/report/to-json.js +52 -38
- package/standalone/node_modules/next/dist/trace/trace.js +15 -1
- package/standalone/node_modules/next/package.json +21 -23
- package/standalone/node_modules/react/cjs/react.development.js +1284 -0
- package/standalone/package.json +3 -3
- package/standalone/packages/core/package.json +1 -1
- package/standalone/apps/frontend/.next/static/chunks/1315.18c68981a2eab4fe.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/87c73c54-c5fda2db2a4bd732.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/common-d9b436492e46bb05.js +0 -69
- package/standalone/apps/frontend/.next/static/chunks/framework-86c2a58f458066a5.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/vendors-c7197feb11002a6e.js +0 -10
- package/standalone/apps/frontend/.next/static/kMwuefB4Z1_6Xta5NPqs1/_buildManifest.js +0 -1
- package/standalone/node_modules/next/dist/client/components/router-reducer/handle-mutable.js +0 -66
- package/standalone/node_modules/next/dist/compiled/babel/code-frame.js +0 -1
- package/standalone/node_modules/next/dist/compiled/babel-code-frame/index.js +0 -1
- package/standalone/node_modules/next/dist/compiled/babel-code-frame/package.json +0 -1
- package/standalone/node_modules/next/dist/compiled/tar/index.js +0 -1
- package/standalone/node_modules/next/dist/server/app-render/staged-validation.js +0 -32
- package/standalone/node_modules/next/dist/server/lib/router-utils/block-cross-site.js +0 -76
- package/standalone/node_modules/next/dist/shared/lib/segment-cache/output-export-prefetch-encoding.js +0 -52
- package/standalone/node_modules/typescript/lib/typescript.js +0 -200276
- package/standalone/node_modules/typescript/package.json +0 -120
- /package/standalone/apps/frontend/.next/static/{kMwuefB4Z1_6Xta5NPqs1 → I_XveRdyStDMqYJPcAAy5}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
exports.id =
|
|
2
|
-
exports.ids = [
|
|
1
|
+
exports.id = 8569;
|
|
2
|
+
exports.ids = [8569];
|
|
3
3
|
exports.modules = {
|
|
4
4
|
|
|
5
5
|
/***/ 330:
|
|
@@ -78,6 +78,9 @@ function _export(target, all) {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
_export(exports, {
|
|
81
|
+
compareAppPaths: function() {
|
|
82
|
+
return compareAppPaths;
|
|
83
|
+
},
|
|
81
84
|
normalizeAppPath: function() {
|
|
82
85
|
return normalizeAppPath;
|
|
83
86
|
},
|
|
@@ -108,6 +111,13 @@ function normalizeAppPath(route) {
|
|
|
108
111
|
return `${pathname}/${segment}`;
|
|
109
112
|
}, ''));
|
|
110
113
|
}
|
|
114
|
+
function compareAppPaths(a, b) {
|
|
115
|
+
const aHasSlot = a.includes('/@');
|
|
116
|
+
const bHasSlot = b.includes('/@');
|
|
117
|
+
if (aHasSlot && !bHasSlot) return -1;
|
|
118
|
+
if (!aHasSlot && bHasSlot) return 1;
|
|
119
|
+
return a.localeCompare(b);
|
|
120
|
+
}
|
|
111
121
|
function normalizeRscURL(url) {
|
|
112
122
|
return url.replace(/\.rsc($|\?)/, '$1');
|
|
113
123
|
} //# sourceMappingURL=app-paths.js.map
|
|
@@ -286,6 +296,12 @@ _export(exports, {
|
|
|
286
296
|
NEXT_HTML_REQUEST_ID_HEADER: function() {
|
|
287
297
|
return NEXT_HTML_REQUEST_ID_HEADER;
|
|
288
298
|
},
|
|
299
|
+
NEXT_INSTANT_PREFETCH_HEADER: function() {
|
|
300
|
+
return NEXT_INSTANT_PREFETCH_HEADER;
|
|
301
|
+
},
|
|
302
|
+
NEXT_INSTANT_TEST_COOKIE: function() {
|
|
303
|
+
return NEXT_INSTANT_TEST_COOKIE;
|
|
304
|
+
},
|
|
289
305
|
NEXT_IS_PRERENDER_HEADER: function() {
|
|
290
306
|
return NEXT_IS_PRERENDER_HEADER;
|
|
291
307
|
},
|
|
@@ -332,6 +348,8 @@ const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh';
|
|
|
332
348
|
const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__';
|
|
333
349
|
const NEXT_URL = 'next-url';
|
|
334
350
|
const RSC_CONTENT_TYPE_HEADER = 'text/x-component';
|
|
351
|
+
const NEXT_INSTANT_PREFETCH_HEADER = 'next-instant-navigation-testing-prefetch';
|
|
352
|
+
const NEXT_INSTANT_TEST_COOKIE = 'next-instant-navigation-testing';
|
|
335
353
|
const FLIGHT_HEADERS = [
|
|
336
354
|
RSC_HEADER,
|
|
337
355
|
NEXT_ROUTER_STATE_TREE_HEADER,
|
|
@@ -501,6 +519,215 @@ class NextRequestAdapter {
|
|
|
501
519
|
|
|
502
520
|
/***/ }),
|
|
503
521
|
|
|
522
|
+
/***/ 9090:
|
|
523
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
524
|
+
|
|
525
|
+
"use strict";
|
|
526
|
+
|
|
527
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
528
|
+
value: true
|
|
529
|
+
}));
|
|
530
|
+
0 && (0);
|
|
531
|
+
function _export(target, all) {
|
|
532
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
533
|
+
enumerable: true,
|
|
534
|
+
get: all[name]
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
_export(exports, {
|
|
538
|
+
MutableRequestCookiesAdapter: function() {
|
|
539
|
+
return MutableRequestCookiesAdapter;
|
|
540
|
+
},
|
|
541
|
+
ReadonlyRequestCookiesError: function() {
|
|
542
|
+
return ReadonlyRequestCookiesError;
|
|
543
|
+
},
|
|
544
|
+
RequestCookiesAdapter: function() {
|
|
545
|
+
return RequestCookiesAdapter;
|
|
546
|
+
},
|
|
547
|
+
appendMutableCookies: function() {
|
|
548
|
+
return appendMutableCookies;
|
|
549
|
+
},
|
|
550
|
+
areCookiesMutableInCurrentPhase: function() {
|
|
551
|
+
return areCookiesMutableInCurrentPhase;
|
|
552
|
+
},
|
|
553
|
+
createCookiesWithMutableAccessCheck: function() {
|
|
554
|
+
return createCookiesWithMutableAccessCheck;
|
|
555
|
+
},
|
|
556
|
+
getModifiedCookieValues: function() {
|
|
557
|
+
return getModifiedCookieValues;
|
|
558
|
+
},
|
|
559
|
+
responseCookiesToRequestCookies: function() {
|
|
560
|
+
return responseCookiesToRequestCookies;
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
const _cookies = __webpack_require__(98315);
|
|
564
|
+
const _reflect = __webpack_require__(1212);
|
|
565
|
+
const _workasyncstorageexternal = __webpack_require__(29294);
|
|
566
|
+
const _actionrevalidationkind = __webpack_require__(26805);
|
|
567
|
+
class ReadonlyRequestCookiesError extends Error {
|
|
568
|
+
constructor(){
|
|
569
|
+
super('Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options');
|
|
570
|
+
}
|
|
571
|
+
static callable() {
|
|
572
|
+
throw new ReadonlyRequestCookiesError();
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
class RequestCookiesAdapter {
|
|
576
|
+
static seal(cookies) {
|
|
577
|
+
return new Proxy(cookies, {
|
|
578
|
+
get (target, prop, receiver) {
|
|
579
|
+
switch(prop){
|
|
580
|
+
case 'clear':
|
|
581
|
+
case 'delete':
|
|
582
|
+
case 'set':
|
|
583
|
+
return ReadonlyRequestCookiesError.callable;
|
|
584
|
+
default:
|
|
585
|
+
return _reflect.ReflectAdapter.get(target, prop, receiver);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
const SYMBOL_MODIFY_COOKIE_VALUES = Symbol.for('next.mutated.cookies');
|
|
592
|
+
function getModifiedCookieValues(cookies) {
|
|
593
|
+
const modified = cookies[SYMBOL_MODIFY_COOKIE_VALUES];
|
|
594
|
+
if (!modified || !Array.isArray(modified) || modified.length === 0) {
|
|
595
|
+
return [];
|
|
596
|
+
}
|
|
597
|
+
return modified;
|
|
598
|
+
}
|
|
599
|
+
function appendMutableCookies(headers, mutableCookies) {
|
|
600
|
+
const modifiedCookieValues = getModifiedCookieValues(mutableCookies);
|
|
601
|
+
if (modifiedCookieValues.length === 0) {
|
|
602
|
+
return false;
|
|
603
|
+
}
|
|
604
|
+
// Return a new response that extends the response with
|
|
605
|
+
// the modified cookies as fallbacks. `res` cookies
|
|
606
|
+
// will still take precedence.
|
|
607
|
+
const resCookies = new _cookies.ResponseCookies(headers);
|
|
608
|
+
const returnedCookies = resCookies.getAll();
|
|
609
|
+
// Set the modified cookies as fallbacks.
|
|
610
|
+
for (const cookie of modifiedCookieValues){
|
|
611
|
+
resCookies.set(cookie);
|
|
612
|
+
}
|
|
613
|
+
// Set the original cookies as the final values.
|
|
614
|
+
for (const cookie of returnedCookies){
|
|
615
|
+
resCookies.set(cookie);
|
|
616
|
+
}
|
|
617
|
+
return true;
|
|
618
|
+
}
|
|
619
|
+
class MutableRequestCookiesAdapter {
|
|
620
|
+
static wrap(cookies, onUpdateCookies) {
|
|
621
|
+
const responseCookies = new _cookies.ResponseCookies(new Headers());
|
|
622
|
+
for (const cookie of cookies.getAll()){
|
|
623
|
+
responseCookies.set(cookie);
|
|
624
|
+
}
|
|
625
|
+
let modifiedValues = [];
|
|
626
|
+
const modifiedCookies = new Set();
|
|
627
|
+
const updateResponseCookies = ()=>{
|
|
628
|
+
// TODO-APP: change method of getting workStore
|
|
629
|
+
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
630
|
+
if (workStore) {
|
|
631
|
+
workStore.pathWasRevalidated = _actionrevalidationkind.ActionDidRevalidateStaticAndDynamic;
|
|
632
|
+
}
|
|
633
|
+
const allCookies = responseCookies.getAll();
|
|
634
|
+
modifiedValues = allCookies.filter((c)=>modifiedCookies.has(c.name));
|
|
635
|
+
if (onUpdateCookies) {
|
|
636
|
+
const serializedCookies = [];
|
|
637
|
+
for (const cookie of modifiedValues){
|
|
638
|
+
const tempCookies = new _cookies.ResponseCookies(new Headers());
|
|
639
|
+
tempCookies.set(cookie);
|
|
640
|
+
serializedCookies.push(tempCookies.toString());
|
|
641
|
+
}
|
|
642
|
+
onUpdateCookies(serializedCookies);
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
const wrappedCookies = new Proxy(responseCookies, {
|
|
646
|
+
get (target, prop, receiver) {
|
|
647
|
+
switch(prop){
|
|
648
|
+
// A special symbol to get the modified cookie values
|
|
649
|
+
case SYMBOL_MODIFY_COOKIE_VALUES:
|
|
650
|
+
return modifiedValues;
|
|
651
|
+
// TODO: Throw error if trying to set a cookie after the response
|
|
652
|
+
// headers have been set.
|
|
653
|
+
case 'delete':
|
|
654
|
+
return function(...args) {
|
|
655
|
+
modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);
|
|
656
|
+
try {
|
|
657
|
+
target.delete(...args);
|
|
658
|
+
return wrappedCookies;
|
|
659
|
+
} finally{
|
|
660
|
+
updateResponseCookies();
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
case 'set':
|
|
664
|
+
return function(...args) {
|
|
665
|
+
modifiedCookies.add(typeof args[0] === 'string' ? args[0] : args[0].name);
|
|
666
|
+
try {
|
|
667
|
+
target.set(...args);
|
|
668
|
+
return wrappedCookies;
|
|
669
|
+
} finally{
|
|
670
|
+
updateResponseCookies();
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
default:
|
|
674
|
+
return _reflect.ReflectAdapter.get(target, prop, receiver);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
return wrappedCookies;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
function createCookiesWithMutableAccessCheck(requestStore) {
|
|
682
|
+
const wrappedCookies = new Proxy(requestStore.mutableCookies, {
|
|
683
|
+
get (target, prop, receiver) {
|
|
684
|
+
switch(prop){
|
|
685
|
+
case 'delete':
|
|
686
|
+
return function(...args) {
|
|
687
|
+
ensureCookiesAreStillMutable(requestStore, 'cookies().delete');
|
|
688
|
+
target.delete(...args);
|
|
689
|
+
return wrappedCookies;
|
|
690
|
+
};
|
|
691
|
+
case 'set':
|
|
692
|
+
return function(...args) {
|
|
693
|
+
ensureCookiesAreStillMutable(requestStore, 'cookies().set');
|
|
694
|
+
target.set(...args);
|
|
695
|
+
return wrappedCookies;
|
|
696
|
+
};
|
|
697
|
+
default:
|
|
698
|
+
return _reflect.ReflectAdapter.get(target, prop, receiver);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
return wrappedCookies;
|
|
703
|
+
}
|
|
704
|
+
function areCookiesMutableInCurrentPhase(requestStore) {
|
|
705
|
+
return requestStore.phase === 'action';
|
|
706
|
+
}
|
|
707
|
+
/** Ensure that cookies() starts throwing on mutation
|
|
708
|
+
* if we changed phases and can no longer mutate.
|
|
709
|
+
*
|
|
710
|
+
* This can happen when going:
|
|
711
|
+
* 'render' -> 'after'
|
|
712
|
+
* 'action' -> 'render'
|
|
713
|
+
* */ function ensureCookiesAreStillMutable(requestStore, _callingExpression) {
|
|
714
|
+
if (!areCookiesMutableInCurrentPhase(requestStore)) {
|
|
715
|
+
// TODO: maybe we can give a more precise error message based on callingExpression?
|
|
716
|
+
throw new ReadonlyRequestCookiesError();
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
function responseCookiesToRequestCookies(responseCookies) {
|
|
720
|
+
const requestCookies = new _cookies.RequestCookies(new Headers());
|
|
721
|
+
for (const cookie of responseCookies.getAll()){
|
|
722
|
+
requestCookies.set(cookie);
|
|
723
|
+
}
|
|
724
|
+
return requestCookies;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
//# sourceMappingURL=request-cookies.js.map
|
|
728
|
+
|
|
729
|
+
/***/ }),
|
|
730
|
+
|
|
504
731
|
/***/ 10033:
|
|
505
732
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
506
733
|
|
|
@@ -519,9 +746,13 @@ const _detectdomainlocale = __webpack_require__(61383);
|
|
|
519
746
|
const _formatnextpathnameinfo = __webpack_require__(37852);
|
|
520
747
|
const _gethostname = __webpack_require__(57315);
|
|
521
748
|
const _getnextpathnameinfo = __webpack_require__(29433);
|
|
522
|
-
const REGEX_LOCALHOST_HOSTNAME =
|
|
749
|
+
const REGEX_LOCALHOST_HOSTNAME = /^(?:127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)$/;
|
|
523
750
|
function parseURL(url, base) {
|
|
524
|
-
|
|
751
|
+
const parsed = new URL(String(url), base && String(base));
|
|
752
|
+
if (REGEX_LOCALHOST_HOSTNAME.test(parsed.hostname)) {
|
|
753
|
+
parsed.hostname = 'localhost';
|
|
754
|
+
}
|
|
755
|
+
return parsed;
|
|
525
756
|
}
|
|
526
757
|
const Internal = Symbol('NextURLInternal');
|
|
527
758
|
class NextURL {
|
|
@@ -736,7 +967,7 @@ function getCacheControlHeader({ revalidate, expire }) {
|
|
|
736
967
|
} else if (typeof revalidate === 'number') {
|
|
737
968
|
return `s-maxage=${revalidate}${swrHeader}`;
|
|
738
969
|
}
|
|
739
|
-
return `s-maxage=${_constants.
|
|
970
|
+
return `s-maxage=${_constants.CACHE_ONE_YEAR_SECONDS}${swrHeader}`;
|
|
740
971
|
}
|
|
741
972
|
|
|
742
973
|
//# sourceMappingURL=cache-control.js.map
|
|
@@ -770,51 +1001,68 @@ const _invarianterror = __webpack_require__(96042);
|
|
|
770
1001
|
const _promisewithresolvers = __webpack_require__(23151);
|
|
771
1002
|
var RenderStage = /*#__PURE__*/ function(RenderStage) {
|
|
772
1003
|
RenderStage[RenderStage["Before"] = 1] = "Before";
|
|
773
|
-
RenderStage[RenderStage["
|
|
774
|
-
RenderStage[RenderStage["
|
|
775
|
-
RenderStage[RenderStage["
|
|
776
|
-
RenderStage[RenderStage["
|
|
1004
|
+
RenderStage[RenderStage["EarlyStatic"] = 2] = "EarlyStatic";
|
|
1005
|
+
RenderStage[RenderStage["Static"] = 3] = "Static";
|
|
1006
|
+
RenderStage[RenderStage["EarlyRuntime"] = 4] = "EarlyRuntime";
|
|
1007
|
+
RenderStage[RenderStage["Runtime"] = 5] = "Runtime";
|
|
1008
|
+
RenderStage[RenderStage["Dynamic"] = 6] = "Dynamic";
|
|
1009
|
+
RenderStage[RenderStage["Abandoned"] = 7] = "Abandoned";
|
|
777
1010
|
return RenderStage;
|
|
778
1011
|
}({});
|
|
779
1012
|
class StagedRenderingController {
|
|
780
|
-
constructor(abortSignal
|
|
1013
|
+
constructor(abortSignal, abandonController, shouldTrackSyncIO){
|
|
781
1014
|
this.abortSignal = abortSignal;
|
|
782
|
-
this.
|
|
1015
|
+
this.abandonController = abandonController;
|
|
1016
|
+
this.shouldTrackSyncIO = shouldTrackSyncIO;
|
|
783
1017
|
this.currentStage = 1;
|
|
784
|
-
this.
|
|
785
|
-
this.runtimeInterruptReason = null;
|
|
1018
|
+
this.syncInterruptReason = null;
|
|
786
1019
|
this.staticStageEndTime = Infinity;
|
|
787
1020
|
this.runtimeStageEndTime = Infinity;
|
|
1021
|
+
this.staticStageListeners = [];
|
|
1022
|
+
this.earlyRuntimeStageListeners = [];
|
|
788
1023
|
this.runtimeStageListeners = [];
|
|
789
1024
|
this.dynamicStageListeners = [];
|
|
1025
|
+
this.staticStagePromise = (0, _promisewithresolvers.createPromiseWithResolvers)();
|
|
1026
|
+
this.earlyRuntimeStagePromise = (0, _promisewithresolvers.createPromiseWithResolvers)();
|
|
790
1027
|
this.runtimeStagePromise = (0, _promisewithresolvers.createPromiseWithResolvers)();
|
|
791
1028
|
this.dynamicStagePromise = (0, _promisewithresolvers.createPromiseWithResolvers)();
|
|
792
|
-
this.mayAbandon = false;
|
|
793
1029
|
if (abortSignal) {
|
|
794
1030
|
abortSignal.addEventListener('abort', ()=>{
|
|
1031
|
+
// Reject all stage promises that haven't already been resolved.
|
|
1032
|
+
// If a promise was already resolved via advanceStage, the reject
|
|
1033
|
+
// is a no-op. The ignoreReject handler suppresses unhandled
|
|
1034
|
+
// rejection warnings for promises that no one is awaiting.
|
|
795
1035
|
const { reason } = abortSignal;
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
1036
|
+
this.staticStagePromise.promise.catch(ignoreReject);
|
|
1037
|
+
this.staticStagePromise.reject(reason);
|
|
1038
|
+
this.earlyRuntimeStagePromise.promise.catch(ignoreReject);
|
|
1039
|
+
this.earlyRuntimeStagePromise.reject(reason);
|
|
1040
|
+
this.runtimeStagePromise.promise.catch(ignoreReject);
|
|
1041
|
+
this.runtimeStagePromise.reject(reason);
|
|
1042
|
+
this.dynamicStagePromise.promise.catch(ignoreReject);
|
|
1043
|
+
this.dynamicStagePromise.reject(reason);
|
|
1044
|
+
}, {
|
|
1045
|
+
once: true
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
if (abandonController) {
|
|
1049
|
+
abandonController.signal.addEventListener('abort', ()=>{
|
|
1050
|
+
this.abandonRender();
|
|
806
1051
|
}, {
|
|
807
1052
|
once: true
|
|
808
1053
|
});
|
|
809
|
-
this.mayAbandon = true;
|
|
810
1054
|
}
|
|
811
1055
|
}
|
|
812
1056
|
onStage(stage, callback) {
|
|
813
1057
|
if (this.currentStage >= stage) {
|
|
814
1058
|
callback();
|
|
815
1059
|
} else if (stage === 3) {
|
|
816
|
-
this.
|
|
1060
|
+
this.staticStageListeners.push(callback);
|
|
817
1061
|
} else if (stage === 4) {
|
|
1062
|
+
this.earlyRuntimeStageListeners.push(callback);
|
|
1063
|
+
} else if (stage === 5) {
|
|
1064
|
+
this.runtimeStageListeners.push(callback);
|
|
1065
|
+
} else if (stage === 6) {
|
|
818
1066
|
this.dynamicStageListeners.push(callback);
|
|
819
1067
|
} else {
|
|
820
1068
|
// This should never happen
|
|
@@ -825,57 +1073,81 @@ class StagedRenderingController {
|
|
|
825
1073
|
});
|
|
826
1074
|
}
|
|
827
1075
|
}
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
if (this.currentStage === 1) {
|
|
1076
|
+
shouldTrackSyncInterrupt() {
|
|
1077
|
+
if (!this.shouldTrackSyncIO) {
|
|
831
1078
|
return false;
|
|
832
1079
|
}
|
|
833
|
-
|
|
834
|
-
|
|
1080
|
+
switch(this.currentStage){
|
|
1081
|
+
case 1:
|
|
1082
|
+
// If we haven't started the render yet, it can't be interrupted.
|
|
1083
|
+
return false;
|
|
1084
|
+
case 2:
|
|
1085
|
+
case 3:
|
|
1086
|
+
return true;
|
|
1087
|
+
case 4:
|
|
1088
|
+
// EarlyRuntime is for runtime-prefetchable segments. Sync IO
|
|
1089
|
+
// should error because it would abort a runtime prefetch.
|
|
1090
|
+
return true;
|
|
1091
|
+
case 5:
|
|
1092
|
+
// Runtime is for non-prefetchable segments. Sync IO is fine there
|
|
1093
|
+
// because in practice this segment will never be runtime prefetched
|
|
1094
|
+
return false;
|
|
1095
|
+
case 6:
|
|
1096
|
+
case 7:
|
|
1097
|
+
return false;
|
|
1098
|
+
default:
|
|
1099
|
+
return false;
|
|
1100
|
+
}
|
|
835
1101
|
}
|
|
836
1102
|
syncInterruptCurrentStageWithReason(reason) {
|
|
837
1103
|
if (this.currentStage === 1) {
|
|
838
1104
|
return;
|
|
839
1105
|
}
|
|
840
|
-
// If
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
1106
|
+
// If the render has already been abandoned, there's nothing to interrupt.
|
|
1107
|
+
if (this.currentStage === 7) {
|
|
1108
|
+
return;
|
|
1109
|
+
}
|
|
1110
|
+
// If Sync IO occurs during an abandonable render, we trigger the abandon.
|
|
1111
|
+
// The abandon listener will call abandonRender which advances through
|
|
1112
|
+
// stages to let caches fill before marking as Abandoned.
|
|
1113
|
+
if (this.abandonController) {
|
|
1114
|
+
this.abandonController.abort();
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
if (this.abortSignal) {
|
|
1118
|
+
// If this is an abortable render, we capture the interruption reason and stop advancing.
|
|
1119
|
+
// We don't release any more promises.
|
|
1120
|
+
// The caller is expected to abort the signal.
|
|
1121
|
+
this.syncInterruptReason = reason;
|
|
1122
|
+
this.currentStage = 7;
|
|
1123
|
+
return;
|
|
845
1124
|
}
|
|
846
|
-
// If we're in
|
|
847
|
-
// and capture the interruption reason.
|
|
1125
|
+
// If we're in a non-abandonable & non-abortable render,
|
|
1126
|
+
// we need to advance to the Dynamic stage and capture the interruption reason.
|
|
1127
|
+
// (in dev, this will be the restarted render)
|
|
848
1128
|
switch(this.currentStage){
|
|
849
1129
|
case 2:
|
|
1130
|
+
case 3:
|
|
1131
|
+
case 4:
|
|
850
1132
|
{
|
|
851
|
-
|
|
852
|
-
|
|
1133
|
+
// EarlyRuntime is for runtime-prefetchable segments. Sync IO here
|
|
1134
|
+
// means the prefetch would be aborted too early.
|
|
1135
|
+
this.syncInterruptReason = reason;
|
|
1136
|
+
this.advanceStage(6);
|
|
853
1137
|
return;
|
|
854
1138
|
}
|
|
855
|
-
case
|
|
1139
|
+
case 5:
|
|
856
1140
|
{
|
|
857
|
-
//
|
|
858
|
-
//
|
|
859
|
-
// We do this to reflect the fact that during a runtime prefetch,
|
|
860
|
-
// Sync IO aborts aborts the render.
|
|
861
|
-
// Note that `canSyncInterrupt` should prevent us from getting here at all
|
|
862
|
-
// if runtime prefetching isn't enabled.
|
|
863
|
-
if (this.hasRuntimePrefetch) {
|
|
864
|
-
this.runtimeInterruptReason = reason;
|
|
865
|
-
this.advanceStage(4);
|
|
866
|
-
}
|
|
1141
|
+
// canSyncInterrupt returns false for Runtime, so we should
|
|
1142
|
+
// never get here. Defensive no-op.
|
|
867
1143
|
return;
|
|
868
1144
|
}
|
|
869
|
-
case
|
|
870
|
-
case 5:
|
|
1145
|
+
case 6:
|
|
871
1146
|
default:
|
|
872
1147
|
}
|
|
873
1148
|
}
|
|
874
|
-
|
|
875
|
-
return this.
|
|
876
|
-
}
|
|
877
|
-
getRuntimeInterruptReason() {
|
|
878
|
-
return this.runtimeInterruptReason;
|
|
1149
|
+
getSyncInterruptReason() {
|
|
1150
|
+
return this.syncInterruptReason;
|
|
879
1151
|
}
|
|
880
1152
|
getStaticStageEndTime() {
|
|
881
1153
|
return this.staticStageEndTime;
|
|
@@ -884,16 +1156,6 @@ class StagedRenderingController {
|
|
|
884
1156
|
return this.runtimeStageEndTime;
|
|
885
1157
|
}
|
|
886
1158
|
abandonRender() {
|
|
887
|
-
if (!this.mayAbandon) {
|
|
888
|
-
throw Object.defineProperty(new _invarianterror.InvariantError('`abandonRender` called on a stage controller that cannot be abandoned.'), "__NEXT_ERROR_CODE", {
|
|
889
|
-
value: "E938",
|
|
890
|
-
enumerable: false,
|
|
891
|
-
configurable: true
|
|
892
|
-
});
|
|
893
|
-
}
|
|
894
|
-
this.abandonRenderImpl();
|
|
895
|
-
}
|
|
896
|
-
abandonRenderImpl() {
|
|
897
1159
|
// In staged rendering, only the initial render is abandonable.
|
|
898
1160
|
// We can abandon the initial render if
|
|
899
1161
|
// 1. We notice a cache miss, and need to wait for caches to fill
|
|
@@ -901,24 +1163,33 @@ class StagedRenderingController {
|
|
|
901
1163
|
// (this might be a lazy intitialization of a module,
|
|
902
1164
|
// so we still want to restart in this case and see if it still occurs)
|
|
903
1165
|
// In either case, we'll be doing another render after this one,
|
|
904
|
-
// so we only want to unblock the
|
|
1166
|
+
// so we only want to unblock the next stage, not Dynamic, because
|
|
905
1167
|
// unblocking the dynamic stage would likely lead to wasted (uncached) IO.
|
|
906
1168
|
const { currentStage } = this;
|
|
907
1169
|
switch(currentStage){
|
|
908
1170
|
case 2:
|
|
909
1171
|
{
|
|
910
|
-
this.
|
|
911
|
-
this.resolveRuntimeStage();
|
|
912
|
-
return;
|
|
1172
|
+
this.resolveStaticStage();
|
|
913
1173
|
}
|
|
1174
|
+
// intentional fallthrough
|
|
914
1175
|
case 3:
|
|
915
1176
|
{
|
|
916
|
-
this.
|
|
917
|
-
return;
|
|
1177
|
+
this.resolveEarlyRuntimeStage();
|
|
918
1178
|
}
|
|
1179
|
+
// intentional fallthrough
|
|
919
1180
|
case 4:
|
|
920
|
-
|
|
1181
|
+
{
|
|
1182
|
+
this.resolveRuntimeStage();
|
|
1183
|
+
}
|
|
1184
|
+
// intentional fallthrough
|
|
921
1185
|
case 5:
|
|
1186
|
+
{
|
|
1187
|
+
this.currentStage = 7;
|
|
1188
|
+
return;
|
|
1189
|
+
}
|
|
1190
|
+
case 6:
|
|
1191
|
+
case 1:
|
|
1192
|
+
case 7:
|
|
922
1193
|
break;
|
|
923
1194
|
default:
|
|
924
1195
|
{
|
|
@@ -935,15 +1206,37 @@ class StagedRenderingController {
|
|
|
935
1206
|
let currentStage = this.currentStage;
|
|
936
1207
|
this.currentStage = stage;
|
|
937
1208
|
if (currentStage < 3 && stage >= 3) {
|
|
1209
|
+
this.resolveStaticStage();
|
|
1210
|
+
}
|
|
1211
|
+
if (currentStage < 4 && stage >= 4) {
|
|
1212
|
+
this.resolveEarlyRuntimeStage();
|
|
1213
|
+
}
|
|
1214
|
+
if (currentStage < 5 && stage >= 5) {
|
|
938
1215
|
this.staticStageEndTime = performance.now() + performance.timeOrigin;
|
|
939
1216
|
this.resolveRuntimeStage();
|
|
940
1217
|
}
|
|
941
|
-
if (currentStage <
|
|
1218
|
+
if (currentStage < 6 && stage >= 6) {
|
|
942
1219
|
this.runtimeStageEndTime = performance.now() + performance.timeOrigin;
|
|
943
1220
|
this.resolveDynamicStage();
|
|
944
1221
|
return;
|
|
945
1222
|
}
|
|
946
1223
|
}
|
|
1224
|
+
/** Fire the `onStage` listeners for the static stage and unblock any promises waiting for it. */ resolveStaticStage() {
|
|
1225
|
+
const staticListeners = this.staticStageListeners;
|
|
1226
|
+
for(let i = 0; i < staticListeners.length; i++){
|
|
1227
|
+
staticListeners[i]();
|
|
1228
|
+
}
|
|
1229
|
+
staticListeners.length = 0;
|
|
1230
|
+
this.staticStagePromise.resolve();
|
|
1231
|
+
}
|
|
1232
|
+
/** Fire the `onStage` listeners for the early runtime stage and unblock any promises waiting for it. */ resolveEarlyRuntimeStage() {
|
|
1233
|
+
const earlyRuntimeListeners = this.earlyRuntimeStageListeners;
|
|
1234
|
+
for(let i = 0; i < earlyRuntimeListeners.length; i++){
|
|
1235
|
+
earlyRuntimeListeners[i]();
|
|
1236
|
+
}
|
|
1237
|
+
earlyRuntimeListeners.length = 0;
|
|
1238
|
+
this.earlyRuntimeStagePromise.resolve();
|
|
1239
|
+
}
|
|
947
1240
|
/** Fire the `onStage` listeners for the runtime stage and unblock any promises waiting for it. */ resolveRuntimeStage() {
|
|
948
1241
|
const runtimeListeners = this.runtimeStageListeners;
|
|
949
1242
|
for(let i = 0; i < runtimeListeners.length; i++){
|
|
@@ -964,9 +1257,17 @@ class StagedRenderingController {
|
|
|
964
1257
|
switch(stage){
|
|
965
1258
|
case 3:
|
|
966
1259
|
{
|
|
967
|
-
return this.
|
|
1260
|
+
return this.staticStagePromise.promise;
|
|
968
1261
|
}
|
|
969
1262
|
case 4:
|
|
1263
|
+
{
|
|
1264
|
+
return this.earlyRuntimeStagePromise.promise;
|
|
1265
|
+
}
|
|
1266
|
+
case 5:
|
|
1267
|
+
{
|
|
1268
|
+
return this.runtimeStagePromise.promise;
|
|
1269
|
+
}
|
|
1270
|
+
case 6:
|
|
970
1271
|
{
|
|
971
1272
|
return this.dynamicStagePromise.promise;
|
|
972
1273
|
}
|
|
@@ -1368,6 +1669,39 @@ function isRequestAPICallableInsideAfter() {
|
|
|
1368
1669
|
} //# sourceMappingURL=utils.js.map
|
|
1369
1670
|
|
|
1370
1671
|
|
|
1672
|
+
/***/ }),
|
|
1673
|
+
|
|
1674
|
+
/***/ 26805:
|
|
1675
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1676
|
+
|
|
1677
|
+
"use strict";
|
|
1678
|
+
|
|
1679
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
1680
|
+
value: true
|
|
1681
|
+
}));
|
|
1682
|
+
0 && (0);
|
|
1683
|
+
function _export(target, all) {
|
|
1684
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
1685
|
+
enumerable: true,
|
|
1686
|
+
get: all[name]
|
|
1687
|
+
});
|
|
1688
|
+
}
|
|
1689
|
+
_export(exports, {
|
|
1690
|
+
ActionDidNotRevalidate: function() {
|
|
1691
|
+
return ActionDidNotRevalidate;
|
|
1692
|
+
},
|
|
1693
|
+
ActionDidRevalidateDynamicOnly: function() {
|
|
1694
|
+
return ActionDidRevalidateDynamicOnly;
|
|
1695
|
+
},
|
|
1696
|
+
ActionDidRevalidateStaticAndDynamic: function() {
|
|
1697
|
+
return ActionDidRevalidateStaticAndDynamic;
|
|
1698
|
+
}
|
|
1699
|
+
});
|
|
1700
|
+
const ActionDidNotRevalidate = 0;
|
|
1701
|
+
const ActionDidRevalidateStaticAndDynamic = 1;
|
|
1702
|
+
const ActionDidRevalidateDynamicOnly = 2; //# sourceMappingURL=action-revalidation-kind.js.map
|
|
1703
|
+
|
|
1704
|
+
|
|
1371
1705
|
/***/ }),
|
|
1372
1706
|
|
|
1373
1707
|
/***/ 27488:
|
|
@@ -1664,8 +1998,18 @@ class NextTracerImpl {
|
|
|
1664
1998
|
getActiveScopeSpan() {
|
|
1665
1999
|
return trace.getSpan(context == null ? void 0 : context.active());
|
|
1666
2000
|
}
|
|
1667
|
-
withPropagatedContext(carrier, fn, getter) {
|
|
2001
|
+
withPropagatedContext(carrier, fn, getter, force = false) {
|
|
1668
2002
|
const activeContext = context.active();
|
|
2003
|
+
if (force) {
|
|
2004
|
+
const remoteContext = propagation.extract(ROOT_CONTEXT, carrier, getter);
|
|
2005
|
+
if (trace.getSpanContext(remoteContext)) {
|
|
2006
|
+
return context.with(remoteContext, fn);
|
|
2007
|
+
}
|
|
2008
|
+
// Preserve the current active span while still merging any extracted
|
|
2009
|
+
// baggage/context values from the carrier.
|
|
2010
|
+
const mergedContext = propagation.extract(activeContext, carrier, getter);
|
|
2011
|
+
return context.with(mergedContext, fn);
|
|
2012
|
+
}
|
|
1669
2013
|
if (trace.getSpanContext(activeContext)) {
|
|
1670
2014
|
// Active span is already set, too late to propagate.
|
|
1671
2015
|
return fn();
|
|
@@ -1851,6 +2195,14 @@ const ENCODED_TAGS = {
|
|
|
1851
2195
|
109,
|
|
1852
2196
|
108
|
|
1853
2197
|
]),
|
|
2198
|
+
// <head
|
|
2199
|
+
HEAD: new Uint8Array([
|
|
2200
|
+
60,
|
|
2201
|
+
104,
|
|
2202
|
+
101,
|
|
2203
|
+
97,
|
|
2204
|
+
100
|
|
2205
|
+
]),
|
|
1854
2206
|
// <body
|
|
1855
2207
|
BODY: new Uint8Array([
|
|
1856
2208
|
60,
|
|
@@ -2114,9 +2466,16 @@ class LRUCache {
|
|
|
2114
2466
|
* - O(k) where k is the number of items evicted (can be O(N) for variable sizes)
|
|
2115
2467
|
*/ set(key, value) {
|
|
2116
2468
|
const size = (this.calculateSize == null ? void 0 : this.calculateSize.call(this, value)) ?? 1;
|
|
2469
|
+
if (size <= 0) {
|
|
2470
|
+
throw Object.defineProperty(new Error(`LRUCache: calculateSize returned ${size}, but size must be > 0. ` + `Items with size 0 would never be evicted, causing unbounded cache growth.`), "__NEXT_ERROR_CODE", {
|
|
2471
|
+
value: "E1045",
|
|
2472
|
+
enumerable: false,
|
|
2473
|
+
configurable: true
|
|
2474
|
+
});
|
|
2475
|
+
}
|
|
2117
2476
|
if (size > this.maxSize) {
|
|
2118
2477
|
console.warn('Single item size exceeds maxSize');
|
|
2119
|
-
return;
|
|
2478
|
+
return false;
|
|
2120
2479
|
}
|
|
2121
2480
|
const existing = this.cache.get(key);
|
|
2122
2481
|
if (existing) {
|
|
@@ -2139,6 +2498,7 @@ class LRUCache {
|
|
|
2139
2498
|
this.totalSize -= tail.size;
|
|
2140
2499
|
this.onEvict == null ? void 0 : this.onEvict.call(this, tail.key, tail.data);
|
|
2141
2500
|
}
|
|
2501
|
+
return true;
|
|
2142
2502
|
}
|
|
2143
2503
|
/**
|
|
2144
2504
|
* Checks if a key exists in the cache.
|
|
@@ -2359,8 +2719,8 @@ _export(exports, {
|
|
|
2359
2719
|
APP_DIR_ALIAS: function() {
|
|
2360
2720
|
return APP_DIR_ALIAS;
|
|
2361
2721
|
},
|
|
2362
|
-
|
|
2363
|
-
return
|
|
2722
|
+
CACHE_ONE_YEAR_SECONDS: function() {
|
|
2723
|
+
return CACHE_ONE_YEAR_SECONDS;
|
|
2364
2724
|
},
|
|
2365
2725
|
DOT_NEXT_ALIAS: function() {
|
|
2366
2726
|
return DOT_NEXT_ALIAS;
|
|
@@ -2410,6 +2770,9 @@ _export(exports, {
|
|
|
2410
2770
|
NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
|
|
2411
2771
|
return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;
|
|
2412
2772
|
},
|
|
2773
|
+
NEXT_CACHE_ROOT_PARAM_TAG_ID: function() {
|
|
2774
|
+
return NEXT_CACHE_ROOT_PARAM_TAG_ID;
|
|
2775
|
+
},
|
|
2413
2776
|
NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
|
|
2414
2777
|
return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;
|
|
2415
2778
|
},
|
|
@@ -2431,12 +2794,18 @@ _export(exports, {
|
|
|
2431
2794
|
NEXT_META_SUFFIX: function() {
|
|
2432
2795
|
return NEXT_META_SUFFIX;
|
|
2433
2796
|
},
|
|
2797
|
+
NEXT_NAV_DEPLOYMENT_ID_HEADER: function() {
|
|
2798
|
+
return NEXT_NAV_DEPLOYMENT_ID_HEADER;
|
|
2799
|
+
},
|
|
2434
2800
|
NEXT_QUERY_PARAM_PREFIX: function() {
|
|
2435
2801
|
return NEXT_QUERY_PARAM_PREFIX;
|
|
2436
2802
|
},
|
|
2437
2803
|
NEXT_RESUME_HEADER: function() {
|
|
2438
2804
|
return NEXT_RESUME_HEADER;
|
|
2439
2805
|
},
|
|
2806
|
+
NEXT_RESUME_STATE_LENGTH_HEADER: function() {
|
|
2807
|
+
return NEXT_RESUME_STATE_LENGTH_HEADER;
|
|
2808
|
+
},
|
|
2440
2809
|
NON_STANDARD_NODE_ENV: function() {
|
|
2441
2810
|
return NON_STANDARD_NODE_ENV;
|
|
2442
2811
|
},
|
|
@@ -2543,15 +2912,18 @@ const ACTION_SUFFIX = '.action';
|
|
|
2543
2912
|
const NEXT_DATA_SUFFIX = '.json';
|
|
2544
2913
|
const NEXT_META_SUFFIX = '.meta';
|
|
2545
2914
|
const NEXT_BODY_SUFFIX = '.body';
|
|
2915
|
+
const NEXT_NAV_DEPLOYMENT_ID_HEADER = 'x-nextjs-deployment-id';
|
|
2546
2916
|
const NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags';
|
|
2547
2917
|
const NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags';
|
|
2548
2918
|
const NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token';
|
|
2549
2919
|
const NEXT_RESUME_HEADER = 'next-resume';
|
|
2920
|
+
const NEXT_RESUME_STATE_LENGTH_HEADER = 'x-next-resume-state-length';
|
|
2550
2921
|
const NEXT_CACHE_TAG_MAX_ITEMS = 128;
|
|
2551
2922
|
const NEXT_CACHE_TAG_MAX_LENGTH = 256;
|
|
2552
2923
|
const NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;
|
|
2553
2924
|
const NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_';
|
|
2554
|
-
const
|
|
2925
|
+
const NEXT_CACHE_ROOT_PARAM_TAG_ID = '_N_RP_';
|
|
2926
|
+
const CACHE_ONE_YEAR_SECONDS = 31536000;
|
|
2555
2927
|
const INFINITE_CACHE = 0xfffffffe;
|
|
2556
2928
|
const MIDDLEWARE_FILENAME = 'middleware';
|
|
2557
2929
|
const MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;
|
|
@@ -3078,63 +3450,6 @@ class HeadersAdapter extends Headers {
|
|
|
3078
3450
|
|
|
3079
3451
|
//# sourceMappingURL=headers.js.map
|
|
3080
3452
|
|
|
3081
|
-
/***/ }),
|
|
3082
|
-
|
|
3083
|
-
/***/ 42912:
|
|
3084
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
3085
|
-
|
|
3086
|
-
"use strict";
|
|
3087
|
-
// In output: export mode, the build id is added to the start of the HTML
|
|
3088
|
-
// document, directly after the doctype declaration. During a prefetch, the
|
|
3089
|
-
// client performs a range request to get the build id, so it can check whether
|
|
3090
|
-
// the target page belongs to the same build.
|
|
3091
|
-
//
|
|
3092
|
-
// The first 64 bytes of the document are requested. The exact number isn't
|
|
3093
|
-
// too important; it must be larger than the build id + doctype + closing and
|
|
3094
|
-
// ending comment markers, but it doesn't need to match the end of the
|
|
3095
|
-
// comment exactly.
|
|
3096
|
-
//
|
|
3097
|
-
// Build ids are 21 bytes long in the default implementation, though this
|
|
3098
|
-
// can be overridden in the Next.js config. For the purposes of this check,
|
|
3099
|
-
// it's OK to only match the start of the id, so we'll truncate it if exceeds
|
|
3100
|
-
// a certain length.
|
|
3101
|
-
|
|
3102
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
3103
|
-
value: true
|
|
3104
|
-
}));
|
|
3105
|
-
Object.defineProperty(exports, "insertBuildIdComment", ({
|
|
3106
|
-
enumerable: true,
|
|
3107
|
-
get: function() {
|
|
3108
|
-
return insertBuildIdComment;
|
|
3109
|
-
}
|
|
3110
|
-
}));
|
|
3111
|
-
const DOCTYPE_PREFIX = '<!DOCTYPE html>' // 15 bytes
|
|
3112
|
-
;
|
|
3113
|
-
const MAX_BUILD_ID_LENGTH = 24;
|
|
3114
|
-
function escapeBuildId(buildId) {
|
|
3115
|
-
// If the build id is longer than the given limit, it's OK for our purposes
|
|
3116
|
-
// to only match the beginning.
|
|
3117
|
-
const truncated = buildId.slice(0, MAX_BUILD_ID_LENGTH);
|
|
3118
|
-
// Replace hyphens with underscores so it doesn't break the HTML comment.
|
|
3119
|
-
// (Unlikely, but if this did happen it would break the whole document.)
|
|
3120
|
-
return truncated.replace(/-/g, '_');
|
|
3121
|
-
}
|
|
3122
|
-
function insertBuildIdComment(originalHtml, buildId) {
|
|
3123
|
-
if (buildId.includes('-->') || // React always inserts a doctype at the start of the document. Skip if it
|
|
3124
|
-
// isn't present. Shouldn't happen; suggests an issue elsewhere.
|
|
3125
|
-
!originalHtml.startsWith(DOCTYPE_PREFIX)) {
|
|
3126
|
-
// Return the original HTML unchanged. This means the document will not
|
|
3127
|
-
// be prefetched.
|
|
3128
|
-
// TODO: The build id comment is currently only used during prefetches, but
|
|
3129
|
-
// if we eventually use this mechanism for regular navigations, we may need
|
|
3130
|
-
// to error during build if we fail to insert it for some reason.
|
|
3131
|
-
return originalHtml;
|
|
3132
|
-
}
|
|
3133
|
-
// The comment must be inserted after the doctype.
|
|
3134
|
-
return originalHtml.replace(DOCTYPE_PREFIX, DOCTYPE_PREFIX + '<!--' + escapeBuildId(buildId) + '-->');
|
|
3135
|
-
} //# sourceMappingURL=output-export-prefetch-encoding.js.map
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
3453
|
/***/ }),
|
|
3139
3454
|
|
|
3140
3455
|
/***/ 46352:
|
|
@@ -3372,8 +3687,15 @@ function selectWorkerForForwarding(actionId, pageName) {
|
|
|
3372
3687
|
// Otherwise, grab the first worker that has a handler for this action id.
|
|
3373
3688
|
return denormalizeWorkerPageName(Object.keys(workers)[0]);
|
|
3374
3689
|
}
|
|
3375
|
-
function setManifestsSingleton({ page, clientReferenceManifest, serverActionsManifest }) {
|
|
3690
|
+
function setManifestsSingleton({ page, clientReferenceManifest, serverActionsManifest: rawServerActionsManifest }) {
|
|
3376
3691
|
const existingSingleton = globalThisWithManifests[MANIFESTS_SINGLETON];
|
|
3692
|
+
const serverActionsManifest = {
|
|
3693
|
+
encryptionKey: rawServerActionsManifest.encryptionKey,
|
|
3694
|
+
// Use null-prototypes for the action objects to prevent prototype pollution
|
|
3695
|
+
// from affecting action ID lookups.
|
|
3696
|
+
node: Object.assign(Object.create(null), rawServerActionsManifest.node),
|
|
3697
|
+
edge: Object.assign(Object.create(null), rawServerActionsManifest.edge)
|
|
3698
|
+
};
|
|
3377
3699
|
if (existingSingleton) {
|
|
3378
3700
|
existingSingleton.clientReferenceManifestsPerRoute.set((0, _apppaths.normalizeAppPath)(page), clientReferenceManifest);
|
|
3379
3701
|
existingSingleton.serverActionsManifest = serverActionsManifest;
|
|
@@ -6113,6 +6435,9 @@ function _export(target, all) {
|
|
|
6113
6435
|
});
|
|
6114
6436
|
}
|
|
6115
6437
|
_export(exports, {
|
|
6438
|
+
DynamicHoleKind: function() {
|
|
6439
|
+
return DynamicHoleKind;
|
|
6440
|
+
},
|
|
6116
6441
|
Postpone: function() {
|
|
6117
6442
|
return Postpone;
|
|
6118
6443
|
},
|
|
@@ -6143,18 +6468,21 @@ _export(exports, {
|
|
|
6143
6468
|
createHangingInputAbortSignal: function() {
|
|
6144
6469
|
return createHangingInputAbortSignal;
|
|
6145
6470
|
},
|
|
6471
|
+
createInstantValidationState: function() {
|
|
6472
|
+
return createInstantValidationState;
|
|
6473
|
+
},
|
|
6146
6474
|
createRenderInBrowserAbortSignal: function() {
|
|
6147
6475
|
return createRenderInBrowserAbortSignal;
|
|
6148
6476
|
},
|
|
6149
|
-
delayUntilRuntimeStage: function() {
|
|
6150
|
-
return delayUntilRuntimeStage;
|
|
6151
|
-
},
|
|
6152
6477
|
formatDynamicAPIAccesses: function() {
|
|
6153
6478
|
return formatDynamicAPIAccesses;
|
|
6154
6479
|
},
|
|
6155
6480
|
getFirstDynamicReason: function() {
|
|
6156
6481
|
return getFirstDynamicReason;
|
|
6157
6482
|
},
|
|
6483
|
+
getNavigationDisallowedDynamicReasons: function() {
|
|
6484
|
+
return getNavigationDisallowedDynamicReasons;
|
|
6485
|
+
},
|
|
6158
6486
|
getStaticShellDisallowedDynamicReasons: function() {
|
|
6159
6487
|
return getStaticShellDisallowedDynamicReasons;
|
|
6160
6488
|
},
|
|
@@ -6185,12 +6513,18 @@ _export(exports, {
|
|
|
6185
6513
|
trackDynamicDataInDynamicRender: function() {
|
|
6186
6514
|
return trackDynamicDataInDynamicRender;
|
|
6187
6515
|
},
|
|
6516
|
+
trackDynamicHoleInNavigation: function() {
|
|
6517
|
+
return trackDynamicHoleInNavigation;
|
|
6518
|
+
},
|
|
6188
6519
|
trackDynamicHoleInRuntimeShell: function() {
|
|
6189
6520
|
return trackDynamicHoleInRuntimeShell;
|
|
6190
6521
|
},
|
|
6191
6522
|
trackDynamicHoleInStaticShell: function() {
|
|
6192
6523
|
return trackDynamicHoleInStaticShell;
|
|
6193
6524
|
},
|
|
6525
|
+
trackThrownErrorInNavigation: function() {
|
|
6526
|
+
return trackThrownErrorInNavigation;
|
|
6527
|
+
},
|
|
6194
6528
|
useDynamicRouteParams: function() {
|
|
6195
6529
|
return useDynamicRouteParams;
|
|
6196
6530
|
},
|
|
@@ -6208,6 +6542,7 @@ const _boundaryconstants = __webpack_require__(71800);
|
|
|
6208
6542
|
const _scheduler = __webpack_require__(31182);
|
|
6209
6543
|
const _bailouttocsr = __webpack_require__(22105);
|
|
6210
6544
|
const _invarianterror = __webpack_require__(96042);
|
|
6545
|
+
const _boundaryconstants1 = __webpack_require__(65452);
|
|
6211
6546
|
function _interop_require_default(obj) {
|
|
6212
6547
|
return obj && obj.__esModule ? obj : {
|
|
6213
6548
|
default: obj
|
|
@@ -6251,6 +6586,7 @@ function markCurrentScopeAsDynamic(store, workUnitStore, expression) {
|
|
|
6251
6586
|
case 'prerender-legacy':
|
|
6252
6587
|
case 'prerender-ppr':
|
|
6253
6588
|
case 'request':
|
|
6589
|
+
case 'generate-static-params':
|
|
6254
6590
|
break;
|
|
6255
6591
|
default:
|
|
6256
6592
|
workUnitStore;
|
|
@@ -6286,6 +6622,8 @@ function markCurrentScopeAsDynamic(store, workUnitStore, expression) {
|
|
|
6286
6622
|
case 'request':
|
|
6287
6623
|
if (false) {}
|
|
6288
6624
|
break;
|
|
6625
|
+
case 'generate-static-params':
|
|
6626
|
+
break;
|
|
6289
6627
|
default:
|
|
6290
6628
|
workUnitStore;
|
|
6291
6629
|
}
|
|
@@ -6320,6 +6658,8 @@ function trackDynamicDataInDynamicRender(workUnitStore) {
|
|
|
6320
6658
|
case 'prerender-legacy':
|
|
6321
6659
|
case 'prerender-ppr':
|
|
6322
6660
|
case 'prerender-client':
|
|
6661
|
+
case 'validation-client':
|
|
6662
|
+
case 'generate-static-params':
|
|
6323
6663
|
break;
|
|
6324
6664
|
case 'request':
|
|
6325
6665
|
if (false) {}
|
|
@@ -6438,7 +6778,7 @@ function consumeDynamicAccess(serverDynamic, clientDynamic) {
|
|
|
6438
6778
|
}
|
|
6439
6779
|
function formatDynamicAPIAccesses(dynamicAccesses) {
|
|
6440
6780
|
return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{
|
|
6441
|
-
stack = stack.split('\n')// Remove the "Error: " prefix from the first line of the stack trace as
|
|
6781
|
+
stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as
|
|
6442
6782
|
// well as the first 4 lines of the stack trace which is the distance
|
|
6443
6783
|
// from the user code and the `new Error().stack` call.
|
|
6444
6784
|
.slice(4).filter((line)=>{
|
|
@@ -6502,21 +6842,23 @@ function createHangingInputAbortSignal(workUnitStore) {
|
|
|
6502
6842
|
// render the content of this cache as deeply as we can so that we can
|
|
6503
6843
|
// suspend as deeply as possible in the tree or not at all if we don't
|
|
6504
6844
|
// end up waiting for the input.
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6845
|
+
if (workUnitStore.type === 'prerender-runtime' && workUnitStore.stagedRendering) {
|
|
6846
|
+
const { stagedRendering } = workUnitStore;
|
|
6847
|
+
stagedRendering.waitForStage((0, _dynamicrenderingutils.getRuntimeStage)(stagedRendering)).then(()=>(0, _scheduler.scheduleOnNextTick)(()=>controller.abort()));
|
|
6508
6848
|
} else {
|
|
6509
6849
|
(0, _scheduler.scheduleOnNextTick)(()=>controller.abort());
|
|
6510
6850
|
}
|
|
6511
6851
|
}
|
|
6512
6852
|
return controller.signal;
|
|
6513
6853
|
case 'prerender-client':
|
|
6854
|
+
case 'validation-client':
|
|
6514
6855
|
case 'prerender-ppr':
|
|
6515
6856
|
case 'prerender-legacy':
|
|
6516
6857
|
case 'request':
|
|
6517
6858
|
case 'cache':
|
|
6518
6859
|
case 'private-cache':
|
|
6519
6860
|
case 'unstable-cache':
|
|
6861
|
+
case 'generate-static-params':
|
|
6520
6862
|
return undefined;
|
|
6521
6863
|
default:
|
|
6522
6864
|
workUnitStore;
|
|
@@ -6556,6 +6898,10 @@ function useDynamicRouteParams(expression) {
|
|
|
6556
6898
|
}
|
|
6557
6899
|
break;
|
|
6558
6900
|
}
|
|
6901
|
+
case 'validation-client':
|
|
6902
|
+
{
|
|
6903
|
+
break;
|
|
6904
|
+
}
|
|
6559
6905
|
case 'prerender-runtime':
|
|
6560
6906
|
throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
6561
6907
|
value: "E771",
|
|
@@ -6569,6 +6915,12 @@ function useDynamicRouteParams(expression) {
|
|
|
6569
6915
|
enumerable: false,
|
|
6570
6916
|
configurable: true
|
|
6571
6917
|
});
|
|
6918
|
+
case 'generate-static-params':
|
|
6919
|
+
throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called in \`generateStaticParams\`. Next.js should be preventing ${expression} from being included in server component files statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
6920
|
+
value: "E1130",
|
|
6921
|
+
enumerable: false,
|
|
6922
|
+
configurable: true
|
|
6923
|
+
});
|
|
6572
6924
|
case 'prerender-legacy':
|
|
6573
6925
|
case 'request':
|
|
6574
6926
|
case 'unstable-cache':
|
|
@@ -6589,6 +6941,10 @@ function useDynamicSearchParams(expression) {
|
|
|
6589
6941
|
(0, _workunitasyncstorageexternal.throwForMissingRequestStore)(expression);
|
|
6590
6942
|
}
|
|
6591
6943
|
switch(workUnitStore.type){
|
|
6944
|
+
case 'validation-client':
|
|
6945
|
+
// During instant validation we try to behave as close to client as possible,
|
|
6946
|
+
// so this shouldn't hang during SSR.
|
|
6947
|
+
return;
|
|
6592
6948
|
case 'prerender-client':
|
|
6593
6949
|
{
|
|
6594
6950
|
_react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, expression));
|
|
@@ -6621,6 +6977,12 @@ function useDynamicSearchParams(expression) {
|
|
|
6621
6977
|
enumerable: false,
|
|
6622
6978
|
configurable: true
|
|
6623
6979
|
});
|
|
6980
|
+
case 'generate-static-params':
|
|
6981
|
+
throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called in \`generateStaticParams\`. Next.js should be preventing ${expression} from being included in server component files statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
|
|
6982
|
+
value: "E1130",
|
|
6983
|
+
enumerable: false,
|
|
6984
|
+
configurable: true
|
|
6985
|
+
});
|
|
6624
6986
|
case 'request':
|
|
6625
6987
|
return;
|
|
6626
6988
|
default:
|
|
@@ -6646,6 +7008,7 @@ const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\
|
|
|
6646
7008
|
const hasMetadataRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.METADATA_BOUNDARY_NAME}[\\n\\s]`);
|
|
6647
7009
|
const hasViewportRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`);
|
|
6648
7010
|
const hasOutletRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.OUTLET_BOUNDARY_NAME}[\\n\\s]`);
|
|
7011
|
+
const hasInstantValidationBoundaryRegex = new RegExp(`\\n\\s+at ${_boundaryconstants1.INSTANT_VALIDATION_BOUNDARY_NAME}[\\n\\s]`);
|
|
6649
7012
|
function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) {
|
|
6650
7013
|
if (hasOutletRegex.test(componentStack)) {
|
|
6651
7014
|
// We don't need to track that this is dynamic. It is only so when something else is also dynamic.
|
|
@@ -6674,23 +7037,207 @@ function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation,
|
|
|
6674
7037
|
return;
|
|
6675
7038
|
} else {
|
|
6676
7039
|
const message = `Route "${workStore.route}": Uncached data was accessed outside of ` + '<Suspense>. This delays the entire page from rendering, resulting in a ' + 'slow user experience. Learn more: ' + 'https://nextjs.org/docs/messages/blocking-route';
|
|
6677
|
-
const error =
|
|
7040
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7041
|
+
value: "E1079",
|
|
7042
|
+
enumerable: false,
|
|
7043
|
+
configurable: true
|
|
7044
|
+
}), componentStack, null);
|
|
6678
7045
|
dynamicValidation.dynamicErrors.push(error);
|
|
6679
7046
|
return;
|
|
6680
7047
|
}
|
|
6681
7048
|
}
|
|
6682
|
-
|
|
7049
|
+
var DynamicHoleKind = /*#__PURE__*/ function(DynamicHoleKind) {
|
|
7050
|
+
/** We know that this hole is caused by runtime data. */ DynamicHoleKind[DynamicHoleKind["Runtime"] = 1] = "Runtime";
|
|
7051
|
+
/** We know that this hole is caused by dynamic data. */ DynamicHoleKind[DynamicHoleKind["Dynamic"] = 2] = "Dynamic";
|
|
7052
|
+
return DynamicHoleKind;
|
|
7053
|
+
}({});
|
|
7054
|
+
function createInstantValidationState(createInstantStack) {
|
|
7055
|
+
return {
|
|
7056
|
+
hasDynamicMetadata: false,
|
|
7057
|
+
hasAllowedClientDynamicAboveBoundary: false,
|
|
7058
|
+
dynamicMetadata: null,
|
|
7059
|
+
hasDynamicViewport: false,
|
|
7060
|
+
hasAllowedDynamic: false,
|
|
7061
|
+
dynamicErrors: [],
|
|
7062
|
+
validationPreventingErrors: [],
|
|
7063
|
+
thrownErrorsOutsideBoundary: [],
|
|
7064
|
+
createInstantStack
|
|
7065
|
+
};
|
|
7066
|
+
}
|
|
7067
|
+
function trackDynamicHoleInNavigation(workStore, componentStack, dynamicValidation, clientDynamic, kind, boundaryState) {
|
|
6683
7068
|
if (hasOutletRegex.test(componentStack)) {
|
|
6684
7069
|
// We don't need to track that this is dynamic. It is only so when something else is also dynamic.
|
|
6685
7070
|
return;
|
|
6686
|
-
}
|
|
6687
|
-
|
|
6688
|
-
const
|
|
6689
|
-
|
|
6690
|
-
|
|
7071
|
+
}
|
|
7072
|
+
if (hasMetadataRegex.test(componentStack)) {
|
|
7073
|
+
const usageDescription = kind === 1 ? `Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateMetadata\` or you have file-based metadata such as icons that depend on dynamic params segments.` : `Uncached data or \`connection()\` was accessed inside \`generateMetadata\`.`;
|
|
7074
|
+
const message = `Route "${workStore.route}": ${usageDescription} Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`;
|
|
7075
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7076
|
+
value: "E1076",
|
|
7077
|
+
enumerable: false,
|
|
7078
|
+
configurable: true
|
|
7079
|
+
}), componentStack, dynamicValidation.createInstantStack);
|
|
7080
|
+
dynamicValidation.dynamicMetadata = error;
|
|
7081
|
+
return;
|
|
7082
|
+
}
|
|
7083
|
+
if (hasViewportRegex.test(componentStack)) {
|
|
7084
|
+
const usageDescription = kind === 1 ? `Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateViewport\`.` : `Uncached data or \`connection()\` was accessed inside \`generateViewport\`.`;
|
|
7085
|
+
const message = `Route "${workStore.route}": ${usageDescription} This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`;
|
|
7086
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7087
|
+
value: "E1086",
|
|
7088
|
+
enumerable: false,
|
|
7089
|
+
configurable: true
|
|
7090
|
+
}), componentStack, dynamicValidation.createInstantStack);
|
|
7091
|
+
dynamicValidation.dynamicErrors.push(error);
|
|
7092
|
+
return;
|
|
7093
|
+
}
|
|
7094
|
+
const boundaryLocation = hasInstantValidationBoundaryRegex.exec(componentStack);
|
|
7095
|
+
if (!boundaryLocation) {
|
|
7096
|
+
// We don't see the validation boundary in the component stack,
|
|
7097
|
+
// so this hole must be coming from a shared parent.
|
|
7098
|
+
// Shared parents are fully resolved and don't have RSC holes,
|
|
7099
|
+
// but they can still suspend in a client component during SSR.
|
|
7100
|
+
// If we managed to render all the validation boundaries, that means
|
|
7101
|
+
// that the client holes aren't blocking validation and we can disregard them.
|
|
7102
|
+
// Note that we don't even care whether they have suspense or not.
|
|
7103
|
+
if (boundaryState.expectedIds.size === boundaryState.renderedIds.size) {
|
|
7104
|
+
dynamicValidation.hasAllowedClientDynamicAboveBoundary = true;
|
|
7105
|
+
dynamicValidation.hasAllowedDynamic = true // Holes outside the boundary contribute to allowing dynamic metadata
|
|
7106
|
+
;
|
|
7107
|
+
return;
|
|
7108
|
+
} else {
|
|
7109
|
+
// TODO(instant-validation) TODO(NAR-787)
|
|
7110
|
+
// If shared parents blocked us from validating, we should only log
|
|
7111
|
+
// the errors from the innermost (segments), i.e. omit layouts whose
|
|
7112
|
+
// slots managed to render (because clearly they didn't block validation)
|
|
7113
|
+
const message = `Route "${workStore.route}": Could not validate \`unstable_instant\` because a Client Component in a parent segment prevented the page from rendering.`;
|
|
7114
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7115
|
+
value: "E1082",
|
|
7116
|
+
enumerable: false,
|
|
7117
|
+
configurable: true
|
|
7118
|
+
}), componentStack, dynamicValidation.createInstantStack);
|
|
7119
|
+
dynamicValidation.validationPreventingErrors.push(error);
|
|
7120
|
+
return;
|
|
7121
|
+
}
|
|
7122
|
+
} else {
|
|
7123
|
+
// The hole originates inside the validation boundary.
|
|
7124
|
+
//
|
|
7125
|
+
// Check if we have a Suspense above the hole, but below the validation boundary.
|
|
7126
|
+
// If we do, then this dynamic usage wouldn't block a navigation to this subtree.
|
|
7127
|
+
// Conversely, if the nearest suspense is above the validation boundary, then this subtree would block.
|
|
7128
|
+
//
|
|
7129
|
+
// Note that in the component stack, children come before parents.
|
|
7130
|
+
//
|
|
7131
|
+
// Valid:
|
|
7132
|
+
// ...
|
|
7133
|
+
// at Suspense
|
|
7134
|
+
// ...
|
|
7135
|
+
// at __next_prefetch_validation_boundary__
|
|
7136
|
+
//
|
|
7137
|
+
// Invalid:
|
|
7138
|
+
// ...
|
|
7139
|
+
// at __next_prefetch_validation_boundary__
|
|
7140
|
+
// ...
|
|
7141
|
+
// at Suspense
|
|
7142
|
+
//
|
|
7143
|
+
const suspenseLocation = hasSuspenseRegex.exec(componentStack);
|
|
7144
|
+
if (suspenseLocation) {
|
|
7145
|
+
if (suspenseLocation.index < boundaryLocation.index) {
|
|
7146
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
7147
|
+
return;
|
|
7148
|
+
} else {
|
|
7149
|
+
// invalid - fallthrough
|
|
7150
|
+
}
|
|
7151
|
+
}
|
|
7152
|
+
}
|
|
7153
|
+
if (clientDynamic.syncDynamicErrorWithStack) {
|
|
7154
|
+
// This task was the task that called the sync error.
|
|
7155
|
+
const syncError = clientDynamic.syncDynamicErrorWithStack;
|
|
7156
|
+
if (dynamicValidation.createInstantStack !== null && syncError.cause === undefined) {
|
|
7157
|
+
syncError.cause = dynamicValidation.createInstantStack();
|
|
7158
|
+
}
|
|
7159
|
+
dynamicValidation.dynamicErrors.push(syncError);
|
|
7160
|
+
return;
|
|
7161
|
+
}
|
|
7162
|
+
const usageDescription = kind === 1 ? `Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed outside of \`<Suspense>\`.` : `Uncached data or \`connection()\` was accessed outside of \`<Suspense>\`.`;
|
|
7163
|
+
const message = `Route "${workStore.route}": ${usageDescription} This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
|
|
7164
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7165
|
+
value: "E1078",
|
|
7166
|
+
enumerable: false,
|
|
7167
|
+
configurable: true
|
|
7168
|
+
}), componentStack, dynamicValidation.createInstantStack);
|
|
7169
|
+
dynamicValidation.dynamicErrors.push(error);
|
|
7170
|
+
return;
|
|
7171
|
+
}
|
|
7172
|
+
function trackThrownErrorInNavigation(workStore, dynamicValidation, thrownValue, componentStack) {
|
|
7173
|
+
const boundaryLocation = hasInstantValidationBoundaryRegex.exec(componentStack);
|
|
7174
|
+
if (!boundaryLocation) {
|
|
7175
|
+
// There's no validation boundary on the component stack.
|
|
7176
|
+
// This error may have blocked a boundary from rendering.
|
|
7177
|
+
// Wrap the error to provide component context.
|
|
7178
|
+
// This helps for errors from node_modules which would otherwise
|
|
7179
|
+
// have no useful stack information due to ignore-listing,
|
|
7180
|
+
// e.g. next/dynamic with `ssr: false`.
|
|
7181
|
+
const error = addErrorContext(Object.defineProperty(new Error('An error occurred while attempting to validate instant UI. This error may be preventing the validation from completing.', {
|
|
7182
|
+
cause: thrownValue
|
|
7183
|
+
}), "__NEXT_ERROR_CODE", {
|
|
7184
|
+
value: "E1118",
|
|
7185
|
+
enumerable: false,
|
|
7186
|
+
configurable: true
|
|
7187
|
+
}), componentStack, null);
|
|
7188
|
+
dynamicValidation.thrownErrorsOutsideBoundary.push(error);
|
|
7189
|
+
} else {
|
|
7190
|
+
// There's validation boundary on the component stack,
|
|
7191
|
+
// so we know this error didn't block a validation boundary from rendering.
|
|
7192
|
+
// However, this error might be hiding be hiding dynamic content that would
|
|
7193
|
+
// cause validation to fail.
|
|
7194
|
+
const suspenseLocation = hasSuspenseRegex.exec(componentStack);
|
|
7195
|
+
if (suspenseLocation) {
|
|
7196
|
+
if (suspenseLocation.index < boundaryLocation.index) {
|
|
7197
|
+
// There's a Suspense below the validation boundary but above this error's location.
|
|
7198
|
+
// This subtree can't fail instant validation because any potential
|
|
7199
|
+
// dynamic holes would be guarded by the Suspense anyway,
|
|
7200
|
+
// so we can allow this.
|
|
7201
|
+
return;
|
|
7202
|
+
} else {
|
|
7203
|
+
// invalid - fallthrough
|
|
7204
|
+
}
|
|
7205
|
+
}
|
|
7206
|
+
const message = `Route "${workStore.route}": Could not validate \`unstable_instant\` because an error prevented the target segment from rendering.`;
|
|
7207
|
+
const error = addErrorContext(Object.defineProperty(new Error(message, {
|
|
7208
|
+
cause: thrownValue
|
|
7209
|
+
}), "__NEXT_ERROR_CODE", {
|
|
7210
|
+
value: "E1112",
|
|
7211
|
+
enumerable: false,
|
|
7212
|
+
configurable: true
|
|
7213
|
+
}), componentStack, null // TODO(instant-validation-build): conflicting use of cause
|
|
7214
|
+
);
|
|
7215
|
+
dynamicValidation.validationPreventingErrors.push(error);
|
|
7216
|
+
}
|
|
7217
|
+
}
|
|
7218
|
+
function trackDynamicHoleInRuntimeShell(workStore, componentStack, dynamicValidation, clientDynamic) {
|
|
7219
|
+
if (hasOutletRegex.test(componentStack)) {
|
|
7220
|
+
// We don't need to track that this is dynamic. It is only so when something else is also dynamic.
|
|
7221
|
+
return;
|
|
7222
|
+
} else if (hasMetadataRegex.test(componentStack)) {
|
|
7223
|
+
const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed inside \`generateMetadata\`. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`;
|
|
7224
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7225
|
+
value: "E1080",
|
|
7226
|
+
enumerable: false,
|
|
7227
|
+
configurable: true
|
|
7228
|
+
}), componentStack, null);
|
|
7229
|
+
dynamicValidation.dynamicMetadata = error;
|
|
7230
|
+
return;
|
|
6691
7231
|
} else if (hasViewportRegex.test(componentStack)) {
|
|
7232
|
+
// TODO(instant-validation): If the page only has holes caused by runtime data,
|
|
7233
|
+
// we won't find out if there's a suspense-above-body and error for dynamic viewport
|
|
7234
|
+
// even if there is in fact a suspense-above-body
|
|
6692
7235
|
const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`;
|
|
6693
|
-
const error =
|
|
7236
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7237
|
+
value: "E1077",
|
|
7238
|
+
enumerable: false,
|
|
7239
|
+
configurable: true
|
|
7240
|
+
}), componentStack, null);
|
|
6694
7241
|
dynamicValidation.dynamicErrors.push(error);
|
|
6695
7242
|
return;
|
|
6696
7243
|
} else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
|
|
@@ -6709,12 +7256,15 @@ function trackDynamicHoleInRuntimeShell(workStore, componentStack, dynamicValida
|
|
|
6709
7256
|
// This task was the task that called the sync error.
|
|
6710
7257
|
dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
|
|
6711
7258
|
return;
|
|
6712
|
-
} else {
|
|
6713
|
-
const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
|
|
6714
|
-
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
6715
|
-
dynamicValidation.dynamicErrors.push(error);
|
|
6716
|
-
return;
|
|
6717
7259
|
}
|
|
7260
|
+
const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
|
|
7261
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7262
|
+
value: "E1084",
|
|
7263
|
+
enumerable: false,
|
|
7264
|
+
configurable: true
|
|
7265
|
+
}), componentStack, null);
|
|
7266
|
+
dynamicValidation.dynamicErrors.push(error);
|
|
7267
|
+
return;
|
|
6718
7268
|
}
|
|
6719
7269
|
function trackDynamicHoleInStaticShell(workStore, componentStack, dynamicValidation, clientDynamic) {
|
|
6720
7270
|
if (hasOutletRegex.test(componentStack)) {
|
|
@@ -6722,12 +7272,20 @@ function trackDynamicHoleInStaticShell(workStore, componentStack, dynamicValidat
|
|
|
6722
7272
|
return;
|
|
6723
7273
|
} else if (hasMetadataRegex.test(componentStack)) {
|
|
6724
7274
|
const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateMetadata\` or you have file-based metadata such as icons that depend on dynamic params segments. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`;
|
|
6725
|
-
const error =
|
|
7275
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7276
|
+
value: "E1085",
|
|
7277
|
+
enumerable: false,
|
|
7278
|
+
configurable: true
|
|
7279
|
+
}), componentStack, null);
|
|
6726
7280
|
dynamicValidation.dynamicMetadata = error;
|
|
6727
7281
|
return;
|
|
6728
7282
|
} else if (hasViewportRegex.test(componentStack)) {
|
|
6729
7283
|
const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`;
|
|
6730
|
-
const error =
|
|
7284
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7285
|
+
value: "E1081",
|
|
7286
|
+
enumerable: false,
|
|
7287
|
+
configurable: true
|
|
7288
|
+
}), componentStack, null);
|
|
6731
7289
|
dynamicValidation.dynamicErrors.push(error);
|
|
6732
7290
|
return;
|
|
6733
7291
|
} else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
|
|
@@ -6748,7 +7306,11 @@ function trackDynamicHoleInStaticShell(workStore, componentStack, dynamicValidat
|
|
|
6748
7306
|
return;
|
|
6749
7307
|
} else {
|
|
6750
7308
|
const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
|
|
6751
|
-
const error =
|
|
7309
|
+
const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
7310
|
+
value: "E1083",
|
|
7311
|
+
enumerable: false,
|
|
7312
|
+
configurable: true
|
|
7313
|
+
}), componentStack, null);
|
|
6752
7314
|
dynamicValidation.dynamicErrors.push(error);
|
|
6753
7315
|
return;
|
|
6754
7316
|
}
|
|
@@ -6756,16 +7318,17 @@ function trackDynamicHoleInStaticShell(workStore, componentStack, dynamicValidat
|
|
|
6756
7318
|
/**
|
|
6757
7319
|
* In dev mode, we prefer using the owner stack, otherwise the provided
|
|
6758
7320
|
* component stack is used.
|
|
6759
|
-
|
|
7321
|
+
*
|
|
7322
|
+
* Accepts an already-created Error so the SWC error-code plugin can see the
|
|
7323
|
+
* `new Error(...)` call at each call site and auto-assign error codes.
|
|
7324
|
+
*/ function addErrorContext(error, componentStack, createInstantStack) {
|
|
6760
7325
|
const ownerStack = false ? 0 : null;
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
configurable: true
|
|
6765
|
-
});
|
|
7326
|
+
if (createInstantStack !== null) {
|
|
7327
|
+
error.cause = createInstantStack();
|
|
7328
|
+
}
|
|
6766
7329
|
// TODO go back to owner stack here if available. This is temporarily using componentStack to get the right
|
|
6767
7330
|
//
|
|
6768
|
-
error.stack = error.name + ': ' + message + (ownerStack || componentStack);
|
|
7331
|
+
error.stack = error.name + ': ' + error.message + (ownerStack || componentStack);
|
|
6769
7332
|
return error;
|
|
6770
7333
|
}
|
|
6771
7334
|
var PreludeState = /*#__PURE__*/ function(PreludeState) {
|
|
@@ -6776,15 +7339,11 @@ var PreludeState = /*#__PURE__*/ function(PreludeState) {
|
|
|
6776
7339
|
}({});
|
|
6777
7340
|
function logDisallowedDynamicError(workStore, error) {
|
|
6778
7341
|
console.error(error);
|
|
6779
|
-
if (
|
|
6780
|
-
|
|
6781
|
-
console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`);
|
|
6782
|
-
} else {
|
|
6783
|
-
console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
|
|
7342
|
+
if (true) {
|
|
7343
|
+
console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following:
|
|
6784
7344
|
- Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.
|
|
6785
7345
|
- Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`);
|
|
6786
|
-
|
|
6787
|
-
}
|
|
7346
|
+
} else {}
|
|
6788
7347
|
}
|
|
6789
7348
|
function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) {
|
|
6790
7349
|
if (serverDynamic.syncDynamicErrorWithStack) {
|
|
@@ -6830,8 +7389,8 @@ function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverD
|
|
|
6830
7389
|
}
|
|
6831
7390
|
}
|
|
6832
7391
|
}
|
|
6833
|
-
function getStaticShellDisallowedDynamicReasons(workStore, prelude, dynamicValidation) {
|
|
6834
|
-
if (dynamicValidation.hasSuspenseAboveBody) {
|
|
7392
|
+
function getStaticShellDisallowedDynamicReasons(workStore, prelude, dynamicValidation, configAllowsBlocking) {
|
|
7393
|
+
if (configAllowsBlocking || dynamicValidation.hasSuspenseAboveBody) {
|
|
6835
7394
|
// This route has opted into allowing fully dynamic rendering
|
|
6836
7395
|
// by including a Suspense boundary above the body. In this case
|
|
6837
7396
|
// a lack of a shell is not considered disallowed so we simply return
|
|
@@ -6868,14 +7427,85 @@ function getStaticShellDisallowedDynamicReasons(workStore, prelude, dynamicValid
|
|
|
6868
7427
|
// We had a non-empty prelude and there are no dynamic holes
|
|
6869
7428
|
return [];
|
|
6870
7429
|
}
|
|
6871
|
-
function
|
|
6872
|
-
|
|
6873
|
-
|
|
7430
|
+
function getNavigationDisallowedDynamicReasons(workStore, prelude, dynamicValidation, validationSampleTracking, boundaryState) {
|
|
7431
|
+
// If we have errors related to missing samples, those should take precedence over everything else.
|
|
7432
|
+
if (validationSampleTracking) {
|
|
7433
|
+
const { missingSampleErrors } = validationSampleTracking;
|
|
7434
|
+
if (missingSampleErrors.length > 0) {
|
|
7435
|
+
return missingSampleErrors;
|
|
7436
|
+
}
|
|
7437
|
+
}
|
|
7438
|
+
const { validationPreventingErrors } = dynamicValidation;
|
|
7439
|
+
if (validationPreventingErrors.length > 0) {
|
|
7440
|
+
return validationPreventingErrors;
|
|
7441
|
+
}
|
|
7442
|
+
if (boundaryState.renderedIds.size < boundaryState.expectedIds.size) {
|
|
7443
|
+
const { thrownErrorsOutsideBoundary, createInstantStack } = dynamicValidation;
|
|
7444
|
+
if (thrownErrorsOutsideBoundary.length === 0) {
|
|
7445
|
+
const message = `Route "${workStore.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering for an unknown reason.`;
|
|
7446
|
+
const error = createInstantStack !== null ? createInstantStack() : new Error();
|
|
7447
|
+
error.name = 'Error';
|
|
7448
|
+
error.message = message;
|
|
7449
|
+
return [
|
|
7450
|
+
error
|
|
7451
|
+
];
|
|
7452
|
+
} else if (thrownErrorsOutsideBoundary.length === 1) {
|
|
7453
|
+
const message = `Route "${workStore.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering, likely due to the following error.`;
|
|
7454
|
+
const error = createInstantStack !== null ? createInstantStack() : new Error();
|
|
7455
|
+
error.name = 'Error';
|
|
7456
|
+
error.message = message;
|
|
7457
|
+
return [
|
|
7458
|
+
error,
|
|
7459
|
+
thrownErrorsOutsideBoundary[0]
|
|
7460
|
+
];
|
|
7461
|
+
} else {
|
|
7462
|
+
const message = `Route "${workStore.route}": Could not validate \`unstable_instant\` because the target segment was prevented from rendering, likely due to one of the following errors.`;
|
|
7463
|
+
const error = createInstantStack !== null ? createInstantStack() : new Error();
|
|
7464
|
+
error.name = 'Error';
|
|
7465
|
+
error.message = message;
|
|
7466
|
+
return [
|
|
7467
|
+
error,
|
|
7468
|
+
...thrownErrorsOutsideBoundary
|
|
7469
|
+
];
|
|
7470
|
+
}
|
|
6874
7471
|
}
|
|
6875
|
-
|
|
6876
|
-
|
|
7472
|
+
// NOTE: We don't care about Suspense above body here,
|
|
7473
|
+
// we're only concerned with the validation boundary
|
|
7474
|
+
if (prelude !== 0) {
|
|
7475
|
+
const dynamicErrors = dynamicValidation.dynamicErrors;
|
|
7476
|
+
if (dynamicErrors.length > 0) {
|
|
7477
|
+
return dynamicErrors;
|
|
7478
|
+
}
|
|
7479
|
+
if (prelude === 1) {
|
|
7480
|
+
// If a client component suspended prevented us from rendering a shell
|
|
7481
|
+
// but didn't block validation, we don't require a prelude.
|
|
7482
|
+
if (dynamicValidation.hasAllowedClientDynamicAboveBoundary) {
|
|
7483
|
+
return [];
|
|
7484
|
+
}
|
|
7485
|
+
// If we ever get this far then we messed up the tracking of invalid dynamic.
|
|
7486
|
+
return [
|
|
7487
|
+
Object.defineProperty(new _invarianterror.InvariantError(`Route "${workStore.route}" failed to render during instant validation and Next.js was unable to determine a reason.`), "__NEXT_ERROR_CODE", {
|
|
7488
|
+
value: "E1055",
|
|
7489
|
+
enumerable: false,
|
|
7490
|
+
configurable: true
|
|
7491
|
+
})
|
|
7492
|
+
];
|
|
7493
|
+
}
|
|
7494
|
+
} else {
|
|
7495
|
+
const dynamicErrors = dynamicValidation.dynamicErrors;
|
|
7496
|
+
if (dynamicErrors.length > 0) {
|
|
7497
|
+
return dynamicErrors;
|
|
7498
|
+
}
|
|
7499
|
+
if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.dynamicMetadata) {
|
|
7500
|
+
return [
|
|
7501
|
+
dynamicValidation.dynamicMetadata
|
|
7502
|
+
];
|
|
7503
|
+
}
|
|
7504
|
+
}
|
|
7505
|
+
// We had a non-empty prelude and there are no dynamic holes
|
|
7506
|
+
return [];
|
|
7507
|
+
} //# sourceMappingURL=dynamic-rendering.js.map
|
|
6877
7508
|
|
|
6878
|
-
//# sourceMappingURL=dynamic-rendering.js.map
|
|
6879
7509
|
|
|
6880
7510
|
/***/ }),
|
|
6881
7511
|
|
|
@@ -7418,9 +8048,15 @@ _export(exports, {
|
|
|
7418
8048
|
createDocumentClosingStream: function() {
|
|
7419
8049
|
return createDocumentClosingStream;
|
|
7420
8050
|
},
|
|
8051
|
+
createInstantTestScriptInsertionTransformStream: function() {
|
|
8052
|
+
return createInstantTestScriptInsertionTransformStream;
|
|
8053
|
+
},
|
|
7421
8054
|
createRootLayoutValidatorStream: function() {
|
|
7422
8055
|
return createRootLayoutValidatorStream;
|
|
7423
8056
|
},
|
|
8057
|
+
createRuntimePrefetchTransformStream: function() {
|
|
8058
|
+
return createRuntimePrefetchTransformStream;
|
|
8059
|
+
},
|
|
7424
8060
|
renderToInitialFizzStream: function() {
|
|
7425
8061
|
return renderToInitialFizzStream;
|
|
7426
8062
|
},
|
|
@@ -7447,7 +8083,6 @@ const _scheduler = __webpack_require__(31182);
|
|
|
7447
8083
|
const _encodedtags = __webpack_require__(29898);
|
|
7448
8084
|
const _uint8arrayhelpers = __webpack_require__(75099);
|
|
7449
8085
|
const _constants1 = __webpack_require__(46596);
|
|
7450
|
-
const _outputexportprefetchencoding = __webpack_require__(42912);
|
|
7451
8086
|
const _approuterheaders = __webpack_require__(7162);
|
|
7452
8087
|
const _cachebustingsearchparam = __webpack_require__(36017);
|
|
7453
8088
|
function voidCatch() {
|
|
@@ -7614,31 +8249,6 @@ function createBufferedTransformStream(options = {}) {
|
|
|
7614
8249
|
}
|
|
7615
8250
|
});
|
|
7616
8251
|
}
|
|
7617
|
-
function createPrefetchCommentStream(isBuildTimePrerendering, buildId) {
|
|
7618
|
-
// Insert an extra comment at the beginning of the HTML document. This must
|
|
7619
|
-
// come after the DOCTYPE, which is inserted by React.
|
|
7620
|
-
//
|
|
7621
|
-
// The first chunk sent by React will contain the doctype. After that, we can
|
|
7622
|
-
// pass through the rest of the chunks as-is.
|
|
7623
|
-
let didTransformFirstChunk = false;
|
|
7624
|
-
return new TransformStream({
|
|
7625
|
-
transform (chunk, controller) {
|
|
7626
|
-
if (isBuildTimePrerendering && !didTransformFirstChunk) {
|
|
7627
|
-
didTransformFirstChunk = true;
|
|
7628
|
-
const decoder = new TextDecoder('utf-8', {
|
|
7629
|
-
fatal: true
|
|
7630
|
-
});
|
|
7631
|
-
const chunkStr = decoder.decode(chunk, {
|
|
7632
|
-
stream: true
|
|
7633
|
-
});
|
|
7634
|
-
const updatedChunkStr = (0, _outputexportprefetchencoding.insertBuildIdComment)(chunkStr, buildId);
|
|
7635
|
-
controller.enqueue(encoder.encode(updatedChunkStr));
|
|
7636
|
-
return;
|
|
7637
|
-
}
|
|
7638
|
-
controller.enqueue(chunk);
|
|
7639
|
-
}
|
|
7640
|
-
});
|
|
7641
|
-
}
|
|
7642
8252
|
function renderToInitialFizzStream({ ReactDOMServer, element, streamOptions }) {
|
|
7643
8253
|
return (0, _tracer.getTracer)().trace(_constants.AppRenderSpan.renderToReadableStream, async ()=>ReactDOMServer.renderToReadableStream(element, streamOptions));
|
|
7644
8254
|
}
|
|
@@ -7828,6 +8438,63 @@ function createClientResumeScriptInsertionTransformStream() {
|
|
|
7828
8438
|
}
|
|
7829
8439
|
});
|
|
7830
8440
|
}
|
|
8441
|
+
function createInstantTestScriptInsertionTransformStream(requestId) {
|
|
8442
|
+
// Kick off a fetch for the static RSC payload. This is the hydration
|
|
8443
|
+
// source for the locked static shell — same as the __NEXT_CLIENT_RESUME
|
|
8444
|
+
// fetch used for fallback routes, but with NEXT_INSTANT_PREFETCH_HEADER
|
|
8445
|
+
// so the server returns static-only data.
|
|
8446
|
+
//
|
|
8447
|
+
// The fetch promise is stored as self.__next_instant_test, which doubles
|
|
8448
|
+
// as the feature flag (truthy = instant test mode). The client processes
|
|
8449
|
+
// this as a fallback prerender payload for hydration.
|
|
8450
|
+
const segmentPath = '/_full';
|
|
8451
|
+
const cacheBustingHeader = (0, _cachebustingsearchparam.computeCacheBustingSearchParam)('1', segmentPath, undefined, undefined);
|
|
8452
|
+
const searchStr = `${_approuterheaders.NEXT_RSC_UNION_QUERY}=${cacheBustingHeader}`;
|
|
8453
|
+
// In dev mode, inject self.__next_r (request ID) so that HMR WebSocket
|
|
8454
|
+
// and debug channel initialization don't crash. The static shell
|
|
8455
|
+
// bypasses renderToFizzStream which normally injects this via
|
|
8456
|
+
// bootstrapScriptContent.
|
|
8457
|
+
const requestIdScript = requestId !== null ? `self.__next_r=${JSON.stringify(requestId)};` : '';
|
|
8458
|
+
const INSTANT_TEST_SCRIPT = `<script>${requestIdScript}self.__next_instant_test=fetch(location.pathname+'?${searchStr}',{credentials:'same-origin',headers:{'${_approuterheaders.RSC_HEADER}':'1','${_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER}':'1','${_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER}':'${segmentPath}','${_approuterheaders.NEXT_INSTANT_PREFETCH_HEADER}':'1'}})</script>`;
|
|
8459
|
+
let didAlreadyInsert = false;
|
|
8460
|
+
return new TransformStream({
|
|
8461
|
+
transform (chunk, controller) {
|
|
8462
|
+
if (didAlreadyInsert) {
|
|
8463
|
+
// Already inserted the script into the head. Pass through.
|
|
8464
|
+
controller.enqueue(chunk);
|
|
8465
|
+
return;
|
|
8466
|
+
}
|
|
8467
|
+
// Find the opening <head tag (may have attributes like <head class="...">)
|
|
8468
|
+
const headOpenIndex = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.OPENING.HEAD);
|
|
8469
|
+
if (headOpenIndex === -1) {
|
|
8470
|
+
controller.enqueue(chunk);
|
|
8471
|
+
return;
|
|
8472
|
+
}
|
|
8473
|
+
// Find the closing > of the <head ...> tag
|
|
8474
|
+
const headCloseAngle = chunk.indexOf(62, headOpenIndex + _encodedtags.ENCODED_TAGS.OPENING.HEAD.length);
|
|
8475
|
+
if (headCloseAngle === -1) {
|
|
8476
|
+
controller.enqueue(chunk);
|
|
8477
|
+
return;
|
|
8478
|
+
}
|
|
8479
|
+
const encodedInsertion = encoder.encode(INSTANT_TEST_SCRIPT);
|
|
8480
|
+
const insertionPoint = headCloseAngle + 1;
|
|
8481
|
+
// e.g.
|
|
8482
|
+
// chunk = <!DOCTYPE html><html><head><meta charset="utf-8">...
|
|
8483
|
+
// insertion = <script>self.__next_instant_test=fetch(...)</script>
|
|
8484
|
+
// output = <!DOCTYPE html><html><head> [ <script>...</script> ] <meta charset="utf-8">...
|
|
8485
|
+
const insertedHeadContent = new Uint8Array(chunk.length + encodedInsertion.length);
|
|
8486
|
+
insertedHeadContent.set(chunk.slice(0, insertionPoint));
|
|
8487
|
+
insertedHeadContent.set(encodedInsertion, insertionPoint);
|
|
8488
|
+
insertedHeadContent.set(chunk.slice(insertionPoint), insertionPoint + encodedInsertion.length);
|
|
8489
|
+
controller.enqueue(insertedHeadContent);
|
|
8490
|
+
didAlreadyInsert = true;
|
|
8491
|
+
},
|
|
8492
|
+
flush (controller) {
|
|
8493
|
+
// Append closing tags so the browser can parse the full document.
|
|
8494
|
+
controller.enqueue(_encodedtags.ENCODED_TAGS.CLOSED.BODY_AND_HTML);
|
|
8495
|
+
}
|
|
8496
|
+
});
|
|
8497
|
+
}
|
|
7831
8498
|
// Suffix after main body content - scripts before </body>,
|
|
7832
8499
|
// but wait for the major chunks to be enqueued.
|
|
7833
8500
|
function createDeferredSuffixStream(suffix) {
|
|
@@ -7993,6 +8660,35 @@ function createStripDocumentClosingTagsTransform() {
|
|
|
7993
8660
|
}
|
|
7994
8661
|
});
|
|
7995
8662
|
}
|
|
8663
|
+
function createHtmlDataDplIdTransformStream(dplId) {
|
|
8664
|
+
let didTransform = false;
|
|
8665
|
+
return new TransformStream({
|
|
8666
|
+
transform (chunk, controller) {
|
|
8667
|
+
if (didTransform) {
|
|
8668
|
+
controller.enqueue(chunk);
|
|
8669
|
+
return;
|
|
8670
|
+
}
|
|
8671
|
+
const htmlTagIndex = (0, _uint8arrayhelpers.indexOfUint8Array)(chunk, _encodedtags.ENCODED_TAGS.OPENING.HTML);
|
|
8672
|
+
if (htmlTagIndex === -1) {
|
|
8673
|
+
controller.enqueue(chunk);
|
|
8674
|
+
return;
|
|
8675
|
+
}
|
|
8676
|
+
// Insert the data-dpl-id attribute right after "<html "
|
|
8677
|
+
const insertionPoint = htmlTagIndex + _encodedtags.ENCODED_TAGS.OPENING.HTML.length;
|
|
8678
|
+
const attribute = ` data-dpl-id="${dplId}"`;
|
|
8679
|
+
const encodedAttribute = encoder.encode(attribute);
|
|
8680
|
+
const modifiedChunk = new Uint8Array(chunk.length + encodedAttribute.length);
|
|
8681
|
+
// Copy everything before the insertion point
|
|
8682
|
+
modifiedChunk.set(chunk.subarray(0, insertionPoint));
|
|
8683
|
+
// Insert the attribute
|
|
8684
|
+
modifiedChunk.set(encodedAttribute, insertionPoint);
|
|
8685
|
+
// Copy everything after
|
|
8686
|
+
modifiedChunk.set(chunk.subarray(insertionPoint), insertionPoint + encodedAttribute.length);
|
|
8687
|
+
controller.enqueue(modifiedChunk);
|
|
8688
|
+
didTransform = true;
|
|
8689
|
+
}
|
|
8690
|
+
});
|
|
8691
|
+
}
|
|
7996
8692
|
function createRootLayoutValidatorStream() {
|
|
7997
8693
|
let foundHtml = false;
|
|
7998
8694
|
let foundBody = false;
|
|
@@ -8030,7 +8726,7 @@ function chainTransformers(readable, transformers) {
|
|
|
8030
8726
|
}
|
|
8031
8727
|
return stream;
|
|
8032
8728
|
}
|
|
8033
|
-
async function continueFizzStream(renderStream, { suffix, inlinedDataStream, isStaticGeneration,
|
|
8729
|
+
async function continueFizzStream(renderStream, { suffix, inlinedDataStream, isStaticGeneration, deploymentId, getServerInsertedHTML, getServerInsertedMetadata, validateRootLayout }) {
|
|
8034
8730
|
// Suffix itself might contain close tags at the end, so we need to split it.
|
|
8035
8731
|
const suffixUnclosed = suffix ? suffix.split(CLOSE_TAG, 1)[0] : null;
|
|
8036
8732
|
if (isStaticGeneration) {
|
|
@@ -8044,8 +8740,8 @@ async function continueFizzStream(renderStream, { suffix, inlinedDataStream, isS
|
|
|
8044
8740
|
return chainTransformers(renderStream, [
|
|
8045
8741
|
// Buffer everything to avoid flushing too frequently
|
|
8046
8742
|
createBufferedTransformStream(),
|
|
8047
|
-
//
|
|
8048
|
-
|
|
8743
|
+
// Insert data-dpl-id attribute on the html tag
|
|
8744
|
+
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
8049
8745
|
// Transform metadata
|
|
8050
8746
|
createMetadataTransformStream(getServerInsertedMetadata),
|
|
8051
8747
|
// Insert suffix content
|
|
@@ -8062,50 +8758,183 @@ async function continueFizzStream(renderStream, { suffix, inlinedDataStream, isS
|
|
|
8062
8758
|
createHeadInsertionTransformStream(getServerInsertedHTML)
|
|
8063
8759
|
]);
|
|
8064
8760
|
}
|
|
8065
|
-
async function continueDynamicPrerender(prerenderStream, { getServerInsertedHTML, getServerInsertedMetadata }) {
|
|
8066
|
-
return prerenderStream
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8761
|
+
async function continueDynamicPrerender(prerenderStream, { getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {
|
|
8762
|
+
return chainTransformers(prerenderStream, [
|
|
8763
|
+
// Buffer everything to avoid flushing too frequently
|
|
8764
|
+
createBufferedTransformStream(),
|
|
8765
|
+
createStripDocumentClosingTagsTransform(),
|
|
8766
|
+
// Insert data-dpl-id attribute on the html tag
|
|
8767
|
+
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
8768
|
+
// Insert generated tags to head
|
|
8769
|
+
createHeadInsertionTransformStream(getServerInsertedHTML),
|
|
8770
|
+
// Transform metadata
|
|
8771
|
+
createMetadataTransformStream(getServerInsertedMetadata)
|
|
8772
|
+
]);
|
|
8773
|
+
}
|
|
8774
|
+
async function continueStaticPrerender(prerenderStream, { inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {
|
|
8775
|
+
return chainTransformers(prerenderStream, [
|
|
8776
|
+
// Buffer everything to avoid flushing too frequently
|
|
8777
|
+
createBufferedTransformStream(),
|
|
8778
|
+
// Add build id comment to start of the HTML document (in export mode)
|
|
8779
|
+
// Insert data-dpl-id attribute on the html tag
|
|
8780
|
+
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
8781
|
+
// Insert generated tags to head
|
|
8782
|
+
createHeadInsertionTransformStream(getServerInsertedHTML),
|
|
8783
|
+
// Transform metadata
|
|
8784
|
+
createMetadataTransformStream(getServerInsertedMetadata),
|
|
8785
|
+
// Insert the inlined data (Flight data, form state, etc.) stream into the HTML
|
|
8786
|
+
createFlightDataInjectionTransformStream(inlinedDataStream, true),
|
|
8787
|
+
// Close tags should always be deferred to the end
|
|
8788
|
+
createMoveSuffixStream()
|
|
8789
|
+
]);
|
|
8790
|
+
}
|
|
8791
|
+
async function continueStaticFallbackPrerender(prerenderStream, { inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {
|
|
8081
8792
|
// Same as `continueStaticPrerender`, but also inserts an additional script
|
|
8082
8793
|
// to instruct the client to start fetching the hydration data as early
|
|
8083
8794
|
// as possible.
|
|
8084
|
-
return prerenderStream
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8795
|
+
return chainTransformers(prerenderStream, [
|
|
8796
|
+
// Buffer everything to avoid flushing too frequently
|
|
8797
|
+
createBufferedTransformStream(),
|
|
8798
|
+
// Insert data-dpl-id attribute on the html tag
|
|
8799
|
+
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
8800
|
+
// Insert generated tags to head
|
|
8801
|
+
createHeadInsertionTransformStream(getServerInsertedHTML),
|
|
8802
|
+
// Insert the client resume script into the head
|
|
8803
|
+
createClientResumeScriptInsertionTransformStream(),
|
|
8804
|
+
// Transform metadata
|
|
8805
|
+
createMetadataTransformStream(getServerInsertedMetadata),
|
|
8806
|
+
// Insert the inlined data (Flight data, form state, etc.) stream into the HTML
|
|
8807
|
+
createFlightDataInjectionTransformStream(inlinedDataStream, true),
|
|
8808
|
+
// Close tags should always be deferred to the end
|
|
8809
|
+
createMoveSuffixStream()
|
|
8810
|
+
]);
|
|
8811
|
+
}
|
|
8812
|
+
async function continueDynamicHTMLResume(renderStream, { delayDataUntilFirstHtmlChunk, inlinedDataStream, getServerInsertedHTML, getServerInsertedMetadata, deploymentId }) {
|
|
8813
|
+
return chainTransformers(renderStream, [
|
|
8814
|
+
// Buffer everything to avoid flushing too frequently
|
|
8815
|
+
createBufferedTransformStream(),
|
|
8816
|
+
// Insert data-dpl-id attribute on the html tag
|
|
8817
|
+
deploymentId ? createHtmlDataDplIdTransformStream(deploymentId) : null,
|
|
8818
|
+
// Insert generated tags to head
|
|
8819
|
+
createHeadInsertionTransformStream(getServerInsertedHTML),
|
|
8820
|
+
// Transform metadata
|
|
8821
|
+
createMetadataTransformStream(getServerInsertedMetadata),
|
|
8822
|
+
// Insert the inlined data (Flight data, form state, etc.) stream into the HTML
|
|
8823
|
+
createFlightDataInjectionTransformStream(inlinedDataStream, delayDataUntilFirstHtmlChunk),
|
|
8824
|
+
// Close tags should always be deferred to the end
|
|
8825
|
+
createMoveSuffixStream()
|
|
8826
|
+
]);
|
|
8100
8827
|
}
|
|
8101
8828
|
function createDocumentClosingStream() {
|
|
8102
8829
|
return streamFromString(CLOSE_TAG);
|
|
8103
8830
|
}
|
|
8831
|
+
function createRuntimePrefetchTransformStream(sentinel, isPartial, staleTime) {
|
|
8832
|
+
const enc = new TextEncoder();
|
|
8833
|
+
// Search for: [<sentinel>]
|
|
8834
|
+
// Replace with: [<isPartial>,<staleTime>]
|
|
8835
|
+
const search = enc.encode(`[${sentinel}]`);
|
|
8836
|
+
const first = search[0];
|
|
8837
|
+
const replace = enc.encode(`[${isPartial},${staleTime}]`);
|
|
8838
|
+
const searchLen = search.length;
|
|
8839
|
+
let currentChunk = null;
|
|
8840
|
+
let found = false;
|
|
8841
|
+
function processChunk(controller, nextChunk) {
|
|
8842
|
+
if (found) {
|
|
8843
|
+
if (nextChunk) {
|
|
8844
|
+
controller.enqueue(nextChunk);
|
|
8845
|
+
}
|
|
8846
|
+
return;
|
|
8847
|
+
}
|
|
8848
|
+
if (currentChunk) {
|
|
8849
|
+
// We can't search past the index that can contain a full match
|
|
8850
|
+
let exclusiveUpperBound = currentChunk.length - (searchLen - 1);
|
|
8851
|
+
if (nextChunk) {
|
|
8852
|
+
// If we have any overflow bytes we can search up to the chunk's final byte
|
|
8853
|
+
exclusiveUpperBound += Math.min(nextChunk.length, searchLen - 1);
|
|
8854
|
+
}
|
|
8855
|
+
if (exclusiveUpperBound < 1) {
|
|
8856
|
+
// we can't match the current chunk.
|
|
8857
|
+
controller.enqueue(currentChunk);
|
|
8858
|
+
currentChunk = nextChunk // advance so we don't process this chunk again
|
|
8859
|
+
;
|
|
8860
|
+
return;
|
|
8861
|
+
}
|
|
8862
|
+
let currentIndex = currentChunk.indexOf(first);
|
|
8863
|
+
// check the current candidate match if it is within the bounds of our search space for the currentChunk
|
|
8864
|
+
candidateLoop: while(-1 < currentIndex && currentIndex < exclusiveUpperBound){
|
|
8865
|
+
// We already know index 0 matches because we used indexOf to find the candidateIndex so we start at index 1
|
|
8866
|
+
let matchIndex = 1;
|
|
8867
|
+
while(matchIndex < searchLen){
|
|
8868
|
+
const candidateIndex = currentIndex + matchIndex;
|
|
8869
|
+
const candidateValue = candidateIndex < currentChunk.length ? currentChunk[candidateIndex] : nextChunk[candidateIndex - currentChunk.length];
|
|
8870
|
+
if (candidateValue !== search[matchIndex]) {
|
|
8871
|
+
// No match, reset and continue the search from the next position
|
|
8872
|
+
currentIndex = currentChunk.indexOf(first, currentIndex + 1);
|
|
8873
|
+
continue candidateLoop;
|
|
8874
|
+
}
|
|
8875
|
+
matchIndex++;
|
|
8876
|
+
}
|
|
8877
|
+
// We found a complete match. currentIndex is our starting point to replace the value.
|
|
8878
|
+
found = true;
|
|
8879
|
+
// enqueue everything up to the match
|
|
8880
|
+
controller.enqueue(currentChunk.subarray(0, currentIndex));
|
|
8881
|
+
// enqueue the replacement value
|
|
8882
|
+
controller.enqueue(replace);
|
|
8883
|
+
// If there are bytes in the currentChunk after the match enqueue them
|
|
8884
|
+
if (currentIndex + searchLen < currentChunk.length) {
|
|
8885
|
+
controller.enqueue(currentChunk.slice(currentIndex + searchLen));
|
|
8886
|
+
}
|
|
8887
|
+
// If we have a next chunk we enqueue it now
|
|
8888
|
+
if (nextChunk) {
|
|
8889
|
+
// if replacement spills over to the next chunk we first exclude the replaced bytes
|
|
8890
|
+
const overflowBytes = currentIndex + searchLen - currentChunk.length;
|
|
8891
|
+
const truncatedChunk = overflowBytes > 0 ? nextChunk.subarray(overflowBytes) : nextChunk;
|
|
8892
|
+
controller.enqueue(truncatedChunk);
|
|
8893
|
+
}
|
|
8894
|
+
// We are now in found mode and don't need to track currentChunk anymore
|
|
8895
|
+
currentChunk = null;
|
|
8896
|
+
return;
|
|
8897
|
+
}
|
|
8898
|
+
// No match found in this chunk, emit it and wait for the next one
|
|
8899
|
+
controller.enqueue(currentChunk);
|
|
8900
|
+
}
|
|
8901
|
+
// Advance to the next chunk
|
|
8902
|
+
currentChunk = nextChunk;
|
|
8903
|
+
}
|
|
8904
|
+
return new TransformStream({
|
|
8905
|
+
transform (chunk, controller) {
|
|
8906
|
+
processChunk(controller, chunk);
|
|
8907
|
+
},
|
|
8908
|
+
flush (controller) {
|
|
8909
|
+
processChunk(controller, null);
|
|
8910
|
+
}
|
|
8911
|
+
});
|
|
8912
|
+
}
|
|
8104
8913
|
|
|
8105
8914
|
//# sourceMappingURL=node-web-streams-helper.js.map
|
|
8106
8915
|
|
|
8107
8916
|
/***/ }),
|
|
8108
8917
|
|
|
8918
|
+
/***/ 65452:
|
|
8919
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
8920
|
+
|
|
8921
|
+
"use strict";
|
|
8922
|
+
|
|
8923
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
8924
|
+
value: true
|
|
8925
|
+
}));
|
|
8926
|
+
Object.defineProperty(exports, "INSTANT_VALIDATION_BOUNDARY_NAME", ({
|
|
8927
|
+
enumerable: true,
|
|
8928
|
+
get: function() {
|
|
8929
|
+
return INSTANT_VALIDATION_BOUNDARY_NAME;
|
|
8930
|
+
}
|
|
8931
|
+
}));
|
|
8932
|
+
const INSTANT_VALIDATION_BOUNDARY_NAME = '__next_instant_validation_boundary__';
|
|
8933
|
+
|
|
8934
|
+
//# sourceMappingURL=boundary-constants.js.map
|
|
8935
|
+
|
|
8936
|
+
/***/ }),
|
|
8937
|
+
|
|
8109
8938
|
/***/ 66849:
|
|
8110
8939
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
8111
8940
|
|
|
@@ -8860,6 +9689,7 @@ async function toResponseCacheEntry(response) {
|
|
|
8860
9689
|
isMiss: response.isMiss,
|
|
8861
9690
|
isStale: response.isStale,
|
|
8862
9691
|
cacheControl: response.cacheControl,
|
|
9692
|
+
isFallback: response.isFallback,
|
|
8863
9693
|
value: ((_response_value = response.value) == null ? void 0 : _response_value.kind) === _types.CachedRouteKind.PAGES ? {
|
|
8864
9694
|
kind: _types.CachedRouteKind.PAGES,
|
|
8865
9695
|
html: _renderresult.default.fromStatic(response.value.html, _constants.HTML_CONTENT_TYPE_HEADER),
|
|
@@ -9187,6 +10017,11 @@ _export(exports, {
|
|
|
9187
10017
|
function indexOfUint8Array(a, b) {
|
|
9188
10018
|
if (b.length === 0) return 0;
|
|
9189
10019
|
if (a.length === 0 || b.length > a.length) return -1;
|
|
10020
|
+
// Use Node's native implementation when available.
|
|
10021
|
+
if (typeof Buffer !== 'undefined') {
|
|
10022
|
+
const haystack = Buffer.isBuffer(a) ? a : Buffer.from(a.buffer, a.byteOffset, a.byteLength);
|
|
10023
|
+
return haystack.indexOf(b);
|
|
10024
|
+
}
|
|
9190
10025
|
// start iterating through `a`
|
|
9191
10026
|
for(let i = 0; i <= a.length - b.length; i++){
|
|
9192
10027
|
let completeMatch = true;
|
|
@@ -9216,8 +10051,8 @@ function removeFromUint8Array(a, b) {
|
|
|
9216
10051
|
if (tagIndex === 0) return a.subarray(b.length);
|
|
9217
10052
|
if (tagIndex > -1) {
|
|
9218
10053
|
const removed = new Uint8Array(a.length - b.length);
|
|
9219
|
-
removed.set(a.
|
|
9220
|
-
removed.set(a.
|
|
10054
|
+
removed.set(a.subarray(0, tagIndex));
|
|
10055
|
+
removed.set(a.subarray(tagIndex + b.length), tagIndex);
|
|
9221
10056
|
return removed;
|
|
9222
10057
|
} else {
|
|
9223
10058
|
return a;
|
|
@@ -9300,22 +10135,6 @@ function cloneResponse(original) {
|
|
|
9300
10135
|
enumerable: true,
|
|
9301
10136
|
writable: false
|
|
9302
10137
|
});
|
|
9303
|
-
// The Fetch Standard allows users to skip consuming the response body by
|
|
9304
|
-
// relying on garbage collection to release connection resources.
|
|
9305
|
-
// https://github.com/nodejs/undici?tab=readme-ov-file#garbage-collection
|
|
9306
|
-
//
|
|
9307
|
-
// To cancel the stream you then need to cancel both resulting branches.
|
|
9308
|
-
// Teeing a stream will generally lock it for the duration, preventing other
|
|
9309
|
-
// readers from locking it.
|
|
9310
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee
|
|
9311
|
-
// cloned2 is stored in a react cache and cloned for subsequent requests.
|
|
9312
|
-
// It is the original request, and is is garbage collected by a
|
|
9313
|
-
// FinalizationRegistry in Undici, but since we're tee-ing the stream
|
|
9314
|
-
// ourselves, we need to cancel clone1's stream (the response returned from
|
|
9315
|
-
// our dedupe fetch) when clone1 is reclaimed, otherwise we leak memory.
|
|
9316
|
-
if (registry && cloned1.body) {
|
|
9317
|
-
registry.register(cloned1, new WeakRef(cloned1.body));
|
|
9318
|
-
}
|
|
9319
10138
|
const cloned2 = new Response(body2, {
|
|
9320
10139
|
status: original.status,
|
|
9321
10140
|
statusText: original.statusText,
|
|
@@ -9328,6 +10147,22 @@ function cloneResponse(original) {
|
|
|
9328
10147
|
enumerable: true,
|
|
9329
10148
|
writable: false
|
|
9330
10149
|
});
|
|
10150
|
+
// The Fetch Standard allows users to skip consuming the response body by
|
|
10151
|
+
// relying on garbage collection to release connection resources.
|
|
10152
|
+
// https://github.com/nodejs/undici?tab=readme-ov-file#garbage-collection
|
|
10153
|
+
//
|
|
10154
|
+
// To cancel the stream you then need to cancel both resulting branches.
|
|
10155
|
+
// Teeing a stream will generally lock it for the duration, preventing other
|
|
10156
|
+
// readers from locking it.
|
|
10157
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/tee
|
|
10158
|
+
if (registry) {
|
|
10159
|
+
if (cloned1.body) {
|
|
10160
|
+
registry.register(cloned1, new WeakRef(cloned1.body));
|
|
10161
|
+
}
|
|
10162
|
+
if (cloned2.body) {
|
|
10163
|
+
registry.register(cloned2, new WeakRef(cloned2.body));
|
|
10164
|
+
}
|
|
10165
|
+
}
|
|
9331
10166
|
return [
|
|
9332
10167
|
cloned1,
|
|
9333
10168
|
cloned2
|
|
@@ -10360,7 +11195,7 @@ async function createCachedPrerenderResponse(res, cacheKey, incrementalCacheCont
|
|
|
10360
11195
|
statusText: res.statusText
|
|
10361
11196
|
});
|
|
10362
11197
|
}
|
|
10363
|
-
async function createCachedDynamicResponse(workStore, res, cacheKey, incrementalCacheContext, incrementalCache, serverComponentsHmrCache, revalidate, input, handleUnlock) {
|
|
11198
|
+
async function createCachedDynamicResponse(workStore, res, cacheKey, incrementalCacheContext, incrementalCache, serverComponentsHmrCache, revalidate, input, handleUnlock, signal) {
|
|
10364
11199
|
// We're cloning the response using this utility because there exists a bug in
|
|
10365
11200
|
// the undici library around response cloning. See the following pull request
|
|
10366
11201
|
// for more details: https://github.com/vercel/next.js/pull/73274
|
|
@@ -10384,7 +11219,12 @@ async function createCachedDynamicResponse(workStore, res, cacheKey, incremental
|
|
|
10384
11219
|
revalidate
|
|
10385
11220
|
}, incrementalCacheContext);
|
|
10386
11221
|
}
|
|
10387
|
-
}).catch((error)=>
|
|
11222
|
+
}).catch((error)=>{
|
|
11223
|
+
// Don't warn if the request was aborted intentionally.
|
|
11224
|
+
if (!(signal == null ? void 0 : signal.aborted)) {
|
|
11225
|
+
console.warn(`Failed to set fetch cache`, input, error);
|
|
11226
|
+
}
|
|
11227
|
+
}).finally(handleUnlock);
|
|
10388
11228
|
const pendingRevalidateKey = `cache-set-${cacheKey}`;
|
|
10389
11229
|
const pendingRevalidates = workStore.pendingRevalidates ??= {};
|
|
10390
11230
|
let pendingRevalidatePromise = Promise.resolve();
|
|
@@ -10487,6 +11327,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10487
11327
|
case 'prerender-runtime':
|
|
10488
11328
|
// TODO: Stop accumulating tags in client prerender. (fallthrough)
|
|
10489
11329
|
case 'prerender-client':
|
|
11330
|
+
case 'validation-client':
|
|
10490
11331
|
case 'prerender-ppr':
|
|
10491
11332
|
case 'prerender-legacy':
|
|
10492
11333
|
case 'cache':
|
|
@@ -10495,6 +11336,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10495
11336
|
break;
|
|
10496
11337
|
case 'request':
|
|
10497
11338
|
case 'unstable-cache':
|
|
11339
|
+
case 'generate-static-params':
|
|
10498
11340
|
break;
|
|
10499
11341
|
default:
|
|
10500
11342
|
workUnitStore;
|
|
@@ -10522,12 +11364,14 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10522
11364
|
break;
|
|
10523
11365
|
case 'prerender':
|
|
10524
11366
|
case 'prerender-client':
|
|
11367
|
+
case 'validation-client':
|
|
10525
11368
|
case 'prerender-runtime':
|
|
10526
11369
|
case 'prerender-ppr':
|
|
10527
11370
|
case 'prerender-legacy':
|
|
10528
11371
|
case 'request':
|
|
10529
11372
|
case 'cache':
|
|
10530
11373
|
case 'private-cache':
|
|
11374
|
+
case 'generate-static-params':
|
|
10531
11375
|
break;
|
|
10532
11376
|
default:
|
|
10533
11377
|
workUnitStore;
|
|
@@ -10539,8 +11383,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10539
11383
|
let cacheWarning;
|
|
10540
11384
|
if (typeof currentFetchCacheConfig === 'string' && typeof currentFetchRevalidate !== 'undefined') {
|
|
10541
11385
|
// If the revalidate value conflicts with the cache value, we should warn the user and unset the conflicting values.
|
|
10542
|
-
const isConflictingRevalidate = // revalidate: 0 and cache:
|
|
10543
|
-
currentFetchCacheConfig === 'force-cache' && currentFetchRevalidate === 0 || // revalidate: >0 or revalidate: false and cache: no-store
|
|
11386
|
+
const isConflictingRevalidate = currentFetchCacheConfig === 'force-cache' && currentFetchRevalidate === 0 || // revalidate: >0 or revalidate: false and cache: no-store
|
|
10544
11387
|
currentFetchCacheConfig === 'no-store' && (currentFetchRevalidate > 0 || currentFetchRevalidate === false);
|
|
10545
11388
|
if (isConflictingRevalidate) {
|
|
10546
11389
|
cacheWarning = `Specified "cache: ${currentFetchCacheConfig}" and "revalidate: ${currentFetchRevalidate}", only one should be specified.`;
|
|
@@ -10548,8 +11391,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10548
11391
|
currentFetchRevalidate = undefined;
|
|
10549
11392
|
}
|
|
10550
11393
|
}
|
|
10551
|
-
const hasExplicitFetchCacheOptOut = // fetch config
|
|
10552
|
-
currentFetchCacheConfig === 'no-cache' || currentFetchCacheConfig === 'no-store' || // the fetch isn't explicitly caching and the segment level cache config signals not to cache
|
|
11394
|
+
const hasExplicitFetchCacheOptOut = currentFetchCacheConfig === 'no-cache' || currentFetchCacheConfig === 'no-store' || // the fetch isn't explicitly caching and the segment level cache config signals not to cache
|
|
10553
11395
|
// note: `pageFetchCacheMode` is also set by being in an unstable_cache context.
|
|
10554
11396
|
pageFetchCacheMode === 'force-no-store' || pageFetchCacheMode === 'only-no-store';
|
|
10555
11397
|
// If no explicit fetch cache mode is set, but dynamic = `force-dynamic` is set,
|
|
@@ -10558,8 +11400,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10558
11400
|
// fine-grained. Top-level modes are responsible for setting reasonable defaults for the
|
|
10559
11401
|
// other configurations.
|
|
10560
11402
|
const noFetchConfigAndForceDynamic = !pageFetchCacheMode && !currentFetchCacheConfig && !currentFetchRevalidate && workStore.forceDynamic;
|
|
10561
|
-
if (//
|
|
10562
|
-
// which will signal the cache to not revalidate
|
|
11403
|
+
if (// which will signal the cache to not revalidate
|
|
10563
11404
|
currentFetchCacheConfig === 'force-cache' && typeof currentFetchRevalidate === 'undefined') {
|
|
10564
11405
|
currentFetchRevalidate = false;
|
|
10565
11406
|
} else if (hasExplicitFetchCacheOptOut || noFetchConfigAndForceDynamic) {
|
|
@@ -10585,8 +11426,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10585
11426
|
* - A fetch revalidate value is not set in the fetch call (fetch(url, { revalidate: ... }))
|
|
10586
11427
|
* - OR the fetch comes after a configuration that triggered dynamic rendering (e.g., reading cookies())
|
|
10587
11428
|
* and the fetch was considered uncacheable (e.g., POST method or has authorization headers)
|
|
10588
|
-
*/ const hasNoExplicitCacheConfig = // eslint-disable-next-line eqeqeq
|
|
10589
|
-
pageFetchCacheMode == undefined && // eslint-disable-next-line eqeqeq
|
|
11429
|
+
*/ const hasNoExplicitCacheConfig = pageFetchCacheMode == undefined && // eslint-disable-next-line eqeqeq
|
|
10590
11430
|
(currentFetchCacheConfig == undefined || // when considering whether to opt into the default "no-cache" fetch semantics,
|
|
10591
11431
|
// a "default" cache config should be treated the same as no cache config
|
|
10592
11432
|
currentFetchCacheConfig === 'default') && // eslint-disable-next-line eqeqeq
|
|
@@ -10618,6 +11458,8 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10618
11458
|
cacheSignal = null;
|
|
10619
11459
|
}
|
|
10620
11460
|
return (0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, 'fetch()');
|
|
11461
|
+
case 'validation-client':
|
|
11462
|
+
break;
|
|
10621
11463
|
case 'request':
|
|
10622
11464
|
if (false) {}
|
|
10623
11465
|
break;
|
|
@@ -10626,6 +11468,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10626
11468
|
case 'cache':
|
|
10627
11469
|
case 'private-cache':
|
|
10628
11470
|
case 'unstable-cache':
|
|
11471
|
+
case 'generate-static-params':
|
|
10629
11472
|
break;
|
|
10630
11473
|
default:
|
|
10631
11474
|
workUnitStore;
|
|
@@ -10697,8 +11540,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10697
11540
|
} else if (!cacheReason) {
|
|
10698
11541
|
cacheReason = `revalidate: ${finalRevalidate}`;
|
|
10699
11542
|
}
|
|
10700
|
-
if (//
|
|
10701
|
-
// `revalidate: 0` values
|
|
11543
|
+
if (// `revalidate: 0` values
|
|
10702
11544
|
!(workStore.forceStatic && finalRevalidate === 0) && // we don't consider autoNoCache to switch to dynamic for ISR
|
|
10703
11545
|
!autoNoCache && // If the revalidate value isn't currently set or the value is less
|
|
10704
11546
|
// than the current revalidate value, we should update the revalidate
|
|
@@ -10712,6 +11554,12 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10712
11554
|
case 'prerender':
|
|
10713
11555
|
case 'prerender-client':
|
|
10714
11556
|
case 'prerender-runtime':
|
|
11557
|
+
// If we're in an instant validation, a dynamic fetch won't
|
|
11558
|
+
// have time to resolve during the validation prerender anyway,
|
|
11559
|
+
// so we leave it hanging. This can cause false negatives in shared parents,
|
|
11560
|
+
// but we accept that for now, because client data fetching is non-idiomatic.
|
|
11561
|
+
// eslint-disable-next-line no-fallthrough
|
|
11562
|
+
case 'validation-client':
|
|
10715
11563
|
if (cacheSignal) {
|
|
10716
11564
|
cacheSignal.endRead();
|
|
10717
11565
|
cacheSignal = null;
|
|
@@ -10725,6 +11573,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10725
11573
|
case 'cache':
|
|
10726
11574
|
case 'private-cache':
|
|
10727
11575
|
case 'unstable-cache':
|
|
11576
|
+
case 'generate-static-params':
|
|
10728
11577
|
break;
|
|
10729
11578
|
default:
|
|
10730
11579
|
workUnitStore;
|
|
@@ -10754,10 +11603,12 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10754
11603
|
break;
|
|
10755
11604
|
case 'prerender':
|
|
10756
11605
|
case 'prerender-client':
|
|
11606
|
+
case 'validation-client':
|
|
10757
11607
|
case 'prerender-runtime':
|
|
10758
11608
|
case 'prerender-ppr':
|
|
10759
11609
|
case 'prerender-legacy':
|
|
10760
11610
|
case 'unstable-cache':
|
|
11611
|
+
case 'generate-static-params':
|
|
10761
11612
|
break;
|
|
10762
11613
|
default:
|
|
10763
11614
|
workUnitStore;
|
|
@@ -10832,7 +11683,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10832
11683
|
});
|
|
10833
11684
|
}
|
|
10834
11685
|
if (res.status === 200 && incrementalCache && cacheKey && (isCacheableRevalidate || serverComponentsHmrCache)) {
|
|
10835
|
-
const normalizedRevalidate = finalRevalidate >= _constants1.INFINITE_CACHE ? _constants1.
|
|
11686
|
+
const normalizedRevalidate = finalRevalidate >= _constants1.INFINITE_CACHE ? _constants1.CACHE_ONE_YEAR_SECONDS : finalRevalidate;
|
|
10836
11687
|
const incrementalCacheConfig = isCacheableRevalidate ? {
|
|
10837
11688
|
fetchCache: true,
|
|
10838
11689
|
fetchUrl,
|
|
@@ -10843,6 +11694,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10843
11694
|
switch(workUnitStore == null ? void 0 : workUnitStore.type){
|
|
10844
11695
|
case 'prerender':
|
|
10845
11696
|
case 'prerender-client':
|
|
11697
|
+
case 'validation-client':
|
|
10846
11698
|
case 'prerender-runtime':
|
|
10847
11699
|
return createCachedPrerenderResponse(res, cacheKey, incrementalCacheConfig, incrementalCache, normalizedRevalidate, handleUnlock);
|
|
10848
11700
|
case 'request':
|
|
@@ -10853,8 +11705,9 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10853
11705
|
case 'cache':
|
|
10854
11706
|
case 'private-cache':
|
|
10855
11707
|
case 'unstable-cache':
|
|
11708
|
+
case 'generate-static-params':
|
|
10856
11709
|
case undefined:
|
|
10857
|
-
return createCachedDynamicResponse(workStore, res, cacheKey, incrementalCacheConfig, incrementalCache, serverComponentsHmrCache, normalizedRevalidate, input, handleUnlock);
|
|
11710
|
+
return createCachedDynamicResponse(workStore, res, cacheKey, incrementalCacheConfig, incrementalCache, serverComponentsHmrCache, normalizedRevalidate, input, handleUnlock, getRequestMeta('signal'));
|
|
10858
11711
|
default:
|
|
10859
11712
|
workUnitStore;
|
|
10860
11713
|
}
|
|
@@ -10891,6 +11744,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10891
11744
|
switch(workUnitStore.type){
|
|
10892
11745
|
case 'prerender':
|
|
10893
11746
|
case 'prerender-client':
|
|
11747
|
+
case 'validation-client':
|
|
10894
11748
|
case 'prerender-runtime':
|
|
10895
11749
|
// We sometimes use the cache to dedupe fetches that do not
|
|
10896
11750
|
// specify a cache configuration. In these cases we want to
|
|
@@ -10907,6 +11761,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10907
11761
|
case 'cache':
|
|
10908
11762
|
case 'private-cache':
|
|
10909
11763
|
case 'unstable-cache':
|
|
11764
|
+
case 'generate-static-params':
|
|
10910
11765
|
break;
|
|
10911
11766
|
default:
|
|
10912
11767
|
workUnitStore;
|
|
@@ -10980,6 +11835,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10980
11835
|
case 'prerender':
|
|
10981
11836
|
case 'prerender-client':
|
|
10982
11837
|
case 'prerender-runtime':
|
|
11838
|
+
case 'validation-client':
|
|
10983
11839
|
if (cacheSignal) {
|
|
10984
11840
|
cacheSignal.endRead();
|
|
10985
11841
|
cacheSignal = null;
|
|
@@ -10993,6 +11849,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
10993
11849
|
case 'cache':
|
|
10994
11850
|
case 'private-cache':
|
|
10995
11851
|
case 'unstable-cache':
|
|
11852
|
+
case 'generate-static-params':
|
|
10996
11853
|
break;
|
|
10997
11854
|
default:
|
|
10998
11855
|
workUnitStore;
|
|
@@ -11010,6 +11867,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
11010
11867
|
case 'prerender':
|
|
11011
11868
|
case 'prerender-client':
|
|
11012
11869
|
case 'prerender-runtime':
|
|
11870
|
+
case 'validation-client':
|
|
11013
11871
|
return (0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, 'fetch()');
|
|
11014
11872
|
case 'request':
|
|
11015
11873
|
if (false) {}
|
|
@@ -11019,6 +11877,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
11019
11877
|
case 'unstable-cache':
|
|
11020
11878
|
case 'prerender-legacy':
|
|
11021
11879
|
case 'prerender-ppr':
|
|
11880
|
+
case 'generate-static-params':
|
|
11022
11881
|
break;
|
|
11023
11882
|
default:
|
|
11024
11883
|
workUnitStore;
|
|
@@ -11055,7 +11914,7 @@ function createPatchedFetcher(originFetch, { workAsyncStorage, workUnitAsyncStor
|
|
|
11055
11914
|
// available we construct manually cloned Response objects with the
|
|
11056
11915
|
// body as an ArrayBuffer. This will be resolvable in a microtask
|
|
11057
11916
|
// making it compatible with cacheComponents.
|
|
11058
|
-
const pendingResponse = doOriginalFetch(true, cacheReasonOverride)// We're cloning the response using this utility because there
|
|
11917
|
+
const pendingResponse = doOriginalFetch(true, cacheReasonOverride) // We're cloning the response using this utility because there
|
|
11059
11918
|
// exists a bug in the undici library around response cloning.
|
|
11060
11919
|
// See the following pull request for more details:
|
|
11061
11920
|
// https://github.com/vercel/next.js/pull/73274
|
|
@@ -11133,9 +11992,8 @@ function getTimeoutBoundary() {
|
|
|
11133
11992
|
});
|
|
11134
11993
|
}
|
|
11135
11994
|
return currentTimeoutBoundary;
|
|
11136
|
-
}
|
|
11995
|
+
} //# sourceMappingURL=patch-fetch.js.map
|
|
11137
11996
|
|
|
11138
|
-
//# sourceMappingURL=patch-fetch.js.map
|
|
11139
11997
|
|
|
11140
11998
|
/***/ }),
|
|
11141
11999
|
|
|
@@ -11267,6 +12125,15 @@ class RenderResult {
|
|
|
11267
12125
|
}
|
|
11268
12126
|
}
|
|
11269
12127
|
/**
|
|
12128
|
+
* Pipes the response through a transform stream. This converts the response
|
|
12129
|
+
* to a single readable stream (chaining if needed) and pipes it through the
|
|
12130
|
+
* provided transform.
|
|
12131
|
+
*
|
|
12132
|
+
* @param transform The transform stream to pipe through
|
|
12133
|
+
*/ pipeThrough(transform) {
|
|
12134
|
+
this.response = this.readable.pipeThrough(transform);
|
|
12135
|
+
}
|
|
12136
|
+
/**
|
|
11270
12137
|
* Unshifts a new stream to the response. This will convert the response to an
|
|
11271
12138
|
* array of streams if it is not already one and will add the new stream to
|
|
11272
12139
|
* the start of the array. When this response is piped, all of the streams
|
|
@@ -11599,7 +12466,7 @@ var IncrementalCacheKind = /*#__PURE__*/ function(IncrementalCacheKind) {
|
|
|
11599
12466
|
/***/ }),
|
|
11600
12467
|
|
|
11601
12468
|
/***/ 99887:
|
|
11602
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
12469
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11603
12470
|
|
|
11604
12471
|
"use strict";
|
|
11605
12472
|
|
|
@@ -11614,6 +12481,12 @@ function _export(target, all) {
|
|
|
11614
12481
|
});
|
|
11615
12482
|
}
|
|
11616
12483
|
_export(exports, {
|
|
12484
|
+
delayUntilRuntimeStage: function() {
|
|
12485
|
+
return delayUntilRuntimeStage;
|
|
12486
|
+
},
|
|
12487
|
+
getRuntimeStage: function() {
|
|
12488
|
+
return getRuntimeStage;
|
|
12489
|
+
},
|
|
11617
12490
|
isHangingPromiseRejectionError: function() {
|
|
11618
12491
|
return isHangingPromiseRejectionError;
|
|
11619
12492
|
},
|
|
@@ -11624,6 +12497,7 @@ _export(exports, {
|
|
|
11624
12497
|
return makeHangingPromise;
|
|
11625
12498
|
}
|
|
11626
12499
|
});
|
|
12500
|
+
const _stagedrendering = __webpack_require__(17535);
|
|
11627
12501
|
function isHangingPromiseRejectionError(err) {
|
|
11628
12502
|
if (typeof err !== 'object' || err === null || !('digest' in err)) {
|
|
11629
12503
|
return false;
|
|
@@ -11682,6 +12556,19 @@ function makeDevtoolsIOAwarePromise(underlying, requestStore, stage) {
|
|
|
11682
12556
|
}, 0);
|
|
11683
12557
|
});
|
|
11684
12558
|
}
|
|
12559
|
+
function getRuntimeStage(stagedRendering) {
|
|
12560
|
+
if (stagedRendering.currentStage === _stagedrendering.RenderStage.EarlyStatic || stagedRendering.currentStage === _stagedrendering.RenderStage.EarlyRuntime) {
|
|
12561
|
+
return _stagedrendering.RenderStage.EarlyRuntime;
|
|
12562
|
+
}
|
|
12563
|
+
return _stagedrendering.RenderStage.Runtime;
|
|
12564
|
+
}
|
|
12565
|
+
function delayUntilRuntimeStage(prerenderStore, result) {
|
|
12566
|
+
const { stagedRendering } = prerenderStore;
|
|
12567
|
+
if (!stagedRendering) {
|
|
12568
|
+
return result;
|
|
12569
|
+
}
|
|
12570
|
+
return stagedRendering.waitForStage(getRuntimeStage(stagedRendering)).then(()=>result);
|
|
12571
|
+
}
|
|
11685
12572
|
|
|
11686
12573
|
//# sourceMappingURL=dynamic-rendering-utils.js.map
|
|
11687
12574
|
|