claude-flow-novice 2.3.4 → 2.3.5

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.
@@ -2,41 +2,17 @@
2
2
 
3
3
  /**
4
4
  * Post-installation script for claude-flow-novice
5
- * Copies .claude directory from node_modules to project root
6
- * Preserves existing custom files unless CLAUDE_FORCE_UPDATE=true
5
+ * Copies .claude directory from package to project root
6
+ * Overwrites existing files to ensure updates work correctly
7
7
  */
8
8
 
9
- import { existsSync, mkdirSync, cpSync, readdirSync, statSync, copyFileSync } from 'fs';
10
- import { dirname, join, relative } from 'path';
9
+ import { existsSync, cpSync } from 'fs';
10
+ import { dirname, join } from 'path';
11
11
  import { fileURLToPath } from 'url';
12
12
 
13
13
  const __filename = fileURLToPath(import.meta.url);
14
14
  const __dirname = dirname(__filename);
15
15
 
16
- /**
17
- * Simple recursive copy - overwrites existing files
18
- */
19
- function simpleCopy(source, target) {
20
- if (!existsSync(source)) return;
21
-
22
- const stat = statSync(source);
23
-
24
- if (stat.isDirectory()) {
25
- // Create directory if it doesn't exist
26
- if (!existsSync(target)) {
27
- mkdirSync(target, { recursive: true });
28
- }
29
-
30
- // Copy contents
31
- const entries = readdirSync(source);
32
- for (const entry of entries) {
33
- simpleCopy(join(source, entry), join(target, entry));
34
- }
35
- } else {
36
- // File - always overwrite
37
- copyFileSync(source, target);
38
- }
39
- }
40
16
 
41
17
  /**
42
18
  * Copy .claude directory from node_modules to project root
@@ -65,8 +41,8 @@ function copyClaudeDirectory() {
65
41
  process.exit(1);
66
42
  }
67
43
 
68
- // Simple copy - always overwrite
69
- simpleCopy(sourceDir, targetDir);
44
+ // Copy entire directory, overwriting existing files
45
+ cpSync(sourceDir, targetDir, { recursive: true, force: true });
70
46
 
71
47
  console.log('✅ Successfully installed .claude directory');
72
48
  console.log('📁 Location:', targetDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow-novice",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
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",
@@ -2,41 +2,17 @@
2
2
 
3
3
  /**
4
4
  * Post-installation script for claude-flow-novice
5
- * Copies .claude directory from node_modules to project root
6
- * Preserves existing custom files unless CLAUDE_FORCE_UPDATE=true
5
+ * Copies .claude directory from package to project root
6
+ * Overwrites existing files to ensure updates work correctly
7
7
  */
8
8
 
9
- import { existsSync, mkdirSync, cpSync, readdirSync, statSync, copyFileSync } from 'fs';
10
- import { dirname, join, relative } from 'path';
9
+ import { existsSync, cpSync } from 'fs';
10
+ import { dirname, join } from 'path';
11
11
  import { fileURLToPath } from 'url';
12
12
 
13
13
  const __filename = fileURLToPath(import.meta.url);
14
14
  const __dirname = dirname(__filename);
15
15
 
16
- /**
17
- * Simple recursive copy - overwrites existing files
18
- */
19
- function simpleCopy(source, target) {
20
- if (!existsSync(source)) return;
21
-
22
- const stat = statSync(source);
23
-
24
- if (stat.isDirectory()) {
25
- // Create directory if it doesn't exist
26
- if (!existsSync(target)) {
27
- mkdirSync(target, { recursive: true });
28
- }
29
-
30
- // Copy contents
31
- const entries = readdirSync(source);
32
- for (const entry of entries) {
33
- simpleCopy(join(source, entry), join(target, entry));
34
- }
35
- } else {
36
- // File - always overwrite
37
- copyFileSync(source, target);
38
- }
39
- }
40
16
 
41
17
  /**
42
18
  * Copy .claude directory from node_modules to project root
@@ -65,8 +41,8 @@ function copyClaudeDirectory() {
65
41
  process.exit(1);
66
42
  }
67
43
 
68
- // Simple copy - always overwrite
69
- simpleCopy(sourceDir, targetDir);
44
+ // Copy entire directory, overwriting existing files
45
+ cpSync(sourceDir, targetDir, { recursive: true, force: true });
70
46
 
71
47
  console.log('✅ Successfully installed .claude directory');
72
48
  console.log('📁 Location:', targetDir);