create-vitnode-app 1.2.0-canary.5 → 1.2.0-canary.50

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 (50) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +14 -5
  3. package/copy-of-vitnode-app/.vscode/settings.json +6 -0
  4. package/copy-of-vitnode-app/api/.gitignore_template +29 -0
  5. package/copy-of-vitnode-app/api/drizzle.config.ts +12 -0
  6. package/copy-of-vitnode-app/api/package.json +43 -0
  7. package/copy-of-vitnode-app/api/src/index.ts +27 -0
  8. package/copy-of-vitnode-app/api/src/locales/@vitnode/blog/en.json +70 -0
  9. package/copy-of-vitnode-app/api/src/locales/@vitnode/core/en.json +217 -0
  10. package/copy-of-vitnode-app/api/src/vitnode.api.config.ts +33 -0
  11. package/copy-of-vitnode-app/api/tsconfig.json +16 -0
  12. package/copy-of-vitnode-app/api-bun/src/index.ts +16 -0
  13. package/copy-of-vitnode-app/api-single-app/.env.example +8 -0
  14. package/copy-of-vitnode-app/api-single-app/.gitignore_template +37 -0
  15. package/copy-of-vitnode-app/{root → api-single-app}/src/app/api/[...route]/route.ts +0 -2
  16. package/copy-of-vitnode-app/api-single-app/src/vitnode.api.config.ts +19 -0
  17. package/copy-of-vitnode-app/docker/docker-compose.yml +20 -0
  18. package/copy-of-vitnode-app/eslint/.prettierrc.mjs +1 -1
  19. package/copy-of-vitnode-app/eslint/eslint.config.mjs +16 -2
  20. package/copy-of-vitnode-app/monorepo/.gitignore_template +41 -0
  21. package/copy-of-vitnode-app/monorepo/apps/api/.env.example +8 -0
  22. package/copy-of-vitnode-app/monorepo/apps/web/.env.example +1 -0
  23. package/copy-of-vitnode-app/monorepo/turbo.json +47 -0
  24. package/copy-of-vitnode-app/root/.env.example +9 -0
  25. package/copy-of-vitnode-app/root/.gitignore_template +37 -0
  26. package/copy-of-vitnode-app/root/README.md +48 -0
  27. package/copy-of-vitnode-app/root/global.d.ts +9 -0
  28. package/copy-of-vitnode-app/root/src/app/[locale]/(main)/layout.tsx +6 -1
  29. package/copy-of-vitnode-app/root/src/app/[locale]/(main)/page.tsx +9 -17
  30. package/copy-of-vitnode-app/root/src/app/[locale]/layout.tsx +11 -7
  31. package/copy-of-vitnode-app/root/src/app/global.css +61 -62
  32. package/copy-of-vitnode-app/root/src/middleware.ts +24 -0
  33. package/copy-of-vitnode-app/root/src/vitnode.config.ts +32 -0
  34. package/copy-of-vitnode-app/root/tsconfig.json +1 -1
  35. package/dist/src/create/create-package-json.js +231 -40
  36. package/dist/src/create/create-vitnode.js +140 -9
  37. package/dist/src/helpers/init-vitnode.js +17 -0
  38. package/dist/src/helpers/install-dependencies.js +42 -4
  39. package/dist/src/helpers/is-online.js +1 -1
  40. package/dist/src/helpers/is-writeable.js +1 -1
  41. package/dist/src/index.js +4 -1
  42. package/dist/src/prepare/prepare.js +1 -1
  43. package/dist/src/questions.js +44 -6
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +7 -7
  46. package/copy-of-vitnode-app/root/.prettierrc.mjs +0 -11
  47. package/copy-of-vitnode-app/root/src/app/[locale]/admin/not-found.tsx +0 -5
  48. package/copy-of-vitnode-app/root/src/app/not-found.tsx +0 -13
  49. package/copy-of-vitnode-app/root/src/vitnode.api.config.ts +0 -5
  50. /package/copy-of-vitnode-app/{root → api-single-app}/drizzle.config.ts +0 -0
