react-server-dom-webpack 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-webpack-client.browser.development.js +66 -47
- package/cjs/react-server-dom-webpack-client.browser.production.js +84 -62
- package/cjs/react-server-dom-webpack-client.edge.development.js +74 -47
- package/cjs/react-server-dom-webpack-client.edge.production.js +94 -64
- package/cjs/react-server-dom-webpack-client.node.development.js +74 -47
- package/cjs/react-server-dom-webpack-client.node.production.js +94 -64
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +74 -47
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +94 -64
- package/cjs/react-server-dom-webpack-server.browser.development.js +214 -123
- package/cjs/react-server-dom-webpack-server.browser.production.js +209 -118
- package/cjs/react-server-dom-webpack-server.edge.development.js +213 -122
- package/cjs/react-server-dom-webpack-server.edge.production.js +210 -119
- package/cjs/react-server-dom-webpack-server.node.development.js +270 -161
- package/cjs/react-server-dom-webpack-server.node.production.js +259 -154
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +270 -161
- package/cjs/react-server-dom-webpack-server.node.unbundled.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) {
|
|
@@ -2562,6 +2595,39 @@
|
|
|
2562
2595
|
if (hasOwnProperty.call(moduleExports, metadata[2]))
|
|
2563
2596
|
return moduleExports[metadata[2]];
|
|
2564
2597
|
}
|
|
2598
|
+
function appendBackingEntry(backingStore, value, key) {
|
|
2599
|
+
var prefix = backingStore.prefix;
|
|
2600
|
+
if (key.startsWith(prefix)) {
|
|
2601
|
+
switch (key[prefix.length]) {
|
|
2602
|
+
case "_":
|
|
2603
|
+
prefix = backingStore.referencedEntries;
|
|
2604
|
+
null === prefix && (prefix = backingStore.referencedEntries = []);
|
|
2605
|
+
prefix.push([key, value]);
|
|
2606
|
+
return;
|
|
2607
|
+
case "S":
|
|
2608
|
+
"string" === typeof value &&
|
|
2609
|
+
((prefix = backingStore.streamChunks),
|
|
2610
|
+
null === prefix &&
|
|
2611
|
+
(prefix = backingStore.streamChunks = new Map()),
|
|
2612
|
+
(backingStore = prefix.get(key)),
|
|
2613
|
+
void 0 === backingStore
|
|
2614
|
+
? prefix.set(key, [value])
|
|
2615
|
+
: backingStore.push(value));
|
|
2616
|
+
return;
|
|
2617
|
+
}
|
|
2618
|
+
"string" === typeof value
|
|
2619
|
+
? ((prefix = backingStore.stringChunks),
|
|
2620
|
+
null === prefix && (prefix = backingStore.stringChunks = new Map()),
|
|
2621
|
+
prefix.set(key, value))
|
|
2622
|
+
: ((prefix = backingStore.blobs),
|
|
2623
|
+
null === prefix && (prefix = backingStore.blobs = new Map()),
|
|
2624
|
+
prefix.set(key, value));
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
function getBackingBlob(backingStore, key) {
|
|
2628
|
+
backingStore = backingStore.blobs;
|
|
2629
|
+
return null === backingStore ? void 0 : backingStore.get(key);
|
|
2630
|
+
}
|
|
2565
2631
|
function ReactPromise(status, value, reason) {
|
|
2566
2632
|
this.status = status;
|
|
2567
2633
|
this.value = value;
|
|
@@ -2871,17 +2937,20 @@
|
|
|
2871
2937
|
function getChunk(response, id) {
|
|
2872
2938
|
var chunks = response._chunks,
|
|
2873
2939
|
chunk = chunks.get(id);
|
|
2874
|
-
chunk
|
|
2875
|
-
|
|
2876
|
-
|
|
2940
|
+
if (!chunk) {
|
|
2941
|
+
chunk = response._prefix;
|
|
2942
|
+
var stringChunks = response._formData.stringChunks;
|
|
2943
|
+
chunk = null === stringChunks ? void 0 : stringChunks.get(chunk + id);
|
|
2944
|
+
chunk =
|
|
2877
2945
|
"string" === typeof chunk
|
|
2878
2946
|
? new ReactPromise(
|
|
2879
2947
|
"resolved_model",
|
|
2880
2948
|
chunk,
|
|
2881
2949
|
_defineProperty({ id: id }, RESPONSE_SYMBOL, response)
|
|
2882
2950
|
)
|
|
2883
|
-
: new ReactPromise("pending", null, null)
|
|
2884
|
-
chunks.set(id, chunk)
|
|
2951
|
+
: new ReactPromise("pending", null, null);
|
|
2952
|
+
chunks.set(id, chunk);
|
|
2953
|
+
}
|
|
2885
2954
|
return chunk;
|
|
2886
2955
|
}
|
|
2887
2956
|
function fulfillReference(response, reference, value, arrayRoot) {
|
|
@@ -3128,7 +3197,7 @@
|
|
|
3128
3197
|
Error("Already initialized typed array.")
|
|
3129
3198
|
)
|
|
3130
3199
|
);
|
|
3131
|
-
reference = response._formData
|
|
3200
|
+
reference = getBackingBlob(response._formData, key).arrayBuffer();
|
|
3132
3201
|
if (initializingHandler) {
|
|
3133
3202
|
var handler = initializingHandler;
|
|
3134
3203
|
handler.deps++;
|
|
@@ -3172,15 +3241,17 @@
|
|
|
3172
3241
|
var chunks = response._chunks;
|
|
3173
3242
|
stream = new ReactPromise("fulfilled", stream, controller);
|
|
3174
3243
|
chunks.set(id, stream);
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3244
|
+
chunks = response._prefix;
|
|
3245
|
+
response = response._formData.streamChunks;
|
|
3246
|
+
id = null === response ? void 0 : response.get(chunks + "S" + id);
|
|
3247
|
+
if (void 0 !== id)
|
|
3248
|
+
for (response = 0; response < id.length; response++)
|
|
3249
|
+
(chunks = id[response]),
|
|
3250
|
+
"C" === chunks[0]
|
|
3180
3251
|
? controller.close(
|
|
3181
3252
|
"C" === chunks ? '"$undefined"' : chunks.slice(1)
|
|
3182
3253
|
)
|
|
3183
|
-
: controller.enqueueModel(chunks)
|
|
3254
|
+
: controller.enqueueModel(chunks);
|
|
3184
3255
|
}
|
|
3185
3256
|
function parseReadableStream(response, reference, type) {
|
|
3186
3257
|
function enqueue(value) {
|
|
@@ -3344,7 +3415,14 @@
|
|
|
3344
3415
|
});
|
|
3345
3416
|
return iterator;
|
|
3346
3417
|
}
|
|
3347
|
-
function parseModelString(
|
|
3418
|
+
function parseModelString(
|
|
3419
|
+
response,
|
|
3420
|
+
obj,
|
|
3421
|
+
key$jscomp$0,
|
|
3422
|
+
value,
|
|
3423
|
+
reference,
|
|
3424
|
+
arrayRoot
|
|
3425
|
+
) {
|
|
3348
3426
|
if ("$" === value[0]) {
|
|
3349
3427
|
switch (value[1]) {
|
|
3350
3428
|
case "$":
|
|
@@ -3364,7 +3442,7 @@
|
|
|
3364
3442
|
response,
|
|
3365
3443
|
arrayRoot,
|
|
3366
3444
|
obj,
|
|
3367
|
-
key,
|
|
3445
|
+
key$jscomp$0,
|
|
3368
3446
|
null,
|
|
3369
3447
|
loadServerReference$1
|
|
3370
3448
|
)
|
|
@@ -3384,41 +3462,44 @@
|
|
|
3384
3462
|
case "Q":
|
|
3385
3463
|
return (
|
|
3386
3464
|
(arrayRoot = value.slice(2)),
|
|
3387
|
-
getOutlinedModel(
|
|
3465
|
+
getOutlinedModel(
|
|
3466
|
+
response,
|
|
3467
|
+
arrayRoot,
|
|
3468
|
+
obj,
|
|
3469
|
+
key$jscomp$0,
|
|
3470
|
+
null,
|
|
3471
|
+
createMap
|
|
3472
|
+
)
|
|
3388
3473
|
);
|
|
3389
3474
|
case "W":
|
|
3390
3475
|
return (
|
|
3391
3476
|
(arrayRoot = value.slice(2)),
|
|
3392
|
-
getOutlinedModel(
|
|
3477
|
+
getOutlinedModel(
|
|
3478
|
+
response,
|
|
3479
|
+
arrayRoot,
|
|
3480
|
+
obj,
|
|
3481
|
+
key$jscomp$0,
|
|
3482
|
+
null,
|
|
3483
|
+
createSet
|
|
3484
|
+
)
|
|
3393
3485
|
);
|
|
3394
3486
|
case "K":
|
|
3395
|
-
key = value.slice(2);
|
|
3396
|
-
obj = response.
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
(
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
for (
|
|
3410
|
-
var referencedFormDataKey = value.slice(key.length), i = 0;
|
|
3411
|
-
i < reference.length;
|
|
3412
|
-
i++
|
|
3413
|
-
)
|
|
3414
|
-
arrayRoot.append(referencedFormDataKey, reference[i]);
|
|
3415
|
-
reference = response;
|
|
3416
|
-
reference.data.delete(value);
|
|
3417
|
-
reference.keyPointer++;
|
|
3418
|
-
} else if (value.startsWith(obj)) break;
|
|
3419
|
-
else response.keyPointer++;
|
|
3487
|
+
key$jscomp$0 = value.slice(2);
|
|
3488
|
+
obj = response._formData;
|
|
3489
|
+
response = response._prefix + "_" + key$jscomp$0 + "_";
|
|
3490
|
+
key$jscomp$0 = new FormData();
|
|
3491
|
+
arrayRoot = obj.referencedEntries;
|
|
3492
|
+
if (null !== arrayRoot) {
|
|
3493
|
+
for (value = obj.keyPointer; value < arrayRoot.length; ) {
|
|
3494
|
+
reference = arrayRoot[value];
|
|
3495
|
+
var key = reference[0];
|
|
3496
|
+
if (!key.startsWith(response)) break;
|
|
3497
|
+
key$jscomp$0.append(key.slice(response.length), reference[1]);
|
|
3498
|
+
value++;
|
|
3499
|
+
}
|
|
3500
|
+
obj.keyPointer = value;
|
|
3420
3501
|
}
|
|
3421
|
-
return
|
|
3502
|
+
return key$jscomp$0;
|
|
3422
3503
|
case "i":
|
|
3423
3504
|
return (
|
|
3424
3505
|
(arrayRoot = value.slice(2)),
|
|
@@ -3426,7 +3507,7 @@
|
|
|
3426
3507
|
response,
|
|
3427
3508
|
arrayRoot,
|
|
3428
3509
|
obj,
|
|
3429
|
-
key,
|
|
3510
|
+
key$jscomp$0,
|
|
3430
3511
|
null,
|
|
3431
3512
|
extractIterator
|
|
3432
3513
|
)
|
|
@@ -3463,7 +3544,7 @@
|
|
|
3463
3544
|
ArrayBuffer,
|
|
3464
3545
|
1,
|
|
3465
3546
|
obj,
|
|
3466
|
-
key,
|
|
3547
|
+
key$jscomp$0,
|
|
3467
3548
|
arrayRoot
|
|
3468
3549
|
);
|
|
3469
3550
|
case "O":
|
|
@@ -3473,7 +3554,7 @@
|
|
|
3473
3554
|
Int8Array,
|
|
3474
3555
|
1,
|
|
3475
3556
|
obj,
|
|
3476
|
-
key,
|
|
3557
|
+
key$jscomp$0,
|
|
3477
3558
|
arrayRoot
|
|
3478
3559
|
);
|
|
3479
3560
|
case "o":
|
|
@@ -3483,7 +3564,7 @@
|
|
|
3483
3564
|
Uint8Array,
|
|
3484
3565
|
1,
|
|
3485
3566
|
obj,
|
|
3486
|
-
key,
|
|
3567
|
+
key$jscomp$0,
|
|
3487
3568
|
arrayRoot
|
|
3488
3569
|
);
|
|
3489
3570
|
case "U":
|
|
@@ -3493,7 +3574,7 @@
|
|
|
3493
3574
|
Uint8ClampedArray,
|
|
3494
3575
|
1,
|
|
3495
3576
|
obj,
|
|
3496
|
-
key,
|
|
3577
|
+
key$jscomp$0,
|
|
3497
3578
|
arrayRoot
|
|
3498
3579
|
);
|
|
3499
3580
|
case "S":
|
|
@@ -3503,7 +3584,7 @@
|
|
|
3503
3584
|
Int16Array,
|
|
3504
3585
|
2,
|
|
3505
3586
|
obj,
|
|
3506
|
-
key,
|
|
3587
|
+
key$jscomp$0,
|
|
3507
3588
|
arrayRoot
|
|
3508
3589
|
);
|
|
3509
3590
|
case "s":
|
|
@@ -3513,7 +3594,7 @@
|
|
|
3513
3594
|
Uint16Array,
|
|
3514
3595
|
2,
|
|
3515
3596
|
obj,
|
|
3516
|
-
key,
|
|
3597
|
+
key$jscomp$0,
|
|
3517
3598
|
arrayRoot
|
|
3518
3599
|
);
|
|
3519
3600
|
case "L":
|
|
@@ -3523,7 +3604,7 @@
|
|
|
3523
3604
|
Int32Array,
|
|
3524
3605
|
4,
|
|
3525
3606
|
obj,
|
|
3526
|
-
key,
|
|
3607
|
+
key$jscomp$0,
|
|
3527
3608
|
arrayRoot
|
|
3528
3609
|
);
|
|
3529
3610
|
case "l":
|
|
@@ -3533,7 +3614,7 @@
|
|
|
3533
3614
|
Uint32Array,
|
|
3534
3615
|
4,
|
|
3535
3616
|
obj,
|
|
3536
|
-
key,
|
|
3617
|
+
key$jscomp$0,
|
|
3537
3618
|
arrayRoot
|
|
3538
3619
|
);
|
|
3539
3620
|
case "G":
|
|
@@ -3543,7 +3624,7 @@
|
|
|
3543
3624
|
Float32Array,
|
|
3544
3625
|
4,
|
|
3545
3626
|
obj,
|
|
3546
|
-
key,
|
|
3627
|
+
key$jscomp$0,
|
|
3547
3628
|
arrayRoot
|
|
3548
3629
|
);
|
|
3549
3630
|
case "g":
|
|
@@ -3553,7 +3634,7 @@
|
|
|
3553
3634
|
Float64Array,
|
|
3554
3635
|
8,
|
|
3555
3636
|
obj,
|
|
3556
|
-
key,
|
|
3637
|
+
key$jscomp$0,
|
|
3557
3638
|
arrayRoot
|
|
3558
3639
|
);
|
|
3559
3640
|
case "M":
|
|
@@ -3563,7 +3644,7 @@
|
|
|
3563
3644
|
BigInt64Array,
|
|
3564
3645
|
8,
|
|
3565
3646
|
obj,
|
|
3566
|
-
key,
|
|
3647
|
+
key$jscomp$0,
|
|
3567
3648
|
arrayRoot
|
|
3568
3649
|
);
|
|
3569
3650
|
case "m":
|
|
@@ -3573,7 +3654,7 @@
|
|
|
3573
3654
|
BigUint64Array,
|
|
3574
3655
|
8,
|
|
3575
3656
|
obj,
|
|
3576
|
-
key,
|
|
3657
|
+
key$jscomp$0,
|
|
3577
3658
|
arrayRoot
|
|
3578
3659
|
);
|
|
3579
3660
|
case "V":
|
|
@@ -3583,13 +3664,13 @@
|
|
|
3583
3664
|
DataView,
|
|
3584
3665
|
1,
|
|
3585
3666
|
obj,
|
|
3586
|
-
key,
|
|
3667
|
+
key$jscomp$0,
|
|
3587
3668
|
arrayRoot
|
|
3588
3669
|
);
|
|
3589
3670
|
case "B":
|
|
3590
3671
|
return (
|
|
3591
3672
|
(obj = parseInt(value.slice(2), 16)),
|
|
3592
|
-
response._formData
|
|
3673
|
+
getBackingBlob(response._formData, response._prefix + obj)
|
|
3593
3674
|
);
|
|
3594
3675
|
}
|
|
3595
3676
|
switch (value[1]) {
|
|
@@ -3607,7 +3688,7 @@
|
|
|
3607
3688
|
response,
|
|
3608
3689
|
value,
|
|
3609
3690
|
obj,
|
|
3610
|
-
key,
|
|
3691
|
+
key$jscomp$0,
|
|
3611
3692
|
arrayRoot,
|
|
3612
3693
|
createModel
|
|
3613
3694
|
);
|
|
@@ -3626,11 +3707,20 @@
|
|
|
3626
3707
|
: new FormData(),
|
|
3627
3708
|
arraySizeLimit =
|
|
3628
3709
|
4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : 1e6,
|
|
3629
|
-
chunks = new Map()
|
|
3710
|
+
chunks = new Map(),
|
|
3711
|
+
backingStore = {
|
|
3712
|
+
prefix: formFieldPrefix,
|
|
3713
|
+
referencedEntries: null,
|
|
3714
|
+
keyPointer: 0,
|
|
3715
|
+
stringChunks: null,
|
|
3716
|
+
streamChunks: null,
|
|
3717
|
+
blobs: null
|
|
3718
|
+
};
|
|
3719
|
+
backingFormData.forEach(appendBackingEntry.bind(null, backingStore));
|
|
3630
3720
|
return {
|
|
3631
3721
|
_bundlerConfig: bundlerConfig,
|
|
3632
3722
|
_prefix: formFieldPrefix,
|
|
3633
|
-
_formData:
|
|
3723
|
+
_formData: backingStore,
|
|
3634
3724
|
_chunks: chunks,
|
|
3635
3725
|
_temporaryReferences: temporaryReferences,
|
|
3636
3726
|
_rootArrayContexts: new WeakMap(),
|
|
@@ -3638,19 +3728,26 @@
|
|
|
3638
3728
|
};
|
|
3639
3729
|
}
|
|
3640
3730
|
function resolveField(response, key, value) {
|
|
3641
|
-
var
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3731
|
+
var prefix = response._prefix;
|
|
3732
|
+
if (key.startsWith(prefix)) {
|
|
3733
|
+
var chunks = response._chunks;
|
|
3734
|
+
if ("S" === key[prefix.length]) {
|
|
3735
|
+
if (
|
|
3736
|
+
key.length > prefix.length + 1 &&
|
|
3737
|
+
((prefix = +key.slice(prefix.length + 1)),
|
|
3738
|
+
(chunks = chunks.get(prefix)))
|
|
3739
|
+
) {
|
|
3740
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
3741
|
+
return;
|
|
3742
|
+
}
|
|
3743
|
+
} else if (
|
|
3744
|
+
((prefix = +key.slice(prefix.length)), (chunks = chunks.get(prefix)))
|
|
3745
|
+
) {
|
|
3746
|
+
resolveModelChunk(response, chunks, value, prefix);
|
|
3747
|
+
return;
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
appendBackingEntry(response._formData, value, key);
|
|
3654
3751
|
}
|
|
3655
3752
|
function close(response) {
|
|
3656
3753
|
reportGlobalError(response, Error("Connection closed."));
|
|
@@ -3716,6 +3813,12 @@
|
|
|
3716
3813
|
var async_hooks = require("async_hooks"),
|
|
3717
3814
|
ReactDOM = require("react-dom"),
|
|
3718
3815
|
React = require("react"),
|
|
3816
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
3817
|
+
supportsArrayBufferDetached = hasOwnProperty.call(
|
|
3818
|
+
ArrayBuffer.prototype,
|
|
3819
|
+
"detached"
|
|
3820
|
+
),
|
|
3821
|
+
didWarnAboutMissingArrayBufferDetached = !1,
|
|
3719
3822
|
scheduleMicrotask = queueMicrotask,
|
|
3720
3823
|
currentView = null,
|
|
3721
3824
|
writtenBytes = 0,
|
|
@@ -4137,7 +4240,6 @@
|
|
|
4137
4240
|
debugID = null,
|
|
4138
4241
|
modelRoot = !1,
|
|
4139
4242
|
emptyRoot = {},
|
|
4140
|
-
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
4141
4243
|
chunkCache = new Map(),
|
|
4142
4244
|
RESPONSE_SYMBOL = Symbol();
|
|
4143
4245
|
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
@@ -4205,44 +4307,44 @@
|
|
|
4205
4307
|
};
|
|
4206
4308
|
exports.decodeAction = function (body, serverManifest) {
|
|
4207
4309
|
var formData = new FormData(),
|
|
4208
|
-
|
|
4209
|
-
seenActions = new Set();
|
|
4310
|
+
maybeActionKey = null;
|
|
4210
4311
|
body.forEach(function (value, key) {
|
|
4211
4312
|
key.startsWith("$ACTION_")
|
|
4212
4313
|
? 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
|
-
})))
|
|
4314
|
+
? (maybeActionKey = key)
|
|
4315
|
+
: key.startsWith("$ACTION_ID_") && (maybeActionKey = key)
|
|
4226
4316
|
: formData.append(key, value);
|
|
4227
4317
|
});
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4318
|
+
if (null === maybeActionKey) return null;
|
|
4319
|
+
var actionKey = maybeActionKey,
|
|
4320
|
+
action = null;
|
|
4321
|
+
if (actionKey.startsWith("$ACTION_REF_"))
|
|
4322
|
+
(actionKey = "$ACTION_" + actionKey.slice(12) + ":"),
|
|
4323
|
+
(body = decodeBoundActionMetaData(body, serverManifest, actionKey)),
|
|
4324
|
+
(action = loadServerReference(serverManifest, body));
|
|
4325
|
+
else if (actionKey.startsWith("$ACTION_ID_"))
|
|
4326
|
+
(body = actionKey.slice(11)),
|
|
4327
|
+
(action = loadServerReference(serverManifest, {
|
|
4328
|
+
id: body,
|
|
4329
|
+
bound: null
|
|
4330
|
+
}));
|
|
4331
|
+
else throw Error("Cannot handle action key. This is a bug in React.");
|
|
4332
|
+
return action.then(function (fn) {
|
|
4333
|
+
return fn.bind(null, formData);
|
|
4334
|
+
});
|
|
4233
4335
|
};
|
|
4234
4336
|
exports.decodeFormState = function (actionResult, body, serverManifest) {
|
|
4235
4337
|
var keyPath = body.get("$ACTION_KEY");
|
|
4236
4338
|
if ("string" !== typeof keyPath) return Promise.resolve(null);
|
|
4237
|
-
var
|
|
4339
|
+
var actionKey = null;
|
|
4238
4340
|
body.forEach(function (value, key) {
|
|
4239
|
-
key.startsWith("$ACTION_REF_") &&
|
|
4240
|
-
((value = "$ACTION_" + key.slice(12) + ":"),
|
|
4241
|
-
(metaData = decodeBoundActionMetaData(body, serverManifest, value)));
|
|
4341
|
+
key.startsWith("$ACTION_REF_") && (actionKey = key);
|
|
4242
4342
|
});
|
|
4243
|
-
if (null ===
|
|
4244
|
-
var
|
|
4245
|
-
|
|
4343
|
+
if (null === actionKey) return Promise.resolve(null);
|
|
4344
|
+
var formFieldPrefix = "$ACTION_" + actionKey.slice(12) + ":";
|
|
4345
|
+
body = decodeBoundActionMetaData(body, serverManifest, formFieldPrefix);
|
|
4346
|
+
var referenceId = body.id;
|
|
4347
|
+
return Promise.resolve(body.bound).then(function (bound) {
|
|
4246
4348
|
return null === bound
|
|
4247
4349
|
? null
|
|
4248
4350
|
: [actionResult, keyPath, referenceId, bound.length - 1];
|
|
@@ -4275,26 +4377,33 @@
|
|
|
4275
4377
|
var current = head;
|
|
4276
4378
|
if (!current.complete) return;
|
|
4277
4379
|
try {
|
|
4278
|
-
var
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4380
|
+
var key = current.name,
|
|
4381
|
+
JSCompiler_temp_const = response._formData;
|
|
4382
|
+
var handle = current.file;
|
|
4383
|
+
if ("function" === typeof File)
|
|
4384
|
+
var JSCompiler_inline_result = new File(
|
|
4385
|
+
handle.chunks,
|
|
4386
|
+
handle.filename,
|
|
4387
|
+
{ type: handle.mime }
|
|
4388
|
+
);
|
|
4389
|
+
else {
|
|
4390
|
+
var scratch = new FormData();
|
|
4391
|
+
scratch.append(
|
|
4392
|
+
"file",
|
|
4393
|
+
new Blob(handle.chunks, { type: handle.mime }),
|
|
4394
|
+
handle.filename
|
|
4395
|
+
);
|
|
4396
|
+
JSCompiler_inline_result = scratch.get("file");
|
|
4397
|
+
}
|
|
4398
|
+
appendBackingEntry(
|
|
4399
|
+
JSCompiler_temp_const,
|
|
4400
|
+
JSCompiler_inline_result,
|
|
4401
|
+
key
|
|
4402
|
+
);
|
|
4290
4403
|
var queuedFields = current.queuedFields;
|
|
4291
4404
|
if (null !== queuedFields)
|
|
4292
|
-
for (
|
|
4293
|
-
resolveField(
|
|
4294
|
-
response$jscomp$0,
|
|
4295
|
-
queuedFields[response],
|
|
4296
|
-
queuedFields[response + 1]
|
|
4297
|
-
);
|
|
4405
|
+
for (var i = 0; i < queuedFields.length; i += 2)
|
|
4406
|
+
resolveField(response, queuedFields[i], queuedFields[i + 1]);
|
|
4298
4407
|
} catch (error) {
|
|
4299
4408
|
busboyStream.destroy(error);
|
|
4300
4409
|
return;
|
|
@@ -4302,9 +4411,9 @@
|
|
|
4302
4411
|
head = current.next;
|
|
4303
4412
|
}
|
|
4304
4413
|
tail = null;
|
|
4305
|
-
bodyFinished && !closed && ((closed = !0), close(response
|
|
4414
|
+
bodyFinished && !closed && ((closed = !0), close(response));
|
|
4306
4415
|
}
|
|
4307
|
-
var response
|
|
4416
|
+
var response = createResponse(
|
|
4308
4417
|
webpackMap,
|
|
4309
4418
|
"",
|
|
4310
4419
|
options ? options.temporaryReferences : void 0,
|
|
@@ -4321,7 +4430,7 @@
|
|
|
4321
4430
|
tail.queuedFields.push(name, value);
|
|
4322
4431
|
else
|
|
4323
4432
|
try {
|
|
4324
|
-
resolveField(response
|
|
4433
|
+
resolveField(response, name, value);
|
|
4325
4434
|
} catch (error) {
|
|
4326
4435
|
busboyStream.destroy(error);
|
|
4327
4436
|
}
|
|
@@ -4367,14 +4476,14 @@
|
|
|
4367
4476
|
flush();
|
|
4368
4477
|
closed ||
|
|
4369
4478
|
reportGlobalError(
|
|
4370
|
-
response
|
|
4479
|
+
response,
|
|
4371
4480
|
Error("Reply finished with incomplete file part.")
|
|
4372
4481
|
);
|
|
4373
4482
|
});
|
|
4374
4483
|
busboyStream.on("error", function (err) {
|
|
4375
|
-
reportGlobalError(response
|
|
4484
|
+
reportGlobalError(response, err);
|
|
4376
4485
|
});
|
|
4377
|
-
return getChunk(response
|
|
4486
|
+
return getChunk(response, 0);
|
|
4378
4487
|
};
|
|
4379
4488
|
exports.registerClientReference = function (
|
|
4380
4489
|
proxyImplementation,
|