react-router 7.13.0 → 7.13.1-pre.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +70 -20
- package/dist/development/{browser-BEPxnEBW.d.mts → browser-DzsJABDQ.d.mts} +3 -2
- package/dist/{production/browser-BEPxnEBW.d.mts → development/browser-sPQ7eaK4.d.ts} +3 -2
- package/dist/{production/chunk-GSFLVUYQ.mjs → development/chunk-BPFEYQ6M.mjs} +13 -4
- package/dist/{production/chunk-NGWWS4QJ.js → development/chunk-CGPAOPIJ.js} +7 -7
- package/dist/development/{chunk-WICQJKU6.js → chunk-LF5SS6XE.js} +203 -128
- package/dist/development/{chunk-HMDR2CVH.js → chunk-TC44ITIJ.js} +124 -107
- package/dist/development/{chunk-JZWAC4HX.mjs → chunk-WQZSGSJA.mjs} +153 -63
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +34 -27
- package/dist/development/dom-export.mjs +10 -3
- package/dist/development/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
- package/dist/development/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
- package/dist/development/index-react-server-client.d.mts +2 -2
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +12 -1
- package/dist/development/index-react-server.d.ts +12 -1
- package/dist/development/index-react-server.js +80 -44
- package/dist/development/index-react-server.mjs +80 -45
- package/dist/development/index.d.mts +11 -10
- package/dist/development/index.d.ts +11 -10
- package/dist/development/index.js +94 -85
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-DvHY1sgY.d.ts → development/instrumentation--6Pioq_G.d.ts} +14 -2
- package/dist/development/lib/types/internal.d.mts +4 -4
- package/dist/development/lib/types/internal.d.ts +4 -4
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
- package/dist/development/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
- package/dist/{production/router-5iOvts3c.d.mts → development/router-cLsU7kHk.d.mts} +14 -2
- package/dist/{development/browser-CJ9_du-U.d.ts → production/browser-DzsJABDQ.d.mts} +3 -2
- package/dist/production/{browser-CJ9_du-U.d.ts → browser-sPQ7eaK4.d.ts} +3 -2
- package/dist/production/{chunk-Y3R63HEB.mjs → chunk-2K4LVAAG.mjs} +153 -63
- package/dist/{development/chunk-7PAHGFS4.js → production/chunk-I63A6YSE.js} +7 -7
- package/dist/{development/chunk-4LKRSAEJ.mjs → production/chunk-ROHSFSEU.mjs} +13 -4
- package/dist/production/{chunk-QSNCZFX5.js → chunk-XCKC4VBJ.js} +203 -128
- package/dist/production/{chunk-N2HZAAIG.js → chunk-ZXYVKLN7.js} +124 -107
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +34 -27
- package/dist/production/dom-export.mjs +10 -3
- package/dist/production/{index-react-server-client-1TI9M9o1.d.ts → index-react-server-client-C4tCIird.d.ts} +54 -2
- package/dist/production/{index-react-server-client-MKTlCGL3.d.mts → index-react-server-client-EzWJGpN_.d.mts} +54 -2
- package/dist/production/index-react-server-client.d.mts +2 -2
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +12 -1
- package/dist/production/index-react-server.d.ts +12 -1
- package/dist/production/index-react-server.js +80 -44
- package/dist/production/index-react-server.mjs +80 -45
- package/dist/production/index.d.mts +11 -10
- package/dist/production/index.d.ts +11 -10
- package/dist/production/index.js +94 -85
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-DvHY1sgY.d.ts → production/instrumentation--6Pioq_G.d.ts} +14 -2
- package/dist/production/lib/types/internal.d.mts +4 -4
- package/dist/production/lib/types/internal.d.ts +4 -4
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{register-Bm80E9qL.d.ts → register-CBoanF80.d.ts} +1 -1
- package/dist/production/{register-CS_tiXsm.d.mts → register-cRYJ3CjG.d.mts} +1 -1
- package/dist/{development/router-5iOvts3c.d.mts → production/router-cLsU7kHk.d.mts} +14 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.13.0
|
|
2
|
+
* react-router v7.13.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
withComponentProps,
|
|
52
52
|
withErrorBoundaryProps,
|
|
53
53
|
withHydrateFallbackProps
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-2K4LVAAG.mjs";
|
|
55
55
|
|
|
56
56
|
// lib/dom/ssr/server.tsx
|
|
57
57
|
import * as React from "react";
|
|
@@ -758,7 +758,14 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
758
758
|
// lib/actions.ts
|
|
759
759
|
function throwIfPotentialCSRFAttack(headers, allowedActionOrigins) {
|
|
760
760
|
let originHeader = headers.get("origin");
|
|
761
|
-
let originDomain =
|
|
761
|
+
let originDomain = null;
|
|
762
|
+
try {
|
|
763
|
+
originDomain = typeof originHeader === "string" && originHeader !== "null" ? new URL(originHeader).host : originHeader;
|
|
764
|
+
} catch {
|
|
765
|
+
throw new Error(
|
|
766
|
+
`\`origin\` header is not a valid URL. Aborting the action.`
|
|
767
|
+
);
|
|
768
|
+
}
|
|
762
769
|
let host = parseHostHeader(headers);
|
|
763
770
|
if (originDomain && (!host || originDomain !== host.value)) {
|
|
764
771
|
if (!isAllowedOrigin(originDomain, allowedActionOrigins)) {
|
|
@@ -1049,9 +1056,11 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1049
1056
|
() => controller.abort(new Error("Server Timeout")),
|
|
1050
1057
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1051
1058
|
);
|
|
1052
|
-
|
|
1059
|
+
let clearStreamTimeout = () => clearTimeout(timeoutId);
|
|
1060
|
+
requestSignal.addEventListener("abort", clearStreamTimeout);
|
|
1053
1061
|
return encode(data2, {
|
|
1054
1062
|
signal: controller.signal,
|
|
1063
|
+
onComplete: clearStreamTimeout,
|
|
1055
1064
|
plugins: [
|
|
1056
1065
|
(value) => {
|
|
1057
1066
|
if (value instanceof Error) {
|