@cocreate/state 1.26.2 → 1.28.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/.github/workflows/automated.yml +22 -20
- package/package.json +7 -9
- package/src/index.js +3 -3
|
@@ -9,33 +9,36 @@ jobs:
|
|
|
9
9
|
about:
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
|
-
- name: Checkout
|
|
13
|
-
uses: actions/checkout@
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
- name: Checkout repository
|
|
13
|
+
uses: actions/checkout@v7
|
|
14
|
+
|
|
15
|
+
- name: Sync package.json description to GitHub About
|
|
16
|
+
env:
|
|
17
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB }}
|
|
18
|
+
run: |
|
|
19
|
+
DESC=$(jq -r '.description // empty' package.json)
|
|
20
|
+
if [ -n "$DESC" ]; then
|
|
21
|
+
echo "Updating repository description to: $DESC"
|
|
22
|
+
gh api -X PATCH repos/${{ github.repository }} -f description="$DESC"
|
|
23
|
+
else
|
|
24
|
+
echo "No description found in package.json."
|
|
25
|
+
fi
|
|
23
26
|
|
|
24
27
|
release:
|
|
25
28
|
runs-on: ubuntu-latest
|
|
26
29
|
steps:
|
|
27
|
-
- name: Checkout
|
|
28
|
-
uses: actions/checkout@
|
|
30
|
+
- name: Checkout repository
|
|
31
|
+
uses: actions/checkout@v7
|
|
29
32
|
with:
|
|
30
|
-
fetch-depth: 0
|
|
33
|
+
fetch-depth: 0
|
|
34
|
+
token: ${{ secrets.GITHUB }} # Authenticates git CLI for tag/commit pushes
|
|
31
35
|
|
|
32
36
|
- name: Setup Node.js
|
|
33
|
-
uses: actions/setup-node@
|
|
37
|
+
uses: actions/setup-node@v7
|
|
34
38
|
with:
|
|
35
|
-
node-version:
|
|
39
|
+
node-version: '24'
|
|
36
40
|
|
|
37
41
|
- name: Install Semantic Release & Plugins
|
|
38
|
-
# Installs semantic-release and its plugins on the runner
|
|
39
42
|
run: |
|
|
40
43
|
npm install -g semantic-release \
|
|
41
44
|
@semantic-release/changelog \
|
|
@@ -43,12 +46,11 @@ jobs:
|
|
|
43
46
|
@semantic-release/github \
|
|
44
47
|
@semantic-release/git
|
|
45
48
|
|
|
46
|
-
- name: Run Semantic Release
|
|
49
|
+
- name: Run Semantic Release
|
|
47
50
|
id: semantic
|
|
48
|
-
# This will automatically pick up your export default config file in the repository root
|
|
49
51
|
run: npx semantic-release
|
|
50
52
|
env:
|
|
51
|
-
GITHUB_TOKEN: "${{ secrets.
|
|
53
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB }}"
|
|
52
54
|
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
|
|
53
55
|
|
|
54
56
|
outputs:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/state",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"description": "Data attributes which can be used for components in CoCreate framework combined as a group of attributes that dynamically change attributes & fetch custom data.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"state",
|
|
@@ -36,15 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"main": "./src/index.js",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cocreate/actions": "^1.
|
|
40
|
-
"@cocreate/crud-client": "^1.
|
|
41
|
-
"@cocreate/element-prototype": "^1.
|
|
42
|
-
"@cocreate/local-storage": "^1.
|
|
43
|
-
"@cocreate/observer": "^1.
|
|
44
|
-
"@cocreate/uuid": "^1.12.4"
|
|
39
|
+
"@cocreate/actions": "^1.23.0",
|
|
40
|
+
"@cocreate/crud-client": "^1.36.0",
|
|
41
|
+
"@cocreate/element-prototype": "^1.34.0",
|
|
42
|
+
"@cocreate/local-storage": "^1.18.0",
|
|
43
|
+
"@cocreate/observer": "^1.21.0"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"@cocreate/webpack": "^1.
|
|
46
|
+
"@cocreate/webpack": "^1.7.0"
|
|
48
47
|
},
|
|
49
48
|
"allowScripts": {
|
|
50
49
|
"@cocreate/actions@1.21.4": true,
|
|
@@ -61,7 +60,6 @@
|
|
|
61
60
|
"@cocreate/render@1.46.1": true,
|
|
62
61
|
"@cocreate/socket-client@1.40.5": true,
|
|
63
62
|
"@cocreate/utils@1.42.2": true,
|
|
64
|
-
"@cocreate/uuid@1.12.4": true,
|
|
65
63
|
"@cocreate/webpack@1.4.3": true
|
|
66
64
|
}
|
|
67
65
|
}
|
package/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@cocreate/element-prototype";
|
|
2
2
|
import Observer from "@cocreate/observer";
|
|
3
3
|
import Action from "@cocreate/actions";
|
|
4
|
-
import
|
|
4
|
+
import { uuid } from "@cocreate/utils";
|
|
5
5
|
import storage from "@cocreate/local-storage";
|
|
6
6
|
|
|
7
7
|
const { localStorage, sessionStorage } = storage;
|
|
@@ -203,8 +203,8 @@ async function _getAttributeValues(element) {
|
|
|
203
203
|
for (let attribute of attributes) {
|
|
204
204
|
if (attribute.name.startsWith("state.")) {
|
|
205
205
|
const key = attribute.name.slice(6);
|
|
206
|
-
if (attribute.value == "$
|
|
207
|
-
Object.assign(attributeValues, { [key]:
|
|
206
|
+
if (attribute.value == "$uuid") {
|
|
207
|
+
Object.assign(attributeValues, { [key]: uuid(6) });
|
|
208
208
|
} else if (key === "value" && !attribute.value) {
|
|
209
209
|
Object.assign(attributeValues, { value: await element.getValue() });
|
|
210
210
|
} else {
|