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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NextRedirect, ResolvedNextConfig } from "../config/next-config.js";
|
|
2
2
|
import { ClientHasCondition } from "./client-rewrites.js";
|
|
3
3
|
//#region src/client/client-redirects.d.ts
|
|
4
|
-
type ClientRedirectFields = Pick<NextRedirect, "basePath" | "locale" | "source"> & {
|
|
4
|
+
type ClientRedirectFields = Pick<NextRedirect, "basePath" | "defaultLocaleVariant" | "locale" | "source"> & {
|
|
5
5
|
has?: ClientHasCondition[];
|
|
6
6
|
missing?: ClientHasCondition[];
|
|
7
7
|
};
|
|
@@ -16,7 +16,7 @@ type ClientRedirectFields = Pick<NextRedirect, "basePath" | "locale" | "source">
|
|
|
16
16
|
*/
|
|
17
17
|
export type ClientRedirect = (ClientRedirectFields & {
|
|
18
18
|
destination: string;
|
|
19
|
-
permanent
|
|
19
|
+
permanent?: boolean;
|
|
20
20
|
requiresServerEvaluation?: never;
|
|
21
21
|
}) | (ClientRedirectFields & {
|
|
22
22
|
destination?: never;
|
|
@@ -24,4 +24,5 @@ export type ClientRedirect = (ClientRedirectFields & {
|
|
|
24
24
|
requiresServerEvaluation: true;
|
|
25
25
|
});
|
|
26
26
|
export declare function toClientRedirects(redirects: ResolvedNextConfig["redirects"]): ClientRedirect[];
|
|
27
|
-
//#endregion
|
|
27
|
+
//#endregion
|
|
28
|
+
export {};
|
|
@@ -9,7 +9,8 @@ function toClientRedirect(redirect) {
|
|
|
9
9
|
has: clientHas?.length ? clientHas : void 0,
|
|
10
10
|
missing: clientMissing?.length ? clientMissing : void 0,
|
|
11
11
|
locale: redirect.locale,
|
|
12
|
-
basePath: redirect.basePath
|
|
12
|
+
basePath: redirect.basePath,
|
|
13
|
+
defaultLocaleVariant: redirect.defaultLocaleVariant
|
|
13
14
|
};
|
|
14
15
|
if (hasServerOnlyCondition) return {
|
|
15
16
|
...common,
|
|
@@ -28,4 +28,5 @@ export type ClientRewrites = {
|
|
|
28
28
|
};
|
|
29
29
|
export declare function isClientHasCondition(condition: HasCondition): condition is ClientHasCondition;
|
|
30
30
|
export declare function toClientRewrites(rewrites: ResolvedNextConfig["rewrites"]): ClientRewrites;
|
|
31
|
-
//#endregion
|
|
31
|
+
//#endregion
|
|
32
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNavigationSignalError } from "../utils/navigation-signal.js";
|
|
2
|
-
import { VINEXT_DEV_ERROR_RECOVERY_EVENT } from "../utils/dev-error-recovery-event.js";
|
|
3
2
|
import { VINEXT_ORIGINAL_STACK_TRACE_ENDPOINT } from "../utils/dev-stack-sourcemap-endpoint.js";
|
|
4
3
|
import { dismissOverlay, expandOverlay, getOverlaySnapshot, minimizeOverlay, reportToOverlay, setOverlayIndex, subscribeOverlay, updateOverlayErrorStack } from "./dev-error-overlay-store.js";
|
|
4
|
+
import { VINEXT_DEV_ERROR_RECOVERY_EVENT } from "../utils/dev-error-recovery-event.js";
|
|
5
5
|
import { Fragment, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { createRoot } from "react-dom/client";
|
package/dist/client/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { getVinextReact };
|
|
1
|
+
export { getVinextReact } from "./react-instance.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
//#region src/client/instrumentation-client-state.ts
|
|
2
|
-
|
|
2
|
+
const VINEXT_CLIENT_INSTRUMENTATION_HOOKS = Symbol.for("vinext.client.instrumentationHooks");
|
|
3
3
|
function normalizeClientInstrumentationHooks(hooks) {
|
|
4
4
|
return Object.values(hooks).some((value) => typeof value === "function") ? hooks : null;
|
|
5
5
|
}
|
|
6
6
|
function setClientInstrumentationHooks(hooks) {
|
|
7
|
-
|
|
8
|
-
return
|
|
7
|
+
Reflect.set(globalThis, VINEXT_CLIENT_INSTRUMENTATION_HOOKS, hooks);
|
|
8
|
+
return hooks;
|
|
9
9
|
}
|
|
10
10
|
function getClientInstrumentationHooks() {
|
|
11
|
-
return
|
|
11
|
+
return Reflect.get(globalThis, VINEXT_CLIENT_INSTRUMENTATION_HOOKS) ?? null;
|
|
12
12
|
}
|
|
13
13
|
function notifyAppRouterTransitionStart(href, navigationType) {
|
|
14
|
-
|
|
14
|
+
getClientInstrumentationHooks()?.onRouterTransitionStart?.(href, navigationType);
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
17
|
export { getClientInstrumentationHooks, normalizeClientInstrumentationHooks, notifyAppRouterTransitionStart, setClientInstrumentationHooks };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BrowserRouteManifest, BrowserRouteManifestWire } from "../routing/browser-route-manifest.js";
|
|
2
2
|
import { AppRouterScrollIntent } from "../shims/app-router-scroll-state.js";
|
|
3
|
+
import { CachedRscResponse } from "../shims/navigation.js";
|
|
3
4
|
//#region src/client/navigation-runtime.d.ts
|
|
4
5
|
type NavigationRuntimeSnapshot = {
|
|
5
6
|
pathname: string;
|
|
@@ -42,7 +43,9 @@ type NavigationRuntimeTraversalIntent = {
|
|
|
42
43
|
};
|
|
43
44
|
export type NavigationRuntimeNavigate = (href: string, redirectDepth?: number, navigationKind?: NavigationRuntimeKind, historyUpdateMode?: NavigationRuntimeHistoryUpdateMode, previousNextUrlOverride?: string | null, programmaticTransition?: boolean, traversalIntent?: NavigationRuntimeTraversalIntent, scrollIntent?: AppRouterScrollIntent | null, visibleCommitMode?: NavigationRuntimeVisibleCommitMode, bypassNavigationCache?: boolean) => Promise<void>;
|
|
44
45
|
export type NavigationRuntimeFunctions = {
|
|
45
|
-
clearNavigationCaches?: (
|
|
46
|
+
clearNavigationCaches?: (options?: {
|
|
47
|
+
pingVisibleLinks?: boolean;
|
|
48
|
+
}) => void;
|
|
46
49
|
commitHashNavigation?: (href: string, historyUpdateMode: NavigationRuntimeHistoryUpdateMode, scroll: boolean) => void;
|
|
47
50
|
navigateExternal?: (href: string, historyUpdateMode: NavigationRuntimeHistoryUpdateMode) => Promise<void>;
|
|
48
51
|
navigate?: NavigationRuntimeNavigate;
|
|
@@ -57,6 +60,15 @@ export type NavigationRuntimeFunctions = {
|
|
|
57
60
|
notifyLinkNavigationStart?: () => void;
|
|
58
61
|
pingVisibleLinks?: () => void;
|
|
59
62
|
preparePrefetchResponse?: (response: Response) => Promise<unknown>;
|
|
63
|
+
/**
|
|
64
|
+
* The visited (BFCache) response a full prefetch can be fulfilled from, and
|
|
65
|
+
* until when a navigation would still reuse it (null if it wouldn't).
|
|
66
|
+
*/
|
|
67
|
+
readVisitedResponseForFullPrefetch?: (rscUrls: readonly string[], interceptionContext: string | null, mountedSlotsHeader: string | null) => {
|
|
68
|
+
navigatedAt: number;
|
|
69
|
+
navigationFreshUntil: number | null;
|
|
70
|
+
response: CachedRscResponse;
|
|
71
|
+
} | null;
|
|
60
72
|
claimCurrentHistoryTreeSnapshot?: (historyUpdateMode: NavigationRuntimeHistoryUpdateMode, previousHistoryState: unknown) => void;
|
|
61
73
|
commitAppOwnedHistoryStateWrite?: (historyUpdateMode: NavigationRuntimeHistoryUpdateMode, previousHistoryState: unknown) => void;
|
|
62
74
|
/**
|
|
@@ -86,6 +98,7 @@ export type NavigationRuntime = {
|
|
|
86
98
|
functions: NavigationRuntimeFunctions;
|
|
87
99
|
};
|
|
88
100
|
export declare const NAVIGATION_RUNTIME_KEY: unique symbol;
|
|
101
|
+
export declare function isNavigationRuntimeFunctions(value: unknown): value is NavigationRuntimeFunctions;
|
|
89
102
|
export declare function getNavigationRuntime(): NavigationRuntime | null;
|
|
90
103
|
export declare function registerNavigationRuntimeBootstrap(bootstrap: Partial<NavigationRuntimeBootstrap>): NavigationRuntime;
|
|
91
104
|
export declare function registerNavigationRuntimeFunctions(functions: Partial<NavigationRuntimeFunctions>): NavigationRuntime;
|
|
@@ -119,4 +132,5 @@ export declare function hasAppNavigationRuntime(): boolean;
|
|
|
119
132
|
* tag) should call this instead.
|
|
120
133
|
*/
|
|
121
134
|
export declare function hasAppNavigationRuntimeBootstrap(): boolean;
|
|
122
|
-
//#endregion
|
|
135
|
+
//#endregion
|
|
136
|
+
export {};
|
|
@@ -26,7 +26,7 @@ function readRuntimeWindow() {
|
|
|
26
26
|
}
|
|
27
27
|
function isNavigationRuntimeFunctions(value) {
|
|
28
28
|
if (!isUnknownRecord(value)) return false;
|
|
29
|
-
return isOptionalRuntimeFunction(Reflect.get(value, "clearNavigationCaches")) && isOptionalRuntimeFunction(Reflect.get(value, "commitHashNavigation")) && isOptionalRuntimeFunction(Reflect.get(value, "navigateExternal")) && isOptionalRuntimeFunction(Reflect.get(value, "navigate")) && isOptionalRuntimeFunction(Reflect.get(value, "getPrefetchRouterState")) && isOptionalRuntimeFunction(Reflect.get(value, "notifyLinkNavigationStart")) && isOptionalRuntimeFunction(Reflect.get(value, "pingVisibleLinks")) && isOptionalRuntimeFunction(Reflect.get(value, "preparePrefetchResponse")) && isOptionalRuntimeFunction(Reflect.get(value, "claimCurrentHistoryTreeSnapshot")) && isOptionalRuntimeFunction(Reflect.get(value, "commitAppOwnedHistoryStateWrite")) && isOptionalRuntimeFunction(Reflect.get(value, "discardPendingNavigation")) && isOptionalRuntimeFunction(Reflect.get(value, "flushCommittingNavigationUrl")) && isOptionalRuntimeFunction(Reflect.get(value, "loadRouteManifest"));
|
|
29
|
+
return isOptionalRuntimeFunction(Reflect.get(value, "clearNavigationCaches")) && isOptionalRuntimeFunction(Reflect.get(value, "commitHashNavigation")) && isOptionalRuntimeFunction(Reflect.get(value, "navigateExternal")) && isOptionalRuntimeFunction(Reflect.get(value, "navigate")) && isOptionalRuntimeFunction(Reflect.get(value, "getPrefetchRouterState")) && isOptionalRuntimeFunction(Reflect.get(value, "notifyLinkNavigationStart")) && isOptionalRuntimeFunction(Reflect.get(value, "pingVisibleLinks")) && isOptionalRuntimeFunction(Reflect.get(value, "preparePrefetchResponse")) && isOptionalRuntimeFunction(Reflect.get(value, "readVisitedResponseForFullPrefetch")) && isOptionalRuntimeFunction(Reflect.get(value, "claimCurrentHistoryTreeSnapshot")) && isOptionalRuntimeFunction(Reflect.get(value, "commitAppOwnedHistoryStateWrite")) && isOptionalRuntimeFunction(Reflect.get(value, "discardPendingNavigation")) && isOptionalRuntimeFunction(Reflect.get(value, "flushCommittingNavigationUrl")) && isOptionalRuntimeFunction(Reflect.get(value, "loadRouteManifest"));
|
|
30
30
|
}
|
|
31
31
|
function isNavigationRuntimeRscChunk(value) {
|
|
32
32
|
if (typeof value === "string") return true;
|
|
@@ -200,4 +200,4 @@ function hasAppNavigationRuntimeBootstrap() {
|
|
|
200
200
|
return getNavigationRuntime() !== null;
|
|
201
201
|
}
|
|
202
202
|
//#endregion
|
|
203
|
-
export { NAVIGATION_RUNTIME_KEY, createNavigationRuntimeRouteManifestLoader, ensureNavigationRuntimeRscBootstrap, getNavigationRuntime, hasAppNavigationRuntime, hasAppNavigationRuntimeBootstrap, loadNavigationRuntimeRouteManifest, registerNavigationRuntimeBootstrap, registerNavigationRuntimeFunctions };
|
|
203
|
+
export { NAVIGATION_RUNTIME_KEY, createNavigationRuntimeRouteManifestLoader, ensureNavigationRuntimeRscBootstrap, getNavigationRuntime, hasAppNavigationRuntime, hasAppNavigationRuntimeBootstrap, isNavigationRuntimeFunctions, loadNavigationRuntimeRouteManifest, registerNavigationRuntimeBootstrap, registerNavigationRuntimeFunctions };
|
|
@@ -5,10 +5,33 @@ export type VinextLinkPrefetchRoute = {
|
|
|
5
5
|
documentOnly?: boolean;
|
|
6
6
|
isDynamic: boolean;
|
|
7
7
|
patternParts: string[];
|
|
8
|
+
/**
|
|
9
|
+
* The route's segment config rules out static generation, so Next.js
|
|
10
|
+
* renders it on every request, and its automatic prefetch never renders the
|
|
11
|
+
* page. Read at build time. Never set with Cache Components: segment config
|
|
12
|
+
* doesn't decide what renders dynamically there, so an automatic prefetch of
|
|
13
|
+
* a dynamic route without a loading boundary still renders its page
|
|
14
|
+
* (Next.js prefetches its static shell instead).
|
|
15
|
+
*/
|
|
16
|
+
rendersDynamically?: true;
|
|
17
|
+
/**
|
|
18
|
+
* Intercepting pages that can render a URL of this route under a matching
|
|
19
|
+
* interception context. Next.js builds each as its own route, so its
|
|
20
|
+
* `rendersDynamically` replaces the route's own then. Set only alongside
|
|
21
|
+
* `rendersDynamically` classification.
|
|
22
|
+
*/
|
|
23
|
+
intercepts?: VinextLinkPrefetchIntercept[];
|
|
8
24
|
requiresDynamicNavigationRequest?: boolean;
|
|
9
25
|
/** The route has dynamic params above its root layout. */
|
|
10
26
|
hasRootParams?: true;
|
|
11
27
|
};
|
|
28
|
+
export type VinextLinkPrefetchIntercept = {
|
|
29
|
+
/** The URL pattern of the route the interception context must be on, or below. */
|
|
30
|
+
sourcePatternParts: string[];
|
|
31
|
+
/** The URL pattern the intercepting page intercepts. */
|
|
32
|
+
targetPatternParts: string[];
|
|
33
|
+
rendersDynamically?: true;
|
|
34
|
+
};
|
|
12
35
|
/**
|
|
13
36
|
* Pages Router route pattern exposed to the client so the App Router's
|
|
14
37
|
* navigation runtime can decide whether a soft-navigated URL should be
|
|
@@ -49,4 +72,5 @@ type VinextLocaleGlobalTarget = {
|
|
|
49
72
|
export declare function extractVinextNextDataJson(html: string): string | null;
|
|
50
73
|
export declare function parseVinextNextDataJson(json: string): BrowserVinextNextData;
|
|
51
74
|
export declare function applyVinextLocaleGlobals(target: VinextLocaleGlobalTarget, nextData: VinextNextData): void;
|
|
52
|
-
//#endregion
|
|
75
|
+
//#endregion
|
|
76
|
+
export {};
|
|
@@ -55,7 +55,7 @@ export declare function checkHasConditions(has: HasCondition[] | undefined, miss
|
|
|
55
55
|
*/
|
|
56
56
|
export type RedirectMatch = {
|
|
57
57
|
destination: string;
|
|
58
|
-
|
|
58
|
+
statusCode: number;
|
|
59
59
|
destinationQuery: RedirectDestinationQueryPart[];
|
|
60
60
|
};
|
|
61
61
|
/**
|
|
@@ -157,6 +157,17 @@ export declare function sanitizeDestination(dest: string): string;
|
|
|
157
157
|
* https://github.com/vercel/next.js/blob/canary/packages/next/src/server/server-route-utils.ts
|
|
158
158
|
*/
|
|
159
159
|
export declare function preserveRedirectDestinationQuery(destination: string, requestSearch: string, destinationQuery?: RedirectDestinationQueryPart[]): string;
|
|
160
|
+
/**
|
|
161
|
+
* Percent-encode what a config-redirect `Location` header cannot carry.
|
|
162
|
+
*
|
|
163
|
+
* The destination template was already parsed like a URL by matchRedirect, so
|
|
164
|
+
* its literal path, hash and host are encoded as Next.js sends them. Captures
|
|
165
|
+
* and the destination query are inserted verbatim, like Next.js, so they can
|
|
166
|
+
* still hold control or non-ASCII characters. Next.js writes those raw and its
|
|
167
|
+
* Node server answers 500 for a character above U+00FF (the Headers
|
|
168
|
+
* constructor throws the same way); vinext percent-encodes them instead.
|
|
169
|
+
*/
|
|
170
|
+
export declare function encodeRedirectLocation(location: string): string;
|
|
160
171
|
/**
|
|
161
172
|
* Proxy an incoming request to an external URL and return the upstream response.
|
|
162
173
|
*
|
|
@@ -388,10 +388,13 @@ function matchRedirect(pathname, redirects, ctx, basePathState = _BASEPATH_DEFAU
|
|
|
388
388
|
onRuleSourceMatch?.(redirect);
|
|
389
389
|
const conditionParams = redirect.has || redirect.missing ? collectConditionParams(redirect.has, redirect.missing, ctx) : _emptyParams();
|
|
390
390
|
if (!conditionParams) continue;
|
|
391
|
-
localeMatch =
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
localeMatch = {
|
|
392
|
+
redirect,
|
|
393
|
+
params: {
|
|
394
|
+
[entry.paramName]: "",
|
|
395
|
+
...conditionParams
|
|
396
|
+
}
|
|
397
|
+
};
|
|
395
398
|
localeMatchIndex = entry.originalIndex;
|
|
396
399
|
break;
|
|
397
400
|
}
|
|
@@ -408,10 +411,13 @@ function matchRedirect(pathname, redirects, ctx, basePathState = _BASEPATH_DEFAU
|
|
|
408
411
|
onRuleSourceMatch?.(redirect);
|
|
409
412
|
const conditionParams = redirect.has || redirect.missing ? collectConditionParams(redirect.has, redirect.missing, ctx) : _emptyParams();
|
|
410
413
|
if (!conditionParams) continue;
|
|
411
|
-
localeMatch =
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
414
|
+
localeMatch = {
|
|
415
|
+
redirect,
|
|
416
|
+
params: {
|
|
417
|
+
[entry.paramName]: localePart,
|
|
418
|
+
...conditionParams
|
|
419
|
+
}
|
|
420
|
+
};
|
|
415
421
|
localeMatchIndex = entry.originalIndex;
|
|
416
422
|
break;
|
|
417
423
|
}
|
|
@@ -428,10 +434,10 @@ function matchRedirect(pathname, redirects, ctx, basePathState = _BASEPATH_DEFAU
|
|
|
428
434
|
return resolveRedirectMatch(redirect, {
|
|
429
435
|
...params,
|
|
430
436
|
...conditionParams
|
|
431
|
-
});
|
|
437
|
+
}, basePathState);
|
|
432
438
|
}
|
|
433
439
|
}
|
|
434
|
-
return localeMatch;
|
|
440
|
+
return localeMatch && resolveRedirectMatch(localeMatch.redirect, localeMatch.params, basePathState);
|
|
435
441
|
}
|
|
436
442
|
/**
|
|
437
443
|
* Apply rewrite rules from next.config.js.
|
|
@@ -492,11 +498,83 @@ function matchesRewriteSource(pathname, rewrite, basePathState = _BASEPATH_DEFAU
|
|
|
492
498
|
function substituteAndSanitizeDestination(destination, params, kind) {
|
|
493
499
|
return sanitizeDestination(substituteDestinationParams(destination, params, kind));
|
|
494
500
|
}
|
|
495
|
-
|
|
501
|
+
/**
|
|
502
|
+
* Prepare a redirect destination template as Next.js does before substituting
|
|
503
|
+
* params. processRoutes (load-custom-routes.ts) prefixes a local destination
|
|
504
|
+
* with the basePath (a bare `/` becomes the basePath, except on the
|
|
505
|
+
* default-locale variant), then parseDestination (prepare-destination.ts) parses it
|
|
506
|
+
* with the URL parser, its param tokens escaped so they survive. This trims
|
|
507
|
+
* whitespace, resolves dot segments and backslashes, percent-encodes the path
|
|
508
|
+
* and hash, punycodes the host, drops an empty query or hash, and throws (a
|
|
509
|
+
* 500) on an invalid absolute URL. Captures are substituted afterwards, so the
|
|
510
|
+
* parser never sees them. The query text is kept verbatim, as
|
|
511
|
+
* preserveRedirectDestinationQuery emits it.
|
|
512
|
+
*/
|
|
513
|
+
function parseRedirectDestinationTemplate(redirect, params, { basePath, hadBasePath }) {
|
|
514
|
+
let template = redirect.destination;
|
|
515
|
+
const isLocal = template.startsWith("/");
|
|
516
|
+
if (isLocal && basePath && hadBasePath) template = template === "/" && !redirect.defaultLocaleVariant ? basePath : basePath + template;
|
|
517
|
+
template = template.replace(LOCATION_STRIPPED_RE, "");
|
|
518
|
+
let marker = "__ESC_COLON_";
|
|
519
|
+
while (template.toLowerCase().includes(marker.toLowerCase())) marker = `_${marker}`;
|
|
520
|
+
const paramValues = Object.values(params);
|
|
521
|
+
let literalColon = "__ESC_LITERAL_COLON_";
|
|
522
|
+
while (template.includes(literalColon) || paramValues.some((value) => value.includes(literalColon))) literalColon = `_${literalColon}`;
|
|
523
|
+
const keys = Object.keys(params).sort((a, b) => b.length - a.length);
|
|
524
|
+
const keyPattern = keys.map((key) => key.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
525
|
+
const escaped = keys.length === 0 ? template : template.replace(new RegExp(`\\\\.|:(${keyPattern})(?![A-Za-z0-9_])`, "gs"), (match, key) => key ? `${marker}${key}` : match);
|
|
526
|
+
const consumeEscapes = (value) => value.replace(/\\(.)/gs, (_, char) => char === ":" ? literalColon : char);
|
|
527
|
+
let url;
|
|
528
|
+
try {
|
|
529
|
+
url = isLocal ? new URL(`http://n${escaped}`) : new URL(escaped);
|
|
530
|
+
} catch {
|
|
531
|
+
return {
|
|
532
|
+
template,
|
|
533
|
+
literalColon,
|
|
534
|
+
parsed: false
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
const hash = url.hash;
|
|
538
|
+
url.search = "";
|
|
539
|
+
url.hash = "";
|
|
540
|
+
const hashIndex = template.indexOf("#");
|
|
541
|
+
const beforeHash = hashIndex === -1 ? template : template.slice(0, hashIndex);
|
|
542
|
+
const queryIndex = beforeHash.indexOf("?");
|
|
543
|
+
const query = queryIndex === -1 ? "" : beforeHash.slice(queryIndex);
|
|
544
|
+
let base = isLocal ? url.pathname : url.href;
|
|
545
|
+
if (!isLocal && (url.username || url.password)) {
|
|
546
|
+
const auth = url.username ? `${encodeURIComponent(url.password ? `${url.username}:${url.password}` : url.username).replace(/%3A/i, ":")}@` : "";
|
|
547
|
+
url.username = "";
|
|
548
|
+
url.password = "";
|
|
549
|
+
base = url.href.replace("//", `//${auth}`);
|
|
550
|
+
}
|
|
551
|
+
if (!isLocal && !SPECIAL_SCHEME_RE.test(url.protocol)) base = base.slice(0, base.length - url.pathname.length) + consumeEscapes(url.pathname);
|
|
552
|
+
const markerRe = new RegExp(`${marker}(${keyPattern})`, "gi");
|
|
553
|
+
const unescape = (value) => keys.length === 0 ? value : value.replace(markerRe, (_, key) => `:${keys.includes(key) ? key : keys.find((k) => k.toLowerCase() === key.toLowerCase())}`);
|
|
554
|
+
return {
|
|
555
|
+
template: `${unescape(base)}${/^\?&*$/.test(query) ? "" : query}${unescape(consumeEscapes(hash))}`,
|
|
556
|
+
literalColon,
|
|
557
|
+
parsed: true
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
const SPECIAL_SCHEME_RE = /^(?:https?|wss?|ftp|file):$/;
|
|
561
|
+
const REDIRECT_ORIGIN_RE = /^[A-Za-z][A-Za-z0-9+.-]*:\/\/[^/?#]*/;
|
|
562
|
+
/**
|
|
563
|
+
* Next.js resolve-routes.ts runs normalizeRepeatedSlashes on the prepared
|
|
564
|
+
* destination's pathname, after params are substituted: backslashes become
|
|
565
|
+
* `/` and runs of slashes collapse, so a basePath-prefixed `//target`
|
|
566
|
+
* becomes `/docs/target`. `destination` starts at the pathname.
|
|
567
|
+
*/
|
|
568
|
+
function normalizeRedirectPathnameSlashes(destination) {
|
|
569
|
+
return destination.replace(/^[^?#]*/, (pathname) => pathname.replace(/\\/g, "/").replace(/\/\/+/g, "/"));
|
|
570
|
+
}
|
|
571
|
+
function resolveRedirectMatch(redirect, params, basePathState) {
|
|
572
|
+
const { template: destination, literalColon, parsed } = parseRedirectDestinationTemplate(redirect, params, basePathState);
|
|
573
|
+
const origin = REDIRECT_ORIGIN_RE.exec(destination)?.[0] ?? "";
|
|
496
574
|
return {
|
|
497
|
-
destination: substituteAndSanitizeDestination(redirect.destination, params, "redirect"),
|
|
498
|
-
|
|
499
|
-
destinationQuery: substituteRedirectDestinationQuery(
|
|
575
|
+
destination: (!parsed ? substituteAndSanitizeDestination(destination, params, "redirect") : origin ? substituteDestinationParams(origin, params, "redirect") + normalizeRedirectPathnameSlashes(substituteDestinationParams(destination.slice(origin.length), params, "redirect")) : normalizeRedirectPathnameSlashes(substituteAndSanitizeDestination(destination, params, "redirect"))).replaceAll(literalColon, ":"),
|
|
576
|
+
statusCode: redirect.statusCode || (redirect.permanent ? 308 : 307),
|
|
577
|
+
destinationQuery: substituteRedirectDestinationQuery(destination, params)
|
|
500
578
|
};
|
|
501
579
|
}
|
|
502
580
|
/**
|
|
@@ -639,6 +717,22 @@ function preserveRedirectDestinationQuery(destination, requestSearch, destinatio
|
|
|
639
717
|
}).flat().join("&");
|
|
640
718
|
return mergedQuery === "" ? `${pathPart}${hash}` : `${pathPart}?${mergedQuery}${hash}`;
|
|
641
719
|
}
|
|
720
|
+
const LOCATION_STRIPPED_RE = /^[\u0000- ]+|[\u0000- ]+$|[\t\n\r]/g;
|
|
721
|
+
const LOCATION_UNSAFE_RE = /[\u0000-\u0008\u000A-\u001F\u007F]|[^\u0000-\u007F]/gu;
|
|
722
|
+
const LONE_SURROGATE_RE = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;
|
|
723
|
+
/**
|
|
724
|
+
* Percent-encode what a config-redirect `Location` header cannot carry.
|
|
725
|
+
*
|
|
726
|
+
* The destination template was already parsed like a URL by matchRedirect, so
|
|
727
|
+
* its literal path, hash and host are encoded as Next.js sends them. Captures
|
|
728
|
+
* and the destination query are inserted verbatim, like Next.js, so they can
|
|
729
|
+
* still hold control or non-ASCII characters. Next.js writes those raw and its
|
|
730
|
+
* Node server answers 500 for a character above U+00FF (the Headers
|
|
731
|
+
* constructor throws the same way); vinext percent-encodes them instead.
|
|
732
|
+
*/
|
|
733
|
+
function encodeRedirectLocation(location) {
|
|
734
|
+
return location.replace(LONE_SURROGATE_RE, "�").replace(LOCATION_UNSAFE_RE, encodeURIComponent);
|
|
735
|
+
}
|
|
642
736
|
function parseExternalRewriteUrl(externalUrl) {
|
|
643
737
|
try {
|
|
644
738
|
return new URL(externalUrl);
|
|
@@ -901,7 +995,8 @@ function applyLocaleToRoutes(routes, i18n, type, options = {}) {
|
|
|
901
995
|
const localizedSource = `/${locale}${suffixFor(r.source)}`;
|
|
902
996
|
out.push({
|
|
903
997
|
...r,
|
|
904
|
-
source: localizedSource
|
|
998
|
+
source: localizedSource,
|
|
999
|
+
...type === "redirect" ? { defaultLocaleVariant: true } : {}
|
|
905
1000
|
});
|
|
906
1001
|
}
|
|
907
1002
|
const internalSource = `${internalLocale}${suffixFor(r.source)}`;
|
|
@@ -918,4 +1013,4 @@ function applyLocaleToRoutes(routes, i18n, type, options = {}) {
|
|
|
918
1013
|
return out;
|
|
919
1014
|
}
|
|
920
1015
|
//#endregion
|
|
921
|
-
export { applyLocaleToRoutes, applyMiddlewareRequestHeaders, checkHasConditions, configSourceError, isExternalUrl, matchConfigPattern, matchHeaders, matchRedirect, matchRewrite, matchesRewriteSource, normalizeHost, parseCookies, preserveRedirectDestinationQuery, proxyExternalRequest, requestContextFromRequest, sanitizeDestination };
|
|
1016
|
+
export { applyLocaleToRoutes, applyMiddlewareRequestHeaders, checkHasConditions, configSourceError, encodeRedirectLocation, isExternalUrl, matchConfigPattern, matchHeaders, matchRedirect, matchRewrite, matchesRewriteSource, normalizeHost, parseCookies, preserveRedirectDestinationQuery, proxyExternalRequest, requestContextFromRequest, sanitizeDestination };
|
package/dist/config/dotenv.d.ts
CHANGED
|
@@ -47,4 +47,5 @@ export declare function getDotenvFiles(mode: string): string[];
|
|
|
47
47
|
* commands (which don't go through Vite at all), this is the only loading.
|
|
48
48
|
*/
|
|
49
49
|
export declare function loadDotenv({ root, mode, processEnv }: LoadDotenvOptions): LoadDotenvResult;
|
|
50
|
-
//#endregion
|
|
50
|
+
//#endregion
|
|
51
|
+
export {};
|
|
@@ -18,7 +18,13 @@ export type HasCondition = {
|
|
|
18
18
|
export type NextRedirect = {
|
|
19
19
|
source: string;
|
|
20
20
|
destination: string;
|
|
21
|
-
|
|
21
|
+
/** `true` answers 308, `false` 307. Ignored when `statusCode` is set. */
|
|
22
|
+
permanent?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Explicit redirect status, taking precedence over `permanent` as in Next.js
|
|
25
|
+
* `getRedirectStatus` (lib/redirect-status.ts).
|
|
26
|
+
*/
|
|
27
|
+
statusCode?: 301 | 302 | 303 | 307 | 308;
|
|
22
28
|
has?: HasCondition[];
|
|
23
29
|
missing?: HasCondition[];
|
|
24
30
|
/**
|
|
@@ -36,6 +42,12 @@ export type NextRedirect = {
|
|
|
36
42
|
* `.nextjs-ref/packages/next/src/lib/load-custom-routes.ts:26`.
|
|
37
43
|
*/
|
|
38
44
|
basePath?: false;
|
|
45
|
+
/**
|
|
46
|
+
* Internal: set by `applyLocaleToRoutes` on the `/${defaultLocale}` variant.
|
|
47
|
+
* Next.js `processRoutes` prefixes that variant's destination with the
|
|
48
|
+
* basePath without turning a bare `/` into the bare basePath.
|
|
49
|
+
*/
|
|
50
|
+
defaultLocaleVariant?: true;
|
|
39
51
|
};
|
|
40
52
|
export type NextRewrite = {
|
|
41
53
|
source: string;
|
|
@@ -90,6 +102,18 @@ export type MdxOptions = {
|
|
|
90
102
|
rehypePlugins?: unknown[];
|
|
91
103
|
recmaPlugins?: unknown[];
|
|
92
104
|
};
|
|
105
|
+
/**
|
|
106
|
+
* The webpack/Turbopack rule `createNextIntlPlugin` adds for its
|
|
107
|
+
* `experimental.messages` catalogs. vinext runs the same loader on the files it matches.
|
|
108
|
+
*/
|
|
109
|
+
export type NextIntlCatalogLoader = {
|
|
110
|
+
/** Absolute catalog directories (the rule's `include`). */
|
|
111
|
+
include: string[];
|
|
112
|
+
/** Catalog file extension test (the rule's `test`). */
|
|
113
|
+
test: RegExp;
|
|
114
|
+
/** The loader's `options`. */
|
|
115
|
+
options: Record<string, unknown>;
|
|
116
|
+
};
|
|
93
117
|
export type PrefetchInliningConfig = false | {
|
|
94
118
|
maxBundleSize: number;
|
|
95
119
|
maxSize: number;
|
|
@@ -340,6 +364,11 @@ export type ResolvedNextConfig = {
|
|
|
340
364
|
/** Server globals injected into instrumentation.ts by wrapped webpack configs. */
|
|
341
365
|
instrumentationServerValueInjections: Record<string, unknown>;
|
|
342
366
|
cacheComponents: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* `experimental.cachedNavigations`: lets the client cache the static stage of
|
|
369
|
+
* navigation responses. Requires `cacheComponents`.
|
|
370
|
+
*/
|
|
371
|
+
cachedNavigations: boolean;
|
|
343
372
|
appNavFailHandling: boolean;
|
|
344
373
|
/**
|
|
345
374
|
* Enables the experimental App Router gesture transition API:
|
|
@@ -362,6 +391,8 @@ export type ResolvedNextConfig = {
|
|
|
362
391
|
i18n: NextI18nConfig | null;
|
|
363
392
|
/** MDX remark/rehype/recma plugins extracted from @next/mdx config */
|
|
364
393
|
mdx: MdxOptions | null;
|
|
394
|
+
/** next-intl's message catalog loader rule from `createNextIntlPlugin`. */
|
|
395
|
+
nextIntlCatalogLoader: NextIntlCatalogLoader | null;
|
|
365
396
|
/** Explicit module aliases preserved from wrapped next.config plugins. */
|
|
366
397
|
aliases: Record<string, string>;
|
|
367
398
|
/** Extra allowed origins for dev server access (from allowedDevOrigins). */
|