create-veap 0.1.4 → 0.3.1
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/README.md +72 -1
- package/bin/veap.js +1 -0
- package/dist/commands/init.d.ts +2 -2
- package/dist/commands/init.js +6 -8
- package/dist/index.js +5 -0
- package/dist/package-manager.d.ts +29 -10
- package/dist/package-manager.js +85 -22
- package/package.json +1 -1
- package/stubs/docker/.dockerignore.stub +39 -39
- package/stubs/docker/Dockerfile.stub +49 -49
- package/stubs/docker/compose.yml.stub +58 -58
- package/stubs/overlay-full/AGENTS.md.stub +1 -1
- package/stubs/overlay-full/README.md.stub +132 -0
- package/stubs/overlay-full/app/(site)/layout.tsx.stub +10 -0
- package/stubs/overlay-full/app/[[...catchAll]]/page.tsx.stub +47 -47
- package/stubs/overlay-full/app/api/[...catchAll]/route.ts.stub +111 -111
- package/stubs/overlay-full/app/error.tsx.stub +34 -34
- package/stubs/overlay-full/app/globals.css.stub +123 -123
- package/stubs/overlay-full/app/layout.tsx.stub +71 -71
- package/stubs/overlay-full/app/storage/[...path]/route.ts.stub +61 -61
- package/stubs/overlay-full/components/footer.tsx.stub +25 -0
- package/stubs/overlay-full/components/navbar.tsx.stub +61 -0
- package/stubs/overlay-full/components/site-layout.tsx.stub +22 -0
- package/stubs/overlay-full/lib/plugins.gen.ts.stub +6 -6
- package/stubs/overlay-full/lib/veap.ts.stub +27 -26
- package/stubs/overlay-full/migrations/index.ts.stub +1 -1
- package/stubs/overlay-full/next.config.ts.stub +44 -34
- package/stubs/overlay-full/proxy.ts.stub +27 -27
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { cache } from "react";
|
|
2
|
-
import { Application } from "@veap/framework/core/server";
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import { plugins } from "./plugins.gen";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.
|
|
10
|
-
.
|
|
11
|
-
.
|
|
12
|
-
.
|
|
13
|
-
.
|
|
14
|
-
.
|
|
15
|
-
.
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { cache } from "react";
|
|
2
|
+
import { Application } from "@veap/framework/core/server";
|
|
3
|
+
|
|
4
|
+
import { migrations } from "../migrations";
|
|
5
|
+
import { plugins } from "./plugins.gen";
|
|
6
|
+
import { SiteLayout } from "../components/site-layout";
|
|
7
|
+
|
|
8
|
+
export const app = Application.configure()
|
|
9
|
+
.withDatabase()
|
|
10
|
+
.withAuth()
|
|
11
|
+
.withStorage()
|
|
12
|
+
.withCommunication()
|
|
13
|
+
.withIntl()
|
|
14
|
+
.withRouter()
|
|
15
|
+
.withSiteLayout(SiteLayout)
|
|
16
|
+
.withSettings()
|
|
17
|
+
.withMigrations(migrations)
|
|
18
|
+
.withPlugins(plugins)
|
|
19
|
+
.create();
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Main system bootstrap function.
|
|
23
|
+
* Called automatically in root layout/pages.
|
|
24
|
+
*/
|
|
25
|
+
export const initializeSystem = cache(async () => {
|
|
26
|
+
return app.bootstrap();
|
|
27
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated by Veap CLI. Do not edit manually.
|
|
2
|
-
export const
|
|
2
|
+
export const migrations: any[] = [];
|
|
@@ -1,34 +1,44 @@
|
|
|
1
|
-
import type { NextConfig } from "next";
|
|
2
|
-
|
|
3
|
-
const nextConfig: NextConfig = {
|
|
4
|
-
serverExternalPackages: ["knex", "pg", "better-sqlite3"],
|
|
5
|
-
// Output for standalone build in docker (disabled on Vercel to avoid build crash)
|
|
6
|
-
output: process.env.VERCEL ? undefined : "standalone",
|
|
7
|
-
|
|
8
|
-
transpilePackages: ["@veap/framework", "@veap/ui"],
|
|
9
|
-
|
|
10
|
-
reactCompiler: true,
|
|
11
|
-
|
|
12
|
-
experimental: {
|
|
13
|
-
turbopackFileSystemCacheForBuild: true,
|
|
14
|
-
turbopackRustReactCompiler: true
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import type { NextConfig } from "next";
|
|
2
|
+
|
|
3
|
+
const nextConfig: NextConfig = {
|
|
4
|
+
serverExternalPackages: ["knex", "pg", "better-sqlite3"],
|
|
5
|
+
// Output for standalone build in docker (disabled on Vercel to avoid build crash)
|
|
6
|
+
output: process.env.VERCEL ? undefined : "standalone",
|
|
7
|
+
|
|
8
|
+
transpilePackages: ["@veap/framework", "@veap/ui"],
|
|
9
|
+
|
|
10
|
+
reactCompiler: true,
|
|
11
|
+
|
|
12
|
+
experimental: {
|
|
13
|
+
turbopackFileSystemCacheForBuild: true,
|
|
14
|
+
turbopackRustReactCompiler: true
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
// @tailwindcss/turbopack support
|
|
18
|
+
turbopack: {
|
|
19
|
+
rules: {
|
|
20
|
+
"*.css": {
|
|
21
|
+
loaders: ["@tailwindcss/turbopack"],
|
|
22
|
+
as: "*.css",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
outputFileTracingIncludes: {
|
|
28
|
+
"/**/*": ["veap.config.ts"],
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
typescript: {
|
|
32
|
+
// !! WARN !!
|
|
33
|
+
// Dangerously allow production builds to successfully complete even if
|
|
34
|
+
// your project has type errors.
|
|
35
|
+
// !! WARN !!
|
|
36
|
+
ignoreBuildErrors: true,
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
images: {
|
|
40
|
+
unoptimized: true,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default nextConfig;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { NextRequest } from "next/server";
|
|
2
|
-
import { NextResponse } from "next/server";
|
|
3
|
-
|
|
4
|
-
export function proxy(request: NextRequest) {
|
|
5
|
-
const url = new URL(request.url);
|
|
6
|
-
const requestHeaders = new Headers(request.headers);
|
|
7
|
-
requestHeaders.set("x-pathname", url.pathname);
|
|
8
|
-
|
|
9
|
-
return NextResponse.next({
|
|
10
|
-
request: {
|
|
11
|
-
headers: requestHeaders,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const config = {
|
|
17
|
-
matcher: [
|
|
18
|
-
/*
|
|
19
|
-
* Match all request paths except for the ones starting with:
|
|
20
|
-
* - api (API routes)
|
|
21
|
-
* - _next/static (static files)
|
|
22
|
-
* - _next/image (image optimization files)
|
|
23
|
-
* - favicon.ico (favicon file)
|
|
24
|
-
*/
|
|
25
|
-
"/((?!api|_next/static|_next/image|favicon.ico).*)",
|
|
26
|
-
],
|
|
27
|
-
};
|
|
1
|
+
import type { NextRequest } from "next/server";
|
|
2
|
+
import { NextResponse } from "next/server";
|
|
3
|
+
|
|
4
|
+
export function proxy(request: NextRequest) {
|
|
5
|
+
const url = new URL(request.url);
|
|
6
|
+
const requestHeaders = new Headers(request.headers);
|
|
7
|
+
requestHeaders.set("x-pathname", url.pathname);
|
|
8
|
+
|
|
9
|
+
return NextResponse.next({
|
|
10
|
+
request: {
|
|
11
|
+
headers: requestHeaders,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const config = {
|
|
17
|
+
matcher: [
|
|
18
|
+
/*
|
|
19
|
+
* Match all request paths except for the ones starting with:
|
|
20
|
+
* - api (API routes)
|
|
21
|
+
* - _next/static (static files)
|
|
22
|
+
* - _next/image (image optimization files)
|
|
23
|
+
* - favicon.ico (favicon file)
|
|
24
|
+
*/
|
|
25
|
+
"/((?!api|_next/static|_next/image|favicon.ico).*)",
|
|
26
|
+
],
|
|
27
|
+
};
|