@gravirei/reis 1.0.14 → 1.0.16
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 +3 -2
- package/lib/commands/uninstall.js +43 -19
- package/package.json +1 -1
package/bin/reis.js
CHANGED
|
@@ -228,8 +228,9 @@ program
|
|
|
228
228
|
program
|
|
229
229
|
.command('uninstall')
|
|
230
230
|
.description('Uninstall REIS')
|
|
231
|
-
.action(() => {
|
|
232
|
-
|
|
231
|
+
.action(async () => {
|
|
232
|
+
const uninstallCmd = require('../lib/commands/uninstall');
|
|
233
|
+
await uninstallCmd({});
|
|
233
234
|
});
|
|
234
235
|
|
|
235
236
|
// Default action (no command)
|
|
@@ -10,36 +10,60 @@ const os = require('os');
|
|
|
10
10
|
* @param {Object} args - {}
|
|
11
11
|
*/
|
|
12
12
|
module.exports = async function(args) {
|
|
13
|
-
|
|
14
|
-
console.log(chalk.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
// Show banner
|
|
14
|
+
console.log(chalk.white.bold(`
|
|
15
|
+
██████ ███████ ██ ███████
|
|
16
|
+
██ ██ ██ ██ ██
|
|
17
|
+
██████ █████ ██ ███████
|
|
18
|
+
██ ██ ██ ██ ██
|
|
19
|
+
██ ██ ███████ ██ ███████
|
|
20
|
+
`));
|
|
21
|
+
|
|
22
|
+
console.log(chalk.blue.bold(' REIS - Roadmap Execution & Implementation System'));
|
|
23
|
+
console.log(chalk.gray(' Specially designed for Atlassian Rovo Dev\n'));
|
|
24
|
+
|
|
25
|
+
console.log(chalk.bold.red(' ⚠️ Uninstall REIS\n'));
|
|
26
|
+
console.log(chalk.yellow(' This will remove:'));
|
|
27
|
+
console.log(chalk.yellow(' • ~/.rovodev/reis/ (all documentation and templates)'));
|
|
28
|
+
console.log(chalk.yellow(' • ~/.rovodev/subagents/reis_*.md (all REIS subagents)'));
|
|
29
|
+
console.log(chalk.gray('\n Your project .planning/ directories will NOT be affected.\n'));
|
|
30
|
+
|
|
31
|
+
console.log(chalk.white(' What would you like to do?\n'));
|
|
32
|
+
console.log(chalk.white(' 1) Remove REIS from system'));
|
|
33
|
+
console.log(chalk.white(' 2) Cancel\n'));
|
|
18
34
|
|
|
19
35
|
try {
|
|
20
|
-
const {
|
|
36
|
+
const { choice } = await inquirer.prompt([
|
|
21
37
|
{
|
|
22
|
-
type: '
|
|
23
|
-
name: '
|
|
24
|
-
message: '
|
|
25
|
-
default:
|
|
38
|
+
type: 'input',
|
|
39
|
+
name: 'choice',
|
|
40
|
+
message: 'Choice:',
|
|
41
|
+
default: '2',
|
|
42
|
+
validate: (input) => {
|
|
43
|
+
if (input === '1' || input === '2') {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
return 'Please enter 1 or 2';
|
|
47
|
+
}
|
|
26
48
|
}
|
|
27
49
|
]);
|
|
28
50
|
|
|
29
|
-
|
|
30
|
-
|
|
51
|
+
console.log('');
|
|
52
|
+
|
|
53
|
+
if (choice === '2') {
|
|
54
|
+
console.log(chalk.green(' ✓ Uninstall cancelled\n'));
|
|
31
55
|
return;
|
|
32
56
|
}
|
|
33
57
|
|
|
34
|
-
console.log(chalk.cyan('
|
|
58
|
+
console.log(chalk.cyan(' Uninstalling REIS...\n'));
|
|
35
59
|
|
|
36
60
|
// Remove REIS directory
|
|
37
61
|
const reisDir = path.join(os.homedir(), '.rovodev', 'reis');
|
|
38
62
|
if (fs.existsSync(reisDir)) {
|
|
39
63
|
fs.rmSync(reisDir, { recursive: true, force: true });
|
|
40
|
-
console.log(chalk.green('✓ Removed ~/.rovodev/reis/'));
|
|
64
|
+
console.log(chalk.green(' ✓ Removed ~/.rovodev/reis/'));
|
|
41
65
|
} else {
|
|
42
|
-
console.log(chalk.gray('○ ~/.rovodev/reis/ not found'));
|
|
66
|
+
console.log(chalk.gray(' ○ ~/.rovodev/reis/ not found'));
|
|
43
67
|
}
|
|
44
68
|
|
|
45
69
|
// Remove REIS subagents
|
|
@@ -56,13 +80,13 @@ module.exports = async function(args) {
|
|
|
56
80
|
});
|
|
57
81
|
|
|
58
82
|
if (removedCount > 0) {
|
|
59
|
-
console.log(chalk.green(
|
|
83
|
+
console.log(chalk.green(` ✓ Removed ${removedCount} REIS subagent(s)`));
|
|
60
84
|
} else {
|
|
61
|
-
console.log(chalk.gray('○ No REIS subagents found'));
|
|
85
|
+
console.log(chalk.gray(' ○ No REIS subagents found'));
|
|
62
86
|
}
|
|
63
87
|
|
|
64
|
-
console.log(chalk.bold.green('\n✓ REIS uninstalled successfully!\n'));
|
|
65
|
-
console.log(chalk.gray('Note: If installed globally, run: npm uninstall -g @gravirei/reis\n'));
|
|
88
|
+
console.log(chalk.bold.green('\n ✓ REIS uninstalled successfully!\n'));
|
|
89
|
+
console.log(chalk.gray(' Note: If installed globally, run: ') + chalk.cyan('npm uninstall -g @gravirei/reis\n'));
|
|
66
90
|
|
|
67
91
|
} catch (err) {
|
|
68
92
|
console.log(chalk.red('\n✗ Uninstall cancelled or failed\n'));
|
package/package.json
CHANGED