@cuboapp/crdt 1.0.3 → 1.0.5
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/package.json +1 -1
- package/src/index.ts +4 -1
- package/src/yjs/index.ts +6 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/yjs/index.ts
CHANGED
|
@@ -43,7 +43,9 @@ export class CuboCrdtDocument {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
async init() {
|
|
46
|
-
|
|
46
|
+
if (this.opts.debug) {
|
|
47
|
+
console.log('init doc', this.opts.name)
|
|
48
|
+
}
|
|
47
49
|
|
|
48
50
|
this.ydoc = new Doc({
|
|
49
51
|
...(this.opts?.yjsOptions || {}),
|
|
@@ -95,7 +97,9 @@ export class CuboCrdtDocument {
|
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
async write(dto: object) {
|
|
98
|
-
|
|
100
|
+
if (this.opts.debug) {
|
|
101
|
+
console.log('CRDT write document', this.opts.name, dto)
|
|
102
|
+
}
|
|
99
103
|
|
|
100
104
|
return new Promise<void>(async (resolve) => {
|
|
101
105
|
const map = this.getMap()
|