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

stack -> environment #324

merged 2 commits into from
Nov 7, 2023

Conversation

fauna-chase
Copy link
Contributor

Also made our endpoint validation a bit less rigid. This allows things like using fauna cloud-login when your project points to and endpoint that doesn't exist. Any command that needs a valid endpoint still ensures it has one and will print an error message conveying that.

Added a custom help class so that we can display our beta topics below our non beta topics

Also made our endpoint validation a bit less rigid.  This allows things
like using fauna cloud-login when your project points to and endpoint
that doesn't exist.  Any command that needs a valid endpoint still
ensures it has one and will print an error message conveying that.

Added a custom help class so that we can display our beta topics below
our non beta topics
Copy link
Contributor

@macmv macmv left a comment

Choose a reason for hiding this comment

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

looks good, just a couple minor changes

README.md Outdated

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.

@@ -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

import { Args, Command } from "@oclif/core";
import { ShellConfig } from "../../lib/config";

export default class SelectenvironmentCommand extends Command {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export default class SelectenvironmentCommand extends Command {
export default class SelectEnvironmentCommand extends Command {

* the Help class from oclif/core and just override their sortedTopics() method.
* https://github.com/oclif/core/blob/main/src/help/index.ts#L67
*/
export default class CustomHelp extends Help {
Copy link
Contributor

Choose a reason for hiding this comment

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

very cool, this change is nice to have.

* update README with script
* update version to beta10 to test bundled artifact
@fauna-chase fauna-chase marked this pull request as ready for review November 7, 2023 02:39
@fauna-chase fauna-chase requested a review from macmv November 7, 2023 02:39
@fauna-chase fauna-chase merged commit f7d2777 into main Nov 7, 2023
@fauna-chase fauna-chase deleted the stack-to-environment branch November 7, 2023 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants