@vitnode/core 1.2.0-canary.50 → 1.2.0-canary.52

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.
Files changed (164) hide show
  1. package/dist/scripts/scripts.js +2 -2
  2. package/dist/src/api/middlewares/global.middleware.d.ts +2 -10
  3. package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
  4. package/dist/src/api/models/email.d.ts +24 -8
  5. package/dist/src/api/models/email.d.ts.map +1 -1
  6. package/dist/src/api/models/email.js +27 -15
  7. package/dist/src/api/models/password.d.ts +4 -0
  8. package/dist/src/api/models/password.d.ts.map +1 -1
  9. package/dist/src/api/models/password.js +8 -0
  10. package/dist/src/api/models/session-admin.d.ts +1 -0
  11. package/dist/src/api/models/session-admin.d.ts.map +1 -1
  12. package/dist/src/api/models/session.d.ts +1 -0
  13. package/dist/src/api/models/session.d.ts.map +1 -1
  14. package/dist/src/api/models/sso.d.ts.map +1 -1
  15. package/dist/src/api/models/sso.js +8 -5
  16. package/dist/src/api/models/user/get-user-by-id.d.ts +1 -0
  17. package/dist/src/api/models/user/get-user-by-id.d.ts.map +1 -1
  18. package/dist/src/api/models/user/get-user-by-id.js +2 -1
  19. package/dist/src/api/models/user/sign-up.js +2 -2
  20. package/dist/src/api/models/user.d.ts +1 -0
  21. package/dist/src/api/models/user.d.ts.map +1 -1
  22. package/dist/src/api/modules/users/routes/change-password.route.d.ts +52 -0
  23. package/dist/src/api/modules/users/routes/change-password.route.d.ts.map +1 -0
  24. package/dist/src/api/modules/users/routes/change-password.route.js +58 -0
  25. package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts +42 -0
  26. package/dist/src/api/modules/users/routes/reset-passowrd.route.d.ts.map +1 -0
  27. package/dist/src/api/modules/users/routes/reset-passowrd.route.js +91 -0
  28. package/dist/src/api/modules/users/routes/sign-up.route.d.ts +6 -0
  29. package/dist/src/api/modules/users/routes/sign-up.route.d.ts.map +1 -1
  30. package/dist/src/api/modules/users/routes/sign-up.route.js +6 -0
  31. package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -1
  32. package/dist/src/api/modules/users/routes/test.route.js +0 -6
  33. package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +4 -1
  34. package/dist/src/api/modules/users/sso/routes/callback.route.d.ts.map +1 -1
  35. package/dist/src/api/modules/users/sso/routes/callback.route.js +3 -0
  36. package/dist/src/api/modules/users/sso/sso.module.d.ts +4 -1
  37. package/dist/src/api/modules/users/sso/sso.module.d.ts.map +1 -1
  38. package/dist/src/api/modules/users/users.module.d.ts +93 -1
  39. package/dist/src/api/modules/users/users.module.d.ts.map +1 -1
  40. package/dist/src/api/modules/users/users.module.js +5 -1
  41. package/dist/src/app/login/reset-password/page.d.ts +9 -0
  42. package/dist/src/app/login/reset-password/page.d.ts.map +1 -0
  43. package/dist/src/app/login/reset-password/page.js +18 -0
  44. package/dist/src/components/form/auto-form.d.ts +2 -1
  45. package/dist/src/components/form/auto-form.d.ts.map +1 -1
  46. package/dist/src/components/form/auto-form.js +3 -2
  47. package/dist/src/components/form/common/label.d.ts +3 -1
  48. package/dist/src/components/form/common/label.d.ts.map +1 -1
  49. package/dist/src/components/form/common/label.js +14 -4
  50. package/dist/src/components/form/fields/checkbox.d.ts +1 -1
  51. package/dist/src/components/form/fields/checkbox.d.ts.map +1 -1
  52. package/dist/src/components/form/fields/checkbox.js +2 -1
  53. package/dist/src/components/form/fields/combobox-async.d.ts +1 -1
  54. package/dist/src/components/form/fields/combobox-async.d.ts.map +1 -1
  55. package/dist/src/components/form/fields/combobox-async.js +2 -1
  56. package/dist/src/components/form/fields/combobox.d.ts +1 -1
  57. package/dist/src/components/form/fields/combobox.d.ts.map +1 -1
  58. package/dist/src/components/form/fields/combobox.js +2 -1
  59. package/dist/src/components/form/fields/input.d.ts +1 -1
  60. package/dist/src/components/form/fields/input.d.ts.map +1 -1
  61. package/dist/src/components/form/fields/input.js +2 -1
  62. package/dist/src/components/form/fields/radio-group.d.ts +1 -1
  63. package/dist/src/components/form/fields/radio-group.d.ts.map +1 -1
  64. package/dist/src/components/form/fields/radio-group.js +2 -1
  65. package/dist/src/components/form/fields/select.d.ts +1 -1
  66. package/dist/src/components/form/fields/select.d.ts.map +1 -1
  67. package/dist/src/components/form/fields/select.js +2 -1
  68. package/dist/src/components/form/fields/switch.d.ts +1 -1
  69. package/dist/src/components/form/fields/switch.d.ts.map +1 -1
  70. package/dist/src/components/form/fields/switch.js +2 -1
  71. package/dist/src/components/form/fields/textarea.d.ts +1 -1
  72. package/dist/src/components/form/fields/textarea.d.ts.map +1 -1
  73. package/dist/src/components/form/fields/textarea.js +2 -1
  74. package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
  75. package/dist/src/components/ui/alert-dialog.js +1 -2
  76. package/dist/src/components/ui/alert.d.ts +1 -1
  77. package/dist/src/components/ui/badge.d.ts +1 -1
  78. package/dist/src/components/ui/button.d.ts +1 -1
  79. package/dist/src/components/ui/button.js +1 -1
  80. package/dist/src/components/ui/card.d.ts +1 -1
  81. package/dist/src/components/ui/card.d.ts.map +1 -1
  82. package/dist/src/components/ui/card.js +1 -2
  83. package/dist/src/components/ui/form.js +1 -1
  84. package/dist/src/components/ui/popover.d.ts +1 -1
  85. package/dist/src/components/ui/popover.d.ts.map +1 -1
  86. package/dist/src/components/ui/popover.js +2 -1
  87. package/dist/src/components/ui/tooltip.d.ts +1 -1
  88. package/dist/src/components/ui/tooltip.d.ts.map +1 -1
  89. package/dist/src/components/ui/tooltip.js +6 -7
  90. package/dist/src/database/users.d.ts +21 -2
  91. package/dist/src/database/users.d.ts.map +1 -1
  92. package/dist/src/database/users.js +5 -2
  93. package/dist/src/emails/default-template.d.ts +34 -22
  94. package/dist/src/emails/default-template.d.ts.map +1 -1
  95. package/dist/src/emails/default-template.js +57 -63
  96. package/dist/src/emails/reset-password.d.ts +56 -0
  97. package/dist/src/emails/reset-password.d.ts.map +1 -0
  98. package/dist/src/emails/reset-password.js +132 -0
  99. package/dist/src/emails/ui/button.d.ts +9 -0
  100. package/dist/src/emails/ui/button.d.ts.map +1 -0
  101. package/dist/src/emails/ui/button.js +36 -0
  102. package/dist/src/emails/ui/card.d.ts +8 -0
  103. package/dist/src/emails/ui/card.d.ts.map +1 -0
  104. package/dist/src/emails/ui/card.js +39 -0
  105. package/dist/src/hooks/use-captcha.d.ts.map +1 -1
  106. package/dist/src/hooks/use-captcha.js +47 -15
  107. package/dist/src/lib/fetcher/core.d.ts.map +1 -1
  108. package/dist/src/lib/fetcher/core.js +6 -1
  109. package/dist/src/views/admin/sign-in/sign-in-admin-view.js +2 -1
  110. package/dist/src/views/auth/password-reset/change-password-form/form.d.ts +5 -0
  111. package/dist/src/views/auth/password-reset/change-password-form/form.d.ts.map +1 -0
  112. package/dist/src/views/auth/password-reset/change-password-form/form.js +48 -0
  113. package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts +6 -0
  114. package/dist/src/views/auth/password-reset/change-password-form/mutation-api.d.ts.map +1 -0
  115. package/dist/src/views/auth/password-reset/change-password-form/mutation-api.js +22 -0
  116. package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts +11 -0
  117. package/dist/src/views/auth/password-reset/change-password-form/use-form.d.ts.map +1 -0
  118. package/dist/src/views/auth/password-reset/change-password-form/use-form.js +36 -0
  119. package/dist/src/views/auth/password-reset/form/form.d.ts +6 -0
  120. package/dist/src/views/auth/password-reset/form/form.d.ts.map +1 -0
  121. package/dist/src/views/auth/password-reset/form/form.js +104 -0
  122. package/dist/src/views/auth/password-reset/form/mutation-api.d.ts +7 -0
  123. package/dist/src/views/auth/password-reset/form/mutation-api.d.ts.map +1 -0
  124. package/dist/src/views/auth/password-reset/form/mutation-api.js +21 -0
  125. package/dist/src/views/auth/password-reset/form/use-form.d.ts +12 -0
  126. package/dist/src/views/auth/password-reset/form/use-form.d.ts.map +1 -0
  127. package/dist/src/views/auth/password-reset/form/use-form.js +33 -0
  128. package/dist/src/views/auth/password-reset/password-reset-view.d.ts +7 -0
  129. package/dist/src/views/auth/password-reset/password-reset-view.d.ts.map +1 -0
  130. package/dist/src/views/auth/password-reset/password-reset-view.js +37 -0
  131. package/dist/src/views/auth/sign-in/form/form.d.ts +2 -1
  132. package/dist/src/views/auth/sign-in/form/form.d.ts.map +1 -1
  133. package/dist/src/views/auth/sign-in/form/form.js +7 -2
  134. package/dist/src/views/auth/sign-in/sign-in-view.d.ts.map +1 -1
  135. package/dist/src/views/auth/sign-in/sign-in-view.js +10 -4
  136. package/dist/src/views/auth/{components → sign-up/components}/password-input.d.ts +2 -2
  137. package/dist/src/views/auth/sign-up/components/password-input.d.ts.map +1 -0
  138. package/dist/src/views/auth/{components → sign-up/components}/password-input.js +4 -4
  139. package/dist/src/views/auth/sign-up/form/form.d.ts.map +1 -1
  140. package/dist/src/views/auth/sign-up/form/form.js +2 -15
  141. package/dist/src/views/auth/sign-up/form/mutation-api.d.ts +1 -1
  142. package/dist/src/views/auth/sign-up/form/mutation-api.d.ts.map +1 -1
  143. package/dist/src/views/auth/sign-up/form/use-form.d.ts +1 -6
  144. package/dist/src/views/auth/sign-up/form/use-form.d.ts.map +1 -1
  145. package/dist/src/views/auth/sign-up/form/use-form.js +12 -9
  146. package/dist/src/views/auth/sign-up/sign-up-view.js +1 -1
  147. package/dist/src/views/auth/sso/callback/callback-sso-view.d.ts.map +1 -1
  148. package/dist/src/views/auth/sso/callback/callback-sso-view.js +19 -5
  149. package/dist/src/views/auth/sso/callback/client/client.d.ts +3 -1
  150. package/dist/src/views/auth/sso/callback/client/client.d.ts.map +1 -1
  151. package/dist/src/views/auth/sso/callback/client/client.js +32 -3
  152. package/dist/src/views/auth/sso/callback/client/mutation-api.d.ts.map +1 -1
  153. package/dist/src/views/auth/sso/callback/client/mutation-api.js +5 -0
  154. package/dist/src/views/error/error-view.d.ts +5 -3
  155. package/dist/src/views/error/error-view.d.ts.map +1 -1
  156. package/dist/src/views/error/error-view.js +24 -22
  157. package/dist/src/views/layouts/theme/header/header.js +1 -1
  158. package/dist/src/vitnode.config.d.ts +3 -0
  159. package/dist/src/vitnode.config.d.ts.map +1 -1
  160. package/dist/tsconfig.tsbuildinfo +1 -1
  161. package/package.json +45 -44
  162. package/src/app/login/reset-password/page.tsx +27 -0
  163. package/src/locales/en.json +42 -2
  164. package/dist/src/views/auth/components/password-input.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitnode/core",
