mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
add empty action helpers
This commit is contained in:
parent
57f5535910
commit
e48e422ecd
@ -9,5 +9,8 @@ export const DaemonCommand = () => {
|
||||
const cmd = new Command(`daemon`)
|
||||
.description(`Daemon commands`)
|
||||
.addCommand(ServeCommand())
|
||||
.action(() => {
|
||||
cmd.help()
|
||||
})
|
||||
return cmd
|
||||
}
|
||||
|
@ -9,5 +9,8 @@ export const FtpCommand = () => {
|
||||
const cmd = new Command(`ftp`)
|
||||
.description(`FTP commands`)
|
||||
.addCommand(ServeCommand())
|
||||
.action(() => {
|
||||
cmd.help()
|
||||
})
|
||||
return cmd
|
||||
}
|
||||
|
@ -9,5 +9,8 @@ export const SyslogCommand = () => {
|
||||
const cmd = new Command(`syslog`)
|
||||
.description(`Syslog commands`)
|
||||
.addCommand(ServeCommand())
|
||||
.action(() => {
|
||||
cmd.help()
|
||||
})
|
||||
return cmd
|
||||
}
|
||||
|
@ -14,5 +14,8 @@ export const EdgeCommand = () => {
|
||||
.addCommand(DaemonCommand())
|
||||
.addCommand(FtpCommand())
|
||||
.addCommand(SyslogCommand())
|
||||
.action(() => {
|
||||
cmd.help()
|
||||
})
|
||||
return cmd
|
||||
}
|
||||
|
@ -9,5 +9,8 @@ export const FirewallCommand = () => {
|
||||
const cmd = new Command(`firewall`)
|
||||
.description(`Root firewall commands`)
|
||||
.addCommand(ServeCommand())
|
||||
.action(() => {
|
||||
cmd.help()
|
||||
})
|
||||
return cmd
|
||||
}
|
||||
|
@ -31,5 +31,8 @@ export const HealthCommand = () => {
|
||||
await compact()
|
||||
}),
|
||||
)
|
||||
.action(() => {
|
||||
cmd.help()
|
||||
})
|
||||
return cmd
|
||||
}
|
||||
|
@ -11,6 +11,8 @@ export const MothershipCommand = () => {
|
||||
.description(`Mothership commands`)
|
||||
.addCommand(ServeCommand())
|
||||
.addCommand(SchemaCommand())
|
||||
|
||||
.action(() => {
|
||||
cmd.help()
|
||||
})
|
||||
return cmd
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user