react-server-dom-turbopack 19.1.8 → 19.1.10
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 +61 -52
- package/cjs/react-server-dom-turbopack-client.browser.production.js +79 -63
- package/cjs/react-server-dom-turbopack-client.edge.development.js +64 -52
- package/cjs/react-server-dom-turbopack-client.edge.production.js +84 -69
- package/cjs/react-server-dom-turbopack-client.node.development.js +64 -52
- package/cjs/react-server-dom-turbopack-client.node.production.js +84 -69
- package/cjs/react-server-dom-turbopack-server.browser.development.js +214 -123
- package/cjs/react-server-dom-turbopack-server.browser.production.js +209 -118
- package/cjs/react-server-dom-turbopack-server.edge.development.js +253 -149
- package/cjs/react-server-dom-turbopack-server.edge.production.js +244 -145
- package/cjs/react-server-dom-turbopack-server.node.development.js +270 -161
- package/cjs/react-server-dom-turbopack-server.node.production.js +259 -154
- package/package.json +5 -5
|
@@ -70,33 +70,44 @@
|
|
|
70
70
|
(currentView = new Uint8Array(2048)),
|
|
71
71
|
(writtenBytes = 0));
|
|
72
72
|
}
|
|
73
|
-
} else
|
|
74
|
-
|
|
75
|
-
(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
(currentView
|
|
99
|
-
(
|
|
73
|
+
} else if (0 === chunk.byteLength)
|
|
74
|
+
if (supportsArrayBufferDetached) {
|
|
75
|
+
if (chunk.buffer.detached)
|
|
76
|
+
throw Error(
|
|
77
|
+
"Cannot transport a detached buffer. This usually happens when trying to transport multiple buffer-spanning views on the same underyling buffer. Either reuse the exact same view by identity or copy the underlying buffer manually via `view.slice()`."
|
|
78
|
+
);
|
|
79
|
+
} else
|
|
80
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
81
|
+
(console.error(
|
|
82
|
+
"React encountered an empty buffer when writing in an environment that does not support ArrayBuffer.prototype.detached. This could be a security issue if the buffer was not actually empty. Please upgrade to a Node.js version that supports ArrayBuffer.prototype.detached."
|
|
83
|
+
),
|
|
84
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
85
|
+
else
|
|
86
|
+
2048 < chunk.byteLength
|
|
87
|
+
? (0 < writtenBytes &&
|
|
88
|
+
(writeToDestination(
|
|
89
|
+
destination,
|
|
90
|
+
currentView.subarray(0, writtenBytes)
|
|
91
|
+
),
|
|
92
|
+
(currentView = new Uint8Array(2048)),
|
|
93
|
+
(writtenBytes = 0)),
|
|
94
|
+
writeToDestination(destination, chunk))
|
|
95
|
+
: ((target = currentView.length - writtenBytes),
|
|
96
|
+
target < chunk.byteLength &&
|
|
97
|
+
(0 === target
|
|
98
|
+
? writeToDestination(destination, currentView)
|
|
99
|
+
: (currentView.set(chunk.subarray(0, target), writtenBytes),
|
|
100
|
+
(writtenBytes += target),
|
|
101
|
+
writeToDestination(destination, currentView),
|
|
102
|
+
(chunk = chunk.subarray(target))),
|
|
103
|
+
(currentView = new Uint8Array(2048)),
|
|
104
|
+
(writtenBytes = 0)),
|
|
105
|
+
currentView.set(chunk, writtenBytes),
|
|
106
|
+
(writtenBytes += chunk.byteLength),
|
|
107
|
+
2048 === writtenBytes &&
|
|
108
|
+
(writeToDestination(destination, currentView),
|
|
109
|
+
(currentView = new Uint8Array(2048)),
|
|
110
|
+
(writtenBytes = 0)));
|
|
100
111
|
return destinationHasCapacity;
|
|
101
112
|
}
|
|
102
113
|
function byteLengthOfChunk(chunk) {
|
|
@@ -954,7 +965,7 @@
|
|
|
954
965
|
erroredTask(request, streamTask, reason),
|
|
955
966
|
enqueueFlush(request),
|
|
956
967
|
"function" === typeof iterator.throw &&
|
|
957
|
-
iterator.throw(reason).then(
|
|
968
|
+
iterator.throw(reason).then(noop, noop));
|
|
958
969
|
}
|
|
959
970
|
function abortIterable(reason) {
|
|
960
971
|
aborted ||
|
|
@@ -963,7 +974,7 @@
|
|
|
963
974
|
erroredTask(request, streamTask, reason),
|
|
964
975
|
enqueueFlush(request),
|
|
965
976
|
"function" === typeof iterator.throw &&
|
|
966
|
-
iterator.throw(reason).then(
|
|
977
|
+
iterator.throw(reason).then(noop, noop));
|
|
967
978
|
}
|
|
968
979
|
var isIterator = iterable === iterator,
|
|
969
980
|
streamTask = createTask(
|
|
@@ -2172,13 +2183,35 @@
|
|
|
2172
2183
|
}
|
|
2173
2184
|
function emitTypedArrayChunk(request, id, tag, typedArray) {
|
|
2174
2185
|
request.pendingChunks++;
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2186
|
+
a: {
|
|
2187
|
+
var view = new Uint8Array(
|
|
2188
|
+
typedArray.buffer,
|
|
2189
|
+
typedArray.byteOffset,
|
|
2190
|
+
typedArray.byteLength
|
|
2191
|
+
);
|
|
2192
|
+
if (2048 < typedArray.byteLength) {
|
|
2193
|
+
if (
|
|
2194
|
+
0 !== typedArray.byteOffset ||
|
|
2195
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
2196
|
+
typedArray.buffer.resizable
|
|
2197
|
+
) {
|
|
2198
|
+
typedArray = view.slice();
|
|
2199
|
+
break a;
|
|
2200
|
+
}
|
|
2201
|
+
if (!supportsArrayBufferDetached) {
|
|
2202
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
2203
|
+
(console.error(
|
|
2204
|
+
"React copied a partial view into a fresh buffer as a safety precaution because the environment does not implement ArrayBuffer.prototype.detached. This negatively impacts performance. Please upgrade to a modern Node.js version."
|
|
2205
|
+
),
|
|
2206
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
2207
|
+
typedArray = view.slice();
|
|
2208
|
+
break a;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
typedArray = view;
|
|
2212
|
+
}
|
|
2213
|
+
view = typedArray.byteLength;
|
|
2214
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
2182
2215
|
request.completedRegularChunks.push(id, typedArray);
|
|
2183
2216
|
}
|
|
2184
2217
|
function emitTextChunk(request, id, text) {
|
|
@@ -2808,6 +2841,39 @@
|
|
|
2808
2841
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
2809
2842
|
return moduleExports[metadata[2]];
|
|
2810
2843
|
}
|
|
2844
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
2845
|
+
var prefix = backingStore.prefix;
|
|
2846
|
+
if (key.startsWith(prefix)) {
|
|
2847
|
+
switch (key[prefix.length]) {
|
|
2848
|
+
case "_":
|
|
2849
|
+
prefix = backingStore.referencedEntries;
|
|
2850
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
2851
|
+
prefix.push([key, value]);
|
|
2852
|
+
return;
|
|
2853
|
+
case "S":
|
|
2854
|
+
"string" === typeof value &&
|
|
2855
|
+
((prefix = backingStore.streamChunks),
|
|
2856
|
+
null === prefix &&
|
|
2857
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
2858
|
+
(backingStore = prefix.get(key)),
|
|
2859
|
+
void 0 === backingStore
|
|
2860
|
+
? prefix.set(key, [value])
|
|
2861
|
+
: backingStore.push(value));
|
|
2862
|
+
return;
|
|
2863
|
+
}
|
|
2864
|
+
"string" === typeof value
|
|
2865
|
+
? ((prefix = backingStore.stringChunks),
|
|
2866
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
2867
|
+
prefix.set(key, value))
|
|
2868
|
+
: ((prefix = backingStore.blobs),
|
|
2869
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
2870
|
+
prefix.set(key, value));
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
function getBackingBlob(backingStore, key) {
|
|
2874
|
+
backingStore = backingStore.blobs;
|
|
2875
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
2876
|
+
}
|
|
2811
2877
|
function ReactPromise(status, value, reason) {
|
|
2812
2878
|
this.status = status;
|
|
2813
2879
|
this.value = value;
|
|
@@ -3119,9 +3185,11 @@
|
|
|
3119
3185
|
function getChunk(response, id) {
|
|
3120
3186
|
var chunks = response._chunks,
|
|
3121
3187
|
chunk = chunks.get(id);
|
|
3122
|
-
chunk
|
|
3123
|
-
|
|
3124
|
-
|
|
3188
|
+
if (!chunk) {
|
|
3189
|
+
chunk = response._prefix;
|
|
3190
|
+
var stringChunks = response._formData.stringChunks;
|
|
3191
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
3192
|
+
chunk =
|
|
3125
3193
|
"string" === typeof chunk
|
|
3126
3194
|
? new ReactPromise(
|
|
3127
3195
|
"resolved_model",
|
|
@@ -3130,8 +3198,9 @@
|
|
|
3130
3198
|
)
|
|
3131
3199
|
: response._closed
|
|
3132
3200
|
? new ReactPromise("rejected", null, response._closedReason)
|
|
3133
|
-
: new ReactPromise("pending", null, null)
|
|
3134
|
-
chunks.set(id, chunk)
|
|
3201
|
+
: new ReactPromise("pending", null, null);
|
|
3202
|
+
chunks.set(id, chunk);
|
|
3203
|
+
}
|
|
3135
3204
|
return chunk;
|
|
3136
3205
|
}
|
|
3137
3206
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -3378,7 +3447,7 @@
|
|
|
3378
3447
|
Error("Already initialized typed array.")
|
|
3379
3448
|
)
|
|
3380
3449
|
);
|
|
3381
|
-
reference = response._formData
|
|
3450
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
3382
3451
|
if (initializingHandler) {
|
|
3383
3452
|
var handler = initializingHandler;
|
|
3384
3453
|
handler.deps++;
|
|
@@ -3422,15 +3491,17 @@
|
|
|
3422
3491
|
var chunks = response._chunks;
|
|
3423
3492
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
3424
3493
|
chunks.set(id, stream);
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3494
|
+
chunks = response._prefix;
|
|
3495
|
+
response = response._formData.streamChunks;
|
|
3496
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
3497
|
+
if (void 0 !== id)
|
|
3498
|
+
for (response = 0; response < id.length; response++)
|
|
3499
|
+
(chunks = id[response]),
|
|
3500
|
+
"C" === chunks[0]
|
|
3430
3501
|
? controller.close(
|
|
3431
3502
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
3432
3503
|
)
|
|
3433
|
-
: controller.enqueueModel(chunks)
|
|
3504
|
+
: controller.enqueueModel(chunks);
|
|
3434
3505
|
}
|
|
3435
3506
|
function parseReadableStream(response, reference, type) {
|
|
3436
3507
|
function enqueue(value) {
|
|
@@ -3594,7 +3665,14 @@
|
|
|
3594
3665
|
});
|
|
3595
3666
|
return iterator;
|
|
3596
3667
|
}
|
|
3597
|
-
function parseModelString(
|
|
3668
|
+
function parseModelString(
|
|
3669
|
+
response,
|
|
3670
|
+
obj,
|
|
3671
|
+
key$jscomp$0,
|
|
3672
|
+
value,
|
|
3673
|
+
reference,
|
|
3674
|
+
arrayRoot
|
|
3675
|
+
) {
|
|
3598
3676
|
if ("$" === value[0]) {
|
|
3599
3677
|
switch (value[1]) {
|
|
3600
3678
|
case "$":
|
|
@@ -3614,7 +3692,7 @@
|
|
|
3614
3692
|
response,
|
|
3615
3693
|
arrayRoot,
|
|
3616
3694
|
obj,
|
|
3617
|
-
key,
|
|
3695
|
+
key$jscomp$0,
|
|
3618
3696
|
null,
|
|
3619
3697
|
loadServerReference$1
|
|
3620
3698
|
)
|
|
@@ -3634,41 +3712,44 @@
|
|
|
3634
3712
|
case "Q":
|
|
3635
3713
|
return (
|
|
3636
3714
|
(arrayRoot = value.slice(2)),
|
|
3637
|
-
getOutlinedModel(
|
|
3715
|
+
getOutlinedModel(
|
|
3716
|
+
response,
|
|
3717
|
+
arrayRoot,
|
|
3718
|
+
obj,
|
|
3719
|
+
key$jscomp$0,
|
|
3720
|
+
null,
|
|
3721
|
+
createMap
|
|
3722
|
+
)
|
|
3638
3723
|
);
|
|
3639
3724
|
case "W":
|
|
3640
3725
|
return (
|
|
3641
3726
|
(arrayRoot = value.slice(2)),
|
|
3642
|
-
getOutlinedModel(
|
|
3727
|
+
getOutlinedModel(
|
|
3728
|
+
response,
|
|
3729
|
+
arrayRoot,
|
|
3730
|
+
obj,
|
|
3731
|
+
key$jscomp$0,
|
|
3732
|
+
null,
|
|
3733
|
+
createSet
|
|
3734
|
+
)
|
|
3643
3735
|
);
|
|
3644
3736
|
case "K":
|
|
3645
|
-
key = value.slice(2);
|
|
3646
|
-
obj = response.
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
(
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
for (
|
|
3660
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
3661
|
-
i < reference.length;
|
|
3662
|
-
i++
|
|
3663
|
-
)
|
|
3664
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
3665
|
-
reference = response;
|
|
3666
|
-
reference.data.delete(value);
|
|
3667
|
-
reference.keyPointer++;
|
|
3668
|
-
} else if (value.startsWith(obj)) break;
|
|
3669
|
-
else response.keyPointer++;
|
|
3737
|
+
key$jscomp$0 = value.slice(2);
|
|
3738
|
+
obj = response._formData;
|
|
3739
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
3740
|
+
key$jscomp$0 = new FormData();
|
|
3741
|
+
arrayRoot = obj.referencedEntries;
|
|
3742
|
+
if (null !== arrayRoot) {
|
|
3743
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
3744
|
+
reference = arrayRoot[value];
|
|
3745
|
+
var key = reference[0];
|
|
3746
|
+
if (!key.startsWith(response)) break;
|
|
3747
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
3748
|
+
value++;
|
|
3749
|
+
}
|
|
3750
|
+
obj.keyPointer = value;
|
|
3670
3751
|
}
|
|
3671
|
-
return
|
|
3752
|
+
return key$jscomp$0;
|
|
3672
3753
|
case "i":
|
|
3673
3754
|
return (
|
|
3674
3755
|
(arrayRoot = value.slice(2)),
|
|
@@ -3676,7 +3757,7 @@
|
|
|
3676
3757
|
response,
|
|
3677
3758
|
arrayRoot,
|
|
3678
3759
|
obj,
|
|
3679
|
-
key,
|
|
3760
|
+
key$jscomp$0,
|
|
3680
3761
|
null,
|
|
3681
3762
|
extractIterator
|
|
3682
3763
|
)
|
|
@@ -3711,7 +3792,7 @@
|
|
|
3711
3792
|
ArrayBuffer,
|
|
3712
3793
|
1,
|
|
3713
3794
|
obj,
|
|
3714
|
-
key,
|
|
3795
|
+
key$jscomp$0,
|
|
3715
3796
|
arrayRoot
|
|
3716
3797
|
);
|
|
3717
3798
|
case "O":
|
|
@@ -3721,7 +3802,7 @@
|
|
|
3721
3802
|
Int8Array,
|
|
3722
3803
|
1,
|
|
3723
3804
|
obj,
|
|
3724
|
-
key,
|
|
3805
|
+
key$jscomp$0,
|
|
3725
3806
|
arrayRoot
|
|
3726
3807
|
);
|
|
3727
3808
|
case "o":
|
|
@@ -3731,7 +3812,7 @@
|
|
|
3731
3812
|
Uint8Array,
|
|
3732
3813
|
1,
|
|
3733
3814
|
obj,
|
|
3734
|
-
key,
|
|
3815
|
+
key$jscomp$0,
|
|
3735
3816
|
arrayRoot
|
|
3736
3817
|
);
|
|
3737
3818
|
case "U":
|
|
@@ -3741,7 +3822,7 @@
|
|
|
3741
3822
|
Uint8ClampedArray,
|
|
3742
3823
|
1,
|
|
3743
3824
|
obj,
|
|
3744
|
-
key,
|
|
3825
|
+
key$jscomp$0,
|
|
3745
3826
|
arrayRoot
|
|
3746
3827
|
);
|
|
3747
3828
|
case "S":
|
|
@@ -3751,7 +3832,7 @@
|
|
|
3751
3832
|
Int16Array,
|
|
3752
3833
|
2,
|
|
3753
3834
|
obj,
|
|
3754
|
-
key,
|
|
3835
|
+
key$jscomp$0,
|
|
3755
3836
|
arrayRoot
|
|
3756
3837
|
);
|
|
3757
3838
|
case "s":
|
|
@@ -3761,7 +3842,7 @@
|
|
|
3761
3842
|
Uint16Array,
|
|
3762
3843
|
2,
|
|
3763
3844
|
obj,
|
|
3764
|
-
key,
|
|
3845
|
+
key$jscomp$0,
|
|
3765
3846
|
arrayRoot
|
|
3766
3847
|
);
|
|
3767
3848
|
case "L":
|
|
@@ -3771,7 +3852,7 @@
|
|
|
3771
3852
|
Int32Array,
|
|
3772
3853
|
4,
|
|
3773
3854
|
obj,
|
|
3774
|
-
key,
|
|
3855
|
+
key$jscomp$0,
|
|
3775
3856
|
arrayRoot
|
|
3776
3857
|
);
|
|
3777
3858
|
case "l":
|
|
@@ -3781,7 +3862,7 @@
|
|
|
3781
3862
|
Uint32Array,
|
|
3782
3863
|
4,
|
|
3783
3864
|
obj,
|
|
3784
|
-
key,
|
|
3865
|
+
key$jscomp$0,
|
|
3785
3866
|
arrayRoot
|
|
3786
3867
|
);
|
|
3787
3868
|
case "G":
|
|
@@ -3791,7 +3872,7 @@
|
|
|
3791
3872
|
Float32Array,
|
|
3792
3873
|
4,
|
|
3793
3874
|
obj,
|
|
3794
|
-
key,
|
|
3875
|
+
key$jscomp$0,
|
|
3795
3876
|
arrayRoot
|
|
3796
3877
|
);
|
|
3797
3878
|
case "g":
|
|
@@ -3801,7 +3882,7 @@
|
|
|
3801
3882
|
Float64Array,
|
|
3802
3883
|
8,
|
|
3803
3884
|
obj,
|
|
3804
|
-
key,
|
|
3885
|
+
key$jscomp$0,
|
|
3805
3886
|
arrayRoot
|
|
3806
3887
|
);
|
|
3807
3888
|
case "M":
|
|
@@ -3811,7 +3892,7 @@
|
|
|
3811
3892
|
BigInt64Array,
|
|
3812
3893
|
8,
|
|
3813
3894
|
obj,
|
|
3814
|
-
key,
|
|
3895
|
+
key$jscomp$0,
|
|
3815
3896
|
arrayRoot
|
|
3816
3897
|
);
|
|
3817
3898
|
case "m":
|
|
@@ -3821,7 +3902,7 @@
|
|
|
3821
3902
|
BigUint64Array,
|
|
3822
3903
|
8,
|
|
3823
3904
|
obj,
|
|
3824
|
-
key,
|
|
3905
|
+
key$jscomp$0,
|
|
3825
3906
|
arrayRoot
|
|
3826
3907
|
);
|
|
3827
3908
|
case "V":
|
|
@@ -3831,13 +3912,13 @@
|
|
|
3831
3912
|
DataView,
|
|
3832
3913
|
1,
|
|
3833
3914
|
obj,
|
|
3834
|
-
key,
|
|
3915
|
+
key$jscomp$0,
|
|
3835
3916
|
arrayRoot
|
|
3836
3917
|
);
|
|
3837
3918
|
case "B":
|
|
3838
3919
|
return (
|
|
3839
3920
|
(obj = parseInt(value.slice(2), 16)),
|
|
3840
|
-
response._formData
|
|
3921
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
3841
3922
|
);
|
|
3842
3923
|
case "R":
|
|
3843
3924
|
return parseReadableStream(response, value, void 0);
|
|
@@ -3853,7 +3934,7 @@
|
|
|
3853
3934
|
response,
|
|
3854
3935
|
value,
|
|
3855
3936
|
obj,
|
|
3856
|
-
key,
|
|
3937
|
+
key$jscomp$0,
|
|
3857
3938
|
arrayRoot,
|
|
3858
3939
|
createModel
|
|
3859
3940
|
);
|
|
@@ -3872,11 +3953,20 @@
|
|
|
3872
3953
|
: new FormData(),
|
|
3873
3954
|
arraySizeLimit =
|
|
3874
3955
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
3875
|
-
chunks = new Map()
|
|
3956
|
+
chunks = new Map(),
|
|
3957
|
+
backingStore = {
|
|
3958
|
+
prefix: formFieldPrefix,
|
|
3959
|
+
referencedEntries: null,
|
|
3960
|
+
keyPointer: 0,
|
|
3961
|
+
stringChunks: null,
|
|
3962
|
+
streamChunks: null,
|
|
3963
|
+
blobs: null
|
|
3964
|
+
};
|
|
3965
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
3876
3966
|
return {
|
|
3877
3967
|
_bundlerConfig: bundlerConfig,
|
|
3878
3968
|
_prefix: formFieldPrefix,
|
|
3879
|
-
_formData:
|
|
3969
|
+
_formData: backingStore,
|
|
3880
3970
|
_chunks: chunks,
|
|
3881
3971
|
_closed: !1,
|
|
3882
3972
|
_closedReason: null,
|
|
@@ -3886,19 +3976,26 @@
|
|
|
3886
3976
|
};
|
|
3887
3977
|
}
|
|
3888
3978
|
function resolveField(response, key, value) {
|
|
3889
|
-
var
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3979
|
+
var prefix = response._prefix;
|
|
3980
|
+
if (key.startsWith(prefix)) {
|
|
3981
|
+
var chunks = response._chunks;
|
|
3982
|
+
if ("S" === key[prefix.length]) {
|
|
3983
|
+
if (
|
|
3984
|
+
key.length > prefix.length + 1 &&
|
|
3985
|
+
((prefix = +key.slice(prefix.length + 1)),
|
|
3986
|
+
(chunks = chunks.get(prefix)))
|
|
3987
|
+
) {
|
|
3988
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
3989
|
+
return;
|
|
3990
|
+
}
|
|
3991
|
+
} else if (
|
|
3992
|
+
((prefix = +key.slice(prefix.length)), (chunks = chunks.get(prefix)))
|
|
3993
|
+
) {
|
|
3994
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
3995
|
+
return;
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
appendBackingEntry(response._formData, value, key);
|
|
3902
3999
|
}
|
|
3903
4000
|
function close(response) {
|
|
3904
4001
|
reportGlobalError(response, Error("Connection closed."));
|
|
@@ -3978,6 +4075,12 @@
|
|
|
3978
4075
|
var async_hooks = require("async_hooks"),
|
|
3979
4076
|
ReactDOM = require("react-dom"),
|
|
3980
4077
|
React = require("react"),
|
|
4078
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4079
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
4080
|
+
ArrayBuffer.prototype,
|
|
4081
|
+
"detached"
|
|
4082
|
+
),
|
|
4083
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
3981
4084
|
scheduleMicrotask = queueMicrotask,
|
|
3982
4085
|
currentView = null,
|
|
3983
4086
|
writtenBytes = 0,
|
|
@@ -4419,7 +4522,6 @@
|
|
|
4419
4522
|
debugID = null,
|
|
4420
4523
|
modelRoot = !1,
|
|
4421
4524
|
emptyRoot = {},
|
|
4422
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4423
4525
|
chunkCache = new Map(),
|
|
4424
4526
|
RESPONSE_SYMBOL = Symbol();
|
|
4425
4527
|
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
@@ -4487,44 +4589,44 @@
|
|
|
4487
4589
|
};
|
|
4488
4590
|
exports.decodeAction = function (body, serverManifest) {
|
|
4489
4591
|
var formData = new FormData(),
|
|
4490
|
-
|
|
4491
|
-
seenActions = new Set();
|
|
4592
|
+
maybeActionKey = null;
|
|
4492
4593
|
body.forEach(function (value, key) {
|
|
4493
4594
|
key.startsWith("$ACTION_")
|
|
4494
4595
|
? key.startsWith("$ACTION_REF_")
|
|
4495
|
-
?
|
|
4496
|
-
|
|
4497
|
-
(value = "$ACTION_" + key.slice(12) + ":"),
|
|
4498
|
-
(value = decodeBoundActionMetaData(body, serverManifest, value)),
|
|
4499
|
-
(action = loadServerReference(serverManifest, value)))
|
|
4500
|
-
: key.startsWith("$ACTION_ID_") &&
|
|
4501
|
-
!seenActions.has(key) &&
|
|
4502
|
-
(seenActions.add(key),
|
|
4503
|
-
(value = key.slice(11)),
|
|
4504
|
-
(action = loadServerReference(serverManifest, {
|
|
4505
|
-
id: value,
|
|
4506
|
-
bound: null
|
|
4507
|
-
})))
|
|
4596
|
+
? (maybeActionKey = key)
|
|
4597
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4508
4598
|
: formData.append(key, value);
|
|
4509
4599
|
});
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4600
|
+
if (null === maybeActionKey) return null;
|
|
4601
|
+
var actionKey = maybeActionKey,
|
|
4602
|
+
action = null;
|
|
4603
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4604
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4605
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4606
|
+
(action = loadServerReference(serverManifest, body));
|
|
4607
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4608
|
+
(body = actionKey.slice(11)),
|
|
4609
|
+
(action = loadServerReference(serverManifest, {
|
|
4610
|
+
id: body,
|
|
4611
|
+
bound: null
|
|
4612
|
+
}));
|
|
4613
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4614
|
+
return action.then(function (fn) {
|
|
4615
|
+
return fn.bind(null, formData);
|
|
4616
|
+
});
|
|
4515
4617
|
};
|
|
4516
4618
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4517
4619
|
var keyPath = body.get("$ACTION_KEY");
|
|
4518
4620
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4519
|
-
var
|
|
4621
|
+
var actionKey = null;
|
|
4520
4622
|
body.forEach(function (value, key) {
|
|
4521
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4522
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4523
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4623
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4524
4624
|
});
|
|
4525
|
-
if (null ===
|
|
4526
|
-
var
|
|
4527
|
-
|
|
4625
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4626
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4627
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4628
|
+
var referenceId = body.id;
|
|
4629
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4528
4630
|
return null === bound
|
|
4529
4631
|
? null
|
|
4530
4632
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -4557,26 +4659,33 @@
|
|
|
4557
4659
|
var current = head;
|
|
4558
4660
|
if (!current.complete) return;
|
|
4559
4661
|
try {
|
|
4560
|
-
var
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4662
|
+
var key = current.name,
|
|
4663
|
+
JSCompiler_temp_const = response._formData;
|
|
4664
|
+
var handle = current.file;
|
|
4665
|
+
if ("function" === typeof File)
|
|
4666
|
+
var JSCompiler_inline_result = new File(
|
|
4667
|
+
handle.chunks,
|
|
4668
|
+
handle.filename,
|
|
4669
|
+
{ type: handle.mime }
|
|
4670
|
+
);
|
|
4671
|
+
else {
|
|
4672
|
+
var scratch = new FormData();
|
|
4673
|
+
scratch.append(
|
|
4674
|
+
"file",
|
|
4675
|
+
new Blob(handle.chunks, { type: handle.mime }),
|
|
4676
|
+
handle.filename
|
|
4677
|
+
);
|
|
4678
|
+
JSCompiler_inline_result = scratch.get("file");
|
|
4679
|
+
}
|
|
4680
|
+
appendBackingEntry(
|
|
4681
|
+
JSCompiler_temp_const,
|
|
4682
|
+
JSCompiler_inline_result,
|
|
4683
|
+
key
|
|
4684
|
+
);
|
|
4572
4685
|
var queuedFields = current.queuedFields;
|
|
4573
4686
|
if (null !== queuedFields)
|
|
4574
|
-
for (
|
|
4575
|
-
resolveField(
|
|
4576
|
-
response$jscomp$0,
|
|
4577
|
-
queuedFields[response],
|
|
4578
|
-
queuedFields[response + 1]
|
|
4579
|
-
);
|
|
4687
|
+
for (var i = 0; i < queuedFields.length; i += 2)
|
|
4688
|
+
resolveField(response, queuedFields[i], queuedFields[i + 1]);
|
|
4580
4689
|
} catch (error) {
|
|
4581
4690
|
busboyStream.destroy(error);
|
|
4582
4691
|
return;
|
|
@@ -4584,9 +4693,9 @@
|
|
|
4584
4693
|
head = current.next;
|
|
4585
4694
|
}
|
|
4586
4695
|
tail = null;
|
|
4587
|
-
bodyFinished && !closed && ((closed = !0), close(response
|
|
4696
|
+
bodyFinished && !closed && ((closed = !0), close(response));
|
|
4588
4697
|
}
|
|
4589
|
-
var response
|
|
4698
|
+
var response = createResponse(
|
|
4590
4699
|
turbopackMap,
|
|
4591
4700
|
"",
|
|
4592
4701
|
options ? options.temporaryReferences : void 0,
|
|
@@ -4603,7 +4712,7 @@
|
|
|
4603
4712
|
tail.queuedFields.push(name, value);
|
|
4604
4713
|
else
|
|
4605
4714
|
try {
|
|
4606
|
-
resolveField(response
|
|
4715
|
+
resolveField(response, name, value);
|
|
4607
4716
|
} catch (error) {
|
|
4608
4717
|
busboyStream.destroy(error);
|
|
4609
4718
|
}
|
|
@@ -4649,14 +4758,14 @@
|
|
|
4649
4758
|
flush();
|
|
4650
4759
|
closed ||
|
|
4651
4760
|
reportGlobalError(
|
|
4652
|
-
response
|
|
4761
|
+
response,
|
|
4653
4762
|
Error("Reply finished with incomplete file part.")
|
|
4654
4763
|
);
|
|
4655
4764
|
});
|
|
4656
4765
|
busboyStream.on("error", function (err) {
|
|
4657
|
-
reportGlobalError(response
|
|
4766
|
+
reportGlobalError(response, err);
|
|
4658
4767
|
});
|
|
4659
|
-
return getChunk(response
|
|
4768
|
+
return getChunk(response, 0);
|
|
4660
4769
|
};
|
|
4661
4770
|
exports.registerClientReference = function (
|
|
4662
4771
|
proxyImplementation,
|