feat: Artisan checklist for application commands, hints and coverage gate
- migrate, migrate:rollback and deferred:purge gain --pretend and --force; they and queue:clear confirm only in production on an interactive terminal, so deploys over SSH proceed as before - result lines: Applied N migrations, Rolled back <id> of <plugin>, Cleared N jobs from <queue> - --json for migrate:status, key:generate, route:list, admin:token:create, admin:token:list, admin:token:scopes and websockets:health; -q keeps the key and the token - hints for an empty DSN, an unreachable database, an invalid app.key, a missing uploads bucket and an application binary run below its root - flare and websockets:health return bonfire.Reported after printing - long help and examples for every application command, greeter:hello and blog:publish; cmd/summer TestCommandsDocumented fails on any gap
This commit is contained in:
@@ -20,6 +20,16 @@ func RuntimeCommands(app *backpack.App) []bonfire.Command {
|
||||
{
|
||||
Name: "admin:create",
|
||||
Description: "Create an activated backend administrator",
|
||||
Long: `Creates an activated backend administrator. The password is asked for
|
||||
without echo on a terminal, or read as one line from stdin when stdin is not
|
||||
a terminal, so a script can pipe it in. --login defaults to the lower-cased
|
||||
email. --superuser grants every permission; --role assigns a role by code.
|
||||
The --password flag still works but is deprecated: the value stays in the
|
||||
shell history and the process list.`,
|
||||
Examples: []bonfire.Example{
|
||||
{Command: "admin:create --email admin@example.com --superuser", Description: "Create a superuser; the password is asked for"},
|
||||
{Command: "admin:create --email editor@example.com --role editor", Description: "Create an administrator with the editor role"},
|
||||
},
|
||||
Flags: []bonfire.Flag{
|
||||
{Name: "email", Description: "Admin email"},
|
||||
{Name: "password", Description: "Admin password (deprecated: visible in the process list and shell history; omit it to be prompted, or pipe it on stdin)"},
|
||||
@@ -34,6 +44,13 @@ func RuntimeCommands(app *backpack.App) []bonfire.Command {
|
||||
{
|
||||
Name: "admin:reset-password",
|
||||
Description: "Reset a backend administrator password and revoke existing tokens",
|
||||
Long: `Sets a new password for the administrator with this login or email, read like
|
||||
the one of admin:create (hidden prompt, or one line from stdin), and revokes
|
||||
every session token issued before the reset. Personal API tokens are not
|
||||
touched; revoke them with admin:token:revoke.`,
|
||||
Examples: []bonfire.Example{
|
||||
{Command: "admin:reset-password admin@example.com", Description: "Reset the password; it is asked for"},
|
||||
},
|
||||
Args: []bonfire.Arg{{
|
||||
Name: "identifier",
|
||||
Description: "Login or email",
|
||||
|
||||
Reference in New Issue
Block a user