neex 0.7.43 → 0.7.45

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,iBAgEjF"}
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
- // Install the plugin with better error handling
21
- (0, child_process_1.execSync)(`npm install ${pluginName}`, {
22
- stdio: 'pipe',
23
- cwd: projectPath,
24
- encoding: 'utf8'
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(` npm install ${pluginName}`));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neex",
3
- "version": "0.7.43",
3
+ "version": "0.7.45",
4
4
  "description": "Neex - Modern Fullstack Framework Built on Express and Next.js. Fast to Start, Easy to Build, Ready to Deploy",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",