vinext 0.0.50 → 0.0.51
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/dist/build/google-fonts/fallback-metrics-data.js +14031 -0
- package/dist/build/google-fonts/fallback-metrics-data.js.map +1 -0
- package/dist/build/google-fonts/fallback-metrics.d.ts +13 -0
- package/dist/build/google-fonts/fallback-metrics.js +46 -0
- package/dist/build/google-fonts/fallback-metrics.js.map +1 -0
- package/dist/build/precompress.d.ts +13 -2
- package/dist/build/precompress.js +12 -3
- package/dist/build/precompress.js.map +1 -1
- package/dist/build/prerender.d.ts +1 -1
- package/dist/build/prerender.js +44 -14
- package/dist/build/prerender.js.map +1 -1
- package/dist/build/report.d.ts +5 -4
- package/dist/build/report.js +196 -348
- package/dist/build/report.js.map +1 -1
- package/dist/check.js +1 -0
- package/dist/check.js.map +1 -1
- package/dist/cli.js +60 -3
- package/dist/cli.js.map +1 -1
- package/dist/client/window-next.d.ts +3 -1
- package/dist/client/window-next.js.map +1 -1
- package/dist/config/dotenv.d.ts +11 -1
- package/dist/config/dotenv.js.map +1 -1
- package/dist/config/next-config.d.ts +87 -3
- package/dist/config/next-config.js +222 -6
- package/dist/config/next-config.js.map +1 -1
- package/dist/config/tsconfig-paths.d.ts +13 -0
- package/dist/config/tsconfig-paths.js +117 -0
- package/dist/config/tsconfig-paths.js.map +1 -0
- package/dist/deploy.js +3 -2
- package/dist/deploy.js.map +1 -1
- package/dist/entries/app-browser-entry.d.ts +2 -2
- package/dist/entries/app-browser-entry.js +26 -1
- package/dist/entries/app-browser-entry.js.map +1 -1
- package/dist/entries/app-rsc-entry.d.ts +19 -1
- package/dist/entries/app-rsc-entry.js +38 -12
- package/dist/entries/app-rsc-entry.js.map +1 -1
- package/dist/entries/app-rsc-manifest.d.ts +9 -0
- package/dist/entries/app-rsc-manifest.js +4 -1
- package/dist/entries/app-rsc-manifest.js.map +1 -1
- package/dist/entries/pages-client-entry.js +3 -5
- package/dist/entries/pages-client-entry.js.map +1 -1
- package/dist/entries/pages-server-entry.js +19 -1
- package/dist/entries/pages-server-entry.js.map +1 -1
- package/dist/index.js +130 -37
- package/dist/index.js.map +1 -1
- package/dist/plugins/client-reference-dedup.d.ts +15 -2
- package/dist/plugins/client-reference-dedup.js +138 -16
- package/dist/plugins/client-reference-dedup.js.map +1 -1
- package/dist/plugins/fonts.d.ts +2 -2
- package/dist/plugins/fonts.js +15 -6
- package/dist/plugins/fonts.js.map +1 -1
- package/dist/plugins/sass.d.ts +34 -0
- package/dist/plugins/sass.js +22 -0
- package/dist/plugins/sass.js.map +1 -0
- package/dist/routing/app-route-graph.d.ts +31 -2
- package/dist/routing/app-route-graph.js +82 -10
- package/dist/routing/app-route-graph.js.map +1 -1
- package/dist/routing/route-pattern.d.ts +56 -1
- package/dist/routing/route-pattern.js +60 -1
- package/dist/routing/route-pattern.js.map +1 -1
- package/dist/server/app-browser-action-result.d.ts +27 -2
- package/dist/server/app-browser-action-result.js +63 -2
- package/dist/server/app-browser-action-result.js.map +1 -1
- package/dist/server/app-browser-entry.js +262 -108
- package/dist/server/app-browser-entry.js.map +1 -1
- package/dist/server/app-browser-hydration.d.ts +13 -1
- package/dist/server/app-browser-hydration.js +9 -1
- package/dist/server/app-browser-hydration.js.map +1 -1
- package/dist/server/app-browser-navigation-controller.d.ts +14 -1
- package/dist/server/app-browser-navigation-controller.js +28 -9
- package/dist/server/app-browser-navigation-controller.js.map +1 -1
- package/dist/server/app-browser-popstate.d.ts +16 -0
- package/dist/server/app-browser-popstate.js +17 -0
- package/dist/server/app-browser-popstate.js.map +1 -0
- package/dist/server/app-browser-rsc-redirect.d.ts +28 -0
- package/dist/server/app-browser-rsc-redirect.js +37 -0
- package/dist/server/app-browser-rsc-redirect.js.map +1 -0
- package/dist/server/app-browser-state.d.ts +11 -7
- package/dist/server/app-browser-state.js +45 -27
- package/dist/server/app-browser-state.js.map +1 -1
- package/dist/server/app-browser-stream.d.ts +5 -4
- package/dist/server/app-browser-stream.js +5 -6
- package/dist/server/app-browser-stream.js.map +1 -1
- package/dist/server/app-browser-visible-commit.d.ts +5 -0
- package/dist/server/app-browser-visible-commit.js +38 -5
- package/dist/server/app-browser-visible-commit.js.map +1 -1
- package/dist/server/app-elements-wire.d.ts +38 -6
- package/dist/server/app-elements-wire.js +106 -6
- package/dist/server/app-elements-wire.js.map +1 -1
- package/dist/server/app-elements.d.ts +2 -2
- package/dist/server/app-elements.js +2 -2
- package/dist/server/app-elements.js.map +1 -1
- package/dist/server/app-fallback-renderer.d.ts +10 -1
- package/dist/server/app-fallback-renderer.js +37 -1
- package/dist/server/app-fallback-renderer.js.map +1 -1
- package/dist/server/app-history-state.d.ts +26 -0
- package/dist/server/app-history-state.js +53 -0
- package/dist/server/app-history-state.js.map +1 -0
- package/dist/server/app-page-boundary-render.d.ts +10 -1
- package/dist/server/app-page-boundary-render.js +13 -6
- package/dist/server/app-page-boundary-render.js.map +1 -1
- package/dist/server/app-page-boundary.js +3 -2
- package/dist/server/app-page-boundary.js.map +1 -1
- package/dist/server/app-page-cache.d.ts +13 -0
- package/dist/server/app-page-cache.js +25 -8
- package/dist/server/app-page-cache.js.map +1 -1
- package/dist/server/app-page-dispatch.d.ts +5 -0
- package/dist/server/app-page-dispatch.js +68 -11
- package/dist/server/app-page-dispatch.js.map +1 -1
- package/dist/server/app-page-element-builder.d.ts +7 -0
- package/dist/server/app-page-element-builder.js +32 -4
- package/dist/server/app-page-element-builder.js.map +1 -1
- package/dist/server/app-page-execution.js +2 -3
- package/dist/server/app-page-execution.js.map +1 -1
- package/dist/server/app-page-head.d.ts +7 -0
- package/dist/server/app-page-head.js +2 -1
- package/dist/server/app-page-head.js.map +1 -1
- package/dist/server/app-page-probe.d.ts +23 -1
- package/dist/server/app-page-probe.js +29 -1
- package/dist/server/app-page-probe.js.map +1 -1
- package/dist/server/app-page-render-observation.d.ts +35 -0
- package/dist/server/app-page-render-observation.js +68 -0
- package/dist/server/app-page-render-observation.js.map +1 -0
- package/dist/server/app-page-render.d.ts +5 -1
- package/dist/server/app-page-render.js +79 -3
- package/dist/server/app-page-render.js.map +1 -1
- package/dist/server/app-page-request.d.ts +1 -0
- package/dist/server/app-page-request.js.map +1 -1
- package/dist/server/app-page-response.js +3 -2
- package/dist/server/app-page-response.js.map +1 -1
- package/dist/server/app-page-route-wiring.d.ts +3 -1
- package/dist/server/app-page-route-wiring.js +42 -14
- package/dist/server/app-page-route-wiring.js.map +1 -1
- package/dist/server/app-page-stream.d.ts +2 -0
- package/dist/server/app-page-stream.js +1 -0
- package/dist/server/app-page-stream.js.map +1 -1
- package/dist/server/app-router-entry.js +1 -13
- package/dist/server/app-router-entry.js.map +1 -1
- package/dist/server/app-rsc-cache-busting.d.ts +19 -1
- package/dist/server/app-rsc-cache-busting.js +36 -1
- package/dist/server/app-rsc-cache-busting.js.map +1 -1
- package/dist/server/app-rsc-embedded-chunks.d.ts +9 -0
- package/dist/server/app-rsc-embedded-chunks.js +34 -0
- package/dist/server/app-rsc-embedded-chunks.js.map +1 -0
- package/dist/server/app-rsc-errors.d.ts +4 -1
- package/dist/server/app-rsc-errors.js +1 -1
- package/dist/server/app-rsc-errors.js.map +1 -1
- package/dist/server/app-rsc-handler.d.ts +12 -4
- package/dist/server/app-rsc-handler.js +6 -1
- package/dist/server/app-rsc-handler.js.map +1 -1
- package/dist/server/app-rsc-route-matching.d.ts +23 -0
- package/dist/server/app-rsc-route-matching.js +45 -23
- package/dist/server/app-rsc-route-matching.js.map +1 -1
- package/dist/server/app-server-action-execution.d.ts +35 -3
- package/dist/server/app-server-action-execution.js +87 -33
- package/dist/server/app-server-action-execution.js.map +1 -1
- package/dist/server/app-ssr-entry.d.ts +1 -0
- package/dist/server/app-ssr-entry.js +37 -13
- package/dist/server/app-ssr-entry.js.map +1 -1
- package/dist/server/app-ssr-error-meta.d.ts +14 -0
- package/dist/server/app-ssr-error-meta.js +50 -0
- package/dist/server/app-ssr-error-meta.js.map +1 -0
- package/dist/server/app-ssr-stream.d.ts +1 -1
- package/dist/server/app-ssr-stream.js +9 -12
- package/dist/server/app-ssr-stream.js.map +1 -1
- package/dist/server/artifact-compatibility.d.ts +12 -2
- package/dist/server/artifact-compatibility.js +12 -8
- package/dist/server/artifact-compatibility.js.map +1 -1
- package/dist/server/cache-proof.d.ts +124 -5
- package/dist/server/cache-proof.js +416 -18
- package/dist/server/cache-proof.js.map +1 -1
- package/dist/server/dev-lockfile.d.ts +110 -0
- package/dist/server/dev-lockfile.js +180 -0
- package/dist/server/dev-lockfile.js.map +1 -0
- package/dist/server/dev-server.js +15 -5
- package/dist/server/dev-server.js.map +1 -1
- package/dist/server/file-based-metadata.d.ts +13 -0
- package/dist/server/file-based-metadata.js +49 -2
- package/dist/server/file-based-metadata.js.map +1 -1
- package/dist/server/headers.d.ts +3 -1
- package/dist/server/headers.js +5 -2
- package/dist/server/headers.js.map +1 -1
- package/dist/server/html.js +1 -1
- package/dist/server/html.js.map +1 -1
- package/dist/server/http-error-responses.d.ts +10 -0
- package/dist/server/http-error-responses.js +11 -1
- package/dist/server/http-error-responses.js.map +1 -1
- package/dist/server/isr-cache.d.ts +2 -1
- package/dist/server/isr-cache.js +4 -2
- package/dist/server/isr-cache.js.map +1 -1
- package/dist/server/metadata-route-response.js +22 -5
- package/dist/server/metadata-route-response.js.map +1 -1
- package/dist/server/metadata-routes.js +27 -8
- package/dist/server/metadata-routes.js.map +1 -1
- package/dist/server/middleware-runtime.js +1 -0
- package/dist/server/middleware-runtime.js.map +1 -1
- package/dist/server/middleware.d.ts +12 -0
- package/dist/server/middleware.js +12 -0
- package/dist/server/middleware.js.map +1 -1
- package/dist/server/navigation-planner.d.ts +19 -5
- package/dist/server/navigation-planner.js +278 -17
- package/dist/server/navigation-planner.js.map +1 -1
- package/dist/server/navigation-trace.d.ts +8 -1
- package/dist/server/navigation-trace.js +7 -0
- package/dist/server/navigation-trace.js.map +1 -1
- package/dist/server/normalize-path.d.ts +2 -1
- package/dist/server/normalize-path.js +4 -1
- package/dist/server/normalize-path.js.map +1 -1
- package/dist/server/pages-api-route.js +1 -0
- package/dist/server/pages-api-route.js.map +1 -1
- package/dist/server/pages-page-data.d.ts +3 -2
- package/dist/server/pages-page-data.js +22 -3
- package/dist/server/pages-page-data.js.map +1 -1
- package/dist/server/pages-page-response.js +1 -1
- package/dist/server/prod-server.d.ts +28 -1
- package/dist/server/prod-server.js +62 -9
- package/dist/server/prod-server.js.map +1 -1
- package/dist/server/server-action-not-found.d.ts +16 -3
- package/dist/server/server-action-not-found.js +19 -1
- package/dist/server/server-action-not-found.js.map +1 -1
- package/dist/server/server-globals.d.ts +5 -0
- package/dist/server/server-globals.js +37 -0
- package/dist/server/server-globals.js.map +1 -0
- package/dist/server/static-file-cache.js +1 -1
- package/dist/server/static-file-cache.js.map +1 -1
- package/dist/shims/cache-runtime.d.ts +19 -2
- package/dist/shims/cache-runtime.js +67 -11
- package/dist/shims/cache-runtime.js.map +1 -1
- package/dist/shims/cache.d.ts +5 -18
- package/dist/shims/cache.js +2 -0
- package/dist/shims/cache.js.map +1 -1
- package/dist/shims/error-boundary.js +6 -8
- package/dist/shims/error-boundary.js.map +1 -1
- package/dist/shims/error.d.ts +18 -1
- package/dist/shims/error.js +56 -1
- package/dist/shims/error.js.map +1 -1
- package/dist/shims/fetch-cache.d.ts +4 -1
- package/dist/shims/fetch-cache.js +40 -5
- package/dist/shims/fetch-cache.js.map +1 -1
- package/dist/shims/font-google-base.d.ts +22 -8
- package/dist/shims/font-google-base.js +41 -71
- package/dist/shims/font-google-base.js.map +1 -1
- package/dist/shims/font-local.d.ts +3 -20
- package/dist/shims/font-local.js +23 -75
- package/dist/shims/font-local.js.map +1 -1
- package/dist/shims/font-utils.d.ts +51 -0
- package/dist/shims/font-utils.js +97 -0
- package/dist/shims/font-utils.js.map +1 -0
- package/dist/shims/hash-scroll.d.ts +7 -0
- package/dist/shims/hash-scroll.js +30 -0
- package/dist/shims/hash-scroll.js.map +1 -0
- package/dist/shims/headers.d.ts +8 -11
- package/dist/shims/headers.js +22 -2
- package/dist/shims/headers.js.map +1 -1
- package/dist/shims/image.d.ts +1 -0
- package/dist/shims/image.js +144 -78
- package/dist/shims/image.js.map +1 -1
- package/dist/shims/internal/app-router-context.d.ts +6 -6
- package/dist/shims/internal/app-router-context.js +17 -6
- package/dist/shims/internal/app-router-context.js.map +1 -1
- package/dist/shims/link-prefetch.d.ts +9 -1
- package/dist/shims/link-prefetch.js +11 -6
- package/dist/shims/link-prefetch.js.map +1 -1
- package/dist/shims/link.d.ts +12 -2
- package/dist/shims/link.js +78 -32
- package/dist/shims/link.js.map +1 -1
- package/dist/shims/metadata.d.ts +16 -30
- package/dist/shims/metadata.js +87 -28
- package/dist/shims/metadata.js.map +1 -1
- package/dist/shims/navigation.d.ts +158 -17
- package/dist/shims/navigation.js +324 -74
- package/dist/shims/navigation.js.map +1 -1
- package/dist/shims/navigation.react-server.d.ts +3 -2
- package/dist/shims/navigation.react-server.js +5 -2
- package/dist/shims/navigation.react-server.js.map +1 -1
- package/dist/shims/pages-router-runtime.d.ts +7 -0
- package/dist/shims/pages-router-runtime.js +16 -0
- package/dist/shims/pages-router-runtime.js.map +1 -0
- package/dist/shims/router.d.ts +32 -6
- package/dist/shims/router.js +197 -242
- package/dist/shims/router.js.map +1 -1
- package/dist/shims/script.js +110 -32
- package/dist/shims/script.js.map +1 -1
- package/dist/shims/server.js +2 -1
- package/dist/shims/server.js.map +1 -1
- package/dist/shims/slot.d.ts +1 -0
- package/dist/shims/slot.js +41 -1
- package/dist/shims/slot.js.map +1 -1
- package/dist/shims/unified-request-context.js +2 -0
- package/dist/shims/unified-request-context.js.map +1 -1
- package/dist/shims/unrecognized-action-error.d.ts +35 -0
- package/dist/shims/unrecognized-action-error.js +41 -0
- package/dist/shims/unrecognized-action-error.js.map +1 -0
- package/dist/shims/url-utils.d.ts +21 -1
- package/dist/shims/url-utils.js +67 -3
- package/dist/shims/url-utils.js.map +1 -1
- package/dist/utils/asset-prefix.d.ts +69 -0
- package/dist/utils/asset-prefix.js +91 -0
- package/dist/utils/asset-prefix.js.map +1 -0
- package/dist/utils/base-path.d.ts +7 -1
- package/dist/utils/base-path.js +10 -1
- package/dist/utils/base-path.js.map +1 -1
- package/dist/utils/navigation-signal.d.ts +1 -2
- package/dist/utils/navigation-signal.js +1 -1
- package/dist/utils/navigation-signal.js.map +1 -1
- package/dist/utils/sorted-array.d.ts +9 -0
- package/dist/utils/sorted-array.js +22 -0
- package/dist/utils/sorted-array.js.map +1 -0
- package/package.json +3 -3
package/dist/shims/url-utils.js
CHANGED
|
@@ -6,6 +6,14 @@ import { hasBasePath, stripBasePath } from "../utils/base-path.js";
|
|
|
6
6
|
* Used by link.tsx, navigation.ts, and router.ts to normalize
|
|
7
7
|
* same-origin absolute URLs to local paths for client-side navigation.
|
|
8
8
|
*/
|
|
9
|
+
const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
|
|
10
|
+
function isAbsoluteUrl(url) {
|
|
11
|
+
const firstChar = url.charCodeAt(0);
|
|
12
|
+
return (firstChar >= 65 && firstChar <= 90 || firstChar >= 97 && firstChar <= 122) && ABSOLUTE_URL_REGEX.test(url);
|
|
13
|
+
}
|
|
14
|
+
function isAbsoluteOrProtocolRelativeUrl(url) {
|
|
15
|
+
return isAbsoluteUrl(url) || url.startsWith("//");
|
|
16
|
+
}
|
|
9
17
|
/**
|
|
10
18
|
* If `url` is an absolute same-origin URL, return the local path
|
|
11
19
|
* (pathname + search + hash). Returns null for truly external URLs
|
|
@@ -36,10 +44,66 @@ function toSameOriginAppPath(url, basePath) {
|
|
|
36
44
|
}
|
|
37
45
|
}
|
|
38
46
|
/**
|
|
47
|
+
* Split a path string into pathname, query, and hash without depending on
|
|
48
|
+
* the URL constructor (which would resolve relative paths against an origin).
|
|
49
|
+
*
|
|
50
|
+
* Ported from Next.js: packages/next/src/shared/lib/router/utils/parse-path.ts
|
|
51
|
+
*/
|
|
52
|
+
function parsePath(path) {
|
|
53
|
+
const hashIndex = path.indexOf("#");
|
|
54
|
+
const queryIndex = path.indexOf("?");
|
|
55
|
+
const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
|
|
56
|
+
if (hasQuery || hashIndex > -1) return {
|
|
57
|
+
pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
|
|
58
|
+
query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : void 0) : "",
|
|
59
|
+
hash: hashIndex > -1 ? path.slice(hashIndex) : ""
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
pathname: path,
|
|
63
|
+
query: "",
|
|
64
|
+
hash: ""
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Drop trailing slashes from a route while preserving the bare root.
|
|
69
|
+
*
|
|
70
|
+
* Ported from Next.js: packages/next/src/shared/lib/router/utils/remove-trailing-slash.ts
|
|
71
|
+
*/
|
|
72
|
+
function removeRouteTrailingSlash(route) {
|
|
73
|
+
return route.replace(/\/$/, "") || "/";
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Normalise the trailing slash of a local URL according to the
|
|
77
|
+
* `trailingSlash` config option in `next.config.js`. Used by the `<Link>`
|
|
78
|
+
* shim so that rendered `href` attributes match the canonical URL form
|
|
79
|
+
* (which is what the server-side redirect would otherwise enforce).
|
|
80
|
+
*
|
|
81
|
+
* Behaviour matches Next.js's client-side `normalizePathTrailingSlash`:
|
|
82
|
+
* packages/next/src/client/normalize-trailing-slash.ts
|
|
83
|
+
*
|
|
84
|
+
* - Absolute URLs (`http://`, `https://`, `//`) and non-local strings are
|
|
85
|
+
* returned unchanged.
|
|
86
|
+
* - Paths whose final segment looks like a filename (`...\.ext`) have any
|
|
87
|
+
* trailing slash stripped even when `trailingSlash: true`, mirroring the
|
|
88
|
+
* `.well-known`-aware redirect rule shipped in `routes-manifest.json`.
|
|
89
|
+
* - Query strings and hash fragments are preserved verbatim.
|
|
90
|
+
* - Idempotent: already-canonical paths round-trip unchanged.
|
|
91
|
+
*/
|
|
92
|
+
function normalizePathTrailingSlash(path, trailingSlash) {
|
|
93
|
+
if (!path.startsWith("/") || path.startsWith("//")) return path;
|
|
94
|
+
const { pathname, query, hash } = parsePath(path);
|
|
95
|
+
if (trailingSlash) {
|
|
96
|
+
if (/\.[^/]+\/?$/.test(pathname)) return `${removeRouteTrailingSlash(pathname)}${query}${hash}`;
|
|
97
|
+
if (pathname.endsWith("/")) return `${pathname}${query}${hash}`;
|
|
98
|
+
return `${pathname}/${query}${hash}`;
|
|
99
|
+
}
|
|
100
|
+
return `${removeRouteTrailingSlash(pathname)}${query}${hash}`;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
39
103
|
* Prepend basePath to a local path for browser URLs / fetches.
|
|
40
104
|
*/
|
|
41
105
|
function withBasePath(path, basePath) {
|
|
42
|
-
if (!basePath || !path.startsWith("/") ||
|
|
106
|
+
if (!basePath || !path.startsWith("/") || isAbsoluteOrProtocolRelativeUrl(path)) return path;
|
|
43
107
|
return basePath + path;
|
|
44
108
|
}
|
|
45
109
|
/**
|
|
@@ -49,7 +113,7 @@ function withBasePath(path, basePath) {
|
|
|
49
113
|
function resolveRelativeHref(href, currentUrl, basePath = "") {
|
|
50
114
|
const base = currentUrl ?? (typeof window !== "undefined" ? window.location.href : void 0);
|
|
51
115
|
if (!base) return href;
|
|
52
|
-
if (href.startsWith("/") ||
|
|
116
|
+
if (href.startsWith("/") || isAbsoluteOrProtocolRelativeUrl(href)) return href;
|
|
53
117
|
try {
|
|
54
118
|
const resolved = new URL(href, base);
|
|
55
119
|
return (basePath && resolved.pathname === basePath ? "" : basePath ? stripBasePath(resolved.pathname, basePath) : resolved.pathname) + resolved.search + resolved.hash;
|
|
@@ -78,6 +142,6 @@ function isHashOnlyBrowserUrlChange(href, currentHref, basePath = "") {
|
|
|
78
142
|
}
|
|
79
143
|
}
|
|
80
144
|
//#endregion
|
|
81
|
-
export { isHashOnlyBrowserUrlChange, resolveRelativeHref, toBrowserNavigationHref, toSameOriginAppPath, toSameOriginPath, withBasePath };
|
|
145
|
+
export { isAbsoluteOrProtocolRelativeUrl, isAbsoluteUrl, isHashOnlyBrowserUrlChange, normalizePathTrailingSlash, resolveRelativeHref, toBrowserNavigationHref, toSameOriginAppPath, toSameOriginPath, withBasePath };
|
|
82
146
|
|
|
83
147
|
//# sourceMappingURL=url-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-utils.js","names":[],"sources":["../../src/shims/url-utils.ts"],"sourcesContent":["/**\n * Shared URL utilities for same-origin detection.\n *\n * Used by link.tsx, navigation.ts, and router.ts to normalize\n * same-origin absolute URLs to local paths for client-side navigation.\n */\nimport { hasBasePath, stripBasePath } from \"../utils/base-path.js\";\n\n/**\n * If `url` is an absolute same-origin URL, return the local path\n * (pathname + search + hash). Returns null for truly external URLs\n * or on the server (where origin is unknown).\n */\nexport function toSameOriginPath(url: string): string | null {\n if (typeof window === \"undefined\") return null;\n try {\n const parsed = url.startsWith(\"//\") ? new URL(url, window.location.origin) : new URL(url);\n if (parsed.origin === window.location.origin) {\n return parsed.pathname + parsed.search + parsed.hash;\n }\n } catch {\n // not a valid absolute URL — ignore\n }\n return null;\n}\n\n/**\n * If `url` is an absolute same-origin URL, return the app-relative path\n * (basePath stripped from the pathname, if configured). Returns null for\n * truly external URLs or on the server.\n */\nexport function toSameOriginAppPath(url: string, basePath: string): string | null {\n const localPath = toSameOriginPath(url);\n if (localPath == null || !basePath) return localPath;\n\n try {\n const parsed = new URL(localPath, \"http://vinext.local\");\n if (!hasBasePath(parsed.pathname, basePath)) {\n return null;\n }\n const pathname = stripBasePath(parsed.pathname, basePath);\n return pathname + parsed.search + parsed.hash;\n } catch {\n return localPath;\n }\n}\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"url-utils.js","names":[],"sources":["../../src/shims/url-utils.ts"],"sourcesContent":["/**\n * Shared URL utilities for same-origin detection.\n *\n * Used by link.tsx, navigation.ts, and router.ts to normalize\n * same-origin absolute URLs to local paths for client-side navigation.\n */\nimport { hasBasePath, stripBasePath } from \"../utils/base-path.js\";\n\n// Mirrors Next.js's absolute URL classification:\n// packages/next/src/shared/lib/utils.ts\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/;\n\nexport function isAbsoluteUrl(url: string): boolean {\n const firstChar = url.charCodeAt(0);\n const startsWithLetter =\n (firstChar >= 65 && firstChar <= 90) || (firstChar >= 97 && firstChar <= 122);\n\n return startsWithLetter && ABSOLUTE_URL_REGEX.test(url);\n}\n\nexport function isAbsoluteOrProtocolRelativeUrl(url: string): boolean {\n return isAbsoluteUrl(url) || url.startsWith(\"//\");\n}\n\n/**\n * If `url` is an absolute same-origin URL, return the local path\n * (pathname + search + hash). Returns null for truly external URLs\n * or on the server (where origin is unknown).\n */\nexport function toSameOriginPath(url: string): string | null {\n if (typeof window === \"undefined\") return null;\n try {\n const parsed = url.startsWith(\"//\") ? new URL(url, window.location.origin) : new URL(url);\n if (parsed.origin === window.location.origin) {\n return parsed.pathname + parsed.search + parsed.hash;\n }\n } catch {\n // not a valid absolute URL — ignore\n }\n return null;\n}\n\n/**\n * If `url` is an absolute same-origin URL, return the app-relative path\n * (basePath stripped from the pathname, if configured). Returns null for\n * truly external URLs or on the server.\n */\nexport function toSameOriginAppPath(url: string, basePath: string): string | null {\n const localPath = toSameOriginPath(url);\n if (localPath == null || !basePath) return localPath;\n\n try {\n const parsed = new URL(localPath, \"http://vinext.local\");\n if (!hasBasePath(parsed.pathname, basePath)) {\n return null;\n }\n const pathname = stripBasePath(parsed.pathname, basePath);\n return pathname + parsed.search + parsed.hash;\n } catch {\n return localPath;\n }\n}\n\n/**\n * Split a path string into pathname, query, and hash without depending on\n * the URL constructor (which would resolve relative paths against an origin).\n *\n * Ported from Next.js: packages/next/src/shared/lib/router/utils/parse-path.ts\n */\nfunction parsePath(path: string): { pathname: string; query: string; hash: string } {\n const hashIndex = path.indexOf(\"#\");\n const queryIndex = path.indexOf(\"?\");\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : \"\",\n hash: hashIndex > -1 ? path.slice(hashIndex) : \"\",\n };\n }\n\n return { pathname: path, query: \"\", hash: \"\" };\n}\n\n/**\n * Drop trailing slashes from a route while preserving the bare root.\n *\n * Ported from Next.js: packages/next/src/shared/lib/router/utils/remove-trailing-slash.ts\n */\nfunction removeRouteTrailingSlash(route: string): string {\n return route.replace(/\\/$/, \"\") || \"/\";\n}\n\n/**\n * Normalise the trailing slash of a local URL according to the\n * `trailingSlash` config option in `next.config.js`. Used by the `<Link>`\n * shim so that rendered `href` attributes match the canonical URL form\n * (which is what the server-side redirect would otherwise enforce).\n *\n * Behaviour matches Next.js's client-side `normalizePathTrailingSlash`:\n * packages/next/src/client/normalize-trailing-slash.ts\n *\n * - Absolute URLs (`http://`, `https://`, `//`) and non-local strings are\n * returned unchanged.\n * - Paths whose final segment looks like a filename (`...\\.ext`) have any\n * trailing slash stripped even when `trailingSlash: true`, mirroring the\n * `.well-known`-aware redirect rule shipped in `routes-manifest.json`.\n * - Query strings and hash fragments are preserved verbatim.\n * - Idempotent: already-canonical paths round-trip unchanged.\n */\nexport function normalizePathTrailingSlash(path: string, trailingSlash: boolean): string {\n if (!path.startsWith(\"/\") || path.startsWith(\"//\")) {\n return path;\n }\n\n const { pathname, query, hash } = parsePath(path);\n\n if (trailingSlash) {\n if (/\\.[^/]+\\/?$/.test(pathname)) {\n // Looks like a filename — strip trailing slash even with trailingSlash: true.\n return `${removeRouteTrailingSlash(pathname)}${query}${hash}`;\n }\n if (pathname.endsWith(\"/\")) {\n return `${pathname}${query}${hash}`;\n }\n return `${pathname}/${query}${hash}`;\n }\n\n return `${removeRouteTrailingSlash(pathname)}${query}${hash}`;\n}\n\n/**\n * Prepend basePath to a local path for browser URLs / fetches.\n */\nexport function withBasePath(path: string, basePath: string): string {\n if (!basePath || !path.startsWith(\"/\") || isAbsoluteOrProtocolRelativeUrl(path)) {\n return path;\n }\n\n return basePath + path;\n}\n\n/**\n * Resolve a potentially relative href against the current URL.\n * Handles: \"#hash\", \"?query\", \"?query#hash\", and relative paths.\n */\nexport function resolveRelativeHref(href: string, currentUrl?: string, basePath = \"\"): string {\n const base = currentUrl ?? (typeof window !== \"undefined\" ? window.location.href : undefined);\n\n if (!base) return href;\n\n if (href.startsWith(\"/\") || isAbsoluteOrProtocolRelativeUrl(href)) {\n return href;\n }\n\n try {\n const resolved = new URL(href, base);\n const pathname =\n basePath && resolved.pathname === basePath\n ? \"\"\n : basePath\n ? stripBasePath(resolved.pathname, basePath)\n : resolved.pathname;\n return pathname + resolved.search + resolved.hash;\n } catch {\n return href;\n }\n}\n\n/**\n * Convert a local navigation target into the browser URL that should be used\n * for history entries, fetches, and onNavigate callbacks.\n */\nexport function toBrowserNavigationHref(href: string, currentUrl?: string, basePath = \"\"): string {\n const resolved = resolveRelativeHref(href, currentUrl, basePath);\n\n if (!basePath) {\n return withBasePath(resolved, basePath);\n }\n\n if (resolved === \"\") {\n return basePath;\n }\n\n if (resolved.startsWith(\"?\") || resolved.startsWith(\"#\")) {\n return basePath + resolved;\n }\n\n return withBasePath(resolved, basePath);\n}\n\nexport function isHashOnlyBrowserUrlChange(\n href: string,\n currentHref: string,\n basePath = \"\",\n): boolean {\n try {\n const current = new URL(currentHref);\n const next = new URL(href, currentHref);\n const currentPathname = stripBasePath(current.pathname, basePath);\n const nextPathname = stripBasePath(next.pathname, basePath);\n return currentPathname === nextPathname && current.search === next.search && next.hash !== \"\";\n } catch {\n return false;\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//#region src/utils/asset-prefix.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared helpers for next.config `assetPrefix`.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors Next.js semantics: `assetPrefix` is prepended to every JS/CSS/image/
|
|
6
|
+
* static asset URL emitted in the page. It is distinct from `basePath`, which
|
|
7
|
+
* affects route URLs.
|
|
8
|
+
*
|
|
9
|
+
* - A `assetPrefix` of `""` (empty) means "no prefix" — behaviour matches the
|
|
10
|
+
* historical default.
|
|
11
|
+
* - A path prefix like `"/custom-asset-prefix"` is applied as a URL prefix
|
|
12
|
+
* relative to the deployment origin. The prod server must also serve assets
|
|
13
|
+
* under that prefix.
|
|
14
|
+
* - An absolute URL like `"https://cdn.example.com"` makes asset URLs fully
|
|
15
|
+
* qualified. Runtime serving on the deployment origin is a no-op — the CDN
|
|
16
|
+
* serves the assets directly.
|
|
17
|
+
*
|
|
18
|
+
* The path component of the asset URL after the prefix is always
|
|
19
|
+
* `/_next/static/<filename>` to match Next.js's convention. This is the
|
|
20
|
+
* convention upstream test suites assert against.
|
|
21
|
+
*
|
|
22
|
+
* @see https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Suffix appended to the assetPrefix (or used standalone when no prefix is
|
|
26
|
+
* configured) to form the leading portion of every emitted asset URL.
|
|
27
|
+
* Matches Next.js: assets always live under `/_next/static/`.
|
|
28
|
+
*/
|
|
29
|
+
declare const ASSET_PREFIX_URL_DIR = "_next/static";
|
|
30
|
+
/** Whether `assetPrefix` is an absolute URL (vs a path prefix). */
|
|
31
|
+
declare function isAbsoluteAssetPrefix(assetPrefix: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Compute the on-disk `build.assetsDir` for the given `assetPrefix`.
|
|
34
|
+
*
|
|
35
|
+
* - Path prefix (`/cdn`): write to `cdn/_next/static/` so the on-disk layout
|
|
36
|
+
* matches the URL — the Cloudflare ASSETS binding (and any static file
|
|
37
|
+
* server) serves them directly without a runtime rewrite.
|
|
38
|
+
* - Absolute URL (with or without path component): write to `_next/static/`.
|
|
39
|
+
* Runtime serving is best-effort — the CDN is expected to serve these.
|
|
40
|
+
* - Empty: keep the historical default of `assets/`, preserving disk layout
|
|
41
|
+
* for projects that haven't opted into `assetPrefix`.
|
|
42
|
+
*/
|
|
43
|
+
declare function resolveAssetsDir(assetPrefix: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Build the URL prefix to apply to emitted asset URLs. Returns the full URL
|
|
46
|
+
* prefix including the `_next/static/` directory, with a trailing slash.
|
|
47
|
+
*
|
|
48
|
+
* Examples:
|
|
49
|
+
* - `""` → `"/_next/static/"`
|
|
50
|
+
* - `"/cdn"` → `"/cdn/_next/static/"`
|
|
51
|
+
* - `"https://cdn.example.com"` → `"https://cdn.example.com/_next/static/"`
|
|
52
|
+
* - `"https://cdn.example.com/sub"` → `"https://cdn.example.com/sub/_next/static/"`
|
|
53
|
+
*/
|
|
54
|
+
declare function resolveAssetUrlPrefix(assetPrefix: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* Extract the path portion of `assetPrefix` for use in runtime URL matching.
|
|
57
|
+
*
|
|
58
|
+
* - For a path prefix: returns it verbatim (e.g. `/custom-asset-prefix`).
|
|
59
|
+
* - For an absolute URL: returns its pathname stripped of trailing slashes
|
|
60
|
+
* (e.g. `"https://cdn.example.com/sub"` → `/sub`, plain origin → `""`).
|
|
61
|
+
* - For empty input: returns `""`.
|
|
62
|
+
*
|
|
63
|
+
* Used by the prod server and Cloudflare worker entry to recognise asset
|
|
64
|
+
* requests that arrive at the deployment origin under the configured prefix.
|
|
65
|
+
*/
|
|
66
|
+
declare function assetPrefixPathname(assetPrefix: string): string;
|
|
67
|
+
//#endregion
|
|
68
|
+
export { ASSET_PREFIX_URL_DIR, assetPrefixPathname, isAbsoluteAssetPrefix, resolveAssetUrlPrefix, resolveAssetsDir };
|
|
69
|
+
//# sourceMappingURL=asset-prefix.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//#region src/utils/asset-prefix.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared helpers for next.config `assetPrefix`.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors Next.js semantics: `assetPrefix` is prepended to every JS/CSS/image/
|
|
6
|
+
* static asset URL emitted in the page. It is distinct from `basePath`, which
|
|
7
|
+
* affects route URLs.
|
|
8
|
+
*
|
|
9
|
+
* - A `assetPrefix` of `""` (empty) means "no prefix" — behaviour matches the
|
|
10
|
+
* historical default.
|
|
11
|
+
* - A path prefix like `"/custom-asset-prefix"` is applied as a URL prefix
|
|
12
|
+
* relative to the deployment origin. The prod server must also serve assets
|
|
13
|
+
* under that prefix.
|
|
14
|
+
* - An absolute URL like `"https://cdn.example.com"` makes asset URLs fully
|
|
15
|
+
* qualified. Runtime serving on the deployment origin is a no-op — the CDN
|
|
16
|
+
* serves the assets directly.
|
|
17
|
+
*
|
|
18
|
+
* The path component of the asset URL after the prefix is always
|
|
19
|
+
* `/_next/static/<filename>` to match Next.js's convention. This is the
|
|
20
|
+
* convention upstream test suites assert against.
|
|
21
|
+
*
|
|
22
|
+
* @see https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Suffix appended to the assetPrefix (or used standalone when no prefix is
|
|
26
|
+
* configured) to form the leading portion of every emitted asset URL.
|
|
27
|
+
* Matches Next.js: assets always live under `/_next/static/`.
|
|
28
|
+
*/
|
|
29
|
+
const ASSET_PREFIX_URL_DIR = "_next/static";
|
|
30
|
+
/** Whether `assetPrefix` is an absolute URL (vs a path prefix). */
|
|
31
|
+
function isAbsoluteAssetPrefix(assetPrefix) {
|
|
32
|
+
return /^https?:\/\//i.test(assetPrefix);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Compute the on-disk `build.assetsDir` for the given `assetPrefix`.
|
|
36
|
+
*
|
|
37
|
+
* - Path prefix (`/cdn`): write to `cdn/_next/static/` so the on-disk layout
|
|
38
|
+
* matches the URL — the Cloudflare ASSETS binding (and any static file
|
|
39
|
+
* server) serves them directly without a runtime rewrite.
|
|
40
|
+
* - Absolute URL (with or without path component): write to `_next/static/`.
|
|
41
|
+
* Runtime serving is best-effort — the CDN is expected to serve these.
|
|
42
|
+
* - Empty: keep the historical default of `assets/`, preserving disk layout
|
|
43
|
+
* for projects that haven't opted into `assetPrefix`.
|
|
44
|
+
*/
|
|
45
|
+
function resolveAssetsDir(assetPrefix) {
|
|
46
|
+
if (!assetPrefix) return "assets";
|
|
47
|
+
if (isAbsoluteAssetPrefix(assetPrefix)) return ASSET_PREFIX_URL_DIR;
|
|
48
|
+
let stripped = assetPrefix;
|
|
49
|
+
while (stripped.startsWith("/")) stripped = stripped.slice(1);
|
|
50
|
+
return `${stripped}/${ASSET_PREFIX_URL_DIR}`;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Build the URL prefix to apply to emitted asset URLs. Returns the full URL
|
|
54
|
+
* prefix including the `_next/static/` directory, with a trailing slash.
|
|
55
|
+
*
|
|
56
|
+
* Examples:
|
|
57
|
+
* - `""` → `"/_next/static/"`
|
|
58
|
+
* - `"/cdn"` → `"/cdn/_next/static/"`
|
|
59
|
+
* - `"https://cdn.example.com"` → `"https://cdn.example.com/_next/static/"`
|
|
60
|
+
* - `"https://cdn.example.com/sub"` → `"https://cdn.example.com/sub/_next/static/"`
|
|
61
|
+
*/
|
|
62
|
+
function resolveAssetUrlPrefix(assetPrefix) {
|
|
63
|
+
if (!assetPrefix) return `/${ASSET_PREFIX_URL_DIR}/`;
|
|
64
|
+
return `${assetPrefix}/${ASSET_PREFIX_URL_DIR}/`;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Extract the path portion of `assetPrefix` for use in runtime URL matching.
|
|
68
|
+
*
|
|
69
|
+
* - For a path prefix: returns it verbatim (e.g. `/custom-asset-prefix`).
|
|
70
|
+
* - For an absolute URL: returns its pathname stripped of trailing slashes
|
|
71
|
+
* (e.g. `"https://cdn.example.com/sub"` → `/sub`, plain origin → `""`).
|
|
72
|
+
* - For empty input: returns `""`.
|
|
73
|
+
*
|
|
74
|
+
* Used by the prod server and Cloudflare worker entry to recognise asset
|
|
75
|
+
* requests that arrive at the deployment origin under the configured prefix.
|
|
76
|
+
*/
|
|
77
|
+
function assetPrefixPathname(assetPrefix) {
|
|
78
|
+
if (!assetPrefix) return "";
|
|
79
|
+
if (!isAbsoluteAssetPrefix(assetPrefix)) return assetPrefix;
|
|
80
|
+
try {
|
|
81
|
+
let pathname = new URL(assetPrefix).pathname;
|
|
82
|
+
while (pathname.endsWith("/")) pathname = pathname.slice(0, -1);
|
|
83
|
+
return pathname === "" ? "" : pathname;
|
|
84
|
+
} catch {
|
|
85
|
+
return "";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { ASSET_PREFIX_URL_DIR, assetPrefixPathname, isAbsoluteAssetPrefix, resolveAssetUrlPrefix, resolveAssetsDir };
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=asset-prefix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset-prefix.js","names":[],"sources":["../../src/utils/asset-prefix.ts"],"sourcesContent":["/**\n * Shared helpers for next.config `assetPrefix`.\n *\n * Mirrors Next.js semantics: `assetPrefix` is prepended to every JS/CSS/image/\n * static asset URL emitted in the page. It is distinct from `basePath`, which\n * affects route URLs.\n *\n * - A `assetPrefix` of `\"\"` (empty) means \"no prefix\" — behaviour matches the\n * historical default.\n * - A path prefix like `\"/custom-asset-prefix\"` is applied as a URL prefix\n * relative to the deployment origin. The prod server must also serve assets\n * under that prefix.\n * - An absolute URL like `\"https://cdn.example.com\"` makes asset URLs fully\n * qualified. Runtime serving on the deployment origin is a no-op — the CDN\n * serves the assets directly.\n *\n * The path component of the asset URL after the prefix is always\n * `/_next/static/<filename>` to match Next.js's convention. This is the\n * convention upstream test suites assert against.\n *\n * @see https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix\n */\n\n/**\n * Suffix appended to the assetPrefix (or used standalone when no prefix is\n * configured) to form the leading portion of every emitted asset URL.\n * Matches Next.js: assets always live under `/_next/static/`.\n */\nexport const ASSET_PREFIX_URL_DIR = \"_next/static\";\n\n/** Whether `assetPrefix` is an absolute URL (vs a path prefix). */\nexport function isAbsoluteAssetPrefix(assetPrefix: string): boolean {\n return /^https?:\\/\\//i.test(assetPrefix);\n}\n\n/**\n * Compute the on-disk `build.assetsDir` for the given `assetPrefix`.\n *\n * - Path prefix (`/cdn`): write to `cdn/_next/static/` so the on-disk layout\n * matches the URL — the Cloudflare ASSETS binding (and any static file\n * server) serves them directly without a runtime rewrite.\n * - Absolute URL (with or without path component): write to `_next/static/`.\n * Runtime serving is best-effort — the CDN is expected to serve these.\n * - Empty: keep the historical default of `assets/`, preserving disk layout\n * for projects that haven't opted into `assetPrefix`.\n */\nexport function resolveAssetsDir(assetPrefix: string): string {\n if (!assetPrefix) return \"assets\";\n if (isAbsoluteAssetPrefix(assetPrefix)) {\n // Files on disk land at `_next/static/...`. The absolute URL is applied\n // at URL-rendering time via renderBuiltUrl; on-disk path is irrelevant\n // to the CDN.\n return ASSET_PREFIX_URL_DIR;\n }\n // Path prefix — strip leading slash so the path joins cleanly with outDir.\n // Use an explicit loop instead of `replace(/^\\/+/, \"\")` so CodeQL doesn't\n // flag the regex as polynomial-time on uncontrolled input.\n let stripped = assetPrefix;\n while (stripped.startsWith(\"/\")) stripped = stripped.slice(1);\n return `${stripped}/${ASSET_PREFIX_URL_DIR}`;\n}\n\n/**\n * Build the URL prefix to apply to emitted asset URLs. Returns the full URL\n * prefix including the `_next/static/` directory, with a trailing slash.\n *\n * Examples:\n * - `\"\"` → `\"/_next/static/\"`\n * - `\"/cdn\"` → `\"/cdn/_next/static/\"`\n * - `\"https://cdn.example.com\"` → `\"https://cdn.example.com/_next/static/\"`\n * - `\"https://cdn.example.com/sub\"` → `\"https://cdn.example.com/sub/_next/static/\"`\n */\nexport function resolveAssetUrlPrefix(assetPrefix: string): string {\n if (!assetPrefix) return `/${ASSET_PREFIX_URL_DIR}/`;\n return `${assetPrefix}/${ASSET_PREFIX_URL_DIR}/`;\n}\n\n/**\n * Extract the path portion of `assetPrefix` for use in runtime URL matching.\n *\n * - For a path prefix: returns it verbatim (e.g. `/custom-asset-prefix`).\n * - For an absolute URL: returns its pathname stripped of trailing slashes\n * (e.g. `\"https://cdn.example.com/sub\"` → `/sub`, plain origin → `\"\"`).\n * - For empty input: returns `\"\"`.\n *\n * Used by the prod server and Cloudflare worker entry to recognise asset\n * requests that arrive at the deployment origin under the configured prefix.\n */\nexport function assetPrefixPathname(assetPrefix: string): string {\n if (!assetPrefix) return \"\";\n if (!isAbsoluteAssetPrefix(assetPrefix)) return assetPrefix;\n try {\n let pathname = new URL(assetPrefix).pathname;\n while (pathname.endsWith(\"/\")) pathname = pathname.slice(0, -1);\n return pathname === \"\" ? \"\" : pathname;\n } catch {\n return \"\";\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAa,uBAAuB;;AAGpC,SAAgB,sBAAsB,aAA8B;CAClE,OAAO,gBAAgB,KAAK,YAAY;;;;;;;;;;;;;AAc1C,SAAgB,iBAAiB,aAA6B;CAC5D,IAAI,CAAC,aAAa,OAAO;CACzB,IAAI,sBAAsB,YAAY,EAIpC,OAAO;CAKT,IAAI,WAAW;CACf,OAAO,SAAS,WAAW,IAAI,EAAE,WAAW,SAAS,MAAM,EAAE;CAC7D,OAAO,GAAG,SAAS,GAAG;;;;;;;;;;;;AAaxB,SAAgB,sBAAsB,aAA6B;CACjE,IAAI,CAAC,aAAa,OAAO,IAAI,qBAAqB;CAClD,OAAO,GAAG,YAAY,GAAG,qBAAqB;;;;;;;;;;;;;AAchD,SAAgB,oBAAoB,aAA6B;CAC/D,IAAI,CAAC,aAAa,OAAO;CACzB,IAAI,CAAC,sBAAsB,YAAY,EAAE,OAAO;CAChD,IAAI;EACF,IAAI,WAAW,IAAI,IAAI,YAAY,CAAC;EACpC,OAAO,SAAS,SAAS,IAAI,EAAE,WAAW,SAAS,MAAM,GAAG,GAAG;EAC/D,OAAO,aAAa,KAAK,KAAK;SACxB;EACN,OAAO"}
|
|
@@ -15,6 +15,12 @@ declare function hasBasePath(pathname: string, basePath: string): boolean;
|
|
|
15
15
|
* boundary. Returns the original pathname when it is outside the basePath.
|
|
16
16
|
*/
|
|
17
17
|
declare function stripBasePath(pathname: string, basePath: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Add the configured basePath to a pathname unless it is already inside that
|
|
20
|
+
* basePath. Query strings and hashes must be handled by callers before calling
|
|
21
|
+
* this pathname-only helper.
|
|
22
|
+
*/
|
|
23
|
+
declare function addBasePathToPathname(pathname: string, basePath: string | undefined): string;
|
|
18
24
|
/**
|
|
19
25
|
* Remove trailing slashes from a pathname while preserving the root "/".
|
|
20
26
|
* Collapses any number of trailing slashes ("/a//" → "/a"). Used by the
|
|
@@ -22,5 +28,5 @@ declare function stripBasePath(pathname: string, basePath: string): string;
|
|
|
22
28
|
*/
|
|
23
29
|
declare function removeTrailingSlash(pathname: string): string;
|
|
24
30
|
//#endregion
|
|
25
|
-
export { hasBasePath, removeTrailingSlash, stripBasePath };
|
|
31
|
+
export { addBasePathToPathname, hasBasePath, removeTrailingSlash, stripBasePath };
|
|
26
32
|
//# sourceMappingURL=base-path.d.ts.map
|
package/dist/utils/base-path.js
CHANGED
|
@@ -22,6 +22,15 @@ function stripBasePath(pathname, basePath) {
|
|
|
22
22
|
return pathname.slice(basePath.length) || "/";
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
+
* Add the configured basePath to a pathname unless it is already inside that
|
|
26
|
+
* basePath. Query strings and hashes must be handled by callers before calling
|
|
27
|
+
* this pathname-only helper.
|
|
28
|
+
*/
|
|
29
|
+
function addBasePathToPathname(pathname, basePath) {
|
|
30
|
+
if (!basePath || hasBasePath(pathname, basePath)) return pathname;
|
|
31
|
+
return pathname === "/" ? basePath : `${basePath}${pathname}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
25
34
|
* Remove trailing slashes from a pathname while preserving the root "/".
|
|
26
35
|
* Collapses any number of trailing slashes ("/a//" → "/a"). Used by the
|
|
27
36
|
* trailing-slash redirect path and route pattern normalization.
|
|
@@ -33,6 +42,6 @@ function removeTrailingSlash(pathname) {
|
|
|
33
42
|
return end === 0 ? "/" : pathname.slice(0, end);
|
|
34
43
|
}
|
|
35
44
|
//#endregion
|
|
36
|
-
export { hasBasePath, removeTrailingSlash, stripBasePath };
|
|
45
|
+
export { addBasePathToPathname, hasBasePath, removeTrailingSlash, stripBasePath };
|
|
37
46
|
|
|
38
47
|
//# sourceMappingURL=base-path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-path.js","names":[],"sources":["../../src/utils/base-path.ts"],"sourcesContent":["/**\n * Shared basePath helpers.\n *\n * Next.js only treats a pathname as being under basePath when it is an exact\n * match (\"/app\") or starts with the basePath followed by a path separator\n * (\"/app/...\"). Prefix-only matches like \"/application\" must be left intact.\n */\n\n/**\n * Check whether a pathname is inside the configured basePath.\n */\nexport function hasBasePath(pathname: string, basePath: string): boolean {\n if (!basePath) return false;\n return pathname === basePath || pathname.startsWith(basePath + \"/\");\n}\n\n/**\n * Strip the basePath prefix from a pathname when it matches on a segment\n * boundary. Returns the original pathname when it is outside the basePath.\n */\nexport function stripBasePath(pathname: string, basePath: string): string {\n if (!hasBasePath(pathname, basePath)) return pathname;\n return pathname.slice(basePath.length) || \"/\";\n}\n\n/**\n * Remove trailing slashes from a pathname while preserving the root \"/\".\n * Collapses any number of trailing slashes (\"/a//\" → \"/a\"). Used by the\n * trailing-slash redirect path and route pattern normalization.\n */\nexport function removeTrailingSlash(pathname: string): string {\n if (pathname === \"/\") return \"/\";\n let end = pathname.length;\n while (end > 0 && pathname.charCodeAt(end - 1) === 47 /* \"/\" */) end--;\n return end === 0 ? \"/\" : pathname.slice(0, end);\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,YAAY,UAAkB,UAA2B;CACvE,IAAI,CAAC,UAAU,OAAO;CACtB,OAAO,aAAa,YAAY,SAAS,WAAW,WAAW,IAAI;;;;;;AAOrE,SAAgB,cAAc,UAAkB,UAA0B;CACxE,IAAI,CAAC,YAAY,UAAU,SAAS,EAAE,OAAO;CAC7C,OAAO,SAAS,MAAM,SAAS,OAAO,IAAI;;;;;;;AAQ5C,SAAgB,oBAAoB,UAA0B;CAC5D,IAAI,aAAa,KAAK,OAAO;CAC7B,IAAI,MAAM,SAAS;CACnB,OAAO,MAAM,KAAK,SAAS,WAAW,MAAM,EAAE,KAAK,IAAc;CACjE,OAAO,QAAQ,IAAI,MAAM,SAAS,MAAM,GAAG,IAAI"}
|
|
1
|
+
{"version":3,"file":"base-path.js","names":[],"sources":["../../src/utils/base-path.ts"],"sourcesContent":["/**\n * Shared basePath helpers.\n *\n * Next.js only treats a pathname as being under basePath when it is an exact\n * match (\"/app\") or starts with the basePath followed by a path separator\n * (\"/app/...\"). Prefix-only matches like \"/application\" must be left intact.\n */\n\n/**\n * Check whether a pathname is inside the configured basePath.\n */\nexport function hasBasePath(pathname: string, basePath: string): boolean {\n if (!basePath) return false;\n return pathname === basePath || pathname.startsWith(basePath + \"/\");\n}\n\n/**\n * Strip the basePath prefix from a pathname when it matches on a segment\n * boundary. Returns the original pathname when it is outside the basePath.\n */\nexport function stripBasePath(pathname: string, basePath: string): string {\n if (!hasBasePath(pathname, basePath)) return pathname;\n return pathname.slice(basePath.length) || \"/\";\n}\n\n/**\n * Add the configured basePath to a pathname unless it is already inside that\n * basePath. Query strings and hashes must be handled by callers before calling\n * this pathname-only helper.\n */\nexport function addBasePathToPathname(pathname: string, basePath: string | undefined): string {\n if (!basePath || hasBasePath(pathname, basePath)) return pathname;\n return pathname === \"/\" ? basePath : `${basePath}${pathname}`;\n}\n\n/**\n * Remove trailing slashes from a pathname while preserving the root \"/\".\n * Collapses any number of trailing slashes (\"/a//\" → \"/a\"). Used by the\n * trailing-slash redirect path and route pattern normalization.\n */\nexport function removeTrailingSlash(pathname: string): string {\n if (pathname === \"/\") return \"/\";\n let end = pathname.length;\n while (end > 0 && pathname.charCodeAt(end - 1) === 47 /* \"/\" */) end--;\n return end === 0 ? \"/\" : pathname.slice(0, end);\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,YAAY,UAAkB,UAA2B;CACvE,IAAI,CAAC,UAAU,OAAO;CACtB,OAAO,aAAa,YAAY,SAAS,WAAW,WAAW,IAAI;;;;;;AAOrE,SAAgB,cAAc,UAAkB,UAA0B;CACxE,IAAI,CAAC,YAAY,UAAU,SAAS,EAAE,OAAO;CAC7C,OAAO,SAAS,MAAM,SAAS,OAAO,IAAI;;;;;;;AAQ5C,SAAgB,sBAAsB,UAAkB,UAAsC;CAC5F,IAAI,CAAC,YAAY,YAAY,UAAU,SAAS,EAAE,OAAO;CACzD,OAAO,aAAa,MAAM,WAAW,GAAG,WAAW;;;;;;;AAQrD,SAAgB,oBAAoB,UAA0B;CAC5D,IAAI,aAAa,KAAK,OAAO;CAC7B,IAAI,MAAM,SAAS;CACnB,OAAO,MAAM,KAAK,SAAS,WAAW,MAAM,EAAE,KAAK,IAAc;CACjE,OAAO,QAAQ,IAAI,MAAM,SAAS,MAAM,GAAG,IAAI"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region src/utils/navigation-signal.d.ts
|
|
2
|
-
declare function getErrorDigest(error: unknown): string | null;
|
|
3
2
|
declare function isNavigationSignalError(error: unknown): boolean;
|
|
4
3
|
//#endregion
|
|
5
|
-
export {
|
|
4
|
+
export { isNavigationSignalError };
|
|
6
5
|
//# sourceMappingURL=navigation-signal.d.ts.map
|
|
@@ -9,6 +9,6 @@ function isNavigationSignalError(error) {
|
|
|
9
9
|
return digest === "NEXT_NOT_FOUND" || digest.startsWith("NEXT_HTTP_ERROR_FALLBACK;") || digest.startsWith("NEXT_REDIRECT;");
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
export {
|
|
12
|
+
export { isNavigationSignalError };
|
|
13
13
|
|
|
14
14
|
//# sourceMappingURL=navigation-signal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-signal.js","names":[],"sources":["../../src/utils/navigation-signal.ts"],"sourcesContent":["// Shared digest-classification helpers for App Router \"navigation signal\"\n// errors — the ones thrown via redirect(), notFound(), forbidden(), and\n// unauthorized(). These have framework-recognized digests of the form\n// `NEXT_REDIRECT;...`, `NEXT_NOT_FOUND`, or `NEXT_HTTP_ERROR_FALLBACK;<status>`\n// and must be re-thrown by user-facing error boundaries (so they reach the\n// dedicated framework boundary that handles them) and filtered out of the\n// dev error overlay (so a caught redirect doesn't show up as a runtime\n// error).\n//\n// Previously duplicated between shims/error-boundary.tsx and\n// server/dev-error-overlay.tsx; consolidated here so they cannot drift.\n\
|
|
1
|
+
{"version":3,"file":"navigation-signal.js","names":[],"sources":["../../src/utils/navigation-signal.ts"],"sourcesContent":["// Shared digest-classification helpers for App Router \"navigation signal\"\n// errors — the ones thrown via redirect(), notFound(), forbidden(), and\n// unauthorized(). These have framework-recognized digests of the form\n// `NEXT_REDIRECT;...`, `NEXT_NOT_FOUND`, or `NEXT_HTTP_ERROR_FALLBACK;<status>`\n// and must be re-thrown by user-facing error boundaries (so they reach the\n// dedicated framework boundary that handles them) and filtered out of the\n// dev error overlay (so a caught redirect doesn't show up as a runtime\n// error).\n//\n// Previously duplicated between shims/error-boundary.tsx and\n// server/dev-error-overlay.tsx; consolidated here so they cannot drift.\n\nfunction getErrorDigest(error: unknown): string | null {\n if (!error || typeof error !== \"object\" || !(\"digest\" in error)) {\n return null;\n }\n return String((error as { digest: unknown }).digest);\n}\n\nexport function isNavigationSignalError(error: unknown): boolean {\n const digest = getErrorDigest(error);\n if (digest === null) return false;\n return (\n digest === \"NEXT_NOT_FOUND\" ||\n digest.startsWith(\"NEXT_HTTP_ERROR_FALLBACK;\") ||\n digest.startsWith(\"NEXT_REDIRECT;\")\n );\n}\n"],"mappings":";AAYA,SAAS,eAAe,OAA+B;CACrD,IAAI,CAAC,SAAS,OAAO,UAAU,YAAY,EAAE,YAAY,QACvD,OAAO;CAET,OAAO,OAAQ,MAA8B,OAAO;;AAGtD,SAAgB,wBAAwB,OAAyB;CAC/D,MAAM,SAAS,eAAe,MAAM;CACpC,IAAI,WAAW,MAAM,OAAO;CAC5B,OACE,WAAW,oBACX,OAAO,WAAW,4BAA4B,IAC9C,OAAO,WAAW,iBAAiB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/utils/sorted-array.d.ts
|
|
2
|
+
type SortedStringPosition = Readonly<{
|
|
3
|
+
found: boolean;
|
|
4
|
+
index: number;
|
|
5
|
+
}>;
|
|
6
|
+
declare function findSortedStringPosition(values: readonly string[], candidate: string): SortedStringPosition;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { findSortedStringPosition };
|
|
9
|
+
//# sourceMappingURL=sorted-array.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/utils/sorted-array.ts
|
|
2
|
+
function findSortedStringPosition(values, candidate) {
|
|
3
|
+
let lower = 0;
|
|
4
|
+
let upper = values.length;
|
|
5
|
+
while (lower < upper) {
|
|
6
|
+
const middle = lower + Math.floor((upper - lower) / 2);
|
|
7
|
+
if (values[middle] === candidate) return {
|
|
8
|
+
found: true,
|
|
9
|
+
index: middle
|
|
10
|
+
};
|
|
11
|
+
if (values[middle] < candidate) lower = middle + 1;
|
|
12
|
+
else upper = middle;
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
found: false,
|
|
16
|
+
index: lower
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { findSortedStringPosition };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=sorted-array.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sorted-array.js","names":[],"sources":["../../src/utils/sorted-array.ts"],"sourcesContent":["type SortedStringPosition = Readonly<{\n found: boolean;\n index: number;\n}>;\n\nexport function findSortedStringPosition(\n values: readonly string[],\n candidate: string,\n): SortedStringPosition {\n let lower = 0;\n let upper = values.length;\n\n while (lower < upper) {\n const middle = lower + Math.floor((upper - lower) / 2);\n if (values[middle] === candidate) {\n return { found: true, index: middle };\n }\n if (values[middle] < candidate) {\n lower = middle + 1;\n } else {\n upper = middle;\n }\n }\n\n return { found: false, index: lower };\n}\n"],"mappings":";AAKA,SAAgB,yBACd,QACA,WACsB;CACtB,IAAI,QAAQ;CACZ,IAAI,QAAQ,OAAO;CAEnB,OAAO,QAAQ,OAAO;EACpB,MAAM,SAAS,QAAQ,KAAK,OAAO,QAAQ,SAAS,EAAE;EACtD,IAAI,OAAO,YAAY,WACrB,OAAO;GAAE,OAAO;GAAM,OAAO;GAAQ;EAEvC,IAAI,OAAO,UAAU,WACnB,QAAQ,SAAS;OAEjB,QAAQ;;CAIZ,OAAO;EAAE,OAAO;EAAO,OAAO;EAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vinext",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"description": "Run Next.js apps on Vite. Drop-in replacement for the next CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@types/react": "^19.2.14",
|
|
74
74
|
"@types/react-dom": "^19.2.3",
|
|
75
75
|
"@vitejs/plugin-react": "^6.0.1",
|
|
76
|
-
"@vitejs/plugin-rsc": "^0.5.
|
|
76
|
+
"@vitejs/plugin-rsc": "^0.5.26",
|
|
77
77
|
"react-server-dom-webpack": "^19.2.6",
|
|
78
78
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.21",
|
|
79
79
|
"vite-plus": "0.1.21"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@mdx-js/rollup": "^3.0.0",
|
|
83
83
|
"@vitejs/plugin-react": "^5.1.4 || ^6.0.0",
|
|
84
|
-
"@vitejs/plugin-rsc": "^0.5.
|
|
84
|
+
"@vitejs/plugin-rsc": "^0.5.26",
|
|
85
85
|
"react": "^19.2.6",
|
|
86
86
|
"react-dom": "^19.2.6",
|
|
87
87
|
"react-server-dom-webpack": "^19.2.6",
|