@gravirei/reis 1.1.9 → 1.2.1

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 CHANGED
@@ -259,32 +259,21 @@ program.action(async () => {
259
259
  console.log('');
260
260
 
261
261
  if (reinstall) {
262
- console.log(chalk.cyan(' Reinstalling to ~/.rovodev/reis/\n'));
263
-
264
- // Perform installation directly
262
+ // Perform installation directly with overwrite
265
263
  const { performInstallation } = require('../lib/install.js');
266
- await performInstallation();
264
+ await performInstallation(true, true); // overwrite=true, silent=true
267
265
 
268
- // Show completion message
269
- console.log(chalk.bold.green('\n 🎉 REIS has been reinstalled successfully!'));
270
- console.log(chalk.white(' Open Atlassian Rovo Dev and try: ') + chalk.cyan('use reis_planner') + chalk.white(' or ') + chalk.cyan('use reis_executor'));
271
- console.log(chalk.white('\n For help, run: ') + chalk.cyan('npx @gravirei/reis help\n'));
266
+ console.log(chalk.green(' ✓ REIS reinstalled successfully'));
267
+ console.log(chalk.white(` Run ${chalk.cyan('reis help')} to get started\n`));
272
268
  } else {
273
269
  console.log(chalk.cyan(' Keeping existing installation\n'));
274
270
  console.log(chalk.green(' ✓ Using existing documentation'));
275
271
  console.log(chalk.green(' ✓ Using existing templates'));
276
272
  console.log(chalk.green(' ✓ Using existing subagents'));
277
- console.log(chalk.green(` ✓ Current VERSION (${packageJson.version})\n`));
278
-
279
- // Show help
280
- console.log(chalk.white(' For help, run: ') + chalk.cyan('npx @gravirei/reis help\n'));
273
+ console.log(chalk.green(` ✓ Current VERSION (${packageJson.version})`));
274
+ console.log(chalk.white(`\n Run ${chalk.cyan('reis help')} to get started\n`));
281
275
  }
282
276
 
283
- // Show completion message
284
- console.log(chalk.bold.green(' 🎉 Congratulations! ') + chalk.white('REIS is now in your system.'));
285
- console.log(chalk.white(' Open Atlassian Rovo Dev and try: ') + chalk.cyan('use reis_planner') + chalk.white(' or ') + chalk.cyan('use reis_executor'));
286
- console.log(chalk.white('\n For help, run: ') + chalk.cyan('npx @gravirei/reis help\n'));
287
-
288
277
  } catch (err) {
289
278
  // If inquirer fails (non-interactive), just show help
290
279
  console.log(chalk.gray(' Non-interactive mode - showing help...\n'));
@@ -314,30 +303,23 @@ program.action(async () => {
314
303
  return;
315
304
  }
316
305
 
317
- console.log(chalk.cyan(' Installing to ~/.rovodev/reis/\n'));
318
-
319
306
  // Perform installation directly
320
307
  const { performInstallation } = require('../lib/install.js');
321
- await performInstallation();
308
+ await performInstallation(false, true); // overwrite=false, silent=true
322
309
 
323
- // Show completion message
324
- console.log(chalk.bold.green('\n 🎉 Congratulations! ') + chalk.white('REIS is now in your system.'));
325
- console.log(chalk.white(' Open Atlassian Rovo Dev and try: ') + chalk.cyan('use reis_planner') + chalk.white(' or ') + chalk.cyan('use reis_executor'));
326
- console.log(chalk.white('\n For help, run: ') + chalk.cyan('npx @gravirei/reis help\n'));
310
+ console.log(chalk.green(' ✓ REIS installed successfully'));
311
+ console.log(chalk.white(` Run ${chalk.cyan('reis help')} to get started\n`));
327
312
 
328
313
  } catch (err) {
329
314
  // inquirer failed, auto-install as default
330
315
  console.log(chalk.gray(' Non-interactive mode - installing automatically...\n'));
331
- console.log(chalk.cyan(' Installing to ~/.rovodev/reis/\n'));
332
316
 
333
317
  // Perform installation directly
334
318
  const { performInstallation } = require('../lib/install.js');
335
- await performInstallation();
319
+ await performInstallation(false, true); // overwrite=false, silent=true
336
320
 
337
- // Show completion message
338
- console.log(chalk.bold.green('\n 🎉 Congratulations! ') + chalk.white('REIS is now in your system.'));
339
- console.log(chalk.white(' Open Atlassian Rovo Dev and try: ') + chalk.cyan('use reis_planner') + chalk.white(' or ') + chalk.cyan('use reis_executor'));
340
- console.log(chalk.white('\n For help, run: ') + chalk.cyan('npx @gravirei/reis help\n'));
321
+ console.log(chalk.green(' ✓ REIS installed successfully'));
322
+ console.log(chalk.white(` Run ${chalk.cyan('reis help')} to get started\n`));
341
323
  }
342
324
  }
343
325
  });
