@cocreate/cli 1.19.6 → 1.19.8
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 +14 -0
- package/package.json +3 -3
- package/src/addMeta.js +1 -1
- package/src/coc.js +1 -1
- package/src/commands/fs/automated.js +1 -1
- package/src/commands/fs/config.js +5 -5
- package/src/commands/fs/contribution.js +2 -2
- package/src/commands/fs/gitignore.js +1 -1
- package/src/commands/fs/manual.js +1 -1
- package/src/commands/fs/readme.js +2 -2
- package/src/commands/fs/replace.js +1 -1
- package/src/commands/fs/webpack.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.19.8](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.19.7...v1.19.8) (2023-04-13)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* replaced substr with substring ([5e2d166](https://github.com/CoCreate-app/CoCreate-cli/commit/5e2d166a4dc8ee07616fc9aff38845bed98f2a1e))
|
|
7
|
+
|
|
8
|
+
## [1.19.7](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.19.6...v1.19.7) (2023-04-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* bump dependencies ([de4a6e6](https://github.com/CoCreate-app/CoCreate-cli/commit/de4a6e6f49e8f4245ffa398799f3068f5aacefda))
|
|
14
|
+
|
|
1
15
|
## [1.19.6](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.19.5...v1.19.6) (2023-04-11)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cli",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.8",
|
|
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",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"webpack-log": "^3.0.1"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@cocreate/docs": "^1.6.
|
|
76
|
-
"@cocreate/hosting": "^1.8.
|
|
75
|
+
"@cocreate/docs": "^1.6.5",
|
|
76
|
+
"@cocreate/hosting": "^1.8.5",
|
|
77
77
|
"colors": "latest",
|
|
78
78
|
"glob": "^7.1.7",
|
|
79
79
|
"got": "latest",
|
package/src/addMeta.js
CHANGED
|
@@ -7,7 +7,7 @@ module.exports = async function addMeta(repos, failed, directory) {
|
|
|
7
7
|
let packageManager;
|
|
8
8
|
for (let i = 0; i < repos.length; i++) {
|
|
9
9
|
repos[i].name = path.basename(repos[i].path);
|
|
10
|
-
repos[i].plainName = repos[i].name.
|
|
10
|
+
repos[i].plainName = repos[i].name.substring(9);
|
|
11
11
|
|
|
12
12
|
if (directory) {
|
|
13
13
|
repos[i].absolutePath = path.resolve(directory, repos[i].path);
|
package/src/coc.js
CHANGED
|
@@ -50,7 +50,7 @@ if (config['c'] && fs.existsSync(config['c'])) {
|
|
|
50
50
|
} else if (fs.existsSync(packageJsonPath)) {
|
|
51
51
|
let repoPath = path.resolve(process.cwd());
|
|
52
52
|
let packageObj = require(packageJsonPath);
|
|
53
|
-
let repoUrl = packageObj.repository.url.
|
|
53
|
+
let repoUrl = packageObj.repository.url.substring(12);
|
|
54
54
|
repos = [{
|
|
55
55
|
path: `${repoPath}`,
|
|
56
56
|
repo: `${repoUrl}`
|
|
@@ -21,7 +21,7 @@ function globUpdater(er, files) {
|
|
|
21
21
|
|
|
22
22
|
function update(YmlPath) {
|
|
23
23
|
// component name
|
|
24
|
-
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).
|
|
24
|
+
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).substring(9);
|
|
25
25
|
let fileContent = `name: Automated Workflow
|
|
26
26
|
'on':
|
|
27
27
|
push:
|
|
@@ -14,15 +14,15 @@ function globUpdater(er, files) {
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
function update(MdPath) {
|
|
17
|
-
let name = path.basename(path.resolve(path.dirname(MdPath), './')).
|
|
17
|
+
let name = path.basename(path.resolve(path.dirname(MdPath), './')).substring(9);
|
|
18
18
|
let document_id = '';
|
|
19
19
|
let replaceContent = fs.readFileSync(MdPath).toString();
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
let content_source = replaceContent.
|
|
23
|
-
let content1 = content_source.
|
|
24
|
-
let content2 = content1.
|
|
25
|
-
document_id = content2.
|
|
22
|
+
let content_source = replaceContent.substring(replaceContent.indexOf("sources"));
|
|
23
|
+
let content1 = content_source.substring(content_source.indexOf("document_id"));
|
|
24
|
+
let content2 = content1.substring(content1.indexOf(':'));
|
|
25
|
+
document_id = content2.substring(3, content2.indexOf(',') - 4);
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
let fileContent = `module.exports = {
|
|
@@ -21,7 +21,7 @@ let metaYarnLink = list.map(meta => {
|
|
|
21
21
|
let packageObj = require(packagejson);
|
|
22
22
|
|
|
23
23
|
let packageName = name.startsWith('cocreate-') ?
|
|
24
|
-
'@cocreate/' + name.
|
|
24
|
+
'@cocreate/' + name.substring(9) : packageObj.name;
|
|
25
25
|
|
|
26
26
|
return { ...meta, name, packageName, absolutePath, packageObj }
|
|
27
27
|
}
|
|
@@ -45,7 +45,7 @@ function update(param) {
|
|
|
45
45
|
if (!param) return;
|
|
46
46
|
let { packageObj, absolutePath } = param;
|
|
47
47
|
let { name, description } = packageObj;
|
|
48
|
-
let shortName = name.
|
|
48
|
+
let shortName = name.substring(10);
|
|
49
49
|
let fileContent = `# CoCreate-${shortName}
|
|
50
50
|
${description} Take it for a spin in our [playground!](https://cocreate.app/docs/${shortName})
|
|
51
51
|
|
|
@@ -15,7 +15,7 @@ function globUpdater(er, files) {
|
|
|
15
15
|
|
|
16
16
|
function update(YmlPath) {
|
|
17
17
|
// component name
|
|
18
|
-
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).
|
|
18
|
+
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).substring(9);
|
|
19
19
|
let fileContent = `# ignore
|
|
20
20
|
node_modules
|
|
21
21
|
dist
|
|
@@ -21,7 +21,7 @@ function globUpdater(er, files) {
|
|
|
21
21
|
|
|
22
22
|
function update(YmlPath) {
|
|
23
23
|
// component name
|
|
24
|
-
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).
|
|
24
|
+
let name = path.basename(path.resolve(path.dirname(YmlPath), '../..')).substring(9);
|
|
25
25
|
let fileContent = `name: Manual Workflow
|
|
26
26
|
on:
|
|
27
27
|
workflow_dispatch:
|
|
@@ -21,7 +21,7 @@ let metaYarnLink = list.map(meta => {
|
|
|
21
21
|
let packageObj = require(packagejson);
|
|
22
22
|
|
|
23
23
|
let packageName = name.startsWith('cocreate-') ?
|
|
24
|
-
'@cocreate/' + name.
|
|
24
|
+
'@cocreate/' + name.substring(9) : packageObj.name;
|
|
25
25
|
|
|
26
26
|
return { ...meta, name, packageName, absolutePath, packageObj }
|
|
27
27
|
}
|
|
@@ -44,7 +44,7 @@ function update(param) {
|
|
|
44
44
|
if (!param) return;
|
|
45
45
|
let { packageObj, absolutePath } = param;
|
|
46
46
|
let { name, description } = packageObj;
|
|
47
|
-
let shortName = name.
|
|
47
|
+
let shortName = name.substring(10);
|
|
48
48
|
let fileContent = `# CoCreate-${shortName}
|
|
49
49
|
${description} Take it for a spin in our [playground!](https://cocreate.app/docs/${shortName})
|
|
50
50
|
|
|
@@ -18,7 +18,7 @@ function update(mdPath) {
|
|
|
18
18
|
do{
|
|
19
19
|
nameDir = path.dirname(nameDir);
|
|
20
20
|
}while(! path.basename(nameDir).startsWith('CoCreate-'))
|
|
21
|
-
let name = path.basename(nameDir).
|
|
21
|
+
let name = path.basename(nameDir).substring(9);
|
|
22
22
|
// console.log(name);
|
|
23
23
|
// process.exit();
|
|
24
24
|
let replaceContent = fs.readFileSync(mdPath).toString()
|
|
@@ -38,7 +38,7 @@ function update(webpackPath) {
|
|
|
38
38
|
// get component name in came case "cocreate" less
|
|
39
39
|
let componentName = toCamelCase(name);
|
|
40
40
|
if (componentName.startsWith('CoCreate'))
|
|
41
|
-
componentName = componentName.
|
|
41
|
+
componentName = componentName.substring(8);
|
|
42
42
|
|
|
43
43
|
if (componentName === componentName.toUpperCase())
|
|
44
44
|
componentName = componentName.toLowerCase();
|
|
@@ -175,7 +175,7 @@ function toCamelCase(str) {
|
|
|
175
175
|
if (index !== -1) {
|
|
176
176
|
let t = str.substring(0, index);
|
|
177
177
|
t += String.fromCharCode(str.charCodeAt(index + 1) - 32);
|
|
178
|
-
t += str.
|
|
178
|
+
t += str.substring(index + 2);
|
|
179
179
|
str = t;
|
|
180
180
|
}
|
|
181
181
|
else break;
|
|
@@ -184,7 +184,7 @@ function toCamelCase(str) {
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
function lowerCaseFirstChar(str) {
|
|
187
|
-
return String.fromCharCode(str.charCodeAt(0) + 32) + str.
|
|
187
|
+
return String.fromCharCode(str.charCodeAt(0) + 32) + str.substring(1);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
|