create-vitnode-app 0.1.6 → 1.2.0-canary.0
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/{templates → copy-of-vitnode-app}/eslint/.prettierrc.mjs +1 -1
- package/{templates/eslint/apps/frontend → copy-of-vitnode-app/eslint}/eslint.config.mjs +1 -2
- package/copy-of-vitnode-app/root/next.config.ts +11 -0
- package/copy-of-vitnode-app/root/src/vitnode.api.config.ts +5 -0
- package/dist/src/create/create-vitnode.js +26 -0
- package/dist/src/helpers/get-available-package-managers.js +24 -0
- package/dist/src/helpers/get-package-json.js +2 -0
- package/dist/src/helpers/is-folder-empty.js +49 -0
- package/dist/src/helpers/is-writeable.js +11 -0
- package/dist/src/helpers/packages-json.js +1 -0
- package/dist/src/helpers/validate-pkg.js +14 -0
- package/dist/src/index.js +65 -0
- package/dist/src/plugin/index.js +18 -0
- package/dist/src/prepare/prepare.js +16 -0
- package/dist/src/questions.js +46 -0
- package/dist/src/validation.js +40 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +17 -27
- package/README.md +0 -40
- package/dist/index.cjs +0 -49
- package/templates/basic/.env.template +0 -16
- package/templates/basic/.gitignore_template +0 -58
- package/templates/basic/README.md +0 -44
- package/templates/basic/apps/backend/drizzle.config.ts +0 -9
- package/templates/basic/apps/backend/nest-cli.json +0 -15
- package/templates/basic/apps/backend/src/app.module.ts +0 -24
- package/templates/basic/apps/backend/src/database/config.ts +0 -16
- package/templates/basic/apps/backend/src/database/database.module.ts +0 -17
- package/templates/basic/apps/backend/src/database/database.service.ts +0 -9
- package/templates/basic/apps/backend/src/main.ts +0 -13
- package/templates/basic/apps/backend/src/plugins/plugins.module.ts +0 -8
- package/templates/basic/apps/backend/src/plugins/welcome/admin/admin.module.ts +0 -4
- package/templates/basic/apps/backend/src/plugins/welcome/admin/database/index.ts +0 -1
- package/templates/basic/apps/backend/src/plugins/welcome/config.json +0 -12
- package/templates/basic/apps/backend/src/plugins/welcome/welcome.module.ts +0 -8
- package/templates/basic/apps/backend/tsconfig.build.json +0 -4
- package/templates/basic/apps/backend/tsconfig.json +0 -15
- package/templates/basic/apps/backend/uploads/index.html +0 -0
- package/templates/basic/apps/backend/uploads/private/index.html +0 -0
- package/templates/basic/apps/backend/uploads/public/index.html +0 -0
- package/templates/basic/apps/backend/uploads/temp/index.html +0 -0
- package/templates/basic/apps/frontend/global.d.ts +0 -11
- package/templates/basic/apps/frontend/next.config.ts +0 -6
- package/templates/basic/apps/frontend/postcss.config.mjs +0 -9
- package/templates/basic/apps/frontend/public/favicon.ico +0 -0
- package/templates/basic/apps/frontend/public/sw.js +0 -3
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/[...slug]/page.tsx +0 -10
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/footer.tsx +0 -18
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/layout.tsx +0 -12
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/not-found.tsx +0 -5
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/page.tsx +0 -9
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/[...slug]/page.tsx +0 -12
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/error.tsx +0 -9
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/layout.tsx +0 -13
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/not-found.tsx +0 -5
- package/templates/basic/apps/frontend/src/app/[locale]/admin/page.tsx +0 -5
- package/templates/basic/apps/frontend/src/app/[locale]/layout.tsx +0 -13
- package/templates/basic/apps/frontend/src/app/global.css +0 -94
- package/templates/basic/apps/frontend/src/app/layout.tsx +0 -9
- package/templates/basic/apps/frontend/src/app/not-found.tsx +0 -8
- package/templates/basic/apps/frontend/src/app/robots.ts +0 -9
- package/templates/basic/apps/frontend/src/app/sitemap.ts +0 -9
- package/templates/basic/apps/frontend/src/i18n.ts +0 -13
- package/templates/basic/apps/frontend/src/middleware.ts +0 -8
- package/templates/basic/apps/frontend/src/plugins/admin/langs/en.json +0 -710
- package/templates/basic/apps/frontend/src/plugins/core/langs/en.json +0 -408
- package/templates/basic/apps/frontend/src/plugins/welcome/langs/en.json +0 -15
- package/templates/basic/apps/frontend/src/plugins/welcome/templates/default-page.tsx +0 -40
- package/templates/basic/apps/frontend/tailwind.config.ts +0 -16
- package/templates/basic/apps/frontend/tsconfig.json +0 -33
- package/templates/basic/apps/shared/plugins/welcome/example.dto.ts +0 -0
- package/templates/basic/apps/shared/tsconfig.json +0 -15
- package/templates/basic/turbo.json +0 -34
- package/templates/docker/apps/backend/DockerFile +0 -31
- package/templates/docker/apps/frontend/DockerFile +0 -38
- package/templates/docker/deploy.sh +0 -213
- package/templates/docker/docker-compose-dev.yml +0 -35
- package/templates/docker/docker-compose.yml +0 -56
- package/templates/eslint/apps/backend/eslint.config.mjs +0 -4
- package/templates/eslint/apps/shared/eslint.config.mjs +0 -4
- package/templates/pnpm/pnpm-workspace.yaml +0 -2
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { INestApplication, NestApplicationOptions } from '@nestjs/common';
|
|
2
|
-
import { NestFactory } from '@nestjs/core';
|
|
3
|
-
import { nestFactoryOptions, nestjsMainApp } from 'vitnode-backend/main';
|
|
4
|
-
|
|
5
|
-
import { AppModule } from './app.module';
|
|
6
|
-
|
|
7
|
-
async function bootstrap() {
|
|
8
|
-
const options: NestApplicationOptions = nestFactoryOptions;
|
|
9
|
-
const app: INestApplication = await NestFactory.create(AppModule, options);
|
|
10
|
-
|
|
11
|
-
void nestjsMainApp(app, {});
|
|
12
|
-
}
|
|
13
|
-
void bootstrap();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://api.vitnode.com/public/vitnode/plugin.schema.json",
|
|
3
|
-
"name": "Welcome",
|
|
4
|
-
"description": "Basic plugin with default page.",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"version_code": 1,
|
|
7
|
-
"code": "welcome",
|
|
8
|
-
"author": "VitNode",
|
|
9
|
-
"author_url": "https://vitnode.com/",
|
|
10
|
-
"support_url": "https://github.com/VitNode/vitnode/issues",
|
|
11
|
-
"nav": []
|
|
12
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"extends": "eslint-config-typescript-vitnode/tsconfig.nest.json",
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"target": "ESNext",
|
|
6
|
-
"module": "es2015",
|
|
7
|
-
"moduleResolution": "bundler",
|
|
8
|
-
"baseUrl": "./",
|
|
9
|
-
"outDir": "./dist",
|
|
10
|
-
"paths": {
|
|
11
|
-
"@/*": ["./src/*"]
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"exclude": ["uploads"]
|
|
15
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type core from '@/plugins/core/langs/en.json';
|
|
2
|
-
import type admin from '@/plugins/admin/langs/en.json';
|
|
3
|
-
import type welcome from '@/plugins/welcome/langs/en.json';
|
|
4
|
-
|
|
5
|
-
type Messages = typeof core & typeof admin & typeof welcome;
|
|
6
|
-
|
|
7
|
-
declare module 'next-intl' {
|
|
8
|
-
interface AppConfig {
|
|
9
|
-
Messages: Messages;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DynamicView,
|
|
3
|
-
generateMetadataDynamic,
|
|
4
|
-
} from 'vitnode-frontend/views/theme/views/dynamic-view';
|
|
5
|
-
|
|
6
|
-
export const generateMetadata = generateMetadataDynamic;
|
|
7
|
-
|
|
8
|
-
export default function Page(props: React.ComponentProps<typeof DynamicView>) {
|
|
9
|
-
return <DynamicView {...props} />;
|
|
10
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { getTranslations } from 'next-intl/server';
|
|
2
|
-
import { Link } from 'vitnode-frontend/navigation';
|
|
3
|
-
|
|
4
|
-
export const Footer = async () => {
|
|
5
|
-
const t = await getTranslations('core.legal');
|
|
6
|
-
|
|
7
|
-
return (
|
|
8
|
-
<footer className="container mb-14 mt-6 flex flex-col items-center justify-between gap-4 border-t py-6 text-sm sm:mb-0 sm:flex-row">
|
|
9
|
-
<Link className="text-muted-foreground" href="https://vitnode.com/">
|
|
10
|
-
Powered by <span className="text-primary font-medium">VitNode</span>
|
|
11
|
-
</Link>
|
|
12
|
-
|
|
13
|
-
<div>
|
|
14
|
-
<Link href="/legal">{t('title')}</Link>
|
|
15
|
-
</div>
|
|
16
|
-
</footer>
|
|
17
|
-
);
|
|
18
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ThemeLayout } from 'vitnode-frontend/views/theme/layout/theme-layout';
|
|
2
|
-
|
|
3
|
-
import { Footer } from './footer';
|
|
4
|
-
|
|
5
|
-
export default function Layout({ children }: { children: React.ReactNode }) {
|
|
6
|
-
return (
|
|
7
|
-
<>
|
|
8
|
-
<ThemeLayout>{children}</ThemeLayout>
|
|
9
|
-
<Footer />
|
|
10
|
-
</>
|
|
11
|
-
);
|
|
12
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import DefaultPage from '@/plugins/welcome/templates/default-page';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { generateMetadataDefaultPage } from 'vitnode-frontend/views/theme/views/default-page';
|
|
4
|
-
|
|
5
|
-
export const generateMetadata = generateMetadataDefaultPage;
|
|
6
|
-
|
|
7
|
-
export default function Page() {
|
|
8
|
-
return <DefaultPage />;
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DynamicAdminView,
|
|
3
|
-
generateMetadataDynamic,
|
|
4
|
-
} from 'vitnode-frontend/admin/dynamic-admin-view';
|
|
5
|
-
|
|
6
|
-
export const generateMetadata = generateMetadataDynamic;
|
|
7
|
-
|
|
8
|
-
export default function Page(
|
|
9
|
-
props: React.ComponentProps<typeof DynamicAdminView>,
|
|
10
|
-
) {
|
|
11
|
-
return <DynamicAdminView {...props} />;
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
AdminLayout,
|
|
4
|
-
generateMetadataAdminLayout,
|
|
5
|
-
} from 'vitnode-frontend/views/admin/layout/admin-layout';
|
|
6
|
-
|
|
7
|
-
export const generateMetadata = generateMetadataAdminLayout;
|
|
8
|
-
|
|
9
|
-
export default function Layout(
|
|
10
|
-
props: React.ComponentProps<typeof AdminLayout>,
|
|
11
|
-
) {
|
|
12
|
-
return <AdminLayout {...props} />;
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { GeistSans } from 'geist/font/sans';
|
|
2
|
-
import {
|
|
3
|
-
generateMetadataRootLayout,
|
|
4
|
-
RootLayout,
|
|
5
|
-
} from 'vitnode-frontend/views/layout/root-layout';
|
|
6
|
-
|
|
7
|
-
export const generateMetadata = generateMetadataRootLayout;
|
|
8
|
-
|
|
9
|
-
export default function Layout(
|
|
10
|
-
props: Omit<React.ComponentProps<typeof RootLayout>, 'className'>,
|
|
11
|
-
) {
|
|
12
|
-
return <RootLayout className={GeistSans.className} {...props} />;
|
|
13
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
@tailwind components;
|
|
2
|
-
@tailwind utilities;
|
|
3
|
-
@tailwind base;
|
|
4
|
-
|
|
5
|
-
@layer base {
|
|
6
|
-
* {
|
|
7
|
-
@apply border-border;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
body {
|
|
11
|
-
@apply bg-background text-foreground;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
a {
|
|
15
|
-
@apply text-primary;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:root:not(.dark) {
|
|
19
|
-
--background: 217 20% 96%;
|
|
20
|
-
--foreground: 213 5% 8%;
|
|
21
|
-
--card: 220 40% 100%;
|
|
22
|
-
--card-foreground: 213deg 26% 7%;
|
|
23
|
-
--popover: var(--card);
|
|
24
|
-
--popover-foreground: var(--card-foreground);
|
|
25
|
-
--primary: 220 58% 47%;
|
|
26
|
-
--primary-foreground: 220 40% 98%;
|
|
27
|
-
--secondary: 220 42% 94%;
|
|
28
|
-
--secondary-foreground: 210 40% 2%;
|
|
29
|
-
--muted: 220 40% 96%;
|
|
30
|
-
--muted-foreground: 220 8% 44%;
|
|
31
|
-
--accent: 220 40% 94%;
|
|
32
|
-
--accent-foreground: 222 47% 11%;
|
|
33
|
-
--destructive: 0 57% 43%;
|
|
34
|
-
--destructive-foreground: 210 40% 98%;
|
|
35
|
-
--border: 220 40% 90%;
|
|
36
|
-
--input: var(--border);
|
|
37
|
-
--ring: var(--primary);
|
|
38
|
-
--radius: 0.5rem;
|
|
39
|
-
--cover: 220 80% 67%;
|
|
40
|
-
--cover-foreground: 210 40% 98%;
|
|
41
|
-
|
|
42
|
-
--chart-1: 12 76% 61%;
|
|
43
|
-
--chart-2: 173 58% 39%;
|
|
44
|
-
--chart-3: 197 37% 24%;
|
|
45
|
-
--chart-4: 43 74% 66%;
|
|
46
|
-
--chart-5: 27 87% 67%;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.dark {
|
|
50
|
-
--background: 220 11% 6%;
|
|
51
|
-
--foreground: 0 0% 98%;
|
|
52
|
-
--card: 225 15% 9%;
|
|
53
|
-
--card-foreground: 0 0% 98%;
|
|
54
|
-
--popover: var(--card);
|
|
55
|
-
--popover-foreground: var(--card-foreground);
|
|
56
|
-
--primary: 220 83% 60%;
|
|
57
|
-
--primary-foreground: 220 40% 98%;
|
|
58
|
-
--secondary: 216 10% 18%;
|
|
59
|
-
--secondary-foreground: 0 0% 98%;
|
|
60
|
-
--muted: 225 15% 12%;
|
|
61
|
-
--muted-foreground: 216 0% 68%;
|
|
62
|
-
--accent: 225 15% 14%;
|
|
63
|
-
--accent-foreground: 0 0% 98%;
|
|
64
|
-
--destructive: 359 78% 55%;
|
|
65
|
-
--destructive-foreground: 210 40% 98%;
|
|
66
|
-
--border: 228 10% 16%;
|
|
67
|
-
--input: var(--border);
|
|
68
|
-
--ring: var(--primary);
|
|
69
|
-
--radius: 0.5rem;
|
|
70
|
-
--cover: 216 64% 39%;
|
|
71
|
-
--cover-foreground: 210 40% 98%;
|
|
72
|
-
|
|
73
|
-
--chart-1: 220 70% 50%;
|
|
74
|
-
--chart-2: 160 60% 45%;
|
|
75
|
-
--chart-3: 30 80% 55%;
|
|
76
|
-
--chart-4: 280 65% 60%;
|
|
77
|
-
--chart-5: 340 75% 55%;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@layer components {
|
|
82
|
-
.underline-strike-through {
|
|
83
|
-
text-decoration: underline line-through;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.no-scrollbar {
|
|
87
|
-
-ms-overflow-style: none;
|
|
88
|
-
scrollbar-width: none;
|
|
89
|
-
|
|
90
|
-
&::-webkit-scrollbar {
|
|
91
|
-
display: none;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getRequestConfig } from 'next-intl/server';
|
|
2
|
-
import { i18nConfigVitNode } from 'vitnode-frontend/i18n';
|
|
3
|
-
|
|
4
|
-
export default getRequestConfig(async ({ requestLocale }) => {
|
|
5
|
-
const config = await i18nConfigVitNode({
|
|
6
|
-
pathsToMessagesFromPlugins: async ({ plugin, locale }) => {
|
|
7
|
-
return await import(`./plugins/${plugin}/langs/${locale}.json`);
|
|
8
|
-
},
|
|
9
|
-
requestLocale,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
return config;
|
|
13
|
-
});
|