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 +17 -6
- package/dist/init.js +1 -1
- package/package.json +1 -1
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(
|
|
5
|
+
if (stderr?.trim()) console.error(stderr);
|
|
6
|
+
console.error(`Execution error: ${error.message}`);
|
|
6
7
|
return;
|
|
7
8
|
}
|
|
8
|
-
if (stderr) {
|
|
9
|
-
|
|
10
|
-
|
|
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.
|
|
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)}
|
|
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