Update libs (#28)

* added prompt context library

* updated libs, except chalk that should not be updated

* updated libs and fixed speed
This commit is contained in:
Arwid Thornström
2025-06-17 10:12:48 +02:00
committed by GitHub
parent 90b9ccc454
commit 5c43d166ba
27 changed files with 2429 additions and 3457 deletions
@@ -22,7 +22,7 @@ type Stack = {
const getBranchName = async (
toolbox: GluegunMenuToolbox,
token: string,
repoPath: string
repoPath: string,
) => {
const { print } = toolbox;
const currentBranch = await getCurrentBranch(repoPath, toolbox);
@@ -44,7 +44,7 @@ const getBranchName = async (
owner: 'photowall',
repo: 'photowall',
branch: responseBranch,
}
},
);
if (response.status === 200) {
return responseBranch;
@@ -59,7 +59,7 @@ const getConfirmation = async (branchName: string, stackName: string) => {
const confirm = new Confirm({
name: 'confirm',
message: `The branch ${chalk.green(
branchName
branchName,
)} will deploy to ${chalk.yellow(stackName)}`,
});
@@ -96,7 +96,7 @@ module.exports = {
branchName = await getBranchName(
toolbox,
config.gh_token,
config.photowall_repo
config.photowall_repo,
);
}
@@ -123,8 +123,8 @@ module.exports = {
const cmd = `make update-stack STACK_ENVIRONMENT_NAME=${stacksuffix} GITHUB_BRANCH=${branchName}`;
print.fancy(
`Running [${chalk.yellow(
cmd
)}] in folder [${`${config.photowall_repo}/cloudformation/`}]`
cmd,
)}] in folder [${`${config.photowall_repo}/cloudformation/`}]`,
);
const output = await system.run(cmd, {
cwd: `${config.photowall_repo}/cloudformation/`,
@@ -144,17 +144,17 @@ module.exports = {
switch (currentStackStatus) {
case 'UPDATE_COMPLETE_CLEANUP_IN_PROGRESS':
statusOutput = `[${chalk.yellow(
currentStackStatus
currentStackStatus,
)}]: Almost done, cleanup in progress`;
break;
case 'UPDATE_COMPLETE':
statusOutput = `[${chalk.green(
currentStackStatus
currentStackStatus,
)}]: Update complete`;
break;
default:
statusOutput = `[${chalk.red(
currentStackStatus
currentStackStatus,
)}]: Updating the stack`;
break;
}
@@ -165,7 +165,7 @@ module.exports = {
}
spinner.text = `Will start the pipeline now [${chalk.yellow(
`photowall-${stacksuffix}Pipeline`
`photowall-${stacksuffix}Pipeline`,
)}]`;
const runPipelineCmd = `aws codepipeline start-pipeline-execution --name photowall-${stacksuffix}Pipeline`;
await system.run(runPipelineCmd);
@@ -180,7 +180,7 @@ module.exports = {
if (toolbox.fromMenu()) {
await toolbox.menu.showMenu(
'deployment testservers',
defaultMenuSettings
defaultMenuSettings,
);
} else {
exit();