@angriff36/manifest 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +476 -0
- package/dist/manifest/agent-sdk/agent-runtime.d.ts +30 -0
- package/dist/manifest/agent-sdk/agent-runtime.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/agent-runtime.js +232 -0
- package/dist/manifest/agent-sdk/agent-runtime.js.map +1 -0
- package/dist/manifest/agent-sdk/index.d.ts +17 -0
- package/dist/manifest/agent-sdk/index.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/index.js +21 -0
- package/dist/manifest/agent-sdk/index.js.map +1 -0
- package/dist/manifest/agent-sdk/intent-mapper.d.ts +17 -0
- package/dist/manifest/agent-sdk/intent-mapper.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/intent-mapper.js +115 -0
- package/dist/manifest/agent-sdk/intent-mapper.js.map +1 -0
- package/dist/manifest/agent-sdk/introspect.d.ts +42 -0
- package/dist/manifest/agent-sdk/introspect.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/introspect.js +284 -0
- package/dist/manifest/agent-sdk/introspect.js.map +1 -0
- package/dist/manifest/agent-sdk/json-schema.d.ts +29 -0
- package/dist/manifest/agent-sdk/json-schema.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/json-schema.js +132 -0
- package/dist/manifest/agent-sdk/json-schema.js.map +1 -0
- package/dist/manifest/agent-sdk/tool-definitions.d.ts +41 -0
- package/dist/manifest/agent-sdk/tool-definitions.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/tool-definitions.js +288 -0
- package/dist/manifest/agent-sdk/tool-definitions.js.map +1 -0
- package/dist/manifest/agent-sdk/types.d.ts +293 -0
- package/dist/manifest/agent-sdk/types.d.ts.map +1 -0
- package/dist/manifest/agent-sdk/types.js +6 -0
- package/dist/manifest/agent-sdk/types.js.map +1 -0
- package/dist/manifest/api-diagnostics.d.ts +41 -0
- package/dist/manifest/api-diagnostics.d.ts.map +1 -0
- package/dist/manifest/api-diagnostics.js +105 -0
- package/dist/manifest/api-diagnostics.js.map +1 -0
- package/dist/manifest/approval/approval-store.d.ts +52 -0
- package/dist/manifest/approval/approval-store.d.ts.map +1 -0
- package/dist/manifest/approval/approval-store.js +25 -0
- package/dist/manifest/approval/approval-store.js.map +1 -0
- package/dist/manifest/approval/stores/memory.d.ts +33 -0
- package/dist/manifest/approval/stores/memory.d.ts.map +1 -0
- package/dist/manifest/approval/stores/memory.js +56 -0
- package/dist/manifest/approval/stores/memory.js.map +1 -0
- package/dist/manifest/approval/stores/postgres.d.ts +41 -0
- package/dist/manifest/approval/stores/postgres.d.ts.map +1 -0
- package/dist/manifest/approval/stores/postgres.js +124 -0
- package/dist/manifest/approval/stores/postgres.js.map +1 -0
- package/dist/manifest/audit/audit-sink.d.ts +53 -0
- package/dist/manifest/audit/audit-sink.d.ts.map +1 -0
- package/dist/manifest/audit/audit-sink.js +15 -0
- package/dist/manifest/audit/audit-sink.js.map +1 -0
- package/dist/manifest/audit/sinks/memory.d.ts +50 -0
- package/dist/manifest/audit/sinks/memory.d.ts.map +1 -0
- package/dist/manifest/audit/sinks/memory.js +66 -0
- package/dist/manifest/audit/sinks/memory.js.map +1 -0
- package/dist/manifest/audit/sinks/postgres.d.ts +31 -0
- package/dist/manifest/audit/sinks/postgres.d.ts.map +1 -0
- package/dist/manifest/audit/sinks/postgres.js +67 -0
- package/dist/manifest/audit/sinks/postgres.js.map +1 -0
- package/dist/manifest/binary-ir.d.ts +76 -0
- package/dist/manifest/binary-ir.d.ts.map +1 -0
- package/dist/manifest/binary-ir.js +124 -0
- package/dist/manifest/binary-ir.js.map +1 -0
- package/dist/manifest/breaking-change.d.ts +75 -0
- package/dist/manifest/breaking-change.d.ts.map +1 -0
- package/dist/manifest/breaking-change.js +704 -0
- package/dist/manifest/breaking-change.js.map +1 -0
- package/dist/manifest/compiler.d.ts +12 -0
- package/dist/manifest/compiler.d.ts.map +1 -0
- package/dist/manifest/compiler.js +23 -0
- package/dist/manifest/compiler.js.map +1 -0
- package/dist/manifest/config.d.ts +171 -0
- package/dist/manifest/config.d.ts.map +1 -0
- package/dist/manifest/config.js +65 -0
- package/dist/manifest/config.js.map +1 -0
- package/dist/manifest/constraint-analysis.d.ts +122 -0
- package/dist/manifest/constraint-analysis.d.ts.map +1 -0
- package/dist/manifest/constraint-analysis.js +340 -0
- package/dist/manifest/constraint-analysis.js.map +1 -0
- package/dist/manifest/date-time.d.ts +13 -0
- package/dist/manifest/date-time.d.ts.map +1 -0
- package/dist/manifest/date-time.js +60 -0
- package/dist/manifest/date-time.js.map +1 -0
- package/dist/manifest/debug/command-trace.d.ts +37 -0
- package/dist/manifest/debug/command-trace.d.ts.map +1 -0
- package/dist/manifest/debug/command-trace.js +51 -0
- package/dist/manifest/debug/command-trace.js.map +1 -0
- package/dist/manifest/debug/index.d.ts +3 -0
- package/dist/manifest/debug/index.d.ts.map +1 -0
- package/dist/manifest/debug/index.js +2 -0
- package/dist/manifest/debug/index.js.map +1 -0
- package/dist/manifest/domain-completeness.d.ts +13 -0
- package/dist/manifest/domain-completeness.d.ts.map +1 -0
- package/dist/manifest/domain-completeness.js +245 -0
- package/dist/manifest/domain-completeness.js.map +1 -0
- package/dist/manifest/entity-composition.d.ts +24 -0
- package/dist/manifest/entity-composition.d.ts.map +1 -0
- package/dist/manifest/entity-composition.js +157 -0
- package/dist/manifest/entity-composition.js.map +1 -0
- package/dist/manifest/examples.d.ts +6 -0
- package/dist/manifest/examples.d.ts.map +1 -0
- package/dist/manifest/examples.js +443 -0
- package/dist/manifest/examples.js.map +1 -0
- package/dist/manifest/federation/client.d.ts +52 -0
- package/dist/manifest/federation/client.d.ts.map +1 -0
- package/dist/manifest/federation/client.js +152 -0
- package/dist/manifest/federation/client.js.map +1 -0
- package/dist/manifest/federation/descriptor.d.ts +25 -0
- package/dist/manifest/federation/descriptor.d.ts.map +1 -0
- package/dist/manifest/federation/descriptor.js +97 -0
- package/dist/manifest/federation/descriptor.js.map +1 -0
- package/dist/manifest/federation/http-adapter.d.ts +26 -0
- package/dist/manifest/federation/http-adapter.d.ts.map +1 -0
- package/dist/manifest/federation/http-adapter.js +209 -0
- package/dist/manifest/federation/http-adapter.js.map +1 -0
- package/dist/manifest/federation/index.d.ts +51 -0
- package/dist/manifest/federation/index.d.ts.map +1 -0
- package/dist/manifest/federation/index.js +49 -0
- package/dist/manifest/federation/index.js.map +1 -0
- package/dist/manifest/federation/policy-bridge.d.ts +51 -0
- package/dist/manifest/federation/policy-bridge.d.ts.map +1 -0
- package/dist/manifest/federation/policy-bridge.js +122 -0
- package/dist/manifest/federation/policy-bridge.js.map +1 -0
- package/dist/manifest/federation/registry.d.ts +88 -0
- package/dist/manifest/federation/registry.d.ts.map +1 -0
- package/dist/manifest/federation/registry.js +165 -0
- package/dist/manifest/federation/registry.js.map +1 -0
- package/dist/manifest/federation/types.d.ts +209 -0
- package/dist/manifest/federation/types.d.ts.map +1 -0
- package/dist/manifest/federation/types.js +13 -0
- package/dist/manifest/federation/types.js.map +1 -0
- package/dist/manifest/generator.d.ts +44 -0
- package/dist/manifest/generator.d.ts.map +1 -0
- package/dist/manifest/generator.js +899 -0
- package/dist/manifest/generator.js.map +1 -0
- package/dist/manifest/ir-cache.d.ts +48 -0
- package/dist/manifest/ir-cache.d.ts.map +1 -0
- package/dist/manifest/ir-cache.js +91 -0
- package/dist/manifest/ir-cache.js.map +1 -0
- package/dist/manifest/ir-compiler.d.ts +135 -0
- package/dist/manifest/ir-compiler.d.ts.map +1 -0
- package/dist/manifest/ir-compiler.js +1477 -0
- package/dist/manifest/ir-compiler.js.map +1 -0
- package/dist/manifest/ir-diff.d.ts +266 -0
- package/dist/manifest/ir-diff.d.ts.map +1 -0
- package/dist/manifest/ir-diff.js +731 -0
- package/dist/manifest/ir-diff.js.map +1 -0
- package/dist/manifest/ir-version-store.d.ts +109 -0
- package/dist/manifest/ir-version-store.d.ts.map +1 -0
- package/dist/manifest/ir-version-store.js +162 -0
- package/dist/manifest/ir-version-store.js.map +1 -0
- package/dist/manifest/ir.d.ts +616 -0
- package/dist/manifest/ir.d.ts.map +1 -0
- package/dist/manifest/ir.js +2 -0
- package/dist/manifest/ir.js.map +1 -0
- package/dist/manifest/lexer.d.ts +37 -0
- package/dist/manifest/lexer.d.ts.map +1 -0
- package/dist/manifest/lexer.js +224 -0
- package/dist/manifest/lexer.js.map +1 -0
- package/dist/manifest/masking.d.ts +11 -0
- package/dist/manifest/masking.d.ts.map +1 -0
- package/dist/manifest/masking.js +34 -0
- package/dist/manifest/masking.js.map +1 -0
- package/dist/manifest/module-resolver.d.ts +42 -0
- package/dist/manifest/module-resolver.d.ts.map +1 -0
- package/dist/manifest/module-resolver.js +162 -0
- package/dist/manifest/module-resolver.js.map +1 -0
- package/dist/manifest/multi-compiler.d.ts +40 -0
- package/dist/manifest/multi-compiler.d.ts.map +1 -0
- package/dist/manifest/multi-compiler.js +324 -0
- package/dist/manifest/multi-compiler.js.map +1 -0
- package/dist/manifest/outbox/outbox-store.d.ts +56 -0
- package/dist/manifest/outbox/outbox-store.d.ts.map +1 -0
- package/dist/manifest/outbox/outbox-store.js +13 -0
- package/dist/manifest/outbox/outbox-store.js.map +1 -0
- package/dist/manifest/outbox/stores/dynamodb.d.ts +100 -0
- package/dist/manifest/outbox/stores/dynamodb.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/dynamodb.js +239 -0
- package/dist/manifest/outbox/stores/dynamodb.js.map +1 -0
- package/dist/manifest/outbox/stores/memory.d.ts +54 -0
- package/dist/manifest/outbox/stores/memory.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/memory.js +131 -0
- package/dist/manifest/outbox/stores/memory.js.map +1 -0
- package/dist/manifest/outbox/stores/mongodb.d.ts +58 -0
- package/dist/manifest/outbox/stores/mongodb.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/mongodb.js +151 -0
- package/dist/manifest/outbox/stores/mongodb.js.map +1 -0
- package/dist/manifest/outbox/stores/postgres.d.ts +81 -0
- package/dist/manifest/outbox/stores/postgres.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/postgres.js +182 -0
- package/dist/manifest/outbox/stores/postgres.js.map +1 -0
- package/dist/manifest/outbox/stores/redis.d.ts +95 -0
- package/dist/manifest/outbox/stores/redis.d.ts.map +1 -0
- package/dist/manifest/outbox/stores/redis.js +248 -0
- package/dist/manifest/outbox/stores/redis.js.map +1 -0
- package/dist/manifest/parser.d.ts +148 -0
- package/dist/manifest/parser.d.ts.map +1 -0
- package/dist/manifest/parser.js +2243 -0
- package/dist/manifest/parser.js.map +1 -0
- package/dist/manifest/plugin-api.d.ts +202 -0
- package/dist/manifest/plugin-api.d.ts.map +1 -0
- package/dist/manifest/plugin-api.js +101 -0
- package/dist/manifest/plugin-api.js.map +1 -0
- package/dist/manifest/plugin-loader.d.ts +101 -0
- package/dist/manifest/plugin-loader.d.ts.map +1 -0
- package/dist/manifest/plugin-loader.js +332 -0
- package/dist/manifest/plugin-loader.js.map +1 -0
- package/dist/manifest/profiling.d.ts +183 -0
- package/dist/manifest/profiling.d.ts.map +1 -0
- package/dist/manifest/profiling.js +186 -0
- package/dist/manifest/profiling.js.map +1 -0
- package/dist/manifest/projections/analytics/generator.d.ts +27 -0
- package/dist/manifest/projections/analytics/generator.d.ts.map +1 -0
- package/dist/manifest/projections/analytics/generator.js +686 -0
- package/dist/manifest/projections/analytics/generator.js.map +1 -0
- package/dist/manifest/projections/analytics/types.d.ts +46 -0
- package/dist/manifest/projections/analytics/types.d.ts.map +1 -0
- package/dist/manifest/projections/analytics/types.js +8 -0
- package/dist/manifest/projections/analytics/types.js.map +1 -0
- package/dist/manifest/projections/builtins.d.ts +29 -0
- package/dist/manifest/projections/builtins.d.ts.map +1 -0
- package/dist/manifest/projections/builtins.js +143 -0
- package/dist/manifest/projections/builtins.js.map +1 -0
- package/dist/manifest/projections/convex/expression.d.ts +52 -0
- package/dist/manifest/projections/convex/expression.d.ts.map +1 -0
- package/dist/manifest/projections/convex/expression.js +166 -0
- package/dist/manifest/projections/convex/expression.js.map +1 -0
- package/dist/manifest/projections/convex/functions.d.ts +22 -0
- package/dist/manifest/projections/convex/functions.d.ts.map +1 -0
- package/dist/manifest/projections/convex/functions.js +786 -0
- package/dist/manifest/projections/convex/functions.js.map +1 -0
- package/dist/manifest/projections/convex/generator.d.ts +79 -0
- package/dist/manifest/projections/convex/generator.d.ts.map +1 -0
- package/dist/manifest/projections/convex/generator.js +406 -0
- package/dist/manifest/projections/convex/generator.js.map +1 -0
- package/dist/manifest/projections/convex/index.d.ts +10 -0
- package/dist/manifest/projections/convex/index.d.ts.map +1 -0
- package/dist/manifest/projections/convex/index.js +10 -0
- package/dist/manifest/projections/convex/index.js.map +1 -0
- package/dist/manifest/projections/convex/options.d.ts +153 -0
- package/dist/manifest/projections/convex/options.d.ts.map +1 -0
- package/dist/manifest/projections/convex/options.js +60 -0
- package/dist/manifest/projections/convex/options.js.map +1 -0
- package/dist/manifest/projections/convex/orchestration.d.ts +23 -0
- package/dist/manifest/projections/convex/orchestration.d.ts.map +1 -0
- package/dist/manifest/projections/convex/orchestration.js +150 -0
- package/dist/manifest/projections/convex/orchestration.js.map +1 -0
- package/dist/manifest/projections/convex/type-mapping.d.ts +40 -0
- package/dist/manifest/projections/convex/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/convex/type-mapping.js +71 -0
- package/dist/manifest/projections/convex/type-mapping.js.map +1 -0
- package/dist/manifest/projections/dart/generator.d.ts +33 -0
- package/dist/manifest/projections/dart/generator.d.ts.map +1 -0
- package/dist/manifest/projections/dart/generator.js +981 -0
- package/dist/manifest/projections/dart/generator.js.map +1 -0
- package/dist/manifest/projections/dart/types.d.ts +29 -0
- package/dist/manifest/projections/dart/types.d.ts.map +1 -0
- package/dist/manifest/projections/dart/types.js +5 -0
- package/dist/manifest/projections/dart/types.js.map +1 -0
- package/dist/manifest/projections/drizzle/generator.d.ts +27 -0
- package/dist/manifest/projections/drizzle/generator.d.ts.map +1 -0
- package/dist/manifest/projections/drizzle/generator.js +654 -0
- package/dist/manifest/projections/drizzle/generator.js.map +1 -0
- package/dist/manifest/projections/drizzle/index.d.ts +12 -0
- package/dist/manifest/projections/drizzle/index.d.ts.map +1 -0
- package/dist/manifest/projections/drizzle/index.js +12 -0
- package/dist/manifest/projections/drizzle/index.js.map +1 -0
- package/dist/manifest/projections/drizzle/options.d.ts +94 -0
- package/dist/manifest/projections/drizzle/options.d.ts.map +1 -0
- package/dist/manifest/projections/drizzle/options.js +31 -0
- package/dist/manifest/projections/drizzle/options.js.map +1 -0
- package/dist/manifest/projections/drizzle/type-mapping.d.ts +74 -0
- package/dist/manifest/projections/drizzle/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/drizzle/type-mapping.js +101 -0
- package/dist/manifest/projections/drizzle/type-mapping.js.map +1 -0
- package/dist/manifest/projections/dynamodb/generator.d.ts +48 -0
- package/dist/manifest/projections/dynamodb/generator.d.ts.map +1 -0
- package/dist/manifest/projections/dynamodb/generator.js +341 -0
- package/dist/manifest/projections/dynamodb/generator.js.map +1 -0
- package/dist/manifest/projections/elasticsearch/generator.d.ts +44 -0
- package/dist/manifest/projections/elasticsearch/generator.d.ts.map +1 -0
- package/dist/manifest/projections/elasticsearch/generator.js +613 -0
- package/dist/manifest/projections/elasticsearch/generator.js.map +1 -0
- package/dist/manifest/projections/elasticsearch/options.d.ts +56 -0
- package/dist/manifest/projections/elasticsearch/options.d.ts.map +1 -0
- package/dist/manifest/projections/elasticsearch/options.js +37 -0
- package/dist/manifest/projections/elasticsearch/options.js.map +1 -0
- package/dist/manifest/projections/elasticsearch/type-mapping.d.ts +30 -0
- package/dist/manifest/projections/elasticsearch/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/elasticsearch/type-mapping.js +34 -0
- package/dist/manifest/projections/elasticsearch/type-mapping.js.map +1 -0
- package/dist/manifest/projections/elasticsearch/types.d.ts +81 -0
- package/dist/manifest/projections/elasticsearch/types.d.ts.map +1 -0
- package/dist/manifest/projections/elasticsearch/types.js +10 -0
- package/dist/manifest/projections/elasticsearch/types.js.map +1 -0
- package/dist/manifest/projections/express/generator.d.ts +38 -0
- package/dist/manifest/projections/express/generator.d.ts.map +1 -0
- package/dist/manifest/projections/express/generator.js +620 -0
- package/dist/manifest/projections/express/generator.js.map +1 -0
- package/dist/manifest/projections/express/index.d.ts +8 -0
- package/dist/manifest/projections/express/index.d.ts.map +1 -0
- package/dist/manifest/projections/express/index.js +7 -0
- package/dist/manifest/projections/express/index.js.map +1 -0
- package/dist/manifest/projections/express/types.d.ts +92 -0
- package/dist/manifest/projections/express/types.d.ts.map +1 -0
- package/dist/manifest/projections/express/types.js +9 -0
- package/dist/manifest/projections/express/types.js.map +1 -0
- package/dist/manifest/projections/graphql/generator.d.ts +43 -0
- package/dist/manifest/projections/graphql/generator.d.ts.map +1 -0
- package/dist/manifest/projections/graphql/generator.js +662 -0
- package/dist/manifest/projections/graphql/generator.js.map +1 -0
- package/dist/manifest/projections/graphql/index.d.ts +11 -0
- package/dist/manifest/projections/graphql/index.d.ts.map +1 -0
- package/dist/manifest/projections/graphql/index.js +10 -0
- package/dist/manifest/projections/graphql/index.js.map +1 -0
- package/dist/manifest/projections/graphql/types.d.ts +69 -0
- package/dist/manifest/projections/graphql/types.d.ts.map +1 -0
- package/dist/manifest/projections/graphql/types.js +9 -0
- package/dist/manifest/projections/graphql/types.js.map +1 -0
- package/dist/manifest/projections/health/generator.d.ts +36 -0
- package/dist/manifest/projections/health/generator.d.ts.map +1 -0
- package/dist/manifest/projections/health/generator.js +355 -0
- package/dist/manifest/projections/health/generator.js.map +1 -0
- package/dist/manifest/projections/health/types.d.ts +67 -0
- package/dist/manifest/projections/health/types.d.ts.map +1 -0
- package/dist/manifest/projections/health/types.js +28 -0
- package/dist/manifest/projections/health/types.js.map +1 -0
- package/dist/manifest/projections/hono/generator.d.ts +36 -0
- package/dist/manifest/projections/hono/generator.d.ts.map +1 -0
- package/dist/manifest/projections/hono/generator.js +578 -0
- package/dist/manifest/projections/hono/generator.js.map +1 -0
- package/dist/manifest/projections/hono/types.d.ts +86 -0
- package/dist/manifest/projections/hono/types.d.ts.map +1 -0
- package/dist/manifest/projections/hono/types.js +10 -0
- package/dist/manifest/projections/hono/types.js.map +1 -0
- package/dist/manifest/projections/index.d.ts +58 -0
- package/dist/manifest/projections/index.d.ts.map +1 -0
- package/dist/manifest/projections/index.js +41 -0
- package/dist/manifest/projections/index.js.map +1 -0
- package/dist/manifest/projections/interface.d.ts +285 -0
- package/dist/manifest/projections/interface.d.ts.map +1 -0
- package/dist/manifest/projections/interface.js +8 -0
- package/dist/manifest/projections/interface.js.map +1 -0
- package/dist/manifest/projections/jsonschema/generator.d.ts +35 -0
- package/dist/manifest/projections/jsonschema/generator.d.ts.map +1 -0
- package/dist/manifest/projections/jsonschema/generator.js +347 -0
- package/dist/manifest/projections/jsonschema/generator.js.map +1 -0
- package/dist/manifest/projections/jsonschema/index.d.ts +3 -0
- package/dist/manifest/projections/jsonschema/index.d.ts.map +1 -0
- package/dist/manifest/projections/jsonschema/index.js +2 -0
- package/dist/manifest/projections/jsonschema/index.js.map +1 -0
- package/dist/manifest/projections/jsonschema/types.d.ts +31 -0
- package/dist/manifest/projections/jsonschema/types.d.ts.map +1 -0
- package/dist/manifest/projections/jsonschema/types.js +2 -0
- package/dist/manifest/projections/jsonschema/types.js.map +1 -0
- package/dist/manifest/projections/kysely/generator.d.ts +36 -0
- package/dist/manifest/projections/kysely/generator.d.ts.map +1 -0
- package/dist/manifest/projections/kysely/generator.js +325 -0
- package/dist/manifest/projections/kysely/generator.js.map +1 -0
- package/dist/manifest/projections/kysely/index.d.ts +4 -0
- package/dist/manifest/projections/kysely/index.d.ts.map +1 -0
- package/dist/manifest/projections/kysely/index.js +2 -0
- package/dist/manifest/projections/kysely/index.js.map +1 -0
- package/dist/manifest/projections/kysely/options.d.ts +61 -0
- package/dist/manifest/projections/kysely/options.d.ts.map +1 -0
- package/dist/manifest/projections/kysely/options.js +31 -0
- package/dist/manifest/projections/kysely/options.js.map +1 -0
- package/dist/manifest/projections/kysely/type-mapping.d.ts +61 -0
- package/dist/manifest/projections/kysely/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/kysely/type-mapping.js +84 -0
- package/dist/manifest/projections/kysely/type-mapping.js.map +1 -0
- package/dist/manifest/projections/llm-context/generator.d.ts +24 -0
- package/dist/manifest/projections/llm-context/generator.d.ts.map +1 -0
- package/dist/manifest/projections/llm-context/generator.js +371 -0
- package/dist/manifest/projections/llm-context/generator.js.map +1 -0
- package/dist/manifest/projections/llm-context/types.d.ts +205 -0
- package/dist/manifest/projections/llm-context/types.d.ts.map +1 -0
- package/dist/manifest/projections/llm-context/types.js +9 -0
- package/dist/manifest/projections/llm-context/types.js.map +1 -0
- package/dist/manifest/projections/materialized-views/expression-to-sql.d.ts +29 -0
- package/dist/manifest/projections/materialized-views/expression-to-sql.d.ts.map +1 -0
- package/dist/manifest/projections/materialized-views/expression-to-sql.js +211 -0
- package/dist/manifest/projections/materialized-views/expression-to-sql.js.map +1 -0
- package/dist/manifest/projections/materialized-views/generator.d.ts +29 -0
- package/dist/manifest/projections/materialized-views/generator.d.ts.map +1 -0
- package/dist/manifest/projections/materialized-views/generator.js +263 -0
- package/dist/manifest/projections/materialized-views/generator.js.map +1 -0
- package/dist/manifest/projections/materialized-views/options.d.ts +59 -0
- package/dist/manifest/projections/materialized-views/options.d.ts.map +1 -0
- package/dist/manifest/projections/materialized-views/options.js +34 -0
- package/dist/manifest/projections/materialized-views/options.js.map +1 -0
- package/dist/manifest/projections/materialized-views/types.d.ts +100 -0
- package/dist/manifest/projections/materialized-views/types.d.ts.map +1 -0
- package/dist/manifest/projections/materialized-views/types.js +11 -0
- package/dist/manifest/projections/materialized-views/types.js.map +1 -0
- package/dist/manifest/projections/mermaid/generator.d.ts +46 -0
- package/dist/manifest/projections/mermaid/generator.d.ts.map +1 -0
- package/dist/manifest/projections/mermaid/generator.js +436 -0
- package/dist/manifest/projections/mermaid/generator.js.map +1 -0
- package/dist/manifest/projections/mongoose/options.d.ts +30 -0
- package/dist/manifest/projections/mongoose/options.d.ts.map +1 -0
- package/dist/manifest/projections/mongoose/options.js +18 -0
- package/dist/manifest/projections/mongoose/options.js.map +1 -0
- package/dist/manifest/projections/mongoose/type-mapping.d.ts +42 -0
- package/dist/manifest/projections/mongoose/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/mongoose/type-mapping.js +64 -0
- package/dist/manifest/projections/mongoose/type-mapping.js.map +1 -0
- package/dist/manifest/projections/nextjs/defaults.d.ts +161 -0
- package/dist/manifest/projections/nextjs/defaults.d.ts.map +1 -0
- package/dist/manifest/projections/nextjs/defaults.js +157 -0
- package/dist/manifest/projections/nextjs/defaults.js.map +1 -0
- package/dist/manifest/projections/nextjs/generator.d.ts +78 -0
- package/dist/manifest/projections/nextjs/generator.d.ts.map +1 -0
- package/dist/manifest/projections/nextjs/generator.js +1339 -0
- package/dist/manifest/projections/nextjs/generator.js.map +1 -0
- package/dist/manifest/projections/nextjs/schedule-generator.d.ts +10 -0
- package/dist/manifest/projections/nextjs/schedule-generator.d.ts.map +1 -0
- package/dist/manifest/projections/nextjs/schedule-generator.js +54 -0
- package/dist/manifest/projections/nextjs/schedule-generator.js.map +1 -0
- package/dist/manifest/projections/openapi/generator.d.ts +37 -0
- package/dist/manifest/projections/openapi/generator.d.ts.map +1 -0
- package/dist/manifest/projections/openapi/generator.js +690 -0
- package/dist/manifest/projections/openapi/generator.js.map +1 -0
- package/dist/manifest/projections/openapi/index.d.ts +11 -0
- package/dist/manifest/projections/openapi/index.d.ts.map +1 -0
- package/dist/manifest/projections/openapi/index.js +10 -0
- package/dist/manifest/projections/openapi/index.js.map +1 -0
- package/dist/manifest/projections/openapi/types.d.ts +75 -0
- package/dist/manifest/projections/openapi/types.d.ts.map +1 -0
- package/dist/manifest/projections/openapi/types.js +9 -0
- package/dist/manifest/projections/openapi/types.js.map +1 -0
- package/dist/manifest/projections/prisma/generator.d.ts +32 -0
- package/dist/manifest/projections/prisma/generator.d.ts.map +1 -0
- package/dist/manifest/projections/prisma/generator.js +861 -0
- package/dist/manifest/projections/prisma/generator.js.map +1 -0
- package/dist/manifest/projections/prisma/index.d.ts +12 -0
- package/dist/manifest/projections/prisma/index.d.ts.map +1 -0
- package/dist/manifest/projections/prisma/index.js +12 -0
- package/dist/manifest/projections/prisma/index.js.map +1 -0
- package/dist/manifest/projections/prisma/options.d.ts +243 -0
- package/dist/manifest/projections/prisma/options.d.ts.map +1 -0
- package/dist/manifest/projections/prisma/options.js +59 -0
- package/dist/manifest/projections/prisma/options.js.map +1 -0
- package/dist/manifest/projections/prisma/type-mapping.d.ts +60 -0
- package/dist/manifest/projections/prisma/type-mapping.d.ts.map +1 -0
- package/dist/manifest/projections/prisma/type-mapping.js +95 -0
- package/dist/manifest/projections/prisma/type-mapping.js.map +1 -0
- package/dist/manifest/projections/prisma-store/generator.d.ts +12 -0
- package/dist/manifest/projections/prisma-store/generator.d.ts.map +1 -0
- package/dist/manifest/projections/prisma-store/generator.js +52 -0
- package/dist/manifest/projections/prisma-store/generator.js.map +1 -0
- package/dist/manifest/projections/prisma-store/metadata-builder.d.ts +11 -0
- package/dist/manifest/projections/prisma-store/metadata-builder.d.ts.map +1 -0
- package/dist/manifest/projections/prisma-store/metadata-builder.js +183 -0
- package/dist/manifest/projections/prisma-store/metadata-builder.js.map +1 -0
- package/dist/manifest/projections/prisma-store/options.d.ts +31 -0
- package/dist/manifest/projections/prisma-store/options.d.ts.map +1 -0
- package/dist/manifest/projections/prisma-store/options.js +21 -0
- package/dist/manifest/projections/prisma-store/options.js.map +1 -0
- package/dist/manifest/projections/prisma-store/persistence.d.ts +4 -0
- package/dist/manifest/projections/prisma-store/persistence.d.ts.map +1 -0
- package/dist/manifest/projections/prisma-store/persistence.js +24 -0
- package/dist/manifest/projections/prisma-store/persistence.js.map +1 -0
- package/dist/manifest/projections/pydantic/generator.d.ts +27 -0
- package/dist/manifest/projections/pydantic/generator.d.ts.map +1 -0
- package/dist/manifest/projections/pydantic/generator.js +798 -0
- package/dist/manifest/projections/pydantic/generator.js.map +1 -0
- package/dist/manifest/projections/pydantic/types.d.ts +32 -0
- package/dist/manifest/projections/pydantic/types.d.ts.map +1 -0
- package/dist/manifest/projections/pydantic/types.js +5 -0
- package/dist/manifest/projections/pydantic/types.js.map +1 -0
- package/dist/manifest/projections/react-query/generator.d.ts +87 -0
- package/dist/manifest/projections/react-query/generator.d.ts.map +1 -0
- package/dist/manifest/projections/react-query/generator.js +413 -0
- package/dist/manifest/projections/react-query/generator.js.map +1 -0
- package/dist/manifest/projections/registry.d.ts +59 -0
- package/dist/manifest/projections/registry.d.ts.map +1 -0
- package/dist/manifest/projections/registry.js +110 -0
- package/dist/manifest/projections/registry.js.map +1 -0
- package/dist/manifest/projections/remix/generator.d.ts +58 -0
- package/dist/manifest/projections/remix/generator.d.ts.map +1 -0
- package/dist/manifest/projections/remix/generator.js +788 -0
- package/dist/manifest/projections/remix/generator.js.map +1 -0
- package/dist/manifest/projections/routes/generator.d.ts +32 -0
- package/dist/manifest/projections/routes/generator.d.ts.map +1 -0
- package/dist/manifest/projections/routes/generator.js +401 -0
- package/dist/manifest/projections/routes/generator.js.map +1 -0
- package/dist/manifest/projections/routes/types.d.ts +104 -0
- package/dist/manifest/projections/routes/types.d.ts.map +1 -0
- package/dist/manifest/projections/routes/types.js +11 -0
- package/dist/manifest/projections/routes/types.js.map +1 -0
- package/dist/manifest/projections/shared/naming.d.ts +64 -0
- package/dist/manifest/projections/shared/naming.d.ts.map +1 -0
- package/dist/manifest/projections/shared/naming.js +138 -0
- package/dist/manifest/projections/shared/naming.js.map +1 -0
- package/dist/manifest/projections/storybook/generator.d.ts +38 -0
- package/dist/manifest/projections/storybook/generator.d.ts.map +1 -0
- package/dist/manifest/projections/storybook/generator.js +462 -0
- package/dist/manifest/projections/storybook/generator.js.map +1 -0
- package/dist/manifest/projections/sveltekit/generator.d.ts +64 -0
- package/dist/manifest/projections/sveltekit/generator.d.ts.map +1 -0
- package/dist/manifest/projections/sveltekit/generator.js +1043 -0
- package/dist/manifest/projections/sveltekit/generator.js.map +1 -0
- package/dist/manifest/projections/sveltekit/index.d.ts +11 -0
- package/dist/manifest/projections/sveltekit/index.d.ts.map +1 -0
- package/dist/manifest/projections/sveltekit/index.js +10 -0
- package/dist/manifest/projections/sveltekit/index.js.map +1 -0
- package/dist/manifest/projections/sveltekit/types.d.ts +122 -0
- package/dist/manifest/projections/sveltekit/types.d.ts.map +1 -0
- package/dist/manifest/projections/sveltekit/types.js +10 -0
- package/dist/manifest/projections/sveltekit/types.js.map +1 -0
- package/dist/manifest/projections/terraform/generator.d.ts +29 -0
- package/dist/manifest/projections/terraform/generator.d.ts.map +1 -0
- package/dist/manifest/projections/terraform/generator.js +722 -0
- package/dist/manifest/projections/terraform/generator.js.map +1 -0
- package/dist/manifest/projections/terraform/index.d.ts +7 -0
- package/dist/manifest/projections/terraform/index.d.ts.map +1 -0
- package/dist/manifest/projections/terraform/index.js +7 -0
- package/dist/manifest/projections/terraform/index.js.map +1 -0
- package/dist/manifest/projections/terraform/options.d.ts +92 -0
- package/dist/manifest/projections/terraform/options.d.ts.map +1 -0
- package/dist/manifest/projections/terraform/options.js +37 -0
- package/dist/manifest/projections/terraform/options.js.map +1 -0
- package/dist/manifest/projections/terraform/types.d.ts +55 -0
- package/dist/manifest/projections/terraform/types.d.ts.map +1 -0
- package/dist/manifest/projections/terraform/types.js +38 -0
- package/dist/manifest/projections/terraform/types.js.map +1 -0
- package/dist/manifest/projections/zod/generator.d.ts +27 -0
- package/dist/manifest/projections/zod/generator.d.ts.map +1 -0
- package/dist/manifest/projections/zod/generator.js +367 -0
- package/dist/manifest/projections/zod/generator.js.map +1 -0
- package/dist/manifest/projections/zod/index.d.ts +8 -0
- package/dist/manifest/projections/zod/index.d.ts.map +1 -0
- package/dist/manifest/projections/zod/index.js +7 -0
- package/dist/manifest/projections/zod/index.js.map +1 -0
- package/dist/manifest/projections/zod/types.d.ts +14 -0
- package/dist/manifest/projections/zod/types.d.ts.map +1 -0
- package/dist/manifest/projections/zod/types.js +5 -0
- package/dist/manifest/projections/zod/types.js.map +1 -0
- package/dist/manifest/reaction-completeness-checks.d.ts +11 -0
- package/dist/manifest/reaction-completeness-checks.d.ts.map +1 -0
- package/dist/manifest/reaction-completeness-checks.js +106 -0
- package/dist/manifest/reaction-completeness-checks.js.map +1 -0
- package/dist/manifest/reaction-completeness.d.ts +9 -0
- package/dist/manifest/reaction-completeness.d.ts.map +1 -0
- package/dist/manifest/reaction-completeness.js +35 -0
- package/dist/manifest/reaction-completeness.js.map +1 -0
- package/dist/manifest/registry/emit.d.ts +53 -0
- package/dist/manifest/registry/emit.d.ts.map +1 -0
- package/dist/manifest/registry/emit.js +96 -0
- package/dist/manifest/registry/emit.js.map +1 -0
- package/dist/manifest/runtime-command-extensions.d.ts +21 -0
- package/dist/manifest/runtime-command-extensions.d.ts.map +1 -0
- package/dist/manifest/runtime-command-extensions.js +136 -0
- package/dist/manifest/runtime-command-extensions.js.map +1 -0
- package/dist/manifest/runtime-engine.d.ts +1019 -0
- package/dist/manifest/runtime-engine.d.ts.map +1 -0
- package/dist/manifest/runtime-engine.js +3872 -0
- package/dist/manifest/runtime-engine.js.map +1 -0
- package/dist/manifest/runtime-profiling-bridge.d.ts +22 -0
- package/dist/manifest/runtime-profiling-bridge.d.ts.map +1 -0
- package/dist/manifest/runtime-profiling-bridge.js +69 -0
- package/dist/manifest/runtime-profiling-bridge.js.map +1 -0
- package/dist/manifest/runtime-rate-limit.d.ts +52 -0
- package/dist/manifest/runtime-rate-limit.d.ts.map +1 -0
- package/dist/manifest/runtime-rate-limit.js +70 -0
- package/dist/manifest/runtime-rate-limit.js.map +1 -0
- package/dist/manifest/runtime-retry.d.ts +68 -0
- package/dist/manifest/runtime-retry.d.ts.map +1 -0
- package/dist/manifest/runtime-retry.js +93 -0
- package/dist/manifest/runtime-retry.js.map +1 -0
- package/dist/manifest/runtime-schedule.d.ts +47 -0
- package/dist/manifest/runtime-schedule.d.ts.map +1 -0
- package/dist/manifest/runtime-schedule.js +95 -0
- package/dist/manifest/runtime-schedule.js.map +1 -0
- package/dist/manifest/schedule-utils.d.ts +15 -0
- package/dist/manifest/schedule-utils.d.ts.map +1 -0
- package/dist/manifest/schedule-utils.js +82 -0
- package/dist/manifest/schedule-utils.js.map +1 -0
- package/dist/manifest/standalone-generator.d.ts +32 -0
- package/dist/manifest/standalone-generator.d.ts.map +1 -0
- package/dist/manifest/standalone-generator.js +596 -0
- package/dist/manifest/standalone-generator.js.map +1 -0
- package/dist/manifest/stores/prisma-generic/coercion.d.ts +17 -0
- package/dist/manifest/stores/prisma-generic/coercion.d.ts.map +1 -0
- package/dist/manifest/stores/prisma-generic/coercion.js +83 -0
- package/dist/manifest/stores/prisma-generic/coercion.js.map +1 -0
- package/dist/manifest/stores/prisma-generic/index.d.ts +3 -0
- package/dist/manifest/stores/prisma-generic/index.d.ts.map +1 -0
- package/dist/manifest/stores/prisma-generic/index.js +2 -0
- package/dist/manifest/stores/prisma-generic/index.js.map +1 -0
- package/dist/manifest/stores/prisma-generic/store.d.ts +35 -0
- package/dist/manifest/stores/prisma-generic/store.d.ts.map +1 -0
- package/dist/manifest/stores/prisma-generic/store.js +216 -0
- package/dist/manifest/stores/prisma-generic/store.js.map +1 -0
- package/dist/manifest/stores/prisma-generic/types.d.ts +46 -0
- package/dist/manifest/stores/prisma-generic/types.d.ts.map +1 -0
- package/dist/manifest/stores/prisma-generic/types.js +6 -0
- package/dist/manifest/stores/prisma-generic/types.js.map +1 -0
- package/dist/manifest/stores.node.d.ts +248 -0
- package/dist/manifest/stores.node.d.ts.map +1 -0
- package/dist/manifest/stores.node.js +718 -0
- package/dist/manifest/stores.node.js.map +1 -0
- package/dist/manifest/test/postgres-live-env.d.ts +9 -0
- package/dist/manifest/test/postgres-live-env.d.ts.map +1 -0
- package/dist/manifest/test/postgres-live-env.js +14 -0
- package/dist/manifest/test/postgres-live-env.js.map +1 -0
- package/dist/manifest/types.d.ts +570 -0
- package/dist/manifest/types.d.ts.map +1 -0
- package/dist/manifest/types.js +2 -0
- package/dist/manifest/types.js.map +1 -0
- package/dist/manifest/version.d.ts +15 -0
- package/dist/manifest/version.d.ts.map +1 -0
- package/dist/manifest/version.js +15 -0
- package/dist/manifest/version.js.map +1 -0
- package/dist/manifest/wasm/index.d.ts +15 -0
- package/dist/manifest/wasm/index.d.ts.map +1 -0
- package/dist/manifest/wasm/index.js +15 -0
- package/dist/manifest/wasm/index.js.map +1 -0
- package/dist/manifest/wasm/wasm-evaluator.d.ts +93 -0
- package/dist/manifest/wasm/wasm-evaluator.d.ts.map +1 -0
- package/dist/manifest/wasm/wasm-evaluator.js +242 -0
- package/dist/manifest/wasm/wasm-evaluator.js.map +1 -0
- package/dist/manifest/wasm/wasm-loader.d.ts +56 -0
- package/dist/manifest/wasm/wasm-loader.d.ts.map +1 -0
- package/dist/manifest/wasm/wasm-loader.js +132 -0
- package/dist/manifest/wasm/wasm-loader.js.map +1 -0
- package/docs/spec/config/manifest.config.schema.json +737 -0
- package/docs/spec/config/prisma-projection.schema.json +173 -0
- package/docs/spec/ir/ir-v1.schema.json +2033 -0
- package/docs/spec/plugins/plugin.schema.json +104 -0
- package/docs/spec/registry/bypasses.schema.json +87 -0
- package/docs/spec/registry/commands.schema.json +61 -0
- package/docs/spec/registry/entities.schema.json +52 -0
- package/docs/spec/semantics.md +630 -0
- package/package.json +356 -0
- package/packages/cli/dist/audit/bypass-violations.d.ts +16 -0
- package/packages/cli/dist/audit/bypass-violations.d.ts.map +1 -0
- package/packages/cli/dist/audit/bypass-violations.js +98 -0
- package/packages/cli/dist/audit/bypass-violations.js.map +1 -0
- package/packages/cli/dist/audit/direct-writes.d.ts +15 -0
- package/packages/cli/dist/audit/direct-writes.d.ts.map +1 -0
- package/packages/cli/dist/audit/direct-writes.js +86 -0
- package/packages/cli/dist/audit/direct-writes.js.map +1 -0
- package/packages/cli/dist/audit/event-fabrication.d.ts +17 -0
- package/packages/cli/dist/audit/event-fabrication.d.ts.map +1 -0
- package/packages/cli/dist/audit/event-fabrication.js +101 -0
- package/packages/cli/dist/audit/event-fabrication.js.map +1 -0
- package/packages/cli/dist/audit/existing-command-available.d.ts +20 -0
- package/packages/cli/dist/audit/existing-command-available.d.ts.map +1 -0
- package/packages/cli/dist/audit/existing-command-available.js +158 -0
- package/packages/cli/dist/audit/existing-command-available.js.map +1 -0
- package/packages/cli/dist/audit/missing-tests.d.ts +17 -0
- package/packages/cli/dist/audit/missing-tests.d.ts.map +1 -0
- package/packages/cli/dist/audit/missing-tests.js +108 -0
- package/packages/cli/dist/audit/missing-tests.js.map +1 -0
- package/packages/cli/dist/audit/route-drift.d.ts +16 -0
- package/packages/cli/dist/audit/route-drift.d.ts.map +1 -0
- package/packages/cli/dist/audit/route-drift.js +86 -0
- package/packages/cli/dist/audit/route-drift.js.map +1 -0
- package/packages/cli/dist/audit/types.d.ts +63 -0
- package/packages/cli/dist/audit/types.d.ts.map +1 -0
- package/packages/cli/dist/audit/types.js +10 -0
- package/packages/cli/dist/audit/types.js.map +1 -0
- package/packages/cli/dist/audit/unregistered-command-call.d.ts +25 -0
- package/packages/cli/dist/audit/unregistered-command-call.d.ts.map +1 -0
- package/packages/cli/dist/audit/unregistered-command-call.js +196 -0
- package/packages/cli/dist/audit/unregistered-command-call.js.map +1 -0
- package/packages/cli/dist/audit/unregistered-entity-write.d.ts +16 -0
- package/packages/cli/dist/audit/unregistered-entity-write.d.ts.map +1 -0
- package/packages/cli/dist/audit/unregistered-entity-write.js +96 -0
- package/packages/cli/dist/audit/unregistered-entity-write.js.map +1 -0
- package/packages/cli/dist/audit/write-receiver.d.ts +23 -0
- package/packages/cli/dist/audit/write-receiver.d.ts.map +1 -0
- package/packages/cli/dist/audit/write-receiver.js +32 -0
- package/packages/cli/dist/audit/write-receiver.js.map +1 -0
- package/packages/cli/dist/checks/dispatcher-presence.d.ts +37 -0
- package/packages/cli/dist/checks/dispatcher-presence.d.ts.map +1 -0
- package/packages/cli/dist/checks/dispatcher-presence.js +57 -0
- package/packages/cli/dist/checks/dispatcher-presence.js.map +1 -0
- package/packages/cli/dist/checks/package-shape.d.ts +81 -0
- package/packages/cli/dist/checks/package-shape.d.ts.map +1 -0
- package/packages/cli/dist/checks/package-shape.js +359 -0
- package/packages/cli/dist/checks/package-shape.js.map +1 -0
- package/packages/cli/dist/checks/runtime-smoke.d.ts +42 -0
- package/packages/cli/dist/checks/runtime-smoke.d.ts.map +1 -0
- package/packages/cli/dist/checks/runtime-smoke.js +167 -0
- package/packages/cli/dist/checks/runtime-smoke.js.map +1 -0
- package/packages/cli/dist/commands/analyze.d.ts +97 -0
- package/packages/cli/dist/commands/analyze.d.ts.map +1 -0
- package/packages/cli/dist/commands/analyze.js +411 -0
- package/packages/cli/dist/commands/analyze.js.map +1 -0
- package/packages/cli/dist/commands/audit-bypasses.d.ts +31 -0
- package/packages/cli/dist/commands/audit-bypasses.d.ts.map +1 -0
- package/packages/cli/dist/commands/audit-bypasses.js +152 -0
- package/packages/cli/dist/commands/audit-bypasses.js.map +1 -0
- package/packages/cli/dist/commands/audit-constitution.d.ts +20 -0
- package/packages/cli/dist/commands/audit-constitution.d.ts.map +1 -0
- package/packages/cli/dist/commands/audit-constitution.js +18 -0
- package/packages/cli/dist/commands/audit-constitution.js.map +1 -0
- package/packages/cli/dist/commands/audit-governance.d.ts +37 -0
- package/packages/cli/dist/commands/audit-governance.d.ts.map +1 -0
- package/packages/cli/dist/commands/audit-governance.js +78 -0
- package/packages/cli/dist/commands/audit-governance.js.map +1 -0
- package/packages/cli/dist/commands/audit-routes.d.ts +135 -0
- package/packages/cli/dist/commands/audit-routes.d.ts.map +1 -0
- package/packages/cli/dist/commands/audit-routes.js +514 -0
- package/packages/cli/dist/commands/audit-routes.js.map +1 -0
- package/packages/cli/dist/commands/breaking-change.d.ts +15 -0
- package/packages/cli/dist/commands/breaking-change.d.ts.map +1 -0
- package/packages/cli/dist/commands/breaking-change.js +150 -0
- package/packages/cli/dist/commands/breaking-change.js.map +1 -0
- package/packages/cli/dist/commands/build.d.ts +26 -0
- package/packages/cli/dist/commands/build.d.ts.map +1 -0
- package/packages/cli/dist/commands/build.js +58 -0
- package/packages/cli/dist/commands/build.js.map +1 -0
- package/packages/cli/dist/commands/changelog.d.ts +26 -0
- package/packages/cli/dist/commands/changelog.d.ts.map +1 -0
- package/packages/cli/dist/commands/changelog.js +365 -0
- package/packages/cli/dist/commands/changelog.js.map +1 -0
- package/packages/cli/dist/commands/check.d.ts +21 -0
- package/packages/cli/dist/commands/check.d.ts.map +1 -0
- package/packages/cli/dist/commands/check.js +31 -0
- package/packages/cli/dist/commands/check.js.map +1 -0
- package/packages/cli/dist/commands/compile.d.ts +19 -0
- package/packages/cli/dist/commands/compile.d.ts.map +1 -0
- package/packages/cli/dist/commands/compile.js +325 -0
- package/packages/cli/dist/commands/compile.js.map +1 -0
- package/packages/cli/dist/commands/config.d.ts +23 -0
- package/packages/cli/dist/commands/config.d.ts.map +1 -0
- package/packages/cli/dist/commands/config.js +172 -0
- package/packages/cli/dist/commands/config.js.map +1 -0
- package/packages/cli/dist/commands/coverage.d.ts +55 -0
- package/packages/cli/dist/commands/coverage.d.ts.map +1 -0
- package/packages/cli/dist/commands/coverage.js +343 -0
- package/packages/cli/dist/commands/coverage.js.map +1 -0
- package/packages/cli/dist/commands/diagram.d.ts +22 -0
- package/packages/cli/dist/commands/diagram.d.ts.map +1 -0
- package/packages/cli/dist/commands/diagram.js +176 -0
- package/packages/cli/dist/commands/diagram.js.map +1 -0
- package/packages/cli/dist/commands/docs.d.ts +18 -0
- package/packages/cli/dist/commands/docs.d.ts.map +1 -0
- package/packages/cli/dist/commands/docs.js +722 -0
- package/packages/cli/dist/commands/docs.js.map +1 -0
- package/packages/cli/dist/commands/doctor-lib.d.ts +147 -0
- package/packages/cli/dist/commands/doctor-lib.d.ts.map +1 -0
- package/packages/cli/dist/commands/doctor-lib.js +491 -0
- package/packages/cli/dist/commands/doctor-lib.js.map +1 -0
- package/packages/cli/dist/commands/doctor.d.ts +31 -0
- package/packages/cli/dist/commands/doctor.d.ts.map +1 -0
- package/packages/cli/dist/commands/doctor.js +628 -0
- package/packages/cli/dist/commands/doctor.js.map +1 -0
- package/packages/cli/dist/commands/emit-registries.d.ts +33 -0
- package/packages/cli/dist/commands/emit-registries.d.ts.map +1 -0
- package/packages/cli/dist/commands/emit-registries.js +109 -0
- package/packages/cli/dist/commands/emit-registries.js.map +1 -0
- package/packages/cli/dist/commands/enforce-surface.d.ts +62 -0
- package/packages/cli/dist/commands/enforce-surface.d.ts.map +1 -0
- package/packages/cli/dist/commands/enforce-surface.js +172 -0
- package/packages/cli/dist/commands/enforce-surface.js.map +1 -0
- package/packages/cli/dist/commands/fmt.d.ts +17 -0
- package/packages/cli/dist/commands/fmt.d.ts.map +1 -0
- package/packages/cli/dist/commands/fmt.js +129 -0
- package/packages/cli/dist/commands/fmt.js.map +1 -0
- package/packages/cli/dist/commands/gen-tests.d.ts +41 -0
- package/packages/cli/dist/commands/gen-tests.d.ts.map +1 -0
- package/packages/cli/dist/commands/gen-tests.js +370 -0
- package/packages/cli/dist/commands/gen-tests.js.map +1 -0
- package/packages/cli/dist/commands/generate-from-prompt.d.ts +34 -0
- package/packages/cli/dist/commands/generate-from-prompt.d.ts.map +1 -0
- package/packages/cli/dist/commands/generate-from-prompt.js +990 -0
- package/packages/cli/dist/commands/generate-from-prompt.js.map +1 -0
- package/packages/cli/dist/commands/generate.d.ts +36 -0
- package/packages/cli/dist/commands/generate.d.ts.map +1 -0
- package/packages/cli/dist/commands/generate.js +371 -0
- package/packages/cli/dist/commands/generate.js.map +1 -0
- package/packages/cli/dist/commands/harness.d.ts +13 -0
- package/packages/cli/dist/commands/harness.d.ts.map +1 -0
- package/packages/cli/dist/commands/harness.js +276 -0
- package/packages/cli/dist/commands/harness.js.map +1 -0
- package/packages/cli/dist/commands/init-ci.d.ts +19 -0
- package/packages/cli/dist/commands/init-ci.d.ts.map +1 -0
- package/packages/cli/dist/commands/init-ci.js +148 -0
- package/packages/cli/dist/commands/init-ci.js.map +1 -0
- package/packages/cli/dist/commands/init.d.ts +33 -0
- package/packages/cli/dist/commands/init.d.ts.map +1 -0
- package/packages/cli/dist/commands/init.js +157 -0
- package/packages/cli/dist/commands/init.js.map +1 -0
- package/packages/cli/dist/commands/install-hooks.d.ts +29 -0
- package/packages/cli/dist/commands/install-hooks.d.ts.map +1 -0
- package/packages/cli/dist/commands/install-hooks.js +139 -0
- package/packages/cli/dist/commands/install-hooks.js.map +1 -0
- package/packages/cli/dist/commands/integration-check.d.ts +62 -0
- package/packages/cli/dist/commands/integration-check.d.ts.map +1 -0
- package/packages/cli/dist/commands/integration-check.js +298 -0
- package/packages/cli/dist/commands/integration-check.js.map +1 -0
- package/packages/cli/dist/commands/ir-diff.d.ts +8 -0
- package/packages/cli/dist/commands/ir-diff.d.ts.map +1 -0
- package/packages/cli/dist/commands/ir-diff.js +199 -0
- package/packages/cli/dist/commands/ir-diff.js.map +1 -0
- package/packages/cli/dist/commands/lint-routes.d.ts +56 -0
- package/packages/cli/dist/commands/lint-routes.d.ts.map +1 -0
- package/packages/cli/dist/commands/lint-routes.js +228 -0
- package/packages/cli/dist/commands/lint-routes.js.map +1 -0
- package/packages/cli/dist/commands/load-test.d.ts +61 -0
- package/packages/cli/dist/commands/load-test.d.ts.map +1 -0
- package/packages/cli/dist/commands/load-test.js +675 -0
- package/packages/cli/dist/commands/load-test.js.map +1 -0
- package/packages/cli/dist/commands/migrate.d.ts +21 -0
- package/packages/cli/dist/commands/migrate.d.ts.map +1 -0
- package/packages/cli/dist/commands/migrate.js +264 -0
- package/packages/cli/dist/commands/migrate.js.map +1 -0
- package/packages/cli/dist/commands/mock.d.ts +79 -0
- package/packages/cli/dist/commands/mock.d.ts.map +1 -0
- package/packages/cli/dist/commands/mock.js +324 -0
- package/packages/cli/dist/commands/mock.js.map +1 -0
- package/packages/cli/dist/commands/pack-unpack.d.ts +30 -0
- package/packages/cli/dist/commands/pack-unpack.d.ts.map +1 -0
- package/packages/cli/dist/commands/pack-unpack.js +108 -0
- package/packages/cli/dist/commands/pack-unpack.js.map +1 -0
- package/packages/cli/dist/commands/preflight.d.ts +31 -0
- package/packages/cli/dist/commands/preflight.d.ts.map +1 -0
- package/packages/cli/dist/commands/preflight.js +246 -0
- package/packages/cli/dist/commands/preflight.js.map +1 -0
- package/packages/cli/dist/commands/profile.d.ts +30 -0
- package/packages/cli/dist/commands/profile.d.ts.map +1 -0
- package/packages/cli/dist/commands/profile.js +201 -0
- package/packages/cli/dist/commands/profile.js.map +1 -0
- package/packages/cli/dist/commands/repl.d.ts +16 -0
- package/packages/cli/dist/commands/repl.d.ts.map +1 -0
- package/packages/cli/dist/commands/repl.js +772 -0
- package/packages/cli/dist/commands/repl.js.map +1 -0
- package/packages/cli/dist/commands/routes.d.ts +24 -0
- package/packages/cli/dist/commands/routes.d.ts.map +1 -0
- package/packages/cli/dist/commands/routes.js +144 -0
- package/packages/cli/dist/commands/routes.js.map +1 -0
- package/packages/cli/dist/commands/scan.d.ts +23 -0
- package/packages/cli/dist/commands/scan.d.ts.map +1 -0
- package/packages/cli/dist/commands/scan.js +722 -0
- package/packages/cli/dist/commands/scan.js.map +1 -0
- package/packages/cli/dist/commands/seed.d.ts +35 -0
- package/packages/cli/dist/commands/seed.d.ts.map +1 -0
- package/packages/cli/dist/commands/seed.js +503 -0
- package/packages/cli/dist/commands/seed.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-ajv.d.ts +4 -0
- package/packages/cli/dist/commands/validate-ai-ajv.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-ajv.js +78 -0
- package/packages/cli/dist/commands/validate-ai-ajv.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-compiler.d.ts +5 -0
- package/packages/cli/dist/commands/validate-ai-compiler.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-compiler.js +8 -0
- package/packages/cli/dist/commands/validate-ai-compiler.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-report.d.ts +5 -0
- package/packages/cli/dist/commands/validate-ai-report.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-report.js +80 -0
- package/packages/cli/dist/commands/validate-ai-report.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-resolve-inputs.d.ts +6 -0
- package/packages/cli/dist/commands/validate-ai-resolve-inputs.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-resolve-inputs.js +54 -0
- package/packages/cli/dist/commands/validate-ai-resolve-inputs.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-semantic-checks.d.ts +4 -0
- package/packages/cli/dist/commands/validate-ai-semantic-checks.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-semantic-checks.js +218 -0
- package/packages/cli/dist/commands/validate-ai-semantic-checks.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-types.d.ts +41 -0
- package/packages/cli/dist/commands/validate-ai-types.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-types.js +2 -0
- package/packages/cli/dist/commands/validate-ai-types.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai-validate-file.d.ts +5 -0
- package/packages/cli/dist/commands/validate-ai-validate-file.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai-validate-file.js +126 -0
- package/packages/cli/dist/commands/validate-ai-validate-file.js.map +1 -0
- package/packages/cli/dist/commands/validate-ai.d.ts +15 -0
- package/packages/cli/dist/commands/validate-ai.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate-ai.js +124 -0
- package/packages/cli/dist/commands/validate-ai.js.map +1 -0
- package/packages/cli/dist/commands/validate.d.ts +15 -0
- package/packages/cli/dist/commands/validate.d.ts.map +1 -0
- package/packages/cli/dist/commands/validate.js +205 -0
- package/packages/cli/dist/commands/validate.js.map +1 -0
- package/packages/cli/dist/commands/versions.d.ts +56 -0
- package/packages/cli/dist/commands/versions.d.ts.map +1 -0
- package/packages/cli/dist/commands/versions.js +427 -0
- package/packages/cli/dist/commands/versions.js.map +1 -0
- package/packages/cli/dist/commands/watch.d.ts +34 -0
- package/packages/cli/dist/commands/watch.d.ts.map +1 -0
- package/packages/cli/dist/commands/watch.js +253 -0
- package/packages/cli/dist/commands/watch.js.map +1 -0
- package/packages/cli/dist/index.d.ts +14 -0
- package/packages/cli/dist/index.d.ts.map +1 -0
- package/packages/cli/dist/index.js +1159 -0
- package/packages/cli/dist/index.js.map +1 -0
- package/packages/cli/dist/utils/config-validate.d.ts +48 -0
- package/packages/cli/dist/utils/config-validate.d.ts.map +1 -0
- package/packages/cli/dist/utils/config-validate.js +116 -0
- package/packages/cli/dist/utils/config-validate.js.map +1 -0
- package/packages/cli/dist/utils/config.d.ts +360 -0
- package/packages/cli/dist/utils/config.d.ts.map +1 -0
- package/packages/cli/dist/utils/config.js +567 -0
- package/packages/cli/dist/utils/config.js.map +1 -0
- package/packages/cli/dist/utils/schema.d.ts +8 -0
- package/packages/cli/dist/utils/schema.d.ts.map +1 -0
- package/packages/cli/dist/utils/schema.js +13 -0
- package/packages/cli/dist/utils/schema.js.map +1 -0
- package/packages/lsp-server/bin/manifest-lsp.js +3 -0
- package/packages/lsp-server/dist/compiler-bridge.d.ts +24 -0
- package/packages/lsp-server/dist/compiler-bridge.d.ts.map +1 -0
- package/packages/lsp-server/dist/compiler-bridge.js +32 -0
- package/packages/lsp-server/dist/compiler-bridge.js.map +1 -0
- package/packages/lsp-server/dist/document-store.d.ts +23 -0
- package/packages/lsp-server/dist/document-store.d.ts.map +1 -0
- package/packages/lsp-server/dist/document-store.js +40 -0
- package/packages/lsp-server/dist/document-store.js.map +1 -0
- package/packages/lsp-server/dist/features/completion.d.ts +23 -0
- package/packages/lsp-server/dist/features/completion.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/completion.js +293 -0
- package/packages/lsp-server/dist/features/completion.js.map +1 -0
- package/packages/lsp-server/dist/features/definition.d.ts +9 -0
- package/packages/lsp-server/dist/features/definition.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/definition.js +24 -0
- package/packages/lsp-server/dist/features/definition.js.map +1 -0
- package/packages/lsp-server/dist/features/diagnostics.d.ts +8 -0
- package/packages/lsp-server/dist/features/diagnostics.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/diagnostics.js +40 -0
- package/packages/lsp-server/dist/features/diagnostics.js.map +1 -0
- package/packages/lsp-server/dist/features/document-symbols.d.ts +8 -0
- package/packages/lsp-server/dist/features/document-symbols.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/document-symbols.js +164 -0
- package/packages/lsp-server/dist/features/document-symbols.js.map +1 -0
- package/packages/lsp-server/dist/features/hover.d.ts +9 -0
- package/packages/lsp-server/dist/features/hover.d.ts.map +1 -0
- package/packages/lsp-server/dist/features/hover.js +100 -0
- package/packages/lsp-server/dist/features/hover.js.map +1 -0
- package/packages/lsp-server/dist/index.d.ts +6 -0
- package/packages/lsp-server/dist/index.d.ts.map +1 -0
- package/packages/lsp-server/dist/index.js +11 -0
- package/packages/lsp-server/dist/index.js.map +1 -0
- package/packages/lsp-server/dist/position-utils.d.ts +25 -0
- package/packages/lsp-server/dist/position-utils.d.ts.map +1 -0
- package/packages/lsp-server/dist/position-utils.js +39 -0
- package/packages/lsp-server/dist/position-utils.js.map +1 -0
- package/packages/lsp-server/dist/server.d.ts +14 -0
- package/packages/lsp-server/dist/server.d.ts.map +1 -0
- package/packages/lsp-server/dist/server.js +96 -0
- package/packages/lsp-server/dist/server.js.map +1 -0
- package/packages/lsp-server/dist/symbols/builtin-docs.d.ts +34 -0
- package/packages/lsp-server/dist/symbols/builtin-docs.d.ts.map +1 -0
- package/packages/lsp-server/dist/symbols/builtin-docs.js +193 -0
- package/packages/lsp-server/dist/symbols/builtin-docs.js.map +1 -0
- package/packages/lsp-server/dist/symbols/symbol-index.d.ts +18 -0
- package/packages/lsp-server/dist/symbols/symbol-index.d.ts.map +1 -0
- package/packages/lsp-server/dist/symbols/symbol-index.js +107 -0
- package/packages/lsp-server/dist/symbols/symbol-index.js.map +1 -0
- package/packages/mcp-server/bin/manifest-mcp.js +27 -0
- package/packages/mcp-server/dist/index.d.ts +24 -0
- package/packages/mcp-server/dist/index.d.ts.map +1 -0
- package/packages/mcp-server/dist/index.js +36 -0
- package/packages/mcp-server/dist/index.js.map +1 -0
- package/packages/mcp-server/dist/resources/ir-cache.d.ts +9 -0
- package/packages/mcp-server/dist/resources/ir-cache.d.ts.map +1 -0
- package/packages/mcp-server/dist/resources/ir-cache.js +47 -0
- package/packages/mcp-server/dist/resources/ir-cache.js.map +1 -0
- package/packages/mcp-server/dist/resources/ir-schema.d.ts +8 -0
- package/packages/mcp-server/dist/resources/ir-schema.d.ts.map +1 -0
- package/packages/mcp-server/dist/resources/ir-schema.js +39 -0
- package/packages/mcp-server/dist/resources/ir-schema.js.map +1 -0
- package/packages/mcp-server/dist/resources/semantics.d.ts +8 -0
- package/packages/mcp-server/dist/resources/semantics.d.ts.map +1 -0
- package/packages/mcp-server/dist/resources/semantics.js +38 -0
- package/packages/mcp-server/dist/resources/semantics.js.map +1 -0
- package/packages/mcp-server/dist/server.d.ts +7 -0
- package/packages/mcp-server/dist/server.d.ts.map +1 -0
- package/packages/mcp-server/dist/server.js +22 -0
- package/packages/mcp-server/dist/server.js.map +1 -0
- package/packages/mcp-server/dist/state/session-store.d.ts +39 -0
- package/packages/mcp-server/dist/state/session-store.d.ts.map +1 -0
- package/packages/mcp-server/dist/state/session-store.js +58 -0
- package/packages/mcp-server/dist/state/session-store.js.map +1 -0
- package/packages/mcp-server/dist/tools/compile.d.ts +30 -0
- package/packages/mcp-server/dist/tools/compile.d.ts.map +1 -0
- package/packages/mcp-server/dist/tools/compile.js +54 -0
- package/packages/mcp-server/dist/tools/compile.js.map +1 -0
- package/packages/mcp-server/dist/tools/execute.d.ts +112 -0
- package/packages/mcp-server/dist/tools/execute.d.ts.map +1 -0
- package/packages/mcp-server/dist/tools/execute.js +103 -0
- package/packages/mcp-server/dist/tools/execute.js.map +1 -0
- package/packages/mcp-server/dist/tools/explain.d.ts +25 -0
- package/packages/mcp-server/dist/tools/explain.d.ts.map +1 -0
- package/packages/mcp-server/dist/tools/explain.js +254 -0
- package/packages/mcp-server/dist/tools/explain.js.map +1 -0
- package/packages/mcp-server/dist/tools/validate.d.ts +23 -0
- package/packages/mcp-server/dist/tools/validate.d.ts.map +1 -0
- package/packages/mcp-server/dist/tools/validate.js +38 -0
- package/packages/mcp-server/dist/tools/validate.js.map +1 -0
- package/src/manifest/audit/sinks/postgres.sql +51 -0
- package/src/manifest/outbox/stores/postgres.sql +61 -0
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GraphQL SDL projection for Manifest IR.
|
|
3
|
+
*
|
|
4
|
+
* Generates GraphQL schema definitions and resolver stubs from IR entities,
|
|
5
|
+
* commands, policies, and events.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Entity types with typed fields
|
|
9
|
+
* - Query type with list and detail resolvers per entity
|
|
10
|
+
* - Mutation type with mutations mapped to commands
|
|
11
|
+
* - Subscription type mapped to IR events
|
|
12
|
+
* - Input types for command parameters
|
|
13
|
+
* - @auth directives derived from entity/command policies
|
|
14
|
+
* - Resolver stubs with runtime.runCommand for writes, direct DB for reads
|
|
15
|
+
* - Enum type definitions from IR enums
|
|
16
|
+
* - Custom scalar detection (DateTime, UUID, etc.)
|
|
17
|
+
*
|
|
18
|
+
* Surfaces:
|
|
19
|
+
* - graphql.schema → schema.graphql (complete SDL)
|
|
20
|
+
* - graphql.resolvers → resolvers.ts (TypeScript resolver stubs)
|
|
21
|
+
*
|
|
22
|
+
* Projections are TOOLING, not runtime semantics.
|
|
23
|
+
* Reads MAY bypass runtime. Writes MUST use runtime.runCommand().
|
|
24
|
+
*/
|
|
25
|
+
// ============================================================================
|
|
26
|
+
// Surface identifiers
|
|
27
|
+
// ============================================================================
|
|
28
|
+
const SURFACE_SCHEMA = 'graphql.schema';
|
|
29
|
+
const SURFACE_RESOLVERS = 'graphql.resolvers';
|
|
30
|
+
const SURFACES = [SURFACE_SCHEMA, SURFACE_RESOLVERS];
|
|
31
|
+
// ============================================================================
|
|
32
|
+
// Type mapping: IR type → GraphQL scalar/type
|
|
33
|
+
// ============================================================================
|
|
34
|
+
/** Set of scalars that require custom scalar declarations */
|
|
35
|
+
const CUSTOM_SCALAR_TYPES = new Set(['DateTime', 'UUID', 'JSON', 'Date', 'Email', 'URL']);
|
|
36
|
+
/**
|
|
37
|
+
* Map a Manifest IR type name to a GraphQL type string.
|
|
38
|
+
*/
|
|
39
|
+
function irTypeToGraphQL(irType) {
|
|
40
|
+
// Handle generic types first
|
|
41
|
+
if (irType.name === 'array' && irType.generic) {
|
|
42
|
+
return `[${irTypeToGraphQL(irType.generic)}${irType.generic.nullable ? '' : '!'}]`;
|
|
43
|
+
}
|
|
44
|
+
if (irType.name === 'map' || irType.name === 'record' || irType.name === 'object') {
|
|
45
|
+
return 'JSON';
|
|
46
|
+
}
|
|
47
|
+
const typeMap = {
|
|
48
|
+
string: 'String',
|
|
49
|
+
number: 'Float',
|
|
50
|
+
integer: 'Int',
|
|
51
|
+
int: 'Int',
|
|
52
|
+
boolean: 'Boolean',
|
|
53
|
+
bool: 'Boolean',
|
|
54
|
+
date: 'Date',
|
|
55
|
+
datetime: 'DateTime',
|
|
56
|
+
uuid: 'UUID',
|
|
57
|
+
email: 'String',
|
|
58
|
+
url: 'String',
|
|
59
|
+
uri: 'String',
|
|
60
|
+
any: 'JSON',
|
|
61
|
+
};
|
|
62
|
+
return typeMap[irType.name] ?? 'String';
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Map an IR type to a GraphQL field type string, including nullability.
|
|
66
|
+
*/
|
|
67
|
+
function irTypeToFieldType(irType) {
|
|
68
|
+
const base = irTypeToGraphQL(irType);
|
|
69
|
+
// Arrays already include inner nullability markers
|
|
70
|
+
if (irType.name === 'array') {
|
|
71
|
+
return irType.nullable ? base : `${base}!`;
|
|
72
|
+
}
|
|
73
|
+
return irType.nullable ? base : `${base}!`;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Collect all custom scalars used across entity properties, commands, and events.
|
|
77
|
+
*/
|
|
78
|
+
function collectCustomScalars(ir) {
|
|
79
|
+
const scalars = new Set();
|
|
80
|
+
function checkType(irType) {
|
|
81
|
+
const mapped = irTypeToGraphQL(irType);
|
|
82
|
+
if (CUSTOM_SCALAR_TYPES.has(mapped)) {
|
|
83
|
+
scalars.add(mapped);
|
|
84
|
+
}
|
|
85
|
+
if (irType.generic) {
|
|
86
|
+
checkType(irType.generic);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
for (const entity of ir.entities) {
|
|
90
|
+
for (const prop of entity.properties) {
|
|
91
|
+
checkType(prop.type);
|
|
92
|
+
}
|
|
93
|
+
for (const computed of entity.computedProperties) {
|
|
94
|
+
checkType(computed.type);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
for (const command of ir.commands) {
|
|
98
|
+
for (const param of command.parameters) {
|
|
99
|
+
checkType(param.type);
|
|
100
|
+
}
|
|
101
|
+
if (command.returns) {
|
|
102
|
+
checkType(command.returns);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
for (const event of ir.events) {
|
|
106
|
+
if (Array.isArray(event.payload)) {
|
|
107
|
+
for (const field of event.payload) {
|
|
108
|
+
checkType(field.type);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return scalars;
|
|
113
|
+
}
|
|
114
|
+
// ============================================================================
|
|
115
|
+
// Helpers
|
|
116
|
+
// ============================================================================
|
|
117
|
+
function toPascalCase(value) {
|
|
118
|
+
if (!value)
|
|
119
|
+
return value;
|
|
120
|
+
return value[0].toUpperCase() + value.slice(1);
|
|
121
|
+
}
|
|
122
|
+
function toCamelCase(value) {
|
|
123
|
+
if (!value)
|
|
124
|
+
return value;
|
|
125
|
+
return value[0].toLowerCase() + value.slice(1);
|
|
126
|
+
}
|
|
127
|
+
function pluralize(name) {
|
|
128
|
+
const lower = name.toLowerCase();
|
|
129
|
+
if (lower.endsWith('s') || lower.endsWith('sh') || lower.endsWith('ch') || lower.endsWith('x') || lower.endsWith('z')) {
|
|
130
|
+
return name + 'es';
|
|
131
|
+
}
|
|
132
|
+
if (lower.endsWith('y') && !['a', 'e', 'i', 'o', 'u'].includes(lower[lower.length - 2])) {
|
|
133
|
+
return name.slice(0, -1) + 'ies';
|
|
134
|
+
}
|
|
135
|
+
return name + 's';
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Convert an IRValue to a string representation for descriptions.
|
|
139
|
+
*/
|
|
140
|
+
function irValueToString(value) {
|
|
141
|
+
switch (value.kind) {
|
|
142
|
+
case 'string': return `"${value.value}"`;
|
|
143
|
+
case 'number': return String(value.value);
|
|
144
|
+
case 'boolean': return String(value.value);
|
|
145
|
+
case 'null': return 'null';
|
|
146
|
+
case 'array': return `[${value.elements.map(irValueToString).join(', ')}]`;
|
|
147
|
+
case 'object': {
|
|
148
|
+
const entries = Object.entries(value.properties)
|
|
149
|
+
.map(([k, v]) => `${k}: ${irValueToString(v)}`);
|
|
150
|
+
return `{${entries.join(', ')}}`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Convert an IR expression to a human-readable string for descriptions.
|
|
156
|
+
*/
|
|
157
|
+
function expressionToString(expr) {
|
|
158
|
+
switch (expr.kind) {
|
|
159
|
+
case 'literal':
|
|
160
|
+
return irValueToString(expr.value);
|
|
161
|
+
case 'identifier':
|
|
162
|
+
return expr.name;
|
|
163
|
+
case 'member':
|
|
164
|
+
return `${expressionToString(expr.object)}.${expr.property}`;
|
|
165
|
+
case 'binary':
|
|
166
|
+
return `${expressionToString(expr.left)} ${expr.operator} ${expressionToString(expr.right)}`;
|
|
167
|
+
case 'unary':
|
|
168
|
+
return `${expr.operator}${expressionToString(expr.operand)}`;
|
|
169
|
+
case 'call':
|
|
170
|
+
return `${expressionToString(expr.callee)}(${expr.args.map(expressionToString).join(', ')})`;
|
|
171
|
+
case 'conditional':
|
|
172
|
+
return `${expressionToString(expr.condition)} ? ${expressionToString(expr.consequent)} : ${expressionToString(expr.alternate)}`;
|
|
173
|
+
case 'array':
|
|
174
|
+
return `[${expr.elements.map(expressionToString).join(', ')}]`;
|
|
175
|
+
case 'object':
|
|
176
|
+
return `{${expr.properties.map((p) => `${p.key}: ${expressionToString(p.value)}`).join(', ')}}`;
|
|
177
|
+
case 'lambda':
|
|
178
|
+
return `(${expr.params.join(', ')}) => ${expressionToString(expr.body)}`;
|
|
179
|
+
default:
|
|
180
|
+
return String(expr);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Escape a string for use in a GraphQL description (block string).
|
|
185
|
+
*/
|
|
186
|
+
function escapeDescription(text) {
|
|
187
|
+
return text.replace(/"""/g, '\\"""');
|
|
188
|
+
}
|
|
189
|
+
// ============================================================================
|
|
190
|
+
// Auth directive generation
|
|
191
|
+
// ============================================================================
|
|
192
|
+
/**
|
|
193
|
+
* Derive an @auth directive string for an entity based on its policies.
|
|
194
|
+
*/
|
|
195
|
+
function buildAuthDirective(policyNames, allPolicies, options) {
|
|
196
|
+
if (options.includeAuthDirectives === false)
|
|
197
|
+
return '';
|
|
198
|
+
if (policyNames.length === 0)
|
|
199
|
+
return '';
|
|
200
|
+
// Resolve policy actions from policy names
|
|
201
|
+
const actions = new Set();
|
|
202
|
+
for (const policyName of policyNames) {
|
|
203
|
+
const policy = allPolicies.find(p => p.name === policyName);
|
|
204
|
+
if (policy) {
|
|
205
|
+
actions.add(policy.action);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (actions.size === 0)
|
|
209
|
+
return '';
|
|
210
|
+
const actionsStr = Array.from(actions).sort().join(', ');
|
|
211
|
+
return ` @auth(requires: [${actionsStr.toUpperCase()}])`;
|
|
212
|
+
}
|
|
213
|
+
// ============================================================================
|
|
214
|
+
// SDL generation
|
|
215
|
+
// ============================================================================
|
|
216
|
+
/**
|
|
217
|
+
* Generate SDL for a single entity type.
|
|
218
|
+
*/
|
|
219
|
+
function generateEntityType(entity, allPolicies, options) {
|
|
220
|
+
const lines = [];
|
|
221
|
+
// Type description
|
|
222
|
+
const desc = entity.module ? `${entity.name} entity (module: ${entity.module})` : `${entity.name} entity`;
|
|
223
|
+
lines.push(`"""${escapeDescription(desc)}"""`);
|
|
224
|
+
// Type declaration with optional auth directive
|
|
225
|
+
const authDir = buildAuthDirective(entity.policies, allPolicies, options);
|
|
226
|
+
lines.push(`type ${entity.name}${authDir} {`);
|
|
227
|
+
// Properties
|
|
228
|
+
for (const prop of entity.properties) {
|
|
229
|
+
const fieldType = irTypeToFieldType(prop.type);
|
|
230
|
+
const descParts = [];
|
|
231
|
+
if (prop.modifiers.includes('readonly'))
|
|
232
|
+
descParts.push('Read-only');
|
|
233
|
+
if (prop.modifiers.includes('unique'))
|
|
234
|
+
descParts.push('Unique');
|
|
235
|
+
if (prop.defaultValue !== undefined)
|
|
236
|
+
descParts.push(`Default: ${irValueToString(prop.defaultValue)}`);
|
|
237
|
+
const fieldDesc = descParts.length > 0 ? ` """${escapeDescription(descParts.join('. '))}"""\n` : '';
|
|
238
|
+
lines.push(`${fieldDesc} ${prop.name}: ${fieldType}`);
|
|
239
|
+
}
|
|
240
|
+
// Computed properties
|
|
241
|
+
if (options.includeComputedProperties !== false) {
|
|
242
|
+
for (const computed of entity.computedProperties) {
|
|
243
|
+
const fieldType = irTypeToFieldType(computed.type);
|
|
244
|
+
const exprStr = expressionToString(computed.expression);
|
|
245
|
+
lines.push(` """Computed: ${escapeDescription(exprStr)}"""`);
|
|
246
|
+
lines.push(` ${computed.name}: ${fieldType}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
// Relationships as fields
|
|
250
|
+
for (const rel of entity.relationships) {
|
|
251
|
+
switch (rel.kind) {
|
|
252
|
+
case 'hasMany':
|
|
253
|
+
lines.push(` ${rel.name}: [${rel.target}!]!`);
|
|
254
|
+
break;
|
|
255
|
+
case 'hasOne':
|
|
256
|
+
case 'belongsTo':
|
|
257
|
+
case 'ref':
|
|
258
|
+
lines.push(` ${rel.name}: ${rel.target}`);
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
lines.push('}');
|
|
263
|
+
return lines.join('\n');
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Generate SDL for an enum type.
|
|
267
|
+
*/
|
|
268
|
+
function generateEnumType(irEnum) {
|
|
269
|
+
const lines = [];
|
|
270
|
+
lines.push(`"""${irEnum.name} enum"""`);
|
|
271
|
+
lines.push(`enum ${irEnum.name} {`);
|
|
272
|
+
for (const val of irEnum.values) {
|
|
273
|
+
if (val.label) {
|
|
274
|
+
lines.push(` """${escapeDescription(val.label)}"""`);
|
|
275
|
+
}
|
|
276
|
+
lines.push(` ${val.name}`);
|
|
277
|
+
}
|
|
278
|
+
lines.push('}');
|
|
279
|
+
return lines.join('\n');
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Generate an input type for a command's parameters.
|
|
283
|
+
*/
|
|
284
|
+
function generateCommandInput(command) {
|
|
285
|
+
if (command.parameters.length === 0)
|
|
286
|
+
return null;
|
|
287
|
+
if (!command.entity)
|
|
288
|
+
return null;
|
|
289
|
+
const inputName = `${toPascalCase(command.entity)}${toPascalCase(command.name)}Input`;
|
|
290
|
+
const lines = [];
|
|
291
|
+
lines.push(`"""Input for ${command.entity}.${command.name} command"""`);
|
|
292
|
+
lines.push(`input ${inputName} {`);
|
|
293
|
+
for (const param of command.parameters) {
|
|
294
|
+
const fieldType = irTypeToFieldType(param.type);
|
|
295
|
+
// For input types: required params get !, optional get no !
|
|
296
|
+
const actualType = param.required ? fieldType : fieldType.replace(/!$/, '');
|
|
297
|
+
if (param.defaultValue !== undefined) {
|
|
298
|
+
lines.push(` """Default: ${escapeDescription(irValueToString(param.defaultValue))}"""`);
|
|
299
|
+
}
|
|
300
|
+
lines.push(` ${param.name}: ${actualType}`);
|
|
301
|
+
}
|
|
302
|
+
lines.push('}');
|
|
303
|
+
return lines.join('\n');
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Generate an event payload type for subscriptions.
|
|
307
|
+
*/
|
|
308
|
+
function generateEventPayloadType(event) {
|
|
309
|
+
const typeName = `${toPascalCase(event.name)}Payload`;
|
|
310
|
+
const lines = [];
|
|
311
|
+
lines.push(`"""Payload for ${event.name} event (channel: ${event.channel})"""`);
|
|
312
|
+
lines.push(`type ${typeName} {`);
|
|
313
|
+
if (Array.isArray(event.payload)) {
|
|
314
|
+
// Structured fields
|
|
315
|
+
for (const field of event.payload) {
|
|
316
|
+
const fieldType = irTypeToFieldType(field.type);
|
|
317
|
+
const actualType = field.required ? fieldType : fieldType.replace(/!$/, '');
|
|
318
|
+
lines.push(` ${field.name}: ${actualType}`);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
// Single type payload — wrap as `data` field
|
|
323
|
+
const fieldType = irTypeToFieldType(event.payload);
|
|
324
|
+
lines.push(` data: ${fieldType}`);
|
|
325
|
+
}
|
|
326
|
+
lines.push('}');
|
|
327
|
+
return lines.join('\n');
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Build the Query type from entities.
|
|
331
|
+
*/
|
|
332
|
+
function generateQueryType(entities) {
|
|
333
|
+
if (entities.length === 0)
|
|
334
|
+
return '';
|
|
335
|
+
const lines = [];
|
|
336
|
+
lines.push('type Query {');
|
|
337
|
+
for (const entity of entities) {
|
|
338
|
+
const camelName = toCamelCase(entity.name);
|
|
339
|
+
const pluralName = toCamelCase(pluralize(entity.name));
|
|
340
|
+
// List query
|
|
341
|
+
lines.push(` """List all ${entity.name} entities"""`);
|
|
342
|
+
lines.push(` ${pluralName}: [${entity.name}!]!`);
|
|
343
|
+
// Detail query
|
|
344
|
+
lines.push(` """Get a single ${entity.name} by ID"""`);
|
|
345
|
+
lines.push(` ${camelName}(id: ID!): ${entity.name}`);
|
|
346
|
+
}
|
|
347
|
+
lines.push('}');
|
|
348
|
+
return lines.join('\n');
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Build the Mutation type from commands.
|
|
352
|
+
*/
|
|
353
|
+
function generateMutationType(commands, allPolicies, options) {
|
|
354
|
+
const entityCommands = commands.filter(c => c.entity);
|
|
355
|
+
if (entityCommands.length === 0)
|
|
356
|
+
return '';
|
|
357
|
+
const lines = [];
|
|
358
|
+
lines.push('type Mutation {');
|
|
359
|
+
for (const command of entityCommands) {
|
|
360
|
+
const mutationName = `${toCamelCase(command.entity)}${toPascalCase(command.name)}`;
|
|
361
|
+
const returnType = command.entity;
|
|
362
|
+
// Build description
|
|
363
|
+
const descParts = [];
|
|
364
|
+
descParts.push(`Execute ${command.name} on ${command.entity}`);
|
|
365
|
+
if (options.includeGuardDescriptions !== false && command.guards.length > 0) {
|
|
366
|
+
descParts.push(`Guards: ${command.guards.length} guard(s) evaluated in order`);
|
|
367
|
+
}
|
|
368
|
+
if (options.includeConstraintDescriptions !== false && command.constraints && command.constraints.length > 0) {
|
|
369
|
+
descParts.push(`Constraints: ${command.constraints.length} pre-execution constraint(s)`);
|
|
370
|
+
}
|
|
371
|
+
// Policy-based auth directive
|
|
372
|
+
const commandPolicies = command.policies ?? [];
|
|
373
|
+
const authDir = buildAuthDirective(commandPolicies, allPolicies, options);
|
|
374
|
+
const desc = descParts.join('. ');
|
|
375
|
+
lines.push(` """${escapeDescription(desc)}"""`);
|
|
376
|
+
// Build arguments
|
|
377
|
+
if (command.parameters.length > 0) {
|
|
378
|
+
const inputName = `${toPascalCase(command.entity)}${toPascalCase(command.name)}Input`;
|
|
379
|
+
lines.push(` ${mutationName}(input: ${inputName}!): ${returnType}${authDir}`);
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
lines.push(` ${mutationName}: ${returnType}${authDir}`);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
lines.push('}');
|
|
386
|
+
return lines.join('\n');
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Build the Subscription type from events.
|
|
390
|
+
*/
|
|
391
|
+
function generateSubscriptionType(events) {
|
|
392
|
+
if (events.length === 0)
|
|
393
|
+
return '';
|
|
394
|
+
const lines = [];
|
|
395
|
+
lines.push('type Subscription {');
|
|
396
|
+
for (const event of events) {
|
|
397
|
+
const fieldName = toCamelCase(event.name);
|
|
398
|
+
const payloadType = `${toPascalCase(event.name)}Payload`;
|
|
399
|
+
lines.push(` """Subscribe to ${event.name} events (channel: ${event.channel})"""`);
|
|
400
|
+
lines.push(` ${fieldName}: ${payloadType}!`);
|
|
401
|
+
}
|
|
402
|
+
lines.push('}');
|
|
403
|
+
return lines.join('\n');
|
|
404
|
+
}
|
|
405
|
+
// ============================================================================
|
|
406
|
+
// Full schema assembly
|
|
407
|
+
// ============================================================================
|
|
408
|
+
/**
|
|
409
|
+
* Build the complete GraphQL SDL from IR.
|
|
410
|
+
*/
|
|
411
|
+
function buildGraphQLSchema(ir, options) {
|
|
412
|
+
const diagnostics = [];
|
|
413
|
+
const sections = [];
|
|
414
|
+
// Sort for determinism
|
|
415
|
+
const sortedEntities = [...ir.entities].sort((a, b) => a.name.localeCompare(b.name));
|
|
416
|
+
const sortedCommands = [...ir.commands].sort((a, b) => {
|
|
417
|
+
const aKey = `${a.entity ?? ''}.${a.name}`;
|
|
418
|
+
const bKey = `${b.entity ?? ''}.${b.name}`;
|
|
419
|
+
return aKey.localeCompare(bKey);
|
|
420
|
+
});
|
|
421
|
+
const sortedEvents = [...ir.events].sort((a, b) => a.name.localeCompare(b.name));
|
|
422
|
+
const sortedEnums = [...ir.enums].sort((a, b) => a.name.localeCompare(b.name));
|
|
423
|
+
// Header comment
|
|
424
|
+
sections.push('# Generated by Manifest GraphQL Projection');
|
|
425
|
+
sections.push('# Do not edit manually — regenerate from IR');
|
|
426
|
+
// Custom scalars
|
|
427
|
+
const customScalars = collectCustomScalars(ir);
|
|
428
|
+
if (options.customScalars) {
|
|
429
|
+
for (const name of Object.keys(options.customScalars)) {
|
|
430
|
+
customScalars.add(name);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
if (customScalars.size > 0) {
|
|
434
|
+
const scalarLines = Array.from(customScalars).sort().map(s => `scalar ${s}`);
|
|
435
|
+
sections.push(scalarLines.join('\n'));
|
|
436
|
+
}
|
|
437
|
+
// Auth directive definition (if policies exist and auth directives enabled)
|
|
438
|
+
if (options.includeAuthDirectives !== false) {
|
|
439
|
+
const hasPolicies = ir.policies.length > 0 ||
|
|
440
|
+
ir.entities.some(e => e.policies.length > 0) ||
|
|
441
|
+
ir.commands.some(c => c.policies && c.policies.length > 0);
|
|
442
|
+
if (hasPolicies) {
|
|
443
|
+
sections.push('directive @auth(requires: [String!]!) on OBJECT | FIELD_DEFINITION');
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
// Enum types
|
|
447
|
+
if (options.includeEnums !== false) {
|
|
448
|
+
for (const irEnum of sortedEnums) {
|
|
449
|
+
sections.push(generateEnumType(irEnum));
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
// Entity types
|
|
453
|
+
for (const entity of sortedEntities) {
|
|
454
|
+
sections.push(generateEntityType(entity, ir.policies, options));
|
|
455
|
+
}
|
|
456
|
+
// Event payload types (before subscription type)
|
|
457
|
+
if (options.includeSubscriptions !== false) {
|
|
458
|
+
for (const event of sortedEvents) {
|
|
459
|
+
sections.push(generateEventPayloadType(event));
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
// Input types for commands
|
|
463
|
+
if (options.includeInputTypes !== false) {
|
|
464
|
+
for (const command of sortedCommands) {
|
|
465
|
+
if (!command.entity) {
|
|
466
|
+
diagnostics.push({
|
|
467
|
+
severity: 'warning',
|
|
468
|
+
code: 'COMMAND_NO_ENTITY',
|
|
469
|
+
message: `Command "${command.name}" has no entity — skipped in GraphQL schema.`,
|
|
470
|
+
});
|
|
471
|
+
continue;
|
|
472
|
+
}
|
|
473
|
+
const inputType = generateCommandInput(command);
|
|
474
|
+
if (inputType) {
|
|
475
|
+
sections.push(inputType);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
// Query type
|
|
480
|
+
const queryType = generateQueryType(sortedEntities);
|
|
481
|
+
if (queryType) {
|
|
482
|
+
sections.push(queryType);
|
|
483
|
+
}
|
|
484
|
+
// Mutation type
|
|
485
|
+
const mutationType = generateMutationType(sortedCommands, ir.policies, options);
|
|
486
|
+
if (mutationType) {
|
|
487
|
+
sections.push(mutationType);
|
|
488
|
+
}
|
|
489
|
+
// Subscription type
|
|
490
|
+
if (options.includeSubscriptions !== false) {
|
|
491
|
+
const subscriptionType = generateSubscriptionType(sortedEvents);
|
|
492
|
+
if (subscriptionType) {
|
|
493
|
+
sections.push(subscriptionType);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
const sdl = sections.join('\n\n') + '\n';
|
|
497
|
+
return { sdl, diagnostics };
|
|
498
|
+
}
|
|
499
|
+
// ============================================================================
|
|
500
|
+
// Resolver stub generation
|
|
501
|
+
// ============================================================================
|
|
502
|
+
/**
|
|
503
|
+
* Build TypeScript resolver stubs from IR.
|
|
504
|
+
*/
|
|
505
|
+
function buildResolverStubs(ir, options) {
|
|
506
|
+
const diagnostics = [];
|
|
507
|
+
const runtimeImport = options.runtimeImportPath ?? '@/lib/manifest-runtime';
|
|
508
|
+
const dbImport = options.databaseImportPath ?? '@/lib/database';
|
|
509
|
+
const sortedEntities = [...ir.entities].sort((a, b) => a.name.localeCompare(b.name));
|
|
510
|
+
const sortedCommands = [...ir.commands].sort((a, b) => {
|
|
511
|
+
const aKey = `${a.entity ?? ''}.${a.name}`;
|
|
512
|
+
const bKey = `${b.entity ?? ''}.${b.name}`;
|
|
513
|
+
return aKey.localeCompare(bKey);
|
|
514
|
+
});
|
|
515
|
+
const sortedEvents = [...ir.events].sort((a, b) => a.name.localeCompare(b.name));
|
|
516
|
+
const lines = [];
|
|
517
|
+
// Header
|
|
518
|
+
lines.push('/**');
|
|
519
|
+
lines.push(' * Generated GraphQL resolver stubs from Manifest IR.');
|
|
520
|
+
lines.push(' * Reads use direct database queries for performance.');
|
|
521
|
+
lines.push(' * Writes use runtime.runCommand() to preserve policy/guard/constraint semantics.');
|
|
522
|
+
lines.push(' */');
|
|
523
|
+
lines.push('');
|
|
524
|
+
lines.push(`import { createManifestRuntime } from '${runtimeImport}';`);
|
|
525
|
+
lines.push(`import { database } from '${dbImport}';`);
|
|
526
|
+
if (sortedEvents.length > 0 && options.includeSubscriptions !== false) {
|
|
527
|
+
lines.push("import { PubSub } from 'graphql-subscriptions';");
|
|
528
|
+
lines.push('');
|
|
529
|
+
lines.push('const pubsub = new PubSub();');
|
|
530
|
+
}
|
|
531
|
+
lines.push('');
|
|
532
|
+
// Query resolvers
|
|
533
|
+
if (sortedEntities.length > 0) {
|
|
534
|
+
lines.push('export const queryResolvers = {');
|
|
535
|
+
for (const entity of sortedEntities) {
|
|
536
|
+
const camelName = toCamelCase(entity.name);
|
|
537
|
+
const pluralName = toCamelCase(pluralize(entity.name));
|
|
538
|
+
const tableName = toCamelCase(entity.name);
|
|
539
|
+
lines.push(` ${pluralName}: async (_parent: unknown, _args: unknown, context: unknown) => {`);
|
|
540
|
+
lines.push(` return database.${tableName}.findMany();`);
|
|
541
|
+
lines.push(' },');
|
|
542
|
+
lines.push('');
|
|
543
|
+
lines.push(` ${camelName}: async (_parent: unknown, args: { id: string }, context: unknown) => {`);
|
|
544
|
+
lines.push(` return database.${tableName}.findUnique({ where: { id: args.id } });`);
|
|
545
|
+
lines.push(' },');
|
|
546
|
+
lines.push('');
|
|
547
|
+
}
|
|
548
|
+
lines.push('};');
|
|
549
|
+
lines.push('');
|
|
550
|
+
}
|
|
551
|
+
// Mutation resolvers
|
|
552
|
+
const entityCommands = sortedCommands.filter(c => c.entity);
|
|
553
|
+
if (entityCommands.length > 0) {
|
|
554
|
+
lines.push('export const mutationResolvers = {');
|
|
555
|
+
for (const command of entityCommands) {
|
|
556
|
+
const mutationName = `${toCamelCase(command.entity)}${toPascalCase(command.name)}`;
|
|
557
|
+
const hasInput = command.parameters.length > 0;
|
|
558
|
+
const inputType = hasInput ? `{ input: Record<string, unknown> }` : 'unknown';
|
|
559
|
+
lines.push(` ${mutationName}: async (_parent: unknown, args: ${inputType}, context: unknown) => {`);
|
|
560
|
+
lines.push(` const runtime = createManifestRuntime(context);`);
|
|
561
|
+
if (hasInput) {
|
|
562
|
+
lines.push(` return runtime.runCommand('${command.entity}', '${command.name}', args.input);`);
|
|
563
|
+
}
|
|
564
|
+
else {
|
|
565
|
+
lines.push(` return runtime.runCommand('${command.entity}', '${command.name}', {});`);
|
|
566
|
+
}
|
|
567
|
+
lines.push(' },');
|
|
568
|
+
lines.push('');
|
|
569
|
+
}
|
|
570
|
+
lines.push('};');
|
|
571
|
+
lines.push('');
|
|
572
|
+
}
|
|
573
|
+
// Subscription resolvers
|
|
574
|
+
if (sortedEvents.length > 0 && options.includeSubscriptions !== false) {
|
|
575
|
+
lines.push('export const subscriptionResolvers = {');
|
|
576
|
+
for (const event of sortedEvents) {
|
|
577
|
+
const fieldName = toCamelCase(event.name);
|
|
578
|
+
lines.push(` ${fieldName}: {`);
|
|
579
|
+
lines.push(` subscribe: () => pubsub.asyncIterableIterator('${event.channel}'),`);
|
|
580
|
+
lines.push(' },');
|
|
581
|
+
lines.push('');
|
|
582
|
+
}
|
|
583
|
+
lines.push('};');
|
|
584
|
+
lines.push('');
|
|
585
|
+
}
|
|
586
|
+
// Combined resolvers export
|
|
587
|
+
lines.push('export const resolvers = {');
|
|
588
|
+
if (sortedEntities.length > 0) {
|
|
589
|
+
lines.push(' Query: queryResolvers,');
|
|
590
|
+
}
|
|
591
|
+
if (entityCommands.length > 0) {
|
|
592
|
+
lines.push(' Mutation: mutationResolvers,');
|
|
593
|
+
}
|
|
594
|
+
if (sortedEvents.length > 0 && options.includeSubscriptions !== false) {
|
|
595
|
+
lines.push(' Subscription: subscriptionResolvers,');
|
|
596
|
+
}
|
|
597
|
+
lines.push('};');
|
|
598
|
+
lines.push('');
|
|
599
|
+
return { code: lines.join('\n'), diagnostics };
|
|
600
|
+
}
|
|
601
|
+
// ============================================================================
|
|
602
|
+
// Projection implementation
|
|
603
|
+
// ============================================================================
|
|
604
|
+
/**
|
|
605
|
+
* GraphQL SDL + resolver stubs projection.
|
|
606
|
+
*
|
|
607
|
+
* Generates GraphQL schema definitions and resolver stubs from Manifest IR.
|
|
608
|
+
*
|
|
609
|
+
* Surfaces:
|
|
610
|
+
* - graphql.schema → schema.graphql (SDL)
|
|
611
|
+
* - graphql.resolvers → resolvers.ts (TypeScript resolver stubs)
|
|
612
|
+
*/
|
|
613
|
+
export class GraphQLProjection {
|
|
614
|
+
name = 'graphql';
|
|
615
|
+
description = 'GraphQL SDL and resolver stub generation from Manifest IR entities, commands, policies, and events';
|
|
616
|
+
surfaces = SURFACES;
|
|
617
|
+
generate(ir, request) {
|
|
618
|
+
const options = (request.options ?? {});
|
|
619
|
+
switch (request.surface) {
|
|
620
|
+
case SURFACE_SCHEMA: {
|
|
621
|
+
const { sdl, diagnostics } = buildGraphQLSchema(ir, options);
|
|
622
|
+
const artifact = {
|
|
623
|
+
id: 'graphql.schema',
|
|
624
|
+
pathHint: 'schema.graphql',
|
|
625
|
+
contentType: 'graphql',
|
|
626
|
+
code: sdl,
|
|
627
|
+
};
|
|
628
|
+
return { artifacts: [artifact], diagnostics };
|
|
629
|
+
}
|
|
630
|
+
case SURFACE_RESOLVERS: {
|
|
631
|
+
if (options.includeResolverStubs === false) {
|
|
632
|
+
return {
|
|
633
|
+
artifacts: [],
|
|
634
|
+
diagnostics: [{
|
|
635
|
+
severity: 'info',
|
|
636
|
+
code: 'RESOLVERS_DISABLED',
|
|
637
|
+
message: 'Resolver stub generation is disabled via includeResolverStubs: false.',
|
|
638
|
+
}],
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
const { code, diagnostics } = buildResolverStubs(ir, options);
|
|
642
|
+
const artifact = {
|
|
643
|
+
id: 'graphql.resolvers',
|
|
644
|
+
pathHint: 'resolvers.ts',
|
|
645
|
+
contentType: 'typescript',
|
|
646
|
+
code,
|
|
647
|
+
};
|
|
648
|
+
return { artifacts: [artifact], diagnostics };
|
|
649
|
+
}
|
|
650
|
+
default:
|
|
651
|
+
return {
|
|
652
|
+
artifacts: [],
|
|
653
|
+
diagnostics: [{
|
|
654
|
+
severity: 'error',
|
|
655
|
+
code: 'UNKNOWN_SURFACE',
|
|
656
|
+
message: `Unknown surface: "${request.surface}". Available: graphql.schema, graphql.resolvers`,
|
|
657
|
+
}],
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
//# sourceMappingURL=generator.js.map
|