@semiont/frontend 0.3.3 → 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 +8 -8
- 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 +8 -8
- package/standalone/apps/frontend/.next/server/chunks/2617.js +43 -7
- package/standalone/apps/frontend/.next/server/chunks/3144.js +1 -1
- 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-ac307b22cd0a4080.js → common-42653c14d34c8864.js} +7 -7
- 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/framework-86c2a58f458066a5.js +0 -1
- package/standalone/apps/frontend/.next/static/chunks/vendors-c7197feb11002a6e.js +0 -10
- package/standalone/apps/frontend/.next/static/xSLAuzRvOCf1TdGHvLFQ0/_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/{xSLAuzRvOCf1TdGHvLFQ0 → I_XveRdyStDMqYJPcAAy5}/_ssgManifest.js +0 -0
|
@@ -3,9 +3,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
0 && (module.exports = {
|
|
6
|
+
completeHardNavigation: null,
|
|
7
|
+
completeSoftNavigation: null,
|
|
8
|
+
completeTraverseNavigation: null,
|
|
6
9
|
convertServerPatchToFullTree: null,
|
|
7
10
|
navigate: null,
|
|
8
|
-
|
|
11
|
+
navigateToKnownRoute: null
|
|
9
12
|
});
|
|
10
13
|
function _export(target, all) {
|
|
11
14
|
for(var name in all)Object.defineProperty(target, name, {
|
|
@@ -14,67 +17,67 @@ function _export(target, all) {
|
|
|
14
17
|
});
|
|
15
18
|
}
|
|
16
19
|
_export(exports, {
|
|
20
|
+
completeHardNavigation: function() {
|
|
21
|
+
return completeHardNavigation;
|
|
22
|
+
},
|
|
23
|
+
completeSoftNavigation: function() {
|
|
24
|
+
return completeSoftNavigation;
|
|
25
|
+
},
|
|
26
|
+
completeTraverseNavigation: function() {
|
|
27
|
+
return completeTraverseNavigation;
|
|
28
|
+
},
|
|
17
29
|
convertServerPatchToFullTree: function() {
|
|
18
30
|
return convertServerPatchToFullTree;
|
|
19
31
|
},
|
|
20
32
|
navigate: function() {
|
|
21
33
|
return navigate;
|
|
22
34
|
},
|
|
23
|
-
|
|
24
|
-
return
|
|
35
|
+
navigateToKnownRoute: function() {
|
|
36
|
+
return navigateToKnownRoute;
|
|
25
37
|
}
|
|
26
38
|
});
|
|
27
39
|
const _fetchserverresponse = require("../router-reducer/fetch-server-response");
|
|
28
40
|
const _pprnavigations = require("../router-reducer/ppr-navigations");
|
|
29
41
|
const _createhreffromurl = require("../router-reducer/create-href-from-url");
|
|
42
|
+
const _constants = require("../../../lib/constants");
|
|
30
43
|
const _cache = require("./cache");
|
|
44
|
+
const _optimisticroutes = require("./optimistic-routes");
|
|
31
45
|
const _cachekey = require("./cache-key");
|
|
32
|
-
const
|
|
46
|
+
const _scheduler = require("./scheduler");
|
|
33
47
|
const _types = require("./types");
|
|
34
|
-
|
|
48
|
+
const _links = require("../links");
|
|
49
|
+
const _routerreducertypes = require("../router-reducer/router-reducer-types");
|
|
50
|
+
const _computechangedpath = require("../router-reducer/compute-changed-path");
|
|
51
|
+
const _javascripturl = require("../../lib/javascript-url");
|
|
52
|
+
const _bfcache = require("./bfcache");
|
|
53
|
+
function navigate(state, url, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, nextUrl, freshnessPolicy, scrollBehavior, navigateType) {
|
|
54
|
+
// Instant Navigation Testing API: when the lock is active, ensure a
|
|
55
|
+
// prefetch task has been initiated before proceeding with the navigation.
|
|
56
|
+
// This guarantees that segment data requests are at least pending, even
|
|
57
|
+
// for routes that already have a cached route tree. Without this, the
|
|
58
|
+
// static shell might be incomplete because some segments were never
|
|
59
|
+
// requested.
|
|
60
|
+
if (process.env.__NEXT_EXPOSE_TESTING_API) {
|
|
61
|
+
const { isNavigationLocked } = require('./navigation-testing-lock');
|
|
62
|
+
if (isNavigationLocked()) {
|
|
63
|
+
return ensurePrefetchThenNavigate(state, url, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, nextUrl, freshnessPolicy, scrollBehavior, navigateType);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return navigateImpl(state, url, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, nextUrl, freshnessPolicy, scrollBehavior, navigateType);
|
|
67
|
+
}
|
|
68
|
+
function navigateImpl(state, url, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, nextUrl, freshnessPolicy, scrollBehavior, navigateType) {
|
|
35
69
|
const now = Date.now();
|
|
36
70
|
const href = url.href;
|
|
37
|
-
// We special case navigations to the exact same URL as the current location.
|
|
38
|
-
// It's a common UI pattern for apps to refresh when you click a link to the
|
|
39
|
-
// current page. So when this happens, we refresh the dynamic data in the page
|
|
40
|
-
// segments.
|
|
41
|
-
//
|
|
42
|
-
// Note that this does not apply if the any part of the hash or search query
|
|
43
|
-
// has changed. This might feel a bit weird but it makes more sense when you
|
|
44
|
-
// consider that the way to trigger this behavior is to click the same link
|
|
45
|
-
// multiple times.
|
|
46
|
-
//
|
|
47
|
-
// TODO: We should probably refresh the *entire* route when this case occurs,
|
|
48
|
-
// not just the page segments. Essentially treating it the same as a refresh()
|
|
49
|
-
// triggered by an action, which is the more explicit way of modeling the UI
|
|
50
|
-
// pattern described above.
|
|
51
|
-
//
|
|
52
|
-
// Also note that this only refreshes the dynamic data, not static/ cached
|
|
53
|
-
// data. If the page segment is fully static and prefetched, the request is
|
|
54
|
-
// skipped. (This is also how refresh() works.)
|
|
55
|
-
const isSamePageNavigation = href === currentUrl.href;
|
|
56
71
|
const cacheKey = (0, _cachekey.createCacheKey)(href, nextUrl);
|
|
57
72
|
const route = (0, _cache.readRouteCacheEntry)(now, cacheKey);
|
|
58
73
|
if (route !== null && route.status === _cache.EntryStatus.Fulfilled) {
|
|
59
74
|
// We have a matching prefetch.
|
|
60
|
-
|
|
61
|
-
const prefetchFlightRouterState = snapshot.flightRouterState;
|
|
62
|
-
const prefetchSeedData = snapshot.seedData;
|
|
63
|
-
const headSnapshot = readHeadSnapshotFromCache(now, route);
|
|
64
|
-
const prefetchHead = headSnapshot.rsc;
|
|
65
|
-
const isPrefetchHeadPartial = headSnapshot.isPartial;
|
|
66
|
-
// TODO: The "canonicalUrl" stored in the cache doesn't include the hash,
|
|
67
|
-
// because hash entries do not vary by hash fragment. However, the one
|
|
68
|
-
// we set in the router state *does* include the hash, and it's used to
|
|
69
|
-
// sync with the actual browser location. To make this less of a refactor
|
|
70
|
-
// hazard, we should always track the hash separately from the rest of
|
|
71
|
-
// the URL.
|
|
72
|
-
const newCanonicalUrl = route.canonicalUrl + url.hash;
|
|
73
|
-
const renderedSearch = route.renderedSearch;
|
|
74
|
-
return navigateUsingPrefetchedRouteTree(now, url, currentUrl, nextUrl, isSamePageNavigation, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, newCanonicalUrl, renderedSearch, freshnessPolicy, shouldScroll);
|
|
75
|
+
return navigateUsingPrefetchedRouteTree(now, state, url, currentUrl, currentRenderedSearch, nextUrl, currentCacheNode, currentFlightRouterState, freshnessPolicy, scrollBehavior, navigateType, route);
|
|
75
76
|
}
|
|
76
77
|
// There was no matching route tree in the cache. Let's see if we can
|
|
77
|
-
// construct an "optimistic" route tree
|
|
78
|
+
// construct an "optimistic" route tree using the deprecated search-params
|
|
79
|
+
// based matching. This is only used when the new optimisticRouting flag is
|
|
80
|
+
// disabled.
|
|
78
81
|
//
|
|
79
82
|
// Do not construct an optimistic route tree if there was a cache hit, but
|
|
80
83
|
// the entry has a rejected status, since it may have been rejected due to a
|
|
@@ -82,203 +85,85 @@ function navigate(url, currentUrl, currentCacheNode, currentFlightRouterState, n
|
|
|
82
85
|
//
|
|
83
86
|
// TODO: There are multiple reasons a prefetch might be rejected; we should
|
|
84
87
|
// track them explicitly and choose what to do here based on that.
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const headSnapshot = readHeadSnapshotFromCache(now, optimisticRoute);
|
|
93
|
-
const prefetchHead = headSnapshot.rsc;
|
|
94
|
-
const isPrefetchHeadPartial = headSnapshot.isPartial;
|
|
95
|
-
const newCanonicalUrl = optimisticRoute.canonicalUrl + url.hash;
|
|
96
|
-
const newRenderedSearch = optimisticRoute.renderedSearch;
|
|
97
|
-
return navigateUsingPrefetchedRouteTree(now, url, currentUrl, nextUrl, isSamePageNavigation, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, newCanonicalUrl, newRenderedSearch, freshnessPolicy, shouldScroll);
|
|
88
|
+
if (!process.env.__NEXT_OPTIMISTIC_ROUTING) {
|
|
89
|
+
if (route === null || route.status !== _cache.EntryStatus.Rejected) {
|
|
90
|
+
const optimisticRoute = (0, _cache.deprecated_requestOptimisticRouteCacheEntry)(now, url, nextUrl);
|
|
91
|
+
if (optimisticRoute !== null) {
|
|
92
|
+
// We have an optimistic route tree. Proceed with the normal flow.
|
|
93
|
+
return navigateUsingPrefetchedRouteTree(now, state, url, currentUrl, currentRenderedSearch, nextUrl, currentCacheNode, currentFlightRouterState, freshnessPolicy, scrollBehavior, navigateType, optimisticRoute);
|
|
94
|
+
}
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
|
-
// There's no matching prefetch for this route in the cache.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
};
|
|
97
|
+
// There's no matching prefetch for this route in the cache. We must lazily
|
|
98
|
+
// fetch it from the server before we can perform the navigation.
|
|
99
|
+
//
|
|
100
|
+
// TODO: If this is a gesture navigation, instead of performing a
|
|
101
|
+
// dynamic request, we should do a runtime prefetch.
|
|
102
|
+
return navigateToUnknownRoute(now, state, url, currentUrl, currentRenderedSearch, nextUrl, currentCacheNode, currentFlightRouterState, freshnessPolicy, scrollBehavior, navigateType).catch(()=>{
|
|
103
|
+
// If the navigation fails, return the current state
|
|
104
|
+
return state;
|
|
105
|
+
});
|
|
109
106
|
}
|
|
110
|
-
function
|
|
107
|
+
function navigateToKnownRoute(now, state, url, canonicalUrl, navigationSeed, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, freshnessPolicy, nextUrl, scrollBehavior, navigateType, debugInfo, // The route cache entry used for this navigation, if it came from route
|
|
108
|
+
// prediction. Passed through so it can be marked as having a dynamic rewrite
|
|
109
|
+
// if the server returns a different pathname (indicating dynamic rewrite
|
|
110
|
+
// behavior).
|
|
111
|
+
//
|
|
112
|
+
// When null, the navigation did not use route prediction - either because
|
|
113
|
+
// the route was already fully cached, or it's a navigation that doesn't
|
|
114
|
+
// involve prediction (refresh, history traversal, server action, etc.).
|
|
115
|
+
// In these cases, if a mismatch occurs, we still mark the route as having a
|
|
116
|
+
// dynamic rewrite by traversing the known route tree (see
|
|
117
|
+
// dispatchRetryDueToTreeMismatch).
|
|
118
|
+
routeCacheEntry) {
|
|
111
119
|
// A version of navigate() that accepts the target route tree as an argument
|
|
112
120
|
// rather than reading it from the prefetch cache.
|
|
113
121
|
const accumulation = {
|
|
114
|
-
|
|
115
|
-
|
|
122
|
+
separateRefreshUrls: null,
|
|
123
|
+
scrollRef: null
|
|
116
124
|
};
|
|
125
|
+
// We special case navigations to the exact same URL as the current location.
|
|
126
|
+
// It's a common UI pattern for apps to refresh when you click a link to the
|
|
127
|
+
// current page. So when this happens, we refresh the dynamic data in the page
|
|
128
|
+
// segments.
|
|
129
|
+
//
|
|
130
|
+
// Note that this does not apply if the any part of the hash or search query
|
|
131
|
+
// has changed. This might feel a bit weird but it makes more sense when you
|
|
132
|
+
// consider that the way to trigger this behavior is to click the same link
|
|
133
|
+
// multiple times.
|
|
134
|
+
//
|
|
135
|
+
// TODO: We should probably refresh the *entire* route when this case occurs,
|
|
136
|
+
// not just the page segments. Essentially treating it the same as a refresh()
|
|
137
|
+
// triggered by an action, which is the more explicit way of modeling the UI
|
|
138
|
+
// pattern described above.
|
|
139
|
+
//
|
|
140
|
+
// Also note that this only refreshes the dynamic data, not static/ cached
|
|
141
|
+
// data. If the page segment is fully static and prefetched, the request is
|
|
142
|
+
// skipped. (This is also how refresh() works.)
|
|
117
143
|
const isSamePageNavigation = url.href === currentUrl.href;
|
|
118
|
-
const task = (0, _pprnavigations.startPPRNavigation)(now, currentUrl, currentCacheNode, currentFlightRouterState, navigationSeed.
|
|
119
|
-
if (task !== null) {
|
|
120
|
-
(0, _pprnavigations.spawnDynamicRequests)(task, url, nextUrl, freshnessPolicy, accumulation);
|
|
121
|
-
return navigationTaskToResult(task, canonicalUrl, navigationSeed.renderedSearch, accumulation.scrollableSegments, shouldScroll, url.hash);
|
|
122
|
-
}
|
|
123
|
-
// Could not perform a SPA navigation. Revert to a full-page (MPA) navigation.
|
|
124
|
-
return {
|
|
125
|
-
tag: _types.NavigationResultTag.MPA,
|
|
126
|
-
data: canonicalUrl
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function navigateUsingPrefetchedRouteTree(now, url, currentUrl, nextUrl, isSamePageNavigation, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, canonicalUrl, renderedSearch, freshnessPolicy, shouldScroll) {
|
|
130
|
-
// Recursively construct a prefetch tree by reading from the Segment Cache. To
|
|
131
|
-
// maintain compatibility, we output the same data structures as the old
|
|
132
|
-
// prefetching implementation: FlightRouterState and CacheNodeSeedData.
|
|
133
|
-
// TODO: Eventually updateCacheNodeOnNavigation (or the equivalent) should
|
|
134
|
-
// read from the Segment Cache directly. It's only structured this way for now
|
|
135
|
-
// so we can share code with the old prefetching implementation.
|
|
136
|
-
const accumulation = {
|
|
137
|
-
scrollableSegments: null,
|
|
138
|
-
separateRefreshUrls: null
|
|
139
|
-
};
|
|
140
|
-
const seedData = null;
|
|
141
|
-
const seedHead = null;
|
|
142
|
-
const task = (0, _pprnavigations.startPPRNavigation)(now, currentUrl, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, freshnessPolicy, seedData, seedHead, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, accumulation);
|
|
144
|
+
const task = (0, _pprnavigations.startPPRNavigation)(now, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, navigationSeed.routeTree, navigationSeed.metadataVaryPath, freshnessPolicy, navigationSeed.data, navigationSeed.head, navigationSeed.dynamicStaleAt, isSamePageNavigation, accumulation);
|
|
143
145
|
if (task !== null) {
|
|
144
|
-
(
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
// Could not perform a SPA navigation. Revert to a full-page (MPA) navigation.
|
|
148
|
-
return {
|
|
149
|
-
tag: _types.NavigationResultTag.MPA,
|
|
150
|
-
data: canonicalUrl
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
function navigationTaskToResult(task, canonicalUrl, renderedSearch, scrollableSegments, shouldScroll, hash) {
|
|
154
|
-
return {
|
|
155
|
-
tag: _types.NavigationResultTag.Success,
|
|
156
|
-
data: {
|
|
157
|
-
flightRouterState: task.route,
|
|
158
|
-
cacheNode: task.node,
|
|
159
|
-
canonicalUrl,
|
|
160
|
-
renderedSearch,
|
|
161
|
-
scrollableSegments,
|
|
162
|
-
shouldScroll,
|
|
163
|
-
hash
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
function readRenderSnapshotFromCache(now, route, tree) {
|
|
168
|
-
let childRouterStates = {};
|
|
169
|
-
let childSeedDatas = {};
|
|
170
|
-
const slots = tree.slots;
|
|
171
|
-
if (slots !== null) {
|
|
172
|
-
for(const parallelRouteKey in slots){
|
|
173
|
-
const childTree = slots[parallelRouteKey];
|
|
174
|
-
const childResult = readRenderSnapshotFromCache(now, route, childTree);
|
|
175
|
-
childRouterStates[parallelRouteKey] = childResult.flightRouterState;
|
|
176
|
-
childSeedDatas[parallelRouteKey] = childResult.seedData;
|
|
146
|
+
if (freshnessPolicy !== _pprnavigations.FreshnessPolicy.Gesture) {
|
|
147
|
+
(0, _pprnavigations.spawnDynamicRequests)(task, url, nextUrl, freshnessPolicy, accumulation, routeCacheEntry, navigateType);
|
|
177
148
|
}
|
|
149
|
+
return completeSoftNavigation(state, url, nextUrl, task.route, task.node, navigationSeed.renderedSearch, canonicalUrl, navigateType, scrollBehavior, accumulation.scrollRef, debugInfo);
|
|
178
150
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
let isPartial = true;
|
|
182
|
-
const segmentEntry = (0, _cache.readSegmentCacheEntry)(now, tree.varyPath);
|
|
183
|
-
if (segmentEntry !== null) {
|
|
184
|
-
switch(segmentEntry.status){
|
|
185
|
-
case _cache.EntryStatus.Fulfilled:
|
|
186
|
-
{
|
|
187
|
-
// Happy path: a cache hit
|
|
188
|
-
rsc = segmentEntry.rsc;
|
|
189
|
-
loading = segmentEntry.loading;
|
|
190
|
-
isPartial = segmentEntry.isPartial;
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
case _cache.EntryStatus.Pending:
|
|
194
|
-
{
|
|
195
|
-
// We haven't received data for this segment yet, but there's already
|
|
196
|
-
// an in-progress request. Since it's extremely likely to arrive
|
|
197
|
-
// before the dynamic data response, we might as well use it.
|
|
198
|
-
const promiseForFulfilledEntry = (0, _cache.waitForSegmentCacheEntry)(segmentEntry);
|
|
199
|
-
rsc = promiseForFulfilledEntry.then((entry)=>entry !== null ? entry.rsc : null);
|
|
200
|
-
loading = promiseForFulfilledEntry.then((entry)=>entry !== null ? entry.loading : null);
|
|
201
|
-
// Because the request is still pending, we typically don't know yet
|
|
202
|
-
// whether the response will be partial. We shouldn't skip this segment
|
|
203
|
-
// during the dynamic navigation request. Otherwise, we might need to
|
|
204
|
-
// do yet another request to fill in the remaining data, creating
|
|
205
|
-
// a waterfall.
|
|
206
|
-
//
|
|
207
|
-
// The one exception is if this segment is being fetched with via
|
|
208
|
-
// prefetch={true} (i.e. the "force stale" or "full" strategy). If so,
|
|
209
|
-
// we can assume the response will be full. This field is set to `false`
|
|
210
|
-
// for such segments.
|
|
211
|
-
isPartial = segmentEntry.isPartial;
|
|
212
|
-
break;
|
|
213
|
-
}
|
|
214
|
-
case _cache.EntryStatus.Empty:
|
|
215
|
-
case _cache.EntryStatus.Rejected:
|
|
216
|
-
break;
|
|
217
|
-
default:
|
|
218
|
-
segmentEntry;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
// The navigation implementation expects the search params to be
|
|
222
|
-
// included in the segment. However, the Segment Cache tracks search
|
|
223
|
-
// params separately from the rest of the segment key. So we need to
|
|
224
|
-
// add them back here.
|
|
225
|
-
//
|
|
226
|
-
// See corresponding comment in convertFlightRouterStateToTree.
|
|
227
|
-
//
|
|
228
|
-
// TODO: What we should do instead is update the navigation diffing
|
|
229
|
-
// logic to compare search params explicitly. This is a temporary
|
|
230
|
-
// solution until more of the Segment Cache implementation has settled.
|
|
231
|
-
const segment = (0, _segment.addSearchParamsIfPageSegment)(tree.segment, Object.fromEntries(new URLSearchParams(route.renderedSearch)));
|
|
232
|
-
// We don't need this information in a render snapshot, so this can just be a placeholder.
|
|
233
|
-
const hasRuntimePrefetch = false;
|
|
234
|
-
return {
|
|
235
|
-
flightRouterState: [
|
|
236
|
-
segment,
|
|
237
|
-
childRouterStates,
|
|
238
|
-
null,
|
|
239
|
-
null,
|
|
240
|
-
tree.isRootLayout
|
|
241
|
-
],
|
|
242
|
-
seedData: [
|
|
243
|
-
rsc,
|
|
244
|
-
childSeedDatas,
|
|
245
|
-
loading,
|
|
246
|
-
isPartial,
|
|
247
|
-
hasRuntimePrefetch
|
|
248
|
-
]
|
|
249
|
-
};
|
|
151
|
+
// Could not perform a SPA navigation. Revert to a full-page (MPA) navigation.
|
|
152
|
+
return completeHardNavigation(state, url, navigateType);
|
|
250
153
|
}
|
|
251
|
-
function
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
case _cache.EntryStatus.Pending:
|
|
265
|
-
{
|
|
266
|
-
const promiseForFulfilledEntry = (0, _cache.waitForSegmentCacheEntry)(segmentEntry);
|
|
267
|
-
rsc = promiseForFulfilledEntry.then((entry)=>entry !== null ? entry.rsc : null);
|
|
268
|
-
isPartial = segmentEntry.isPartial;
|
|
269
|
-
break;
|
|
270
|
-
}
|
|
271
|
-
case _cache.EntryStatus.Empty:
|
|
272
|
-
case _cache.EntryStatus.Rejected:
|
|
273
|
-
break;
|
|
274
|
-
default:
|
|
275
|
-
segmentEntry;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
return {
|
|
279
|
-
rsc,
|
|
280
|
-
isPartial
|
|
154
|
+
function navigateUsingPrefetchedRouteTree(now, state, url, currentUrl, currentRenderedSearch, nextUrl, currentCacheNode, currentFlightRouterState, freshnessPolicy, scrollBehavior, navigateType, route) {
|
|
155
|
+
const routeTree = route.tree;
|
|
156
|
+
const canonicalUrl = route.canonicalUrl + url.hash;
|
|
157
|
+
const renderedSearch = route.renderedSearch;
|
|
158
|
+
const prefetchSeed = {
|
|
159
|
+
renderedSearch,
|
|
160
|
+
routeTree,
|
|
161
|
+
metadataVaryPath: route.metadata.varyPath,
|
|
162
|
+
data: null,
|
|
163
|
+
head: null,
|
|
164
|
+
dynamicStaleAt: (0, _bfcache.computeDynamicStaleAt)(now, _bfcache.UnknownDynamicStaleTime)
|
|
281
165
|
};
|
|
166
|
+
return navigateToKnownRoute(now, state, url, canonicalUrl, prefetchSeed, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, freshnessPolicy, nextUrl, scrollBehavior, navigateType, null, route);
|
|
282
167
|
}
|
|
283
168
|
// Used to request all the dynamic data for a route, rather than just a subset,
|
|
284
169
|
// e.g. during a refresh or a revalidation. Typically this gets constructed
|
|
@@ -291,7 +176,7 @@ const DynamicRequestTreeForEntireRoute = [
|
|
|
291
176
|
null,
|
|
292
177
|
'refetch'
|
|
293
178
|
];
|
|
294
|
-
async function
|
|
179
|
+
async function navigateToUnknownRoute(now, state, url, currentUrl, currentRenderedSearch, nextUrl, currentCacheNode, currentFlightRouterState, freshnessPolicy, scrollBehavior, navigateType) {
|
|
295
180
|
// Runs when a navigation happens but there's no cached prefetch we can use.
|
|
296
181
|
// Don't bother to wait for a prefetch response; go straight to a full
|
|
297
182
|
// navigation that contains both static and dynamic data in a single stream.
|
|
@@ -307,6 +192,7 @@ async function navigateDynamicallyWithNoPrefetch(now, url, currentUrl, nextUrl,
|
|
|
307
192
|
switch(freshnessPolicy){
|
|
308
193
|
case _pprnavigations.FreshnessPolicy.Default:
|
|
309
194
|
case _pprnavigations.FreshnessPolicy.HistoryTraversal:
|
|
195
|
+
case _pprnavigations.FreshnessPolicy.Gesture:
|
|
310
196
|
dynamicRequestTree = currentFlightRouterState;
|
|
311
197
|
break;
|
|
312
198
|
case _pprnavigations.FreshnessPolicy.Hydration:
|
|
@@ -326,23 +212,219 @@ async function navigateDynamicallyWithNoPrefetch(now, url, currentUrl, nextUrl,
|
|
|
326
212
|
const result = await promiseForDynamicServerResponse;
|
|
327
213
|
if (typeof result === 'string') {
|
|
328
214
|
// This is an MPA navigation.
|
|
329
|
-
const
|
|
330
|
-
return
|
|
331
|
-
tag: _types.NavigationResultTag.MPA,
|
|
332
|
-
data: newUrl
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
const { flightData, canonicalUrl, renderedSearch, debugInfo: debugInfoFromResponse } = result;
|
|
336
|
-
if (debugInfoFromResponse !== null) {
|
|
337
|
-
collectedDebugInfo.push(...debugInfoFromResponse);
|
|
215
|
+
const redirectUrl = new URL(result, location.origin);
|
|
216
|
+
return completeHardNavigation(state, redirectUrl, navigateType);
|
|
338
217
|
}
|
|
218
|
+
const { flightData, canonicalUrl, renderedSearch, couldBeIntercepted, supportsPerSegmentPrefetching, dynamicStaleTime, staticStageData, runtimePrefetchStream, responseHeaders, debugInfo } = result;
|
|
339
219
|
// Since the response format of dynamic requests and prefetches is slightly
|
|
340
220
|
// different, we'll need to massage the data a bit. Create FlightRouterState
|
|
341
221
|
// tree that simulates what we'd receive as the result of a prefetch.
|
|
342
|
-
const navigationSeed = convertServerPatchToFullTree(currentFlightRouterState, flightData, renderedSearch);
|
|
343
|
-
|
|
222
|
+
const navigationSeed = convertServerPatchToFullTree(now, currentFlightRouterState, flightData, renderedSearch, dynamicStaleTime);
|
|
223
|
+
// Learn the route pattern so we can predict it for future navigations.
|
|
224
|
+
// hasDynamicRewrite is false because this is a fresh navigation to an
|
|
225
|
+
// unknown route - any rewrite detection happens during the traversal inside
|
|
226
|
+
// discoverKnownRoute. The hasDynamicRewrite param is only set to true when
|
|
227
|
+
// retrying after a tree mismatch (see dispatchRetryDueToTreeMismatch).
|
|
228
|
+
const metadataVaryPath = navigationSeed.metadataVaryPath;
|
|
229
|
+
if (metadataVaryPath !== null) {
|
|
230
|
+
(0, _optimisticroutes.discoverKnownRoute)(now, url.pathname, nextUrl, null, navigationSeed.routeTree, metadataVaryPath, couldBeIntercepted, (0, _createhreffromurl.createHrefFromUrl)(canonicalUrl), supportsPerSegmentPrefetching, false // hasDynamicRewrite - not a retry, rewrite detection happens during traversal
|
|
231
|
+
);
|
|
232
|
+
if (staticStageData !== null) {
|
|
233
|
+
const { response: staticStageResponse, isResponsePartial } = staticStageData;
|
|
234
|
+
// Write the static stage of the response into the segment cache so that
|
|
235
|
+
// subsequent navigations can serve cached static segments instantly.
|
|
236
|
+
(0, _cache.getStaleAt)(now, staticStageResponse.s).then((staleAt)=>{
|
|
237
|
+
const buildId = responseHeaders.get(_constants.NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? staticStageResponse.b;
|
|
238
|
+
(0, _cache.writeStaticStageResponseIntoCache)(now, staticStageResponse.f, buildId, staticStageResponse.h, staleAt, currentFlightRouterState, renderedSearch, isResponsePartial);
|
|
239
|
+
}).catch(()=>{
|
|
240
|
+
// The static stage processing failed. Not fatal — the navigation
|
|
241
|
+
// completed normally, we just won't write into the cache.
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
if (runtimePrefetchStream !== null) {
|
|
245
|
+
(0, _cache.processRuntimePrefetchStream)(now, runtimePrefetchStream, currentFlightRouterState, renderedSearch).then((processed)=>{
|
|
246
|
+
if (processed !== null) {
|
|
247
|
+
(0, _cache.writeDynamicRenderResponseIntoCache)(now, _types.FetchStrategy.PPRRuntime, processed.flightDatas, processed.buildId, processed.isResponsePartial, processed.headVaryParams, processed.staleAt, processed.navigationSeed, null);
|
|
248
|
+
}
|
|
249
|
+
}).catch(()=>{
|
|
250
|
+
// The runtime prefetch cache write failed. Not fatal — the
|
|
251
|
+
// navigation completed normally, we just won't cache runtime data.
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return navigateToKnownRoute(now, state, url, (0, _createhreffromurl.createHrefFromUrl)(canonicalUrl), navigationSeed, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, freshnessPolicy, nextUrl, scrollBehavior, navigateType, debugInfo, // Unknown route navigations don't use route prediction - the route tree
|
|
256
|
+
// came directly from the server. If a mismatch occurs during dynamic data
|
|
257
|
+
// fetch, the retry handler will traverse the known route tree to mark the
|
|
258
|
+
// entry as having a dynamic rewrite.
|
|
259
|
+
null);
|
|
344
260
|
}
|
|
345
|
-
function
|
|
261
|
+
function completeHardNavigation(state, url, navigateType) {
|
|
262
|
+
if ((0, _javascripturl.isJavaScriptURLString)(url.href)) {
|
|
263
|
+
console.error('Next.js has blocked a javascript: URL as a security precaution.');
|
|
264
|
+
return state;
|
|
265
|
+
}
|
|
266
|
+
const newState = {
|
|
267
|
+
canonicalUrl: url.origin === location.origin ? (0, _createhreffromurl.createHrefFromUrl)(url) : url.href,
|
|
268
|
+
pushRef: {
|
|
269
|
+
pendingPush: navigateType === 'push',
|
|
270
|
+
mpaNavigation: true,
|
|
271
|
+
preserveCustomHistoryState: false
|
|
272
|
+
},
|
|
273
|
+
// TODO: None of the rest of these values are consistent with the incoming
|
|
274
|
+
// navigation. We rely on the fact that AppRouter will suspend and trigger
|
|
275
|
+
// a hard navigation before it accesses any of these values. But instead
|
|
276
|
+
// we should trigger the hard navigation and blocking any subsequent
|
|
277
|
+
// router updates without updating React.
|
|
278
|
+
renderedSearch: state.renderedSearch,
|
|
279
|
+
focusAndScrollRef: state.focusAndScrollRef,
|
|
280
|
+
cache: state.cache,
|
|
281
|
+
tree: state.tree,
|
|
282
|
+
nextUrl: state.nextUrl,
|
|
283
|
+
previousNextUrl: state.previousNextUrl,
|
|
284
|
+
debugInfo: null
|
|
285
|
+
};
|
|
286
|
+
return newState;
|
|
287
|
+
}
|
|
288
|
+
function completeSoftNavigation(oldState, url, referringNextUrl, tree, cache, renderedSearch, canonicalUrl, navigateType, scrollBehavior, scrollRef, collectedDebugInfo) {
|
|
289
|
+
// The "Next-Url" is a special representation of the URL that Next.js
|
|
290
|
+
// uses to implement interception routes.
|
|
291
|
+
// TODO: Get rid of this extra traversal by computing this during the
|
|
292
|
+
// same traversal that computes the tree itself. We should also figure out
|
|
293
|
+
// what is the minimum information needed for the server to correctly
|
|
294
|
+
// intercept the route.
|
|
295
|
+
const changedPath = (0, _computechangedpath.computeChangedPath)(oldState.tree, tree);
|
|
296
|
+
const nextUrlForNewRoute = changedPath ? changedPath : oldState.nextUrl;
|
|
297
|
+
// This value is stored on the state as `previousNextUrl`; the naming is
|
|
298
|
+
// confusing. What it represents is the "Next-Url" header that was used to
|
|
299
|
+
// fetch the incoming route. It's essentially the refererer URL, but in a
|
|
300
|
+
// Next.js specific format. During refreshes, this is sent back to the server
|
|
301
|
+
// instead of the current route's "Next-Url" so that the same interception
|
|
302
|
+
// logic is applied as during the original navigation.
|
|
303
|
+
const previousNextUrl = referringNextUrl;
|
|
304
|
+
// Check if the only thing that changed was the hash fragment.
|
|
305
|
+
const oldUrl = new URL(oldState.canonicalUrl, url);
|
|
306
|
+
const onlyHashChange = // We don't need to compare the origins, because client-driven
|
|
307
|
+
// navigations are always same-origin.
|
|
308
|
+
url.pathname === oldUrl.pathname && url.search === oldUrl.search && url.hash !== oldUrl.hash;
|
|
309
|
+
// Determine whether and how the page should scroll after this
|
|
310
|
+
// navigation.
|
|
311
|
+
//
|
|
312
|
+
// By default, we scroll to the segments that were navigated to — i.e.
|
|
313
|
+
// segments in the new part of the route, as opposed to shared segments
|
|
314
|
+
// that were already part of the previous route. All newly navigated
|
|
315
|
+
// segments share a single ScrollRef. When they mount, the first one
|
|
316
|
+
// to mount initiates the scroll. They share a ref so that only one
|
|
317
|
+
// scroll happens per navigation.
|
|
318
|
+
//
|
|
319
|
+
// If a subsequent navigation produces new segments, those supersede
|
|
320
|
+
// any pending scroll from the previous navigation by invalidating its
|
|
321
|
+
// ScrollRef. If a navigation doesn't produce any new segments (e.g.
|
|
322
|
+
// a refresh where the route structure didn't change), any pending
|
|
323
|
+
// scrolls from previous navigations are unaffected.
|
|
324
|
+
//
|
|
325
|
+
// The branches below handle special cases layered on top of this
|
|
326
|
+
// default model.
|
|
327
|
+
let activeScrollRef;
|
|
328
|
+
let forceScroll;
|
|
329
|
+
if (scrollBehavior === _routerreducertypes.ScrollBehavior.NoScroll) {
|
|
330
|
+
// The user explicitly opted out of scrolling (e.g. scroll={false}
|
|
331
|
+
// on a Link or router.push).
|
|
332
|
+
//
|
|
333
|
+
// If this navigation created new scroll targets (scrollRef !== null),
|
|
334
|
+
// neutralize them. If it didn't, any prior scroll targets carried
|
|
335
|
+
// forward on the cache nodes via reuseSharedCacheNode remain active.
|
|
336
|
+
if (scrollRef !== null) {
|
|
337
|
+
scrollRef.current = false;
|
|
338
|
+
}
|
|
339
|
+
activeScrollRef = oldState.focusAndScrollRef.scrollRef;
|
|
340
|
+
forceScroll = false;
|
|
341
|
+
} else if (onlyHashChange) {
|
|
342
|
+
// Hash-only navigations should scroll regardless of per-node state.
|
|
343
|
+
// Create a fresh ref so the first segment to scroll consumes it.
|
|
344
|
+
//
|
|
345
|
+
// Invalidate any scroll ref from a prior navigation that hasn't
|
|
346
|
+
// been consumed yet.
|
|
347
|
+
const oldScrollRef = oldState.focusAndScrollRef.scrollRef;
|
|
348
|
+
if (oldScrollRef !== null) {
|
|
349
|
+
oldScrollRef.current = false;
|
|
350
|
+
}
|
|
351
|
+
// Also invalidate any per-node refs that were accumulated during
|
|
352
|
+
// this navigation's tree construction — the hash-only ref
|
|
353
|
+
// supersedes them.
|
|
354
|
+
if (scrollRef !== null) {
|
|
355
|
+
scrollRef.current = false;
|
|
356
|
+
}
|
|
357
|
+
activeScrollRef = {
|
|
358
|
+
current: true
|
|
359
|
+
};
|
|
360
|
+
forceScroll = true;
|
|
361
|
+
} else {
|
|
362
|
+
// Default case. Use the accumulated scrollRef (may be null if no
|
|
363
|
+
// new segments were created). The handler checks per-node refs, so
|
|
364
|
+
// unchanged parallel route slots won't scroll.
|
|
365
|
+
activeScrollRef = scrollRef;
|
|
366
|
+
// If this navigation created new scroll targets, invalidate any
|
|
367
|
+
// pending scroll from a previous navigation.
|
|
368
|
+
if (scrollRef !== null) {
|
|
369
|
+
const oldScrollRef = oldState.focusAndScrollRef.scrollRef;
|
|
370
|
+
if (oldScrollRef !== null) {
|
|
371
|
+
oldScrollRef.current = false;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
forceScroll = false;
|
|
375
|
+
}
|
|
376
|
+
const newState = {
|
|
377
|
+
canonicalUrl,
|
|
378
|
+
renderedSearch,
|
|
379
|
+
pushRef: {
|
|
380
|
+
pendingPush: navigateType === 'push',
|
|
381
|
+
mpaNavigation: false,
|
|
382
|
+
preserveCustomHistoryState: false
|
|
383
|
+
},
|
|
384
|
+
focusAndScrollRef: {
|
|
385
|
+
scrollRef: activeScrollRef,
|
|
386
|
+
forceScroll,
|
|
387
|
+
onlyHashChange,
|
|
388
|
+
hashFragment: // Remove leading # and decode hash to make non-latin hashes work.
|
|
389
|
+
//
|
|
390
|
+
// Empty hash should trigger default behavior of scrolling layout into
|
|
391
|
+
// view. #top is handled in layout-router.
|
|
392
|
+
//
|
|
393
|
+
// Refer to `ScrollAndFocusHandler` for details on how this is used.
|
|
394
|
+
scrollBehavior !== _routerreducertypes.ScrollBehavior.NoScroll && url.hash !== '' ? decodeURIComponent(url.hash.slice(1)) : oldState.focusAndScrollRef.hashFragment
|
|
395
|
+
},
|
|
396
|
+
cache,
|
|
397
|
+
tree,
|
|
398
|
+
nextUrl: nextUrlForNewRoute,
|
|
399
|
+
previousNextUrl,
|
|
400
|
+
debugInfo: collectedDebugInfo
|
|
401
|
+
};
|
|
402
|
+
return newState;
|
|
403
|
+
}
|
|
404
|
+
function completeTraverseNavigation(state, url, renderedSearch, cache, tree, nextUrl) {
|
|
405
|
+
return {
|
|
406
|
+
// Set canonical url
|
|
407
|
+
canonicalUrl: (0, _createhreffromurl.createHrefFromUrl)(url),
|
|
408
|
+
renderedSearch,
|
|
409
|
+
pushRef: {
|
|
410
|
+
pendingPush: false,
|
|
411
|
+
mpaNavigation: false,
|
|
412
|
+
// Ensures that the custom history state that was set is preserved when applying this update.
|
|
413
|
+
preserveCustomHistoryState: true
|
|
414
|
+
},
|
|
415
|
+
focusAndScrollRef: state.focusAndScrollRef,
|
|
416
|
+
cache,
|
|
417
|
+
// Restore provided tree
|
|
418
|
+
tree,
|
|
419
|
+
nextUrl,
|
|
420
|
+
// TODO: We need to restore previousNextUrl, too, which represents the
|
|
421
|
+
// Next-Url that was used to fetch the data. Anywhere we fetch using the
|
|
422
|
+
// canonical URL, there should be a corresponding Next-Url.
|
|
423
|
+
previousNextUrl: null,
|
|
424
|
+
debugInfo: null
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
function convertServerPatchToFullTree(now, currentTree, flightData, renderedSearch, dynamicStaleTimeSeconds) {
|
|
346
428
|
// During a client navigation or prefetch, the server sends back only a patch
|
|
347
429
|
// for the parts of the tree that have changed.
|
|
348
430
|
//
|
|
@@ -361,22 +443,36 @@ function convertServerPatchToFullTree(currentTree, flightData, renderedSearch) {
|
|
|
361
443
|
let baseTree = currentTree;
|
|
362
444
|
let baseData = null;
|
|
363
445
|
let head = null;
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
446
|
+
if (flightData !== null) {
|
|
447
|
+
for (const { segmentPath, tree: treePatch, seedData: dataPatch, head: headPatch } of flightData){
|
|
448
|
+
const result = convertServerPatchToFullTreeImpl(baseTree, baseData, treePatch, dataPatch, segmentPath, renderedSearch, 0);
|
|
449
|
+
baseTree = result.tree;
|
|
450
|
+
baseData = result.data;
|
|
451
|
+
// This is the same for all patches per response, so just pick an
|
|
452
|
+
// arbitrary one
|
|
453
|
+
head = headPatch;
|
|
454
|
+
}
|
|
371
455
|
}
|
|
456
|
+
const finalFlightRouterState = baseTree;
|
|
457
|
+
// Convert the final FlightRouterState into a RouteTree type.
|
|
458
|
+
//
|
|
459
|
+
// TODO: Eventually, FlightRouterState will evolve to being a transport format
|
|
460
|
+
// only. The RouteTree type will become the main type used for dealing with
|
|
461
|
+
// routes on the client, and we'll store it in the state directly.
|
|
462
|
+
const acc = {
|
|
463
|
+
metadataVaryPath: null
|
|
464
|
+
};
|
|
465
|
+
const routeTree = (0, _cache.convertRootFlightRouterStateToRouteTree)(finalFlightRouterState, renderedSearch, acc);
|
|
372
466
|
return {
|
|
373
|
-
|
|
467
|
+
routeTree,
|
|
468
|
+
metadataVaryPath: acc.metadataVaryPath,
|
|
374
469
|
data: baseData,
|
|
375
470
|
renderedSearch,
|
|
376
|
-
head
|
|
471
|
+
head,
|
|
472
|
+
dynamicStaleAt: (0, _bfcache.computeDynamicStaleAt)(now, dynamicStaleTimeSeconds)
|
|
377
473
|
};
|
|
378
474
|
}
|
|
379
|
-
function convertServerPatchToFullTreeImpl(baseRouterState, baseData, treePatch, dataPatch, segmentPath, index) {
|
|
475
|
+
function convertServerPatchToFullTreeImpl(baseRouterState, baseData, treePatch, dataPatch, segmentPath, renderedSearch, index) {
|
|
380
476
|
if (index === segmentPath.length) {
|
|
381
477
|
// We reached the part of the tree that we need to patch.
|
|
382
478
|
return {
|
|
@@ -404,7 +500,7 @@ function convertServerPatchToFullTreeImpl(baseRouterState, baseData, treePatch,
|
|
|
404
500
|
const childBaseRouterState = baseTreeChildren[parallelRouteKey];
|
|
405
501
|
const childBaseSeedData = baseSeedDataChildren !== null ? baseSeedDataChildren[parallelRouteKey] ?? null : null;
|
|
406
502
|
if (parallelRouteKey === updatedParallelRouteKey) {
|
|
407
|
-
const result = convertServerPatchToFullTreeImpl(childBaseRouterState, childBaseSeedData, treePatch, dataPatch, segmentPath, // Advance the index by two and keep cloning until we reach
|
|
503
|
+
const result = convertServerPatchToFullTreeImpl(childBaseRouterState, childBaseSeedData, treePatch, dataPatch, segmentPath, renderedSearch, // Advance the index by two and keep cloning until we reach
|
|
408
504
|
// the end of the segment path.
|
|
409
505
|
index + 2);
|
|
410
506
|
newTreeChildren[parallelRouteKey] = result.tree;
|
|
@@ -427,7 +523,19 @@ function convertServerPatchToFullTreeImpl(baseRouterState, baseData, treePatch,
|
|
|
427
523
|
newTreeChildren
|
|
428
524
|
];
|
|
429
525
|
if (2 in baseRouterState) {
|
|
430
|
-
|
|
526
|
+
const compressedRefreshState = baseRouterState[2];
|
|
527
|
+
if (compressedRefreshState !== undefined && compressedRefreshState !== null) {
|
|
528
|
+
// Since this part of the tree was patched with new data, any parent
|
|
529
|
+
// refresh states should be updated to reflect the new rendered search
|
|
530
|
+
// value. (The refresh state acts like a "context provider".) All pages
|
|
531
|
+
// within the same server response share the same renderedSearch value,
|
|
532
|
+
// but the same RouteTree could be composed from multiple different
|
|
533
|
+
// routes, and multiple responses.
|
|
534
|
+
clonedTree[2] = [
|
|
535
|
+
compressedRefreshState[0],
|
|
536
|
+
renderedSearch
|
|
537
|
+
];
|
|
538
|
+
}
|
|
431
539
|
}
|
|
432
540
|
if (3 in baseRouterState) {
|
|
433
541
|
clonedTree[3] = baseRouterState[3];
|
|
@@ -442,13 +550,43 @@ function convertServerPatchToFullTreeImpl(baseRouterState, baseData, treePatch,
|
|
|
442
550
|
newSeedDataChildren,
|
|
443
551
|
null,
|
|
444
552
|
isEmptySeedDataPartial,
|
|
445
|
-
|
|
553
|
+
null
|
|
446
554
|
];
|
|
447
555
|
return {
|
|
448
556
|
tree: clonedTree,
|
|
449
557
|
data: clonedSeedData
|
|
450
558
|
};
|
|
451
559
|
}
|
|
560
|
+
/**
|
|
561
|
+
* Instant Navigation Testing API: ensures a prefetch task has been initiated
|
|
562
|
+
* and completed before proceeding with the navigation. This guarantees that
|
|
563
|
+
* segment data requests are at least pending, even for routes whose route
|
|
564
|
+
* tree is already cached.
|
|
565
|
+
*
|
|
566
|
+
* After the prefetch completes, delegates to the normal navigation flow.
|
|
567
|
+
*/ async function ensurePrefetchThenNavigate(state, url, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, nextUrl, freshnessPolicy, scrollBehavior, navigateType) {
|
|
568
|
+
const link = (0, _links.getLinkForCurrentNavigation)();
|
|
569
|
+
const fetchStrategy = link !== null ? link.fetchStrategy : _types.FetchStrategy.PPR;
|
|
570
|
+
// Transition the cookie to captured-SPA immediately, before waiting
|
|
571
|
+
// for the prefetch. This ensures the devtools panel can update its UI
|
|
572
|
+
// right away, even if the prefetch takes time (e.g. dev compilation).
|
|
573
|
+
// The "to" tree starts as null and is filled in after the prefetch
|
|
574
|
+
// resolves and the navigation produces a new router state.
|
|
575
|
+
const { transitionToCapturedSPA, updateCapturedSPAToTree } = require('./navigation-testing-lock');
|
|
576
|
+
transitionToCapturedSPA(currentFlightRouterState, null);
|
|
577
|
+
const cacheKey = (0, _cachekey.createCacheKey)(url.href, nextUrl);
|
|
578
|
+
await new Promise((resolve)=>{
|
|
579
|
+
(0, _scheduler.schedulePrefetchTask)(cacheKey, currentFlightRouterState, fetchStrategy, _types.PrefetchPriority.Default, null, resolve // _onComplete callback
|
|
580
|
+
);
|
|
581
|
+
});
|
|
582
|
+
// Prefetch is complete. Proceed with the normal navigation flow, which
|
|
583
|
+
// will now find the route in the cache.
|
|
584
|
+
const result = await navigateImpl(state, url, currentUrl, currentRenderedSearch, currentCacheNode, currentFlightRouterState, nextUrl, freshnessPolicy, scrollBehavior, navigateType);
|
|
585
|
+
// Update the cookie with the resolved "to" tree so the devtools
|
|
586
|
+
// panel can display both routes immediately.
|
|
587
|
+
updateCapturedSPAToTree(currentFlightRouterState, result.tree);
|
|
588
|
+
return result;
|
|
589
|
+
}
|
|
452
590
|
|
|
453
591
|
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
|
|
454
592
|
Object.defineProperty(exports.default, '__esModule', { value: true });
|