rman 0.23.0 → 0.25.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.
|
@@ -53,6 +53,7 @@ class RunCommand extends multi_task_command_js_1.MultiTaskCommand {
|
|
|
53
53
|
for (const cmd of parsed) {
|
|
54
54
|
const task = new power_tasks_1.Task(async () => {
|
|
55
55
|
return await this._exec(pkg, cmd, {
|
|
56
|
+
script: s.name,
|
|
56
57
|
stdio: npmlog_1.default.levelIndex < 1000 ? 'inherit' : 'pipe'
|
|
57
58
|
}, options);
|
|
58
59
|
}, {
|
|
@@ -75,16 +76,16 @@ class RunCommand extends multi_task_command_js_1.MultiTaskCommand {
|
|
|
75
76
|
const name = pkg === this.repository.rootPackage ? 'root' : pkg.name;
|
|
76
77
|
const logLevel = args.logLevel == null ? 'info' : args.logLevel;
|
|
77
78
|
if (logLevel)
|
|
78
|
-
npmlog_1.default.verbose(this.commandName, chalk_1.default.cyan(name), chalk_1.default.cyanBright.bold('executing'), npmlog_1.default.separator, command);
|
|
79
|
+
npmlog_1.default.verbose(this.commandName, chalk_1.default.cyan(name), npmlog_1.default.separator, chalk_1.default.cyanBright.bold(args.script), chalk_1.default.cyanBright.bold('executing'), npmlog_1.default.separator, command);
|
|
79
80
|
const t = Date.now();
|
|
80
81
|
const cwd = args.cwd || pkg.dirname;
|
|
81
82
|
const r = await (0, exec_js_1.exec)(command, { cwd, stdio: args.stdio, throwOnError: false });
|
|
82
83
|
if (logLevel)
|
|
83
84
|
if (r.error) {
|
|
84
|
-
npmlog_1.default.error(this.commandName, chalk_1.default.cyan(name), chalk_1.default.red.bold('failed'), npmlog_1.default.separator, command, npmlog_1.default.separator, r.error.message.trim() + ('\n' + r.stdout).trim());
|
|
85
|
+
npmlog_1.default.error(this.commandName, chalk_1.default.cyan(name), npmlog_1.default.separator, chalk_1.default.cyanBright.bold(args.script), chalk_1.default.red.bold('failed'), npmlog_1.default.separator, command, npmlog_1.default.separator, r.error.message.trim() + ('\n' + r.stdout).trim());
|
|
85
86
|
}
|
|
86
87
|
else
|
|
87
|
-
npmlog_1.default.log(logLevel, this.commandName, chalk_1.default.cyan(name), chalk_1.default.green.bold('
|
|
88
|
+
npmlog_1.default.log(logLevel, this.commandName, chalk_1.default.cyan(name), npmlog_1.default.separator, chalk_1.default.cyanBright.bold(args.script), chalk_1.default.green.bold('success'), npmlog_1.default.separator, command, chalk_1.default.yellow(' (' + (Date.now() - t) + ' ms)'));
|
|
88
89
|
if (r.error && !args.noThrow)
|
|
89
90
|
throw r.error;
|
|
90
91
|
return r;
|
package/cjs/core/command.js
CHANGED
|
@@ -110,8 +110,8 @@ exports.Command = Command;
|
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
112
|
function composeOptions(commandName, yargArgs, config) {
|
|
113
|
-
const result = (0, putil_merge_1.default)({},
|
|
114
|
-
(0, putil_merge_1.default)(result,
|
|
113
|
+
const result = (0, putil_merge_1.default)({}, config, { filter: (_, key) => key !== 'command' });
|
|
114
|
+
(0, putil_merge_1.default)(result, yargArgs);
|
|
115
115
|
const cfgCmd = config.command && typeof config.command === 'object' ?
|
|
116
116
|
config.command[commandName] : undefined;
|
|
117
117
|
if (cfgCmd && typeof cfgCmd === 'object')
|
|
@@ -47,6 +47,7 @@ export class RunCommand extends MultiTaskCommand {
|
|
|
47
47
|
for (const cmd of parsed) {
|
|
48
48
|
const task = new Task(async () => {
|
|
49
49
|
return await this._exec(pkg, cmd, {
|
|
50
|
+
script: s.name,
|
|
50
51
|
stdio: logger.levelIndex < 1000 ? 'inherit' : 'pipe'
|
|
51
52
|
}, options);
|
|
52
53
|
}, {
|
|
@@ -69,16 +70,16 @@ export class RunCommand extends MultiTaskCommand {
|
|
|
69
70
|
const name = pkg === this.repository.rootPackage ? 'root' : pkg.name;
|
|
70
71
|
const logLevel = args.logLevel == null ? 'info' : args.logLevel;
|
|
71
72
|
if (logLevel)
|
|
72
|
-
logger.verbose(this.commandName, chalk.cyan(name), chalk.cyanBright.bold('executing'), logger.separator, command);
|
|
73
|
+
logger.verbose(this.commandName, chalk.cyan(name), logger.separator, chalk.cyanBright.bold(args.script), chalk.cyanBright.bold('executing'), logger.separator, command);
|
|
73
74
|
const t = Date.now();
|
|
74
75
|
const cwd = args.cwd || pkg.dirname;
|
|
75
76
|
const r = await exec(command, { cwd, stdio: args.stdio, throwOnError: false });
|
|
76
77
|
if (logLevel)
|
|
77
78
|
if (r.error) {
|
|
78
|
-
logger.error(this.commandName, chalk.cyan(name), chalk.red.bold('failed'), logger.separator, command, logger.separator, r.error.message.trim() + ('\n' + r.stdout).trim());
|
|
79
|
+
logger.error(this.commandName, chalk.cyan(name), logger.separator, chalk.cyanBright.bold(args.script), chalk.red.bold('failed'), logger.separator, command, logger.separator, r.error.message.trim() + ('\n' + r.stdout).trim());
|
|
79
80
|
}
|
|
80
81
|
else
|
|
81
|
-
logger.log(logLevel, this.commandName, chalk.cyan(name), chalk.green.bold('
|
|
82
|
+
logger.log(logLevel, this.commandName, chalk.cyan(name), logger.separator, chalk.cyanBright.bold(args.script), chalk.green.bold('success'), logger.separator, command, chalk.yellow(' (' + (Date.now() - t) + ' ms)'));
|
|
82
83
|
if (r.error && !args.noThrow)
|
|
83
84
|
throw r.error;
|
|
84
85
|
return r;
|
package/esm/core/command.js
CHANGED
|
@@ -103,8 +103,8 @@ export class Command extends TypedEventEmitterClass(AsyncEventEmitter) {
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
function composeOptions(commandName, yargArgs, config) {
|
|
106
|
-
const result = merge({},
|
|
107
|
-
merge(result,
|
|
106
|
+
const result = merge({}, config, { filter: (_, key) => key !== 'command' });
|
|
107
|
+
merge(result, yargArgs);
|
|
108
108
|
const cfgCmd = config.command && typeof config.command === 'object' ?
|
|
109
109
|
config.command[commandName] : undefined;
|
|
110
110
|
if (cfgCmd && typeof cfgCmd === 'object')
|
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.25.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.1",
|
|
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.4.0",
|
|
47
47
|
"putil-merge": "^3.9.0",
|
|
48
48
|
"putil-varhelpers": "^1.6.4",
|
|
49
49
|
"semver": "^7.3.8",
|