@cocreate/crdt 1.21.3 → 1.22.1
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/.github/workflows/automated.yml +0 -26
- package/CHANGELOG.md +14 -0
- package/docs/index.html +0 -1
- package/package.json +5 -5
- package/src/index.js +7 -4
|
@@ -41,30 +41,4 @@ jobs:
|
|
|
41
41
|
outputs:
|
|
42
42
|
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
|
|
43
43
|
new_release_version: "${{ steps.semantic.outputs.new_release_version }}"
|
|
44
|
-
upload:
|
|
45
|
-
runs-on: ubuntu-latest
|
|
46
|
-
needs: release
|
|
47
|
-
if: needs.release.outputs.new_release_published == 'true'
|
|
48
|
-
env:
|
|
49
|
-
VERSION: "${{ needs.release.outputs.new_release_version }}"
|
|
50
|
-
steps:
|
|
51
|
-
- name: Checkout
|
|
52
|
-
uses: actions/checkout@v3
|
|
53
|
-
- name: Setup Node.js
|
|
54
|
-
uses: actions/setup-node@v3
|
|
55
|
-
with:
|
|
56
|
-
node-version: 16
|
|
57
|
-
- name: Set npm registry auth
|
|
58
|
-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
59
|
-
- name: Install dependencies
|
|
60
|
-
run: yarn install
|
|
61
|
-
- name: Build
|
|
62
|
-
run: yarn build
|
|
63
|
-
- name: Set Environment Variables
|
|
64
|
-
run: |
|
|
65
|
-
echo "organization_id=${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
|
|
66
|
-
echo "key=${{ secrets.COCREATE_KEY }}" >> $GITHUB_ENV
|
|
67
|
-
echo "host=${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
|
|
68
|
-
- name: CoCreate Upload
|
|
69
|
-
run: coc upload
|
|
70
44
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.22.1](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.22.0...v1.22.1) (2023-10-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added listener for update and create ([86c3f43](https://github.com/CoCreate-app/CoCreate-crdt/commit/86c3f43da5027d5a72a4ba4f20e815b53bffc3ad))
|
|
7
|
+
|
|
8
|
+
# [1.22.0](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.21.3...v1.22.0) (2023-09-19)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Update CoCreate dependencies to their latest versions ([f44d879](https://github.com/CoCreate-app/CoCreate-crdt/commit/f44d879d0d82174c9b59c105bac9a14f904876f1))
|
|
14
|
+
|
|
1
15
|
## [1.21.3](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.21.2...v1.21.3) (2023-09-18)
|
|
2
16
|
|
|
3
17
|
|
package/docs/index.html
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/crdt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "CoCreate crdt",
|
|
5
5
|
"author": "CoCreate LLC",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"webpack-log": "^3.0.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cocreate/crud-client": "^1.
|
|
44
|
-
"@cocreate/local-storage": "^1.10.
|
|
45
|
-
"@cocreate/message-client": "^1.
|
|
46
|
-
"@cocreate/utils": "^1.24.
|
|
43
|
+
"@cocreate/crud-client": "^1.27.0",
|
|
44
|
+
"@cocreate/local-storage": "^1.10.2",
|
|
45
|
+
"@cocreate/message-client": "^1.8.0",
|
|
46
|
+
"@cocreate/utils": "^1.24.2"
|
|
47
47
|
}
|
|
48
48
|
}
|
package/src/index.js
CHANGED
|
@@ -222,8 +222,8 @@ function insertChange(data, flag) {
|
|
|
222
222
|
function broadcastChange(data) {
|
|
223
223
|
message.send({
|
|
224
224
|
room: "",
|
|
225
|
-
broadcastSender:
|
|
226
|
-
broadcastBrowser:
|
|
225
|
+
broadcastSender: false,
|
|
226
|
+
broadcastBrowser: true,
|
|
227
227
|
message: "crdt",
|
|
228
228
|
data
|
|
229
229
|
});
|
|
@@ -278,7 +278,10 @@ message.listen('crdt', function (response) {
|
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
280
|
|
|
281
|
-
crud.listen('
|
|
281
|
+
crud.listen('update.object', (data) => sync(data))
|
|
282
|
+
crud.listen('delete.object', (data) => sync(data))
|
|
283
|
+
|
|
284
|
+
function sync(data) {
|
|
282
285
|
if (data.array.includes('crdt-transactions')) {
|
|
283
286
|
if (data.object && data.object[0]) {
|
|
284
287
|
let Data = data.object[0];
|
|
@@ -297,8 +300,8 @@ crud.listen('sync', function (data) {
|
|
|
297
300
|
}
|
|
298
301
|
}
|
|
299
302
|
}
|
|
300
|
-
});
|
|
301
303
|
|
|
304
|
+
}
|
|
302
305
|
|
|
303
306
|
/*
|
|
304
307
|
crdt.getText({
|