mol_plot_all 1.2.245 → 1.2.246
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/node.d.ts +1 -1
- package/node.deps.json +1 -1
- package/node.esm.js +8 -1
- package/node.esm.js.map +1 -1
- package/node.js +8 -1
- package/node.js.map +1 -1
- package/node.test.js +89 -69
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -1
- package/web.deps.json +1 -1
- package/web.esm.js +6 -1
- package/web.esm.js.map +1 -1
- package/web.js +6 -1
- package/web.js.map +1 -1
- package/web.test.js +88 -75
- package/web.test.js.map +1 -1
package/web.test.js
CHANGED
|
@@ -686,6 +686,78 @@ var $;
|
|
|
686
686
|
;
|
|
687
687
|
"use strict";
|
|
688
688
|
var $;
|
|
689
|
+
(function ($) {
|
|
690
|
+
function $mol_promise() {
|
|
691
|
+
let done;
|
|
692
|
+
let fail;
|
|
693
|
+
const promise = new Promise((d, f) => {
|
|
694
|
+
done = d;
|
|
695
|
+
fail = f;
|
|
696
|
+
});
|
|
697
|
+
return Object.assign(promise, {
|
|
698
|
+
done,
|
|
699
|
+
fail,
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
$.$mol_promise = $mol_promise;
|
|
703
|
+
})($ || ($ = {}));
|
|
704
|
+
//mol/promise/promise.ts
|
|
705
|
+
;
|
|
706
|
+
"use strict";
|
|
707
|
+
var $;
|
|
708
|
+
(function ($_1) {
|
|
709
|
+
$mol_test_mocks.push($ => {
|
|
710
|
+
$.$mol_after_timeout = $mol_after_mock_timeout;
|
|
711
|
+
});
|
|
712
|
+
})($ || ($ = {}));
|
|
713
|
+
//mol/after/timeout/timeout.test.ts
|
|
714
|
+
;
|
|
715
|
+
"use strict";
|
|
716
|
+
var $;
|
|
717
|
+
(function ($) {
|
|
718
|
+
function $mol_wire_sync(obj) {
|
|
719
|
+
return new Proxy(obj, {
|
|
720
|
+
get(obj, field) {
|
|
721
|
+
const val = obj[field];
|
|
722
|
+
if (typeof val !== 'function')
|
|
723
|
+
return val;
|
|
724
|
+
const temp = $mol_wire_task.getter(val);
|
|
725
|
+
return function $mol_wire_sync(...args) {
|
|
726
|
+
const fiber = temp(obj, args);
|
|
727
|
+
return fiber.sync();
|
|
728
|
+
};
|
|
729
|
+
},
|
|
730
|
+
apply(obj, self, args) {
|
|
731
|
+
const temp = $mol_wire_task.getter(obj);
|
|
732
|
+
const fiber = temp(self, args);
|
|
733
|
+
return fiber.sync();
|
|
734
|
+
},
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
$.$mol_wire_sync = $mol_wire_sync;
|
|
738
|
+
})($ || ($ = {}));
|
|
739
|
+
//mol/wire/sync/sync.ts
|
|
740
|
+
;
|
|
741
|
+
"use strict";
|
|
742
|
+
var $;
|
|
743
|
+
(function ($) {
|
|
744
|
+
function $mol_wait_timeout_async(timeout) {
|
|
745
|
+
const promise = $mol_promise();
|
|
746
|
+
const task = new this.$mol_after_timeout(timeout, () => promise.done());
|
|
747
|
+
return Object.assign(promise, {
|
|
748
|
+
destructor: () => task.destructor()
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
$.$mol_wait_timeout_async = $mol_wait_timeout_async;
|
|
752
|
+
function $mol_wait_timeout(timeout) {
|
|
753
|
+
return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
|
|
754
|
+
}
|
|
755
|
+
$.$mol_wait_timeout = $mol_wait_timeout;
|
|
756
|
+
})($ || ($ = {}));
|
|
757
|
+
//mol/wait/timeout/timeout.ts
|
|
758
|
+
;
|
|
759
|
+
"use strict";
|
|
760
|
+
var $;
|
|
689
761
|
(function ($_1) {
|
|
690
762
|
$mol_test({
|
|
691
763
|
async 'Latest Calls Wins on Concurrency'($) {
|
|
@@ -707,6 +779,15 @@ var $;
|
|
|
707
779
|
$mol_assert_like(NameLogger.first, ['john', 'jin']);
|
|
708
780
|
$mol_assert_like(NameLogger.last, ['jin']);
|
|
709
781
|
},
|
|
782
|
+
async 'Wrap function'($) {
|
|
783
|
+
const name = $mol_wire_async(function (name) {
|
|
784
|
+
$.$mol_wait_timeout(0);
|
|
785
|
+
return name;
|
|
786
|
+
});
|
|
787
|
+
const promise = name('jin');
|
|
788
|
+
$.$mol_after_mock_warp();
|
|
789
|
+
$mol_assert_like(await promise, 'jin');
|
|
790
|
+
},
|
|
710
791
|
});
|
|
711
792
|
})($ || ($ = {}));
|
|
712
793
|
//mol/wire/async/async.test.ts
|
|
@@ -862,73 +943,6 @@ var $;
|
|
|
862
943
|
;
|
|
863
944
|
"use strict";
|
|
864
945
|
var $;
|
|
865
|
-
(function ($) {
|
|
866
|
-
function $mol_wire_sync(obj) {
|
|
867
|
-
return new Proxy(obj, {
|
|
868
|
-
get(obj, field) {
|
|
869
|
-
const val = obj[field];
|
|
870
|
-
if (typeof val !== 'function')
|
|
871
|
-
return val;
|
|
872
|
-
const temp = $mol_wire_task.getter(val);
|
|
873
|
-
return function $mol_wire_sync(...args) {
|
|
874
|
-
const fiber = temp(obj, args);
|
|
875
|
-
return fiber.sync();
|
|
876
|
-
};
|
|
877
|
-
}
|
|
878
|
-
});
|
|
879
|
-
}
|
|
880
|
-
$.$mol_wire_sync = $mol_wire_sync;
|
|
881
|
-
})($ || ($ = {}));
|
|
882
|
-
//mol/wire/sync/sync.ts
|
|
883
|
-
;
|
|
884
|
-
"use strict";
|
|
885
|
-
var $;
|
|
886
|
-
(function ($) {
|
|
887
|
-
function $mol_promise() {
|
|
888
|
-
let done;
|
|
889
|
-
let fail;
|
|
890
|
-
const promise = new Promise((d, f) => {
|
|
891
|
-
done = d;
|
|
892
|
-
fail = f;
|
|
893
|
-
});
|
|
894
|
-
return Object.assign(promise, {
|
|
895
|
-
done,
|
|
896
|
-
fail,
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
$.$mol_promise = $mol_promise;
|
|
900
|
-
})($ || ($ = {}));
|
|
901
|
-
//mol/promise/promise.ts
|
|
902
|
-
;
|
|
903
|
-
"use strict";
|
|
904
|
-
var $;
|
|
905
|
-
(function ($_1) {
|
|
906
|
-
$mol_test_mocks.push($ => {
|
|
907
|
-
$.$mol_after_timeout = $mol_after_mock_timeout;
|
|
908
|
-
});
|
|
909
|
-
})($ || ($ = {}));
|
|
910
|
-
//mol/after/timeout/timeout.test.ts
|
|
911
|
-
;
|
|
912
|
-
"use strict";
|
|
913
|
-
var $;
|
|
914
|
-
(function ($) {
|
|
915
|
-
function $mol_wait_timeout_async(timeout) {
|
|
916
|
-
const promise = $mol_promise();
|
|
917
|
-
const task = new this.$mol_after_timeout(timeout, () => promise.done());
|
|
918
|
-
return Object.assign(promise, {
|
|
919
|
-
destructor: () => task.destructor()
|
|
920
|
-
});
|
|
921
|
-
}
|
|
922
|
-
$.$mol_wait_timeout_async = $mol_wait_timeout_async;
|
|
923
|
-
function $mol_wait_timeout(timeout) {
|
|
924
|
-
return this.$mol_wire_sync(this).$mol_wait_timeout_async(timeout);
|
|
925
|
-
}
|
|
926
|
-
$.$mol_wait_timeout = $mol_wait_timeout;
|
|
927
|
-
})($ || ($ = {}));
|
|
928
|
-
//mol/wait/timeout/timeout.ts
|
|
929
|
-
;
|
|
930
|
-
"use strict";
|
|
931
|
-
var $;
|
|
932
946
|
(function ($_1) {
|
|
933
947
|
$mol_test({
|
|
934
948
|
'Cached channel'($) {
|
|
@@ -2611,13 +2625,6 @@ var $;
|
|
|
2611
2625
|
//mol/state/local/local.web.ts
|
|
2612
2626
|
;
|
|
2613
2627
|
"use strict";
|
|
2614
|
-
//node/node.ts
|
|
2615
|
-
;
|
|
2616
|
-
"use strict";
|
|
2617
|
-
var $node = $node || {};
|
|
2618
|
-
//node/node.web.ts
|
|
2619
|
-
;
|
|
2620
|
-
"use strict";
|
|
2621
2628
|
var $;
|
|
2622
2629
|
(function ($) {
|
|
2623
2630
|
$mol_test({
|
|
@@ -2638,7 +2645,6 @@ var $;
|
|
|
2638
2645
|
"use strict";
|
|
2639
2646
|
var $;
|
|
2640
2647
|
(function ($) {
|
|
2641
|
-
const TextDecoder = globalThis.TextDecoder ?? $node.util.TextDecoder;
|
|
2642
2648
|
function $mol_charset_decode(value, code = 'utf8') {
|
|
2643
2649
|
return new TextDecoder(code).decode(value);
|
|
2644
2650
|
}
|
|
@@ -2647,6 +2653,13 @@ var $;
|
|
|
2647
2653
|
//mol/charset/decode/decode.ts
|
|
2648
2654
|
;
|
|
2649
2655
|
"use strict";
|
|
2656
|
+
//node/node.ts
|
|
2657
|
+
;
|
|
2658
|
+
"use strict";
|
|
2659
|
+
var $node = $node || {};
|
|
2660
|
+
//node/node.web.ts
|
|
2661
|
+
;
|
|
2662
|
+
"use strict";
|
|
2650
2663
|
var $;
|
|
2651
2664
|
(function ($) {
|
|
2652
2665
|
$mol_test({
|