hyoo_sync_client 0.0.256 → 0.0.257
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 +19 -11
- package/node.deps.json +1 -1
- package/node.js +74 -42
- package/node.js.map +1 -1
- package/node.mjs +74 -42
- package/node.test.js +74 -42
- package/node.test.js.map +1 -1
- package/package.json +5 -3
- package/web.deps.json +1 -1
- package/web.js +8 -3
- package/web.js.map +1 -1
- package/web.mjs +8 -3
package/node.mjs
CHANGED
|
@@ -2662,19 +2662,87 @@ var $;
|
|
|
2662
2662
|
;
|
|
2663
2663
|
"use strict";
|
|
2664
2664
|
var $;
|
|
2665
|
+
(function ($) {
|
|
2666
|
+
function $mol_wire_solid() {
|
|
2667
|
+
const current = $mol_wire_auto();
|
|
2668
|
+
if (current.reap !== nothing) {
|
|
2669
|
+
current?.sub_on(sub, sub.data.length);
|
|
2670
|
+
}
|
|
2671
|
+
current.reap = nothing;
|
|
2672
|
+
}
|
|
2673
|
+
$.$mol_wire_solid = $mol_wire_solid;
|
|
2674
|
+
const nothing = () => { };
|
|
2675
|
+
const sub = new $mol_wire_pub_sub;
|
|
2676
|
+
})($ || ($ = {}));
|
|
2677
|
+
//mol/wire/solid/solid.ts
|
|
2678
|
+
;
|
|
2679
|
+
"use strict";
|
|
2680
|
+
var $;
|
|
2681
|
+
(function ($) {
|
|
2682
|
+
$.$mol_mem_persist = $mol_wire_solid;
|
|
2683
|
+
})($ || ($ = {}));
|
|
2684
|
+
//mol/mem/persist/persist.ts
|
|
2685
|
+
;
|
|
2686
|
+
"use strict";
|
|
2687
|
+
var $;
|
|
2688
|
+
(function ($) {
|
|
2689
|
+
function $mol_wire_probe(task, def) {
|
|
2690
|
+
const warm = $mol_wire_fiber.warm;
|
|
2691
|
+
try {
|
|
2692
|
+
$mol_wire_fiber.warm = false;
|
|
2693
|
+
const res = task();
|
|
2694
|
+
if (res === undefined)
|
|
2695
|
+
return def;
|
|
2696
|
+
return res;
|
|
2697
|
+
}
|
|
2698
|
+
finally {
|
|
2699
|
+
$mol_wire_fiber.warm = warm;
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
$.$mol_wire_probe = $mol_wire_probe;
|
|
2703
|
+
})($ || ($ = {}));
|
|
2704
|
+
//mol/wire/probe/probe.ts
|
|
2705
|
+
;
|
|
2706
|
+
"use strict";
|
|
2707
|
+
var $;
|
|
2708
|
+
(function ($) {
|
|
2709
|
+
$.$mol_mem_cached = $mol_wire_probe;
|
|
2710
|
+
})($ || ($ = {}));
|
|
2711
|
+
//mol/mem/cached/cached.ts
|
|
2712
|
+
;
|
|
2713
|
+
"use strict";
|
|
2714
|
+
var $;
|
|
2665
2715
|
(function ($) {
|
|
2666
2716
|
class $mol_storage extends $mol_object2 {
|
|
2667
2717
|
static native() {
|
|
2668
|
-
return
|
|
2718
|
+
return this.$.$mol_dom_context.navigator.storage ?? {
|
|
2719
|
+
persisted: async () => false,
|
|
2720
|
+
persist: async () => false,
|
|
2721
|
+
estimate: async () => ({}),
|
|
2722
|
+
getDirectory: async () => null,
|
|
2723
|
+
};
|
|
2669
2724
|
}
|
|
2670
|
-
static persisted(next) {
|
|
2671
|
-
|
|
2725
|
+
static persisted(next, cache) {
|
|
2726
|
+
$mol_mem_persist();
|
|
2727
|
+
if (cache)
|
|
2728
|
+
return Boolean(next);
|
|
2729
|
+
const native = this.native();
|
|
2730
|
+
if (next && !$mol_mem_cached(() => this.persisted())) {
|
|
2731
|
+
native.persist().then(actual => {
|
|
2732
|
+
setTimeout(() => this.persisted(actual, 'cache'), 5000);
|
|
2733
|
+
if (actual)
|
|
2734
|
+
this.$.$mol_log3_rise({ place: `$mol_storage`, message: `Persist: Yes` });
|
|
2735
|
+
else
|
|
2736
|
+
this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
|
|
2737
|
+
});
|
|
2738
|
+
}
|
|
2739
|
+
return next ?? $mol_wire_sync(native).persisted();
|
|
2672
2740
|
}
|
|
2673
2741
|
static estimate() {
|
|
2674
|
-
return
|
|
2742
|
+
return $mol_wire_sync(this.native() ?? {}).estimate();
|
|
2675
2743
|
}
|
|
2676
2744
|
static dir() {
|
|
2677
|
-
return
|
|
2745
|
+
return $mol_wire_sync(this.native()).getDirectory();
|
|
2678
2746
|
}
|
|
2679
2747
|
}
|
|
2680
2748
|
__decorate([
|
|
@@ -2685,7 +2753,7 @@ var $;
|
|
|
2685
2753
|
], $mol_storage, "persisted", null);
|
|
2686
2754
|
$.$mol_storage = $mol_storage;
|
|
2687
2755
|
})($ || ($ = {}));
|
|
2688
|
-
//mol/storage/storage.
|
|
2756
|
+
//mol/storage/storage.ts
|
|
2689
2757
|
;
|
|
2690
2758
|
"use strict";
|
|
2691
2759
|
var $;
|
|
@@ -2765,22 +2833,6 @@ var $;
|
|
|
2765
2833
|
;
|
|
2766
2834
|
"use strict";
|
|
2767
2835
|
var $;
|
|
2768
|
-
(function ($) {
|
|
2769
|
-
function $mol_wire_solid() {
|
|
2770
|
-
const current = $mol_wire_auto();
|
|
2771
|
-
if (current.reap !== nothing) {
|
|
2772
|
-
current?.sub_on(sub, sub.data.length);
|
|
2773
|
-
}
|
|
2774
|
-
current.reap = nothing;
|
|
2775
|
-
}
|
|
2776
|
-
$.$mol_wire_solid = $mol_wire_solid;
|
|
2777
|
-
const nothing = () => { };
|
|
2778
|
-
const sub = new $mol_wire_pub_sub;
|
|
2779
|
-
})($ || ($ = {}));
|
|
2780
|
-
//mol/wire/solid/solid.ts
|
|
2781
|
-
;
|
|
2782
|
-
"use strict";
|
|
2783
|
-
var $;
|
|
2784
2836
|
(function ($) {
|
|
2785
2837
|
class $mol_wrapper extends $mol_object2 {
|
|
2786
2838
|
static wrap;
|
|
@@ -4357,26 +4409,6 @@ var $;
|
|
|
4357
4409
|
;
|
|
4358
4410
|
"use strict";
|
|
4359
4411
|
var $;
|
|
4360
|
-
(function ($) {
|
|
4361
|
-
function $mol_wire_probe(task, def) {
|
|
4362
|
-
const warm = $mol_wire_fiber.warm;
|
|
4363
|
-
try {
|
|
4364
|
-
$mol_wire_fiber.warm = false;
|
|
4365
|
-
const res = task();
|
|
4366
|
-
if (res === undefined)
|
|
4367
|
-
return def;
|
|
4368
|
-
return res;
|
|
4369
|
-
}
|
|
4370
|
-
finally {
|
|
4371
|
-
$mol_wire_fiber.warm = warm;
|
|
4372
|
-
}
|
|
4373
|
-
}
|
|
4374
|
-
$.$mol_wire_probe = $mol_wire_probe;
|
|
4375
|
-
})($ || ($ = {}));
|
|
4376
|
-
//mol/wire/probe/probe.ts
|
|
4377
|
-
;
|
|
4378
|
-
"use strict";
|
|
4379
|
-
var $;
|
|
4380
4412
|
(function ($) {
|
|
4381
4413
|
class $mol_db_database {
|
|
4382
4414
|
native;
|
package/node.test.js
CHANGED
|
@@ -2654,19 +2654,87 @@ var $;
|
|
|
2654
2654
|
;
|
|
2655
2655
|
"use strict";
|
|
2656
2656
|
var $;
|
|
2657
|
+
(function ($) {
|
|
2658
|
+
function $mol_wire_solid() {
|
|
2659
|
+
const current = $mol_wire_auto();
|
|
2660
|
+
if (current.reap !== nothing) {
|
|
2661
|
+
current?.sub_on(sub, sub.data.length);
|
|
2662
|
+
}
|
|
2663
|
+
current.reap = nothing;
|
|
2664
|
+
}
|
|
2665
|
+
$.$mol_wire_solid = $mol_wire_solid;
|
|
2666
|
+
const nothing = () => { };
|
|
2667
|
+
const sub = new $mol_wire_pub_sub;
|
|
2668
|
+
})($ || ($ = {}));
|
|
2669
|
+
//mol/wire/solid/solid.ts
|
|
2670
|
+
;
|
|
2671
|
+
"use strict";
|
|
2672
|
+
var $;
|
|
2673
|
+
(function ($) {
|
|
2674
|
+
$.$mol_mem_persist = $mol_wire_solid;
|
|
2675
|
+
})($ || ($ = {}));
|
|
2676
|
+
//mol/mem/persist/persist.ts
|
|
2677
|
+
;
|
|
2678
|
+
"use strict";
|
|
2679
|
+
var $;
|
|
2680
|
+
(function ($) {
|
|
2681
|
+
function $mol_wire_probe(task, def) {
|
|
2682
|
+
const warm = $mol_wire_fiber.warm;
|
|
2683
|
+
try {
|
|
2684
|
+
$mol_wire_fiber.warm = false;
|
|
2685
|
+
const res = task();
|
|
2686
|
+
if (res === undefined)
|
|
2687
|
+
return def;
|
|
2688
|
+
return res;
|
|
2689
|
+
}
|
|
2690
|
+
finally {
|
|
2691
|
+
$mol_wire_fiber.warm = warm;
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
$.$mol_wire_probe = $mol_wire_probe;
|
|
2695
|
+
})($ || ($ = {}));
|
|
2696
|
+
//mol/wire/probe/probe.ts
|
|
2697
|
+
;
|
|
2698
|
+
"use strict";
|
|
2699
|
+
var $;
|
|
2700
|
+
(function ($) {
|
|
2701
|
+
$.$mol_mem_cached = $mol_wire_probe;
|
|
2702
|
+
})($ || ($ = {}));
|
|
2703
|
+
//mol/mem/cached/cached.ts
|
|
2704
|
+
;
|
|
2705
|
+
"use strict";
|
|
2706
|
+
var $;
|
|
2657
2707
|
(function ($) {
|
|
2658
2708
|
class $mol_storage extends $mol_object2 {
|
|
2659
2709
|
static native() {
|
|
2660
|
-
return
|
|
2710
|
+
return this.$.$mol_dom_context.navigator.storage ?? {
|
|
2711
|
+
persisted: async () => false,
|
|
2712
|
+
persist: async () => false,
|
|
2713
|
+
estimate: async () => ({}),
|
|
2714
|
+
getDirectory: async () => null,
|
|
2715
|
+
};
|
|
2661
2716
|
}
|
|
2662
|
-
static persisted(next) {
|
|
2663
|
-
|
|
2717
|
+
static persisted(next, cache) {
|
|
2718
|
+
$mol_mem_persist();
|
|
2719
|
+
if (cache)
|
|
2720
|
+
return Boolean(next);
|
|
2721
|
+
const native = this.native();
|
|
2722
|
+
if (next && !$mol_mem_cached(() => this.persisted())) {
|
|
2723
|
+
native.persist().then(actual => {
|
|
2724
|
+
setTimeout(() => this.persisted(actual, 'cache'), 5000);
|
|
2725
|
+
if (actual)
|
|
2726
|
+
this.$.$mol_log3_rise({ place: `$mol_storage`, message: `Persist: Yes` });
|
|
2727
|
+
else
|
|
2728
|
+
this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
return next ?? $mol_wire_sync(native).persisted();
|
|
2664
2732
|
}
|
|
2665
2733
|
static estimate() {
|
|
2666
|
-
return
|
|
2734
|
+
return $mol_wire_sync(this.native() ?? {}).estimate();
|
|
2667
2735
|
}
|
|
2668
2736
|
static dir() {
|
|
2669
|
-
return
|
|
2737
|
+
return $mol_wire_sync(this.native()).getDirectory();
|
|
2670
2738
|
}
|
|
2671
2739
|
}
|
|
2672
2740
|
__decorate([
|
|
@@ -2677,7 +2745,7 @@ var $;
|
|
|
2677
2745
|
], $mol_storage, "persisted", null);
|
|
2678
2746
|
$.$mol_storage = $mol_storage;
|
|
2679
2747
|
})($ || ($ = {}));
|
|
2680
|
-
//mol/storage/storage.
|
|
2748
|
+
//mol/storage/storage.ts
|
|
2681
2749
|
;
|
|
2682
2750
|
"use strict";
|
|
2683
2751
|
var $;
|
|
@@ -2757,22 +2825,6 @@ var $;
|
|
|
2757
2825
|
;
|
|
2758
2826
|
"use strict";
|
|
2759
2827
|
var $;
|
|
2760
|
-
(function ($) {
|
|
2761
|
-
function $mol_wire_solid() {
|
|
2762
|
-
const current = $mol_wire_auto();
|
|
2763
|
-
if (current.reap !== nothing) {
|
|
2764
|
-
current?.sub_on(sub, sub.data.length);
|
|
2765
|
-
}
|
|
2766
|
-
current.reap = nothing;
|
|
2767
|
-
}
|
|
2768
|
-
$.$mol_wire_solid = $mol_wire_solid;
|
|
2769
|
-
const nothing = () => { };
|
|
2770
|
-
const sub = new $mol_wire_pub_sub;
|
|
2771
|
-
})($ || ($ = {}));
|
|
2772
|
-
//mol/wire/solid/solid.ts
|
|
2773
|
-
;
|
|
2774
|
-
"use strict";
|
|
2775
|
-
var $;
|
|
2776
2828
|
(function ($) {
|
|
2777
2829
|
class $mol_wrapper extends $mol_object2 {
|
|
2778
2830
|
static wrap;
|
|
@@ -4349,26 +4401,6 @@ var $;
|
|
|
4349
4401
|
;
|
|
4350
4402
|
"use strict";
|
|
4351
4403
|
var $;
|
|
4352
|
-
(function ($) {
|
|
4353
|
-
function $mol_wire_probe(task, def) {
|
|
4354
|
-
const warm = $mol_wire_fiber.warm;
|
|
4355
|
-
try {
|
|
4356
|
-
$mol_wire_fiber.warm = false;
|
|
4357
|
-
const res = task();
|
|
4358
|
-
if (res === undefined)
|
|
4359
|
-
return def;
|
|
4360
|
-
return res;
|
|
4361
|
-
}
|
|
4362
|
-
finally {
|
|
4363
|
-
$mol_wire_fiber.warm = warm;
|
|
4364
|
-
}
|
|
4365
|
-
}
|
|
4366
|
-
$.$mol_wire_probe = $mol_wire_probe;
|
|
4367
|
-
})($ || ($ = {}));
|
|
4368
|
-
//mol/wire/probe/probe.ts
|
|
4369
|
-
;
|
|
4370
|
-
"use strict";
|
|
4371
|
-
var $;
|
|
4372
4404
|
(function ($) {
|
|
4373
4405
|
class $mol_db_database {
|
|
4374
4406
|
native;
|