vinext 1.3.0 → 1.4.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/README.md +5 -2
- package/THIRD_PARTY_LICENSES.md +47 -0
- package/dist/_virtual/_rolldown/runtime.js +4 -3
- package/dist/build/action-owner-manifest.d.ts +3 -2
- package/dist/build/action-owner-manifest.js +18 -2
- package/dist/build/app-page-static-eligibility.d.ts +17 -1
- package/dist/build/app-page-static-eligibility.js +80 -13
- package/dist/build/clean-output.d.ts +2 -1
- package/dist/build/client-build-config.d.ts +13 -3
- package/dist/build/client-build-config.js +46 -9
- package/dist/build/client-reference-async.d.ts +48 -0
- package/dist/build/client-reference-async.js +123 -0
- package/dist/build/client-reference-chunks.d.ts +32 -0
- package/dist/build/client-reference-chunks.js +111 -0
- package/dist/build/client-reference-groups.d.ts +9 -1
- package/dist/build/client-reference-groups.js +40 -2
- package/dist/build/css-url-assets.d.ts +2 -1
- package/dist/build/google-fonts/fallback-metrics.d.ts +2 -1
- package/dist/build/google-fonts/find-font-files-in-css.d.ts +1 -0
- package/dist/build/google-fonts/find-font-files-in-css.js +17 -4
- package/dist/build/google-fonts/font-metadata.d.ts +2 -1
- package/dist/build/google-fonts/validate.d.ts +2 -1
- package/dist/build/inline-css.d.ts +2 -1
- package/dist/build/module-dependency-cache.d.ts +2 -1
- package/dist/build/next-client-runtime-manifests.d.ts +2 -1
- package/dist/build/precompress.d.ts +2 -1
- package/dist/build/precompress.js +1 -1
- package/dist/build/prerender-paths.d.ts +2 -1
- package/dist/build/prerender-phase.d.ts +2 -1
- package/dist/build/prerender-server-pool.js +1 -1
- package/dist/build/prerender.d.ts +3 -2
- package/dist/build/prerender.js +6 -5
- package/dist/build/report.d.ts +2 -15
- package/dist/build/report.js +1 -51
- package/dist/build/run-prerender.d.ts +2 -1
- package/dist/build/server-actions-encryption-key.d.ts +2 -1
- package/dist/build/ssr-manifest.js +25 -2
- package/dist/build/standalone.d.ts +2 -1
- package/dist/cache/cache-adapters-virtual.d.ts +2 -1
- package/dist/cache.js +1 -2
- package/dist/check.d.ts +2 -1
- package/dist/check.js +5 -1
- package/dist/cli-args.d.ts +2 -1
- package/dist/cli.js +5 -0
- package/dist/client/client-redirect-matcher.js +2 -1
- package/dist/client/client-redirects.d.ts +4 -3
- package/dist/client/client-redirects.js +2 -1
- package/dist/client/client-rewrites.d.ts +2 -1
- package/dist/client/dev-error-overlay-store.d.ts +2 -1
- package/dist/client/dev-error-overlay.js +1 -1
- package/dist/client/index.js +1 -2
- package/dist/client/instrumentation-client-state.js +5 -5
- package/dist/client/navigation-runtime.d.ts +16 -2
- package/dist/client/navigation-runtime.js +2 -2
- package/dist/client/pages-router-link-navigation.d.ts +2 -1
- package/dist/client/vinext-next-data.d.ts +25 -1
- package/dist/client/window-next.d.ts +2 -1
- package/dist/config/config-matchers.d.ts +12 -1
- package/dist/config/config-matchers.js +111 -16
- package/dist/config/dotenv.d.ts +2 -1
- package/dist/config/next-config.d.ts +32 -1
- package/dist/config/next-config.js +93 -5
- package/dist/config/tsconfig-paths.d.ts +2 -1
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/dbcs-codec.js +327 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/dbcs-data.js +123 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/index.js +29 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/internal.js +134 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-codec.js +50 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-data-generated.js +455 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-data.js +147 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/big5-added.json.js +169 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp936.json.js +2584 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp949.json.js +2220 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp950.json.js +227 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/eucjp.json.js +425 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/gb18030-ranges.json.js +427 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/gbk-added.json.js +229 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/shiftjis.json.js +292 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/utf16.js +106 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/utf7.js +182 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/bom-handling.js +42 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/extend-node.js +147 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/index.js +94 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/streams.js +95 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/detector.js +23 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/index.js +2 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/lookup.js +25 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/bmp.js +11 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/cur.js +15 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/dds.js +11 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/gif.js +12 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/heif.js +55 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/icns.js +76 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/ico.js +39 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/index.js +46 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/j2c.js +11 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jp2.js +21 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jpg.js +71 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jxl-stream.js +42 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/jxl.js +46 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/ktx.js +19 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/png.js +28 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/pnm.js +54 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/psd.js +11 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/svg.js +79 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/tga.js +15 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/tiff.js +96 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/utils.js +53 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/types/webp.js +45 -0
- package/dist/deps/.pnpm/image-size@2.0.4/deps/image-size/dist/esm/utils/bit-reader.js +38 -0
- package/dist/deps/.pnpm/safer-buffer@2.1.2/deps/safer-buffer/safer.js +45 -0
- package/dist/deps/.pnpm/ua-parser-js@1.0.35/deps/ua-parser-js/src/ua-parser.js +2 -2
- package/dist/entries/app-browser-entry.d.ts +20 -5
- package/dist/entries/app-browser-entry.js +79 -6
- package/dist/entries/app-rsc-entry.d.ts +2 -1
- package/dist/entries/app-rsc-entry.js +59 -60
- package/dist/entries/app-rsc-manifest.d.ts +2 -1
- package/dist/entries/app-rsc-manifest.js +56 -4
- package/dist/entries/app-ssr-entry.js +1 -0
- package/dist/entries/pages-entry-helpers.js +1 -2
- package/dist/entries/pages-server-entry.d.ts +2 -1
- package/dist/entries/pages-server-entry.js +34 -9
- package/dist/entries/runtime-entry-module.d.ts +1 -0
- package/dist/entries/runtime-entry-module.js +4 -1
- package/dist/image/image-adapters-virtual.d.ts +2 -1
- package/dist/index.js +184 -103
- package/dist/init-cloudflare.d.ts +1 -3
- package/dist/init-cloudflare.js +10 -48
- package/dist/init-platform.d.ts +2 -0
- package/dist/init-platform.js +4 -0
- package/dist/plugins/client-compile-hints.d.ts +30 -0
- package/dist/plugins/client-compile-hints.js +88 -0
- package/dist/plugins/client-reference-dedup.d.ts +2 -1
- package/dist/plugins/cloudflare-dev-module-urls.d.ts +2 -1
- package/dist/plugins/dynamic-preload-metadata.d.ts +3 -1
- package/dist/plugins/dynamic-preload-metadata.js +1 -1
- package/dist/plugins/environment.d.ts +2 -1
- package/dist/plugins/extensionless-dynamic-import.js +6 -2
- package/dist/plugins/fonts.js +9 -12
- package/dist/plugins/ignore-dynamic-requests.d.ts +2 -1
- package/dist/plugins/import-meta-url.d.ts +2 -1
- package/dist/plugins/next-intl-catalog.d.ts +12 -0
- package/dist/plugins/next-intl-catalog.js +85 -0
- package/dist/plugins/og-assets.d.ts +2 -1
- package/dist/plugins/og-assets.js +2 -3
- package/dist/plugins/optimize-imports.d.ts +2 -1
- package/dist/plugins/pages-node-externals.d.ts +3 -1
- package/dist/plugins/pages-node-externals.js +1 -1
- package/dist/plugins/remove-console.d.ts +2 -1
- package/dist/plugins/require-condition-resolution.d.ts +2 -1
- package/dist/plugins/rsc-client-reference-loaders.d.ts +8 -0
- package/dist/plugins/rsc-client-reference-loaders.js +170 -68
- package/dist/plugins/rsc-client-shim-excludes.js +2 -0
- package/dist/plugins/sass.d.ts +2 -1
- package/dist/plugins/strip-server-exports.d.ts +2 -1
- package/dist/plugins/styled-jsx.d.ts +2 -1
- package/dist/plugins/transform-result.d.ts +2 -1
- package/dist/plugins/typeof-window.d.ts +2 -1
- package/dist/plugins/use-cache-callable.d.ts +1 -1
- package/dist/plugins/use-cache-callable.js +136 -94
- package/dist/plugins/worker-image-imports.js +1 -1
- package/dist/plugins/worker-use-server.d.ts +2 -1
- package/dist/routing/app-route-graph.d.ts +46 -0
- package/dist/routing/app-route-graph.js +131 -51
- package/dist/routing/browser-route-manifest.d.ts +2 -1
- package/dist/routing/optimistic-route-trie.d.ts +2 -1
- package/dist/routing/route-matching.d.ts +2 -1
- package/dist/routing/route-pattern.d.ts +2 -1
- package/dist/server/accept-encoding.d.ts +2 -1
- package/dist/server/api-handler.js +19 -4
- package/dist/server/app-action-forwarding.d.ts +2 -1
- package/dist/server/app-bfcache-identity.d.ts +2 -1
- package/dist/server/app-bfcache-identity.js +1 -1
- package/dist/server/app-browser-action-result.d.ts +2 -1
- package/dist/server/app-browser-entry.js +106 -66
- package/dist/server/app-browser-error.d.ts +2 -1
- package/dist/server/app-browser-history-controller.d.ts +7 -5
- package/dist/server/app-browser-history-controller.js +93 -15
- package/dist/server/app-browser-hydration.d.ts +2 -1
- package/dist/server/app-browser-interception-context.d.ts +2 -1
- package/dist/server/app-browser-navigation-controller.d.ts +2 -2
- package/dist/server/app-browser-navigation-controller.js +16 -12
- package/dist/server/app-browser-popstate.d.ts +2 -1
- package/dist/server/app-browser-rsc-redirect.d.ts +2 -1
- package/dist/server/app-browser-rsc-redirect.js +4 -4
- package/dist/server/app-browser-server-action-client.d.ts +4 -1
- package/dist/server/app-browser-server-action-client.js +4 -3
- package/dist/server/app-browser-state.d.ts +2 -4
- package/dist/server/app-browser-state.js +9 -4
- package/dist/server/app-browser-stream.d.ts +2 -1
- package/dist/server/app-browser-supplemental-refresh.js +16 -1
- package/dist/server/app-browser-visible-commit.d.ts +3 -2
- package/dist/server/app-browser-visible-commit.js +2 -12
- package/dist/server/app-client-reference-manifest.d.ts +31 -0
- package/dist/server/app-client-reference-manifest.js +46 -0
- package/dist/server/app-client-reference-preloader.d.ts +25 -5
- package/dist/server/app-client-reference-preloader.js +22 -7
- package/dist/server/app-elements-wire.d.ts +8 -39
- package/dist/server/app-elements-wire.js +4 -41
- package/dist/server/app-elements.d.ts +4 -2
- package/dist/server/app-elements.js +4 -2
- package/dist/server/app-fallback-renderer.d.ts +9 -2
- package/dist/server/app-fallback-renderer.js +4 -1
- package/dist/server/app-history-state.d.ts +4 -3
- package/dist/server/app-history-state.js +5 -2
- package/dist/server/app-inline-css-client.d.ts +2 -1
- package/dist/server/app-metadata-tracing.d.ts +2 -1
- package/dist/server/app-mounted-layouts.d.ts +21 -0
- package/dist/server/app-mounted-layouts.js +67 -0
- package/dist/server/app-optimistic-routing.d.ts +37 -2
- package/dist/server/app-optimistic-routing.js +75 -2
- package/dist/server/app-page-boundary-render.d.ts +20 -2
- package/dist/server/app-page-boundary-render.js +224 -40
- package/dist/server/app-page-boundary.d.ts +34 -5
- package/dist/server/app-page-boundary.js +41 -8
- package/dist/server/app-page-cache-finalizer.d.ts +14 -2
- package/dist/server/app-page-cache-finalizer.js +71 -30
- package/dist/server/app-page-cache-render.d.ts +10 -2
- package/dist/server/app-page-cache-render.js +14 -2
- package/dist/server/app-page-cache.d.ts +13 -1
- package/dist/server/app-page-cache.js +33 -11
- package/dist/server/app-page-dispatch.d.ts +39 -11
- package/dist/server/app-page-dispatch.js +236 -177
- package/dist/server/app-page-element-builder.d.ts +19 -3
- package/dist/server/app-page-element-builder.js +193 -71
- package/dist/server/app-page-execution.d.ts +43 -51
- package/dist/server/app-page-execution.js +205 -92
- package/dist/server/app-page-head.d.ts +108 -3
- package/dist/server/app-page-head.js +337 -154
- package/dist/server/app-page-http-access-fallback-metadata.d.ts +49 -2
- package/dist/server/app-page-http-access-fallback-metadata.js +77 -2
- package/dist/server/app-page-layout-gate.d.ts +35 -0
- package/dist/server/app-page-layout-gate.js +50 -0
- package/dist/server/app-page-method.d.ts +2 -1
- package/dist/server/app-page-params.d.ts +0 -1
- package/dist/server/app-page-params.js +1 -14
- package/dist/server/app-page-probe.d.ts +5 -22
- package/dist/server/app-page-probe.js +4 -37
- package/dist/server/app-page-render-identity.d.ts +2 -1
- package/dist/server/app-page-render.d.ts +9 -13
- package/dist/server/app-page-render.js +108 -214
- package/dist/server/app-page-request.d.ts +15 -4
- package/dist/server/app-page-request.js +2 -2
- package/dist/server/app-page-response.js +3 -3
- package/dist/server/app-page-route-wiring.d.ts +65 -8
- package/dist/server/app-page-route-wiring.js +259 -103
- package/dist/server/app-page-rsc-render-status.d.ts +29 -2
- package/dist/server/app-page-rsc-render-status.js +121 -13
- package/dist/server/app-page-search-params-observation.d.ts +7 -2
- package/dist/server/app-page-search-params-observation.js +8 -1
- package/dist/server/app-page-segment-plan.d.ts +2 -1
- package/dist/server/app-page-stream.d.ts +33 -1
- package/dist/server/app-page-stream.js +25 -6
- package/dist/server/app-pages-bridge.d.ts +6 -1
- package/dist/server/app-pages-bridge.js +7 -3
- package/dist/server/app-ppr-fallback-shell-render.d.ts +2 -1
- package/dist/server/app-ppr-fallback-shell.d.ts +2 -1
- package/dist/server/app-prerender-endpoints.d.ts +2 -1
- package/dist/server/app-prerender-static-params.d.ts +2 -1
- package/dist/server/app-render-dependency.d.ts +21 -4
- package/dist/server/app-render-dependency.js +100 -33
- package/dist/server/app-request-stage-dispatch.js +1 -1
- package/dist/server/app-request-stage-independent-entry.d.ts +2 -1
- package/dist/server/app-response-stage-entry.d.ts +2 -1
- package/dist/server/app-route-handler-cache.d.ts +2 -1
- package/dist/server/app-route-handler-cache.js +2 -2
- package/dist/server/app-route-handler-dispatch.d.ts +2 -1
- package/dist/server/app-route-handler-dispatch.js +15 -10
- package/dist/server/app-route-handler-execution.d.ts +2 -1
- package/dist/server/app-route-handler-execution.js +8 -3
- package/dist/server/app-route-handler-policy.d.ts +1 -1
- package/dist/server/app-route-handler-policy.js +3 -3
- package/dist/server/app-route-handler-response.d.ts +2 -1
- package/dist/server/app-route-handler-response.js +1 -1
- package/dist/server/app-route-handler-runtime.d.ts +2 -1
- package/dist/server/app-route-handler-runtime.js +17 -4
- package/dist/server/app-route-module-loader.d.ts +18 -1
- package/dist/server/app-route-module-loader.js +8 -0
- package/dist/server/app-route-tree-prefetch.d.ts +2 -1
- package/dist/server/app-rsc-cache-busting.d.ts +2 -2
- package/dist/server/app-rsc-cache-busting.js +4 -4
- package/dist/server/app-rsc-error-handler.d.ts +4 -2
- package/dist/server/app-rsc-error-handler.js +9 -1
- package/dist/server/app-rsc-errors.d.ts +10 -1
- package/dist/server/app-rsc-errors.js +8 -1
- package/dist/server/app-rsc-handler.d.ts +7 -6
- package/dist/server/app-rsc-handler.js +36 -34
- package/dist/server/app-rsc-request-normalization.d.ts +0 -4
- package/dist/server/app-rsc-request-normalization.js +1 -4
- package/dist/server/app-rsc-response-finalizer.d.ts +2 -1
- package/dist/server/app-rsc-response-finalizer.js +2 -2
- package/dist/server/app-rsc-response-stage.js +5 -3
- package/dist/server/app-rsc-route-matching.d.ts +38 -1
- package/dist/server/app-rsc-route-matching.js +24 -0
- package/dist/server/app-segment-config.d.ts +2 -1
- package/dist/server/app-segment-config.js +1 -14
- package/dist/server/app-server-action-execution.d.ts +5 -2
- package/dist/server/app-server-action-execution.js +10 -7
- package/dist/server/app-ssr-entry.d.ts +8 -0
- package/dist/server/app-ssr-entry.js +98 -50
- package/dist/server/app-ssr-error-meta.d.ts +2 -1
- package/dist/server/app-ssr-search-params-gate.d.ts +2 -1
- package/dist/server/app-ssr-stream.d.ts +22 -10
- package/dist/server/app-ssr-stream.js +300 -68
- package/dist/server/app-static-generation.d.ts +2 -1
- package/dist/server/app-streamed-client-references.d.ts +39 -0
- package/dist/server/app-streamed-client-references.js +156 -0
- package/dist/server/app-visited-response-cache.d.ts +38 -2
- package/dist/server/app-visited-response-cache.js +46 -5
- package/dist/server/app-worker-stages.d.ts +27 -4
- package/dist/server/app-worker-stages.js +45 -6
- package/dist/server/artifact-compatibility.d.ts +2 -2
- package/dist/server/artifact-compatibility.js +1 -10
- package/dist/server/bfcache-identity.d.ts +2 -1
- package/dist/server/cache-headers.d.ts +2 -1
- package/dist/server/cache-proof.d.ts +1 -115
- package/dist/server/cache-proof.js +1 -544
- package/dist/server/cacheability-request.d.ts +2 -1
- package/dist/server/cacheability-request.js +13 -8
- package/dist/server/config-headers.d.ts +2 -1
- package/dist/server/csp.d.ts +2 -1
- package/dist/server/default-global-not-found-module.d.ts +2 -1
- package/dist/server/default-http-access-fallback-modules.d.ts +33 -0
- package/dist/server/default-http-access-fallback-modules.js +31 -0
- package/dist/server/defer-until-stream-consumed.d.ts +34 -0
- package/dist/server/defer-until-stream-consumed.js +154 -21
- package/dist/server/dev-lockfile.d.ts +32 -2
- package/dist/server/dev-lockfile.js +46 -2
- package/dist/server/dev-module-runner.d.ts +2 -1
- package/dist/server/dev-server.js +14 -6
- package/dist/server/fetch-handler.js +1 -2
- package/dist/server/file-based-metadata.d.ts +2 -1
- package/dist/server/framework-tracer.d.ts +2 -1
- package/dist/server/headers.d.ts +6 -3
- package/dist/server/headers.js +9 -5
- package/dist/server/html.d.ts +1 -0
- package/dist/server/html.js +19 -1
- package/dist/server/http-conditional.d.ts +2 -1
- package/dist/server/http-error-responses.d.ts +2 -1
- package/dist/server/implicit-tags.d.ts +2 -1
- package/dist/server/isr-cache.d.ts +8 -2
- package/dist/server/isr-cache.js +26 -1
- package/dist/server/metadata-route-build-data.d.ts +2 -1
- package/dist/server/metadata-route-build-data.js +1 -1
- package/dist/server/metadata-route-response.d.ts +2 -1
- package/dist/server/metadata-route-response.js +32 -15
- package/dist/server/metadata-routes.d.ts +2 -1
- package/dist/server/middleware-runtime.d.ts +2 -1
- package/dist/server/multi-stage.d.ts +52 -11
- package/dist/server/multi-stage.js +13 -1
- package/dist/server/navigation-planner.js +1 -1
- package/dist/server/navigation-trace.d.ts +2 -1
- package/dist/server/next-error-digest.d.ts +2 -1
- package/dist/server/nitro-public-files-plugin.d.ts +2 -1
- package/dist/server/nitro-public-files.d.ts +2 -1
- package/dist/server/opentelemetry-api.d.ts +2 -1
- package/dist/server/operation-token.d.ts +2 -1
- package/dist/server/pages-api-route.d.ts +2 -1
- package/dist/server/pages-api-route.js +28 -19
- package/dist/server/pages-asset-tags.d.ts +2 -1
- package/dist/server/pages-body-parser-config.d.ts +2 -1
- package/dist/server/pages-client-assets.d.ts +4 -0
- package/dist/server/pages-data-route.d.ts +2 -1
- package/dist/server/pages-document-asset-props.d.ts +2 -1
- package/dist/server/pages-document-initial-props.d.ts +2 -1
- package/dist/server/pages-execution-tracing.d.ts +2 -1
- package/dist/server/pages-execution-tracing.js +1 -1
- package/dist/server/pages-get-initial-props.d.ts +2 -1
- package/dist/server/pages-media-type.d.ts +21 -1
- package/dist/server/pages-media-type.js +69 -5
- package/dist/server/pages-node-compat.js +52 -27
- package/dist/server/pages-page-data.d.ts +7 -1
- package/dist/server/pages-page-data.js +35 -12
- package/dist/server/pages-page-handler.d.ts +3 -2
- package/dist/server/pages-page-handler.js +27 -27
- package/dist/server/pages-page-method.d.ts +2 -1
- package/dist/server/pages-page-response.d.ts +2 -1
- package/dist/server/pages-preview.d.ts +2 -1
- package/dist/server/pages-readiness.d.ts +2 -1
- package/dist/server/pages-request-pipeline.d.ts +10 -1
- package/dist/server/pages-request-pipeline.js +6 -7
- package/dist/server/pages-request-stage-entry.d.ts +2 -1
- package/dist/server/pages-request-stage-entry.js +14 -12
- package/dist/server/pages-response-stage-entry.d.ts +2 -1
- package/dist/server/pages-response-stage-entry.js +9 -3
- package/dist/server/pages-route-data-kind.d.ts +2 -1
- package/dist/server/prerender-cache-life-header.d.ts +2 -1
- package/dist/server/prerender-route-params.d.ts +2 -1
- package/dist/server/prod-server.js +14 -4
- package/dist/server/request-log.d.ts +2 -1
- package/dist/server/request-pipeline.d.ts +6 -0
- package/dist/server/request-pipeline.js +21 -1
- package/dist/server/request-tracing.d.ts +2 -1
- package/dist/server/request-tracing.js +1 -1
- package/dist/server/response-start-tracing.js +7 -29
- package/dist/server/rsc-render-stream.d.ts +4 -0
- package/dist/server/rsc-render-stream.js +25 -0
- package/dist/server/seed-cache.d.ts +2 -1
- package/dist/server/seed-cache.js +1 -1
- package/dist/server/shared-cache-identity.d.ts +23 -0
- package/dist/server/shared-cache-identity.js +36 -0
- package/dist/server/static-file-cache.d.ts +2 -1
- package/dist/server/static-file-cache.js +1 -0
- package/dist/server/worker-revalidation-context.d.ts +2 -1
- package/dist/server/worker-stages.d.ts +18 -4
- package/dist/server/worker-stages.js +23 -4
- package/dist/shims/app.d.ts +2 -1
- package/dist/shims/cache-callable-runtime.d.ts +2 -1
- package/dist/shims/cache-handler.d.ts +8 -3
- package/dist/shims/cache-handler.js +31 -11
- package/dist/shims/cache-request-state.d.ts +17 -20
- package/dist/shims/cache-request-state.js +16 -21
- package/dist/shims/cache-runtime.js +27 -11
- package/dist/shims/cache.d.ts +8 -7
- package/dist/shims/cache.js +17 -19
- package/dist/shims/cacheability-classification.d.ts +2 -0
- package/dist/shims/caught-not-found-boundaries.d.ts +15 -0
- package/dist/shims/caught-not-found-boundaries.js +48 -0
- package/dist/shims/cdn-cache.d.ts +22 -5
- package/dist/shims/cdn-purge-routes.d.ts +2 -1
- package/dist/shims/client-locale.js +2 -1
- package/dist/shims/client-page-root.d.ts +2 -1
- package/dist/shims/client-page-root.js +2 -2
- package/dist/shims/config.d.ts +2 -1
- package/dist/shims/default-forbidden.d.ts +4 -0
- package/dist/shims/default-forbidden.js +18 -0
- package/dist/shims/default-not-found.d.ts +0 -5
- package/dist/shims/default-not-found.js +5 -41
- package/dist/shims/default-unauthorized.d.ts +4 -0
- package/dist/shims/default-unauthorized.js +18 -0
- package/dist/shims/dynamic.js +9 -6
- package/dist/shims/error-boundary.d.ts +39 -3
- package/dist/shims/error-boundary.js +33 -18
- package/dist/shims/fetch-cache-state.d.ts +5 -1
- package/dist/shims/fetch-cache-state.js +1 -3
- package/dist/shims/fetch-cache.d.ts +2 -1
- package/dist/shims/fetch-cache.js +34 -24
- package/dist/shims/font-google.js +1 -2
- package/dist/shims/font-utils.d.ts +3 -2
- package/dist/shims/font-utils.js +5 -3
- package/dist/shims/form.js +3 -3
- package/dist/shims/headers.d.ts +8 -23
- package/dist/shims/headers.js +17 -67
- package/dist/shims/http-access-error-fallback.d.ts +7 -0
- package/dist/shims/http-access-error-fallback.js +47 -0
- package/dist/shims/image.d.ts +1 -22
- package/dist/shims/internal/app-prefetch-fetch-queue.d.ts +22 -2
- package/dist/shims/internal/app-prefetch-fetch-queue.js +71 -18
- package/dist/shims/internal/app-route-prefetch-policy.d.ts +14 -3
- package/dist/shims/internal/app-route-prefetch-policy.js +29 -4
- package/dist/shims/internal/cache-context-accessor.d.ts +2 -1
- package/dist/shims/internal/client-reference-loader.d.ts +7 -0
- package/dist/shims/internal/client-reference-loader.js +91 -0
- package/dist/shims/internal/cookie-serialize.d.ts +2 -1
- package/dist/shims/internal/cookies.js +1 -2
- package/dist/shims/internal/headers-state.d.ts +2 -0
- package/dist/shims/internal/headers-state.js +6 -1
- package/dist/shims/internal/hybrid-client-route-owner-direct.d.ts +2 -1
- package/dist/shims/internal/interpolate-as.d.ts +2 -1
- package/dist/shims/internal/navigation-untracked.js +1 -1
- package/dist/shims/internal/pages-data-target.d.ts +2 -1
- package/dist/shims/internal/pages-data-url.d.ts +2 -1
- package/dist/shims/internal/thenable-well-known-properties.d.ts +2 -1
- package/dist/shims/link.js +197 -52
- package/dist/shims/metadata.d.ts +52 -29
- package/dist/shims/metadata.js +142 -42
- package/dist/shims/navigation-errors.d.ts +2 -1
- package/dist/shims/navigation-server.js +1 -1
- package/dist/shims/navigation.d.ts +95 -8
- package/dist/shims/navigation.js +255 -47
- package/dist/shims/navigation.react-server.js +2 -2
- package/dist/shims/pages-router-runtime.d.ts +2 -1
- package/dist/shims/ppr-fallback-shell.d.ts +2 -1
- package/dist/shims/request-state-types.d.ts +2 -2
- package/dist/shims/router.js +14 -3
- package/dist/shims/slot.d.ts +12 -0
- package/dist/shims/slot.js +37 -9
- package/dist/shims/unified-request-context.d.ts +1 -1
- package/dist/shims/unified-request-context.js +5 -6
- package/dist/typegen.d.ts +2 -1
- package/dist/utils/cache-control-metadata.d.ts +5 -0
- package/dist/utils/cache-control-metadata.js +9 -1
- package/dist/utils/client-build-manifest.d.ts +4 -1
- package/dist/utils/client-build-manifest.js +9 -2
- package/dist/utils/client-entry-manifest.d.ts +13 -0
- package/dist/utils/client-entry-manifest.js +20 -1
- package/dist/utils/client-reference-chunks.d.ts +45 -0
- package/dist/utils/client-reference-chunks.js +30 -0
- package/dist/utils/client-runtime-metadata.d.ts +9 -1
- package/dist/utils/client-runtime-metadata.js +40 -9
- package/dist/utils/compare.d.ts +9 -0
- package/dist/utils/compare.js +15 -1
- package/dist/utils/lazy-chunks.d.ts +14 -0
- package/dist/utils/lazy-chunks.js +27 -1
- package/dist/utils/middleware-request-headers.d.ts +2 -1
- package/dist/utils/project.d.ts +4 -3
- package/dist/utils/project.js +12 -17
- package/dist/utils/query.d.ts +2 -1
- package/dist/utils/regex.d.ts +5 -0
- package/dist/utils/regex.js +11 -1
- package/dist/utils/text-stream.d.ts +10 -5
- package/dist/utils/text-stream.js +6 -6
- package/dist/utils/vite-cli-invocation.d.ts +2 -1
- package/package.json +6 -5
- package/dist/build/layout-classification-types.d.ts +0 -60
- package/dist/build/layout-classification-types.js +0 -1
- package/dist/build/layout-classification.d.ts +0 -61
- package/dist/build/layout-classification.js +0 -98
- package/dist/build/route-classification-injector.d.ts +0 -32
- package/dist/build/route-classification-injector.js +0 -59
- package/dist/build/route-classification-manifest.d.ts +0 -53
- package/dist/build/route-classification-manifest.js +0 -143
- package/dist/deps/.pnpm/image-size@2.0.2/deps/image-size/dist/index.js +0 -808
- package/dist/server/app-browser-client-reuse-manifest.d.ts +0 -10
- package/dist/server/app-browser-client-reuse-manifest.js +0 -101
- package/dist/server/app-layout-param-observation.d.ts +0 -41
- package/dist/server/app-layout-param-observation.js +0 -168
- package/dist/server/client-reuse-manifest.d.ts +0 -102
- package/dist/server/client-reuse-manifest.js +0 -209
- package/dist/server/default-not-found-module.d.ts +0 -19
- package/dist/server/default-not-found-module.js +0 -18
- package/dist/server/rsc-stream-hints.d.ts +0 -21
- package/dist/server/rsc-stream-hints.js +0 -227
- package/dist/server/skip-cache-proof.d.ts +0 -60
- package/dist/server/skip-cache-proof.js +0 -168
- package/dist/server/static-layout-client-reuse-proof.d.ts +0 -13
- package/dist/server/static-layout-client-reuse-proof.js +0 -33
- package/dist/utils/sorted-array.d.ts +0 -7
- package/dist/utils/sorted-array.js +0 -20
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import "../plugins/rsc-client-reference-loaders.js";
|
|
2
|
+
import { toManifestModuleId } from "../plugins/dynamic-preload-metadata.js";
|
|
3
|
+
//#region src/build/client-reference-chunks.ts
|
|
4
|
+
/** As Vite's preload helper tells a stylesheet: by its URL's path. */
|
|
5
|
+
function isStylesheet(file) {
|
|
6
|
+
return new URL(file, "http://vinext.local/").pathname.endsWith(".css");
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Collect what each App Router client reference loads in the browser from the
|
|
10
|
+
* client bundle: the chunk holding the module that registers it (see
|
|
11
|
+
* plugins/rsc-client-reference-loaders.ts), and the JS chunks and stylesheets
|
|
12
|
+
* that chunk needs, as Vite's preload helper would load them for a dynamic
|
|
13
|
+
* import. JS chunks the App browser entry imports statically have loaded
|
|
14
|
+
* before any Flight row decodes, so they are left out.
|
|
15
|
+
*
|
|
16
|
+
* @param moduleKeys Client reference modules by resolved id, with the keys of
|
|
17
|
+
* the references each registers.
|
|
18
|
+
* @param modulePreload The client build's `build.modulePreload`, which picks
|
|
19
|
+
* the JS chunks to modulepreload, as it does for Vite's preload helper. Its
|
|
20
|
+
* `resolveDependencies` sees the chunk that dynamically imports each
|
|
21
|
+
* registering module as the host, as Vite passes it.
|
|
22
|
+
*/
|
|
23
|
+
function collectClientReferenceChunks(bundle, moduleKeys, appBrowserEntry, modulePreload) {
|
|
24
|
+
const chunks = /* @__PURE__ */ new Map();
|
|
25
|
+
let host;
|
|
26
|
+
for (const output of Object.values(bundle)) {
|
|
27
|
+
if (output.type !== "chunk") continue;
|
|
28
|
+
chunks.set(output.fileName, output);
|
|
29
|
+
if (output.facadeModuleId === "\0virtual:vinext-client-reference-chunks") host = output;
|
|
30
|
+
}
|
|
31
|
+
const staticImports = (chunk) => {
|
|
32
|
+
const seen = /* @__PURE__ */ new Set([chunk.fileName]);
|
|
33
|
+
const order = [chunk];
|
|
34
|
+
for (let i = 0; i < order.length; i++) for (const file of order[i].imports) {
|
|
35
|
+
const imported = chunks.get(file);
|
|
36
|
+
if (!imported || seen.has(file)) continue;
|
|
37
|
+
seen.add(file);
|
|
38
|
+
order.push(imported);
|
|
39
|
+
}
|
|
40
|
+
return order;
|
|
41
|
+
};
|
|
42
|
+
const eager = new Set(appBrowserEntry ? staticImports(appBrowserEntry).map((chunk) => chunk.fileName) : []);
|
|
43
|
+
const result = {
|
|
44
|
+
references: {},
|
|
45
|
+
modules: []
|
|
46
|
+
};
|
|
47
|
+
for (const chunk of chunks.values()) {
|
|
48
|
+
const keys = chunk.moduleIds.flatMap((moduleId) => moduleKeys.get(moduleId) ?? []);
|
|
49
|
+
if (keys.length === 0) continue;
|
|
50
|
+
const imports = [];
|
|
51
|
+
const css = /* @__PURE__ */ new Set();
|
|
52
|
+
const visited = /* @__PURE__ */ new Set();
|
|
53
|
+
const addDeps = (loaded) => {
|
|
54
|
+
if (visited.has(loaded.fileName)) return;
|
|
55
|
+
visited.add(loaded.fileName);
|
|
56
|
+
if (loaded !== chunk) imports.push(loaded.fileName);
|
|
57
|
+
for (const file of loaded.imports) {
|
|
58
|
+
const imported = chunks.get(file);
|
|
59
|
+
if (imported) addDeps(imported);
|
|
60
|
+
}
|
|
61
|
+
for (const file of loaded.viteMetadata?.importedCss ?? []) css.add(file);
|
|
62
|
+
};
|
|
63
|
+
addDeps(chunk);
|
|
64
|
+
let preloads = imports.length + css.size > 0 ? [chunk.fileName, ...imports] : [];
|
|
65
|
+
let stylesheets = [...css];
|
|
66
|
+
if (modulePreload === false) preloads = [];
|
|
67
|
+
else if (modulePreload?.resolveDependencies && host) {
|
|
68
|
+
const resolved = modulePreload.resolveDependencies(chunk.fileName, preloads, {
|
|
69
|
+
hostId: host.fileName,
|
|
70
|
+
hostType: "js"
|
|
71
|
+
});
|
|
72
|
+
preloads = resolved.filter((file) => !isStylesheet(file));
|
|
73
|
+
stylesheets = [.../* @__PURE__ */ new Set([...resolved.filter(isStylesheet), ...css])];
|
|
74
|
+
}
|
|
75
|
+
preloads = [...new Set(preloads)].filter((file) => !eager.has(file) && (file !== chunk.fileName || stylesheets.length > 0));
|
|
76
|
+
const index = result.modules.push({
|
|
77
|
+
file: chunk.fileName,
|
|
78
|
+
imports: preloads,
|
|
79
|
+
css: stylesheets
|
|
80
|
+
}) - 1;
|
|
81
|
+
for (const key of keys) result.references[key] = index;
|
|
82
|
+
}
|
|
83
|
+
return result.modules.length > 0 ? result : void 0;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Vite's build manifest keys a dynamic import by the module it imports, and
|
|
87
|
+
* next/dynamic's SSR preloads look up the module a boundary imports (see
|
|
88
|
+
* shims/dynamic-preload-chunks.tsx). The client build imports a client
|
|
89
|
+
* reference outside every group through the module that registers it, not
|
|
90
|
+
* the reference's own module, so map the reference's module to the chunk of
|
|
91
|
+
* the module that registers it, keyed as Vite keys a manifest entry.
|
|
92
|
+
*
|
|
93
|
+
* @param getImportedIds A module's static imports, as the bundler resolved
|
|
94
|
+
* them.
|
|
95
|
+
*/
|
|
96
|
+
function collectClientReferenceSources(bundle, getImportedIds, root) {
|
|
97
|
+
const sources = {};
|
|
98
|
+
for (const output of Object.values(bundle)) {
|
|
99
|
+
if (output.type !== "chunk") continue;
|
|
100
|
+
for (const moduleId of output.moduleIds) {
|
|
101
|
+
if (!moduleId.startsWith("\0virtual:vinext-client-reference-module/")) continue;
|
|
102
|
+
const source = getImportedIds(moduleId)?.at(-1);
|
|
103
|
+
if (source === void 0 || source.startsWith("\0")) continue;
|
|
104
|
+
const key = toManifestModuleId(root, source);
|
|
105
|
+
if (key) sources[key] = output.fileName;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return Object.keys(sources).length > 0 ? sources : void 0;
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { collectClientReferenceChunks, collectClientReferenceSources };
|
|
@@ -49,6 +49,13 @@ export type ClientReferencePreloadPlan = {
|
|
|
49
49
|
routes: Map<string, number[]>;
|
|
50
50
|
/** The files of a render without a route, as indices into `files`. */
|
|
51
51
|
routeless: number[];
|
|
52
|
+
/**
|
|
53
|
+
* References route files reach only through static imports, outside
|
|
54
|
+
* `always`. A render may stream one whose module evaluates asynchronously
|
|
55
|
+
* instead of waiting for it; a reference any dynamic import reaches, such as
|
|
56
|
+
* a `next/dynamic` component, always loads first.
|
|
57
|
+
*/
|
|
58
|
+
staticOnly: string[];
|
|
52
59
|
};
|
|
53
60
|
/**
|
|
54
61
|
* Plan which client references SSR loads before rendering each route. A route
|
|
@@ -160,4 +167,5 @@ export declare function planClientReferenceGroups(options: {
|
|
|
160
167
|
costs: ReadonlyMap<string, number | null>;
|
|
161
168
|
maxCostBytes: number;
|
|
162
169
|
}): ClientReferenceGroup[];
|
|
163
|
-
//#endregion
|
|
170
|
+
//#endregion
|
|
171
|
+
export {};
|
|
@@ -46,7 +46,13 @@ function interceptEntryIds(intercept) {
|
|
|
46
46
|
intercept.pagePath,
|
|
47
47
|
...intercept.layoutPaths,
|
|
48
48
|
...intercept.loadingPaths ?? [],
|
|
49
|
-
intercept.notFoundPath
|
|
49
|
+
intercept.notFoundPath,
|
|
50
|
+
intercept.forbiddenPath,
|
|
51
|
+
intercept.unauthorizedPath,
|
|
52
|
+
...intercept.notFoundPaths ?? [],
|
|
53
|
+
...intercept.forbiddenPaths ?? [],
|
|
54
|
+
...intercept.unauthorizedPaths ?? [],
|
|
55
|
+
...intercept.errorPaths ?? []
|
|
50
56
|
].filter((value) => typeof value === "string");
|
|
51
57
|
}
|
|
52
58
|
/**
|
|
@@ -221,11 +227,43 @@ function collectClientReferencePreloadPlan(options) {
|
|
|
221
227
|
const stopAt = /* @__PURE__ */ new Set([...fileIndices.keys(), ...[...interceptFiles, ...alwaysRoots].map(canonicalize)]);
|
|
222
228
|
const always = /* @__PURE__ */ new Set([...referencesReachedFrom(options.entryIds, stopAt), ...referencesReachedFrom(alwaysRoots)]);
|
|
223
229
|
for (const id of options.clientReferenceIds) if (!reached.has(id)) always.add(id);
|
|
230
|
+
const dynamicallyReached = /* @__PURE__ */ new Set();
|
|
231
|
+
const visited = /* @__PURE__ */ new Set();
|
|
232
|
+
const pending = [...options.entryIds.map(canonicalize), ...stopAt].map((id) => [
|
|
233
|
+
id,
|
|
234
|
+
false,
|
|
235
|
+
true
|
|
236
|
+
]);
|
|
237
|
+
while (pending.length > 0) {
|
|
238
|
+
const [id, dynamic, root] = pending.pop();
|
|
239
|
+
if (!root && stopAt.has(id)) continue;
|
|
240
|
+
const key = dynamic ? `dynamic:${id}` : id;
|
|
241
|
+
if (visited.has(key)) continue;
|
|
242
|
+
visited.add(key);
|
|
243
|
+
if (options.clientReferenceIds.has(id)) {
|
|
244
|
+
if (dynamic) dynamicallyReached.add(id);
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
const info = getModuleInfo(id);
|
|
248
|
+
if (!info) continue;
|
|
249
|
+
for (const imported of info.importedIds) pending.push([
|
|
250
|
+
imported,
|
|
251
|
+
dynamic,
|
|
252
|
+
false
|
|
253
|
+
]);
|
|
254
|
+
for (const imported of info.dynamicallyImportedIds) pending.push([
|
|
255
|
+
imported,
|
|
256
|
+
true,
|
|
257
|
+
false
|
|
258
|
+
]);
|
|
259
|
+
}
|
|
260
|
+
const staticOnly = [...new Set(files.flat())].filter((id) => !always.has(id) && !dynamicallyReached.has(id));
|
|
224
261
|
return {
|
|
225
262
|
always: [...always],
|
|
226
263
|
files,
|
|
227
264
|
routes,
|
|
228
|
-
routeless
|
|
265
|
+
routeless,
|
|
266
|
+
staticOnly
|
|
229
267
|
};
|
|
230
268
|
}
|
|
231
269
|
function importedName(kind, name) {
|
|
@@ -26,4 +26,5 @@ export declare function rebaseCssUrlAssetReferences(code: string, sourceDirector
|
|
|
26
26
|
* code only has the leaked marker stripped — no sibling files are emitted.
|
|
27
27
|
*/
|
|
28
28
|
export declare function restoreDedupedCssAssetReferences(bundle: CssUrlAssetBundle, emitRestoredAsset: EmitRestoredCssUrlAsset): void;
|
|
29
|
-
//#endregion
|
|
29
|
+
//#endregion
|
|
30
|
+
export {};
|
|
@@ -8,4 +8,5 @@ type AdjustFontFallback = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare function getFallbackFontOverrideMetrics(fontFamily: string): AdjustFontFallback | undefined;
|
|
10
10
|
export declare function buildFallbackFontFace(family: string, metrics: AdjustFontFallback): string;
|
|
11
|
-
//#endregion
|
|
11
|
+
//#endregion
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
//#region src/build/google-fonts/find-font-files-in-css.ts
|
|
2
|
+
const formatToExtension = /* @__PURE__ */ new Map([
|
|
3
|
+
["woff", "woff"],
|
|
4
|
+
["woff2", "woff2"],
|
|
5
|
+
["truetype", "ttf"],
|
|
6
|
+
["opentype", "otf"],
|
|
7
|
+
["embedded-opentype", "eot"]
|
|
8
|
+
]);
|
|
2
9
|
/**
|
|
3
10
|
* Find all font files in the CSS response and determine which files should be preloaded.
|
|
4
11
|
* In Google Fonts responses, the @font-face's subset is above it in a comment.
|
|
@@ -16,10 +23,16 @@ function findFontFilesInCss(css, subsetsToPreload) {
|
|
|
16
23
|
if (newSubset) currentSubset = newSubset;
|
|
17
24
|
else {
|
|
18
25
|
const googleFontFileUrl = /src: url\((.+?)\)/.exec(line)?.[1];
|
|
19
|
-
if (googleFontFileUrl && !fontFiles.some((foundFile) => foundFile.googleFontFileUrl === googleFontFileUrl))
|
|
20
|
-
googleFontFileUrl
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
if (googleFontFileUrl && !fontFiles.some((foundFile) => foundFile.googleFontFileUrl === googleFontFileUrl)) {
|
|
27
|
+
const pathname = googleFontFileUrl.split(/[?#]/, 1)[0];
|
|
28
|
+
const format = /format\(['"](.+?)['"]\)/.exec(line)?.[1];
|
|
29
|
+
const ext = /\.(woff|woff2|eot|ttf|otf)$/.exec(pathname)?.[1] ?? formatToExtension.get(format ?? "") ?? "woff2";
|
|
30
|
+
fontFiles.push({
|
|
31
|
+
googleFontFileUrl,
|
|
32
|
+
preloadFontFile: !!subsetsToPreload?.includes(currentSubset),
|
|
33
|
+
ext
|
|
34
|
+
});
|
|
35
|
+
}
|
|
23
36
|
}
|
|
24
37
|
}
|
|
25
38
|
return fontFiles;
|
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
type InlineCssManifest = Record<string, string>;
|
|
3
3
|
export declare function collectInlineCssManifest(clientDir: string, assetPrefix: string): InlineCssManifest;
|
|
4
4
|
export declare function injectInlineCssManifestGlobal(entryPath: string, manifest: InlineCssManifest): boolean;
|
|
5
|
-
//#endregion
|
|
5
|
+
//#endregion
|
|
6
|
+
export {};
|
|
@@ -18,4 +18,5 @@ export declare function getPagesManifestPage(pagesDir: string, filePath: string,
|
|
|
18
18
|
export declare function buildNextClientBuildManifestContent(rewrites: ResolvedNextConfig["rewrites"], pages: readonly string[]): string;
|
|
19
19
|
export declare function buildNextClientSsgManifestContent(): string;
|
|
20
20
|
export declare function emitNextClientRuntimeManifests(options: EmitNextClientRuntimeManifestsOptions): void;
|
|
21
|
-
//#endregion
|
|
21
|
+
//#endregion
|
|
22
|
+
export {};
|
|
@@ -2,8 +2,8 @@ import path from "../deps/.pnpm/pathslash@0.1.0/deps/pathslash/dist/index.js";
|
|
|
2
2
|
import { ASSET_PREFIX_URL_DIR } from "../utils/asset-prefix.js";
|
|
3
3
|
import { isPrecompressedVariantBeneficial } from "../utils/precompressed-variant.js";
|
|
4
4
|
import fsp from "node:fs/promises";
|
|
5
|
-
import { randomUUID } from "node:crypto";
|
|
6
5
|
import os from "node:os";
|
|
6
|
+
import { randomUUID } from "node:crypto";
|
|
7
7
|
import zlib from "node:zlib";
|
|
8
8
|
import { promisify } from "node:util";
|
|
9
9
|
//#region src/build/precompress.ts
|
|
@@ -94,4 +94,5 @@ type PrerenderPathDiscoveryOptions = {
|
|
|
94
94
|
export declare function matchesMiddlewareWarmPath(pathname: string, matcher: MatcherConfig | undefined, i18n: ResolvedNextConfig["i18n"]): boolean;
|
|
95
95
|
export declare function discoverPrerenderPathManifest(options: PrerenderPathDiscoveryOptions): Promise<PrerenderPathManifest | null>;
|
|
96
96
|
export declare function emitPrerenderPathManifest(options: PrerenderPathDiscoveryOptions): Promise<PrerenderPathManifest | null>;
|
|
97
|
-
//#endregion
|
|
97
|
+
//#endregion
|
|
98
|
+
export {};
|
|
@@ -2,8 +2,8 @@ import path from "../deps/.pnpm/pathslash@0.1.0/deps/pathslash/dist/index.js";
|
|
|
2
2
|
import { PHASE_PRODUCTION_BUILD } from "../shims/constants.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { fork } from "node:child_process";
|
|
6
5
|
import os from "node:os";
|
|
6
|
+
import { fork } from "node:child_process";
|
|
7
7
|
//#region src/build/prerender-server-pool.ts
|
|
8
8
|
/**
|
|
9
9
|
* Parallel prerender server pool.
|
|
@@ -171,8 +171,9 @@ type PrerenderAppOptionsInternal = PrerenderAppOptions & {
|
|
|
171
171
|
* Throws on partial or malformed embeds (chunks present but no done marker,
|
|
172
172
|
* tampered chunk JSON, etc.) — those are real vinext-internal regressions.
|
|
173
173
|
*
|
|
174
|
-
* Safe regex usage:
|
|
175
|
-
*
|
|
174
|
+
* Safe regex usage: scriptSafeJsonStringify (used by createRscEmbedTransform)
|
|
175
|
+
* escapes every '<' that begins "</script" (case-insensitive) in the embedded
|
|
176
|
+
* JSON, preventing false </script> matches.
|
|
176
177
|
*/
|
|
177
178
|
export declare function extractRscPayloadFromPrerenderedHtml(html: string): Uint8Array | null;
|
|
178
179
|
/**
|
package/dist/build/prerender.js
CHANGED
|
@@ -12,16 +12,16 @@ import { NoOpCacheHandler, getCacheHandler, setCacheHandler } from "../shims/cac
|
|
|
12
12
|
import { headersContextFromRequest, runWithHeadersContext } from "../shims/headers.js";
|
|
13
13
|
import { _consumeRequestScopedCacheLife } from "../shims/cache-request-state.js";
|
|
14
14
|
import { normalizeStaticPathsEntry } from "../routing/route-pattern.js";
|
|
15
|
-
import { createRscRequestUrl } from "../server/app-rsc-cache-busting.js";
|
|
16
15
|
import { readPrerenderSecret } from "./server-manifest.js";
|
|
17
16
|
import { buildPregeneratedConcretePathTable } from "../server/prerender-manifest.js";
|
|
18
17
|
import { concatUint8Arrays, decodeRscEmbeddedChunk } from "../server/app-rsc-embedded-chunks.js";
|
|
18
|
+
import { createRscRequestUrl } from "../server/app-rsc-cache-busting.js";
|
|
19
19
|
import { navigationRuntimeRscBootstrapExpression } from "../server/app-ssr-stream.js";
|
|
20
20
|
import { encodePrerenderRouteParams, serializePrerenderRouteParamsHeader } from "../server/prerender-route-params.js";
|
|
21
|
-
import { createAppPprFallbackShells, markAppPprDynamicFallbackShellHtml } from "../server/app-ppr-fallback-shell.js";
|
|
22
|
-
import { getAppRouteOutputPath, getOutputPath, getRscOutputPath } from "../utils/prerender-output-paths.js";
|
|
23
21
|
import { startProdServer } from "../server/prod-server.js";
|
|
24
22
|
import { prerenderPoolAvailable, resolvePrerenderPoolSize, startPrerenderServerPool } from "./prerender-server-pool.js";
|
|
23
|
+
import { getAppRouteOutputPath, getOutputPath, getRscOutputPath } from "../utils/prerender-output-paths.js";
|
|
24
|
+
import { createAppPprFallbackShells, markAppPprDynamicFallbackShellHtml } from "../server/app-ppr-fallback-shell.js";
|
|
25
25
|
import { enterPrerenderPhase } from "./prerender-phase.js";
|
|
26
26
|
import { buildAppRouteCacheValue } from "../server/app-route-handler-response.js";
|
|
27
27
|
import fs from "node:fs";
|
|
@@ -92,8 +92,9 @@ const RSC_RUNTIME_DONE_SCRIPT = `${RSC_RUNTIME_BOOTSTRAP_EXPRESSION}.done=true`;
|
|
|
92
92
|
* Throws on partial or malformed embeds (chunks present but no done marker,
|
|
93
93
|
* tampered chunk JSON, etc.) — those are real vinext-internal regressions.
|
|
94
94
|
*
|
|
95
|
-
* Safe regex usage:
|
|
96
|
-
*
|
|
95
|
+
* Safe regex usage: scriptSafeJsonStringify (used by createRscEmbedTransform)
|
|
96
|
+
* escapes every '<' that begins "<\/script" (case-insensitive) in the embedded
|
|
97
|
+
* JSON, preventing false <\/script> matches.
|
|
97
98
|
*/
|
|
98
99
|
function extractRscPayloadFromPrerenderedHtml(html) {
|
|
99
100
|
const scriptPattern = /<script(?:\s[^>]*)?>([\s\S]*?)<\/script>/gi;
|
package/dist/build/report.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AppRoute } from "../routing/app-route-graph.js";
|
|
2
|
-
import { LayoutBuildClassification } from "./layout-classification-types.js";
|
|
3
2
|
import { Route } from "../routing/pages-router.js";
|
|
4
3
|
import { PrerenderResult } from "./prerender.js";
|
|
5
4
|
//#region src/build/report.d.ts
|
|
@@ -77,19 +76,6 @@ export declare function extractExportConstNumber(code: string, name: string): nu
|
|
|
77
76
|
* null — no `revalidate` key found (fully static)
|
|
78
77
|
*/
|
|
79
78
|
export declare function extractGetStaticPropsRevalidate(code: string): number | false | null;
|
|
80
|
-
/**
|
|
81
|
-
* Classifies a layout file by its segment config exports (`dynamic`, `revalidate`).
|
|
82
|
-
*
|
|
83
|
-
* Returns a tagged `LayoutBuildClassification` carrying both the decision and
|
|
84
|
-
* the specific segment-config field that produced it. `{ kind: "absent" }`
|
|
85
|
-
* means no segment config is present and the caller should defer to the next
|
|
86
|
-
* layer (module graph analysis).
|
|
87
|
-
*
|
|
88
|
-
* Unlike page classification, positive `revalidate` values are not meaningful
|
|
89
|
-
* for layout skip decisions — ISR is a page-level concept. Only the extremes
|
|
90
|
-
* (`revalidate = 0` → dynamic, `revalidate = Infinity` → static) are decisive.
|
|
91
|
-
*/
|
|
92
|
-
export declare function classifyLayoutSegmentConfig(code: string): LayoutBuildClassification;
|
|
93
79
|
/**
|
|
94
80
|
* Classifies a Pages Router page file by reading its source and examining
|
|
95
81
|
* which data-fetching exports it contains.
|
|
@@ -163,4 +149,5 @@ export declare function printBuildReport(options: {
|
|
|
163
149
|
pageExtensions: string[];
|
|
164
150
|
prerenderResult?: PrerenderResult;
|
|
165
151
|
}): Promise<void>;
|
|
166
|
-
//#endregion
|
|
152
|
+
//#endregion
|
|
153
|
+
export {};
|
package/dist/build/report.js
CHANGED
|
@@ -392,56 +392,6 @@ function propertyName(key) {
|
|
|
392
392
|
return null;
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
395
|
-
* Classifies a layout file by its segment config exports (`dynamic`, `revalidate`).
|
|
396
|
-
*
|
|
397
|
-
* Returns a tagged `LayoutBuildClassification` carrying both the decision and
|
|
398
|
-
* the specific segment-config field that produced it. `{ kind: "absent" }`
|
|
399
|
-
* means no segment config is present and the caller should defer to the next
|
|
400
|
-
* layer (module graph analysis).
|
|
401
|
-
*
|
|
402
|
-
* Unlike page classification, positive `revalidate` values are not meaningful
|
|
403
|
-
* for layout skip decisions — ISR is a page-level concept. Only the extremes
|
|
404
|
-
* (`revalidate = 0` → dynamic, `revalidate = Infinity` → static) are decisive.
|
|
405
|
-
*/
|
|
406
|
-
function classifyLayoutSegmentConfig(code) {
|
|
407
|
-
const program = parseRouteModule(code);
|
|
408
|
-
const dynamicValue = program ? extractExportConstStringFromProgram(program, "dynamic") : null;
|
|
409
|
-
if (dynamicValue === "force-dynamic") return {
|
|
410
|
-
kind: "dynamic",
|
|
411
|
-
reason: {
|
|
412
|
-
layer: "segment-config",
|
|
413
|
-
key: "dynamic",
|
|
414
|
-
value: "force-dynamic"
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
if (dynamicValue === "force-static" || dynamicValue === "error") return {
|
|
418
|
-
kind: "static",
|
|
419
|
-
reason: {
|
|
420
|
-
layer: "segment-config",
|
|
421
|
-
key: "dynamic",
|
|
422
|
-
value: dynamicValue
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
const revalidateValue = program ? extractExportConstNumberFromProgram(program, "revalidate") : null;
|
|
426
|
-
if (revalidateValue === Infinity) return {
|
|
427
|
-
kind: "static",
|
|
428
|
-
reason: {
|
|
429
|
-
layer: "segment-config",
|
|
430
|
-
key: "revalidate",
|
|
431
|
-
value: Infinity
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
if (revalidateValue === 0) return {
|
|
435
|
-
kind: "dynamic",
|
|
436
|
-
reason: {
|
|
437
|
-
layer: "segment-config",
|
|
438
|
-
key: "revalidate",
|
|
439
|
-
value: 0
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
return { kind: "absent" };
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
395
|
* Classifies a Pages Router page file by reading its source and examining
|
|
446
396
|
* which data-fetching exports it contains.
|
|
447
397
|
*
|
|
@@ -675,4 +625,4 @@ async function printBuildReport(options) {
|
|
|
675
625
|
}
|
|
676
626
|
}
|
|
677
627
|
//#endregion
|
|
678
|
-
export { buildReportRows, classifyAppRoute, classifyAppRouteHandler,
|
|
628
|
+
export { buildReportRows, classifyAppRoute, classifyAppRouteHandler, classifyPagesRoute, extractExportConstNumber, extractExportConstString, extractGetStaticPropsRevalidate, extractMiddlewareMatcherConfig, extractMiddlewareMatcherConfigValue, formatBuildReport, getAppRouteRenderEntryPath, hasExportedName, hasNamedExport, hasRuntimeExportedName, printBuildReport };
|
|
@@ -59,4 +59,5 @@ export declare function assertNoFatalPrerenderRoutes(routes: readonly PrerenderR
|
|
|
59
59
|
* Statically generate routes and return the prerender result.
|
|
60
60
|
*/
|
|
61
61
|
export declare function runPrerender(options: RunPrerenderOptions): Promise<PrerenderResult | null>;
|
|
62
|
-
//#endregion
|
|
62
|
+
//#endregion
|
|
63
|
+
export {};
|
|
@@ -20,4 +20,5 @@ export declare function loadOrGenerateServerActionsEncryptionKey(options: LoadEn
|
|
|
20
20
|
* when `server.fs.strict` is false, which turns off Vite's file restrictions.
|
|
21
21
|
*/
|
|
22
22
|
export declare function getServerActionsKeyCacheFsDeny(configuredDeny: string[] | undefined): string[];
|
|
23
|
-
//#endregion
|
|
23
|
+
//#endregion
|
|
24
|
+
export {};
|
|
@@ -62,13 +62,36 @@ function augmentSsrManifestFromBundle(ssrManifest, bundle, root, base = "/") {
|
|
|
62
62
|
if (!nextManifest[normalizedKey]) nextManifest[normalizedKey] = /* @__PURE__ */ new Set();
|
|
63
63
|
for (const file of files) nextManifest[normalizedKey].add(collapseDuplicateBase(file, base));
|
|
64
64
|
}
|
|
65
|
+
const staticImportClosures = /* @__PURE__ */ new Map();
|
|
66
|
+
const getStaticImportClosure = (fileName) => {
|
|
67
|
+
let closure = staticImportClosures.get(fileName);
|
|
68
|
+
if (closure) return closure;
|
|
69
|
+
const files = /* @__PURE__ */ new Set();
|
|
70
|
+
const visit = (importer) => {
|
|
71
|
+
const chunk = bundle[importer];
|
|
72
|
+
if (chunk?.type !== "chunk") return;
|
|
73
|
+
for (const importedFile of chunk.imports ?? []) {
|
|
74
|
+
if (importedFile === fileName || files.has(importedFile)) continue;
|
|
75
|
+
files.add(importedFile);
|
|
76
|
+
visit(importedFile);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
visit(fileName);
|
|
80
|
+
closure = [...files];
|
|
81
|
+
staticImportClosures.set(fileName, closure);
|
|
82
|
+
return closure;
|
|
83
|
+
};
|
|
65
84
|
for (const item of Object.values(bundle)) {
|
|
66
85
|
if (item.type !== "chunk") continue;
|
|
67
86
|
const chunk = item;
|
|
68
|
-
if (chunk.fileName.endsWith(".js") &&
|
|
87
|
+
if (chunk.fileName.endsWith(".js") && isSharedClientChunkName(chunk.name)) sharedChunkFiles.add(manifestFileWithBase(chunk.fileName, base));
|
|
88
|
+
if (chunk.isEntry && isPagesClientEntryFacade(chunk.facadeModuleId)) {
|
|
89
|
+
sharedChunkFiles.add(manifestFileWithBase(chunk.fileName, base));
|
|
90
|
+
for (const importedFile of getStaticImportClosure(chunk.fileName)) sharedChunkFiles.add(manifestFileWithBase(importedFile, base));
|
|
91
|
+
}
|
|
69
92
|
const files = /* @__PURE__ */ new Set();
|
|
70
93
|
files.add(manifestFileWithBase(chunk.fileName, base));
|
|
71
|
-
for (const importedFile of chunk.
|
|
94
|
+
for (const importedFile of getStaticImportClosure(chunk.fileName)) files.add(manifestFileWithBase(importedFile, base));
|
|
72
95
|
for (const cssFile of chunk.viteMetadata?.importedCss ?? []) files.add(manifestFileWithBase(cssFile, base));
|
|
73
96
|
for (const assetFile of chunk.viteMetadata?.importedAssets ?? []) files.add(manifestFileWithBase(assetFile, base));
|
|
74
97
|
for (const moduleId of Object.keys(chunk.modules ?? {})) {
|
|
@@ -132,4 +132,5 @@ export declare function loadVinextCacheConfigFromViteConfig(vite: ViteConfigLoad
|
|
|
132
132
|
export declare function generateCacheAdaptersModule(cache?: VinextCacheConfig): string;
|
|
133
133
|
/** Generate request-stage registration without importing a configured data adapter. */
|
|
134
134
|
export declare function generateCdnCacheAdapterModule(cache?: VinextCacheConfig): string;
|
|
135
|
-
//#endregion
|
|
135
|
+
//#endregion
|
|
136
|
+
export {};
|
package/dist/cache.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { cacheForRequest };
|
|
1
|
+
export { cacheForRequest } from "./shims/cache-for-request.js";
|
package/dist/check.d.ts
CHANGED
package/dist/check.js
CHANGED
|
@@ -323,6 +323,10 @@ const CONFIG_SUPPORT = {
|
|
|
323
323
|
status: "partial",
|
|
324
324
|
detail: "experimental support; behavior is incomplete"
|
|
325
325
|
},
|
|
326
|
+
"experimental.cacheComponents": {
|
|
327
|
+
status: "partial",
|
|
328
|
+
detail: "legacy alias of cacheComponents; experimental support, behavior is incomplete"
|
|
329
|
+
},
|
|
326
330
|
"experimental.ppr": {
|
|
327
331
|
status: "unsupported",
|
|
328
332
|
detail: "removed in Next.js 16 and ignored; use cacheComponents"
|
|
@@ -434,7 +438,7 @@ const LIBRARY_SUPPORT = {
|
|
|
434
438
|
},
|
|
435
439
|
"next-intl": {
|
|
436
440
|
status: "supported",
|
|
437
|
-
detail: "createNextIntlPlugin is only optional with the request config at (src/)i18n/request.*; its experimental
|
|
441
|
+
detail: "createNextIntlPlugin is only optional with the request config at (src/)i18n/request.*; its experimental extract option doesn't work (it needs a webpack/Turbopack loader)"
|
|
438
442
|
},
|
|
439
443
|
"@clerk/nextjs": {
|
|
440
444
|
status: "supported",
|
package/dist/cli-args.d.ts
CHANGED
package/dist/cli.js
CHANGED
|
@@ -125,6 +125,7 @@ async function proxyVite(command) {
|
|
|
125
125
|
async function start() {
|
|
126
126
|
const parsed = parseArgs(rawArgs);
|
|
127
127
|
if (parsed.help) return printHelp("start");
|
|
128
|
+
if (!process.env.NODE_ENV) Reflect.set(process.env, "NODE_ENV", "production");
|
|
128
129
|
loadDotenv({
|
|
129
130
|
root: process.cwd(),
|
|
130
131
|
mode: "production"
|
|
@@ -194,6 +195,7 @@ async function check() {
|
|
|
194
195
|
async function typegen() {
|
|
195
196
|
const parsed = parseArgs(rawArgs);
|
|
196
197
|
if (parsed.help) return printHelp("typegen");
|
|
198
|
+
if (!process.env.NODE_ENV) Reflect.set(process.env, "NODE_ENV", "production");
|
|
197
199
|
const root = path.resolve(parsed.positionals?.[0] ?? process.cwd());
|
|
198
200
|
loadDotenv({
|
|
199
201
|
root,
|
|
@@ -282,6 +284,9 @@ function printHelp(cmd) {
|
|
|
282
284
|
(Response Store or Workers Cache, default: prompt with No)
|
|
283
285
|
--legacy-wrangler-cloudflare-init
|
|
284
286
|
Use the legacy Wrangler setup instead of cf
|
|
287
|
+
--ignore-wrangler-config
|
|
288
|
+
Set up cf even if a root Wrangler config exists
|
|
289
|
+
(use when it belongs to an unrelated Worker)
|
|
285
290
|
--cdn-cache <type> Cloudflare CDN cache: none, response-store, workers-cache,
|
|
286
291
|
static-assets, or data-cache
|
|
287
292
|
(default: none; response-store is the default cache choice)
|
|
@@ -11,7 +11,8 @@ function getMatcherRule(redirect) {
|
|
|
11
11
|
has: redirect.has,
|
|
12
12
|
missing: redirect.missing,
|
|
13
13
|
locale: redirect.locale,
|
|
14
|
-
basePath: redirect.basePath
|
|
14
|
+
basePath: redirect.basePath,
|
|
15
|
+
defaultLocaleVariant: redirect.defaultLocaleVariant
|
|
15
16
|
}];
|
|
16
17
|
matcherRules.set(redirect, rule);
|
|
17
18
|
}
|