Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<value>The provided document must at least contain a schema definition.</value>
</data>
<data name="FusionGraphPackage_CannotRead" xml:space="preserve">
<value>The fusion graph package must be opened in read mode to read contents.</value>
<value>The Fusion graph package must be opened in read mode to read contents.</value>
</data>
<data name="FusionGraphPackage_NoFusionGraphDoc" xml:space="preserve">
<value>This package does not contain a fusion graph document.</value>
<value>This package does not contain a Fusion graph document.</value>
</data>
<data name="FusionGraphPackage_CannotWrite" xml:space="preserve">
<value>The fusion graph package must be opened in read/write mode to update contents.</value>
<value>The Fusion graph package must be opened in read/write mode to update contents.</value>
</data>
</root>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace ChilliCream.Nitro.CommandLine.FusionCompatibility;

/// <summary>
/// Defines the names of the arguments that can be used with the fusion directives.
/// Defines the names of the arguments that can be used with the Fusion directives.
/// </summary>
internal static class FusionDirectiveArgumentNames
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace ChilliCream.Nitro.CommandLine.FusionCompatibility;

/// <summary>
/// Defines the names of the values that can be used with the fusion resolver kind enum.
/// Defines the names of the values that can be used with the Fusion resolver kind enum.
/// </summary>
internal static class FusionEnumValueNames
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
namespace ChilliCream.Nitro.CommandLine.FusionCompatibility;

