mol_wire_lib 1.0.90 → 1.0.93

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/web.test.js CHANGED
@@ -178,6 +178,12 @@ var $;
178
178
  //mol/type/assert/assert.ts
179
179
  ;
180
180
  "use strict";
181
+ //mol/type/equals/equals.test.ts
182
+ ;
183
+ "use strict";
184
+ //mol/type/equals/equals.ts
185
+ ;
186
+ "use strict";
181
187
  //mol/type/partial/deep/deep.test.ts
182
188
  ;
183
189
  "use strict";
@@ -565,6 +571,79 @@ var $;
565
571
  ;
566
572
  "use strict";
567
573
  var $;
574
+ (function ($) {
575
+ function $mol_log3_area_lazy(event) {
576
+ const self = this;
577
+ const stack = self.$mol_log3_stack;
578
+ const deep = stack.length;
579
+ let logged = false;
580
+ stack.push(() => {
581
+ logged = true;
582
+ self.$mol_log3_area.call(self, event);
583
+ });
584
+ return () => {
585
+ if (logged)
586
+ self.console.groupEnd();
587
+ if (stack.length > deep)
588
+ stack.length = deep;
589
+ };
590
+ }
591
+ $.$mol_log3_area_lazy = $mol_log3_area_lazy;
592
+ $.$mol_log3_stack = [];
593
+ })($ || ($ = {}));
594
+ //mol/log3/log3.ts
595
+ ;
596
+ "use strict";
597
+ //mol/type/keys/extract/extract.test.ts
598
+ ;
599
+ "use strict";
600
+ //mol/type/keys/extract/extract.ts
601
+ ;
602
+ "use strict";
603
+ var $;
604
+ (function ($_1) {
605
+ $mol_test_mocks.push($ => {
606
+ $.$mol_log3_come = () => { };
607
+ $.$mol_log3_done = () => { };
608
+ $.$mol_log3_fail = () => { };
609
+ $.$mol_log3_warn = () => { };
610
+ $.$mol_log3_rise = () => { };
611
+ $.$mol_log3_area = () => () => { };
612
+ });
613
+ })($ || ($ = {}));
614
+ //mol/log3/log3.test.ts
615
+ ;
616
+ "use strict";
617
+ var $;
618
+ (function ($) {
619
+ function $mol_log3_web_make(level, color) {
620
+ return function $mol_log3_logger(event) {
621
+ const pending = this.$mol_log3_stack.pop();
622
+ if (pending)
623
+ pending();
624
+ let tpl = '%c';
625
+ const chunks = Object.values(event);
626
+ for (let i = 0; i < chunks.length; ++i) {
627
+ tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
628
+ }
629
+ const style = `color:${color};font-weight:bolder`;
630
+ this.console[level](tpl, style, ...chunks);
631
+ const self = this;
632
+ return () => self.console.groupEnd();
633
+ };
634
+ }
635
+ $.$mol_log3_web_make = $mol_log3_web_make;
636
+ $.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
637
+ $.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
638
+ $.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
639
+ $.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
640
+ $.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
641
+ $.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
642
+ })($ || ($ = {}));
643
+ //mol/log3/log3.web.ts
644
+ ;
645
+ "use strict";
646
+ var $;
568
647
  (function ($) {
569
648
  $mol_test({
570
649
  'get'() {
@@ -669,15 +748,6 @@ var $;
669
748
  ;
670
749
  "use strict";
671
750
  var $;
672
- (function ($_1) {
673
- $mol_test_mocks.push($ => {
674
- $.$mol_after_timeout = $mol_after_mock_timeout;
675
- });
676
- })($ || ($ = {}));
677
- //mol/after/timeout/timeout.test.ts
678
- ;
679
- "use strict";
680
- var $;
681
751
  (function ($_1) {
682
752
  $mol_test({
683
753
  async 'Latest Calls Wins on Concurrency'($) {
@@ -763,6 +833,15 @@ var $;
763
833
  ;
764
834
  "use strict";
765
835
  var $;
836
+ (function ($_1) {
837
+ $mol_test_mocks.push($ => {
838
+ $.$mol_after_frame = $mol_after_mock_commmon;
839
+ });
840
+ })($ || ($ = {}));
841
+ //mol/after/frame/frame.test.ts
842
+ ;
843
+ "use strict";
844
+ var $;
766
845
  (function ($) {
767
846
  $mol_test({
768
847
  'Primitives'() {
@@ -818,15 +897,6 @@ var $;
818
897
  ;
819
898
  "use strict";
820
899
  var $;
821
- (function ($_1) {
822
- $mol_test_mocks.push($ => {
823
- $.$mol_after_frame = $mol_after_mock_commmon;
824
- });
825
- })($ || ($ = {}));
826
- //mol/after/frame/frame.test.ts
827
- ;
828
- "use strict";
829
- var $;
830
900
  (function ($) {
831
901
  $mol_test({
832
902
  'Sync execution'() {
@@ -909,6 +979,15 @@ var $;
909
979
  ;
910
980
  "use strict";
911
981
  var $;
982
+ (function ($_1) {
983
+ $mol_test_mocks.push($ => {
984
+ $.$mol_after_timeout = $mol_after_mock_timeout;
985
+ });
986
+ })($ || ($ = {}));
987
+ //mol/after/timeout/timeout.test.ts
988
+ ;
989
+ "use strict";
990
+ var $;
912
991
  (function ($_1) {
913
992
  $mol_test({
914
993
  'Cached channel'($) {
@@ -1152,36 +1231,6 @@ var $;
1152
1231
  App.count(5);
1153
1232
  $mol_assert_like(App.res(), 6);
1154
1233
  },
1155
- async 'Toggle with async'($) {
1156
- class App extends $mol_object2 {
1157
- static $ = $;
1158
- static checked(next = false) {
1159
- $$.$mol_wait_timeout(0);
1160
- return next;
1161
- }
1162
- static toggle() {
1163
- const prev = this.checked();
1164
- $mol_assert_unique(this.checked(!prev), prev);
1165
- $mol_assert_equal(this.checked(), prev);
1166
- }
1167
- static res() {
1168
- return this.checked();
1169
- }
1170
- }
1171
- __decorate([
1172
- $mol_wire_mem(0)
1173
- ], App, "checked", null);
1174
- __decorate([
1175
- $mol_wire_method
1176
- ], App, "toggle", null);
1177
- __decorate([
1178
- $mol_wire_mem(0)
1179
- ], App, "res", null);
1180
- const app = $mol_wire_async(App);
1181
- $mol_assert_equal(await app.res(), false);
1182
- await app.toggle();
1183
- $mol_assert_equal(await app.res(), true);
1184
- },
1185
1234
  'Restore after error'($) {
1186
1235
  class App extends $mol_object2 {
1187
1236
  static get $() { return $; }
@@ -1494,79 +1543,6 @@ var $;
1494
1543
  ;
1495
1544
  "use strict";
1496
1545
  var $;
1497
- (function ($) {
1498
- function $mol_log3_area_lazy(event) {
1499
- const self = this;
1500
- const stack = self.$mol_log3_stack;
1501
- const deep = stack.length;
1502
- let logged = false;
1503
- stack.push(() => {
1504
- logged = true;
1505
- self.$mol_log3_area.call(self, event);
1506
- });
1507
- return () => {
1508
- if (logged)
1509
- self.console.groupEnd();
1510
- if (stack.length > deep)
1511
- stack.length = deep;
1512
- };
1513
- }
1514
- $.$mol_log3_area_lazy = $mol_log3_area_lazy;
1515
- $.$mol_log3_stack = [];
1516
- })($ || ($ = {}));
1517
- //mol/log3/log3.ts
1518
- ;
1519
- "use strict";
1520
- //mol/type/keys/extract/extract.test.ts
1521
- ;
1522
- "use strict";
1523
- //mol/type/keys/extract/extract.ts
1524
- ;
1525
- "use strict";
1526
- var $;
1527
- (function ($_1) {
1528
- $mol_test_mocks.push($ => {
1529
- $.$mol_log3_come = () => { };
1530
- $.$mol_log3_done = () => { };
1531
- $.$mol_log3_fail = () => { };
1532
- $.$mol_log3_warn = () => { };
1533
- $.$mol_log3_rise = () => { };
1534
- $.$mol_log3_area = () => () => { };
1535
- });
1536
- })($ || ($ = {}));
1537
- //mol/log3/log3.test.ts
1538
- ;
1539
- "use strict";
1540
- var $;
1541
- (function ($) {
1542
- function $mol_log3_web_make(level, color) {
1543
- return function $mol_log3_logger(event) {
1544
- const pending = this.$mol_log3_stack.pop();
1545
- if (pending)
1546
- pending();
1547
- let tpl = '%c';
1548
- const chunks = Object.values(event);
1549
- for (let i = 0; i < chunks.length; ++i) {
1550
- tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
1551
- }
1552
- const style = `color:${color};font-weight:bolder`;
1553
- this.console[level](tpl, style, ...chunks);
1554
- const self = this;
1555
- return () => self.console.groupEnd();
1556
- };
1557
- }
1558
- $.$mol_log3_web_make = $mol_log3_web_make;
1559
- $.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
1560
- $.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
1561
- $.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
1562
- $.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
1563
- $.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
1564
- $.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
1565
- })($ || ($ = {}));
1566
- //mol/log3/log3.web.ts
1567
- ;
1568
- "use strict";
1569
- var $;
1570
1546
  (function ($) {
1571
1547
  class $mol_wire_log extends $mol_object2 {
1572
1548
  static watch(task) {
@@ -1897,11 +1873,5 @@ var $;
1897
1873
  });
1898
1874
  })($ || ($ = {}));
1899
1875
  //mol/wire/dict/dict.test.ts
1900
- ;
1901
- "use strict";
1902
- //mol/type/equals/equals.test.ts
1903
- ;
1904
- "use strict";
1905
- //mol/type/equals/equals.ts
1906
1876
 
1907
1877
  //# sourceMappingURL=web.test.js.map