musubi-sdd 2.0.2 ā 2.0.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.
- package/bin/musubi.js +55 -1
- package/package.json +1 -1
package/bin/musubi.js
CHANGED
|
@@ -10,10 +10,64 @@
|
|
|
10
10
|
* - musubi version - Show version information
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
const path = require('path');
|
|
14
|
+
const { spawnSync } = require('child_process');
|
|
15
|
+
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// Dependency Auto-Installation
|
|
18
|
+
// ============================================================================
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Check if a module is installed and install dependencies if needed
|
|
22
|
+
*/
|
|
23
|
+
function ensureDependencies() {
|
|
24
|
+
const packageDir = path.join(__dirname, '..');
|
|
25
|
+
|
|
26
|
+
// Check if node_modules exists and has required packages
|
|
27
|
+
const requiredModules = ['commander', 'chalk', 'fs-extra', 'inquirer'];
|
|
28
|
+
let needsInstall = false;
|
|
29
|
+
|
|
30
|
+
for (const mod of requiredModules) {
|
|
31
|
+
try {
|
|
32
|
+
require.resolve(mod, { paths: [packageDir] });
|
|
33
|
+
} catch {
|
|
34
|
+
needsInstall = true;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (needsInstall) {
|
|
40
|
+
console.log('\nš¦ Installing MUSUBI dependencies...\n');
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
// Run npm install in the package directory
|
|
44
|
+
const result = spawnSync('npm', ['install', '--omit=dev'], {
|
|
45
|
+
cwd: packageDir,
|
|
46
|
+
stdio: 'inherit',
|
|
47
|
+
shell: process.platform === 'win32',
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
if (result.status !== 0) {
|
|
51
|
+
console.error('\nā Failed to install dependencies.');
|
|
52
|
+
console.error('Please run manually: cd ' + packageDir + ' && npm install\n');
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
console.log('\nā
Dependencies installed successfully!\n');
|
|
57
|
+
} catch (err) {
|
|
58
|
+
console.error('\nā Failed to install dependencies:', err.message);
|
|
59
|
+
console.error('Please run manually: cd ' + packageDir + ' && npm install\n');
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Ensure dependencies are installed before requiring them
|
|
66
|
+
ensureDependencies();
|
|
67
|
+
|
|
13
68
|
const { Command } = require('commander');
|
|
14
69
|
const chalk = require('chalk');
|
|
15
70
|
const fs = require('fs-extra');
|
|
16
|
-
const path = require('path');
|
|
17
71
|
const {
|
|
18
72
|
detectAgentFromFlags,
|
|
19
73
|
getAgentDefinition,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "musubi-sdd",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Ultimate Specification Driven Development Tool with 25 Agents for 7 AI Coding Platforms + MCP Integration (Claude Code, GitHub Copilot, Cursor, Gemini CLI, Windsurf, Codex, Qwen Code)",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|