From 1c5212a78d9e8b2e1509f273f60640a03e704318 Mon Sep 17 00:00:00 2001 From: Jan Milenkov Date: Tue, 28 Jan 2025 16:44:28 +0200 Subject: [PATCH] chore(lint): manually fixed imports to be consisent (#1219) Signed-off-by: instamenta --- src/commands/account.ts | 6 ++-- src/commands/base.ts | 22 ++++++------- src/commands/cluster/configs.ts | 4 +-- src/commands/cluster/handlers.ts | 4 +-- src/commands/cluster/index.ts | 2 +- src/commands/cluster/tasks.ts | 2 +- src/commands/explorer.ts | 8 ++--- src/commands/flags.ts | 4 +-- src/commands/index.ts | 2 +- src/commands/mirror_node.ts | 9 +++--- src/commands/network.ts | 12 +++---- src/commands/node/configs.ts | 2 +- src/commands/node/handlers.ts | 18 +++++------ src/commands/node/helper.ts | 4 +-- src/commands/node/index.ts | 4 +-- src/commands/node/node_add_config.ts | 2 +- src/commands/node/tasks.ts | 32 ++++++++----------- src/commands/relay.ts | 8 ++--- src/core/account_manager.ts | 4 +-- src/core/config/local_config.ts | 10 ++---- src/core/config/remote/remote_config_data.ts | 2 +- .../remote/remote_config_data_wrapper.ts | 2 +- src/core/config_manager.ts | 4 +-- .../dependency_managers/dependency_manager.ts | 2 +- src/core/k8.ts | 4 +-- src/core/key_manager.ts | 4 +-- src/core/lease/interval_lease.ts | 4 +-- src/core/lease/interval_lease_renewal.ts | 2 +- src/core/lease/lease.ts | 4 +-- src/core/lease/listr_lease.ts | 4 +-- src/core/logging.ts | 2 +- src/core/platform_installer.ts | 1 - src/core/process_output.ts | 2 +- src/core/task.ts | 2 +- src/core/templates.ts | 2 +- src/core/yargs_command.ts | 4 +-- src/index.ts | 3 +- src/types/aliases.ts | 4 +-- src/types/flag_types.ts | 2 +- src/types/index.ts | 2 +- 40 files changed, 100 insertions(+), 115 deletions(-) diff --git a/src/commands/account.ts b/src/commands/account.ts index f8e39fda2..370f4b7b2 100644 --- a/src/commands/account.ts +++ b/src/commands/account.ts @@ -20,12 +20,12 @@ import {SoloError, IllegalArgumentError} from '../core/errors.js'; import {Flags as flags} from './flags.js'; import {Listr} from 'listr2'; import * as constants from '../core/constants.js'; -import {type AccountManager} from '../core/account_manager.js'; +import type {AccountManager} from '../core/account_manager.js'; import {type AccountId, AccountInfo, HbarUnit, PrivateKey} from '@hashgraph/sdk'; import {FREEZE_ADMIN_ACCOUNT} from '../core/constants.js'; -import {type Opts} from '../types/command_types.js'; +import type {Opts} from '../types/command_types.js'; import {ListrLease} from '../core/lease/listr_lease.js'; -import {type CommandBuilder} from '../types/aliases.js'; +import type {CommandBuilder} from '../types/aliases.js'; import {sleep} from '../core/helpers.js'; import {Duration} from '../core/time/duration.js'; diff --git a/src/commands/base.ts b/src/commands/base.ts index 4d453990d..a4b58f436 100644 --- a/src/commands/base.ts +++ b/src/commands/base.ts @@ -18,17 +18,17 @@ import paths from 'path'; import {MissingArgumentError, SoloError} from '../core/errors.js'; import {ShellRunner} from '../core/shell_runner.js'; -import {type LeaseManager} from '../core/lease/lease_manager.js'; -import {type LocalConfig} from '../core/config/local_config.js'; -import {type RemoteConfigManager} from '../core/config/remote/remote_config_manager.js'; -import {type Helm} from '../core/helm.js'; -import {type K8} from '../core/k8.js'; -import {type ChartManager} from '../core/chart_manager.js'; -import {type ConfigManager} from '../core/config_manager.js'; -import {type DependencyManager} from '../core/dependency_managers/index.js'; -import {type Opts} from '../types/command_types.js'; -import {type CommandFlag} from '../types/flag_types.js'; -import {type Lease} from '../core/lease/lease.js'; +import type {LeaseManager} from '../core/lease/lease_manager.js'; +import type {LocalConfig} from '../core/config/local_config.js'; +import type {RemoteConfigManager} from '../core/config/remote/remote_config_manager.js'; +import type {Helm} from '../core/helm.js'; +import type {K8} from '../core/k8.js'; +import type {ChartManager} from '../core/chart_manager.js'; +import type {ConfigManager} from '../core/config_manager.js'; +import type {DependencyManager} from '../core/dependency_managers/index.js'; +import type {Opts} from '../types/command_types.js'; +import type {CommandFlag} from '../types/flag_types.js'; +import type {Lease} from '../core/lease/lease.js'; import {Listr} from 'listr2'; import path from 'path'; import * as constants from '../core/constants.js'; diff --git a/src/commands/cluster/configs.ts b/src/commands/cluster/configs.ts index d1f9ece95..bc62f06c1 100644 --- a/src/commands/cluster/configs.ts +++ b/src/commands/cluster/configs.ts @@ -15,12 +15,12 @@ * */ -import {type NodeAlias} from '../../types/aliases.js'; +import type {NodeAlias} from '../../types/aliases.js'; import {Flags as flags} from '../flags.js'; import * as constants from '../../core/constants.js'; import {ListrEnquirerPromptAdapter} from '@listr2/prompt-adapter-enquirer'; import {SoloError} from '../../core/errors.js'; -import {type Namespace} from '../../core/config/remote/types.js'; +import type {Namespace} from '../../core/config/remote/types.js'; export const CONNECT_CONFIGS_NAME = 'connectConfig'; diff --git a/src/commands/cluster/handlers.ts b/src/commands/cluster/handlers.ts index bad7fbed7..321b2b9f5 100644 --- a/src/commands/cluster/handlers.ts +++ b/src/commands/cluster/handlers.ts @@ -14,8 +14,8 @@ * limitations under the License. * */ -import {type BaseCommand, type CommandHandlers} from '../base.js'; -import {type ClusterCommandTasks} from './tasks.js'; +import type {BaseCommand, CommandHandlers} from '../base.js'; +import type {ClusterCommandTasks} from './tasks.js'; import * as helpers from '../../core/helpers.js'; import * as constants from '../../core/constants.js'; import * as ContextFlags from './flags.js'; diff --git a/src/commands/cluster/index.ts b/src/commands/cluster/index.ts index 1c1fd474d..ab4384822 100644 --- a/src/commands/cluster/index.ts +++ b/src/commands/cluster/index.ts @@ -18,7 +18,7 @@ import * as ContextFlags from './flags.js'; import {YargsCommand} from '../../core/yargs_command.js'; import {BaseCommand} from './../base.js'; -import {type Opts} from '../../types/command_types.js'; +import type {Opts} from '../../types/command_types.js'; import {ClusterCommandTasks} from './tasks.js'; import {ClusterCommandHandlers} from './handlers.js'; import {DEFAULT_FLAGS, RESET_FLAGS, SETUP_FLAGS} from './flags.js'; diff --git a/src/commands/cluster/tasks.ts b/src/commands/cluster/tasks.ts index 62fdaf95d..4c3ec5861 100644 --- a/src/commands/cluster/tasks.ts +++ b/src/commands/cluster/tasks.ts @@ -18,7 +18,7 @@ import {Task} from '../../core/task.js'; import {Flags as flags} from '../flags.js'; import type {ListrTaskWrapper} from 'listr2'; import type {ConfigBuilder} from '../../types/aliases.js'; -import {type BaseCommand} from '../base.js'; +import type {BaseCommand} from '../base.js'; import {splitFlagInput} from '../../core/helpers.js'; import * as constants from '../../core/constants.js'; import path from 'path'; diff --git a/src/commands/explorer.ts b/src/commands/explorer.ts index 5b17a8ce9..66688a53d 100644 --- a/src/commands/explorer.ts +++ b/src/commands/explorer.ts @@ -18,17 +18,17 @@ import {ListrEnquirerPromptAdapter} from '@listr2/prompt-adapter-enquirer'; import {Listr} from 'listr2'; import {SoloError, MissingArgumentError} from '../core/errors.js'; import * as constants from '../core/constants.js'; -import {type ProfileManager} from '../core/profile_manager.js'; +import type {ProfileManager} from '../core/profile_manager.js'; import {BaseCommand} from './base.js'; import {Flags as flags} from './flags.js'; import {ListrRemoteConfig} from '../core/config/remote/listr_config_tasks.js'; -import {type CommandBuilder} from '../types/aliases.js'; -import {type Opts} from '../types/command_types.js'; +import type {CommandBuilder} from '../types/aliases.js'; +import type {Opts} from '../types/command_types.js'; import {ListrLease} from '../core/lease/listr_lease.js'; import {ComponentType} from '../core/config/remote/enumerations.js'; import type {Namespace} from '../core/config/remote/types.js'; import {MirrorNodeExplorerComponent} from '../core/config/remote/components/mirror_node_explorer_component.js'; -import {type SoloListrTask} from '../types/index.js'; +import type {SoloListrTask} from '../types/index.js'; interface ExplorerDeployConfigClass { chartDirectory: string; diff --git a/src/commands/flags.ts b/src/commands/flags.ts index fcce83663..d218a6075 100644 --- a/src/commands/flags.ts +++ b/src/commands/flags.ts @@ -17,8 +17,8 @@ import * as constants from '../core/constants.js'; import * as version from '../../version.js'; import path from 'path'; -import {type CommandFlag} from '../types/flag_types.js'; -import {type ListrTaskWrapper} from 'listr2'; +import type {CommandFlag} from '../types/flag_types.js'; +import type {ListrTaskWrapper} from 'listr2'; import fs from 'fs'; import {IllegalArgumentError, SoloError} from '../core/errors.js'; import {ListrEnquirerPromptAdapter} from '@listr2/prompt-adapter-enquirer'; diff --git a/src/commands/index.ts b/src/commands/index.ts index 5c8f7ddd3..64ab23524 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -22,7 +22,7 @@ import {NodeCommand} from './node/index.js'; import {RelayCommand} from './relay.js'; import {AccountCommand} from './account.js'; import {DeploymentCommand} from './deployment.js'; -import {type Opts} from '../types/command_types.js'; +import type {Opts} from '../types/command_types.js'; import {ExplorerCommand} from './explorer.js'; /** diff --git a/src/commands/mirror_node.ts b/src/commands/mirror_node.ts index 61075afd5..2fe6f67f8 100644 --- a/src/commands/mirror_node.ts +++ b/src/commands/mirror_node.ts @@ -18,20 +18,19 @@ import {ListrEnquirerPromptAdapter} from '@listr2/prompt-adapter-enquirer'; import {Listr} from 'listr2'; import {SoloError, IllegalArgumentError, MissingArgumentError} from '../core/errors.js'; import * as constants from '../core/constants.js'; -import {type AccountManager} from '../core/account_manager.js'; -import {type ProfileManager} from '../core/profile_manager.js'; +import type {AccountManager} from '../core/account_manager.js'; +import type {ProfileManager} from '../core/profile_manager.js'; import {BaseCommand} from './base.js'; import {Flags as flags} from './flags.js'; import {getEnvValue} from '../core/helpers.js'; -import {type CommandBuilder, type PodName} from '../types/aliases.js'; -import {type Opts} from '../types/command_types.js'; +import type {CommandBuilder, PodName} from '../types/aliases.js'; +import type {Opts} from '../types/command_types.js'; import {ListrLease} from '../core/lease/listr_lease.js'; import {ComponentType} from '../core/config/remote/enumerations.js'; import {MirrorNodeComponent} from '../core/config/remote/components/mirror_node_component.js'; import * as fs from 'node:fs'; import * as path from 'node:path'; import type {Optional, SoloListrTask} from '../types/index.js'; -import type {Namespace} from '../core/config/remote/types.js'; import * as Base64 from 'js-base64'; interface MirrorNodeDeployConfigClass { diff --git a/src/commands/network.ts b/src/commands/network.ts index 6cd7ea508..efae774bd 100644 --- a/src/commands/network.ts +++ b/src/commands/network.ts @@ -26,12 +26,12 @@ import * as helpers from '../core/helpers.js'; import {addDebugOptions, resolveValidJsonFilePath, validatePath} from '../core/helpers.js'; import path from 'path'; import fs from 'fs'; -import {type KeyManager} from '../core/key_manager.js'; -import {type PlatformInstaller} from '../core/platform_installer.js'; -import {type ProfileManager} from '../core/profile_manager.js'; -import {type CertificateManager} from '../core/certificate_manager.js'; -import {type CommandBuilder, type IP, type NodeAlias, type NodeAliases} from '../types/aliases.js'; -import {type Opts} from '../types/command_types.js'; +import type {KeyManager} from '../core/key_manager.js'; +import type {PlatformInstaller} from '../core/platform_installer.js'; +import type {ProfileManager} from '../core/profile_manager.js'; +import type {CertificateManager} from '../core/certificate_manager.js'; +import type {CommandBuilder, IP, NodeAlias, NodeAliases} from '../types/aliases.js'; +import type {Opts} from '../types/command_types.js'; import {ListrLease} from '../core/lease/listr_lease.js'; import {ConsensusNodeComponent} from '../core/config/remote/components/consensus_node_component.js'; import {ConsensusNodeStates} from '../core/config/remote/enumerations.js'; diff --git a/src/commands/node/configs.ts b/src/commands/node/configs.ts index 553df29ea..cb2d1216b 100644 --- a/src/commands/node/configs.ts +++ b/src/commands/node/configs.ts @@ -26,7 +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'; +import type {NodeAddConfigClass} from './node_add_config.js'; export const PREPARE_UPGRADE_CONFIGS_NAME = 'prepareUpgradeConfig'; export const DOWNLOAD_GENERATED_FILES_CONFIGS_NAME = 'downloadGeneratedFilesConfig'; diff --git a/src/commands/node/handlers.ts b/src/commands/node/handlers.ts index bb59cf046..fd0e0272d 100644 --- a/src/commands/node/handlers.ts +++ b/src/commands/node/handlers.ts @@ -33,23 +33,23 @@ import { upgradeConfigBuilder, } from './configs.js'; import * as constants from '../../core/constants.js'; -import {type AccountManager} from '../../core/account_manager.js'; -import {type ConfigManager} from '../../core/config_manager.js'; -import {type PlatformInstaller} from '../../core/platform_installer.js'; -import {type K8} from '../../core/k8.js'; -import {type LeaseManager} from '../../core/lease/lease_manager.js'; -import {type RemoteConfigManager} from '../../core/config/remote/remote_config_manager.js'; +import type {AccountManager} from '../../core/account_manager.js'; +import type {ConfigManager} from '../../core/config_manager.js'; +import type {PlatformInstaller} from '../../core/platform_installer.js'; +import type {K8} from '../../core/k8.js'; +import type {LeaseManager} from '../../core/lease/lease_manager.js'; +import type {RemoteConfigManager} from '../../core/config/remote/remote_config_manager.js'; import {IllegalArgumentError, SoloError} from '../../core/errors.js'; import {ComponentType, ConsensusNodeStates} from '../../core/config/remote/enumerations.js'; import type {SoloLogger} from '../../core/logging.js'; import type {NodeCommandTasks} from './tasks.js'; -import {type Lease} from '../../core/lease/lease.js'; +import type {Lease} from '../../core/lease/lease.js'; import {NodeSubcommandType} from '../../core/enumerations.js'; -import {type BaseCommand, type CommandHandlers} from '../base.js'; +import type {BaseCommand, CommandHandlers} from '../base.js'; import {NodeHelper} from './helper.js'; import type {NodeAlias, NodeAliases} from '../../types/aliases.js'; import {ConsensusNodeComponent} from '../../core/config/remote/components/consensus_node_component.js'; -import {type Listr, type ListrTask} from 'listr2'; +import type {Listr, ListrTask} from 'listr2'; import chalk from 'chalk'; import type {ComponentsDataWrapper} from '../../core/config/remote/components_data_wrapper.js'; import type {Optional} from '../../types/index.js'; diff --git a/src/commands/node/helper.ts b/src/commands/node/helper.ts index 09afe4ad5..c8b17c750 100644 --- a/src/commands/node/helper.ts +++ b/src/commands/node/helper.ts @@ -15,8 +15,8 @@ * */ -import {type NodeDeleteConfigClass, type NodeUpdateConfigClass, type NodeUpgradeConfigClass} from './configs.js'; -import {type NodeAlias, type NodeAliases} from '../../types/aliases.js'; +import type {NodeDeleteConfigClass, NodeUpdateConfigClass, NodeUpgradeConfigClass} from './configs.js'; +import type {NodeAlias, NodeAliases} from '../../types/aliases.js'; import {PrivateKey} from '@hashgraph/sdk'; export class NodeHelper { diff --git a/src/commands/node/index.ts b/src/commands/node/index.ts index dceba53b7..c9efbb559 100644 --- a/src/commands/node/index.ts +++ b/src/commands/node/index.ts @@ -16,13 +16,13 @@ */ import {IllegalArgumentError} from '../../core/errors.js'; -import {type AccountManager} from '../../core/account_manager.js'; +import type {AccountManager} from '../../core/account_manager.js'; import {YargsCommand} from '../../core/yargs_command.js'; import {BaseCommand} from './../base.js'; import {NodeCommandTasks} from './tasks.js'; import * as NodeFlags from './flags.js'; import {NodeCommandHandlers} from './handlers.js'; -import {type Opts} from '../../types/command_types.js'; +import type {Opts} from '../../types/command_types.js'; /** * Defines the core functionalities of 'node' command diff --git a/src/commands/node/node_add_config.ts b/src/commands/node/node_add_config.ts index f5129c909..661a1b3df 100644 --- a/src/commands/node/node_add_config.ts +++ b/src/commands/node/node_add_config.ts @@ -16,7 +16,7 @@ */ import type {NodeAlias, NodeAliases, PodName} from '../../types/aliases.js'; import type {NetworkNodeServices} from '../../core/network_node_services.js'; -import {type PrivateKey} from '@hashgraph/sdk'; +import type {PrivateKey} from '@hashgraph/sdk'; export interface NodeAddConfigClass { app: string; diff --git a/src/commands/node/tasks.ts b/src/commands/node/tasks.ts index a5bf0d111..73bcb9d27 100644 --- a/src/commands/node/tasks.ts +++ b/src/commands/node/tasks.ts @@ -14,14 +14,14 @@ * limitations under the License. * */ -import {type AccountManager} from '../../core/account_manager.js'; -import {type ConfigManager} from '../../core/config_manager.js'; -import {type KeyManager} from '../../core/key_manager.js'; -import {type ProfileManager} from '../../core/profile_manager.js'; -import {type PlatformInstaller} from '../../core/platform_installer.js'; -import {type K8} from '../../core/k8.js'; -import {type ChartManager} from '../../core/chart_manager.js'; -import {type CertificateManager} from '../../core/certificate_manager.js'; +import type {AccountManager} from '../../core/account_manager.js'; +import type {ConfigManager} from '../../core/config_manager.js'; +import type {KeyManager} from '../../core/key_manager.js'; +import type {ProfileManager} from '../../core/profile_manager.js'; +import type {PlatformInstaller} from '../../core/platform_installer.js'; +import type {K8} from '../../core/k8.js'; +import type {ChartManager} from '../../core/chart_manager.js'; +import type {CertificateManager} from '../../core/certificate_manager.js'; import {Zippy} from '../../core/zippy.js'; import * as constants from '../../core/constants.js'; import { @@ -62,22 +62,16 @@ import { } from '../../core/helpers.js'; import chalk from 'chalk'; import {Flags as flags} from '../flags.js'; -import {type SoloLogger} from '../../core/logging.js'; +import type {SoloLogger} from '../../core/logging.js'; import type {Listr, ListrTaskWrapper} from 'listr2'; -import { - type ConfigBuilder, - type NodeAlias, - type NodeAliases, - type PodName, - type SkipCheck, -} from '../../types/aliases.js'; +import type {ConfigBuilder, NodeAlias, NodeAliases, PodName, SkipCheck} from '../../types/aliases.js'; import {NodeStatusCodes, NodeStatusEnums, NodeSubcommandType} from '../../core/enumerations.js'; import type {NodeDeleteConfigClass, NodeRefreshConfigClass, NodeUpdateConfigClass} from './configs.js'; -import {type Lease} from '../../core/lease/lease.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'; +import type {BaseCommand} from '../base.js'; +import type {NodeAddConfigClass} from './node_add_config.js'; import {GenesisNetworkDataConstructor} from '../../core/genesis_network_models/genesis_network_data_constructor.js'; export class NodeCommandTasks { diff --git a/src/commands/relay.ts b/src/commands/relay.ts index e3897e431..5298ffbaa 100644 --- a/src/commands/relay.ts +++ b/src/commands/relay.ts @@ -18,13 +18,13 @@ import {Listr, type ListrTask} from 'listr2'; import {SoloError, MissingArgumentError} from '../core/errors.js'; import * as helpers from '../core/helpers.js'; import * as constants from '../core/constants.js'; -import {type ProfileManager} from '../core/profile_manager.js'; -import {type AccountManager} from '../core/account_manager.js'; +import type {ProfileManager} from '../core/profile_manager.js'; +import type {AccountManager} from '../core/account_manager.js'; import {BaseCommand} from './base.js'; import {Flags as flags} from './flags.js'; import {getNodeAccountMap} from '../core/helpers.js'; -import {type CommandBuilder, type NodeAliases} from '../types/aliases.js'; -import {type Opts} from '../types/command_types.js'; +import type {CommandBuilder, NodeAliases} from '../types/aliases.js'; +import type {Opts} from '../types/command_types.js'; import {ListrLease} from '../core/lease/listr_lease.js'; import {RelayComponent} from '../core/config/remote/components/relay_component.js'; import {ComponentType} from '../core/config/remote/enumerations.js'; diff --git a/src/core/account_manager.ts b/src/core/account_manager.ts index dcb1d3188..0740ee021 100644 --- a/src/core/account_manager.ts +++ b/src/core/account_manager.ts @@ -42,8 +42,8 @@ import path from 'path'; import {SoloLogger} from './logging.js'; import {K8} from './k8.js'; -import {type AccountIdWithKeyPairObject, type ExtendedNetServer} from '../types/index.js'; -import {type NodeAlias, type PodName, type SdkNetworkEndpoint} from '../types/aliases.js'; +import type {AccountIdWithKeyPairObject, ExtendedNetServer} from '../types/index.js'; +import type {NodeAlias, PodName, SdkNetworkEndpoint} from '../types/aliases.js'; import {IGNORED_NODE_ACCOUNT_ID} from './constants.js'; import {isNumeric, sleep} from './helpers.js'; import {Duration} from './time/duration.js'; diff --git a/src/core/config/local_config.ts b/src/core/config/local_config.ts index 97f626c3d..a93c445f8 100644 --- a/src/core/config/local_config.ts +++ b/src/core/config/local_config.ts @@ -18,24 +18,18 @@ import {IsEmail, IsNotEmpty, IsObject, IsString, validateSync} from 'class-valid import fs from 'fs'; import * as yaml from 'yaml'; import {Flags as flags} from '../../commands/flags.js'; -import { - type ClusterContextMapping, - type Deployments, - type DeploymentStructure, - type LocalConfigData, -} from './local_config_data.js'; +import type {ClusterContextMapping, Deployments, DeploymentStructure, LocalConfigData} from './local_config_data.js'; import {MissingArgumentError, SoloError} from '../errors.js'; import {SoloLogger} from '../logging.js'; import {IsClusterContextMapping, IsDeployments} from '../validator_decorators.js'; import {ConfigManager} from '../config_manager.js'; import type {EmailAddress, Namespace} from './remote/types.js'; import {ErrorMessages} from '../error_messages.js'; -import {type K8} from '../k8.js'; +import type {K8} from '../k8.js'; import {splitFlagInput} from '../helpers.js'; import {inject, injectable} from 'tsyringe-neo'; import {patchInject} from '../container_helper.js'; import type {SoloListrTask} from '../../types/index.js'; -import type {AnyObject} from '../../types/aliases.js'; @injectable() export class LocalConfig implements LocalConfigData { diff --git a/src/core/config/remote/remote_config_data.ts b/src/core/config/remote/remote_config_data.ts index 3e206eb00..b7e1534ce 100644 --- a/src/core/config/remote/remote_config_data.ts +++ b/src/core/config/remote/remote_config_data.ts @@ -17,7 +17,7 @@ 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'; +import type {Cluster, Namespace} from './types.js'; export interface RemoteConfigData { metadata: RemoteConfigMetadata; diff --git a/src/core/config/remote/remote_config_data_wrapper.ts b/src/core/config/remote/remote_config_data_wrapper.ts index dfb0f5d9a..f34c1deba 100644 --- a/src/core/config/remote/remote_config_data_wrapper.ts +++ b/src/core/config/remote/remote_config_data_wrapper.ts @@ -24,7 +24,7 @@ import type {Cluster, Version, Namespace, RemoteConfigDataStructure} from './typ 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'; +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_manager.ts b/src/core/config_manager.ts index 168ea14f7..b37ffc535 100644 --- a/src/core/config_manager.ts +++ b/src/core/config_manager.ts @@ -21,8 +21,8 @@ import {Flags, Flags as flags} from '../commands/flags.js'; import * as paths from 'path'; import * as helpers from './helpers.js'; import type * as yargs from 'yargs'; -import {type CommandFlag} from '../types/flag_types.js'; -import {type ListrTaskWrapper} from 'listr2'; +import type {CommandFlag} from '../types/flag_types.js'; +import type {ListrTaskWrapper} from 'listr2'; import {patchInject} from './container_helper.js'; import * as constants from '../core/constants.js'; diff --git a/src/core/dependency_managers/dependency_manager.ts b/src/core/dependency_managers/dependency_manager.ts index 2898a2992..1ffec4aeb 100644 --- a/src/core/dependency_managers/dependency_manager.ts +++ b/src/core/dependency_managers/dependency_manager.ts @@ -18,7 +18,7 @@ import os from 'os'; import {SoloError} from '../errors.js'; import {ShellRunner} from '../shell_runner.js'; import {HelmDependencyManager} from './helm_dependency_manager.js'; -import {type ListrTask} from 'listr2'; +import type {ListrTask} from 'listr2'; import {container, inject, injectable} from 'tsyringe-neo'; import * as constants from '../constants.js'; diff --git a/src/core/k8.ts b/src/core/k8.ts index 6d0fc23fb..8e95c2d7a 100644 --- a/src/core/k8.ts +++ b/src/core/k8.ts @@ -32,14 +32,14 @@ import {sleep} from './helpers.js'; import * as constants from './constants.js'; import {ConfigManager} from './config_manager.js'; import {SoloLogger} from './logging.js'; -import {type PodName, type TarCreateFilter} from '../types/aliases.js'; +import type {PodName, TarCreateFilter} from '../types/aliases.js'; import type {ExtendedNetServer, LocalContextObject, Optional} from '../types/index.js'; import {HEDERA_HAPI_PATH, ROOT_CONTAINER, SOLO_LOGS_DIR} from './constants.js'; import {Duration} from './time/duration.js'; import {inject, injectable} from 'tsyringe-neo'; import {patchInject} from './container_helper.js'; import type {Namespace} from './config/remote/types.js'; -import {type Cluster} from '@kubernetes/client-node/dist/config_types.js'; +import type {Cluster} from '@kubernetes/client-node/dist/config_types.js'; interface TDirectoryData { directory: boolean; diff --git a/src/core/key_manager.ts b/src/core/key_manager.ts index e7f6b216a..c2e9d2bc6 100644 --- a/src/core/key_manager.ts +++ b/src/core/key_manager.ts @@ -24,8 +24,8 @@ import {SoloLogger} from './logging.js'; import {Templates} from './templates.js'; import * as helpers from './helpers.js'; import chalk from 'chalk'; -import {type NodeAlias, type NodeAliases} from '../types/aliases.js'; -import {type NodeKeyObject, type PrivateKeyAndCertificateObject} from '../types/index.js'; +import type {NodeAlias, NodeAliases} from '../types/aliases.js'; +import type {NodeKeyObject, PrivateKeyAndCertificateObject} from '../types/index.js'; import type {ListrTask} from 'listr2'; import {inject, injectable} from 'tsyringe-neo'; import {patchInject} from './container_helper.js'; diff --git a/src/core/lease/interval_lease.ts b/src/core/lease/interval_lease.ts index c610f8453..82c2c5e1c 100644 --- a/src/core/lease/interval_lease.ts +++ b/src/core/lease/interval_lease.ts @@ -15,8 +15,8 @@ * */ import {MissingArgumentError, SoloError} from '../errors.js'; -import {type V1Lease} from '@kubernetes/client-node'; -import {type K8} from '../k8.js'; +import type {V1Lease} from '@kubernetes/client-node'; +import type {K8} from '../k8.js'; import {LeaseHolder} from './lease_holder.js'; import {LeaseAcquisitionError, LeaseRelinquishmentError} from './lease_errors.js'; import {sleep} from '../helpers.js'; diff --git a/src/core/lease/interval_lease_renewal.ts b/src/core/lease/interval_lease_renewal.ts index c5be27005..c29e6bcf1 100644 --- a/src/core/lease/interval_lease_renewal.ts +++ b/src/core/lease/interval_lease_renewal.ts @@ -14,7 +14,7 @@ * limitations under the License. * */ -import {type Lease, type LeaseRenewalService} from './lease.js'; +import type {Lease, LeaseRenewalService} from './lease.js'; import {Duration} from '../time/duration.js'; import {injectable} from 'tsyringe-neo'; diff --git a/src/core/lease/lease.ts b/src/core/lease/lease.ts index da4cff8b5..2ee9ccf62 100644 --- a/src/core/lease/lease.ts +++ b/src/core/lease/lease.ts @@ -15,8 +15,8 @@ * */ import type {K8} from '../k8.js'; -import {type LeaseHolder} from './lease_holder.js'; -import {type Duration} from '../time/duration.js'; +import type {LeaseHolder} from './lease_holder.js'; +import type {Duration} from '../time/duration.js'; export interface Lease { readonly client: K8; diff --git a/src/core/lease/listr_lease.ts b/src/core/lease/listr_lease.ts index a4cea7390..428d34b89 100644 --- a/src/core/lease/listr_lease.ts +++ b/src/core/lease/listr_lease.ts @@ -14,9 +14,9 @@ * limitations under the License. * */ -import {type ListrTaskWrapper} from 'listr2'; +import type {ListrTaskWrapper} from 'listr2'; import chalk from 'chalk'; -import {type Lease} from './lease.js'; +import type {Lease} from './lease.js'; import {LeaseAcquisitionError} from './lease_errors.js'; /** diff --git a/src/core/logging.ts b/src/core/logging.ts index 86ed86a66..311003411 100644 --- a/src/core/logging.ts +++ b/src/core/logging.ts @@ -20,7 +20,7 @@ import * as util from 'util'; import chalk from 'chalk'; import path from 'path'; import * as constants from './constants.js'; -import {inject, injectable, Lifecycle, registry, scoped, singleton} from 'tsyringe-neo'; +import {inject, injectable} from 'tsyringe-neo'; import {patchInject} from './container_helper.js'; const customFormat = winston.format.combine( diff --git a/src/core/platform_installer.ts b/src/core/platform_installer.ts index 410011bae..346d1cbce 100644 --- a/src/core/platform_installer.ts +++ b/src/core/platform_installer.ts @@ -32,7 +32,6 @@ import {Duration} from './time/duration.js'; import {sleep} from './helpers.js'; import {inject, injectable} from 'tsyringe-neo'; import {patchInject} from './container_helper.js'; -import {HEDERA_HGCAPP_DIR} from './constants.js'; /** PlatformInstaller install platform code in the root-container of a network pod */ @injectable() diff --git a/src/core/process_output.ts b/src/core/process_output.ts index 0586687e9..ca3047a0e 100644 --- a/src/core/process_output.ts +++ b/src/core/process_output.ts @@ -15,7 +15,7 @@ * */ import {ProcessOutput} from 'listr2'; -import {type SoloLogger} from './logging.js'; +import type {SoloLogger} from './logging.js'; /** Uses the solo logger to handle process output from Listr2 */ export class CustomProcessOutput extends ProcessOutput { diff --git a/src/core/task.ts b/src/core/task.ts index 0eb20b27b..46c73e2c6 100644 --- a/src/core/task.ts +++ b/src/core/task.ts @@ -14,7 +14,7 @@ * limitations under the License. * */ -import {type SkipCheck, type TaskFunction} from '../types/aliases.js'; +import type {SkipCheck, TaskFunction} from '../types/aliases.js'; /** * Copyright (C) 2024 Hedera Hashgraph, LLC diff --git a/src/core/templates.ts b/src/core/templates.ts index 9fb0fcbce..e37ac246c 100644 --- a/src/core/templates.ts +++ b/src/core/templates.ts @@ -19,7 +19,7 @@ import os from 'os'; import path from 'path'; import {DataValidationError, SoloError, IllegalArgumentError, MissingArgumentError} from './errors.js'; import * as constants from './constants.js'; -import {type AccountId} from '@hashgraph/sdk'; +import type {AccountId} from '@hashgraph/sdk'; import type {IP, NodeAlias, NodeId, PodName} from '../types/aliases.js'; import {GrpcProxyTlsEnums} from './enumerations.js'; import type {Namespace} from './config/remote/types.js'; diff --git a/src/core/yargs_command.ts b/src/core/yargs_command.ts index aee8d083e..adeb1da04 100644 --- a/src/core/yargs_command.ts +++ b/src/core/yargs_command.ts @@ -16,8 +16,8 @@ */ import {Flags as commandFlags} from '../commands/flags.js'; import {IllegalArgumentError} from './errors.js'; -import {type BaseCommand} from '../commands/base.js'; -import {type CommandFlag} from '../types/flag_types.js'; +import type {BaseCommand} from '../commands/base.js'; +import type {CommandFlag} from '../types/flag_types.js'; export class YargsCommand { constructor( diff --git a/src/index.ts b/src/index.ts index 2a2d856f2..cc0a481cc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,7 +18,6 @@ import chalk from 'chalk'; import yargs from 'yargs'; import {hideBin} from 'yargs/helpers'; import 'dotenv/config'; -import path from 'path'; // eslint-disable-next-line n/no-extraneous-import import 'reflect-metadata'; import {container} from 'tsyringe-neo'; @@ -44,7 +43,7 @@ import {RemoteConfigManager} from './core/config/remote/remote_config_manager.js import * as helpers from './core/helpers.js'; import {K8} from './core/k8.js'; import {CustomProcessOutput} from './core/process_output.js'; -import {type Opts} from './types/command_types.js'; +import type {Opts} from './types/command_types.js'; import {SoloLogger} from './core/logging.js'; import {Container} from './core/container_init.js'; diff --git a/src/types/aliases.ts b/src/types/aliases.ts index a4cfffe7d..4acd5f77e 100644 --- a/src/types/aliases.ts +++ b/src/types/aliases.ts @@ -15,8 +15,8 @@ * */ import type {Listr, ListrTaskWrapper} from 'listr2'; -import {type Stats} from 'node:fs'; -import {type ReadEntry} from 'tar'; +import type {Stats} from 'node:fs'; +import type {ReadEntry} from 'tar'; export type NodeAlias = `node${number}`; export type PodName = `network-${NodeAlias}-0`; diff --git a/src/types/flag_types.ts b/src/types/flag_types.ts index 2f616d1b9..6ca6d4e8d 100644 --- a/src/types/flag_types.ts +++ b/src/types/flag_types.ts @@ -14,7 +14,7 @@ * limitations under the License. * */ -import {type ListrTaskWrapper} from 'listr2'; +import type {ListrTaskWrapper} from 'listr2'; export type PromptFunction = (task: ListrTaskWrapper, input: any, data?: any) => Promise; diff --git a/src/types/index.ts b/src/types/index.ts index 140aff925..103b8a375 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -19,7 +19,7 @@ import type net from 'net'; import type * as WebSocket from 'ws'; import type crypto from 'crypto'; import type {ListrTask, ListrTaskWrapper} from 'listr2'; -import type {AccountId, PublicKey} from '@hashgraph/sdk'; +import type {PublicKey} from '@hashgraph/sdk'; import type {JsonString} from './aliases.js'; // NOTE: DO NOT add any Solo imports in this file to avoid circular dependencies