/// <summary>
/// Defines constants that are used in the fusion graph package.
/// Defines constants that are used in the Fusion graph package.
/// </summary>
public static class FusionGraphPackageConstants
{
/// <summary>
/// Gets the relationship kind of the fusion graph document.
/// Gets the relationship kind of the Fusion graph document.
/// </summary>
public const string FusionKind = "urn:hotchocolate:fusion:graph";

/// <summary>
/// Gets the file name of the fusion graph document.
/// Gets the file name of the Fusion graph document.
/// </summary>
public const string FusionFileName = "fusion.graphql";

/// <summary>
/// Gets the relationship kind of the fusion graph document.
/// Gets the relationship kind of the Fusion graph document.
/// </summary>
public const string FusionSettingsKind = "urn:hotchocolate:fusion:settings";

/// <summary>
/// Gets the file name of the fusion graph document.
/// Gets the file name of the Fusion graph document.
/// </summary>
public const string FusionSettingsFileName = "fusion-settings.json";

/// <summary>
/// Gets relationship id of the fusion graph document.
/// Gets relationship id of the Fusion graph document.
/// </summary>
public const string FusionId = "fusion";

/// <summary>
/// Gets relationship id of the fusion graph settings document.
/// Gets relationship id of the Fusion graph settings document.
/// </summary>
public const string FusionSettingsId = "fusion-settings";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace ChilliCream.Nitro.CommandLine.FusionCompatibility;

/// <summary>
/// Represents an exception that is thrown when a fusion graph package is invalid.
/// Represents an exception that is thrown when a Fusion graph package is invalid.
/// </summary>
public class FusionGraphPackageException : Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace ChilliCream.Nitro.CommandLine.FusionCompatibility;

/// <summary>
/// The base type names for the fusion gateway.
/// The base type names for the Fusion gateway.
/// </summary>
internal static class FusionTypeBaseNames
{
Expand Down Expand Up @@ -41,7 +41,7 @@ internal static class FusionTypeBaseNames
public const string TransportDirective = "transport";

/// <summary>
/// The base name of the fusion directive.
/// The base name of the Fusion directive.
/// </summary>
public const string FusionDirective = "fusion";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace ChilliCream.Nitro.CommandLine.FusionCompatibility;

/// <summary>
/// Helper class that tracks the namespaced fusion types.
/// Helper class that tracks the namespaced Fusion types.
/// </summary>
public sealed class FusionTypeNames
{
Expand Down Expand Up @@ -81,7 +81,7 @@ private FusionTypeNames(
}

/// <summary>
/// Gets the prefix for the fusion types.
/// Gets the prefix for the Fusion types.
/// </summary>
public string? Prefix { get; }

Expand Down Expand Up @@ -121,7 +121,7 @@ private FusionTypeNames(
public string TransportDirective { get; }

/// <summary>
/// Gets the name of the fusion directive.
/// Gets the name of the Fusion directive.
/// </summary>
public string FusionDirective { get; }

Expand Down Expand Up @@ -171,26 +171,26 @@ private FusionTypeNames(
public string ResolverKind { get; }

/// <summary>
/// Specifies if the <paramref name="directiveName"/> represents a fusion directive.
/// Specifies if the <paramref name="directiveName"/> represents a Fusion directive.
/// </summary>
/// <param name="directiveName">
/// A directive name.
/// </param>
/// <returns>
/// <c>true</c> if the specified <paramref name="directiveName"/> represents a fusion directive;
/// <c>true</c> if the specified <paramref name="directiveName"/> represents a Fusion directive;
/// otherwise, <c>false</c>.
/// </returns>
public bool IsFusionDirective(string directiveName)
=> _fusionDirectives.Contains(directiveName);

/// <summary>
/// Specifies if the <paramref name="typeName"/> represents a fusion type.
/// Specifies if the <paramref name="typeName"/> represents a Fusion type.
/// </summary>
/// <param name="typeName">
/// A directive name.
/// </param>
/// <returns>
/// <c>true</c> if the specified <paramref name="typeName"/> represents a fusion type;
/// <c>true</c> if the specified <paramref name="typeName"/> represents a Fusion type;
/// otherwise, <c>false</c>.
/// </returns>
public bool IsFusionType(string typeName)
Expand All @@ -200,10 +200,10 @@ public bool IsFusionType(string typeName)
/// Creates a new instance of <see cref="FusionTypeNames"/>.
/// </summary>
/// <param name="prefix">
/// The prefix for the fusion types.
/// The prefix for the Fusion types.
/// </param>
/// <param name="prefixSelf">
/// Specifies if the fusion directive itself should be prefixed.
/// Specifies if the Fusion directive itself should be prefixed.
/// </param>
/// <returns>
/// Returns a new instance of <see cref="FusionTypeNames"/>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ internal sealed class IdArgument : Argument<string>
{
public IdArgument() : base("id")
{
Description = "The id";
Description = "The ID";
Arity = ArgumentArity.ExactlyOne;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ internal sealed class OptionalIdArgument : Argument<string?>
{
public OptionalIdArgument() : base("id")
{
Description = "The id";
Description = "The ID";
Arity = ArgumentArity.ZeroOrOne;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private static async Task<int> ExecuteAsync(
CancellationToken cancellationToken)
{
console.WriteLine();
console.WriteLine("Creating a api key...");
console.WriteLine("Creating an API key...");
console.WriteLine();

var workspaceId = context.ParseResult
Expand All @@ -48,18 +48,18 @@ private static async Task<int> ExecuteAsync(
{
if (!console.IsHumanReadable())
{
throw Exit("The workspace id or api id is required in non-interactive mode.");
throw Exit("The workspace ID or API ID is required in non-interactive mode.");
}

var choice = await new SelectionPrompt<string>()
.Title("Do you want to create the api key scoped to an api or the whole workspace?")
.Title("Do you want to create the API key scoped to an API or the whole workspace?")
.AddChoices("Api", "Workspace")
.ShowAsync(console, cancellationToken);

if (choice == "Api")
{
apiId = await context
.GetOrSelectApiId("For which api do you want to create a api key?");
.GetOrSelectApiId("For which API do you want to create an API key?");
}
else
{
Expand Down Expand Up @@ -110,7 +110,7 @@ private static async Task<int> ExecuteAsync(
var changeResult = data.CreateApiKey.Result;
if (changeResult is null)
{
throw Exit("Could not create api.");
throw Exit("Could not create API key.");
}

console.OkLine(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ private static async Task<int> ExecuteAsync(
CancellationToken cancellationToken)
{
var choice = await context.ConfirmWhenNotForced(
$"Do you really want to delete api key with id {keyId}",
$"Do you really want to delete API key with ID {keyId}",
cancellationToken);

if (!choice)
{
throw Exit("Api key was not deleted");
throw Exit("API key was not deleted");
}

var result = await client.DeleteApiKeyCommandMutation
Expand All @@ -57,11 +57,11 @@ private static async Task<int> ExecuteAsync(
var changeResult = data.DeleteApiKey.ApiKey;
if (changeResult is null)
{
throw Exit("Could not delete api key");
throw Exit("Could not delete API key");
}

console.OkLine(
$"ApiKey {changeResult.Name.AsHighlight()} [dim](ID:{changeResult.Id})[/] was deleted");
$"API key {changeResult.Name.AsHighlight()} [dim](ID: {changeResult.Id})[/] was deleted");

context.SetResult(ApiKeyDetailPrompt.From(changeResult).ToObject());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private static async Task<int> RenderInteractiveAsync(

var api = await PagedTable
.From(container)
.Title("ApiKeys")
.Title("API Keys")
.AddColumn("Id", x => x.Node.Id)
.AddColumn("Name", x => x.Node.Name)
.RenderAsync(console, ct);
Expand Down
Loading
Loading