复现
同一父路径下的 canonical path token 和 alias 共用命名空间:
src/commands.ts
import { Command, Handler, Module, createApp } from 'func'
@Command('build')
class BuildCommand {
@Handler()
run() {}
}
@Command('build')
class RebuildCommand {
@Handler()
run() {}
}
@Module({ commands: [BuildCommand, RebuildCommand] })
class AppModule {}
createApp(AppModule)如何修复
确保同一父路径下的 token 唯一,或把其中一个 Command 移到不同 path:
src/commands.ts
@Command('build')
class BuildCommand {
@Handler()
run() {}
}
@Command('rebuild')
class RebuildCommand {
@Handler()
run() {}
}
@Module({ commands: [BuildCommand, RebuildCommand] })
class AppModule {}
createApp(AppModule)