react-server-dom-turbopack 19.0.7 → 19.0.9
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 +66 -47
- package/cjs/react-server-dom-turbopack-client.browser.production.js +84 -62
- package/cjs/react-server-dom-turbopack-client.edge.development.js +74 -47
- package/cjs/react-server-dom-turbopack-client.edge.production.js +94 -64
- package/cjs/react-server-dom-turbopack-client.node.development.js +74 -47
- package/cjs/react-server-dom-turbopack-client.node.production.js +94 -64
- 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 +213 -122
- package/cjs/react-server-dom-turbopack-server.edge.production.js +210 -119
- 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
|
@@ -60,33 +60,44 @@
|
|
|
60
60
|
(currentView = new Uint8Array(2048)),
|
|
61
61
|
(writtenBytes = 0));
|
|
62
62
|
}
|
|
63
|
-
} else
|
|
64
|
-
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
(currentView
|
|
89
|
-
(
|
|
63
|
+
} else if (0 === chunk.byteLength)
|
|
64
|
+
if (supportsArrayBufferDetached) {
|
|
65
|
+
if (chunk.buffer.detached)
|
|
66
|
+
throw Error(
|
|
67
|
+
"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()`."
|
|
68
|
+
);
|
|
69
|
+
} else
|
|
70
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
71
|
+
(console.error(
|
|
72
|
+
"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."
|
|
73
|
+
),
|
|
74
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
75
|
+
else
|
|
76
|
+
2048 < chunk.byteLength
|
|
77
|
+
? (0 < writtenBytes &&
|
|
78
|
+
(writeToDestination(
|
|
79
|
+
destination,
|
|
80
|
+
currentView.subarray(0, writtenBytes)
|
|
81
|
+
),
|
|
82
|
+
(currentView = new Uint8Array(2048)),
|
|
83
|
+
(writtenBytes = 0)),
|
|
84
|
+
writeToDestination(destination, chunk))
|
|
85
|
+
: ((target = currentView.length - writtenBytes),
|
|
86
|
+
target < chunk.byteLength &&
|
|
87
|
+
(0 === target
|
|
88
|
+
? writeToDestination(destination, currentView)
|
|
89
|
+
: (currentView.set(chunk.subarray(0, target), writtenBytes),
|
|
90
|
+
(writtenBytes += target),
|
|
91
|
+
writeToDestination(destination, currentView),
|
|
92
|
+
(chunk = chunk.subarray(target))),
|
|
93
|
+
(currentView = new Uint8Array(2048)),
|
|
94
|
+
(writtenBytes = 0)),
|
|
95
|
+
currentView.set(chunk, writtenBytes),
|
|
96
|
+
(writtenBytes += chunk.byteLength),
|
|
97
|
+
2048 === writtenBytes &&
|
|
98
|
+
(writeToDestination(destination, currentView),
|
|
99
|
+
(currentView = new Uint8Array(2048)),
|
|
100
|
+
(writtenBytes = 0)));
|
|
90
101
|
return destinationHasCapacity;
|
|
91
102
|
}
|
|
92
103
|
function byteLengthOfChunk(chunk) {
|
|
@@ -854,7 +865,7 @@
|
|
|
854
865
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
855
866
|
enqueueFlush(request);
|
|
856
867
|
"function" === typeof iterator.throw &&
|
|
857
|
-
iterator.throw(reason).then(
|
|
868
|
+
iterator.throw(reason).then(noop, noop);
|
|
858
869
|
}
|
|
859
870
|
}
|
|
860
871
|
function abortIterable(reason) {
|
|
@@ -865,7 +876,7 @@
|
|
|
865
876
|
emitErrorChunk(request, streamTask.id, digest, reason);
|
|
866
877
|
enqueueFlush(request);
|
|
867
878
|
"function" === typeof iterator.throw &&
|
|
868
|
-
iterator.throw(reason).then(
|
|
879
|
+
iterator.throw(reason).then(noop, noop);
|
|
869
880
|
}
|
|
870
881
|
}
|
|
871
882
|
var isIterator = iterable === iterator,
|
|
@@ -1922,13 +1933,35 @@
|
|
|
1922
1933
|
}
|
|
1923
1934
|
function emitTypedArrayChunk(request, id, tag, typedArray) {
|
|
1924
1935
|
request.pendingChunks++;
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1936
|
+
a: {
|
|
1937
|
+
var view = new Uint8Array(
|
|
1938
|
+
typedArray.buffer,
|
|
1939
|
+
typedArray.byteOffset,
|
|
1940
|
+
typedArray.byteLength
|
|
1941
|
+
);
|
|
1942
|
+
if (2048 < typedArray.byteLength) {
|
|
1943
|
+
if (
|
|
1944
|
+
0 !== typedArray.byteOffset ||
|
|
1945
|
+
typedArray.byteLength !== typedArray.buffer.byteLength ||
|
|
1946
|
+
typedArray.buffer.resizable
|
|
1947
|
+
) {
|
|
1948
|
+
typedArray = view.slice();
|
|
1949
|
+
break a;
|
|
1950
|
+
}
|
|
1951
|
+
if (!supportsArrayBufferDetached) {
|
|
1952
|
+
didWarnAboutMissingArrayBufferDetached ||
|
|
1953
|
+
(console.error(
|
|
1954
|
+
"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."
|
|
1955
|
+
),
|
|
1956
|
+
(didWarnAboutMissingArrayBufferDetached = !0));
|
|
1957
|
+
typedArray = view.slice();
|
|
1958
|
+
break a;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
typedArray = view;
|
|
1962
|
+
}
|
|
1963
|
+
view = typedArray.byteLength;
|
|
1964
|
+
id = id.toString(16) + ":" + tag + view.toString(16) + ",";
|
|
1932
1965
|
request.completedRegularChunks.push(id, typedArray);
|
|
1933
1966
|
}
|
|
1934
1967
|
function emitTextChunk(request, id, text) {
|
|
@@ -2559,6 +2592,39 @@
|
|
|
2559
2592
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
2560
2593
|
return moduleExports[metadata[2]];
|
|
2561
2594
|
}
|
|
2595
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
2596
|
+
var prefix = backingStore.prefix;
|
|
2597
|
+
if (key.startsWith(prefix)) {
|
|
2598
|
+
switch (key[prefix.length]) {
|
|
2599
|
+
case "_":
|
|
2600
|
+
prefix = backingStore.referencedEntries;
|
|
2601
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
2602
|
+
prefix.push([key, value]);
|
|
2603
|
+
return;
|
|
2604
|
+
case "S":
|
|
2605
|
+
"string" === typeof value &&
|
|
2606
|
+
((prefix = backingStore.streamChunks),
|
|
2607
|
+
null === prefix &&
|
|
2608
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
2609
|
+
(backingStore = prefix.get(key)),
|
|
2610
|
+
void 0 === backingStore
|
|
2611
|
+
? prefix.set(key, [value])
|
|
2612
|
+
: backingStore.push(value));
|
|
2613
|
+
return;
|
|
2614
|
+
}
|
|
2615
|
+
"string" === typeof value
|
|
2616
|
+
? ((prefix = backingStore.stringChunks),
|
|
2617
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
2618
|
+
prefix.set(key, value))
|
|
2619
|
+
: ((prefix = backingStore.blobs),
|
|
2620
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
2621
|
+
prefix.set(key, value));
|
|
2622
|
+
}
|
|
2623
|
+
}
|
|
2624
|
+
function getBackingBlob(backingStore, key) {
|
|
2625
|
+
backingStore = backingStore.blobs;
|
|
2626
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
2627
|
+
}
|
|
2562
2628
|
function ReactPromise(status, value, reason) {
|
|
2563
2629
|
this.status = status;
|
|
2564
2630
|
this.value = value;
|
|
@@ -2868,17 +2934,20 @@
|
|
|
2868
2934
|
function getChunk(response, id) {
|
|
2869
2935
|
var chunks = response._chunks,
|
|
2870
2936
|
chunk = chunks.get(id);
|
|
2871
|
-
chunk
|
|
2872
|
-
|
|
2873
|
-
|
|
2937
|
+
if (!chunk) {
|
|
2938
|
+
chunk = response._prefix;
|
|
2939
|
+
var stringChunks = response._formData.stringChunks;
|
|
2940
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
2941
|
+
chunk =
|
|
2874
2942
|
"string" === typeof chunk
|
|
2875
2943
|
? new ReactPromise(
|
|
2876
2944
|
"resolved_model",
|
|
2877
2945
|
chunk,
|
|
2878
2946
|
_defineProperty({ id: id }, RESPONSE_SYMBOL, response)
|
|
2879
2947
|
)
|
|
2880
|
-
: new ReactPromise("pending", null, null)
|
|
2881
|
-
chunks.set(id, chunk)
|
|
2948
|
+
: new ReactPromise("pending", null, null);
|
|
2949
|
+
chunks.set(id, chunk);
|
|
2950
|
+
}
|
|
2882
2951
|
return chunk;
|
|
2883
2952
|
}
|
|
2884
2953
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -3125,7 +3194,7 @@
|
|
|
3125
3194
|
Error("Already initialized typed array.")
|
|
3126
3195
|
)
|
|
3127
3196
|
);
|
|
3128
|
-
reference = response._formData
|
|
3197
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
3129
3198
|
if (initializingHandler) {
|
|
3130
3199
|
var handler = initializingHandler;
|
|
3131
3200
|
handler.deps++;
|
|
@@ -3169,15 +3238,17 @@
|
|
|
3169
3238
|
var chunks = response._chunks;
|
|
3170
3239
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
3171
3240
|
chunks.set(id, stream);
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3241
|
+
chunks = response._prefix;
|
|
3242
|
+
response = response._formData.streamChunks;
|
|
3243
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
3244
|
+
if (void 0 !== id)
|
|
3245
|
+
for (response = 0; response < id.length; response++)
|
|
3246
|
+
(chunks = id[response]),
|
|
3247
|
+
"C" === chunks[0]
|
|
3177
3248
|
? controller.close(
|
|
3178
3249
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
3179
3250
|
)
|
|
3180
|
-
: controller.enqueueModel(chunks)
|
|
3251
|
+
: controller.enqueueModel(chunks);
|
|
3181
3252
|
}
|
|
3182
3253
|
function parseReadableStream(response, reference, type) {
|
|
3183
3254
|
function enqueue(value) {
|
|
@@ -3341,7 +3412,14 @@
|
|
|
3341
3412
|
});
|
|
3342
3413
|
return iterator;
|
|
3343
3414
|
}
|
|
3344
|
-
function parseModelString(
|
|
3415
|
+
function parseModelString(
|
|
3416
|
+
response,
|
|
3417
|
+
obj,
|
|
3418
|
+
key$jscomp$0,
|
|
3419
|
+
value,
|
|
3420
|
+
reference,
|
|
3421
|
+
arrayRoot
|
|
3422
|
+
) {
|
|
3345
3423
|
if ("$" === value[0]) {
|
|
3346
3424
|
switch (value[1]) {
|
|
3347
3425
|
case "$":
|
|
@@ -3361,7 +3439,7 @@
|
|
|
3361
3439
|
response,
|
|
3362
3440
|
arrayRoot,
|
|
3363
3441
|
obj,
|
|
3364
|
-
key,
|
|
3442
|
+
key$jscomp$0,
|
|
3365
3443
|
null,
|
|
3366
3444
|
loadServerReference$1
|
|
3367
3445
|
)
|
|
@@ -3381,41 +3459,44 @@
|
|
|
3381
3459
|
case "Q":
|
|
3382
3460
|
return (
|
|
3383
3461
|
(arrayRoot = value.slice(2)),
|
|
3384
|
-
getOutlinedModel(
|
|
3462
|
+
getOutlinedModel(
|
|
3463
|
+
response,
|
|
3464
|
+
arrayRoot,
|
|
3465
|
+
obj,
|
|
3466
|
+
key$jscomp$0,
|
|
3467
|
+
null,
|
|
3468
|
+
createMap
|
|
3469
|
+
)
|
|
3385
3470
|
);
|
|
3386
3471
|
case "W":
|
|
3387
3472
|
return (
|
|
3388
3473
|
(arrayRoot = value.slice(2)),
|
|
3389
|
-
getOutlinedModel(
|
|
3474
|
+
getOutlinedModel(
|
|
3475
|
+
response,
|
|
3476
|
+
arrayRoot,
|
|
3477
|
+
obj,
|
|
3478
|
+
key$jscomp$0,
|
|
3479
|
+
null,
|
|
3480
|
+
createSet
|
|
3481
|
+
)
|
|
3390
3482
|
);
|
|
3391
3483
|
case "K":
|
|
3392
|
-
key = value.slice(2);
|
|
3393
|
-
obj = response.
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
(
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
for (
|
|
3407
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
3408
|
-
i < reference.length;
|
|
3409
|
-
i++
|
|
3410
|
-
)
|
|
3411
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
3412
|
-
reference = response;
|
|
3413
|
-
reference.data.delete(value);
|
|
3414
|
-
reference.keyPointer++;
|
|
3415
|
-
} else if (value.startsWith(obj)) break;
|
|
3416
|
-
else response.keyPointer++;
|
|
3484
|
+
key$jscomp$0 = value.slice(2);
|
|
3485
|
+
obj = response._formData;
|
|
3486
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
3487
|
+
key$jscomp$0 = new FormData();
|
|
3488
|
+
arrayRoot = obj.referencedEntries;
|
|
3489
|
+
if (null !== arrayRoot) {
|
|
3490
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
3491
|
+
reference = arrayRoot[value];
|
|
3492
|
+
var key = reference[0];
|
|
3493
|
+
if (!key.startsWith(response)) break;
|
|
3494
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
3495
|
+
value++;
|
|
3496
|
+
}
|
|
3497
|
+
obj.keyPointer = value;
|
|
3417
3498
|
}
|
|
3418
|
-
return
|
|
3499
|
+
return key$jscomp$0;
|
|
3419
3500
|
case "i":
|
|
3420
3501
|
return (
|
|
3421
3502
|
(arrayRoot = value.slice(2)),
|
|
@@ -3423,7 +3504,7 @@
|
|
|
3423
3504
|
response,
|
|
3424
3505
|
arrayRoot,
|
|
3425
3506
|
obj,
|
|
3426
|
-
key,
|
|
3507
|
+
key$jscomp$0,
|
|
3427
3508
|
null,
|
|
3428
3509
|
extractIterator
|
|
3429
3510
|
)
|
|
@@ -3460,7 +3541,7 @@
|
|
|
3460
3541
|
ArrayBuffer,
|
|
3461
3542
|
1,
|
|
3462
3543
|
obj,
|
|
3463
|
-
key,
|
|
3544
|
+
key$jscomp$0,
|
|
3464
3545
|
arrayRoot
|
|
3465
3546
|
);
|
|
3466
3547
|
case "O":
|
|
@@ -3470,7 +3551,7 @@
|
|
|
3470
3551
|
Int8Array,
|
|
3471
3552
|
1,
|
|
3472
3553
|
obj,
|
|
3473
|
-
key,
|
|
3554
|
+
key$jscomp$0,
|
|
3474
3555
|
arrayRoot
|
|
3475
3556
|
);
|
|
3476
3557
|
case "o":
|
|
@@ -3480,7 +3561,7 @@
|
|
|
3480
3561
|
Uint8Array,
|
|
3481
3562
|
1,
|
|
3482
3563
|
obj,
|
|
3483
|
-
key,
|
|
3564
|
+
key$jscomp$0,
|
|
3484
3565
|
arrayRoot
|
|
3485
3566
|
);
|
|
3486
3567
|
case "U":
|
|
@@ -3490,7 +3571,7 @@
|
|
|
3490
3571
|
Uint8ClampedArray,
|
|
3491
3572
|
1,
|
|
3492
3573
|
obj,
|
|
3493
|
-
key,
|
|
3574
|
+
key$jscomp$0,
|
|
3494
3575
|
arrayRoot
|
|
3495
3576
|
);
|
|
3496
3577
|
case "S":
|
|
@@ -3500,7 +3581,7 @@
|
|
|
3500
3581
|
Int16Array,
|
|
3501
3582
|
2,
|
|
3502
3583
|
obj,
|
|
3503
|
-
key,
|
|
3584
|
+
key$jscomp$0,
|
|
3504
3585
|
arrayRoot
|
|
3505
3586
|
);
|
|
3506
3587
|
case "s":
|
|
@@ -3510,7 +3591,7 @@
|
|
|
3510
3591
|
Uint16Array,
|
|
3511
3592
|
2,
|
|
3512
3593
|
obj,
|
|
3513
|
-
key,
|
|
3594
|
+
key$jscomp$0,
|
|
3514
3595
|
arrayRoot
|
|
3515
3596
|
);
|
|
3516
3597
|
case "L":
|
|
@@ -3520,7 +3601,7 @@
|
|
|
3520
3601
|
Int32Array,
|
|
3521
3602
|
4,
|
|
3522
3603
|
obj,
|
|
3523
|
-
key,
|
|
3604
|
+
key$jscomp$0,
|
|
3524
3605
|
arrayRoot
|
|
3525
3606
|
);
|
|
3526
3607
|
case "l":
|
|
@@ -3530,7 +3611,7 @@
|
|
|
3530
3611
|
Uint32Array,
|
|
3531
3612
|
4,
|
|
3532
3613
|
obj,
|
|
3533
|
-
key,
|
|
3614
|
+
key$jscomp$0,
|
|
3534
3615
|
arrayRoot
|
|
3535
3616
|
);
|
|
3536
3617
|
case "G":
|
|
@@ -3540,7 +3621,7 @@
|
|
|
3540
3621
|
Float32Array,
|
|
3541
3622
|
4,
|
|
3542
3623
|
obj,
|
|
3543
|
-
key,
|
|
3624
|
+
key$jscomp$0,
|
|
3544
3625
|
arrayRoot
|
|
3545
3626
|
);
|
|
3546
3627
|
case "g":
|
|
@@ -3550,7 +3631,7 @@
|
|
|
3550
3631
|
Float64Array,
|
|
3551
3632
|
8,
|
|
3552
3633
|
obj,
|
|
3553
|
-
key,
|
|
3634
|
+
key$jscomp$0,
|
|
3554
3635
|
arrayRoot
|
|
3555
3636
|
);
|
|
3556
3637
|
case "M":
|
|
@@ -3560,7 +3641,7 @@
|
|
|
3560
3641
|
BigInt64Array,
|
|
3561
3642
|
8,
|
|
3562
3643
|
obj,
|
|
3563
|
-
key,
|
|
3644
|
+
key$jscomp$0,
|
|
3564
3645
|
arrayRoot
|
|
3565
3646
|
);
|
|
3566
3647
|
case "m":
|
|
@@ -3570,7 +3651,7 @@
|
|
|
3570
3651
|
BigUint64Array,
|
|
3571
3652
|
8,
|
|
3572
3653
|
obj,
|
|
3573
|
-
key,
|
|
3654
|
+
key$jscomp$0,
|
|
3574
3655
|
arrayRoot
|
|
3575
3656
|
);
|
|
3576
3657
|
case "V":
|
|
@@ -3580,13 +3661,13 @@
|
|
|
3580
3661
|
DataView,
|
|
3581
3662
|
1,
|
|
3582
3663
|
obj,
|
|
3583
|
-
key,
|
|
3664
|
+
key$jscomp$0,
|
|
3584
3665
|
arrayRoot
|
|
3585
3666
|
);
|
|
3586
3667
|
case "B":
|
|
3587
3668
|
return (
|
|
3588
3669
|
(obj = parseInt(value.slice(2), 16)),
|
|
3589
|
-
response._formData
|
|
3670
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
3590
3671
|
);
|
|
3591
3672
|
}
|
|
3592
3673
|
switch (value[1]) {
|
|
@@ -3604,7 +3685,7 @@
|
|
|
3604
3685
|
response,
|
|
3605
3686
|
value,
|
|
3606
3687
|
obj,
|
|
3607
|
-
key,
|
|
3688
|
+
key$jscomp$0,
|
|
3608
3689
|
arrayRoot,
|
|
3609
3690
|
createModel
|
|
3610
3691
|
);
|
|
@@ -3623,11 +3704,20 @@
|
|
|
3623
3704
|
: new FormData(),
|
|
3624
3705
|
arraySizeLimit =
|
|
3625
3706
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
3626
|
-
chunks = new Map()
|
|
3707
|
+
chunks = new Map(),
|
|
3708
|
+
backingStore = {
|
|
3709
|
+
prefix: formFieldPrefix,
|
|
3710
|
+
referencedEntries: null,
|
|
3711
|
+
keyPointer: 0,
|
|
3712
|
+
stringChunks: null,
|
|
3713
|
+
streamChunks: null,
|
|
3714
|
+
blobs: null
|
|
3715
|
+
};
|
|
3716
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
3627
3717
|
return {
|
|
3628
3718
|
_bundlerConfig: bundlerConfig,
|
|
3629
3719
|
_prefix: formFieldPrefix,
|
|
3630
|
-
_formData:
|
|
3720
|
+
_formData: backingStore,
|
|
3631
3721
|
_chunks: chunks,
|
|
3632
3722
|
_temporaryReferences: temporaryReferences,
|
|
3633
3723
|
_rootArrayContexts: new WeakMap(),
|
|
@@ -3635,19 +3725,26 @@
|
|
|
3635
3725
|
};
|
|
3636
3726
|
}
|
|
3637
3727
|
function resolveField(response, key, value) {
|
|
3638
|
-
var
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3728
|
+
var prefix = response._prefix;
|
|
3729
|
+
if (key.startsWith(prefix)) {
|
|
3730
|
+
var chunks = response._chunks;
|
|
3731
|
+
if ("S" === key[prefix.length]) {
|
|
3732
|
+
if (
|
|
3733
|
+
key.length > prefix.length + 1 &&
|
|
3734
|
+
((prefix = +key.slice(prefix.length + 1)),
|
|
3735
|
+
(chunks = chunks.get(prefix)))
|
|
3736
|
+
) {
|
|
3737
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
3738
|
+
return;
|
|
3739
|
+
}
|
|
3740
|
+
} else if (
|
|
3741
|
+
((prefix = +key.slice(prefix.length)), (chunks = chunks.get(prefix)))
|
|
3742
|
+
) {
|
|
3743
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
3744
|
+
return;
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
appendBackingEntry(response._formData, value, key);
|
|
3651
3748
|
}
|
|
3652
3749
|
function close(response) {
|
|
3653
3750
|
reportGlobalError(response, Error("Connection closed."));
|
|
@@ -3713,6 +3810,12 @@
|
|
|
3713
3810
|
var async_hooks = require("async_hooks"),
|
|
3714
3811
|
ReactDOM = require("react-dom"),
|
|
3715
3812
|
React = require("react"),
|
|
3813
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
3814
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
3815
|
+
ArrayBuffer.prototype,
|
|
3816
|
+
"detached"
|
|
3817
|
+
),
|
|
3818
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
3716
3819
|
scheduleMicrotask = queueMicrotask,
|
|
3717
3820
|
currentView = null,
|
|
3718
3821
|
writtenBytes = 0,
|
|
@@ -4134,7 +4237,6 @@
|
|
|
4134
4237
|
debugID = null,
|
|
4135
4238
|
modelRoot = !1,
|
|
4136
4239
|
emptyRoot = {},
|
|
4137
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4138
4240
|
chunkCache = new Map(),
|
|
4139
4241
|
RESPONSE_SYMBOL = Symbol();
|
|
4140
4242
|
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
@@ -4202,44 +4304,44 @@
|
|
|
4202
4304
|
};
|
|
4203
4305
|
exports.decodeAction = function (body, serverManifest) {
|
|
4204
4306
|
var formData = new FormData(),
|
|
4205
|
-
|
|
4206
|
-
seenActions = new Set();
|
|
4307
|
+
maybeActionKey = null;
|
|
4207
4308
|
body.forEach(function (value, key) {
|
|
4208
4309
|
key.startsWith("$ACTION_")
|
|
4209
4310
|
? 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
|
-
})))
|
|
4311
|
+
? (maybeActionKey = key)
|
|
4312
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4223
4313
|
: formData.append(key, value);
|
|
4224
4314
|
});
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4315
|
+
if (null === maybeActionKey) return null;
|
|
4316
|
+
var actionKey = maybeActionKey,
|
|
4317
|
+
action = null;
|
|
4318
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4319
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4320
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4321
|
+
(action = loadServerReference(serverManifest, body));
|
|
4322
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4323
|
+
(body = actionKey.slice(11)),
|
|
4324
|
+
(action = loadServerReference(serverManifest, {
|
|
4325
|
+
id: body,
|
|
4326
|
+
bound: null
|
|
4327
|
+
}));
|
|
4328
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4329
|
+
return action.then(function (fn) {
|
|
4330
|
+
return fn.bind(null, formData);
|
|
4331
|
+
});
|
|
4230
4332
|
};
|
|
4231
4333
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4232
4334
|
var keyPath = body.get("$ACTION_KEY");
|
|
4233
4335
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4234
|
-
var
|
|
4336
|
+
var actionKey = null;
|
|
4235
4337
|
body.forEach(function (value, key) {
|
|
4236
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4237
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4238
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4338
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4239
4339
|
});
|
|
4240
|
-
if (null ===
|
|
4241
|
-
var
|
|
4242
|
-
|
|
4340
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4341
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4342
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4343
|
+
var referenceId = body.id;
|
|
4344
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4243
4345
|
return null === bound
|
|
4244
4346
|
? null
|
|
4245
4347
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -4272,26 +4374,33 @@
|
|
|
4272
4374
|
var current = head;
|
|
4273
4375
|
if (!current.complete) return;
|
|
4274
4376
|
try {
|
|
4275
|
-
var
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4377
|
+
var key = current.name,
|
|
4378
|
+
JSCompiler_temp_const = response._formData;
|
|
4379
|
+
var handle = current.file;
|
|
4380
|
+
if ("function" === typeof File)
|
|
4381
|
+
var JSCompiler_inline_result = new File(
|
|
4382
|
+
handle.chunks,
|
|
4383
|
+
handle.filename,
|
|
4384
|
+
{ type: handle.mime }
|
|
4385
|
+
);
|
|
4386
|
+
else {
|
|
4387
|
+
var scratch = new FormData();
|
|
4388
|
+
scratch.append(
|
|
4389
|
+
"file",
|
|
4390
|
+
new Blob(handle.chunks, { type: handle.mime }),
|
|
4391
|
+
handle.filename
|
|
4392
|
+
);
|
|
4393
|
+
JSCompiler_inline_result = scratch.get("file");
|
|
4394
|
+
}
|
|
4395
|
+
appendBackingEntry(
|
|
4396
|
+
JSCompiler_temp_const,
|
|
4397
|
+
JSCompiler_inline_result,
|
|
4398
|
+
key
|
|
4399
|
+
);
|
|
4287
4400
|
var queuedFields = current.queuedFields;
|
|
4288
4401
|
if (null !== queuedFields)
|
|
4289
|
-
for (
|
|
4290
|
-
resolveField(
|
|
4291
|
-
response$jscomp$0,
|
|
4292
|
-
queuedFields[response],
|
|
4293
|
-
queuedFields[response + 1]
|
|
4294
|
-
);
|
|
4402
|
+
for (var i = 0; i < queuedFields.length; i += 2)
|
|
4403
|
+
resolveField(response, queuedFields[i], queuedFields[i + 1]);
|
|
4295
4404
|
} catch (error) {
|
|
4296
4405
|
busboyStream.destroy(error);
|
|
4297
4406
|
return;
|
|
@@ -4299,9 +4408,9 @@
|
|
|
4299
4408
|
head = current.next;
|
|
4300
4409
|
}
|
|
4301
4410
|
tail = null;
|
|
4302
|
-
bodyFinished && !closed && ((closed = !0), close(response
|
|
4411
|
+
bodyFinished && !closed && ((closed = !0), close(response));
|
|
4303
4412
|
}
|
|
4304
|
-
var response
|
|
4413
|
+
var response = createResponse(
|
|
4305
4414
|
turbopackMap,
|
|
4306
4415
|
"",
|
|
4307
4416
|
options ? options.temporaryReferences : void 0,
|
|
@@ -4318,7 +4427,7 @@
|
|
|
4318
4427
|
tail.queuedFields.push(name, value);
|
|
4319
4428
|
else
|
|
4320
4429
|
try {
|
|
4321
|
-
resolveField(response
|
|
4430
|
+
resolveField(response, name, value);
|
|
4322
4431
|
} catch (error) {
|
|
4323
4432
|
busboyStream.destroy(error);
|
|
4324
4433
|
}
|
|
@@ -4364,14 +4473,14 @@
|
|
|
4364
4473
|
flush();
|
|
4365
4474
|
closed ||
|
|
4366
4475
|
reportGlobalError(
|
|
4367
|
-
response
|
|
4476
|
+
response,
|
|
4368
4477
|
Error("Reply finished with incomplete file part.")
|
|
4369
4478
|
);
|
|
4370
4479
|
});
|
|
4371
4480
|
busboyStream.on("error", function (err) {
|
|
4372
|
-
reportGlobalError(response
|
|
4481
|
+
reportGlobalError(response, err);
|
|
4373
4482
|
});
|
|
4374
|
-
return getChunk(response
|
|
4483
|
+
return getChunk(response, 0);
|
|
4375
4484
|
};
|
|
4376
4485
|
exports.registerClientReference = function (
|
|
4377
4486
|
proxyImplementation,
|