rman 0.24.0 → 0.26.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/cjs/cli.js +11 -7
- package/cjs/commands/multi-task-command.js +1 -1
- package/cjs/core/command.js +2 -0
- package/esm/cli.js +11 -7
- package/esm/commands/multi-task-command.js +1 -1
- package/esm/core/command.js +2 -0
- package/package.json +3 -3
package/cjs/cli.js
CHANGED
|
@@ -36,12 +36,16 @@ async function runCli(options) {
|
|
|
36
36
|
.help('help').alias('help', 'h')
|
|
37
37
|
.showHelpOnFail(false, 'Run with --help for available options')
|
|
38
38
|
.fail((msg, err) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
if (!err.logged) {
|
|
40
|
+
const text = (msg
|
|
41
|
+
? msg + '\n\n' + chalk_1.default.whiteBright('Run with --help for available options')
|
|
42
|
+
: (err ? err.message : ''));
|
|
43
|
+
// eslint-disable-next-line no-console
|
|
44
|
+
console.log('\n' + chalk_1.default.red(text));
|
|
45
|
+
throw msg;
|
|
46
|
+
}
|
|
47
|
+
else
|
|
48
|
+
process.exit(1);
|
|
45
49
|
})
|
|
46
50
|
// group options under "Global Options:" header
|
|
47
51
|
.options(command_js_1.Command.globalOptions)
|
|
@@ -59,7 +63,7 @@ async function runCli(options) {
|
|
|
59
63
|
program.showHelp();
|
|
60
64
|
else
|
|
61
65
|
await program.parseAsync()
|
|
62
|
-
.catch(() =>
|
|
66
|
+
.catch(() => process.exit(1));
|
|
63
67
|
}
|
|
64
68
|
catch (e) {
|
|
65
69
|
npmlog_1.default.error('rman', e);
|
|
@@ -32,7 +32,7 @@ class MultiTaskCommand extends command_js_1.Command {
|
|
|
32
32
|
concurrency: this.options.concurrency || os_1.default.cpus().length,
|
|
33
33
|
bail: this.options.bail,
|
|
34
34
|
});
|
|
35
|
-
await this._task.toPromise()
|
|
35
|
+
await this._task.toPromise();
|
|
36
36
|
}
|
|
37
37
|
async _getPackages() {
|
|
38
38
|
return this.repository.getPackages({ toposort: !this.options.parallel });
|
package/cjs/core/command.js
CHANGED
|
@@ -73,6 +73,8 @@ class Command extends (0, strict_typed_events_1.TypedEventEmitterClass)(strict_t
|
|
|
73
73
|
if (this.listenerCount('error'))
|
|
74
74
|
await this.emitAsync('error', e).catch(noOp);
|
|
75
75
|
this.logger.resume();
|
|
76
|
+
this.logger.error(this.commandName, this.logger.separator, e.message.trim());
|
|
77
|
+
e.logged = true;
|
|
76
78
|
throw e;
|
|
77
79
|
}
|
|
78
80
|
finally {
|
package/esm/cli.js
CHANGED
|
@@ -30,12 +30,16 @@ export async function runCli(options) {
|
|
|
30
30
|
.help('help').alias('help', 'h')
|
|
31
31
|
.showHelpOnFail(false, 'Run with --help for available options')
|
|
32
32
|
.fail((msg, err) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
if (!err.logged) {
|
|
34
|
+
const text = (msg
|
|
35
|
+
? msg + '\n\n' + chalk.whiteBright('Run with --help for available options')
|
|
36
|
+
: (err ? err.message : ''));
|
|
37
|
+
// eslint-disable-next-line no-console
|
|
38
|
+
console.log('\n' + chalk.red(text));
|
|
39
|
+
throw msg;
|
|
40
|
+
}
|
|
41
|
+
else
|
|
42
|
+
process.exit(1);
|
|
39
43
|
})
|
|
40
44
|
// group options under "Global Options:" header
|
|
41
45
|
.options(Command.globalOptions)
|
|
@@ -53,7 +57,7 @@ export async function runCli(options) {
|
|
|
53
57
|
program.showHelp();
|
|
54
58
|
else
|
|
55
59
|
await program.parseAsync()
|
|
56
|
-
.catch(() =>
|
|
60
|
+
.catch(() => process.exit(1));
|
|
57
61
|
}
|
|
58
62
|
catch (e) {
|
|
59
63
|
logger.error('rman', e);
|
|
@@ -26,7 +26,7 @@ export class MultiTaskCommand extends Command {
|
|
|
26
26
|
concurrency: this.options.concurrency || os.cpus().length,
|
|
27
27
|
bail: this.options.bail,
|
|
28
28
|
});
|
|
29
|
-
await this._task.toPromise()
|
|
29
|
+
await this._task.toPromise();
|
|
30
30
|
}
|
|
31
31
|
async _getPackages() {
|
|
32
32
|
return this.repository.getPackages({ toposort: !this.options.parallel });
|
package/esm/core/command.js
CHANGED
|
@@ -67,6 +67,8 @@ export class Command extends TypedEventEmitterClass(AsyncEventEmitter) {
|
|
|
67
67
|
if (this.listenerCount('error'))
|
|
68
68
|
await this.emitAsync('error', e).catch(noOp);
|
|
69
69
|
this.logger.resume();
|
|
70
|
+
this.logger.error(this.commandName, this.logger.separator, e.message.trim());
|
|
71
|
+
e.logged = true;
|
|
70
72
|
throw e;
|
|
71
73
|
}
|
|
72
74
|
finally {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rman",
|
|
3
3
|
"description": "Monorepo repository manager",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.26.0",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"contributors": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@netlify/parse-npm-script": "^0.1.2",
|
|
36
|
-
"chalk": "^5.1.
|
|
36
|
+
"chalk": "^5.1.2",
|
|
37
37
|
"easy-table": "^1.2.0",
|
|
38
38
|
"envinfo": "^7.8.1",
|
|
39
39
|
"fast-glob": "^3.2.12",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"js-yaml": "^4.1.0",
|
|
44
44
|
"npmlog": "^6.0.2",
|
|
45
45
|
"path-key": "^4.0.0",
|
|
46
|
-
"power-tasks": "^1.
|
|
46
|
+
"power-tasks": "^1.5.0",
|
|
47
47
|
"putil-merge": "^3.9.0",
|
|
48
48
|
"putil-varhelpers": "^1.6.4",
|
|
49
49
|
"semver": "^7.3.8",
|