seroval 0.11.3 → 0.11.5
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 +10 -10
- package/dist/cjs/development/index.cjs.map +2 -2
- package/dist/cjs/production/index.cjs +1 -1
- package/dist/esm/development/index.mjs +10 -10
- package/dist/esm/development/index.mjs.map +2 -2
- package/dist/esm/production/index.mjs +1 -1
- package/package.json +2 -2
- package/src/core/cross/async.ts +7 -7
- package/src/core/cross/stream.ts +6 -6
- package/src/core/keys.ts +2 -2
- package/src/core/tree/async.ts +7 -7
|
@@ -333,7 +333,7 @@ var GLOBAL_CONTEXT_PROMISE_REJECT = "Pf";
|
|
|
333
333
|
var LOCAL_CONTEXT_STREAM_CONTROLLER = "c";
|
|
334
334
|
var GLOBAL_CONTEXT_STREAM_CONSTRUCTOR = "S";
|
|
335
335
|
var GLOBAL_CONTEXT_STREAM_EMIT = "Se";
|
|
336
|
-
var GLOBAL_CONTEXT_API_SCRIPT = `self.${GLOBAL_CONTEXT_API}=self.${GLOBAL_CONTEXT_API}||{${GLOBAL_CONTEXT_PROMISE_CONSTRUCTOR}:function(s,f,p){return(p=new Promise(function(a,b){s=a,f=b})).${LOCAL_CONTEXT_PROMISE_RESOLVE}=s,p.${LOCAL_CONTEXT_PROMISE_REJECT}=f,p},uP:function(p){delete p.${LOCAL_CONTEXT_PROMISE_RESOLVE};delete p.${LOCAL_CONTEXT_PROMISE_REJECT}},${GLOBAL_CONTEXT_PROMISE_RESOLVE}:function(p,d){p.${LOCAL_CONTEXT_PROMISE_RESOLVE}(d),p.value=d,this.uP(p)},${GLOBAL_CONTEXT_PROMISE_REJECT}:function(p,d){p.${LOCAL_CONTEXT_PROMISE_REJECT}(d),this.uP(p)},uS:function(s){delete s.${LOCAL_CONTEXT_STREAM_CONTROLLER}},${GLOBAL_CONTEXT_STREAM_EMIT}:function(s,t,d,c){switch(c=s.${LOCAL_CONTEXT_STREAM_CONTROLLER},t){case 0:return c.enqueue(d);case 1:return(this.uS(s),c.error(d));case 2:return(this.uS(s),c.close())}},${GLOBAL_CONTEXT_STREAM_CONSTRUCTOR}:function(s,c){return(s=new ReadableStream({start:function(x){c=x}})).${LOCAL_CONTEXT_STREAM_CONTROLLER}=c,s}}`;
|
|
336
|
+
var GLOBAL_CONTEXT_API_SCRIPT = `self.${GLOBAL_CONTEXT_API}=self.${GLOBAL_CONTEXT_API}||{${GLOBAL_CONTEXT_PROMISE_CONSTRUCTOR}:function(s,f,p){return(p=new Promise(function(a,b){s=a,f=b})).${LOCAL_CONTEXT_PROMISE_RESOLVE}=s,p.${LOCAL_CONTEXT_PROMISE_REJECT}=f,p},uP:function(p){delete p.${LOCAL_CONTEXT_PROMISE_RESOLVE};delete p.${LOCAL_CONTEXT_PROMISE_REJECT}},${GLOBAL_CONTEXT_PROMISE_RESOLVE}:function(p,d){p.${LOCAL_CONTEXT_PROMISE_RESOLVE}(d),p.status="success",p.value=d,this.uP(p)},${GLOBAL_CONTEXT_PROMISE_REJECT}:function(p,d){p.${LOCAL_CONTEXT_PROMISE_REJECT}(d),p.status="failure",p.value=d,this.uP(p)},uS:function(s){delete s.${LOCAL_CONTEXT_STREAM_CONTROLLER}},${GLOBAL_CONTEXT_STREAM_EMIT}:function(s,t,d,c){switch(c=s.${LOCAL_CONTEXT_STREAM_CONTROLLER},t){case 0:return c.enqueue(d);case 1:return(this.uS(s),c.error(d));case 2:return(this.uS(s),c.close())}},${GLOBAL_CONTEXT_STREAM_CONSTRUCTOR}:function(s,c){return(s=new ReadableStream({start:function(x){c=x}})).${LOCAL_CONTEXT_STREAM_CONTROLLER}=c,s}}`;
|
|
337
337
|
function getCrossReferenceHeader(id) {
|
|
338
338
|
if (id == null) {
|
|
339
339
|
return `self.${GLOBAL_CONTEXT_REFERENCES}=self.${GLOBAL_CONTEXT_REFERENCES}||[];`;
|
|
@@ -1407,6 +1407,9 @@ async function parseObject(ctx, current) {
|
|
|
1407
1407
|
current
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
|
+
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
1411
|
+
return generatePromiseNode(ctx, id, current);
|
|
1412
|
+
}
|
|
1410
1413
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
1411
1414
|
switch (currentClass) {
|
|
1412
1415
|
case URL:
|
|
@@ -1438,9 +1441,6 @@ async function parseObject(ctx, current) {
|
|
|
1438
1441
|
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
1439
1442
|
return generateAggregateErrorNode(ctx, id, current);
|
|
1440
1443
|
}
|
|
1441
|
-
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
1442
|
-
return generatePromiseNode(ctx, id, current);
|
|
1443
|
-
}
|
|
1444
1444
|
if (current instanceof Error) {
|
|
1445
1445
|
return generateErrorNode(ctx, id, current);
|
|
1446
1446
|
}
|
|
@@ -3685,6 +3685,9 @@ async function parseObject3(ctx, current) {
|
|
|
3685
3685
|
current
|
|
3686
3686
|
);
|
|
3687
3687
|
}
|
|
3688
|
+
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
3689
|
+
return generatePromiseNode2(ctx, id, current);
|
|
3690
|
+
}
|
|
3688
3691
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
3689
3692
|
switch (currentClass) {
|
|
3690
3693
|
case URL:
|
|
@@ -3716,9 +3719,6 @@ async function parseObject3(ctx, current) {
|
|
|
3716
3719
|
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
3717
3720
|
return generateAggregateErrorNode3(ctx, id, current);
|
|
3718
3721
|
}
|
|
3719
|
-
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
3720
|
-
return generatePromiseNode2(ctx, id, current);
|
|
3721
|
-
}
|
|
3722
3722
|
if (current instanceof Error) {
|
|
3723
3723
|
return generateErrorNode3(ctx, id, current);
|
|
3724
3724
|
}
|
|
@@ -4923,6 +4923,9 @@ function parseObject4(ctx, current) {
|
|
|
4923
4923
|
if (ctx.features & 512 /* Set */ && currentClass === Set) {
|
|
4924
4924
|
return generateSetNode4(ctx, id, current);
|
|
4925
4925
|
}
|
|
4926
|
+
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
4927
|
+
return generatePromiseNode3(ctx, id, current);
|
|
4928
|
+
}
|
|
4926
4929
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
4927
4930
|
switch (currentClass) {
|
|
4928
4931
|
case URL:
|
|
@@ -4952,9 +4955,6 @@ function parseObject4(ctx, current) {
|
|
|
4952
4955
|
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
4953
4956
|
return generateAggregateErrorNode4(ctx, id, current);
|
|
4954
4957
|
}
|
|
4955
|
-
if (ctx.features & 256 /* Promise */ && (currentClass === Promise || current instanceof Promise)) {
|
|
4956
|
-
return generatePromiseNode3(ctx, id, current);
|
|
4957
|
-
}
|
|
4958
4958
|
if (current instanceof Error) {
|
|
4959
4959
|
return generateErrorNode4(ctx, id, current);
|
|
4960
4960
|
}
|