From 7b70d3331fafffe684a71880bad2c433f4e9442b Mon Sep 17 00:00:00 2001 From: Louis Bompart Date: Tue, 26 Mar 2024 14:01:20 -0400 Subject: [PATCH] feat(cli): support apikey for ui:deploy --- packages/cli/core/src/commands/ui/deploy.spec.ts | 12 ------------ packages/cli/core/src/commands/ui/deploy.ts | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/cli/core/src/commands/ui/deploy.spec.ts b/packages/cli/core/src/commands/ui/deploy.spec.ts index 8389401f9f..adf230ed2c 100644 --- a/packages/cli/core/src/commands/ui/deploy.spec.ts +++ b/packages/cli/core/src/commands/ui/deploy.spec.ts @@ -195,18 +195,6 @@ describe('ui:deploy', () => { }); describe('when preconditions are not respected', () => { - test - .do(() => { - preconditionStatus.apiKey = false; - }) - .stdout() - .stderr() - .command(['ui:deploy']) - .catch(/apiKey Precondition Error/) - .it( - 'should not execute the command if the API key preconditions are not respected' - ); - test .do(() => { preconditionStatus.authentication = false; diff --git a/packages/cli/core/src/commands/ui/deploy.ts b/packages/cli/core/src/commands/ui/deploy.ts index 965e857ba7..dc0ba1ced5 100644 --- a/packages/cli/core/src/commands/ui/deploy.ts +++ b/packages/cli/core/src/commands/ui/deploy.ts @@ -156,7 +156,7 @@ export default class Deploy extends CLICommand { @Trackable() @Preconditions( - IsAuthenticated([AuthenticationType.OAuth]), + IsAuthenticated([AuthenticationType.OAuth, AuthenticationType.ApiKey]), HasNecessaryCoveoPrivileges(createSearchPagesPrivilege) ) public async run() {