diff --git a/Documentation/chronicle/event-store-subscriptions.md b/Documentation/chronicle/event-store-subscriptions.md index 51da381..7513349 100644 --- a/Documentation/chronicle/event-store-subscriptions.md +++ b/Documentation/chronicle/event-store-subscriptions.md @@ -7,7 +7,7 @@ Event store subscriptions let one event store consume events produced in another Lists all event store subscriptions configured for the target event store. ```bash -cratis chronicle event-store-subscriptions list --event-store +cratis chronicle subscriptions list --event-store ``` ### Examples @@ -15,13 +15,13 @@ cratis chronicle event-store-subscriptions list --event-store --event-store +cratis chronicle subscriptions add --event-store ``` ### Arguments @@ -45,13 +45,13 @@ cratis chronicle event-store-subscriptions add --event-store +cratis chronicle subscriptions remove --event-store ``` The command prompts for confirmation before proceeding. Pass `--yes` to skip the prompt in automated workflows. @@ -68,7 +68,7 @@ The command prompts for confirmation before proceeding. Pass `--yes` to skip the | Argument | Description | |---|---| -| `SUBSCRIPTION_ID` | Identifier of the subscription to remove. Use `event-store-subscriptions list` to retrieve IDs. | +| `SUBSCRIPTION_ID` | Identifier of the subscription to remove. Use `subscriptions list` to retrieve IDs. | ### Options @@ -81,11 +81,11 @@ The command prompts for confirmation before proceeding. Pass `--yes` to skip the Remove a subscription interactively: ```bash -cratis chronicle event-store-subscriptions remove orders-from-default --event-store system +cratis chronicle subscriptions remove orders-from-default --event-store system ``` Remove without confirmation: ```bash -cratis chronicle event-store-subscriptions remove orders-from-default --event-store system --yes +cratis chronicle subscriptions remove orders-from-default --event-store system --yes ``` diff --git a/Documentation/chronicle/index.md b/Documentation/chronicle/index.md index 56b27df..a4fb418 100644 --- a/Documentation/chronicle/index.md +++ b/Documentation/chronicle/index.md @@ -31,7 +31,7 @@ Commands that operate within a specific event store or namespace accept the foll | `event-types` | List and inspect registered event type definitions. | | `events` | Query events from an event sequence or retrieve the tail sequence number. | | `observers` | List, inspect, replay, and retry observers. | -| `event-store-subscriptions` | Manage cross-event-store subscriptions for event forwarding. | +| `subscriptions` | Manage cross-event-store subscriptions for event forwarding. | | `failed-partitions` | List and inspect partitions where an observer has failed. | | `projections` | List and inspect projection definitions. | | `read-models` | List, query, and inspect read model instances and snapshots. | diff --git a/Documentation/chronicle/toc.yml b/Documentation/chronicle/toc.yml index c6e727e..41b9eeb 100644 --- a/Documentation/chronicle/toc.yml +++ b/Documentation/chronicle/toc.yml @@ -10,7 +10,7 @@ href: events.md - name: Observers href: observers.md -- name: Event Store Subscriptions +- name: Subscriptions href: event-store-subscriptions.md - name: Failed Partitions href: failed-partitions.md diff --git a/Integration/Chronicle/for_EventStoreSubscriptions/when_adding_and_removing_event_store_subscription.cs b/Integration/Chronicle/for_EventStoreSubscriptions/when_adding_and_removing_event_store_subscription.cs index f9c0c19..8aa7993 100644 --- a/Integration/Chronicle/for_EventStoreSubscriptions/when_adding_and_removing_event_store_subscription.cs +++ b/Integration/Chronicle/for_EventStoreSubscriptions/when_adding_and_removing_event_store_subscription.cs @@ -20,7 +20,7 @@ async Task Because() SubscriptionId = $"integration-test-subscription-{Guid.NewGuid():N}"; AddResult = await RunCliAsync( "chronicle", - "event-store-subscriptions", + "subscriptions", "add", SubscriptionId, "system", @@ -28,7 +28,7 @@ async Task Because() "--event-store", "system"); - var listResult = await RunCliAsync("chronicle", "event-store-subscriptions", "list", "--event-store", "system"); + var listResult = await RunCliAsync("chronicle", "subscriptions", "list", "--event-store", "system"); var subscriptions = JsonDocument.Parse(listResult.StandardOutput).RootElement; var testSubscription = subscriptions.EnumerateArray() .FirstOrDefault(subscription => subscription.GetProperty("identifier").GetString() == SubscriptionId); @@ -36,7 +36,7 @@ async Task Because() if (SubscriptionAppearedInList) { - RemoveResult = await RunCliAsync("chronicle", "event-store-subscriptions", "remove", SubscriptionId, "--event-store", "system", "--yes"); + RemoveResult = await RunCliAsync("chronicle", "subscriptions", "remove", SubscriptionId, "--event-store", "system", "--yes"); } } } diff --git a/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/AddEventStoreSubscriptionCommand.cs b/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/AddEventStoreSubscriptionCommand.cs index 135282f..f83b03e 100644 --- a/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/AddEventStoreSubscriptionCommand.cs +++ b/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/AddEventStoreSubscriptionCommand.cs @@ -10,7 +10,7 @@ namespace Cratis.Cli.Commands.Chronicle.EventStoreSubscriptions; /// [LlmDescription("Adds an event store subscription to a target event store.")] [CliCommand("add", "Add an event store subscription", Branch = typeof(ChronicleBranch.EventStoreSubscriptions))] -[CliExample("chronicle", "event-store-subscriptions", "add", "orders-from-default", "default", "MyCompany.Sales.OrderPlaced")] +[CliExample("chronicle", "subscriptions", "add", "orders-from-default", "default", "MyCompany.Sales.OrderPlaced")] [LlmOutputAdvice("plain", "Plain outputs a simple confirmation message.")] [LlmOption("", "string", "The unique subscription identifier (positional)")] [LlmOption("", "string", "The source event store to subscribe to (positional)")] diff --git a/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/ListEventStoreSubscriptionsCommand.cs b/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/ListEventStoreSubscriptionsCommand.cs index c75e434..1859a04 100644 --- a/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/ListEventStoreSubscriptionsCommand.cs +++ b/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/ListEventStoreSubscriptionsCommand.cs @@ -10,7 +10,7 @@ namespace Cratis.Cli.Commands.Chronicle.EventStoreSubscriptions; /// [LlmDescription("Lists event store subscriptions configured for the target event store.")] [CliCommand("list", "List event store subscriptions", Branch = typeof(ChronicleBranch.EventStoreSubscriptions))] -[CliExample("chronicle", "event-store-subscriptions", "list", "--event-store", "system")] +[CliExample("chronicle", "subscriptions", "list", "--event-store", "system")] [LlmOutputAdvice("plain", "Use plain for consistency with other listing commands.")] public class ListEventStoreSubscriptionsCommand : ChronicleCommand { diff --git a/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/RemoveEventStoreSubscriptionCommand.cs b/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/RemoveEventStoreSubscriptionCommand.cs index f8f33c4..29c8f70 100644 --- a/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/RemoveEventStoreSubscriptionCommand.cs +++ b/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/RemoveEventStoreSubscriptionCommand.cs @@ -9,8 +9,8 @@ namespace Cratis.Cli.Commands.Chronicle.EventStoreSubscriptions; /// Removes an event store subscription. /// [LlmDescription("Removes an event store subscription from a target event store. Destructive — prompts for confirmation unless --yes is specified.")] -[CliCommand("remove", "Remove an event store subscription", Branch = typeof(ChronicleBranch.EventStoreSubscriptions), DynamicCompletion = "event-store-subscriptions")] -[CliExample("chronicle", "event-store-subscriptions", "remove", "orders-from-default")] +[CliCommand("remove", "Remove an event store subscription", Branch = typeof(ChronicleBranch.EventStoreSubscriptions), DynamicCompletion = "subscriptions")] +[CliExample("chronicle", "subscriptions", "remove", "orders-from-default")] [LlmOutputAdvice("plain", "Plain outputs a simple confirmation message.")] [LlmOption("", "string", "The unique subscription identifier to remove (positional)")] public class RemoveEventStoreSubscriptionCommand : ChronicleCommand diff --git a/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/RemoveEventStoreSubscriptionSettings.cs b/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/RemoveEventStoreSubscriptionSettings.cs index 9a2defb..0e01c6c 100644 --- a/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/RemoveEventStoreSubscriptionSettings.cs +++ b/Source/Cli/Commands/Chronicle/EventStoreSubscriptions/RemoveEventStoreSubscriptionSettings.cs @@ -12,6 +12,6 @@ public class RemoveEventStoreSubscriptionSettings : EventStoreSettings /// Gets or sets the subscription identifier. /// [CommandArgument(0, "")] - [Description("Subscription identifier (from 'cratis chronicle event-store-subscriptions list')")] + [Description("Subscription identifier (from 'cratis chronicle subscriptions list')")] public string SubscriptionId { get; set; } = string.Empty; } diff --git a/Source/Cli/Commands/Completions/DynamicCompleteCommand.cs b/Source/Cli/Commands/Completions/DynamicCompleteCommand.cs index 79ee389..6524eb9 100644 --- a/Source/Cli/Commands/Completions/DynamicCompleteCommand.cs +++ b/Source/Cli/Commands/Completions/DynamicCompleteCommand.cs @@ -156,7 +156,7 @@ protected override async Task ExecuteCommandAsync(IServices services, Dynam break; - case "event-store-subscriptions": + case "subscriptions": var subscriptions = await services.EventStoreSubscriptions.GetSubscriptions(new GetEventStoreSubscriptionsRequest { TargetEventStore = eventStore diff --git a/Source/Cli/Registration/ChronicleBranch.cs b/Source/Cli/Registration/ChronicleBranch.cs index ddfd5a7..417cdab 100644 --- a/Source/Cli/Registration/ChronicleBranch.cs +++ b/Source/Cli/Registration/ChronicleBranch.cs @@ -33,7 +33,7 @@ public static class Events { } public static class Observers { } /// Event store subscription management. - [CliBranch("event-store-subscriptions", "Manage event store subscriptions for cross-store event flow. Supports listing, adding, and removing subscriptions.")] + [CliBranch("subscriptions", "Manage event store subscriptions for cross-store event flow. Supports listing, adding, and removing subscriptions.")] public static class EventStoreSubscriptions { } /// Failed partition inspection.