neex 0.7.43 → 0.7.44
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/add-commands.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,
|
|
1
|
+
{"version":3,"file":"add-commands.d.ts","sourceRoot":"","sources":["../../../src/commands/add-commands.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,iBA6EjF"}
|
|
@@ -17,11 +17,22 @@ async function addPlugin(pluginName, options = {}) {
|
|
|
17
17
|
if (!fs_1.default.existsSync(packageJsonPath)) {
|
|
18
18
|
throw new Error('package.json not found. Make sure you are in a valid project directory.');
|
|
19
19
|
}
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
// Detect package manager and install
|
|
21
|
+
let installCommand = `npm install ${pluginName}`;
|
|
22
|
+
// Check if bun.lock exists (prefer bun)
|
|
23
|
+
if (fs_1.default.existsSync(path_1.default.join(projectPath, 'bun.lock'))) {
|
|
24
|
+
installCommand = `bun add ${pluginName}`;
|
|
25
|
+
}
|
|
26
|
+
else if (fs_1.default.existsSync(path_1.default.join(projectPath, 'pnpm-lock.yaml'))) {
|
|
27
|
+
installCommand = `pnpm add ${pluginName}`;
|
|
28
|
+
}
|
|
29
|
+
else if (fs_1.default.existsSync(path_1.default.join(projectPath, 'yarn.lock'))) {
|
|
30
|
+
installCommand = `yarn add ${pluginName}`;
|
|
31
|
+
}
|
|
32
|
+
console.log(chalk_1.default.dim(`Running: ${installCommand}`));
|
|
33
|
+
(0, child_process_1.execSync)(installCommand, {
|
|
34
|
+
stdio: 'inherit',
|
|
35
|
+
cwd: projectPath
|
|
25
36
|
});
|
|
26
37
|
// Handle specific plugins
|
|
27
38
|
if (pluginName === 'neex-admin') {
|
|
@@ -65,7 +76,8 @@ async function addPlugin(pluginName, options = {}) {
|
|
|
65
76
|
}
|
|
66
77
|
// Try manual installation suggestion
|
|
67
78
|
console.log(chalk_1.default.yellow('💡 Try manual installation:'));
|
|
68
|
-
console.log(chalk_1.default.dim(`
|
|
79
|
+
console.log(chalk_1.default.dim(` bun add ${pluginName}`));
|
|
80
|
+
console.log(chalk_1.default.dim(` # or npm install ${pluginName}`));
|
|
69
81
|
process.exit(1);
|
|
70
82
|
}
|
|
71
83
|
}
|
package/package.json
CHANGED