multi-agents-cli 1.0.89 → 1.0.91
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/init.js +8 -0
- package/package.json +1 -1
package/init.js
CHANGED
|
@@ -89,6 +89,14 @@ if (isGlobalCLI) {
|
|
|
89
89
|
|
|
90
90
|
if (fs.existsSync(targetDir)) {
|
|
91
91
|
process.chdir(targetDir);
|
|
92
|
+
// Plant temp package.json if missing — allows npm run init to work as re-entry point
|
|
93
|
+
if (!fs.existsSync(path.join(targetDir, 'package.json'))) {
|
|
94
|
+
fs.writeFileSync(
|
|
95
|
+
path.join(targetDir, 'package.json'),
|
|
96
|
+
JSON.stringify({ name: path.basename(targetDir), version: '1.0.0', scripts: { init: 'multi-agents init' } }, null, 2),
|
|
97
|
+
'utf8'
|
|
98
|
+
);
|
|
99
|
+
}
|
|
92
100
|
} else {
|
|
93
101
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
94
102
|
process.chdir(targetDir);
|
package/package.json
CHANGED