mango-cms 0.2.19 → 0.2.20

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
@@ -564,17 +564,26 @@ async function managePM2Process(settings) {
564
564
  try {
565
565
  // Check if process exists
566
566
  const processListOutput = execSync('pm2 list', { encoding: 'utf8' });
567
- const processExists = processListOutput.includes(processName);
567
+ let processExists = processListOutput.includes(processName);
568
568
 
569
569
  if (processExists) {
570
570
  console.log(`Reloading PM2 process: ${processName}`);
571
571
  execSync(`pm2 reload ${processName}`);
572
- execSync(`pm2 reload ${name}`);
573
572
  } else {
574
573
  console.log(`Starting new PM2 process: ${processName}`);
575
574
  execSync(`pm2 start index.js --name ${processName}`, { cwd: './build' });
575
+ }
576
+
577
+ processExists = processListOutput.includes(name);
578
+
579
+ if (processExists) {
580
+ console.log(`Reloading PM2 process: ${name}`);
581
+ execSync(`pm2 reload ${name}`);
582
+ } else {
583
+ console.log(`Starting new PM2 process: ${name}`);
576
584
  execSync(`pm2 start index.js --name ${name}`, { cwd: './dist' });
577
585
  }
586
+
578
587
  } catch (error) {
579
588
  console.error('Error managing PM2 process:', error.message);
580
589
  throw error;
@@ -25,7 +25,7 @@
25
25
  "dayjs": "^1.10.7",
26
26
  "express": "^4.18.1",
27
27
  "google-maps": "^4.3.3",
28
- "mango-cms": "^0.2.19",
28
+ "mango-cms": "^0.2.20",
29
29
  "mapbox-gl": "^2.7.0",
30
30
  "sweetalert2": "^11.4.0",
31
31
  "vite": "^6.2.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mango-cms",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "main": "./index.js",
5
5
  "exports": {
6
6
  ".": "./index.js",