mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-10 14:52:32 +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`)
|
const cmd = new Command(`daemon`)
|
||||||
.description(`Daemon commands`)
|
.description(`Daemon commands`)
|
||||||
.addCommand(ServeCommand())
|
.addCommand(ServeCommand())
|
||||||
|
.action(() => {
|
||||||
|
cmd.help()
|
||||||
|
})
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,8 @@ export const FtpCommand = () => {
|
|||||||
const cmd = new Command(`ftp`)
|
const cmd = new Command(`ftp`)
|
||||||
.description(`FTP commands`)
|
.description(`FTP commands`)
|
||||||
.addCommand(ServeCommand())
|
.addCommand(ServeCommand())
|
||||||
|
.action(() => {
|
||||||
|
cmd.help()
|
||||||
|
})
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,8 @@ export const SyslogCommand = () => {
|
|||||||
const cmd = new Command(`syslog`)
|
const cmd = new Command(`syslog`)
|
||||||
.description(`Syslog commands`)
|
.description(`Syslog commands`)
|
||||||
.addCommand(ServeCommand())
|
.addCommand(ServeCommand())
|
||||||
|
.action(() => {
|
||||||
|
cmd.help()
|
||||||
|
})
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -14,5 +14,8 @@ export const EdgeCommand = () => {
|
|||||||
.addCommand(DaemonCommand())
|
.addCommand(DaemonCommand())
|
||||||
.addCommand(FtpCommand())
|
.addCommand(FtpCommand())
|
||||||
.addCommand(SyslogCommand())
|
.addCommand(SyslogCommand())
|
||||||
|
.action(() => {
|
||||||
|
cmd.help()
|
||||||
|
})
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,8 @@ export const FirewallCommand = () => {
|
|||||||
const cmd = new Command(`firewall`)
|
const cmd = new Command(`firewall`)
|
||||||
.description(`Root firewall commands`)
|
.description(`Root firewall commands`)
|
||||||
.addCommand(ServeCommand())
|
.addCommand(ServeCommand())
|
||||||
|
.action(() => {
|
||||||
|
cmd.help()
|
||||||
|
})
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,8 @@ export const HealthCommand = () => {
|
|||||||
await compact()
|
await compact()
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
.action(() => {
|
||||||
|
cmd.help()
|
||||||
|
})
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,8 @@ export const MothershipCommand = () => {
|
|||||||
.description(`Mothership commands`)
|
.description(`Mothership commands`)
|
||||||
.addCommand(ServeCommand())
|
.addCommand(ServeCommand())
|
||||||
.addCommand(SchemaCommand())
|
.addCommand(SchemaCommand())
|
||||||
|
.action(() => {
|
||||||
|
cmd.help()
|
||||||
|
})
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ import { UpdateCommand } from './UpdateCommand'
|
|||||||
export const PocketBaseCommand = () => {
|
export const PocketBaseCommand = () => {
|
||||||
const cmd = new Command(`pocketbase`).description(`PocketBase commands`)
|
const cmd = new Command(`pocketbase`).description(`PocketBase commands`)
|
||||||
|
|
||||||
cmd.addCommand(UpdateCommand())
|
cmd.addCommand(UpdateCommand()).action(() => {
|
||||||
|
cmd.help()
|
||||||
|
})
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import {
|
|||||||
SETTINGS,
|
SETTINGS,
|
||||||
loadPlugins,
|
loadPlugins,
|
||||||
} from '../../core'
|
} from '../../core'
|
||||||
|
import { version } from '../../package.json'
|
||||||
import { GobotService } from '../services/GobotService'
|
import { GobotService } from '../services/GobotService'
|
||||||
import { EdgeCommand } from './commands/EdgeCommand'
|
import { EdgeCommand } from './commands/EdgeCommand'
|
||||||
import { FirewallCommand } from './commands/FirewallCommand'
|
import { FirewallCommand } from './commands/FirewallCommand'
|
||||||
@ -45,6 +46,12 @@ export const main = async () => {
|
|||||||
.addCommand(SendMailCommand())
|
.addCommand(SendMailCommand())
|
||||||
.addCommand(ServeCommand())
|
.addCommand(ServeCommand())
|
||||||
.addCommand(PocketBaseCommand())
|
.addCommand(PocketBaseCommand())
|
||||||
|
.action(async () => {
|
||||||
|
const { info, dbg } = LoggerService()
|
||||||
|
info('PocketHost CLI')
|
||||||
|
info(`Version: ${version}`, { version })
|
||||||
|
program.help()
|
||||||
|
})
|
||||||
|
|
||||||
await program.parseAsync()
|
await program.parseAsync()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user