create-prisma-php-app 1.20.520 → 1.20.521

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/dist/.htaccess CHANGED
@@ -15,7 +15,7 @@ RewriteEngine On
15
15
  </IfModule>
16
16
 
17
17
  # Exclude static files from being redirected
18
- RewriteCond %{REQUEST_URI} !\.(css|js|png|jpg|jpeg|gif|svg|webp|woff|woff2|ttf|eot|ico|pdf)$ [NC]
18
+ RewriteCond %{REQUEST_URI} !\.(css|js|png|jpe?g|gif|svg|webp|woff2?|ttf|eot|ico|pdf|mp4|webm|mp3|ogg)$ [NC]
19
19
  RewriteCond %{REQUEST_URI} !^/bootstrap.php
20
20
  RewriteRule ^(.*)$ bootstrap.php [QSA,L]
21
21
 
@@ -658,6 +658,8 @@ try {
658
658
  $pathname = $uri ? "/" . $uri : "/";
659
659
  $_fileToInclude = basename($_contentToInclude);
660
660
 
661
+ authenticateUserToken();
662
+
661
663
  if (empty($_contentToInclude)) {
662
664
  if (!$isXFilRequest) {
663
665
  // Set the header and output a JSON response for permission denied
@@ -687,7 +689,7 @@ try {
687
689
  header('Content-Type: application/json');
688
690
  echo json_encode([
689
691
  'success' => false,
690
- 'error' => 'File not found'
692
+ 'error' => 'Not found'
691
693
  ]);
692
694
  http_response_code(404); // Set HTTP status code to 404 Not Found
693
695
  }
package/dist/index.js CHANGED
@@ -355,10 +355,12 @@ function modifyLayoutPHP(baseDir, answer) {
355
355
  : ` <script src="https://cdn.tailwindcss.com"></script> ${stylesAndLinks}`;
356
356
  }
357
357
  // Insert before the closing </head> tag
358
+ const breakLine = tailwindLink.length > 0 ? "\n" : "";
358
359
  indexContent = indexContent.replace(
359
360
  "</head>",
360
- `${tailwindLink}\n <!-- Dynamic Head -->
361
- <?php echo implode("\\n", $mainLayoutHead); ?></head>`
361
+ `${tailwindLink}${breakLine} <!-- Dynamic Head -->
362
+ <?php echo implode("\\n", $mainLayoutHead); ?>
363
+ </head>`
362
364
  );
363
365
  fs.writeFileSync(layoutPath, indexContent, { flag: "w" });
364
366
  console.log(