react-server-dom-turbopack 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-turbopack-client.browser.development.js +2 -2
- package/cjs/react-server-dom-turbopack-server.browser.development.js +29 -29
- package/cjs/react-server-dom-turbopack-server.browser.production.js +26 -29
- package/cjs/react-server-dom-turbopack-server.edge.development.js +29 -29
- package/cjs/react-server-dom-turbopack-server.edge.production.js +26 -29
- package/cjs/react-server-dom-turbopack-server.node.development.js +29 -29
- package/cjs/react-server-dom-turbopack-server.node.production.js +26 -29
- package/package.json +5 -5
|
@@ -2476,10 +2476,10 @@
|
|
|
2476
2476
|
return hook.checkDCE ? !0 : !1;
|
|
2477
2477
|
})({
|
|
2478
2478
|
bundleType: 1,
|
|
2479
|
-
version: "19.0.
|
|
2479
|
+
version: "19.0.8",
|
|
2480
2480
|
rendererPackageName: "react-server-dom-turbopack",
|
|
2481
2481
|
currentDispatcherRef: ReactSharedInternals,
|
|
2482
|
-
reconcilerVersion: "19.0.
|
|
2482
|
+
reconcilerVersion: "19.0.8",
|
|
2483
2483
|
getCurrentComponentInfo: function () {
|
|
2484
2484
|
return currentOwnerInDEV;
|
|
2485
2485
|
}
|
|
@@ -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,
|
|
@@ -4137,44 +4137,44 @@
|
|
|
4137
4137
|
};
|
|
4138
4138
|
exports.decodeAction = function (body, serverManifest) {
|
|
4139
4139
|
var formData = new FormData(),
|
|
4140
|
-
|
|
4141
|
-
seenActions = new Set();
|
|
4140
|
+
maybeActionKey = null;
|
|
4142
4141
|
body.forEach(function (value, key) {
|
|
4143
4142
|
key.startsWith("$ACTION_")
|
|
4144
4143
|
? key.startsWith("$ACTION_REF_")
|
|
4145
|
-
?
|
|
4146
|
-
|
|
4147
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4148
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4149
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4150
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4151
|
-
!seenActions.has(key) &&
|
|
4152
|
-
(seenActions.add(key),
|
|
4153
|
-
(value = key.slice(11)),
|
|
4154
|
-
(action = loadServerReference(serverManifest, {
|
|
4155
|
-
id: value,
|
|
4156
|
-
bound: null
|
|
4157
|
-
})))
|
|
4144
|
+
? (maybeActionKey = key)
|
|
4145
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4158
4146
|
: formData.append(key, value);
|
|
4159
4147
|
});
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4148
|
+
if (null === maybeActionKey) return null;
|
|
4149
|
+
var actionKey = maybeActionKey,
|
|
4150
|
+
action = null;
|
|
4151
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4152
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4153
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4154
|
+
(action = loadServerReference(serverManifest, body));
|
|
4155
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4156
|
+
(body = actionKey.slice(11)),
|
|
4157
|
+
(action = loadServerReference(serverManifest, {
|
|
4158
|
+
id: body,
|
|
4159
|
+
bound: null
|
|
4160
|
+
}));
|
|
4161
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4162
|
+
return action.then(function (fn) {
|
|
4163
|
+
return fn.bind(null, formData);
|
|
4164
|
+
});
|
|
4165
4165
|
};
|
|
4166
4166
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4167
4167
|
var keyPath = body.get("$ACTION_KEY");
|
|
4168
4168
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4169
|
-
var
|
|
4169
|
+
var actionKey = null;
|
|
4170
4170
|
body.forEach(function (value, key) {
|
|
4171
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4172
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4173
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4171
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4174
4172
|
});
|
|
4175
|
-
if (null ===
|
|
4176
|
-
var
|
|
4177
|
-
|
|
4173
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4174
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4175
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4176
|
+
var referenceId = body.id;
|
|
4177
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4178
4178
|
return null === bound
|
|
4179
4179
|
? null
|
|
4180
4180
|
: [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;
|
|
@@ -3140,44 +3140,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3140
3140
|
};
|
|
3141
3141
|
exports.decodeAction = function (body, serverManifest) {
|
|
3142
3142
|
var formData = new FormData(),
|
|
3143
|
-
|
|
3144
|
-
seenActions = new Set();
|
|
3143
|
+
maybeActionKey = null;
|
|
3145
3144
|
body.forEach(function (value, key) {
|
|
3146
3145
|
key.startsWith("$ACTION_")
|
|
3147
3146
|
? key.startsWith("$ACTION_REF_")
|
|
3148
|
-
?
|
|
3149
|
-
|
|
3150
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3151
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3152
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3153
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3154
|
-
!seenActions.has(key) &&
|
|
3155
|
-
(seenActions.add(key),
|
|
3156
|
-
(value = key.slice(11)),
|
|
3157
|
-
(action = loadServerReference(serverManifest, {
|
|
3158
|
-
id: value,
|
|
3159
|
-
bound: null
|
|
3160
|
-
})))
|
|
3147
|
+
? (maybeActionKey = key)
|
|
3148
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3161
3149
|
: formData.append(key, value);
|
|
3162
3150
|
});
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3151
|
+
if (null === maybeActionKey) return null;
|
|
3152
|
+
var actionKey = maybeActionKey,
|
|
3153
|
+
action = null;
|
|
3154
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3155
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3156
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3157
|
+
(action = loadServerReference(serverManifest, body));
|
|
3158
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3159
|
+
(body = actionKey.slice(11)),
|
|
3160
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3161
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3162
|
+
return action.then(function (fn) {
|
|
3163
|
+
return fn.bind(null, formData);
|
|
3164
|
+
});
|
|
3168
3165
|
};
|
|
3169
3166
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3170
3167
|
var keyPath = body.get("$ACTION_KEY");
|
|
3171
3168
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3172
|
-
var
|
|
3169
|
+
var actionKey = null;
|
|
3173
3170
|
body.forEach(function (value, key) {
|
|
3174
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3175
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3176
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3171
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3177
3172
|
});
|
|
3178
|
-
if (null ===
|
|
3179
|
-
var
|
|
3180
|
-
|
|
3173
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3174
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3175
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3176
|
+
var referenceId = body.id;
|
|
3177
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3181
3178
|
return null === bound
|
|
3182
3179
|
? null
|
|
3183
3180
|
: [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,
|
|
@@ -4179,44 +4179,44 @@
|
|
|
4179
4179
|
};
|
|
4180
4180
|
exports.decodeAction = function (body, serverManifest) {
|
|
4181
4181
|
var formData = new FormData(),
|
|
4182
|
-
|
|
4183
|
-
seenActions = new Set();
|
|
4182
|
+
maybeActionKey = null;
|
|
4184
4183
|
body.forEach(function (value, key) {
|
|
4185
4184
|
key.startsWith("$ACTION_")
|
|
4186
4185
|
? key.startsWith("$ACTION_REF_")
|
|
4187
|
-
?
|
|
4188
|
-
|
|
4189
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4190
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4191
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4192
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4193
|
-
!seenActions.has(key) &&
|
|
4194
|
-
(seenActions.add(key),
|
|
4195
|
-
(value = key.slice(11)),
|
|
4196
|
-
(action = loadServerReference(serverManifest, {
|
|
4197
|
-
id: value,
|
|
4198
|
-
bound: null
|
|
4199
|
-
})))
|
|
4186
|
+
? (maybeActionKey = key)
|
|
4187
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4200
4188
|
: formData.append(key, value);
|
|
4201
4189
|
});
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4190
|
+
if (null === maybeActionKey) return null;
|
|
4191
|
+
var actionKey = maybeActionKey,
|
|
4192
|
+
action = null;
|
|
4193
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4194
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4195
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4196
|
+
(action = loadServerReference(serverManifest, body));
|
|
4197
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4198
|
+
(body = actionKey.slice(11)),
|
|
4199
|
+
(action = loadServerReference(serverManifest, {
|
|
4200
|
+
id: body,
|
|
4201
|
+
bound: null
|
|
4202
|
+
}));
|
|
4203
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4204
|
+
return action.then(function (fn) {
|
|
4205
|
+
return fn.bind(null, formData);
|
|
4206
|
+
});
|
|
4207
4207
|
};
|
|
4208
4208
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4209
4209
|
var keyPath = body.get("$ACTION_KEY");
|
|
4210
4210
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4211
|
-
var
|
|
4211
|
+
var actionKey = null;
|
|
4212
4212
|
body.forEach(function (value, key) {
|
|
4213
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4214
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4215
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4213
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4216
4214
|
});
|
|
4217
|
-
if (null ===
|
|
4218
|
-
var
|
|
4219
|
-
|
|
4215
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4216
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4217
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4218
|
+
var referenceId = body.id;
|
|
4219
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4220
4220
|
return null === bound
|
|
4221
4221
|
? null
|
|
4222
4222
|
: [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;
|
|
@@ -3151,44 +3151,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3151
3151
|
};
|
|
3152
3152
|
exports.decodeAction = function (body, serverManifest) {
|
|
3153
3153
|
var formData = new FormData(),
|
|
3154
|
-
|
|
3155
|
-
seenActions = new Set();
|
|
3154
|
+
maybeActionKey = null;
|
|
3156
3155
|
body.forEach(function (value, key) {
|
|
3157
3156
|
key.startsWith("$ACTION_")
|
|
3158
3157
|
? key.startsWith("$ACTION_REF_")
|
|
3159
|
-
?
|
|
3160
|
-
|
|
3161
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3162
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3163
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3164
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3165
|
-
!seenActions.has(key) &&
|
|
3166
|
-
(seenActions.add(key),
|
|
3167
|
-
(value = key.slice(11)),
|
|
3168
|
-
(action = loadServerReference(serverManifest, {
|
|
3169
|
-
id: value,
|
|
3170
|
-
bound: null
|
|
3171
|
-
})))
|
|
3158
|
+
? (maybeActionKey = key)
|
|
3159
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3172
3160
|
: formData.append(key, value);
|
|
3173
3161
|
});
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3162
|
+
if (null === maybeActionKey) return null;
|
|
3163
|
+
var actionKey = maybeActionKey,
|
|
3164
|
+
action = null;
|
|
3165
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3166
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3167
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3168
|
+
(action = loadServerReference(serverManifest, body));
|
|
3169
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3170
|
+
(body = actionKey.slice(11)),
|
|
3171
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3172
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3173
|
+
return action.then(function (fn) {
|
|
3174
|
+
return fn.bind(null, formData);
|
|
3175
|
+
});
|
|
3179
3176
|
};
|
|
3180
3177
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3181
3178
|
var keyPath = body.get("$ACTION_KEY");
|
|
3182
3179
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3183
|
-
var
|
|
3180
|
+
var actionKey = null;
|
|
3184
3181
|
body.forEach(function (value, key) {
|
|
3185
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3186
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3187
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3182
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3188
3183
|
});
|
|
3189
|
-
if (null ===
|
|
3190
|
-
var
|
|
3191
|
-
|
|
3184
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3185
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3186
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3187
|
+
var referenceId = body.id;
|
|
3188
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3192
3189
|
return null === bound
|
|
3193
3190
|
? null
|
|
3194
3191
|
: [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,
|
|
@@ -4202,44 +4202,44 @@
|
|
|
4202
4202
|
};
|
|
4203
4203
|
exports.decodeAction = function (body, serverManifest) {
|
|
4204
4204
|
var formData = new FormData(),
|
|
4205
|
-
|
|
4206
|
-
seenActions = new Set();
|
|
4205
|
+
maybeActionKey = null;
|
|
4207
4206
|
body.forEach(function (value, key) {
|
|
4208
4207
|
key.startsWith("$ACTION_")
|
|
4209
4208
|
? key.startsWith("$ACTION_REF_")
|
|
4210
|
-
?
|
|
4211
|
-
|
|
4212
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4213
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4214
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4215
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4216
|
-
!seenActions.has(key) &&
|
|
4217
|
-
(seenActions.add(key),
|
|
4218
|
-
(value = key.slice(11)),
|
|
4219
|
-
(action = loadServerReference(serverManifest, {
|
|
4220
|
-
id: value,
|
|
4221
|
-
bound: null
|
|
4222
|
-
})))
|
|
4209
|
+
? (maybeActionKey = key)
|
|
4210
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4223
4211
|
: formData.append(key, value);
|
|
4224
4212
|
});
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4213
|
+
if (null === maybeActionKey) return null;
|
|
4214
|
+
var actionKey = maybeActionKey,
|
|
4215
|
+
action = null;
|
|
4216
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4217
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4218
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4219
|
+
(action = loadServerReference(serverManifest, body));
|
|
4220
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4221
|
+
(body = actionKey.slice(11)),
|
|
4222
|
+
(action = loadServerReference(serverManifest, {
|
|
4223
|
+
id: body,
|
|
4224
|
+
bound: null
|
|
4225
|
+
}));
|
|
4226
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4227
|
+
return action.then(function (fn) {
|
|
4228
|
+
return fn.bind(null, formData);
|
|
4229
|
+
});
|
|
4230
4230
|
};
|
|
4231
4231
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4232
4232
|
var keyPath = body.get("$ACTION_KEY");
|
|
4233
4233
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4234
|
-
var
|
|
4234
|
+
var actionKey = null;
|
|
4235
4235
|
body.forEach(function (value, key) {
|
|
4236
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4237
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4238
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4236
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4239
4237
|
});
|
|
4240
|
-
if (null ===
|
|
4241
|
-
var
|
|
4242
|
-
|
|
4238
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4239
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4240
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4241
|
+
var referenceId = body.id;
|
|
4242
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4243
4243
|
return null === bound
|
|
4244
4244
|
? null
|
|
4245
4245
|
: [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;
|
|
@@ -3213,44 +3213,41 @@ exports.createTemporaryReferenceSet = function () {
|
|
|
3213
3213
|
};
|
|
3214
3214
|
exports.decodeAction = function (body, serverManifest) {
|
|
3215
3215
|
var formData = new FormData(),
|
|
3216
|
-
|
|
3217
|
-
seenActions = new Set();
|
|
3216
|
+
maybeActionKey = null;
|
|
3218
3217
|
body.forEach(function (value, key) {
|
|
3219
3218
|
key.startsWith("$ACTION_")
|
|
3220
3219
|
? key.startsWith("$ACTION_REF_")
|
|
3221
|
-
?
|
|
3222
|
-
|
|
3223
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
3224
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
3225
|
-
(action = loadServerReference(serverManifest, value)))
|
|
3226
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
3227
|
-
!seenActions.has(key) &&
|
|
3228
|
-
(seenActions.add(key),
|
|
3229
|
-
(value = key.slice(11)),
|
|
3230
|
-
(action = loadServerReference(serverManifest, {
|
|
3231
|
-
id: value,
|
|
3232
|
-
bound: null
|
|
3233
|
-
})))
|
|
3220
|
+
? (maybeActionKey = key)
|
|
3221
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
3234
3222
|
: formData.append(key, value);
|
|
3235
3223
|
});
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3224
|
+
if (null === maybeActionKey) return null;
|
|
3225
|
+
var actionKey = maybeActionKey,
|
|
3226
|
+
action = null;
|
|
3227
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
3228
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
3229
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
3230
|
+
(action = loadServerReference(serverManifest, body));
|
|
3231
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
3232
|
+
(body = actionKey.slice(11)),
|
|
3233
|
+
(action = loadServerReference(serverManifest, { id: body, bound: null }));
|
|
3234
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
3235
|
+
return action.then(function (fn) {
|
|
3236
|
+
return fn.bind(null, formData);
|
|
3237
|
+
});
|
|
3241
3238
|
};
|
|
3242
3239
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
3243
3240
|
var keyPath = body.get("$ACTION_KEY");
|
|
3244
3241
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
3245
|
-
var
|
|
3242
|
+
var actionKey = null;
|
|
3246
3243
|
body.forEach(function (value, key) {
|
|
3247
|
-
key.startsWith("$ACTION_REF_") &&
|
|
3248
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
3249
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
3244
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
3250
3245
|
});
|
|
3251
|
-
if (null ===
|
|
3252
|
-
var
|
|
3253
|
-
|
|
3246
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
3247
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
3248
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
3249
|
+
var referenceId = body.id;
|
|
3250
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
3254
3251
|
return null === bound
|
|
3255
3252
|
? null
|
|
3256
3253
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-server-dom-turbopack",
|
|
3
3
|
"description": "React Server Components bindings for DOM using Turbopack. 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",
|
|
@@ -71,15 +71,15 @@
|
|
|
71
71
|
"main": "index.js",
|
|
72
72
|
"repository": {
|
|
73
73
|
"type": "git",
|
|
74
|
-
"url": "https://github.com/
|
|
74
|
+
"url": "https://github.com/react/react.git",
|
|
75
75
|
"directory": "packages/react-server-dom-turbopack"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=0.10.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"react": "^19.0.
|
|
82
|
-
"react-dom": "^19.0.
|
|
81
|
+
"react": "^19.0.8",
|
|
82
|
+
"react-dom": "^19.0.8"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"acorn-loose": "^8.3.0",
|