rman 1.0.4 → 1.0.5
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/commands/version.command.js +23 -16
- package/constants.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import readline from 'node:readline/promises';
|
|
2
2
|
import colors from 'ansi-colors';
|
|
3
|
+
import EasyTable from 'easy-table';
|
|
3
4
|
import { VersionService } from '../services/version.service.js';
|
|
4
5
|
import { applyBranchGuardOptions, assertAllowedBranch, readBranchGuardOptions } from '../utils/branch-guard.js';
|
|
5
6
|
import { applyPackageFilterOptions, readPackageFilterOptions } from '../utils/package-filter.js';
|
|
@@ -106,23 +107,29 @@ export function initCli(repository, program) {
|
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
109
|
function printPlan(entries) {
|
|
110
|
+
const table = new EasyTable();
|
|
109
111
|
for (const e of entries) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
table.cell('Status', statusLabel(e.status));
|
|
113
|
+
table.cell('Package', colors.cyan(e.package.name));
|
|
114
|
+
table.cell('Group', colors.gray(`(${e.group})`));
|
|
115
|
+
table.cell('From', e.from);
|
|
116
|
+
table.cell('', e.status === 'bump' ? '->' : '');
|
|
117
|
+
table.cell('To', e.status === 'bump' ? colors.yellow(e.to) : '');
|
|
118
|
+
table.cell('Reason', e.status === 'error' ? colors.red(e.reason ?? '') : colors.gray(e.reason ?? ''));
|
|
119
|
+
table.newRow();
|
|
120
|
+
}
|
|
121
|
+
console.log(table.toString().trim());
|
|
122
|
+
}
|
|
123
|
+
function statusLabel(status) {
|
|
124
|
+
switch (status) {
|
|
125
|
+
case 'bump':
|
|
126
|
+
return colors.green('bump');
|
|
127
|
+
case 'no-change':
|
|
128
|
+
return colors.gray('no-change');
|
|
129
|
+
case 'skip':
|
|
130
|
+
return colors.cyan('skip');
|
|
131
|
+
case 'error':
|
|
132
|
+
return colors.red('error');
|
|
126
133
|
}
|
|
127
134
|
}
|
|
128
135
|
async function confirm(question) {
|
package/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.5';
|