@noravel/command 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.
@@ -1,4 +1,4 @@
1
1
  import Command from './Contracts/Command';
2
2
  export default class Executor {
3
- static call(command: new (argv: string[]) => Command, argv: string[]): Promise<0 | 1>;
3
+ static call(command: new (argv: string[]) => Command, argv?: string[]): Promise<0 | 1>;
4
4
  }
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 commandInstance = new command(argv).bootstrap();
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noravel/command",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",