mol_jsx_lib 0.0.36 → 0.0.39
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 +2 -1
- package/node.deps.json +1 -1
- package/node.esm.js +24 -11
- package/node.esm.js.map +1 -1
- package/node.js +24 -11
- package/node.js.map +1 -1
- package/node.test.js +64 -11
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +2 -1
- package/web.deps.json +1 -1
- package/web.esm.js +24 -11
- package/web.esm.js.map +1 -1
- package/web.js +24 -11
- package/web.js.map +1 -1
- package/web.test.js +40 -0
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -1670,17 +1670,27 @@ var $;
|
|
|
1670
1670
|
};
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1673
|
+
resync(...args) {
|
|
1674
|
+
let res;
|
|
1675
|
+
try {
|
|
1676
|
+
res = this.recall(...args);
|
|
1677
|
+
}
|
|
1678
|
+
catch (error) {
|
|
1679
|
+
if (error instanceof Promise)
|
|
1680
|
+
$mol_fail_hidden(error);
|
|
1681
|
+
res = error;
|
|
1682
|
+
}
|
|
1683
|
+
try {
|
|
1684
|
+
this.once();
|
|
1685
|
+
}
|
|
1686
|
+
catch (error) {
|
|
1687
|
+
if (error instanceof Promise)
|
|
1688
|
+
$mol_fail_hidden(error);
|
|
1682
1689
|
}
|
|
1683
|
-
return this.put(
|
|
1690
|
+
return this.put(res);
|
|
1691
|
+
}
|
|
1692
|
+
recall(...args) {
|
|
1693
|
+
return this.task.call(this.host, ...args);
|
|
1684
1694
|
}
|
|
1685
1695
|
once() {
|
|
1686
1696
|
return this.sync();
|
|
@@ -1726,6 +1736,9 @@ var $;
|
|
|
1726
1736
|
return next;
|
|
1727
1737
|
}
|
|
1728
1738
|
}
|
|
1739
|
+
__decorate([
|
|
1740
|
+
$mol_wire_method
|
|
1741
|
+
], $mol_wire_atom.prototype, "resync", null);
|
|
1729
1742
|
__decorate([
|
|
1730
1743
|
$mol_wire_method
|
|
1731
1744
|
], $mol_wire_atom.prototype, "recall", null);
|
|
@@ -1773,7 +1786,7 @@ var $;
|
|
|
1773
1786
|
return atom.sync();
|
|
1774
1787
|
}
|
|
1775
1788
|
}
|
|
1776
|
-
return atom.
|
|
1789
|
+
return atom.resync(...args);
|
|
1777
1790
|
};
|
|
1778
1791
|
Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
|
|
1779
1792
|
Object.assign(wrapper, { orig: func });
|
|
@@ -2747,6 +2760,19 @@ var $;
|
|
|
2747
2760
|
App.value(2);
|
|
2748
2761
|
$mol_assert_equal(App.value(), 3);
|
|
2749
2762
|
},
|
|
2763
|
+
'Read Pushed'($) {
|
|
2764
|
+
class App extends $mol_object2 {
|
|
2765
|
+
static $ = $;
|
|
2766
|
+
static value(next = 0) {
|
|
2767
|
+
return next;
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
__decorate([
|
|
2771
|
+
$mol_wire_mem(0)
|
|
2772
|
+
], App, "value", null);
|
|
2773
|
+
$mol_assert_equal(App.value(1), 1);
|
|
2774
|
+
$mol_assert_equal(App.value(), 1);
|
|
2775
|
+
},
|
|
2750
2776
|
'Mem overrides mem'($) {
|
|
2751
2777
|
class Base extends $mol_object2 {
|
|
2752
2778
|
static $ = $;
|
|
@@ -2917,6 +2943,33 @@ var $;
|
|
|
2917
2943
|
], App, "test", null);
|
|
2918
2944
|
App.test();
|
|
2919
2945
|
},
|
|
2946
|
+
'Update deps on push'($) {
|
|
2947
|
+
class App extends $mol_object2 {
|
|
2948
|
+
static $ = $;
|
|
2949
|
+
static left(next = false) {
|
|
2950
|
+
return next;
|
|
2951
|
+
}
|
|
2952
|
+
static right(next = false) {
|
|
2953
|
+
return next;
|
|
2954
|
+
}
|
|
2955
|
+
static res(next) {
|
|
2956
|
+
return this.left(next) && this.right();
|
|
2957
|
+
}
|
|
2958
|
+
}
|
|
2959
|
+
__decorate([
|
|
2960
|
+
$mol_wire_mem(0)
|
|
2961
|
+
], App, "left", null);
|
|
2962
|
+
__decorate([
|
|
2963
|
+
$mol_wire_mem(0)
|
|
2964
|
+
], App, "right", null);
|
|
2965
|
+
__decorate([
|
|
2966
|
+
$mol_wire_mem(0)
|
|
2967
|
+
], App, "res", null);
|
|
2968
|
+
$mol_assert_equal(App.res(), false);
|
|
2969
|
+
$mol_assert_equal(App.res(true), false);
|
|
2970
|
+
$mol_assert_equal(App.right(true), true);
|
|
2971
|
+
$mol_assert_equal(App.res(), true);
|
|
2972
|
+
},
|
|
2920
2973
|
'Different order of pull and push'($) {
|
|
2921
2974
|
class App extends $mol_object2 {
|
|
2922
2975
|
static $ = $;
|