@adaptivestone/framework 5.0.0-alpha.25 → 5.0.0-alpha.26
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/CHANGELOG.md +5 -0
- package/modules/BaseCli.js +10 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/modules/BaseCli.js
CHANGED
|
@@ -33,11 +33,19 @@ class Cli extends Base {
|
|
|
33
33
|
const commands = Object.keys(this.commands);
|
|
34
34
|
const maxLength = commands.reduce((max, c) => Math.max(max, c.length), 0);
|
|
35
35
|
console.log('Available commands:');
|
|
36
|
+
let commandsClasses = [];
|
|
36
37
|
for (const c of commands) {
|
|
37
38
|
// eslint-disable-next-line no-await-in-loop
|
|
38
|
-
|
|
39
|
+
commandsClasses.push(import(this.commands[c]));
|
|
40
|
+
// console.log(
|
|
41
|
+
// ` \x1b[36m${c.padEnd(maxLength)}\x1b[0m - ${f.default.description}`,
|
|
42
|
+
// );
|
|
43
|
+
}
|
|
44
|
+
commandsClasses = await Promise.all(commandsClasses);
|
|
45
|
+
for (const [key, c] of Object.entries(commands)) {
|
|
46
|
+
// eslint-disable-next-line no-await-in-loop
|
|
39
47
|
console.log(
|
|
40
|
-
` \x1b[36m${c.padEnd(maxLength)}\x1b[0m - ${
|
|
48
|
+
` \x1b[36m${c.padEnd(maxLength)}\x1b[0m - ${commandsClasses[key].default.description}`,
|
|
41
49
|
);
|
|
42
50
|
}
|
|
43
51
|
}
|