diff --git a/.madgerc b/.madgerc deleted file mode 100644 index b407c6b4b..000000000 --- a/.madgerc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "detectiveOptions": { - "ts": { - "skipTypeImports": true - } - } -} diff --git a/src/commands/node/configs.ts b/src/commands/node/configs.ts index 9c924f113..105dacd5d 100644 --- a/src/commands/node/configs.ts +++ b/src/commands/node/configs.ts @@ -26,6 +26,7 @@ import {validatePath} from '../../core/helpers.js'; import {Flags as flags} from '../flags.js'; import type {NodeAlias, NodeAliases, PodName} from '../../types/aliases.js'; import type {NetworkNodeServices} from '../../core/network_node_services.js'; +import {type NodeAddConfigClass} from './node_add_config.js'; export const PREPARE_UPGRADE_CONFIGS_NAME = 'prepareUpgradeConfig'; export const DOWNLOAD_GENERATED_FILES_CONFIGS_NAME = 'downloadGeneratedFilesConfig'; @@ -357,46 +358,6 @@ export interface NodeStartConfigClass { nodeAliasesUnparsed: string; } -export interface NodeAddConfigClass { - app: string; - cacheDir: string; - chainId: string; - chartDirectory: string; - devMode: boolean; - debugNodeAlias: NodeAlias; - endpointType: string; - soloChartVersion: string; - generateGossipKeys: boolean; - generateTlsKeys: boolean; - gossipEndpoints: string; - grpcEndpoints: string; - localBuildPath: string; - namespace: string; - nodeAlias: NodeAlias; - releaseTag: string; - adminKey: PrivateKey; - allNodeAliases: NodeAliases; - chartPath: string; - curDate: Date; - existingNodeAliases: NodeAliases; - freezeAdminPrivateKey: string; - keysDir: string; - lastStateZipPath: string; - nodeClient: any; - podNames: Record; - serviceMap: Map; - treasuryKey: PrivateKey; - stagingDir: string; - stagingKeysDir: string; - grpcTlsCertificatePath: string; - grpcWebTlsCertificatePath: string; - grpcTlsKeyPath: string; - grpcWebTlsKeyPath: string; - haproxyIps: string; - envoyIps: string; - getUnusedConfigs: () => string[]; -} - export interface NodeDeleteConfigClass { app: string; cacheDir: string; diff --git a/src/commands/node/node_add_config.ts b/src/commands/node/node_add_config.ts new file mode 100644 index 000000000..f5129c909 --- /dev/null +++ b/src/commands/node/node_add_config.ts @@ -0,0 +1,59 @@ +/** + * 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 {NodeAlias, NodeAliases, PodName} from '../../types/aliases.js'; +import type {NetworkNodeServices} from '../../core/network_node_services.js'; +import {type PrivateKey} from '@hashgraph/sdk'; + +export interface NodeAddConfigClass { + app: string; + cacheDir: string; + chainId: string; + chartDirectory: string; + devMode: boolean; + debugNodeAlias: NodeAlias; + endpointType: string; + soloChartVersion: string; + generateGossipKeys: boolean; + generateTlsKeys: boolean; + gossipEndpoints: string; + grpcEndpoints: string; + localBuildPath: string; + namespace: string; + nodeAlias: NodeAlias; + releaseTag: string; + adminKey: PrivateKey; + allNodeAliases: NodeAliases; + chartPath: string; + curDate: Date; + existingNodeAliases: NodeAliases; + freezeAdminPrivateKey: string; + keysDir: string; + lastStateZipPath: string; + nodeClient: any; + podNames: Record; + serviceMap: Map; + treasuryKey: PrivateKey; + stagingDir: string; + stagingKeysDir: string; + grpcTlsCertificatePath: string; + grpcWebTlsCertificatePath: string; + grpcTlsKeyPath: string; + grpcWebTlsKeyPath: string; + haproxyIps: string; + envoyIps: string; + getUnusedConfigs: () => string[]; +} diff --git a/src/commands/node/tasks.ts b/src/commands/node/tasks.ts index 983d36ba9..482dbca28 100644 --- a/src/commands/node/tasks.ts +++ b/src/commands/node/tasks.ts @@ -74,16 +74,12 @@ import { } from '../../types/aliases.js'; import {NodeStatusCodes, NodeStatusEnums, NodeSubcommandType} from '../../core/enumerations.js'; import * as x509 from '@peculiar/x509'; -import type { - NodeAddConfigClass, - NodeDeleteConfigClass, - NodeRefreshConfigClass, - NodeUpdateConfigClass, -} from './configs.js'; +import type {NodeDeleteConfigClass, NodeRefreshConfigClass, NodeUpdateConfigClass} from './configs.js'; import {type Lease} from '../../core/lease/lease.js'; import {ListrLease} from '../../core/lease/listr_lease.js'; import {Duration} from '../../core/time/duration.js'; import {type BaseCommand} from '../base.js'; +import {type NodeAddConfigClass} from './node_add_config.js'; export class NodeCommandTasks { private readonly accountManager: AccountManager; diff --git a/src/core/helpers.ts b/src/core/helpers.ts index 889fb56ee..ca9329195 100644 --- a/src/core/helpers.ts +++ b/src/core/helpers.ts @@ -27,7 +27,7 @@ import {type NodeAlias, type NodeAliases} from '../types/aliases.js'; import {type CommandFlag} from '../types/flag_types.js'; import {type SoloLogger} from './logging.js'; import {type Duration} from './time/duration.js'; -import {type NodeAddConfigClass} from '../commands/node/configs.js'; +import {type NodeAddConfigClass} from '../commands/node/node_add_config.js'; export function sleep(duration: Duration) { return new Promise(resolve => {