@vitnode/core 1.2.0-canary.19 → 1.2.0-canary.21
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/prepare-plugins-files.d.ts.map +1 -1
- package/dist/scripts/scripts.js +3 -3
- package/dist/src/app/login/page.d.ts +4 -2
- package/dist/src/app/login/page.d.ts.map +1 -1
- package/dist/src/app/login/page.js +2 -1
- package/dist/src/app/register/page.d.ts +4 -2
- package/dist/src/app/register/page.d.ts.map +1 -1
- package/dist/src/app/register/page.js +2 -1
- package/dist/src/vitnode.config.d.ts +6 -2
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +6 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/app/login/page.tsx +3 -2
- package/src/app/register/page.tsx +3 -2
- package/src/vitnode.config.ts +7 -3
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.21",
|
|
4
4
|
"description": "Core package for VitNode, providing essential functionalities and configurations.",
|
|
5
5
|
"author": "VitNode Team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"vite-tsconfig-paths": "^5.1.4",
|
|
58
58
|
"vitest": "^3.2.2",
|
|
59
59
|
"zod": "^3.25.56",
|
|
60
|
-
"@vitnode/eslint-config": "1.2.0-canary.
|
|
60
|
+
"@vitnode/eslint-config": "1.2.0-canary.21"
|
|
61
61
|
},
|
|
62
62
|
"bin": {
|
|
63
63
|
"vitnode": "./dist/scripts/scripts.js"
|
package/src/app/login/page.tsx
CHANGED
|
@@ -5,10 +5,11 @@ import { getTranslations } from 'next-intl/server';
|
|
|
5
5
|
import { SignInView } from '../../views/auth/sign-in/sign-in-view';
|
|
6
6
|
|
|
7
7
|
export const generateMetadata = async ({
|
|
8
|
-
|
|
8
|
+
params,
|
|
9
9
|
}: {
|
|
10
|
-
locale: string
|
|
10
|
+
params: Promise<{ locale: string }>;
|
|
11
11
|
}): Promise<Metadata> => {
|
|
12
|
+
const { locale } = await params;
|
|
12
13
|
const t = await getTranslations({ locale, namespace: 'core.global' });
|
|
13
14
|
|
|
14
15
|
return {
|
|
@@ -5,10 +5,11 @@ import { getTranslations } from 'next-intl/server';
|
|
|
5
5
|
import { SignUpView } from '../../views/auth/sign-up/sign-up-view';
|
|
6
6
|
|
|
7
7
|
export const generateMetadata = async ({
|
|
8
|
-
|
|
8
|
+
params,
|
|
9
9
|
}: {
|
|
10
|
-
locale: string
|
|
10
|
+
params: Promise<{ locale: string }>;
|
|
11
11
|
}): Promise<Metadata> => {
|
|
12
|
+
const { locale } = await params;
|
|
12
13
|
const t = await getTranslations({ locale, namespace: 'core.global' });
|
|
13
14
|
|
|
14
15
|
return {
|
package/src/vitnode.config.ts
CHANGED
|
@@ -63,7 +63,9 @@ export function buildApiConfig(args: VitNodeApiConfig): VitNodeApiConfig {
|
|
|
63
63
|
export const handleRequestConfig = async ({
|
|
64
64
|
requestLocale,
|
|
65
65
|
vitNodeConfig,
|
|
66
|
+
pathToMessages,
|
|
66
67
|
}: {
|
|
68
|
+
pathToMessages: (path: string) => Promise<{ default: object }>;
|
|
67
69
|
requestLocale: Promise<string | undefined>;
|
|
68
70
|
vitNodeConfig: VitNodeConfig;
|
|
69
71
|
}) => {
|
|
@@ -73,15 +75,16 @@ export const handleRequestConfig = async ({
|
|
|
73
75
|
? reqLocale
|
|
74
76
|
: vitNodeConfig.i18n.defaultLocale;
|
|
75
77
|
|
|
76
|
-
const
|
|
78
|
+
const pluginIds: string[] = [
|
|
77
79
|
'@vitnode/core',
|
|
78
80
|
...vitNodeConfig.plugins.map(plugin => plugin.pluginId),
|
|
79
81
|
];
|
|
80
82
|
|
|
81
83
|
// Import and merge messages from all plugins
|
|
82
|
-
const messagesPromises =
|
|
84
|
+
const messagesPromises = pluginIds.map(async pluginId => {
|
|
83
85
|
try {
|
|
84
|
-
const
|
|
86
|
+
const path = `${pluginId}/${locale}.json`;
|
|
87
|
+
const messages = await pathToMessages(path);
|
|
85
88
|
|
|
86
89
|
return messages.default;
|
|
87
90
|
} catch {
|
|
@@ -95,6 +98,7 @@ export const handleRequestConfig = async ({
|
|
|
95
98
|
return {
|
|
96
99
|
locale,
|
|
97
100
|
messages,
|
|
101
|
+
pluginIds,
|
|
98
102
|
timeZone: vitNodeConfig.i18n.timeZone,
|
|
99
103
|
};
|
|
100
104
|
};
|