From 3b735a1ab0f3c73e5aab84bb817a885818728a3d Mon Sep 17 00:00:00 2001 From: Camden Phalen Date: Wed, 20 Nov 2024 14:32:21 -0500 Subject: [PATCH] chore: Update config mode to Mode type --- config/CLIConfiguration.ts | 3 ++- types/Config.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/CLIConfiguration.ts b/config/CLIConfiguration.ts index 7c9299e..1bff51a 100644 --- a/config/CLIConfiguration.ts +++ b/config/CLIConfiguration.ts @@ -23,6 +23,7 @@ import { import { CLIOptions } from '../types/CLIOptions'; import { ValueOf } from '../types/Utils'; import { i18n } from '../utils/lang'; +import { Mode } from '../types/Files'; const i18nKey = 'config.cliConfiguration'; @@ -553,7 +554,7 @@ class _CLIConfiguration { /** * @throws {Error} */ - updateDefaultMode(defaultMode: string): CLIConfig_NEW | null { + updateDefaultMode(defaultMode: Mode): CLIConfig_NEW | null { if (!this.config) { throw new Error(i18n(`${i18nKey}.errors.noConfigLoaded`)); } diff --git a/types/Config.ts b/types/Config.ts index b54b60c..c081321 100644 --- a/types/Config.ts +++ b/types/Config.ts @@ -1,12 +1,13 @@ import { ENVIRONMENTS } from '../constants/environments'; import { CLIAccount_NEW, CLIAccount_DEPRECATED } from './Accounts'; +import { Mode } from './Files'; import { ValueOf } from './Utils'; export interface CLIConfig_NEW { accounts: Array; allowUsageTracking?: boolean; defaultAccount?: string | number; - defaultMode?: string; + defaultMode?: Mode; httpTimeout?: number; env?: Environment; httpUseLocalhost?: boolean; @@ -16,7 +17,7 @@ export interface CLIConfig_DEPRECATED { portals: Array; allowUsageTracking?: boolean; defaultPortal?: string | number; - defaultMode?: string; + defaultMode?: Mode; httpTimeout?: number; env?: Environment; httpUseLocalhost?: boolean;