@specverse/engine-realize 3.5.3
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/assets/examples/09-api/ai-spec.yaml +194 -0
- package/assets/examples/09-api/converted.yaml +95 -0
- package/assets/examples/09-api/diagram-architecture.mmd +10 -0
- package/assets/examples/09-api/diagram-er.mmd +10 -0
- package/assets/examples/09-api/documentation.html +104 -0
- package/assets/examples/09-api/documentation.md +95 -0
- package/assets/examples/09-api/inferred-spec.yaml +420 -0
- package/assets/examples/09-api/openapi.json +61 -0
- package/assets/examples/10-api/README.md +216 -0
- package/assets/examples/10-api/ai-spec.yaml +194 -0
- package/assets/examples/10-api/converted.yaml +96 -0
- package/assets/examples/10-api/diagram-architecture.mmd +10 -0
- package/assets/examples/10-api/diagram-er.mmd +10 -0
- package/assets/examples/10-api/documentation.html +104 -0
- package/assets/examples/10-api/documentation.md +95 -0
- package/assets/examples/10-api/inferred-spec.yaml +7 -0
- package/assets/examples/10-api/metadata.yaml +89 -0
- package/assets/examples/10-api/openapi.json +61 -0
- package/assets/examples/10-api/package-integration-test.js +177 -0
- package/assets/examples/10-api/usage-example.js +323 -0
- package/assets/examples/10-api/usage-example.ts +363 -0
- package/assets/examples/10-api/workflow-test.js +113 -0
- package/assets/examples/manifests/01-simple-default-mappings.yaml +36 -0
- package/assets/examples/manifests/02-capability-mappings.yaml +55 -0
- package/assets/examples/manifests/03-hybrid-mappings.yaml +109 -0
- package/assets/examples/manifests/README.md +245 -0
- package/assets/examples/manifests/backend-only.yaml +43 -0
- package/assets/examples/manifests/blog-api.md +78 -0
- package/assets/examples/manifests/blog-api.specly +79 -0
- package/assets/examples/manifests/frontend-only.yaml +27 -0
- package/assets/examples/manifests/fullstack-app.yaml +44 -0
- package/assets/examples/manifests/fullstack-monorepo.yaml +62 -0
- package/assets/examples/validate-examples-with-expected-failures.cjs +328 -0
- package/assets/examples/validate-examples.cjs +225 -0
- package/assets/examples-decomposed/cloud-native-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/cloud-native-manifest.md +379 -0
- package/assets/examples-decomposed/cloud-native-manifest.specly +60 -0
- package/assets/examples-decomposed/docker-compose-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/docker-compose-manifest.md +326 -0
- package/assets/examples-decomposed/docker-compose-manifest.specly +40 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.example.yaml +8 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.md +237 -0
- package/assets/examples-decomposed/kubernetes-deployment-manifest.specly +41 -0
- package/assets/templates/README.md +559 -0
- package/assets/templates/TEMPLATE-ENHANCEMENTS-V33.md +462 -0
- package/assets/templates/backend-only/CLAUDE.md +73 -0
- package/assets/templates/backend-only/README.md +197 -0
- package/assets/templates/backend-only/deployments/README.md +149 -0
- package/assets/templates/backend-only/deployments/development.specly +53 -0
- package/assets/templates/backend-only/deployments/production.specly +87 -0
- package/assets/templates/backend-only/docs/README.md +50 -0
- package/assets/templates/backend-only/docs/api/README.md +7 -0
- package/assets/templates/backend-only/docs/diagrams/README.md +85 -0
- package/assets/templates/backend-only/docs/example-documentation-template.md +269 -0
- package/assets/templates/backend-only/docs/guides/README.md +15 -0
- package/assets/templates/backend-only/dot.env.example +18 -0
- package/assets/templates/backend-only/generated/README.md +56 -0
- package/assets/templates/backend-only/generated/code/integration-test.template.js +320 -0
- package/assets/templates/backend-only/generated/code/package.json.template +34 -0
- package/assets/templates/backend-only/generated/docs/README.md +49 -0
- package/assets/templates/backend-only/gitignore +54 -0
- package/assets/templates/backend-only/manifests/README.md +72 -0
- package/assets/templates/backend-only/manifests/docker-compose.specly +91 -0
- package/assets/templates/backend-only/manifests/implementation.yaml +100 -0
- package/assets/templates/backend-only/manifests/kubernetes.specly +140 -0
- package/assets/templates/backend-only/package.json +59 -0
- package/assets/templates/backend-only/scripts/test-all.sh +160 -0
- package/assets/templates/backend-only/scripts/test-generated-code.sh +165 -0
- package/assets/templates/backend-only/specs/main.specly +67 -0
- package/assets/templates/default/CLAUDE.md +141 -0
- package/assets/templates/default/README.md +404 -0
- package/assets/templates/default/deployments/README.md +149 -0
- package/assets/templates/default/deployments/development.specly +53 -0
- package/assets/templates/default/deployments/production.specly +87 -0
- package/assets/templates/default/docs/README.md +50 -0
- package/assets/templates/default/docs/api/README.md +7 -0
- package/assets/templates/default/docs/diagrams/README.md +85 -0
- package/assets/templates/default/docs/example-documentation-template.md +269 -0
- package/assets/templates/default/docs/guides/README.md +15 -0
- package/assets/templates/default/dot.env.example +18 -0
- package/assets/templates/default/generated/README.md +56 -0
- package/assets/templates/default/generated/code/integration-test.template.js +320 -0
- package/assets/templates/default/generated/code/package.json.template +34 -0
- package/assets/templates/default/generated/docs/README.md +49 -0
- package/assets/templates/default/gitignore +54 -0
- package/assets/templates/default/manifests/README.md +72 -0
- package/assets/templates/default/manifests/docker-compose.specly +91 -0
- package/assets/templates/default/manifests/implementation.yaml +176 -0
- package/assets/templates/default/manifests/kubernetes.specly +140 -0
- package/assets/templates/default/package.json +61 -0
- package/assets/templates/default/scripts/test-all.sh +160 -0
- package/assets/templates/default/scripts/test-generated-code.sh +165 -0
- package/assets/templates/default/specs/main.specly +67 -0
- package/assets/templates/frontend-only/CLAUDE.md +75 -0
- package/assets/templates/frontend-only/README.md +231 -0
- package/assets/templates/frontend-only/deployments/README.md +149 -0
- package/assets/templates/frontend-only/deployments/development.specly +53 -0
- package/assets/templates/frontend-only/deployments/production.specly +87 -0
- package/assets/templates/frontend-only/docs/README.md +50 -0
- package/assets/templates/frontend-only/docs/api/README.md +7 -0
- package/assets/templates/frontend-only/docs/diagrams/README.md +85 -0
- package/assets/templates/frontend-only/docs/example-documentation-template.md +269 -0
- package/assets/templates/frontend-only/docs/guides/README.md +15 -0
- package/assets/templates/frontend-only/dot.env.example +18 -0
- package/assets/templates/frontend-only/generated/README.md +56 -0
- package/assets/templates/frontend-only/generated/code/integration-test.template.js +320 -0
- package/assets/templates/frontend-only/generated/code/package.json.template +34 -0
- package/assets/templates/frontend-only/generated/docs/README.md +49 -0
- package/assets/templates/frontend-only/gitignore +54 -0
- package/assets/templates/frontend-only/manifests/README.md +72 -0
- package/assets/templates/frontend-only/manifests/docker-compose.specly +91 -0
- package/assets/templates/frontend-only/manifests/implementation.yaml +58 -0
- package/assets/templates/frontend-only/manifests/kubernetes.specly +140 -0
- package/assets/templates/frontend-only/package.json +59 -0
- package/assets/templates/frontend-only/scripts/test-all.sh +160 -0
- package/assets/templates/frontend-only/scripts/test-generated-code.sh +165 -0
- package/assets/templates/frontend-only/specs/main.specly +57 -0
- package/assets/templates/full-stack/AI-GUIDE.md +60 -0
- package/assets/templates/full-stack/CLAUDE.md +141 -0
- package/assets/templates/full-stack/README.md +382 -0
- package/assets/templates/full-stack/archive/AI-GUIDE-legacy.md +392 -0
- package/assets/templates/full-stack/deployments/README.md +149 -0
- package/assets/templates/full-stack/deployments/development.specly +53 -0
- package/assets/templates/full-stack/deployments/production.specly +87 -0
- package/assets/templates/full-stack/docs/README.md +51 -0
- package/assets/templates/full-stack/docs/api/README.md +7 -0
- package/assets/templates/full-stack/docs/diagrams/README.md +85 -0
- package/assets/templates/full-stack/docs/example-documentation-template.md +269 -0
- package/assets/templates/full-stack/docs/guides/README.md +15 -0
- package/assets/templates/full-stack/generated/README.md +56 -0
- package/assets/templates/full-stack/generated/code/integration-test.template.js +320 -0
- package/assets/templates/full-stack/generated/code/package.json.template +34 -0
- package/assets/templates/full-stack/generated/docs/README.md +49 -0
- package/assets/templates/full-stack/gitignore +54 -0
- package/assets/templates/full-stack/manifests/README.md +72 -0
- package/assets/templates/full-stack/manifests/docker-compose.specly +91 -0
- package/assets/templates/full-stack/manifests/implementation.yaml +155 -0
- package/assets/templates/full-stack/manifests/kubernetes.specly +140 -0
- package/assets/templates/full-stack/package.json +45 -0
- package/assets/templates/full-stack/scripts/test-all.sh +160 -0
- package/assets/templates/full-stack/scripts/test-generated-code.sh +165 -0
- package/assets/templates/full-stack/specs/example-v33.specly +297 -0
- package/assets/templates/full-stack/specs/main-simple.specly +73 -0
- package/assets/templates/full-stack/specs/main.specly +408 -0
- package/dist/engines/code-generator.d.ts +86 -0
- package/dist/engines/code-generator.d.ts.map +1 -0
- package/dist/engines/code-generator.js +159 -0
- package/dist/engines/code-generator.js.map +1 -0
- package/dist/engines/engine-registry.d.ts +94 -0
- package/dist/engines/engine-registry.d.ts.map +1 -0
- package/dist/engines/engine-registry.js +163 -0
- package/dist/engines/engine-registry.js.map +1 -0
- package/dist/engines/index.d.ts +10 -0
- package/dist/engines/index.d.ts.map +1 -0
- package/dist/engines/index.js +12 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/engines/typescript-engine.d.ts +74 -0
- package/dist/engines/typescript-engine.d.ts.map +1 -0
- package/dist/engines/typescript-engine.js +288 -0
- package/dist/engines/typescript-engine.js.map +1 -0
- package/dist/generators/index.d.ts +11 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/index.js +11 -0
- package/dist/generators/index.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +434 -0
- package/dist/index.js.map +1 -0
- package/dist/library/index.d.ts +12 -0
- package/dist/library/index.d.ts.map +1 -0
- package/dist/library/index.js +15 -0
- package/dist/library/index.js.map +1 -0
- package/dist/library/library.d.ts +132 -0
- package/dist/library/library.d.ts.map +1 -0
- package/dist/library/library.js +343 -0
- package/dist/library/library.js.map +1 -0
- package/dist/library/loader.d.ts +73 -0
- package/dist/library/loader.d.ts.map +1 -0
- package/dist/library/loader.js +150 -0
- package/dist/library/loader.js.map +1 -0
- package/dist/library/resolver.d.ts +104 -0
- package/dist/library/resolver.d.ts.map +1 -0
- package/dist/library/resolver.js +299 -0
- package/dist/library/resolver.js.map +1 -0
- package/dist/library/validator.d.ts +65 -0
- package/dist/library/validator.d.ts.map +1 -0
- package/dist/library/validator.js +203 -0
- package/dist/library/validator.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/instance-factory.d.ts +289 -0
- package/dist/types/instance-factory.d.ts.map +1 -0
- package/dist/types/instance-factory.js +8 -0
- package/dist/types/instance-factory.js.map +1 -0
- package/dist/types/unified-mappings.d.ts +163 -0
- package/dist/types/unified-mappings.d.ts.map +1 -0
- package/dist/types/unified-mappings.js +110 -0
- package/dist/types/unified-mappings.js.map +1 -0
- package/dist/utils/ai-spec-loader.d.ts +77 -0
- package/dist/utils/ai-spec-loader.d.ts.map +1 -0
- package/dist/utils/ai-spec-loader.js +138 -0
- package/dist/utils/ai-spec-loader.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/manifest-loader.d.ts +107 -0
- package/dist/utils/manifest-loader.d.ts.map +1 -0
- package/dist/utils/manifest-loader.js +168 -0
- package/dist/utils/manifest-loader.js.map +1 -0
- package/dist/utils/mapping-migration.d.ts +53 -0
- package/dist/utils/mapping-migration.d.ts.map +1 -0
- package/dist/utils/mapping-migration.js +194 -0
- package/dist/utils/mapping-migration.js.map +1 -0
- package/libs/instance-factories/CURVED-INTERFACE.md +278 -0
- package/libs/instance-factories/README.md +433 -0
- package/libs/instance-factories/applications/generic-app.yaml +52 -0
- package/libs/instance-factories/applications/react-app.yaml +186 -0
- package/libs/instance-factories/applications/templates/generic/backend-env-generator.ts +31 -0
- package/libs/instance-factories/applications/templates/generic/backend-package-json-generator.ts +80 -0
- package/libs/instance-factories/applications/templates/generic/backend-tsconfig-generator.ts +69 -0
- package/libs/instance-factories/applications/templates/generic/main-generator.ts +308 -0
- package/libs/instance-factories/applications/templates/react/_view-components-source.ts +555 -0
- package/libs/instance-factories/applications/templates/react/api-client-generator.ts +436 -0
- package/libs/instance-factories/applications/templates/react/api-types-generator.ts +153 -0
- package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +94 -0
- package/libs/instance-factories/applications/templates/react/env-example-generator.ts +24 -0
- package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +106 -0
- package/libs/instance-factories/applications/templates/react/gitignore-generator.ts +38 -0
- package/libs/instance-factories/applications/templates/react/index-css-generator.ts +85 -0
- package/libs/instance-factories/applications/templates/react/index-html-generator.ts +30 -0
- package/libs/instance-factories/applications/templates/react/main-tsx-generator.ts +34 -0
- package/libs/instance-factories/applications/templates/react/package-json-generator.ts +54 -0
- package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +179 -0
- package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +1347 -0
- package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +704 -0
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +84 -0
- package/libs/instance-factories/applications/templates/react/tsconfig-generator.ts +35 -0
- package/libs/instance-factories/applications/templates/react/use-api-hooks-generator.ts +121 -0
- package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +150 -0
- package/libs/instance-factories/applications/templates/react/view-form-generator.ts +362 -0
- package/libs/instance-factories/applications/templates/react/view-list-generator.ts +98 -0
- package/libs/instance-factories/applications/templates/react/view-router-generator.ts +89 -0
- package/libs/instance-factories/applications/templates/react/vite-config-generator.ts +49 -0
- package/libs/instance-factories/archived/fastify-prisma.yaml +104 -0
- package/libs/instance-factories/cli/commander-js.yaml +55 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.d.ts +12 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.d.ts.map +1 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.js +115 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.js.map +1 -0
- package/libs/instance-factories/cli/templates/commander/cli-entry-generator.ts +145 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.d.ts +14 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.d.ts.map +1 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.js +182 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.js.map +1 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +992 -0
- package/libs/instance-factories/communication/event-emitter.yaml +56 -0
- package/libs/instance-factories/communication/rabbitmq-events.yaml +87 -0
- package/libs/instance-factories/communication/templates/eventemitter/bus-generator.ts +93 -0
- package/libs/instance-factories/communication/templates/eventemitter/publisher-generator.ts +117 -0
- package/libs/instance-factories/communication/templates/eventemitter/subscriber-generator.ts +101 -0
- package/libs/instance-factories/controllers/fastify.yaml +127 -0
- package/libs/instance-factories/controllers/templates/fastify/meta-routes-generator.ts +103 -0
- package/libs/instance-factories/controllers/templates/fastify/routes-generator.ts +389 -0
- package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +76 -0
- package/libs/instance-factories/infrastructure/docker-k8s.yaml +61 -0
- package/libs/instance-factories/infrastructure/templates/docker-k8s/infrastructure-generator.ts +46 -0
- package/libs/instance-factories/orms/prisma.yaml +89 -0
- package/libs/instance-factories/orms/templates/prisma/schema-generator.ts +563 -0
- package/libs/instance-factories/orms/templates/prisma/services-generator.ts +408 -0
- package/libs/instance-factories/scaffolding/generic-scaffold.yaml +65 -0
- package/libs/instance-factories/scaffolding/templates/generic/env-example-generator.ts +73 -0
- package/libs/instance-factories/scaffolding/templates/generic/env-generator.ts +85 -0
- package/libs/instance-factories/scaffolding/templates/generic/gitignore-generator.ts +69 -0
- package/libs/instance-factories/scaffolding/templates/generic/package-json-generator.ts +176 -0
- package/libs/instance-factories/scaffolding/templates/generic/readme-generator.ts +207 -0
- package/libs/instance-factories/scaffolding/templates/generic/tsconfig-generator.ts +78 -0
- package/libs/instance-factories/scaffolding/templates/generic/tsconfig-react-generator.ts +41 -0
- package/libs/instance-factories/sdks/python-sdk.yaml +66 -0
- package/libs/instance-factories/sdks/templates/python/sdk-generator.ts +50 -0
- package/libs/instance-factories/sdks/templates/typescript/sdk-generator.ts +49 -0
- package/libs/instance-factories/sdks/typescript-sdk.yaml +59 -0
- package/libs/instance-factories/services/prisma-services.yaml +71 -0
- package/libs/instance-factories/services/templates/prisma/behavior-generator.ts +303 -0
- package/libs/instance-factories/services/templates/prisma/controller-generator.ts +532 -0
- package/libs/instance-factories/services/templates/prisma/service-generator.ts +315 -0
- package/libs/instance-factories/shared/path-resolver.ts +111 -0
- package/libs/instance-factories/storage/mongodb.yaml +79 -0
- package/libs/instance-factories/storage/postgresql.yaml +75 -0
- package/libs/instance-factories/storage/redis.yaml +79 -0
- package/libs/instance-factories/storage/templates/mongodb/config-generator.ts +15 -0
- package/libs/instance-factories/storage/templates/mongodb/docker-generator.ts +18 -0
- package/libs/instance-factories/storage/templates/postgresql/config-generator.ts +54 -0
- package/libs/instance-factories/storage/templates/postgresql/docker-generator.ts +55 -0
- package/libs/instance-factories/storage/templates/redis/config-generator.ts +16 -0
- package/libs/instance-factories/storage/templates/redis/docker-generator.ts +18 -0
- package/libs/instance-factories/test-generation.ts +192 -0
- package/libs/instance-factories/testing/templates/vitest/tests-generator.ts +51 -0
- package/libs/instance-factories/testing/vitest-tests.yaml +63 -0
- package/libs/instance-factories/tools/templates/mcp/mcp-server-generator.ts +136 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/DEPLOYMENT_GUIDE.md +630 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/HYBRID_RESOURCE_SYSTEM.md +330 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/EXTENSION_DEPLOYMENT.md +552 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/LOCAL_DEPLOYMENT.md +164 -0
- package/libs/instance-factories/tools/templates/mcp/static/docs/deployments/WEB_DEPLOYMENT.md +247 -0
- package/libs/instance-factories/tools/templates/mcp/static/package.json +92 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-enterprise.js +284 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-extension.js +139 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-local.js +74 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/build-web.js +156 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/copy-canonical-files.js +41 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-deployments.js +259 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-hybrid-resources.js +231 -0
- package/libs/instance-factories/tools/templates/mcp/static/scripts/test-hybrid-simple.js +196 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/controllers/MCPServerController.ts +293 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/events/EventEmitter.ts +90 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/index.ts +24 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/interfaces/ResourceProvider.ts +15 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/models/LibrarySuggestion.ts +106 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/models/SpecVerseResource.ts +75 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/server/mcp-server.ts +239 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/CLIProxyService.ts +1501 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/EmbeddedResourcesAdapter.ts +211 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/EntityModuleService.ts +308 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/HybridResourcesProvider.ts +210 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/LibraryToolsService.ts +356 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorBridge.ts +524 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorToolsService.ts +530 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/PromptToolsService.ts +594 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/services/ResourcesProviderService.ts +170 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.init.test.ts +544 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/CLIProxyService.test.ts +189 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/tests/unit/ResourcesProviderService.test.ts +89 -0
- package/libs/instance-factories/tools/templates/mcp/static/src/types/index.ts +110 -0
- package/libs/instance-factories/tools/templates/mcp/static/tsconfig.json +28 -0
- package/libs/instance-factories/tools/templates/vscode/static/extension.ts +1195 -0
- package/libs/instance-factories/tools/templates/vscode/static/language-configuration.json +34 -0
- package/libs/instance-factories/tools/templates/vscode/static/schemas/specverse-v3-schema.json +4279 -0
- package/libs/instance-factories/tools/templates/vscode/static/syntaxes/specverse.tmLanguage.json +138 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/README.md +74 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/complete-specverse-colors.json +122 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-basic-theme.json +65 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-complete-theme.json +123 -0
- package/libs/instance-factories/tools/templates/vscode/static/themes/specverse-theme-colors.json +64 -0
- package/libs/instance-factories/tools/templates/vscode/vscode-extension-generator.ts +214 -0
- package/libs/instance-factories/validation/templates/zod/validation-generator.ts +46 -0
- package/libs/instance-factories/validation/zod.yaml +56 -0
- package/libs/instance-factories/views/index.d.ts +13 -0
- package/libs/instance-factories/views/index.d.ts.map +1 -0
- package/libs/instance-factories/views/index.js +18 -0
- package/libs/instance-factories/views/index.js.map +1 -0
- package/libs/instance-factories/views/index.ts +45 -0
- package/libs/instance-factories/views/react-components.yaml +129 -0
- package/libs/instance-factories/views/templates/ARCHITECTURE.md +198 -0
- package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +869 -0
- package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +953 -0
- package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +806 -0
- package/libs/instance-factories/views/templates/react/app-generator.ts +55 -0
- package/libs/instance-factories/views/templates/react/components-generator.ts +391 -0
- package/libs/instance-factories/views/templates/react/forms-generator.ts +343 -0
- package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +54 -0
- package/libs/instance-factories/views/templates/react/hooks-generator.ts +122 -0
- package/libs/instance-factories/views/templates/react/index-css-generator.ts +209 -0
- package/libs/instance-factories/views/templates/react/index-html-generator.ts +34 -0
- package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +29 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +152 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.js +398 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.js.map +1 -0
- package/libs/instance-factories/views/templates/react/react-component-generator.ts +533 -0
- package/libs/instance-factories/views/templates/react/router-generator.ts +197 -0
- package/libs/instance-factories/views/templates/react/router-generic-generator.ts +103 -0
- package/libs/instance-factories/views/templates/react/spec-json-generator.ts +17 -0
- package/libs/instance-factories/views/templates/react/types-generator.ts +76 -0
- package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +42 -0
- package/libs/instance-factories/views/templates/react/vite-config-generator.ts +38 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +1 -0
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +474 -0
- package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +242 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +77 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.js +47 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/adapter-types.ts +142 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +63 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +822 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +908 -0
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts +247 -0
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/base-generator.js +363 -0
- package/libs/instance-factories/views/templates/shared/base-generator.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/base-generator.ts +608 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +254 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.js +602 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/component-metadata.ts +803 -0
- package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +250 -0
- package/libs/instance-factories/views/templates/shared/composite-patterns.ts +535 -0
- package/libs/instance-factories/views/templates/shared/index.ts +68 -0
- package/libs/instance-factories/views/templates/shared/pattern-validator.ts +279 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +149 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.js +580 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/property-mapper.ts +700 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +143 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +1 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js +420 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +1 -0
- package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +539 -0
- package/package.json +42 -0
- package/schema/SPECVERSE-SCHEMA.json +4274 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base Generator - Abstract Class for Framework Generators
|
|
3
|
+
*
|
|
4
|
+
* Provides shared functionality for React, Vue, Svelte, Angular, and Runtime generators.
|
|
5
|
+
* Enforces architectural constraints (nesting depth, state management) while allowing
|
|
6
|
+
* framework-specific implementation details.
|
|
7
|
+
*
|
|
8
|
+
* Architecture:
|
|
9
|
+
* - Shared: Component tree rendering, property mapping, nesting enforcement
|
|
10
|
+
* - Abstract: Syntax generation, file structure, imports (framework-specific)
|
|
11
|
+
* - Constraints: MAX_DEPTH = 3, basic state only, common properties only
|
|
12
|
+
*/
|
|
13
|
+
import { PropertyTarget } from './property-mapper.js';
|
|
14
|
+
import { FrameworkTarget } from './syntax-mapper.js';
|
|
15
|
+
import { AtomicComponentDefinition } from './atomic-components-registry.js';
|
|
16
|
+
import type { ComponentAdapter } from './adapter-types.js';
|
|
17
|
+
/**
|
|
18
|
+
* UI Component specification from SpecVerse view definition
|
|
19
|
+
*/
|
|
20
|
+
export interface UIComponent {
|
|
21
|
+
type: string;
|
|
22
|
+
properties?: Record<string, any>;
|
|
23
|
+
children?: UIComponent[];
|
|
24
|
+
dataSource?: string;
|
|
25
|
+
condition?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* View specification from SpecVerse
|
|
29
|
+
*/
|
|
30
|
+
export interface ViewSpec {
|
|
31
|
+
name: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
components: Record<string, UIComponent>;
|
|
34
|
+
state?: Record<string, StateDefinition>;
|
|
35
|
+
events?: Record<string, EventDefinition>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* State variable definition
|
|
39
|
+
*/
|
|
40
|
+
export interface StateDefinition {
|
|
41
|
+
type: string;
|
|
42
|
+
initial: any;
|
|
43
|
+
description?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Event handler definition
|
|
47
|
+
*/
|
|
48
|
+
export interface EventDefinition {
|
|
49
|
+
params?: string;
|
|
50
|
+
body: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Component rendering context
|
|
55
|
+
*/
|
|
56
|
+
export interface RenderContext {
|
|
57
|
+
depth: number;
|
|
58
|
+
path: string[];
|
|
59
|
+
parentComponent?: string;
|
|
60
|
+
dataContext?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Generation result
|
|
64
|
+
*/
|
|
65
|
+
export interface GenerationResult {
|
|
66
|
+
code: string;
|
|
67
|
+
imports: string[];
|
|
68
|
+
warnings: string[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Generator configuration
|
|
72
|
+
*/
|
|
73
|
+
export interface GeneratorConfig {
|
|
74
|
+
target: PropertyTarget;
|
|
75
|
+
framework: FrameworkTarget;
|
|
76
|
+
maxDepth?: number;
|
|
77
|
+
enableWarnings?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Base generator for all framework implementations
|
|
81
|
+
*
|
|
82
|
+
* Provides shared logic for:
|
|
83
|
+
* - Component tree rendering with depth enforcement
|
|
84
|
+
* - Property mapping via property-mapper
|
|
85
|
+
* - Nesting validation and flattening
|
|
86
|
+
* - State and event management
|
|
87
|
+
*
|
|
88
|
+
* Framework-specific subclasses must implement:
|
|
89
|
+
* - generateImports(): Framework-specific import statements
|
|
90
|
+
* - generateComponent(): Framework-specific component structure
|
|
91
|
+
* - generateState(): Framework-specific state declarations
|
|
92
|
+
* - generateEvents(): Framework-specific event handlers
|
|
93
|
+
*/
|
|
94
|
+
export declare abstract class BaseComponentGenerator {
|
|
95
|
+
protected readonly config: GeneratorConfig;
|
|
96
|
+
protected readonly adapter: ComponentAdapter;
|
|
97
|
+
protected readonly MAX_DEPTH: number;
|
|
98
|
+
protected readonly ENABLE_WARNINGS: boolean;
|
|
99
|
+
protected warnings: string[];
|
|
100
|
+
protected imports: Set<string>;
|
|
101
|
+
constructor(adapter: ComponentAdapter, config: GeneratorConfig);
|
|
102
|
+
/**
|
|
103
|
+
* Generate code for a complete view specification
|
|
104
|
+
*
|
|
105
|
+
* @param viewSpec - View specification from SpecVerse
|
|
106
|
+
* @returns Generation result with code, imports, and warnings
|
|
107
|
+
*/
|
|
108
|
+
generate(viewSpec: ViewSpec): GenerationResult;
|
|
109
|
+
/**
|
|
110
|
+
* Render all components in the view
|
|
111
|
+
*/
|
|
112
|
+
protected generateComponentTree(components: Record<string, UIComponent>): string;
|
|
113
|
+
/**
|
|
114
|
+
* Render a single component with depth tracking and nesting enforcement
|
|
115
|
+
*
|
|
116
|
+
* This is the core shared logic - applies to ALL frameworks
|
|
117
|
+
*/
|
|
118
|
+
protected renderComponent(component: UIComponent, context: RenderContext): string;
|
|
119
|
+
/**
|
|
120
|
+
* Map component properties using property-mapper
|
|
121
|
+
*/
|
|
122
|
+
protected mapComponentProperties(component: UIComponent, componentDef: AtomicComponentDefinition): Record<string, any>;
|
|
123
|
+
/**
|
|
124
|
+
* Render child components with incremented depth
|
|
125
|
+
*/
|
|
126
|
+
protected renderChildren(children: UIComponent[], parentContext: RenderContext): string;
|
|
127
|
+
/**
|
|
128
|
+
* Render conditional component using syntax-mapper
|
|
129
|
+
*/
|
|
130
|
+
protected renderConditional(component: UIComponent, mappedProps: Record<string, any>, context: RenderContext): string;
|
|
131
|
+
/**
|
|
132
|
+
* Render list (loop) component using syntax-mapper
|
|
133
|
+
*/
|
|
134
|
+
protected renderList(component: UIComponent, mappedProps: Record<string, any>, context: RenderContext): string;
|
|
135
|
+
/**
|
|
136
|
+
* Flatten component when depth exceeded
|
|
137
|
+
*
|
|
138
|
+
* Extracts nested children into sibling components to reduce nesting
|
|
139
|
+
*/
|
|
140
|
+
protected renderFlattened(component: UIComponent, context: RenderContext): string;
|
|
141
|
+
/**
|
|
142
|
+
* Delegate to adapter for actual component rendering
|
|
143
|
+
*/
|
|
144
|
+
protected renderAdapterComponent(type: string, properties: Record<string, any>, children: string | undefined, context: RenderContext): string;
|
|
145
|
+
/**
|
|
146
|
+
* Get component name for import/usage
|
|
147
|
+
*/
|
|
148
|
+
protected getComponentName(type: string): string;
|
|
149
|
+
/**
|
|
150
|
+
* Get item variable name for loop rendering
|
|
151
|
+
*/
|
|
152
|
+
protected getItemName(dataSource: string): string;
|
|
153
|
+
/**
|
|
154
|
+
* Get key property for list items
|
|
155
|
+
*/
|
|
156
|
+
protected getKeyProperty(component: UIComponent): string;
|
|
157
|
+
/**
|
|
158
|
+
* Format properties for inline rendering
|
|
159
|
+
*/
|
|
160
|
+
protected formatProps(properties: Record<string, any>): string;
|
|
161
|
+
/**
|
|
162
|
+
* Add warning message
|
|
163
|
+
*/
|
|
164
|
+
protected addWarning(message: string): void;
|
|
165
|
+
/**
|
|
166
|
+
* Reset generator state for new generation
|
|
167
|
+
*/
|
|
168
|
+
protected reset(): void;
|
|
169
|
+
/**
|
|
170
|
+
* Add import statement
|
|
171
|
+
*/
|
|
172
|
+
protected addImport(importStatement: string): void;
|
|
173
|
+
/**
|
|
174
|
+
* Generate import statements for the framework
|
|
175
|
+
*
|
|
176
|
+
* @param viewSpec - View specification
|
|
177
|
+
* @returns Import statements code
|
|
178
|
+
*/
|
|
179
|
+
protected abstract generateImports(viewSpec: ViewSpec): string;
|
|
180
|
+
/**
|
|
181
|
+
* Generate complete component code with framework-specific structure
|
|
182
|
+
*
|
|
183
|
+
* @param parts - Component parts (imports, state, events, components)
|
|
184
|
+
* @returns Complete component code
|
|
185
|
+
*/
|
|
186
|
+
protected abstract generateComponent(parts: {
|
|
187
|
+
name: string;
|
|
188
|
+
imports: string;
|
|
189
|
+
state: string;
|
|
190
|
+
events: string;
|
|
191
|
+
components: string;
|
|
192
|
+
}): string;
|
|
193
|
+
/**
|
|
194
|
+
* Generate state declarations using framework-specific syntax
|
|
195
|
+
*
|
|
196
|
+
* @param state - State definitions
|
|
197
|
+
* @returns State declaration code
|
|
198
|
+
*/
|
|
199
|
+
protected abstract generateState(state: Record<string, StateDefinition>): string;
|
|
200
|
+
/**
|
|
201
|
+
* Generate event handlers using framework-specific syntax
|
|
202
|
+
*
|
|
203
|
+
* @param events - Event definitions
|
|
204
|
+
* @returns Event handler code
|
|
205
|
+
*/
|
|
206
|
+
protected abstract generateEvents(events: Record<string, EventDefinition>): string;
|
|
207
|
+
/**
|
|
208
|
+
* Get file extension for the framework
|
|
209
|
+
*
|
|
210
|
+
* @returns File extension (e.g., '.tsx', '.vue', '.svelte')
|
|
211
|
+
*/
|
|
212
|
+
abstract getFileExtension(): string;
|
|
213
|
+
/**
|
|
214
|
+
* Get additional files that need to be generated (e.g., CSS, types)
|
|
215
|
+
*
|
|
216
|
+
* @param viewSpec - View specification
|
|
217
|
+
* @returns Map of filename to content
|
|
218
|
+
*/
|
|
219
|
+
abstract getAdditionalFiles(viewSpec: ViewSpec): Record<string, string>;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Validate component nesting depth
|
|
223
|
+
*
|
|
224
|
+
* @param component - Component to validate
|
|
225
|
+
* @param maxDepth - Maximum allowed depth
|
|
226
|
+
* @returns Validation result with depth and issues
|
|
227
|
+
*/
|
|
228
|
+
export declare function validateNestingDepth(component: UIComponent, maxDepth?: number): {
|
|
229
|
+
valid: boolean;
|
|
230
|
+
actualDepth: number;
|
|
231
|
+
issues: string[];
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Extract all component types used in a view
|
|
235
|
+
*
|
|
236
|
+
* @param components - Component tree
|
|
237
|
+
* @returns Set of component types
|
|
238
|
+
*/
|
|
239
|
+
export declare function extractComponentTypes(components: Record<string, UIComponent>): Set<string>;
|
|
240
|
+
/**
|
|
241
|
+
* Count total components in a view
|
|
242
|
+
*
|
|
243
|
+
* @param components - Component tree
|
|
244
|
+
* @returns Component count
|
|
245
|
+
*/
|
|
246
|
+
export declare function countComponents(components: Record<string, UIComponent>): number;
|
|
247
|
+
//# sourceMappingURL=base-generator.d.ts.map
|
|
@@ -0,0 +1 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|
|
|
1
|
+
/**
|
|
2
|
+
* Base Generator - Abstract Class for Framework Generators
|
|
3
|
+
*
|
|
4
|
+
* Provides shared functionality for React, Vue, Svelte, Angular, and Runtime generators.
|
|
5
|
+
* Enforces architectural constraints (nesting depth, state management) while allowing
|
|
6
|
+
* framework-specific implementation details.
|
|
7
|
+
*
|
|
8
|
+
* Architecture:
|
|
9
|
+
* - Shared: Component tree rendering, property mapping, nesting enforcement
|
|
10
|
+
* - Abstract: Syntax generation, file structure, imports (framework-specific)
|
|
11
|
+
* - Constraints: MAX_DEPTH = 3, basic state only, common properties only
|
|
12
|
+
*/
|
|
13
|
+
import { mapProperties } from './property-mapper.js';
|
|
14
|
+
import { getSyntaxPattern } from './syntax-mapper.js';
|
|
15
|
+
import { ATOMIC_COMPONENTS_REGISTRY } from './atomic-components-registry.js';
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// Base Generator Abstract Class
|
|
18
|
+
// ============================================================================
|
|
19
|
+
/**
|
|
20
|
+
* Base generator for all framework implementations
|
|
21
|
+
*
|
|
22
|
+
* Provides shared logic for:
|
|
23
|
+
* - Component tree rendering with depth enforcement
|
|
24
|
+
* - Property mapping via property-mapper
|
|
25
|
+
* - Nesting validation and flattening
|
|
26
|
+
* - State and event management
|
|
27
|
+
*
|
|
28
|
+
* Framework-specific subclasses must implement:
|
|
29
|
+
* - generateImports(): Framework-specific import statements
|
|
30
|
+
* - generateComponent(): Framework-specific component structure
|
|
31
|
+
* - generateState(): Framework-specific state declarations
|
|
32
|
+
* - generateEvents(): Framework-specific event handlers
|
|
33
|
+
*/
|
|
34
|
+
export class BaseComponentGenerator {
|
|
35
|
+
// Configuration
|
|
36
|
+
config;
|
|
37
|
+
adapter;
|
|
38
|
+
// Architectural constraints
|
|
39
|
+
MAX_DEPTH;
|
|
40
|
+
ENABLE_WARNINGS;
|
|
41
|
+
// Tracking
|
|
42
|
+
warnings = [];
|
|
43
|
+
imports = new Set();
|
|
44
|
+
constructor(adapter, config) {
|
|
45
|
+
this.adapter = adapter;
|
|
46
|
+
this.config = config;
|
|
47
|
+
this.MAX_DEPTH = config.maxDepth ?? 3;
|
|
48
|
+
this.ENABLE_WARNINGS = config.enableWarnings ?? true;
|
|
49
|
+
}
|
|
50
|
+
// ============================================================================
|
|
51
|
+
// Public API
|
|
52
|
+
// ============================================================================
|
|
53
|
+
/**
|
|
54
|
+
* Generate code for a complete view specification
|
|
55
|
+
*
|
|
56
|
+
* @param viewSpec - View specification from SpecVerse
|
|
57
|
+
* @returns Generation result with code, imports, and warnings
|
|
58
|
+
*/
|
|
59
|
+
generate(viewSpec) {
|
|
60
|
+
this.reset();
|
|
61
|
+
// Generate imports
|
|
62
|
+
const importStatements = this.generateImports(viewSpec);
|
|
63
|
+
// Generate state declarations
|
|
64
|
+
const stateCode = viewSpec.state
|
|
65
|
+
? this.generateState(viewSpec.state)
|
|
66
|
+
: '';
|
|
67
|
+
// Generate event handlers
|
|
68
|
+
const eventsCode = viewSpec.events
|
|
69
|
+
? this.generateEvents(viewSpec.events)
|
|
70
|
+
: '';
|
|
71
|
+
// Generate component tree
|
|
72
|
+
const componentsCode = this.generateComponentTree(viewSpec.components);
|
|
73
|
+
// Generate complete component
|
|
74
|
+
const code = this.generateComponent({
|
|
75
|
+
name: viewSpec.name,
|
|
76
|
+
imports: importStatements,
|
|
77
|
+
state: stateCode,
|
|
78
|
+
events: eventsCode,
|
|
79
|
+
components: componentsCode
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
code,
|
|
83
|
+
imports: Array.from(this.imports),
|
|
84
|
+
warnings: this.warnings
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
// ============================================================================
|
|
88
|
+
// Shared Component Rendering (Framework-Agnostic)
|
|
89
|
+
// ============================================================================
|
|
90
|
+
/**
|
|
91
|
+
* Render all components in the view
|
|
92
|
+
*/
|
|
93
|
+
generateComponentTree(components) {
|
|
94
|
+
const rendered = Object.entries(components).map(([name, component]) => {
|
|
95
|
+
return this.renderComponent(component, {
|
|
96
|
+
depth: 0,
|
|
97
|
+
path: [name],
|
|
98
|
+
dataContext: undefined
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
return rendered.join('\n\n');
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Render a single component with depth tracking and nesting enforcement
|
|
105
|
+
*
|
|
106
|
+
* This is the core shared logic - applies to ALL frameworks
|
|
107
|
+
*/
|
|
108
|
+
renderComponent(component, context) {
|
|
109
|
+
// Depth enforcement
|
|
110
|
+
if (context.depth > this.MAX_DEPTH) {
|
|
111
|
+
this.addWarning(`Component at path ${context.path.join('.')} exceeds max depth (${this.MAX_DEPTH}). ` +
|
|
112
|
+
`Flattening to maintain readability.`);
|
|
113
|
+
return this.renderFlattened(component, context);
|
|
114
|
+
}
|
|
115
|
+
// Get component definition from registry
|
|
116
|
+
const componentDef = ATOMIC_COMPONENTS_REGISTRY[component.type];
|
|
117
|
+
if (!componentDef) {
|
|
118
|
+
this.addWarning(`Unknown component type: ${component.type}`);
|
|
119
|
+
return `<!-- Unknown component: ${component.type} -->`;
|
|
120
|
+
}
|
|
121
|
+
// Map properties to target framework
|
|
122
|
+
const mappedProps = this.mapComponentProperties(component, componentDef);
|
|
123
|
+
// Handle conditional rendering
|
|
124
|
+
if (component.condition) {
|
|
125
|
+
return this.renderConditional(component, mappedProps, context);
|
|
126
|
+
}
|
|
127
|
+
// Handle list rendering (dataSource)
|
|
128
|
+
if (component.dataSource) {
|
|
129
|
+
return this.renderList(component, mappedProps, context);
|
|
130
|
+
}
|
|
131
|
+
// Handle children
|
|
132
|
+
const children = component.children
|
|
133
|
+
? this.renderChildren(component.children, context)
|
|
134
|
+
: undefined;
|
|
135
|
+
// Delegate to adapter for framework-specific rendering
|
|
136
|
+
return this.renderAdapterComponent(component.type, mappedProps, children, context);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Map component properties using property-mapper
|
|
140
|
+
*/
|
|
141
|
+
mapComponentProperties(component, componentDef) {
|
|
142
|
+
if (!component.properties) {
|
|
143
|
+
return {};
|
|
144
|
+
}
|
|
145
|
+
return mapProperties(component.type, component.properties, this.config.target);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Render child components with incremented depth
|
|
149
|
+
*/
|
|
150
|
+
renderChildren(children, parentContext) {
|
|
151
|
+
const childContext = {
|
|
152
|
+
...parentContext,
|
|
153
|
+
depth: parentContext.depth + 1
|
|
154
|
+
};
|
|
155
|
+
return children
|
|
156
|
+
.map((child, index) => {
|
|
157
|
+
const childPath = [...parentContext.path, `child_${index}`];
|
|
158
|
+
return this.renderComponent(child, {
|
|
159
|
+
...childContext,
|
|
160
|
+
path: childPath
|
|
161
|
+
});
|
|
162
|
+
})
|
|
163
|
+
.join('\n');
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Render conditional component using syntax-mapper
|
|
167
|
+
*/
|
|
168
|
+
renderConditional(component, mappedProps, context) {
|
|
169
|
+
const innerComponent = this.renderAdapterComponent(component.type, mappedProps, component.children
|
|
170
|
+
? this.renderChildren(component.children, context)
|
|
171
|
+
: undefined, context);
|
|
172
|
+
// Use syntax-mapper for framework-specific conditional syntax
|
|
173
|
+
return getSyntaxPattern('conditionalRender', this.config.framework, {
|
|
174
|
+
condition: component.condition,
|
|
175
|
+
Component: this.getComponentName(component.type),
|
|
176
|
+
props: this.formatProps(mappedProps)
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Render list (loop) component using syntax-mapper
|
|
181
|
+
*/
|
|
182
|
+
renderList(component, mappedProps, context) {
|
|
183
|
+
const itemName = this.getItemName(component.dataSource);
|
|
184
|
+
const keyProperty = this.getKeyProperty(component);
|
|
185
|
+
// Create child context with data variable
|
|
186
|
+
const childContext = {
|
|
187
|
+
...context,
|
|
188
|
+
depth: context.depth + 1,
|
|
189
|
+
dataContext: itemName
|
|
190
|
+
};
|
|
191
|
+
// Use syntax-mapper for framework-specific loop syntax
|
|
192
|
+
return getSyntaxPattern('loopRender', this.config.framework, {
|
|
193
|
+
array: component.dataSource,
|
|
194
|
+
item: itemName,
|
|
195
|
+
key: keyProperty,
|
|
196
|
+
Component: this.getComponentName(component.type)
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Flatten component when depth exceeded
|
|
201
|
+
*
|
|
202
|
+
* Extracts nested children into sibling components to reduce nesting
|
|
203
|
+
*/
|
|
204
|
+
renderFlattened(component, context) {
|
|
205
|
+
// Render component without children
|
|
206
|
+
const componentDef = ATOMIC_COMPONENTS_REGISTRY[component.type];
|
|
207
|
+
const mappedProps = this.mapComponentProperties(component, componentDef);
|
|
208
|
+
const flatComponent = this.renderAdapterComponent(component.type, mappedProps, undefined, // No children
|
|
209
|
+
context);
|
|
210
|
+
// Render children as siblings (extracted)
|
|
211
|
+
const flattenedChildren = component.children
|
|
212
|
+
? component.children.map((child, index) => {
|
|
213
|
+
return this.renderComponent(child, {
|
|
214
|
+
depth: context.depth, // Same depth (sibling)
|
|
215
|
+
path: [...context.path, `flattened_${index}`]
|
|
216
|
+
});
|
|
217
|
+
}).join('\n')
|
|
218
|
+
: '';
|
|
219
|
+
return flatComponent + '\n' + flattenedChildren;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Delegate to adapter for actual component rendering
|
|
223
|
+
*/
|
|
224
|
+
renderAdapterComponent(type, properties, children, context) {
|
|
225
|
+
const adapterComponent = this.adapter.components[type];
|
|
226
|
+
if (!adapterComponent) {
|
|
227
|
+
this.addWarning(`Adapter missing component: ${type}`);
|
|
228
|
+
return `<!-- Missing adapter for: ${type} -->`;
|
|
229
|
+
}
|
|
230
|
+
return adapterComponent.render({
|
|
231
|
+
properties,
|
|
232
|
+
children,
|
|
233
|
+
context: {
|
|
234
|
+
depth: context.depth,
|
|
235
|
+
dataContext: context.dataContext
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
// ============================================================================
|
|
240
|
+
// Helper Methods
|
|
241
|
+
// ============================================================================
|
|
242
|
+
/**
|
|
243
|
+
* Get component name for import/usage
|
|
244
|
+
*/
|
|
245
|
+
getComponentName(type) {
|
|
246
|
+
const componentDef = ATOMIC_COMPONENTS_REGISTRY[type];
|
|
247
|
+
return componentDef?.name || type.charAt(0).toUpperCase() + type.slice(1);
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Get item variable name for loop rendering
|
|
251
|
+
*/
|
|
252
|
+
getItemName(dataSource) {
|
|
253
|
+
// Convert "users" -> "user", "items" -> "item"
|
|
254
|
+
if (dataSource.endsWith('s')) {
|
|
255
|
+
return dataSource.slice(0, -1);
|
|
256
|
+
}
|
|
257
|
+
return dataSource + 'Item';
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Get key property for list items
|
|
261
|
+
*/
|
|
262
|
+
getKeyProperty(component) {
|
|
263
|
+
return component.properties?.keyProperty || 'id';
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Format properties for inline rendering
|
|
267
|
+
*/
|
|
268
|
+
formatProps(properties) {
|
|
269
|
+
return Object.entries(properties)
|
|
270
|
+
.map(([key, value]) => {
|
|
271
|
+
if (typeof value === 'string') {
|
|
272
|
+
return `${key}="${value}"`;
|
|
273
|
+
}
|
|
274
|
+
return `${key}={${JSON.stringify(value)}}`;
|
|
275
|
+
})
|
|
276
|
+
.join(' ');
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Add warning message
|
|
280
|
+
*/
|
|
281
|
+
addWarning(message) {
|
|
282
|
+
if (this.ENABLE_WARNINGS) {
|
|
283
|
+
this.warnings.push(message);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Reset generator state for new generation
|
|
288
|
+
*/
|
|
289
|
+
reset() {
|
|
290
|
+
this.warnings = [];
|
|
291
|
+
this.imports = new Set();
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Add import statement
|
|
295
|
+
*/
|
|
296
|
+
addImport(importStatement) {
|
|
297
|
+
this.imports.add(importStatement);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
// ============================================================================
|
|
301
|
+
// Utility Functions
|
|
302
|
+
// ============================================================================
|
|
303
|
+
/**
|
|
304
|
+
* Validate component nesting depth
|
|
305
|
+
*
|
|
306
|
+
* @param component - Component to validate
|
|
307
|
+
* @param maxDepth - Maximum allowed depth
|
|
308
|
+
* @returns Validation result with depth and issues
|
|
309
|
+
*/
|
|
310
|
+
export function validateNestingDepth(component, maxDepth = 3) {
|
|
311
|
+
const issues = [];
|
|
312
|
+
function calculateDepth(comp, currentDepth) {
|
|
313
|
+
if (!comp.children || comp.children.length === 0) {
|
|
314
|
+
return currentDepth;
|
|
315
|
+
}
|
|
316
|
+
const childDepths = comp.children.map(child => calculateDepth(child, currentDepth + 1));
|
|
317
|
+
return Math.max(...childDepths);
|
|
318
|
+
}
|
|
319
|
+
const actualDepth = calculateDepth(component, 0);
|
|
320
|
+
if (actualDepth > maxDepth) {
|
|
321
|
+
issues.push(`Component nesting depth (${actualDepth}) exceeds maximum (${maxDepth})`);
|
|
322
|
+
}
|
|
323
|
+
return {
|
|
324
|
+
valid: actualDepth <= maxDepth,
|
|
325
|
+
actualDepth,
|
|
326
|
+
issues
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Extract all component types used in a view
|
|
331
|
+
*
|
|
332
|
+
* @param components - Component tree
|
|
333
|
+
* @returns Set of component types
|
|
334
|
+
*/
|
|
335
|
+
export function extractComponentTypes(components) {
|
|
336
|
+
const types = new Set();
|
|
337
|
+
function walk(component) {
|
|
338
|
+
types.add(component.type);
|
|
339
|
+
if (component.children) {
|
|
340
|
+
component.children.forEach(walk);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
Object.values(components).forEach(walk);
|
|
344
|
+
return types;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Count total components in a view
|
|
348
|
+
*
|
|
349
|
+
* @param components - Component tree
|
|
350
|
+
* @returns Component count
|
|
351
|
+
*/
|
|
352
|
+
export function countComponents(components) {
|
|
353
|
+
let count = 0;
|
|
354
|
+
function walk(component) {
|
|
355
|
+
count++;
|
|
356
|
+
if (component.children) {
|
|
357
|
+
component.children.forEach(walk);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
Object.values(components).forEach(walk);
|
|
361
|
+
return count;
|
|
362
|
+
}
|
|
363
|
+
//# sourceMappingURL=base-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-generator.js","sourceRoot":"","sources":["base-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAkB,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAA6B,MAAM,iCAAiC,CAAC;AA4ExG,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAgB,sBAAsB;IAC1C,gBAAgB;IACG,MAAM,CAAkB;IACxB,OAAO,CAAmB;IAE7C,4BAA4B;IACT,SAAS,CAAS;IAClB,eAAe,CAAU;IAE5C,WAAW;IACD,QAAQ,GAAa,EAAE,CAAC;IACxB,OAAO,GAAgB,IAAI,GAAG,EAAE,CAAC;IAE3C,YAAY,OAAyB,EAAE,MAAuB;QAC5D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,cAAc,IAAI,IAAI,CAAC;IACvD,CAAC;IAED,+EAA+E;IAC/E,aAAa;IACb,+EAA+E;IAE/E;;;;;OAKG;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