diff --git a/.madgerc b/.madgerc deleted file mode 100644 index 4a7c7253b..000000000 --- a/.madgerc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "detectiveOptions": { - "ts": { - "skipTypeImports": true - } - } -} \ No newline at end of file diff --git a/src/core/config/remote/metadata.ts b/src/core/config/remote/metadata.ts index 577df08a7..a6680babb 100644 --- a/src/core/config/remote/metadata.ts +++ b/src/core/config/remote/metadata.ts @@ -17,16 +17,9 @@ import {Migration} from './migration.js'; import {SoloError} from '../../errors.js'; import * as k8s from '@kubernetes/client-node'; -import type {EmailAddress, Namespace, Version} from './types.js'; +import type {EmailAddress, Namespace, RemoteConfigMetadataStructure, Version} from './types.js'; import type {Optional, ToObject, Validate} from '../../../types/index.js'; -export interface RemoteConfigMetadataStructure { - name: Namespace; - lastUpdatedAt: Date; - lastUpdateBy: EmailAddress; - migration?: Migration; -} - /** * Represent the remote config metadata object and handles: * - Validation diff --git a/src/core/config/remote/remote_config_data.ts b/src/core/config/remote/remote_config_data.ts new file mode 100644 index 000000000..3e206eb00 --- /dev/null +++ b/src/core/config/remote/remote_config_data.ts @@ -0,0 +1,29 @@ +/** + * Copyright (C) 2024 Hedera Hashgraph, LLC + * + * Licensed under the Apache License, Version 2.0 (the ""License""); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an ""AS IS"" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +import type {RemoteConfigMetadata} from './metadata.js'; +import type {ComponentsDataWrapper} from './components_data_wrapper.js'; +import type {CommonFlagsDataWrapper} from './common_flags_data_wrapper.js'; +import {type Cluster, type Namespace} from './types.js'; + +export interface RemoteConfigData { + metadata: RemoteConfigMetadata; + clusters: Record; + components: ComponentsDataWrapper; + lastExecutedCommand: string; + commandHistory: string[]; + flags: CommonFlagsDataWrapper; +} diff --git a/src/core/config/remote/remote_config_data_wrapper.ts b/src/core/config/remote/remote_config_data_wrapper.ts index 348fc5718..d31adf9fd 100644 --- a/src/core/config/remote/remote_config_data_wrapper.ts +++ b/src/core/config/remote/remote_config_data_wrapper.ts @@ -20,10 +20,11 @@ import {RemoteConfigMetadata} from './metadata.js'; import {ComponentsDataWrapper} from './components_data_wrapper.js'; import * as constants from '../../constants.js'; import {CommonFlagsDataWrapper} from './common_flags_data_wrapper.js'; -import type {Cluster, Version, Namespace, RemoteConfigDataStructure, RemoteConfigData} from './types.js'; +import type {Cluster, Version, Namespace, RemoteConfigDataStructure} from './types.js'; import type * as k8s from '@kubernetes/client-node'; import type {ToObject, Validate} from '../../../types/index.js'; import type {ConfigManager} from '../../config_manager.js'; +import {type RemoteConfigData} from './remote_config_data.js'; export class RemoteConfigDataWrapper implements Validate, ToObject { private readonly _version: Version = '1.0.0'; diff --git a/src/core/config/remote/types.ts b/src/core/config/remote/types.ts index 4b995dfe8..52c077d04 100644 --- a/src/core/config/remote/types.ts +++ b/src/core/config/remote/types.ts @@ -16,9 +16,6 @@ */ import type {NodeAliases} from '../../../types/aliases.js'; import type {ComponentType, ConsensusNodeStates} from './enumerations.js'; -import type {RemoteConfigMetadata, RemoteConfigMetadataStructure} from './metadata.js'; -import type {ComponentsDataWrapper} from './components_data_wrapper.js'; -import {type CommonFlagsDataWrapper} from './common_flags_data_wrapper.js'; export type EmailAddress = `${string}@${string}.${string}`; export type Version = string; @@ -49,15 +46,6 @@ export interface IConsensusNodeComponent extends Component { export type ComponentsDataStructure = Record>; -export interface RemoteConfigData { - metadata: RemoteConfigMetadata; - clusters: Record; - components: ComponentsDataWrapper; - lastExecutedCommand: string; - commandHistory: string[]; - flags: CommonFlagsDataWrapper; -} - export type RemoteConfigCommonFlagsStruct = { releaseTag?: string; chartDirectory?: string; @@ -77,3 +65,10 @@ export interface RemoteConfigDataStructure { lastExecutedCommand: string; flags: RemoteConfigCommonFlagsStruct; } + +export interface RemoteConfigMetadataStructure { + name: Namespace; + lastUpdatedAt: Date; + lastUpdateBy: EmailAddress; + migration?: IMigration; +}