@cocreate/crdt 1.13.3 → 1.13.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/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [1.13.5](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.13.4...v1.13.5) (2022-09-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * get clientId from socket object ([a2f5b68](https://github.com/CoCreate-app/CoCreate-crdt/commit/a2f5b68a7d8ba1ecee0f66d7d9254cc236deaeaf))
7
+
8
+ ## [1.13.4](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.13.3...v1.13.4) (2022-09-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bumped dependencies ([8cebe54](https://github.com/CoCreate-app/CoCreate-crdt/commit/8cebe5497ac9256c35f146bf42b79001b50b02dc))
14
+ * readDocumnts - operator.filters renamed to filter.query ([dbad4f2](https://github.com/CoCreate-app/CoCreate-crdt/commit/dbad4f2a16d56f7edd12395c8c16ce156cd021d6))
15
+ * update filter value to string and add data.data._id ([00d2715](https://github.com/CoCreate-app/CoCreate-crdt/commit/00d27152c115f1cf77e8c2dd6edbe39a736a8574))
16
+
1
17
  ## [1.13.3](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.13.2...v1.13.3) (2022-09-01)
2
18
 
3
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/crdt",
3
- "version": "1.13.3",
3
+ "version": "1.13.5",
4
4
  "description": "CoCreate crdt",
5
5
  "author": "CoCreate LLC",
6
6
  "license": "SEE LICENSE",
@@ -43,8 +43,8 @@
43
43
  "webpack-log": "^3.0.1"
44
44
  },
45
45
  "dependencies": {
46
- "@cocreate/crud-client": "^1.10.0",
47
- "@cocreate/message-client": "^1.1.73",
48
- "@cocreate/utils": "^1.10.0"
46
+ "@cocreate/crud-client": "^1.10.1",
47
+ "@cocreate/message-client": "^1.1.74",
48
+ "@cocreate/utils": "^1.10.1"
49
49
  }
50
50
  }
package/src/index.js CHANGED
@@ -4,7 +4,7 @@ import message from '@cocreate/message-client';
4
4
  import uuid from '@cocreate/uuid';
5
5
 
6
6
  const docs = new Map();
7
- const clientId = config.clientId || window.CoCreateSockets.clientId || uuid.generate(12);
7
+ const clientId = crud.socket.clientId || uuid.generate(12);
8
8
  const checkedDb = new Map();
9
9
  const isInit = new Map();
10
10
 
@@ -49,11 +49,11 @@ async function getDoc(info) {
49
49
  if (info.read != 'false') {
50
50
  let response = await crud.readDocuments({
51
51
  collection: "crdt-transactions",
52
- operator: {
53
- filters: [{
52
+ filter: {
53
+ query: [{
54
54
  name: 'docName',
55
55
  operator: "$eq",
56
- value: [docName]
56
+ value: docName
57
57
  }]
58
58
  }
59
59
  });
@@ -213,6 +213,7 @@ function persistChange(info) {
213
213
  collection: 'crdt-transactions',
214
214
  document_id: info.document_id,
215
215
  data: {
216
+ _id: info.document_id,
216
217
  docName,
217
218
  [typeName]: changeLog
218
219
  },