rman 0.5.0 → 0.6.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/commands/ci-command.js +5 -5
- package/cjs/commands/run-command.js +14 -11
- package/cjs/commands/version-command.js +39 -12
- package/cjs/core/command.js +3 -3
- package/esm/commands/ci-command.d.ts +1 -1
- package/esm/commands/ci-command.mjs +5 -5
- package/esm/commands/publish-command.d.ts +1 -1
- package/esm/commands/run-command.d.ts +5 -3
- package/esm/commands/run-command.mjs +14 -11
- package/esm/commands/version-command.d.ts +2 -2
- package/esm/commands/version-command.mjs +39 -12
- package/esm/core/command.mjs +3 -3
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ class CleanInstallCommand extends run_command_1.RunCommand {
|
|
|
29
29
|
npmlog_1.default.info(this.commandName, chalk_1.default.yellow('installing'), 'Running ' + client + ' install');
|
|
30
30
|
return super._exec({
|
|
31
31
|
name: 'root',
|
|
32
|
-
|
|
32
|
+
cwd: this.repository.dirname,
|
|
33
33
|
json: { ...this.repository.json },
|
|
34
34
|
command: client + ' install',
|
|
35
35
|
stdio: 'inherit'
|
|
@@ -41,10 +41,10 @@ class CleanInstallCommand extends run_command_1.RunCommand {
|
|
|
41
41
|
if (args.command === '#') {
|
|
42
42
|
if (args.name === 'root')
|
|
43
43
|
return { code: 0 };
|
|
44
|
-
const {
|
|
45
|
-
await this._fsDelete(path_1.default.join(
|
|
46
|
-
await this._fsDelete(path_1.default.join(
|
|
47
|
-
await this._fsDelete(path_1.default.join(
|
|
44
|
+
const { cwd } = args;
|
|
45
|
+
await this._fsDelete(path_1.default.join(cwd, 'node_modules'));
|
|
46
|
+
await this._fsDelete(path_1.default.join(cwd, 'package-lock.json'));
|
|
47
|
+
await this._fsDelete(path_1.default.join(cwd, 'yarn-lock.json'));
|
|
48
48
|
return { code: 0 };
|
|
49
49
|
}
|
|
50
50
|
return super._exec(args, ctx);
|
|
@@ -23,7 +23,7 @@ class RunCommand extends multi_task_command_1.MultiTaskCommand {
|
|
|
23
23
|
if (p.json.scripts) {
|
|
24
24
|
const childTask = this._prepareScriptTask({
|
|
25
25
|
name: p.name,
|
|
26
|
-
|
|
26
|
+
cwd: p.dirname,
|
|
27
27
|
json: p.json,
|
|
28
28
|
dependencies: p.dependencies
|
|
29
29
|
}, options);
|
|
@@ -34,7 +34,7 @@ class RunCommand extends multi_task_command_1.MultiTaskCommand {
|
|
|
34
34
|
}
|
|
35
35
|
const mainTask = this._prepareScriptTask({
|
|
36
36
|
name: 'root',
|
|
37
|
-
|
|
37
|
+
cwd: this.repository.dirname,
|
|
38
38
|
json: this.repository.json
|
|
39
39
|
});
|
|
40
40
|
if (!mainTask?.children)
|
|
@@ -89,16 +89,19 @@ class RunCommand extends multi_task_command_1.MultiTaskCommand {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
async _exec(args, options) {
|
|
92
|
-
|
|
92
|
+
const logLevel = args.logLevel == null ? 'info' : args.logLevel;
|
|
93
|
+
if (logLevel)
|
|
94
|
+
npmlog_1.default.verbose(this.commandName, chalk_1.default.cyan(args.name), chalk_1.default.cyanBright.bold('executing'), npmlog_1.default.separator, args.command);
|
|
93
95
|
const t = Date.now();
|
|
94
|
-
const r = await (0, exec_1.exec)(args.command, { cwd: args.
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
const r = await (0, exec_1.exec)(args.command, { cwd: args.cwd, stdio: args.stdio });
|
|
97
|
+
if (logLevel)
|
|
98
|
+
if (r.error) {
|
|
99
|
+
npmlog_1.default.error(this.commandName, chalk_1.default.cyan(args.name), chalk_1.default.red.bold('failed'), npmlog_1.default.separator, args.command, npmlog_1.default.separator, r.error.message.trim());
|
|
100
|
+
npmlog_1.default.verbose(this.commandName, '', r.stderr || r.stdout);
|
|
101
|
+
}
|
|
102
|
+
else
|
|
103
|
+
npmlog_1.default.log(logLevel, this.commandName, chalk_1.default.cyan(args.name), chalk_1.default.green.bold('executed'), npmlog_1.default.separator, args.command, chalk_1.default.yellow(' (' + (Date.now() - t) + ' ms)'));
|
|
104
|
+
if (r.error && !args.noThrow)
|
|
102
105
|
throw r.error;
|
|
103
106
|
return r;
|
|
104
107
|
}
|
|
@@ -5,14 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.VersionCommand = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const fs_1 = __importDefault(require("fs"));
|
|
9
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
9
|
const semver_1 = __importDefault(require("semver"));
|
|
11
10
|
const npmlog_1 = __importDefault(require("npmlog"));
|
|
12
11
|
const strip_color_1 = __importDefault(require("strip-color"));
|
|
12
|
+
const power_tasks_1 = require("power-tasks");
|
|
13
13
|
const run_command_1 = require("./run-command");
|
|
14
14
|
const git_utils_1 = require("../utils/git-utils");
|
|
15
15
|
const command_1 = require("../core/command");
|
|
16
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
16
17
|
class VersionCommand extends run_command_1.RunCommand {
|
|
17
18
|
constructor(repository, bump, options) {
|
|
18
19
|
super(repository, 'version', options);
|
|
@@ -33,7 +34,7 @@ class VersionCommand extends run_command_1.RunCommand {
|
|
|
33
34
|
let message = '';
|
|
34
35
|
let newVer = '';
|
|
35
36
|
const logPkgName = chalk_1.default.yellow(p.name);
|
|
36
|
-
if (!this.options.
|
|
37
|
+
if (!this.options.noTag) {
|
|
37
38
|
const isDirty = dirtyFiles.find(f => !path_1.default.relative(relDir, f).startsWith('..'));
|
|
38
39
|
if (isDirty) {
|
|
39
40
|
if (!this.options.ignoreDirty)
|
|
@@ -71,13 +72,30 @@ class VersionCommand extends run_command_1.RunCommand {
|
|
|
71
72
|
}
|
|
72
73
|
if (errorCount)
|
|
73
74
|
throw new Error('Unable to bump version due to error(s)');
|
|
75
|
+
const maxVer = Object.values(newVersions).reduce((m, v) => {
|
|
76
|
+
return semver_1.default.gt(m, v) ? m : v;
|
|
77
|
+
}, '0.0.0');
|
|
74
78
|
if (this.options.unified) {
|
|
75
|
-
const maxVer = Object.values(newVersions).reduce((m, v) => {
|
|
76
|
-
return semver_1.default.gt(m, v) ? m : v;
|
|
77
|
-
}, '0.0.0');
|
|
78
79
|
Object.keys(newVersions).forEach(k => newVersions[k] = maxVer);
|
|
79
80
|
}
|
|
80
|
-
|
|
81
|
+
const tasks = await super._prepareTasks(selectedPackages, { newVersions });
|
|
82
|
+
tasks.forEach(t => t.options.exclusive = true);
|
|
83
|
+
if (this.options.unified)
|
|
84
|
+
tasks.push(new power_tasks_1.Task(async () => {
|
|
85
|
+
try {
|
|
86
|
+
await super._exec({
|
|
87
|
+
name: 'rman',
|
|
88
|
+
command: 'git tag -a "v' + maxVer + '" -m "version ' + maxVer + '"',
|
|
89
|
+
cwd: this.repository.dirname,
|
|
90
|
+
stdio: npmlog_1.default.levelIndex <= 1000 ? 'inherit' : 'pipe',
|
|
91
|
+
logLevel: 'silly'
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
//
|
|
96
|
+
}
|
|
97
|
+
}, { exclusive: true }));
|
|
98
|
+
return tasks;
|
|
81
99
|
}
|
|
82
100
|
async _exec(args, options) {
|
|
83
101
|
if (args.name === 'root')
|
|
@@ -88,9 +106,18 @@ class VersionCommand extends run_command_1.RunCommand {
|
|
|
88
106
|
const newVer = newVersions[args.name];
|
|
89
107
|
args.json.version = newVer;
|
|
90
108
|
delete args.json.scripts.version;
|
|
91
|
-
const f = path_1.default.join(args.
|
|
109
|
+
const f = path_1.default.join(args.cwd, 'package.json');
|
|
92
110
|
const data = JSON.stringify(args.json, undefined, 2);
|
|
93
|
-
|
|
111
|
+
await promises_1.default.writeFile(f, data, 'utf-8');
|
|
112
|
+
if (!this.options.noTag) {
|
|
113
|
+
await super._exec({
|
|
114
|
+
name: args.name,
|
|
115
|
+
command: 'git commit -m "' + newVer + '" package.json',
|
|
116
|
+
cwd: args.cwd,
|
|
117
|
+
stdio: npmlog_1.default.levelIndex <= 1000 ? 'inherit' : 'pipe',
|
|
118
|
+
logLevel: 'silly'
|
|
119
|
+
});
|
|
120
|
+
}
|
|
94
121
|
npmlog_1.default.info(this.commandName, args.name, npmlog_1.default.separator, 'Version changed from ' + chalk_1.default.cyan(oldVer) + ' to ' + chalk_1.default.cyan(newVer));
|
|
95
122
|
return { code: 0 };
|
|
96
123
|
}
|
|
@@ -113,12 +140,12 @@ VersionCommand.commandName = 'version';
|
|
|
113
140
|
},
|
|
114
141
|
'ignore-dirty': {
|
|
115
142
|
alias: 'i',
|
|
116
|
-
describe: '#
|
|
143
|
+
describe: '# Do not bump version for dirty packages',
|
|
117
144
|
type: 'boolean'
|
|
118
145
|
},
|
|
119
|
-
'
|
|
120
|
-
alias: '
|
|
121
|
-
describe: '#
|
|
146
|
+
'no-tag': {
|
|
147
|
+
alias: 'n',
|
|
148
|
+
describe: '# Do not crate git version tag. (Ignores dirty check)',
|
|
122
149
|
type: 'boolean'
|
|
123
150
|
}
|
|
124
151
|
};
|
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;
|
|
@@ -12,7 +12,7 @@ export declare class CleanInstallCommand extends RunCommand<CleanInstallCommand.
|
|
|
12
12
|
protected _exec(args: {
|
|
13
13
|
name: string;
|
|
14
14
|
json: any;
|
|
15
|
-
|
|
15
|
+
cwd: string;
|
|
16
16
|
dependencies?: string[];
|
|
17
17
|
command: string;
|
|
18
18
|
}, ctx?: any): Promise<ExecuteCommandResult>;
|
|
@@ -23,7 +23,7 @@ export class CleanInstallCommand extends RunCommand {
|
|
|
23
23
|
logger.info(this.commandName, chalk.yellow('installing'), 'Running ' + client + ' install');
|
|
24
24
|
return super._exec({
|
|
25
25
|
name: 'root',
|
|
26
|
-
|
|
26
|
+
cwd: this.repository.dirname,
|
|
27
27
|
json: { ...this.repository.json },
|
|
28
28
|
command: client + ' install',
|
|
29
29
|
stdio: 'inherit'
|
|
@@ -35,10 +35,10 @@ export class CleanInstallCommand extends RunCommand {
|
|
|
35
35
|
if (args.command === '#') {
|
|
36
36
|
if (args.name === 'root')
|
|
37
37
|
return { code: 0 };
|
|
38
|
-
const {
|
|
39
|
-
await this._fsDelete(path.join(
|
|
40
|
-
await this._fsDelete(path.join(
|
|
41
|
-
await this._fsDelete(path.join(
|
|
38
|
+
const { cwd } = args;
|
|
39
|
+
await this._fsDelete(path.join(cwd, 'node_modules'));
|
|
40
|
+
await this._fsDelete(path.join(cwd, 'package-lock.json'));
|
|
41
|
+
await this._fsDelete(path.join(cwd, 'yarn-lock.json'));
|
|
42
42
|
return { code: 0 };
|
|
43
43
|
}
|
|
44
44
|
return super._exec(args, ctx);
|
|
@@ -12,7 +12,7 @@ export declare class PublishCommand extends RunCommand<PublishCommand.Options> {
|
|
|
12
12
|
protected _exec(args: {
|
|
13
13
|
name: string;
|
|
14
14
|
json: any;
|
|
15
|
-
|
|
15
|
+
cwd: string;
|
|
16
16
|
dependencies?: string[];
|
|
17
17
|
command: string;
|
|
18
18
|
}, options?: any): Promise<ExecuteCommandResult>;
|
|
@@ -13,16 +13,18 @@ export declare class RunCommand<TOptions extends RunCommand.Options> extends Mul
|
|
|
13
13
|
protected _prepareScriptTask(args: {
|
|
14
14
|
name: string;
|
|
15
15
|
json: any;
|
|
16
|
-
|
|
16
|
+
cwd: string;
|
|
17
17
|
dependencies?: string[];
|
|
18
18
|
}, ctx?: any): Task | undefined;
|
|
19
19
|
protected _exec(args: {
|
|
20
20
|
name: string;
|
|
21
|
-
|
|
22
|
-
dirname: string;
|
|
21
|
+
cwd: string;
|
|
23
22
|
dependencies?: string[];
|
|
24
23
|
command: string;
|
|
25
24
|
stdio?: 'inherit' | 'pipe';
|
|
25
|
+
json?: any;
|
|
26
|
+
logLevel?: string;
|
|
27
|
+
noThrow?: boolean;
|
|
26
28
|
}, options?: any): Promise<ExecuteCommandResult>;
|
|
27
29
|
}
|
|
28
30
|
export declare namespace RunCommand {
|
|
@@ -17,7 +17,7 @@ export class RunCommand extends MultiTaskCommand {
|
|
|
17
17
|
if (p.json.scripts) {
|
|
18
18
|
const childTask = this._prepareScriptTask({
|
|
19
19
|
name: p.name,
|
|
20
|
-
|
|
20
|
+
cwd: p.dirname,
|
|
21
21
|
json: p.json,
|
|
22
22
|
dependencies: p.dependencies
|
|
23
23
|
}, options);
|
|
@@ -28,7 +28,7 @@ export class RunCommand extends MultiTaskCommand {
|
|
|
28
28
|
}
|
|
29
29
|
const mainTask = this._prepareScriptTask({
|
|
30
30
|
name: 'root',
|
|
31
|
-
|
|
31
|
+
cwd: this.repository.dirname,
|
|
32
32
|
json: this.repository.json
|
|
33
33
|
});
|
|
34
34
|
if (!mainTask?.children)
|
|
@@ -83,16 +83,19 @@ export class RunCommand extends MultiTaskCommand {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
async _exec(args, options) {
|
|
86
|
-
|
|
86
|
+
const logLevel = args.logLevel == null ? 'info' : args.logLevel;
|
|
87
|
+
if (logLevel)
|
|
88
|
+
logger.verbose(this.commandName, chalk.cyan(args.name), chalk.cyanBright.bold('executing'), logger.separator, args.command);
|
|
87
89
|
const t = Date.now();
|
|
88
|
-
const r = await exec(args.command, { cwd: args.
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
const r = await exec(args.command, { cwd: args.cwd, stdio: args.stdio });
|
|
91
|
+
if (logLevel)
|
|
92
|
+
if (r.error) {
|
|
93
|
+
logger.error(this.commandName, chalk.cyan(args.name), chalk.red.bold('failed'), logger.separator, args.command, logger.separator, r.error.message.trim());
|
|
94
|
+
logger.verbose(this.commandName, '', r.stderr || r.stdout);
|
|
95
|
+
}
|
|
96
|
+
else
|
|
97
|
+
logger.log(logLevel, this.commandName, chalk.cyan(args.name), chalk.green.bold('executed'), logger.separator, args.command, chalk.yellow(' (' + (Date.now() - t) + ' ms)'));
|
|
98
|
+
if (r.error && !args.noThrow)
|
|
96
99
|
throw r.error;
|
|
97
100
|
return r;
|
|
98
101
|
}
|
|
@@ -13,7 +13,7 @@ export declare class VersionCommand extends RunCommand<VersionCommand.Options> {
|
|
|
13
13
|
protected _exec(args: {
|
|
14
14
|
name: string;
|
|
15
15
|
json: any;
|
|
16
|
-
|
|
16
|
+
cwd: string;
|
|
17
17
|
dependencies?: string[];
|
|
18
18
|
command: string;
|
|
19
19
|
}, options?: any): Promise<ExecuteCommandResult>;
|
|
@@ -23,7 +23,7 @@ export declare namespace VersionCommand {
|
|
|
23
23
|
unified?: boolean;
|
|
24
24
|
all?: boolean;
|
|
25
25
|
ignoreDirty?: boolean;
|
|
26
|
-
|
|
26
|
+
noTag?: boolean;
|
|
27
27
|
}
|
|
28
28
|
const cliCommandOptions: Record<string, yargs.Options>;
|
|
29
29
|
function initCli(repository: Repository, program: yargs.Argv): void;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import fs from 'fs';
|
|
3
2
|
import chalk from 'chalk';
|
|
4
3
|
import semver from 'semver';
|
|
5
4
|
import logger from 'npmlog';
|
|
6
5
|
import stripColor from 'strip-color';
|
|
6
|
+
import { Task } from 'power-tasks';
|
|
7
7
|
import { RunCommand } from './run-command.mjs';
|
|
8
8
|
import { GitHelper } from './../utils/git-utils.mjs';
|
|
9
9
|
import { Command } from './../core/command.mjs';
|
|
10
|
+
import fs from 'fs/promises';
|
|
10
11
|
export class VersionCommand extends RunCommand {
|
|
11
12
|
constructor(repository, bump, options) {
|
|
12
13
|
super(repository, 'version', options);
|
|
@@ -27,7 +28,7 @@ export class VersionCommand extends RunCommand {
|
|
|
27
28
|
let message = '';
|
|
28
29
|
let newVer = '';
|
|
29
30
|
const logPkgName = chalk.yellow(p.name);
|
|
30
|
-
if (!this.options.
|
|
31
|
+
if (!this.options.noTag) {
|
|
31
32
|
const isDirty = dirtyFiles.find(f => !path.relative(relDir, f).startsWith('..'));
|
|
32
33
|
if (isDirty) {
|
|
33
34
|
if (!this.options.ignoreDirty)
|
|
@@ -65,13 +66,30 @@ export class VersionCommand extends RunCommand {
|
|
|
65
66
|
}
|
|
66
67
|
if (errorCount)
|
|
67
68
|
throw new Error('Unable to bump version due to error(s)');
|
|
69
|
+
const maxVer = Object.values(newVersions).reduce((m, v) => {
|
|
70
|
+
return semver.gt(m, v) ? m : v;
|
|
71
|
+
}, '0.0.0');
|
|
68
72
|
if (this.options.unified) {
|
|
69
|
-
const maxVer = Object.values(newVersions).reduce((m, v) => {
|
|
70
|
-
return semver.gt(m, v) ? m : v;
|
|
71
|
-
}, '0.0.0');
|
|
72
73
|
Object.keys(newVersions).forEach(k => newVersions[k] = maxVer);
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
+
const tasks = await super._prepareTasks(selectedPackages, { newVersions });
|
|
76
|
+
tasks.forEach(t => t.options.exclusive = true);
|
|
77
|
+
if (this.options.unified)
|
|
78
|
+
tasks.push(new Task(async () => {
|
|
79
|
+
try {
|
|
80
|
+
await super._exec({
|
|
81
|
+
name: 'rman',
|
|
82
|
+
command: 'git tag -a "v' + maxVer + '" -m "version ' + maxVer + '"',
|
|
83
|
+
cwd: this.repository.dirname,
|
|
84
|
+
stdio: logger.levelIndex <= 1000 ? 'inherit' : 'pipe',
|
|
85
|
+
logLevel: 'silly'
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
//
|
|
90
|
+
}
|
|
91
|
+
}, { exclusive: true }));
|
|
92
|
+
return tasks;
|
|
75
93
|
}
|
|
76
94
|
async _exec(args, options) {
|
|
77
95
|
if (args.name === 'root')
|
|
@@ -82,9 +100,18 @@ export class VersionCommand extends RunCommand {
|
|
|
82
100
|
const newVer = newVersions[args.name];
|
|
83
101
|
args.json.version = newVer;
|
|
84
102
|
delete args.json.scripts.version;
|
|
85
|
-
const f = path.join(args.
|
|
103
|
+
const f = path.join(args.cwd, 'package.json');
|
|
86
104
|
const data = JSON.stringify(args.json, undefined, 2);
|
|
87
|
-
fs.
|
|
105
|
+
await fs.writeFile(f, data, 'utf-8');
|
|
106
|
+
if (!this.options.noTag) {
|
|
107
|
+
await super._exec({
|
|
108
|
+
name: args.name,
|
|
109
|
+
command: 'git commit -m "' + newVer + '" package.json',
|
|
110
|
+
cwd: args.cwd,
|
|
111
|
+
stdio: logger.levelIndex <= 1000 ? 'inherit' : 'pipe',
|
|
112
|
+
logLevel: 'silly'
|
|
113
|
+
});
|
|
114
|
+
}
|
|
88
115
|
logger.info(this.commandName, args.name, logger.separator, 'Version changed from ' + chalk.cyan(oldVer) + ' to ' + chalk.cyan(newVer));
|
|
89
116
|
return { code: 0 };
|
|
90
117
|
}
|
|
@@ -106,12 +133,12 @@ VersionCommand.commandName = 'version';
|
|
|
106
133
|
},
|
|
107
134
|
'ignore-dirty': {
|
|
108
135
|
alias: 'i',
|
|
109
|
-
describe: '#
|
|
136
|
+
describe: '# Do not bump version for dirty packages',
|
|
110
137
|
type: 'boolean'
|
|
111
138
|
},
|
|
112
|
-
'
|
|
113
|
-
alias: '
|
|
114
|
-
describe: '#
|
|
139
|
+
'no-tag': {
|
|
140
|
+
alias: 'n',
|
|
141
|
+
describe: '# Do not crate git version tag. (Ignores dirty check)',
|
|
115
142
|
type: 'boolean'
|
|
116
143
|
}
|
|
117
144
|
};
|
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;
|