react-server-dom-webpack 19.0.7 → 19.0.8
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/cjs/react-server-dom-webpack-client.browser.development.js +2 -2
- package/cjs/react-server-dom-webpack-server.browser.development.js +29 -29
- package/cjs/react-server-dom-webpack-server.browser.production.js +26 -29
- package/cjs/react-server-dom-webpack-server.edge.development.js +29 -29
- package/cjs/react-server-dom-webpack-server.edge.production.js +26 -29
- package/cjs/react-server-dom-webpack-server.node.development.js +29 -29
- package/cjs/react-server-dom-webpack-server.node.production.js +26 -29
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +29 -29
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +26 -29
- package/package.json +5 -5
|
@@ -2491,10 +2491,10 @@
|
|
|
2491
2491
|
return hook.checkDCE ? !0 : !1;
|
|
2492
2492
|
})({
|
|
2493
2493
|
bundleType: 1,
|
|
2494
|
-
version: "19.0.
|
|
2494
|
+
version: "19.0.8",
|
|
2495
2495
|
rendererPackageName: "react-server-dom-webpack",
|
|
2496
2496
|
currentDispatcherRef: ReactSharedInternals,
|
|
2497
|
-
reconcilerVersion: "19.0.
|
|
2497
|
+
reconcilerVersion: "19.0.8",
|
|
2498
2498
|
getCurrentComponentInfo: function () {
|
|
2499
2499
|
return currentOwnerInDEV;
|
|
2500
2500
|
}
|
|
@@ -818,7 +818,7 @@
|
|
|
818
818
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
819
819
|
enqueueFlush(request);
|
|
820
820
|
"function" === typeof iterator.throw &&
|
|
821
|
-
iterator.throw(reason).then(
|
|
821
|
+
iterator.throw(reason).then(noop, noop);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
function abortIterable(reason) {
|
|
@@ -829,7 +829,7 @@
|
|
|
829
829
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
830
830
|
enqueueFlush(request);
|
|
831
831
|
"function" === typeof iterator.throw &&
|
|
832
|
-
iterator.throw(reason).then(
|
|
832
|
+
iterator.throw(reason).then(noop, noop);
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
835
|
var isIterator = iterable === iterator,
|
|
@@ -4152,44 +4152,44 @@
|
|
|
4152
4152
|
};
|
|
4153
4153
|
exports.decodeAction = function (body, serverManifest) {
|
|
4154
4154
|
var formData = new FormData(),
|
|
4155
|
-
|
|
4156
|
-
seenActions = new Set();
|
|
4155
|
+
maybeActionKey = null;
|
|
4157
4156
|
body.forEach(function (value, key) {
|
|
4158
4157
|
key.startsWith("$ACTION_")
|
|
4159
4158
|
? key.startsWith("$ACTION_REF_")
|
|
4160
|
-
?
|
|
4161
|
-
|
|
4162
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4163
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4164
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4165
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4166
|
-
!seenActions.has(key) &&
|
|
4167
|
-
(seenActions.add(key),
|
|
4168
|
-
(value = key.slice(11)),
|
|
4169
|
-
(action = loadServerReference(serverManifest, {
|
|
4170
|
-
id: value,
|
|
4171
|
-
bound: null
|
|
4172
|
-
})))
|
|
4159
|
+
? (maybeActionKey = key)
|
|
4160
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4173
4161
|
: formData.append(key, value);
|
|
4174
4162
|
});
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4163
|
+
if (null === maybeActionKey) return null;
|
|
4164
|
+
var actionKey = maybeActionKey,
|
|
4165
|
+
action = null;
|
|
4166
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4167
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4168
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4169
|
+
(action = loadServerReference(serverManifest, body));
|
|
4170
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4171
|
+
(body = actionKey.slice(11)),
|
|
4172
|
+
(action = loadServerReference(serverManifest, {
|
|
4173
|
+
id: body,
|
|
4174
|
+
bound: null
|
|
4175
|
+
}));
|
|
4176
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4177
|
+
return action.then(function (fn) {
|
|
4178
|
+
return fn.bind(null, formData);
|
|
4179
|
+
});
|
|
4180
4180
|
};
|
|
4181
4181
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4182
4182
|
var keyPath = body.get("$ACTION_KEY");
|
|
4183
4183
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4184
|
-
var
|
|
4184
|
+
var actionKey = null;
|
|
4185
4185
|
body.forEach(function (value, key) {
|
|
4186
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4187
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4188
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4186
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4189
4187
|
});
|
|
4190
|
-
if (null ===
|
|
4191
|
-
var
|
|
4192
|
-
|
|
4188
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4189
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4190
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4191
|
+
var referenceId = body.id;
|
|
4192
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4193
4193
|
return null === bound
|
|
4194
4194
|
? null
|
|
4195
4195
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -935,7 +935,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
935
935
|
emitErrorChunk(request, streamTask.id, digest);
|
|
936
936
|
enqueueFlush(request);
|
|
937
937
|
"function" === typeof iterator.throw &&
|
|
938
|
-
iterator.throw(reason).then(
|
|
938
|
+
iterator.throw(reason).then(noop, noop);
|
|
939
939
|
}
|
|
940
940
|
}
|
|
941
941
|
function abortIterable(reason) {
|
|
@@ -946,7 +946,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
946
946
|
emitErrorChunk(request, streamTask.id, digest);
|
|
947
947
|
enqueueFlush(request);
|
|
948
948
|
"function" === typeof iterator.throw &&
|
|
949
|
-
iterator.throw(reason).then(
|
|
949
|
+
iterator.throw(reason).then(noop, noop);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
iterable = iterable === iterator;
|
|
@@ -3152,44 +3152,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3152
3152
|
};
|
|
3153
3153
|
exports.decodeAction = function (body, serverManifest) {
|
|
3154
3154
|
var formData = new FormData(),
|
|
3155
|
-
|
|
3156
|
-
seenActions = new Set();
|
|
3155
|
+
maybeActionKey = null;
|
|
3157
3156
|
body.forEach(function (value, key) {
|
|
3158
3157
|
key.startsWith("$ACTION_")
|
|
3159
3158
|
? key.startsWith("$ACTION_REF_")
|
|
3160
|
-
?
|
|
3161
|
-
|
|
3162
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3163
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3164
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3165
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3166
|
-
!seenActions.has(key) &&
|
|
3167
|
-
(seenActions.add(key),
|
|
3168
|
-
(value = key.slice(11)),
|
|
3169
|
-
(action = loadServerReference(serverManifest, {
|
|
3170
|
-
id: value,
|
|
3171
|
-
bound: null
|
|
3172
|
-
})))
|
|
3159
|
+
? (maybeActionKey = key)
|
|
3160
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3173
3161
|
: formData.append(key, value);
|
|
3174
3162
|
});
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3163
|
+
if (null === maybeActionKey) return null;
|
|
3164
|
+
var actionKey = maybeActionKey,
|
|
3165
|
+
action = null;
|
|
3166
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3167
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3168
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3169
|
+
(action = loadServerReference(serverManifest, body));
|
|
3170
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3171
|
+
(body = actionKey.slice(11)),
|
|
3172
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3173
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3174
|
+
return action.then(function (fn) {
|
|
3175
|
+
return fn.bind(null, formData);
|
|
3176
|
+
});
|
|
3180
3177
|
};
|
|
3181
3178
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3182
3179
|
var keyPath = body.get("$ACTION_KEY");
|
|
3183
3180
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3184
|
-
var
|
|
3181
|
+
var actionKey = null;
|
|
3185
3182
|
body.forEach(function (value, key) {
|
|
3186
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3187
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3188
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3183
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3189
3184
|
});
|
|
3190
|
-
if (null ===
|
|
3191
|
-
var
|
|
3192
|
-
|
|
3185
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3186
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3187
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3188
|
+
var referenceId = body.id;
|
|
3189
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3193
3190
|
return null === bound
|
|
3194
3191
|
? null
|
|
3195
3192
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -833,7 +833,7 @@
|
|
|
833
833
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
834
834
|
enqueueFlush(request);
|
|
835
835
|
"function" === typeof iterator.throw &&
|
|
836
|
-
iterator.throw(reason).then(
|
|
836
|
+
iterator.throw(reason).then(noop, noop);
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
function abortIterable(reason) {
|
|
@@ -844,7 +844,7 @@
|
|
|
844
844
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
845
845
|
enqueueFlush(request);
|
|
846
846
|
"function" === typeof iterator.throw &&
|
|
847
|
-
iterator.throw(reason).then(
|
|
847
|
+
iterator.throw(reason).then(noop, noop);
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
850
|
var isIterator = iterable === iterator,
|
|
@@ -4182,44 +4182,44 @@
|
|
|
4182
4182
|
};
|
|
4183
4183
|
exports.decodeAction = function (body, serverManifest) {
|
|
4184
4184
|
var formData = new FormData(),
|
|
4185
|
-
|
|
4186
|
-
seenActions = new Set();
|
|
4185
|
+
maybeActionKey = null;
|
|
4187
4186
|
body.forEach(function (value, key) {
|
|
4188
4187
|
key.startsWith("$ACTION_")
|
|
4189
4188
|
? key.startsWith("$ACTION_REF_")
|
|
4190
|
-
?
|
|
4191
|
-
|
|
4192
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4193
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4194
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4195
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4196
|
-
!seenActions.has(key) &&
|
|
4197
|
-
(seenActions.add(key),
|
|
4198
|
-
(value = key.slice(11)),
|
|
4199
|
-
(action = loadServerReference(serverManifest, {
|
|
4200
|
-
id: value,
|
|
4201
|
-
bound: null
|
|
4202
|
-
})))
|
|
4189
|
+
? (maybeActionKey = key)
|
|
4190
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4203
4191
|
: formData.append(key, value);
|
|
4204
4192
|
});
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4193
|
+
if (null === maybeActionKey) return null;
|
|
4194
|
+
var actionKey = maybeActionKey,
|
|
4195
|
+
action = null;
|
|
4196
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4197
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4198
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4199
|
+
(action = loadServerReference(serverManifest, body));
|
|
4200
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4201
|
+
(body = actionKey.slice(11)),
|
|
4202
|
+
(action = loadServerReference(serverManifest, {
|
|
4203
|
+
id: body,
|
|
4204
|
+
bound: null
|
|
4205
|
+
}));
|
|
4206
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4207
|
+
return action.then(function (fn) {
|
|
4208
|
+
return fn.bind(null, formData);
|
|
4209
|
+
});
|
|
4210
4210
|
};
|
|
4211
4211
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4212
4212
|
var keyPath = body.get("$ACTION_KEY");
|
|
4213
4213
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4214
|
-
var
|
|
4214
|
+
var actionKey = null;
|
|
4215
4215
|
body.forEach(function (value, key) {
|
|
4216
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4217
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4218
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4216
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4219
4217
|
});
|
|
4220
|
-
if (null ===
|
|
4221
|
-
var
|
|
4222
|
-
|
|
4218
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4219
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4220
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4221
|
+
var referenceId = body.id;
|
|
4222
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4223
4223
|
return null === bound
|
|
4224
4224
|
? null
|
|
4225
4225
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -940,7 +940,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
940
940
|
emitErrorChunk(request, streamTask.id, digest);
|
|
941
941
|
enqueueFlush(request);
|
|
942
942
|
"function" === typeof iterator.throw &&
|
|
943
|
-
iterator.throw(reason).then(
|
|
943
|
+
iterator.throw(reason).then(noop, noop);
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
946
|
function abortIterable(reason) {
|
|
@@ -951,7 +951,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
951
951
|
emitErrorChunk(request, streamTask.id, digest);
|
|
952
952
|
enqueueFlush(request);
|
|
953
953
|
"function" === typeof iterator.throw &&
|
|
954
|
-
iterator.throw(reason).then(
|
|
954
|
+
iterator.throw(reason).then(noop, noop);
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
iterable = iterable === iterator;
|
|
@@ -3154,44 +3154,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3154
3154
|
};
|
|
3155
3155
|
exports.decodeAction = function (body, serverManifest) {
|
|
3156
3156
|
var formData = new FormData(),
|
|
3157
|
-
|
|
3158
|
-
seenActions = new Set();
|
|
3157
|
+
maybeActionKey = null;
|
|
3159
3158
|
body.forEach(function (value, key) {
|
|
3160
3159
|
key.startsWith("$ACTION_")
|
|
3161
3160
|
? key.startsWith("$ACTION_REF_")
|
|
3162
|
-
?
|
|
3163
|
-
|
|
3164
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3165
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3166
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3167
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3168
|
-
!seenActions.has(key) &&
|
|
3169
|
-
(seenActions.add(key),
|
|
3170
|
-
(value = key.slice(11)),
|
|
3171
|
-
(action = loadServerReference(serverManifest, {
|
|
3172
|
-
id: value,
|
|
3173
|
-
bound: null
|
|
3174
|
-
})))
|
|
3161
|
+
? (maybeActionKey = key)
|
|
3162
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3175
3163
|
: formData.append(key, value);
|
|
3176
3164
|
});
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3165
|
+
if (null === maybeActionKey) return null;
|
|
3166
|
+
var actionKey = maybeActionKey,
|
|
3167
|
+
action = null;
|
|
3168
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3169
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3170
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3171
|
+
(action = loadServerReference(serverManifest, body));
|
|
3172
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3173
|
+
(body = actionKey.slice(11)),
|
|
3174
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3175
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3176
|
+
return action.then(function (fn) {
|
|
3177
|
+
return fn.bind(null, formData);
|
|
3178
|
+
});
|
|
3182
3179
|
};
|
|
3183
3180
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3184
3181
|
var keyPath = body.get("$ACTION_KEY");
|
|
3185
3182
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3186
|
-
var
|
|
3183
|
+
var actionKey = null;
|
|
3187
3184
|
body.forEach(function (value, key) {
|
|
3188
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3189
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3190
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3185
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3191
3186
|
});
|
|
3192
|
-
if (null ===
|
|
3193
|
-
var
|
|
3194
|
-
|
|
3187
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3188
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3189
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3190
|
+
var referenceId = body.id;
|
|
3191
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3195
3192
|
return null === bound
|
|
3196
3193
|
? null
|
|
3197
3194
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -854,7 +854,7 @@
|
|
|
854
854
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
855
855
|
enqueueFlush(request);
|
|
856
856
|
"function" === typeof iterator.throw &&
|
|
857
|
-
iterator.throw(reason).then(
|
|
857
|
+
iterator.throw(reason).then(noop, noop);
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
function abortIterable(reason) {
|
|
@@ -865,7 +865,7 @@
|
|
|
865
865
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
866
866
|
enqueueFlush(request);
|
|
867
867
|
"function" === typeof iterator.throw &&
|
|
868
|
-
iterator.throw(reason).then(
|
|
868
|
+
iterator.throw(reason).then(noop, noop);
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
var isIterator = iterable === iterator,
|
|
@@ -4205,44 +4205,44 @@
|
|
|
4205
4205
|
};
|
|
4206
4206
|
exports.decodeAction = function (body, serverManifest) {
|
|
4207
4207
|
var formData = new FormData(),
|
|
4208
|
-
|
|
4209
|
-
seenActions = new Set();
|
|
4208
|
+
maybeActionKey = null;
|
|
4210
4209
|
body.forEach(function (value, key) {
|
|
4211
4210
|
key.startsWith("$ACTION_")
|
|
4212
4211
|
? key.startsWith("$ACTION_REF_")
|
|
4213
|
-
?
|
|
4214
|
-
|
|
4215
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4216
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4217
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4218
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4219
|
-
!seenActions.has(key) &&
|
|
4220
|
-
(seenActions.add(key),
|
|
4221
|
-
(value = key.slice(11)),
|
|
4222
|
-
(action = loadServerReference(serverManifest, {
|
|
4223
|
-
id: value,
|
|
4224
|
-
bound: null
|
|
4225
|
-
})))
|
|
4212
|
+
? (maybeActionKey = key)
|
|
4213
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4226
4214
|
: formData.append(key, value);
|
|
4227
4215
|
});
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4216
|
+
if (null === maybeActionKey) return null;
|
|
4217
|
+
var actionKey = maybeActionKey,
|
|
4218
|
+
action = null;
|
|
4219
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4220
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4221
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4222
|
+
(action = loadServerReference(serverManifest, body));
|
|
4223
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4224
|
+
(body = actionKey.slice(11)),
|
|
4225
|
+
(action = loadServerReference(serverManifest, {
|
|
4226
|
+
id: body,
|
|
4227
|
+
bound: null
|
|
4228
|
+
}));
|
|
4229
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4230
|
+
return action.then(function (fn) {
|
|
4231
|
+
return fn.bind(null, formData);
|
|
4232
|
+
});
|
|
4233
4233
|
};
|
|
4234
4234
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4235
4235
|
var keyPath = body.get("$ACTION_KEY");
|
|
4236
4236
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4237
|
-
var
|
|
4237
|
+
var actionKey = null;
|
|
4238
4238
|
body.forEach(function (value, key) {
|
|
4239
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4240
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4241
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4239
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4242
4240
|
});
|
|
4243
|
-
if (null ===
|
|
4244
|
-
var
|
|
4245
|
-
|
|
4241
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4242
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4243
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4244
|
+
var referenceId = body.id;
|
|
4245
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4246
4246
|
return null === bound
|
|
4247
4247
|
? null
|
|
4248
4248
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -956,7 +956,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
956
956
|
emitErrorChunk(request, streamTask.id, digest);
|
|
957
957
|
enqueueFlush(request);
|
|
958
958
|
"function" === typeof iterator.throw &&
|
|
959
|
-
iterator.throw(reason).then(
|
|
959
|
+
iterator.throw(reason).then(noop, noop);
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
function abortIterable(reason) {
|
|
@@ -967,7 +967,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
967
967
|
emitErrorChunk(request, streamTask.id, digest);
|
|
968
968
|
enqueueFlush(request);
|
|
969
969
|
"function" === typeof iterator.throw &&
|
|
970
|
-
iterator.throw(reason).then(
|
|
970
|
+
iterator.throw(reason).then(noop, noop);
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
iterable = iterable === iterator;
|
|
@@ -3216,44 +3216,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3216
3216
|
};
|
|
3217
3217
|
exports.decodeAction = function (body, serverManifest) {
|
|
3218
3218
|
var formData = new FormData(),
|
|
3219
|
-
|
|
3220
|
-
seenActions = new Set();
|
|
3219
|
+
maybeActionKey = null;
|
|
3221
3220
|
body.forEach(function (value, key) {
|
|
3222
3221
|
key.startsWith("$ACTION_")
|
|
3223
3222
|
? key.startsWith("$ACTION_REF_")
|
|
3224
|
-
?
|
|
3225
|
-
|
|
3226
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3227
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3228
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3229
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3230
|
-
!seenActions.has(key) &&
|
|
3231
|
-
(seenActions.add(key),
|
|
3232
|
-
(value = key.slice(11)),
|
|
3233
|
-
(action = loadServerReference(serverManifest, {
|
|
3234
|
-
id: value,
|
|
3235
|
-
bound: null
|
|
3236
|
-
})))
|
|
3223
|
+
? (maybeActionKey = key)
|
|
3224
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3237
3225
|
: formData.append(key, value);
|
|
3238
3226
|
});
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3227
|
+
if (null === maybeActionKey) return null;
|
|
3228
|
+
var actionKey = maybeActionKey,
|
|
3229
|
+
action = null;
|
|
3230
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3231
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3232
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3233
|
+
(action = loadServerReference(serverManifest, body));
|
|
3234
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3235
|
+
(body = actionKey.slice(11)),
|
|
3236
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3237
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3238
|
+
return action.then(function (fn) {
|
|
3239
|
+
return fn.bind(null, formData);
|
|
3240
|
+
});
|
|
3244
3241
|
};
|
|
3245
3242
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3246
3243
|
var keyPath = body.get("$ACTION_KEY");
|
|
3247
3244
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3248
|
-
var
|
|
3245
|
+
var actionKey = null;
|
|
3249
3246
|
body.forEach(function (value, key) {
|
|
3250
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3251
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3252
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3247
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3253
3248
|
});
|
|
3254
|
-
if (null ===
|
|
3255
|
-
var
|
|
3256
|
-
|
|
3249
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3250
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3251
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3252
|
+
var referenceId = body.id;
|
|
3253
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3257
3254
|
return null === bound
|
|
3258
3255
|
? null
|
|
3259
3256
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -854,7 +854,7 @@
|
|
|
854
854
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
855
855
|
enqueueFlush(request);
|
|
856
856
|
"function" === typeof iterator.throw &&
|
|
857
|
-
iterator.throw(reason).then(
|
|
857
|
+
iterator.throw(reason).then(noop, noop);
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
function abortIterable(reason) {
|
|
@@ -865,7 +865,7 @@
|
|
|
865
865
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
866
866
|
enqueueFlush(request);
|
|
867
867
|
"function" === typeof iterator.throw &&
|
|
868
|
-
iterator.throw(reason).then(
|
|
868
|
+
iterator.throw(reason).then(noop, noop);
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
var isIterator = iterable === iterator,
|
|
@@ -4169,44 +4169,44 @@
|
|
|
4169
4169
|
};
|
|
4170
4170
|
exports.decodeAction = function (body, serverManifest) {
|
|
4171
4171
|
var formData = new FormData(),
|
|
4172
|
-
|
|
4173
|
-
seenActions = new Set();
|
|
4172
|
+
maybeActionKey = null;
|
|
4174
4173
|
body.forEach(function (value, key) {
|
|
4175
4174
|
key.startsWith("$ACTION_")
|
|
4176
4175
|
? key.startsWith("$ACTION_REF_")
|
|
4177
|
-
?
|
|
4178
|
-
|
|
4179
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4180
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4181
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4182
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4183
|
-
!seenActions.has(key) &&
|
|
4184
|
-
(seenActions.add(key),
|
|
4185
|
-
(value = key.slice(11)),
|
|
4186
|
-
(action = loadServerReference(serverManifest, {
|
|
4187
|
-
id: value,
|
|
4188
|
-
bound: null
|
|
4189
|
-
})))
|
|
4176
|
+
? (maybeActionKey = key)
|
|
4177
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4190
4178
|
: formData.append(key, value);
|
|
4191
4179
|
});
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4180
|
+
if (null === maybeActionKey) return null;
|
|
4181
|
+
var actionKey = maybeActionKey,
|
|
4182
|
+
action = null;
|
|
4183
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4184
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4185
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4186
|
+
(action = loadServerReference(serverManifest, body));
|
|
4187
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4188
|
+
(body = actionKey.slice(11)),
|
|
4189
|
+
(action = loadServerReference(serverManifest, {
|
|
4190
|
+
id: body,
|
|
4191
|
+
bound: null
|
|
4192
|
+
}));
|
|
4193
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4194
|
+
return action.then(function (fn) {
|
|
4195
|
+
return fn.bind(null, formData);
|
|
4196
|
+
});
|
|
4197
4197
|
};
|
|
4198
4198
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4199
4199
|
var keyPath = body.get("$ACTION_KEY");
|
|
4200
4200
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4201
|
-
var
|
|
4201
|
+
var actionKey = null;
|
|
4202
4202
|
body.forEach(function (value, key) {
|
|
4203
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4204
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4205
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4203
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4206
4204
|
});
|
|
4207
|
-
if (null ===
|
|
4208
|
-
var
|
|
4209
|
-
|
|
4205
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4206
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4207
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4208
|
+
var referenceId = body.id;
|
|
4209
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4210
4210
|
return null === bound
|
|
4211
4211
|
? null
|
|
4212
4212
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -956,7 +956,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
956
956
|
emitErrorChunk(request, streamTask.id, digest);
|
|
957
957
|
enqueueFlush(request);
|
|
958
958
|
"function" === typeof iterator.throw &&
|
|
959
|
-
iterator.throw(reason).then(
|
|
959
|
+
iterator.throw(reason).then(noop, noop);
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
function abortIterable(reason) {
|
|
@@ -967,7 +967,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
967
967
|
emitErrorChunk(request, streamTask.id, digest);
|
|
968
968
|
enqueueFlush(request);
|
|
969
969
|
"function" === typeof iterator.throw &&
|
|
970
|
-
iterator.throw(reason).then(
|
|
970
|
+
iterator.throw(reason).then(noop, noop);
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
iterable = iterable === iterator;
|
|
@@ -3183,44 +3183,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3183
3183
|
};
|
|
3184
3184
|
exports.decodeAction = function (body, serverManifest) {
|
|
3185
3185
|
var formData = new FormData(),
|
|
3186
|
-
|
|
3187
|
-
seenActions = new Set();
|
|
3186
|
+
maybeActionKey = null;
|
|
3188
3187
|
body.forEach(function (value, key) {
|
|
3189
3188
|
key.startsWith("$ACTION_")
|
|
3190
3189
|
? key.startsWith("$ACTION_REF_")
|
|
3191
|
-
?
|
|
3192
|
-
|
|
3193
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3194
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3195
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3196
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3197
|
-
!seenActions.has(key) &&
|
|
3198
|
-
(seenActions.add(key),
|
|
3199
|
-
(value = key.slice(11)),
|
|
3200
|
-
(action = loadServerReference(serverManifest, {
|
|
3201
|
-
id: value,
|
|
3202
|
-
bound: null
|
|
3203
|
-
})))
|
|
3190
|
+
? (maybeActionKey = key)
|
|
3191
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3204
3192
|
: formData.append(key, value);
|
|
3205
3193
|
});
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3194
|
+
if (null === maybeActionKey) return null;
|
|
3195
|
+
var actionKey = maybeActionKey,
|
|
3196
|
+
action = null;
|
|
3197
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3198
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3199
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3200
|
+
(action = loadServerReference(serverManifest, body));
|
|
3201
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3202
|
+
(body = actionKey.slice(11)),
|
|
3203
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3204
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3205
|
+
return action.then(function (fn) {
|
|
3206
|
+
return fn.bind(null, formData);
|
|
3207
|
+
});
|
|
3211
3208
|
};
|
|
3212
3209
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3213
3210
|
var keyPath = body.get("$ACTION_KEY");
|
|
3214
3211
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3215
|
-
var
|
|
3212
|
+
var actionKey = null;
|
|
3216
3213
|
body.forEach(function (value, key) {
|
|
3217
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3218
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3219
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3214
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3220
3215
|
});
|
|
3221
|
-
if (null ===
|
|
3222
|
-
var
|
|
3223
|
-
|
|
3216
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3217
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3218
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3219
|
+
var referenceId = body.id;
|
|
3220
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3224
3221
|
return null === bound
|
|
3225
3222
|
? null
|
|
3226
3223
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-server-dom-webpack",
|
|
3
3
|
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
|
|
4
|
-
"version": "19.0.
|
|
4
|
+
"version": "19.0.8",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react"
|
|
7
7
|
],
|
|
8
8
|
"homepage": "https://react.dev/",
|
|
9
|
-
"bugs": "https://github.com/
|
|
9
|
+
"bugs": "https://github.com/react/react/issues",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"files": [
|
|
12
12
|
"LICENSE",
|
|
@@ -92,15 +92,15 @@
|
|
|
92
92
|
"main": "index.js",
|
|
93
93
|
"repository": {
|
|
94
94
|
"type": "git",
|
|
95
|
-
"url": "https://github.com/
|
|
95
|
+
"url": "https://github.com/react/react.git",
|
|
96
96
|
"directory": "packages/react-server-dom-webpack"
|
|
97
97
|
},
|
|
98
98
|
"engines": {
|
|
99
99
|
"node": ">=0.10.0"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
|
-
"react": "^19.0.
|
|
103
|
-
"react-dom": "^19.0.
|
|
102
|
+
"react": "^19.0.8",
|
|
103
|
+
"react-dom": "^19.0.8",
|
|
104
104
|
"webpack": "^5.59.0"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|