add empty action helpers

This commit is contained in:
Ben Allfree 2024-09-25 04:39:55 +00:00
parent 57f5535910
commit e48e422ecd
9 changed files with 31 additions and 2 deletions

View File

@ -9,5 +9,8 @@ export const DaemonCommand = () => {
const cmd = new Command(`daemon`)
.description(`Daemon commands`)
.addCommand(ServeCommand())
.action(() => {
cmd.help()
})
return cmd
}

View File

@ -9,5 +9,8 @@ export const FtpCommand = () => {
const cmd = new Command(`ftp`)
.description(`FTP commands`)
.addCommand(ServeCommand())
.action(() => {
cmd.help()
})
return cmd
}

View File

@ -9,5 +9,8 @@ export const SyslogCommand = () => {
const cmd = new Command(`syslog`)
.description(`Syslog commands`)
.addCommand(ServeCommand())
.action(() => {
cmd.help()
})
return cmd
}

View File

@ -14,5 +14,8 @@ export const EdgeCommand = () => {
.addCommand(DaemonCommand())
.addCommand(FtpCommand())
.addCommand(SyslogCommand())
.action(() => {
cmd.help()
})
return cmd
}

View File

@ -9,5 +9,8 @@ export const FirewallCommand = () => {
const cmd = new Command(`firewall`)
.description(`Root firewall commands`)
.addCommand(ServeCommand())
.action(() => {
cmd.help()
})
return cmd
}

View File

@ -31,5 +31,8 @@ export const HealthCommand = () => {
await compact()
}),
)
.action(() => {
cmd.help()
})
return cmd
}

View File

@ -11,6 +11,8 @@ export const MothershipCommand = () => {
.description(`Mothership commands`)
.addCommand(ServeCommand())
.addCommand(SchemaCommand())
.action(() => {
cmd.help()
})
return cmd
}

View File

@ -4,6 +4,8 @@ import { UpdateCommand } from './UpdateCommand'
export const PocketBaseCommand = () => {
const cmd = new Command(`pocketbase`).description(`PocketBase commands`)
cmd.addCommand(UpdateCommand())
cmd.addCommand(UpdateCommand()).action(() => {
cmd.help()
})
return cmd
}

View File

@ -11,6 +11,7 @@ import {
SETTINGS,
loadPlugins,
} from '../../core'
import { version } from '../../package.json'
import { GobotService } from '../services/GobotService'
import { EdgeCommand } from './commands/EdgeCommand'
import { FirewallCommand } from './commands/FirewallCommand'
@ -45,6 +46,12 @@ export const main = async () => {
.addCommand(SendMailCommand())
.addCommand(ServeCommand())
.addCommand(PocketBaseCommand())
.action(async () => {
const { info, dbg } = LoggerService()
info('PocketHost CLI')
info(`Version: ${version}`, { version })
program.help()
})
await program.parseAsync()
}