hyoo_sync_client 0.0.267 → 0.0.269
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.audit.js +1 -1
- package/node.deps.json +1 -1
- package/node.js +19 -7
- package/node.js.map +1 -1
- package/node.mjs +19 -7
- package/node.test.js +62 -74
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.audit.js +1 -1
- package/web.d.ts +33 -33
- package/web.deps.json +1 -1
- package/web.js +71 -59
- package/web.js.map +1 -1
- package/web.mjs +71 -59
- package/web.test.js +38 -62
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -1704,6 +1704,62 @@ var $;
|
|
|
1704
1704
|
;
|
|
1705
1705
|
"use strict";
|
|
1706
1706
|
var $;
|
|
1707
|
+
(function ($) {
|
|
1708
|
+
function $mol_log3_area_lazy(event) {
|
|
1709
|
+
const self = this;
|
|
1710
|
+
const stack = self.$mol_log3_stack;
|
|
1711
|
+
const deep = stack.length;
|
|
1712
|
+
let logged = false;
|
|
1713
|
+
stack.push(() => {
|
|
1714
|
+
logged = true;
|
|
1715
|
+
self.$mol_log3_area.call(self, event);
|
|
1716
|
+
});
|
|
1717
|
+
return () => {
|
|
1718
|
+
if (logged)
|
|
1719
|
+
self.console.groupEnd();
|
|
1720
|
+
if (stack.length > deep)
|
|
1721
|
+
stack.length = deep;
|
|
1722
|
+
};
|
|
1723
|
+
}
|
|
1724
|
+
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
1725
|
+
$.$mol_log3_stack = [];
|
|
1726
|
+
})($ || ($ = {}));
|
|
1727
|
+
//mol/log3/log3.ts
|
|
1728
|
+
;
|
|
1729
|
+
"use strict";
|
|
1730
|
+
//mol/type/keys/extract/extract.ts
|
|
1731
|
+
;
|
|
1732
|
+
"use strict";
|
|
1733
|
+
var $;
|
|
1734
|
+
(function ($) {
|
|
1735
|
+
function $mol_log3_web_make(level, color) {
|
|
1736
|
+
return function $mol_log3_logger(event) {
|
|
1737
|
+
const pending = this.$mol_log3_stack.pop();
|
|
1738
|
+
if (pending)
|
|
1739
|
+
pending();
|
|
1740
|
+
let tpl = '%c';
|
|
1741
|
+
const chunks = Object.values(event);
|
|
1742
|
+
for (let i = 0; i < chunks.length; ++i) {
|
|
1743
|
+
tpl += (typeof chunks[i] === 'string') ? ' ▫ %s' : ' ▫ %o';
|
|
1744
|
+
}
|
|
1745
|
+
const style = `color:${color};font-weight:bolder`;
|
|
1746
|
+
this.console[level](tpl, style, ...chunks);
|
|
1747
|
+
const self = this;
|
|
1748
|
+
return () => self.console.groupEnd();
|
|
1749
|
+
};
|
|
1750
|
+
}
|
|
1751
|
+
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
1752
|
+
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
1753
|
+
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
1754
|
+
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
1755
|
+
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
1756
|
+
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
1757
|
+
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
1758
|
+
})($ || ($ = {}));
|
|
1759
|
+
//mol/log3/log3.web.ts
|
|
1760
|
+
;
|
|
1761
|
+
"use strict";
|
|
1762
|
+
var $;
|
|
1707
1763
|
(function ($) {
|
|
1708
1764
|
class $mol_wire_task extends $mol_wire_fiber {
|
|
1709
1765
|
static getter(task) {
|
|
@@ -1721,7 +1777,17 @@ var $;
|
|
|
1721
1777
|
break reuse;
|
|
1722
1778
|
return existen;
|
|
1723
1779
|
}
|
|
1724
|
-
|
|
1780
|
+
const next = new $mol_wire_task(`${host?.[Symbol.toStringTag] ?? host}.${task.name}(#)`, task, host, args);
|
|
1781
|
+
if (existen?.temp) {
|
|
1782
|
+
$$.$mol_log3_warn({
|
|
1783
|
+
place: '$mol_wire_task',
|
|
1784
|
+
message: `Non idempotency`,
|
|
1785
|
+
existen,
|
|
1786
|
+
next,
|
|
1787
|
+
hint: 'Ignore it',
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
return next;
|
|
1725
1791
|
};
|
|
1726
1792
|
}
|
|
1727
1793
|
get temp() {
|
|
@@ -2260,7 +2326,9 @@ var $;
|
|
|
2260
2326
|
var $;
|
|
2261
2327
|
(function ($) {
|
|
2262
2328
|
function $mol_wire_solid() {
|
|
2263
|
-
|
|
2329
|
+
let current = $mol_wire_auto();
|
|
2330
|
+
if (current.temp)
|
|
2331
|
+
current = current.host;
|
|
2264
2332
|
if (current.reap !== nothing) {
|
|
2265
2333
|
current?.sub_on(sub, sub.data.length);
|
|
2266
2334
|
}
|
|
@@ -2308,62 +2376,6 @@ var $;
|
|
|
2308
2376
|
;
|
|
2309
2377
|
"use strict";
|
|
2310
2378
|
var $;
|
|
2311
|
-
(function ($) {
|
|
2312
|
-
function $mol_log3_area_lazy(event) {
|
|
2313
|
-
const self = this;
|
|
2314
|
-
const stack = self.$mol_log3_stack;
|
|
2315
|
-
const deep = stack.length;
|
|
2316
|
-
let logged = false;
|
|
2317
|
-
stack.push(() => {
|
|
2318
|
-
logged = true;
|
|
2319
|
-
self.$mol_log3_area.call(self, event);
|
|
2320
|
-
});
|
|
2321
|
-
return () => {
|
|
2322
|
-
if (logged)
|
|
2323
|
-
self.console.groupEnd();
|
|
2324
|
-
if (stack.length > deep)
|
|
2325
|
-
stack.length = deep;
|
|
2326
|
-
};
|
|
2327
|
-
}
|
|
2328
|
-
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
2329
|
-
$.$mol_log3_stack = [];
|
|
2330
|
-
})($ || ($ = {}));
|
|
2331
|
-
//mol/log3/log3.ts
|
|
2332
|
-
;
|
|
2333
|
-
"use strict";
|
|
2334
|
-
//mol/type/keys/extract/extract.ts
|
|
2335
|
-
;
|
|
2336
|
-
"use strict";
|
|
2337
|
-
var $;
|
|
2338
|
-
(function ($) {
|
|
2339
|
-
function $mol_log3_web_make(level, color) {
|
|
2340
|
-
return function $mol_log3_logger(event) {
|
|
2341
|
-
const pending = this.$mol_log3_stack.pop();
|
|
2342
|
-
if (pending)
|
|
2343
|
-
pending();
|
|
2344
|
-
let tpl = '%c';
|
|
2345
|
-
const chunks = Object.values(event);
|
|
2346
|
-
for (let i = 0; i < chunks.length; ++i) {
|
|
2347
|
-
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
|
|
2348
|
-
}
|
|
2349
|
-
const style = `color:${color};font-weight:bolder`;
|
|
2350
|
-
this.console[level](tpl, style, ...chunks);
|
|
2351
|
-
const self = this;
|
|
2352
|
-
return () => self.console.groupEnd();
|
|
2353
|
-
};
|
|
2354
|
-
}
|
|
2355
|
-
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
2356
|
-
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
2357
|
-
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
2358
|
-
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
2359
|
-
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
2360
|
-
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
2361
|
-
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
2362
|
-
})($ || ($ = {}));
|
|
2363
|
-
//mol/log3/log3.web.ts
|
|
2364
|
-
;
|
|
2365
|
-
"use strict";
|
|
2366
|
-
var $;
|
|
2367
2379
|
(function ($) {
|
|
2368
2380
|
class $mol_storage extends $mol_object2 {
|
|
2369
2381
|
static native() {
|
|
@@ -2383,7 +2395,7 @@ var $;
|
|
|
2383
2395
|
native.persist().then(actual => {
|
|
2384
2396
|
setTimeout(() => this.persisted(actual, 'cache'), 5000);
|
|
2385
2397
|
if (actual)
|
|
2386
|
-
this.$.$
|
|
2398
|
+
this.$.$mol_log3_done({ place: `$mol_storage`, message: `Persist: Yes` });
|
|
2387
2399
|
else
|
|
2388
2400
|
this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
|
|
2389
2401
|
});
|
package/web.test.js
CHANGED
|
@@ -591,17 +591,6 @@ var $;
|
|
|
591
591
|
;
|
|
592
592
|
"use strict";
|
|
593
593
|
var $;
|
|
594
|
-
(function ($) {
|
|
595
|
-
function $mol_dom_serialize(node) {
|
|
596
|
-
const serializer = new $mol_dom_context.XMLSerializer;
|
|
597
|
-
return serializer.serializeToString(node);
|
|
598
|
-
}
|
|
599
|
-
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
600
|
-
})($ || ($ = {}));
|
|
601
|
-
//mol/dom/serialize/serialize.ts
|
|
602
|
-
;
|
|
603
|
-
"use strict";
|
|
604
|
-
var $;
|
|
605
594
|
(function ($) {
|
|
606
595
|
function $mol_assert_ok(value) {
|
|
607
596
|
if (value)
|
|
@@ -622,14 +611,12 @@ var $;
|
|
|
622
611
|
handler();
|
|
623
612
|
}
|
|
624
613
|
catch (error) {
|
|
625
|
-
if (!ErrorRight)
|
|
626
|
-
return error;
|
|
627
614
|
$.$mol_fail = fail;
|
|
628
615
|
if (typeof ErrorRight === 'string') {
|
|
629
616
|
$mol_assert_equal(error.message, ErrorRight);
|
|
630
617
|
}
|
|
631
618
|
else {
|
|
632
|
-
$
|
|
619
|
+
$mol_assert_equal(error instanceof ErrorRight, true);
|
|
633
620
|
}
|
|
634
621
|
return error;
|
|
635
622
|
}
|
|
@@ -639,58 +626,47 @@ var $;
|
|
|
639
626
|
$mol_fail(new Error('Not failed'));
|
|
640
627
|
}
|
|
641
628
|
$.$mol_assert_fail = $mol_assert_fail;
|
|
642
|
-
function $
|
|
643
|
-
|
|
644
|
-
for (let j = 0; j < args.length; ++j) {
|
|
645
|
-
if (i === j)
|
|
646
|
-
continue;
|
|
647
|
-
if (Number.isNaN(args[i]) && Number.isNaN(args[j]))
|
|
648
|
-
continue;
|
|
649
|
-
if (args[i] !== args[j])
|
|
650
|
-
$mol_fail(new Error(`Not equal (${i + 1}:${j + 1})\n${args[i]}\n${args[j]}`));
|
|
651
|
-
}
|
|
652
|
-
}
|
|
629
|
+
function $mol_assert_like(...args) {
|
|
630
|
+
$mol_assert_equal(...args);
|
|
653
631
|
}
|
|
654
|
-
$.$
|
|
632
|
+
$.$mol_assert_like = $mol_assert_like;
|
|
655
633
|
function $mol_assert_unique(...args) {
|
|
656
634
|
for (let i = 0; i < args.length; ++i) {
|
|
657
635
|
for (let j = 0; j < args.length; ++j) {
|
|
658
636
|
if (i === j)
|
|
659
637
|
continue;
|
|
660
|
-
if (
|
|
661
|
-
|
|
662
|
-
}
|
|
638
|
+
if (!$mol_compare_deep(args[i], args[j]))
|
|
639
|
+
continue;
|
|
640
|
+
$mol_fail(new Error(`args[${i}] = args[${j}] = ${args[i]}`));
|
|
663
641
|
}
|
|
664
642
|
}
|
|
665
643
|
}
|
|
666
644
|
$.$mol_assert_unique = $mol_assert_unique;
|
|
667
|
-
function $
|
|
668
|
-
for (let
|
|
669
|
-
if (
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
return val;
|
|
675
|
-
if ('outerHTML' in val)
|
|
676
|
-
return val.outerHTML;
|
|
677
|
-
try {
|
|
678
|
-
return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
|
|
679
|
-
}
|
|
680
|
-
catch (error) {
|
|
681
|
-
console.error(error);
|
|
682
|
-
return val;
|
|
683
|
-
}
|
|
684
|
-
};
|
|
685
|
-
return $mol_fail(new Error(`Not like (1:${+index + 2})\n${print(head)}\n---\n${print(value)}`));
|
|
686
|
-
}
|
|
645
|
+
function $mol_assert_equal(...args) {
|
|
646
|
+
for (let i = 1; i < args.length; ++i) {
|
|
647
|
+
if ($mol_compare_deep(args[0], args[i]))
|
|
648
|
+
continue;
|
|
649
|
+
if (args[0] instanceof $mol_dom_context.Element && args[i] instanceof $mol_dom_context.Element && args[0].outerHTML === args[i].outerHTML)
|
|
650
|
+
continue;
|
|
651
|
+
return $mol_fail(new Error(`args[0] ≠ args[${i}]\n${print(args[0])}\n---\n${print(args[i])}`));
|
|
687
652
|
}
|
|
688
653
|
}
|
|
689
|
-
$.$
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
654
|
+
$.$mol_assert_equal = $mol_assert_equal;
|
|
655
|
+
const print = (val) => {
|
|
656
|
+
if (!val)
|
|
657
|
+
return val;
|
|
658
|
+
if (typeof val !== 'object')
|
|
659
|
+
return val;
|
|
660
|
+
if ('outerHTML' in val)
|
|
661
|
+
return val.outerHTML;
|
|
662
|
+
try {
|
|
663
|
+
return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
|
|
664
|
+
}
|
|
665
|
+
catch (error) {
|
|
666
|
+
console.error(error);
|
|
667
|
+
return val;
|
|
668
|
+
}
|
|
669
|
+
};
|
|
694
670
|
})($ || ($ = {}));
|
|
695
671
|
//mol/assert/assert.ts
|
|
696
672
|
;
|
|
@@ -711,10 +687,10 @@ var $;
|
|
|
711
687
|
$mol_assert_equal(2, 2, 2);
|
|
712
688
|
},
|
|
713
689
|
'two must be unique'() {
|
|
714
|
-
$mol_assert_unique([
|
|
690
|
+
$mol_assert_unique([2], [3]);
|
|
715
691
|
},
|
|
716
692
|
'three must be unique'() {
|
|
717
|
-
$mol_assert_unique([
|
|
693
|
+
$mol_assert_unique([1], [2], [3]);
|
|
718
694
|
},
|
|
719
695
|
'two must be alike'() {
|
|
720
696
|
$mol_assert_like([3], [3]);
|
|
@@ -1738,7 +1714,7 @@ var $;
|
|
|
1738
1714
|
], App, "result", null);
|
|
1739
1715
|
$mol_assert_equal(App.result(), 1);
|
|
1740
1716
|
App.condition(true);
|
|
1741
|
-
$mol_assert_fail(() => App.result());
|
|
1717
|
+
$mol_assert_fail(() => App.result(), 'test error');
|
|
1742
1718
|
App.condition(false);
|
|
1743
1719
|
$mol_assert_equal(App.result(), 1);
|
|
1744
1720
|
},
|
|
@@ -2375,7 +2351,7 @@ var $;
|
|
|
2375
2351
|
return prev;
|
|
2376
2352
|
},
|
|
2377
2353
|
});
|
|
2378
|
-
$
|
|
2354
|
+
$mol_assert_equal(list, $mol_jsx("body", null,
|
|
2379
2355
|
$mol_jsx("p", { "data-rev": "old" }, "a"),
|
|
2380
2356
|
$mol_jsx("p", { "data-rev": "old" }, "b"),
|
|
2381
2357
|
$mol_jsx("p", { "data-rev": "old" }, "c")));
|
|
@@ -2400,7 +2376,7 @@ var $;
|
|
|
2400
2376
|
return prev;
|
|
2401
2377
|
},
|
|
2402
2378
|
});
|
|
2403
|
-
$
|
|
2379
|
+
$mol_assert_equal(list, $mol_jsx("body", null,
|
|
2404
2380
|
$mol_jsx("p", { "data-rev": "old" }, "a"),
|
|
2405
2381
|
$mol_jsx("p", { "data-rev": "old" }, "b"),
|
|
2406
2382
|
$mol_jsx("p", { "data-rev": "new" }, "X"),
|
|
@@ -2427,7 +2403,7 @@ var $;
|
|
|
2427
2403
|
return prev;
|
|
2428
2404
|
},
|
|
2429
2405
|
});
|
|
2430
|
-
$
|
|
2406
|
+
$mol_assert_equal(list, $mol_jsx("body", null,
|
|
2431
2407
|
$mol_jsx("p", { "data-rev": "old" }, "a"),
|
|
2432
2408
|
$mol_jsx("p", { "data-rev": "new" }, "b"),
|
|
2433
2409
|
$mol_jsx("p", { "data-rev": "up" }, "c"),
|
|
@@ -2455,7 +2431,7 @@ var $;
|
|
|
2455
2431
|
return prev;
|
|
2456
2432
|
},
|
|
2457
2433
|
});
|
|
2458
|
-
$
|
|
2434
|
+
$mol_assert_equal(list, $mol_jsx("body", null,
|
|
2459
2435
|
$mol_jsx("p", { "data-rev": "old" }, "A"),
|
|
2460
2436
|
$mol_jsx("p", { "data-rev": "old" }, "B"),
|
|
2461
2437
|
$mol_jsx("p", { "data-rev": "old" }, "C"),
|
|
@@ -2481,7 +2457,7 @@ var $;
|
|
|
2481
2457
|
return prev;
|
|
2482
2458
|
},
|
|
2483
2459
|
});
|
|
2484
|
-
$
|
|
2460
|
+
$mol_assert_equal(list, $mol_jsx("body", null,
|
|
2485
2461
|
$mol_jsx("p", { "data-rev": "old" }, "a"),
|
|
2486
2462
|
$mol_jsx("p", { "data-rev": "up" }, "X"),
|
|
2487
2463
|
$mol_jsx("p", { "data-rev": "up" }, "Y"),
|