@@ -0,0 +1,41 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # Dependencies
4
+ node_modules
5
+ .pnp
6
+ .pnp.js
7
+
8
+ # Local env files
9
+ .env
10
+ .env.local
11
+ .env.development.local
12
+ .env.test.local
13
+ .env.production.local
14
+
15
+ # Testing
16
+ coverage
17
+
18
+ # Turbo
19
+ .turbo
20
+
21
+ # Vercel
22
+ .vercel
23
+
24
+ # Build Outputs
25
+ .next/
26
+ out/
27
+ build
28
+ dist
29
+
30
+
31
+ # Debug
32
+ npm-debug.log*
33
+ yarn-debug.log*
34
+ yarn-error.log*
35
+
36
+ # Misc
37
+ .DS_Store
38
+ *.pem
39
+
40
+ # VitNode
41
+ /docker
@@ -0,0 +1,8 @@
1
+ POSTGRES_URL=postgresql://root:root@localhost:5432/vitnode
2
+
3
+ NEXT_PUBLIC_WEB_URL=http://localhost:3000
4
+
5
+ # === Docker Database Postgres ===
6
+ POSTGRES_USER=root
7
+ POSTGRES_PASSWORD=root
8
+ POSTGRES_NAME=vitnode
@@ -0,0 +1 @@
1
+ NEXT_PUBLIC_API_URL=http://localhost:8080
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "ui": "tui",
4
+ "tasks": {
5
+ "db:migrate": {
6
+ "dependsOn": ["^db:migrate"],
7
+ "persistent": true,
8
+ "cache": false,
9
+ "inputs": ["$TURBO_DEFAULT$", ".env*"],
10
+ "env": ["POSTGRES_URL"]
11
+ },
12
+ "db:push": {
13
+ "dependsOn": ["^db:push"],
14
+ "cache": false,
15
+ "persistent": true,
16
+ "inputs": ["$TURBO_DEFAULT$", ".env*"],
17
+ "env": ["POSTGRES_URL"]
18
+ },
19
+ "build": {
20
+ "dependsOn": ["^build"],
21
+ "inputs": ["$TURBO_DEFAULT$", ".env*"],
22
+ "outputs": [".next/**", "!.next/cache/**", "dist/**"],
23
+ "env": ["POSTGRES_URL", "NEXT_PUBLIC_API_URL", "NEXT_PUBLIC_WEB_URL"]
24
+ },
25
+ "lint": {
26
+ "dependsOn": ["^lint"]
27
+ },
28
+ "lint:fix": {
29
+ "dependsOn": ["^lint:fix"]
30
+ },
31
+ "dev": {
32
+ "cache": false,
33
+ "persistent": true,
34
+ "inputs": ["$TURBO_DEFAULT$", ".env*"],
35
+ "env": ["POSTGRES_URL", "NEXT_PUBLIC_API_URL", "NEXT_PUBLIC_WEB_URL"]
36
+ },
37
+ "start": {
38
+ "dependsOn": ["^start"]
39
+ },
40
+ "init": {
41
+ "cache": false,
42
+ "persistent": true,
43
+ "inputs": ["$TURBO_DEFAULT$", ".env*"],
44
+ "env": ["POSTGRES_URL", "NEXT_PUBLIC_API_URL", "NEXT_PUBLIC_WEB_URL"]
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,9 @@
1
+ POSTGRES_URL=postgresql://root:root@localhost:5432/vitnode
2
+
3
+ NEXT_PUBLIC_API_URL=http://localhost:3000
4
+ NEXT_PUBLIC_WEB_URL=http://localhost:3000
5
+
6
+ # === Docker Database Postgres ===
7
+ POSTGRES_USER=root
8
+ POSTGRES_PASSWORD=root
9
+ POSTGRES_NAME=vitnode
@@ -0,0 +1,37 @@
1
+ # Dependencies
2
+ node_modules
3
+
4
+ # Turbo
5
+ .turbo
6
+
7
+ # Generated content
8
+ .contentlayer
9
+ .content-collections
10
+ .source
11
+
12
+ # Test & Build
13
+ /coverage
14
+ /.next/
15
+ /out/
16
+ /build
17
+ *.tsbuildinfo
18
+
19
+ # Misc
20
+ .DS_Store
21
+ *.pem
22
+ /.pnp
23
+ .pnp.js
24
+ npm-debug.log*
25
+ yarn-debug.log*
26
+ yarn-error.log*
27
+
28
+ # Local env files
29
+ .env
30
+ .env.local
31
+ .env.development.local
32
+ .env.test.local
33
+ .env.production.local
34
+
35
+ # Others
36
+ .vercel
37
+ next-env.d.ts
@@ -0,0 +1,48 @@
1
+ <p align="center">
2
+ <br>
3
+ <a href="https://vitnode.com/" target="_blank">
4
+ <picture>
5
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_dark.svg">
6
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_light.svg">
7
+ <img alt="VitNode Logo" src="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_light.svg" width="400">
8
+ </picture>
9
+ </a>
10
+ <br>
11
+ <br>
12
+ </p>
13
+
14
+ # VitNode App
15
+
16
+ This is a basic template for a [VitNode](https://vitnode.com/) app.
17
+
18
+ ## Getting Started
19
+
20
+ To get started, run the following commands:
21
+
22
+ ```bash
23
+ pnpm i
24
+ # or
25
+ bun i
26
+ # or
27
+ npm i
28
+ ```
29
+
30
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
31
+
32
+ ## Development
33
+
34
+ To start the development server, you need to create a `.env` file in the root of the project from `.env.example`.
35
+
36
+ In the `development` environment, you can just copy and paste the content of `.env.example` to `.env`.
37
+
38
+ ### Development server
39
+
40
+ To start the development server, run the following command:
41
+
42
+ ```bash
43
+ pnpm dev
44
+ # or
45
+ bun dev
46
+ # or
47
+ npm run dev
48
+ ```
@@ -0,0 +1,9 @@
1
+ /// <reference types="next-intl" />
2
+
3
+ import type core from './src/locales/@vitnode/core/en.json';
4
+
5
+ declare module 'next-intl' {
6
+ interface AppConfig {
7
+ Messages: typeof core;
8
+ }
9
+ }
@@ -1,9 +1,14 @@
1
1
  import { LogoVitNode } from '@vitnode/core/components/logo-vitnode';
2
2
  import { ThemeLayout } from '@vitnode/core/views/layouts/theme/layout';
3
3
 
4
+ import { vitNodeConfig } from '../../../vitnode.config';
5
+
4
6
  export default function Layout({ children }: { children: React.ReactNode }) {
5
7
  return (
6
- <ThemeLayout logo={<LogoVitNode className="w-34" />}>
8
+ <ThemeLayout
9
+ logo={<LogoVitNode className="w-34" />}
10
+ vitNodeConfig={vitNodeConfig}
11
+ >
7
12
  {children}
8
13
  </ThemeLayout>
9
14
  );
@@ -3,16 +3,8 @@ import { buttonVariants } from '@vitnode/core/components/ui/button';
3
3
  import { Link } from '@vitnode/core/lib/navigation';
4
4
  import { cn } from '@vitnode/core/lib/utils';
5
5
  import { ArrowRight, Book, Terminal } from 'lucide-react';
6
- import { getTranslations } from 'next-intl/server';
7
-
8
- export default async function Home({
9
- params,
10
- }: {
11
- params: Promise<{ locale: string }>;
12
- }) {
13
- const { locale } = await params;
14
- const t = await getTranslations({ locale, namespace: 'welcome.home' });
15
6
 
7
+ export default function Page() {
16
8
  return (
17
9
  <main className="container mx-auto flex min-h-[calc(100vh-4rem)] flex-col items-center justify-center gap-16 px-4 py-16">
18
10
  {/* Hero Section */}
@@ -21,10 +13,10 @@ export default async function Home({
21
13
 
22
14
  <div className="space-y-4">
23
15
  <h1 className="from-foreground to-foreground/70 bg-gradient-to-br bg-clip-text text-4xl font-bold tracking-tight text-balance text-transparent md:text-5xl lg:text-6xl">
24
- {t('title')}
16
+ Start Your Journey!
25
17
  </h1>
26
18
  <p className="text-muted-foreground mx-auto max-w-2xl text-lg text-pretty">
27
- {t('desc')}
19
+ Dive in. Create or install your first plugin!
28
20
  </p>
29
21
  </div>
30
22
 
@@ -39,9 +31,9 @@ export default async function Home({
39
31
  href="/admin"
40
32
  target="_blank"
41
33
  >
42
- <Terminal className="mr-2 h-4 w-4" />
43
- {t('go_to_admin_cp')}
44
- <ArrowRight className="ml-2 h-4 w-4" />
34
+ <Terminal className="mr-2 size-4" />
35
+ Go to AdminCP
36
+ <ArrowRight className="ml-2 size-4" />
45
37
  </Link>
46
38
 
47
39
  <Link
@@ -55,8 +47,8 @@ export default async function Home({
55
47
  rel="noopener noreferrer"
56
48
  target="_blank"
57
49
  >
58
- <Book className="mr-2 h-4 w-4" />
59
- {t('read_our_docs')}
50
+ <Book className="mr-2 size-4" />
51
+ Read our Docs
60
52
  </Link>
61
53
 
62
54
  <Link
@@ -71,7 +63,7 @@ export default async function Home({
71
63
  target="_blank"
72
64
  >
73
65
  <svg
74
- className="mr-2 h-4 w-4"
66
+ className="mr-2 size-4"
75
67
  role="img"
76
68
  viewBox="0 0 24 24"
77
69
  xmlns="http://www.w3.org/2000/svg"
@@ -23,14 +23,18 @@ export const generateMetadata = (): Metadata =>
23
23
  generateMetadataRootLayout(vitNodeConfig);
24
24
 
25
25
  export const generateStaticParams = () =>
26
- vitNodeConfig.i18n.locales.map(locale => ({ locale }));
26
+ vitNodeConfig.i18n.locales.map(locale => ({ locale: locale.code }));
27
+
28
+ export default async function LocaleLayout(props: RootLayoutProps) {
29
+ const { locale } = await props.params;
27
30
 
28
- export default function LocaleLayout(props: RootLayoutProps) {
29
31
  return (
30
- <RootLayout
31
- className={`${geistSans.variable} ${geistMono.variable} antialiased`}
32
- config={vitNodeConfig}
33
- {...props}
34
- />
32
+ <html lang={locale} suppressHydrationWarning>
33
+ <body
34
+ className={`${geistSans.variable} ${geistMono.variable} antialiased`}
35
+ >
36
+ <RootLayout config={vitNodeConfig} {...props} />
37
+ </body>
38
+ </html>
35
39
  );
36
40
  }
@@ -1,78 +1,77 @@
1
- @import 'tailwindcss' source('../../src');
1
+ @import 'tailwindcss';
2
2
 
3
3
  @import 'tw-animate-css';
4
4
 
5
5
  @source "../../node_modules/@vitnode/core/dist/src/components";
6
6
  @source "../../node_modules/@vitnode/core/dist/src/views";
7
7
 
8
- @custom-variant dark (&:is(.dark *));
9
-
10
8
  :root:not(.dark) {
11
- --background: oklch(0.985 0 0);
12
- --foreground: oklch(0.145 0 0);
9
+ --background: oklch(0.96 0.01 250);
10
+ --foreground: oklch(0.18 0.01 250);
13
11
  --card: oklch(1 0 0);
14
- --card-foreground: oklch(0.145 0 0);
12
+ --card-foreground: oklch(0.22 0.01 250);
15
13
  --popover: oklch(1 0 0);
16
- --popover-foreground: oklch(0.145 0 0);
14
+ --popover-foreground: oklch(0.22 0.01 250);
17
15
  --primary: oklch(0.51 0.16 262.61);
18
16
  --primary-foreground: oklch(0.985 0 0);
19
- --secondary: oklch(0.96 0 0);
20
- --secondary-foreground: oklch(0.205 0 0);
21
- --muted: oklch(0.92 0 0);
22
- --muted-foreground: oklch(0.556 0 0);
23
- --accent: oklch(0.95 0 0);
24
- --accent-foreground: oklch(0.205 0 0);
25
- --destructive: oklch(0.577 0.245 27.325);
26
- --destructive-foreground: oklch(0.577 0.245 27.325);
27
- --border: oklch(0.922 0 0);
28
- --input: oklch(0.922 0 0);
29
- --ring: oklch(0.7 0.16 262.61);
30
- --chart-1: oklch(0.646 0.222 41.116);
31
- --chart-2: oklch(0.6 0.118 184.704);
32
- --chart-3: oklch(0.398 0.07 227.392);
33
- --chart-4: oklch(0.828 0.189 84.429);
34
- --chart-5: oklch(0.769 0.188 70.08);
35
- --sidebar: oklch(0.955 0 0);
36
- --sidebar-foreground: oklch(0.145 0 0);
37
- --sidebar-primary: oklch(0.205 0 0);
38
- --sidebar-primary-foreground: oklch(0.985 0 0);
39
- --sidebar-accent: oklch(0.92 0 0);
40
- --sidebar-accent-foreground: oklch(0.205 0 0);
41
- --sidebar-border: oklch(0.902 0 0);
42
- --sidebar-ring: oklch(0.708 0 0);
17
+ --secondary: oklch(0.94 0.02 254.94);
18
+ --secondary-foreground: oklch(0.25 0.01 250);
19
+ --muted: oklch(0.95 0.01 250);
20
+ --muted-foreground: oklch(0.35 0.01 250);
21
+ --accent: oklch(0.92 0.01 250);
22
+ --accent-foreground: oklch(0.25 0.01 250);
23
+ --destructive: oklch(0.6 0.2 24.45);
24
+ --warn: oklch(0.54 0.12 82.58);
25
+ --border: oklch(0.9 0.01 250);
26
+ --input: oklch(0.9 0.01 250);
27
+ --ring: oklch(0.7 0.13 250);
28
+ --chart-1: oklch(0.65 0.13 250);
29
+ --chart-2: oklch(0.6 0.11 260);
30
+ --chart-3: oklch(0.45 0.09 250);
31
+ --chart-4: oklch(0.8 0.13 250);
32
+ --chart-5: oklch(0.75 0.13 250);
33
+ --sidebar: var(--card);
34
+ --sidebar-foreground: oklch(0.22 0.01 250);
35
+ --sidebar-primary: var(--primary);
36
+ --sidebar-primary-foreground: var(--primary-foreground);
37
+ --sidebar-accent: oklch(0.97 0.01 250);
38
+ --sidebar-accent-foreground: oklch(0.25 0.01 250);
39
+ --sidebar-border: oklch(0.91 0.01 250);
40
+ --sidebar-ring: oklch(0.7 0.13 250);
43
41
  }
44
42
 
45
43
  .dark {
46
- --background: oklch(0.12 0 0);
47
- --foreground: oklch(0.98 0.005 240);
48
- --card: oklch(0.18 0.005 240);
49
- --card-foreground: oklch(0.98 0.005 240);
50
- --popover: oklch(0.18 0.005 240);
51
- --popover-foreground: oklch(0.98 0.005 240);
52
- --primary: oklch(0.51 0.16 262.61);
53
- --primary-foreground: oklch(0.99 0.005 240);
54
- --secondary: oklch(0.24 0.01 240);
55
- --secondary-foreground: oklch(0.98 0.005 240);
56
- --muted: oklch(0.22 0.01 240);
57
- --muted-foreground: oklch(0.75 0.005 240);
58
- --accent: oklch(0.28 0.015 240);
59
- --destructive: oklch(0.704 0.191 22.216);
60
- --border: oklch(0.269 0.005 240);
61
- --input: oklch(0.269 0.005 240);
62
- --ring: oklch(0.51 0.16 262.61);
63
- --chart-1: oklch(0.488 0.243 264.376);
64
- --chart-2: oklch(0.696 0.17 162.48);
65
- --chart-3: oklch(0.769 0.188 70.08);
66
- --chart-4: oklch(0.627 0.265 303.9);
67
- --chart-5: oklch(0.645 0.246 16.439);
68
- --sidebar: oklch(0.18 0.005 240);
69
- --sidebar-foreground: oklch(0.98 0.005 240);
70
- --sidebar-primary: oklch(0.51 0.16 262.61);
71
- --sidebar-primary-foreground: oklch(0.99 0.005 240);
72
- --sidebar-accent: oklch(0.28 0.015 240);
73
- --sidebar-accent-foreground: oklch(0.98 0.005 240);
74
- --sidebar-border: oklch(0.269 0.005 240);
75
- --sidebar-ring: oklch(0.51 0.16 262.61);
44
+ --background: oklch(0.16 0.01 250);
45
+ --foreground: oklch(0.96 0.01 250);
46
+ --card: oklch(0.2 0.01 250);
47
+ --card-foreground: oklch(0.96 0.01 250);
48
+ --popover: oklch(0.22 0.01 250);
49
+ --popover-foreground: oklch(0.96 0.01 250);
50
+ --primary: oklch(0.6 0.18 262.65);
51
+ --primary-foreground: oklch(0.98 0 0);
52
+ --secondary: oklch(0.29 0.03 264.9);
53
+ --secondary-foreground: oklch(0.96 0.01 250);
54
+ --muted: oklch(0.24 0.01 250);
55
+ --muted-foreground: oklch(0.7 0.01 250);
56
+ --accent: oklch(0.28 0.01 250);
57
+ --destructive: oklch(0.62 0.2 25.35);
58
+ --warn: oklch(0.76 0.18 81.84);
59
+ --border: oklch(0.3 0.01 250);
60
+ --input: oklch(0.3 0.01 250);
61
+ --ring: oklch(0.54 0.13 250);
62
+ --chart-1: oklch(0.45 0.09 250);
63
+ --chart-2: oklch(0.6 0.11 260);
64
+ --chart-3: oklch(0.75 0.13 250);
65
+ --chart-4: oklch(0.8 0.13 250);
66
+ --chart-5: oklch(0.65 0.13 250);
67
+ --sidebar: var(--card);
68
+ --sidebar-foreground: oklch(0.96 0.01 250);
69
+ --sidebar-primary: var(--primary);
70
+ --sidebar-primary-foreground: var(--primary-foreground);
71
+ --sidebar-accent: oklch(0.23 0.01 250);
72
+ --sidebar-accent-foreground: oklch(0.96 0.01 250);
73
+ --sidebar-border: oklch(0.26 0.01 250);
74
+ --sidebar-ring: oklch(0.54 0.13 250);
76
75
  }
77
76
 
78
77
  :root {
@@ -95,7 +94,7 @@
95
94
  --color-accent: var(--accent);
96
95
  --color-accent-foreground: var(--accent-foreground);
97
96
  --color-destructive: var(--destructive);
98
- --color-destructive-foreground: var(--destructive-foreground);
97
+ --color-warn: var(--warn);
99
98
  --color-border: var(--border);
100
99
  --color-input: var(--input);
101
100
  --color-ring: var(--ring);
@@ -0,0 +1,24 @@
1
+ import createMiddleware from 'next-intl/middleware';
2
+
3
+ import { vitNodeConfig } from './vitnode.config';
4
+
5
+ export default createMiddleware({
6
+ locales: vitNodeConfig.i18n.locales.map(locale => locale.code),
7
+ defaultLocale: vitNodeConfig.i18n.defaultLocale,
8
+ localePrefix: vitNodeConfig.i18n.localePrefix,
9
+ });
10
+
11
+ export const config = {
12
+ matcher: [
13
+ // Enable a redirect to a matching locale at the root
14
+ '/',
15
+
16
+ // Set a cookie to remember the previous locale for
17
+ // all requests that have a locale prefix
18
+ '/(en)/:path*',
19
+
20
+ // Enable redirects that add missing locales
21
+ // (e.g. `/pathnames` -> `/en/pathnames`)
22
+ '/((?!_next|_vercel|api|.*\\..*).*)',
23
+ ],
24
+ };
@@ -0,0 +1,32 @@
1
+ import { buildConfig, handleRequestConfig } from '@vitnode/core/vitnode.config';
2
+ import { getRequestConfig } from 'next-intl/server';
3
+
4
+ export const vitNodeConfig = buildConfig({
5
+ metadata: {
6
+ title: 'VitNode',
7
+ shortTitle: 'VitNode',
8
+ },
9
+ plugins: [],
10
+ i18n: {
11
+ locales: [
12
+ {
13
+ code: 'en',
14
+ name: 'English',
15
+ },
16
+ ],
17
+ defaultLocale: 'en',
18
+ },
19
+ theme: {
20
+ defaultTheme: 'light',
21
+ },
22
+ });
23
+
24
+ // This is the request config for the app. It will be used in the app router.
25
+ export default getRequestConfig(
26
+ async ({ requestLocale }) =>
27
+ await handleRequestConfig({
28
+ requestLocale,
29
+ vitNodeConfig,
30
+ pathToMessages: async path => await import(`./locales/${path}`),
31
+ }),
32
+ );
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
- "extends": "eslint-config-typescript-vitnode/tsconfig",
3
+ "extends": "@vitnode/eslint-config/tsconfig",
4
4
  "compilerOptions": {
5
5
  "target": "ESNext",
6
6
  "module": "esnext",