prisma-client-php 2.3.1 → 2.3.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.
package/dist/generate.js CHANGED
@@ -2,16 +2,27 @@ import*as fs from"fs";import{exec}from"child_process";import path from"path";imp
2
2
  const executePHP = (command) => {
3
3
  exec(command, (error, stdout, stderr) => {
4
4
  if (error) {
5
- console.error(`Execution error: ${error}`);
5
+ if (stderr?.trim()) console.error(stderr);
6
+ console.error(`Execution error: ${error.message}`);
6
7
  return;
7
8
  }
8
- if (stderr) {
9
- console.error(`Standard error: ${stderr}`);
10
- return;
9
+ if (stderr?.trim()) {
10
+ const filtered = stderr
11
+ .split(/\r?\n/)
12
+ .filter(
13
+ (line) =>
14
+ line.trim() &&
15
+ !/Loaded Prisma config from/i.test(line) &&
16
+ !/Prisma config detected, skipping environment variable loading/i.test(
17
+ line
18
+ )
19
+ )
20
+ .join("\n");
21
+ if (filtered) console.warn(filtered);
11
22
  }
12
23
  if (stdout.includes("Result: Prisma schema is valid.")) {
13
- console.error(chalk.blue(stdout));
14
- } else {
24
+ console.log(chalk.blue(stdout));
25
+ } else if (stdout.trim()) {
15
26
  console.log(`Standard output...\n${stdout}`);
16
27
  }
17
28
  });
package/dist/init.js CHANGED
@@ -227,7 +227,7 @@ async function main() {
227
227
  return;
228
228
  }
229
229
  fs.copyFileSync(src, dest);
230
- console.log(`Copied file: ${path.basename(src)} -> ${dest}`);
230
+ console.log(`Copied file: ${path.basename(src)}`);
231
231
  }
232
232
  const prismaConfigSrc = path.join(__dirname, "prisma.config.ts");
233
233
  const prismaConfigDest = path.join(process.cwd(), "prisma.config.ts");
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": "2.3.1",
4
+ "version": "2.3.3",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "scripts": {