create-prisma-php-app 1.18.500 → 1.18.502

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.
@@ -384,7 +384,8 @@ function setupErrorHandling(&$content)
384
384
  ob_start();
385
385
  require_once SETTINGS_PATH . '/public-functions.php';
386
386
  require_once SETTINGS_PATH . '/request-methods.php';
387
- $_metadataArray = require_once APP_PATH . '/metadata.php';
387
+ $metadataFile = APP_PATH . '/metadata.php';
388
+ $_metadataArray = file_exists($metadataFile) ? require_once $metadataFile : [];
388
389
  $_filesListRoutes = [];
389
390
  $metadata = "";
390
391
  $uri = "";
@@ -556,13 +557,13 @@ try {
556
557
  $_layoutsToInclude = $_determineContentToInclude['layouts'] ?? [];
557
558
  $uri = $_determineContentToInclude['uri'] ?? '';
558
559
  $pathname = $uri ? "/" . $uri : "/";
559
- $metadata = $_metadataArray[$uri] ?? $_metadataArray['default'];
560
560
  if (!empty($_contentToInclude) && basename($_contentToInclude) === 'route.php') {
561
561
  header('Content-Type: application/json');
562
562
  require_once $_contentToInclude;
563
563
  exit;
564
564
  }
565
565
 
566
+ $metadata = $_metadataArray[$uri] ?? ($_metadataArray['default'] ?? null);
566
567
  $_parentLayoutPath = APP_PATH . '/layout.php';
567
568
  $_isParentLayout = !empty($_layoutsToInclude) && strpos($_layoutsToInclude[0], 'src/app/layout.php') !== false;
568
569
 
package/dist/index.js CHANGED
@@ -483,7 +483,7 @@ async function getAnswer(predefinedAnswers = {}) {
483
483
  inactive: "No",
484
484
  });
485
485
  }
486
- if (!predefinedAnswers.tailwindcss && !predefinedAnswers.backendOnly) {
486
+ if (!predefinedAnswers.backendOnly && !predefinedAnswers.tailwindcss) {
487
487
  questionsArray.push({
488
488
  type: "toggle",
489
489
  name: "tailwindcss",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.18.500",
3
+ "version": "1.18.502",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",