@gravirei/reis 1.1.1 → 1.1.3
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.
- package/bin/reis.js +67 -14
- package/package.json +1 -1
package/bin/reis.js
CHANGED
|
@@ -299,22 +299,75 @@ program.action(async () => {
|
|
|
299
299
|
helpCmd();
|
|
300
300
|
}
|
|
301
301
|
} else {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
console.log(chalk.
|
|
306
|
-
console.log(chalk.
|
|
307
|
-
console.log(chalk.green(' ✓ Installed subagents'));
|
|
308
|
-
console.log(chalk.green(` ✓ Wrote VERSION (${packageJson.version})`));
|
|
309
|
-
console.log(chalk.green(' ✓ Configured REIS\n'));
|
|
302
|
+
// First-time installation
|
|
303
|
+
console.log(chalk.green(' REIS is not installed yet.\n'));
|
|
304
|
+
console.log(chalk.white(' What would you like to do?\n'));
|
|
305
|
+
console.log(chalk.white(' 1) Install REIS'));
|
|
306
|
+
console.log(chalk.white(' 2) Cancel\n'));
|
|
310
307
|
|
|
311
|
-
|
|
312
|
-
const install = require('../lib/install.js');
|
|
308
|
+
let choice = '1';
|
|
313
309
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
310
|
+
try {
|
|
311
|
+
const result = await inquirer.prompt([
|
|
312
|
+
{
|
|
313
|
+
type: 'input',
|
|
314
|
+
name: 'choice',
|
|
315
|
+
message: 'Choice:',
|
|
316
|
+
default: '1',
|
|
317
|
+
validate: (input) => {
|
|
318
|
+
if (input === '1' || input === '2') {
|
|
319
|
+
return true;
|
|
320
|
+
}
|
|
321
|
+
return 'Please enter 1 or 2';
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
]);
|
|
325
|
+
|
|
326
|
+
choice = result.choice;
|
|
327
|
+
console.log('');
|
|
328
|
+
|
|
329
|
+
if (choice === '2') {
|
|
330
|
+
console.log(chalk.yellow(' Installation cancelled\n'));
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
console.log(chalk.cyan(' Installing to ~/.rovodev/reis/\n'));
|
|
335
|
+
|
|
336
|
+
// Show installation progress
|
|
337
|
+
console.log(chalk.green(' ✓ Installed documentation'));
|
|
338
|
+
console.log(chalk.green(' ✓ Installed templates'));
|
|
339
|
+
console.log(chalk.green(' ✓ Installed subagents'));
|
|
340
|
+
console.log(chalk.green(` ✓ Wrote VERSION (${packageJson.version})`));
|
|
341
|
+
console.log(chalk.green(' ✓ Configured REIS\n'));
|
|
342
|
+
|
|
343
|
+
// Actually run the install
|
|
344
|
+
const install = require('../lib/install.js');
|
|
345
|
+
|
|
346
|
+
// Show completion message
|
|
347
|
+
console.log(chalk.bold.green(' 🎉 Congratulations! ') + chalk.white('REIS is now in your system.'));
|
|
348
|
+
console.log(chalk.white(' Open Atlassian Rovo Dev and try: ') + chalk.cyan('use reis_planner') + chalk.white(' or ') + chalk.cyan('use reis_executor'));
|
|
349
|
+
console.log(chalk.white('\n For help, run: ') + chalk.cyan('npx @gravirei/reis help\n'));
|
|
350
|
+
|
|
351
|
+
} catch (err) {
|
|
352
|
+
// inquirer failed, auto-install as default (choice was '1')
|
|
353
|
+
console.log(chalk.gray(' Non-interactive mode - installing automatically...\n'));
|
|
354
|
+
console.log(chalk.cyan(' Installing to ~/.rovodev/reis/\n'));
|
|
355
|
+
|
|
356
|
+
// Show installation progress
|
|
357
|
+
console.log(chalk.green(' ✓ Installed documentation'));
|
|
358
|
+
console.log(chalk.green(' ✓ Installed templates'));
|
|
359
|
+
console.log(chalk.green(' ✓ Installed subagents'));
|
|
360
|
+
console.log(chalk.green(` ✓ Wrote VERSION (${packageJson.version})`));
|
|
361
|
+
console.log(chalk.green(' ✓ Configured REIS\n'));
|
|
362
|
+
|
|
363
|
+
// Actually run the install
|
|
364
|
+
const install = require('../lib/install.js');
|
|
365
|
+
|
|
366
|
+
// Show completion message
|
|
367
|
+
console.log(chalk.bold.green(' 🎉 Congratulations! ') + chalk.white('REIS is now in your system.'));
|
|
368
|
+
console.log(chalk.white(' Open Atlassian Rovo Dev and try: ') + chalk.cyan('use reis_planner') + chalk.white(' or ') + chalk.cyan('use reis_executor'));
|
|
369
|
+
console.log(chalk.white('\n For help, run: ') + chalk.cyan('npx @gravirei/reis help\n'));
|
|
370
|
+
}
|
|
318
371
|
}
|
|
319
372
|
});
|
|
320
373
|
|
package/package.json
CHANGED