@vitnode/core 1.2.0-canary.77 → 1.2.0-canary.78
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/scripts/i18n-check.d.ts.map +1 -1
- package/dist/scripts/i18n-create.d.ts +20 -0
- package/dist/scripts/i18n-create.d.ts.map +1 -0
- package/dist/scripts/i18n-delete.d.ts +4 -0
- package/dist/scripts/i18n-delete.d.ts.map +1 -0
- package/dist/scripts/i18n-shared.d.ts +51 -0
- package/dist/scripts/i18n-shared.d.ts.map +1 -0
- package/dist/scripts/i18n-update.d.ts +3 -0
- package/dist/scripts/i18n-update.d.ts.map +1 -0
- package/dist/scripts/scripts.js +58 -4
- package/dist/src/api/lib/plugin.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -1
- package/dist/src/api/middlewares/global.middleware.js +1 -1
- package/dist/src/components/languages-provider.d.ts.map +1 -1
- package/dist/src/components/languages-provider.js +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/database/languages.d.ts +0 -17
- package/dist/src/database/languages.d.ts.map +1 -1
- package/dist/src/database/languages.js +1 -1
- package/dist/src/lib/i18n/load-messages.d.ts.map +1 -1
- package/dist/src/lib/i18n/load-messages.js +1 -1
- package/dist/src/lib/i18n/sources.d.ts +8 -1
- package/dist/src/lib/i18n/sources.d.ts.map +1 -1
- package/dist/src/lib/i18n/sources.js +1 -1
- package/dist/src/lib/i18n/types.d.ts +2 -0
- package/dist/src/lib/i18n/types.d.ts.map +1 -1
- package/dist/src/lib/plugin.d.ts.map +1 -1
- package/dist/src/locales/api/en.json +19 -0
- package/dist/src/locales/api/index.d.ts +4 -0
- package/dist/src/locales/api/index.d.ts.map +1 -0
- package/dist/src/locales/api/index.js +1 -0
- package/dist/src/locales/en.json +14 -25
- package/dist/src/locales/index.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/locales/api/en.json +19 -0
- package/src/locales/api/index.ts +15 -0
- package/src/locales/en.json +14 -25
- package/src/locales/index.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitnode/core",
|
|
3
|
-
"version": "1.2.0-canary.
|
|
3
|
+
"version": "1.2.0-canary.78",
|
|
4
4
|
"description": "Core package for VitNode, providing essential functionalities and configurations.",
|
|
5
5
|
"author": "VitNode Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"vite": "^8.1.5",
|
|
76
76
|
"vitest": "^4.1.10",
|
|
77
77
|
"zod": "^4.4.3",
|
|
78
|
-
"@vitnode/config": "1.2.0-canary.
|
|
78
|
+
"@vitnode/config": "1.2.0-canary.78"
|
|
79
79
|
},
|
|
80
80
|
"bin": {
|
|
81
81
|
"vitnode": "./cli.mjs"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"core": {
|
|
3
|
+
"auth": {
|
|
4
|
+
"reset_password": {
|
|
5
|
+
"email": {
|
|
6
|
+
"subject": "Reset your password",
|
|
7
|
+
"greeting": "Hello {name}!",
|
|
8
|
+
"intro": "We received a request to reset your password for your account.",
|
|
9
|
+
"button": "Reset Password",
|
|
10
|
+
"instructions": "Click the button above to reset your password. This link will expire in 30 minutes for security reasons.",
|
|
11
|
+
"no_action": "If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.",
|
|
12
|
+
"security_note": "For your security, this request was made from IP address: {ip}",
|
|
13
|
+
"help": "If you're having trouble with the button above, copy and paste the URL below into your web browser:",
|
|
14
|
+
"expire_time": "This link will expire on {date}"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LocaleMessagesMap } from "@/lib/i18n/types";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The languages `@vitnode/core` ships for the *server* - the strings emails and
|
|
5
|
+
* other server-rendered responses use, kept apart from the frontend tree in
|
|
6
|
+
* `../index.ts` so an API-only app never loads the admin UI's messages.
|
|
7
|
+
*
|
|
8
|
+
* Same shape as the frontend barrel: a file next to this one per language, one
|
|
9
|
+
* line here. See `src/locales/index.ts` for why the annotation is explicit.
|
|
10
|
+
*/
|
|
11
|
+
const messages: LocaleMessagesMap = {
|
|
12
|
+
en: async () => await import("./en.json", { with: { type: "json" } }),
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default messages;
|
package/src/locales/en.json
CHANGED
|
@@ -190,19 +190,6 @@
|
|
|
190
190
|
"go_to_prev_page": "Go to previous page",
|
|
191
191
|
"go_to_next_page": "Go to next page",
|
|
192
192
|
"errors": {
|
|
193
|
-
"title": "Oops! Something went wrong.",
|
|
194
|
-
"internal_server_error": "Internal server error.",
|
|
195
|
-
"field_required": "This field is required.",
|
|
196
|
-
"field_min_length": "This field must be at least {min} characters.",
|
|
197
|
-
"captcha_internal_error": "Captcha validation failed. Please try again later.",
|
|
198
|
-
"404": {
|
|
199
|
-
"title": "Page Not Found",
|
|
200
|
-
"desc": "Oops! The page you're looking for doesn't exist."
|
|
201
|
-
},
|
|
202
|
-
"500": {
|
|
203
|
-
"title": "Internal Server Error",
|
|
204
|
-
"desc": "Sorry, we're experiencing technical difficulties on our server."
|
|
205
|
-
},
|
|
206
193
|
"400": {
|
|
207
194
|
"title": "Bad Request",
|
|
208
195
|
"desc": "The request couldn't be processed due to invalid parameters."
|
|
@@ -211,6 +198,10 @@
|
|
|
211
198
|
"title": "Forbidden",
|
|
212
199
|
"desc": "You don't have permission to access this resource."
|
|
213
200
|
},
|
|
201
|
+
"404": {
|
|
202
|
+
"title": "Page Not Found",
|
|
203
|
+
"desc": "Oops! The page you're looking for doesn't exist."
|
|
204
|
+
},
|
|
214
205
|
"409": {
|
|
215
206
|
"title": "Conflict",
|
|
216
207
|
"desc": "The request could not be completed due to a conflict with the current state of the resource."
|
|
@@ -219,7 +210,16 @@
|
|
|
219
210
|
"title": "Too many requests",
|
|
220
211
|
"desc": "You're doing that too fast. Please slow down and try again in a moment.",
|
|
221
212
|
"retry": "You're doing that too fast. Please try again in {seconds} seconds."
|
|
222
|
-
}
|
|
213
|
+
},
|
|
214
|
+
"500": {
|
|
215
|
+
"title": "Internal Server Error",
|
|
216
|
+
"desc": "Sorry, we're experiencing technical difficulties on our server."
|
|
217
|
+
},
|
|
218
|
+
"title": "Oops! Something went wrong.",
|
|
219
|
+
"internal_server_error": "Internal server error.",
|
|
220
|
+
"field_required": "This field is required.",
|
|
221
|
+
"field_min_length": "This field must be at least {min} characters.",
|
|
222
|
+
"captcha_internal_error": "Captcha validation failed. Please try again later."
|
|
223
223
|
},
|
|
224
224
|
"user_bar": {
|
|
225
225
|
"my_profile": "My Profile",
|
|
@@ -344,17 +344,6 @@
|
|
|
344
344
|
"title": "Check your email",
|
|
345
345
|
"desc": "We've sent a password reset link to your email address:",
|
|
346
346
|
"check_spam": "If you don't see the email in your inbox, please check your spam folder."
|
|
347
|
-
},
|
|
348
|
-
"email": {
|
|
349
|
-
"subject": "Reset your password",
|
|
350
|
-
"greeting": "Hello {name}!",
|
|
351
|
-
"intro": "We received a request to reset your password for your account.",
|
|
352
|
-
"button": "Reset Password",
|
|
353
|
-
"instructions": "Click the button above to reset your password. This link will expire in 30 minutes for security reasons.",
|
|
354
|
-
"no_action": "If you didn't request a password reset, you can safely ignore this email. Your password will remain unchanged.",
|
|
355
|
-
"security_note": "For your security, this request was made from IP address: {ip}",
|
|
356
|
-
"help": "If you're having trouble with the button above, copy and paste the URL below into your web browser:",
|
|
357
|
-
"expire_time": "This link will expire on {date}"
|
|
358
347
|
}
|
|
359
348
|
},
|
|
360
349
|
"change_password": {
|
package/src/locales/index.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { LocaleMessagesMap } from "@/lib/i18n/types";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Every language `@vitnode/core` ships
|
|
5
|
-
* here to add another; apps pick it up with no copy step.
|
|
4
|
+
* Every language `@vitnode/core` ships to the *frontend*. Add a file next to
|
|
5
|
+
* this one and a line here to add another; apps pick it up with no copy step.
|
|
6
|
+
* Server-only strings (emails) live in the sibling `api/` barrel instead, so an
|
|
7
|
+
* API-only app never loads the admin UI's messages.
|
|
6
8
|
*
|
|
7
9
|
* The annotation is deliberate - inferring it would inline the whole message
|
|
8
10
|
* tree into the emitted `.d.ts`. Key-level types come from the `next-intl`
|