claude-flow-novice 2.3.3 → 2.3.4

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.
@@ -13,16 +13,10 @@ import { fileURLToPath } from 'url';
13
13
  const __filename = fileURLToPath(import.meta.url);
14
14
  const __dirname = dirname(__filename);
15
15
 
16
- const stats = {
17
- copied: [],
18
- skipped: [],
19
- updated: []
20
- };
21
-
22
16
  /**
23
- * Recursively copy files, skipping existing ones unless forced
17
+ * Simple recursive copy - overwrites existing files
24
18
  */
25
- function smartCopy(source, target, forceUpdate = false, verbose = false) {
19
+ function simpleCopy(source, target) {
26
20
  if (!existsSync(source)) return;
27
21
 
28
22
  const stat = statSync(source);
@@ -36,34 +30,11 @@ function smartCopy(source, target, forceUpdate = false, verbose = false) {
36
30
  // Copy contents
37
31
  const entries = readdirSync(source);
38
32
  for (const entry of entries) {
39
- smartCopy(join(source, entry), join(target, entry), forceUpdate, verbose);
33
+ simpleCopy(join(source, entry), join(target, entry));
40
34
  }
41
35
  } else {
42
- // File - check if it exists
43
- const targetExists = existsSync(target);
44
- const relativePath = relative(process.cwd(), target);
45
-
46
- if (!targetExists) {
47
- // New file - always copy
48
- copyFileSync(source, target);
49
- stats.copied.push(relativePath);
50
- if (verbose) {
51
- console.log(` āœ… ${relativePath}`);
52
- }
53
- } else if (forceUpdate) {
54
- // Existing file + force update - overwrite
55
- copyFileSync(source, target);
56
- stats.updated.push(relativePath);
57
- if (verbose) {
58
- console.log(` šŸ”„ ${relativePath}`);
59
- }
60
- } else {
61
- // Existing file - skip to preserve custom changes
62
- stats.skipped.push(relativePath);
63
- if (verbose) {
64
- console.log(` ā­ļø ${relativePath}`);
65
- }
66
- }
36
+ // File - always overwrite
37
+ copyFileSync(source, target);
67
38
  }
68
39
  }
69
40
 
@@ -83,19 +54,9 @@ function copyClaudeDirectory() {
83
54
 
84
55
  const sourceDir = possibleSources.find(dir => existsSync(dir));
85
56
  const targetDir = join(projectRoot, '.claude');
86
- const forceUpdate = process.env.CLAUDE_FORCE_UPDATE === 'true';
87
- const verbose = process.env.CLAUDE_VERBOSE === 'true' || process.env.npm_config_loglevel === 'verbose';
88
57
 
89
58
  console.log('šŸš€ claude-flow-novice post-install: Setting up .claude directory...');
90
59
 
91
- if (forceUpdate) {
92
- console.log('āš ļø CLAUDE_FORCE_UPDATE=true - will overwrite existing files');
93
- }
94
-
95
- if (verbose) {
96
- console.log('šŸ“¢ Verbose mode enabled - showing all file operations\n');
97
- }
98
-
99
60
  // Check if source directory was found
100
61
  if (!sourceDir) {
101
62
  console.error('āŒ Source .claude directory not found. Tried:');
@@ -104,55 +65,13 @@ function copyClaudeDirectory() {
104
65
  process.exit(1);
105
66
  }
106
67
 
107
- // Create target directory if it doesn't exist
108
- const isNewInstall = !existsSync(targetDir);
109
- if (isNewInstall) {
110
- mkdirSync(targetDir, { recursive: true });
111
- console.log('āœ… Created .claude directory in project root');
112
- }
113
-
114
- // Smart copy - preserve existing files
115
- smartCopy(sourceDir, targetDir, forceUpdate, verbose);
68
+ // Simple copy - always overwrite
69
+ simpleCopy(sourceDir, targetDir);
116
70
 
117
- console.log('āœ… Successfully synced .claude directory');
71
+ console.log('āœ… Successfully installed .claude directory');
118
72
  console.log('šŸ“ Location:', targetDir);
119
73
 
120
- // Report statistics
121
- console.log('\nšŸ“Š Installation Summary:');
122
- console.log(` āœ… New files copied: ${stats.copied.length}`);
123
- console.log(` ā­ļø Existing files preserved: ${stats.skipped.length}`);
124
- if (stats.updated.length > 0) {
125
- console.log(` šŸ”„ Files updated (forced): ${stats.updated.length}`);
126
- }
127
-
128
- if (stats.skipped.length > 0 && !isNewInstall) {
129
- console.log('\nšŸ’” Tip: Your custom agents and configurations were preserved.');
130
- console.log(' To force update all files: CLAUDE_FORCE_UPDATE=true npx claude-flow-novice@latest');
131
- console.log(' To see all file operations: CLAUDE_VERBOSE=true npx claude-flow-novice@latest');
132
- }
133
-
134
- // Verify key components
135
- const agentsDir = join(targetDir, 'agents');
136
- const commandsDir = join(targetDir, 'commands');
137
- const coreDir = join(targetDir, 'core');
138
-
139
- if (existsSync(agentsDir)) {
140
- const agentFiles = readdirSync(agentsDir).length;
141
- console.log(`\nšŸ“‹ Total agents available: ${agentFiles}`);
142
- }
143
-
144
- if (existsSync(commandsDir)) {
145
- const commandFiles = readdirSync(commandsDir).length;
146
- console.log(`⚔ Total commands available: ${commandFiles}`);
147
- }
148
-
149
- if (existsSync(coreDir)) {
150
- const coreFiles = readdirSync(coreDir).length;
151
- console.log(`šŸ”§ Total core files: ${coreFiles}`);
152
- }
153
-
154
- console.log('\nšŸŽ‰ Installation complete! claude-flow-novice is ready to use.');
155
- console.log('šŸŽÆ Run: npx claude-flow-novice --help');
74
+ console.log('šŸŽ‰ Installation complete! claude-flow-novice is ready to use.');
156
75
 
157
76
  } catch (error) {
158
77
  console.error('āŒ Post-install script failed:', error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow-novice",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "description": "Simplified Claude Flow for beginners - AI agent orchestration made easy",
5
5
  "type": "module",
6
6
  "mcpName": "io.github.ruvnet/claude-flow",
@@ -13,16 +13,10 @@ import { fileURLToPath } from 'url';
13
13
  const __filename = fileURLToPath(import.meta.url);
14
14
  const __dirname = dirname(__filename);
15
15
 
16
- const stats = {
17
- copied: [],
18
- skipped: [],
19
- updated: []
20
- };
21
-
22
16
  /**
23
- * Recursively copy files, skipping existing ones unless forced
17
+ * Simple recursive copy - overwrites existing files
24
18
  */
25
- function smartCopy(source, target, forceUpdate = false, verbose = false) {
19
+ function simpleCopy(source, target) {
26
20
  if (!existsSync(source)) return;
27
21
 
28
22
  const stat = statSync(source);
@@ -36,34 +30,11 @@ function smartCopy(source, target, forceUpdate = false, verbose = false) {
36
30
  // Copy contents
37
31
  const entries = readdirSync(source);
38
32
  for (const entry of entries) {
39
- smartCopy(join(source, entry), join(target, entry), forceUpdate, verbose);
33
+ simpleCopy(join(source, entry), join(target, entry));
40
34
  }
41
35
  } else {
42
- // File - check if it exists
43
- const targetExists = existsSync(target);
44
- const relativePath = relative(process.cwd(), target);
45
-
46
- if (!targetExists) {
47
- // New file - always copy
48
- copyFileSync(source, target);
49
- stats.copied.push(relativePath);
50
- if (verbose) {
51
- console.log(` āœ… ${relativePath}`);
52
- }
53
- } else if (forceUpdate) {
54
- // Existing file + force update - overwrite
55
- copyFileSync(source, target);
56
- stats.updated.push(relativePath);
57
- if (verbose) {
58
- console.log(` šŸ”„ ${relativePath}`);
59
- }
60
- } else {
61
- // Existing file - skip to preserve custom changes
62
- stats.skipped.push(relativePath);
63
- if (verbose) {
64
- console.log(` ā­ļø ${relativePath}`);
65
- }
66
- }
36
+ // File - always overwrite
37
+ copyFileSync(source, target);
67
38
  }
68
39
  }
69
40
 
@@ -83,19 +54,9 @@ function copyClaudeDirectory() {
83
54
 
84
55
  const sourceDir = possibleSources.find(dir => existsSync(dir));
85
56
  const targetDir = join(projectRoot, '.claude');
86
- const forceUpdate = process.env.CLAUDE_FORCE_UPDATE === 'true';
87
- const verbose = process.env.CLAUDE_VERBOSE === 'true' || process.env.npm_config_loglevel === 'verbose';
88
57
 
89
58
  console.log('šŸš€ claude-flow-novice post-install: Setting up .claude directory...');
90
59
 
91
- if (forceUpdate) {
92
- console.log('āš ļø CLAUDE_FORCE_UPDATE=true - will overwrite existing files');
93
- }
94
-
95
- if (verbose) {
96
- console.log('šŸ“¢ Verbose mode enabled - showing all file operations\n');
97
- }
98
-
99
60
  // Check if source directory was found
100
61
  if (!sourceDir) {
101
62
  console.error('āŒ Source .claude directory not found. Tried:');
@@ -104,55 +65,13 @@ function copyClaudeDirectory() {
104
65
  process.exit(1);
105
66
  }
106
67
 
107
- // Create target directory if it doesn't exist
108
- const isNewInstall = !existsSync(targetDir);
109
- if (isNewInstall) {
110
- mkdirSync(targetDir, { recursive: true });
111
- console.log('āœ… Created .claude directory in project root');
112
- }
113
-
114
- // Smart copy - preserve existing files
115
- smartCopy(sourceDir, targetDir, forceUpdate, verbose);
68
+ // Simple copy - always overwrite
69
+ simpleCopy(sourceDir, targetDir);
116
70
 
117
- console.log('āœ… Successfully synced .claude directory');
71
+ console.log('āœ… Successfully installed .claude directory');
118
72
  console.log('šŸ“ Location:', targetDir);
119
73
 
120
- // Report statistics
121
- console.log('\nšŸ“Š Installation Summary:');
122
- console.log(` āœ… New files copied: ${stats.copied.length}`);
123
- console.log(` ā­ļø Existing files preserved: ${stats.skipped.length}`);
124
- if (stats.updated.length > 0) {
125
- console.log(` šŸ”„ Files updated (forced): ${stats.updated.length}`);
126
- }
127
-
128
- if (stats.skipped.length > 0 && !isNewInstall) {
129
- console.log('\nšŸ’” Tip: Your custom agents and configurations were preserved.');
130
- console.log(' To force update all files: CLAUDE_FORCE_UPDATE=true npx claude-flow-novice@latest');
131
- console.log(' To see all file operations: CLAUDE_VERBOSE=true npx claude-flow-novice@latest');
132
- }
133
-
134
- // Verify key components
135
- const agentsDir = join(targetDir, 'agents');
136
- const commandsDir = join(targetDir, 'commands');
137
- const coreDir = join(targetDir, 'core');
138
-
139
- if (existsSync(agentsDir)) {
140
- const agentFiles = readdirSync(agentsDir).length;
141
- console.log(`\nšŸ“‹ Total agents available: ${agentFiles}`);
142
- }
143
-
144
- if (existsSync(commandsDir)) {
145
- const commandFiles = readdirSync(commandsDir).length;
146
- console.log(`⚔ Total commands available: ${commandFiles}`);
147
- }
148
-
149
- if (existsSync(coreDir)) {
150
- const coreFiles = readdirSync(coreDir).length;
151
- console.log(`šŸ”§ Total core files: ${coreFiles}`);
152
- }
153
-
154
- console.log('\nšŸŽ‰ Installation complete! claude-flow-novice is ready to use.');
155
- console.log('šŸŽÆ Run: npx claude-flow-novice --help');
74
+ console.log('šŸŽ‰ Installation complete! claude-flow-novice is ready to use.');
156
75
 
157
76
  } catch (error) {
158
77
  console.error('āŒ Post-install script failed:', error.message);