@cocreate/cli 1.20.0 → 1.20.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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/commands/fs/automated.js +2 -6
- package/src/commands/fs/bump.js +3 -6
- package/src/commands/fs/config.js +0 -1
- package/src/commands/fs/contribution.js +0 -4
- package/src/commands/fs/gitignore.js +4 -11
- package/src/commands/fs/manual.js +7 -9
- package/src/commands/fs/readme.js +0 -1
- package/src/commands/fs/remove.js +0 -2
- package/src/commands/fs/replace.js +0 -1
- package/src/commands/fs/webpack.js +2 -2
- package/src/commands/other/nginxConfigManager.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.20.1](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.20.0...v1.20.1) (2023-04-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update demo domains clean code ([aafd70d](https://github.com/CoCreate-app/CoCreate-cli/commit/aafd70d2c29d7bb0837e8e90c0c12d8025899587))
|
|
7
|
+
|
|
1
8
|
# [1.20.0](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.19.8...v1.20.0) (2023-04-23)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cli",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.1",
|
|
4
4
|
"description": "Polyrepo management bash CLI tool. Run all git commands and yarn commands on multiple repositories. Also includes a few custom macros for cloning, installing, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
let glob = require("glob");
|
|
2
2
|
let fs = require('fs');
|
|
3
|
-
const prettier = require("prettier");
|
|
4
3
|
const path = require("path")
|
|
5
4
|
|
|
6
5
|
function globUpdater(er, files) {
|
|
@@ -20,7 +19,6 @@ function globUpdater(er, files) {
|
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
function update(YmlPath) {
|
|
23
|
-
// component name
|
|
24
22
|
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).substring(9);
|
|
25
23
|
let fileContent = `name: Automated Workflow
|
|
26
24
|
'on':
|
|
@@ -108,12 +106,10 @@ jobs:
|
|
|
108
106
|
uses: CoCreate-app/CoCreate-docs@master
|
|
109
107
|
|
|
110
108
|
`;
|
|
111
|
-
let formated = prettier.format(fileContent, { semi: false, parser: "yaml" });
|
|
112
|
-
// console.log(fileContent);
|
|
113
109
|
// process.exit()
|
|
114
110
|
if (fs.existsSync(YmlPath))
|
|
115
|
-
|
|
116
|
-
fs.writeFileSync(YmlPath,
|
|
111
|
+
fs.unlinkSync(YmlPath)
|
|
112
|
+
fs.writeFileSync(YmlPath, fileContent)
|
|
117
113
|
|
|
118
114
|
}
|
|
119
115
|
|
package/src/commands/fs/bump.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
let fs = require('fs');
|
|
3
|
-
const prettier = require("prettier");
|
|
4
3
|
let list = require('../../../repositories.js');
|
|
5
4
|
const path = require("path")
|
|
6
5
|
|
|
@@ -62,16 +61,14 @@ function bumpVersion(filePath, name) {
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
let
|
|
66
|
-
let formated = prettier.format(str, { semi: false, parser: "json" });
|
|
64
|
+
let fileContent = JSON.stringify(object, null, 4)
|
|
67
65
|
|
|
68
66
|
filePath = filePath.replace('/package.json', '')
|
|
69
67
|
let Path = path.resolve(filePath, 'package.json')
|
|
70
|
-
if (fs.existsSync(Path))
|
|
68
|
+
if (fs.existsSync(Path))
|
|
71
69
|
fs.unlinkSync(Path)
|
|
72
|
-
}
|
|
73
70
|
|
|
74
|
-
fs.writeFileSync(Path,
|
|
71
|
+
fs.writeFileSync(Path, fileContent)
|
|
75
72
|
}
|
|
76
73
|
}
|
|
77
74
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
let fs = require('fs');
|
|
2
2
|
const prettier = require("prettier");
|
|
3
3
|
const path = require("path")
|
|
4
|
-
const { promisify } = require('util');
|
|
5
|
-
const exec = promisify(require('child_process').exec)
|
|
6
4
|
let list = require('../repositories.js');
|
|
7
5
|
|
|
8
6
|
|
|
@@ -35,13 +33,11 @@ let metaYarnLink = list.map(meta => {
|
|
|
35
33
|
(async() => {
|
|
36
34
|
for (let meta of metaYarnLink) {
|
|
37
35
|
await update(meta)
|
|
38
|
-
// await updateYarnLink(metaYarnLink[0])
|
|
39
36
|
}
|
|
40
37
|
})();
|
|
41
38
|
|
|
42
39
|
|
|
43
40
|
function update(param) {
|
|
44
|
-
// component name
|
|
45
41
|
if (!param) return;
|
|
46
42
|
let { packageObj, absolutePath } = param;
|
|
47
43
|
let { name, description } = packageObj;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
let glob = require("glob");
|
|
2
2
|
let fs = require('fs');
|
|
3
|
-
const prettier = require("prettier");
|
|
4
3
|
const path = require("path")
|
|
5
4
|
|
|
6
5
|
function globUpdater(er, files) {
|
|
@@ -13,22 +12,16 @@ function globUpdater(er, files) {
|
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
|
|
16
|
-
function update(
|
|
17
|
-
// component name
|
|
18
|
-
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).substring(9);
|
|
15
|
+
function update(Path) {
|
|
19
16
|
let fileContent = `# ignore
|
|
20
17
|
node_modules
|
|
21
18
|
dist
|
|
22
19
|
.npmrc
|
|
23
20
|
|
|
24
21
|
`;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (fs.existsSync(YmlPath))
|
|
29
|
-
fs.unlinkSync(YmlPath)
|
|
30
|
-
fs.writeFileSync(YmlPath, formated)
|
|
31
|
-
|
|
22
|
+
if (fs.existsSync(Path))
|
|
23
|
+
fs.unlinkSync(Path)
|
|
24
|
+
fs.writeFileSync(Path, fileContent)
|
|
32
25
|
|
|
33
26
|
}
|
|
34
27
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
let glob = require("glob");
|
|
2
2
|
let fs = require('fs');
|
|
3
|
-
const prettier = require("prettier");
|
|
4
3
|
const path = require("path")
|
|
5
4
|
|
|
6
5
|
function globUpdater(er, files) {
|
|
@@ -19,9 +18,9 @@ function globUpdater(er, files) {
|
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
|
|
22
|
-
function update(
|
|
21
|
+
function update(Path) {
|
|
23
22
|
// component name
|
|
24
|
-
let name = path.basename(path.resolve(path.dirname(
|
|
23
|
+
let name = path.basename(path.resolve(path.dirname(Path), '../..')).substring(9);
|
|
25
24
|
let fileContent = `name: Manual Workflow
|
|
26
25
|
on:
|
|
27
26
|
workflow_dispatch:
|
|
@@ -68,12 +67,11 @@ jobs:
|
|
|
68
67
|
invalidations: \${{ github.event.inputs.invalidations }}
|
|
69
68
|
|
|
70
69
|
`;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
fs.
|
|
76
|
-
fs.writeFileSync(YmlPath, formated)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
if (fs.existsSync(Path))
|
|
73
|
+
fs.unlinkSync(Path)
|
|
74
|
+
fs.writeFileSync(Path, fileContent)
|
|
77
75
|
|
|
78
76
|
}
|
|
79
77
|
|
|
@@ -31,9 +31,9 @@ function update(webpackPath) {
|
|
|
31
31
|
let entry;
|
|
32
32
|
|
|
33
33
|
if (fs.existsSync( path.resolve(dir, './src/index.js') ))
|
|
34
|
-
|
|
34
|
+
entry = "./src/index.js";
|
|
35
35
|
else
|
|
36
|
-
|
|
36
|
+
entry = './src/' + name + '.js';
|
|
37
37
|
|
|
38
38
|
// get component name in came case "cocreate" less
|
|
39
39
|
let componentName = toCamelCase(name);
|
|
@@ -101,7 +101,7 @@ async function deleteServer(hosts) {
|
|
|
101
101
|
return response
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// createServer(['cocreate.app'
|
|
105
|
-
// deleteServer(['cocreate.
|
|
104
|
+
// createServer(['cocreate.app'])
|
|
105
|
+
// deleteServer(['cocreate.app'])
|
|
106
106
|
|
|
107
107
|
module.exports = {createServer, deleteServer}
|