3
- "version": "1.2.0-canary.50",
3
+ "version": "1.2.0-canary.52",
4
4
  "description": "Core package for VitNode, providing essential functionalities and configurations.",
5
5
  "author": "VitNode Team",
6
6
  "license": "MIT",
@@ -19,64 +19,64 @@
19
19
  "core"
20
20
  ],
21
21
  "peerDependencies": {
22
- "@hono/zod-openapi": "1.0.x",
22
+ "@hono/zod-openapi": "^1.0.x",
23
23
  "@swc/cli": "0.6.x",
24
24
  "@swc/core": "1.12.x",
25
- "@types/react": "19.1.x",
26
- "@types/react-dom": "19.1.x",
27
- "drizzle-kit": "0.31.x",
25
+ "@types/react": "^19.1.x",
26
+ "@types/react-dom": "^19.1.x",
27
+ "drizzle-kit": "^0.31.x",
28
28
  "drizzle-orm": "^0.44.x",
29
- "hono": "4.8.x",
29
+ "hono": "^4.9.x",
30
30
  "motion": "^12.x.x",
31
- "next": "15.3.x",
32
- "next-intl": "4.x.x",
33
- "react": "19.1.x",
34
- "react-dom": "19.1.x",
31
+ "next": "^15.5.x",
32
+ "next-intl": "^4.x.x",
33
+ "react": "^19.1.x",
34
+ "react-dom": "^19.1.x",
35
35
  "react-hook-form": "^7.x.x",
36
- "typescript": "^5.8.x",
37
- "zod": "4.x.x"
36
+ "typescript": "^5.9.x",
37
+ "zod": "^4.x.x"
38
38
  },
