create-prisma-php-app 1.22.1 → 1.22.3

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.
@@ -515,6 +515,7 @@ function getLoadingsFiles()
515
515
  $haveLoadingFileContent = array_reduce($loadingFiles, function ($carry, $route) use ($uri, $pathname, $dynamicRouteParams, $params, $referer) {
516
516
  $normalizeUri = str_replace('\\', '/', $route);
517
517
  $fileUrl = str_replace('./src/app', '', $normalizeUri);
518
+ $route = str_replace(['\\', './'], ['/', ''], $route);
518
519
 
519
520
  ob_start();
520
521
  include($route); // This will execute the PHP code in loading.php
@@ -685,7 +686,6 @@ $mainLayoutFooter = [];
685
686
 
686
687
  try {
687
688
  $_determineContentToInclude = determineContentToInclude();
688
- checkForDuplicateRoutes();
689
689
  $_contentToInclude = $_determineContentToInclude['path'] ?? '';
690
690
  $_layoutsToInclude = $_determineContentToInclude['layouts'] ?? [];
691
691
  $uri = $_determineContentToInclude['uri'] ?? '';
@@ -694,6 +694,9 @@ try {
694
694
  if (is_file($_contentToInclude)) {
695
695
  $_fileToInclude = basename($_contentToInclude); // returns the file name
696
696
  }
697
+ $metadata = $_metadataArray[$uri] ?? ($_metadataArray['default'] ?? []);
698
+
699
+ checkForDuplicateRoutes();
697
700
  authenticateUserToken();
698
701
 
699
702
  if (empty($_contentToInclude)) {
@@ -741,7 +744,6 @@ try {
741
744
  exit;
742
745
  }
743
746
 
744
- $metadata = $_metadataArray[$uri] ?? ($_metadataArray['default'] ?? []);
745
747
  $_parentLayoutPath = APP_PATH . '/layout.php';
746
748
  $_isParentLayout = !empty($_layoutsToInclude) && strpos($_layoutsToInclude[0], 'src/app/layout.php') !== false;
747
749
 
@@ -1,4 +1,3 @@
1
- version: "3.8"
2
1
  services:
3
2
  web:
4
3
  build:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.22.1",
3
+ "version": "1.22.3",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",