@vectorize-io/hindsight-control-plane 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/standalone/.next/BUILD_ID +1 -1
- package/standalone/.next/app-path-routes-manifest.json +2 -0
- package/standalone/.next/build-manifest.json +7 -8
- package/standalone/.next/prerender-manifest.json +3 -7
- package/standalone/.next/required-server-files.json +40 -193
- package/standalone/.next/routes-manifest.json +17 -1
- package/standalone/.next/server/app/_global-error/page/build-manifest.json +5 -6
- package/standalone/.next/server/app/_global-error/page.js +2 -2
- package/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/_global-error.html +2 -2
- package/standalone/.next/server/app/_global-error.rsc +8 -8
- package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +8 -8
- package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +4 -6
- package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found/page/build-manifest.json +5 -6
- package/standalone/.next/server/app/_not-found/page.js +2 -2
- package/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/_not-found.html +1 -1
- package/standalone/.next/server/app/_not-found.rsc +12 -12
- package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +5 -7
- package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +6 -6
- package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/standalone/.next/server/app/api/banks/[bankId]/route/app-paths-manifest.json +3 -0
- package/standalone/.next/server/app/api/banks/[bankId]/route/build-manifest.json +11 -0
- package/standalone/.next/server/app/api/banks/[bankId]/route/server-reference-manifest.json +4 -0
- package/standalone/.next/server/app/api/banks/[bankId]/route.js +7 -0
- package/standalone/.next/server/app/api/banks/[bankId]/route.js.map +5 -0
- package/standalone/.next/server/app/api/banks/[bankId]/route.js.nft.json +1 -0
- package/standalone/.next/server/app/api/banks/[bankId]/route_client-reference-manifest.js +2 -0
- package/standalone/.next/server/app/api/banks/route.js +3 -2
- package/standalone/.next/server/app/api/banks/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/chunks/[chunkId]/route.js +3 -2
- package/standalone/.next/server/app/api/chunks/[chunkId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/documents/[documentId]/route.js +3 -2
- package/standalone/.next/server/app/api/documents/[documentId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/documents/route.js +3 -2
- package/standalone/.next/server/app/api/documents/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/entities/[entityId]/regenerate/route.js +3 -2
- package/standalone/.next/server/app/api/entities/[entityId]/regenerate/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/entities/[entityId]/route.js +3 -2
- package/standalone/.next/server/app/api/entities/[entityId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/entities/route.js +3 -2
- package/standalone/.next/server/app/api/entities/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/graph/route.js +3 -2
- package/standalone/.next/server/app/api/graph/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/health/route.js +2 -1
- package/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/list/route.js +3 -2
- package/standalone/.next/server/app/api/list/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/memories/[memoryId]/route/app-paths-manifest.json +3 -0
- package/standalone/.next/server/app/api/memories/[memoryId]/route/build-manifest.json +11 -0
- package/standalone/.next/server/app/api/memories/[memoryId]/route/server-reference-manifest.json +4 -0
- package/standalone/.next/server/app/api/memories/[memoryId]/route.js +6 -0
- package/standalone/.next/server/app/api/memories/[memoryId]/route.js.map +5 -0
- package/standalone/.next/server/app/api/memories/[memoryId]/route.js.nft.json +1 -0
- package/standalone/.next/server/app/api/memories/[memoryId]/route_client-reference-manifest.js +2 -0
- package/standalone/.next/server/app/api/memories/retain/route.js +3 -2
- package/standalone/.next/server/app/api/memories/retain/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/memories/retain_async/route.js +3 -2
- package/standalone/.next/server/app/api/memories/retain_async/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/operations/[agentId]/route.js +3 -2
- package/standalone/.next/server/app/api/operations/[agentId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/profile/[bankId]/route.js +3 -2
- package/standalone/.next/server/app/api/profile/[bankId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/recall/route.js +3 -2
- package/standalone/.next/server/app/api/recall/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/reflect/route.js +3 -2
- package/standalone/.next/server/app/api/reflect/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/stats/[agentId]/route.js +3 -2
- package/standalone/.next/server/app/api/stats/[agentId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/banks/[bankId]/page/build-manifest.json +5 -6
- package/standalone/.next/server/app/banks/[bankId]/page.js +2 -2
- package/standalone/.next/server/app/banks/[bankId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/banks/[bankId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/dashboard/page/build-manifest.json +5 -6
- package/standalone/.next/server/app/dashboard/page.js +2 -2
- package/standalone/.next/server/app/dashboard/page.js.nft.json +1 -1
- package/standalone/.next/server/app/dashboard/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/dashboard.html +1 -1
- package/standalone/.next/server/app/dashboard.rsc +14 -14
- package/standalone/.next/server/app/dashboard.segments/_full.segment.rsc +14 -14
- package/standalone/.next/server/app/dashboard.segments/_head.segment.rsc +5 -7
- package/standalone/.next/server/app/dashboard.segments/_index.segment.rsc +6 -6
- package/standalone/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/standalone/.next/server/app/dashboard.segments/dashboard/__PAGE__.segment.rsc +4 -4
- package/standalone/.next/server/app/dashboard.segments/dashboard.segment.rsc +3 -3
- package/standalone/.next/server/app/index.html +1 -1
- package/standalone/.next/server/app/index.rsc +12 -12
- package/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/standalone/.next/server/app/index.segments/_full.segment.rsc +12 -12
- package/standalone/.next/server/app/index.segments/_head.segment.rsc +5 -7
- package/standalone/.next/server/app/index.segments/_index.segment.rsc +6 -6
- package/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/standalone/.next/server/app/page/build-manifest.json +5 -6
- package/standalone/.next/server/app/page.js +3 -3
- package/standalone/.next/server/app/page.js.nft.json +1 -1
- package/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app-paths-manifest.json +2 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__116b0d31._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__296b95db._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__356491b1._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__37560d9a._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__478d7304._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__51072426._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__517fcb62._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__57dac9c2._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__6872cebd._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__687469c1._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__71e0e3b9._.js +21 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__8241ce67._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__85fada80._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__9a7529ab._.js +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__9af3dcb2._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__ab5df0f3._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__b9387f6f._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__e4e9fd7e._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__ef34dcbb._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__fd2d4ac3._.js +3 -0
- package/standalone/.next/server/chunks/[turbopack]_runtime.js +32 -7
- package/standalone/.next/server/chunks/e51bf__next-internal_server_app_api_banks_[bankId]_route_actions_e35b026c.js +3 -0
- package/standalone/.next/server/chunks/e51bf__next-internal_server_app_api_memories_[memoryId]_route_actions_461fd16c.js +3 -0
- package/standalone/.next/server/chunks/hindsight-clients_typescript_dist_79330c4c._.js +3 -0
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__3f6f18bb._.js +1 -1
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__655f8d11._.js +6 -2
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__8dd83d7a._.js +1 -1
- package/standalone/.next/server/chunks/ssr/[turbopack]_runtime.js +32 -7
- package/standalone/.next/server/chunks/ssr/_04b70dca._.js +6 -0
- package/standalone/.next/server/chunks/ssr/_26df66d0._.js +2 -2
- package/standalone/.next/server/chunks/ssr/_407ede86._.js +9 -0
- package/standalone/.next/server/chunks/ssr/_53a4aa41._.js +2 -2
- package/standalone/.next/server/chunks/ssr/_6f1a7a53._.js +6 -0
- package/standalone/.next/server/chunks/ssr/_944e56a6._.js +2 -2
- package/standalone/.next/server/chunks/ssr/_e3307836._.js +9 -0
- package/standalone/.next/server/chunks/ssr/hindsight-control-plane_src_fe96d618._.js +1 -1
- package/standalone/.next/server/chunks/ssr/node_modules_256e9ddd._.js +3 -0
- package/standalone/.next/server/chunks/ssr/node_modules_next_dist_08570d7f._.js +2 -2
- package/standalone/.next/server/chunks/ssr/node_modules_next_dist_4b9a0874._.js +3 -0
- package/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_89742413.js +2 -2
- package/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js +6 -0
- package/standalone/.next/server/middleware-build-manifest.js +5 -6
- package/standalone/.next/server/pages/404.html +1 -1
- package/standalone/.next/server/pages/500.html +2 -2
- package/standalone/.next/server/server-reference-manifest.js +1 -1
- package/standalone/.next/server/server-reference-manifest.json +1 -1
- package/standalone/.next/static/chunks/068dff78c3e35897.css +2 -0
- package/standalone/.next/static/chunks/30ea11065999f7ac.js +1 -0
- package/standalone/.next/static/chunks/5777bc08048e2edc.js +4 -0
- package/standalone/.next/static/chunks/5d60d221a60086fb.js +1 -0
- package/standalone/.next/static/chunks/7340adf74ff47ec0.js +1 -0
- package/standalone/.next/static/chunks/8ca05de898c11578.js +1 -0
- package/standalone/.next/static/chunks/9b12d8cc6a26cbbc.js +7 -0
- package/standalone/.next/static/chunks/a6dad97d9634a72d.js.map +1 -0
- package/standalone/.next/static/chunks/c1c4c028479eeb7d.js +7 -0
- package/standalone/.next/static/chunks/eef1ea5ced749e04.js +2 -0
- package/standalone/.next/static/chunks/f37acefc5ba19606.js +1 -0
- package/standalone/.next/static/chunks/turbopack-59d7bb1a28984373.js +4 -0
- package/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +46 -0
- package/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +1 -0
- package/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +42 -0
- package/standalone/node_modules/@img/sharp-libvips-linux-x64/versions.json +30 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +46 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/standalone/node_modules/@img/sharp-linux-x64/package.json +46 -0
- package/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/standalone/node_modules/@next/env/package.json +4 -4
- package/standalone/node_modules/next/dist/build/analyze/index.js +242 -0
- package/standalone/node_modules/next/dist/build/define-env.js +22 -13
- package/standalone/node_modules/next/dist/build/entries.js +5 -5
- package/standalone/node_modules/next/dist/build/generate-routes-manifest.js +91 -0
- package/standalone/node_modules/next/dist/build/index.js +172 -223
- package/standalone/node_modules/next/dist/build/output/log.js +4 -7
- package/standalone/node_modules/next/dist/build/segment-config/app/app-segments.js +23 -99
- package/standalone/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +3 -3
- package/standalone/node_modules/next/dist/build/spinner.js +3 -3
- package/standalone/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +137 -0
- package/standalone/node_modules/next/dist/build/static-paths/app.js +69 -210
- package/standalone/node_modules/next/dist/build/static-paths/utils.js +83 -11
- package/standalone/node_modules/next/dist/build/swc/index.js +10 -6
- package/standalone/node_modules/next/dist/build/templates/app-page.js +21 -14
- package/standalone/node_modules/next/dist/build/templates/app-route.js +8 -10
- package/standalone/node_modules/next/dist/build/templates/edge-app-route.js +7 -10
- package/standalone/node_modules/next/dist/build/templates/edge-ssr-app.js +16 -20
- package/standalone/node_modules/next/dist/build/templates/edge-ssr.js +20 -14
- package/standalone/node_modules/next/dist/build/templates/edge-wrapper.js +24 -0
- package/standalone/node_modules/next/dist/build/templates/middleware.js +7 -6
- package/standalone/node_modules/next/dist/build/templates/pages-edge-api.js +3 -2
- package/standalone/node_modules/next/dist/build/turbopack-analyze/index.js +116 -0
- package/standalone/node_modules/next/dist/build/turbopack-build/impl.js +2 -1
- package/standalone/node_modules/next/dist/build/type-check.js +7 -8
- package/standalone/node_modules/next/dist/build/utils.js +45 -4
- package/standalone/node_modules/next/dist/build/validate-app-paths.js +242 -0
- package/standalone/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js +20 -2
- package/standalone/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js +2 -5
- package/standalone/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js +4 -11
- package/standalone/node_modules/next/dist/build/webpack/loaders/next-root-params-loader.js +1 -1
- package/standalone/node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.js +1 -1
- package/standalone/node_modules/next/dist/build/webpack/plugins/middleware-plugin.js +3 -0
- package/standalone/node_modules/next/dist/build/webpack-build/impl.js +1 -0
- package/standalone/node_modules/next/dist/build/webpack-config.js +35 -3
- package/standalone/node_modules/next/dist/cli/next-test.js +3 -5
- package/standalone/node_modules/next/dist/client/components/app-router-headers.js +5 -0
- package/standalone/node_modules/next/dist/client/components/app-router-instance.js +3 -11
- package/standalone/node_modules/next/dist/client/components/app-router.js +8 -28
- package/standalone/node_modules/next/dist/client/components/navigation-devtools.js +5 -7
- package/standalone/node_modules/next/dist/client/components/navigation.js +4 -3
- package/standalone/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +3 -22
- package/standalone/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +6 -18
- package/standalone/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +844 -590
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +4 -76
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +21 -18
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +48 -85
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +25 -10
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +126 -113
- package/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +30 -39
- package/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +0 -1
- package/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer.js +2 -2
- package/standalone/node_modules/next/dist/client/components/segment-cache/cache-map.js +13 -18
- package/standalone/node_modules/next/dist/client/components/segment-cache/cache.js +27 -14
- package/standalone/node_modules/next/dist/client/components/segment-cache/lru.js +3 -1
- package/standalone/node_modules/next/dist/client/components/segment-cache/navigation.js +176 -133
- package/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +12 -12
- package/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +12 -12
- package/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
- package/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +10 -10
- package/standalone/node_modules/next/dist/compiled/react-is/package.json +1 -1
- package/standalone/node_modules/next/dist/lib/build-custom-route.js +4 -4
- package/standalone/node_modules/next/dist/lib/constants.js +0 -5
- package/standalone/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +0 -1
- package/standalone/node_modules/next/dist/lib/helpers/get-npx-command.js +3 -3
- package/standalone/node_modules/next/dist/lib/inline-static-env.js +1 -1
- package/standalone/node_modules/next/dist/lib/metadata/metadata.js +17 -11
- package/standalone/node_modules/next/dist/lib/needs-experimental-react.js +2 -2
- package/standalone/node_modules/next/dist/lib/resolve-build-paths.js +44 -76
- package/standalone/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
- package/standalone/node_modules/next/dist/lib/static-env.js +6 -6
- package/standalone/node_modules/next/dist/lib/turbopack-warning.js +3 -5
- package/standalone/node_modules/next/dist/lib/typescript/runTypeCheck.js +61 -5
- package/standalone/node_modules/next/dist/lib/typescript/type-paths.js +56 -0
- package/standalone/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +6 -17
- package/standalone/node_modules/next/dist/lib/verify-typescript-setup.js +10 -2
- package/standalone/node_modules/next/dist/lib/worker.js +17 -9
- package/standalone/node_modules/next/dist/server/app-render/action-handler.js +113 -77
- package/standalone/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +36 -15
- package/standalone/node_modules/next/dist/server/app-render/app-render-render-utils.js +36 -15
- package/standalone/node_modules/next/dist/server/app-render/app-render-scheduling.js +188 -0
- package/standalone/node_modules/next/dist/server/app-render/app-render.js +804 -748
- package/standalone/node_modules/next/dist/server/app-render/collect-segment-data.js +8 -2
- package/standalone/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +1 -1
- package/standalone/node_modules/next/dist/server/app-render/create-error-handler.js +42 -75
- package/standalone/node_modules/next/dist/server/app-render/dynamic-rendering.js +127 -14
- package/standalone/node_modules/next/dist/server/app-render/encryption-utils.js +3 -108
- package/standalone/node_modules/next/dist/server/app-render/encryption.js +4 -3
- package/standalone/node_modules/next/dist/server/app-render/flight-render-result.js +3 -2
- package/standalone/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +9 -8
- package/standalone/node_modules/next/dist/server/app-render/get-layer-assets.js +1 -1
- package/standalone/node_modules/next/dist/server/app-render/manifests-singleton.js +257 -0
- package/standalone/node_modules/next/dist/server/app-render/prospective-render-utils.js +25 -8
- package/standalone/node_modules/next/dist/server/app-render/staged-rendering.js +161 -15
- package/standalone/node_modules/next/dist/server/app-render/use-flight-response.js +67 -20
- package/standalone/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +2 -2
- package/standalone/node_modules/next/dist/server/async-storage/work-store.js +2 -1
- package/standalone/node_modules/next/dist/server/base-server.js +32 -23
- package/standalone/node_modules/next/dist/server/config-schema.js +8 -1
- package/standalone/node_modules/next/dist/server/config-shared.js +83 -2
- package/standalone/node_modules/next/dist/server/config.js +24 -17
- package/standalone/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
- package/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +37 -25
- package/standalone/node_modules/next/dist/server/dev/hot-reloader-types.js +1 -0
- package/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +62 -57
- package/standalone/node_modules/next/dist/server/dev/log-requests.js +11 -3
- package/standalone/node_modules/next/dist/server/dev/messages.js +10 -0
- package/standalone/node_modules/next/dist/server/dev/serialized-errors.js +67 -0
- package/standalone/node_modules/next/dist/server/dev/static-paths-worker.js +10 -0
- package/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/standalone/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +2 -2
- package/standalone/node_modules/next/dist/server/lib/dev-bundler-service.js +6 -10
- package/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +4 -4
- package/standalone/node_modules/next/dist/server/lib/lazy-result.js +1 -1
- package/standalone/node_modules/next/dist/server/lib/patch-fetch.js +9 -9
- package/standalone/node_modules/next/dist/server/lib/router-server.js +43 -29
- package/standalone/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +0 -21
- package/standalone/node_modules/next/dist/server/lib/router-utils/filesystem.js +2 -7
- package/standalone/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +8 -4
- package/standalone/node_modules/next/dist/server/lib/start-server.js +3 -3
- package/standalone/node_modules/next/dist/server/lib/trace/tracer.js +4 -0
- package/standalone/node_modules/next/dist/server/load-components.js +3 -9
- package/standalone/node_modules/next/dist/server/next-server.js +19 -18
- package/standalone/node_modules/next/dist/server/next.js +1 -1
- package/standalone/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +570 -0
- package/standalone/node_modules/next/dist/server/node-environment-extensions/utils.js +60 -3
- package/standalone/node_modules/next/dist/server/node-environment.js +1 -0
- package/standalone/node_modules/next/dist/server/patch-error-inspect.js +7 -4
- package/standalone/node_modules/next/dist/server/request/fallback-params.js +23 -66
- package/standalone/node_modules/next/dist/server/route-modules/app-route/module.js +2 -2
- package/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -3
- package/standalone/node_modules/next/dist/server/route-modules/route-module.js +79 -18
- package/standalone/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +28 -4
- package/standalone/node_modules/next/dist/server/typescript/rules/config.js +50 -6
- package/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +68 -23
- package/standalone/node_modules/next/dist/server/web/edge-route-module-wrapper.js +7 -5
- package/standalone/node_modules/next/dist/server/web/sandbox/context.js +8 -9
- package/standalone/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +2 -1
- package/standalone/node_modules/next/dist/server/web/spec-extension/revalidate.js +7 -3
- package/standalone/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
- package/standalone/node_modules/next/dist/shared/lib/constants.js +6 -1
- package/standalone/node_modules/next/dist/shared/lib/deployment-id.js +36 -0
- package/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/standalone/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +5 -0
- package/standalone/node_modules/next/dist/shared/lib/router/routes/app.js +122 -0
- package/standalone/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +20 -49
- package/standalone/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +6 -6
- package/standalone/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
- package/standalone/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +116 -0
- package/standalone/node_modules/next/dist/shared/lib/segment-cache/output-export-prefetch-encoding.js +3 -24
- package/standalone/node_modules/next/dist/shared/lib/segment.js +5 -0
- package/standalone/node_modules/next/dist/shared/lib/turbopack/utils.js +6 -5
- package/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/standalone/node_modules/next/dist/telemetry/events/build.js +11 -0
- package/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/standalone/node_modules/next/package.json +20 -18
- package/standalone/node_modules/react/cjs/react.production.js +1 -1
- package/standalone/node_modules/react/package.json +1 -1
- package/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
- package/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
- package/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +3 -3
- package/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +3 -3
- package/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +3 -3
- package/standalone/node_modules/react-dom/cjs/react-dom.production.js +1 -1
- package/standalone/node_modules/react-dom/package.json +2 -2
- package/standalone/package.json +1 -1
- package/standalone/server.js +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__02a1e7f7._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__0f1b189c._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__228c769f._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__317b54d0._.js +0 -21
- package/standalone/.next/server/chunks/[root-of-the-server]__464d3847._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__5e1d146d._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__6ee44ea3._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__73093267._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__81c0d784._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__9c3dd746._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__bae0f53c._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__be9afc00._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__d2485edb._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__d4b39930._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__d4f9d631._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__e5a6b81d._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__f318615b._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_3476210c._.js +0 -6
- package/standalone/.next/server/chunks/ssr/_5e906836._.js +0 -9
- package/standalone/.next/server/chunks/ssr/_8362f37b._.js +0 -6
- package/standalone/.next/server/chunks/ssr/_e8cbc2be._.js +0 -9
- package/standalone/.next/server/chunks/ssr/node_modules_5363a9de._.js +0 -3
- package/standalone/.next/server/chunks/ssr/node_modules_next_dist_cc88faaa._.js +0 -3
- package/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_3fe9760a._.js +0 -6
- package/standalone/.next/static/chunks/023d923a37d494fc.js +0 -1
- package/standalone/.next/static/chunks/0e1b9f3295e06ab1.js +0 -1
- package/standalone/.next/static/chunks/0e662c07abb2cacd.js +0 -1
- package/standalone/.next/static/chunks/247eb132b7f7b574.js +0 -1
- package/standalone/.next/static/chunks/497f7b5edc7d3fce.js +0 -1
- package/standalone/.next/static/chunks/4a2e6ca9bc162ffe.js +0 -4
- package/standalone/.next/static/chunks/9bc5002cc495aadf.js +0 -7
- package/standalone/.next/static/chunks/9eef728357965f0b.js +0 -7
- package/standalone/.next/static/chunks/c0409be3e0eda16b.js +0 -1
- package/standalone/.next/static/chunks/d0cdc56d06040c69.js +0 -2
- package/standalone/.next/static/chunks/f3b9062eed4c1661.css +0 -2
- package/standalone/.next/static/chunks/turbopack-030018f439265ea0.js +0 -3
- package/standalone/node_modules/next/dist/build/deployment-id.js +0 -18
- package/standalone/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js +0 -53
- package/standalone/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js +0 -105
- package/standalone/node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js +0 -110
- package/standalone/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js +0 -131
- package/standalone/node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js +0 -25
- package/standalone/node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js +0 -32
- package/standalone/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js +0 -104
- package/standalone/node_modules/next/dist/lib/server-external-packages.json +0 -75
- package/standalone/node_modules/next/dist/server/app-render/action-utils.js +0 -90
- package/standalone/node_modules/next/dist/server/normalizers/request/prefetch-rsc.js +0 -31
- /package/standalone/.next/static/{Z8gJO8_HRXy--TtLfF1uB → FoyZVJhqn8jToZ2jQdT4e}/_buildManifest.js +0 -0
- /package/standalone/.next/static/{Z8gJO8_HRXy--TtLfF1uB → FoyZVJhqn8jToZ2jQdT4e}/_clientMiddlewareManifest.json +0 -0
- /package/standalone/.next/static/{Z8gJO8_HRXy--TtLfF1uB → FoyZVJhqn8jToZ2jQdT4e}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, /**
|
|
6
|
+
* Rspack Persistent Cache Strategy for Next.js Development
|
|
7
|
+
*
|
|
8
|
+
* Rspack's persistent caching differs from Webpack in how it manages module graphs.
|
|
9
|
+
* While Webpack incrementally updates modules, Rspack operates on complete module
|
|
10
|
+
* graph snapshots for cache restoration.
|
|
11
|
+
*
|
|
12
|
+
* Problem:
|
|
13
|
+
* - Next.js dev server starts with no page modules in the initial entry points
|
|
14
|
+
* - When Rspack restores from persistent cache, it finds no modules and purges
|
|
15
|
+
* the entire module graph
|
|
16
|
+
* - Later page requests find no cached module information, preventing cache reuse
|
|
17
|
+
*
|
|
18
|
+
* Solution:
|
|
19
|
+
* - Track successfully built page entries after each compilation
|
|
20
|
+
* - Restore these entries on dev server restart to maintain module graph continuity
|
|
21
|
+
* - This ensures previously compiled pages can leverage persistent cache for faster builds
|
|
22
|
+
*/ "default", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return HotReloaderRspack;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
29
|
+
const _promises = /*#__PURE__*/ _interop_require_default(require("fs/promises"));
|
|
30
|
+
const _crypto = require("crypto");
|
|
31
|
+
const _hotreloaderwebpack = /*#__PURE__*/ _interop_require_default(require("./hot-reloader-webpack"));
|
|
32
|
+
const _ondemandentryhandler = require("./on-demand-entry-handler");
|
|
33
|
+
const _constants = require("../../shared/lib/constants");
|
|
34
|
+
function _interop_require_default(obj) {
|
|
35
|
+
return obj && obj.__esModule ? obj : {
|
|
36
|
+
default: obj
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
class HotReloaderRspack extends _hotreloaderwebpack.default {
|
|
40
|
+
async afterCompile(multiCompiler) {
|
|
41
|
+
// Always initialize the fallback error watcher for Rspack.
|
|
42
|
+
// Rspack may restore/retain the previous build's error state, so without this
|
|
43
|
+
// a page that previously failed to build might not be rebuilt on the next request.
|
|
44
|
+
await super.buildFallbackError();
|
|
45
|
+
const rspackStartSpan = this.hotReloaderSpan.traceChild('rspack-after-compile');
|
|
46
|
+
await rspackStartSpan.traceAsyncFn(async ()=>{
|
|
47
|
+
const hash = (0, _crypto.createHash)('sha1');
|
|
48
|
+
multiCompiler.compilers.forEach((compiler)=>{
|
|
49
|
+
const cache = compiler.options.cache;
|
|
50
|
+
if (typeof cache === 'object' && 'version' in cache && cache.version) {
|
|
51
|
+
hash.update(cache.version);
|
|
52
|
+
if (compiler.name === _constants.COMPILER_NAMES.client) {
|
|
53
|
+
this.isClientCacheEnabled = true;
|
|
54
|
+
} else if (compiler.name === _constants.COMPILER_NAMES.server) {
|
|
55
|
+
this.isServerCacheEnabled = true;
|
|
56
|
+
} else if (compiler.name === _constants.COMPILER_NAMES.edgeServer) {
|
|
57
|
+
this.isEdgeServerCacheEnabled = true;
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
hash.update('-');
|
|
61
|
+
}
|
|
62
|
+
return undefined;
|
|
63
|
+
});
|
|
64
|
+
this.builtEntriesCachePath = _path.default.join(this.distDir, 'cache', 'rspack', hash.digest('hex').substring(0, 16), 'built-entries.json');
|
|
65
|
+
const hasBuiltEntriesCache = await _promises.default.access(this.builtEntriesCachePath).then(()=>true, ()=>false);
|
|
66
|
+
if (hasBuiltEntriesCache) {
|
|
67
|
+
try {
|
|
68
|
+
const builtEntries = JSON.parse(await _promises.default.readFile(this.builtEntriesCachePath, 'utf-8') || '{}');
|
|
69
|
+
await Promise.all(Object.keys(builtEntries).map(async (entryKey)=>{
|
|
70
|
+
const entryData = builtEntries[entryKey];
|
|
71
|
+
const isEntry = entryData.type === _ondemandentryhandler.EntryTypes.ENTRY;
|
|
72
|
+
const isChildEntry = entryData.type === _ondemandentryhandler.EntryTypes.CHILD_ENTRY;
|
|
73
|
+
// Check if the page was removed or disposed and remove it
|
|
74
|
+
if (isEntry) {
|
|
75
|
+
const pageExists = !entryData.dispose && await _promises.default.access(entryData.absolutePagePath).then(()=>true, ()=>false);
|
|
76
|
+
if (!pageExists) {
|
|
77
|
+
delete builtEntries[entryKey];
|
|
78
|
+
return;
|
|
79
|
+
} else if (!('hash' in builtEntries[entryKey]) || builtEntries[entryKey].hash !== await calculateFileHash(entryData.absolutePagePath)) {
|
|
80
|
+
delete builtEntries[entryKey];
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// For child entries, if it has an entry file and it's gone, remove it
|
|
85
|
+
if (isChildEntry) {
|
|
86
|
+
if (entryData.absoluteEntryFilePath) {
|
|
87
|
+
const pageExists = !entryData.dispose && await _promises.default.access(entryData.absoluteEntryFilePath).then(()=>true, ()=>false);
|
|
88
|
+
if (!pageExists) {
|
|
89
|
+
delete builtEntries[entryKey];
|
|
90
|
+
return;
|
|
91
|
+
} else {
|
|
92
|
+
if (!('hash' in builtEntries[entryKey]) || builtEntries[entryKey].hash !== await calculateFileHash(entryData.absoluteEntryFilePath)) {
|
|
93
|
+
delete builtEntries[entryKey];
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
Object.assign((0, _ondemandentryhandler.getEntries)(multiCompiler.outputPath), builtEntries);
|
|
101
|
+
} catch (error) {
|
|
102
|
+
console.error('Rspack failed to read built entries cache: ', error);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
async ensurePage({ page, clientOnly, appPaths, definition, isApp, url }) {
|
|
108
|
+
await super.ensurePage({
|
|
109
|
+
page,
|
|
110
|
+
clientOnly,
|
|
111
|
+
appPaths,
|
|
112
|
+
definition,
|
|
113
|
+
isApp,
|
|
114
|
+
url
|
|
115
|
+
});
|
|
116
|
+
const entries = (0, _ondemandentryhandler.getEntries)(this.multiCompiler.outputPath);
|
|
117
|
+
const builtEntries = {};
|
|
118
|
+
await Promise.all(Object.keys(entries).map(async (entryName)=>{
|
|
119
|
+
const entry = entries[entryName];
|
|
120
|
+
if (entry.status !== _ondemandentryhandler.BUILT) return;
|
|
121
|
+
const result = /^(client|server|edge-server)@(app|pages|root)@(.*)/g.exec(entryName);
|
|
122
|
+
const [, key /* pageType */ , , ] = result// this match should always happen
|
|
123
|
+
;
|
|
124
|
+
if (key === 'client' && !this.isClientCacheEnabled) return;
|
|
125
|
+
if (key === 'server' && !this.isServerCacheEnabled) return;
|
|
126
|
+
if (key === 'edge-server' && !this.isEdgeServerCacheEnabled) return;
|
|
127
|
+
// TODO: Rspack does not store middleware entries in persistent cache, causing
|
|
128
|
+
// test/integration/middleware-src/test/index.test.ts to fail. This is a temporary
|
|
129
|
+
// workaround to skip middleware entry caching until Rspack properly supports it.
|
|
130
|
+
if (page === '/middleware') {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
let hash;
|
|
134
|
+
if (entry.type === _ondemandentryhandler.EntryTypes.ENTRY) {
|
|
135
|
+
hash = await calculateFileHash(entry.absolutePagePath);
|
|
136
|
+
} else if (entry.absoluteEntryFilePath) {
|
|
137
|
+
hash = await calculateFileHash(entry.absoluteEntryFilePath);
|
|
138
|
+
}
|
|
139
|
+
if (!hash) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
builtEntries[entryName] = entry;
|
|
143
|
+
builtEntries[entryName].hash = hash;
|
|
144
|
+
}));
|
|
145
|
+
const hasBuitEntriesCache = await _promises.default.access(this.builtEntriesCachePath).then(()=>true, ()=>false);
|
|
146
|
+
try {
|
|
147
|
+
if (!hasBuitEntriesCache) {
|
|
148
|
+
await _promises.default.mkdir(_path.default.dirname(this.builtEntriesCachePath), {
|
|
149
|
+
recursive: true
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
await _promises.default.writeFile(this.builtEntriesCachePath, JSON.stringify(builtEntries, null, 2));
|
|
153
|
+
} catch (error) {
|
|
154
|
+
console.error('Rspack failed to write built entries cache: ', error);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
constructor(...args){
|
|
158
|
+
super(...args), this.isClientCacheEnabled = false, this.isServerCacheEnabled = false, this.isEdgeServerCacheEnabled = false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
async function calculateFileHash(filePath, algorithm = 'sha256') {
|
|
162
|
+
if (!await _promises.default.access(filePath).then(()=>true, ()=>false)) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const fileBuffer = await _promises.default.readFile(filePath);
|
|
166
|
+
const hash = (0, _crypto.createHash)(algorithm);
|
|
167
|
+
hash.update(fileBuffer);
|
|
168
|
+
return hash.digest('hex');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
//# sourceMappingURL=hot-reloader-rspack.js.map
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "createHotReloaderTurbopack", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _promises = require("fs/promises");
|
|
12
|
+
const _inspector = /*#__PURE__*/ _interop_require_wildcard(require("inspector"));
|
|
12
13
|
const _path = require("path");
|
|
13
14
|
const _url = require("url");
|
|
14
15
|
const _ws = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/ws"));
|
|
@@ -33,20 +34,20 @@ const _messages = require("./messages");
|
|
|
33
34
|
const _encryptionutilsserver = require("../app-render/encryption-utils-server");
|
|
34
35
|
const _apppageroutedefinition = require("../route-definitions/app-page-route-definition");
|
|
35
36
|
const _apppaths = require("../../shared/lib/router/utils/app-paths");
|
|
36
|
-
const _utils2 = require("../lib/utils");
|
|
37
37
|
const _ismetadataroute = require("../../lib/metadata/is-metadata-route");
|
|
38
38
|
const _patcherrorinspect = require("../patch-error-inspect");
|
|
39
39
|
const _getnexterrorfeedbackmiddleware = require("../../next-devtools/server/get-next-error-feedback-middleware");
|
|
40
|
-
const
|
|
40
|
+
const _utils2 = require("../../shared/lib/turbopack/utils");
|
|
41
41
|
const _getdevoverlayfontmiddleware = require("../../next-devtools/server/font/get-dev-overlay-font-middleware");
|
|
42
42
|
const _devindicatorserverstate = require("./dev-indicator-server-state");
|
|
43
43
|
const _devindicatormiddleware = require("../../next-devtools/server/dev-indicator-middleware");
|
|
44
44
|
const _restartdevservermiddleware = require("../../next-devtools/server/restart-dev-server-middleware");
|
|
45
45
|
const _compilationevents = require("../../shared/lib/turbopack/compilation-events");
|
|
46
|
-
const
|
|
46
|
+
const _utils3 = require("../../build/utils");
|
|
47
47
|
const _receivelogs = require("./browser-logs/receive-logs");
|
|
48
48
|
const _normalizepath = require("../../lib/normalize-path");
|
|
49
49
|
const _devtoolsconfigmiddleware = require("../../next-devtools/server/devtools-config-middleware");
|
|
50
|
+
const _attachnodejsdebuggermiddleware = require("../../next-devtools/server/attach-nodejs-debugger-middleware");
|
|
50
51
|
const _debugchannel = require("./debug-channel");
|
|
51
52
|
const _hotreloadersharedutils = require("./hot-reloader-shared-utils");
|
|
52
53
|
const _getmcpmiddleware = require("../mcp/get-mcp-middleware");
|
|
@@ -55,6 +56,7 @@ const _getpagemetadata = require("../mcp/tools/get-page-metadata");
|
|
|
55
56
|
const _formaterrors = require("../mcp/tools/utils/format-errors");
|
|
56
57
|
const _mcptelemetrytracker = require("../mcp/mcp-telemetry-tracker");
|
|
57
58
|
const _filelogger = require("./browser-logs/file-logger");
|
|
59
|
+
const _serializederrors = require("./serialized-errors");
|
|
58
60
|
function _interop_require_default(obj) {
|
|
59
61
|
return obj && obj.__esModule ? obj : {
|
|
60
62
|
default: obj
|
|
@@ -151,7 +153,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
151
153
|
}
|
|
152
154
|
const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
|
|
153
155
|
const hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
|
154
|
-
version: "16.
|
|
156
|
+
version: "16.1.1"
|
|
155
157
|
});
|
|
156
158
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
157
159
|
// of the current `next dev` invocation.
|
|
@@ -170,7 +172,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
170
172
|
if (nextConfig.experimental.clientRouterFilter) {
|
|
171
173
|
// TODO this need to be set correctly for filesystem cache to work
|
|
172
174
|
}
|
|
173
|
-
const supportedBrowsers = (0,
|
|
175
|
+
const supportedBrowsers = (0, _utils3.getSupportedBrowsers)(projectPath, dev);
|
|
174
176
|
const currentNodeJsVersion = process.versions.node;
|
|
175
177
|
const rootPath = ((_opts_nextConfig_turbopack = opts.nextConfig.turbopack) == null ? void 0 : _opts_nextConfig_turbopack.root) || opts.nextConfig.outputFileTracingRoot || projectPath;
|
|
176
178
|
const project = await bindings.turbo.createProject({
|
|
@@ -202,9 +204,10 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
202
204
|
previewProps: opts.fsChecker.prerenderManifest.preview,
|
|
203
205
|
browserslistQuery: supportedBrowsers.join(', '),
|
|
204
206
|
noMangling: false,
|
|
207
|
+
writeRoutesHashesManifest: false,
|
|
205
208
|
currentNodeJsVersion
|
|
206
209
|
}, {
|
|
207
|
-
persistentCaching: (0,
|
|
210
|
+
persistentCaching: (0, _utils2.isFileSystemCacheEnabledForDev)(opts.nextConfig),
|
|
208
211
|
memoryLimit: (_opts_nextConfig_experimental = opts.nextConfig.experimental) == null ? void 0 : _opts_nextConfig_experimental.turbopackMemoryLimit,
|
|
209
212
|
isShortSession: false
|
|
210
213
|
});
|
|
@@ -409,7 +412,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
409
412
|
try {
|
|
410
413
|
const changed = await changedPromise;
|
|
411
414
|
for await (const change of changed){
|
|
412
|
-
(0,
|
|
415
|
+
(0, _utils2.processIssues)(currentEntryIssues, key, change, false, true);
|
|
413
416
|
// TODO: Get an actual content hash from Turbopack.
|
|
414
417
|
const message = await createMessage(change, String(++hmrHash));
|
|
415
418
|
if (message) {
|
|
@@ -451,7 +454,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
451
454
|
try {
|
|
452
455
|
await subscription.next();
|
|
453
456
|
for await (const data of subscription){
|
|
454
|
-
(0,
|
|
457
|
+
(0, _utils2.processIssues)(state.clientIssues, key, data, false, true);
|
|
455
458
|
if (data.type !== 'issues') {
|
|
456
459
|
sendTurbopackMessage(data);
|
|
457
460
|
}
|
|
@@ -490,7 +493,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
490
493
|
(0, _turbopackutils.processTopLevelIssues)(currentTopLevelIssues, entrypoints);
|
|
491
494
|
// Certain crtical issues prevent any entrypoints from being constructed so return early
|
|
492
495
|
if (!('routes' in entrypoints)) {
|
|
493
|
-
(0,
|
|
496
|
+
(0, _utils3.printBuildErrors)(entrypoints, true);
|
|
494
497
|
currentEntriesHandlingResolve();
|
|
495
498
|
currentEntriesHandlingResolve = undefined;
|
|
496
499
|
continue;
|
|
@@ -603,6 +606,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
603
606
|
});
|
|
604
607
|
}
|
|
605
608
|
}),
|
|
609
|
+
(0, _attachnodejsdebuggermiddleware.getAttachNodejsDebuggerMiddleware)(),
|
|
606
610
|
...nextConfig.experimental.mcpServer ? [
|
|
607
611
|
(0, _getmcpmiddleware.getMcpMiddleware)({
|
|
608
612
|
projectPath,
|
|
@@ -638,14 +642,12 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
638
642
|
return versionInfoCached;
|
|
639
643
|
};
|
|
640
644
|
let devtoolsFrontendUrl;
|
|
641
|
-
const
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
const debugPort = process.debugPort;
|
|
645
|
+
const inspectorURLRaw = _inspector.url();
|
|
646
|
+
if (inspectorURLRaw !== undefined) {
|
|
647
|
+
const inspectorURL = new URL(inspectorURLRaw);
|
|
645
648
|
let debugInfo;
|
|
646
649
|
try {
|
|
647
|
-
|
|
648
|
-
const debugInfoList = await fetch(`http://127.0.0.1:${debugPort}/json/list`).then((res)=>res.json());
|
|
650
|
+
const debugInfoList = await fetch(`http://${inspectorURL.host}/json/list`).then((res)=>res.json());
|
|
649
651
|
debugInfo = debugInfoList[0];
|
|
650
652
|
} catch {}
|
|
651
653
|
if (debugInfo) {
|
|
@@ -720,6 +722,8 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
720
722
|
isLegacyClient: true
|
|
721
723
|
});
|
|
722
724
|
}
|
|
725
|
+
(0, _debugchannel.connectReactDebugChannelForHtmlRequest)(htmlRequestId, sendToClient.bind(null, client));
|
|
726
|
+
(0, _serializederrors.sendSerializedErrorsToClientForHtmlRequest)(htmlRequestId, sendToClient.bind(null, client));
|
|
723
727
|
} else {
|
|
724
728
|
clientsWithoutHtmlRequestId.add(client);
|
|
725
729
|
onUpgrade(client, {
|
|
@@ -854,7 +858,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
854
858
|
for (const issue of entryIssues.values()){
|
|
855
859
|
if (issue.severity !== 'warning') {
|
|
856
860
|
errors.push({
|
|
857
|
-
message: (0,
|
|
861
|
+
message: (0, _utils2.formatIssue)(issue)
|
|
858
862
|
});
|
|
859
863
|
} else {
|
|
860
864
|
(0, _turbopackutils.printNonFatalIssue)(issue);
|
|
@@ -881,9 +885,6 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
881
885
|
devToolsConfig
|
|
882
886
|
};
|
|
883
887
|
sendToClient(client, syncMessage);
|
|
884
|
-
if (htmlRequestId) {
|
|
885
|
-
(0, _debugchannel.connectReactDebugChannelForHtmlRequest)(htmlRequestId, sendToClient.bind(null, client));
|
|
886
|
-
}
|
|
887
888
|
})();
|
|
888
889
|
});
|
|
889
890
|
},
|
|
@@ -946,6 +947,17 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
946
947
|
(0, _debugchannel.connectReactDebugChannel)(requestId, debugChannel, sendToClient.bind(null, client));
|
|
947
948
|
}
|
|
948
949
|
},
|
|
950
|
+
sendErrorsToBrowser (errorsRscStream, htmlRequestId) {
|
|
951
|
+
const client = clientsByHtmlRequestId.get(htmlRequestId);
|
|
952
|
+
if (client) {
|
|
953
|
+
// If the client is connected, we can send the errors immediately.
|
|
954
|
+
(0, _serializederrors.sendSerializedErrorsToClient)(errorsRscStream, sendToClient.bind(null, client));
|
|
955
|
+
} else {
|
|
956
|
+
// Otherwise, store the errors stream so that we can send it when the
|
|
957
|
+
// client connects.
|
|
958
|
+
(0, _serializederrors.setErrorsRscStreamForHtmlRequest)(htmlRequestId, errorsRscStream);
|
|
959
|
+
}
|
|
960
|
+
},
|
|
949
961
|
setHmrServerError (_error) {
|
|
950
962
|
// Not implemented yet.
|
|
951
963
|
},
|
|
@@ -964,11 +976,11 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
964
976
|
...topLevelIssues,
|
|
965
977
|
...thisEntryIssues.values()
|
|
966
978
|
].map((issue)=>{
|
|
967
|
-
const formattedIssue = (0,
|
|
979
|
+
const formattedIssue = (0, _utils2.formatIssue)(issue);
|
|
968
980
|
if (issue.severity === 'warning') {
|
|
969
981
|
(0, _turbopackutils.printNonFatalIssue)(issue);
|
|
970
982
|
return null;
|
|
971
|
-
} else if ((0,
|
|
983
|
+
} else if ((0, _utils2.isWellKnownError)(issue)) {
|
|
972
984
|
_log.error(formattedIssue);
|
|
973
985
|
}
|
|
974
986
|
return Object.defineProperty(new Error(formattedIssue), "__NEXT_ERROR_CODE", {
|
|
@@ -982,7 +994,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
982
994
|
const errors = [];
|
|
983
995
|
for (const issue of topLevelIssues){
|
|
984
996
|
if (issue.severity !== 'warning') {
|
|
985
|
-
errors.push(Object.defineProperty(new Error((0,
|
|
997
|
+
errors.push(Object.defineProperty(new Error((0, _utils2.formatIssue)(issue)), "__NEXT_ERROR_CODE", {
|
|
986
998
|
value: "E394",
|
|
987
999
|
enumerable: false,
|
|
988
1000
|
configurable: true
|
|
@@ -992,7 +1004,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
992
1004
|
for (const entryIssues of currentEntryIssues.values()){
|
|
993
1005
|
for (const issue of entryIssues.values()){
|
|
994
1006
|
if (issue.severity !== 'warning') {
|
|
995
|
-
const message = (0,
|
|
1007
|
+
const message = (0, _utils2.formatIssue)(issue);
|
|
996
1008
|
errors.push(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
|
|
997
1009
|
value: "E394",
|
|
998
1010
|
enumerable: false,
|
|
@@ -1179,10 +1191,10 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
1179
1191
|
for (const [key, issue] of issueMap){
|
|
1180
1192
|
if (issue.severity === 'warning') continue;
|
|
1181
1193
|
if (errorsMap.has(key)) continue;
|
|
1182
|
-
const message = (0,
|
|
1194
|
+
const message = (0, _utils2.formatIssue)(issue);
|
|
1183
1195
|
errorsMap.set(key, {
|
|
1184
1196
|
message,
|
|
1185
|
-
details: issue.detail ? (0,
|
|
1197
|
+
details: issue.detail ? (0, _utils2.renderStyledStringToErrorAnsi)(issue.detail) : undefined
|
|
1186
1198
|
});
|
|
1187
1199
|
}
|
|
1188
1200
|
}
|
|
@@ -44,6 +44,7 @@ var HMR_MESSAGE_SENT_TO_BROWSER = /*#__PURE__*/ function(HMR_MESSAGE_SENT_TO_BRO
|
|
|
44
44
|
HMR_MESSAGE_SENT_TO_BROWSER["REQUEST_PAGE_METADATA"] = "requestPageMetadata";
|
|
45
45
|
// Binary messages:
|
|
46
46
|
HMR_MESSAGE_SENT_TO_BROWSER[HMR_MESSAGE_SENT_TO_BROWSER["REACT_DEBUG_CHUNK"] = 0] = "REACT_DEBUG_CHUNK";
|
|
47
|
+
HMR_MESSAGE_SENT_TO_BROWSER[HMR_MESSAGE_SENT_TO_BROWSER["ERRORS_TO_SHOW_IN_BROWSER"] = 1] = "ERRORS_TO_SHOW_IN_BROWSER";
|
|
47
48
|
return HMR_MESSAGE_SENT_TO_BROWSER;
|
|
48
49
|
}({});
|
|
49
50
|
var HMR_MESSAGE_SENT_TO_SERVER = /*#__PURE__*/ function(HMR_MESSAGE_SENT_TO_SERVER) {
|
|
@@ -23,6 +23,7 @@ _export(exports, {
|
|
|
23
23
|
const _webpack = require("next/dist/compiled/webpack/webpack");
|
|
24
24
|
const _middlewarewebpack = require("./middleware-webpack");
|
|
25
25
|
const _hotmiddleware = require("./hot-middleware");
|
|
26
|
+
const _inspector = /*#__PURE__*/ _interop_require_wildcard(require("inspector"));
|
|
26
27
|
const _path = require("path");
|
|
27
28
|
const _entries = require("../../build/entries");
|
|
28
29
|
const _getstaticinfoincludinglayouts = require("../../build/get-static-info-including-layouts");
|
|
@@ -50,7 +51,6 @@ const _routekind = require("../route-kind");
|
|
|
50
51
|
const _hotreloadertypes = require("./hot-reloader-types");
|
|
51
52
|
const _pagetypes = require("../../lib/page-types");
|
|
52
53
|
const _messages = require("./messages");
|
|
53
|
-
const _utils2 = require("../lib/utils");
|
|
54
54
|
const _getnexterrorfeedbackmiddleware = require("../../next-devtools/server/get-next-error-feedback-middleware");
|
|
55
55
|
const _getdevoverlayfontmiddleware = require("../../next-devtools/server/font/get-dev-overlay-font-middleware");
|
|
56
56
|
const _devindicatormiddleware = require("../../next-devtools/server/dev-indicator-middleware");
|
|
@@ -59,6 +59,7 @@ const _restartdevservermiddleware = require("../../next-devtools/server/restart-
|
|
|
59
59
|
const _cacheinvalidation = require("../../build/webpack/cache-invalidation");
|
|
60
60
|
const _receivelogs = require("./browser-logs/receive-logs");
|
|
61
61
|
const _devtoolsconfigmiddleware = require("../../next-devtools/server/devtools-config-middleware");
|
|
62
|
+
const _attachnodejsdebuggermiddleware = require("../../next-devtools/server/attach-nodejs-debugger-middleware");
|
|
62
63
|
const _invarianterror = require("../../shared/lib/invariant-error");
|
|
63
64
|
const _debugchannel = require("./debug-channel");
|
|
64
65
|
const _hotreloadersharedutils = require("./hot-reloader-shared-utils");
|
|
@@ -66,6 +67,7 @@ const _getmcpmiddleware = require("../mcp/get-mcp-middleware");
|
|
|
66
67
|
const _formaterrors = require("../mcp/tools/utils/format-errors");
|
|
67
68
|
const _mcptelemetrytracker = require("../mcp/mcp-telemetry-tracker");
|
|
68
69
|
const _filelogger = require("./browser-logs/file-logger");
|
|
70
|
+
const _serializederrors = require("./serialized-errors");
|
|
69
71
|
function _interop_require_default(obj) {
|
|
70
72
|
return obj && obj.__esModule ? obj : {
|
|
71
73
|
default: obj
|
|
@@ -231,7 +233,7 @@ class HotReloaderWebpack {
|
|
|
231
233
|
this.previewProps = previewProps;
|
|
232
234
|
this.rewrites = rewrites;
|
|
233
235
|
this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
|
234
|
-
version: "16.
|
|
236
|
+
version: "16.1.1"
|
|
235
237
|
});
|
|
236
238
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
237
239
|
// of the current `next dev` invocation.
|
|
@@ -502,6 +504,7 @@ class HotReloaderWebpack {
|
|
|
502
504
|
});
|
|
503
505
|
if (htmlRequestId) {
|
|
504
506
|
(0, _debugchannel.connectReactDebugChannelForHtmlRequest)(htmlRequestId, this.sendToClient.bind(this, client));
|
|
507
|
+
(0, _serializederrors.sendSerializedErrorsToClientForHtmlRequest)(htmlRequestId, this.sendToClient.bind(this, client));
|
|
505
508
|
if (enableCacheComponents) {
|
|
506
509
|
const status = this.cacheStatusesByRequestId.get(htmlRequestId);
|
|
507
510
|
if (status) {
|
|
@@ -665,15 +668,12 @@ class HotReloaderWebpack {
|
|
|
665
668
|
startSpan.stop() // Stop immediately to create an artificial parent span
|
|
666
669
|
;
|
|
667
670
|
this.versionInfo = await this.tracedGetVersionInfo(startSpan);
|
|
668
|
-
const
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
const debugPort = process.debugPort;
|
|
671
|
+
const inspectorURLRaw = _inspector.url();
|
|
672
|
+
if (inspectorURLRaw !== undefined) {
|
|
673
|
+
const inspectorURL = new URL(inspectorURLRaw);
|
|
672
674
|
let debugInfo;
|
|
673
675
|
try {
|
|
674
|
-
|
|
675
|
-
const debugInfoList = await fetch(`http://127.0.0.1:${debugPort}/json/list`).then((res)=>res.json());
|
|
676
|
-
// There will be only one item for current process, so always get the first item.
|
|
676
|
+
const debugInfoList = await fetch(`http://${inspectorURL.host}/json/list`).then((res)=>res.json());
|
|
677
677
|
debugInfo = debugInfoList[0];
|
|
678
678
|
} catch {}
|
|
679
679
|
if (debugInfo) {
|
|
@@ -947,6 +947,7 @@ class HotReloaderWebpack {
|
|
|
947
947
|
this.activeWebpackConfigs.parallelism = 1;
|
|
948
948
|
await Promise.all(Array.from((0, _webpackconfig.getCacheDirectories)(this.activeWebpackConfigs)).map(_cacheinvalidation.checkFileSystemCacheInvalidationAndCleanup));
|
|
949
949
|
this.multiCompiler = (0, _getwebpackbundler.default)()(this.activeWebpackConfigs);
|
|
950
|
+
await this.afterCompile(this.multiCompiler);
|
|
950
951
|
// Copy over the filesystem so that it is shared between all compilers.
|
|
951
952
|
const inputFileSystem = this.multiCompiler.compilers[0].inputFileSystem;
|
|
952
953
|
for (const compiler of this.multiCompiler.compilers){
|
|
@@ -1199,55 +1200,46 @@ class HotReloaderWebpack {
|
|
|
1199
1200
|
nextConfig: this.config,
|
|
1200
1201
|
...this.config.onDemandEntries
|
|
1201
1202
|
});
|
|
1202
|
-
this.middlewares
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
(
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1203
|
+
this.middlewares.push((0, _middlewarewebpack.getOverlayMiddleware)({
|
|
1204
|
+
rootDirectory: this.dir,
|
|
1205
|
+
isSrcDir: this.isSrcDir,
|
|
1206
|
+
clientStats: ()=>this.clientStats,
|
|
1207
|
+
serverStats: ()=>this.serverStats,
|
|
1208
|
+
edgeServerStats: ()=>this.edgeServerStats
|
|
1209
|
+
}), (0, _middlewarewebpack.getSourceMapMiddleware)({
|
|
1210
|
+
clientStats: ()=>this.clientStats,
|
|
1211
|
+
serverStats: ()=>this.serverStats,
|
|
1212
|
+
edgeServerStats: ()=>this.edgeServerStats
|
|
1213
|
+
}), (0, _getnexterrorfeedbackmiddleware.getNextErrorFeedbackMiddleware)(this.telemetry), (0, _getdevoverlayfontmiddleware.getDevOverlayFontMiddleware)(), (0, _devindicatormiddleware.getDisableDevIndicatorMiddleware)(), (0, _restartdevservermiddleware.getRestartDevServerMiddleware)({
|
|
1214
|
+
telemetry: this.telemetry,
|
|
1215
|
+
webpackCacheDirectories: this.activeWebpackConfigs != null ? (0, _webpackconfig.getCacheDirectories)(this.activeWebpackConfigs) : undefined
|
|
1216
|
+
}), (0, _devtoolsconfigmiddleware.devToolsConfigMiddleware)({
|
|
1217
|
+
distDir: this.distDir,
|
|
1218
|
+
sendUpdateSignal: (data)=>{
|
|
1219
|
+
var // Update the in-memory devToolsConfig value
|
|
1220
|
+
// which will be used for the next onHMR call.
|
|
1221
|
+
_this_webpackHotMiddleware;
|
|
1222
|
+
(_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.updateDevToolsConfig(data);
|
|
1223
|
+
this.send({
|
|
1224
|
+
type: _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.DEVTOOLS_CONFIG,
|
|
1225
|
+
data
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
}), (0, _attachnodejsdebuggermiddleware.getAttachNodejsDebuggerMiddleware)(), ...this.config.experimental.mcpServer ? [
|
|
1229
|
+
(0, _getmcpmiddleware.getMcpMiddleware)({
|
|
1230
|
+
projectPath: this.dir,
|
|
1223
1231
|
distDir: this.distDir,
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
...this.config.experimental.mcpServer ? [
|
|
1236
|
-
(0, _getmcpmiddleware.getMcpMiddleware)({
|
|
1237
|
-
projectPath: this.dir,
|
|
1238
|
-
distDir: this.distDir,
|
|
1239
|
-
nextConfig: this.config,
|
|
1240
|
-
pagesDir: this.pagesDir,
|
|
1241
|
-
appDir: this.appDir,
|
|
1242
|
-
sendHmrMessage: (message)=>this.send(message),
|
|
1243
|
-
getActiveConnectionCount: ()=>{
|
|
1244
|
-
var _this_webpackHotMiddleware;
|
|
1245
|
-
return ((_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.getClientCount()) ?? 0;
|
|
1246
|
-
},
|
|
1247
|
-
getDevServerUrl: ()=>process.env.__NEXT_PRIVATE_ORIGIN
|
|
1248
|
-
})
|
|
1249
|
-
] : []
|
|
1250
|
-
];
|
|
1232
|
+
nextConfig: this.config,
|
|
1233
|
+
pagesDir: this.pagesDir,
|
|
1234
|
+
appDir: this.appDir,
|
|
1235
|
+
sendHmrMessage: (message)=>this.send(message),
|
|
1236
|
+
getActiveConnectionCount: ()=>{
|
|
1237
|
+
var _this_webpackHotMiddleware;
|
|
1238
|
+
return ((_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.getClientCount()) ?? 0;
|
|
1239
|
+
},
|
|
1240
|
+
getDevServerUrl: ()=>process.env.__NEXT_PRIVATE_ORIGIN
|
|
1241
|
+
})
|
|
1242
|
+
] : []);
|
|
1251
1243
|
(0, _formaterrors.setStackFrameResolver)(async (request)=>{
|
|
1252
1244
|
return (0, _middlewarewebpack.getOriginalStackFrames)({
|
|
1253
1245
|
isServer: request.isServer,
|
|
@@ -1261,6 +1253,7 @@ class HotReloaderWebpack {
|
|
|
1261
1253
|
});
|
|
1262
1254
|
});
|
|
1263
1255
|
}
|
|
1256
|
+
async afterCompile(_multiCompiler) {}
|
|
1264
1257
|
invalidate({ reloadAfterInvalidation } = {
|
|
1265
1258
|
reloadAfterInvalidation: false
|
|
1266
1259
|
}) {
|
|
@@ -1344,6 +1337,18 @@ class HotReloaderWebpack {
|
|
|
1344
1337
|
(0, _debugchannel.connectReactDebugChannel)(requestId, debugChannel, this.sendToClient.bind(this, client));
|
|
1345
1338
|
}
|
|
1346
1339
|
}
|
|
1340
|
+
sendErrorsToBrowser(errorsRscStream, htmlRequestId) {
|
|
1341
|
+
var _this_webpackHotMiddleware;
|
|
1342
|
+
const client = (_this_webpackHotMiddleware = this.webpackHotMiddleware) == null ? void 0 : _this_webpackHotMiddleware.getClient(htmlRequestId);
|
|
1343
|
+
if (client) {
|
|
1344
|
+
// If the client is connected, we can send the errors immediately.
|
|
1345
|
+
(0, _serializederrors.sendSerializedErrorsToClient)(errorsRscStream, this.sendToClient.bind(this, client));
|
|
1346
|
+
} else {
|
|
1347
|
+
// Otherwise, store the errors stream so that we can send it when the
|
|
1348
|
+
// client connects.
|
|
1349
|
+
(0, _serializederrors.setErrorsRscStreamForHtmlRequest)(htmlRequestId, errorsRscStream);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1347
1352
|
async ensurePage({ page, clientOnly, appPaths, definition, isApp, url }) {
|
|
1348
1353
|
return this.hotReloaderSpan.traceChild('ensure-page', {
|
|
1349
1354
|
inputPage: page
|
|
@@ -39,9 +39,9 @@ function ignoreLoggingIncomingRequests(request, loggingConfig) {
|
|
|
39
39
|
// If array of RegExp, ignore if any pattern matches
|
|
40
40
|
return ignore.some((pattern)=>pattern.test(request.url));
|
|
41
41
|
}
|
|
42
|
-
function logRequests(request, response, loggingConfig, requestStartTime, requestEndTime, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd) {
|
|
42
|
+
function logRequests(request, response, loggingConfig, requestStartTime, requestEndTime, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd, devGenerateStaticParamsDuration) {
|
|
43
43
|
if (!ignoreLoggingIncomingRequests(request, loggingConfig)) {
|
|
44
|
-
logIncomingRequests(request, requestStartTime, requestEndTime, response.statusCode, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd);
|
|
44
|
+
logIncomingRequests(request, requestStartTime, requestEndTime, response.statusCode, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd, devGenerateStaticParamsDuration);
|
|
45
45
|
}
|
|
46
46
|
if (request.fetchMetrics) {
|
|
47
47
|
for (const fetchMetric of request.fetchMetrics){
|
|
@@ -49,7 +49,7 @@ function logRequests(request, response, loggingConfig, requestStartTime, request
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function logIncomingRequests(request, requestStartTime, requestEndTime, statusCode, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd) {
|
|
52
|
+
function logIncomingRequests(request, requestStartTime, requestEndTime, statusCode, devRequestTimingMiddlewareStart, devRequestTimingMiddlewareEnd, devRequestTimingInternalsEnd, devGenerateStaticParamsDuration) {
|
|
53
53
|
const isRSC = (0, _requestmeta.getRequestMeta)(request, 'isRSCRequest');
|
|
54
54
|
const url = isRSC ? (0, _url.stripNextRscUnionQuery)(request.url) : request.url;
|
|
55
55
|
const statusCodeColor = statusCode < 200 ? _picocolors.white : statusCode < 300 ? _picocolors.green : statusCode < 400 ? _picocolors.blue : statusCode < 500 ? _picocolors.yellow : _picocolors.red;
|
|
@@ -74,6 +74,14 @@ function logIncomingRequests(request, requestStartTime, requestEndTime, statusCo
|
|
|
74
74
|
'compile',
|
|
75
75
|
frameworkTime
|
|
76
76
|
]);
|
|
77
|
+
// Insert after compile, before render based on the execution order.
|
|
78
|
+
if (devGenerateStaticParamsDuration) {
|
|
79
|
+
// Pages Router getStaticPaths are technically "generate params" as well.
|
|
80
|
+
times.push([
|
|
81
|
+
'generate-params',
|
|
82
|
+
devGenerateStaticParamsDuration
|
|
83
|
+
]);
|
|
84
|
+
}
|
|
77
85
|
times.push([
|
|
78
86
|
'render',
|
|
79
87
|
requestEndTime - devRequestTimingInternalsEnd
|
|
@@ -26,6 +26,16 @@ const FAST_REFRESH_RUNTIME_RELOAD = 'Fast Refresh had to perform a full reload d
|
|
|
26
26
|
const textEncoder = new TextEncoder();
|
|
27
27
|
function createBinaryHmrMessageData(message) {
|
|
28
28
|
switch(message.type){
|
|
29
|
+
case _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER:
|
|
30
|
+
{
|
|
31
|
+
const { serializedErrors } = message;
|
|
32
|
+
const totalLength = 1 + serializedErrors.length;
|
|
33
|
+
const data = new Uint8Array(totalLength);
|
|
34
|
+
const view = new DataView(data.buffer);
|
|
35
|
+
view.setUint8(0, _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.ERRORS_TO_SHOW_IN_BROWSER);
|
|
36
|
+
data.set(serializedErrors, 1);
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
29
39
|
case _hotreloadertypes.HMR_MESSAGE_SENT_TO_BROWSER.REACT_DEBUG_CHUNK:
|
|
30
40
|
{
|
|
31
41
|
const { requestId, chunk } = message;
|