rman 0.5.0 → 0.5.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/cjs/core/command.js +3 -3
- package/esm/core/command.mjs +3 -3
- package/package.json +1 -1
package/cjs/core/command.js
CHANGED
|
@@ -88,7 +88,7 @@ class Command extends (0, strict_typed_events_1.TypedEventEmitterClass)(strict_t
|
|
|
88
88
|
//
|
|
89
89
|
}
|
|
90
90
|
async _preExecute() {
|
|
91
|
-
npmlog_2.default.info('
|
|
91
|
+
npmlog_2.default.info('rman', `Executing "${this.commandName}" command`);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
exports.Command = Command;
|
|
@@ -113,8 +113,8 @@ exports.Command = Command;
|
|
|
113
113
|
function composeOptions(commandName, yargArgs, config) {
|
|
114
114
|
const result = (0, putil_merge_1.default)({}, yargArgs);
|
|
115
115
|
(0, putil_merge_1.default)(result, config, { filter: (_, key) => key !== 'command' });
|
|
116
|
-
const cfgCmd = config.
|
|
117
|
-
config.command : undefined;
|
|
116
|
+
const cfgCmd = config.command && typeof config.command === 'object' ?
|
|
117
|
+
config.command[commandName] : undefined;
|
|
118
118
|
if (cfgCmd && typeof cfgCmd === 'object')
|
|
119
119
|
(0, putil_merge_1.default)(result, cfgCmd);
|
|
120
120
|
return result;
|
package/esm/core/command.mjs
CHANGED
|
@@ -82,7 +82,7 @@ export class Command extends TypedEventEmitterClass(AsyncEventEmitter) {
|
|
|
82
82
|
//
|
|
83
83
|
}
|
|
84
84
|
async _preExecute() {
|
|
85
|
-
logger.info('
|
|
85
|
+
logger.info('rman', `Executing "${this.commandName}" command`);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
(function (Command) {
|
|
@@ -106,8 +106,8 @@ export class Command extends TypedEventEmitterClass(AsyncEventEmitter) {
|
|
|
106
106
|
function composeOptions(commandName, yargArgs, config) {
|
|
107
107
|
const result = merge({}, yargArgs);
|
|
108
108
|
merge(result, config, { filter: (_, key) => key !== 'command' });
|
|
109
|
-
const cfgCmd = config.
|
|
110
|
-
config.command : undefined;
|
|
109
|
+
const cfgCmd = config.command && typeof config.command === 'object' ?
|
|
110
|
+
config.command[commandName] : undefined;
|
|
111
111
|
if (cfgCmd && typeof cfgCmd === 'object')
|
|
112
112
|
merge(result, cfgCmd);
|
|
113
113
|
return result;
|