hyoo_sync_client 0.0.268 → 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 +8 -6
- package/node.js.map +1 -1
- package/node.mjs +8 -6
- package/node.test.js +51 -73
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.audit.js +1 -1
- package/web.deps.json +1 -1
- package/web.js +4 -2
- package/web.js.map +1 -1
- package/web.mjs +4 -2
- package/web.test.js +38 -62
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -2326,7 +2326,9 @@ var $;
|
|
|
2326
2326
|
var $;
|
|
2327
2327
|
(function ($) {
|
|
2328
2328
|
function $mol_wire_solid() {
|
|
2329
|
-
|
|
2329
|
+
let current = $mol_wire_auto();
|
|
2330
|
+
if (current.temp)
|
|
2331
|
+
current = current.host;
|
|
2330
2332
|
if (current.reap !== nothing) {
|
|
2331
2333
|
current?.sub_on(sub, sub.data.length);
|
|
2332
2334
|
}
|
|
@@ -2393,7 +2395,7 @@ var $;
|
|
|
2393
2395
|
native.persist().then(actual => {
|
|
2394
2396
|
setTimeout(() => this.persisted(actual, 'cache'), 5000);
|
|
2395
2397
|
if (actual)
|
|
2396
|
-
this.$.$
|
|
2398
|
+
this.$.$mol_log3_done({ place: `$mol_storage`, message: `Persist: Yes` });
|
|
2397
2399
|
else
|
|
2398
2400
|
this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
|
|
2399
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"),
|