39
39
  "devDependencies": {
40
- "@hono/zod-openapi": "^1.0.2",
40
+ "@hono/zod-openapi": "^1.1.0",
41
41
  "@hono/zod-validator": "^0.7.2",
42
- "@hookform/resolvers": "^5.1.1",
43
- "@react-email/components": "^0.3.2",
42
+ "@hookform/resolvers": "^5.2.1",
43
+ "@react-email/components": "^0.5.1",
44
44
  "@swc/cli": "0.6.0",
45
- "@swc/core": "^1.13.1",
46
- "@testing-library/dom": "^10.4.0",
45
+ "@swc/core": "^1.13.3",
46
+ "@testing-library/dom": "^10.4.1",
47
47
  "@testing-library/react": "^16.3.0",
48
- "@types/node": "^24.1.0",
49
- "@types/nodemailer": "^6.4.17",
50
- "@types/react": "^19.1.8",
51
- "@types/react-dom": "^19.1.6",
52
- "@vitejs/plugin-react": "^4.7.0",
48
+ "@types/node": "^24.3.0",
49
+ "@types/nodemailer": "^7.0.1",
50
+ "@types/react": "^19.1.10",
51
+ "@types/react-dom": "^19.1.7",
52
+ "@vitejs/plugin-react": "^5.0.1",
53
53
  "@vitest/coverage-v8": "^3.2.4",
54
54
  "chokidar": "^4.0.3",
55
55
  "concurrently": "^9.2.0",
56
- "dotenv": "^17.2.0",
56
+ "dotenv": "^17.2.1",
57
57
  "drizzle-kit": "^0.31.4",
58
- "drizzle-orm": "^0.44.3",
59
- "eslint": "^9.31.0",
60
- "hono": "^4.8.5",
58
+ "drizzle-orm": "^0.44.4",
59
+ "eslint": "^9.33.0",
60
+ "hono": "^4.9.2",
61
61
  "jsdom": "^26.1.0",
62
- "lucide-react": "^0.525.0",
63
- "next": "^15.4.2",
62
+ "lucide-react": "^0.540.0",
63
+ "next": "^15.5.0",
64
64
  "next-intl": "^4.3.4",
65
- "react": "^19.1.0",
66
- "react-dom": "^19.1.0",
67
- "react-email": "^4.2.3",
68
- "react-hook-form": "^7.60.0",
69
- "sonner": "^2.0.6",
70
- "tailwindcss": "^4.1.11",
65
+ "react": "^19.1.1",
66
+ "react-dom": "^19.1.1",
67
+ "react-email": "^4.2.8",
68
+ "react-hook-form": "^7.62.0",
69
+ "sonner": "^2.0.7",
70
+ "tailwindcss": "^4.1.12",
71
71
  "tsc-alias": "^1.8.16",
72
72
  "tsup": "^8.5.0",
73
- "tsx": "^4.20.3",
74
- "tw-animate-css": "^1.3.5",
75
- "typescript": "^5.8.3",
73
+ "tsx": "^4.20.4",
74
+ "tw-animate-css": "^1.3.7",
75
+ "typescript": "^5.9.2",
76
76
  "vite-tsconfig-paths": "^5.1.4",
77
77
  "vitest": "^3.2.4",
78
- "zod": "^4.0.5",
79
- "@vitnode/eslint-config": "1.2.0-canary.50"
78
+ "zod": "^4.0.17",
79
+ "@vitnode/eslint-config": "1.2.0-canary.52"
80
80
  },
