react-server-dom-webpack 19.0.6 → 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 +99 -62
- package/cjs/react-server-dom-webpack-server.node.production.js +95 -58
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +99 -62
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +95 -58
- 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];
|
|
@@ -4270,20 +4270,58 @@
|
|
|
4270
4270
|
webpackMap,
|
|
4271
4271
|
options
|
|
4272
4272
|
) {
|
|
4273
|
-
|
|
4273
|
+
function flush() {
|
|
4274
|
+
for (; null !== head; ) {
|
|
4275
|
+
var current = head;
|
|
4276
|
+
if (!current.complete) return;
|
|
4277
|
+
try {
|
|
4278
|
+
var response = response$jscomp$0,
|
|
4279
|
+
key = current.name,
|
|
4280
|
+
handle = current.file,
|
|
4281
|
+
blob = new Blob(handle.chunks, { type: handle.mime }),
|
|
4282
|
+
backingStore = response._formData;
|
|
4283
|
+
response = key;
|
|
4284
|
+
backingStore.data.append(response, blob, handle.filename);
|
|
4285
|
+
var keys = backingStore.keys;
|
|
4286
|
+
null === keys
|
|
4287
|
+
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
4288
|
+
(backingStore.keyPointer = 0))
|
|
4289
|
+
: keys.push(response);
|
|
4290
|
+
var queuedFields = current.queuedFields;
|
|
4291
|
+
if (null !== queuedFields)
|
|
4292
|
+
for (response = 0; response < queuedFields.length; response += 2)
|
|
4293
|
+
resolveField(
|
|
4294
|
+
response$jscomp$0,
|
|
4295
|
+
queuedFields[response],
|
|
4296
|
+
queuedFields[response + 1]
|
|
4297
|
+
);
|
|
4298
|
+
} catch (error) {
|
|
4299
|
+
busboyStream.destroy(error);
|
|
4300
|
+
return;
|
|
4301
|
+
}
|
|
4302
|
+
head = current.next;
|
|
4303
|
+
}
|
|
4304
|
+
tail = null;
|
|
4305
|
+
bodyFinished && !closed && ((closed = !0), close(response$jscomp$0));
|
|
4306
|
+
}
|
|
4307
|
+
var response$jscomp$0 = createResponse(
|
|
4274
4308
|
webpackMap,
|
|
4275
4309
|
"",
|
|
4276
4310
|
options ? options.temporaryReferences : void 0,
|
|
4277
4311
|
void 0,
|
|
4278
4312
|
options ? options.arraySizeLimit : void 0
|
|
4279
4313
|
),
|
|
4280
|
-
|
|
4281
|
-
|
|
4314
|
+
head = null,
|
|
4315
|
+
tail = null,
|
|
4316
|
+
bodyFinished = !1,
|
|
4317
|
+
closed = !1;
|
|
4282
4318
|
busboyStream.on("field", function (name, value) {
|
|
4283
|
-
if (
|
|
4319
|
+
if (null !== tail)
|
|
4320
|
+
null === tail.queuedFields && (tail.queuedFields = []),
|
|
4321
|
+
tail.queuedFields.push(name, value);
|
|
4284
4322
|
else
|
|
4285
4323
|
try {
|
|
4286
|
-
resolveField(response, name, value);
|
|
4324
|
+
resolveField(response$jscomp$0, name, value);
|
|
4287
4325
|
} catch (error) {
|
|
4288
4326
|
busboyStream.destroy(error);
|
|
4289
4327
|
}
|
|
@@ -4298,46 +4336,45 @@
|
|
|
4298
4336
|
)
|
|
4299
4337
|
);
|
|
4300
4338
|
else {
|
|
4301
|
-
|
|
4302
|
-
|
|
4339
|
+
var file = { chunks: [], filename: filename, mime: mimeType },
|
|
4340
|
+
pendingFile = {
|
|
4341
|
+
name: name,
|
|
4342
|
+
file: file,
|
|
4343
|
+
complete: !1,
|
|
4344
|
+
queuedFields: null,
|
|
4345
|
+
next: null
|
|
4346
|
+
};
|
|
4347
|
+
null === tail ? (head = pendingFile) : (tail.next = pendingFile);
|
|
4348
|
+
tail = pendingFile;
|
|
4303
4349
|
value.on("data", function (chunk) {
|
|
4304
|
-
JSCompiler_object_inline_chunks_162.push(chunk);
|
|
4305
|
-
});
|
|
4306
|
-
value.on("end", function () {
|
|
4307
4350
|
try {
|
|
4308
|
-
|
|
4309
|
-
type: mimeType
|
|
4310
|
-
}),
|
|
4311
|
-
backingStore = response._formData;
|
|
4312
|
-
backingStore.data.append(name, blob, filename);
|
|
4313
|
-
var keys = backingStore.keys;
|
|
4314
|
-
null === keys
|
|
4315
|
-
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
4316
|
-
(backingStore.keyPointer = 0))
|
|
4317
|
-
: keys.push(name);
|
|
4318
|
-
pendingFiles--;
|
|
4319
|
-
if (0 === pendingFiles) {
|
|
4320
|
-
for (blob = 0; blob < queuedFields.length; blob += 2)
|
|
4321
|
-
resolveField(
|
|
4322
|
-
response,
|
|
4323
|
-
queuedFields[blob],
|
|
4324
|
-
queuedFields[blob + 1]
|
|
4325
|
-
);
|
|
4326
|
-
queuedFields.length = 0;
|
|
4327
|
-
}
|
|
4351
|
+
file.chunks.push(chunk);
|
|
4328
4352
|
} catch (error) {
|
|
4329
4353
|
busboyStream.destroy(error);
|
|
4330
4354
|
}
|
|
4331
4355
|
});
|
|
4356
|
+
value.on("error", function (error) {
|
|
4357
|
+
busboyStream.destroy(error);
|
|
4358
|
+
});
|
|
4359
|
+
value.on("end", function () {
|
|
4360
|
+
pendingFile.complete = !0;
|
|
4361
|
+
flush();
|
|
4362
|
+
});
|
|
4332
4363
|
}
|
|
4333
4364
|
});
|
|
4334
4365
|
busboyStream.on("finish", function () {
|
|
4335
|
-
|
|
4366
|
+
bodyFinished = !0;
|
|
4367
|
+
flush();
|
|
4368
|
+
closed ||
|
|
4369
|
+
reportGlobalError(
|
|
4370
|
+
response$jscomp$0,
|
|
4371
|
+
Error("Reply finished with incomplete file part.")
|
|
4372
|
+
);
|
|
4336
4373
|
});
|
|
4337
4374
|
busboyStream.on("error", function (err) {
|
|
4338
|
-
reportGlobalError(response, err);
|
|
4375
|
+
reportGlobalError(response$jscomp$0, err);
|
|
4339
4376
|
});
|
|
4340
|
-
return getChunk(response, 0);
|
|
4377
|
+
return getChunk(response$jscomp$0, 0);
|
|
4341
4378
|
};
|
|
4342
4379
|
exports.registerClientReference = function (
|
|
4343
4380
|
proxyImplementation,
|
|
@@ -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];
|
|
@@ -3277,6 +3274,43 @@ exports.decodeReply = function (body, webpackMap, options) {
|
|
|
3277
3274
|
return webpackMap;
|
|
3278
3275
|
};
|
|
3279
3276
|
exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
3277
|
+
function flush() {
|
|
3278
|
+
for (; null !== head; ) {
|
|
3279
|
+
var current = head;
|
|
3280
|
+
if (!current.complete) return;
|
|
3281
|
+
try {
|
|
3282
|
+
var key = current.name,
|
|
3283
|
+
handle = current.file,
|
|
3284
|
+
blob = new Blob(handle.chunks, { type: handle.mime }),
|
|
3285
|
+
backingStore = response._formData,
|
|
3286
|
+
key$jscomp$0 = key;
|
|
3287
|
+
backingStore.data.append(key$jscomp$0, blob, handle.filename);
|
|
3288
|
+
var keys = backingStore.keys;
|
|
3289
|
+
null === keys
|
|
3290
|
+
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
3291
|
+
(backingStore.keyPointer = 0))
|
|
3292
|
+
: keys.push(key$jscomp$0);
|
|
3293
|
+
var queuedFields = current.queuedFields;
|
|
3294
|
+
if (null !== queuedFields)
|
|
3295
|
+
for (
|
|
3296
|
+
key$jscomp$0 = 0;
|
|
3297
|
+
key$jscomp$0 < queuedFields.length;
|
|
3298
|
+
key$jscomp$0 += 2
|
|
3299
|
+
)
|
|
3300
|
+
resolveField(
|
|
3301
|
+
response,
|
|
3302
|
+
queuedFields[key$jscomp$0],
|
|
3303
|
+
queuedFields[key$jscomp$0 + 1]
|
|
3304
|
+
);
|
|
3305
|
+
} catch (error) {
|
|
3306
|
+
busboyStream.destroy(error);
|
|
3307
|
+
return;
|
|
3308
|
+
}
|
|
3309
|
+
head = current.next;
|
|
3310
|
+
}
|
|
3311
|
+
tail = null;
|
|
3312
|
+
bodyFinished && !closed && ((closed = !0), close(response));
|
|
3313
|
+
}
|
|
3280
3314
|
var response = createResponse(
|
|
3281
3315
|
webpackMap,
|
|
3282
3316
|
"",
|
|
@@ -3284,10 +3318,14 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
|
3284
3318
|
void 0,
|
|
3285
3319
|
options ? options.arraySizeLimit : void 0
|
|
3286
3320
|
),
|
|
3287
|
-
|
|
3288
|
-
|
|
3321
|
+
head = null,
|
|
3322
|
+
tail = null,
|
|
3323
|
+
bodyFinished = !1,
|
|
3324
|
+
closed = !1;
|
|
3289
3325
|
busboyStream.on("field", function (name, value) {
|
|
3290
|
-
if (
|
|
3326
|
+
if (null !== tail)
|
|
3327
|
+
null === tail.queuedFields && (tail.queuedFields = []),
|
|
3328
|
+
tail.queuedFields.push(name, value);
|
|
3291
3329
|
else
|
|
3292
3330
|
try {
|
|
3293
3331
|
resolveField(response, name, value);
|
|
@@ -3305,41 +3343,40 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
|
3305
3343
|
)
|
|
3306
3344
|
);
|
|
3307
3345
|
else {
|
|
3308
|
-
|
|
3309
|
-
|
|
3346
|
+
var file = { chunks: [], filename: filename, mime: mimeType },
|
|
3347
|
+
pendingFile = {
|
|
3348
|
+
name: name,
|
|
3349
|
+
file: file,
|
|
3350
|
+
complete: !1,
|
|
3351
|
+
queuedFields: null,
|
|
3352
|
+
next: null
|
|
3353
|
+
};
|
|
3354
|
+
null === tail ? (head = pendingFile) : (tail.next = pendingFile);
|
|
3355
|
+
tail = pendingFile;
|
|
3310
3356
|
value.on("data", function (chunk) {
|
|
3311
|
-
JSCompiler_object_inline_chunks_243.push(chunk);
|
|
3312
|
-
});
|
|
3313
|
-
value.on("end", function () {
|
|
3314
3357
|
try {
|
|
3315
|
-
|
|
3316
|
-
type: mimeType
|
|
3317
|
-
}),
|
|
3318
|
-
backingStore = response._formData;
|
|
3319
|
-
backingStore.data.append(name, blob, filename);
|
|
3320
|
-
var keys = backingStore.keys;
|
|
3321
|
-
null === keys
|
|
3322
|
-
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
3323
|
-
(backingStore.keyPointer = 0))
|
|
3324
|
-
: keys.push(name);
|
|
3325
|
-
pendingFiles--;
|
|
3326
|
-
if (0 === pendingFiles) {
|
|
3327
|
-
for (blob = 0; blob < queuedFields.length; blob += 2)
|
|
3328
|
-
resolveField(
|
|
3329
|
-
response,
|
|
3330
|
-
queuedFields[blob],
|
|
3331
|
-
queuedFields[blob + 1]
|
|
3332
|
-
);
|
|
3333
|
-
queuedFields.length = 0;
|
|
3334
|
-
}
|
|
3358
|
+
file.chunks.push(chunk);
|
|
3335
3359
|
} catch (error) {
|
|
3336
3360
|
busboyStream.destroy(error);
|
|
3337
3361
|
}
|
|
3338
3362
|
});
|
|
3363
|
+
value.on("error", function (error) {
|
|
3364
|
+
busboyStream.destroy(error);
|
|
3365
|
+
});
|
|
3366
|
+
value.on("end", function () {
|
|
3367
|
+
pendingFile.complete = !0;
|
|
3368
|
+
flush();
|
|
3369
|
+
});
|
|
3339
3370
|
}
|
|
3340
3371
|
});
|
|
3341
3372
|
busboyStream.on("finish", function () {
|
|
3342
|
-
|
|
3373
|
+
bodyFinished = !0;
|
|
3374
|
+
flush();
|
|
3375
|
+
closed ||
|
|
3376
|
+
reportGlobalError(
|
|
3377
|
+
response,
|
|
3378
|
+
Error("Reply finished with incomplete file part.")
|
|
3379
|
+
);
|
|
3343
3380
|
});
|
|
3344
3381
|
busboyStream.on("error", function (err) {
|
|
3345
3382
|
reportGlobalError(response, err);
|
|
@@ -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];
|
|
@@ -4234,20 +4234,58 @@
|
|
|
4234
4234
|
webpackMap,
|
|
4235
4235
|
options
|
|
4236
4236
|
) {
|
|
4237
|
-
|
|
4237
|
+
function flush() {
|
|
4238
|
+
for (; null !== head; ) {
|
|
4239
|
+
var current = head;
|
|
4240
|
+
if (!current.complete) return;
|
|
4241
|
+
try {
|
|
4242
|
+
var response = response$jscomp$0,
|
|
4243
|
+
key = current.name,
|
|
4244
|
+
handle = current.file,
|
|
4245
|
+
blob = new Blob(handle.chunks, { type: handle.mime }),
|
|
4246
|
+
backingStore = response._formData;
|
|
4247
|
+
response = key;
|
|
4248
|
+
backingStore.data.append(response, blob, handle.filename);
|
|
4249
|
+
var keys = backingStore.keys;
|
|
4250
|
+
null === keys
|
|
4251
|
+
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
4252
|
+
(backingStore.keyPointer = 0))
|
|
4253
|
+
: keys.push(response);
|
|
4254
|
+
var queuedFields = current.queuedFields;
|
|
4255
|
+
if (null !== queuedFields)
|
|
4256
|
+
for (response = 0; response < queuedFields.length; response += 2)
|
|
4257
|
+
resolveField(
|
|
4258
|
+
response$jscomp$0,
|
|
4259
|
+
queuedFields[response],
|
|
4260
|
+
queuedFields[response + 1]
|
|
4261
|
+
);
|
|
4262
|
+
} catch (error) {
|
|
4263
|
+
busboyStream.destroy(error);
|
|
4264
|
+
return;
|
|
4265
|
+
}
|
|
4266
|
+
head = current.next;
|
|
4267
|
+
}
|
|
4268
|
+
tail = null;
|
|
4269
|
+
bodyFinished && !closed && ((closed = !0), close(response$jscomp$0));
|
|
4270
|
+
}
|
|
4271
|
+
var response$jscomp$0 = createResponse(
|
|
4238
4272
|
webpackMap,
|
|
4239
4273
|
"",
|
|
4240
4274
|
options ? options.temporaryReferences : void 0,
|
|
4241
4275
|
void 0,
|
|
4242
4276
|
options ? options.arraySizeLimit : void 0
|
|
4243
4277
|
),
|
|
4244
|
-
|
|
4245
|
-
|
|
4278
|
+
head = null,
|
|
4279
|
+
tail = null,
|
|
4280
|
+
bodyFinished = !1,
|
|
4281
|
+
closed = !1;
|
|
4246
4282
|
busboyStream.on("field", function (name, value) {
|
|
4247
|
-
if (
|
|
4283
|
+
if (null !== tail)
|
|
4284
|
+
null === tail.queuedFields && (tail.queuedFields = []),
|
|
4285
|
+
tail.queuedFields.push(name, value);
|
|
4248
4286
|
else
|
|
4249
4287
|
try {
|
|
4250
|
-
resolveField(response, name, value);
|
|
4288
|
+
resolveField(response$jscomp$0, name, value);
|
|
4251
4289
|
} catch (error) {
|
|
4252
4290
|
busboyStream.destroy(error);
|
|
4253
4291
|
}
|
|
@@ -4262,46 +4300,45 @@
|
|
|
4262
4300
|
)
|
|
4263
4301
|
);
|
|
4264
4302
|
else {
|
|
4265
|
-
|
|
4266
|
-
|
|
4303
|
+
var file = { chunks: [], filename: filename, mime: mimeType },
|
|
4304
|
+
pendingFile = {
|
|
4305
|
+
name: name,
|
|
4306
|
+
file: file,
|
|
4307
|
+
complete: !1,
|
|
4308
|
+
queuedFields: null,
|
|
4309
|
+
next: null
|
|
4310
|
+
};
|
|
4311
|
+
null === tail ? (head = pendingFile) : (tail.next = pendingFile);
|
|
4312
|
+
tail = pendingFile;
|
|
4267
4313
|
value.on("data", function (chunk) {
|
|
4268
|
-
JSCompiler_object_inline_chunks_162.push(chunk);
|
|
4269
|
-
});
|
|
4270
|
-
value.on("end", function () {
|
|
4271
4314
|
try {
|
|
4272
|
-
|
|
4273
|
-
type: mimeType
|
|
4274
|
-
}),
|
|
4275
|
-
backingStore = response._formData;
|
|
4276
|
-
backingStore.data.append(name, blob, filename);
|
|
4277
|
-
var keys = backingStore.keys;
|
|
4278
|
-
null === keys
|
|
4279
|
-
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
4280
|
-
(backingStore.keyPointer = 0))
|
|
4281
|
-
: keys.push(name);
|
|
4282
|
-
pendingFiles--;
|
|
4283
|
-
if (0 === pendingFiles) {
|
|
4284
|
-
for (blob = 0; blob < queuedFields.length; blob += 2)
|
|
4285
|
-
resolveField(
|
|
4286
|
-
response,
|
|
4287
|
-
queuedFields[blob],
|
|
4288
|
-
queuedFields[blob + 1]
|
|
4289
|
-
);
|
|
4290
|
-
queuedFields.length = 0;
|
|
4291
|
-
}
|
|
4315
|
+
file.chunks.push(chunk);
|
|
4292
4316
|
} catch (error) {
|
|
4293
4317
|
busboyStream.destroy(error);
|
|
4294
4318
|
}
|
|
4295
4319
|
});
|
|
4320
|
+
value.on("error", function (error) {
|
|
4321
|
+
busboyStream.destroy(error);
|
|
4322
|
+
});
|
|
4323
|
+
value.on("end", function () {
|
|
4324
|
+
pendingFile.complete = !0;
|
|
4325
|
+
flush();
|
|
4326
|
+
});
|
|
4296
4327
|
}
|
|
4297
4328
|
});
|
|
4298
4329
|
busboyStream.on("finish", function () {
|
|
4299
|
-
|
|
4330
|
+
bodyFinished = !0;
|
|
4331
|
+
flush();
|
|
4332
|
+
closed ||
|
|
4333
|
+
reportGlobalError(
|
|
4334
|
+
response$jscomp$0,
|
|
4335
|
+
Error("Reply finished with incomplete file part.")
|
|
4336
|
+
);
|
|
4300
4337
|
});
|
|
4301
4338
|
busboyStream.on("error", function (err) {
|
|
4302
|
-
reportGlobalError(response, err);
|
|
4339
|
+
reportGlobalError(response$jscomp$0, err);
|
|
4303
4340
|
});
|
|
4304
|
-
return getChunk(response, 0);
|
|
4341
|
+
return getChunk(response$jscomp$0, 0);
|
|
4305
4342
|
};
|
|
4306
4343
|
exports.registerClientReference = function (
|
|
4307
4344
|
proxyImplementation,
|
|
@@ -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];
|
|
@@ -3244,6 +3241,43 @@ exports.decodeReply = function (body, webpackMap, options) {
|
|
|
3244
3241
|
return webpackMap;
|
|
3245
3242
|
};
|
|
3246
3243
|
exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
3244
|
+
function flush() {
|
|
3245
|
+
for (; null !== head; ) {
|
|
3246
|
+
var current = head;
|
|
3247
|
+
if (!current.complete) return;
|
|
3248
|
+
try {
|
|
3249
|
+
var key = current.name,
|
|
3250
|
+
handle = current.file,
|
|
3251
|
+
blob = new Blob(handle.chunks, { type: handle.mime }),
|
|
3252
|
+
backingStore = response._formData,
|
|
3253
|
+
key$jscomp$0 = key;
|
|
3254
|
+
backingStore.data.append(key$jscomp$0, blob, handle.filename);
|
|
3255
|
+
var keys = backingStore.keys;
|
|
3256
|
+
null === keys
|
|
3257
|
+
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
3258
|
+
(backingStore.keyPointer = 0))
|
|
3259
|
+
: keys.push(key$jscomp$0);
|
|
3260
|
+
var queuedFields = current.queuedFields;
|
|
3261
|
+
if (null !== queuedFields)
|
|
3262
|
+
for (
|
|
3263
|
+
key$jscomp$0 = 0;
|
|
3264
|
+
key$jscomp$0 < queuedFields.length;
|
|
3265
|
+
key$jscomp$0 += 2
|
|
3266
|
+
)
|
|
3267
|
+
resolveField(
|
|
3268
|
+
response,
|
|
3269
|
+
queuedFields[key$jscomp$0],
|
|
3270
|
+
queuedFields[key$jscomp$0 + 1]
|
|
3271
|
+
);
|
|
3272
|
+
} catch (error) {
|
|
3273
|
+
busboyStream.destroy(error);
|
|
3274
|
+
return;
|
|
3275
|
+
}
|
|
3276
|
+
head = current.next;
|
|
3277
|
+
}
|
|
3278
|
+
tail = null;
|
|
3279
|
+
bodyFinished && !closed && ((closed = !0), close(response));
|
|
3280
|
+
}
|
|
3247
3281
|
var response = createResponse(
|
|
3248
3282
|
webpackMap,
|
|
3249
3283
|
"",
|
|
@@ -3251,10 +3285,14 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
|
3251
3285
|
void 0,
|
|
3252
3286
|
options ? options.arraySizeLimit : void 0
|
|
3253
3287
|
),
|
|
3254
|
-
|
|
3255
|
-
|
|
3288
|
+
head = null,
|
|
3289
|
+
tail = null,
|
|
3290
|
+
bodyFinished = !1,
|
|
3291
|
+
closed = !1;
|
|
3256
3292
|
busboyStream.on("field", function (name, value) {
|
|
3257
|
-
if (
|
|
3293
|
+
if (null !== tail)
|
|
3294
|
+
null === tail.queuedFields && (tail.queuedFields = []),
|
|
3295
|
+
tail.queuedFields.push(name, value);
|
|
3258
3296
|
else
|
|
3259
3297
|
try {
|
|
3260
3298
|
resolveField(response, name, value);
|
|
@@ -3272,41 +3310,40 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
|
3272
3310
|
)
|
|
3273
3311
|
);
|
|
3274
3312
|
else {
|
|
3275
|
-
|
|
3276
|
-
|
|
3313
|
+
var file = { chunks: [], filename: filename, mime: mimeType },
|
|
3314
|
+
pendingFile = {
|
|
3315
|
+
name: name,
|
|
3316
|
+
file: file,
|
|
3317
|
+
complete: !1,
|
|
3318
|
+
queuedFields: null,
|
|
3319
|
+
next: null
|
|
3320
|
+
};
|
|
3321
|
+
null === tail ? (head = pendingFile) : (tail.next = pendingFile);
|
|
3322
|
+
tail = pendingFile;
|
|
3277
3323
|
value.on("data", function (chunk) {
|
|
3278
|
-
JSCompiler_object_inline_chunks_243.push(chunk);
|
|
3279
|
-
});
|
|
3280
|
-
value.on("end", function () {
|
|
3281
3324
|
try {
|
|
3282
|
-
|
|
3283
|
-
type: mimeType
|
|
3284
|
-
}),
|
|
3285
|
-
backingStore = response._formData;
|
|
3286
|
-
backingStore.data.append(name, blob, filename);
|
|
3287
|
-
var keys = backingStore.keys;
|
|
3288
|
-
null === keys
|
|
3289
|
-
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
3290
|
-
(backingStore.keyPointer = 0))
|
|
3291
|
-
: keys.push(name);
|
|
3292
|
-
pendingFiles--;
|
|
3293
|
-
if (0 === pendingFiles) {
|
|
3294
|
-
for (blob = 0; blob < queuedFields.length; blob += 2)
|
|
3295
|
-
resolveField(
|
|
3296
|
-
response,
|
|
3297
|
-
queuedFields[blob],
|
|
3298
|
-
queuedFields[blob + 1]
|
|
3299
|
-
);
|
|
3300
|
-
queuedFields.length = 0;
|
|
3301
|
-
}
|
|
3325
|
+
file.chunks.push(chunk);
|
|
3302
3326
|
} catch (error) {
|
|
3303
3327
|
busboyStream.destroy(error);
|
|
3304
3328
|
}
|
|
3305
3329
|
});
|
|
3330
|
+
value.on("error", function (error) {
|
|
3331
|
+
busboyStream.destroy(error);
|
|
3332
|
+
});
|
|
3333
|
+
value.on("end", function () {
|
|
3334
|
+
pendingFile.complete = !0;
|
|
3335
|
+
flush();
|
|
3336
|
+
});
|
|
3306
3337
|
}
|
|
3307
3338
|
});
|
|
3308
3339
|
busboyStream.on("finish", function () {
|
|
3309
|
-
|
|
3340
|
+
bodyFinished = !0;
|
|
3341
|
+
flush();
|
|
3342
|
+
closed ||
|
|
3343
|
+
reportGlobalError(
|
|
3344
|
+
response,
|
|
3345
|
+
Error("Reply finished with incomplete file part.")
|
|
3346
|
+
);
|
|
3310
3347
|
});
|
|
3311
3348
|
busboyStream.on("error", function (err) {
|
|
3312
3349
|
reportGlobalError(response, err);
|
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": {
|