prisma-client-php 0.0.37 → 0.0.39

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
@@ -133,26 +133,17 @@ function initPrisma() {
133
133
  }
134
134
  }
135
135
  async function installComposerDependencies(isPrismaPHP) {
136
- console.log("🚀 ~ isPrismaPHP:", isPrismaPHP);
137
136
  const currentDir = process.cwd();
138
- console.log("🚀 ~ currentDir:", currentDir);
139
137
  const composerJsonPath = path.join(currentDir, "composer.json");
140
- console.log("🚀 ~ composerJsonPath:", composerJsonPath);
141
- let composerJson;
142
- if (fs.existsSync(composerJsonPath)) {
143
- const composerJsonContent = fs.readFileSync(composerJsonPath, "utf8");
144
- composerJson = JSON.parse(composerJsonContent);
145
- } else {
138
+ if (!fs.existsSync(composerJsonPath)) {
146
139
  console.error("composer.json does not exist.");
147
140
  return;
148
141
  }
149
142
  let composerDependencies = [composerPkg("calicastle/cuid")];
150
143
  if (isPrismaPHP) {
151
144
  const configPath = path.join(currentDir, "prisma-php.json");
152
- console.log("🚀 ~ configPath:", configPath);
153
145
  if (fs.existsSync(configPath)) {
154
146
  const localSettings = readJsonFile(configPath);
155
- console.log("🚀 ~ localSettings:", localSettings);
156
147
  let excludeFiles = [];
157
148
  localSettings.excludeFiles?.map((file) => {
158
149
  const filePath = path.join(currentDir, file);
@@ -188,8 +179,6 @@ async function installComposerDependencies(isPrismaPHP) {
188
179
  } catch (error) {
189
180
  console.error("Error installing Composer dependencies:", error);
190
181
  }
191
- fs.writeFileSync(composerJsonPath, JSON.stringify(composerJson, null, 2));
192
- console.log("composer.json updated successfully.");
193
182
  }
194
183
  const readJsonFile = (filePath) => {
195
184
  const jsonData = fs.readFileSync(filePath, "utf8");
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.37",
4
+ "version": "0.0.39",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "scripts": {