feat(16.3-01): admin:token CLI, party.Activated, READMEs and docs
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -36,6 +36,10 @@ func delegateCommands() []bonfire.Command {
|
||||
{"key:generate", "Print a fresh application key from the app binary", ""},
|
||||
{"admin:create", "Create a backend administrator in the app binary", "--email <email> (required), --login, --role <code>, --superuser; the password is prompted or read from stdin"},
|
||||
{"admin:reset-password", "Reset a backend administrator's password in the app binary", "<identifier> (login or email); the password is prompted or read from stdin"},
|
||||
{"admin:token:create", "Create a personal API token for a backend administrator in the app binary", "<identifier> --name <text> --scope <name> (repeatable) [--expires 30d|90d|365d|never|YYYY-MM-DD]"},
|
||||
{"admin:token:list", "List personal API tokens in the app binary", "[<identifier>] [--revoked]"},
|
||||
{"admin:token:revoke", "Revoke a personal API token by id in the app binary", "<id>"},
|
||||
{"admin:token:scopes", "List available personal API token scopes in the app binary", ""},
|
||||
}
|
||||
cmds := make([]bonfire.Command, 0, len(rows))
|
||||
for _, r := range rows {
|
||||
|
||||
@@ -79,15 +79,16 @@ func TestDelegateCommandsPassArgs(t *testing.T) {
|
||||
|
||||
func TestDelegateCommandsHelp(t *testing.T) {
|
||||
hints := map[string][]string{
|
||||
"migrate:rollback": {"--plugin"},
|
||||
"queue:work": {"--queue"},
|
||||
"schedule:run": {"--once"},
|
||||
"serve": {"--addr"},
|
||||
"admin:create": {"--email", "--superuser"},
|
||||
"migrate:rollback": {"--plugin"},
|
||||
"queue:work": {"--queue"},
|
||||
"schedule:run": {"--once"},
|
||||
"serve": {"--addr"},
|
||||
"admin:create": {"--email", "--superuser"},
|
||||
"admin:token:create": {"--name", "--scope", "--expires"},
|
||||
}
|
||||
cmds := delegateCommands()
|
||||
if len(cmds) != 11 {
|
||||
t.Fatalf("delegateCommands() has %d commands, want 11", len(cmds))
|
||||
if len(cmds) != 15 {
|
||||
t.Fatalf("delegateCommands() has %d commands, want 15", len(cmds))
|
||||
}
|
||||
got := captureAppRunner(t)
|
||||
for _, c := range cmds {
|
||||
|
||||
Reference in New Issue
Block a user