hyoo_sync_client 0.0.231 → 0.0.233
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 +9 -0
- package/node.deps.json +1 -1
- package/node.js +33 -2
- package/node.js.map +1 -1
- package/node.mjs +33 -2
- package/node.test.js +33 -2
- package/node.test.js.map +1 -1
- package/package.json +2 -1
- package/web.d.ts +30 -8
- package/web.deps.json +1 -1
- package/web.js +88 -38
- package/web.js.map +1 -1
- package/web.mjs +88 -38
package/node.mjs
CHANGED
|
@@ -2560,6 +2560,33 @@ var $;
|
|
|
2560
2560
|
;
|
|
2561
2561
|
"use strict";
|
|
2562
2562
|
var $;
|
|
2563
|
+
(function ($) {
|
|
2564
|
+
class $mol_storage extends $mol_object2 {
|
|
2565
|
+
static native() {
|
|
2566
|
+
return null;
|
|
2567
|
+
}
|
|
2568
|
+
static persisted(next) {
|
|
2569
|
+
return false;
|
|
2570
|
+
}
|
|
2571
|
+
static estimate() {
|
|
2572
|
+
return 0;
|
|
2573
|
+
}
|
|
2574
|
+
static dir() {
|
|
2575
|
+
return null;
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
__decorate([
|
|
2579
|
+
$mol_mem
|
|
2580
|
+
], $mol_storage, "native", null);
|
|
2581
|
+
__decorate([
|
|
2582
|
+
$mol_mem
|
|
2583
|
+
], $mol_storage, "persisted", null);
|
|
2584
|
+
$.$mol_storage = $mol_storage;
|
|
2585
|
+
})($ || ($ = {}));
|
|
2586
|
+
//mol/storage/storage.node.ts
|
|
2587
|
+
;
|
|
2588
|
+
"use strict";
|
|
2589
|
+
var $;
|
|
2563
2590
|
(function ($) {
|
|
2564
2591
|
class $mol_state_local extends $mol_object {
|
|
2565
2592
|
static 'native()';
|
|
@@ -2594,10 +2621,13 @@ var $;
|
|
|
2594
2621
|
this.changes();
|
|
2595
2622
|
if (next === void 0)
|
|
2596
2623
|
return JSON.parse(this.native().getItem(key) || 'null');
|
|
2597
|
-
if (next === null)
|
|
2624
|
+
if (next === null) {
|
|
2598
2625
|
this.native().removeItem(key);
|
|
2599
|
-
|
|
2626
|
+
}
|
|
2627
|
+
else {
|
|
2600
2628
|
this.native().setItem(key, JSON.stringify(next));
|
|
2629
|
+
this.$.$mol_storage.persisted(true);
|
|
2630
|
+
}
|
|
2601
2631
|
return next;
|
|
2602
2632
|
}
|
|
2603
2633
|
prefix() { return ''; }
|
|
@@ -4372,6 +4402,7 @@ var $;
|
|
|
4372
4402
|
Unit.put(unit, [unit.land, unit.head, unit.self]);
|
|
4373
4403
|
}
|
|
4374
4404
|
await trans.commit();
|
|
4405
|
+
this.$.$mol_storage.persisted(true);
|
|
4375
4406
|
}
|
|
4376
4407
|
reconnects(reset) {
|
|
4377
4408
|
return ($mol_wire_probe(() => this.reconnects()) ?? 0) + 1;
|
package/node.test.js
CHANGED
|
@@ -2552,6 +2552,33 @@ var $;
|
|
|
2552
2552
|
;
|
|
2553
2553
|
"use strict";
|
|
2554
2554
|
var $;
|
|
2555
|
+
(function ($) {
|
|
2556
|
+
class $mol_storage extends $mol_object2 {
|
|
2557
|
+
static native() {
|
|
2558
|
+
return null;
|
|
2559
|
+
}
|
|
2560
|
+
static persisted(next) {
|
|
2561
|
+
return false;
|
|
2562
|
+
}
|
|
2563
|
+
static estimate() {
|
|
2564
|
+
return 0;
|
|
2565
|
+
}
|
|
2566
|
+
static dir() {
|
|
2567
|
+
return null;
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
__decorate([
|
|
2571
|
+
$mol_mem
|
|
2572
|
+
], $mol_storage, "native", null);
|
|
2573
|
+
__decorate([
|
|
2574
|
+
$mol_mem
|
|
2575
|
+
], $mol_storage, "persisted", null);
|
|
2576
|
+
$.$mol_storage = $mol_storage;
|
|
2577
|
+
})($ || ($ = {}));
|
|
2578
|
+
//mol/storage/storage.node.ts
|
|
2579
|
+
;
|
|
2580
|
+
"use strict";
|
|
2581
|
+
var $;
|
|
2555
2582
|
(function ($) {
|
|
2556
2583
|
class $mol_state_local extends $mol_object {
|
|
2557
2584
|
static 'native()';
|
|
@@ -2586,10 +2613,13 @@ var $;
|
|
|
2586
2613
|
this.changes();
|
|
2587
2614
|
if (next === void 0)
|
|
2588
2615
|
return JSON.parse(this.native().getItem(key) || 'null');
|
|
2589
|
-
if (next === null)
|
|
2616
|
+
if (next === null) {
|
|
2590
2617
|
this.native().removeItem(key);
|
|
2591
|
-
|
|
2618
|
+
}
|
|
2619
|
+
else {
|
|
2592
2620
|
this.native().setItem(key, JSON.stringify(next));
|
|
2621
|
+
this.$.$mol_storage.persisted(true);
|
|
2622
|
+
}
|
|
2593
2623
|
return next;
|
|
2594
2624
|
}
|
|
2595
2625
|
prefix() { return ''; }
|
|
@@ -4364,6 +4394,7 @@ var $;
|
|
|
4364
4394
|
Unit.put(unit, [unit.land, unit.head, unit.self]);
|
|
4365
4395
|
}
|
|
4366
4396
|
await trans.commit();
|
|
4397
|
+
this.$.$mol_storage.persisted(true);
|
|
4367
4398
|
}
|
|
4368
4399
|
reconnects(reset) {
|
|
4369
4400
|
return ($mol_wire_probe(() => this.reconnects()) ?? 0) + 1;
|