From 617bfca69f785f7dc209791f0753c9e56bebafe4 Mon Sep 17 00:00:00 2001 From: tobias-tengler <45513122+tobias-tengler@users.noreply.github.com> Date: Tue, 19 May 2026 12:02:32 +0200 Subject: [PATCH] Respect NITRO_CLOUD_URL environment variable --- .../Extensions/RootCommandExtensions.cs | 14 +-- .../Options/OptionalCloudUrlOption.cs | 4 +- .../ApiKeys/CreateApiKeyCommandTests.cs | 2 +- .../ApiKeys/DeleteApiKeyCommandTests.cs | 2 +- .../ApiKeys/ListApiKeyCommandTests.cs | 2 +- .../Commands/Apis/CreateApiCommandTests.cs | 2 +- .../Commands/Apis/DeleteApiCommandTests.cs | 2 +- .../Commands/Apis/ListApiCommandTests.cs | 2 +- .../Apis/SetApiSettingsCommandTests.cs | 2 +- .../Commands/Apis/ShowApiCommandTests.cs | 2 +- .../Clients/CreateClientCommandTests.cs | 2 +- .../Clients/DeleteClientCommandTests.cs | 2 +- .../Clients/DownloadClientCommandTests.cs | 2 +- .../Clients/ListClientCommandTests.cs | 2 +- ...ListClientPublishedVersionsCommandTests.cs | 2 +- .../Clients/ListClientVersionsCommandTests.cs | 2 +- .../Clients/PublishClientCommandTests.cs | 2 +- .../Clients/ShowClientCommandTests.cs | 2 +- .../Clients/UnpublishClientCommandTests.cs | 2 +- .../Clients/UploadClientCommandTests.cs | 2 +- .../Clients/ValidateClientCommandTests.cs | 2 +- .../CreateEnvironmentCommandTests.cs | 2 +- .../ListEnvironmentCommandTests.cs | 2 +- .../ShowEnvironmentCommandTests.cs | 2 +- .../Fusion/FusionComposeCommandTests.cs | 2 +- ...onConfigurationPublishBeginCommandTests.cs | 2 +- ...nConfigurationPublishCancelCommandTests.cs | 2 +- ...nConfigurationPublishCommitCommandTests.cs | 2 +- ...onConfigurationPublishStartCommandTests.cs | 2 +- ...onfigurationPublishValidateCommandTests.cs | 2 +- .../Fusion/FusionDownloadCommandTests.cs | 2 +- .../Fusion/FusionPublishCommandTests.cs | 2 +- .../Fusion/FusionSettingsSetCommandTests.cs | 2 +- .../Fusion/FusionUploadCommandTests.cs | 2 +- .../Fusion/FusionValidateCommandTests.cs | 2 +- .../CreateMcpFeatureCollectionCommandTests.cs | 2 +- .../DeleteMcpFeatureCollectionCommandTests.cs | 2 +- .../ListMcpFeatureCollectionCommandTests.cs | 2 +- ...PublishMcpFeatureCollectionCommandTests.cs | 2 +- .../UploadMcpFeatureCollectionCommandTests.cs | 2 +- ...alidateMcpFeatureCollectionCommandTests.cs | 2 +- .../Commands/Mocks/CreateMockCommandTests.cs | 2 +- .../Commands/Mocks/ListMockCommandTests.cs | 2 +- .../Commands/Mocks/UpdateMockCommandTests.cs | 2 +- .../CreateOpenApiCollectionCommandTests.cs | 2 +- .../DeleteOpenApiCollectionCommandTests.cs | 2 +- .../ListOpenApiCollectionCommandTests.cs | 2 +- .../PublishOpenApiCollectionCommandTests.cs | 2 +- .../UploadOpenApiCollectionCommandTests.cs | 2 +- .../ValidateOpenApiCollectionCommandTests.cs | 2 +- .../CreatePersonalAccessTokenCommandTests.cs | 2 +- .../ListPersonalAccessTokenCommandTests.cs | 2 +- .../RevokePersonalAccessTokenCommandTests.cs | 2 +- .../Schemas/DownloadSchemaCommandTests.cs | 2 +- .../Schemas/PublishSchemaCommandTests.cs | 2 +- .../Schemas/UploadSchemaCommandTests.cs | 2 +- .../Schemas/ValidateSchemaCommandTests.cs | 2 +- .../Stages/DeleteStageCommandTests.cs | 2 +- .../Commands/Stages/EditStagesCommandTests.cs | 2 +- .../Commands/Stages/ListStagesCommandTests.cs | 2 +- .../Workspaces/CreateWorkspaceCommandTests.cs | 2 +- .../CurrentWorkspaceCommandTests.cs | 2 +- .../Workspaces/ListWorkspaceCommandTests.cs | 2 +- .../SetDefaultWorkspaceCommandTests.cs | 2 +- .../Workspaces/ShowWorkspaceCommandTests.cs | 2 +- .../CommandLine.Tests/GlobalOptionsTests.cs | 109 ++++++++++++++++-- 66 files changed, 171 insertions(+), 82 deletions(-) diff --git a/src/Nitro/CommandLine/src/CommandLine/Extensions/RootCommandExtensions.cs b/src/Nitro/CommandLine/src/CommandLine/Extensions/RootCommandExtensions.cs index 0fef396c734..95b6d5f6342 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Extensions/RootCommandExtensions.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Extensions/RootCommandExtensions.cs @@ -75,14 +75,12 @@ private static void ConfigureClientContext( ParseResult parseResult, Session? session) { - var cloudUrlResult = parseResult.GetResult(Opt.Instance); - var cloudUrl = parseResult.GetValue(Opt.Instance); - string? apiUrl; - if (cloudUrlResult is { Implicit: false } && !string.IsNullOrWhiteSpace(cloudUrl)) - { - apiUrl = cloudUrl; - } - else + // The option resolves explicit --cloud-url, then the NITRO_CLOUD_URL env var. + // We then fall back to the session's URL, and finally Constants.ApiUrl + // (applied by NitroClientContext.Configure when apiUrl is null). + var apiUrl = parseResult.GetValue(Opt.Instance); + + if (string.IsNullOrWhiteSpace(apiUrl)) { apiUrl = session?.ApiUrl; } diff --git a/src/Nitro/CommandLine/src/CommandLine/Options/OptionalCloudUrlOption.cs b/src/Nitro/CommandLine/src/CommandLine/Options/OptionalCloudUrlOption.cs index dcc80b912a5..bc82118a6bc 100644 --- a/src/Nitro/CommandLine/src/CommandLine/Options/OptionalCloudUrlOption.cs +++ b/src/Nitro/CommandLine/src/CommandLine/Options/OptionalCloudUrlOption.cs @@ -1,5 +1,3 @@ -using ChilliCream.Nitro.CommandLine.Helpers; - namespace ChilliCream.Nitro.CommandLine; internal sealed class OptionalCloudUrlOption : Option @@ -8,6 +6,6 @@ public OptionalCloudUrlOption() : base("--cloud-url") { Description = "The URL of the Nitro backend (only needed for self-hosted or dedicated deployments)"; Required = false; - this.DefaultFromEnvironmentValue(EnvironmentVariables.CloudUrl, defaultValue: Constants.ApiUrl["https://".Length..]); + this.DefaultFromEnvironmentValue(EnvironmentVariables.CloudUrl); } } diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/CreateApiKeyCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/CreateApiKeyCommandTests.cs index 4cd663508b2..c4f8c66bd45 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/CreateApiKeyCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/CreateApiKeyCommandTests.cs @@ -28,7 +28,7 @@ nitro api-key create [options] --api-id The ID of the API [env: NITRO_API_ID] --workspace-id The ID of the workspace [env: NITRO_WORKSPACE_ID] --stage-condition [Preview] Limit the API key to a specific stage name (if not set, the key is valid for all stages) - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/DeleteApiKeyCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/DeleteApiKeyCommandTests.cs index 8a135903898..c97db19043d 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/DeleteApiKeyCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/DeleteApiKeyCommandTests.cs @@ -28,7 +28,7 @@ nitro api-key delete [options] Options: --force Skip confirmation prompts for deletes and overwrites - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/ListApiKeyCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/ListApiKeyCommandTests.cs index 7d20ff1a3c7..39f2dff5e3b 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/ListApiKeyCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/ListApiKeyCommandTests.cs @@ -23,7 +23,7 @@ nitro api-key list [options] Options: --cursor The pagination cursor to resume from [env: NITRO_CURSOR] --workspace-id The ID of the workspace [env: NITRO_WORKSPACE_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/CreateApiCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/CreateApiCommandTests.cs index 5eb4c0834f7..ad19eb2d677 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/CreateApiCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/CreateApiCommandTests.cs @@ -28,7 +28,7 @@ nitro api create [options] --name The name of the API [env: NITRO_API_NAME] --workspace-id The ID of the workspace [env: NITRO_WORKSPACE_ID] --kind The kind of the API [env: NITRO_API_KIND] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/DeleteApiCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/DeleteApiCommandTests.cs index 27079ac8963..467362c39df 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/DeleteApiCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/DeleteApiCommandTests.cs @@ -27,7 +27,7 @@ nitro api delete [options] Options: --force Skip confirmation prompts for deletes and overwrites - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ListApiCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ListApiCommandTests.cs index 2398732da3e..b37e8855d9f 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ListApiCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ListApiCommandTests.cs @@ -23,7 +23,7 @@ nitro api list [options] Options: --cursor The pagination cursor to resume from [env: NITRO_CURSOR] --workspace-id The ID of the workspace [env: NITRO_WORKSPACE_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/SetApiSettingsCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/SetApiSettingsCommandTests.cs index 1ab0ae35d37..d4b0fc8ce3a 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/SetApiSettingsCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/SetApiSettingsCommandTests.cs @@ -28,7 +28,7 @@ nitro api set-settings [options] Options: --treat-dangerous-as-breaking Treat dangerous changes as breaking [env: NITRO_TREAT_DANGEROUS_AS_BREAKING] --allow-breaking-schema-changes Allow breaking schema changes when no client breaks [env: NITRO_ALLOW_BREAKING_SCHEMA_CHANGES] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ShowApiCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ShowApiCommandTests.cs index ef445561880..08ec9de15a1 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ShowApiCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ShowApiCommandTests.cs @@ -24,7 +24,7 @@ nitro api show [options] The resource ID Options: - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/CreateClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/CreateClientCommandTests.cs index 8018d197ce1..5d2459a192e 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/CreateClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/CreateClientCommandTests.cs @@ -26,7 +26,7 @@ nitro client create [options] Options: --api-id The ID of the API [env: NITRO_API_ID] --name The name of the client [env: NITRO_CLIENT_NAME] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DeleteClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DeleteClientCommandTests.cs index e34fe4e394a..a925d485239 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DeleteClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DeleteClientCommandTests.cs @@ -28,7 +28,7 @@ nitro client delete [] [options] Options: --force Skip confirmation prompts for deletes and overwrites - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DownloadClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DownloadClientCommandTests.cs index 80203b6e5a2..278525057d8 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DownloadClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DownloadClientCommandTests.cs @@ -31,7 +31,7 @@ nitro client download [options] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --path (REQUIRED) The path where the client is stored --format The format in which the client is stored [default: relay] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientCommandTests.cs index 3ff0942efc5..e5ba5948338 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientCommandTests.cs @@ -23,7 +23,7 @@ nitro client list [command] [options] Options: --api-id The ID of the API [env: NITRO_API_ID] --cursor The pagination cursor to resume from [env: NITRO_CURSOR] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientPublishedVersionsCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientPublishedVersionsCommandTests.cs index e26f48e1a07..98e09f5b429 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientPublishedVersionsCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientPublishedVersionsCommandTests.cs @@ -25,7 +25,7 @@ nitro client list published-versions [options] Options: --client-id The ID of the client [env: NITRO_CLIENT_ID] --cursor The pagination cursor to resume from [env: NITRO_CURSOR] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientVersionsCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientVersionsCommandTests.cs index 991092bf225..0a0f5927867 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientVersionsCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ListClientVersionsCommandTests.cs @@ -24,7 +24,7 @@ nitro client list versions [options] Options: --client-id The ID of the client [env: NITRO_CLIENT_ID] --cursor The pagination cursor to resume from [env: NITRO_CURSOR] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/PublishClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/PublishClientCommandTests.cs index 2a293ba7515..c0e9fca68cd 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/PublishClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/PublishClientCommandTests.cs @@ -29,7 +29,7 @@ nitro client publish [options] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --force Skip confirmation prompts for deletes and overwrites --wait-for-approval Wait for the deployment to be approved before completing [env: NITRO_WAIT_FOR_APPROVAL] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ShowClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ShowClientCommandTests.cs index fe06b30dbf9..7aab965bfb4 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ShowClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ShowClientCommandTests.cs @@ -27,7 +27,7 @@ nitro client show [options] The resource ID Options: - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UnpublishClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UnpublishClientCommandTests.cs index cbd8170ff1d..10d3108b636 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UnpublishClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UnpublishClientCommandTests.cs @@ -26,7 +26,7 @@ nitro client unpublish [options] --tag (REQUIRED) One or more client version tags to unpublish [env: NITRO_TAG] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --client-id (REQUIRED) The ID of the client [env: NITRO_CLIENT_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UploadClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UploadClientCommandTests.cs index 575895d8bf6..3b695bc1d2f 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UploadClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/UploadClientCommandTests.cs @@ -26,7 +26,7 @@ nitro client upload [options] --client-id (REQUIRED) The ID of the client [env: NITRO_CLIENT_ID] --tag (REQUIRED) The tag of the schema version to deploy [env: NITRO_TAG] --operations-file (REQUIRED) The path to the json file with the operations [env: NITRO_OPERATIONS_FILE] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ValidateClientCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ValidateClientCommandTests.cs index e3ddae978e6..023003f7297 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ValidateClientCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ValidateClientCommandTests.cs @@ -26,7 +26,7 @@ nitro client validate [options] --client-id (REQUIRED) The ID of the client [env: NITRO_CLIENT_ID] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --operations-file (REQUIRED) The path to the json file with the operations [env: NITRO_OPERATIONS_FILE] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/CreateEnvironmentCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/CreateEnvironmentCommandTests.cs index fa503863cce..d45cb5da6f4 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/CreateEnvironmentCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/CreateEnvironmentCommandTests.cs @@ -27,7 +27,7 @@ nitro environment create [options] Options: -n, --name The name of the environment --workspace-id The ID of the workspace [env: NITRO_WORKSPACE_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ListEnvironmentCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ListEnvironmentCommandTests.cs index 4b741ceb6c1..0b493076eb0 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ListEnvironmentCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ListEnvironmentCommandTests.cs @@ -24,7 +24,7 @@ nitro environment list [options] Options: --cursor The pagination cursor to resume from [env: NITRO_CURSOR] --workspace-id The ID of the workspace [env: NITRO_WORKSPACE_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ShowEnvironmentCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ShowEnvironmentCommandTests.cs index e3d90dd595c..ba88cd8d8c5 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ShowEnvironmentCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/ShowEnvironmentCommandTests.cs @@ -25,7 +25,7 @@ nitro environment show [options] The resource ID Options: - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionComposeCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionComposeCommandTests.cs index 503811310a2..0f4ac84d930 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionComposeCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionComposeCommandTests.cs @@ -47,7 +47,7 @@ nitro fusion compose [options] --watch Watch for file changes and recompose automatically -w, --working-directory Set the working directory for the command --exclude-by-tag One or more tags to exclude from the composition - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishBeginCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishBeginCommandTests.cs index a4475c34cd7..f1afc0e4c78 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishBeginCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishBeginCommandTests.cs @@ -30,7 +30,7 @@ nitro fusion publish begin [options] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --api-id (REQUIRED) The ID of the API [env: NITRO_API_ID] --wait-for-approval Wait for the deployment to be approved before completing [env: NITRO_WAIT_FOR_APPROVAL] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCancelCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCancelCommandTests.cs index e45c72c10d9..b93694077aa 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCancelCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCancelCommandTests.cs @@ -22,7 +22,7 @@ nitro fusion publish cancel [options] Options: --request-id The ID of a request [env: NITRO_REQUEST_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCommitCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCommitCommandTests.cs index fe8dc4a1306..53ca334cc75 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCommitCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCommitCommandTests.cs @@ -24,7 +24,7 @@ nitro fusion publish commit [options] Options: --request-id The ID of a request [env: NITRO_REQUEST_ID] -a, --archive, --configuration (REQUIRED) The path to a Fusion archive file (the '--configuration' alias is deprecated) [env: NITRO_FUSION_CONFIG_FILE] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishStartCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishStartCommandTests.cs index 9e914ba312a..e536ea4b02f 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishStartCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishStartCommandTests.cs @@ -20,7 +20,7 @@ nitro fusion publish start [options] Options: --request-id The ID of a request [env: NITRO_REQUEST_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishValidateCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishValidateCommandTests.cs index 0dd66268975..ebb896ffe6c 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishValidateCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishValidateCommandTests.cs @@ -27,7 +27,7 @@ nitro fusion publish validate [options] Options: --request-id The ID of a request [env: NITRO_REQUEST_ID] -a, --archive, --configuration (REQUIRED) The path to a Fusion archive file (the '--configuration' alias is deprecated) [env: NITRO_FUSION_CONFIG_FILE] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionDownloadCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionDownloadCommandTests.cs index 378482510f5..2de1667d5a6 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionDownloadCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionDownloadCommandTests.cs @@ -27,7 +27,7 @@ nitro fusion download [options] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --version The version of the archive to download [default: 2.0.0] --output-file The file path to write the output to [env: NITRO_OUTPUT_FILE] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionPublishCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionPublishCommandTests.cs index 6d37ad0c370..311ccfba78a 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionPublishCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionPublishCommandTests.cs @@ -35,7 +35,7 @@ nitro fusion publish [command] [options] --force Skip confirmation prompts for deletes and overwrites --wait-for-approval Wait for the deployment to be approved before completing [env: NITRO_WAIT_FOR_APPROVAL] -w, --working-directory Set the working directory for the command - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionSettingsSetCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionSettingsSetCommandTests.cs index ba130ee28f4..a4859a87128 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionSettingsSetCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionSettingsSetCommandTests.cs @@ -28,7 +28,7 @@ nitro fusion settings set [options] Options: -a, --archive, --configuration (REQUIRED) The path to a Fusion archive file (the '--configuration' alias is deprecated) [env: NITRO_FUSION_CONFIG_FILE] -e, --env, --environment The name of the environment used for value substitution in the schema-settings.json files - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionUploadCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionUploadCommandTests.cs index 66717e67d8e..1f3879728fc 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionUploadCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionUploadCommandTests.cs @@ -27,7 +27,7 @@ nitro fusion upload [options] --tag (REQUIRED) The tag of the schema version to deploy [env: NITRO_TAG] -f, --source-schema-file (REQUIRED) The path to a source schema file (.graphqls) or directory containing a source schema file -w, --working-directory Set the working directory for the command - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionValidateCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionValidateCommandTests.cs index ac2cef02b0e..2c7a02dfcc9 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionValidateCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionValidateCommandTests.cs @@ -26,7 +26,7 @@ nitro fusion validate [options] -a, --archive, --configuration The path to a Fusion archive file (the '--configuration' alias is deprecated) [env: NITRO_FUSION_CONFIG_FILE] --legacy-v1-archive The path to a Fusion v1 archive file. This option is only intended to be used during the migration from Fusion v1 to Fusion v2+. -f, --source-schema-file One or more paths to a source schema file (.graphqls) or directory containing a source schema file - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/CreateMcpFeatureCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/CreateMcpFeatureCollectionCommandTests.cs index 0db115ab71b..81ef00d042b 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/CreateMcpFeatureCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/CreateMcpFeatureCollectionCommandTests.cs @@ -25,7 +25,7 @@ nitro mcp create [options] Options: --api-id The ID of the API [env: NITRO_API_ID] --name The name of the MCP Feature Collection [env: NITRO_MCP_FEATURE_COLLECTION_NAME] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/DeleteMcpFeatureCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/DeleteMcpFeatureCollectionCommandTests.cs index 9a777a578f9..2ca039f07bf 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/DeleteMcpFeatureCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/DeleteMcpFeatureCollectionCommandTests.cs @@ -27,7 +27,7 @@ nitro mcp delete [] [options] Options: --force Skip confirmation prompts for deletes and overwrites - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ListMcpFeatureCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ListMcpFeatureCollectionCommandTests.cs index 0e7b0432083..79b63479ae6 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ListMcpFeatureCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ListMcpFeatureCollectionCommandTests.cs @@ -23,7 +23,7 @@ nitro mcp list [options] Options: --api-id The ID of the API [env: NITRO_API_ID] --cursor The pagination cursor to resume from [env: NITRO_CURSOR] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/PublishMcpFeatureCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/PublishMcpFeatureCollectionCommandTests.cs index 5e1b1624fce..e14dfd497c5 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/PublishMcpFeatureCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/PublishMcpFeatureCollectionCommandTests.cs @@ -29,7 +29,7 @@ nitro mcp publish [options] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --force Skip confirmation prompts for deletes and overwrites --wait-for-approval Wait for the deployment to be approved before completing [env: NITRO_WAIT_FOR_APPROVAL] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/UploadMcpFeatureCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/UploadMcpFeatureCollectionCommandTests.cs index db3cd422fdc..74db4c367a2 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/UploadMcpFeatureCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/UploadMcpFeatureCollectionCommandTests.cs @@ -28,7 +28,7 @@ nitro mcp upload [options] --tag (REQUIRED) The tag of the schema version to deploy [env: NITRO_TAG] -p, --prompt-pattern One or more file patterns to locate MCP prompt definition files (*.json) -t, --tool-pattern One or more file patterns to locate MCP tool definition files (*.graphql) - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ValidateMcpFeatureCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ValidateMcpFeatureCollectionCommandTests.cs index bdc98541aba..3f12fd5d850 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ValidateMcpFeatureCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ValidateMcpFeatureCollectionCommandTests.cs @@ -28,7 +28,7 @@ nitro mcp validate [options] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] -p, --prompt-pattern One or more file patterns to locate MCP prompt definition files (*.json) -t, --tool-pattern One or more file patterns to locate MCP tool definition files (*.graphql) - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/CreateMockCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/CreateMockCommandTests.cs index 50ee2c077ec..dd81ea38d44 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/CreateMockCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/CreateMockCommandTests.cs @@ -28,7 +28,7 @@ nitro mock create [options] --schema (REQUIRED) The path to the graphql file with the schema [env: NITRO_SCHEMA_FILE] --url (REQUIRED) The URL of the downstream service [env: NITRO_DOWNSTREAM_URL] --name (REQUIRED) The name of the mock schema [env: NITRO_MOCK_SCHEMA_NAME] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/ListMockCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/ListMockCommandTests.cs index b30fc427563..d72f5d7135c 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/ListMockCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/ListMockCommandTests.cs @@ -23,7 +23,7 @@ nitro mock list [options] Options: --api-id The ID of the API [env: NITRO_API_ID] --cursor The pagination cursor to resume from [env: NITRO_CURSOR] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/UpdateMockCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/UpdateMockCommandTests.cs index f9633c6b8ff..1d8c7a8b85f 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/UpdateMockCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/UpdateMockCommandTests.cs @@ -30,7 +30,7 @@ nitro mock update [] [options] --schema The path to the graphql file with the schema [env: NITRO_SCHEMA_FILE] --url The URL of the downstream service [env: NITRO_DOWNSTREAM_URL] --name The name of the mock schema [env: NITRO_MOCK_SCHEMA_NAME] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/CreateOpenApiCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/CreateOpenApiCollectionCommandTests.cs index f8e994a8513..7db5ca79efc 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/CreateOpenApiCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/CreateOpenApiCollectionCommandTests.cs @@ -25,7 +25,7 @@ nitro openapi create [options] Options: --api-id The ID of the API [env: NITRO_API_ID] --name The name of the OpenAPI collection [env: NITRO_OPENAPI_COLLECTION_NAME] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/DeleteOpenApiCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/DeleteOpenApiCollectionCommandTests.cs index 9521893abaa..65b45204b00 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/DeleteOpenApiCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/DeleteOpenApiCollectionCommandTests.cs @@ -27,7 +27,7 @@ nitro openapi delete [] [options] Options: --force Skip confirmation prompts for deletes and overwrites - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ListOpenApiCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ListOpenApiCollectionCommandTests.cs index cd8a94119bd..3f95778fea6 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ListOpenApiCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ListOpenApiCollectionCommandTests.cs @@ -23,7 +23,7 @@ nitro openapi list [options] Options: --api-id The ID of the API [env: NITRO_API_ID] --cursor The pagination cursor to resume from [env: NITRO_CURSOR] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/PublishOpenApiCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/PublishOpenApiCollectionCommandTests.cs index 9f0bbcdad41..50a0c462c0a 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/PublishOpenApiCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/PublishOpenApiCollectionCommandTests.cs @@ -29,7 +29,7 @@ nitro openapi publish [options] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --force Skip confirmation prompts for deletes and overwrites --wait-for-approval Wait for the deployment to be approved before completing [env: NITRO_WAIT_FOR_APPROVAL] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/UploadOpenApiCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/UploadOpenApiCollectionCommandTests.cs index 0c2d3b7ce64..85a665b363c 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/UploadOpenApiCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/UploadOpenApiCollectionCommandTests.cs @@ -27,7 +27,7 @@ nitro openapi upload [options] --openapi-collection-id (REQUIRED) The ID of the OpenAPI collection [env: NITRO_OPENAPI_COLLECTION_ID] --tag (REQUIRED) The tag of the schema version to deploy [env: NITRO_TAG] -p, --pattern (REQUIRED) One or more glob patterns for selecting OpenAPI document files - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ValidateOpenApiCollectionCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ValidateOpenApiCollectionCommandTests.cs index 81e165882ab..e901786a152 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ValidateOpenApiCollectionCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ValidateOpenApiCollectionCommandTests.cs @@ -27,7 +27,7 @@ nitro openapi validate [options] --openapi-collection-id (REQUIRED) The ID of the OpenAPI collection [env: NITRO_OPENAPI_COLLECTION_ID] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] -p, --pattern (REQUIRED) One or more glob patterns for selecting OpenAPI document files - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/CreatePersonalAccessTokenCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/CreatePersonalAccessTokenCommandTests.cs index 974f45a81c7..af0b398bf1b 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/CreatePersonalAccessTokenCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/CreatePersonalAccessTokenCommandTests.cs @@ -26,7 +26,7 @@ nitro pat create [options] Options: --description The description of the personal access token [env: NITRO_DESCRIPTION] --expires The expiration time of the personal access token in days [env: NITRO_EXPIRES] [default: 180] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/ListPersonalAccessTokenCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/ListPersonalAccessTokenCommandTests.cs index 52e9c04e526..12f3e5bd653 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/ListPersonalAccessTokenCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/ListPersonalAccessTokenCommandTests.cs @@ -23,7 +23,7 @@ nitro pat list [options] Options: --cursor The pagination cursor to resume from [env: NITRO_CURSOR] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommandTests.cs index 4dfde314161..864536d4914 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommandTests.cs @@ -28,7 +28,7 @@ nitro pat revoke [options] Options: --force Skip confirmation prompts for deletes and overwrites - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/DownloadSchemaCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/DownloadSchemaCommandTests.cs index e030900757e..23e8cec77ab 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/DownloadSchemaCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/DownloadSchemaCommandTests.cs @@ -28,7 +28,7 @@ nitro schema download [options] --api-id (REQUIRED) The ID of the API [env: NITRO_API_ID] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --output-file The file path to write the output to [env: NITRO_OUTPUT_FILE] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/PublishSchemaCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/PublishSchemaCommandTests.cs index 84602951193..27969f1957f 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/PublishSchemaCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/PublishSchemaCommandTests.cs @@ -29,7 +29,7 @@ nitro schema publish [options] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --force Skip confirmation prompts for deletes and overwrites --wait-for-approval Wait for the deployment to be approved before completing [env: NITRO_WAIT_FOR_APPROVAL] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/UploadSchemaCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/UploadSchemaCommandTests.cs index 76e0507aeb9..b1175255a7d 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/UploadSchemaCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/UploadSchemaCommandTests.cs @@ -27,7 +27,7 @@ nitro schema upload [options] --api-id (REQUIRED) The ID of the API [env: NITRO_API_ID] --tag (REQUIRED) The tag of the schema version to deploy [env: NITRO_TAG] --schema-file (REQUIRED) The path to the graphql file with the schema definition [env: NITRO_SCHEMA_FILE] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/ValidateSchemaCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/ValidateSchemaCommandTests.cs index 25581f25b78..6dfd0540799 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/ValidateSchemaCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/ValidateSchemaCommandTests.cs @@ -27,7 +27,7 @@ nitro schema validate [options] --api-id (REQUIRED) The ID of the API [env: NITRO_API_ID] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --schema-file (REQUIRED) The path to the graphql file with the schema definition [env: NITRO_SCHEMA_FILE] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/DeleteStageCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/DeleteStageCommandTests.cs index de828b3a8ea..9ede0f21728 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/DeleteStageCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/DeleteStageCommandTests.cs @@ -26,7 +26,7 @@ nitro stage delete [options] --api-id The ID of the API [env: NITRO_API_ID] --stage (REQUIRED) The name of the stage [env: NITRO_STAGE] --force Skip confirmation prompts for deletes and overwrites - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/EditStagesCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/EditStagesCommandTests.cs index 97d497a6bc9..4dde59452cc 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/EditStagesCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/EditStagesCommandTests.cs @@ -25,7 +25,7 @@ nitro stage edit [options] Options: --api-id The ID of the API [env: NITRO_API_ID] --configuration The stage configuration. If not provided, an interactive selection will beshown. This input is a JSON array of stage configuration in the following format:[{"name":"stage1","displayName":"Stage 1","conditions":[{"afterStage":"stage2"}]},...] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/ListStagesCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/ListStagesCommandTests.cs index ed77555bbf9..a314a578179 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/ListStagesCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/ListStagesCommandTests.cs @@ -22,7 +22,7 @@ nitro stage list [options] Options: --api-id The ID of the API [env: NITRO_API_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CreateWorkspaceCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CreateWorkspaceCommandTests.cs index 8908f625327..6e8455a79be 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CreateWorkspaceCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CreateWorkspaceCommandTests.cs @@ -27,7 +27,7 @@ nitro workspace create [options] Options: --name The name of the workspace --default Set the created workspace as the default workspace - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CurrentWorkspaceCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CurrentWorkspaceCommandTests.cs index bc5b4a32643..d604edf2694 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CurrentWorkspaceCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CurrentWorkspaceCommandTests.cs @@ -22,7 +22,7 @@ Show the name of the currently selected workspace. nitro workspace current [options] Options: - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ListWorkspaceCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ListWorkspaceCommandTests.cs index 49d367e3cd1..4b69d7aaccf 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ListWorkspaceCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ListWorkspaceCommandTests.cs @@ -23,7 +23,7 @@ nitro workspace list [options] Options: --cursor The pagination cursor to resume from [env: NITRO_CURSOR] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/SetDefaultWorkspaceCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/SetDefaultWorkspaceCommandTests.cs index f346e76dc7a..a1ca24a9ad8 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/SetDefaultWorkspaceCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/SetDefaultWorkspaceCommandTests.cs @@ -26,7 +26,7 @@ nitro workspace set-default [options] Options: --workspace-id The ID of the workspace [env: NITRO_WORKSPACE_ID] - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ShowWorkspaceCommandTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ShowWorkspaceCommandTests.cs index 16094fa07ba..0eaa91af604 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ShowWorkspaceCommandTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/ShowWorkspaceCommandTests.cs @@ -25,7 +25,7 @@ nitro workspace show [options] The resource ID Options: - --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] [default: api.chillicream.com] + --cloud-url The URL of the Nitro backend (only needed for self-hosted or dedicated deployments) [env: NITRO_CLOUD_URL] --api-key The API key used for authentication [env: NITRO_API_KEY] --output The output format (enables non-interactive mode) [env: NITRO_OUTPUT_FORMAT] -?, -h, --help Show help and usage information diff --git a/src/Nitro/CommandLine/test/CommandLine.Tests/GlobalOptionsTests.cs b/src/Nitro/CommandLine/test/CommandLine.Tests/GlobalOptionsTests.cs index 9b56ccdfb12..e34c75bfc0e 100644 --- a/src/Nitro/CommandLine/test/CommandLine.Tests/GlobalOptionsTests.cs +++ b/src/Nitro/CommandLine/test/CommandLine.Tests/GlobalOptionsTests.cs @@ -118,6 +118,18 @@ public async Task ExecuteAsync_Should_PreferExplicitApiKey_Over_EnvApiKey() Assert.False(client.DefaultRequestHeaders.Contains("Authorization")); } + [Fact] + public async Task ExecuteAsync_Should_NotSetAuth_When_NoAuthAvailable() + { + // act + await using var provider = await BuildAndExecuteAsync([]); + using var client = CreateApiClient(provider); + + // assert + Assert.False(client.DefaultRequestHeaders.Contains("CCC-api-key")); + Assert.False(client.DefaultRequestHeaders.Contains("Authorization")); + } + [Theory] [InlineData("custom.host.com", "https://custom.host.com/graphql")] [InlineData("https://custom.host.com", "https://custom.host.com/graphql")] @@ -155,28 +167,106 @@ public async Task ExecuteAsync_Should_UseSessionUrl_When_NoExplicitUrl() } [Fact] - public async Task ExecuteAsync_Should_UseDefaultUrl_When_NoSessionAndNoExplicitUrl() + public async Task ExecuteAsync_Should_UseExplicitCloudUrl_Over_SessionUrl() { + // arrange + var session = CreateSessionWithTokens(apiUrl: "session-api.chillicream.com"); + // act - await using var provider = await BuildAndExecuteAsync(["--api-key", "x"]); + await using var provider = await BuildAndExecuteAsync( + ["--cloud-url", "cli-api.chillicream.com"], session); using var client = CreateApiClient(provider); // assert Assert.Equal( - new Uri("https://api.chillicream.com/graphql"), + new Uri("https://cli-api.chillicream.com/graphql"), client.BaseAddress); } [Fact] - public async Task ExecuteAsync_Should_NotSetAuth_When_NoAuthAvailable() + public async Task ExecuteAsync_Should_UseEnvCloudUrl_When_NoExplicitUrl() + { + // arrange + var envProvider = CreateEnvironmentProvider(cloudUrl: "env-api.chillicream.com"); + + // act + await using var provider = await BuildAndExecuteAsync( + ["--api-key", "x"], environmentVariables: envProvider); + using var client = CreateApiClient(provider); + + // assert + Assert.Equal( + new Uri("https://env-api.chillicream.com/graphql"), + client.BaseAddress); + } + + [Fact] + public async Task ExecuteAsync_Should_PreferEnvCloudUrl_Over_SessionUrl() { + // arrange + var session = CreateSessionWithTokens(apiUrl: "session-api.chillicream.com"); + var envProvider = CreateEnvironmentProvider(cloudUrl: "env-api.chillicream.com"); + // act - await using var provider = await BuildAndExecuteAsync([]); + await using var provider = await BuildAndExecuteAsync( + [], session, environmentVariables: envProvider); using var client = CreateApiClient(provider); // assert - Assert.False(client.DefaultRequestHeaders.Contains("CCC-api-key")); - Assert.False(client.DefaultRequestHeaders.Contains("Authorization")); + Assert.Equal( + new Uri("https://env-api.chillicream.com/graphql"), + client.BaseAddress); + } + + [Fact] + public async Task ExecuteAsync_Should_PreferExplicitCloudUrl_Over_EnvCloudUrl() + { + // arrange + var envProvider = CreateEnvironmentProvider(cloudUrl: "env-api.chillicream.com"); + + // act + await using var provider = await BuildAndExecuteAsync( + ["--api-key", "x", "--cloud-url", "cli-api.chillicream.com"], + environmentVariables: envProvider); + using var client = CreateApiClient(provider); + + // assert + Assert.Equal( + new Uri("https://cli-api.chillicream.com/graphql"), + client.BaseAddress); + } + + [Fact] + public async Task ExecuteAsync_Should_PreferExplicitCloudUrl_Over_EnvAndSession() + { + // arrange + var session = CreateSessionWithTokens(apiUrl: "session-api.chillicream.com"); + var envProvider = CreateEnvironmentProvider(cloudUrl: "env-api.chillicream.com"); + + // act + await using var provider = await BuildAndExecuteAsync( + ["--cloud-url", "cli-api.chillicream.com"], + session, + environmentVariables: envProvider); + using var client = CreateApiClient(provider); + + // assert + Assert.Equal( + new Uri("https://cli-api.chillicream.com/graphql"), + client.BaseAddress); + } + + [Fact] + public async Task ExecuteAsync_Should_UseDefaultUrl_When_NoSessionAndNoExplicitUrl() + { + // act + await using var provider = await BuildAndExecuteAsync(["--api-key", "x"]); + using var client = CreateApiClient(provider); + + // assert + Assert.Equal( + new Uri("https://api.chillicream.com/graphql"), + client.BaseAddress); } [Theory] @@ -290,10 +380,13 @@ private static HttpClient CreateApiClient(ServiceProvider provider) return factory.CreateClient(ApiClient.ClientName); } - private static IEnvironmentVariableProvider CreateEnvironmentProvider(string? apiKey = null) + private static IEnvironmentVariableProvider CreateEnvironmentProvider( + string? apiKey = null, + string? cloudUrl = null) { var mock = new Mock(); mock.Setup(x => x.GetEnvironmentVariable("NITRO_API_KEY")).Returns(apiKey); + mock.Setup(x => x.GetEnvironmentVariable("NITRO_CLOUD_URL")).Returns(cloudUrl); return mock.Object; }