@cocreate/crdt 1.9.9 → 1.10.0

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,24 @@
1
+ # [1.10.0](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.9.11...v1.10.0) (2022-05-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * function readDocumentList has been renamed to readDocuments ([6b7c24c](https://github.com/CoCreate-app/CoCreate-crdt/commit/6b7c24c360d4e74a82a68b9db0d9e5423b1142a1))
7
+
8
+ ## [1.9.11](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.9.10...v1.9.11) (2022-05-06)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update config organization_Id to organization_id ([a683683](https://github.com/CoCreate-app/CoCreate-crdt/commit/a6836834cfdece7c37a243a2e8e325dabf55681c))
14
+
15
+ ## [1.9.10](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.9.9...v1.9.10) (2022-03-22)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * removed emit from message.send and message.listen ([203f46d](https://github.com/CoCreate-app/CoCreate-crdt/commit/203f46ddd00a5f06cc77648a722619f41c3f1000))
21
+
1
22
  ## [1.9.9](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.9.8...v1.9.9) (2022-02-24)
2
23
 
3
24
 
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  "config": {
3
3
  "apiKey": "2061acef-0451-4545-f754-60cf8160",
4
- "organization_Id": "5ff747727005da1c272740ab",
4
+ "organization_id": "5ff747727005da1c272740ab",
5
5
  "host": "general.cocreate.app"
6
6
  },
7
7
  "sources": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/crdt",
3
- "version": "1.9.9",
3
+ "version": "1.10.0",
4
4
  "description": "CoCreate crdt",
5
5
  "author": "CoCreate LLC",
6
6
  "license": "SEE LICENSE",
package/src/index.js CHANGED
@@ -40,7 +40,7 @@ async function getDoc(info) {
40
40
  let changeLog = [];
41
41
 
42
42
  if (info.read != 'false') {
43
- let response = await crud.readDocumentList({
43
+ let response = await crud.readDocuments({
44
44
  collection: "crdt-transactions",
45
45
  operator: {
46
46
  filters: [{
@@ -182,10 +182,8 @@ function broadcastChange(info){
182
182
  message.send({
183
183
  room: "",
184
184
  broadcast_sender: 'false',
185
- emit: {
186
- message: "crdt",
187
- data: info
188
- }
185
+ message: "crdt",
186
+ data: info
189
187
  });
190
188
  }
191
189
 
@@ -217,7 +215,8 @@ function persistChange(info) {
217
215
  });
218
216
  }
219
217
 
220
- message.listen('crdt', function(data) {
218
+ message.listen('crdt', function(response) {
219
+ let data = response.data
221
220
  if (docs.get(`${data.collection}${data.document_id}`)){
222
221
  if (docs.get(`${data.collection}${data.document_id}`).get(data.name))
223
222
  if (data.clientId !== clientId){