UNPKG

@veecode-platform/safira-cli

Version:

Generate a microservice project from your spec.

20 lines (19 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Kubectl = void 0; const tslib_1 = require("tslib"); const properties = tslib_1.__importStar(require("../properties.json")); const file_system_utils_1 = require("../utils/file-system-utils"); const safira_home_utils_1 = require("../safira-globals/safira-home-utils"); const safira_exception_1 = require("../exception/safira-exception"); class Kubectl { async getKubectl() { const kubectlVersionFolder = file_system_utils_1.FileSystemUtils.buildPath(safira_home_utils_1.SafiraHomeUtils.getSafiraHomePath(), properties.home["cache-folder"], "kubectl", properties.kubectl.version); const kubectlPath = file_system_utils_1.FileSystemUtils.buildPath(kubectlVersionFolder, "kubectl"); if (!file_system_utils_1.FileSystemUtils.exists(kubectlPath)) { throw new safira_exception_1.SafiraDependencyNotFoundException("kubectl not found. Please Reinstall Safira"); } return kubectlPath; } } exports.Kubectl = Kubectl;