claude-flow 1.0.5 → 1.0.6
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/claude-flow +13 -25
- package/package.json +1 -1
package/bin/claude-flow
CHANGED
|
@@ -1,28 +1,16 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
PROJECT_ROOT="$( cd "$SCRIPT_DIR/.." && pwd )"
|
|
6
|
+
// First try to use the Node.js version
|
|
7
|
+
const nodeCliPath = path.join(__dirname, 'claude-flow-node.js');
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export DENO_NO_DEPRECATION_WARNINGS=1
|
|
19
|
-
|
|
20
|
-
# Check if first argument is "swarm"
|
|
21
|
-
if [ "$1" = "swarm" ]; then
|
|
22
|
-
# Use the swarm demo script
|
|
23
|
-
shift # Remove "swarm" from arguments
|
|
24
|
-
exec deno run --allow-all --quiet "$PROJECT_ROOT/swarm-demo.ts" "$@"
|
|
25
|
-
else
|
|
26
|
-
# For all other commands, use the simple CLI which doesn't have import issues
|
|
27
|
-
exec deno run --allow-all --quiet "$PROJECT_ROOT/src/cli/simple-cli.ts" "$@"
|
|
28
|
-
fi
|
|
9
|
+
// Execute the Node.js CLI directly
|
|
10
|
+
try {
|
|
11
|
+
require(nodeCliPath);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
// If Node.js version fails, log the error
|
|
14
|
+
console.error('Failed to execute Node.js CLI:', error.message);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|