UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

22 lines 962 B
// SPDX-License-Identifier: Apache-2.0 import * as constants from '../../../core/constants.js'; import { CacheTarget } from '../models/impl/cache-target.js'; import { CacheArtifactEnum } from '../enums/cache-artifact-enum.js'; import { SoloError } from '../../../core/errors/solo-error.js'; export class KindNodeImageTargetProvider { async getRequiredTargets() { const { name, version } = this.parseImageReference(constants.KIND_NODE_IMAGE); return [new CacheTarget(CacheArtifactEnum.IMAGE, name, version, undefined)]; } parseImageReference(image) { const tagSeparatorIndex = image.indexOf(':'); if (tagSeparatorIndex === -1) { throw new SoloError(`Invalid kind node image reference: ${image}`); } return { name: image.slice(0, tagSeparatorIndex), version: image.slice(tagSeparatorIndex + 1), }; } } //# sourceMappingURL=kind-image-target-provider.js.map