rman 0.2.1 → 0.2.4
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.
|
@@ -35,7 +35,7 @@ class MultiTaskCommand extends command_1.Command {
|
|
|
35
35
|
concurrency: this.options.concurrency || os_1.default.cpus().length,
|
|
36
36
|
bail: this.options.bail,
|
|
37
37
|
});
|
|
38
|
-
await this._task;
|
|
38
|
+
await this._task.catch(() => void (0));
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
exports.MultiTaskCommand = MultiTaskCommand;
|
|
@@ -69,7 +69,13 @@ class RunCommand extends multi_task_command_1.MultiTaskCommand {
|
|
|
69
69
|
npmlog_1.default.verbose(this.commandName, pkg.name, chalk_1.default.gray(figures_1.default.lineVerticalDashed0), chalk_1.default.cyanBright.bold('executing'), chalk_1.default.gray(figures_1.default.lineVerticalDashed0), command);
|
|
70
70
|
const t = Date.now();
|
|
71
71
|
const r = await (0, exec_1.exec)(command, options);
|
|
72
|
-
|
|
72
|
+
if (r.error) {
|
|
73
|
+
npmlog_1.default.error(this.commandName, chalk_1.default.gray(figures_1.default.lineVerticalDashed0), pkg.name, chalk_1.default.gray(figures_1.default.lineVerticalDashed0), chalk_1.default.red.bold('failed'), chalk_1.default.gray(figures_1.default.lineVerticalDashed0), command, chalk_1.default.gray(figures_1.default.lineVerticalDashed0), r.error.message.trim());
|
|
74
|
+
}
|
|
75
|
+
else
|
|
76
|
+
npmlog_1.default.info(this.commandName, chalk_1.default.gray(figures_1.default.lineVerticalDashed0), pkg.name, chalk_1.default.gray(figures_1.default.lineVerticalDashed0), chalk_1.default.green.bold('success'), chalk_1.default.gray(figures_1.default.lineVerticalDashed0), command, chalk_1.default.gray(figures_1.default.lineVerticalDashed0), 'Completed in ' + chalk_1.default.yellow('' + (Date.now() - t) + ' ms'));
|
|
77
|
+
if (r.error)
|
|
78
|
+
throw r.error;
|
|
73
79
|
return r;
|
|
74
80
|
}
|
|
75
81
|
}
|
package/cjs/utils/exec.js
CHANGED
|
@@ -36,8 +36,8 @@ async function exec(command, options) {
|
|
|
36
36
|
stderr: ''
|
|
37
37
|
};
|
|
38
38
|
const processData = (data, stdio) => {
|
|
39
|
-
buffer[stdio] += data;
|
|
40
|
-
result[stdio] += data;
|
|
39
|
+
buffer[stdio] += '' + data;
|
|
40
|
+
result[stdio] += '' + data;
|
|
41
41
|
if (opts.onData)
|
|
42
42
|
opts.onData(data, stdio);
|
|
43
43
|
};
|
|
@@ -63,7 +63,13 @@ export class RunCommand extends MultiTaskCommand {
|
|
|
63
63
|
logger.verbose(this.commandName, pkg.name, chalk.gray(figures.lineVerticalDashed0), chalk.cyanBright.bold('executing'), chalk.gray(figures.lineVerticalDashed0), command);
|
|
64
64
|
const t = Date.now();
|
|
65
65
|
const r = await exec(command, options);
|
|
66
|
-
|
|
66
|
+
if (r.error) {
|
|
67
|
+
logger.error(this.commandName, chalk.gray(figures.lineVerticalDashed0), pkg.name, chalk.gray(figures.lineVerticalDashed0), chalk.red.bold('failed'), chalk.gray(figures.lineVerticalDashed0), command, chalk.gray(figures.lineVerticalDashed0), r.error.message.trim());
|
|
68
|
+
}
|
|
69
|
+
else
|
|
70
|
+
logger.info(this.commandName, chalk.gray(figures.lineVerticalDashed0), pkg.name, chalk.gray(figures.lineVerticalDashed0), chalk.green.bold('success'), chalk.gray(figures.lineVerticalDashed0), command, chalk.gray(figures.lineVerticalDashed0), 'Completed in ' + chalk.yellow('' + (Date.now() - t) + ' ms'));
|
|
71
|
+
if (r.error)
|
|
72
|
+
throw r.error;
|
|
67
73
|
return r;
|
|
68
74
|
}
|
|
69
75
|
}
|
package/esm/utils/exec.mjs
CHANGED
|
@@ -30,8 +30,8 @@ export async function exec(command, options) {
|
|
|
30
30
|
stderr: ''
|
|
31
31
|
};
|
|
32
32
|
const processData = (data, stdio) => {
|
|
33
|
-
buffer[stdio] += data;
|
|
34
|
-
result[stdio] += data;
|
|
33
|
+
buffer[stdio] += '' + data;
|
|
34
|
+
result[stdio] += '' + data;
|
|
35
35
|
if (opts.onData)
|
|
36
36
|
opts.onData(data, stdio);
|
|
37
37
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rman",
|
|
3
3
|
"description": "Monorepo repository manager",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.4",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"contributors": [
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"npmlog": "^6.0.0",
|
|
44
44
|
"package-json": "^7.0.0",
|
|
45
45
|
"path-key": "^4.0.0",
|
|
46
|
-
"power-tasks": "^0.0.
|
|
46
|
+
"power-tasks": "^0.0.2",
|
|
47
47
|
"putil-merge": "^3.7.0",
|
|
48
48
|
"putil-varhelpers": "^1.6.3",
|
|
49
49
|
"semver": "^7.3.5",
|