mango-cms 0.3.22 → 0.3.23

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/cli.js CHANGED
@@ -397,9 +397,15 @@ Then run it from your project root as usual:
397
397
  }
398
398
 
399
399
  // Ensure UI dependencies are installed before running Nuxt.
400
+ // Pass the project root so the postinstall (nuxt prepare) can resolve
401
+ // this project's mango/config instead of failing inside node_modules.
400
402
  if (!fs.existsSync(path.join(uiDir, 'node_modules'))) {
401
403
  console.log('Installing Mango UI dependencies...');
402
- execSync('npm install', { cwd: uiDir, stdio: 'inherit' });
404
+ execSync('npm install', {
405
+ cwd: uiDir,
406
+ stdio: 'inherit',
407
+ env: { ...process.env, MANGO_PROJECT_ROOT: userProjectRoot, MANGO_UI_PORT: String(uiPort) }
408
+ });
403
409
  }
404
410
 
405
411
  // Map mango actions to Nuxt commands. `start` serves a production build.
@@ -804,7 +810,11 @@ async function manageUiPM2Process(settings, mangoCmsRoot, userProjectRoot) {
804
810
  // Install deps + build the Nuxt app (reads this project's mango/config).
805
811
  if (!fs.existsSync(path.join(uiDir, 'node_modules'))) {
806
812
  console.log('Installing Mango UI dependencies...');
807
- execSync('npm install', { cwd: uiDir, stdio: 'inherit' });
813
+ execSync('npm install', {
814
+ cwd: uiDir,
815
+ stdio: 'inherit',
816
+ env: { ...process.env, MANGO_PROJECT_ROOT: userProjectRoot, MANGO_UI_PORT: String(uiPort) }
817
+ });
808
818
  }
809
819
  console.log(`Building Mango UI (${ejected ? 'ejected' : 'bundled'})...`);
810
820
  execSync('npx nuxt build', {
@@ -24,7 +24,7 @@
24
24
  "dayjs": "^1.10.7",
25
25
  "express": "^4.18.1",
26
26
  "google-maps": "^4.3.3",
27
- "mango-cms": "^0.3.22",
27
+ "mango-cms": "^0.3.23",
28
28
  "mapbox-gl": "^2.7.0",
29
29
  "vite": "^6.2.2",
30
30
  "vue": "^3.2.37",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mango-cms",
3
- "version": "0.3.22",
3
+ "version": "0.3.23",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "exports": {