@gravirei/reis 1.1.1 → 1.1.2
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 +48 -15
- package/package.json +1 -1
package/bin/reis.js
CHANGED
|
@@ -299,22 +299,55 @@ 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'));
|
|
310
|
-
|
|
311
|
-
// Actually run the install
|
|
312
|
-
const install = require('../lib/install.js');
|
|
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'));
|
|
313
307
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
308
|
+
try {
|
|
309
|
+
const { choice } = await inquirer.prompt([
|
|
310
|
+
{
|
|
311
|
+
type: 'input',
|
|
312
|
+
name: 'choice',
|
|
313
|
+
message: 'Choice:',
|
|
314
|
+
default: '1',
|
|
315
|
+
validate: (input) => {
|
|
316
|
+
if (input === '1' || input === '2') {
|
|
317
|
+
return true;
|
|
318
|
+
}
|
|
319
|
+
return 'Please enter 1 or 2';
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
]);
|
|
323
|
+
|
|
324
|
+
console.log('');
|
|
325
|
+
|
|
326
|
+
if (choice === '2') {
|
|
327
|
+
console.log(chalk.yellow(' Installation cancelled\n'));
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
console.log(chalk.cyan(' Installing to ~/.rovodev/reis/\n'));
|
|
332
|
+
|
|
333
|
+
// Show installation progress
|
|
334
|
+
console.log(chalk.green(' ✓ Installed documentation'));
|
|
335
|
+
console.log(chalk.green(' ✓ Installed templates'));
|
|
336
|
+
console.log(chalk.green(' ✓ Installed subagents'));
|
|
337
|
+
console.log(chalk.green(` ✓ Wrote VERSION (${packageJson.version})`));
|
|
338
|
+
console.log(chalk.green(' ✓ Configured REIS\n'));
|
|
339
|
+
|
|
340
|
+
// Actually run the install
|
|
341
|
+
const install = require('../lib/install.js');
|
|
342
|
+
|
|
343
|
+
// Show completion message
|
|
344
|
+
console.log(chalk.bold.green(' 🎉 Congratulations! ') + chalk.white('REIS is now in your system.'));
|
|
345
|
+
console.log(chalk.white(' Open Atlassian Rovo Dev and try: ') + chalk.cyan('use reis_planner') + chalk.white(' or ') + chalk.cyan('use reis_executor'));
|
|
346
|
+
console.log(chalk.white('\n For help, run: ') + chalk.cyan('npx @gravirei/reis help\n'));
|
|
347
|
+
|
|
348
|
+
} catch (err) {
|
|
349
|
+
console.log(chalk.yellow(' Installation cancelled\n'));
|
|
350
|
+
}
|
|
318
351
|
}
|
|
319
352
|
});
|
|
320
353
|
|
package/package.json
CHANGED