UNPKG

@provisioner/suitecrm

Version:

CodeZero provisioner for SuiteCRM

45 lines 1.87 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.createInquireMixin = void 0; const inquirer_1 = __importDefault(require("inquirer")); exports.createInquireMixin = (base) => class extends base { constructor() { super(...arguments); this.storageSizeChoices = ['1Gi', '2Gi', '5Gi', '10Gi', '50Gi', '100Gi', '200Gi', '400Gi', '1000Gi']; } async createInquire(args) { if (!this.isPreview) { const answers = { suitecrmusername: args['username'] || this.spec.suitecrmusername, suitecrmpassword: args['password'] || this.spec.suitecrmpassword, databasesize: args['database-size'] || this.spec.databasesize, }; const responses = await inquirer_1.default.prompt([ { type: 'input', name: 'suitecrmusername', message: 'Administrator Username?' }, { type: 'input', name: 'suitecrmpassword', message: 'Administrator Password?' }, { type: 'list', name: 'databasesize', choices: this.storageSizeChoices, default: '1Gi', message: 'How much storage should we allocate for the database?', }, ], answers); this.spec.suitecrmusername = responses.suitecrmusername; this.spec.suitecrmpassword = responses.suitecrmpassword; this.spec.databasesize = responses.databasesize; } } }; //# sourceMappingURL=createInquire.js.map