create-nexwire 4.2.3 → 4.2.4
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/express/package.json +48 -23
- package/express/src/database/migrations/sqlite/0000_init.sql +47 -60
- package/express/src/database/migrations/sqlite/meta/0000_snapshot.json +1 -89
- package/express/src/database/migrations/sqlite/meta/_journal.json +1 -1
- package/express/src/database/schema.ts +2 -3
- package/express/src/framework/facade.ts +12 -1
- package/express/src/framework/maker-cli/db/core.mjs +291 -288
- package/express/src/framework/maker-cli/module/core.mjs +125 -87
- package/express/src/framework/maker-cli/module/index.mjs +3 -3
- package/express/src/framework/maker-cli/stubs/notification/controller.ts.stub +61 -62
- package/express/src/framework/maker-cli/stubs/notification/job.ts.stub +11 -13
- package/express/src/framework/maker-cli/stubs/notification/model.ts.stub +29 -0
- package/express/src/framework/maker-cli/stubs/notification/provider.ts.stub +174 -0
- package/express/src/framework/maker-cli/stubs/notification/route.api.ts.stub +11 -10
- package/express/src/framework/maker-cli/stubs/notification/route.plain.ts.stub +1 -1
- package/express/src/framework/maker-cli/stubs/notification/schema.plain.ts.stub +25 -25
- package/express/src/framework/maker-cli/stubs/notification/schema.ts.stub +25 -25
- package/express/src/framework/notification/index.ts +49 -87
- package/express/src/framework/providers/adapter.ts +24 -10
- package/express/src/framework/providers/contracts.ts +80 -10
- package/express/src/framework/providers/registry.ts +27 -1
- package/express/src/resources/src/main.ts +1 -1
- package/express/src/resources/src/pages/auth/forgetPassword.vue +1 -1
- package/express/src/resources/src/pages/auth/login.vue +1 -1
- package/express/src/resources/src/pages/auth/register.vue +1 -1
- package/express/src/resources/src/pages/auth/resetPassword.vue +1 -1
- package/express/src/resources/src/pages/auth/verifyEmail.vue +1 -1
- package/express/src/resources/src/pages/dashboard/index.vue +66 -66
- package/express/src/storage/database/nexwire.sqlite +0 -0
- package/hono/package.json +44 -19
- package/hono/src/database/migrations/sqlite/0000_init.sql +47 -60
- package/hono/src/database/migrations/sqlite/meta/0000_snapshot.json +1 -89
- package/hono/src/database/migrations/sqlite/meta/_journal.json +1 -1
- package/hono/src/database/schema.ts +2 -3
- package/hono/src/framework/facade.ts +12 -1
- package/hono/src/framework/maker-cli/db/core.mjs +291 -288
- package/hono/src/framework/maker-cli/module/core.mjs +93 -52
- package/hono/src/framework/maker-cli/module/index.mjs +3 -3
- package/hono/src/framework/maker-cli/stubs/notification/controller.ts.stub +63 -58
- package/hono/src/framework/maker-cli/stubs/notification/job.ts.stub +10 -12
- package/hono/src/framework/maker-cli/stubs/notification/model.ts.stub +29 -0
- package/hono/src/framework/maker-cli/stubs/notification/provider.ts.stub +174 -0
- package/hono/src/framework/maker-cli/stubs/notification/route.api.ts.stub +11 -10
- package/hono/src/framework/maker-cli/stubs/notification/route.plain.ts.stub +1 -1
- package/hono/src/framework/maker-cli/stubs/notification/schema.plain.ts.stub +25 -25
- package/hono/src/framework/maker-cli/stubs/notification/schema.ts.stub +25 -25
- package/hono/src/framework/notification/index.ts +49 -87
- package/hono/src/framework/providers/adapter.ts +24 -10
- package/hono/src/framework/providers/contracts.ts +80 -10
- package/hono/src/framework/providers/registry.ts +27 -1
- package/hono/src/resources/src/main.ts +1 -1
- package/hono/src/resources/src/pages/auth/forgetPassword.vue +1 -1
- package/hono/src/resources/src/pages/auth/login.vue +1 -1
- package/hono/src/resources/src/pages/auth/register.vue +1 -1
- package/hono/src/resources/src/pages/auth/resetPassword.vue +1 -1
- package/hono/src/resources/src/pages/auth/verifyEmail.vue +1 -1
- package/hono/src/resources/src/pages/dashboard/index.vue +66 -66
- package/hono/src/storage/database/nexwire.sqlite +0 -0
- package/package.json +10 -10
- package/express/src/modules/auth/database/models/notification.ts +0 -24
- package/hono/src/modules/auth/database/models/notification.ts +0 -24
package/express/package.json
CHANGED
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
"test:coverage": "vitest run --coverage"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@asteasolutions/zod-to-openapi": "^8.
|
|
31
|
+
"@asteasolutions/zod-to-openapi": "^8.5.0",
|
|
32
32
|
"@aws-sdk/client-s3": "^3.1111.0",
|
|
33
33
|
"@aws-sdk/s3-request-presigner": "^3.1111.0",
|
|
34
|
-
"@bull-board/api": "^9.10.
|
|
35
|
-
"@bull-board/express": "^9.10.
|
|
34
|
+
"@bull-board/api": "^9.10.5",
|
|
35
|
+
"@bull-board/express": "^9.10.5",
|
|
36
36
|
"@libsql/client": "^0.17.4",
|
|
37
37
|
"@scalar/express-api-reference": "^0.10.19",
|
|
38
38
|
"@socket.io/admin-ui": "^0.5.1",
|
|
39
39
|
"@socket.io/redis-adapter": "^8.3.0",
|
|
40
|
+
"@unhead/vue": "^3.4.3",
|
|
40
41
|
"@types/multer": "^2.2.0",
|
|
41
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
42
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
42
43
|
"@vuepic/vue-datepicker": "^14.0.0",
|
|
43
44
|
"@vueuse/core": "^14.4.0",
|
|
44
|
-
"@vueuse/head": "^2.0.0",
|
|
45
45
|
"axios": "^1.19.0",
|
|
46
46
|
"bcryptjs": "^3.0.3",
|
|
47
47
|
"bootstrap": "^5.3.8",
|
|
@@ -49,38 +49,63 @@
|
|
|
49
49
|
"bullmq": "^5.81.3",
|
|
50
50
|
"bullmq-durable": "^0.2.0",
|
|
51
51
|
"chalk": "^5.6.2",
|
|
52
|
-
"commander": "^
|
|
52
|
+
"commander": "^15.0.0",
|
|
53
53
|
"cookie-parser": "^1.4.7",
|
|
54
54
|
"cors": "^2.8.5",
|
|
55
55
|
"croner": "^10.0.1",
|
|
56
56
|
"dotenv": "^17.4.2",
|
|
57
57
|
"dotenv-expand": "^13.0.0",
|
|
58
|
-
"drizzle-orm": "^0.45.
|
|
59
|
-
"express": "^5.
|
|
60
|
-
"express-rate-limit": "^8.7.
|
|
58
|
+
"drizzle-orm": "^0.45.4",
|
|
59
|
+
"express": "^5.3.0",
|
|
60
|
+
"express-rate-limit": "^8.7.1",
|
|
61
61
|
"glob": "^13.0.6",
|
|
62
62
|
"http-errors": "^2.0.1",
|
|
63
63
|
"ioredis": "^5.11.1",
|
|
64
64
|
"jsonwebtoken": "^9.0.2",
|
|
65
65
|
"lodash-es": "^4.18.1",
|
|
66
66
|
"luxon": "^3.7.2",
|
|
67
|
-
"maildev": "^
|
|
67
|
+
"maildev": "^3.0.0",
|
|
68
68
|
"morgan": "^1.10.0",
|
|
69
|
-
"multer": "^2.
|
|
69
|
+
"multer": "^2.5.0",
|
|
70
70
|
"mysql2": "^3.23.3",
|
|
71
|
-
"nodemailer": "^
|
|
71
|
+
"nodemailer": "^10.2.1",
|
|
72
72
|
"pinia": "^3.0.4",
|
|
73
73
|
"pino": "^10.3.1",
|
|
74
74
|
"postgres": "^3.4.9",
|
|
75
75
|
"redis-commander": "^0.9.0",
|
|
76
76
|
"sass": "^1.100.0",
|
|
77
|
-
"socket.io": "^4.8.
|
|
78
|
-
"socket.io-client": "^4.8.
|
|
79
|
-
"vite": "^8.
|
|
77
|
+
"socket.io": "^4.8.4",
|
|
78
|
+
"socket.io-client": "^4.8.4",
|
|
79
|
+
"vite": "^8.3.5",
|
|
80
80
|
"vue": "^3.5.41",
|
|
81
81
|
"vue-router": "^5.2.0",
|
|
82
82
|
"vue-select": "^4.0.0-beta.6",
|
|
83
|
-
"zod": "^4.
|
|
83
|
+
"zod": "^4.6.7"
|
|
84
|
+
},
|
|
85
|
+
"overrides": {
|
|
86
|
+
"@esbuild-kit/core-utils": {
|
|
87
|
+
"esbuild": "^0.25.12"
|
|
88
|
+
},
|
|
89
|
+
"@maildev/mcp": {
|
|
90
|
+
"zod": "^4.6.7"
|
|
91
|
+
},
|
|
92
|
+
"@maildev/smtp": {
|
|
93
|
+
"jsdom": "^27.4.0",
|
|
94
|
+
"nodemailer": "^10.2.1"
|
|
95
|
+
},
|
|
96
|
+
"redis-commander": {
|
|
97
|
+
"express": "^4.22.3",
|
|
98
|
+
"body-parser": "^1.20.9",
|
|
99
|
+
"bcrypt": "npm:bcryptjs@^3.0.3",
|
|
100
|
+
"bcryptjs": "^3.0.3"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"allowScripts": {
|
|
104
|
+
"@parcel/watcher": true,
|
|
105
|
+
"esbuild": true,
|
|
106
|
+
"msgpackr-extract": true,
|
|
107
|
+
"redis-commander": true,
|
|
108
|
+
"vue-demi": true
|
|
84
109
|
},
|
|
85
110
|
"devDependencies": {
|
|
86
111
|
"@biomejs/biome": "^2.5.7",
|
|
@@ -91,16 +116,16 @@
|
|
|
91
116
|
"@types/jsonwebtoken": "^9.0.7",
|
|
92
117
|
"@types/lodash-es": "^4.17.12",
|
|
93
118
|
"@types/morgan": "^1.9.9",
|
|
94
|
-
"@types/node": "^25.9.
|
|
95
|
-
"@vitest/coverage-v8": "^
|
|
96
|
-
"drizzle-kit": "^0.31.
|
|
97
|
-
"tsc-alias": "^1.9.
|
|
98
|
-
"tsx": "^4.23.
|
|
119
|
+
"@types/node": "^25.9.9",
|
|
120
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
121
|
+
"drizzle-kit": "^0.31.11",
|
|
122
|
+
"tsc-alias": "^1.9.9",
|
|
123
|
+
"tsx": "^4.23.15",
|
|
99
124
|
"typescript": "^6.0.3",
|
|
100
|
-
"vitest": "^
|
|
125
|
+
"vitest": "^5.0.5"
|
|
101
126
|
},
|
|
102
127
|
"engines": {
|
|
103
|
-
"node": ">=22",
|
|
128
|
+
"node": ">=22.12.0",
|
|
104
129
|
"bun": ">=1.3",
|
|
105
130
|
"pnpm": ">=11",
|
|
106
131
|
"yarn": ">=4"
|
|
@@ -1,61 +1,48 @@
|
|
|
1
|
-
CREATE TABLE `
|
|
2
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
-
`
|
|
4
|
-
`
|
|
5
|
-
`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
`
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
`
|
|
32
|
-
`
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
`
|
|
41
|
-
`
|
|
42
|
-
`
|
|
43
|
-
`
|
|
44
|
-
`
|
|
45
|
-
FOREIGN KEY (`
|
|
46
|
-
);
|
|
47
|
-
--> statement-breakpoint
|
|
48
|
-
CREATE UNIQUE INDEX `refresh_tokens_jti_unique` ON `refresh_tokens` (`jti`);--> statement-breakpoint
|
|
49
|
-
CREATE TABLE `users` (
|
|
50
|
-
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
51
|
-
`name` text NOT NULL,
|
|
52
|
-
`email` text NOT NULL,
|
|
53
|
-
`password` text NOT NULL,
|
|
54
|
-
`role_id` integer,
|
|
55
|
-
`email_verified_at` integer,
|
|
56
|
-
`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL,
|
|
57
|
-
`updated_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL,
|
|
58
|
-
FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE cascade ON DELETE set null
|
|
59
|
-
);
|
|
60
|
-
--> statement-breakpoint
|
|
1
|
+
CREATE TABLE `roles` (
|
|
2
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
3
|
+
`name` text NOT NULL,
|
|
4
|
+
`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL,
|
|
5
|
+
`updated_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL
|
|
6
|
+
);
|
|
7
|
+
--> statement-breakpoint
|
|
8
|
+
CREATE UNIQUE INDEX `roles_name_unique` ON `roles` (`name`);--> statement-breakpoint
|
|
9
|
+
CREATE TABLE `email_verification_tokens` (
|
|
10
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
11
|
+
`email` text NOT NULL,
|
|
12
|
+
`token` text NOT NULL,
|
|
13
|
+
`expires_at` integer NOT NULL,
|
|
14
|
+
`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL
|
|
15
|
+
);
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
CREATE TABLE `password_reset_tokens` (
|
|
18
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
19
|
+
`email` text NOT NULL,
|
|
20
|
+
`token` text NOT NULL,
|
|
21
|
+
`expires_at` integer NOT NULL,
|
|
22
|
+
`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL
|
|
23
|
+
);
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
CREATE TABLE `refresh_tokens` (
|
|
26
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
27
|
+
`user_id` integer,
|
|
28
|
+
`jti` text NOT NULL,
|
|
29
|
+
`revoked` integer DEFAULT false,
|
|
30
|
+
`expires_at` integer NOT NULL,
|
|
31
|
+
`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL,
|
|
32
|
+
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE cascade ON DELETE set null
|
|
33
|
+
);
|
|
34
|
+
--> statement-breakpoint
|
|
35
|
+
CREATE UNIQUE INDEX `refresh_tokens_jti_unique` ON `refresh_tokens` (`jti`);--> statement-breakpoint
|
|
36
|
+
CREATE TABLE `users` (
|
|
37
|
+
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
|
|
38
|
+
`name` text NOT NULL,
|
|
39
|
+
`email` text NOT NULL,
|
|
40
|
+
`password` text NOT NULL,
|
|
41
|
+
`role_id` integer,
|
|
42
|
+
`email_verified_at` integer,
|
|
43
|
+
`created_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL,
|
|
44
|
+
`updated_at` integer DEFAULT (cast((julianday('now') - 2440587.5)*86400000 as integer)) NOT NULL,
|
|
45
|
+
FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE cascade ON DELETE set null
|
|
46
|
+
);
|
|
47
|
+
--> statement-breakpoint
|
|
61
48
|
CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);
|
|
@@ -1,97 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "6",
|
|
3
3
|
"dialect": "sqlite",
|
|
4
|
-
"id": "
|
|
4
|
+
"id": "f0fe475e-8a3e-4c5c-9b5e-9ec41ddfde71",
|
|
5
5
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
6
|
"tables": {
|
|
7
|
-
"notifications": {
|
|
8
|
-
"name": "notifications",
|
|
9
|
-
"columns": {
|
|
10
|
-
"id": {
|
|
11
|
-
"name": "id",
|
|
12
|
-
"type": "integer",
|
|
13
|
-
"primaryKey": true,
|
|
14
|
-
"notNull": true,
|
|
15
|
-
"autoincrement": true
|
|
16
|
-
},
|
|
17
|
-
"user_id": {
|
|
18
|
-
"name": "user_id",
|
|
19
|
-
"type": "integer",
|
|
20
|
-
"primaryKey": false,
|
|
21
|
-
"notNull": true,
|
|
22
|
-
"autoincrement": false
|
|
23
|
-
},
|
|
24
|
-
"type": {
|
|
25
|
-
"name": "type",
|
|
26
|
-
"type": "text",
|
|
27
|
-
"primaryKey": false,
|
|
28
|
-
"notNull": true,
|
|
29
|
-
"autoincrement": false
|
|
30
|
-
},
|
|
31
|
-
"title": {
|
|
32
|
-
"name": "title",
|
|
33
|
-
"type": "text",
|
|
34
|
-
"primaryKey": false,
|
|
35
|
-
"notNull": true,
|
|
36
|
-
"autoincrement": false
|
|
37
|
-
},
|
|
38
|
-
"body": {
|
|
39
|
-
"name": "body",
|
|
40
|
-
"type": "text",
|
|
41
|
-
"primaryKey": false,
|
|
42
|
-
"notNull": false,
|
|
43
|
-
"autoincrement": false
|
|
44
|
-
},
|
|
45
|
-
"data": {
|
|
46
|
-
"name": "data",
|
|
47
|
-
"type": "text",
|
|
48
|
-
"primaryKey": false,
|
|
49
|
-
"notNull": false,
|
|
50
|
-
"autoincrement": false
|
|
51
|
-
},
|
|
52
|
-
"link": {
|
|
53
|
-
"name": "link",
|
|
54
|
-
"type": "text",
|
|
55
|
-
"primaryKey": false,
|
|
56
|
-
"notNull": false,
|
|
57
|
-
"autoincrement": false
|
|
58
|
-
},
|
|
59
|
-
"read_at": {
|
|
60
|
-
"name": "read_at",
|
|
61
|
-
"type": "integer",
|
|
62
|
-
"primaryKey": false,
|
|
63
|
-
"notNull": false,
|
|
64
|
-
"autoincrement": false
|
|
65
|
-
},
|
|
66
|
-
"created_at": {
|
|
67
|
-
"name": "created_at",
|
|
68
|
-
"type": "integer",
|
|
69
|
-
"primaryKey": false,
|
|
70
|
-
"notNull": true,
|
|
71
|
-
"autoincrement": false,
|
|
72
|
-
"default": "(cast((julianday('now') - 2440587.5)*86400000 as integer))"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"indexes": {},
|
|
76
|
-
"foreignKeys": {
|
|
77
|
-
"notifications_user_id_users_id_fk": {
|
|
78
|
-
"name": "notifications_user_id_users_id_fk",
|
|
79
|
-
"tableFrom": "notifications",
|
|
80
|
-
"tableTo": "users",
|
|
81
|
-
"columnsFrom": [
|
|
82
|
-
"user_id"
|
|
83
|
-
],
|
|
84
|
-
"columnsTo": [
|
|
85
|
-
"id"
|
|
86
|
-
],
|
|
87
|
-
"onDelete": "cascade",
|
|
88
|
-
"onUpdate": "cascade"
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"compositePrimaryKeys": {},
|
|
92
|
-
"uniqueConstraints": {},
|
|
93
|
-
"checkConstraints": {}
|
|
94
|
-
},
|
|
95
7
|
"roles": {
|
|
96
8
|
"name": "roles",
|
|
97
9
|
"columns": {
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export * from "../modules/auth/database/models/
|
|
2
|
-
export * from "../modules/auth/database/models/
|
|
3
|
-
export * from "../modules/auth/database/models/user.js";
|
|
1
|
+
export * from "../modules/auth/database/models/role.js";
|
|
2
|
+
export * from "../modules/auth/database/models/user.js";
|
|
@@ -15,18 +15,29 @@ export type {
|
|
|
15
15
|
AuthProviderRefreshToken,
|
|
16
16
|
AuthProviderUser,
|
|
17
17
|
AuthUserContact,
|
|
18
|
-
AuthUserContext
|
|
18
|
+
AuthUserContext,
|
|
19
|
+
NotifiableTarget,
|
|
20
|
+
NotificationCreateInput,
|
|
21
|
+
NotificationListOptions,
|
|
22
|
+
NotificationPage,
|
|
23
|
+
NotificationProvider,
|
|
24
|
+
NotificationRecord
|
|
19
25
|
} from "@/framework/providers/contracts.js";
|
|
26
|
+
export { resolveAuthProvider, resolveNotificationProvider } from "@/framework/providers/adapter.js";
|
|
20
27
|
export { loadProviders } from "@/framework/providers/loader.js";
|
|
21
28
|
export {
|
|
22
29
|
clearAuthProvider,
|
|
30
|
+
clearNotificationProvider,
|
|
23
31
|
clearProvider,
|
|
24
32
|
getAuthProvider,
|
|
33
|
+
getNotificationProvider,
|
|
25
34
|
getProvider,
|
|
26
35
|
hasAuthProvider,
|
|
36
|
+
hasNotificationProvider,
|
|
27
37
|
hasProvider,
|
|
28
38
|
listProviders,
|
|
29
39
|
registerAuthProvider,
|
|
40
|
+
registerNotificationProvider,
|
|
30
41
|
registerProvider
|
|
31
42
|
} from "@/framework/providers/registry.js";
|
|
32
43
|
export { queue, queueJob, shouldQueue } from "@/framework/queue/queue.js";
|