-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add management of Meadow.Cloud API keys #395
Conversation
This PR looks great except we'll be removing the |
Will the spinner be removed entirely or replaced with something else? Or is only the extension method going away? |
@adrianstevens The WithSpinner calls are't in the base classes, so it isn't mixing UI with functionality. It is specifically for the console UI, unless I've missed something. @stevenkuhn due to me messing up the |
ed99ccd
to
17f7eb2
Compare
Let's definitely talk about the spinner code but adding extension methods to tasks to trigger presentation is basically the opposite of separation-of-concerns. And if extinction methods on tasks are needed to give feedback to the user, it's a pretty good sign that we have some architecture issues to solve. |
@adrianstevens Would you prefer something similar to what Spectre.Console does for its status indicators: // Synchronous
AnsiConsole.Status()
.Start("Thinking...", ctx =>
{
// Simulate some work
AnsiConsole.MarkupLine("Doing some work...");
Thread.Sleep(1000);
// Update the status and spinner
ctx.Status("Thinking some more");
ctx.Spinner(Spinner.Known.Star);
ctx.SpinnerStyle(Style.Parse("green"));
// Simulate some work
AnsiConsole.MarkupLine("Doing some more work...");
Thread.Sleep(2000);
});
// Asynchronous
await AnsiConsole.Status()
.StartAsync("Thinking...", async ctx =>
{
// Omitted
}); Instead of an extension method, it's more of a wrapper around the method(s) being executed? What's your feeling around using Spectre.Console for this instead of having our own implementation?
I'm not sure I understand what an extinction method is. Is there a problem adding an animation to status messages in the console? |
17f7eb2
to
a960b85
Compare
a960b85
to
9d94181
Compare
76402f0
to
48a4823
Compare
Updated my branch with the latest in |
@lamebrain If you want to test with the branch, you can run the command like this:
For example, to create an API key in production, it would be:
|
48a4823
to
cb850c2
Compare
This adds the ability to manage your Meadow.Cloud API keys via the command line (V2 only).
The commands are:
This also utilizes the new Console spinner and implements a new
ConsoleTable
for displaying tabular data.Examples
Create
Update
Delete
List
When you have no API keys
When you have a single API key