create-prisma-php-app 1.11.538 → 1.11.540
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/index.js +17 -54
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -220,7 +220,7 @@ function copyRecursiveSync(src, dest, answer) {
|
|
|
220
220
|
destIncludeWebsocket
|
|
221
221
|
);
|
|
222
222
|
if (!answer.websocket && destLower.includes("src\\lib\\websocket")) return;
|
|
223
|
-
|
|
223
|
+
if (!answer.prisma && destLower.includes("src\\lib\\prisma")) return;
|
|
224
224
|
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
|
|
225
225
|
fs.readdirSync(src).forEach((childItemName) => {
|
|
226
226
|
copyRecursiveSync(
|
|
@@ -690,63 +690,26 @@ async function main() {
|
|
|
690
690
|
if (!fs.existsSync(publicDirPath)) {
|
|
691
691
|
fs.mkdirSync(publicDirPath);
|
|
692
692
|
}
|
|
693
|
-
// if (!answer.
|
|
694
|
-
// const
|
|
695
|
-
// const
|
|
696
|
-
//
|
|
697
|
-
//
|
|
698
|
-
//
|
|
699
|
-
//
|
|
700
|
-
//
|
|
701
|
-
//
|
|
702
|
-
//
|
|
703
|
-
//
|
|
704
|
-
//
|
|
705
|
-
//
|
|
706
|
-
// Update websocket if not chosen by the user
|
|
707
|
-
// if (!answer.websocket) {
|
|
708
|
-
// const wsPath = path.join(projectPath, "src", "Lib", "Websocket");
|
|
709
|
-
// // Check if the websocket directory exists
|
|
710
|
-
// if (fs.existsSync(wsPath)) {
|
|
693
|
+
// if (!answer.prisma) {
|
|
694
|
+
// const prismaPath = path.join(projectPath, "prisma");
|
|
695
|
+
// const prismClassPath = path.join(projectPath, "src", "Lib", "Prisma");
|
|
696
|
+
// // Check if the prisma directory exists
|
|
697
|
+
// if (fs.existsSync(prismaPath)) {
|
|
698
|
+
// // Use fs.rmSync with recursive option set to true to delete the directory and its contents
|
|
699
|
+
// fs.rmSync(prismaPath, { recursive: true, force: true }); // force option is not necessary but can be used to ensure deletion
|
|
700
|
+
// console.log("Prisma directory was deleted successfully.");
|
|
701
|
+
// } else {
|
|
702
|
+
// console.log("Prisma directory does not exist.");
|
|
703
|
+
// }
|
|
704
|
+
// // Check if the prisma class directory exists
|
|
705
|
+
// if (fs.existsSync(prismClassPath)) {
|
|
711
706
|
// // Use fs.rmSync with recursive option set to true to delete the directory and its contents
|
|
712
|
-
// fs.rmSync(
|
|
713
|
-
// console.log("
|
|
707
|
+
// fs.rmSync(prismClassPath, { recursive: true, force: true }); // force option is not necessary but can be used to ensure deletion
|
|
708
|
+
// console.log("Prisma class directory was deleted successfully.");
|
|
714
709
|
// } else {
|
|
715
|
-
// console.log("
|
|
710
|
+
// console.log("Prisma class directory does not exist.");
|
|
716
711
|
// }
|
|
717
|
-
// // Update settings directory if websocket is not chosen
|
|
718
|
-
// const settingsPath = path.join(projectPath, "settings");
|
|
719
|
-
// const websocketFiles = ["restart-websocket.cjs", "restart-websocket.bat"];
|
|
720
|
-
// websocketFiles.forEach((file) => {
|
|
721
|
-
// const filePath = path.join(settingsPath, file);
|
|
722
|
-
// if (fs.existsSync(filePath)) {
|
|
723
|
-
// fs.unlinkSync(filePath); // Delete each file if it exists
|
|
724
|
-
// console.log(`${file} was deleted successfully.`);
|
|
725
|
-
// } else {
|
|
726
|
-
// console.log(`${file} does not exist.`);
|
|
727
|
-
// }
|
|
728
|
-
// });
|
|
729
712
|
// }
|
|
730
|
-
if (!answer.prisma) {
|
|
731
|
-
const prismaPath = path.join(projectPath, "prisma");
|
|
732
|
-
const prismClassPath = path.join(projectPath, "src", "Lib", "Prisma");
|
|
733
|
-
// Check if the prisma directory exists
|
|
734
|
-
if (fs.existsSync(prismaPath)) {
|
|
735
|
-
// Use fs.rmSync with recursive option set to true to delete the directory and its contents
|
|
736
|
-
fs.rmSync(prismaPath, { recursive: true, force: true }); // force option is not necessary but can be used to ensure deletion
|
|
737
|
-
console.log("Prisma directory was deleted successfully.");
|
|
738
|
-
} else {
|
|
739
|
-
console.log("Prisma directory does not exist.");
|
|
740
|
-
}
|
|
741
|
-
// Check if the prisma class directory exists
|
|
742
|
-
if (fs.existsSync(prismClassPath)) {
|
|
743
|
-
// Use fs.rmSync with recursive option set to true to delete the directory and its contents
|
|
744
|
-
fs.rmSync(prismClassPath, { recursive: true, force: true }); // force option is not necessary but can be used to ensure deletion
|
|
745
|
-
console.log("Prisma class directory was deleted successfully.");
|
|
746
|
-
} else {
|
|
747
|
-
console.log("Prisma class directory does not exist.");
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
713
|
if (
|
|
751
714
|
updateAnswer === null || updateAnswer === void 0
|
|
752
715
|
? void 0
|