This commit is contained in:
Arwid Thornström
2022-01-21 13:34:56 +01:00
parent b4d3f789cf
commit fda1b42e9f
11 changed files with 43 additions and 29 deletions
@@ -3,6 +3,7 @@ const chalk = require('chalk');
const { Input, Confirm } = require('enquirer');
import { Octokit } from "@octokit/core";
import { GluegunPrint } from 'gluegun';
import { defaultMenuSettings } from '../../../../globals';
const os = require("os");
const STACK_DEFAULTS = {
@@ -113,7 +114,7 @@ module.exports = {
name: 'create',
alias: ['c'],
description: 'Create new testserver on aws (c)',
hidden: true,
hidden: false,
run: async (toolbox: GluegunMenuToolbox) => {
const { system, strings, print, filesystem } = toolbox;
@@ -126,7 +127,7 @@ module.exports = {
`);
if (toolbox.fromMenu()) {
await toolbox.menu.showMenu()
await toolbox.menu.showMenu(null, defaultMenuSettings)
} else {
return;
}
@@ -204,7 +205,7 @@ module.exports = {
`);
if (toolbox.fromMenu()) {
await toolbox.menu.showMenu('deployment testservers');
await toolbox.menu.showMenu('deployment testservers', defaultMenuSettings);
}
}
@@ -241,7 +242,7 @@ module.exports = {
}
if (toolbox.fromMenu()) {
await toolbox.menu.showMenu('deployment testservers')
await toolbox.menu.showMenu('deployment testservers', defaultMenuSettings)
}
}
}
@@ -1,5 +1,6 @@
import { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu'
import { GluegunSystem, print } from 'gluegun';
import { defaultMenuSettings } from '../../../../globals';
const chalk = require('chalk');
const { AutoComplete, Input, Confirm } = require('enquirer');
@@ -52,7 +53,7 @@ module.exports = {
name: 'delete',
alias: ['d'],
description: 'Choose a testserver to delete (d)',
hidden: true,
hidden: false,
run: async (toolbox: GluegunMenuToolbox) => {
const { system, strings, print } = toolbox;
@@ -127,7 +128,7 @@ module.exports = {
}
if (toolbox.fromMenu()) {
await toolbox.menu.showMenu('deployment testservers');
await toolbox.menu.showMenu('deployment testservers', defaultMenuSettings);
}
}
}
@@ -1,4 +1,5 @@
import { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu'
import { defaultMenuSettings } from '../../../../globals';
const tto = require('terminal-table-output').create();
type Stack = {
@@ -13,7 +14,7 @@ module.exports = {
name: 'status',
alias: ['s'],
description: 'Show status for available testservers (s)',
hidden: true,
hidden: false,
run: async (toolbox: GluegunMenuToolbox) => {
const { system, strings } = toolbox
@@ -62,7 +63,7 @@ module.exports = {
tto.print(true);
if (toolbox.fromMenu()) {
await toolbox.menu.showMenu('deployment testservers');
await toolbox.menu.showMenu('deployment testservers', defaultMenuSettings);
}
}
}
@@ -1,4 +1,5 @@
import { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu';
import { defaultMenuSettings } from '../../../globals';
/**
* Section1 menu
@@ -7,8 +8,8 @@ module.exports = {
name: 'testservers',
alias: ['ts'],
description: 'Deploy to testservers (ts)',
hidden: true,
hidden: false,
run: async (toolbox: GluegunMenuToolbox) => {
await toolbox.menu.showMenu('deployment testservers');
await toolbox.menu.showMenu('deployment testservers', defaultMenuSettings);
}
};
@@ -3,6 +3,7 @@ const chalk = require('chalk');
const { AutoComplete, Input, Confirm } = require('enquirer');
import { Octokit } from "@octokit/core";
import { GluegunPrint } from 'gluegun';
import { defaultMenuSettings } from '../../../../globals';
const os = require("os");
const STACK_DEFAULTS = {
@@ -111,7 +112,7 @@ module.exports = {
name: 'update',
alias: ['u'],
description: 'Update stack with different branch (u)',
hidden: true,
hidden: false,
run: async (toolbox: GluegunMenuToolbox) => {
const { system, strings, print, filesystem } = toolbox;
@@ -124,7 +125,7 @@ module.exports = {
`);
if (toolbox.fromMenu()) {
await toolbox.menu.showMenu()
await toolbox.menu.showMenu(null, defaultMenuSettings)
} else {
return;
}
@@ -212,7 +213,7 @@ module.exports = {
}
if (toolbox.fromMenu()) {
await toolbox.menu.showMenu('deployment testservers')
await toolbox.menu.showMenu('deployment testservers', defaultMenuSettings)
}
}
}