@specverse/engines 4.1.30 → 4.2.1
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/manifests/frontend-only.yaml +3 -6
- package/assets/examples/manifests/fullstack-app.yaml +5 -7
- package/assets/examples/manifests/fullstack-monorepo.yaml +3 -6
- package/assets/templates/default/specs/main.specly +65 -0
- package/dist/inference/comprehensive-engine.d.ts.map +1 -1
- package/dist/inference/comprehensive-engine.js +3 -19
- package/dist/inference/comprehensive-engine.js.map +1 -1
- package/dist/inference/core/rule-engine.d.ts +31 -0
- package/dist/inference/core/rule-engine.d.ts.map +1 -1
- package/dist/inference/core/rule-engine.js +117 -33
- package/dist/inference/core/rule-engine.js.map +1 -1
- package/dist/inference/core/rule-file-types.d.ts +0 -2
- package/dist/inference/core/rule-file-types.d.ts.map +1 -1
- package/dist/inference/core/rule-file-types.js +3 -6
- package/dist/inference/core/rule-file-types.js.map +1 -1
- package/dist/inference/core/rule-loader.d.ts +5 -15
- package/dist/inference/core/rule-loader.d.ts.map +1 -1
- package/dist/inference/core/rule-loader.js +43 -132
- package/dist/inference/core/rule-loader.js.map +1 -1
- package/dist/inference/core/types.d.ts +0 -6
- package/dist/inference/core/types.d.ts.map +1 -1
- package/dist/inference/core/types.js +0 -4
- package/dist/inference/core/types.js.map +1 -1
- package/dist/inference/logical/generators/component-type-resolver.d.ts +0 -26
- package/dist/inference/logical/generators/component-type-resolver.d.ts.map +1 -1
- package/dist/inference/logical/generators/component-type-resolver.js +0 -19
- package/dist/inference/logical/generators/component-type-resolver.js.map +1 -1
- package/dist/inference/logical/generators/specialist-view-expander.d.ts +1 -17
- package/dist/inference/logical/generators/specialist-view-expander.d.ts.map +1 -1
- package/dist/inference/logical/generators/specialist-view-expander.js +0 -15
- package/dist/inference/logical/generators/specialist-view-expander.js.map +1 -1
- package/dist/inference/logical/generators/view-generator.d.ts +4 -14
- package/dist/inference/logical/generators/view-generator.d.ts.map +1 -1
- package/dist/inference/logical/generators/view-generator.js +6 -26
- package/dist/inference/logical/generators/view-generator.js.map +1 -1
- package/dist/inference/logical/index.d.ts +2 -2
- package/dist/inference/logical/index.d.ts.map +1 -1
- package/dist/inference/logical/logical-engine.d.ts.map +1 -1
- package/dist/inference/logical/logical-engine.js +17 -80
- package/dist/inference/logical/logical-engine.js.map +1 -1
- package/dist/inference/quint-transpiler.d.ts +5 -3
- package/dist/inference/quint-transpiler.d.ts.map +1 -1
- package/dist/inference/quint-transpiler.js +11 -6
- package/dist/inference/quint-transpiler.js.map +1 -1
- package/dist/libs/instance-factories/CURVED-INTERFACE.md +278 -0
- package/dist/libs/instance-factories/README.md +73 -0
- package/dist/libs/instance-factories/applications/README.md +51 -0
- package/dist/libs/instance-factories/applications/generic-app.yaml +52 -0
- package/{libs/instance-factories/applications/react-app.yaml → dist/libs/instance-factories/applications/react-app-runtime.yaml} +30 -77
- package/dist/libs/instance-factories/applications/react-app-starter.yaml +143 -0
- package/dist/libs/instance-factories/applications/templates/react/env-example-generator.js +24 -2
- package/dist/libs/instance-factories/applications/templates/react/vite-config-generator.js +54 -33
- package/dist/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/api-types-starter-generator.js +69 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.js +110 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/belongs-to.js +40 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.js +129 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/detail-body-composer.js +80 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/form-body-composer.js +217 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/helpers-emitter.js +51 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/html-to-jsx.js +192 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/list-body-composer.js +56 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/orchestrator.js +41 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/package-json-generator.js +38 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/regen-safety.js +89 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +49 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +96 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +116 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +74 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/use-api-hooks-starter-generator.js +95 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/view-emitter.js +81 -0
- package/dist/libs/instance-factories/applications/templates/react-starter/views-generator.js +66 -0
- package/dist/libs/instance-factories/archived/fastify-prisma.yaml +104 -0
- package/dist/libs/instance-factories/cli/README.md +43 -0
- package/dist/libs/instance-factories/cli/commander-js.yaml +55 -0
- package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +63 -12
- package/dist/libs/instance-factories/communication/README.md +47 -0
- package/dist/libs/instance-factories/communication/event-emitter.yaml +60 -0
- package/dist/libs/instance-factories/communication/rabbitmq-events.yaml +87 -0
- package/dist/libs/instance-factories/controllers/README.md +42 -0
- package/dist/libs/instance-factories/controllers/fastify.yaml +139 -0
- package/dist/libs/instance-factories/controllers/templates/fastify/server-generator.js +29 -2
- package/dist/libs/instance-factories/infrastructure/README.md +29 -0
- package/dist/libs/instance-factories/infrastructure/docker-k8s.yaml +61 -0
- package/dist/libs/instance-factories/orms/README.md +54 -0
- package/dist/libs/instance-factories/orms/prisma.yaml +89 -0
- package/dist/libs/instance-factories/orms/templates/prisma/schema-generator.js +2 -2
- package/dist/libs/instance-factories/scaffolding/README.md +49 -0
- package/dist/libs/instance-factories/scaffolding/generic-scaffold.yaml +65 -0
- package/dist/libs/instance-factories/sdks/README.md +28 -0
- package/dist/libs/instance-factories/sdks/python-sdk.yaml +66 -0
- package/dist/libs/instance-factories/sdks/typescript-sdk.yaml +59 -0
- package/dist/libs/instance-factories/services/README.md +55 -0
- package/dist/libs/instance-factories/services/prisma-services.yaml +71 -0
- package/dist/libs/instance-factories/storage/README.md +34 -0
- package/dist/libs/instance-factories/storage/mongodb.yaml +79 -0
- package/dist/libs/instance-factories/storage/postgresql.yaml +75 -0
- package/dist/libs/instance-factories/storage/redis.yaml +79 -0
- package/dist/libs/instance-factories/testing/README.md +40 -0
- package/dist/libs/instance-factories/testing/vitest-tests.yaml +63 -0
- package/dist/libs/instance-factories/tools/README.md +70 -0
- package/dist/libs/instance-factories/tools/mcp.yaml +36 -0
- package/dist/libs/instance-factories/tools/vscode.yaml +35 -0
- package/dist/libs/instance-factories/validation/README.md +38 -0
- package/dist/libs/instance-factories/validation/zod.yaml +56 -0
- package/dist/realize/engines/code-generator.d.ts.map +1 -1
- package/dist/realize/engines/code-generator.js +3 -0
- package/dist/realize/engines/code-generator.js.map +1 -1
- package/dist/realize/index.d.ts.map +1 -1
- package/dist/realize/index.js +15 -22
- package/dist/realize/index.js.map +1 -1
- package/dist/registry/utils/manifest-adapter.d.ts +8 -1
- package/dist/registry/utils/manifest-adapter.d.ts.map +1 -1
- package/dist/registry/utils/manifest-adapter.js +8 -1
- package/dist/registry/utils/manifest-adapter.js.map +1 -1
- package/libs/instance-factories/applications/react-app-starter.yaml +143 -0
- package/libs/instance-factories/applications/templates/react/env-example-generator.ts +24 -2
- package/libs/instance-factories/applications/templates/react/vite-config-generator.ts +54 -33
- package/libs/instance-factories/applications/templates/react-starter/README.md +211 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/dashboard-body-composer.test.ts +153 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/detail-body-composer.test.ts +146 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/form-body-composer.test.ts +188 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/helpers-emitter.test.ts +55 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/html-to-jsx.test.ts +140 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/list-body-composer.test.ts +146 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/orchestrator.test.ts +184 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p2-factory-imports.test.ts +116 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/parity-p3-rendered-output.test.ts +183 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/regen-safety.test.ts +144 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/starter-generators.test.ts +114 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/view-emitter.test.ts +107 -0
- package/libs/instance-factories/applications/templates/react-starter/__tests__/views-generator.test.ts +139 -0
- package/libs/instance-factories/applications/templates/react-starter/api-types-starter-generator.ts +98 -0
- package/libs/instance-factories/applications/templates/react-starter/app-tsx-generator.ts +141 -0
- package/libs/instance-factories/applications/templates/react-starter/belongs-to.ts +82 -0
- package/libs/instance-factories/applications/templates/react-starter/dashboard-body-composer.ts +189 -0
- package/libs/instance-factories/applications/templates/react-starter/detail-body-composer.ts +135 -0
- package/libs/instance-factories/applications/templates/react-starter/form-body-composer.ts +383 -0
- package/libs/instance-factories/applications/templates/react-starter/helpers-emitter.ts +66 -0
- package/libs/instance-factories/applications/templates/react-starter/html-to-jsx.ts +334 -0
- package/libs/instance-factories/applications/templates/react-starter/list-body-composer.ts +146 -0
- package/libs/instance-factories/applications/templates/react-starter/orchestrator.ts +95 -0
- package/libs/instance-factories/applications/templates/react-starter/package-json-generator.ts +57 -0
- package/libs/instance-factories/applications/templates/react-starter/regen-safety.ts +157 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/dashboard.tsx.template +49 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/detail.tsx.template +96 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/form.tsx.template +116 -0
- package/libs/instance-factories/applications/templates/react-starter/skeletons/list.tsx.template +74 -0
- package/libs/instance-factories/applications/templates/react-starter/use-api-hooks-starter-generator.ts +124 -0
- package/libs/instance-factories/applications/templates/react-starter/view-emitter.ts +209 -0
- package/libs/instance-factories/applications/templates/react-starter/views-generator.ts +137 -0
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +63 -12
- package/libs/instance-factories/controllers/fastify.yaml +7 -0
- package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +36 -2
- package/libs/instance-factories/orms/templates/prisma/schema-generator.ts +11 -4
- package/package.json +3 -3
- package/dist/libs/instance-factories/applications/templates/react/_view-components-source.js +0 -530
- package/dist/libs/instance-factories/applications/templates/react/app-tsx-generator.js +0 -73
- package/dist/libs/instance-factories/applications/templates/react/field-helpers-generator.js +0 -99
- package/dist/libs/instance-factories/applications/templates/react/package-json-generator.js +0 -49
- package/dist/libs/instance-factories/applications/templates/react/pattern-adapter-generator.js +0 -156
- package/dist/libs/instance-factories/applications/templates/react/react-pattern-adapter.js +0 -935
- package/dist/libs/instance-factories/applications/templates/react/relationship-field-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.js +0 -646
- package/dist/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.js +0 -65
- package/dist/libs/instance-factories/applications/templates/react/view-dashboard-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/view-detail-generator.js +0 -143
- package/dist/libs/instance-factories/applications/templates/react/view-form-generator.js +0 -355
- package/dist/libs/instance-factories/applications/templates/react/view-list-generator.js +0 -91
- package/dist/libs/instance-factories/applications/templates/react/view-router-generator.js +0 -79
- package/dist/libs/instance-factories/views/index.js +0 -48
- package/dist/libs/instance-factories/views/templates/react/adapters/antd-adapter.js +0 -742
- package/dist/libs/instance-factories/views/templates/react/adapters/mui-adapter.js +0 -824
- package/dist/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.js +0 -719
- package/dist/libs/instance-factories/views/templates/react/app-generator.js +0 -45
- package/dist/libs/instance-factories/views/templates/react/components-generator.js +0 -820
- package/dist/libs/instance-factories/views/templates/react/forms-generator.js +0 -275
- package/dist/libs/instance-factories/views/templates/react/frontend-package-json-generator.js +0 -46
- package/dist/libs/instance-factories/views/templates/react/hooks-generator.js +0 -81
- package/dist/libs/instance-factories/views/templates/react/index-css-generator.js +0 -9
- package/dist/libs/instance-factories/views/templates/react/index-html-generator.js +0 -23
- package/dist/libs/instance-factories/views/templates/react/main-tsx-generator.js +0 -21
- package/dist/libs/instance-factories/views/templates/react/react-component-generator.js +0 -299
- package/dist/libs/instance-factories/views/templates/react/router-generator.js +0 -136
- package/dist/libs/instance-factories/views/templates/react/router-generic-generator.js +0 -107
- package/dist/libs/instance-factories/views/templates/react/shared-utils-generator.js +0 -187
- package/dist/libs/instance-factories/views/templates/react/spec-json-generator.js +0 -7
- package/dist/libs/instance-factories/views/templates/react/types-generator.js +0 -56
- package/dist/libs/instance-factories/views/templates/react/views-metadata-generator.js +0 -27
- package/dist/libs/instance-factories/views/templates/react/vite-config-generator.js +0 -29
- package/dist/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js +0 -261
- package/dist/libs/instance-factories/views/templates/shared/adapter-types.js +0 -34
- package/dist/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -800
- package/dist/libs/instance-factories/views/templates/shared/base-generator.js +0 -305
- package/dist/libs/instance-factories/views/templates/shared/component-metadata.js +0 -517
- package/dist/libs/instance-factories/views/templates/shared/composite-pattern-types.js +0 -0
- package/dist/libs/instance-factories/views/templates/shared/composite-patterns.js +0 -445
- package/dist/libs/instance-factories/views/templates/shared/index.js +0 -80
- package/dist/libs/instance-factories/views/templates/shared/pattern-validator.js +0 -210
- package/dist/libs/instance-factories/views/templates/shared/property-mapper.js +0 -492
- package/dist/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -321
- package/dist/realize/index.js.bak +0 -758
- package/libs/instance-factories/applications/templates/react/_view-components-source.ts +0 -555
- package/libs/instance-factories/applications/templates/react/app-tsx-generator.ts +0 -94
- package/libs/instance-factories/applications/templates/react/field-helpers-generator.ts +0 -106
- package/libs/instance-factories/applications/templates/react/package-json-generator.ts +0 -57
- package/libs/instance-factories/applications/templates/react/pattern-adapter-generator.ts +0 -179
- package/libs/instance-factories/applications/templates/react/react-pattern-adapter.tsx +0 -1347
- package/libs/instance-factories/applications/templates/react/relationship-field-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-generator.ts +0 -704
- package/libs/instance-factories/applications/templates/react/tailwind-adapter-wrapper-generator.ts +0 -84
- package/libs/instance-factories/applications/templates/react/view-dashboard-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/view-detail-generator.ts +0 -150
- package/libs/instance-factories/applications/templates/react/view-form-generator.ts +0 -362
- package/libs/instance-factories/applications/templates/react/view-list-generator.ts +0 -98
- package/libs/instance-factories/applications/templates/react/view-router-generator.ts +0 -89
- package/libs/instance-factories/views/README.md +0 -62
- package/libs/instance-factories/views/index.d.ts +0 -13
- package/libs/instance-factories/views/index.d.ts.map +0 -1
- package/libs/instance-factories/views/index.js +0 -18
- package/libs/instance-factories/views/index.js.map +0 -1
- package/libs/instance-factories/views/index.ts +0 -45
- package/libs/instance-factories/views/react-components.yaml +0 -129
- package/libs/instance-factories/views/templates/ARCHITECTURE.md +0 -198
- package/libs/instance-factories/views/templates/react/adapters/antd-adapter.ts +0 -869
- package/libs/instance-factories/views/templates/react/adapters/mui-adapter.ts +0 -953
- package/libs/instance-factories/views/templates/react/adapters/shadcn-adapter.ts +0 -806
- package/libs/instance-factories/views/templates/react/app-generator.ts +0 -55
- package/libs/instance-factories/views/templates/react/components-generator.ts +0 -938
- package/libs/instance-factories/views/templates/react/forms-generator.ts +0 -325
- package/libs/instance-factories/views/templates/react/frontend-package-json-generator.ts +0 -57
- package/libs/instance-factories/views/templates/react/hooks-generator.ts +0 -106
- package/libs/instance-factories/views/templates/react/index-css-generator.ts +0 -14
- package/libs/instance-factories/views/templates/react/index-html-generator.ts +0 -34
- package/libs/instance-factories/views/templates/react/main-tsx-generator.ts +0 -29
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts +0 -152
- package/libs/instance-factories/views/templates/react/react-component-generator.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/react/react-component-generator.js +0 -398
- package/libs/instance-factories/views/templates/react/react-component-generator.js.map +0 -1
- package/libs/instance-factories/views/templates/react/react-component-generator.ts +0 -533
- package/libs/instance-factories/views/templates/react/router-generator.ts +0 -197
- package/libs/instance-factories/views/templates/react/router-generic-generator.ts +0 -132
- package/libs/instance-factories/views/templates/react/shared-utils-generator.ts +0 -196
- package/libs/instance-factories/views/templates/react/spec-json-generator.ts +0 -17
- package/libs/instance-factories/views/templates/react/types-generator.ts +0 -76
- package/libs/instance-factories/views/templates/react/views-metadata-generator.ts +0 -42
- package/libs/instance-factories/views/templates/react/vite-config-generator.ts +0 -38
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.js.map +0 -1
- package/libs/instance-factories/views/templates/runtime/runtime-view-renderer.ts +0 -474
- package/libs/instance-factories/views/templates/shared/__tests__/composite-patterns.test.ts +0 -242
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts +0 -77
- package/libs/instance-factories/views/templates/shared/adapter-types.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/adapter-types.js +0 -47
- package/libs/instance-factories/views/templates/shared/adapter-types.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/adapter-types.ts +0 -142
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts +0 -63
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js +0 -822
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/atomic-components-registry.ts +0 -908
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts +0 -247
- package/libs/instance-factories/views/templates/shared/base-generator.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/base-generator.js +0 -363
- package/libs/instance-factories/views/templates/shared/base-generator.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/base-generator.ts +0 -608
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts +0 -254
- package/libs/instance-factories/views/templates/shared/component-metadata.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/component-metadata.js +0 -602
- package/libs/instance-factories/views/templates/shared/component-metadata.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/component-metadata.ts +0 -803
- package/libs/instance-factories/views/templates/shared/composite-pattern-types.ts +0 -250
- package/libs/instance-factories/views/templates/shared/composite-patterns.ts +0 -535
- package/libs/instance-factories/views/templates/shared/index.ts +0 -68
- package/libs/instance-factories/views/templates/shared/pattern-validator.ts +0 -279
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts +0 -149
- package/libs/instance-factories/views/templates/shared/property-mapper.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/property-mapper.js +0 -580
- package/libs/instance-factories/views/templates/shared/property-mapper.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/property-mapper.ts +0 -700
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts +0 -143
- package/libs/instance-factories/views/templates/shared/syntax-mapper.d.ts.map +0 -1
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js +0 -420
- package/libs/instance-factories/views/templates/shared/syntax-mapper.js.map +0 -1
- package/libs/instance-factories/views/templates/shared/syntax-mapper.ts +0 -539
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: GenericScaffold
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
category: scaffolding
|
|
4
|
+
description: "Generic project scaffolding that adapts to manifest choices"
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
author: "SpecVerse Team"
|
|
8
|
+
license: "MIT"
|
|
9
|
+
tags: [scaffolding, project-setup, generic]
|
|
10
|
+
|
|
11
|
+
compatibility:
|
|
12
|
+
specverse: ">=3.3.0"
|
|
13
|
+
node: ">=18.0.0"
|
|
14
|
+
|
|
15
|
+
capabilities:
|
|
16
|
+
provides:
|
|
17
|
+
- "project.scaffold"
|
|
18
|
+
- "project.package.json"
|
|
19
|
+
- "project.tsconfig"
|
|
20
|
+
- "project.gitignore"
|
|
21
|
+
- "project.env"
|
|
22
|
+
|
|
23
|
+
technology:
|
|
24
|
+
runtime: "node"
|
|
25
|
+
language: "typescript"
|
|
26
|
+
|
|
27
|
+
codeTemplates:
|
|
28
|
+
packageJson:
|
|
29
|
+
engine: typescript
|
|
30
|
+
generator: "libs/instance-factories/scaffolding/templates/generic/package-json-generator.ts"
|
|
31
|
+
outputPattern: "package.json"
|
|
32
|
+
|
|
33
|
+
tsconfig:
|
|
34
|
+
engine: typescript
|
|
35
|
+
generator: "libs/instance-factories/scaffolding/templates/generic/tsconfig-generator.ts"
|
|
36
|
+
outputPattern: "tsconfig.json"
|
|
37
|
+
|
|
38
|
+
tsconfigReact:
|
|
39
|
+
engine: typescript
|
|
40
|
+
generator: "libs/instance-factories/scaffolding/templates/generic/tsconfig-react-generator.ts"
|
|
41
|
+
outputPattern: "tsconfig.react.json"
|
|
42
|
+
|
|
43
|
+
env:
|
|
44
|
+
engine: typescript
|
|
45
|
+
generator: "libs/instance-factories/scaffolding/templates/generic/env-generator.ts"
|
|
46
|
+
outputPattern: ".env"
|
|
47
|
+
|
|
48
|
+
envExample:
|
|
49
|
+
engine: typescript
|
|
50
|
+
generator: "libs/instance-factories/scaffolding/templates/generic/env-example-generator.ts"
|
|
51
|
+
outputPattern: ".env.example"
|
|
52
|
+
|
|
53
|
+
gitignore:
|
|
54
|
+
engine: typescript
|
|
55
|
+
generator: "libs/instance-factories/scaffolding/templates/generic/gitignore-generator.ts"
|
|
56
|
+
outputPattern: ".gitignore"
|
|
57
|
+
|
|
58
|
+
readme:
|
|
59
|
+
engine: typescript
|
|
60
|
+
generator: "libs/instance-factories/scaffolding/templates/generic/readme-generator.ts"
|
|
61
|
+
outputPattern: "README.md"
|
|
62
|
+
|
|
63
|
+
configuration:
|
|
64
|
+
defaultNodeVersion: "18.0.0"
|
|
65
|
+
defaultLicense: "MIT"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# SDKs Instance Factory
|
|
2
|
+
|
|
3
|
+
Generates typed client SDKs for consuming REST APIs produced by a SpecVerse specification.
|
|
4
|
+
|
|
5
|
+
## Definitions
|
|
6
|
+
|
|
7
|
+
- **`python-sdk.yaml`** -- Python SDK with async support (aiohttp + Pydantic)
|
|
8
|
+
- **`typescript-sdk.yaml`** -- TypeScript SDK with native fetch (zero runtime dependencies)
|
|
9
|
+
|
|
10
|
+
## Generators
|
|
11
|
+
|
|
12
|
+
- `templates/python/sdk-generator.ts` -- Wraps `generate-sdk-python.js` (1000+ lines). Produces a complete Python package: async client class, per-controller resource classes, Pydantic models, exception classes, `setup.py`, and `requirements.txt`.
|
|
13
|
+
- `templates/typescript/sdk-generator.ts` -- Wraps `generate-sdk-typescript.js` (900+ lines). Produces a complete npm package: client class, resource classes, TypeScript interfaces, error classes, `package.json`, and `tsconfig.json`.
|
|
14
|
+
|
|
15
|
+
## Capabilities
|
|
16
|
+
|
|
17
|
+
| SDK | Provides | Requires |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| Python | `sdk.python`, `client.rest.async` | `api.rest`, `api.rest.crud` |
|
|
20
|
+
| TypeScript | `sdk.typescript`, `client.rest` | `api.rest`, `api.rest.crud` |
|
|
21
|
+
|
|
22
|
+
## Default Configuration
|
|
23
|
+
|
|
24
|
+
Both SDKs include authentication support, automatic retries (3 attempts), and a 30s timeout. The Python SDK defaults to package name `specverse_client`; TypeScript defaults to `@specverse/sdk`.
|
|
25
|
+
|
|
26
|
+
## Status
|
|
27
|
+
|
|
28
|
+
Wrapper implementations. Both YAMLs note future TODOs to convert the monolithic JS generators into native TypeScript template generators.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: PythonSDK
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
category: view
|
|
4
|
+
description: "Python SDK generator for consuming REST APIs with async support and type hints"
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
author: "SpecVerse Team"
|
|
8
|
+
license: "MIT"
|
|
9
|
+
tags: [python, sdk, client, rest-api, async]
|
|
10
|
+
|
|
11
|
+
compatibility:
|
|
12
|
+
specverse: ">=3.3.0"
|
|
13
|
+
python: ">=3.8"
|
|
14
|
+
|
|
15
|
+
capabilities:
|
|
16
|
+
provides:
|
|
17
|
+
- "sdk.python"
|
|
18
|
+
- "client.rest.async"
|
|
19
|
+
requires:
|
|
20
|
+
- "api.rest"
|
|
21
|
+
- "api.rest.crud"
|
|
22
|
+
|
|
23
|
+
technology:
|
|
24
|
+
runtime: "python"
|
|
25
|
+
language: "python"
|
|
26
|
+
framework: "native"
|
|
27
|
+
httpClient: "aiohttp"
|
|
28
|
+
|
|
29
|
+
dependencies:
|
|
30
|
+
runtime:
|
|
31
|
+
- name: "aiohttp"
|
|
32
|
+
version: "^3.9.0"
|
|
33
|
+
- name: "pydantic"
|
|
34
|
+
version: "^2.0.0"
|
|
35
|
+
dev:
|
|
36
|
+
- name: "mypy"
|
|
37
|
+
version: "^1.7.0"
|
|
38
|
+
- name: "pytest"
|
|
39
|
+
version: "^7.4.0"
|
|
40
|
+
- name: "pytest-asyncio"
|
|
41
|
+
version: "^0.21.0"
|
|
42
|
+
|
|
43
|
+
codeTemplates:
|
|
44
|
+
sdk:
|
|
45
|
+
engine: typescript
|
|
46
|
+
generator: "libs/instance-factories/sdks/templates/python/sdk-generator.ts"
|
|
47
|
+
outputPattern: "sdk-python/"
|
|
48
|
+
|
|
49
|
+
configuration:
|
|
50
|
+
packageName: "specverse_client"
|
|
51
|
+
packageVersion: "1.0.0"
|
|
52
|
+
includeAuth: true
|
|
53
|
+
includeRetry: true
|
|
54
|
+
includeAsync: true
|
|
55
|
+
timeout: 30000
|
|
56
|
+
retries: 3
|
|
57
|
+
|
|
58
|
+
# NOTE: This implementation type wraps the existing generate-sdk-python.js script
|
|
59
|
+
# TODO: Future enhancement - Convert generate-sdk-python.js to native TypeScript template generator
|
|
60
|
+
# The current script is 1000+ lines and generates a complete Python package structure.
|
|
61
|
+
# Converting to native templates would require breaking it into multiple template files:
|
|
62
|
+
# - client-generator.ts (main async client class)
|
|
63
|
+
# - resource-generator.ts (per-controller resource classes)
|
|
64
|
+
# - types-generator.ts (Pydantic models)
|
|
65
|
+
# - errors-generator.ts (exception classes)
|
|
66
|
+
# - package-generator.ts (setup.py, requirements.txt)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: TypeScriptSDK
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
category: view
|
|
4
|
+
description: "TypeScript SDK generator for consuming REST APIs with full type safety"
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
author: "SpecVerse Team"
|
|
8
|
+
license: "MIT"
|
|
9
|
+
tags: [typescript, sdk, client, rest-api]
|
|
10
|
+
|
|
11
|
+
compatibility:
|
|
12
|
+
specverse: ">=3.3.0"
|
|
13
|
+
node: ">=18.0.0"
|
|
14
|
+
|
|
15
|
+
capabilities:
|
|
16
|
+
provides:
|
|
17
|
+
- "sdk.typescript"
|
|
18
|
+
- "client.rest"
|
|
19
|
+
requires:
|
|
20
|
+
- "api.rest"
|
|
21
|
+
- "api.rest.crud"
|
|
22
|
+
|
|
23
|
+
technology:
|
|
24
|
+
runtime: "node"
|
|
25
|
+
language: "typescript"
|
|
26
|
+
framework: "native"
|
|
27
|
+
httpClient: "fetch"
|
|
28
|
+
|
|
29
|
+
dependencies:
|
|
30
|
+
runtime: []
|
|
31
|
+
dev:
|
|
32
|
+
- name: "@types/node"
|
|
33
|
+
version: "^20.8.0"
|
|
34
|
+
- name: "typescript"
|
|
35
|
+
version: "^5.2.0"
|
|
36
|
+
|
|
37
|
+
codeTemplates:
|
|
38
|
+
sdk:
|
|
39
|
+
engine: typescript
|
|
40
|
+
generator: "libs/instance-factories/sdks/templates/typescript/sdk-generator.ts"
|
|
41
|
+
outputPattern: "sdk-typescript/"
|
|
42
|
+
|
|
43
|
+
configuration:
|
|
44
|
+
packageName: "@specverse/sdk"
|
|
45
|
+
packageVersion: "1.0.0"
|
|
46
|
+
includeAuth: true
|
|
47
|
+
includeRetry: true
|
|
48
|
+
timeout: 30000
|
|
49
|
+
retries: 3
|
|
50
|
+
|
|
51
|
+
# NOTE: This implementation type wraps the existing generate-sdk-typescript.js script
|
|
52
|
+
# TODO: Future enhancement - Convert generate-sdk-typescript.js to native TypeScript template generator
|
|
53
|
+
# The current script is 900+ lines and generates a complete SDK package structure.
|
|
54
|
+
# Converting to native templates would require breaking it into multiple template files:
|
|
55
|
+
# - client-generator.ts (main client class)
|
|
56
|
+
# - resource-generator.ts (per-controller resource classes)
|
|
57
|
+
# - types-generator.ts (TypeScript interfaces)
|
|
58
|
+
# - errors-generator.ts (error classes)
|
|
59
|
+
# - package-generator.ts (package.json, tsconfig.json)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Services Factory
|
|
2
|
+
|
|
3
|
+
Business logic generation with CURED operations and L3 behavior support.
|
|
4
|
+
|
|
5
|
+
## Definition
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|------|-------------|
|
|
9
|
+
| `prisma-services.yaml` | Prisma-backed controllers and services with CRUD and event publishing |
|
|
10
|
+
|
|
11
|
+
## Generated Output
|
|
12
|
+
|
|
13
|
+
| Generator | Output | Purpose |
|
|
14
|
+
|-----------|--------|---------|
|
|
15
|
+
| `controller-generator` | `backend/src/controllers/{model}Controller.ts` | Per-model CURED controllers (Create, Update, Read, Execute, Delete) |
|
|
16
|
+
| `service-generator` | `backend/src/services/{service}.ts` | Abstract business logic services (not tied to single model) |
|
|
17
|
+
| `behavior-generator` | (imported by above) | L3 behavior generation: preconditions, steps, postconditions, events |
|
|
18
|
+
|
|
19
|
+
### Controller vs Service
|
|
20
|
+
|
|
21
|
+
- **Controllers** are model-specific — one per model, managing CURED operations and
|
|
22
|
+
event pub/sub for that model.
|
|
23
|
+
- **Services** are cross-cutting — they can interact with multiple models and
|
|
24
|
+
implement business workflows.
|
|
25
|
+
|
|
26
|
+
### Behavior Generator (L3)
|
|
27
|
+
|
|
28
|
+
The behavior generator produces method bodies from behavioral metadata:
|
|
29
|
+
- **Preconditions** become guard checks (throw on violation)
|
|
30
|
+
- **Steps** become ordered business logic
|
|
31
|
+
- **Postconditions** become dev-mode assertions
|
|
32
|
+
- **publishes/sideEffects** become event publishing calls
|
|
33
|
+
- **transactional** wraps in `prisma.$transaction`
|
|
34
|
+
|
|
35
|
+
This is the third generation layer: L1 (schema) and L2 (CRUD) are handled by
|
|
36
|
+
the ORM and controller generators.
|
|
37
|
+
|
|
38
|
+
## Technology
|
|
39
|
+
|
|
40
|
+
- **ORM**: @prisma/client ^5.5.0
|
|
41
|
+
- **Patterns**: CURED operations, event-driven, transactional
|
|
42
|
+
|
|
43
|
+
## Capabilities
|
|
44
|
+
|
|
45
|
+
| Provides | Requires |
|
|
46
|
+
|----------|----------|
|
|
47
|
+
| `service.controller` | `orm.client` |
|
|
48
|
+
| `service.business` | |
|
|
49
|
+
| `service.crud` | |
|
|
50
|
+
|
|
51
|
+
## Configuration
|
|
52
|
+
|
|
53
|
+
- `validation: true` — input validation enabled
|
|
54
|
+
- `eventPublishing: true` — events emitted on state changes
|
|
55
|
+
- `errorHandling: "throw"` — exceptions propagate to caller
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: PrismaServices
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
category: service
|
|
4
|
+
description: "Business logic services using Prisma client for data access"
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
author: "SpecVerse Team"
|
|
8
|
+
license: "MIT"
|
|
9
|
+
tags: [services, business-logic, prisma, controllers]
|
|
10
|
+
|
|
11
|
+
compatibility:
|
|
12
|
+
specverse: ">=3.3.0"
|
|
13
|
+
node: ">=18.0.0"
|
|
14
|
+
|
|
15
|
+
capabilities:
|
|
16
|
+
provides:
|
|
17
|
+
- "service.controller" # Model-specific business logic (controllers)
|
|
18
|
+
- "service.business" # Abstract business logic (services)
|
|
19
|
+
- "service.crud" # CRUD operations
|
|
20
|
+
requires:
|
|
21
|
+
- "orm.client" # Needs Prisma client for data access
|
|
22
|
+
|
|
23
|
+
technology:
|
|
24
|
+
runtime: "node"
|
|
25
|
+
language: "typescript"
|
|
26
|
+
orm: "prisma"
|
|
27
|
+
|
|
28
|
+
dependencies:
|
|
29
|
+
runtime:
|
|
30
|
+
- name: "@prisma/client"
|
|
31
|
+
version: "^5.5.0"
|
|
32
|
+
|
|
33
|
+
dev:
|
|
34
|
+
- name: "@types/node"
|
|
35
|
+
version: "^20.8.0"
|
|
36
|
+
- name: "typescript"
|
|
37
|
+
version: "^5.2.0"
|
|
38
|
+
|
|
39
|
+
codeTemplates:
|
|
40
|
+
controllers:
|
|
41
|
+
engine: typescript
|
|
42
|
+
generator: "libs/instance-factories/services/templates/prisma/controller-generator.ts"
|
|
43
|
+
outputPattern: "{backendDir}/src/controllers/{model}Controller.ts"
|
|
44
|
+
|
|
45
|
+
services:
|
|
46
|
+
engine: typescript
|
|
47
|
+
generator: "libs/instance-factories/services/templates/prisma/service-generator.ts"
|
|
48
|
+
outputPattern: "{backendDir}/src/services/{service}.ts"
|
|
49
|
+
|
|
50
|
+
configuration:
|
|
51
|
+
outputStructure: "monorepo"
|
|
52
|
+
backendDir: "backend"
|
|
53
|
+
|
|
54
|
+
validation: true
|
|
55
|
+
eventPublishing: true
|
|
56
|
+
errorHandling: "throw"
|
|
57
|
+
|
|
58
|
+
# Requirements for generic scaffolding (runtime-agnostic structure)
|
|
59
|
+
requirements:
|
|
60
|
+
# Package dependencies (Node.js/npm-specific)
|
|
61
|
+
dependencies:
|
|
62
|
+
npm:
|
|
63
|
+
dependencies:
|
|
64
|
+
"@prisma/client": "^5.5.0"
|
|
65
|
+
# Services don't add extra scripts, they use the ones from Prisma
|
|
66
|
+
|
|
67
|
+
# No environment variables needed
|
|
68
|
+
environment: []
|
|
69
|
+
|
|
70
|
+
# No special configuration needed
|
|
71
|
+
configuration: {}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Storage Instance Factory
|
|
2
|
+
|
|
3
|
+
Generates database connection configuration and Docker Compose files for three storage backends.
|
|
4
|
+
|
|
5
|
+
## Definitions
|
|
6
|
+
|
|
7
|
+
- **`mongodb.yaml`** -- MongoDB 6 with sharding and replication support
|
|
8
|
+
- **`postgresql.yaml`** -- PostgreSQL 15 with production-tuned settings
|
|
9
|
+
- **`redis.yaml`** -- Redis 7 for caching and session management
|
|
10
|
+
|
|
11
|
+
## Generators
|
|
12
|
+
|
|
13
|
+
Each backend has two generators under `templates/{backend}/`:
|
|
14
|
+
|
|
15
|
+
| Generator | Output Pattern | Purpose |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `config-generator.ts` | `config/database.{instance}.ts` | Connection config with pool settings |
|
|
18
|
+
| `docker-generator.ts` | `docker/{service}.{instance}.yml` | Docker Compose service definition |
|
|
19
|
+
|
|
20
|
+
## Capabilities
|
|
21
|
+
|
|
22
|
+
| Backend | Provides |
|
|
23
|
+
|---|---|
|
|
24
|
+
| MongoDB | `storage.database`, `storage.database.document`, `storage.database.nosql` |
|
|
25
|
+
| PostgreSQL | `storage.database`, `storage.database.relational`, `storage.database.sql` |
|
|
26
|
+
| Redis | `storage.cache`, `storage.cache.memory`, `storage.session` |
|
|
27
|
+
|
|
28
|
+
## Default Configuration
|
|
29
|
+
|
|
30
|
+
- **MongoDB**: Pool 2-10, replication off by default, daily backups at 2am (7-day retention)
|
|
31
|
+
- **PostgreSQL**: Pool 2-10, 256MB shared buffers, 100 max connections, daily backups
|
|
32
|
+
- **Redis**: 256MB max memory, LRU eviction, AOF persistence, hourly backups
|
|
33
|
+
|
|
34
|
+
All backends use environment variables for credentials (`${DB_HOST}`, `${REDIS_PASSWORD}`, etc.).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: MongoDB6
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
category: storage
|
|
4
|
+
description: "MongoDB 6 document database with sharding and replication support"
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
author: "SpecVerse Team"
|
|
8
|
+
license: "MIT"
|
|
9
|
+
tags: [mongodb, database, nosql, document]
|
|
10
|
+
|
|
11
|
+
compatibility:
|
|
12
|
+
specverse: ">=3.3.0"
|
|
13
|
+
mongodb: ">=6.0"
|
|
14
|
+
|
|
15
|
+
capabilities:
|
|
16
|
+
provides:
|
|
17
|
+
- "storage.database"
|
|
18
|
+
- "storage.database.document"
|
|
19
|
+
- "storage.database.nosql"
|
|
20
|
+
- "database.mongodb"
|
|
21
|
+
requires: []
|
|
22
|
+
|
|
23
|
+
technology:
|
|
24
|
+
runtime: "node"
|
|
25
|
+
language: "typescript"
|
|
26
|
+
database: "mongodb"
|
|
27
|
+
version: "6.x"
|
|
28
|
+
|
|
29
|
+
dependencies:
|
|
30
|
+
runtime: [] # Database runs separately
|
|
31
|
+
|
|
32
|
+
dev:
|
|
33
|
+
- name: "mongodb"
|
|
34
|
+
version: "^6.3.0"
|
|
35
|
+
description: "MongoDB driver for Node.js"
|
|
36
|
+
|
|
37
|
+
codeTemplates:
|
|
38
|
+
config:
|
|
39
|
+
engine: typescript
|
|
40
|
+
generator: "libs/instance-factories/storage/templates/mongodb/config-generator.ts"
|
|
41
|
+
outputPattern: "config/database.{instance}.ts"
|
|
42
|
+
|
|
43
|
+
docker:
|
|
44
|
+
engine: typescript
|
|
45
|
+
generator: "libs/instance-factories/storage/templates/mongodb/docker-generator.ts"
|
|
46
|
+
outputPattern: "docker/mongodb.{instance}.yml"
|
|
47
|
+
|
|
48
|
+
configuration:
|
|
49
|
+
# Database connection
|
|
50
|
+
host: "${MONGO_HOST:-localhost}"
|
|
51
|
+
port: 27017
|
|
52
|
+
database: "${MONGO_DB}"
|
|
53
|
+
username: "${MONGO_USER}"
|
|
54
|
+
password: "${MONGO_PASSWORD}"
|
|
55
|
+
authSource: "admin"
|
|
56
|
+
|
|
57
|
+
# Connection options
|
|
58
|
+
options:
|
|
59
|
+
maxPoolSize: 10
|
|
60
|
+
minPoolSize: 2
|
|
61
|
+
serverSelectionTimeoutMS: 5000
|
|
62
|
+
socketTimeoutMS: 45000
|
|
63
|
+
|
|
64
|
+
# Replication
|
|
65
|
+
replication:
|
|
66
|
+
enabled: false
|
|
67
|
+
replSetName: "rs0"
|
|
68
|
+
replicas: 3
|
|
69
|
+
|
|
70
|
+
# Sharding
|
|
71
|
+
sharding:
|
|
72
|
+
enabled: false
|
|
73
|
+
shardKey: "_id"
|
|
74
|
+
|
|
75
|
+
# Backup
|
|
76
|
+
backup:
|
|
77
|
+
enabled: true
|
|
78
|
+
schedule: "0 2 * * *" # Daily at 2am
|
|
79
|
+
retention: 7 # days
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: PostgreSQL15
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
category: storage
|
|
4
|
+
description: "PostgreSQL 15 database with optimized configuration for production"
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
author: "SpecVerse Team"
|
|
8
|
+
license: "MIT"
|
|
9
|
+
tags: [postgresql, database, sql, relational]
|
|
10
|
+
|
|
11
|
+
compatibility:
|
|
12
|
+
specverse: ">=3.3.0"
|
|
13
|
+
postgresql: ">=15.0"
|
|
14
|
+
|
|
15
|
+
capabilities:
|
|
16
|
+
provides:
|
|
17
|
+
- "storage.database"
|
|
18
|
+
- "storage.database.relational"
|
|
19
|
+
- "storage.database.sql"
|
|
20
|
+
- "database.postgresql"
|
|
21
|
+
requires: []
|
|
22
|
+
|
|
23
|
+
technology:
|
|
24
|
+
runtime: "node"
|
|
25
|
+
language: "typescript"
|
|
26
|
+
database: "postgresql"
|
|
27
|
+
version: "15.x"
|
|
28
|
+
|
|
29
|
+
dependencies:
|
|
30
|
+
runtime: [] # Database runs separately
|
|
31
|
+
|
|
32
|
+
dev:
|
|
33
|
+
- name: "pg"
|
|
34
|
+
version: "^8.11.0"
|
|
35
|
+
description: "PostgreSQL client for Node.js"
|
|
36
|
+
|
|
37
|
+
codeTemplates:
|
|
38
|
+
config:
|
|
39
|
+
engine: typescript
|
|
40
|
+
generator: "libs/instance-factories/storage/templates/postgresql/config-generator.ts"
|
|
41
|
+
outputPattern: "config/database.{instance}.ts"
|
|
42
|
+
|
|
43
|
+
docker:
|
|
44
|
+
engine: typescript
|
|
45
|
+
generator: "libs/instance-factories/storage/templates/postgresql/docker-generator.ts"
|
|
46
|
+
outputPattern: "docker/postgres.{instance}.yml"
|
|
47
|
+
|
|
48
|
+
configuration:
|
|
49
|
+
# Database connection
|
|
50
|
+
host: "${DB_HOST:-localhost}"
|
|
51
|
+
port: 5432
|
|
52
|
+
database: "${DB_NAME}"
|
|
53
|
+
username: "${DB_USER}"
|
|
54
|
+
password: "${DB_PASSWORD}"
|
|
55
|
+
|
|
56
|
+
# Connection pool
|
|
57
|
+
pool:
|
|
58
|
+
min: 2
|
|
59
|
+
max: 10
|
|
60
|
+
idleTimeoutMillis: 30000
|
|
61
|
+
connectionTimeoutMillis: 2000
|
|
62
|
+
|
|
63
|
+
# Performance
|
|
64
|
+
settings:
|
|
65
|
+
max_connections: 100
|
|
66
|
+
shared_buffers: "256MB"
|
|
67
|
+
effective_cache_size: "1GB"
|
|
68
|
+
work_mem: "16MB"
|
|
69
|
+
maintenance_work_mem: "128MB"
|
|
70
|
+
|
|
71
|
+
# Backup
|
|
72
|
+
backup:
|
|
73
|
+
enabled: true
|
|
74
|
+
schedule: "0 2 * * *" # Daily at 2am
|
|
75
|
+
retention: 7 # days
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: Redis7
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
category: storage
|
|
4
|
+
description: "Redis 7 in-memory data store for caching and session management"
|
|
5
|
+
|
|
6
|
+
metadata:
|
|
7
|
+
author: "SpecVerse Team"
|
|
8
|
+
license: "MIT"
|
|
9
|
+
tags: [redis, cache, session, key-value]
|
|
10
|
+
|
|
11
|
+
compatibility:
|
|
12
|
+
specverse: ">=3.3.0"
|
|
13
|
+
redis: ">=7.0"
|
|
14
|
+
|
|
15
|
+
capabilities:
|
|
16
|
+
provides:
|
|
17
|
+
- "storage.cache"
|
|
18
|
+
- "storage.cache.memory"
|
|
19
|
+
- "storage.session"
|
|
20
|
+
- "database.redis"
|
|
21
|
+
requires: []
|
|
22
|
+
|
|
23
|
+
technology:
|
|
24
|
+
runtime: "node"
|
|
25
|
+
language: "typescript"
|
|
26
|
+
database: "redis"
|
|
27
|
+
version: "7.x"
|
|
28
|
+
|
|
29
|
+
dependencies:
|
|
30
|
+
runtime: [] # Database runs separately
|
|
31
|
+
|
|
32
|
+
dev:
|
|
33
|
+
- name: "redis"
|
|
34
|
+
version: "^4.6.0"
|
|
35
|
+
description: "Redis client for Node.js"
|
|
36
|
+
- name: "@types/redis"
|
|
37
|
+
version: "^4.0.11"
|
|
38
|
+
|
|
39
|
+
codeTemplates:
|
|
40
|
+
config:
|
|
41
|
+
engine: typescript
|
|
42
|
+
generator: "libs/instance-factories/storage/templates/redis/config-generator.ts"
|
|
43
|
+
outputPattern: "config/cache.{instance}.ts"
|
|
44
|
+
|
|
45
|
+
docker:
|
|
46
|
+
engine: typescript
|
|
47
|
+
generator: "libs/instance-factories/storage/templates/redis/docker-generator.ts"
|
|
48
|
+
outputPattern: "docker/redis.{instance}.yml"
|
|
49
|
+
|
|
50
|
+
configuration:
|
|
51
|
+
# Connection
|
|
52
|
+
host: "${REDIS_HOST:-localhost}"
|
|
53
|
+
port: 6379
|
|
54
|
+
password: "${REDIS_PASSWORD}"
|
|
55
|
+
database: 0
|
|
56
|
+
|
|
57
|
+
# Connection options
|
|
58
|
+
options:
|
|
59
|
+
connectTimeout: 10000
|
|
60
|
+
commandTimeout: 5000
|
|
61
|
+
retryStrategy: "exponential"
|
|
62
|
+
maxRetriesPerRequest: 3
|
|
63
|
+
|
|
64
|
+
# Memory management
|
|
65
|
+
memory:
|
|
66
|
+
maxMemory: "256mb"
|
|
67
|
+
evictionPolicy: "allkeys-lru"
|
|
68
|
+
|
|
69
|
+
# Persistence
|
|
70
|
+
persistence:
|
|
71
|
+
enabled: true
|
|
72
|
+
strategy: "aof" # append-only file
|
|
73
|
+
fsync: "everysec"
|
|
74
|
+
|
|
75
|
+
# Backup
|
|
76
|
+
backup:
|
|
77
|
+
enabled: true
|
|
78
|
+
schedule: "0 * * * *" # Hourly
|
|
79
|
+
retention: 24 # hours
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Testing Instance Factory
|
|
2
|
+
|
|
3
|
+
Generates a comprehensive Vitest test suite from a SpecVerse specification, covering unit, integration, and end-to-end tests.
|
|
4
|
+
|
|
5
|
+
## Definition
|
|
6
|
+
|
|
7
|
+
- **`vitest-tests.yaml`** -- Single definition for the full test suite (category: `service`).
|
|
8
|
+
|
|
9
|
+
## Generator
|
|
10
|
+
|
|
11
|
+
- `templates/vitest/tests-generator.ts` -- Wraps `generate-tests.js` (700+ lines). Produces a complete test directory structure.
|
|
12
|
+
|
|
13
|
+
## Capabilities
|
|
14
|
+
|
|
15
|
+
| Capability | Description |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `testing.unit` | Service-layer unit tests |
|
|
18
|
+
| `testing.integration` | Route integration tests |
|
|
19
|
+
| `testing.e2e` | End-to-end workflow tests |
|
|
20
|
+
|
|
21
|
+
## What Gets Generated
|
|
22
|
+
|
|
23
|
+
- Unit tests for each service
|
|
24
|
+
- Integration tests for each route
|
|
25
|
+
- End-to-end tests for cross-model workflows
|
|
26
|
+
- Test data fixtures
|
|
27
|
+
- Prisma and EventBus mocks
|
|
28
|
+
- Database and server setup utilities
|
|
29
|
+
|
|
30
|
+
## Default Configuration
|
|
31
|
+
|
|
32
|
+
All five generation flags are enabled by default: `generateUnitTests`, `generateIntegrationTests`, `generateE2ETests`, `generateFixtures`, `generateMocks`.
|
|
33
|
+
|
|
34
|
+
## Dependencies
|
|
35
|
+
|
|
36
|
+
Vitest 1.x with `@vitest/ui` for interactive test reporting.
|
|
37
|
+
|
|
38
|
+
## Status
|
|
39
|
+
|
|
40
|
+
Wrapper implementation. Future TODO to split into dedicated generators per test tier (unit, integration, e2e, fixtures, mocks, setup).
|