()
| 9 | private logger = logger; |
| 10 | constructor(private program: Command) {} |
| 11 | async init() { |
| 12 | const { |
| 13 | _: [, ...raw], |
| 14 | } = utils.parseArgv(process.argv.slice(2)); |
| 15 | this.raw = raw; |
| 16 | if (raw.length === 1) { |
| 17 | return await this.showRaw1(); |
| 18 | } |
| 19 | if (raw.length === 2) { |
| 20 | return await this.showRaw2(); |
| 21 | } |
| 22 | return await this.showRaw3(); |
| 23 | } |
| 24 | async showRaw1() { |
| 25 | const [componentName] = this.raw; |
| 26 | const componentCommand = this.program.command(componentName).allowUnknownOption(); |