create-prisma-php-app 1.6.52 → 1.6.53

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.
@@ -34,13 +34,14 @@ async function getAnswer() {
34
34
  {
35
35
  type: "toggle",
36
36
  name: "shouldProceed",
37
- message: `This command will update the ${chalk.blue("create-prisma-php-app")} package and overwrite all default files. Do you want to proceed?`,
37
+ message: `This command will update the ${chalk.blue("create-prisma-php-app")} package and overwrite all default files. ${chalk.blue("Do you want to proceed")}?`,
38
38
  initial: false,
39
39
  active: "Yes",
40
40
  inactive: "No",
41
41
  },
42
42
  ];
43
43
  const onCancel = () => {
44
+ console.log(chalk.red("Operation cancelled by the user."));
44
45
  process.exit(0);
45
46
  };
46
47
  const response = await prompts(questions, { onCancel });
@@ -54,11 +55,15 @@ const main = async () => {
54
55
  try {
55
56
  const answer = await getAnswer();
56
57
  if (!(answer === null || answer === void 0 ? void 0 : answer.shouldProceed)) {
57
- console.log("Operation cancelled by the user.");
58
+ console.log(chalk.red("Operation cancelled by the user."));
58
59
  return;
59
60
  }
60
61
  const currentDir = process.cwd();
61
62
  const configPath = path.join(currentDir, "prisma-php.json");
63
+ if (!fs.existsSync(configPath)) {
64
+ console.error(chalk.red("The configuration file 'prisma-php.json' was not found in the current directory."));
65
+ return;
66
+ }
62
67
  const localSettings = readJsonFile(configPath);
63
68
  const commandArgs = [localSettings.projectName];
64
69
  if (localSettings.tailwindcss)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.6.52",
3
+ "version": "1.6.53",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",