my_wins 1.3.4 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +5 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -242,9 +242,9 @@ async function runOnce(baseSettings, filterNames) {
242
242
  console.log(`my_wins finished successfully!`);
243
243
  }
244
244
 
245
- async function promptMenu(winNames) {
245
+ async function promptMenu(winNames, exitChecked) {
246
246
  const choices = winNames.map((name)=>({ name, value: name }));
247
- choices.push({ name: "exit", value: "__exit__", checked: true });
247
+ choices.push({ name: "exit", value: "__exit__", checked: !!exitChecked });
248
248
  const prompt = inquirer.prompt || (inquirer.default && inquirer.default.prompt);
249
249
  if (!prompt) {
250
250
  throw new Error("Inquirer prompt API is unavailable. Please use a compatible inquirer version.");
@@ -282,8 +282,10 @@ module.exports.run = async ()=>{
282
282
  console.log("No wins configured.");
283
283
  process.exit(0);
284
284
  }
285
+ let isFirstRun = true;
285
286
  while (true) {
286
- const selections = await promptMenu(winNames);
287
+ const selections = await promptMenu(winNames, isFirstRun);
288
+ isFirstRun = false;
287
289
  const exitSelected = selections.includes("__exit__");
288
290
  const selectedNames = selections.filter((item)=>item !== "__exit__");
289
291
  if (selectedNames.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my_wins",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "Automates starting and laying out your console windows for tsc, babel, tests, verdaccio, etc...",
5
5
  "keywords": [
6
6
  "automation",