@@ -8,7 +8,7 @@ module.exports = function help() {
8
8
  console.log(chalk.bold.cyan('║') + chalk.bold.white(' REIS - Roadmap Execution & Implementation System ') + chalk.bold.cyan('║'));
9
9
  console.log(chalk.bold.cyan('╚════════════════════════════════════════════════════════════════════╝'));
10
10
  console.log(chalk.gray(` Version ${version}`));
11
- console.log(chalk.gray(' Documentation: ~/.rovodev/reis/\\n'));
11
+ console.log(chalk.gray(' Documentation: ~/.rovodev/reis/\n'));
12
12
 
13
13
  console.log(chalk.bold.yellow('Getting Started'));
14
14
  console.log(' ' + chalk.cyan('reis new [idea]') + ' Initialize a new REIS project');
@@ -49,14 +49,14 @@ module.exports = function help() {
49
49
  console.log(' ' + chalk.cyan('reis docs') + ' Open REIS documentation');
50
50
  console.log(' ' + chalk.cyan('reis uninstall') + ' Uninstall REIS');
51
51
 
52
- console.log(chalk.bold.yellow('\\nHelp & Info'));
52
+ console.log(chalk.bold.yellow('\nHelp & Info'));
53
53
  console.log(' ' + chalk.cyan('reis help') + ' Show this help message');
54
54
  console.log(' ' + chalk.cyan('reis version') + ' Show version and install location');
55
55
 
56
- console.log(chalk.gray('\\n Full documentation: ~/.rovodev/reis/README.md'));
56
+ console.log(chalk.gray('\n Full documentation: ~/.rovodev/reis/README.md'));
57
57
  console.log(chalk.gray(' Examples: ~/.rovodev/reis/WORKFLOW_EXAMPLES.md'));
58
58
  console.log(chalk.gray(' Quick reference: ~/.rovodev/reis/QUICK_REFERENCE.md'));
59
- console.log(chalk.gray('\\n Example: ' + chalk.cyan('reis new "build a todo app"') + '\\n'));
59
+ console.log(chalk.gray('\n Example: ' + chalk.cyan('reis new "build a todo app"') + '\n'));
60
60
 
61
61
  return 0;
62
62
  };
package/lib/install.js CHANGED
@@ -86,7 +86,7 @@ async function install() {
86
86
  }
87
87
 
88
88
  // Perform the actual installation
89
- async function performInstallation() {
89
+ async function performInstallation(overwrite = false, silent = false) {
90
90
  const homeDir = os.homedir();
91
91
 
92
92
  // Define target directories
@@ -110,7 +110,7 @@ async function performInstallation() {
110
110
  docFiles.forEach(file => {
111
111
  const src = path.join(docsDir, file);
112
112
  const dest = path.join(reisDir, file);
113
- if (copyFile(src, dest)) {
113
+ if (copyFile(src, dest, overwrite)) {
114
114
  fileCount++;
115
115
  }
116
116
  });
@@ -119,7 +119,7 @@ async function performInstallation() {
119
119
  // Copy templates from templates/ to ~/.rovodev/reis/templates/
120
120
  const templatesSourceDir = path.join(packageDir, 'templates');
121
121
  if (fs.existsSync(templatesSourceDir)) {
122
- const count = copyDirectory(templatesSourceDir, templatesDir);
122
+ const count = copyDirectory(templatesSourceDir, templatesDir, overwrite);
123
123
  fileCount += count;
124
124
  }
125
125
 
@@ -130,14 +130,16 @@ async function performInstallation() {
130
130
  subagentFiles.forEach(file => {
131
131
  const src = path.join(subagentsSourceDir, file);
132
132
  const dest = path.join(subagentsDir, file);
133
- if (copyFile(src, dest)) {
133
+ if (copyFile(src, dest, overwrite)) {
134
134
  fileCount++;
135
135
  }
136
136
  });
137
137
  }
138
138
 
139
- // Success message and next steps
140
- showSuccessMessage(fileCount, reisDir, templatesDir, subagentsDir);
139
+ // Success message and next steps (only when called standalone)
140
+ if (!silent) {
141
+ showSuccessMessage(fileCount, reisDir, templatesDir, subagentsDir);
142
+ }
141
143
  }
142
144
 
143
145
  // Ensure directory exists
@@ -152,7 +154,7 @@ function ensureDir(dir) {
152
154
  }
153
155
 
154
156
  // Copy a single file
155
- function copyFile(src, dest) {
157
+ function copyFile(src, dest, overwrite = false) {
156
158
  try {
157
159
  // Check if source exists
158
160
  if (!fs.existsSync(src)) {
@@ -169,9 +171,8 @@ function copyFile(src, dest) {
169
171
  const destDir = path.dirname(dest);
170
172
  ensureDir(destDir);
171
173
 
172
- // Skip if file already exists (idempotent)
173
- if (fs.existsSync(dest)) {
174
- // Optionally update if source is newer, but for now just skip
174
+ // Skip if file already exists (unless overwrite is true)
175
+ if (fs.existsSync(dest) && !overwrite) {
175
176
  return false;
176
177
  }
177
178
 
@@ -186,7 +187,7 @@ function copyFile(src, dest) {
186
187
  }
187
188
 
188
189
  // Copy a directory recursively
189
- function copyDirectory(srcDir, destDir) {
190
+ function copyDirectory(srcDir, destDir, overwrite = false) {
190
191
  let count = 0;
191
192
 
192
193
  try {
@@ -208,10 +209,10 @@ function copyDirectory(srcDir, destDir) {
208
209
 
209
210
  if (entry.isDirectory()) {
210
211
  // Recursively copy subdirectory
211
- count += copyDirectory(srcPath, destPath);
212
+ count += copyDirectory(srcPath, destPath, overwrite);
212
213
  } else {
213
214
  // Copy file
214
- if (copyFile(srcPath, destPath)) {
215
+ if (copyFile(srcPath, destPath, overwrite)) {
215
216
  count++;
216
217
  }
217
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravirei/reis",
3
- "version": "1.1.9",
3
+ "version": "1.2.1",
4
4
  "description": "Roadmap Execution & Implementation System - Systematic development with parallel subagent execution for Atlassian Rovo Dev",
5
5
  "main": "lib/index.js",
6
6
  "bin": {