@specverse/engines 4.1.5 → 4.1.7
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/dist/libs/instance-factories/applications/templates/generic/backend-env-generator.js +22 -0
- package/dist/libs/instance-factories/applications/templates/generic/backend-package-json-generator.js +66 -0
- package/dist/libs/instance-factories/applications/templates/generic/backend-tsconfig-generator.js +54 -0
- package/dist/libs/instance-factories/applications/templates/generic/main-generator.js +290 -0
- package/dist/libs/instance-factories/applications/templates/react/_view-components-source.js +530 -0
- package/dist/libs/instance-factories/applications/templates/react/api-client-generator.js +437 -0
- package/dist/libs/instance-factories/applications/templates/react/api-types-generator.js +146 -0
- package/dist/libs/instance-factories/applications/templates/react/app-tsx-generator.js +73 -0
- package/dist/libs/instance-factories/applications/templates/react/env-example-generator.js +18 -0
- package/dist/libs/instance-factories/applications/templates/react/field-helpers-generator.js +99 -0
- package/dist/libs/instance-factories/applications/templates/react/gitignore-generator.js +35 -0
- package/dist/libs/instance-factories/applications/templates/react/index-css-generator.js +9 -0
- package/dist/libs/instance-factories/applications/templates/react/index-html-generator.js +23 -0
- package/dist/libs/instance-factories/applications/templates/react/main-tsx-generator.js +29 -0
- package/dist/libs/instance-factories/applications/templates/react/package-json-generator.js +49 -0
- package/dist/libs/instance-factories/applications/templates/react/pattern-adapter-generator.js +156 -0
- package/dist/libs/instance-factories/applications/templates/react/react-pattern-adapter.js +935 -0
- package/dist/libs/instance-factories/applications/templates/react/relationship-field-generator.js +143 -0
- package/dist/libs/instance-factories/applications/templates/react/runtime-app-tsx-generator.js +101 -0
- package/dist/libs/instance-factories/applications/templates/react/runtime-package-json-generator.js +50 -0
- package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.js +646 -0
- package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.js +65 -0
- package/dist/libs/instance-factories/applications/templates/react/tsconfig-generator.js +28 -0
- package/dist/libs/instance-factories/applications/templates/react/use-api-hooks-generator.js +132 -0
- package/dist/libs/instance-factories/applications/templates/react/view-dashboard-generator.js +143 -0
- package/dist/libs/instance-factories/applications/templates/react/view-detail-generator.js +143 -0
- package/dist/libs/instance-factories/applications/templates/react/view-form-generator.js +355 -0
- package/dist/libs/instance-factories/applications/templates/react/view-list-generator.js +91 -0
- package/dist/libs/instance-factories/applications/templates/react/view-router-generator.js +79 -0
- package/dist/libs/instance-factories/applications/templates/react/vite-config-generator.js +42 -0
- package/dist/libs/instance-factories/cli/templates/commander/cli-bin-wrapper-generator.js +11 -0
- package/dist/libs/instance-factories/cli/templates/commander/cli-entry-generator.js +111 -0
- package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +928 -0
- package/dist/libs/instance-factories/communication/templates/eventemitter/bus-generator.js +83 -0
- package/dist/libs/instance-factories/communication/templates/eventemitter/publisher-generator.js +91 -0
- package/dist/libs/instance-factories/communication/templates/eventemitter/subscriber-generator.js +86 -0
- package/dist/libs/instance-factories/controllers/templates/fastify/meta-routes-generator.js +93 -0
- package/dist/libs/instance-factories/controllers/templates/fastify/routes-generator.js +280 -0
- package/dist/libs/instance-factories/controllers/templates/fastify/server-generator.js +125 -0
- package/dist/libs/instance-factories/infrastructure/templates/docker-k8s/infrastructure-generator.js +25 -0
- package/dist/libs/instance-factories/orms/templates/prisma/schema-generator.js +371 -0
- package/dist/libs/instance-factories/orms/templates/prisma/services-generator.js +266 -0
- package/dist/libs/instance-factories/scaffolding/templates/generic/env-example-generator.js +51 -0
- package/dist/libs/instance-factories/scaffolding/templates/generic/env-generator.js +61 -0
- package/dist/libs/instance-factories/scaffolding/templates/generic/gitignore-generator.js +59 -0
- package/dist/libs/instance-factories/scaffolding/templates/generic/package-json-generator.js +126 -0
- package/dist/libs/instance-factories/scaffolding/templates/generic/readme-generator.js +159 -0
- package/dist/libs/instance-factories/scaffolding/templates/generic/tsconfig-generator.js +56 -0
- package/dist/libs/instance-factories/scaffolding/templates/generic/tsconfig-react-generator.js +37 -0
- package/dist/libs/instance-factories/sdks/templates/python/sdk-generator.js +29 -0
- package/dist/libs/instance-factories/sdks/templates/typescript/sdk-generator.js +28 -0
- package/dist/libs/instance-factories/services/templates/memory/generate-interpreter.js +14 -0
- package/dist/libs/instance-factories/services/templates/memory/step-conventions-memory.js +415 -0
- package/dist/libs/instance-factories/services/templates/prisma/behavior-generator.js +177 -0
- package/dist/libs/instance-factories/services/templates/prisma/controller-generator.js +413 -0
- package/dist/libs/instance-factories/services/templates/prisma/service-generator.js +243 -0
- package/dist/libs/instance-factories/services/templates/prisma/step-conventions.js +264 -0
- package/dist/libs/instance-factories/services/templates/shared-patterns.js +24 -0
- package/dist/libs/instance-factories/shared/path-resolver.js +59 -0
- package/dist/libs/instance-factories/storage/templates/mongodb/config-generator.js +13 -0
- package/dist/libs/instance-factories/storage/templates/mongodb/docker-generator.js +16 -0
- package/dist/libs/instance-factories/storage/templates/postgresql/config-generator.js +45 -0
- package/dist/libs/instance-factories/storage/templates/postgresql/docker-generator.js +46 -0
- package/dist/libs/instance-factories/storage/templates/redis/config-generator.js +14 -0
- package/dist/libs/instance-factories/storage/templates/redis/docker-generator.js +16 -0
- package/dist/libs/instance-factories/test-generation.js +145 -0
- package/dist/libs/instance-factories/testing/templates/vitest/tests-generator.js +30 -0
- package/dist/libs/instance-factories/tools/templates/mcp/mcp-server-generator.js +149 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/controllers/MCPServerController.js +232 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/events/EventEmitter.js +49 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/index.js +18 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/interfaces/ResourceProvider.js +0 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/models/LibrarySuggestion.js +97 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/models/SpecVerseResource.js +64 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/server/mcp-server.js +182 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/CLIProxyService.js +1210 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/EmbeddedResourcesAdapter.js +172 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/EntityModuleService.js +240 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/HybridResourcesProvider.js +147 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/LibraryToolsService.js +281 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorBridge.js +409 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorToolsService.js +414 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/PromptToolsService.js +467 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/ResourcesProviderService.js +135 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/types/index.js +0 -0
- package/dist/libs/instance-factories/tools/templates/vscode/static/extension.js +965 -0
- package/dist/libs/instance-factories/tools/templates/vscode/vscode-extension-generator.js +238 -0
- package/dist/libs/instance-factories/validation/templates/zod/validation-generator.js +25 -0
- package/dist/libs/instance-factories/views/index.js +48 -0
- package/dist/libs/instance-factories/views/templates/react/adapters/antd-adapter.js +742 -0
- package/dist/libs/instance-factories/views/templates/react/adapters/mui-adapter.js +824 -0
- package/dist/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.js +719 -0
- package/dist/libs/instance-factories/views/templates/react/app-generator.js +45 -0
- package/dist/libs/instance-factories/views/templates/react/components-generator.js +779 -0
- package/dist/libs/instance-factories/views/templates/react/forms-generator.js +285 -0
- package/dist/libs/instance-factories/views/templates/react/frontend-package-json-generator.js +46 -0
- package/dist/libs/instance-factories/views/templates/react/hooks-generator.js +111 -0
- package/dist/libs/instance-factories/views/templates/react/index-css-generator.js +9 -0
- package/dist/libs/instance-factories/views/templates/react/index-html-generator.js +23 -0
- package/dist/libs/instance-factories/views/templates/react/main-tsx-generator.js +21 -0
- package/dist/libs/instance-factories/views/templates/react/react-component-generator.js +299 -0
- package/dist/libs/instance-factories/views/templates/react/router-generator.js +136 -0
- package/dist/libs/instance-factories/views/templates/react/router-generic-generator.js +107 -0
- package/dist/libs/instance-factories/views/templates/react/shared-utils-generator.js +179 -0
- package/dist/libs/instance-factories/views/templates/react/spec-json-generator.js +7 -0
- package/dist/libs/instance-factories/views/templates/react/types-generator.js +56 -0
- package/dist/libs/instance-factories/views/templates/react/views-metadata-generator.js +27 -0
- package/dist/libs/instance-factories/views/templates/react/vite-config-generator.js +29 -0
- package/dist/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js +261 -0
- package/dist/libs/instance-factories/views/templates/shared/adapter-types.js +34 -0
- package/dist/libs/instance-factories/views/templates/shared/atomic-components-registry.js +800 -0
- package/dist/libs/instance-factories/views/templates/shared/base-generator.js +305 -0
- package/dist/libs/instance-factories/views/templates/shared/component-metadata.js +517 -0
- package/dist/libs/instance-factories/views/templates/shared/composite-pattern-types.js +0 -0
- package/dist/libs/instance-factories/views/templates/shared/composite-patterns.js +445 -0
- package/dist/libs/instance-factories/views/templates/shared/index.js +80 -0
- package/dist/libs/instance-factories/views/templates/shared/pattern-validator.js +210 -0
- package/dist/libs/instance-factories/views/templates/shared/property-mapper.js +492 -0
- package/dist/libs/instance-factories/views/templates/shared/syntax-mapper.js +321 -0
- package/dist/realize/index.js +36 -12
- package/dist/realize/index.js.map +1 -1
- package/package.json +3 -2
package/dist/libs/instance-factories/applications/templates/react/relationship-field-generator.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
async function generate(context) {
|
|
2
|
+
return `/**
|
|
3
|
+
* RelationshipField - Handles belongsTo, hasMany, hasOne relationships
|
|
4
|
+
*
|
|
5
|
+
* Renders appropriate UI based on relationship type:
|
|
6
|
+
* - belongsTo: Dropdown select with target entities
|
|
7
|
+
* - hasMany: Count display (in view mode)
|
|
8
|
+
* - hasOne: Entity display (in view mode)
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { useEntitiesQuery } from '../../hooks/useApi';
|
|
12
|
+
import type { RelationshipDefinition } from '../../types/api';
|
|
13
|
+
|
|
14
|
+
interface RelationshipFieldProps {
|
|
15
|
+
/**
|
|
16
|
+
* The attribute name (e.g., 'author')
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Relationship definition from schema
|
|
22
|
+
*/
|
|
23
|
+
relationship: RelationshipDefinition;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Current value (entity ID for belongsTo, array for hasMany)
|
|
27
|
+
*/
|
|
28
|
+
value: string | string[] | null;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Change handler
|
|
32
|
+
*/
|
|
33
|
+
onChange: (value: string | string[] | null) => void;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Whether field is required
|
|
37
|
+
*/
|
|
38
|
+
required?: boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Whether in read-only mode
|
|
42
|
+
*/
|
|
43
|
+
readOnly?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get display name for an entity (prefers name, then title, then id)
|
|
48
|
+
*/
|
|
49
|
+
function getEntityDisplayName(entity: any): string {
|
|
50
|
+
return entity.data?.name || entity.data?.title || entity.id;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function RelationshipField({
|
|
54
|
+
name,
|
|
55
|
+
relationship,
|
|
56
|
+
value,
|
|
57
|
+
onChange,
|
|
58
|
+
required = false,
|
|
59
|
+
readOnly = false,
|
|
60
|
+
}: RelationshipFieldProps) {
|
|
61
|
+
const relType = relationship.type;
|
|
62
|
+
const targetModel = relationship.model || relationship.targetModel || null;
|
|
63
|
+
const controllerName = targetModel ? \`\${targetModel}Controller\` : null;
|
|
64
|
+
|
|
65
|
+
// Fetch target entities
|
|
66
|
+
const { data: targetEntities = [], isLoading } = useEntitiesQuery(controllerName, targetModel);
|
|
67
|
+
|
|
68
|
+
// Handle belongsTo relationships
|
|
69
|
+
if (relType === 'belongsTo') {
|
|
70
|
+
return (
|
|
71
|
+
<div className="space-y-1">
|
|
72
|
+
<label htmlFor={name} className="block text-sm font-medium text-gray-300">
|
|
73
|
+
{name.charAt(0).toUpperCase() + name.slice(1)}
|
|
74
|
+
{required && <span className="text-red-400 ml-1">*</span>}
|
|
75
|
+
</label>
|
|
76
|
+
<select
|
|
77
|
+
id={name}
|
|
78
|
+
value={value as string || ''}
|
|
79
|
+
onChange={(e) => onChange(e.target.value || null)}
|
|
80
|
+
disabled={readOnly || isLoading}
|
|
81
|
+
required={required}
|
|
82
|
+
className="w-full px-3 py-2 bg-slate-700 border border-slate-600 text-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50"
|
|
83
|
+
>
|
|
84
|
+
<option value="">-- Select {targetModel} --</option>
|
|
85
|
+
{targetEntities.map((entity) => (
|
|
86
|
+
<option key={entity.id} value={entity.id}>
|
|
87
|
+
{getEntityDisplayName(entity)}
|
|
88
|
+
</option>
|
|
89
|
+
))}
|
|
90
|
+
</select>
|
|
91
|
+
{isLoading && (
|
|
92
|
+
<p className="text-sm text-gray-400">Loading {targetModel} options...</p>
|
|
93
|
+
)}
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Handle hasMany relationships (read-only display)
|
|
99
|
+
if (relType === 'hasMany') {
|
|
100
|
+
const count = Array.isArray(value) ? value.length : 0;
|
|
101
|
+
return (
|
|
102
|
+
<div className="space-y-1">
|
|
103
|
+
<label className="block text-sm font-medium text-gray-300">
|
|
104
|
+
{name.charAt(0).toUpperCase() + name.slice(1)}
|
|
105
|
+
</label>
|
|
106
|
+
<div className="px-3 py-2 bg-slate-800 border border-slate-700 rounded-md text-gray-300">
|
|
107
|
+
{count} {targetModel}(s)
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Handle hasOne relationships (read-only display)
|
|
114
|
+
if (relType === 'hasOne') {
|
|
115
|
+
return (
|
|
116
|
+
<div className="space-y-1">
|
|
117
|
+
<label className="block text-sm font-medium text-gray-300">
|
|
118
|
+
{name.charAt(0).toUpperCase() + name.slice(1)}
|
|
119
|
+
</label>
|
|
120
|
+
<div className="px-3 py-2 bg-slate-800 border border-slate-700 rounded-md text-gray-300">
|
|
121
|
+
{value ? \`\${targetModel} #\${value}\` : 'None'}
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Fallback for unknown relationship types
|
|
128
|
+
return (
|
|
129
|
+
<div className="space-y-1">
|
|
130
|
+
<label className="block text-sm font-medium text-gray-300">
|
|
131
|
+
{name.charAt(0).toUpperCase() + name.slice(1)}
|
|
132
|
+
</label>
|
|
133
|
+
<div className="px-3 py-2 bg-slate-800 border border-slate-700 rounded-md text-gray-400 italic">
|
|
134
|
+
Unsupported relationship type: {relType}
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
generate
|
|
143
|
+
};
|
package/dist/libs/instance-factories/applications/templates/react/runtime-app-tsx-generator.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
function generateRuntimeAppTsx(context) {
|
|
2
|
+
const { spec } = context;
|
|
3
|
+
const appName = spec?.metadata?.name || spec?.name || "SpecVerse App";
|
|
4
|
+
return `import { useState, useEffect, useMemo } from 'react';
|
|
5
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
6
|
+
import yaml from 'js-yaml';
|
|
7
|
+
import { RuntimeViewProvider } from '@specverse/runtime/views/react';
|
|
8
|
+
import { DevShell } from '@specverse/runtime/views/react';
|
|
9
|
+
import {
|
|
10
|
+
useEntitiesQuery,
|
|
11
|
+
useModelSchemaQuery,
|
|
12
|
+
useExecuteOperationMutation,
|
|
13
|
+
useTransitionStateMutation,
|
|
14
|
+
} from './hooks/useApi';
|
|
15
|
+
import devSpecRaw from './dev.specly?raw';
|
|
16
|
+
|
|
17
|
+
// Parse YAML spec
|
|
18
|
+
function parseSpec(raw: string): Record<string, unknown> {
|
|
19
|
+
try {
|
|
20
|
+
const parsed = yaml.load(raw);
|
|
21
|
+
if (parsed && typeof parsed === 'object') {
|
|
22
|
+
const obj = parsed as Record<string, unknown>;
|
|
23
|
+
if (obj.components && typeof obj.components === 'object') {
|
|
24
|
+
const componentName = Object.keys(obj.components)[0];
|
|
25
|
+
if (componentName) {
|
|
26
|
+
return { ...(obj.components as any)[componentName], componentName, _raw: obj };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return obj;
|
|
30
|
+
}
|
|
31
|
+
return {};
|
|
32
|
+
} catch {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const devSpec = parseSpec(devSpecRaw);
|
|
38
|
+
|
|
39
|
+
const queryClient = new QueryClient({
|
|
40
|
+
defaultOptions: {
|
|
41
|
+
queries: { staleTime: 5 * 60 * 1000, retry: 1 },
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
function AppContent() {
|
|
46
|
+
// Fetch app spec from backend API (avoids bundling spec file path issues)
|
|
47
|
+
const [appSpec, setAppSpec] = useState<Record<string, unknown>>({});
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
fetch('/api/spec')
|
|
50
|
+
.then(r => r.json())
|
|
51
|
+
.then(data => {
|
|
52
|
+
if (data && typeof data === 'object') {
|
|
53
|
+
// Flatten components wrapper if present
|
|
54
|
+
if (data.components) {
|
|
55
|
+
const name = Object.keys(data.components)[0];
|
|
56
|
+
if (name) {
|
|
57
|
+
setAppSpec({ ...data.components[name], componentName: name });
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
setAppSpec(data);
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
.catch(() => {});
|
|
65
|
+
}, []);
|
|
66
|
+
|
|
67
|
+
const runtimeValue = useMemo(() => ({
|
|
68
|
+
useEntitiesQuery,
|
|
69
|
+
useModelSchemaQuery,
|
|
70
|
+
useExecuteOperationMutation,
|
|
71
|
+
useTransitionStateMutation,
|
|
72
|
+
entities: {},
|
|
73
|
+
modelSchemas: {},
|
|
74
|
+
views: [],
|
|
75
|
+
spec: appSpec,
|
|
76
|
+
apiBaseUrl: '/api',
|
|
77
|
+
}), [appSpec]);
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<RuntimeViewProvider value={runtimeValue}>
|
|
81
|
+
<DevShell
|
|
82
|
+
devSpec={devSpec}
|
|
83
|
+
appSpec={appSpec}
|
|
84
|
+
title="${appName}"
|
|
85
|
+
/>
|
|
86
|
+
</RuntimeViewProvider>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export default function App() {
|
|
91
|
+
return (
|
|
92
|
+
<QueryClientProvider client={queryClient}>
|
|
93
|
+
<AppContent />
|
|
94
|
+
</QueryClientProvider>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
}
|
|
99
|
+
export {
|
|
100
|
+
generateRuntimeAppTsx as default
|
|
101
|
+
};
|
package/dist/libs/instance-factories/applications/templates/react/runtime-package-json-generator.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
function generateRuntimePackageJson(context) {
|
|
2
|
+
const { spec } = context;
|
|
3
|
+
const appName = spec.metadata?.component?.toLowerCase() || "frontend";
|
|
4
|
+
const version = spec.metadata?.version || "1.0.0";
|
|
5
|
+
const description = spec.metadata?.description || "Frontend application";
|
|
6
|
+
const pkg = {
|
|
7
|
+
name: `${appName}-frontend`,
|
|
8
|
+
version,
|
|
9
|
+
description,
|
|
10
|
+
private: true,
|
|
11
|
+
type: "module",
|
|
12
|
+
scripts: {
|
|
13
|
+
dev: "vite",
|
|
14
|
+
build: "tsc && vite build",
|
|
15
|
+
preview: "vite preview",
|
|
16
|
+
test: "echo 'No tests configured for frontend'",
|
|
17
|
+
lint: "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
|
|
18
|
+
},
|
|
19
|
+
dependencies: {
|
|
20
|
+
"react": "^18.2.0",
|
|
21
|
+
"react-dom": "^18.2.0",
|
|
22
|
+
"@tanstack/react-query": "^5.0.0",
|
|
23
|
+
"@specverse/runtime": "^4.1.0",
|
|
24
|
+
"js-yaml": "^4.1.0",
|
|
25
|
+
"react-hook-form": "^7.48.0",
|
|
26
|
+
"zod": "^3.22.0",
|
|
27
|
+
"@hookform/resolvers": "^3.3.0"
|
|
28
|
+
},
|
|
29
|
+
devDependencies: {
|
|
30
|
+
"@types/react": "^18.2.0",
|
|
31
|
+
"@types/react-dom": "^18.2.0",
|
|
32
|
+
"@types/js-yaml": "^4.0.9",
|
|
33
|
+
"@vitejs/plugin-react": "^4.2.0",
|
|
34
|
+
"autoprefixer": "^10.4.20",
|
|
35
|
+
"postcss": "^8.4.47",
|
|
36
|
+
"tailwindcss": "^3.4.13",
|
|
37
|
+
"typescript": "^5.2.0",
|
|
38
|
+
"vite": "^5.0.0",
|
|
39
|
+
"eslint": "^8.53.0",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
41
|
+
"@typescript-eslint/parser": "^6.10.0",
|
|
42
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
43
|
+
"eslint-plugin-react-refresh": "^0.4.4"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return JSON.stringify(pkg, null, 2);
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
generateRuntimePackageJson as default
|
|
50
|
+
};
|