vinext 1.4.1 → 1.4.2
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 +1 -1
- package/dist/build/action-owner-manifest.js +1 -0
- package/dist/check.js +1 -1
- package/dist/config/config-matchers.js +2 -2
- package/dist/config/destination-params.js +5 -2
- package/dist/config/next-config.d.ts +16 -1
- package/dist/config/next-config.js +31 -1
- package/dist/entries/app-rsc-entry.js +41 -18
- package/dist/entries/app-rsc-manifest.js +4 -0
- package/dist/entries/pages-server-entry.js +2 -0
- package/dist/index.js +15 -12
- package/dist/init-cloudflare.js +18 -2
- package/dist/plugins/css-target.d.ts +18 -0
- package/dist/plugins/css-target.js +93 -0
- package/dist/routing/app-route-graph.d.ts +10 -0
- package/dist/routing/app-route-graph.js +15 -1
- package/dist/server/api-handler.d.ts +2 -0
- package/dist/server/api-handler.js +3 -5
- package/dist/server/app-action-forwarding.js +3 -1
- package/dist/server/app-browser-entry.js +21 -4
- package/dist/server/app-elements.d.ts +3 -0
- package/dist/server/app-elements.js +14 -1
- package/dist/server/app-fallback-renderer.js +2 -2
- package/dist/server/app-optimistic-routing.d.ts +12 -1
- package/dist/server/app-optimistic-routing.js +38 -16
- package/dist/server/app-page-boundary-render.js +2 -2
- package/dist/server/app-page-cache-render.js +1 -1
- package/dist/server/app-page-dispatch.d.ts +10 -1
- package/dist/server/app-page-dispatch.js +73 -30
- package/dist/server/app-page-element-builder.d.ts +9 -20
- package/dist/server/app-page-element-builder.js +37 -49
- package/dist/server/app-page-intercept-segment-config.d.ts +56 -0
- package/dist/server/app-page-intercept-segment-config.js +90 -0
- package/dist/server/app-page-navigation-params.d.ts +23 -0
- package/dist/server/app-page-navigation-params.js +49 -0
- package/dist/server/app-page-render.d.ts +5 -2
- package/dist/server/app-page-render.js +17 -3
- package/dist/server/app-page-request.d.ts +24 -2
- package/dist/server/app-page-request.js +10 -10
- package/dist/server/app-page-route-wiring.d.ts +10 -0
- package/dist/server/app-page-route-wiring.js +16 -12
- package/dist/server/app-page-segment-plan.js +9 -1
- package/dist/server/app-page-segment-state.d.ts +9 -0
- package/dist/server/app-page-segment-state.js +54 -1
- package/dist/server/app-response-stage-entry.js +1 -0
- package/dist/server/app-route-module-loader.d.ts +2 -0
- package/dist/server/app-route-module-loader.js +1 -0
- package/dist/server/app-rsc-handler.d.ts +10 -1
- package/dist/server/app-rsc-handler.js +75 -43
- package/dist/server/app-rsc-response-finalizer.d.ts +3 -0
- package/dist/server/app-rsc-response-finalizer.js +11 -1
- package/dist/server/app-rsc-route-matching.d.ts +14 -0
- package/dist/server/app-rsc-route-matching.js +42 -18
- package/dist/server/app-server-action-execution.js +16 -10
- package/dist/server/cache-control.d.ts +2 -0
- package/dist/server/cache-control.js +3 -1
- package/dist/server/image-local-patterns.d.ts +21 -0
- package/dist/server/image-local-patterns.js +59 -0
- package/dist/server/image-optimization.d.ts +23 -22
- package/dist/server/image-optimization.js +12 -2
- package/dist/server/metadata-route-response.js +24 -6
- package/dist/server/nitro-public-files-plugin.js +20 -8
- package/dist/server/pages-data-route.d.ts +5 -1
- package/dist/server/pages-data-route.js +14 -6
- package/dist/server/pages-request-pipeline.js +6 -5
- package/dist/server/pages-request-stage-entry.js +1 -0
- package/dist/server/prod-server.js +17 -9
- package/dist/server/request-pipeline.d.ts +5 -0
- package/dist/server/request-pipeline.js +11 -1
- package/dist/server/response-stage-cacheability.d.ts +7 -0
- package/dist/server/response-stage-cacheability.js +6 -5
- package/dist/server/worker-image-optimization.d.ts +2 -2
- package/dist/server/worker-image-optimization.js +18 -3
- package/dist/server/worker-utils.d.ts +8 -0
- package/dist/server/worker-utils.js +19 -2
- package/dist/shims/image-props.d.ts +6 -0
- package/dist/shims/image-props.js +39 -3
- package/dist/shims/image.js +3 -3
- package/dist/shims/slot.d.ts +3 -0
- package/dist/shims/slot.js +67 -9
- package/dist/utils/base-path.d.ts +7 -0
- package/dist/utils/base-path.js +11 -1
- package/package.json +1 -1
|
@@ -21,6 +21,13 @@ export declare function stripBasePath(pathname: string, basePath: string): strin
|
|
|
21
21
|
* this pathname-only helper.
|
|
22
22
|
*/
|
|
23
23
|
export declare function addBasePathToPathname(pathname: string, basePath: string | undefined): string;
|
|
24
|
+
/**
|
|
25
|
+
* Re-add a basePath that `stripBasePath` removed. Unlike
|
|
26
|
+
* `addBasePathToPathname`, this always prepends it: a stripped route whose
|
|
27
|
+
* first segment equals the basePath (basePath "/docs", route "/docs/a") still
|
|
28
|
+
* starts with the basePath and must not be mistaken for the original URL.
|
|
29
|
+
*/
|
|
30
|
+
export declare function restoreBasePath(pathname: string, basePath: string | undefined): string;
|
|
24
31
|
/**
|
|
25
32
|
* Remove trailing slashes from a pathname while preserving the root "/".
|
|
26
33
|
* Collapses any number of trailing slashes ("/a//" → "/a"). Used by the
|
package/dist/utils/base-path.js
CHANGED
|
@@ -31,6 +31,16 @@ function addBasePathToPathname(pathname, basePath) {
|
|
|
31
31
|
return pathname === "/" ? basePath : `${basePath}${pathname}`;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
+
* Re-add a basePath that `stripBasePath` removed. Unlike
|
|
35
|
+
* `addBasePathToPathname`, this always prepends it: a stripped route whose
|
|
36
|
+
* first segment equals the basePath (basePath "/docs", route "/docs/a") still
|
|
37
|
+
* starts with the basePath and must not be mistaken for the original URL.
|
|
38
|
+
*/
|
|
39
|
+
function restoreBasePath(pathname, basePath) {
|
|
40
|
+
if (!basePath) return pathname;
|
|
41
|
+
return pathname === "/" ? basePath : `${basePath}${pathname}`;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
34
44
|
* Remove trailing slashes from a pathname while preserving the root "/".
|
|
35
45
|
* Collapses any number of trailing slashes ("/a//" → "/a"). Used by the
|
|
36
46
|
* trailing-slash redirect path and route pattern normalization.
|
|
@@ -42,4 +52,4 @@ function removeTrailingSlash(pathname) {
|
|
|
42
52
|
return end === 0 ? "/" : pathname.slice(0, end);
|
|
43
53
|
}
|
|
44
54
|
//#endregion
|
|
45
|
-
export { addBasePathToPathname, hasBasePath, removeTrailingSlash, stripBasePath };
|
|
55
|
+
export { addBasePathToPathname, hasBasePath, removeTrailingSlash, restoreBasePath, stripBasePath };
|