@veecode-platform/safira-cli
Version:
Generate a microservice project from your spec.
37 lines (36 loc) • 1.57 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VeecodeDevportalOperations = void 0;
const tslib_1 = require("tslib");
const command_execute_1 = require("../command/command-execute");
const properties = tslib_1.__importStar(require("../properties.json"));
class VeecodeDevportalOperations {
constructor() { }
async install(params) {
const flags = ["--dry_run=false"];
if (params.domain)
flags.push(`--domain ${params.domain}`);
if (params.secure)
flags.push("--secure");
if (params.oktaClientId)
flags.push(`--okta_client_id ${params.oktaClientId}`);
if (params.oktaClientSecret)
flags.push(`--okta_client_secret ${params.oktaClientSecret}`);
if (params.oktaClientAudience)
flags.push(`--okta_client_audience ${params.oktaClientAudience}`);
if (params.specHouseUrl)
flags.push(`--github_spechouseurl ${params.specHouseUrl}`);
process.env.VKPR_ENV_DEVPORTAL_INGRESS_CLASS_NAME = "kong";
await command_execute_1.CommandExecute.instance.runInteractive(`${properties.vkpr.command} devportal install ${flags.join(" ")}`);
}
async remove() {
await command_execute_1.CommandExecute.instance.runInteractive(`${properties.vkpr.command} devportal remove`);
}
static get instance() {
if (!this._instance) {
this._instance = new this();
}
return this._instance;
}
}
exports.VeecodeDevportalOperations = VeecodeDevportalOperations;