@hashgraph/solo
Version:
An opinionated CLI tool to deploy and manage private Hedera Networks.
32 lines • 1.21 kB
JavaScript
// SPDX-License-Identifier: Apache-2.0
export class CacheImageTemplateValues {
MIRROR_NODE_VERSION;
BLOCK_NODE_VERSION;
RELAY_VERSION;
EXPLORER_VERSION;
MINIO_OPERATOR_VERSION;
CONSENSUS_NODE_VERSION;
constructor(mirrorNodeVersion, blockNodeVersion, relayVersion, explorerVersion, minioOperatorVersion, consensusNodeVersion) {
this.MIRROR_NODE_VERSION = this.removeVPrefix(mirrorNodeVersion);
this.BLOCK_NODE_VERSION = this.removeVPrefix(blockNodeVersion);
this.RELAY_VERSION = this.removeVPrefix(relayVersion);
this.EXPLORER_VERSION = this.removeVPrefix(explorerVersion);
this.MINIO_OPERATOR_VERSION = this.ensureVPrefix(minioOperatorVersion);
this.CONSENSUS_NODE_VERSION = this.removeVPrefix(consensusNodeVersion);
}
/**
* Remove the 'v' prefix from the version string.
* ex. v0.1.0 -> 0.1.0
*/
removeVPrefix(version) {
return version.replace(/^v/, '');
}
/**
* Add the 'v' prefix if missing.
* ex. 7.1.1 -> v7.1.1
*/
ensureVPrefix(version) {
return version.startsWith('v') ? version : `v${version}`;
}
}
//# sourceMappingURL=cache-image-template-values.js.map