@vitnode/core 1.2.0-canary.25 → 1.2.0-canary.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitnode/core",
3
- "version": "1.2.0-canary.25",
3
+ "version": "1.2.0-canary.26",
4
4
  "description": "Core package for VitNode, providing essential functionalities and configurations.",
5
5
  "author": "VitNode Team",
6
6
  "license": "MIT",
@@ -74,7 +74,7 @@
74
74
  "vite-tsconfig-paths": "^5.1.4",
75
75
  "vitest": "^3.2.4",
76
76
  "zod": "^3.25.67",
77
- "@vitnode/eslint-config": "1.2.0-canary.25"
77
+ "@vitnode/eslint-config": "1.2.0-canary.26"
78
78
  },
79
79
  "bin": {
80
80
  "vitnode": "./dist/scripts/scripts.js"
@@ -0,0 +1,22 @@
1
+ import type { Metadata } from 'next/dist/types';
2
+
3
+ import { getTranslations } from 'next-intl/server';
4
+
5
+ import { SignInView } from '../../views/auth/sign-in/sign-in-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({ locale, namespace: 'core.global' });
14
+
15
+ return {
16
+ title: t('login'),
17
+ };
18
+ };
19
+
20
+ export default function Page() {
21
+ return <SignInView />;
22
+ }
@@ -0,0 +1,19 @@
1
+ import { CallbackSSOView } from '@/views/auth/sso/callback/callback-sso-view';
2
+
3
+ export default async function Page({
4
+ params,
5
+ searchParams,
6
+ }: {
7
+ params: Promise<{ providerId: string }>;
8
+ searchParams: Promise<Record<string, string>>;
9
+ }) {
10
+ const { providerId } = await params;
11
+ const currentSearchParams = await searchParams;
12
+
13
+ return (
14
+ <CallbackSSOView
15
+ providerId={providerId}
16
+ searchParams={currentSearchParams}
17
+ />
18
+ );
19
+ }
@@ -0,0 +1,22 @@
1
+ import type { Metadata } from 'next/dist/types';
2
+
3
+ import { getTranslations } from 'next-intl/server';
4
+
5
+ import { SignUpView } from '../../views/auth/sign-up/sign-up-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({ locale, namespace: 'core.global' });
14
+
15
+ return {
16
+ title: t('register'),
17
+ };
18
+ };
19
+
20
+ export default function Page() {
21
+ return <SignUpView />;
22
+ }
@@ -0,0 +1,45 @@
1
+ import { getTranslations } from 'next-intl/server';
2
+ import React from 'react';
3
+
4
+ import { I18nProvider } from '@/components/i18n-provider';
5
+ import { DataTableSkeleton } from '@/components/table/data-table';
6
+ import { HeaderContent } from '@/components/ui/header-content';
7
+ import { ClearCacheAction } from '@/views/admin/views/core/debug/actions/clear-cache/clear-cache';
8
+
9
+ const SystemLogsView = React.lazy(async () =>
10
+ import('@/views/admin/views/core/debug/system-logs/system-logs-view').then(
11
+ module => ({
12
+ default: module.SystemLogsView,
13
+ }),
14
+ ),
15
+ );
16
+
17
+ export const generateMetadata = async () => {
18
+ const t = await getTranslations('admin.debug');
19
+
20
+ return {
21
+ title: t('title'),
22
+ description: t('desc'),
23
+ };
24
+ };
25
+
26
+ export default async function Page(
27
+ props: React.ComponentProps<typeof SystemLogsView>,
28
+ ) {
29
+ const t = await getTranslations('admin.debug');
30
+
31
+ return (
32
+ <I18nProvider namespaces="admin.debug">
33
+ <div className="p-4">
34
+ <HeaderContent desc={t('desc')} h1={t('title')}>
35
+ <ClearCacheAction />
36
+ </HeaderContent>
37
+
38
+ <HeaderContent h2={t('logs.title')} />
39
+ <React.Suspense fallback={<DataTableSkeleton columns={4} />}>
40
+ <SystemLogsView {...props} />
41
+ </React.Suspense>
42
+ </div>
43
+ </I18nProvider>
44
+ );
45
+ }
@@ -0,0 +1,5 @@
1
+ import { DashboardAdminView } from '../../views/admin/views/core/dashboard/dashboard-admin-view';
2
+
3
+ export default function Page() {
4
+ return <DashboardAdminView />;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { TestView } from '../../../views/admin/views/core/test';
2
+
3
+ export default function Page() {
4
+ return <TestView />;
5
+ }
@@ -0,0 +1,40 @@
1
+ import type { Metadata } from 'next/dist/types';
2
+
3
+ import { getTranslations } from 'next-intl/server';
4
+ import React from 'react';
5
+
6
+ import { DataTableSkeleton } from '@/components/table/data-table';
7
+ import { HeaderContent } from '@/components/ui/header-content';
8
+
9
+ const UsersAdminView = React.lazy(async () =>
10
+ import('@/views/admin/views/core/users/users-admin-view').then(module => ({
11
+ default: module.UsersAdminView,
12
+ })),
13
+ );
14
+
15
+ export const generateMetadata = async (): Promise<Metadata> => {
16
+ const t = await getTranslations('admin.global.nav.users');
17
+
18
+ return {
19
+ title: t('list'),
20
+ };
21
+ };
22
+
23
+ export default async function Page(
24
+ props: React.ComponentProps<typeof UsersAdminView>,
25
+ ) {
26
+ const [t, tNav] = await Promise.all([
27
+ getTranslations('admin.user.list'),
28
+ getTranslations('admin.global.nav.users'),
29
+ ]);
30
+
31
+ return (
32
+ <div className="p-4">
33
+ <HeaderContent desc={t('desc')} h1={tNav('list')} />
34
+
35
+ <React.Suspense fallback={<DataTableSkeleton columns={2} />}>
36
+ <UsersAdminView {...props} />
37
+ </React.Suspense>
38
+ </div>
39
+ );
40
+ }