create-prisma-php-app 1.6.29 → 1.6.30

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -494,9 +494,12 @@ async function main() {
494
494
  PHP_GENERATE_CLASS_PATH: "src/lib/prisma/classes",
495
495
  };`;
496
496
  console.log("🚀 ~ main ~ settingsCode:", settingsCode);
497
- fs.writeFileSync(settingsPath, settingsCode);
497
+ fs.writeFileSync(settingsPath, settingsCode, { flag: "w" });
498
498
  // Create public directory
499
- fs.mkdirSync(path.join(projectPath, "public"));
499
+ const publicDirPath = path.join(projectPath, "public");
500
+ if (!fs.existsSync(publicDirPath)) {
501
+ fs.mkdirSync(publicDirPath);
502
+ }
500
503
  // Update css if tailwindcss is not chosen by the user
501
504
  if (!answer.tailwindcss) {
502
505
  // delete specific files of tailwindcss if not chosen
@@ -546,7 +549,7 @@ async function main() {
546
549
  websocket: answer.websocket,
547
550
  version,
548
551
  };
549
- fs.writeFileSync(path.join(projectPath, "prisma-php.json"), JSON.stringify(prismaPhpConfig, null, 2));
552
+ fs.writeFileSync(path.join(projectPath, "prisma-php.json"), JSON.stringify(prismaPhpConfig, null, 2), { flag: "w" });
550
553
  console.log(`${chalk.green("Success!")} Prisma PHP project successfully created in ${answer.projectName}!`);
551
554
  }
552
555
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.6.29",
3
+ "version": "1.6.30",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",