vinext 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -9
- package/dist/_virtual/_rolldown/runtime.js +1 -1
- 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 +77 -6
- package/dist/build/client-build-config.js +176 -12
- 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 +171 -0
- package/dist/build/client-reference-groups.js +572 -0
- 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/layout-classification.d.ts +2 -1
- package/dist/build/module-dependency-cache.d.ts +33 -1
- package/dist/build/module-dependency-cache.js +51 -1
- package/dist/build/next-client-runtime-manifests.d.ts +12 -2
- package/dist/build/next-client-runtime-manifests.js +19 -4
- package/dist/build/nitro-public-files.d.ts +24 -0
- package/dist/build/nitro-public-files.js +60 -0
- package/dist/build/pages-client-assets-module.js +1 -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-paths.js +5 -2
- 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 +5 -4
- package/dist/build/report.d.ts +2 -1
- package/dist/build/route-classification-injector.d.ts +2 -1
- package/dist/build/route-classification-manifest.d.ts +2 -1
- package/dist/build/run-prerender.d.ts +2 -1
- package/dist/build/server-actions-encryption-key.d.ts +24 -0
- package/dist/build/server-actions-encryption-key.js +101 -0
- package/dist/build/ssr-manifest.d.ts +3 -0
- package/dist/build/ssr-manifest.js +34 -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 +4 -0
- package/dist/cli-args.d.ts +2 -1
- package/dist/cli.js +2 -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-rewrite-params.d.ts +9 -0
- package/dist/client/client-rewrite-params.js +20 -0
- 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 +2 -1
- package/dist/client/index.js +1 -2
- package/dist/client/instrumentation-client-state.js +5 -5
- package/dist/client/navigation-runtime.d.ts +28 -3
- package/dist/client/navigation-runtime.js +42 -11
- package/dist/client/pages-router-link-navigation.d.ts +2 -1
- package/dist/client/vinext-next-data.d.ts +25 -2
- package/dist/client/window-next.d.ts +2 -1
- package/dist/config/config-matchers.d.ts +27 -41
- package/dist/config/config-matchers.js +293 -270
- package/dist/config/config-source.d.ts +34 -0
- package/dist/config/config-source.js +141 -0
- package/dist/config/dotenv.d.ts +2 -1
- package/dist/config/header-params.d.ts +29 -0
- package/dist/config/header-params.js +106 -0
- package/dist/config/next-config.d.ts +20 -6
- package/dist/config/next-config.js +149 -11
- package/dist/config/tsconfig-paths.d.ts +2 -1
- 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/ua-parser-js@1.0.35/deps/ua-parser-js/src/ua-parser.js +2 -2
- package/dist/entries/app-browser-entry.d.ts +34 -6
- package/dist/entries/app-browser-entry.js +103 -40
- package/dist/entries/app-rsc-entry.d.ts +4 -1
- package/dist/entries/app-rsc-entry.js +131 -66
- package/dist/entries/app-rsc-manifest.d.ts +12 -1
- package/dist/entries/app-rsc-manifest.js +73 -1
- package/dist/entries/app-ssr-entry.d.ts +4 -1
- package/dist/entries/app-ssr-entry.js +9 -2
- package/dist/entries/pages-client-entry.d.ts +1 -0
- package/dist/entries/pages-client-entry.js +6 -6
- 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 +18 -15
- 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.d.ts +11 -0
- package/dist/index.js +340 -116
- package/dist/init.js +17 -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/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/og-assets.d.ts +2 -1
- package/dist/plugins/og-assets.js +2 -3
- package/dist/plugins/optimize-imports.d.ts +27 -3
- package/dist/plugins/optimize-imports.js +106 -20
- package/dist/plugins/pages-node-externals.d.ts +2 -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 +53 -1
- package/dist/plugins/rsc-client-reference-loaders.js +447 -27
- 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 +5 -0
- package/dist/plugins/use-cache-callable.js +30 -8
- package/dist/plugins/worker-image-imports.d.ts +1 -0
- package/dist/plugins/worker-image-imports.js +2 -2
- package/dist/plugins/worker-use-server.d.ts +2 -1
- package/dist/routing/app-route-graph.d.ts +41 -1
- package/dist/routing/app-route-graph.js +122 -50
- package/dist/routing/browser-route-manifest.d.ts +44 -0
- package/dist/routing/browser-route-manifest.js +195 -0
- package/dist/routing/hashed-route-patterns.d.ts +4 -0
- package/dist/routing/hashed-route-patterns.js +22 -0
- package/dist/routing/optimistic-route-trie.d.ts +28 -0
- package/dist/routing/optimistic-route-trie.js +102 -0
- package/dist/routing/route-matching.d.ts +2 -1
- package/dist/routing/route-pattern.d.ts +2 -1
- package/dist/routing/route-validation.d.ts +6 -1
- package/dist/routing/route-validation.js +26 -10
- package/dist/server/accept-encoding.d.ts +2 -1
- package/dist/server/app-action-forwarding.d.ts +10 -1
- package/dist/server/app-action-forwarding.js +15 -1
- package/dist/server/app-bfcache-identity.d.ts +2 -1
- package/dist/server/app-browser-action-result.d.ts +2 -1
- package/dist/server/app-browser-client-reuse-manifest.d.ts +2 -1
- package/dist/server/app-browser-entry.js +175 -64
- package/dist/server/app-browser-error.d.ts +5 -2
- package/dist/server/app-browser-error.js +7 -2
- package/dist/server/app-browser-history-controller.d.ts +2 -1
- package/dist/server/app-browser-hydration.d.ts +2 -1
- package/dist/server/app-browser-interception-context.d.ts +4 -3
- package/dist/server/app-browser-mpa-navigation.d.ts +1 -0
- package/dist/server/app-browser-mpa-navigation.js +6 -5
- package/dist/server/app-browser-navigation-controller.d.ts +17 -6
- package/dist/server/app-browser-navigation-controller.js +103 -36
- 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-server-action-client.d.ts +2 -1
- package/dist/server/app-browser-state.d.ts +2 -2
- package/dist/server/app-browser-state.js +1 -1
- package/dist/server/app-browser-stream.d.ts +2 -1
- package/dist/server/app-browser-visible-commit.d.ts +6 -5
- 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 +45 -2
- package/dist/server/app-client-reference-preloader.js +48 -10
- package/dist/server/app-elements-wire.d.ts +2 -1
- package/dist/server/app-elements.d.ts +2 -0
- package/dist/server/app-elements.js +3 -1
- package/dist/server/app-fallback-renderer.d.ts +9 -2
- package/dist/server/app-fallback-renderer.js +6 -2
- package/dist/server/app-history-state.d.ts +2 -1
- package/dist/server/app-inline-css-client.d.ts +2 -1
- package/dist/server/app-layout-param-observation.d.ts +2 -1
- package/dist/server/app-metadata-tracing.d.ts +2 -1
- package/dist/server/app-middleware.d.ts +6 -0
- package/dist/server/app-middleware.js +8 -10
- package/dist/server/app-optimistic-routing.d.ts +26 -11
- package/dist/server/app-optimistic-routing.js +38 -96
- package/dist/server/app-page-boundary-render.d.ts +20 -2
- package/dist/server/app-page-boundary-render.js +229 -39
- package/dist/server/app-page-boundary.d.ts +34 -5
- package/dist/server/app-page-boundary.js +40 -7
- package/dist/server/app-page-cache-finalizer.d.ts +2 -1
- package/dist/server/app-page-cache-finalizer.js +1 -1
- package/dist/server/app-page-cache-render.d.ts +10 -2
- package/dist/server/app-page-cache-render.js +15 -2
- package/dist/server/app-page-cache.js +2 -2
- package/dist/server/app-page-dispatch.d.ts +34 -1
- package/dist/server/app-page-dispatch.js +165 -34
- package/dist/server/app-page-element-builder.d.ts +17 -1
- package/dist/server/app-page-element-builder.js +187 -66
- package/dist/server/app-page-execution.d.ts +28 -1
- package/dist/server/app-page-execution.js +114 -5
- package/dist/server/app-page-head.d.ts +95 -3
- package/dist/server/app-page-head.js +307 -152
- package/dist/server/app-page-http-access-fallback-metadata.d.ts +48 -2
- package/dist/server/app-page-http-access-fallback-metadata.js +76 -1
- package/dist/server/app-page-method.d.ts +2 -1
- package/dist/server/app-page-probe.d.ts +2 -1
- package/dist/server/app-page-render-identity.d.ts +2 -1
- package/dist/server/app-page-render.d.ts +7 -1
- package/dist/server/app-page-render.js +38 -11
- package/dist/server/app-page-request.d.ts +14 -1
- package/dist/server/app-page-request.js +1 -1
- package/dist/server/app-page-route-wiring.d.ts +52 -2
- package/dist/server/app-page-route-wiring.js +197 -47
- package/dist/server/app-page-rsc-render-status.d.ts +3 -1
- package/dist/server/app-page-rsc-render-status.js +1 -0
- package/dist/server/app-page-search-params-observation.d.ts +8 -6
- package/dist/server/app-page-search-params-observation.js +16 -11
- package/dist/server/app-page-segment-plan.d.ts +2 -1
- package/dist/server/app-page-stream.d.ts +38 -1
- package/dist/server/app-page-stream.js +24 -4
- package/dist/server/app-pages-bridge.d.ts +4 -2
- package/dist/server/app-pages-bridge.js +11 -7
- 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-prerender-static-params.js +3 -2
- package/dist/server/app-render-dependency.d.ts +11 -1
- package/dist/server/app-render-dependency.js +65 -6
- package/dist/server/app-request-stage-independent-entry.d.ts +2 -1
- package/dist/server/app-request-stage-independent-entry.js +2 -2
- package/dist/server/app-response-stage-entry.d.ts +2 -1
- package/dist/server/app-response-stage-entry.js +3 -3
- package/dist/server/app-route-handler-cache.d.ts +2 -1
- package/dist/server/app-route-handler-dispatch.d.ts +2 -1
- package/dist/server/app-route-handler-dispatch.js +4 -2
- package/dist/server/app-route-handler-execution.d.ts +4 -1
- package/dist/server/app-route-handler-execution.js +9 -2
- package/dist/server/app-route-handler-middleware-context.d.ts +2 -1
- package/dist/server/app-route-handler-middleware-context.js +3 -3
- package/dist/server/app-route-handler-response.d.ts +4 -2
- package/dist/server/app-route-handler-response.js +2 -2
- package/dist/server/app-route-handler-runtime.d.ts +4 -1
- package/dist/server/app-route-handler-runtime.js +20 -3
- package/dist/server/app-route-module-loader.d.ts +18 -1
- package/dist/server/app-route-module-loader.js +15 -6
- package/dist/server/app-route-tree-prefetch.d.ts +2 -1
- package/dist/server/app-route-tree.d.ts +20 -0
- package/dist/server/app-route-tree.js +18 -0
- package/dist/server/app-router-entry.js +2 -2
- package/dist/server/app-rsc-combined-handler.js +8 -1
- package/dist/server/app-rsc-error-handler.d.ts +2 -1
- package/dist/server/app-rsc-errors.d.ts +9 -1
- package/dist/server/app-rsc-errors.js +9 -2
- package/dist/server/app-rsc-handler.d.ts +6 -2
- package/dist/server/app-rsc-handler.js +152 -140
- package/dist/server/app-rsc-response-finalizer.d.ts +7 -1
- package/dist/server/app-rsc-response-finalizer.js +4 -1
- package/dist/server/app-rsc-response-stage.js +3 -1
- package/dist/server/app-rsc-route-matching.d.ts +39 -1
- package/dist/server/app-rsc-route-matching.js +25 -1
- 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 +25 -7
- package/dist/server/app-server-action-execution.js +53 -59
- package/dist/server/app-ssr-entry.d.ts +12 -0
- package/dist/server/app-ssr-entry.js +104 -48
- 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 +29 -10
- package/dist/server/app-ssr-stream.js +311 -67
- 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 +2 -1
- package/dist/server/app-worker-stages.d.ts +2 -1
- package/dist/server/artifact-compatibility.d.ts +2 -1
- package/dist/server/bfcache-identity.d.ts +2 -1
- package/dist/server/cache-headers.d.ts +2 -1
- package/dist/server/cacheability-request.d.ts +2 -1
- package/dist/server/client-reuse-manifest.d.ts +2 -1
- package/dist/server/config-headers.d.ts +2 -1
- package/dist/server/config-headers.js +12 -3
- 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 +10 -3
- 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/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/isolate-shared-promise.d.ts +10 -0
- package/dist/server/isolate-shared-promise.js +33 -0
- package/dist/server/isr-cache.js +3 -2
- 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 +1 -1
- package/dist/server/metadata-routes.d.ts +2 -1
- package/dist/server/middleware-matcher-pattern.d.ts +0 -1
- package/dist/server/middleware-matcher-pattern.js +11 -140
- package/dist/server/middleware-matcher.js +5 -6
- package/dist/server/middleware-response-headers.d.ts +31 -0
- package/dist/server/middleware-response-headers.js +57 -1
- package/dist/server/middleware-runtime.d.ts +2 -1
- package/dist/server/middleware-runtime.js +26 -13
- package/dist/server/navigation-planner.d.ts +2 -2
- 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 +39 -0
- package/dist/server/nitro-public-files-plugin.js +106 -0
- package/dist/server/nitro-public-files.d.ts +22 -0
- package/dist/server/nitro-public-files.js +39 -0
- 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-asset-tags.d.ts +7 -1
- package/dist/server/pages-asset-tags.js +9 -2
- package/dist/server/pages-body-parser-config.d.ts +2 -1
- package/dist/server/pages-client-assets.d.ts +8 -1
- 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-i18n.d.ts +18 -0
- package/dist/server/pages-i18n.js +18 -2
- package/dist/server/pages-node-compat.d.ts +5 -3
- package/dist/server/pages-node-compat.js +35 -16
- 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 +16 -7
- 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 +8 -2
- package/dist/server/pages-request-pipeline.js +35 -40
- package/dist/server/pages-request-stage-entry.d.ts +2 -1
- package/dist/server/pages-request-stage-entry.js +16 -6
- package/dist/server/pages-response-stage-entry.d.ts +2 -1
- package/dist/server/pages-response-stage-entry.js +1 -1
- package/dist/server/pages-revalidate.js +1 -0
- package/dist/server/pages-route-data-kind.d.ts +2 -1
- package/dist/server/pages-router-entry.js +1 -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.d.ts +2 -2
- package/dist/server/prod-server.js +80 -36
- package/dist/server/proxy-trust.d.ts +6 -0
- package/dist/server/proxy-trust.js +12 -6
- package/dist/server/request-log.d.ts +2 -1
- package/dist/server/request-pipeline.d.ts +5 -0
- package/dist/server/request-pipeline.js +12 -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/server-reference-loader.js +10 -1
- package/dist/server/static-file-cache.d.ts +2 -1
- package/dist/server/static-file-cache.js +16 -3
- package/dist/server/static-layout-client-reuse-proof.d.ts +2 -1
- package/dist/server/worker-revalidation-context.d.ts +2 -1
- package/dist/server/worker-stages.d.ts +2 -1
- package/dist/server/worker-utils.js +1 -1
- 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 +32 -11
- package/dist/shims/cache-request-state.d.ts +40 -3
- package/dist/shims/cache-request-state.js +70 -5
- package/dist/shims/cache-runtime.js +47 -19
- package/dist/shims/cache.d.ts +2 -2
- package/dist/shims/cache.js +17 -8
- 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-purge-routes.d.ts +25 -0
- package/dist/shims/cdn-purge-routes.js +77 -0
- package/dist/shims/client-locale.js +2 -1
- package/dist/shims/client-page-root.d.ts +2 -1
- 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 +17 -4
- package/dist/shims/error-boundary.d.ts +39 -3
- package/dist/shims/error-boundary.js +31 -16
- 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 +9 -4
- 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-props.d.ts +93 -0
- package/dist/shims/image-props.js +323 -0
- package/dist/shims/image.d.ts +4 -39
- package/dist/shims/image.js +4 -319
- 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 +9 -0
- package/dist/shims/internal/headers-state.js +19 -2
- package/dist/shims/internal/hybrid-client-route-owner-direct.d.ts +6 -2
- package/dist/shims/internal/hybrid-client-route-owner-direct.js +31 -14
- package/dist/shims/internal/hybrid-client-route-owner.js +8 -8
- package/dist/shims/internal/interpolate-as.d.ts +2 -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 +198 -53
- package/dist/shims/metadata.d.ts +32 -11
- package/dist/shims/metadata.js +88 -26
- package/dist/shims/navigation-errors.d.ts +2 -1
- package/dist/shims/navigation.d.ts +23 -3
- package/dist/shims/navigation.js +91 -25
- package/dist/shims/og.js +35 -10
- package/dist/shims/pages-router-runtime.d.ts +2 -1
- package/dist/shims/ppr-fallback-shell.d.ts +2 -1
- package/dist/shims/request-context.d.ts +13 -0
- package/dist/shims/router.js +33 -43
- package/dist/shims/server.d.ts +31 -4
- package/dist/shims/server.js +58 -10
- package/dist/shims/thenable-params.d.ts +6 -1
- package/dist/shims/thenable-params.js +11 -2
- package/dist/shims/unified-request-context.d.ts +5 -0
- package/dist/shims/unified-request-context.js +5 -3
- package/dist/typegen.d.ts +2 -1
- package/dist/utils/asset-prefix.d.ts +7 -0
- package/dist/utils/asset-prefix.js +10 -1
- package/dist/utils/client-build-manifest.d.ts +4 -1
- package/dist/utils/client-build-manifest.js +20 -6
- 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 +10 -1
- package/dist/utils/client-runtime-metadata.js +53 -9
- package/dist/utils/compare.d.ts +9 -0
- package/dist/utils/compare.js +15 -1
- package/dist/utils/lazy-chunks.d.ts +18 -0
- package/dist/utils/lazy-chunks.js +27 -1
- package/dist/utils/manifest-paths.d.ts +14 -0
- package/dist/utils/manifest-paths.js +22 -1
- package/dist/utils/middleware-request-headers.d.ts +2 -1
- package/dist/utils/path-to-regexp.d.ts +21 -0
- package/dist/{server/middleware-path-to-regexp.js → utils/path-to-regexp.js} +14 -11
- package/dist/utils/plugin-react-version.d.ts +15 -0
- package/dist/utils/plugin-react-version.js +64 -0
- package/dist/utils/project.d.ts +2 -1
- package/dist/utils/project.js +9 -1
- package/dist/utils/public-routes.d.ts +2 -0
- package/dist/utils/public-routes.js +18 -7
- package/dist/utils/query.d.ts +2 -1
- package/dist/utils/sorted-array.d.ts +2 -1
- package/dist/utils/vite-cli-invocation.d.ts +2 -1
- package/package.json +5 -5
- package/dist/deps/.pnpm/image-size@2.0.2/deps/image-size/dist/index.js +0 -808
- package/dist/server/default-not-found-module.d.ts +0 -19
- package/dist/server/default-not-found-module.js +0 -18
- package/dist/server/middleware-path-to-regexp.d.ts +0 -13
- package/dist/server/rsc-stream-hints.d.ts +0 -21
- package/dist/server/rsc-stream-hints.js +0 -227
- package/dist/utils/regex-safety.d.ts +0 -17
- package/dist/utils/regex-safety.js +0 -789
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { readUInt, readUInt64, toHexString, toUTF8String } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/tiff.js
|
|
3
|
+
const CONSTANTS = {
|
|
4
|
+
TAG: {
|
|
5
|
+
WIDTH: 256,
|
|
6
|
+
HEIGHT: 257,
|
|
7
|
+
COMPRESSION: 259
|
|
8
|
+
},
|
|
9
|
+
TYPE: {
|
|
10
|
+
SHORT: 3,
|
|
11
|
+
LONG: 4,
|
|
12
|
+
LONG8: 16
|
|
13
|
+
},
|
|
14
|
+
ENTRY_SIZE: {
|
|
15
|
+
STANDARD: 12,
|
|
16
|
+
BIG: 20
|
|
17
|
+
},
|
|
18
|
+
COUNT_SIZE: {
|
|
19
|
+
STANDARD: 2,
|
|
20
|
+
BIG: 8
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function readIFD(input, { isBigEndian, isBigTiff }) {
|
|
24
|
+
const ifdOffset = isBigTiff ? Number(readUInt64(input, 8, isBigEndian)) : readUInt(input, 32, 4, isBigEndian);
|
|
25
|
+
const entryCountSize = isBigTiff ? CONSTANTS.COUNT_SIZE.BIG : CONSTANTS.COUNT_SIZE.STANDARD;
|
|
26
|
+
return input.slice(ifdOffset + entryCountSize);
|
|
27
|
+
}
|
|
28
|
+
function readTagValue(input, type, offset, isBigEndian) {
|
|
29
|
+
switch (type) {
|
|
30
|
+
case CONSTANTS.TYPE.SHORT: return readUInt(input, 16, offset, isBigEndian);
|
|
31
|
+
case CONSTANTS.TYPE.LONG: return readUInt(input, 32, offset, isBigEndian);
|
|
32
|
+
case CONSTANTS.TYPE.LONG8: {
|
|
33
|
+
const value = Number(readUInt64(input, offset, isBigEndian));
|
|
34
|
+
if (value > Number.MAX_SAFE_INTEGER) throw new TypeError("Value too large");
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
default: return 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function nextTag(input, isBigTiff) {
|
|
41
|
+
const entrySize = isBigTiff ? CONSTANTS.ENTRY_SIZE.BIG : CONSTANTS.ENTRY_SIZE.STANDARD;
|
|
42
|
+
if (input.length > entrySize) return input.slice(entrySize);
|
|
43
|
+
}
|
|
44
|
+
function extractTags(input, { isBigEndian, isBigTiff }) {
|
|
45
|
+
const tags = {};
|
|
46
|
+
let temp = input;
|
|
47
|
+
while (temp?.length) {
|
|
48
|
+
const code = readUInt(temp, 16, 0, isBigEndian);
|
|
49
|
+
const type = readUInt(temp, 16, 2, isBigEndian);
|
|
50
|
+
const length = isBigTiff ? Number(readUInt64(temp, 4, isBigEndian)) : readUInt(temp, 32, 4, isBigEndian);
|
|
51
|
+
if (code === 0) break;
|
|
52
|
+
if (length === 1 && (type === CONSTANTS.TYPE.SHORT || type === CONSTANTS.TYPE.LONG || isBigTiff && type === CONSTANTS.TYPE.LONG8)) tags[code] = readTagValue(temp, type, isBigTiff ? 12 : 8, isBigEndian);
|
|
53
|
+
temp = nextTag(temp, isBigTiff);
|
|
54
|
+
}
|
|
55
|
+
return tags;
|
|
56
|
+
}
|
|
57
|
+
function determineFormat(input) {
|
|
58
|
+
const signature = toUTF8String(input, 0, 2);
|
|
59
|
+
const version = readUInt(input, 16, 2, signature === "MM");
|
|
60
|
+
return {
|
|
61
|
+
isBigEndian: signature === "MM",
|
|
62
|
+
isBigTiff: version === 43
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function validateBigTIFFHeader(input, isBigEndian) {
|
|
66
|
+
const byteSize = readUInt(input, 16, 4, isBigEndian);
|
|
67
|
+
const reserved = readUInt(input, 16, 6, isBigEndian);
|
|
68
|
+
if (byteSize !== 8 || reserved !== 0) throw new TypeError("Invalid BigTIFF header");
|
|
69
|
+
}
|
|
70
|
+
const signatures = /* @__PURE__ */ new Set([
|
|
71
|
+
"49492a00",
|
|
72
|
+
"4d4d002a",
|
|
73
|
+
"49492b00",
|
|
74
|
+
"4d4d002b"
|
|
75
|
+
]);
|
|
76
|
+
const TIFF = {
|
|
77
|
+
validate: (input) => {
|
|
78
|
+
const signature = toHexString(input, 0, 4);
|
|
79
|
+
return signatures.has(signature);
|
|
80
|
+
},
|
|
81
|
+
calculate(input) {
|
|
82
|
+
const format = determineFormat(input);
|
|
83
|
+
if (format.isBigTiff) validateBigTIFFHeader(input, format.isBigEndian);
|
|
84
|
+
const tags = extractTags(readIFD(input, format), format);
|
|
85
|
+
const info = {
|
|
86
|
+
height: tags[CONSTANTS.TAG.HEIGHT],
|
|
87
|
+
width: tags[CONSTANTS.TAG.WIDTH],
|
|
88
|
+
type: format.isBigTiff ? "bigtiff" : "tiff"
|
|
89
|
+
};
|
|
90
|
+
if (tags[CONSTANTS.TAG.COMPRESSION]) info.compression = tags[CONSTANTS.TAG.COMPRESSION];
|
|
91
|
+
if (!info.width || !info.height) throw new TypeError("Invalid Tiff. Missing tags");
|
|
92
|
+
return info;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { TIFF };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/utils.js
|
|
2
|
+
const decoder = new TextDecoder();
|
|
3
|
+
const toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
|
|
4
|
+
const toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce((memo, i) => memo + `0${i.toString(16)}`.slice(-2), "");
|
|
5
|
+
const getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
|
|
6
|
+
const readInt16LE = (input, offset = 0) => getView(input, offset).getInt16(0, true);
|
|
7
|
+
const readUInt16BE = (input, offset = 0) => getView(input, offset).getUint16(0, false);
|
|
8
|
+
const readUInt16LE = (input, offset = 0) => getView(input, offset).getUint16(0, true);
|
|
9
|
+
const readUInt24LE = (input, offset = 0) => {
|
|
10
|
+
const view = getView(input, offset);
|
|
11
|
+
return view.getUint16(0, true) + (view.getUint8(2) << 16);
|
|
12
|
+
};
|
|
13
|
+
const readInt32LE = (input, offset = 0) => getView(input, offset).getInt32(0, true);
|
|
14
|
+
const readUInt32BE = (input, offset = 0) => getView(input, offset).getUint32(0, false);
|
|
15
|
+
const readUInt32LE = (input, offset = 0) => getView(input, offset).getUint32(0, true);
|
|
16
|
+
const readUInt64 = (input, offset, isBigEndian) => getView(input, offset).getBigUint64(0, !isBigEndian);
|
|
17
|
+
const methods = {
|
|
18
|
+
readUInt16BE,
|
|
19
|
+
readUInt16LE,
|
|
20
|
+
readUInt32BE,
|
|
21
|
+
readUInt32LE
|
|
22
|
+
};
|
|
23
|
+
function readUInt(input, bits, offset = 0, isBigEndian = false) {
|
|
24
|
+
const methodName = `readUInt${bits}${isBigEndian ? "BE" : "LE"}`;
|
|
25
|
+
return methods[methodName](input, offset);
|
|
26
|
+
}
|
|
27
|
+
const BOX_HEADER_SIZE = 8;
|
|
28
|
+
function readBox(input, offset) {
|
|
29
|
+
if (input.length - offset < BOX_HEADER_SIZE) return void 0;
|
|
30
|
+
const boxSize = readUInt32BE(input, offset);
|
|
31
|
+
if (input.length - offset < boxSize) return void 0;
|
|
32
|
+
return {
|
|
33
|
+
name: toUTF8String(input, 4 + offset, 8 + offset),
|
|
34
|
+
offset,
|
|
35
|
+
size: boxSize
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function findBox(input, boxName, startOffset) {
|
|
39
|
+
let currentOffset = startOffset;
|
|
40
|
+
while (currentOffset < input.length) {
|
|
41
|
+
if (input.length - currentOffset < 4) break;
|
|
42
|
+
if (readUInt32BE(input, currentOffset) < BOX_HEADER_SIZE) {
|
|
43
|
+
currentOffset += BOX_HEADER_SIZE;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const box = readBox(input, currentOffset);
|
|
47
|
+
if (!box) break;
|
|
48
|
+
if (box.name === boxName) return box;
|
|
49
|
+
currentOffset += box.size;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { findBox, readInt16LE, readInt32LE, readUInt, readUInt16BE, readUInt16LE, readUInt24LE, readUInt32BE, readUInt32LE, readUInt64, toHexString, toUTF8String };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { readInt16LE, readUInt24LE, toHexString, toUTF8String } from "./utils.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/types/webp.js
|
|
3
|
+
function calculateExtended(input) {
|
|
4
|
+
return {
|
|
5
|
+
height: 1 + readUInt24LE(input, 7),
|
|
6
|
+
width: 1 + readUInt24LE(input, 4)
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function calculateLossless(input) {
|
|
10
|
+
return {
|
|
11
|
+
height: 1 + ((input[4] & 15) << 10 | input[3] << 2 | (input[2] & 192) >> 6),
|
|
12
|
+
width: 1 + ((input[2] & 63) << 8 | input[1])
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function calculateLossy(input) {
|
|
16
|
+
return {
|
|
17
|
+
height: readInt16LE(input, 8) & 16383,
|
|
18
|
+
width: readInt16LE(input, 6) & 16383
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const WEBP = {
|
|
22
|
+
validate(input) {
|
|
23
|
+
const riffHeader = "RIFF" === toUTF8String(input, 0, 4);
|
|
24
|
+
const webpHeader = "WEBP" === toUTF8String(input, 8, 12);
|
|
25
|
+
const vp8Header = "VP8" === toUTF8String(input, 12, 15);
|
|
26
|
+
return riffHeader && webpHeader && vp8Header;
|
|
27
|
+
},
|
|
28
|
+
calculate(_input) {
|
|
29
|
+
const chunkHeader = toUTF8String(_input, 12, 16);
|
|
30
|
+
const input = _input.slice(20, 30);
|
|
31
|
+
if (chunkHeader === "VP8X") {
|
|
32
|
+
const extendedHeader = input[0];
|
|
33
|
+
const validStart = (extendedHeader & 192) === 0;
|
|
34
|
+
const validEnd = (extendedHeader & 1) === 0;
|
|
35
|
+
if (validStart && validEnd) return calculateExtended(input);
|
|
36
|
+
throw new TypeError("Invalid WebP");
|
|
37
|
+
}
|
|
38
|
+
if (chunkHeader === "VP8 " && input[0] !== 47) return calculateLossy(input);
|
|
39
|
+
const signature = toHexString(input, 3, 6);
|
|
40
|
+
if (chunkHeader === "VP8L" && signature !== "9d012a") return calculateLossless(input);
|
|
41
|
+
throw new TypeError("Invalid WebP");
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { WEBP };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/image-size@2.0.4/node_modules/image-size/dist/esm/utils/bit-reader.js
|
|
2
|
+
var BitReader = class {
|
|
3
|
+
input;
|
|
4
|
+
endianness;
|
|
5
|
+
byteOffset = 2;
|
|
6
|
+
bitOffset = 0;
|
|
7
|
+
constructor(input, endianness) {
|
|
8
|
+
this.input = input;
|
|
9
|
+
this.endianness = endianness;
|
|
10
|
+
}
|
|
11
|
+
getBits(length = 1) {
|
|
12
|
+
let result = 0;
|
|
13
|
+
let bitsRead = 0;
|
|
14
|
+
while (bitsRead < length) {
|
|
15
|
+
if (this.byteOffset >= this.input.length) throw new Error("Reached end of input");
|
|
16
|
+
const currentByte = this.input[this.byteOffset];
|
|
17
|
+
const bitsLeft = 8 - this.bitOffset;
|
|
18
|
+
const bitsToRead = Math.min(length - bitsRead, bitsLeft);
|
|
19
|
+
if (this.endianness === "little-endian") {
|
|
20
|
+
const mask = (1 << bitsToRead) - 1;
|
|
21
|
+
const bits = currentByte >> this.bitOffset & mask;
|
|
22
|
+
result |= bits << bitsRead;
|
|
23
|
+
} else {
|
|
24
|
+
const bits = (currentByte & (1 << bitsToRead) - 1 << 8 - this.bitOffset - bitsToRead) >> 8 - this.bitOffset - bitsToRead;
|
|
25
|
+
result = result << bitsToRead | bits;
|
|
26
|
+
}
|
|
27
|
+
bitsRead += bitsToRead;
|
|
28
|
+
this.bitOffset += bitsToRead;
|
|
29
|
+
if (this.bitOffset === 8) {
|
|
30
|
+
this.byteOffset++;
|
|
31
|
+
this.bitOffset = 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { BitReader };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/ua-parser-js@1.0.35/node_modules/ua-parser-js/src/ua-parser.js
|
|
3
|
-
var require_ua_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
|
+
var require_ua_parser = /* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
|
|
4
4
|
(function(window, undefined) {
|
|
5
5
|
"use strict";
|
|
6
6
|
var LIBVERSION = "1.0.35", EMPTY = "", UNKNOWN = "?", FUNC_TYPE = "function", UNDEF_TYPE = "undefined", OBJ_TYPE = "object", STR_TYPE = "string", MAJOR = "major", MODEL = "model", NAME = "name", TYPE = "type", VENDOR = "vendor", VERSION = "version", ARCHITECTURE = "architecture", CONSOLE = "console", MOBILE = "mobile", TABLET = "tablet", SMARTTV = "smarttv", WEARABLE = "wearable", EMBEDDED = "embedded", UA_MAX_LENGTH = 350, AMAZON = "Amazon", APPLE = "Apple", ASUS = "ASUS", BLACKBERRY = "BlackBerry", BROWSER = "Browser", CHROME = "Chrome", EDGE = "Edge", FIREFOX = "Firefox", GOOGLE = "Google", HUAWEI = "Huawei", LG = "LG", MICROSOFT = "Microsoft", MOTOROLA = "Motorola", OPERA = "Opera", SAMSUNG = "Samsung", SHARP = "Sharp", SONY = "Sony", XIAOMI = "Xiaomi", ZEBRA = "Zebra", FACEBOOK = "Facebook", CHROMIUM_OS = "Chromium OS", MAC_OS = "Mac OS";
|
|
@@ -1050,7 +1050,7 @@ var require_ua_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1050
1050
|
for (var prop in result) $.ua[prop] = result[prop];
|
|
1051
1051
|
};
|
|
1052
1052
|
}
|
|
1053
|
-
})(typeof window === "object" ? window :
|
|
1053
|
+
})(typeof window === "object" ? window : this$1);
|
|
1054
1054
|
}));
|
|
1055
1055
|
//#endregion
|
|
1056
1056
|
export default require_ua_parser();
|
|
@@ -9,13 +9,41 @@ import { VinextLinkPrefetchRoute, VinextPagesLinkPrefetchRoute } from "../client
|
|
|
9
9
|
* embedded RSC payload and handles client-side navigation by re-fetching
|
|
10
10
|
* RSC streams.
|
|
11
11
|
*/
|
|
12
|
-
export declare function generateBrowserEntry(routes?: readonly AppRoute[],
|
|
12
|
+
export declare function generateBrowserEntry(routes?: readonly AppRoute[], pagesPrefetchRoutes?: readonly VinextPagesLinkPrefetchRoute[], rewrites?: {
|
|
13
13
|
afterFiles: NextRewrite[];
|
|
14
14
|
beforeFiles: NextRewrite[];
|
|
15
15
|
fallback: NextRewrite[];
|
|
16
|
-
}, locales?: readonly string[]): string;
|
|
16
|
+
}, locales?: readonly string[], classifier?: AppRouteDynamicRenderClassifier): string;
|
|
17
|
+
/**
|
|
18
|
+
* App route handlers for hybrid App/Pages ownership, with their static
|
|
19
|
+
* segments hashed so the client never receives their paths in plain text.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toHashedRouteHandlerRoutes(routes: readonly AppRoute[]): VinextLinkPrefetchRoute[];
|
|
22
|
+
type AppRouteIntercept = AppRoute["siblingIntercepts"][number];
|
|
23
|
+
/** Reads, at build time, which App pages Next.js renders on every request. */
|
|
24
|
+
export type AppRouteDynamicRenderClassifier = {
|
|
25
|
+
route(route: AppRoute): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* `layoutPaths` holds the layouts above the intercepting page outside its
|
|
28
|
+
* own branch: the source route's, and the slot's.
|
|
29
|
+
*/
|
|
30
|
+
intercept(intercept: AppRouteIntercept, layoutPaths: readonly string[]): boolean;
|
|
31
|
+
};
|
|
17
32
|
/** Project an `AppRoute` down to the public `VinextLinkPrefetchRoute` shape. */
|
|
18
|
-
export declare function toLinkPrefetchRoute(route: AppRoute, hasSiblingInterceptLoading?: boolean): VinextLinkPrefetchRoute;
|
|
19
|
-
/**
|
|
20
|
-
|
|
21
|
-
|
|
33
|
+
export declare function toLinkPrefetchRoute(route: AppRoute, hasSiblingInterceptLoading?: boolean, rendersDynamically?: boolean): VinextLinkPrefetchRoute;
|
|
34
|
+
/**
|
|
35
|
+
* Project App routes together so sibling-intercept loading is applied to its
|
|
36
|
+
* target route. `classifier` reads each route's segment config, and each
|
|
37
|
+
* intercepting page's, which applies to its target route.
|
|
38
|
+
*/
|
|
39
|
+
export declare function toLinkPrefetchRoutes(routes: readonly AppRoute[], classifier?: AppRouteDynamicRenderClassifier): VinextLinkPrefetchRoute[];
|
|
40
|
+
/**
|
|
41
|
+
* Generate the virtual module that holds the browser RouteManifest.
|
|
42
|
+
*
|
|
43
|
+
* The App browser runtime imports it dynamically when hydration starts, so the
|
|
44
|
+
* manifest, which grows with every route, stays out of the entry chunk. The
|
|
45
|
+
* JSON string keeps the parse on V8's fast JSON path.
|
|
46
|
+
*/
|
|
47
|
+
export declare function generateBrowserRouteManifestModule(routeManifest: RouteManifest | null): string;
|
|
48
|
+
//#endregion
|
|
49
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { patternsStructurallyEquivalent } from "../routing/app-route-graph.js";
|
|
2
2
|
import { resolveClientRuntimeModule, resolveRuntimeEntryModule } from "./runtime-entry-module.js";
|
|
3
3
|
import { toClientRewrites } from "../client/client-rewrites.js";
|
|
4
|
+
import { hashRoutePatternParts } from "../routing/hashed-route-patterns.js";
|
|
5
|
+
import { toBrowserRouteManifestWire } from "../routing/browser-route-manifest.js";
|
|
4
6
|
//#region src/entries/app-browser-entry.ts
|
|
5
7
|
/**
|
|
6
8
|
* Generate the virtual browser entry module.
|
|
@@ -9,20 +11,20 @@ import { toClientRewrites } from "../client/client-rewrites.js";
|
|
|
9
11
|
* embedded RSC payload and handles client-side navigation by re-fetching
|
|
10
12
|
* RSC streams.
|
|
11
13
|
*/
|
|
12
|
-
function generateBrowserEntry(routes = [],
|
|
14
|
+
function generateBrowserEntry(routes = [], pagesPrefetchRoutes = [], rewrites = {
|
|
13
15
|
afterFiles: [],
|
|
14
16
|
beforeFiles: [],
|
|
15
17
|
fallback: []
|
|
16
|
-
}, locales = []) {
|
|
18
|
+
}, locales = [], classifier) {
|
|
17
19
|
const entryPath = resolveRuntimeEntryModule("app-browser-entry");
|
|
18
20
|
const reactInstanceBootstrapPath = resolveClientRuntimeModule("react-instance-bootstrap");
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
+
const prefetchRoutes = toLinkPrefetchRoutes(routes, classifier);
|
|
22
|
+
const routeHandlers = pagesPrefetchRoutes.length > 0 ? toHashedRouteHandlerRoutes(routes) : [];
|
|
21
23
|
const clientRewrites = toClientRewrites(rewrites);
|
|
22
24
|
return `import ${JSON.stringify(reactInstanceBootstrapPath)};
|
|
23
|
-
import { registerNavigationRuntimeBootstrap } from ${JSON.stringify(navigationRuntimePath)};
|
|
24
25
|
|
|
25
26
|
window.__VINEXT_LINK_PREFETCH_ROUTES__ = ${JSON.stringify(prefetchRoutes)};
|
|
27
|
+
window.__VINEXT_APP_ROUTE_HANDLERS__ = ${JSON.stringify(routeHandlers)};
|
|
26
28
|
// Pages route manifest for hybrid ownership decisions. In a hybrid
|
|
27
29
|
// app+pages build the user can land on an App page, so the App browser
|
|
28
30
|
// entry must also expose the Pages manifest (the Pages client entry does
|
|
@@ -30,9 +32,6 @@ window.__VINEXT_LINK_PREFETCH_ROUTES__ = ${JSON.stringify(prefetchRoutes)};
|
|
|
30
32
|
window.__VINEXT_PAGES_LINK_PREFETCH_ROUTES__ = ${JSON.stringify(pagesPrefetchRoutes)};
|
|
31
33
|
window.__VINEXT_CLIENT_REWRITES__ = ${JSON.stringify(clientRewrites)};
|
|
32
34
|
window.__VINEXT_LOCALES__ = ${JSON.stringify(locales)};
|
|
33
|
-
registerNavigationRuntimeBootstrap({
|
|
34
|
-
routeManifest: ${buildRouteManifestExpression(routeManifest)}
|
|
35
|
-
});
|
|
36
35
|
import ${JSON.stringify(entryPath)};`;
|
|
37
36
|
}
|
|
38
37
|
/**
|
|
@@ -45,13 +44,17 @@ function isLinkPrefetchRoute(route) {
|
|
|
45
44
|
if (route.pagePath !== null) return true;
|
|
46
45
|
return route.routePath === null && route.layouts.length > 0;
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
/**
|
|
48
|
+
* App route handlers for hybrid App/Pages ownership, with their static
|
|
49
|
+
* segments hashed so the client never receives their paths in plain text.
|
|
50
|
+
*/
|
|
51
|
+
function toHashedRouteHandlerRoutes(routes) {
|
|
52
|
+
return routes.flatMap((route) => isLinkPrefetchRoute(route) ? [] : [{
|
|
50
53
|
canPrefetchLoadingShell: false,
|
|
51
54
|
documentOnly: true,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
+
isDynamic: route.isDynamic,
|
|
56
|
+
patternParts: hashRoutePatternParts(route.patternParts)
|
|
57
|
+
}]);
|
|
55
58
|
}
|
|
56
59
|
function requiresDynamicNavigationRequest(route) {
|
|
57
60
|
return route.isDynamic && route.parallelSlots.length > 0;
|
|
@@ -66,44 +69,104 @@ function hasLoadingBoundary(route, hasSiblingInterceptLoading) {
|
|
|
66
69
|
return route.loadingPath !== null || (route.loadingPaths?.some((_, index) => (route.loadingTreePositions?.[index] ?? 0) > 0) ?? false) || route.parallelSlots.some((slot) => slot.loadingPath !== null || (slot.loadingPaths?.length ?? 0) > 0 || slot.interceptingRoutes.some((intercept) => interceptTargetsRoute(intercept.targetPattern, route) && (intercept.loadingPaths?.length ?? 0) > 0)) || hasSiblingInterceptLoading;
|
|
67
70
|
}
|
|
68
71
|
/** Project an `AppRoute` down to the public `VinextLinkPrefetchRoute` shape. */
|
|
69
|
-
function toLinkPrefetchRoute(route, hasSiblingInterceptLoading = route.siblingIntercepts.some((intercept) => interceptTargetsRoute(intercept.targetPattern, route) && (intercept.loadingPaths?.length ?? 0) > 0)) {
|
|
72
|
+
function toLinkPrefetchRoute(route, hasSiblingInterceptLoading = route.siblingIntercepts.some((intercept) => interceptTargetsRoute(intercept.targetPattern, route) && (intercept.loadingPaths?.length ?? 0) > 0), rendersDynamically = false) {
|
|
70
73
|
return {
|
|
71
74
|
canPrefetchLoadingShell: hasLoadingBoundary(route, hasSiblingInterceptLoading),
|
|
72
75
|
patternParts: [...route.patternParts],
|
|
73
76
|
isDynamic: route.isDynamic,
|
|
77
|
+
...rendersDynamically ? { rendersDynamically: true } : {},
|
|
74
78
|
...requiresDynamicNavigationRequest(route) ? { requiresDynamicNavigationRequest: true } : {},
|
|
75
79
|
...(route.rootParamNames?.length ?? 0) > 0 ? { hasRootParams: true } : {}
|
|
76
80
|
};
|
|
77
81
|
}
|
|
78
|
-
/**
|
|
79
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Project App routes together so sibling-intercept loading is applied to its
|
|
84
|
+
* target route. `classifier` reads each route's segment config, and each
|
|
85
|
+
* intercepting page's, which applies to its target route.
|
|
86
|
+
*/
|
|
87
|
+
function toLinkPrefetchRoutes(routes, classifier) {
|
|
80
88
|
const siblingInterceptLoadingTargets = [];
|
|
81
89
|
for (const route of routes) for (const intercept of route.siblingIntercepts) if ((intercept.loadingPaths?.length ?? 0) > 0) siblingInterceptLoadingTargets.push(splitPatternParts(intercept.targetPattern));
|
|
82
|
-
|
|
90
|
+
const intercepts = classifier ? collectClassifiedIntercepts(routes, classifier) : [];
|
|
91
|
+
return routes.filter(isLinkPrefetchRoute).map((route) => {
|
|
92
|
+
const prefetchRoute = toLinkPrefetchRoute(route, siblingInterceptLoadingTargets.some((targetParts) => patternsStructurallyEquivalent(targetParts, route.patternParts)), classifier?.route(route) ?? false);
|
|
93
|
+
const routeIntercepts = intercepts.filter(({ targetPatternParts }) => interceptTargetMayMatchRoute(targetPatternParts, route.patternParts)).map(({ intercept }) => intercept);
|
|
94
|
+
return routeIntercepts.length > 0 ? {
|
|
95
|
+
...prefetchRoute,
|
|
96
|
+
intercepts: routeIntercepts
|
|
97
|
+
} : prefetchRoute;
|
|
98
|
+
});
|
|
83
99
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
100
|
+
/**
|
|
101
|
+
* Whether some URL matches both the intercept's target and the route:
|
|
102
|
+
* `/foo/:id` also intercepts a static `/foo/static` route, and `/:name/static`
|
|
103
|
+
* crosses `/foo/:id` at `/foo/static`. A catch-all counts as overlapping; the
|
|
104
|
+
* client checks the URL against the intercept's own target pattern anyway.
|
|
105
|
+
*/
|
|
106
|
+
function interceptTargetMayMatchRoute(targetPatternParts, routePatternParts) {
|
|
107
|
+
const isParam = (part) => part.startsWith(":");
|
|
108
|
+
const isCatchAll = (part) => isParam(part) && (part.endsWith("+") || part.endsWith("*"));
|
|
109
|
+
for (let index = 0;; index++) {
|
|
110
|
+
const target = targetPatternParts[index];
|
|
111
|
+
const route = routePatternParts[index];
|
|
112
|
+
if (target === void 0 || route === void 0) {
|
|
113
|
+
const rest = target ?? route;
|
|
114
|
+
return rest === void 0 || isCatchAll(rest) && rest.endsWith("*");
|
|
115
|
+
}
|
|
116
|
+
if (isCatchAll(target) || isCatchAll(route)) return true;
|
|
117
|
+
if (!isParam(target) && !isParam(route) && target !== route) return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Every intercepting page once, with its classification. A slot's intercepts
|
|
122
|
+
* are listed on each route that shares the slot. The intercepted response also
|
|
123
|
+
* renders branches of its source route that the intercepting page's tree
|
|
124
|
+
* doesn't cover, such as other slots, so a source route that renders
|
|
125
|
+
* dynamically makes the intercept dynamic too. The client also counts the
|
|
126
|
+
* descendant route an interception context resolves to.
|
|
127
|
+
*/
|
|
128
|
+
function collectClassifiedIntercepts(routes, classifier) {
|
|
129
|
+
const sources = /* @__PURE__ */ new Map();
|
|
130
|
+
const add = (intercept, layoutPaths, route) => {
|
|
131
|
+
const key = `${intercept.sourceMatchPattern}\0${intercept.pagePath}`;
|
|
132
|
+
const seen = sources.get(key);
|
|
133
|
+
if (seen && (seen.route.pattern === intercept.sourceMatchPattern || route.pattern !== intercept.sourceMatchPattern)) return;
|
|
134
|
+
sources.set(key, {
|
|
135
|
+
intercept,
|
|
136
|
+
layoutPaths,
|
|
137
|
+
route
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
for (const route of routes) {
|
|
141
|
+
for (const slot of route.parallelSlots) {
|
|
142
|
+
const slotLayoutPaths = slot.layoutPath ? [...route.layouts, slot.layoutPath] : route.layouts;
|
|
143
|
+
for (const intercept of slot.interceptingRoutes) add(intercept, slotLayoutPaths, route);
|
|
144
|
+
}
|
|
145
|
+
for (const intercept of route.siblingIntercepts) add(intercept, route.layouts, route);
|
|
146
|
+
}
|
|
147
|
+
return [...sources.values()].map(({ intercept, layoutPaths, route }) => {
|
|
148
|
+
const rendersDynamically = classifier.intercept(intercept, [...layoutPaths, ...intercept.layoutPaths]) || classifier.route(route);
|
|
149
|
+
const targetPatternParts = splitPatternParts(intercept.targetPattern);
|
|
150
|
+
return {
|
|
151
|
+
intercept: {
|
|
152
|
+
sourcePatternParts: splitPatternParts(intercept.sourceMatchPattern),
|
|
153
|
+
targetPatternParts,
|
|
154
|
+
...rendersDynamically ? { rendersDynamically: true } : {}
|
|
155
|
+
},
|
|
156
|
+
targetPatternParts
|
|
157
|
+
};
|
|
158
|
+
});
|
|
104
159
|
}
|
|
105
|
-
|
|
106
|
-
|
|
160
|
+
/**
|
|
161
|
+
* Generate the virtual module that holds the browser RouteManifest.
|
|
162
|
+
*
|
|
163
|
+
* The App browser runtime imports it dynamically when hydration starts, so the
|
|
164
|
+
* manifest, which grows with every route, stays out of the entry chunk. The
|
|
165
|
+
* JSON string keeps the parse on V8's fast JSON path.
|
|
166
|
+
*/
|
|
167
|
+
function generateBrowserRouteManifestModule(routeManifest) {
|
|
168
|
+
if (routeManifest === null) return "export default null;";
|
|
169
|
+
return `export default JSON.parse(${JSON.stringify(JSON.stringify(toBrowserRouteManifestWire(routeManifest)))});`;
|
|
107
170
|
}
|
|
108
171
|
//#endregion
|
|
109
|
-
export { generateBrowserEntry, toLinkPrefetchRoute, toLinkPrefetchRoutes };
|
|
172
|
+
export { generateBrowserEntry, generateBrowserRouteManifestModule, toHashedRouteHandlerRoutes, toLinkPrefetchRoute, toLinkPrefetchRoutes };
|
|
@@ -93,6 +93,8 @@ type AppRouterConfig = {
|
|
|
93
93
|
draftModeSecret?: string;
|
|
94
94
|
/** Server-only token used to authorize build-time prerender endpoints. */
|
|
95
95
|
prerenderSecret?: string;
|
|
96
|
+
/** next.config `skipProxyUrlNormalize`. */
|
|
97
|
+
skipProxyUrlNormalize?: boolean;
|
|
96
98
|
/** next.config `skipTrailingSlashRedirect`. */
|
|
97
99
|
skipTrailingSlashRedirect?: boolean;
|
|
98
100
|
/** Dev-only key authenticating the hybrid Pages handler's forwarded middleware context. */
|
|
@@ -110,4 +112,5 @@ export declare function generateAppRequestRscEntry(appDir: string, routes: AppRo
|
|
|
110
112
|
export declare function generateRscEntry(appDir: string, routes: AppRoute[], middlewarePath?: string | null, metadataRoutes?: MetadataFileRoute[], globalErrorPath?: string | null, basePath?: string, trailingSlash?: boolean, config?: AppRouterConfig, instrumentationPath?: string | null, responseStageOnly?: boolean): string;
|
|
111
113
|
/** Generate the response-only App RSC graph used by the named cache stage. */
|
|
112
114
|
export declare function generateAppResponseRscEntry(appDir: string, routes: AppRoute[], _middlewarePath?: string | null, metadataRoutes?: MetadataFileRoute[], globalErrorPath?: string | null, basePath?: string, trailingSlash?: boolean, config?: AppRouterConfig, instrumentationPath?: string | null): string;
|
|
113
|
-
//#endregion
|
|
115
|
+
//#endregion
|
|
116
|
+
export {};
|