@cocreate/config 1.2.0 → 1.4.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 +70 -123
- package/CHANGELOG.md +21 -0
- package/demo/index.html +1 -1
- package/docs/index.html +1 -1
- package/package.json +2 -2
- package/src/server.js +2 -2
|
@@ -1,123 +1,70 @@
|
|
|
1
|
-
name: Automated
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
bucket: testcrudbucket
|
|
72
|
-
source: ./dist
|
|
73
|
-
destination: "/config/${{env.VERSION}}"
|
|
74
|
-
acl: public-read
|
|
75
|
-
- name: upload bundle as latest
|
|
76
|
-
uses: CoCreate-app/CoCreate-s3@master
|
|
77
|
-
with:
|
|
78
|
-
aws-key-id: "${{ secrets.AWSACCESSKEYID }}"
|
|
79
|
-
aws-access-key: "${{ secrets.AWSSECERTACCESSKEY }}"
|
|
80
|
-
bucket: testcrudbucket
|
|
81
|
-
source: ./dist
|
|
82
|
-
destination: /config/latest
|
|
83
|
-
acl: public-read
|
|
84
|
-
invalidations: true
|
|
85
|
-
upload:
|
|
86
|
-
runs-on: ubuntu-latest
|
|
87
|
-
|
|
88
|
-
steps:
|
|
89
|
-
- name: Checkout
|
|
90
|
-
uses: actions/checkout@v3
|
|
91
|
-
|
|
92
|
-
- name: Setup Node.js
|
|
93
|
-
uses: actions/setup-node@v3
|
|
94
|
-
with:
|
|
95
|
-
node-version: 16
|
|
96
|
-
|
|
97
|
-
- name: Get Environment Variables
|
|
98
|
-
run: |
|
|
99
|
-
echo "organization_id=${{ secrets.COCREATE_ORGANIZATION_ID }}" >> $GITHUB_ENV
|
|
100
|
-
echo "key=${{ secrets.COCREATE_KEY }}" >> $GITHUB_ENV
|
|
101
|
-
echo "host=${{ secrets.COCREATE_HOST }}" >> $GITHUB_ENV
|
|
102
|
-
|
|
103
|
-
- name: Install @cocreate/cli
|
|
104
|
-
run: npm install -g @cocreate/cli
|
|
105
|
-
|
|
106
|
-
- name: CoCreate CLI Upload
|
|
107
|
-
run: coc upload
|
|
108
|
-
|
|
109
|
-
# docs:
|
|
110
|
-
# runs-on: ubuntu-latest
|
|
111
|
-
# steps:
|
|
112
|
-
# - name: Checkout
|
|
113
|
-
# uses: actions/checkout@v3
|
|
114
|
-
# - name: setup nodejs
|
|
115
|
-
# uses: actions/setup-node@v3
|
|
116
|
-
# with:
|
|
117
|
-
# node-version: 16
|
|
118
|
-
# - name: update documentation
|
|
119
|
-
# uses: CoCreate-app/CoCreate-docs@master
|
|
120
|
-
# env:
|
|
121
|
-
# organization_id: ${{ secrets.COCREATE_ORGANIZATION_ID }}
|
|
122
|
-
# key: ${{ secrets.COCREATE_KEY }}
|
|
123
|
-
# host: ${{ secrets.COCREATE_HOST }}
|
|
1
|
+
name: Automated Workflow
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- master
|
|
6
|
+
jobs:
|
|
7
|
+
about:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- name: Checkout
|
|
11
|
+
uses: actions/checkout@v3
|
|
12
|
+
- name: Setup Node.js
|
|
13
|
+
uses: actions/setup-node@v3
|
|
14
|
+
with:
|
|
15
|
+
node-version: 16
|
|
16
|
+
- name: Jaid/action-sync-node-meta
|
|
17
|
+
uses: jaid/action-sync-node-meta@v1.4.0
|
|
18
|
+
with:
|
|
19
|
+
direction: overwrite-github
|
|
20
|
+
githubToken: "${{ secrets.GITHUB }}"
|
|
21
|
+
release:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v3
|
|
26
|
+
- name: Setup Node.js
|
|
27
|
+
uses: actions/setup-node@v3
|
|
28
|
+
with:
|
|
29
|
+
node-version: 14
|
|
30
|
+
- name: Semantic Release
|
|
31
|
+
uses: cycjimmy/semantic-release-action@v3
|
|
32
|
+
id: semantic
|
|
33
|
+
with:
|
|
34
|
+
extra_plugins: |
|
|
35
|
+
@semantic-release/changelog
|
|
36
|
+
@semantic-release/git
|
|
37
|
+
@semantic-release/github
|
|
38
|
+
env:
|
|
39
|
+
GITHUB_TOKEN: "${{ secrets.GITHUB }}"
|
|
40
|
+
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
|
|
41
|
+
outputs:
|
|
42
|
+
new_release_published: "${{ steps.semantic.outputs.new_release_published }}"
|
|
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
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
# [1.4.0](https://github.com/CoCreate-app/CoCreate-config/compare/v1.3.0...v1.4.0) (2023-08-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* /dist/CoCreate.js updated to https://CoCreate.app/dist/CoCreate.js ([d98d3ab](https://github.com/CoCreate-app/CoCreate-config/commit/d98d3abe1a9ae7d05519114283df14149ec8e67e))
|
|
7
|
+
* replace cdn with /dist ([3054826](https://github.com/CoCreate-app/CoCreate-config/commit/3054826225c7d0afd618f93356caf741aa1aa5d2))
|
|
8
|
+
* update file uploader ([99d5aae](https://github.com/CoCreate-app/CoCreate-config/commit/99d5aaed04cc4556fe7325a59b623484553f31c3))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* configPath option to define a custom local config ([c2916b6](https://github.com/CoCreate-app/CoCreate-config/commit/c2916b69ca9bba1902742bbb0d481202819093d4))
|
|
14
|
+
|
|
15
|
+
# [1.3.0](https://github.com/CoCreate-app/CoCreate-config/compare/v1.2.0...v1.3.0) (2023-08-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* bump cocreate dependencies for the latest updates and features ([bfd5d83](https://github.com/CoCreate-app/CoCreate-config/commit/bfd5d834433805b9d3feccff272ca6c46fbf2fb1))
|
|
21
|
+
|
|
1
22
|
# [1.2.0](https://github.com/CoCreate-app/CoCreate-config/compare/v1.1.1...v1.2.0) (2023-08-16)
|
|
2
23
|
|
|
3
24
|
|
package/demo/index.html
CHANGED
package/docs/index.html
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "A convenient chain handler allows user to chain multiple CoCreate components together. When one action is complete next one will start. The sequence goes untill all config completed. Grounded on Vanilla javascript, easily configured using HTML5 attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
"webpack-log": "^3.0.1"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@cocreate/utils": "^1.
|
|
62
|
+
"@cocreate/utils": "^1.22.0"
|
|
63
63
|
}
|
|
64
64
|
}
|
package/src/server.js
CHANGED
|
@@ -4,7 +4,7 @@ const path = require('path');
|
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const { dotNotationToObject, getValueFromObject } = require('@cocreate/utils');
|
|
6
6
|
|
|
7
|
-
module.exports = async function (items, env = true, global = true) {
|
|
7
|
+
module.exports = async function (items, env = true, global = true, configPath = 'CoCreate.config.js') {
|
|
8
8
|
async function promptForInput(question) {
|
|
9
9
|
const rl = readline.createInterface({
|
|
10
10
|
input: process.stdin,
|
|
@@ -112,7 +112,7 @@ module.exports = async function (items, env = true, global = true) {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
let localConfig = {};
|
|
115
|
-
const localConfigPath = path.resolve(process.cwd(),
|
|
115
|
+
const localConfigPath = path.resolve(process.cwd(), configPath);
|
|
116
116
|
if (fs.existsSync(localConfigPath)) {
|
|
117
117
|
localConfig = require(localConfigPath);
|
|
118
118
|
}
|