@react-spa-scaffold/mcp 1.1.3 → 1.2.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/README.md +19 -15
- package/dist/features/definitions/api.d.ts +3 -0
- package/dist/features/definitions/api.d.ts.map +1 -0
- package/dist/features/definitions/api.js +20 -0
- package/dist/features/definitions/api.js.map +1 -0
- package/dist/features/definitions/ci.d.ts +3 -0
- package/dist/features/definitions/ci.d.ts.map +1 -0
- package/dist/features/definitions/ci.js +25 -0
- package/dist/features/definitions/ci.js.map +1 -0
- package/dist/features/definitions/core.d.ts +3 -0
- package/dist/features/definitions/core.d.ts.map +1 -0
- package/dist/features/definitions/core.js +76 -0
- package/dist/features/definitions/core.js.map +1 -0
- package/dist/features/definitions/devtools.d.ts +3 -0
- package/dist/features/definitions/devtools.d.ts.map +1 -0
- package/dist/features/definitions/devtools.js +53 -0
- package/dist/features/definitions/devtools.js.map +1 -0
- package/dist/features/definitions/forms.d.ts +3 -0
- package/dist/features/definitions/forms.d.ts.map +1 -0
- package/dist/features/definitions/forms.js +32 -0
- package/dist/features/definitions/forms.js.map +1 -0
- package/dist/features/definitions/i18n.d.ts +3 -0
- package/dist/features/definitions/i18n.d.ts.map +1 -0
- package/dist/features/definitions/i18n.js +50 -0
- package/dist/features/definitions/i18n.js.map +1 -0
- package/dist/features/definitions/index.d.ts +15 -0
- package/dist/features/definitions/index.d.ts.map +1 -0
- package/dist/features/definitions/index.js +15 -0
- package/dist/features/definitions/index.js.map +1 -0
- package/dist/features/definitions/mobile.d.ts +3 -0
- package/dist/features/definitions/mobile.d.ts.map +1 -0
- package/dist/features/definitions/mobile.js +19 -0
- package/dist/features/definitions/mobile.js.map +1 -0
- package/dist/features/definitions/observability.d.ts +3 -0
- package/dist/features/definitions/observability.d.ts.map +1 -0
- package/dist/features/definitions/observability.js +21 -0
- package/dist/features/definitions/observability.js.map +1 -0
- package/dist/features/definitions/performance.d.ts +3 -0
- package/dist/features/definitions/performance.d.ts.map +1 -0
- package/dist/features/definitions/performance.js +28 -0
- package/dist/features/definitions/performance.js.map +1 -0
- package/dist/features/definitions/routing.d.ts +3 -0
- package/dist/features/definitions/routing.d.ts.map +1 -0
- package/dist/features/definitions/routing.js +25 -0
- package/dist/features/definitions/routing.js.map +1 -0
- package/dist/features/definitions/state.d.ts +3 -0
- package/dist/features/definitions/state.d.ts.map +1 -0
- package/dist/features/definitions/state.js +27 -0
- package/dist/features/definitions/state.js.map +1 -0
- package/dist/features/definitions/testing.d.ts +3 -0
- package/dist/features/definitions/testing.d.ts.map +1 -0
- package/dist/features/definitions/testing.js +56 -0
- package/dist/features/definitions/testing.js.map +1 -0
- package/dist/features/definitions/theming.d.ts +3 -0
- package/dist/features/definitions/theming.d.ts.map +1 -0
- package/dist/features/definitions/theming.js +26 -0
- package/dist/features/definitions/theming.js.map +1 -0
- package/dist/features/definitions/ui.d.ts +3 -0
- package/dist/features/definitions/ui.d.ts.map +1 -0
- package/dist/features/definitions/ui.js +44 -0
- package/dist/features/definitions/ui.js.map +1 -0
- package/dist/features/index.d.ts +3 -2
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +2 -1
- package/dist/features/index.js.map +1 -1
- package/dist/features/registry.d.ts +3 -9
- package/dist/features/registry.d.ts.map +1 -1
- package/dist/features/registry.js +3 -554
- package/dist/features/registry.js.map +1 -1
- package/dist/features/types.d.ts +11 -9
- package/dist/features/types.d.ts.map +1 -1
- package/dist/features/types.js +24 -1
- package/dist/features/types.js.map +1 -1
- package/dist/server.d.ts +2 -7
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +22 -56
- package/dist/server.js.map +1 -1
- package/dist/server.test.d.ts +2 -0
- package/dist/server.test.d.ts.map +1 -0
- package/dist/server.test.js +14 -0
- package/dist/server.test.js.map +1 -0
- package/dist/tools/get-example.test.d.ts +5 -0
- package/dist/tools/get-example.test.d.ts.map +1 -0
- package/dist/tools/get-example.test.js +63 -0
- package/dist/tools/get-example.test.js.map +1 -0
- package/dist/tools/get-features.d.ts +0 -5
- package/dist/tools/get-features.d.ts.map +1 -1
- package/dist/tools/get-features.js +0 -2
- package/dist/tools/get-features.js.map +1 -1
- package/dist/tools/get-features.test.d.ts +5 -0
- package/dist/tools/get-features.test.d.ts.map +1 -0
- package/dist/tools/get-features.test.js +45 -0
- package/dist/tools/get-features.test.js.map +1 -0
- package/dist/tools/get-scaffold.d.ts +2 -2
- package/dist/tools/get-scaffold.test.d.ts +5 -0
- package/dist/tools/get-scaffold.test.d.ts.map +1 -0
- package/dist/tools/get-scaffold.test.js +194 -0
- package/dist/tools/get-scaffold.test.js.map +1 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/registry.d.ts +9 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +29 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +23 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +5 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/utils/cache.d.ts +21 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +45 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/docs.test.d.ts +5 -0
- package/dist/utils/docs.test.d.ts.map +1 -0
- package/dist/utils/docs.test.js +37 -0
- package/dist/utils/docs.test.js.map +1 -0
- package/dist/utils/errors.d.ts +8 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +19 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/examples/api-patterns.d.ts +3 -0
- package/dist/utils/examples/api-patterns.d.ts.map +1 -0
- package/dist/utils/examples/api-patterns.js +19 -0
- package/dist/utils/examples/api-patterns.js.map +1 -0
- package/dist/utils/examples/component-patterns.d.ts +3 -0
- package/dist/utils/examples/component-patterns.d.ts.map +1 -0
- package/dist/utils/examples/component-patterns.js +71 -0
- package/dist/utils/examples/component-patterns.js.map +1 -0
- package/dist/utils/examples/context-patterns.d.ts +3 -0
- package/dist/utils/examples/context-patterns.d.ts.map +1 -0
- package/dist/utils/examples/context-patterns.js +32 -0
- package/dist/utils/examples/context-patterns.js.map +1 -0
- package/dist/utils/examples/hook-patterns.d.ts +3 -0
- package/dist/utils/examples/hook-patterns.d.ts.map +1 -0
- package/dist/utils/examples/hook-patterns.js +55 -0
- package/dist/utils/examples/hook-patterns.js.map +1 -0
- package/dist/utils/examples/i18n-patterns.d.ts +3 -0
- package/dist/utils/examples/i18n-patterns.d.ts.map +1 -0
- package/dist/utils/examples/i18n-patterns.js +43 -0
- package/dist/utils/examples/i18n-patterns.js.map +1 -0
- package/dist/utils/examples/index.d.ts +12 -0
- package/dist/utils/examples/index.d.ts.map +1 -0
- package/dist/utils/examples/index.js +69 -0
- package/dist/utils/examples/index.js.map +1 -0
- package/dist/utils/examples/mobile-patterns.d.ts +3 -0
- package/dist/utils/examples/mobile-patterns.d.ts.map +1 -0
- package/dist/utils/examples/mobile-patterns.js +38 -0
- package/dist/utils/examples/mobile-patterns.js.map +1 -0
- package/dist/utils/examples/page-patterns.d.ts +3 -0
- package/dist/utils/examples/page-patterns.d.ts.map +1 -0
- package/dist/utils/examples/page-patterns.js +34 -0
- package/dist/utils/examples/page-patterns.js.map +1 -0
- package/dist/utils/examples/store-patterns.d.ts +3 -0
- package/dist/utils/examples/store-patterns.d.ts.map +1 -0
- package/dist/utils/examples/store-patterns.js +40 -0
- package/dist/utils/examples/store-patterns.js.map +1 -0
- package/dist/utils/examples/test-patterns.d.ts +3 -0
- package/dist/utils/examples/test-patterns.d.ts.map +1 -0
- package/dist/utils/examples/test-patterns.js +58 -0
- package/dist/utils/examples/test-patterns.js.map +1 -0
- package/dist/utils/examples/types.d.ts +17 -0
- package/dist/utils/examples/types.d.ts.map +1 -0
- package/dist/utils/examples/types.js +2 -0
- package/dist/utils/examples/types.js.map +1 -0
- package/dist/utils/examples/utility-patterns.d.ts +3 -0
- package/dist/utils/examples/utility-patterns.d.ts.map +1 -0
- package/dist/utils/examples/utility-patterns.js +77 -0
- package/dist/utils/examples/utility-patterns.js.map +1 -0
- package/dist/utils/index.d.ts +5 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/paths.d.ts +6 -25
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +11 -40
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/paths.test.d.ts +2 -0
- package/dist/utils/paths.test.d.ts.map +1 -0
- package/dist/utils/paths.test.js +17 -0
- package/dist/utils/paths.test.js.map +1 -0
- package/dist/utils/scaffold/commands.d.ts +11 -0
- package/dist/utils/scaffold/commands.d.ts.map +1 -0
- package/dist/utils/scaffold/commands.js +22 -0
- package/dist/utils/scaffold/commands.js.map +1 -0
- package/dist/utils/scaffold/compute.d.ts +18 -0
- package/dist/utils/scaffold/compute.d.ts.map +1 -0
- package/dist/utils/scaffold/compute.js +78 -0
- package/dist/utils/scaffold/compute.js.map +1 -0
- package/dist/utils/scaffold/dependencies.d.ts +32 -0
- package/dist/utils/scaffold/dependencies.d.ts.map +1 -0
- package/dist/utils/scaffold/dependencies.js +107 -0
- package/dist/utils/scaffold/dependencies.js.map +1 -0
- package/dist/utils/scaffold/file-structure.d.ts +23 -0
- package/dist/utils/scaffold/file-structure.d.ts.map +1 -0
- package/dist/utils/scaffold/file-structure.js +62 -0
- package/dist/utils/scaffold/file-structure.js.map +1 -0
- package/dist/utils/scaffold/generators.d.ts +17 -0
- package/dist/utils/scaffold/generators.d.ts.map +1 -0
- package/dist/utils/{scaffold.js → scaffold/generators.js} +6 -254
- package/dist/utils/scaffold/generators.js.map +1 -0
- package/dist/utils/scaffold/index.d.ts +11 -0
- package/dist/utils/scaffold/index.d.ts.map +1 -0
- package/dist/utils/scaffold/index.js +11 -0
- package/dist/utils/scaffold/index.js.map +1 -0
- package/package.json +1 -1
- package/templates/.github/workflows/release.yml +1 -1
- package/templates/e2e/tests/home.spec.ts +2 -2
- package/templates/e2e/tests/language.spec.ts +7 -3
- package/dist/utils/examples.d.ts +0 -27
- package/dist/utils/examples.d.ts.map +0 -1
- package/dist/utils/examples.js +0 -438
- package/dist/utils/examples.js.map +0 -1
- package/dist/utils/scaffold.d.ts +0 -59
- package/dist/utils/scaffold.d.ts.map +0 -1
- package/dist/utils/scaffold.js.map +0 -1
|
@@ -1,184 +1,5 @@
|
|
|
1
1
|
// noinspection JSUnresolvedReference
|
|
2
|
-
/**
|
|
3
|
-
* Scaffold computation utilities
|
|
4
|
-
*/
|
|
5
|
-
import { readFile } from 'fs/promises';
|
|
6
|
-
import { FEATURES } from '../features/index.js';
|
|
7
|
-
import { computeDocsContent, computeDocsForFeatures } from './docs.js';
|
|
8
|
-
import { resolveTemplatePath } from './paths.js';
|
|
9
|
-
/**
|
|
10
|
-
* Resolve selected features (always includes core)
|
|
11
|
-
*
|
|
12
|
-
* Features are mostly independent, with one exception:
|
|
13
|
-
* - theming requires state feature (for Zustand persistence)
|
|
14
|
-
*/
|
|
15
|
-
export function resolveFeatureDependencies(selectedFeatures) {
|
|
16
|
-
const resolved = new Set();
|
|
17
|
-
// Always include core
|
|
18
|
-
resolved.add('core');
|
|
19
|
-
// Add all selected features (no recursive dependency resolution)
|
|
20
|
-
for (const featureId of selectedFeatures) {
|
|
21
|
-
const feature = FEATURES[featureId];
|
|
22
|
-
if (feature) {
|
|
23
|
-
resolved.add(featureId);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
// Theming requires state feature for Zustand persistence
|
|
27
|
-
if (resolved.has('theming') && !resolved.has('state')) {
|
|
28
|
-
resolved.add('state');
|
|
29
|
-
}
|
|
30
|
-
return Array.from(resolved);
|
|
31
|
-
}
|
|
32
|
-
// Cache for source package.json to avoid repeated file reads
|
|
33
|
-
let cachedSourcePackageJson = null;
|
|
34
|
-
/**
|
|
35
|
-
* Read and cache the source package.json dependencies
|
|
36
|
-
*/
|
|
37
|
-
async function getSourceDependencies() {
|
|
38
|
-
if (!cachedSourcePackageJson) {
|
|
39
|
-
const path = resolveTemplatePath('package.json');
|
|
40
|
-
const content = await readFile(path, 'utf-8');
|
|
41
|
-
const pkg = JSON.parse(content);
|
|
42
|
-
cachedSourcePackageJson = {
|
|
43
|
-
dependencies: (pkg.dependencies || {}),
|
|
44
|
-
devDependencies: (pkg.devDependencies || {}),
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return cachedSourcePackageJson;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Merge dependencies from multiple features
|
|
51
|
-
*
|
|
52
|
-
* Resolves package versions from the source package.json at runtime.
|
|
53
|
-
* This ensures scaffolded projects always use up-to-date dependency versions.
|
|
54
|
-
*/
|
|
55
|
-
export async function mergeDependencies(featureIds) {
|
|
56
|
-
const dependencies = {};
|
|
57
|
-
const devDependencies = {};
|
|
58
|
-
// Get source package.json for version lookup
|
|
59
|
-
const sourcePkg = await getSourceDependencies();
|
|
60
|
-
for (const featureId of featureIds) {
|
|
61
|
-
const feature = FEATURES[featureId];
|
|
62
|
-
if (!feature)
|
|
63
|
-
continue;
|
|
64
|
-
// Look up dependency versions from source package.json
|
|
65
|
-
if (feature.dependencyNames) {
|
|
66
|
-
for (const name of feature.dependencyNames) {
|
|
67
|
-
if (sourcePkg.dependencies[name]) {
|
|
68
|
-
dependencies[name] = sourcePkg.dependencies[name];
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
console.warn(`Dependency "${name}" not found in source package.json`);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (feature.devDependencyNames) {
|
|
76
|
-
for (const name of feature.devDependencyNames) {
|
|
77
|
-
if (sourcePkg.devDependencies[name]) {
|
|
78
|
-
devDependencies[name] = sourcePkg.devDependencies[name];
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
console.warn(`DevDependency "${name}" not found in source package.json`);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
// Sort alphabetically
|
|
87
|
-
const sortObject = (obj) => Object.fromEntries(Object.entries(obj).sort(([a], [b]) => a.localeCompare(b)));
|
|
88
|
-
return {
|
|
89
|
-
dependencies: sortObject(dependencies),
|
|
90
|
-
devDependencies: sortObject(devDependencies),
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Merge scripts from multiple features
|
|
95
|
-
*/
|
|
96
|
-
export function mergeScripts(featureIds) {
|
|
97
|
-
const scripts = {};
|
|
98
|
-
for (const featureId of featureIds) {
|
|
99
|
-
const feature = FEATURES[featureId];
|
|
100
|
-
if (!feature?.scripts)
|
|
101
|
-
continue;
|
|
102
|
-
Object.assign(scripts, feature.scripts);
|
|
103
|
-
}
|
|
104
|
-
return scripts;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Compute file structure for selected features
|
|
108
|
-
*
|
|
109
|
-
* When the 'testing' feature is selected, testFiles from all selected features
|
|
110
|
-
* are also included. This ensures scaffolded projects get tests that match
|
|
111
|
-
* their source files.
|
|
112
|
-
*/
|
|
113
|
-
export function computeFileStructure(featureIds) {
|
|
114
|
-
const files = new Set();
|
|
115
|
-
const includeTests = featureIds.includes('testing');
|
|
116
|
-
for (const featureId of featureIds) {
|
|
117
|
-
const feature = FEATURES[featureId];
|
|
118
|
-
if (!feature)
|
|
119
|
-
continue;
|
|
120
|
-
// Always include source files
|
|
121
|
-
if (feature.files) {
|
|
122
|
-
for (const file of feature.files) {
|
|
123
|
-
files.add(file);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
// Include test files only when testing feature is selected
|
|
127
|
-
if (includeTests && feature.testFiles) {
|
|
128
|
-
for (const file of feature.testFiles) {
|
|
129
|
-
files.add(file);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return Array.from(files).sort();
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Get config files needed for selected features
|
|
137
|
-
*/
|
|
138
|
-
export function getConfigFiles(featureIds) {
|
|
139
|
-
const configs = new Set();
|
|
140
|
-
for (const featureId of featureIds) {
|
|
141
|
-
const feature = FEATURES[featureId];
|
|
142
|
-
if (!feature?.configFiles)
|
|
143
|
-
continue;
|
|
144
|
-
for (const config of feature.configFiles) {
|
|
145
|
-
configs.add(config);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return Array.from(configs).sort();
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Read config file content from template
|
|
152
|
-
*/
|
|
153
|
-
async function readConfigFileContent(configPath) {
|
|
154
|
-
const fullPath = resolveTemplatePath(configPath);
|
|
155
|
-
try {
|
|
156
|
-
return await readFile(fullPath, 'utf-8');
|
|
157
|
-
}
|
|
158
|
-
catch {
|
|
159
|
-
// File might not exist if running outside react-spa-scaffold
|
|
160
|
-
return `// File not found: ${configPath}\n// Run MCP server from within react-spa-scaffold repository`;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Generate setup commands based on selected features
|
|
165
|
-
*/
|
|
166
|
-
export function getSetupCommands(featureIds) {
|
|
167
|
-
const commands = ['npm install'];
|
|
168
|
-
if (featureIds.includes('devtools')) {
|
|
169
|
-
commands.push('npm run prepare'); // Initialize husky
|
|
170
|
-
}
|
|
171
|
-
if (featureIds.includes('testing')) {
|
|
172
|
-
commands.push('npx playwright install chromium'); // Install Playwright browser
|
|
173
|
-
}
|
|
174
|
-
if (featureIds.includes('i18n')) {
|
|
175
|
-
commands.push('npm run i18n:extract'); // Extract initial translations
|
|
176
|
-
}
|
|
177
|
-
return commands;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Generate CLAUDE.md content based on selected features
|
|
181
|
-
*/
|
|
2
|
+
/** Generates CLAUDE.md content based on selected features. */
|
|
182
3
|
export function generateClaudeMd(featureIds, projectName, scripts) {
|
|
183
4
|
const sections = [];
|
|
184
5
|
// Header
|
|
@@ -550,88 +371,19 @@ ${envFields.join('\n')}
|
|
|
550
371
|
export const env = validateEnv();
|
|
551
372
|
`;
|
|
552
373
|
}
|
|
553
|
-
/**
|
|
554
|
-
|
|
555
|
-
*/
|
|
556
|
-
export function generateRoutesTs(_featureIds) {
|
|
557
|
-
const routes = [];
|
|
558
|
-
// Core routes (always included when routing feature is selected)
|
|
559
|
-
routes.push(" HOME: '/',");
|
|
560
|
-
// Not found route (always last)
|
|
561
|
-
routes.push(" NOT_FOUND: '*',");
|
|
562
|
-
// Note: Additional routes can be added here based on features
|
|
563
|
-
// For now, all demo content displays on HomePage directly
|
|
374
|
+
/** Generates routes.ts content. */
|
|
375
|
+
export function generateRoutesTs() {
|
|
564
376
|
return `/**
|
|
565
377
|
* Typed route constants.
|
|
566
378
|
* Use these instead of hardcoded strings for type-safe navigation.
|
|
567
379
|
*/
|
|
568
380
|
|
|
569
381
|
export const ROUTES = {
|
|
570
|
-
|
|
382
|
+
HOME: '/',
|
|
383
|
+
NOT_FOUND: '*',
|
|
571
384
|
} as const;
|
|
572
385
|
|
|
573
386
|
export type AppRoute = (typeof ROUTES)[keyof typeof ROUTES];
|
|
574
387
|
`;
|
|
575
388
|
}
|
|
576
|
-
|
|
577
|
-
* Read and parse the source package.json
|
|
578
|
-
*/
|
|
579
|
-
async function readSourcePackageJson() {
|
|
580
|
-
const path = resolveTemplatePath('package.json');
|
|
581
|
-
const content = await readFile(path, 'utf-8');
|
|
582
|
-
return JSON.parse(content);
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* Compute complete scaffold for selected features
|
|
586
|
-
*/
|
|
587
|
-
export async function computeScaffold(selectedFeatures, projectName = 'my-app') {
|
|
588
|
-
// Resolve all dependencies
|
|
589
|
-
const resolvedFeatures = resolveFeatureDependencies(selectedFeatures);
|
|
590
|
-
// Read engines from source package.json
|
|
591
|
-
const sourcePackageJson = await readSourcePackageJson();
|
|
592
|
-
const engines = sourcePackageJson.engines || {};
|
|
593
|
-
// Merge all dependencies (async to read versions from source package.json)
|
|
594
|
-
const { dependencies, devDependencies } = await mergeDependencies(resolvedFeatures);
|
|
595
|
-
// Merge all scripts
|
|
596
|
-
const scripts = mergeScripts(resolvedFeatures);
|
|
597
|
-
// Get file structure (add CLAUDE.md which is generated, not from patterns)
|
|
598
|
-
// Also add docs based on selected features
|
|
599
|
-
const docPaths = computeDocsForFeatures(resolvedFeatures);
|
|
600
|
-
const structure = [...computeFileStructure(resolvedFeatures), 'CLAUDE.md', ...docPaths];
|
|
601
|
-
// Get config files with actual content read from templates
|
|
602
|
-
const configFiles = {};
|
|
603
|
-
const configPaths = getConfigFiles(resolvedFeatures);
|
|
604
|
-
for (const config of configPaths) {
|
|
605
|
-
configFiles[config] = await readConfigFileContent(config);
|
|
606
|
-
}
|
|
607
|
-
// Get setup commands
|
|
608
|
-
const setupCommands = getSetupCommands(resolvedFeatures);
|
|
609
|
-
// Generate CLAUDE.md content
|
|
610
|
-
const claudeMd = generateClaudeMd(resolvedFeatures, projectName, scripts);
|
|
611
|
-
// Generate vite-env.d.ts content
|
|
612
|
-
const viteEnvDts = generateViteEnvDts(resolvedFeatures);
|
|
613
|
-
// Generate env.ts content
|
|
614
|
-
const envTs = generateEnvTs(resolvedFeatures);
|
|
615
|
-
// Generate routes.ts content (only if routing feature is selected)
|
|
616
|
-
const routesTs = resolvedFeatures.includes('routing') ? generateRoutesTs(resolvedFeatures) : undefined;
|
|
617
|
-
// Get docs with content filtered by features
|
|
618
|
-
const docs = await computeDocsContent(resolvedFeatures);
|
|
619
|
-
return {
|
|
620
|
-
packageJson: {
|
|
621
|
-
name: projectName,
|
|
622
|
-
dependencies,
|
|
623
|
-
devDependencies,
|
|
624
|
-
scripts,
|
|
625
|
-
engines,
|
|
626
|
-
},
|
|
627
|
-
structure,
|
|
628
|
-
configFiles,
|
|
629
|
-
setupCommands,
|
|
630
|
-
claudeMd,
|
|
631
|
-
viteEnvDts,
|
|
632
|
-
envTs,
|
|
633
|
-
routesTs,
|
|
634
|
-
docs,
|
|
635
|
-
};
|
|
636
|
-
}
|
|
637
|
-
//# sourceMappingURL=scaffold.js.map
|
|
389
|
+
//# sourceMappingURL=generators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../src/utils/scaffold/generators.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAQrC,8DAA8D;AAC9D,MAAM,UAAU,gBAAgB,CAC9B,UAAuB,EACvB,WAAmB,EACnB,OAA+B;IAE/B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,SAAS;IACT,QAAQ,CAAC,IAAI,CAAC;;8BAEc,WAAW,iDAAiD,CAAC,CAAC;IAE1F,6CAA6C;IAC7C,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,MAAM,kBAAkB,GAA2B;QACjD,GAAG,EAAE,8BAA8B;QACnC,KAAK,EAAE,uCAAuC;QAC9C,OAAO,EAAE,0BAA0B;QACnC,SAAS,EAAE,iBAAiB;QAC5B,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,iBAAiB;QAC7B,MAAM,EAAE,iBAAiB;QACzB,cAAc,EAAE,gBAAgB;QAChC,IAAI,EAAE,aAAa;QACnB,YAAY,EAAE,mBAAmB;QACjC,eAAe,EAAE,0BAA0B;QAC3C,GAAG,EAAE,gBAAgB;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,cAAc,EAAE,6BAA6B;QAC7C,OAAO,EAAE,wBAAwB;KAClC,CAAC;IAEF,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QACjD,MAAM,IAAI,GAAG,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAA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AC;IAChD,SAAS,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;IAElD,OAAO;;;;;;;;EAQP,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;EAWvB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;CAsBrB,CAAC;AACF,CAAC;AAED,mCAAmC;AACnC,MAAM,UAAU,gBAAgB;IAC9B,OAAO;;;;;;;;;;;CAWR,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scaffold utilities
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all scaffold-related functions for convenient importing.
|
|
5
|
+
*/
|
|
6
|
+
export { resolveFeatureDependencies, mergeDependencies, mergeScripts } from './dependencies.js';
|
|
7
|
+
export { computeFileStructure, getConfigFiles, readConfigFileContent } from './file-structure.js';
|
|
8
|
+
export { getSetupCommands } from './commands.js';
|
|
9
|
+
export { generateClaudeMd, generateViteEnvDts, generateEnvTs, generateRoutesTs } from './generators.js';
|
|
10
|
+
export { computeScaffold } from './compute.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/scaffold/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scaffold utilities
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all scaffold-related functions for convenient importing.
|
|
5
|
+
*/
|
|
6
|
+
export { resolveFeatureDependencies, mergeDependencies, mergeScripts } from './dependencies.js';
|
|
7
|
+
export { computeFileStructure, getConfigFiles, readConfigFileContent } from './file-structure.js';
|
|
8
|
+
export { getSetupCommands } from './commands.js';
|
|
9
|
+
export { generateClaudeMd, generateViteEnvDts, generateEnvTs, generateRoutesTs } from './generators.js';
|
|
10
|
+
export { computeScaffold } from './compute.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/scaffold/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -16,8 +16,8 @@ test.describe('Home Page', () => {
|
|
|
16
16
|
// Main content area
|
|
17
17
|
await expect(page.getByRole('main')).toBeVisible();
|
|
18
18
|
|
|
19
|
-
// App title in header
|
|
20
|
-
await expect(page.getByRole('heading', { level: 1 })).toBeVisible();
|
|
19
|
+
// App title in header (specific to header to avoid conflict with page heading)
|
|
20
|
+
await expect(page.getByRole('banner').getByRole('heading', { level: 1 })).toBeVisible();
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
test('skip link navigates to main content', async ({ page }) => {
|
|
@@ -21,16 +21,20 @@ test.describe('Language Switcher', () => {
|
|
|
21
21
|
|
|
22
22
|
test('closes dropdown after selection', async ({ page }) => {
|
|
23
23
|
await page.getByRole('button', { name: /change language/i }).click();
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
// Wait for dropdown to fully appear before clicking
|
|
26
|
+
const menuItem = page.getByRole('menuitem', { name: 'Español' });
|
|
27
|
+
await expect(menuItem).toBeVisible();
|
|
28
|
+
await menuItem.click();
|
|
25
29
|
|
|
26
30
|
// Dropdown should close - other options not visible
|
|
27
|
-
await expect(page.
|
|
31
|
+
await expect(page.getByRole('menuitem', { name: 'Deutsch' })).not.toBeVisible();
|
|
28
32
|
});
|
|
29
33
|
|
|
30
34
|
test('persists language preference across reload', async ({ page }) => {
|
|
31
35
|
// Change to Spanish
|
|
32
36
|
await page.getByRole('button', { name: /change language/i }).click();
|
|
33
|
-
await page.
|
|
37
|
+
await page.getByRole('menuitem', { name: 'Español' }).click();
|
|
34
38
|
|
|
35
39
|
// Wait for language change to apply
|
|
36
40
|
await expect(page.getByRole('heading', { name: /bienvenido/i })).toBeVisible();
|
package/dist/utils/examples.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code example utilities
|
|
3
|
-
*
|
|
4
|
-
* Maps pattern types to actual files in the react-spa-scaffold repository.
|
|
5
|
-
* When the MCP server runs, it reads these files to provide real,
|
|
6
|
-
* working examples to AI agents.
|
|
7
|
-
*/
|
|
8
|
-
export interface CodeExample {
|
|
9
|
-
pattern: string;
|
|
10
|
-
description: string;
|
|
11
|
-
filePath: string;
|
|
12
|
-
code: string;
|
|
13
|
-
keyPoints: string[];
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Get available pattern types
|
|
17
|
-
*/
|
|
18
|
-
export declare function getAvailablePatterns(): string[];
|
|
19
|
-
/**
|
|
20
|
-
* Get code example for a pattern
|
|
21
|
-
*/
|
|
22
|
-
export declare function getCodeExample(pattern: string): Promise<CodeExample | null>;
|
|
23
|
-
/**
|
|
24
|
-
* Get all examples for a feature's patterns
|
|
25
|
-
*/
|
|
26
|
-
export declare function getFeatureExamples(patterns: string[]): Promise<CodeExample[]>;
|
|
27
|
-
//# sourceMappingURL=examples.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../src/utils/examples.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAoZD;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CA4BjF;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAWnF"}
|