@erwininteractive/mvc 0.3.0 → 0.3.1
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/cli.d.ts +0 -1
- package/dist/generators/initApp.js +2 -2
- package/package.json +2 -2
- package/prisma/schema.prisma +10 -10
package/dist/cli.d.ts
CHANGED
|
@@ -111,10 +111,10 @@ function setupDatabase(targetDir) {
|
|
|
111
111
|
if (fs_1.default.existsSync(frameworkPrismaSchema)) {
|
|
112
112
|
fs_1.default.copyFileSync(frameworkPrismaSchema, path_1.default.join(prismaDir, "schema.prisma"));
|
|
113
113
|
}
|
|
114
|
-
// Install Prisma
|
|
114
|
+
// Install Prisma (pin to v6 to avoid breaking changes in v7)
|
|
115
115
|
console.log("\nSetting up database...");
|
|
116
116
|
try {
|
|
117
|
-
(0, child_process_1.execSync)("npm install @prisma/client prisma", { cwd: targetDir, stdio: "inherit" });
|
|
117
|
+
(0, child_process_1.execSync)("npm install @prisma/client@^6.0.0 prisma@^6.0.0", { cwd: targetDir, stdio: "inherit" });
|
|
118
118
|
(0, child_process_1.execSync)("npx prisma generate", { cwd: targetDir, stdio: "inherit" });
|
|
119
119
|
}
|
|
120
120
|
catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erwininteractive/mvc",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "A lightweight, full-featured MVC framework for Node.js with Express, Prisma, and EJS",
|
|
5
5
|
"main": "dist/framework/index.js",
|
|
6
6
|
"types": "dist/framework/index.d.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@types/express-session": "^1.18.0",
|
|
61
61
|
"@types/jest": "^29.5.13",
|
|
62
62
|
"@types/jsonwebtoken": "^9.0.7",
|
|
63
|
-
"@types/node": "^22.
|
|
63
|
+
"@types/node": "^22.19.15",
|
|
64
64
|
"@types/supertest": "^6.0.2",
|
|
65
65
|
"esbuild": "^0.24.0",
|
|
66
66
|
"jest": "^29.7.0",
|
package/prisma/schema.prisma
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
generator client {
|
|
2
|
-
|
|
2
|
+
provider = "prisma-client-js"
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
datasource db {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
provider = "postgresql"
|
|
7
|
+
url = env("DATABASE_URL")
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
model User {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
id Int @id @default(autoincrement())
|
|
12
|
+
email String @unique
|
|
13
|
+
hashedPassword String
|
|
14
|
+
role String @default("user")
|
|
15
|
+
createdAt DateTime @default(now())
|
|
16
|
+
updatedAt DateTime @updatedAt
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
@@map("users")
|
|
19
19
|
}
|