create-prisma-php-app 1.20.522 → 1.20.524

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.
@@ -661,7 +661,7 @@ try {
661
661
  authenticateUserToken();
662
662
 
663
663
  if (empty($_contentToInclude)) {
664
- if (!$isXFilRequest) {
664
+ if (!$isXFilRequest && $_prismaPHPSettings['backendOnly']) {
665
665
  // Set the header and output a JSON response for permission denied
666
666
  header('Content-Type: application/json');
667
667
  echo json_encode([
@@ -684,7 +684,8 @@ try {
684
684
  header('Content-Type: ' . mime_content_type($filePath)); // Dynamic content type
685
685
  readfile($filePath);
686
686
  }
687
- } else {
687
+ exit;
688
+ } else if ($_prismaPHPSettings['backendOnly']) {
688
689
  // Set the header and output a JSON response for file not found
689
690
  header('Content-Type: application/json');
690
691
  echo json_encode([
@@ -692,8 +693,8 @@ try {
692
693
  'error' => 'Not found'
693
694
  ]);
694
695
  http_response_code(404); // Set HTTP status code to 404 Not Found
696
+ exit;
695
697
  }
696
- exit;
697
698
  }
698
699
 
699
700
  if (!empty($_contentToInclude) && basename($_contentToInclude) === 'route.php') {
package/dist/index.js CHANGED
@@ -90,6 +90,7 @@ module.exports = {
90
90
  notify: false,
91
91
  open: false,
92
92
  ghostMode: false,
93
+ codeSync: true, // Disable synchronization of code changes across clients
93
94
  };`;
94
95
  // Determine the path and write the bs-config.js
95
96
  const bsConfigPath = path.join(baseDir, "settings", "bs-config.cjs");
@@ -241,11 +242,7 @@ function copyRecursiveSync(src, dest, answer) {
241
242
  (answer.backendOnly && destLower.includes("src\\app\\css"))
242
243
  )
243
244
  return;
244
- if (
245
- answer.backendOnly &&
246
- !answer.swaggerDocs &&
247
- destLower.includes("src\\app\\swagger-docs")
248
- )
245
+ if (!answer.swaggerDocs && destLower.includes("src\\app\\swagger-docs"))
249
246
  return;
250
247
  const destModified = dest.replace(/\\/g, "/");
251
248
  if (
@@ -1,30 +1,30 @@
1
1
  <?php
2
2
 
3
3
  /**
4
- * @var string SETTINGS_PATH - The absolute path to the settings directory
4
+ * @var string SETTINGS_PATH - The absolute path to the settings directory ./settings
5
5
  */
6
6
  define("SETTINGS_PATH", dirname(__FILE__));
7
7
  /**
8
- * @var string PUBLIC_PATH - The absolute path to the public directory
8
+ * @var string PUBLIC_PATH - The absolute path to the public directory ./public
9
9
  */
10
10
  define("PUBLIC_PATH", dirname(SETTINGS_PATH) . "/public");
11
11
  /**
12
- * @var string PRISMA_LIB_PATH - The absolute path to the Prisma library directory
12
+ * @var string PRISMA_LIB_PATH - The absolute path to the Prisma library directory ./src/Lib/Prisma
13
13
  */
14
14
  define("PRISMA_LIB_PATH", dirname(SETTINGS_PATH) . "/src/Lib/Prisma");
15
15
  /**
16
- * @var string SRC_PATH - The absolute path to the src directory
16
+ * @var string SRC_PATH - The absolute path to the src directory ./src
17
17
  */
18
18
  define("SRC_PATH", dirname(SETTINGS_PATH) . "/src");
19
19
  /**
20
- * @var string APP_PATH - The absolute path to the app directory
20
+ * @var string APP_PATH - The absolute path to the app directory ./src/app
21
21
  */
22
22
  define("APP_PATH", dirname(SETTINGS_PATH) . "/src/app");
23
23
  /**
24
- * @var string LIB_PATH - The absolute path to the layout directory
24
+ * @var string LIB_PATH - The absolute path to the layout directory ./src/Lib
25
25
  */
26
26
  define("LIB_PATH", dirname(SETTINGS_PATH) . "/src/Lib");
27
27
  /**
28
- * @var string DOCUMENT_PATH - The absolute path to the layout directory
28
+ * @var string DOCUMENT_PATH - The absolute path to the layout directory ./
29
29
  */
30
30
  define("DOCUMENT_PATH", dirname(SETTINGS_PATH));
@@ -46,7 +46,7 @@
46
46
  * required: true
47
47
  * description: The user ID
48
48
  * schema:
49
- * type: integer
49
+ * type: string
50
50
  * responses:
51
51
  * 200:
52
52
  * description: A single user object
@@ -70,7 +70,7 @@
70
70
 
71
71
  /**
72
72
  * @swagger
73
- * /users:
73
+ * /users/create:
74
74
  * post:
75
75
  * summary: Create a new user
76
76
  * tags:
@@ -112,7 +112,7 @@
112
112
 
113
113
  /**
114
114
  * @swagger
115
- * /users/{id}:
115
+ * /users/update/{id}:
116
116
  * put:
117
117
  * summary: Update a user by ID
118
118
  * tags:
@@ -123,7 +123,7 @@
123
123
  * required: true
124
124
  * description: The user ID
125
125
  * schema:
126
- * type: integer
126
+ * type: string
127
127
  * requestBody:
128
128
  * required: true
129
129
  * content:
@@ -160,7 +160,7 @@
160
160
 
161
161
  /**
162
162
  * @swagger
163
- * /users/{id}:
163
+ * /users/delete/{id}:
164
164
  * delete:
165
165
  * summary: Delete a user by ID
166
166
  * tags:
@@ -171,7 +171,7 @@
171
171
  * required: true
172
172
  * description: The user ID
173
173
  * schema:
174
- * type: integer
174
+ * type: string
175
175
  * responses:
176
176
  * 204:
177
177
  * description: User successfully deleted
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.20.522",
3
+ "version": "1.20.524",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",