- I wrote a scripts to copy and generate all commands missing in iris from fig repo: https://github.com/withfig/autocomplete - Add a new script to generate commands docs about which commands currently are inside commands folder 377d4aac663590e504fe39a92eb4dac4cbd333b2 - Add more icons e64d4e70a1db61e62053460a882e093bd6373ab1
88 lines
6.0 KiB
Go
88 lines
6.0 KiB
Go
package ops
|
|
|
|
import (
|
|
"github.com/versenilvis/iris/commands/core"
|
|
)
|
|
|
|
func init() {
|
|
core.Register(&core.Spec{
|
|
Name: "hasura",
|
|
Description: ".env filename to load ENV vars from",
|
|
Subcommands: []core.Subcommand{
|
|
{Name: "actions", Description: "Manage Hasura actions"},
|
|
{Name: "codegen", Description: "Generate code for actions"},
|
|
{Name: "create", Description: "Create a Hasura action"},
|
|
{Name: "use-codegen", Description: "Use the codegen to generate code for Hasura actions"},
|
|
{Name: "completions", Description: "Generate auto completion code"},
|
|
{Name: "console", Description: "Open the console to manage the database and try out APIs"},
|
|
{Name: "init", Description: "Initialize a directory for Hasura GraphQL engine migrations"},
|
|
{Name: "apply", Description: "Apply Hasura metadata on a database"},
|
|
{Name: "clear", Description: "Clear Hasura GraphQL engine metadata on the database"},
|
|
{Name: "diff", Description: "Show a highlighted diff of Hasura metadata"},
|
|
{Name: "export", Description: "Export Hasura GraphQL engine metadata from the database"},
|
|
{Name: "ic", Description: "Manage inconsistent objects in Hasura metadata"},
|
|
{Name: "drop", Description: "Drop inconsistent objects from the metadata"},
|
|
{Name: "ls", Description: "List all inconsistent objects from the metadata"},
|
|
{Name: "status", Description: "Check if the metadata is inconsistent or not"},
|
|
{Name: "reload", Description: "Reload Hasura GraphQL engine metadata on the database"},
|
|
{Name: "migrate", Description: "Manage migrations on the database"},
|
|
{Name: "goto", Description: "Apply migration chain up to to the version specified"},
|
|
{Name: "delete", Description: "Clear migrations from local project and server"},
|
|
{Name: "squash", Description: "Squash multiple migrations into a single one"},
|
|
{Name: "plugin", Description: "Manage plugins for the CLI"},
|
|
{Name: "install", Description: "Install a plugin from the index"},
|
|
{Name: "list", Description: "List all available plugins from index, versions and installation status"},
|
|
{Name: "uninstall", Description: "Uninstall a plugin"},
|
|
{Name: "upgrade", Description: "Upgrade a plugin to a newer version"},
|
|
{Name: "scripts", Description: "Execute helper scripts to manage Hasura projects"},
|
|
{Name: "update-project-v2", Description: "Update the Hasura project from config v1 to v2"},
|
|
{Name: "update-project-v3", Description: "Update the Hasura project from config v2 to v3"},
|
|
{Name: "sd", Description: "Manage seed data"},
|
|
{Name: "update-cli", Description: "Update the CLI to latest or a specific version"},
|
|
{Name: "version", Description: "Print the CLI version"},
|
|
},
|
|
Options: []core.Option{
|
|
{Name: "--envfile", Description: ".env filename to load ENV vars from"},
|
|
{Name: "-h", Description: "Help for hasura"},
|
|
{Name: "--log-level", Description: "Log level"},
|
|
{Name: "--no-color", Description: "Do not colorize output"},
|
|
{Name: "--project", Description: "Directory where commands are executed"},
|
|
{Name: "--skip-update-check", Description: "Skip automatic update check on command execution"},
|
|
{Name: "--admin-secret", Description: "Admin secret for Hasura GraphQL engine"},
|
|
{Name: "--certificate-authority", Description: "Path to a cert file for the certificate authority"},
|
|
{Name: "--endpoint", Description: "Http(s) endpoint for Hasura GraphQL engine (env `HASURA_GRAPHQL_ENDPOINT`)"},
|
|
{Name: "--insecure-skip-tls-verify", Description: "Skip TLS verification and disable cert checking"},
|
|
{Name: "--derive-from", Description: "Derive action from a hasura operation"},
|
|
{Name: "--kind", Description: "Kind to use in action"},
|
|
{Name: "--webhook", Description: "Webhook to use in action"},
|
|
{Name: "--with-codegen", Description: "Create action along with codegen"},
|
|
{Name: "--framework", Description: "Framework to be used by codegen"},
|
|
{Name: "--output-dir", Description: "Directory to create the codegen files"},
|
|
{Name: "--with-starter-kit", Description: "Clone starter kit for a framework"},
|
|
{Name: "--file", Description: "File to which output has to be written"},
|
|
{Name: "--address", Description: "Address to serve console and migration API from"},
|
|
{Name: "--api-port", Description: "Port for serving migrate api"},
|
|
{Name: "--browser", Description: "Open console in a specific browser"},
|
|
{Name: "--console-port", Description: "Port for serving console"},
|
|
{Name: "--no-browser", Description: "Do not automatically open console in browser"},
|
|
{Name: "--static-dir", Description: "When rendering console, use assets provided by HGE server"},
|
|
{Name: "--install-manifest", Description: "Install manifest to be cloned"},
|
|
{Name: "--version", Description: "Config version to be used"},
|
|
{Name: "--dry-run", Description: "Show metadata generated from project directory without applying to server"},
|
|
{Name: "-o", Description: "Specify an output format to show applied metadata"},
|
|
{Name: "--up", Description: "Apply all or N up migration steps"},
|
|
{Name: "--down", Description: "Apply all or N up migration steps"},
|
|
{Name: "--skip-execution", Description: "Skip executing the migration action, but mark them as applied"},
|
|
{Name: "--type", Description: "Type of migration to be used with version flag"},
|
|
{Name: "--all-databases", Description: "Set this flag to attempt to apply migrations on all databases present on server"},
|
|
{Name: "--down-sql", Description: "Sql string/query that is to be used to create a down migration"},
|
|
{Name: "--from-server", Description: "Take pg_dump of schema and Hasura metadata from the server"},
|
|
{Name: "--metadata-from-file", Description: "Path to a hasura metadata file to be used for up actions"},
|
|
{Name: "--metadata-from-server", Description: "Take metadata from the server and write it as an up migration file"},
|
|
{Name: "--schema", Description: "Name of Postgres schema to export as a migration"},
|
|
{Name: "--sql-from-file", Description: "Path to an SQL file which contains the SQL statements"},
|
|
{Name: "--sql-from-server", Description: "Take pg_dump from the server and save it as a migration"},
|
|
},
|
|
})
|
|
}
|