create-prisma-php-app 2.0.0-alpha.4 → 2.0.0-alpha.5
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/bootstrap.php +4 -4
- package/dist/postcss.config.js +4 -4
- package/dist/prisma/seed.ts +74 -74
- package/package.json +1 -1
package/dist/bootstrap.php
CHANGED
|
@@ -863,12 +863,12 @@ try {
|
|
|
863
863
|
? Bootstrap::$parentLayoutPath
|
|
864
864
|
: (Bootstrap::$layoutsToInclude[0] ?? '');
|
|
865
865
|
|
|
866
|
-
$message = "The layout file does not contain
|
|
867
|
-
$htmlMessage = "<div class='error'>The layout file does not contain
|
|
866
|
+
$message = "The layout file does not contain <?php echo MainLayout::\$childLayoutChildren; ?> or <?= MainLayout::\$childLayoutChildren ?>\n<strong>$layoutPath</strong>";
|
|
867
|
+
$htmlMessage = "<div class='error'>The layout file does not contain <?php echo MainLayout::\$childLayoutChildren; ?> or <?= MainLayout::\$childLayoutChildren ?><br><strong>$layoutPath</strong></div>";
|
|
868
868
|
|
|
869
869
|
if (Bootstrap::$isContentIncluded) {
|
|
870
|
-
$message = "The parent layout file does not contain
|
|
871
|
-
$htmlMessage = "<div class='error'>The parent layout file does not contain
|
|
870
|
+
$message = "The parent layout file does not contain <?php echo MainLayout::\$children; ?> Or <?= MainLayout::\$children ?><br><strong>$layoutPath</strong>";
|
|
871
|
+
$htmlMessage = "<div class='error'>The parent layout file does not contain <?php echo MainLayout::\$children; ?> Or <?= MainLayout::\$children ?><br><strong>$layoutPath</strong></div>";
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
$errorDetails = Bootstrap::isAjaxOrXFileRequestOrRouteFile() ? $message : $htmlMessage;
|
package/dist/postcss.config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
plugins: {
|
|
3
|
-
"@tailwindcss/postcss": {},
|
|
4
|
-
},
|
|
1
|
+
export default {
|
|
2
|
+
plugins: {
|
|
3
|
+
"@tailwindcss/postcss": {},
|
|
4
|
+
},
|
|
5
5
|
};
|
package/dist/prisma/seed.ts
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
// import { PrismaClient } from "@prisma/client";
|
|
2
|
-
|
|
3
|
-
// const prisma = new PrismaClient();
|
|
4
|
-
|
|
5
|
-
// // UserRole
|
|
6
|
-
// const userRoleData = [
|
|
7
|
-
// {
|
|
8
|
-
// name: "Admin",
|
|
9
|
-
// },
|
|
10
|
-
// {
|
|
11
|
-
// name: "User",
|
|
12
|
-
// },
|
|
13
|
-
// ];
|
|
14
|
-
|
|
15
|
-
// // User
|
|
16
|
-
// const userData = [
|
|
17
|
-
// {
|
|
18
|
-
// name: "Juan",
|
|
19
|
-
// email: "j@gmail.com",
|
|
20
|
-
// password: "$2b$10$mgjotYzIXwrK1MCWmu4tgeUVnLcb.qzvqwxOq4FXEL8k2obwXivDi", // TODO: template password 1234 (bcrypt) testing only
|
|
21
|
-
// roleId: 1,
|
|
22
|
-
// },
|
|
23
|
-
// ];
|
|
24
|
-
|
|
25
|
-
// async function main() {
|
|
26
|
-
// ========================================
|
|
27
|
-
// Code for PostgreSQL
|
|
28
|
-
// ----------------------------------------
|
|
29
|
-
// UserRole
|
|
30
|
-
// ----------------------------------------
|
|
31
|
-
// await prisma.userRole.deleteMany();
|
|
32
|
-
// await prisma.userRole.createMany({ data: userRoleData });
|
|
33
|
-
// await prisma.$executeRaw`ALTER SEQUENCE "UserRole_id_seq" RESTART WITH 1`;
|
|
34
|
-
// ----------------------------------------
|
|
35
|
-
// User
|
|
36
|
-
// ----------------------------------------
|
|
37
|
-
// await prisma.user.deleteMany();
|
|
38
|
-
// await prisma.user.createMany({ data: userData });
|
|
39
|
-
// ========================================
|
|
40
|
-
// Code for MySQL
|
|
41
|
-
// ----------------------------------------
|
|
42
|
-
// UserRole
|
|
43
|
-
// ----------------------------------------
|
|
44
|
-
// await prisma.userRole.deleteMany();
|
|
45
|
-
// await prisma.userRole.createMany({ data: userRoleData });
|
|
46
|
-
// await prisma.$executeRaw`ALTER TABLE UserRole AUTO_INCREMENT = 1`;
|
|
47
|
-
// ----------------------------------------
|
|
48
|
-
// User
|
|
49
|
-
// ----------------------------------------
|
|
50
|
-
// await prisma.user.deleteMany();
|
|
51
|
-
// await prisma.user.createMany({ data: userData });
|
|
52
|
-
// ========================================
|
|
53
|
-
// Code for SQLite
|
|
54
|
-
// ========================================
|
|
55
|
-
// UserRole
|
|
56
|
-
// ----------------------------------------
|
|
57
|
-
// await prisma.userRole.deleteMany();
|
|
58
|
-
// await prisma.userRole.createMany({ data: userRoleData });
|
|
59
|
-
// SQLite automatically handles ID incrementation and does not require manual sequence reset
|
|
60
|
-
// ----------------------------------------
|
|
61
|
-
// User
|
|
62
|
-
// ----------------------------------------
|
|
63
|
-
// await prisma.user.deleteMany();
|
|
64
|
-
// await prisma.user.createMany({ data: userData });
|
|
65
|
-
// ========================================
|
|
66
|
-
// }
|
|
67
|
-
|
|
68
|
-
// main()
|
|
69
|
-
// .catch((e) => {
|
|
70
|
-
// throw e;
|
|
71
|
-
// })
|
|
72
|
-
// .finally(async () => {
|
|
73
|
-
// await prisma.$disconnect();
|
|
74
|
-
// });
|
|
1
|
+
// import { PrismaClient } from "@prisma/client";
|
|
2
|
+
|
|
3
|
+
// const prisma = new PrismaClient();
|
|
4
|
+
|
|
5
|
+
// // UserRole
|
|
6
|
+
// const userRoleData = [
|
|
7
|
+
// {
|
|
8
|
+
// name: "Admin",
|
|
9
|
+
// },
|
|
10
|
+
// {
|
|
11
|
+
// name: "User",
|
|
12
|
+
// },
|
|
13
|
+
// ];
|
|
14
|
+
|
|
15
|
+
// // User
|
|
16
|
+
// const userData = [
|
|
17
|
+
// {
|
|
18
|
+
// name: "Juan",
|
|
19
|
+
// email: "j@gmail.com",
|
|
20
|
+
// password: "$2b$10$mgjotYzIXwrK1MCWmu4tgeUVnLcb.qzvqwxOq4FXEL8k2obwXivDi", // TODO: template password 1234 (bcrypt) testing only
|
|
21
|
+
// roleId: 1,
|
|
22
|
+
// },
|
|
23
|
+
// ];
|
|
24
|
+
|
|
25
|
+
// async function main() {
|
|
26
|
+
// ========================================
|
|
27
|
+
// Code for PostgreSQL
|
|
28
|
+
// ----------------------------------------
|
|
29
|
+
// UserRole
|
|
30
|
+
// ----------------------------------------
|
|
31
|
+
// await prisma.userRole.deleteMany();
|
|
32
|
+
// await prisma.userRole.createMany({ data: userRoleData });
|
|
33
|
+
// await prisma.$executeRaw`ALTER SEQUENCE "UserRole_id_seq" RESTART WITH 1`;
|
|
34
|
+
// ----------------------------------------
|
|
35
|
+
// User
|
|
36
|
+
// ----------------------------------------
|
|
37
|
+
// await prisma.user.deleteMany();
|
|
38
|
+
// await prisma.user.createMany({ data: userData });
|
|
39
|
+
// ========================================
|
|
40
|
+
// Code for MySQL
|
|
41
|
+
// ----------------------------------------
|
|
42
|
+
// UserRole
|
|
43
|
+
// ----------------------------------------
|
|
44
|
+
// await prisma.userRole.deleteMany();
|
|
45
|
+
// await prisma.userRole.createMany({ data: userRoleData });
|
|
46
|
+
// await prisma.$executeRaw`ALTER TABLE UserRole AUTO_INCREMENT = 1`;
|
|
47
|
+
// ----------------------------------------
|
|
48
|
+
// User
|
|
49
|
+
// ----------------------------------------
|
|
50
|
+
// await prisma.user.deleteMany();
|
|
51
|
+
// await prisma.user.createMany({ data: userData });
|
|
52
|
+
// ========================================
|
|
53
|
+
// Code for SQLite
|
|
54
|
+
// ========================================
|
|
55
|
+
// UserRole
|
|
56
|
+
// ----------------------------------------
|
|
57
|
+
// await prisma.userRole.deleteMany();
|
|
58
|
+
// await prisma.userRole.createMany({ data: userRoleData });
|
|
59
|
+
// SQLite automatically handles ID incrementation and does not require manual sequence reset
|
|
60
|
+
// ----------------------------------------
|
|
61
|
+
// User
|
|
62
|
+
// ----------------------------------------
|
|
63
|
+
// await prisma.user.deleteMany();
|
|
64
|
+
// await prisma.user.createMany({ data: userData });
|
|
65
|
+
// ========================================
|
|
66
|
+
// }
|
|
67
|
+
|
|
68
|
+
// main()
|
|
69
|
+
// .catch((e) => {
|
|
70
|
+
// throw e;
|
|
71
|
+
// })
|
|
72
|
+
// .finally(async () => {
|
|
73
|
+
// await prisma.$disconnect();
|
|
74
|
+
// });
|