mango-cms 0.2.21 → 0.2.22

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,7 +397,7 @@ function generateNginxConfig(settings, buildPath) {
397
397
 
398
398
  server {
399
399
  server_name ${settings.siteDomain};
400
- root ${buildPath};
400
+ root ${buildPath.replace('/build', '/dist')};
401
401
  index index.html;
402
402
 
403
403
  # Serve static files directly
@@ -466,7 +466,7 @@ function generateApacheConfig(settings, buildPath) {
466
466
 
467
467
  <VirtualHost *:80>
468
468
  ServerName ${settings.siteDomain}
469
- DocumentRoot ${buildPath}
469
+ DocumentRoot ${buildPath.replace('/build', '/dist')}
470
470
  IndexIndex index.html
471
471
 
472
472
  # Serve static files directly
@@ -511,8 +511,8 @@ async function configureWebServer(settings, buildPath) {
511
511
  generateApacheConfig(settings, buildPath);
512
512
 
513
513
  const configPath = webServer === 'nginx' ?
514
- `/etc/nginx/sites-available/${settings.siteName.toLowerCase()}` :
515
- `/etc/apache2/sites-available/${settings.siteName.toLowerCase()}.conf`;
514
+ `/etc/nginx/sites-available/${settings.database.toLowerCase()}` :
515
+ `/etc/apache2/sites-available/${settings.database.toLowerCase()}.conf`;
516
516
 
517
517
  try {
518
518
  // Check if config already exists
@@ -525,7 +525,7 @@ async function configureWebServer(settings, buildPath) {
525
525
 
526
526
  if (webServer === 'nginx') {
527
527
  // Create symlink if it doesn't exist
528
- const enabledPath = `/etc/nginx/sites-enabled/${settings.siteName.toLowerCase()}`;
528
+ const enabledPath = `/etc/nginx/sites-enabled/${settings.database.toLowerCase()}`;
529
529
  if (!fs.existsSync(enabledPath)) {
530
530
  execSync(`sudo ln -s ${configPath} ${enabledPath}`);
531
531
  }
@@ -533,7 +533,7 @@ async function configureWebServer(settings, buildPath) {
533
533
  execSync('sudo systemctl reload nginx');
534
534
  } else {
535
535
  // Enable apache site
536
- execSync(`sudo a2ensite ${settings.siteName.toLowerCase()}`);
536
+ execSync(`sudo a2ensite ${settings.database.toLowerCase()}`);
537
537
  execSync('sudo systemctl reload apache2');
538
538
  }
539
539
  console.log(`${webServer} configuration has been updated and service reloaded`);
@@ -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.21",
28
+ "mango-cms": "^0.2.22",
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.21",
3
+ "version": "0.2.22",
4
4
  "main": "./index.js",
5
5
  "exports": {
6
6
  ".": "./index.js",