Skip to content

Commit

Permalink
revert remote config changes
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon committed Feb 14, 2025
1 parent 978fa08 commit f5798d1
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/core/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,32 +73,6 @@ export function splitFlagInput(input: string, separator = ',') {
.filter(Boolean);
}

export function getNodeAliasesByClusterFromNodeAliasesFlag(
flagValue: string,
clusterRefs: ClusterRef[],
): Record<ClusterRef, NodeAlias[]> {
const nodeAliasesByCluster: Record<ClusterRef, NodeAlias[]> = {};
clusterRefs.forEach(cluster => {
nodeAliasesByCluster[cluster] = [];
});

const parameterPairs: string[] = splitFlagInput(flagValue);
for (const parameterPair of parameterPairs) {
if (parameterPair.includes('=')) {
const [cluster, nodeAlias] = splitFlagInput(parameterPair, '=');
if (nodeAliasesByCluster[cluster]) {
nodeAliasesByCluster[cluster].push(nodeAlias as NodeAlias);
} else {
clusterRefs.forEach(cluster => {
nodeAliasesByCluster[cluster].push(nodeAlias as NodeAlias);
});
}
}
}

return nodeAliasesByCluster;
}

/**
* @param arr - The array to be cloned
* @returns a new array with the same elements as the input array
Expand Down

0 comments on commit f5798d1

Please sign in to comment.