@cocreate/cli 1.19.0 → 1.19.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/link.js +0 -12
- package/src/commands/symlink.js +1 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.19.1](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.19.0...v1.19.1) (2023-03-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* execute replace with spawn ([1e8e538](https://github.com/CoCreate-app/CoCreate-cli/commit/1e8e538309ff7725d8423e7b734f87d6b9bfe926))
|
|
7
|
+
|
|
1
8
|
# [1.19.0](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.18.0...v1.19.0) (2023-03-29)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/cli",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.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",
|
package/src/commands/link.js
CHANGED
|
@@ -32,18 +32,6 @@ async function doLink(deps, repo, repos, failed, isLinked) {
|
|
|
32
32
|
for (let dep of deps) {
|
|
33
33
|
let depMeta = repos.find(meta => meta.packageName === dep);
|
|
34
34
|
try {
|
|
35
|
-
// if (!depMeta) {
|
|
36
|
-
// // ToDo: search file system for a package.json containing the package.name
|
|
37
|
-
|
|
38
|
-
// failed.push({
|
|
39
|
-
// name: repo.name,
|
|
40
|
-
// des: `"${dep}" component can not be found in repositories.js`
|
|
41
|
-
// })
|
|
42
|
-
// console.error(`${repo.name}: "${dep}" component can not be found in repositories.js`.red)
|
|
43
|
-
// continue;
|
|
44
|
-
// }
|
|
45
|
-
|
|
46
|
-
|
|
47
35
|
|
|
48
36
|
if (depMeta && !isLinked[depMeta.packageName]) {
|
|
49
37
|
|
package/src/commands/symlink.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
const fs = require('fs')
|
|
2
2
|
const path = require("path")
|
|
3
3
|
const util = require('node:util');
|
|
4
|
-
const exec = util.promisify(require('node:child_process').exec);
|
|
5
4
|
const spawn = require('../spawn');
|
|
6
5
|
|
|
7
6
|
const cwdPath = path.resolve(process.cwd());
|
|
8
7
|
let cwdNodeModulesPath = path.resolve(cwdPath, 'node_modules')
|
|
9
8
|
|
|
10
9
|
|
|
11
|
-
// let doInstall = process.argv[2];
|
|
12
|
-
// console.log('doInstall', doInstall)
|
|
13
10
|
let reposLength, failed = [];
|
|
14
11
|
|
|
15
12
|
module.exports = async function symlink(repos) {
|
|
@@ -88,6 +85,7 @@ async function install(repo, repos) {
|
|
|
88
85
|
return console.error(dpath, 'not exist')
|
|
89
86
|
}
|
|
90
87
|
try {
|
|
88
|
+
console.log('installing', repo.name)
|
|
91
89
|
let exitCode = await spawn(repo.packageManager, ['install'], {
|
|
92
90
|
cwd: repo.absolutePath,
|
|
93
91
|
shell: true,
|
|
@@ -101,25 +99,12 @@ async function install(repo, repos) {
|
|
|
101
99
|
})
|
|
102
100
|
console.error(`${repo.name}: ${repo.packageManager} install failed`.red)
|
|
103
101
|
} else {
|
|
104
|
-
// ToDo: needs to run on defined repo but stiil require all repos in order to xecute on correct path
|
|
105
102
|
let linkFailed = await require('./link.js')([repo], repos)
|
|
106
103
|
if (linkFailed)
|
|
107
104
|
failed.push(linkFailed)
|
|
108
105
|
|
|
109
106
|
}
|
|
110
107
|
|
|
111
|
-
// let {error} = await exec(`${repo.packageManager} install `, { cwd: dpath })
|
|
112
|
-
// if (!error) {
|
|
113
|
-
// console.log(repo.name, 'installed')
|
|
114
|
-
// let linkFailed = await require('./link.js')([repo])
|
|
115
|
-
// if (linkFailed)
|
|
116
|
-
// failed.push(linkFailed)
|
|
117
|
-
|
|
118
|
-
// } else {
|
|
119
|
-
// failed.push({name: 'install ', des: error})
|
|
120
|
-
// console.error(repo.name, 'failed to install', error)
|
|
121
|
-
// }
|
|
122
|
-
|
|
123
108
|
}
|
|
124
109
|
catch (err) {
|
|
125
110
|
console.error(repo.name, 'did not install', err)
|