Skip to content

Commit

Permalink
chore: Update config mode to Mode type
Browse files Browse the repository at this point in the history
  • Loading branch information
camden11 committed Nov 20, 2024
1 parent 9da6e5f commit 3b735a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion config/CLIConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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`));
}
Expand Down
5 changes: 3 additions & 2 deletions types/Config.ts
Original file line number Diff line number Diff line change
@@ -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<CLIAccount_NEW>;
allowUsageTracking?: boolean;
defaultAccount?: string | number;
defaultMode?: string;
defaultMode?: Mode;
httpTimeout?: number;
env?: Environment;
httpUseLocalhost?: boolean;
Expand All @@ -16,7 +17,7 @@ export interface CLIConfig_DEPRECATED {
portals: Array<CLIAccount_DEPRECATED>;
allowUsageTracking?: boolean;
defaultPortal?: string | number;
defaultMode?: string;
defaultMode?: Mode;
httpTimeout?: number;
env?: Environment;
httpUseLocalhost?: boolean;
Expand Down

0 comments on commit 3b735a1

Please sign in to comment.