failproofai 0.0.10 → 0.0.11-beta.1
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +7 -7
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js +4 -4
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/_not-found/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +4 -4
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +16 -16
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +4 -4
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/policies/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/policies/page.js +4 -4
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/project/[name]/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js +4 -4
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +4 -4
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/build-manifest.json +4 -4
- package/.next/standalone/.next/server/app/projects/page/next-font-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js +4 -4
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d_ob4n._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__044xt9.._.js → [root-of-the-server]__0fwb7ao._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g48iv.._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0j8-xkl._.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0bdfoky.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_05pz9._._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-wn51s._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__098zro9._.js +19 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ye1w50._.js → [root-of-the-server]__09i-rsi._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__02r.cjq._.js → [root-of-the-server]__09v.ljl._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0agrcb8._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b7hkr~._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ehh6vp._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g8l0tu._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j4l6hl._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lp08ll._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0n0yaqw._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0o21f.o._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t8juvy._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__10xgshr._.js → [root-of-the-server]__0tcyn68._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0podumr._.js → [root-of-the-server]__0uylufv._.js} +3 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ymlddl._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~03grs._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0l6swv1._.js → [root-of-the-server]__101v4_7._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12y7xmt._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/lib_utils_ts_068jk73._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_0ttbz1~._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_06u0kr8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0h9llsw._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0a_7sdg.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ef3uwk.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0j79~gv.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pbja1x.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0r6o0i2.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11y81~_.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12or2kf.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mebn66._.js +1 -1
- package/.next/standalone/.next/server/functions-config-manifest.json +2 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +7 -7
- package/.next/standalone/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/.next/server/next-font-manifest.json +6 -6
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +9 -9
- package/.next/standalone/.next/static/chunks/{0ml1.ck_5t36i.js → 03xhjwk6zhi8f.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0pkl..xgo-qox.js → 07kfzzinhsl7e.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0lt8ko3lw.5yt.js → 0_vk1wsgf~q3o.js} +1 -1
- package/.next/standalone/.next/static/chunks/0a40sy4tk8ioe.js +1 -0
- package/.next/standalone/.next/static/chunks/0f5p9plm.aqlp.css +2 -0
- package/.next/standalone/.next/static/chunks/0ffvlbgzgnlw7.js +2 -0
- package/.next/standalone/.next/static/chunks/{150i0n26fnvso.js → 0n1n67imq.udf.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0kqar56yl~41o.js → 0wq808vlc8l04.js} +2 -2
- package/.next/standalone/.next/static/chunks/{179yytvmam0ug.js → 0wtiofzdt-l2u.js} +1 -1
- package/.next/standalone/.next/static/chunks/{12l2t63hkyo2q.js → 0zg~cpc5ysg6d.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0j171xiqge4rv.js → 13-bt.3~irg00.js} +1 -1
- package/.next/standalone/.next/static/chunks/{14lii11wmo450.js → 16vev.do1oho7.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0rnqmir4cd5p9.js → 17mubwtqwijpu.js} +1 -1
- package/.next/standalone/.next/static/chunks/{turbopack-05z7a19q43zfq.js → turbopack-0nh.aopesgj~5.js} +1 -1
- package/.next/standalone/.next/static/media/4fa387ec64143e14-s.0.qu-9752pffj.woff2 +0 -0
- package/.next/standalone/.next/static/media/5ce348bf30bf5439-s.0ee55_hj9qcer.woff2 +0 -0
- package/.next/standalone/.next/static/media/6306c77e7c8268e4-s.0mao5jbfbduzp.woff2 +0 -0
- package/.next/standalone/.next/static/media/797e433ab948586e-s.p.09zddjkbdep5a.woff2 +0 -0
- package/.next/standalone/.next/static/media/7d817b4c03b0c5f1-s.0uzt.a6d44yda.woff2 +0 -0
- package/.next/standalone/.next/static/media/bbc41e54d2fcbd21-s.0mvwgmnhv29no.woff2 +0 -0
- package/.next/standalone/.next/static/{dAuQps6jUwCz9X1Q5FFOO → s5Nn6KwDdLpPhjG3l2WNf}/_clientMiddlewareManifest.js +2 -2
- package/.next/standalone/app/policies/hooks-client.tsx +9 -1
- package/.next/standalone/components/navbar.tsx +1 -1
- package/.next/standalone/components/reach-developers.tsx +2 -2
- package/.next/standalone/node_modules/@next/env/package.json +1 -1
- package/.next/standalone/node_modules/next/dist/build/static-paths/app.js +2 -1
- package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/.next/standalone/node_modules/next/dist/build/utils.js +2 -1
- package/.next/standalone/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +2 -2
- package/.next/standalone/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +8 -2
- package/.next/standalone/node_modules/next/dist/client/route-params.js +23 -6
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +13 -13
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +11 -11
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +2 -2
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +10 -10
- package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/.next/standalone/node_modules/next/dist/server/app-render/action-handler.js +3 -6
- package/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +62 -9
- package/.next/standalone/node_modules/next/dist/server/app-render/collect-segment-data.js +16 -0
- package/.next/standalone/node_modules/next/dist/server/app-render/create-component-tree.js +49 -19
- package/.next/standalone/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +8 -20
- package/.next/standalone/node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +8 -7
- package/.next/standalone/node_modules/next/dist/server/app-render/use-flight-response.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/async-storage/work-store.js +2 -1
- package/.next/standalone/node_modules/next/dist/server/base-server.js +13 -5
- package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/static-paths-worker.js +2 -1
- package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +22 -2
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/is-rsc-request.js +18 -0
- package/.next/standalone/node_modules/next/dist/server/lib/mock-request.js +30 -5
- package/.next/standalone/node_modules/next/dist/server/lib/patch-set-header.js +7 -0
- package/.next/standalone/node_modules/next/dist/server/lib/router-server.js +6 -3
- package/.next/standalone/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +18 -4
- package/.next/standalone/node_modules/next/dist/server/lib/server-ipc/utils.js +3 -1
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/next-server.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/request/fallback-params.js +27 -1
- package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/module.js +1 -0
- package/.next/standalone/node_modules/next/dist/server/route-modules/route-module.js +11 -1
- package/.next/standalone/node_modules/next/dist/server/server-utils.js +19 -2
- package/.next/standalone/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +5 -5
- package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/web/adapter.js +4 -1
- package/.next/standalone/node_modules/next/dist/server/web/edge-route-module-wrapper.js +2 -1
- package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/.next/standalone/node_modules/next/dist/{server → shared/lib}/htmlescape.js +15 -0
- package/.next/standalone/node_modules/next/dist/shared/lib/router/routes/app.js +13 -1
- package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +56 -10
- package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/.next/standalone/node_modules/next/package.json +15 -15
- package/.next/standalone/node_modules/react/cjs/react.development.js +1 -1
- package/.next/standalone/node_modules/react/cjs/react.production.js +1 -1
- package/.next/standalone/node_modules/react/package.json +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +3 -3
- package/.next/standalone/node_modules/react-dom/cjs/react-dom.production.js +1 -1
- package/.next/standalone/node_modules/react-dom/package.json +2 -2
- package/.next/standalone/package.json +5 -5
- package/.next/standalone/proxy.ts +1 -1
- package/.next/standalone/server.js +1 -1
- package/README.md +2 -2
- package/bin/failproofai.mjs +1 -1
- package/dist/cli.mjs +5 -5
- package/package.json +5 -5
- package/scripts/launch.ts +1 -1
- package/src/hooks/builtin-policies.ts +1 -1
- package/src/hooks/policy-evaluator.ts +3 -3
- package/src/hooks/policy-registry.ts +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0609ezh._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07_-mkc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09z7o2x._.js +0 -19
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0_sh2n0._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e9o9ri._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0logebz._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mi5ejy._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0odijkc._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rkxer-._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rl2kwi._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vg0uey._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0x5limi._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__10._f0s._.js +0 -4
- package/.next/standalone/.next/static/chunks/01q52wg_amm60.js +0 -2
- package/.next/standalone/.next/static/chunks/0zig0fh30t6ou.js +0 -1
- package/.next/standalone/.next/static/chunks/17rm86uz2nd5a.css +0 -2
- package/.next/standalone/.next/static/media/4fa387ec64143e14-s.0q3udbd2bu5yp.woff2 +0 -0
- package/.next/standalone/.next/static/media/797e433ab948586e-s.p.0.q-h669a_dqa.woff2 +0 -0
- package/.next/standalone/.next/static/media/bbc41e54d2fcbd21-s.0gw~uztddq1df.woff2 +0 -0
- /package/.next/standalone/.next/static/{dAuQps6jUwCz9X1Q5FFOO → s5Nn6KwDdLpPhjG3l2WNf}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{dAuQps6jUwCz9X1Q5FFOO → s5Nn6KwDdLpPhjG3l2WNf}/_ssgManifest.js +0 -0
|
@@ -72,7 +72,7 @@ async function fetchPkgInfo(pkg) {
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
const data = await res.json();
|
|
75
|
-
const versionData = data.versions["16.2.
|
|
75
|
+
const versionData = data.versions["16.2.6"];
|
|
76
76
|
return {
|
|
77
77
|
os: versionData.os,
|
|
78
78
|
cpu: versionData.cpu,
|
|
@@ -100,7 +100,7 @@ async function patchIncorrectLockfile(dir) {
|
|
|
100
100
|
const expectedSwcPkgs = Object.keys(_packagejson.optionalDependencies || {}).filter((pkg)=>pkg.startsWith('@next/swc-'));
|
|
101
101
|
const patchDependency = (pkg, pkgData)=>{
|
|
102
102
|
lockfileParsed.dependencies[pkg] = {
|
|
103
|
-
version: "16.2.
|
|
103
|
+
version: "16.2.6",
|
|
104
104
|
resolved: pkgData.tarball,
|
|
105
105
|
integrity: pkgData.integrity,
|
|
106
106
|
optional: true
|
|
@@ -108,7 +108,7 @@ async function patchIncorrectLockfile(dir) {
|
|
|
108
108
|
};
|
|
109
109
|
const patchPackage = (pkg, pkgData)=>{
|
|
110
110
|
lockfileParsed.packages[pkg] = {
|
|
111
|
-
version: "16.2.
|
|
111
|
+
version: "16.2.6",
|
|
112
112
|
resolved: pkgData.tarball,
|
|
113
113
|
integrity: pkgData.integrity,
|
|
114
114
|
cpu: pkgData.cpu,
|
|
@@ -47,6 +47,7 @@ const _revalidationutils = require("../revalidation-utils");
|
|
|
47
47
|
const _requestmeta = require("../request-meta");
|
|
48
48
|
const _setcachebustingsearchparam = require("../../client/components/router-reducer/set-cache-busting-search-param");
|
|
49
49
|
const _actionrevalidationkind = require("../../shared/lib/action-revalidation-kind");
|
|
50
|
+
const _cachebustingsearchparam = require("../../shared/lib/router/utils/cache-busting-search-param");
|
|
50
51
|
function _interop_require_default(obj) {
|
|
51
52
|
return obj && obj.__esModule ? obj : {
|
|
52
53
|
default: obj
|
|
@@ -265,12 +266,8 @@ async function createRedirectRenderResult(req, res, originalHost, redirectUrl, r
|
|
|
265
266
|
forwardedHeaders.delete(_approuterheaders.ACTION_HEADER);
|
|
266
267
|
try {
|
|
267
268
|
var _response_headers_get;
|
|
268
|
-
(0,
|
|
269
|
-
|
|
270
|
-
[_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: forwardedHeaders.get(_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER) ?? undefined,
|
|
271
|
-
[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER]: forwardedHeaders.get(_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER) ?? undefined,
|
|
272
|
-
[_approuterheaders.NEXT_URL]: forwardedHeaders.get(_approuterheaders.NEXT_URL) ?? undefined
|
|
273
|
-
});
|
|
269
|
+
const cacheBustingSearchParam = await (0, _cachebustingsearchparam.computeCacheBustingSearchParam)(forwardedHeaders.get(_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER) ? '1' : undefined, forwardedHeaders.get(_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER) ?? undefined, forwardedHeaders.get(_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER) ?? undefined, forwardedHeaders.get(_approuterheaders.NEXT_URL) ?? undefined);
|
|
270
|
+
(0, _setcachebustingsearchparam.setCacheBustingSearchParamWithHash)(fetchUrl, cacheBustingSearchParam);
|
|
274
271
|
const response = await fetch(fetchUrl, {
|
|
275
272
|
method: 'GET',
|
|
276
273
|
headers: forwardedHeaders,
|
|
@@ -17,6 +17,7 @@ const _internalutils = require("../internal-utils");
|
|
|
17
17
|
const _approuterheaders = require("../../client/components/app-router-headers");
|
|
18
18
|
const _metadatacontext = require("../../lib/metadata/metadata-context");
|
|
19
19
|
const _requeststore = require("../async-storage/request-store");
|
|
20
|
+
const _isrscrequest = require("../lib/is-rsc-request");
|
|
20
21
|
const _workstore = require("../async-storage/work-store");
|
|
21
22
|
const _httpaccessfallback = require("../../client/components/http-access-fallback/http-access-fallback");
|
|
22
23
|
const _redirect = require("../../client/components/redirect");
|
|
@@ -158,7 +159,7 @@ function parseRequestHeaders(headers, options) {
|
|
|
158
159
|
const isPrefetchRequest = headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER] === '1';
|
|
159
160
|
const isRuntimePrefetchRequest = headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER] === '2';
|
|
160
161
|
const isHmrRefresh = headers[_approuterheaders.NEXT_HMR_REFRESH_HEADER] !== undefined;
|
|
161
|
-
const isRSCRequest = headers[_approuterheaders.RSC_HEADER]
|
|
162
|
+
const isRSCRequest = (0, _isrscrequest.isRSCRequestHeader)(headers[_approuterheaders.RSC_HEADER]);
|
|
162
163
|
const shouldProvideFlightRouterState = isRSCRequest && (!isPrefetchRequest || !options.isRoutePPREnabled);
|
|
163
164
|
const flightRouterState = shouldProvideFlightRouterState ? (0, _parseandvalidateflightrouterstate.parseAndValidateFlightRouterState)(headers[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER]) : undefined;
|
|
164
165
|
// Checks if this is a prefetch of the Route Tree by the Segment Cache
|
|
@@ -252,6 +253,29 @@ function createNotFoundLoaderTree(loaderTree) {
|
|
|
252
253
|
null
|
|
253
254
|
];
|
|
254
255
|
}
|
|
256
|
+
function hasPrerenderHTTPErrorBoundary(loaderTree, triggeredStatus, authInterrupts) {
|
|
257
|
+
switch(triggeredStatus){
|
|
258
|
+
case 404:
|
|
259
|
+
return !!loaderTree[2]['not-found'];
|
|
260
|
+
case 403:
|
|
261
|
+
return authInterrupts && !!loaderTree[2].forbidden;
|
|
262
|
+
case 401:
|
|
263
|
+
return authInterrupts && !!loaderTree[2].unauthorized;
|
|
264
|
+
default:
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function findPrerenderHTTPErrorBoundaryTree(loaderTree, triggeredStatus, authInterrupts) {
|
|
269
|
+
let boundaryTree = hasPrerenderHTTPErrorBoundary(loaderTree, triggeredStatus, authInterrupts) ? loaderTree : null;
|
|
270
|
+
const childrenTree = loaderTree[1].children;
|
|
271
|
+
if (childrenTree) {
|
|
272
|
+
const deeperBoundaryTree = findPrerenderHTTPErrorBoundaryTree(childrenTree, triggeredStatus, authInterrupts);
|
|
273
|
+
if (deeperBoundaryTree) {
|
|
274
|
+
boundaryTree = deeperBoundaryTree;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return boundaryTree;
|
|
278
|
+
}
|
|
255
279
|
/**
|
|
256
280
|
* Returns a function that parses the dynamic segment and return the associated value.
|
|
257
281
|
*/ function makeGetDynamicParamFromSegment(interpolatedParams, fallbackRouteParams, optimisticRouting) {
|
|
@@ -940,7 +964,7 @@ function getRenderedSearch(query) {
|
|
|
940
964
|
// This is the data necessary to render <AppRouter /> when no SSR errors are encountered
|
|
941
965
|
async function getRSCPayload(tree, ctx, options) {
|
|
942
966
|
var _ctx_renderOpts_prefetchHints;
|
|
943
|
-
const { is404, staleTimeIterable, staticStageByteLengthPromise, runtimePrefetchStream } = options;
|
|
967
|
+
const { is404, prerenderHTTPError, staleTimeIterable, staticStageByteLengthPromise, runtimePrefetchStream } = options;
|
|
944
968
|
const injectedCSS = new Set();
|
|
945
969
|
const injectedJS = new Set();
|
|
946
970
|
const injectedFontPreloadTags = new Set();
|
|
@@ -984,7 +1008,8 @@ async function getRSCPayload(tree, ctx, options) {
|
|
|
984
1008
|
missingSlots,
|
|
985
1009
|
preloadCallbacks,
|
|
986
1010
|
authInterrupts: ctx.renderOpts.experimental.authInterrupts,
|
|
987
|
-
MetadataOutlet
|
|
1011
|
+
MetadataOutlet,
|
|
1012
|
+
prerenderHTTPError
|
|
988
1013
|
});
|
|
989
1014
|
// When the `vary` response header is present with `Next-URL`, that means there's a chance
|
|
990
1015
|
// it could respond differently if there's an interception route. We provide this information
|
|
@@ -1589,6 +1614,7 @@ const renderToHTMLOrFlight = (req, res, pagePath, query, fallbackRouteParams, re
|
|
|
1589
1614
|
// @TODO move to workUnitStore of type Request
|
|
1590
1615
|
isPrefetchRequest,
|
|
1591
1616
|
buildId: sharedContext.buildId,
|
|
1617
|
+
deploymentId: sharedContext.deploymentId,
|
|
1592
1618
|
previouslyRevalidatedTags,
|
|
1593
1619
|
nonce
|
|
1594
1620
|
});
|
|
@@ -3199,6 +3225,7 @@ async function validateInstantConfigInBuildWithSample(outerCtx, sample, allPossi
|
|
|
3199
3225
|
isDraftMode: false,
|
|
3200
3226
|
isPrefetchRequest: false,
|
|
3201
3227
|
buildId: outerWorkStore.buildId,
|
|
3228
|
+
deploymentId: outerWorkStore.deploymentId,
|
|
3202
3229
|
reactLoadableManifest: outerWorkStore.reactLoadableManifest,
|
|
3203
3230
|
assetPrefix: outerWorkStore.assetPrefix,
|
|
3204
3231
|
nonce: outerWorkStore.nonce,
|
|
@@ -4285,11 +4312,35 @@ async function prerenderToStream(req, res, ctx, metadata, tree, fallbackRoutePar
|
|
|
4285
4312
|
...(prerenderStore == null ? void 0 : prerenderStore.tags) || implicitTags.tags
|
|
4286
4313
|
]
|
|
4287
4314
|
};
|
|
4288
|
-
|
|
4289
|
-
|
|
4315
|
+
let prerenderHTTPError;
|
|
4316
|
+
if (cacheComponents && (0, _httpaccessfallback.isHTTPAccessFallbackError)(err)) {
|
|
4317
|
+
const triggeredStatus = (0, _httpaccessfallback.getAccessFallbackHTTPStatus)(err);
|
|
4318
|
+
const boundaryTree = findPrerenderHTTPErrorBoundaryTree(tree, triggeredStatus, ctx.renderOpts.experimental.authInterrupts);
|
|
4319
|
+
if (boundaryTree) {
|
|
4320
|
+
prerenderHTTPError = {
|
|
4321
|
+
boundaryTree,
|
|
4322
|
+
triggeredStatus
|
|
4323
|
+
};
|
|
4324
|
+
}
|
|
4325
|
+
}
|
|
4326
|
+
const errorRSCPayload = prerenderHTTPError ? await _workunitasyncstorageexternal.workUnitAsyncStorage.run(prerenderLegacyStore, getRSCPayload, tree, ctx, {
|
|
4327
|
+
is404: errorType === 'not-found',
|
|
4328
|
+
prerenderHTTPError
|
|
4329
|
+
}) : await _workunitasyncstorageexternal.workUnitAsyncStorage.run(prerenderLegacyStore, getErrorRSCPayload, tree, ctx, reactServerErrorsByDigest.has(err.digest) ? undefined : err, errorType);
|
|
4330
|
+
const errorServerStreamRaw = _workunitasyncstorageexternal.workUnitAsyncStorage.run(prerenderLegacyStore, _streamops.renderToFlightStream, ComponentMod, errorRSCPayload, clientModules, {
|
|
4290
4331
|
filterStackFrame,
|
|
4291
4332
|
onError: serverComponentsErrorHandler
|
|
4292
4333
|
});
|
|
4334
|
+
let errorServerStream = errorServerStreamRaw;
|
|
4335
|
+
const errorFlightResultPromise = prerenderHTTPError ? (()=>{
|
|
4336
|
+
// Fizz still needs to read the Flight stream to render ErrorApp, but
|
|
4337
|
+
// the prerender path also needs a buffered Flight result for the HTML
|
|
4338
|
+
// prelude and segment data collectors. Tee the stream so each consumer
|
|
4339
|
+
// gets its own copy.
|
|
4340
|
+
const [appStream, flightStream] = errorServerStreamRaw.tee();
|
|
4341
|
+
errorServerStream = appStream;
|
|
4342
|
+
return (0, _apprenderprerenderutils.createReactServerPrerenderResultFromRender)(flightStream);
|
|
4343
|
+
})() : null;
|
|
4293
4344
|
try {
|
|
4294
4345
|
const { stream: errorHtmlStream } = await _workunitasyncstorageexternal.workUnitAsyncStorage.run(prerenderLegacyStore, _streamops.renderToFizzStream, // eslint-disable-next-line @next/internal/no-ambiguous-jsx
|
|
4295
4346
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(ErrorApp, {
|
|
@@ -4305,14 +4356,16 @@ async function prerenderToStream(req, res, ctx, metadata, tree, fallbackRoutePar
|
|
|
4305
4356
|
],
|
|
4306
4357
|
formState
|
|
4307
4358
|
});
|
|
4359
|
+
const resolvedFlightResult = errorFlightResultPromise ? await errorFlightResultPromise : reactServerPrerenderResult;
|
|
4360
|
+
if (errorFlightResultPromise) {
|
|
4361
|
+
reactServerPrerenderResult.consume();
|
|
4362
|
+
}
|
|
4308
4363
|
if (shouldGenerateStaticFlightData(workStore)) {
|
|
4309
|
-
const flightData = await (0, _streamops.streamToBuffer)(
|
|
4364
|
+
const flightData = await (0, _streamops.streamToBuffer)(resolvedFlightResult.asStream());
|
|
4310
4365
|
metadata.flightData = flightData;
|
|
4311
4366
|
await collectSegmentData(flightData, prerenderLegacyStore, ComponentMod, renderOpts, ctx.pagePath, metadata);
|
|
4312
4367
|
}
|
|
4313
|
-
|
|
4314
|
-
// render rather than the flight data from the error page render
|
|
4315
|
-
const flightStream = reactServerPrerenderResult.consumeAsStream();
|
|
4368
|
+
const flightStream = resolvedFlightResult.consumeAsStream();
|
|
4316
4369
|
return {
|
|
4317
4370
|
digestErrorsMap: reactServerErrorsByDigest,
|
|
4318
4371
|
ssrErrors: allCapturedErrors,
|
|
@@ -121,8 +121,24 @@ async function collectSegmentData(isCacheComponentsEnabled, fullPageDataBuffer,
|
|
|
121
121
|
// Now that we've finished rendering the route tree, all the segment tasks
|
|
122
122
|
// should have been spawned. Await them in parallel and write the segment
|
|
123
123
|
// prefetches to the result map.
|
|
124
|
+
let hasPageSegment = false;
|
|
124
125
|
for (const [segmentPath, buffer] of (await Promise.all(segmentTasks))){
|
|
125
126
|
resultMap.set(segmentPath, buffer);
|
|
127
|
+
if (segmentPath.endsWith('__PAGE__')) {
|
|
128
|
+
hasPageSegment = true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (!hasPageSegment) {
|
|
132
|
+
// The build requires at least one segment path ending with __PAGE__ to
|
|
133
|
+
// register the catch-all segment data route. When all page segments are
|
|
134
|
+
// disabled (e.g. every leaf has runtime prefetching), no __PAGE__ entry
|
|
135
|
+
// is emitted. Write a dummy entry with a path that doesn't match any
|
|
136
|
+
// real route segment so the client will never request it.
|
|
137
|
+
//
|
|
138
|
+
// TODO: Remove the __PAGE__ requirement from the build instead of
|
|
139
|
+
// working around it here. The invariant is outdated now that segments
|
|
140
|
+
// can be disabled.
|
|
141
|
+
resultMap.set('/todo-remove-fake-segment/__PAGE__', Buffer.alloc(0));
|
|
126
142
|
}
|
|
127
143
|
return resultMap;
|
|
128
144
|
}
|
|
@@ -51,7 +51,7 @@ function errorMissingDefaultExport(pagePath, convention) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
const cacheNodeKey = 'c';
|
|
54
|
-
async function createComponentTreeInternal({ loaderTree: tree, parentParams, parentOptionalCatchAllParamName, parentRuntimePrefetchable, rootLayoutIncluded, injectedCSS, injectedJS, injectedFontPreloadTags, ctx, missingSlots, preloadCallbacks, authInterrupts, MetadataOutlet }, isRoot) {
|
|
54
|
+
async function createComponentTreeInternal({ loaderTree: tree, parentParams, parentOptionalCatchAllParamName, parentRuntimePrefetchable, rootLayoutIncluded, injectedCSS, injectedJS, injectedFontPreloadTags, ctx, missingSlots, preloadCallbacks, authInterrupts, MetadataOutlet, prerenderHTTPError }, isRoot) {
|
|
55
55
|
const { renderOpts: { nextConfigOutput, experimental, cacheComponents }, workStore, componentMod: { createElement, Fragment, SegmentViewNode, HTTPAccessFallbackBoundary, LayoutRouter, RenderFromTemplateContext, ClientPageRoot, ClientSegmentRoot, createServerSearchParamsForServerPage, createPrerenderSearchParamsForClientPage, createServerParamsForServerSegment, createPrerenderParamsForClientSegment, serverHooks: { DynamicServerError }, Postpone }, pagePath, getDynamicParamFromSegment, isPrefetch, query } = ctx;
|
|
56
56
|
const { page, conventionPath, segment, modules, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
|
|
57
57
|
const { layout, template, error, loading, 'not-found': notFound, forbidden, unauthorized } = modules;
|
|
@@ -382,24 +382,54 @@ async function createComponentTreeInternal({ loaderTree: tree, parentParams, par
|
|
|
382
382
|
missingSlots.add(parallelRouteKey);
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
385
|
+
// The outer prerender catch already found the deepest segment whose
|
|
386
|
+
// HTTP fallback should replace the throwing page. When we reach that
|
|
387
|
+
// segment's `children` slot, render the fallback directly instead of
|
|
388
|
+
// descending back into the subtree that threw during deserialization.
|
|
389
|
+
// Like the other segment-level boundary props below, HTTP access
|
|
390
|
+
// fallbacks are attached to the default `children` slot, not to named
|
|
391
|
+
// parallel routes.
|
|
392
|
+
const shouldRenderPrerenderHTTPFallback = (prerenderHTTPError == null ? void 0 : prerenderHTTPError.boundaryTree) === tree && isChildrenRouteKey;
|
|
393
|
+
if (shouldRenderPrerenderHTTPFallback) {
|
|
394
|
+
let fallbackElement;
|
|
395
|
+
switch(prerenderHTTPError.triggeredStatus){
|
|
396
|
+
case 404:
|
|
397
|
+
fallbackElement = notFoundElement;
|
|
398
|
+
break;
|
|
399
|
+
case 403:
|
|
400
|
+
fallbackElement = forbiddenElement;
|
|
401
|
+
break;
|
|
402
|
+
case 401:
|
|
403
|
+
fallbackElement = unauthorizedElement;
|
|
404
|
+
break;
|
|
405
|
+
default:
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
if (fallbackElement) {
|
|
409
|
+
childCacheNodeSeedData = createSeedData(ctx, fallbackElement, {}, null, isPossiblyPartialResponse, false, _varyparams.emptyVaryParamsAccumulator);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
if (childCacheNodeSeedData === null) {
|
|
413
|
+
const seedData = await createComponentTreeInternal({
|
|
414
|
+
loaderTree: parallelRoute,
|
|
415
|
+
parentParams: currentParams,
|
|
416
|
+
parentOptionalCatchAllParamName: optionalCatchAllParamName,
|
|
417
|
+
parentRuntimePrefetchable: isRuntimePrefetchable,
|
|
418
|
+
rootLayoutIncluded: rootLayoutIncludedAtThisLevelOrAbove,
|
|
419
|
+
injectedCSS: injectedCSSWithCurrentLayout,
|
|
420
|
+
injectedJS: injectedJSWithCurrentLayout,
|
|
421
|
+
injectedFontPreloadTags: injectedFontPreloadTagsWithCurrentLayout,
|
|
422
|
+
ctx,
|
|
423
|
+
missingSlots,
|
|
424
|
+
preloadCallbacks,
|
|
425
|
+
authInterrupts,
|
|
426
|
+
// `StreamingMetadataOutlet` is used to conditionally throw. In the case of parallel routes we will have more than one page
|
|
427
|
+
// but we only want to throw on the first one.
|
|
428
|
+
MetadataOutlet: isChildrenRouteKey ? MetadataOutlet : null,
|
|
429
|
+
prerenderHTTPError
|
|
430
|
+
}, false);
|
|
431
|
+
childCacheNodeSeedData = seedData;
|
|
432
|
+
}
|
|
403
433
|
}
|
|
404
434
|
const templateNode = createElement(Template, null, createElement(RenderFromTemplateContext, null));
|
|
405
435
|
const templateFilePath = (0, _segmentexplorerpath.getConventionPathByType)(tree, dir, 'template');
|
package/.next/standalone/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js
CHANGED
|
@@ -8,9 +8,8 @@ Object.defineProperty(exports, "getScriptNonceFromHeader", {
|
|
|
8
8
|
return getScriptNonceFromHeader;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const
|
|
11
|
+
const CSP_NONCE_SOURCE_REGEX = /^'nonce-([A-Za-z0-9+/_-]+={0,2})'$/;
|
|
12
12
|
function getScriptNonceFromHeader(cspHeaderValue) {
|
|
13
|
-
var _directive_split_slice_map_find;
|
|
14
13
|
const directives = cspHeaderValue// Directives are split by ';'.
|
|
15
14
|
.split(';').map((directive)=>directive.trim());
|
|
16
15
|
// First try to find the directive for the 'script-src', otherwise try to
|
|
@@ -20,25 +19,14 @@ function getScriptNonceFromHeader(cspHeaderValue) {
|
|
|
20
19
|
if (!directive) {
|
|
21
20
|
return;
|
|
22
21
|
}
|
|
23
|
-
// Extract the nonce from the directive
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
// Don't accept the nonce value if it contains HTML escape characters.
|
|
32
|
-
// Technically, the spec requires a base64'd value, but this is just an
|
|
33
|
-
// extra layer.
|
|
34
|
-
if (_htmlescape.ESCAPE_REGEX.test(nonce)) {
|
|
35
|
-
throw Object.defineProperty(new Error('Nonce value from Content-Security-Policy contained HTML escape characters.\nLearn more: https://nextjs.org/docs/messages/nonce-contained-invalid-characters'), "__NEXT_ERROR_CODE", {
|
|
36
|
-
value: "E440",
|
|
37
|
-
enumerable: false,
|
|
38
|
-
configurable: true
|
|
39
|
-
});
|
|
22
|
+
// Extract the first valid nonce from the directive. Malformed nonces are
|
|
23
|
+
// ignored so the request can continue without a nonce instead of failing.
|
|
24
|
+
for (const source of directive.split(/\s+/).slice(1)){
|
|
25
|
+
const match = source.trim().match(CSP_NONCE_SOURCE_REGEX);
|
|
26
|
+
if (match) {
|
|
27
|
+
return match[1];
|
|
28
|
+
}
|
|
40
29
|
}
|
|
41
|
-
return nonce;
|
|
42
30
|
}
|
|
43
31
|
|
|
44
32
|
//# sourceMappingURL=get-script-nonce-from-header.js.map
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* For chromium based browsers (Chrome, Edge, etc.) and Safari,
|
|
3
|
-
* icons need to stay under <head> to be picked up by the browser.
|
|
4
|
-
*
|
|
5
|
-
*/ "use strict";
|
|
1
|
+
"use strict";
|
|
6
2
|
Object.defineProperty(exports, "__esModule", {
|
|
7
3
|
value: true
|
|
8
4
|
});
|
|
@@ -12,7 +8,12 @@ Object.defineProperty(exports, "createServerInsertedMetadata", {
|
|
|
12
8
|
return createServerInsertedMetadata;
|
|
13
9
|
}
|
|
14
10
|
});
|
|
15
|
-
const
|
|
11
|
+
const _htmlescape = require("../../../shared/lib/htmlescape");
|
|
12
|
+
/**
|
|
13
|
+
* For chromium based browsers (Chrome, Edge, etc.) and Safari,
|
|
14
|
+
* icons need to stay under <head> to be picked up by the browser.
|
|
15
|
+
*
|
|
16
|
+
*/ const REINSERT_ICON_SCRIPT = `\
|
|
16
17
|
document.querySelectorAll('body link[rel="icon"], body link[rel="apple-touch-icon"]').forEach(el => document.head.appendChild(el))`;
|
|
17
18
|
function createServerInsertedMetadata(nonce) {
|
|
18
19
|
let inserted = false;
|
|
@@ -21,7 +22,7 @@ function createServerInsertedMetadata(nonce) {
|
|
|
21
22
|
return '';
|
|
22
23
|
}
|
|
23
24
|
inserted = true;
|
|
24
|
-
return `<script
|
|
25
|
+
return `<script${nonce ? ` nonce="${(0, _htmlescape.htmlEscapeAttributeString)(nonce)}"` : ''}>${REINSERT_ICON_SCRIPT}</script>`;
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -20,7 +20,7 @@ _export(exports, {
|
|
|
20
20
|
return getFlightStream;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
const _htmlescape = require("
|
|
23
|
+
const _htmlescape = require("../../shared/lib/htmlescape");
|
|
24
24
|
const _workunitasyncstorageexternal = require("./work-unit-async-storage.external");
|
|
25
25
|
const _invarianterror = require("../../shared/lib/invariant-error");
|
|
26
26
|
const _manifestssingleton = require("./manifests-singleton");
|
|
@@ -135,7 +135,7 @@ function getFlightStream(flightStream, debugStream, debugEndTime, nonce) {
|
|
|
135
135
|
return newResponse;
|
|
136
136
|
}
|
|
137
137
|
function createInlinedDataReadableStream(flightStream, nonce, formState) {
|
|
138
|
-
const startScriptTag = nonce ? `<script nonce
|
|
138
|
+
const startScriptTag = nonce ? `<script nonce="${(0, _htmlescape.htmlEscapeAttributeString)(nonce)}">` : '<script>';
|
|
139
139
|
const flightReader = flightStream.getReader();
|
|
140
140
|
const decoder = new TextDecoder('utf-8', {
|
|
141
141
|
fatal: true
|
|
@@ -13,7 +13,7 @@ const _apppaths = require("../../shared/lib/router/utils/app-paths");
|
|
|
13
13
|
const _lazyresult = require("../lib/lazy-result");
|
|
14
14
|
const _handlers = require("../use-cache/handlers");
|
|
15
15
|
const _asynclocalstorage = require("../app-render/async-local-storage");
|
|
16
|
-
function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previouslyRevalidatedTags, nonce }) {
|
|
16
|
+
function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, deploymentId, previouslyRevalidatedTags, nonce }) {
|
|
17
17
|
/**
|
|
18
18
|
* Rules of Static & Dynamic HTML:
|
|
19
19
|
*
|
|
@@ -49,6 +49,7 @@ function createWorkStore({ page, renderOpts, isPrefetchRequest, buildId, previou
|
|
|
49
49
|
isDraftMode: renderOpts.isDraftMode,
|
|
50
50
|
isPrefetchRequest,
|
|
51
51
|
buildId,
|
|
52
|
+
deploymentId,
|
|
52
53
|
reactLoadableManifest: (renderOpts == null ? void 0 : renderOpts.reactLoadableManifest) || {},
|
|
53
54
|
assetPrefix: (renderOpts == null ? void 0 : renderOpts.assetPrefix) || '',
|
|
54
55
|
nonce,
|
|
@@ -25,6 +25,7 @@ const _utils = require("../shared/lib/utils");
|
|
|
25
25
|
const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
|
26
26
|
const _url = require("url");
|
|
27
27
|
const _formathostname = require("./lib/format-hostname");
|
|
28
|
+
const _isrscrequest = require("./lib/is-rsc-request");
|
|
28
29
|
const _constants = require("../shared/lib/constants");
|
|
29
30
|
const _utils1 = require("../shared/lib/router/utils");
|
|
30
31
|
const _utils2 = require("./utils");
|
|
@@ -76,11 +77,11 @@ const _streamingmetadata = require("./lib/streaming-metadata");
|
|
|
76
77
|
const _decodequerypathparameter = require("./lib/decode-query-path-parameter");
|
|
77
78
|
const _nofallbackerrorexternal = require("../shared/lib/no-fallback-error.external");
|
|
78
79
|
const _fixmojibake = require("./lib/fix-mojibake");
|
|
79
|
-
const _cachebustingsearchparam = require("../shared/lib/router/utils/cache-busting-search-param");
|
|
80
80
|
const _setcachebustingsearchparam = require("../client/components/router-reducer/set-cache-busting-search-param");
|
|
81
81
|
const _fallbackparams = require("./request/fallback-params");
|
|
82
82
|
const _routekind = require("./route-kind");
|
|
83
83
|
const _postponedrequestbody = require("./lib/postponed-request-body");
|
|
84
|
+
const _cachebustingsearchparam = require("../shared/lib/router/utils/cache-busting-search-param");
|
|
84
85
|
function _interop_require_default(obj) {
|
|
85
86
|
return obj && obj.__esModule ? obj : {
|
|
86
87
|
default: obj
|
|
@@ -171,7 +172,7 @@ class Server {
|
|
|
171
172
|
// request path for flight information.
|
|
172
173
|
(0, _stripflightheaders.stripFlightHeaders)(req.headers);
|
|
173
174
|
return false;
|
|
174
|
-
} else if (req.headers[_approuterheaders.RSC_HEADER]
|
|
175
|
+
} else if ((0, _isrscrequest.isRSCRequestHeader)(req.headers[_approuterheaders.RSC_HEADER])) {
|
|
175
176
|
(0, _requestmeta.addRequestMeta)(req, 'isRSCRequest', true);
|
|
176
177
|
if (req.headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER] === '1') {
|
|
177
178
|
(0, _requestmeta.addRequestMeta)(req, 'isPrefetchRSCRequest', true);
|
|
@@ -1208,12 +1209,19 @@ class Server {
|
|
|
1208
1209
|
// This should only happen for static prefetches, so we only handle those here.
|
|
1209
1210
|
(0, _requestmeta.getRequestMeta)(req, 'isPrefetchRSCRequest') ? '1' : undefined;
|
|
1210
1211
|
const segmentPrefetchRSCRequest = headers[_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER] || (0, _requestmeta.getRequestMeta)(req, 'segmentPrefetchRSCRequest');
|
|
1211
|
-
const expectedHash = (0, _cachebustingsearchparam.computeCacheBustingSearchParam)(routerPrefetch, segmentPrefetchRSCRequest, headers[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER], headers[_approuterheaders.NEXT_URL]);
|
|
1212
|
+
const expectedHash = await (0, _cachebustingsearchparam.computeCacheBustingSearchParam)(routerPrefetch, segmentPrefetchRSCRequest, headers[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER], headers[_approuterheaders.NEXT_URL]);
|
|
1212
1213
|
const actualHash = (0, _requestmeta.getRequestMeta)(req, 'cacheBustingSearchParam') ?? new URL(req.url || '', 'http://localhost').searchParams.get(_approuterheaders.NEXT_RSC_UNION_QUERY);
|
|
1213
|
-
|
|
1214
|
+
let matchesHash = expectedHash === actualHash;
|
|
1215
|
+
if (!matchesHash && actualHash !== null) {
|
|
1216
|
+
// We'll fallback to checking the legacy hash format to support clients that do not have a secure context
|
|
1217
|
+
matchesHash = (0, _cachebustingsearchparam.computeLegacyCacheBustingSearchParam)(routerPrefetch, segmentPrefetchRSCRequest, headers[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER], headers[_approuterheaders.NEXT_URL]) === actualHash;
|
|
1218
|
+
}
|
|
1219
|
+
if (!matchesHash) {
|
|
1214
1220
|
// The hash sent by the client does not match the expected value.
|
|
1215
1221
|
// Redirect to the URL with the correct cache-busting search param.
|
|
1216
1222
|
// This prevents cache poisoning attacks on CDNs that don't respect Vary headers.
|
|
1223
|
+
// We continue to accept the legacy short hash for clients that still
|
|
1224
|
+
// generate the 5-character `_rsc` form.
|
|
1217
1225
|
// Note: When no headers are present, expectedHash is empty string and client
|
|
1218
1226
|
// must send `_rsc` param, otherwise actualHash is null and hash check fails.
|
|
1219
1227
|
const url = new URL(req.url || '', 'http://localhost');
|
|
@@ -1278,7 +1286,7 @@ class Server {
|
|
|
1278
1286
|
// page load) in the Instant Navigation Testing API. Only applies to
|
|
1279
1287
|
// document requests (no RSC header) - RSC requests should proceed normally
|
|
1280
1288
|
// even during a locked scope, with blocking happening on the client side.
|
|
1281
|
-
const hasInstantTestCookie = exposeTestingApi && req.headers[_approuterheaders.RSC_HEADER]
|
|
1289
|
+
const hasInstantTestCookie = exposeTestingApi && !(0, _isrscrequest.isRSCRequestHeader)(req.headers[_approuterheaders.RSC_HEADER]) && typeof req.headers.cookie === 'string' && req.headers.cookie.includes(_approuterheaders.NEXT_INSTANT_TEST_COOKIE + '=') && couldSupportPPR;
|
|
1282
1290
|
// This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the
|
|
1283
1291
|
// prerender manifest and this is an app page.
|
|
1284
1292
|
const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[pathname] ?? prerenderManifest.dynamicRoutes[pathname]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR
|
|
@@ -240,7 +240,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
240
240
|
}
|
|
241
241
|
const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
|
|
242
242
|
const hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
|
243
|
-
version: "16.2.
|
|
243
|
+
version: "16.2.6"
|
|
244
244
|
});
|
|
245
245
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
246
246
|
// of the current `next dev` invocation.
|
|
@@ -294,7 +294,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
|
|
|
294
294
|
writeRoutesHashesManifest: false,
|
|
295
295
|
currentNodeJsVersion,
|
|
296
296
|
isPersistentCachingEnabled: (0, _utils2.isFileSystemCacheEnabledForDev)(opts.nextConfig),
|
|
297
|
-
nextVersion: "16.2.
|
|
297
|
+
nextVersion: "16.2.6",
|
|
298
298
|
serverHmr: serverFastRefresh
|
|
299
299
|
}, {
|
|
300
300
|
memoryLimit: (_opts_nextConfig_experimental = opts.nextConfig.experimental) == null ? void 0 : _opts_nextConfig_experimental.turbopackMemoryLimit,
|
|
@@ -234,7 +234,7 @@ class HotReloaderWebpack {
|
|
|
234
234
|
this.previewProps = previewProps;
|
|
235
235
|
this.rewrites = rewrites;
|
|
236
236
|
this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
|
|
237
|
-
version: "16.2.
|
|
237
|
+
version: "16.2.6"
|
|
238
238
|
});
|
|
239
239
|
// Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
|
|
240
240
|
// of the current `next dev` invocation.
|
|
@@ -21,7 +21,7 @@ const _app = require("../../build/static-paths/app");
|
|
|
21
21
|
const _pages = require("../../build/static-paths/pages");
|
|
22
22
|
const _createincrementalcache = require("../../export/helpers/create-incremental-cache");
|
|
23
23
|
const _app1 = require("../../shared/lib/router/routes/app");
|
|
24
|
-
async function loadStaticPaths({ dir, distDir, pathname, config, httpAgentOptions, locales, defaultLocale, isAppPath, page, isrFlushToDisk, fetchCacheKeyPrefix, cacheMaxMemorySize, requestHeaders, cacheHandler, cacheHandlers, cacheLifeProfiles, nextConfigOutput, buildId, authInterrupts, sriEnabled }) {
|
|
24
|
+
async function loadStaticPaths({ dir, distDir, pathname, config, httpAgentOptions, locales, defaultLocale, isAppPath, page, isrFlushToDisk, fetchCacheKeyPrefix, cacheMaxMemorySize, requestHeaders, cacheHandler, cacheHandlers, cacheLifeProfiles, nextConfigOutput, buildId, deploymentId, authInterrupts, sriEnabled }) {
|
|
25
25
|
// this needs to be initialized before loadComponents otherwise
|
|
26
26
|
// "use cache" could be missing it's cache handlers
|
|
27
27
|
await (0, _createincrementalcache.createIncrementalCache)({
|
|
@@ -80,6 +80,7 @@ async function loadStaticPaths({ dir, distDir, pathname, config, httpAgentOption
|
|
|
80
80
|
isRoutePPREnabled,
|
|
81
81
|
partialFallbacksEnabled: config.partialFallbacks,
|
|
82
82
|
buildId,
|
|
83
|
+
deploymentId,
|
|
83
84
|
authInterrupts,
|
|
84
85
|
rootParamKeys
|
|
85
86
|
});
|
|
@@ -1010,14 +1010,15 @@ async function fetchExternalImage(href, dangerouslyAllowLocalIP, maximumResponse
|
|
|
1010
1010
|
etag
|
|
1011
1011
|
};
|
|
1012
1012
|
}
|
|
1013
|
-
async function fetchInternalImage(href, _req, _res, handleRequest) {
|
|
1013
|
+
async function fetchInternalImage(href, _req, _res, maximumResponseBody, handleRequest) {
|
|
1014
1014
|
try {
|
|
1015
1015
|
// Coerce HEAD to GET to avoid issues with the image optimizer
|
|
1016
1016
|
const method = !_req.method || _req.method === 'HEAD' ? 'GET' : _req.method;
|
|
1017
1017
|
const mocked = (0, _mockrequest.createRequestResponseMocks)({
|
|
1018
1018
|
url: href,
|
|
1019
1019
|
method,
|
|
1020
|
-
socket: _req.socket
|
|
1020
|
+
socket: _req.socket,
|
|
1021
|
+
maximumResponseBody
|
|
1021
1022
|
});
|
|
1022
1023
|
await handleRequest(mocked.req, mocked.res, _url.default.parse(href, true));
|
|
1023
1024
|
await mocked.res.hasStreamed;
|
|
@@ -1029,6 +1030,14 @@ async function fetchInternalImage(href, _req, _res, handleRequest) {
|
|
|
1029
1030
|
configurable: true
|
|
1030
1031
|
});
|
|
1031
1032
|
}
|
|
1033
|
+
if (mocked.res.buffers.length === 0) {
|
|
1034
|
+
_log.error('internal image response is empty for', href);
|
|
1035
|
+
throw Object.defineProperty(new ImageError(400, '"url" parameter is valid but internal response is invalid'), "__NEXT_ERROR_CODE", {
|
|
1036
|
+
value: "E394",
|
|
1037
|
+
enumerable: false,
|
|
1038
|
+
configurable: true
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1032
1041
|
const buffer = Buffer.concat(mocked.res.buffers);
|
|
1033
1042
|
const contentType = mocked.res.getHeader('Content-Type');
|
|
1034
1043
|
const cacheControl = mocked.res.getHeader('Cache-Control');
|
|
@@ -1040,6 +1049,17 @@ async function fetchInternalImage(href, _req, _res, handleRequest) {
|
|
|
1040
1049
|
etag
|
|
1041
1050
|
};
|
|
1042
1051
|
} catch (err) {
|
|
1052
|
+
if (err instanceof ImageError) {
|
|
1053
|
+
throw err;
|
|
1054
|
+
}
|
|
1055
|
+
if (err && typeof err === 'object' && 'code' in err && err.code === 'ERR_MAX_BODY_SIZE_EXCEEDED') {
|
|
1056
|
+
_log.error('internal image response exceeded maximum size for', href);
|
|
1057
|
+
throw Object.defineProperty(new ImageError(413, '"url" parameter is valid but internal response is invalid'), "__NEXT_ERROR_CODE", {
|
|
1058
|
+
value: "E394",
|
|
1059
|
+
enumerable: false,
|
|
1060
|
+
configurable: true
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1043
1063
|
_log.error('upstream image response failed for', href, err);
|
|
1044
1064
|
throw Object.defineProperty(new ImageError(500, '"url" parameter is valid but upstream response is invalid'), "__NEXT_ERROR_CODE", {
|
|
1045
1065
|
value: "E394",
|
|
@@ -85,7 +85,7 @@ function logStartInfo({ networkUrl, appUrl, envInfo, logBundler }) {
|
|
|
85
85
|
if (parts.length > 0) {
|
|
86
86
|
versionSuffix = ` (${parts.join(', ')})`;
|
|
87
87
|
}
|
|
88
|
-
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.2.
|
|
88
|
+
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.2.6"}`))}${versionSuffix}`);
|
|
89
89
|
if (appUrl) {
|
|
90
90
|
_log.bootstrap(`- Local: ${appUrl}`);
|
|
91
91
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes the raw RSC header value. Only the literal string "1" is treated
|
|
3
|
+
* as a valid RSC request marker; malformed or repeated values are ignored.
|
|
4
|
+
*/ "use strict";
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "isRSCRequestHeader", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function() {
|
|
11
|
+
return isRSCRequestHeader;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
function isRSCRequestHeader(value) {
|
|
15
|
+
return value === '1';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=is-rsc-request.js.map
|