seroval 0.11.4 → 0.11.6
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/dist/cjs/development/index.cjs +152 -127
- package/dist/cjs/development/index.cjs.map +2 -2
- package/dist/cjs/production/index.cjs +2 -2
- package/dist/esm/development/index.mjs +152 -127
- package/dist/esm/development/index.mjs.map +2 -2
- package/dist/esm/production/index.mjs +2 -2
- package/package.json +2 -2
- package/src/core/cross/async.ts +40 -32
- package/src/core/cross/stream.ts +38 -33
- package/src/core/cross/sync.ts +22 -21
- package/src/core/shared.ts +5 -6
- package/src/core/tree/async.ts +40 -32
- package/src/core/tree/sync.ts +22 -21
|
@@ -701,12 +701,11 @@ function isIterable(ctx, value) {
|
|
|
701
701
|
return false;
|
|
702
702
|
}
|
|
703
703
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
break;
|
|
704
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
705
|
+
return false;
|
|
706
|
+
}
|
|
707
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
708
|
+
return false;
|
|
710
709
|
}
|
|
711
710
|
}
|
|
712
711
|
if (ctx.features & 1024 /* Symbol */) {
|
|
@@ -1368,40 +1367,47 @@ async function parseObject(ctx, current) {
|
|
|
1368
1367
|
current
|
|
1369
1368
|
);
|
|
1370
1369
|
}
|
|
1370
|
+
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
1371
|
+
return generatePromiseNode(ctx, id, current);
|
|
1372
|
+
}
|
|
1371
1373
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1374
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
1375
|
+
return createURLNode(id, current);
|
|
1376
|
+
}
|
|
1377
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
1378
|
+
return createURLSearchParamsNode(id, current);
|
|
1379
|
+
}
|
|
1380
|
+
if (typeof Blob !== "undefined" && currentClass === Blob) {
|
|
1381
|
+
return createBlobNode(ctx, id, current);
|
|
1382
|
+
}
|
|
1383
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
1384
|
+
return createFileNode(ctx, id, current);
|
|
1385
|
+
}
|
|
1386
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
1387
|
+
return generateHeadersNode(ctx, id, current);
|
|
1388
|
+
}
|
|
1389
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
1390
|
+
return generateFormDataNode(ctx, id, current);
|
|
1391
|
+
}
|
|
1392
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
1393
|
+
return generateRequestNode(ctx, id, current);
|
|
1394
|
+
}
|
|
1395
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
1396
|
+
return generateResponseNode(ctx, id, current);
|
|
1397
|
+
}
|
|
1398
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
1399
|
+
return generateEventNode(ctx, id, current);
|
|
1400
|
+
}
|
|
1401
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
1402
|
+
return generateCustomEventNode(ctx, id, current);
|
|
1403
|
+
}
|
|
1404
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
1405
|
+
return createDOMExceptionNode(id, current);
|
|
1397
1406
|
}
|
|
1398
1407
|
}
|
|
1399
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
1408
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
1400
1409
|
return generateAggregateErrorNode(ctx, id, current);
|
|
1401
1410
|
}
|
|
1402
|
-
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
1403
|
-
return generatePromiseNode(ctx, id, current);
|
|
1404
|
-
}
|
|
1405
1411
|
if (current instanceof Error) {
|
|
1406
1412
|
return generateErrorNode(ctx, id, current);
|
|
1407
1413
|
}
|
|
@@ -2861,26 +2867,29 @@ function parseObject2(ctx, current) {
|
|
|
2861
2867
|
return generateSetNode2(ctx, id, current);
|
|
2862
2868
|
}
|
|
2863
2869
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2870
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
2871
|
+
return createURLNode(id, current);
|
|
2872
|
+
}
|
|
2873
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
2874
|
+
return createURLSearchParamsNode(id, current);
|
|
2875
|
+
}
|
|
2876
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
2877
|
+
return generateHeadersNode2(ctx, id, current);
|
|
2878
|
+
}
|
|
2879
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
2880
|
+
return generateFormDataNode2(ctx, id, current);
|
|
2881
|
+
}
|
|
2882
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
2883
|
+
return generateEventNode2(ctx, id, current);
|
|
2884
|
+
}
|
|
2885
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
2886
|
+
return generateCustomEventNode2(ctx, id, current);
|
|
2887
|
+
}
|
|
2888
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
2889
|
+
return createDOMExceptionNode(id, current);
|
|
2881
2890
|
}
|
|
2882
2891
|
}
|
|
2883
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
2892
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
2884
2893
|
return generateAggregateErrorNode2(ctx, id, current);
|
|
2885
2894
|
}
|
|
2886
2895
|
if (current instanceof Error) {
|
|
@@ -3646,40 +3655,47 @@ async function parseObject3(ctx, current) {
|
|
|
3646
3655
|
current
|
|
3647
3656
|
);
|
|
3648
3657
|
}
|
|
3658
|
+
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
3659
|
+
return generatePromiseNode2(ctx, id, current);
|
|
3660
|
+
}
|
|
3649
3661
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3662
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
3663
|
+
return createURLNode(id, current);
|
|
3664
|
+
}
|
|
3665
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
3666
|
+
return createURLSearchParamsNode(id, current);
|
|
3667
|
+
}
|
|
3668
|
+
if (typeof Blob !== "undefined" && currentClass === Blob) {
|
|
3669
|
+
return createBlobNode2(ctx, id, current);
|
|
3670
|
+
}
|
|
3671
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
3672
|
+
return createFileNode2(ctx, id, current);
|
|
3673
|
+
}
|
|
3674
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
3675
|
+
return generateHeadersNode3(ctx, id, current);
|
|
3676
|
+
}
|
|
3677
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
3678
|
+
return generateFormDataNode3(ctx, id, current);
|
|
3679
|
+
}
|
|
3680
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
3681
|
+
return generateRequestNode2(ctx, id, current);
|
|
3682
|
+
}
|
|
3683
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
3684
|
+
return generateResponseNode2(ctx, id, current);
|
|
3685
|
+
}
|
|
3686
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
3687
|
+
return generateEventNode3(ctx, id, current);
|
|
3688
|
+
}
|
|
3689
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
3690
|
+
return generateCustomEventNode3(ctx, id, current);
|
|
3691
|
+
}
|
|
3692
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
3693
|
+
return createDOMExceptionNode(id, current);
|
|
3675
3694
|
}
|
|
3676
3695
|
}
|
|
3677
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
3696
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
3678
3697
|
return generateAggregateErrorNode3(ctx, id, current);
|
|
3679
3698
|
}
|
|
3680
|
-
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
3681
|
-
return generatePromiseNode2(ctx, id, current);
|
|
3682
|
-
}
|
|
3683
3699
|
if (current instanceof Error) {
|
|
3684
3700
|
return generateErrorNode3(ctx, id, current);
|
|
3685
3701
|
}
|
|
@@ -4884,38 +4900,44 @@ function parseObject4(ctx, current) {
|
|
|
4884
4900
|
if (ctx.features & 512 /* Set */ && currentClass === Set) {
|
|
4885
4901
|
return generateSetNode4(ctx, id, current);
|
|
4886
4902
|
}
|
|
4903
|
+
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
4904
|
+
return generatePromiseNode3(ctx, id, current);
|
|
4905
|
+
}
|
|
4887
4906
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4907
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
4908
|
+
return createURLNode(id, current);
|
|
4909
|
+
}
|
|
4910
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
4911
|
+
return createURLSearchParamsNode(id, current);
|
|
4912
|
+
}
|
|
4913
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
4914
|
+
return generateHeadersNode4(ctx, id, current);
|
|
4915
|
+
}
|
|
4916
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
4917
|
+
return generateFormDataNode4(ctx, id, current);
|
|
4918
|
+
}
|
|
4919
|
+
if (typeof ReadableStream !== "undefined" && currentClass === ReadableStream) {
|
|
4920
|
+
return generateReadableStreamNode(ctx, id, current);
|
|
4921
|
+
}
|
|
4922
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
4923
|
+
return generateRequestNode3(ctx, id, current);
|
|
4924
|
+
}
|
|
4925
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
4926
|
+
return generateResponseNode3(ctx, id, current);
|
|
4927
|
+
}
|
|
4928
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
4929
|
+
return generateEventNode4(ctx, id, current);
|
|
4930
|
+
}
|
|
4931
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
4932
|
+
return generateCustomEventNode4(ctx, id, current);
|
|
4933
|
+
}
|
|
4934
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
4935
|
+
return createDOMExceptionNode(id, current);
|
|
4911
4936
|
}
|
|
4912
4937
|
}
|
|
4913
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
4938
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
4914
4939
|
return generateAggregateErrorNode4(ctx, id, current);
|
|
4915
4940
|
}
|
|
4916
|
-
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
4917
|
-
return generatePromiseNode3(ctx, id, current);
|
|
4918
|
-
}
|
|
4919
4941
|
if (current instanceof Error) {
|
|
4920
4942
|
return generateErrorNode4(ctx, id, current);
|
|
4921
4943
|
}
|
|
@@ -5361,26 +5383,29 @@ function parseObject5(ctx, current) {
|
|
|
5361
5383
|
return generateSetNode5(ctx, id, current);
|
|
5362
5384
|
}
|
|
5363
5385
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5386
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
5387
|
+
return createURLNode(id, current);
|
|
5388
|
+
}
|
|
5389
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
5390
|
+
return createURLSearchParamsNode(id, current);
|
|
5391
|
+
}
|
|
5392
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
5393
|
+
return generateHeadersNode5(ctx, id, current);
|
|
5394
|
+
}
|
|
5395
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
5396
|
+
return generateFormDataNode5(ctx, id, current);
|
|
5397
|
+
}
|
|
5398
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
5399
|
+
return generateEventNode5(ctx, id, current);
|
|
5400
|
+
}
|
|
5401
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
5402
|
+
return generateCustomEventNode5(ctx, id, current);
|
|
5403
|
+
}
|
|
5404
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
5405
|
+
return createDOMExceptionNode(id, current);
|
|
5381
5406
|
}
|
|
5382
5407
|
}
|
|
5383
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
5408
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
5384
5409
|
return generateAggregateErrorNode5(ctx, id, current);
|
|
5385
5410
|
}
|
|
5386
5411
|
if (current instanceof Error) {
|