cob-cli 2.46.0-beta.4 → 2.46.0-beta.6
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.
|
@@ -13,15 +13,21 @@ const commandStructure = {
|
|
|
13
13
|
const completion = omelette('cob-cli').tree(commandStructure)
|
|
14
14
|
completion.init()
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
// add to system profiles
|
|
17
|
+
if (~process.argv.indexOf('--setup')) {
|
|
18
|
+
if (process.platform === 'win32') {
|
|
19
|
+
// we exit cleanly so that postinstall completes successfuly
|
|
20
|
+
process.exit(0)
|
|
21
|
+
}
|
|
22
|
+
console.log("Setting up...")
|
|
23
|
+
completion.setupShellInitFile()
|
|
24
|
+
}
|
|
25
|
+
// remove from system profiles
|
|
26
|
+
if (~process.argv.indexOf('--cleanup')) {
|
|
27
|
+
if (process.platform === 'win32') {
|
|
28
|
+
// we exit cleanly so that uninstall completes successfuly
|
|
29
|
+
process.exit(0)
|
|
30
|
+
}
|
|
31
|
+
console.log("Cleaning...")
|
|
32
|
+
completion.cleanupShellInitFile()
|
|
27
33
|
}
|
package/lib/commands/test.js
CHANGED
|
@@ -10,6 +10,7 @@ const { checkRepoVersion } = require("../commands/upgradeRepo");
|
|
|
10
10
|
async function test (args) {
|
|
11
11
|
let restoreChanges, error = "";
|
|
12
12
|
let cmdEnv
|
|
13
|
+
let spawned
|
|
13
14
|
try {
|
|
14
15
|
checkRepoVersion()
|
|
15
16
|
console.log("Start testing… ")
|
|
@@ -22,7 +23,7 @@ async function test (args) {
|
|
|
22
23
|
} else {
|
|
23
24
|
await cmdEnv.applyCurrentCommandEnvironmentChanges()
|
|
24
25
|
}
|
|
25
|
-
customUIsContinuosReload(cmdEnv, args.dashboard)
|
|
26
|
+
spawned = await customUIsContinuosReload(cmdEnv, args.dashboard)
|
|
26
27
|
|
|
27
28
|
let key;
|
|
28
29
|
do {
|
|
@@ -36,6 +37,9 @@ async function test (args) {
|
|
|
36
37
|
} finally {
|
|
37
38
|
restoreChanges && await restoreChanges()
|
|
38
39
|
cmdEnv && await cmdEnv.unApplyCurrentCommandEnvironmentChanges() // Repõe as configurações
|
|
40
|
+
if(spawned) spawned.forEach( spawn => {
|
|
41
|
+
spawn.kill("SIGINT");
|
|
42
|
+
})
|
|
39
43
|
process.kill(process.pid, "SIGINT");
|
|
40
44
|
// Dá tempo aos subprocessos para morrer
|
|
41
45
|
setTimeout(() => {
|
|
@@ -49,4 +53,4 @@ async function test (args) {
|
|
|
49
53
|
}, 2000);
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
|
-
module.exports = test
|
|
56
|
+
module.exports = test
|
|
@@ -47,14 +47,18 @@ async function customUIsContinuosReload(cmdEnv, dashboard) {
|
|
|
47
47
|
prefixColor: "blue"
|
|
48
48
|
})
|
|
49
49
|
|
|
50
|
-
concurrently( commands, {
|
|
50
|
+
const conc = concurrently( commands, {
|
|
51
51
|
prefix: 'name',
|
|
52
52
|
inputStream: process.stdin,
|
|
53
53
|
handleInput: false,
|
|
54
54
|
killOthers: ['failure', 'success']
|
|
55
|
-
})
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
conc.result.catch( _err => {
|
|
56
58
|
console.log("press any key " + "(except enter)".red + " to stop the tests... \n ")
|
|
57
59
|
process.kill(process.pid, "SIGINT");
|
|
58
|
-
})
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
return conc.commands;
|
|
59
63
|
}
|
|
60
|
-
exports.customUIsContinuosReload = customUIsContinuosReload;
|
|
64
|
+
exports.customUIsContinuosReload = customUIsContinuosReload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cob-cli",
|
|
3
|
-
"version": "2.46.0-beta.
|
|
3
|
+
"version": "2.46.0-beta.6",
|
|
4
4
|
"description": "A command line utility to help Cult of Bits partners develop with higher speed and reusing common code and best practices.",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"cmd-line-importer": "^1.0.0",
|
|
23
23
|
"colors": "^1.4.0",
|
|
24
24
|
"commander": "^5.1.0",
|
|
25
|
-
"concurrently": "^
|
|
25
|
+
"concurrently": "^8.0.0",
|
|
26
26
|
"execa": "^4.0.3",
|
|
27
27
|
"fast-glob": "^3.2.5",
|
|
28
28
|
"file-cookie-store": "^0.2.1",
|
package/.tool-versions
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodejs 16.20.2
|