Skip to content

Commit dac6d6d

Browse files
committed
lint-fix, added .madgerc and configured it to dont count typed imports as circular dependencies
Signed-off-by: instamenta <[email protected]>
1 parent 1a29c82 commit dac6d6d

File tree

4 files changed

+24
-16
lines changed

4 files changed

+24
-16
lines changed

.madgerc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"detectiveOptions": {
3+
"ts": {
4+
"skipTypeImports": true
5+
}
6+
}
7+
}

src/commands/node/configs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import path from 'path';
2424
import fs from 'fs';
2525
import {validatePath} from '../../core/helpers.js';
2626
import {Flags as flags} from '../flags.js';
27-
import {type NodeAlias, type NodeAliases, type PodName} from '../../types/aliases.js';
28-
import {type NetworkNodeServices} from '../../core/network_node_services.js';
27+
import type {NodeAlias, NodeAliases, PodName} from '../../types/aliases.js';
28+
import type {NetworkNodeServices} from '../../core/network_node_services.js';
2929

3030
export const PREPARE_UPGRADE_CONFIGS_NAME = 'prepareUpgradeConfig';
3131
export const DOWNLOAD_GENERATED_FILES_CONFIGS_NAME = 'downloadGeneratedFilesConfig';

src/core/profile_manager.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class ProfileManager {
175175
profile: any,
176176
nodeAliases: NodeAliases,
177177
yamlRoot: object,
178-
genesisNetworkData: GenesisNetworkDataConstructor,
178+
genesisNetworkData?: GenesisNetworkDataConstructor,
179179
): object {
180180
if (!profile) throw new MissingArgumentError('profile is required');
181181

@@ -310,7 +310,7 @@ export class ProfileManager {
310310
* @param genesisNetworkData
311311
* @returns return the full path to the values file
312312
*/
313-
prepareValuesForSoloChart(profileName: string, genesisNetworkData: GenesisNetworkDataConstructor) {
313+
prepareValuesForSoloChart(profileName: string, genesisNetworkData?: GenesisNetworkDataConstructor) {
314314
if (!profileName) throw new MissingArgumentError('profileName is required');
315315
const profile = this.getProfile(profileName);
316316

@@ -485,7 +485,7 @@ export class ProfileManager {
485485
releaseTag: string,
486486
appName = constants.HEDERA_APP_NAME,
487487
chainId = constants.HEDERA_CHAIN_ID,
488-
genesisNetworkData: GenesisNetworkDataConstructor,
488+
genesisNetworkData?: GenesisNetworkDataConstructor,
489489
) {
490490
if (!nodeAccountMap || nodeAccountMap.size === 0)
491491
throw new MissingArgumentError('nodeAccountMap the map of node IDs to account IDs is required');
@@ -511,21 +511,21 @@ export class ProfileManager {
511511
for (const nodeAlias of nodeAccountMap.keys()) {
512512
const internalIP = Templates.renderFullyQualifiedNetworkPodName(namespace, nodeAlias);
513513
const externalIP = Templates.renderFullyQualifiedNetworkSvcName(namespace, nodeAlias);
514+
const account = nodeAccountMap.get(nodeAlias);
514515

515-
const nodeDataWrapper = genesisNetworkData.nodes[nodeAlias];
516-
517-
nodeDataWrapper.weight = nodeStakeAmount;
516+
if (genesisNetworkData) {
517+
const nodeDataWrapper = genesisNetworkData.nodes[nodeAlias];
518518

519-
// Add gossip endpoints
520-
nodeDataWrapper.addGossipEndpoint(externalIP, externalPort);
521-
nodeDataWrapper.addGossipEndpoint(internalIP, internalPort);
519+
nodeDataWrapper.weight = nodeStakeAmount;
520+
nodeDataWrapper.accountId = account;
522521

523-
// Add service endpoints
524-
nodeDataWrapper.addServiceEndpoint(internalIP, internalPort);
522+
// Add gossip endpoints
523+
nodeDataWrapper.addGossipEndpoint(externalIP, externalPort);
524+
nodeDataWrapper.addGossipEndpoint(internalIP, internalPort);
525525

526-
const account = nodeAccountMap.get(nodeAlias);
527-
528-
nodeDataWrapper.accountId = account;
526+
// Add service endpoints
527+
nodeDataWrapper.addServiceEndpoint(internalIP, internalPort);
528+
}
529529

530530
if (releaseVersion.minor >= 40) {
531531
configLines.push(

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "./tsconfig-google.json",
33
"compilerOptions": {
4+
"isolatedModules": true,
45
"target": "ES2022",
56
"lib": [
67
"ES2022",

0 commit comments

Comments
 (0)