prisma-client-php 0.0.6 → 0.0.8

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/init.js CHANGED
@@ -22,20 +22,19 @@ function copyRecursiveSync(src, dest, base = src, isPrismaPHP = false) {
22
22
  for (const entry of entries) {
23
23
  const srcPath = path.join(src, entry.name);
24
24
  const destPath = path.join(dest, entry.name);
25
+ const relative = path.relative(base, srcPath);
26
+ const display = path.join(path.basename(base), relative);
25
27
  // **Normalize Path to Avoid Issues on Windows**
26
28
  const relativePath = path.relative(__dirname, srcPath);
27
29
  const validatorFile = path.normalize("src/Lib/Validator.php");
28
30
  // **Skip Validator.php when isPrismaPHP is true**
29
31
  if (isPrismaPHP && relativePath === validatorFile) {
30
- console.log(`Skipping file: ${srcPath}`);
32
+ console.log(`Skipping file: ${display}`);
31
33
  continue;
32
34
  }
33
35
  if (entry.isDirectory()) {
34
36
  copyRecursiveSync(srcPath, destPath, base, isPrismaPHP);
35
37
  } else {
36
- // Compute the relative path for logging
37
- const relative = path.relative(base, srcPath);
38
- const display = path.join(path.basename(base), relative);
39
38
  // Copy the file (this will overwrite if it exists)
40
39
  fs.copyFileSync(srcPath, destPath);
41
40
  console.log(`Copied file: ${display}`);
@@ -72,7 +71,7 @@ function installPackages(isPrismaPHP) {
72
71
  const packagesStr = packages.join(" ");
73
72
  try {
74
73
  console.log(`Installing packages: ${packagesStr}`);
75
- execSync(`npm install ${packagesStr}`, {
74
+ execSync(`npm install --save-dev ${packagesStr}`, {
76
75
  stdio: "inherit",
77
76
  cwd: process.cwd(),
78
77
  });
@@ -210,6 +210,7 @@ final class PPHPUtility
210
210
  return ArrayType::Value;
211
211
  }
212
212
  }
213
+ return ArrayType::Value; // Default return value if array is empty
213
214
  }
214
215
 
215
216
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prisma-client-php",
3
3
  "description": "Prisma Client PHP is an auto-generated query builder that enables type-safe database access in PHP.",
4
- "version": "0.0.6",
4
+ "version": "0.0.8",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "scripts": {