UNPKG

@nswhp/golden-path

Version:
26 lines (25 loc) 1.57 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.awsCdkActions = void 0; const questions_1 = require("../questions"); const aws_account_questions_1 = require("../questions/aws-account.questions"); const environments_selection_question_1 = require("../questions/environments-selection.question"); const tagging_questions_1 = require("../questions/tagging.questions"); const aws_cdk_template_1 = require("../templates/aws-cdk/aws-cdk.template"); const logger_util_1 = require("../utils/logger.util"); async function awsCdkActions() { (0, logger_util_1.showInfo)('Lets gather some information about your project'); const { projectName } = await (0, questions_1.projectNameQuestion)(); const { environmentSelection } = await (0, environments_selection_question_1.environmentSelectionQuestion)(); (0, logger_util_1.showInfo)('Lets gather some tagging information'); const tagging = await (0, tagging_questions_1.taggingQuestions)(); const accountDetails = []; for (const env of environmentSelection) { (0, logger_util_1.showInfo)(`Lets gather details on your aws environments for ${env}`); const envAccountDetails = await (0, aws_account_questions_1.awsAccountQuestions)(env); accountDetails.push({ env, ...envAccountDetails }); } await (0, aws_cdk_template_1.awsCdkTemplate)(projectName, tagging, accountDetails); (0, logger_util_1.showSuccess)('Setup complete, you are now on the aws-cdk golden path'); } exports.awsCdkActions = awsCdkActions;