create-prisma-php-app 1.20.500 → 1.20.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.
package/dist/index.js CHANGED
@@ -293,7 +293,7 @@ function copyRecursiveSync(src, dest, answer) {
293
293
  }
294
294
  if (
295
295
  answer.backendOnly &&
296
- !nonBackendFiles.some((file) => dest.includes(file))
296
+ nonBackendFiles.some((file) => dest.includes(file))
297
297
  ) {
298
298
  return;
299
299
  }
@@ -429,6 +429,12 @@ async function createDirectoryStructure(baseDir, answer) {
429
429
  destDir: "/src",
430
430
  },
431
431
  ];
432
+ if (answer.backendOnly && answer.swaggerDocs) {
433
+ directoriesToCopy.push({
434
+ srcDir: "/../swagger-docs-layout.php",
435
+ destDir: "/src/app/layout.php",
436
+ });
437
+ }
432
438
  if (answer.prisma) {
433
439
  directoriesToCopy.push({
434
440
  srcDir: "/prisma",
@@ -921,12 +927,14 @@ async function main() {
921
927
  "@types/node",
922
928
  "ts-node",
923
929
  "http-proxy-middleware@^3.0.0",
924
- "npm-run-all",
925
930
  "chalk",
926
931
  ];
927
932
  if (answer.swaggerDocs) {
928
933
  dependencies.push("swagger-jsdoc");
929
934
  }
935
+ if (!answer.backendOnly && !answer.swaggerDocs) {
936
+ dependencies.push("npm-run-all");
937
+ }
930
938
  if (answer.tailwindcss) {
931
939
  dependencies.push(
932
940
  "tailwindcss",
@@ -1,15 +1,3 @@
1
- <?php
2
-
3
- use Lib\Auth\Auth;
4
-
5
- $auth = Auth::getInstance();
6
-
7
- // if (!$auth->isAuthenticated()) {
8
- // redirect('/');
9
- // }
10
-
11
- ?>
12
-
13
1
  <div id="swagger-ui"></div>
14
2
  <script src="<?= $baseUrl ?>swagger-docs/dist/swagger-ui-bundle.js" charset="UTF-8"> </script>
15
3
  <script src="<?= $baseUrl ?>swagger-docs/dist/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.20.500",
3
+ "version": "1.20.502",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",