create-prisma-php-app 1.7.9 → 1.7.11

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.
@@ -7,8 +7,8 @@ const serverScriptPath = path.join(
7
7
  __dirname,
8
8
  "..",
9
9
  "src",
10
- "lib",
11
- "websocket",
10
+ "Lib",
11
+ "Websocket",
12
12
  "server.php"
13
13
  );
14
14
 
@@ -46,7 +46,7 @@ restartServer();
46
46
  // Watch for changes and restart the server
47
47
  const chokidar = require("chokidar");
48
48
  chokidar
49
- .watch(path.join(__dirname, "..", "src", "lib", "websocket", "**", "*"))
49
+ .watch(path.join(__dirname, "..", "src", "Lib", "Websocket", "**", "*"))
50
50
  .on("change", (event, path) => {
51
51
  console.log(`${event}: ${path}`);
52
52
  restartServer();
@@ -1,7 +1,7 @@
1
1
  @echo off
2
2
  set PORT=8080
3
3
  set "PHP_PATH=php"
4
- set "SERVER_SCRIPT_PATH= src\lib\websocket\server.php"
4
+ set "SERVER_SCRIPT_PATH= src\Lib\Websocket\server.php"
5
5
 
6
6
  echo [INFO] Checking for processes using port %PORT%...
7
7
  netstat -aon | findstr :%PORT%
@@ -171,22 +171,17 @@ abstract class Utility
171
171
  if ($key === 'NOT') {
172
172
  self::processNotCondition($value, $groupedConditions, $bindings, $dbType, $prefix . $key . '_', $level);
173
173
  } else {
174
- foreach ($value as $conditionIndex => $subCondition) {
175
- if ($key === 'OR' && is_array($subCondition)) {
176
- if (!is_numeric($conditionIndex)) {
177
- throw new \Exception("The '$key' condition must be an indexed array.");
178
- }
179
- foreach ($subCondition as $subKey => $subValue) {
180
- self::processSingleCondition($subKey, $subValue, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionIndex . '_', $level + 1);
181
- }
174
+ foreach ($value as $conditionKey => $subCondition) {
175
+ if (is_numeric($conditionKey)) {
176
+ self::processConditions($subCondition, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionKey . '_', $level + 1);
182
177
  } else {
183
- if (is_numeric($conditionIndex)) {
184
- self::processConditions($subCondition, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionIndex . '_', $level + 1);
185
- } else {
186
- self::processSingleCondition($conditionIndex, $subCondition, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionIndex . '_', $level + 1);
187
- }
178
+ self::processSingleCondition($conditionKey, $subCondition, $groupedConditions, $bindings, $dbType, $prefix . $key . $conditionKey . '_', $level + 1);
188
179
  }
189
180
  }
181
+ if (!empty($groupedConditions)) {
182
+ $conditionGroup = '(' . implode(" $key ", $groupedConditions) . ')';
183
+ $sqlConditions[] = $conditionGroup;
184
+ }
190
185
  }
191
186
  if (!empty($groupedConditions)) {
192
187
  $conditionGroup = '(' . implode(" $key ", $groupedConditions) . ')';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.7.9",
3
+ "version": "1.7.11",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",