prisma-client-php 0.0.33 → 0.0.35
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 +6 -4
- package/package.json +1 -1
package/dist/init.js
CHANGED
|
@@ -143,11 +143,13 @@ async function installComposerDependencies(isPrismaPHP) {
|
|
|
143
143
|
console.error("composer.json does not exist.");
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
let composerDependencies = [];
|
|
146
|
+
let composerDependencies = [composerPkg("calicastle/cuid")];
|
|
147
147
|
if (isPrismaPHP) {
|
|
148
148
|
const configPath = path.join(currentDir, "prisma-php.json");
|
|
149
|
+
console.log("🚀 ~ configPath:", configPath);
|
|
149
150
|
if (fs.existsSync(configPath)) {
|
|
150
151
|
const localSettings = readJsonFile(configPath);
|
|
152
|
+
console.log("🚀 ~ localSettings:", localSettings);
|
|
151
153
|
let excludeFiles = [];
|
|
152
154
|
localSettings.excludeFiles?.map((file) => {
|
|
153
155
|
const filePath = path.join(currentDir, file);
|
|
@@ -159,12 +161,10 @@ async function installComposerDependencies(isPrismaPHP) {
|
|
|
159
161
|
excludeFiles: localSettings.excludeFiles ?? [],
|
|
160
162
|
excludeFilePath: excludeFiles ?? [],
|
|
161
163
|
};
|
|
162
|
-
composerDependencies.push(composerPkg("calicastle/cuid"));
|
|
163
164
|
}
|
|
164
165
|
} else {
|
|
165
166
|
composerDependencies.push(
|
|
166
167
|
composerPkg("ezyang/htmlpurifier"),
|
|
167
|
-
composerPkg("calicastle/cuid"),
|
|
168
168
|
composerPkg("symfony/uid"),
|
|
169
169
|
composerPkg("brick/math")
|
|
170
170
|
);
|
|
@@ -176,7 +176,7 @@ async function installComposerDependencies(isPrismaPHP) {
|
|
|
176
176
|
// Prepare the composer require command
|
|
177
177
|
const composerRequireCommand = `C:\\xampp\\php\\php.exe C:\\ProgramData\\ComposerSetup\\bin\\composer.phar require ${composerDependencies.join(
|
|
178
178
|
" "
|
|
179
|
-
)}
|
|
179
|
+
)}`;
|
|
180
180
|
// Execute the composer require command
|
|
181
181
|
execSync(composerRequireCommand, {
|
|
182
182
|
stdio: "inherit",
|
|
@@ -216,6 +216,8 @@ function composerPkg(name) {
|
|
|
216
216
|
}
|
|
217
217
|
async function main() {
|
|
218
218
|
const isPrismaPHP = process.argv.includes("--prisma-php");
|
|
219
|
+
console.log("🚀 ~ main ~ process:", process.argv);
|
|
220
|
+
console.log("🚀 ~ main ~ isPrismaPHP:", isPrismaPHP);
|
|
219
221
|
installNpmDependencies(isPrismaPHP);
|
|
220
222
|
installComposerDependencies(isPrismaPHP);
|
|
221
223
|
initPrisma();
|
package/package.json
CHANGED