@noravel/command 1.0.3 → 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/dist/Executor.d.ts
CHANGED
package/dist/Executor.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
class Executor {
|
|
4
|
-
static async call(command, argv) {
|
|
5
|
-
const
|
|
4
|
+
static async call(command, argv = []) {
|
|
5
|
+
const processedArguments = [command.name, ...argv];
|
|
6
|
+
const commandInstance = new command(processedArguments).bootstrap();
|
|
6
7
|
commandInstance.detect();
|
|
7
8
|
const exitCode = await commandInstance.handle();
|
|
8
9
|
return exitCode ? 1 : 0;
|
|
@@ -11,7 +11,7 @@ class StatusBarNormal extends StatusBar_1.StatusBar {
|
|
|
11
11
|
const padding = totalStr.length * 2 + 2 - (totalStr.length + currentStr.length + 1);
|
|
12
12
|
const prefix = '\r' + `${currentStr}/${totalStr}` + ' '.repeat(padding) + '[';
|
|
13
13
|
const disp = `${(perc * 100).toFixed(1)}%`;
|
|
14
|
-
const suffix = ']' + ' '.repeat(6 - disp.length) + `${disp}
|
|
14
|
+
const suffix = ']' + ' '.repeat(6 - disp.length) + `${disp}`;
|
|
15
15
|
const size = this.progressbar.getSize() - prefix.length - suffix.length - 2;
|
|
16
16
|
return { prefix, suffix, size };
|
|
17
17
|
}
|