create-lumen 2.0.0-alpha.2 → 2.0.0-beta.2
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 +24 -6
- package/bin/cli.js +2 -1
- package/package.json +2 -2
- package/schema/lumen.config.v2.json +29 -0
- package/src/agent-context.js +71 -47
- package/src/cleanup.js +19 -1
- package/src/cli-args.js +131 -5
- package/src/configure.js +8 -4
- package/src/dependencies.js +46 -13
- package/src/engine/capabilities.js +71 -1
- package/src/engine/composition.js +334 -17
- package/src/engine/providers/base-provider.js +4 -4
- package/src/env.js +24 -6
- package/src/main.js +38 -15
- package/src/manifest/emit.js +14 -1
- package/src/manifest/schema.js +30 -0
- package/src/prompts.js +227 -23
- package/templates/bases/next/app-router/js/.provenance.json +19 -0
- package/templates/bases/next/app-router/js/README.md +36 -0
- package/templates/bases/next/app-router/js/jsconfig.json +7 -0
- package/templates/bases/next/app-router/js/next.config.mjs +6 -0
- package/templates/bases/next/app-router/js/package.json +15 -0
- package/templates/bases/next/app-router/js/public/file.svg +1 -0
- package/templates/bases/next/app-router/js/public/globe.svg +1 -0
- package/templates/bases/next/app-router/js/public/next.svg +1 -0
- package/templates/bases/next/app-router/js/public/vercel.svg +1 -0
- package/templates/bases/next/app-router/js/public/window.svg +1 -0
- package/templates/bases/next/app-router/js/src/app/api/hello/route.js +5 -0
- package/templates/bases/next/app-router/js/src/app/blog/[slug]/page.js +33 -0
- package/templates/bases/next/app-router/js/src/app/favicon.ico +0 -0
- package/templates/bases/next/app-router/js/src/app/globals.css +49 -0
- package/templates/bases/next/app-router/js/src/app/layout.js +25 -0
- package/templates/bases/next/app-router/js/src/app/loading.js +15 -0
- package/templates/bases/next/app-router/js/src/app/not-found.js +29 -0
- package/templates/bases/next/app-router/js/src/app/page.js +69 -0
- package/templates/bases/next/app-router/js/src/app/page.module.css +150 -0
- package/templates/bases/next/app-router/ts/.provenance.json +19 -0
- package/templates/bases/next/app-router/ts/README.md +36 -0
- package/templates/bases/next/app-router/ts/next.config.ts +7 -0
- package/templates/bases/next/app-router/ts/package.json +21 -0
- package/templates/bases/next/app-router/ts/public/file.svg +1 -0
- package/templates/bases/next/app-router/ts/public/globe.svg +1 -0
- package/templates/bases/next/app-router/ts/public/next.svg +1 -0
- package/templates/bases/next/app-router/ts/public/vercel.svg +1 -0
- package/templates/bases/next/app-router/ts/public/window.svg +1 -0
- package/templates/bases/next/app-router/ts/src/app/api/hello/route.ts +5 -0
- package/templates/bases/next/app-router/ts/src/app/blog/[slug]/page.tsx +38 -0
- package/templates/bases/next/app-router/ts/src/app/favicon.ico +0 -0
- package/templates/bases/next/app-router/ts/src/app/globals.css +49 -0
- package/templates/bases/next/app-router/ts/src/app/layout.tsx +30 -0
- package/templates/bases/next/app-router/ts/src/app/loading.tsx +15 -0
- package/templates/bases/next/app-router/ts/src/app/not-found.tsx +29 -0
- package/templates/bases/next/app-router/ts/src/app/page.module.css +150 -0
- package/templates/bases/next/app-router/ts/src/app/page.tsx +69 -0
- package/templates/bases/next/app-router/ts/tsconfig.json +34 -0
- package/templates/bases/next/pages-router/js/.provenance.json +19 -0
- package/templates/bases/next/pages-router/js/README.md +40 -0
- package/templates/bases/next/pages-router/js/jsconfig.json +7 -0
- package/templates/bases/next/pages-router/js/next.config.mjs +7 -0
- package/templates/bases/next/pages-router/js/package.json +15 -0
- package/templates/bases/next/pages-router/js/public/favicon.ico +0 -0
- package/templates/bases/next/pages-router/js/public/file.svg +1 -0
- package/templates/bases/next/pages-router/js/public/globe.svg +1 -0
- package/templates/bases/next/pages-router/js/public/next.svg +1 -0
- package/templates/bases/next/pages-router/js/public/vercel.svg +1 -0
- package/templates/bases/next/pages-router/js/public/window.svg +1 -0
- package/templates/bases/next/pages-router/js/src/pages/404.js +35 -0
- package/templates/bases/next/pages-router/js/src/pages/500.js +35 -0
- package/templates/bases/next/pages-router/js/src/pages/_app.js +20 -0
- package/templates/bases/next/pages-router/js/src/pages/_document.js +15 -0
- package/templates/bases/next/pages-router/js/src/pages/api/hello.js +5 -0
- package/templates/bases/next/pages-router/js/src/pages/blog/[slug].js +41 -0
- package/templates/bases/next/pages-router/js/src/pages/index.js +77 -0
- package/templates/bases/next/pages-router/js/src/styles/Home.module.css +149 -0
- package/templates/bases/next/pages-router/js/src/styles/globals.css +42 -0
- package/templates/bases/next/pages-router/ts/.provenance.json +19 -0
- package/templates/bases/next/pages-router/ts/README.md +40 -0
- package/templates/bases/next/pages-router/ts/next.config.ts +8 -0
- package/templates/bases/next/pages-router/ts/package.json +21 -0
- package/templates/bases/next/pages-router/ts/public/favicon.ico +0 -0
- package/templates/bases/next/pages-router/ts/public/file.svg +1 -0
- package/templates/bases/next/pages-router/ts/public/globe.svg +1 -0
- package/templates/bases/next/pages-router/ts/public/next.svg +1 -0
- package/templates/bases/next/pages-router/ts/public/vercel.svg +1 -0
- package/templates/bases/next/pages-router/ts/public/window.svg +1 -0
- package/templates/bases/next/pages-router/ts/src/pages/404.tsx +35 -0
- package/templates/bases/next/pages-router/ts/src/pages/500.tsx +35 -0
- package/templates/bases/next/pages-router/ts/src/pages/_app.tsx +21 -0
- package/templates/bases/next/pages-router/ts/src/pages/_document.tsx +15 -0
- package/templates/bases/next/pages-router/ts/src/pages/api/hello.ts +13 -0
- package/templates/bases/next/pages-router/ts/src/pages/blog/[slug].tsx +46 -0
- package/templates/bases/next/pages-router/ts/src/pages/index.tsx +77 -0
- package/templates/bases/next/pages-router/ts/src/styles/Home.module.css +149 -0
- package/templates/bases/next/pages-router/ts/src/styles/globals.css +42 -0
- package/templates/bases/next/pages-router/ts/tsconfig.json +29 -0
- package/templates/conditional/database/prisma/db.js +14 -0
- package/templates/conditional/database/prisma/db.ts +16 -0
- package/templates/conditional/database/prisma/schema.prisma +9 -0
- package/templates/conditional/database/prisma/seed.js +16 -0
- package/templates/conditional/database/prisma/seed.ts +16 -0
- package/templates/conditional/docker/.dockerignore +10 -0
- package/templates/conditional/docker/Dockerfile +57 -0
- package/templates/conditional/docker/docker-compose.yml +35 -0
- package/templates/conditional/linting/biome/biome.json +31 -0
- package/templates/conditional/next/config/cloudflare/next.config.mjs +6 -0
- package/templates/conditional/next/config/cloudflare/next.config.ts +7 -0
- package/templates/conditional/next/config/node/next.config.mjs +6 -0
- package/templates/conditional/next/config/node/next.config.ts +7 -0
- package/templates/conditional/next/config/static/next.config.mjs +6 -0
- package/templates/conditional/next/config/static/next.config.ts +7 -0
- package/templates/conditional/next/config/turbopack/next.config.mjs +7 -0
- package/templates/conditional/next/config/turbopack/next.config.ts +8 -0
- package/templates/conditional/next/config/vercel/next.config.mjs +6 -0
- package/templates/conditional/next/config/vercel/next.config.ts +7 -0
- package/templates/conditional/next/config/webpack/next.config.mjs +9 -0
- package/templates/conditional/next/config/webpack/next.config.ts +10 -0
- package/templates/conditional/next/font/BUILD_SIZE_NOTE.md +17 -0
- package/templates/conditional/next/font/app-router/src/app/layout.js +25 -0
- package/templates/conditional/next/font/app-router/src/app/layout.tsx +30 -0
- package/templates/conditional/next/font/pages-router/src/pages/_app.js +20 -0
- package/templates/conditional/next/font/pages-router/src/pages/_app.tsx +21 -0
- package/templates/conditional/next/font/pages-router/src/pages/_document.js +18 -0
- package/templates/conditional/next/font/pages-router/src/pages/_document.tsx +18 -0
- package/templates/conditional/next/font/src/app/layout.js +25 -0
- package/templates/conditional/next/font/src/app/layout.tsx +30 -0
- package/templates/conditional/next/font/src/lib/fonts.js +11 -0
- package/templates/conditional/next/font/src/lib/fonts.ts +11 -0
- package/templates/conditional/next/font/src/pages/_app.js +20 -0
- package/templates/conditional/next/font/src/pages/_app.tsx +21 -0
- package/templates/conditional/next/font/src/pages/_document.js +18 -0
- package/templates/conditional/next/font/src/pages/_document.tsx +18 -0
- package/templates/conditional/next/image/BUILD_SIZE_NOTE.md +15 -0
- package/templates/conditional/next/image/app-router/src/components/ImageExample.jsx +34 -0
- package/templates/conditional/next/image/app-router/src/components/ImageExample.tsx +44 -0
- package/templates/conditional/next/image/pages-router/src/components/ImageExample.jsx +34 -0
- package/templates/conditional/next/image/pages-router/src/components/ImageExample.tsx +44 -0
- package/templates/conditional/next/image/src/components/ImageExample.jsx +44 -0
- package/templates/conditional/next/image/src/components/ImageExample.tsx +54 -0
- package/templates/conditional/next/image/src/components/image/index.js +1 -0
- package/templates/conditional/next/image/src/components/image/index.ts +2 -0
- package/templates/conditional/next/route-groups/js/src/app/(admin)/layout.jsx +23 -0
- package/templates/conditional/next/route-groups/js/src/app/(auth)/layout.jsx +17 -0
- package/templates/conditional/next/route-groups/js/src/app/(private)/layout.jsx +27 -0
- package/templates/conditional/next/route-groups/js/src/app/(public)/layout.jsx +28 -0
- package/templates/conditional/next/route-groups/js/src/app/(public)/page.jsx +38 -0
- package/templates/conditional/next/route-groups/js/src/middleware.js +48 -0
- package/templates/conditional/next/route-groups/ts/src/app/(admin)/layout.tsx +28 -0
- package/templates/conditional/next/route-groups/ts/src/app/(auth)/layout.tsx +22 -0
- package/templates/conditional/next/route-groups/ts/src/app/(private)/layout.tsx +32 -0
- package/templates/conditional/next/route-groups/ts/src/app/(public)/layout.tsx +33 -0
- package/templates/conditional/next/route-groups/ts/src/app/(public)/page.tsx +38 -0
- package/templates/conditional/next/route-groups/ts/src/middleware.ts +49 -0
- package/templates/conditional/next/server-components/README.md +13 -0
- package/templates/conditional/next/server-components/eslint.config.mjs +47 -0
- package/templates/conditional/next/server-components/rules/no-server-imports-in-client.js +89 -0
- package/templates/conditional/next/server-components/rules/no-server-imports-in-client.mjs +88 -0
- package/templates/conditional/next/server-components/src/components/boundaries/ClientCounter.jsx +48 -0
- package/templates/conditional/next/server-components/src/components/boundaries/ClientCounter.tsx +53 -0
- package/templates/conditional/next/server-components/src/components/boundaries/ServerCard.jsx +41 -0
- package/templates/conditional/next/server-components/src/components/boundaries/ServerCard.tsx +46 -0
- package/templates/conditional/next/server-components/src/components/boundaries/index.js +2 -0
- package/templates/conditional/next/server-components/src/components/boundaries/index.ts +4 -0
- package/templates/conditional/testing/jest/next/app-router/src/__tests__/page.test.jsx +10 -0
- package/templates/conditional/testing/jest/next/app-router/src/__tests__/page.test.tsx +10 -0
- package/templates/conditional/testing/jest/next/jest.config.mjs +20 -0
- package/templates/conditional/testing/jest/next/jest.config.ts +20 -0
- package/templates/conditional/testing/jest/next/pages-router/src/__tests__/index.test.jsx +10 -0
- package/templates/conditional/testing/jest/next/pages-router/src/__tests__/index.test.tsx +10 -0
- package/templates/conditional/testing/vitest/next/app-router/src/__tests__/page.test.jsx +11 -0
- package/templates/conditional/testing/vitest/next/app-router/src/__tests__/page.test.tsx +11 -0
- package/templates/conditional/testing/vitest/next/pages-router/src/__tests__/index.test.jsx +11 -0
- package/templates/conditional/testing/vitest/next/pages-router/src/__tests__/index.test.tsx +11 -0
- package/templates/conditional/testing/vitest/next/vitest.config.js +16 -0
- package/templates/conditional/testing/vitest/next/vitest.config.ts +16 -0
package/src/dependencies.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { execa } from "execa";
|
|
2
|
+
import { normalizeFramework } from "./engine/capabilities.js";
|
|
2
3
|
|
|
3
4
|
export async function installDeps(pkgManager, dev, packages, cwd) {
|
|
4
5
|
let cmd, args;
|
|
@@ -40,14 +41,22 @@ export async function installAllDeps(responses, pkg, cwd) {
|
|
|
40
41
|
// the conditional wiring stays verifiable without a network install.
|
|
41
42
|
export function computeDeps(responses) {
|
|
42
43
|
const deps = [];
|
|
44
|
+
const fw = normalizeFramework(
|
|
45
|
+
responses.framework || {
|
|
46
|
+
name: responses.frameworkName,
|
|
47
|
+
variant: responses.frameworkVariant,
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
const fwName = fw.name;
|
|
43
51
|
const cssDevDeps = [];
|
|
52
|
+
const databaseDevDeps = [];
|
|
44
53
|
const testingDevDeps = [];
|
|
45
54
|
const linterDevDeps = [];
|
|
46
55
|
const formatterDevDeps = [];
|
|
47
56
|
|
|
48
57
|
// CSS framework
|
|
49
58
|
if (responses.cssFramework === "tailwind") {
|
|
50
|
-
if (
|
|
59
|
+
if (fwName === "next") {
|
|
51
60
|
cssDevDeps.push("tailwindcss", "@tailwindcss/postcss", "postcss");
|
|
52
61
|
} else {
|
|
53
62
|
cssDevDeps.push("tailwindcss", "@tailwindcss/vite");
|
|
@@ -79,6 +88,15 @@ export function computeDeps(responses) {
|
|
|
79
88
|
deps.push("axios");
|
|
80
89
|
}
|
|
81
90
|
|
|
91
|
+
// Database
|
|
92
|
+
if (responses.database === "prisma") {
|
|
93
|
+
deps.push("@prisma/client");
|
|
94
|
+
databaseDevDeps.push("prisma");
|
|
95
|
+
if (responses.language === "ts") {
|
|
96
|
+
databaseDevDeps.push("tsx");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
82
100
|
// Testing
|
|
83
101
|
if (responses.testing === "vitest") {
|
|
84
102
|
testingDevDeps.push(
|
|
@@ -88,22 +106,34 @@ export function computeDeps(responses) {
|
|
|
88
106
|
"jsdom"
|
|
89
107
|
);
|
|
90
108
|
} else if (responses.testing === "jest") {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
109
|
+
if (fwName === "next") {
|
|
110
|
+
testingDevDeps.push(
|
|
111
|
+
"jest",
|
|
112
|
+
"jest-environment-jsdom",
|
|
113
|
+
"@testing-library/react",
|
|
114
|
+
"@testing-library/jest-dom"
|
|
115
|
+
);
|
|
116
|
+
if (responses.language === "ts") {
|
|
117
|
+
testingDevDeps.push("@types/jest");
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
testingDevDeps.push(
|
|
121
|
+
"jest",
|
|
122
|
+
"jest-environment-jsdom",
|
|
123
|
+
"@testing-library/react",
|
|
124
|
+
"@testing-library/jest-dom",
|
|
125
|
+
"jsdom",
|
|
126
|
+
"babel-jest",
|
|
127
|
+
"@babel/preset-env",
|
|
128
|
+
"@babel/preset-react",
|
|
129
|
+
"@babel/preset-typescript"
|
|
130
|
+
);
|
|
131
|
+
}
|
|
102
132
|
}
|
|
103
133
|
|
|
104
134
|
// Linter
|
|
105
135
|
if (responses.linter === "eslint") {
|
|
106
|
-
if (
|
|
136
|
+
if (fwName === "next") {
|
|
107
137
|
linterDevDeps.push("eslint", "eslint-config-next");
|
|
108
138
|
} else {
|
|
109
139
|
linterDevDeps.push("eslint", "@eslint/js", "eslint-plugin-react-hooks", "eslint-plugin-react-refresh", "globals");
|
|
@@ -113,6 +143,8 @@ export function computeDeps(responses) {
|
|
|
113
143
|
}
|
|
114
144
|
} else if (responses.linter === "oxlint") {
|
|
115
145
|
linterDevDeps.push("oxlint");
|
|
146
|
+
} else if (responses.linter === "biome") {
|
|
147
|
+
linterDevDeps.push("@biomejs/biome");
|
|
116
148
|
}
|
|
117
149
|
|
|
118
150
|
// Formatter
|
|
@@ -130,6 +162,7 @@ export function computeDeps(responses) {
|
|
|
130
162
|
|
|
131
163
|
const devDepBatches = [
|
|
132
164
|
cssDevDeps,
|
|
165
|
+
databaseDevDeps,
|
|
133
166
|
testingDevDeps,
|
|
134
167
|
linterDevDeps,
|
|
135
168
|
formatterDevDeps,
|
|
@@ -18,6 +18,9 @@ export const CAPABILITIES = {
|
|
|
18
18
|
NEXT_IMAGE: "next-image",
|
|
19
19
|
SPA_FALLBACK: "spa-fallback",
|
|
20
20
|
AGENT_DOCS: "agent-docs",
|
|
21
|
+
DATABASE: "database",
|
|
22
|
+
DOCKER: "docker",
|
|
23
|
+
ROUTE_GROUPS: "route-groups",
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
export const FRAMEWORK_CAPABILITIES = {
|
|
@@ -37,6 +40,7 @@ export const FRAMEWORK_CAPABILITIES = {
|
|
|
37
40
|
allowedFormatters: ["prettier", "oxfmt", "none"],
|
|
38
41
|
allowedBundlers: [],
|
|
39
42
|
allowedAdapters: [],
|
|
43
|
+
allowedDatabases: [],
|
|
40
44
|
supportsRouterPrompt: true,
|
|
41
45
|
},
|
|
42
46
|
"next:app-router": {
|
|
@@ -52,6 +56,9 @@ export const FRAMEWORK_CAPABILITIES = {
|
|
|
52
56
|
CAPABILITIES.NEXT_FONT,
|
|
53
57
|
CAPABILITIES.NEXT_IMAGE,
|
|
54
58
|
CAPABILITIES.AGENT_DOCS,
|
|
59
|
+
CAPABILITIES.DATABASE,
|
|
60
|
+
CAPABILITIES.DOCKER,
|
|
61
|
+
CAPABILITIES.ROUTE_GROUPS,
|
|
55
62
|
],
|
|
56
63
|
allowedArchitectures: ["feature-based", "hybrid", "none"],
|
|
57
64
|
allowedStyling: ["tailwind", "none"],
|
|
@@ -61,6 +68,7 @@ export const FRAMEWORK_CAPABILITIES = {
|
|
|
61
68
|
allowedFormatters: ["prettier", "none"],
|
|
62
69
|
allowedBundlers: ["turbopack", "webpack"],
|
|
63
70
|
allowedAdapters: ["node", "vercel", "cloudflare", "static"],
|
|
71
|
+
allowedDatabases: ["prisma", "none"],
|
|
64
72
|
supportsRouterPrompt: false, // filesystem routing is built-in
|
|
65
73
|
},
|
|
66
74
|
"next:pages-router": {
|
|
@@ -74,6 +82,8 @@ export const FRAMEWORK_CAPABILITIES = {
|
|
|
74
82
|
CAPABILITIES.NEXT_FONT,
|
|
75
83
|
CAPABILITIES.NEXT_IMAGE,
|
|
76
84
|
CAPABILITIES.AGENT_DOCS,
|
|
85
|
+
CAPABILITIES.DATABASE,
|
|
86
|
+
CAPABILITIES.DOCKER,
|
|
77
87
|
],
|
|
78
88
|
allowedArchitectures: ["feature-based", "hybrid", "none"],
|
|
79
89
|
allowedStyling: ["tailwind", "none"],
|
|
@@ -83,6 +93,7 @@ export const FRAMEWORK_CAPABILITIES = {
|
|
|
83
93
|
allowedFormatters: ["prettier", "none"],
|
|
84
94
|
allowedBundlers: ["turbopack", "webpack"],
|
|
85
95
|
allowedAdapters: ["node", "vercel", "cloudflare", "static"],
|
|
96
|
+
allowedDatabases: ["prisma", "none"],
|
|
86
97
|
supportsRouterPrompt: false, // filesystem routing is built-in
|
|
87
98
|
},
|
|
88
99
|
};
|
|
@@ -153,6 +164,9 @@ export function isOptionCompatible(framework, optionKey, optionValue) {
|
|
|
153
164
|
case "bundler":
|
|
154
165
|
return desc.allowedBundlers.includes(optionValue);
|
|
155
166
|
case "adapter":
|
|
167
|
+
if (optionValue === "none") {
|
|
168
|
+
return desc.allowedAdapters.length > 0;
|
|
169
|
+
}
|
|
156
170
|
return desc.allowedAdapters.includes(optionValue);
|
|
157
171
|
case "router":
|
|
158
172
|
// If framework has filesystem routing, external router options (true) are incompatible
|
|
@@ -160,6 +174,27 @@ export function isOptionCompatible(framework, optionKey, optionValue) {
|
|
|
160
174
|
return optionValue === false || optionValue === "none";
|
|
161
175
|
}
|
|
162
176
|
return true;
|
|
177
|
+
case "reactCompiler":
|
|
178
|
+
if (optionValue === true) {
|
|
179
|
+
return hasCapability(framework, CAPABILITIES.REACT_COMPILER);
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
case "database":
|
|
183
|
+
case "db":
|
|
184
|
+
if (!desc.allowedDatabases || desc.allowedDatabases.length === 0) {
|
|
185
|
+
return optionValue === "none" || !optionValue;
|
|
186
|
+
}
|
|
187
|
+
return desc.allowedDatabases.includes(optionValue);
|
|
188
|
+
case "docker":
|
|
189
|
+
if (optionValue === true) {
|
|
190
|
+
return hasCapability(framework, CAPABILITIES.DOCKER);
|
|
191
|
+
}
|
|
192
|
+
return true;
|
|
193
|
+
case "routeGroups":
|
|
194
|
+
if (optionValue === true) {
|
|
195
|
+
return hasCapability(framework, CAPABILITIES.ROUTE_GROUPS);
|
|
196
|
+
}
|
|
197
|
+
return true;
|
|
163
198
|
default:
|
|
164
199
|
return true;
|
|
165
200
|
}
|
|
@@ -184,6 +219,7 @@ export function getCompatibleOptions(framework) {
|
|
|
184
219
|
formatters: [...desc.allowedFormatters],
|
|
185
220
|
bundlers: [...desc.allowedBundlers],
|
|
186
221
|
adapters: [...desc.allowedAdapters],
|
|
222
|
+
databases: [...(desc.allowedDatabases || [])],
|
|
187
223
|
supportsRouterPrompt: desc.supportsRouterPrompt,
|
|
188
224
|
};
|
|
189
225
|
}
|
|
@@ -281,6 +317,12 @@ export function isPromptVisible(framework, promptName) {
|
|
|
281
317
|
return hasCapability(fw, CAPABILITIES.ADAPTERS);
|
|
282
318
|
case "reactCompiler":
|
|
283
319
|
return hasCapability(fw, CAPABILITIES.REACT_COMPILER);
|
|
320
|
+
case "database":
|
|
321
|
+
return hasCapability(fw, CAPABILITIES.DATABASE);
|
|
322
|
+
case "docker":
|
|
323
|
+
return hasCapability(fw, CAPABILITIES.DOCKER);
|
|
324
|
+
case "routeGroups":
|
|
325
|
+
return hasCapability(fw, CAPABILITIES.ROUTE_GROUPS);
|
|
284
326
|
default:
|
|
285
327
|
return true;
|
|
286
328
|
}
|
|
@@ -318,13 +360,17 @@ export function getDefaultResponses(framework, { projectName = "my-app" } = {})
|
|
|
318
360
|
architecture: "feature-based",
|
|
319
361
|
language: "ts",
|
|
320
362
|
cssFramework: "tailwind",
|
|
321
|
-
testing: "
|
|
363
|
+
testing: "none",
|
|
322
364
|
router: false,
|
|
323
365
|
bundler: "turbopack",
|
|
324
366
|
adapter: "none",
|
|
367
|
+
uiKit: "none",
|
|
325
368
|
stateManagement: "none",
|
|
326
369
|
iconLibrary: "none",
|
|
327
370
|
apiClient: "none",
|
|
371
|
+
database: "none",
|
|
372
|
+
docker: false,
|
|
373
|
+
routeGroups: false,
|
|
328
374
|
linter: "eslint",
|
|
329
375
|
formatter: "prettier",
|
|
330
376
|
docsLanguage: "en",
|
|
@@ -342,9 +388,13 @@ export function getDefaultResponses(framework, { projectName = "my-app" } = {})
|
|
|
342
388
|
cssFramework: "tailwind",
|
|
343
389
|
testing: "vitest",
|
|
344
390
|
router: true,
|
|
391
|
+
uiKit: "none",
|
|
345
392
|
stateManagement: "none",
|
|
346
393
|
iconLibrary: "none",
|
|
347
394
|
apiClient: "none",
|
|
395
|
+
database: "none",
|
|
396
|
+
docker: false,
|
|
397
|
+
routeGroups: false,
|
|
348
398
|
linter: "eslint",
|
|
349
399
|
formatter: "prettier",
|
|
350
400
|
docsLanguage: "en",
|
|
@@ -369,6 +419,26 @@ export function sanitizeResponsesForFramework(framework, responses = {}) {
|
|
|
369
419
|
if (!isPromptVisible(fw, "router")) {
|
|
370
420
|
sanitized.router = false;
|
|
371
421
|
}
|
|
422
|
+
if (!isPromptVisible(fw, "bundler")) {
|
|
423
|
+
delete sanitized.bundler;
|
|
424
|
+
}
|
|
425
|
+
if (!isPromptVisible(fw, "adapter")) {
|
|
426
|
+
delete sanitized.adapter;
|
|
427
|
+
}
|
|
428
|
+
if (!isPromptVisible(fw, "reactCompiler")) {
|
|
429
|
+
if (sanitized.reactCompiler !== undefined) {
|
|
430
|
+
sanitized.reactCompiler = false;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
if (!isPromptVisible(fw, "database")) {
|
|
434
|
+
sanitized.database = "none";
|
|
435
|
+
}
|
|
436
|
+
if (!isPromptVisible(fw, "docker")) {
|
|
437
|
+
sanitized.docker = false;
|
|
438
|
+
}
|
|
439
|
+
if (!isPromptVisible(fw, "routeGroups")) {
|
|
440
|
+
sanitized.routeGroups = false;
|
|
441
|
+
}
|
|
372
442
|
|
|
373
443
|
for (const [key, val] of Object.entries(sanitized)) {
|
|
374
444
|
if (val === undefined || val === null) continue;
|