create-vitnode-app 1.2.0-canary.17 → 1.2.0-canary.19

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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "cSpell.words": ["vitnode"],
3
+ "search.exclude": {
4
+ "**/(plugins)/*": true
5
+ }
6
+ }
@@ -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
 
@@ -40,7 +32,7 @@ export default async function Home({
40
32
  target="_blank"
41
33
  >
42
34
  <Terminal className="mr-2 h-4 w-4" />
43
- {t('go_to_admin_cp')}
35
+ Go to AdminCP
44
36
  <ArrowRight className="ml-2 h-4 w-4" />
45
37
  </Link>
46
38
 
@@ -56,7 +48,7 @@ export default async function Home({
56
48
  target="_blank"
57
49
  >
58
50
  <Book className="mr-2 h-4 w-4" />
59
- {t('read_our_docs')}
51
+ Read our Docs
60
52
  </Link>
61
53
 
62
54
  <Link
@@ -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,
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
+ };
@@ -1,4 +1,5 @@
1
1
  import { buildApiConfig } from '@vitnode/core/vitnode.config';
2
+ import { drizzle } from 'drizzle-orm/postgres-js';
2
3
 
3
4
  export const POSTGRES_URL =
4
5
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
@@ -6,4 +7,8 @@ export const POSTGRES_URL =
6
7
 
7
8
  export const vitNodeApiConfig = buildApiConfig({
8
9
  plugins: [],
10
+ dbProvider: drizzle({
11
+ connection: POSTGRES_URL,
12
+ casing: 'camelCase',
13
+ }),
9
14
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vitnode-app",
3
- "version": "1.2.0-canary.17",
3
+ "version": "1.2.0-canary.19",
4
4
  "description": "Create a new VitNode app in seconds.",
5
5
  "author": "VitNode Team",
6
6
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  "@types/validate-npm-package-name": "^4.0.2",
35
35
  "eslint": "^9.28.0",
36
36
  "typescript": "^5.8.3",
37
- "@vitnode/eslint-config": "1.2.0-canary.17"
37
+ "@vitnode/eslint-config": "1.2.0-canary.19"
38
38
  },
39
39
  "scripts": {
40
40
  "build:scripts": "tsc && node dist/src/prepare/prepare.js",