@nswhp/golden-path
Version:
Generate all the recommended golden paths
55 lines (54 loc) • 2.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.taggingQuestions = exports.costCenterQuestion = exports.reasonQuestion = exports.serviceOfferingQuestion = exports.supportContactQuestion = exports.supportQuestion = void 0;
const tslib_1 = require("tslib");
const inquirer_1 = (0, tslib_1.__importDefault)(require("inquirer"));
function supportQuestion() {
return inquirer_1.default.prompt([{
name: 'support',
type: 'input',
message: 'Enter name of supporting team for this project (eg DevOps, Fusion, Laboratory Randwick Genomics):',
}]);
}
exports.supportQuestion = supportQuestion;
function supportContactQuestion() {
return inquirer_1.default.prompt([{
name: 'supportContact',
type: 'input',
message: 'Enter the supporting team contact email (eg NSWPATH-DevOps@health.nsw.gov.au):',
}]);
}
exports.supportContactQuestion = supportContactQuestion;
function serviceOfferingQuestion() {
return inquirer_1.default.prompt([{
name: 'serviceOffering',
type: 'input',
message: 'Enter the product or platform this resource is associated with (eg Genomics, Akuna, Catalogue, SIMBA):',
}]);
}
exports.serviceOfferingQuestion = serviceOfferingQuestion;
function reasonQuestion() {
return inquirer_1.default.prompt([{
name: 'reason',
type: 'input',
message: 'Provide a link to the design that contextualizes this resource (eg confluence page):',
}]);
}
exports.reasonQuestion = reasonQuestion;
function costCenterQuestion() {
return inquirer_1.default.prompt([{
name: 'costCenter',
type: 'input',
message: 'Cost Center number (supplied by finance / program / project / product manager):',
}]);
}
exports.costCenterQuestion = costCenterQuestion;
async function taggingQuestions() {
const { costCenter } = await costCenterQuestion();
const { support } = await supportQuestion();
const { supportContact } = await supportContactQuestion();
const { reason } = await reasonQuestion();
const { serviceOffering } = await serviceOfferingQuestion();
return Promise.resolve({ costCenter, support, supportContact, reason, serviceOffering });
}
exports.taggingQuestions = taggingQuestions;