Reproduction
Only one command can own invocations that do not start with a command name:
src/app.module.ts
import { CommandMajor, Container, Handler } from 'func'
@CommandMajor()
class FirstMajor {
@Handler()
run() {}
}
@CommandMajor()
class SecondMajor {
@Handler()
run() {}
}
new Container([FirstMajor, SecondMajor])How to fix it
Keep one major command and register the other with a name:
src/app.module.ts
import { Command, CommandMajor, Container, Handler } from 'func'
@CommandMajor()
class FirstMajor {
@Handler()
run() {}
}
@Command({ name: 'second' })
class SecondCommand {
@Handler()
run() {}
}
new Container([FirstMajor, SecondCommand])