Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack -> environment #324

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 61 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ the queries file on the default fauna shell endpoint.
- [`fauna project`](#fauna-project)
- [`fauna schema`](#fauna-schema)
- [`fauna shell`](#fauna-shell)
- [`fauna stack`](#fauna-stack)
- [`fauna environment`](#fauna-environment)
- [`fauna upload-graphql-schema`](#fauna-upload-graphql-schema)

## `fauna cloud-login`
Expand Down Expand Up @@ -516,15 +516,15 @@ Create a database.

USAGE
$ fauna create-database DBNAME [--url <value>] [--timeout <value>]
[--secret <value>] [--endpoint <value>] [--stack <value>]
[--secret <value>] [--endpoint <value>] [--environment <value>]

ARGUMENTS
DBNAME database name

FLAGS
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the README should be generated with the readme.py script, which will update this from the --help output.

--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand Down Expand Up @@ -552,7 +552,7 @@ Create a key for the specified database.

USAGE
$ fauna create-key DBNAME [ROLE] [--url <value>] [--timeout <value>]
[--secret <value>] [--endpoint <value>] [--stack <value>]
[--secret <value>] [--endpoint <value>] [--environment <value>]

ARGUMENTS
DBNAME database name
Expand All @@ -561,7 +561,7 @@ ARGUMENTS
FLAGS
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand All @@ -586,15 +586,15 @@ Delete a database.

USAGE
$ fauna delete-database DBNAME [--url <value>] [--timeout <value>]
[--secret <value>] [--endpoint <value>] [--stack <value>]
[--secret <value>] [--endpoint <value>] [--environment <value>]

ARGUMENTS
DBNAME database name

FLAGS
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand All @@ -619,15 +619,15 @@ Delete a key.

USAGE
$ fauna delete-key KEYNAME [--url <value>] [--timeout <value>]
[--secret <value>] [--endpoint <value>] [--stack <value>]
[--secret <value>] [--endpoint <value>] [--environment <value>]

ARGUMENTS
KEYNAME key name

FLAGS
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand Down Expand Up @@ -666,7 +666,7 @@ ARGUMENTS
FLAGS
--non-interactive Disables interaction
--secret=<value> Database secret
--set-default Sets this stack as the default
--set-default Sets this environment as the default
--url=<value> Database URL

DESCRIPTION
Expand Down Expand Up @@ -769,7 +769,7 @@ Evaluate the given query.

USAGE
$ fauna eval [DBNAME] [QUERY] [--url <value>] [--timeout
<value>] [--secret <value>] [--endpoint <value>] [--stack <value>] [--file
<value>] [--secret <value>] [--endpoint <value>] [--environment <value>] [--file
<value>] [--stdin] [--output <value>] [--format json|json-tagged|shell]
[--version 4|10] [--typecheck]

Expand All @@ -784,7 +784,7 @@ FLAGS
<options: json|json-tagged|shell>
--output=<value> File to write output to
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--stdin Read file input from stdin. Writes to stdout by default
--timeout=<value> Connection timeout in milliseconds
--typecheck Enable typechecking
Expand Down Expand Up @@ -824,7 +824,7 @@ TOPICS
plugins List installed plugins.
project Manage project settings in .fauna-project.
schema Print the diff between local and remote schema.
stack Manage stacks in the current project.
environment Manage environments in the current project.

COMMANDS
add-endpoint Add an endpoint to ~/.fauna-shell.
Expand Down Expand Up @@ -857,7 +857,7 @@ Import data to Fauna.

USAGE
$ fauna import --path <value> [--url <value>] [--timeout <value>]
[--secret <value>] [--endpoint <value>] [--stack <value>] [--db <value>]
[--secret <value>] [--endpoint <value>] [--environment <value>] [--db <value>]
[--collection <value>] [--type <value>] [--append] [--allow-short-rows]
[--dry-run] [--treat-empty-csv-cells-as empty|null]

Expand Down Expand Up @@ -890,8 +890,8 @@ FLAGS
--secret=<value>
Secret key. Overrides the `secret` in ~/.fauna-shell

--stack=<value>
Stack to use, from a Fauna project
--environment=<value>
environment to use, from a Fauna project

--timeout=<value>
Connection timeout in milliseconds
Expand Down Expand Up @@ -982,12 +982,12 @@ List child databases in the current database.

USAGE
$ fauna list-databases [--url <value>] [--timeout <value>] [--secret
<value>] [--endpoint <value>] [--stack <value>]
<value>] [--endpoint <value>] [--environment <value>]

FLAGS
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand All @@ -1012,12 +1012,12 @@ List keys in the current database.

USAGE
$ fauna list-keys [--url <value>] [--timeout <value>] [--secret
<value>] [--endpoint <value>] [--stack <value>]
<value>] [--endpoint <value>] [--environment <value>]

FLAGS
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand Down Expand Up @@ -1055,7 +1055,7 @@ ARGUMENTS
DESCRIPTION
Initialize a project directory by generating a .fauna-project file.

NOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject
NOTE: `fauna project` and `fauna environment` are still in beta. Behavior is subject
to change.

EXAMPLES
Expand All @@ -1081,14 +1081,14 @@ Print the diff between local and remote schema.

USAGE
$ fauna schema diff [--url <value>] [--timeout <value>] [--secret
<value>] [--endpoint <value>] [--stack <value>] [--dir <value>]
<value>] [--endpoint <value>] [--environment <value>] [--dir <value>]

FLAGS
--dir=<value> The directory of .fsl files to push. Defaults to the
directory of `.fauna-project`
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand Down Expand Up @@ -1122,15 +1122,15 @@ Push the current project's .fsl files to Fauna.

USAGE
$ fauna schema push [--url <value>] [--timeout <value>] [--secret
<value>] [--endpoint <value>] [--stack <value>] [--dir <value>] [--force]
<value>] [--endpoint <value>] [--environment <value>] [--dir <value>] [--force]

FLAGS
--dir=<value> The directory of .fsl files to push. Defaults to the
directory of `.fauna-project`
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--force Push the change without a diff or schema version check
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand Down Expand Up @@ -1161,7 +1161,7 @@ Pull a database schema's .fsl files into the current project.

USAGE
$ fauna schema pull [--url <value>] [--timeout <value>] [--secret
<value>] [--endpoint <value>] [--stack <value>] [--dir <value>] [--delete]
<value>] [--endpoint <value>] [--environment <value>] [--dir <value>] [--delete]

FLAGS
--delete Delete .fsl files in the target directory that are not
Expand All @@ -1170,7 +1170,7 @@ FLAGS
directory of `.fauna-project`
--endpoint=<value> Connection endpoint, from ~/.fauna-shell
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand All @@ -1190,7 +1190,7 @@ Start an interactive shell.

USAGE
$ fauna shell [DB_PATH] [--url <value>] [--timeout <value>]
[--secret <value>] [--endpoint <value>] [--stack <value>] [--file <value>]
[--secret <value>] [--endpoint <value>] [--environment <value>] [--file <value>]
[--stdin] [--output <value>] [--format json|json-tagged|shell] [--version
4|10] [--typecheck]

Expand All @@ -1204,7 +1204,7 @@ FLAGS
<options: json|json-tagged|shell>
--output=<value> File to write output to
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--stdin Read file input from stdin. Writes to stdout by default
--timeout=<value> Connection timeout in milliseconds
--typecheck Enable typechecking
Expand All @@ -1221,87 +1221,87 @@ EXAMPLES
$ fauna shell my_db/nested_db
```

## `fauna stack`
## `fauna environment`

Commands to manage stacks in .fauna-project.
Commands to manage environments in .fauna-project.

### `fauna stack add`
### `fauna environment add`

Add a new stack to .fauna-project. All flags are optional, and the user will
Add a new environment to .fauna-project. All flags are optional, and the user will
be prompted to fill in any missing values that are needed.

If `--non-interactive` is set, no prompts will be shown, and the `--url` and
`--secret` flags will be required.

```sh
Add a new stack to `.fauna-project`.
Add a new environment to `.fauna-project`.

USAGE
$ fauna stack add [--non-interactive --name <value> --endpoint
$ fauna environment add [--non-interactive --name <value> --endpoint
<value> --database <value>] [--set-default]

FLAGS
--database=<value> Database path to use in this stack
--endpoint=<value> Endpoint to use in this stack
--name=<value> New stack name
--database=<value> Database path to use in this environment
--endpoint=<value> Endpoint to use in this environment
--name=<value> New environment name
--non-interactive Disable interaction
--set-default Set this stack as the default
--set-default Set this environment as the default

DESCRIPTION
Add a new stack to `.fauna-project`.
Add a new environment to `.fauna-project`.

NOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject
NOTE: `fauna project` and `fauna environment` are still in beta. Behavior is subject
to change.

EXAMPLES
$ fauna stack add
$ fauna environment add

$ fauna stack add --name my-app --endpoint dev --database my-database
$ fauna environment add --name my-app --endpoint dev --database my-database

$ fauna stack add --name my-app --endpoint dev --database my-database --set-default
$ fauna environment add --name my-app --endpoint dev --database my-database --set-default
```

### `fauna stack list`
### `fauna environment list`

List stacks in .fauna-project.
List environments in .fauna-project.

```sh
List stacks available in `.fauna-project`.
List environments available in `.fauna-project`.

USAGE
$ fauna stack list
$ fauna environment list

DESCRIPTION
List stacks available in `.fauna-project`.
List environments available in `.fauna-project`.

NOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject
NOTE: `fauna project` and `fauna environment` are still in beta. Behavior is subject
to change.

EXAMPLES
$ fauna stack list
$ fauna environment list
```

### `fauna stack select`
### `fauna environment select`

Update the default stack in .fauna-project.
Update the default environment in .fauna-project.

```sh
Update the default stack in `.fauna-project`.
Update the default environment in `.fauna-project`.

USAGE
$ fauna stack select STACK
$ fauna environment select environment

ARGUMENTS
STACK The new default stack to use
environment The new default environment to use

DESCRIPTION
Update the default stack in `.fauna-project`.
Update the default environment in `.fauna-project`.

NOTE: `fauna project` and `fauna stack` are still in beta. Behavior is subject
NOTE: `fauna project` and `fauna environment` are still in beta. Behavior is subject
to change.

EXAMPLES
$ fauna stack select my-stack
$ fauna environment select my-environment
```

## `fauna upload-graphql-schema`
Expand All @@ -1313,7 +1313,7 @@ Upload GraphQL schema.

USAGE
$ fauna upload-graphql-schema GRAPHQLFILEPATH [--url <value>] [--timeout <value>]
[--secret <value>] [--endpoint <value>] [--stack <value>] [--graphqlHost
[--secret <value>] [--endpoint <value>] [--environment <value>] [--graphqlHost
<value>] [--graphqlPort <value>] [--mode merge|override|replace]

ARGUMENTS
Expand All @@ -1326,7 +1326,7 @@ FLAGS
--mode=<option> [default: merge] Upload mode
<options: merge|override|replace>
--secret=<value> Secret key. Overrides the `secret` in ~/.fauna-shell
--stack=<value> Stack to use, from a Fauna project
--environment=<value> environment to use, from a Fauna project
--timeout=<value> Connection timeout in milliseconds
--url=<value> Database URL. Overrides the `url` in ~/.fauna-shell

Expand Down
2 changes: 1 addition & 1 deletion fsl/.fauna-project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
schema_directory=schema
default=dev

[stack.dev]
[environment.dev]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any plans to migrate the stack format to environment? I don't think its really worthwhile to add, I just realized that my fauna-shell file will be borked when I pull down this version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given we had only done the beta releases I was not planning to migrate them

endpoint=cli_test-us
database=FaunaCLITest
Loading