@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,420 @@
|
|
|
1
|
+
name: GeneratedComponent
|
|
2
|
+
version: 3.1.0
|
|
3
|
+
description: Auto-generated component with 1 models
|
|
4
|
+
controllers:
|
|
5
|
+
ProductController:
|
|
6
|
+
model: Product
|
|
7
|
+
description: Auto-generated CURED controller for Product
|
|
8
|
+
cured:
|
|
9
|
+
create:
|
|
10
|
+
parameters:
|
|
11
|
+
data: Product required
|
|
12
|
+
returns: Product
|
|
13
|
+
requires:
|
|
14
|
+
- Product data is valid
|
|
15
|
+
- id is not empty
|
|
16
|
+
- name is not empty
|
|
17
|
+
- price is not empty
|
|
18
|
+
- category is not empty
|
|
19
|
+
ensures:
|
|
20
|
+
- Product created with unique ID
|
|
21
|
+
- Product persisted to storage
|
|
22
|
+
publishes:
|
|
23
|
+
- ProductCreated
|
|
24
|
+
retrieve:
|
|
25
|
+
parameters:
|
|
26
|
+
id: UUID required
|
|
27
|
+
returns: Product
|
|
28
|
+
requires:
|
|
29
|
+
- Product with ID exists
|
|
30
|
+
ensures:
|
|
31
|
+
- Returns complete Product details
|
|
32
|
+
retrieve_many:
|
|
33
|
+
parameters:
|
|
34
|
+
filters: ProductFilter optional
|
|
35
|
+
limit: Integer default=20
|
|
36
|
+
offset: Integer default=0
|
|
37
|
+
returns: Array[Product]
|
|
38
|
+
ensures:
|
|
39
|
+
- Returns paginated list of Products
|
|
40
|
+
- Applies filters if specified
|
|
41
|
+
update:
|
|
42
|
+
parameters:
|
|
43
|
+
id: UUID required
|
|
44
|
+
updates: Object required
|
|
45
|
+
returns: Product
|
|
46
|
+
requires:
|
|
47
|
+
- Product with ID exists
|
|
48
|
+
- Update data is valid
|
|
49
|
+
ensures:
|
|
50
|
+
- Product attributes updated
|
|
51
|
+
- Version number incremented
|
|
52
|
+
publishes:
|
|
53
|
+
- ProductUpdated
|
|
54
|
+
destroy:
|
|
55
|
+
parameters:
|
|
56
|
+
id: UUID required
|
|
57
|
+
soft: Boolean default=true
|
|
58
|
+
returns: Boolean
|
|
59
|
+
requires:
|
|
60
|
+
- Product with ID exists
|
|
61
|
+
ensures:
|
|
62
|
+
- Product marked as deleted
|
|
63
|
+
publishes:
|
|
64
|
+
- ProductDeleted
|
|
65
|
+
services:
|
|
66
|
+
ProductProcessingService:
|
|
67
|
+
description: Handles complex business logic and processing for Product
|
|
68
|
+
subscribes_to:
|
|
69
|
+
ProductCreated: handleProductCreation
|
|
70
|
+
ProductUpdated: handleProductUpdate
|
|
71
|
+
operations:
|
|
72
|
+
handleProductCreation:
|
|
73
|
+
parameters:
|
|
74
|
+
event: ProductCreatedEvent required
|
|
75
|
+
returns: Void
|
|
76
|
+
requires:
|
|
77
|
+
- Event data is valid
|
|
78
|
+
ensures:
|
|
79
|
+
- Product creation processing completed
|
|
80
|
+
- Related systems notified
|
|
81
|
+
handleProductUpdate:
|
|
82
|
+
parameters:
|
|
83
|
+
event: ProductUpdatedEvent required
|
|
84
|
+
returns: Void
|
|
85
|
+
requires:
|
|
86
|
+
- Event data is valid
|
|
87
|
+
ensures:
|
|
88
|
+
- Product update processing completed
|
|
89
|
+
- Change propagated to dependent systems
|
|
90
|
+
validateProduct:
|
|
91
|
+
parameters:
|
|
92
|
+
data: Product required
|
|
93
|
+
validationContext: Object optional
|
|
94
|
+
returns: ValidationResult
|
|
95
|
+
requires:
|
|
96
|
+
- Product data is provided
|
|
97
|
+
ensures:
|
|
98
|
+
- Complete validation performed
|
|
99
|
+
- Business rules checked
|
|
100
|
+
processProductBusinessRules:
|
|
101
|
+
parameters:
|
|
102
|
+
id: UUID required
|
|
103
|
+
ruleContext: Object required
|
|
104
|
+
returns: BusinessRuleResult
|
|
105
|
+
requires:
|
|
106
|
+
- Product exists
|
|
107
|
+
- Rule context is valid
|
|
108
|
+
ensures:
|
|
109
|
+
- All applicable business rules processed
|
|
110
|
+
- Results documented
|
|
111
|
+
NotificationService:
|
|
112
|
+
description: Handles notifications for all model events
|
|
113
|
+
subscribes_to:
|
|
114
|
+
ProductCreated: handleCreationNotification
|
|
115
|
+
ProductUpdated: handleUpdateNotification
|
|
116
|
+
ProductDeleted: handleDeletionNotification
|
|
117
|
+
operations:
|
|
118
|
+
sendNotification:
|
|
119
|
+
description: Send notification for an event
|
|
120
|
+
parameters:
|
|
121
|
+
eventType: String required
|
|
122
|
+
eventData: Object required
|
|
123
|
+
recipients: Array required
|
|
124
|
+
returns: Boolean
|
|
125
|
+
ensures:
|
|
126
|
+
- Notification sent to all recipients
|
|
127
|
+
sendEmail:
|
|
128
|
+
description: Send email notification
|
|
129
|
+
parameters:
|
|
130
|
+
to: String required
|
|
131
|
+
subject: String required
|
|
132
|
+
body: String required
|
|
133
|
+
returns: Boolean
|
|
134
|
+
ensures:
|
|
135
|
+
- Email sent successfully
|
|
136
|
+
AuditService:
|
|
137
|
+
description: Tracks all model changes for audit purposes
|
|
138
|
+
subscribes_to:
|
|
139
|
+
ProductCreated: recordCreation
|
|
140
|
+
ProductUpdated: recordUpdate
|
|
141
|
+
ProductDeleted: recordDeletion
|
|
142
|
+
operations:
|
|
143
|
+
recordChange:
|
|
144
|
+
description: Record a model change for audit
|
|
145
|
+
parameters:
|
|
146
|
+
entityType: String required
|
|
147
|
+
entityId: UUID required
|
|
148
|
+
changeType: String required
|
|
149
|
+
oldValues: Object optional
|
|
150
|
+
newValues: Object optional
|
|
151
|
+
userId: UUID required
|
|
152
|
+
returns: AuditRecord
|
|
153
|
+
ensures:
|
|
154
|
+
- Change recorded in audit log
|
|
155
|
+
getAuditHistory:
|
|
156
|
+
description: Get audit history for an entity
|
|
157
|
+
parameters:
|
|
158
|
+
entityType: String required
|
|
159
|
+
entityId: UUID required
|
|
160
|
+
limit: Integer default=50
|
|
161
|
+
returns: Array[AuditRecord]
|
|
162
|
+
ensures:
|
|
163
|
+
- Returns chronological audit history
|
|
164
|
+
events:
|
|
165
|
+
ProductCreated:
|
|
166
|
+
description: Product was created
|
|
167
|
+
attributes:
|
|
168
|
+
id: UUID required
|
|
169
|
+
timestamp: DateTime required
|
|
170
|
+
createdBy: UUID required
|
|
171
|
+
version: Integer default=1
|
|
172
|
+
name: String required
|
|
173
|
+
ProductUpdated:
|
|
174
|
+
description: Product was updated
|
|
175
|
+
attributes:
|
|
176
|
+
id: UUID required
|
|
177
|
+
changedFields: Array required
|
|
178
|
+
previousValues: Object optional
|
|
179
|
+
newValues: Object required
|
|
180
|
+
timestamp: DateTime required
|
|
181
|
+
updatedBy: UUID required
|
|
182
|
+
version: Integer required
|
|
183
|
+
name: String optional
|
|
184
|
+
ProductDeleted:
|
|
185
|
+
description: Product was deleted
|
|
186
|
+
attributes:
|
|
187
|
+
id: UUID required
|
|
188
|
+
deletedBy: UUID required
|
|
189
|
+
timestamp: DateTime required
|
|
190
|
+
soft: Boolean default=true
|
|
191
|
+
reason: String optional
|
|
192
|
+
name: String optional
|
|
193
|
+
views:
|
|
194
|
+
ProductListView:
|
|
195
|
+
type: list
|
|
196
|
+
model: Product
|
|
197
|
+
description: List view for Products with filtering and pagination
|
|
198
|
+
subscribes_to:
|
|
199
|
+
- ProductCreated
|
|
200
|
+
- ProductUpdated
|
|
201
|
+
- ProductDeleted
|
|
202
|
+
components:
|
|
203
|
+
searchBar:
|
|
204
|
+
type: SearchInput
|
|
205
|
+
properties:
|
|
206
|
+
placeholder: Search products...
|
|
207
|
+
debounce: 300
|
|
208
|
+
filters:
|
|
209
|
+
type: FilterPanel
|
|
210
|
+
properties:
|
|
211
|
+
model: Product
|
|
212
|
+
filterFields:
|
|
213
|
+
- name
|
|
214
|
+
- summary
|
|
215
|
+
- inStock
|
|
216
|
+
- category
|
|
217
|
+
productList:
|
|
218
|
+
type: List
|
|
219
|
+
properties:
|
|
220
|
+
model: Product
|
|
221
|
+
itemTemplate: ProductCard
|
|
222
|
+
pagination: true
|
|
223
|
+
sortable: true
|
|
224
|
+
selectable: true
|
|
225
|
+
actionToolbar:
|
|
226
|
+
type: ActionToolbar
|
|
227
|
+
properties:
|
|
228
|
+
actions:
|
|
229
|
+
- name: create
|
|
230
|
+
label: Create Product
|
|
231
|
+
icon: plus
|
|
232
|
+
- name: delete
|
|
233
|
+
label: Delete Selected
|
|
234
|
+
icon: trash
|
|
235
|
+
bulk: true
|
|
236
|
+
- name: export
|
|
237
|
+
label: Export
|
|
238
|
+
icon: download
|
|
239
|
+
ProductDetailView:
|
|
240
|
+
type: detail
|
|
241
|
+
model: Product
|
|
242
|
+
description: Detailed view for a single Product with related data
|
|
243
|
+
subscribes_to:
|
|
244
|
+
- ProductUpdated
|
|
245
|
+
components:
|
|
246
|
+
detailHeader:
|
|
247
|
+
type: DetailHeader
|
|
248
|
+
properties:
|
|
249
|
+
model: Product
|
|
250
|
+
showBreadcrumb: true
|
|
251
|
+
actions:
|
|
252
|
+
- name: edit
|
|
253
|
+
label: Edit
|
|
254
|
+
icon: edit
|
|
255
|
+
- name: delete
|
|
256
|
+
label: Delete
|
|
257
|
+
icon: trash
|
|
258
|
+
detailsPanel:
|
|
259
|
+
type: DetailsPanel
|
|
260
|
+
properties:
|
|
261
|
+
model: Product
|
|
262
|
+
layout: card
|
|
263
|
+
showMetadata: true
|
|
264
|
+
ProductFormView:
|
|
265
|
+
type: form
|
|
266
|
+
model: Product
|
|
267
|
+
description: Form view for creating and editing Product
|
|
268
|
+
subscribes_to:
|
|
269
|
+
- ProductCreated
|
|
270
|
+
- ProductUpdated
|
|
271
|
+
components:
|
|
272
|
+
formHeader:
|
|
273
|
+
type: FormHeader
|
|
274
|
+
properties:
|
|
275
|
+
model: Product
|
|
276
|
+
showProgress: true
|
|
277
|
+
basic informationSection:
|
|
278
|
+
type: FormSection
|
|
279
|
+
properties:
|
|
280
|
+
title: Basic Information
|
|
281
|
+
fields:
|
|
282
|
+
- name: id
|
|
283
|
+
type: TextInput
|
|
284
|
+
label: Id
|
|
285
|
+
required: true
|
|
286
|
+
- name: name
|
|
287
|
+
type: TextInput
|
|
288
|
+
label: Name
|
|
289
|
+
required: true
|
|
290
|
+
additional detailsSection:
|
|
291
|
+
type: FormSection
|
|
292
|
+
properties:
|
|
293
|
+
title: Additional Details
|
|
294
|
+
fields:
|
|
295
|
+
- name: summary
|
|
296
|
+
type: TextInput
|
|
297
|
+
label: Summary
|
|
298
|
+
required: false
|
|
299
|
+
- name: price
|
|
300
|
+
type: CurrencyInput
|
|
301
|
+
label: Price
|
|
302
|
+
required: true
|
|
303
|
+
- name: inStock
|
|
304
|
+
type: Checkbox
|
|
305
|
+
label: In Stock
|
|
306
|
+
required: false
|
|
307
|
+
- name: category
|
|
308
|
+
type: TextInput
|
|
309
|
+
label: Category
|
|
310
|
+
required: true
|
|
311
|
+
- name: contactEmail
|
|
312
|
+
type: EmailInput
|
|
313
|
+
label: Contact Email
|
|
314
|
+
required: false
|
|
315
|
+
formControls:
|
|
316
|
+
type: FormControls
|
|
317
|
+
properties:
|
|
318
|
+
submitLabel: Save Product
|
|
319
|
+
cancelLabel: Cancel
|
|
320
|
+
showValidation: true
|
|
321
|
+
ProductEnhancedListView:
|
|
322
|
+
type: list
|
|
323
|
+
model: Product
|
|
324
|
+
description: Enhanced list view for Product with advanced filtering
|
|
325
|
+
subscribes_to:
|
|
326
|
+
- ProductCreated
|
|
327
|
+
- ProductUpdated
|
|
328
|
+
- ProductDeleted
|
|
329
|
+
components:
|
|
330
|
+
advancedSearch:
|
|
331
|
+
type: AdvancedSearchInput
|
|
332
|
+
properties:
|
|
333
|
+
placeholder: Search Products...
|
|
334
|
+
debounce: 300
|
|
335
|
+
enableSuggestions: true
|
|
336
|
+
advancedFilters:
|
|
337
|
+
type: FilterPanel
|
|
338
|
+
properties:
|
|
339
|
+
model: Product
|
|
340
|
+
collapsible: true
|
|
341
|
+
productTable:
|
|
342
|
+
type: DataTable
|
|
343
|
+
properties:
|
|
344
|
+
model: Product
|
|
345
|
+
pagination:
|
|
346
|
+
enabled: true
|
|
347
|
+
pageSize: 25
|
|
348
|
+
showSizeSelector: true
|
|
349
|
+
selection:
|
|
350
|
+
enabled: true
|
|
351
|
+
multiSelect: true
|
|
352
|
+
sorting:
|
|
353
|
+
enabled: true
|
|
354
|
+
multiColumn: true
|
|
355
|
+
ProductAnalyticsView:
|
|
356
|
+
type: dashboard
|
|
357
|
+
model: Product
|
|
358
|
+
description: Analytics and reporting dashboard for Product
|
|
359
|
+
subscribes_to:
|
|
360
|
+
- ProductCreated
|
|
361
|
+
- ProductUpdated
|
|
362
|
+
- ProductDeleted
|
|
363
|
+
components:
|
|
364
|
+
keyMetrics:
|
|
365
|
+
type: MetricsSummary
|
|
366
|
+
properties:
|
|
367
|
+
title: Product Key Metrics
|
|
368
|
+
refreshInterval: 300000
|
|
369
|
+
trendsChart:
|
|
370
|
+
type: TimeSeriesChart
|
|
371
|
+
properties:
|
|
372
|
+
title: Product Trends Over Time
|
|
373
|
+
chartType: line
|
|
374
|
+
dateRange: last30Days
|
|
375
|
+
models:
|
|
376
|
+
Product:
|
|
377
|
+
description: Auto-generated model specification for Product
|
|
378
|
+
attributes:
|
|
379
|
+
id: UUID required
|
|
380
|
+
name: String required
|
|
381
|
+
summary: String
|
|
382
|
+
price: Money required
|
|
383
|
+
inStock: Boolean default=true
|
|
384
|
+
category: String required
|
|
385
|
+
contactEmail: Email
|
|
386
|
+
relationships: {}
|
|
387
|
+
commonDefinitions:
|
|
388
|
+
ProductCreateRequest:
|
|
389
|
+
type: object
|
|
390
|
+
description: Request to create Product
|
|
391
|
+
properties:
|
|
392
|
+
name: String required
|
|
393
|
+
summary: String
|
|
394
|
+
price: Money required
|
|
395
|
+
inStock: Boolean default=true
|
|
396
|
+
category: String required
|
|
397
|
+
contactEmail: Email
|
|
398
|
+
ProductUpdateRequest:
|
|
399
|
+
type: object
|
|
400
|
+
description: Request to update Product
|
|
401
|
+
properties:
|
|
402
|
+
id: UUID required
|
|
403
|
+
name: String
|
|
404
|
+
summary: String
|
|
405
|
+
price: Money
|
|
406
|
+
inStock: Boolean default=true
|
|
407
|
+
category: String
|
|
408
|
+
contactEmail: Email
|
|
409
|
+
ProductFilter:
|
|
410
|
+
type: object
|
|
411
|
+
description: Filter criteria for Product listings
|
|
412
|
+
properties:
|
|
413
|
+
id: UUID optional
|
|
414
|
+
nameContains: String optional
|
|
415
|
+
summaryContains: String optional
|
|
416
|
+
priceMin: Money optional
|
|
417
|
+
priceMax: Money optional
|
|
418
|
+
inStock: Boolean optional
|
|
419
|
+
categoryContains: String optional
|
|
420
|
+
contactEmail: Email optional
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "SpecVerseFundamentals",
|
|
5
|
+
"description": "Example 01-01: Basic model definition with attributes",
|
|
6
|
+
"version": "1.0.0"
|
|
7
|
+
},
|
|
8
|
+
"servers": [
|
|
9
|
+
{
|
|
10
|
+
"url": "https://api.example.com"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"paths": {},
|
|
14
|
+
"components": {
|
|
15
|
+
"schemas": {
|
|
16
|
+
"Product": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"description": "Simple product with basic attributes",
|
|
19
|
+
"properties": {
|
|
20
|
+
"id": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": ""
|
|
23
|
+
},
|
|
24
|
+
"name": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": ""
|
|
27
|
+
},
|
|
28
|
+
"summary": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": ""
|
|
31
|
+
},
|
|
32
|
+
"price": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": ""
|
|
35
|
+
},
|
|
36
|
+
"inStock": {
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"description": "Default: true",
|
|
39
|
+
"default": "true"
|
|
40
|
+
},
|
|
41
|
+
"category": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": ""
|
|
44
|
+
},
|
|
45
|
+
"contactEmail": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": ""
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [
|
|
51
|
+
"id",
|
|
52
|
+
"name",
|
|
53
|
+
"price",
|
|
54
|
+
"category"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"responses": {},
|
|
59
|
+
"parameters": {}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# 09-API: SpecVerse API Integration Examples
|
|
2
|
+
|
|
3
|
+
These are complete examples for programmatic usage of the SpecVerse Language API in TypeScript and JavaScript applications.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This directory contains comprehensive API integration examples demonstrating how to use SpecVerse programmatically in your applications. These examples cover the complete workflow from parsing specifications to generating code and documentation.
|
|
8
|
+
|
|
9
|
+
## Files Overview
|
|
10
|
+
|
|
11
|
+
- specverse-lang/examples/10-api/usage-example.js
|
|
12
|
+
- specverse-lang/examples/10-api/usage-example.ts
|
|
13
|
+
|
|
14
|
+
**Comprehensive API usage examples** showing the complete SpecVerse workflow:
|
|
15
|
+
|
|
16
|
+
- **Parsing**: Load and validate .specly files
|
|
17
|
+
- **AI Inference**: Run logical inference to enhance specifications
|
|
18
|
+
- **Code Generation**: Generate diagrams, documentation, and YAML output
|
|
19
|
+
- **Error Handling**: Proper error management patterns
|
|
20
|
+
- **Full Workflow**: End-to-end specification processing
|
|
21
|
+
|
|
22
|
+
**Best for**: Learning the API, understanding all capabilities, integration planning
|
|
23
|
+
|
|
24
|
+
<!-- ### **"[workflow-test.js]"**a -->
|
|
25
|
+
- specverse-lang/examples/10-api/workflow-test.js
|
|
26
|
+
|
|
27
|
+
**Focused end-to-end workflow test** for production validation:
|
|
28
|
+
|
|
29
|
+
- **Quick Testing**: Minimal test for API functionality validation
|
|
30
|
+
- **CI/CD Integration**: Suitable for automated testing pipelines
|
|
31
|
+
- **Error Reporting**: Clear success/failure indicators with actionable feedback
|
|
32
|
+
- **Self-Contained**: Includes embedded test specification
|
|
33
|
+
|
|
34
|
+
**Best for**: CI/CD pipelines, automated testing, quick API health checks
|
|
35
|
+
|
|
36
|
+
<!-- ### **[package-integration-test.js](./package-integration-test.js)** -->
|
|
37
|
+
- specverse-lang/examples/10-api/package-integration-test.js
|
|
38
|
+
**npm package installation and integration test**:
|
|
39
|
+
|
|
40
|
+
- **Package Testing**: Validates complete npm installation workflow
|
|
41
|
+
- **Real-world Simulation**: Tests actual published package usage
|
|
42
|
+
- **API Verification**: Confirms all API features work after installation
|
|
43
|
+
- **Integration Validation**: End-to-end package integration testing
|
|
44
|
+
|
|
45
|
+
**Best for**: Release validation, package testing, integration verification
|
|
46
|
+
|
|
47
|
+
## Getting Started
|
|
48
|
+
|
|
49
|
+
### Quick Start
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Run comprehensive API examples
|
|
53
|
+
node examples/10-api/usage-example.js
|
|
54
|
+
|
|
55
|
+
# Run focused workflow test
|
|
56
|
+
node examples/10-api/workflow-test.js
|
|
57
|
+
|
|
58
|
+
# Run package integration test
|
|
59
|
+
node examples/10-api/package-integration-test.js
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Integration in Your Project
|
|
63
|
+
|
|
64
|
+
1. **Install SpecVerse Language**:
|
|
65
|
+
```bash
|
|
66
|
+
npm install @specverse/lang
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
2. **Copy and adapt examples**:
|
|
70
|
+
- Start with `usage-example.js` or `usage-example.ts`
|
|
71
|
+
- Modify for your specific use case
|
|
72
|
+
- Use `workflow-test.js` for testing integration
|
|
73
|
+
|
|
74
|
+
3. **Key API Components**:
|
|
75
|
+
```javascript
|
|
76
|
+
import { SpecVerseParser, LogicalInferenceEngine, UMLDiagramGenerator } from '@specverse/lang';
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## API Features Demonstrated
|
|
80
|
+
|
|
81
|
+
### 🔧 Core Parsing
|
|
82
|
+
- Load and validate SpecVerse specifications
|
|
83
|
+
- Schema validation with comprehensive error reporting
|
|
84
|
+
- Convention processing and normalization
|
|
85
|
+
|
|
86
|
+
### 🤖 AI Inference Engine
|
|
87
|
+
- Logical inference for architecture generation
|
|
88
|
+
- Controller, service, and event generation
|
|
89
|
+
- Relationship inference and optimization
|
|
90
|
+
|
|
91
|
+
### 📊 Code Generation
|
|
92
|
+
- UML diagram generation (ER, Architecture, Sequence, Lifecycle)
|
|
93
|
+
- YAML output generation
|
|
94
|
+
- Documentation generation
|
|
95
|
+
|
|
96
|
+
### âš¡ Error Handling
|
|
97
|
+
- Comprehensive error reporting
|
|
98
|
+
- Validation feedback
|
|
99
|
+
- Processing diagnostics
|
|
100
|
+
|
|
101
|
+
## Integration Patterns
|
|
102
|
+
|
|
103
|
+
### Web Applications
|
|
104
|
+
```javascript
|
|
105
|
+
// React/Vue/Angular integration
|
|
106
|
+
import { SpecVerseParser } from '@specverse/lang';
|
|
107
|
+
|
|
108
|
+
const parser = new SpecVerseParser(schema);
|
|
109
|
+
const result = parser.parseContent(specContent, 'component.specly');
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Build Tools
|
|
113
|
+
```javascript
|
|
114
|
+
// webpack/vite plugin integration
|
|
115
|
+
const { processSpecification } = require('@specverse/lang');
|
|
116
|
+
|
|
117
|
+
// In build pipeline
|
|
118
|
+
const output = await processSpecification(inputPath, outputPath);
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### API Services
|
|
122
|
+
```javascript
|
|
123
|
+
// Express/Fastify API endpoint
|
|
124
|
+
app.post('/api/specverse/validate', async (req, res) => {
|
|
125
|
+
const result = await validateSpecification(req.body.spec);
|
|
126
|
+
res.json(result);
|
|
127
|
+
});
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### CLI Tools
|
|
131
|
+
```javascript
|
|
132
|
+
// Custom CLI tool integration
|
|
133
|
+
#!/usr/bin/env node
|
|
134
|
+
const { SpecVerseParser } = require('@specverse/lang');
|
|
135
|
+
// Custom CLI implementation
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Testing Integration
|
|
139
|
+
|
|
140
|
+
All API examples are integrated into the SpecVerse test suite:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Run API tests as part of main test suite
|
|
144
|
+
npm test
|
|
145
|
+
|
|
146
|
+
# Run API tests individually
|
|
147
|
+
npm run test:api # workflow-test.js
|
|
148
|
+
npm run test:api:package # package-integration-test.js
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## TypeScript Support
|
|
152
|
+
|
|
153
|
+
SpecVerse provides complete TypeScript definitions:
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
import {
|
|
157
|
+
SpecVerseParser,
|
|
158
|
+
LogicalInferenceEngine,
|
|
159
|
+
ParseResult,
|
|
160
|
+
InferenceConfig
|
|
161
|
+
} from '@specverse/lang';
|
|
162
|
+
|
|
163
|
+
const parser: SpecVerseParser = new SpecVerseParser(schema);
|
|
164
|
+
const result: ParseResult = parser.parseContent(content, filename);
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Error Handling Patterns
|
|
168
|
+
|
|
169
|
+
### Validation Errors
|
|
170
|
+
```javascript
|
|
171
|
+
try {
|
|
172
|
+
const result = parser.parseContent(content, filename);
|
|
173
|
+
if (!result.success) {
|
|
174
|
+
console.error('Validation failed:', result.errors);
|
|
175
|
+
}
|
|
176
|
+
} catch (error) {
|
|
177
|
+
console.error('Parse error:', error.message);
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Inference Errors
|
|
182
|
+
```javascript
|
|
183
|
+
try {
|
|
184
|
+
const inference = await engine.inferLogicalSpecification(models, componentName);
|
|
185
|
+
} catch (error) {
|
|
186
|
+
if (error.code === 'INFERENCE_FAILED') {
|
|
187
|
+
// Handle inference-specific errors
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Performance Considerations
|
|
193
|
+
|
|
194
|
+
- **Parsing**: Sub-5ms for typical specifications
|
|
195
|
+
- **Inference**: Highly optimized rule processing
|
|
196
|
+
- **Memory**: Efficient rule loading and caching
|
|
197
|
+
- **Concurrent**: Safe for concurrent processing
|
|
198
|
+
|
|
199
|
+
## Next Steps
|
|
200
|
+
|
|
201
|
+
After exploring these API examples:
|
|
202
|
+
|
|
203
|
+
1. **Integrate**: Add SpecVerse to your project
|
|
204
|
+
2. **Customize**: Adapt examples to your use case
|
|
205
|
+
3. **Test**: Use workflow-test.js pattern for validation
|
|
206
|
+
4. **Deploy**: Use package-integration-test.js for release validation
|
|
207
|
+
|
|
208
|
+
## Related Documentation
|
|
209
|
+
|
|
210
|
+
- [Main Examples](../) - Learning examples and language features
|
|
211
|
+
- [CLI Reference](/reference/cli) - Command-line interface
|
|
212
|
+
- [API Documentation](https://specverse.dev/api/) - Complete API reference
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
**💡 Pro Tip**: Start with `usage-example.js` to understand the complete API, then use `workflow-test.js` patterns for production integration!
|