hyoo_sync_client 0.0.419 → 0.0.420
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 +22 -12
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +48 -24
- package/node.js.map +1 -1
- package/node.mjs +48 -24
- package/node.test.js +67 -34
- package/node.test.js.map +1 -1
- package/package.json +4 -3
- package/web.d.ts +15 -5
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +47 -23
- package/web.js.map +1 -1
- package/web.mjs +47 -23
- package/web.test.js +10 -1
- package/web.test.js.map +1 -1
package/node.js
CHANGED
|
@@ -1852,35 +1852,24 @@ var $;
|
|
|
1852
1852
|
"use strict";
|
|
1853
1853
|
var $;
|
|
1854
1854
|
(function ($) {
|
|
1855
|
-
class $
|
|
1856
|
-
delay;
|
|
1855
|
+
class $mol_after_tick extends $mol_object2 {
|
|
1857
1856
|
task;
|
|
1858
|
-
|
|
1859
|
-
|
|
1857
|
+
promise;
|
|
1858
|
+
cancelled = false;
|
|
1859
|
+
constructor(task) {
|
|
1860
1860
|
super();
|
|
1861
|
-
this.delay = delay;
|
|
1862
1861
|
this.task = task;
|
|
1863
|
-
this.
|
|
1862
|
+
this.promise = Promise.resolve().then(() => {
|
|
1863
|
+
if (this.cancelled)
|
|
1864
|
+
return;
|
|
1865
|
+
task();
|
|
1866
|
+
});
|
|
1864
1867
|
}
|
|
1865
1868
|
destructor() {
|
|
1866
|
-
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
$.$mol_after_timeout = $mol_after_timeout;
|
|
1870
|
-
})($ || ($ = {}));
|
|
1871
|
-
|
|
1872
|
-
;
|
|
1873
|
-
"use strict";
|
|
1874
|
-
var $;
|
|
1875
|
-
(function ($) {
|
|
1876
|
-
class $mol_after_frame extends $mol_after_timeout {
|
|
1877
|
-
task;
|
|
1878
|
-
constructor(task) {
|
|
1879
|
-
super(16, task);
|
|
1880
|
-
this.task = task;
|
|
1869
|
+
this.cancelled = true;
|
|
1881
1870
|
}
|
|
1882
1871
|
}
|
|
1883
|
-
$.$
|
|
1872
|
+
$.$mol_after_tick = $mol_after_tick;
|
|
1884
1873
|
})($ || ($ = {}));
|
|
1885
1874
|
|
|
1886
1875
|
;
|
|
@@ -1898,7 +1887,7 @@ var $;
|
|
|
1898
1887
|
static plan() {
|
|
1899
1888
|
if (this.plan_task)
|
|
1900
1889
|
return;
|
|
1901
|
-
this.plan_task = new $
|
|
1890
|
+
this.plan_task = new $mol_after_tick(() => {
|
|
1902
1891
|
try {
|
|
1903
1892
|
this.sync();
|
|
1904
1893
|
}
|
|
@@ -2100,7 +2089,7 @@ var $;
|
|
|
2100
2089
|
sub.track_off(prev);
|
|
2101
2090
|
sub.absorb = () => {
|
|
2102
2091
|
done(null);
|
|
2103
|
-
sub.destructor();
|
|
2092
|
+
setTimeout(() => sub.destructor());
|
|
2104
2093
|
};
|
|
2105
2094
|
});
|
|
2106
2095
|
}
|
|
@@ -2170,6 +2159,41 @@ var $;
|
|
|
2170
2159
|
$.$mol_key = $mol_key;
|
|
2171
2160
|
})($ || ($ = {}));
|
|
2172
2161
|
|
|
2162
|
+
;
|
|
2163
|
+
"use strict";
|
|
2164
|
+
var $;
|
|
2165
|
+
(function ($) {
|
|
2166
|
+
class $mol_after_timeout extends $mol_object2 {
|
|
2167
|
+
delay;
|
|
2168
|
+
task;
|
|
2169
|
+
id;
|
|
2170
|
+
constructor(delay, task) {
|
|
2171
|
+
super();
|
|
2172
|
+
this.delay = delay;
|
|
2173
|
+
this.task = task;
|
|
2174
|
+
this.id = setTimeout(task, delay);
|
|
2175
|
+
}
|
|
2176
|
+
destructor() {
|
|
2177
|
+
clearTimeout(this.id);
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
$.$mol_after_timeout = $mol_after_timeout;
|
|
2181
|
+
})($ || ($ = {}));
|
|
2182
|
+
|
|
2183
|
+
;
|
|
2184
|
+
"use strict";
|
|
2185
|
+
var $;
|
|
2186
|
+
(function ($) {
|
|
2187
|
+
class $mol_after_frame extends $mol_after_timeout {
|
|
2188
|
+
task;
|
|
2189
|
+
constructor(task) {
|
|
2190
|
+
super(16, task);
|
|
2191
|
+
this.task = task;
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
$.$mol_after_frame = $mol_after_frame;
|
|
2195
|
+
})($ || ($ = {}));
|
|
2196
|
+
|
|
2173
2197
|
;
|
|
2174
2198
|
"use strict";
|
|
2175
2199
|
var $;
|