81
81
  "bin": {
82
82
  "vitnode": "./dist/scripts/scripts.js"
@@ -99,19 +99,20 @@
99
99
  "dependencies": {
100
100
  "@dnd-kit/core": "^6.3.1",
101
101
  "@hono/swagger-ui": "^0.5.2",
102
- "@tanstack/react-query": "^5.83.0",
102
+ "@react-email/preview-server": "^4.2.8",
103
+ "@tanstack/react-query": "^5.85.5",
103
104
  "class-variance-authority": "^0.7.1",
104
105
  "clsx": "^2.1.1",
105
106
  "cmdk": "^1.1.1",
106
107
  "input-otp": "^1.4.2",
107
- "motion": "^12.23.6",
108
+ "motion": "^12.23.12",
108
109
  "next-themes": "^0.4.6",
109
110
  "nodemailer": "^7.0.5",
110
111
  "postgres": "^3.4.7",
111
- "radix-ui": "^1.4.2",
112
- "rate-limiter-flexible": "^7.1.1",
112
+ "radix-ui": "^1.4.3",
113
+ "rate-limiter-flexible": "^7.2.0",
113
114
  "react-scan": "^0.4.3",
114
- "resend": "^4.7.0",
115
+ "resend": "^6.0.1",
115
116
  "tailwind-merge": "^3.3.1",
116
117
  "use-debounce": "^10.0.5",
117
118
  "use-intl": "^4.3.4",
@@ -0,0 +1,27 @@
1
+ import type { Metadata } from 'next/dist/types';
2
+
3
+ import { getTranslations } from 'next-intl/server';
4
+
5
+ import { PasswordResetView } from '@/views/auth/password-reset/password-reset-view';
6
+
7
+ export const generateMetadata = async ({
8
+ params,
9
+ }: {
10
+ params: Promise<{ locale: string }>;
11
+ }): Promise<Metadata> => {
12
+ const { locale } = await params;
13
+ const t = await getTranslations({
14
+ locale,
15
+ namespace: 'core.auth.reset_password',
16
+ });
17
+
18
+ return {
19
+ title: t('title'),
20
+ };
21
+ };
22
+
23
+ export default function Page(
24
+ props: React.ComponentProps<typeof PasswordResetView>,
25
+ ) {
26
+ return <PasswordResetView {...props} />;
27
+ }
@@ -60,6 +60,10 @@
60
60
  "403": {
61
61
  "title": "Forbidden",
62
62
  "desc": "You don't have permission to access this resource."
63
+ },
64
+ "409": {
65
+ "title": "Conflict",
66
+ "desc": "The request could not be completed due to a conflict with the current state of the resource."
63
67
  }
64
68
  },
65
69
  "user_bar": {
@@ -70,7 +74,12 @@
70
74
  "auth": {
71
75
  "sso": {
72
76
  "or": "Or continue With",
73
- "access_denied": "You have denied access to the application or the request has expired. Please try again."
77
+ "access_denied": "You have denied access to the application or the request has expired. Please try again.",
78
+ "email_exists": {
79
+ "title": "You cannot sign in with <provider></provider>",
80
+ "desc": "An account with this email already exists. Please sign in with another method and connect your <provider></provider> account in your profile settings.",
81
+ "sign_in": "Go to Login Page"
82
+ }
74
83
  },
75
84
  "sign_up": {
76
85
  "desc": "Hello there! Create your account to get started.",
@@ -123,7 +132,8 @@
123
132
  },
124
133
  "password": {
125
134
  "label": "Password",
126
- "required": "Password is required."
135
+ "required": "Password is required.",
136
+ "reset": "Forgot password?"
127
137
  },
128
138
  "errors": {
129
139
  "access_denied": {
@@ -132,6 +142,36 @@
132
142
  }
133
143
  },
134
144
  "submit": "Login"
145
+ },
146
+ "reset_password": {
147
+ "title": "Reset Password",
148
+ "desc": "Please enter your email address below to receive a password reset link.",
149
+ "submit": "Send Reset Link",
150
+ "confirmation": {
151
+ "title": "Check your email",
152
+ "desc": "We've sent a password reset link to your email address:",
153
+ "check_spam": "If you don't see the email in your inbox, please check your spam folder."
154
+ },
155
+ "email": {
156
+ "subject": "Reset your password",
157
+ "greeting": "Hello {name}!",
158
+ "intro": "We received a request to reset your password for your account.",
159
+ "button": "Reset Password",
160
+ "instructions": "Click the button above to reset your password. This link will expire in 30 minutes for security reasons.",
161
+ "no_action": "If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.",
162
+ "security_note": "For your security, this request was made from IP address: {ip}",
163
+ "help": "If you're having trouble with the button above, copy and paste the URL below into your web browser:",
164
+ "expire_time": "This link will expire on {date}"
165
+ }
166
+ },
167
+ "change_password": {
168
+ "title": "Change Password",
169
+ "desc": "Please enter your new password below.",
170
+ "submit": "Change Password",
171
+ "success": {
172
+ "title": "Password changed successfully",
173
+ "desc": "You can now log in with your new password."
174
+ }
135
175
  }
136
176
  }
137
177
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"password-input.d.ts","sourceRoot":"","sources":["../../../../../src/views/auth/components/password-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAI9E,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAQ9C,eAAO,MAAM,aAAa,GAAI,2FAO3B,0BAA0B,GAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,EAAE,MAAM,CAAC,4CA+EjD,CAAC"}