hyoo_sync_client 0.0.12 → 0.0.14
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 +1 -0
- package/node.deps.json +1 -1
- package/node.js +14 -6
- package/node.js.map +1 -1
- package/node.mjs +14 -6
- package/node.mjs.map +1 -1
- package/node.test.js +14 -6
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -0
- package/web.deps.json +1 -1
- package/web.js +14 -6
- package/web.js.map +1 -1
- package/web.mjs +14 -6
- package/web.mjs.map +1 -1
package/web.mjs
CHANGED
|
@@ -32,7 +32,7 @@ $.$$ = $
|
|
|
32
32
|
//hyoo/hyoo.ts
|
|
33
33
|
;
|
|
34
34
|
"use strict";
|
|
35
|
-
let $hyoo_sync_revision = "
|
|
35
|
+
let $hyoo_sync_revision = "35aacaf";
|
|
36
36
|
//hyoo/sync/-meta.tree/revision.meta.tree.ts
|
|
37
37
|
;
|
|
38
38
|
"use strict";
|
|
@@ -2577,6 +2577,9 @@ var $;
|
|
|
2577
2577
|
this.pub.promote();
|
|
2578
2578
|
return this._clocks;
|
|
2579
2579
|
}
|
|
2580
|
+
get clocks_bin() {
|
|
2581
|
+
return new Uint8Array($hyoo_crowd_clock_bin.from(this.id(), this._clocks).buffer);
|
|
2582
|
+
}
|
|
2580
2583
|
pub = new $mol_wire_pub;
|
|
2581
2584
|
_clocks = [new $hyoo_crowd_clock, new $hyoo_crowd_clock];
|
|
2582
2585
|
_unit_all = new Map();
|
|
@@ -3653,6 +3656,13 @@ var $;
|
|
|
3653
3656
|
};
|
|
3654
3657
|
this.line_land_neck({ line, land: land_id }, [
|
|
3655
3658
|
handle(this.line_land_neck({ line, land: land_id })[0])
|
|
3659
|
+
.catch(error => {
|
|
3660
|
+
this.$.$mol_log3_fail({
|
|
3661
|
+
place: this,
|
|
3662
|
+
land: land_id,
|
|
3663
|
+
message: String(error?.message ?? error),
|
|
3664
|
+
});
|
|
3665
|
+
})
|
|
3656
3666
|
]);
|
|
3657
3667
|
}
|
|
3658
3668
|
line_send_clocks(line, land) { }
|
|
@@ -4016,7 +4026,7 @@ var $;
|
|
|
4016
4026
|
master() {
|
|
4017
4027
|
this.reconnects();
|
|
4018
4028
|
const link = this.master_link();
|
|
4019
|
-
const line = new $mol_dom_context.WebSocket(link);
|
|
4029
|
+
const line = new $mol_dom_context.WebSocket(link, ['$hyoo_sync']);
|
|
4020
4030
|
line.binaryType = 'arraybuffer';
|
|
4021
4031
|
line.onmessage = async (event) => {
|
|
4022
4032
|
if (event.data instanceof ArrayBuffer) {
|
|
@@ -4064,12 +4074,10 @@ var $;
|
|
|
4064
4074
|
}
|
|
4065
4075
|
line_send_clocks(line, land) {
|
|
4066
4076
|
if (line instanceof WebSocket) {
|
|
4067
|
-
|
|
4068
|
-
line.send(message);
|
|
4077
|
+
line.send(land.clocks_bin);
|
|
4069
4078
|
}
|
|
4070
4079
|
else {
|
|
4071
|
-
|
|
4072
|
-
line.postMessage(['hyoo_sync_clocks', land.id(), message]);
|
|
4080
|
+
line.postMessage(['hyoo_sync_clocks', land.id(), land._clocks]);
|
|
4073
4081
|
}
|
|
4074
4082
|
}
|
|
4075
4083
|
async line_send_units(line, units) {
|