@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,731 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IR Diff Engine — Compare two versions of Manifest IR and produce a
|
|
3
|
+
* structured diff report highlighting added/removed/changed entities,
|
|
4
|
+
* properties, commands, constraints, policies, events, stores, and relationships.
|
|
5
|
+
*
|
|
6
|
+
* Can also generate database migration scripts (SQL and Prisma) from schema diffs.
|
|
7
|
+
*
|
|
8
|
+
* Design notes:
|
|
9
|
+
* - Deterministic: same inputs always produce same output (sorted, no random IDs).
|
|
10
|
+
* - IR is the authority — diffs are computed purely from IR, never from source.
|
|
11
|
+
* - Migration generation is advisory: the consumer decides whether to apply.
|
|
12
|
+
*/
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Helpers
|
|
15
|
+
// ============================================================================
|
|
16
|
+
function byName(items) {
|
|
17
|
+
const map = new Map();
|
|
18
|
+
for (const item of items) {
|
|
19
|
+
map.set(item.name, item);
|
|
20
|
+
}
|
|
21
|
+
return map;
|
|
22
|
+
}
|
|
23
|
+
function serializeIRValue(v) {
|
|
24
|
+
if (!v)
|
|
25
|
+
return '';
|
|
26
|
+
switch (v.kind) {
|
|
27
|
+
case 'string': return `"${v.value}"`;
|
|
28
|
+
case 'number': return String(v.value);
|
|
29
|
+
case 'boolean': return String(v.value);
|
|
30
|
+
case 'null': return 'null';
|
|
31
|
+
case 'array': return `[${v.elements.map(serializeIRValue).join(', ')}]`;
|
|
32
|
+
case 'object': {
|
|
33
|
+
const entries = Object.entries(v.properties).map(([k, val]) => `${k}: ${serializeIRValue(val)}`);
|
|
34
|
+
return `{${entries.join(', ')}}`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function serializeIRType(t) {
|
|
39
|
+
let base = t.name;
|
|
40
|
+
if (t.generic)
|
|
41
|
+
base = `${base}<${serializeIRType(t.generic)}>`;
|
|
42
|
+
if (t.nullable)
|
|
43
|
+
base = `${base}?`;
|
|
44
|
+
return base;
|
|
45
|
+
}
|
|
46
|
+
function modifiersEqual(a, b) {
|
|
47
|
+
if (a.length !== b.length)
|
|
48
|
+
return false;
|
|
49
|
+
const sorted = (arr) => [...arr].sort();
|
|
50
|
+
const sa = sorted(a);
|
|
51
|
+
const sb = sorted(b);
|
|
52
|
+
return sa.every((v, i) => v === sb[i]);
|
|
53
|
+
}
|
|
54
|
+
// ============================================================================
|
|
55
|
+
// Property diffing
|
|
56
|
+
// ============================================================================
|
|
57
|
+
function diffProperties(oldProps, newProps) {
|
|
58
|
+
const result = [];
|
|
59
|
+
const oldMap = byName(oldProps);
|
|
60
|
+
const newMap = byName(newProps);
|
|
61
|
+
// Removed properties
|
|
62
|
+
for (const [name] of oldMap) {
|
|
63
|
+
if (!newMap.has(name)) {
|
|
64
|
+
result.push({ name, change: 'removed' });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Added + changed properties
|
|
68
|
+
for (const [name, prop] of newMap) {
|
|
69
|
+
const old = oldMap.get(name);
|
|
70
|
+
if (!old) {
|
|
71
|
+
result.push({ name, change: 'added' });
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const typeChanged = serializeIRType(old.type) !== serializeIRType(prop.type);
|
|
75
|
+
const modifiersChanged = !modifiersEqual(old.modifiers, prop.modifiers);
|
|
76
|
+
const defaultChanged = serializeIRValue(old.defaultValue) !== serializeIRValue(prop.defaultValue);
|
|
77
|
+
if (typeChanged || modifiersChanged || defaultChanged) {
|
|
78
|
+
result.push({
|
|
79
|
+
name,
|
|
80
|
+
change: 'changed',
|
|
81
|
+
details: {
|
|
82
|
+
...(typeChanged ? { type: { from: serializeIRType(old.type), to: serializeIRType(prop.type) } } : {}),
|
|
83
|
+
...(modifiersChanged ? { modifiers: { from: [...old.modifiers], to: [...prop.modifiers] } } : {}),
|
|
84
|
+
...(defaultChanged ? { defaultValue: { from: serializeIRValue(old.defaultValue), to: serializeIRValue(prop.defaultValue) } } : {}),
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
90
|
+
}
|
|
91
|
+
// ============================================================================
|
|
92
|
+
// Computed property diffing
|
|
93
|
+
// ============================================================================
|
|
94
|
+
function diffComputedProperties(oldProps, newProps) {
|
|
95
|
+
const result = [];
|
|
96
|
+
const oldMap = byName(oldProps);
|
|
97
|
+
const newMap = byName(newProps);
|
|
98
|
+
for (const [name] of oldMap) {
|
|
99
|
+
if (!newMap.has(name)) {
|
|
100
|
+
result.push({ name, change: 'removed' });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
for (const [name, prop] of newMap) {
|
|
104
|
+
const old = oldMap.get(name);
|
|
105
|
+
if (!old) {
|
|
106
|
+
result.push({ name, change: 'added' });
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
const typeChanged = serializeIRType(old.type) !== serializeIRType(prop.type);
|
|
110
|
+
const depsChanged = JSON.stringify([...old.dependencies].sort()) !== JSON.stringify([...prop.dependencies].sort());
|
|
111
|
+
// Expression comparison via JSON serialization (structural equality)
|
|
112
|
+
const exprChanged = JSON.stringify(old.expression) !== JSON.stringify(prop.expression);
|
|
113
|
+
if (typeChanged || depsChanged || exprChanged) {
|
|
114
|
+
result.push({
|
|
115
|
+
name,
|
|
116
|
+
change: 'changed',
|
|
117
|
+
details: {
|
|
118
|
+
...(typeChanged ? { type: { from: serializeIRType(old.type), to: serializeIRType(prop.type) } } : {}),
|
|
119
|
+
...(exprChanged ? { expression: { from: '[changed]', to: '[changed]' } } : {}),
|
|
120
|
+
...(depsChanged ? { dependencies: { from: old.dependencies, to: prop.dependencies } } : {}),
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
126
|
+
}
|
|
127
|
+
// ============================================================================
|
|
128
|
+
// Relationship diffing
|
|
129
|
+
// ============================================================================
|
|
130
|
+
function diffRelationships(oldRels, newRels) {
|
|
131
|
+
const result = [];
|
|
132
|
+
const oldMap = byName(oldRels);
|
|
133
|
+
const newMap = byName(newRels);
|
|
134
|
+
for (const [name] of oldMap) {
|
|
135
|
+
if (!newMap.has(name)) {
|
|
136
|
+
result.push({ name, change: 'removed' });
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
for (const [name, rel] of newMap) {
|
|
140
|
+
const old = oldMap.get(name);
|
|
141
|
+
if (!old) {
|
|
142
|
+
result.push({ name, change: 'added' });
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const kindChanged = old.kind !== rel.kind;
|
|
146
|
+
const targetChanged = old.target !== rel.target;
|
|
147
|
+
const fkChanged = JSON.stringify(old.foreignKey) !== JSON.stringify(rel.foreignKey);
|
|
148
|
+
const throughChanged = old.through !== rel.through;
|
|
149
|
+
const onDeleteChanged = old.onDelete !== rel.onDelete;
|
|
150
|
+
const onUpdateChanged = old.onUpdate !== rel.onUpdate;
|
|
151
|
+
if (kindChanged || targetChanged || fkChanged || throughChanged || onDeleteChanged || onUpdateChanged) {
|
|
152
|
+
result.push({
|
|
153
|
+
name,
|
|
154
|
+
change: 'changed',
|
|
155
|
+
details: {
|
|
156
|
+
...(kindChanged ? { kind: { from: old.kind, to: rel.kind } } : {}),
|
|
157
|
+
...(targetChanged ? { target: { from: old.target, to: rel.target } } : {}),
|
|
158
|
+
...(fkChanged ? { foreignKeyChanged: true } : {}),
|
|
159
|
+
...(throughChanged ? { through: { from: old.through, to: rel.through } } : {}),
|
|
160
|
+
...(onDeleteChanged ? { onDelete: { from: old.onDelete, to: rel.onDelete } } : {}),
|
|
161
|
+
...(onUpdateChanged ? { onUpdate: { from: old.onUpdate, to: rel.onUpdate } } : {}),
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
167
|
+
}
|
|
168
|
+
// ============================================================================
|
|
169
|
+
// Constraint diffing
|
|
170
|
+
// ============================================================================
|
|
171
|
+
function diffConstraints(oldConstraints, newConstraints) {
|
|
172
|
+
const result = [];
|
|
173
|
+
const oldMap = byName(oldConstraints);
|
|
174
|
+
const newMap = byName(newConstraints);
|
|
175
|
+
for (const [name] of oldMap) {
|
|
176
|
+
if (!newMap.has(name)) {
|
|
177
|
+
result.push({ name, change: 'removed' });
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
for (const [name, c] of newMap) {
|
|
181
|
+
const old = oldMap.get(name);
|
|
182
|
+
if (!old) {
|
|
183
|
+
result.push({ name, change: 'added' });
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
const severityChanged = old.severity !== c.severity;
|
|
187
|
+
const messageChanged = old.message !== c.message;
|
|
188
|
+
const exprChanged = JSON.stringify(old.expression) !== JSON.stringify(c.expression);
|
|
189
|
+
if (severityChanged || messageChanged || exprChanged) {
|
|
190
|
+
result.push({
|
|
191
|
+
name,
|
|
192
|
+
change: 'changed',
|
|
193
|
+
details: {
|
|
194
|
+
...(severityChanged ? { severity: { from: old.severity ?? 'block', to: c.severity ?? 'block' } } : {}),
|
|
195
|
+
...(messageChanged ? { message: { from: old.message, to: c.message } } : {}),
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
201
|
+
}
|
|
202
|
+
// ============================================================================
|
|
203
|
+
// Entity diffing
|
|
204
|
+
// ============================================================================
|
|
205
|
+
function diffEntities(oldIR, newIR) {
|
|
206
|
+
const result = [];
|
|
207
|
+
const oldMap = byName(oldIR.entities);
|
|
208
|
+
const newMap = byName(newIR.entities);
|
|
209
|
+
// Removed entities
|
|
210
|
+
for (const [name, entity] of oldMap) {
|
|
211
|
+
if (!newMap.has(name)) {
|
|
212
|
+
result.push({
|
|
213
|
+
name,
|
|
214
|
+
change: 'removed',
|
|
215
|
+
module: { from: entity.module, to: undefined },
|
|
216
|
+
properties: entity.properties.map(p => ({ name: p.name, change: 'removed' })),
|
|
217
|
+
computedProperties: entity.computedProperties.map(p => ({ name: p.name, change: 'removed' })),
|
|
218
|
+
relationships: entity.relationships.map(r => ({ name: r.name, change: 'removed' })),
|
|
219
|
+
constraints: entity.constraints.map(c => ({ name: c.name, change: 'removed' })),
|
|
220
|
+
commands: [...entity.commands],
|
|
221
|
+
policies: [...entity.policies],
|
|
222
|
+
versionProperty: { from: entity.versionProperty, to: undefined },
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
// Added + changed entities
|
|
227
|
+
for (const [name, entity] of newMap) {
|
|
228
|
+
const old = oldMap.get(name);
|
|
229
|
+
if (!old) {
|
|
230
|
+
result.push({
|
|
231
|
+
name,
|
|
232
|
+
change: 'added',
|
|
233
|
+
module: { from: undefined, to: entity.module },
|
|
234
|
+
properties: entity.properties.map(p => ({ name: p.name, change: 'added' })),
|
|
235
|
+
computedProperties: entity.computedProperties.map(p => ({ name: p.name, change: 'added' })),
|
|
236
|
+
relationships: entity.relationships.map(r => ({ name: r.name, change: 'added' })),
|
|
237
|
+
constraints: entity.constraints.map(c => ({ name: c.name, change: 'added' })),
|
|
238
|
+
commands: [...entity.commands],
|
|
239
|
+
policies: [...entity.policies],
|
|
240
|
+
versionProperty: { from: undefined, to: entity.versionProperty },
|
|
241
|
+
});
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
const moduleChanged = old.module !== entity.module;
|
|
245
|
+
const versionPropertyChanged = old.versionProperty !== entity.versionProperty;
|
|
246
|
+
const properties = diffProperties(old.properties, entity.properties);
|
|
247
|
+
const computedProperties = diffComputedProperties(old.computedProperties, entity.computedProperties);
|
|
248
|
+
const relationships = diffRelationships(old.relationships, entity.relationships);
|
|
249
|
+
const constraints = diffConstraints(old.constraints, entity.constraints);
|
|
250
|
+
const commandsDiff = diffStringArrays(old.commands, entity.commands);
|
|
251
|
+
const policiesDiff = diffStringArrays(old.policies, entity.policies);
|
|
252
|
+
const hasChanges = moduleChanged || versionPropertyChanged ||
|
|
253
|
+
properties.length > 0 || computedProperties.length > 0 ||
|
|
254
|
+
relationships.length > 0 || constraints.length > 0 ||
|
|
255
|
+
commandsDiff.added.length > 0 || commandsDiff.removed.length > 0 ||
|
|
256
|
+
policiesDiff.added.length > 0 || policiesDiff.removed.length > 0;
|
|
257
|
+
if (hasChanges) {
|
|
258
|
+
result.push({
|
|
259
|
+
name,
|
|
260
|
+
change: 'changed',
|
|
261
|
+
...(moduleChanged ? { module: { from: old.module, to: entity.module } } : {}),
|
|
262
|
+
properties,
|
|
263
|
+
computedProperties,
|
|
264
|
+
relationships,
|
|
265
|
+
constraints,
|
|
266
|
+
commands: [...commandsDiff.added, ...commandsDiff.removed],
|
|
267
|
+
policies: [...policiesDiff.added, ...policiesDiff.removed],
|
|
268
|
+
...(versionPropertyChanged ? { versionProperty: { from: old.versionProperty, to: entity.versionProperty } } : {}),
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
273
|
+
}
|
|
274
|
+
// ============================================================================
|
|
275
|
+
// Command diffing
|
|
276
|
+
// ============================================================================
|
|
277
|
+
function diffCommands(oldCommands, newCommands) {
|
|
278
|
+
const result = [];
|
|
279
|
+
const oldMap = byName(oldCommands);
|
|
280
|
+
const newMap = byName(newCommands);
|
|
281
|
+
for (const [name] of oldMap) {
|
|
282
|
+
if (!newMap.has(name)) {
|
|
283
|
+
result.push({ name, change: 'removed' });
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
for (const [name, cmd] of newMap) {
|
|
287
|
+
const old = oldMap.get(name);
|
|
288
|
+
if (!old) {
|
|
289
|
+
result.push({ name, change: 'added' });
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
const entityChanged = old.entity !== cmd.entity;
|
|
293
|
+
const paramsDiff = diffStringArrays(old.parameters.map(p => `${p.name}:${serializeIRType(p.type)}`), cmd.parameters.map(p => `${p.name}:${serializeIRType(p.type)}`));
|
|
294
|
+
const guardsChanged = JSON.stringify(old.guards) !== JSON.stringify(cmd.guards);
|
|
295
|
+
const actionsChanged = JSON.stringify(old.actions) !== JSON.stringify(cmd.actions);
|
|
296
|
+
const emitsChanged = JSON.stringify([...old.emits].sort()) !== JSON.stringify([...cmd.emits].sort());
|
|
297
|
+
const returnsChanged = serializeIRType(old.returns ?? { name: 'void', nullable: false }) !==
|
|
298
|
+
serializeIRType(cmd.returns ?? { name: 'void', nullable: false });
|
|
299
|
+
if (entityChanged || paramsDiff.added.length > 0 || paramsDiff.removed.length > 0 ||
|
|
300
|
+
guardsChanged || actionsChanged || emitsChanged || returnsChanged) {
|
|
301
|
+
result.push({
|
|
302
|
+
name,
|
|
303
|
+
change: 'changed',
|
|
304
|
+
details: {
|
|
305
|
+
...(entityChanged ? { entity: { from: old.entity, to: cmd.entity } } : {}),
|
|
306
|
+
...(paramsDiff.added.length > 0 ? { parametersAdded: paramsDiff.added } : {}),
|
|
307
|
+
...(paramsDiff.removed.length > 0 ? { parametersRemoved: paramsDiff.removed } : {}),
|
|
308
|
+
...(guardsChanged ? { guardsChanged: true } : {}),
|
|
309
|
+
...(actionsChanged ? { actionsChanged: true } : {}),
|
|
310
|
+
...(emitsChanged ? { emitsChanged: true } : {}),
|
|
311
|
+
...(returnsChanged ? { returnsChanged: true } : {}),
|
|
312
|
+
},
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
317
|
+
}
|
|
318
|
+
// ============================================================================
|
|
319
|
+
// Policy diffing
|
|
320
|
+
// ============================================================================
|
|
321
|
+
function diffPolicies(oldPolicies, newPolicies) {
|
|
322
|
+
const result = [];
|
|
323
|
+
const oldMap = byName(oldPolicies);
|
|
324
|
+
const newMap = byName(newPolicies);
|
|
325
|
+
for (const [name] of oldMap) {
|
|
326
|
+
if (!newMap.has(name)) {
|
|
327
|
+
result.push({ name, change: 'removed' });
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
for (const [name, pol] of newMap) {
|
|
331
|
+
const old = oldMap.get(name);
|
|
332
|
+
if (!old) {
|
|
333
|
+
result.push({ name, change: 'added' });
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
const entityChanged = old.entity !== pol.entity;
|
|
337
|
+
const actionChanged = old.action !== pol.action;
|
|
338
|
+
const exprChanged = JSON.stringify(old.expression) !== JSON.stringify(pol.expression);
|
|
339
|
+
if (entityChanged || actionChanged || exprChanged) {
|
|
340
|
+
result.push({
|
|
341
|
+
name,
|
|
342
|
+
change: 'changed',
|
|
343
|
+
details: {
|
|
344
|
+
...(entityChanged ? { entity: { from: old.entity, to: pol.entity } } : {}),
|
|
345
|
+
...(actionChanged ? { action: { from: old.action, to: pol.action } } : {}),
|
|
346
|
+
...(exprChanged ? { expressionChanged: true } : {}),
|
|
347
|
+
},
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
352
|
+
}
|
|
353
|
+
// ============================================================================
|
|
354
|
+
// Store diffing
|
|
355
|
+
// ============================================================================
|
|
356
|
+
function diffStores(oldStores, newStores) {
|
|
357
|
+
const result = [];
|
|
358
|
+
const oldMap = byName(oldStores.map(s => ({ ...s, name: s.entity })));
|
|
359
|
+
const newMap = byName(newStores.map(s => ({ ...s, name: s.entity })));
|
|
360
|
+
for (const [entity] of oldMap) {
|
|
361
|
+
if (!newMap.has(entity)) {
|
|
362
|
+
result.push({ entity, change: 'removed' });
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
for (const [entity, store] of newMap) {
|
|
366
|
+
const old = oldMap.get(entity);
|
|
367
|
+
if (!old) {
|
|
368
|
+
result.push({ entity, change: 'added' });
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
371
|
+
const targetChanged = old.target !== store.target;
|
|
372
|
+
const configChanged = JSON.stringify(old.config) !== JSON.stringify(store.config);
|
|
373
|
+
if (targetChanged || configChanged) {
|
|
374
|
+
result.push({
|
|
375
|
+
entity,
|
|
376
|
+
change: 'changed',
|
|
377
|
+
details: {
|
|
378
|
+
...(targetChanged ? { target: { from: old.target, to: store.target } } : {}),
|
|
379
|
+
...(configChanged ? { configChanged: true } : {}),
|
|
380
|
+
},
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
return result.sort((a, b) => a.entity.localeCompare(b.entity));
|
|
385
|
+
}
|
|
386
|
+
// ============================================================================
|
|
387
|
+
// Event diffing
|
|
388
|
+
// ============================================================================
|
|
389
|
+
function diffEvents(oldEvents, newEvents) {
|
|
390
|
+
const result = [];
|
|
391
|
+
const oldMap = byName(oldEvents);
|
|
392
|
+
const newMap = byName(newEvents);
|
|
393
|
+
for (const [name] of oldMap) {
|
|
394
|
+
if (!newMap.has(name)) {
|
|
395
|
+
result.push({ name, change: 'removed' });
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
for (const [name, evt] of newMap) {
|
|
399
|
+
const old = oldMap.get(name);
|
|
400
|
+
if (!old) {
|
|
401
|
+
result.push({ name, change: 'added' });
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
const channelChanged = old.channel !== evt.channel;
|
|
405
|
+
const payloadChanged = JSON.stringify(old.payload) !== JSON.stringify(evt.payload);
|
|
406
|
+
if (channelChanged || payloadChanged) {
|
|
407
|
+
result.push({
|
|
408
|
+
name,
|
|
409
|
+
change: 'changed',
|
|
410
|
+
details: {
|
|
411
|
+
...(channelChanged ? { channel: { from: old.channel, to: evt.channel } } : {}),
|
|
412
|
+
...(payloadChanged ? { payloadChanged: true } : {}),
|
|
413
|
+
},
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
418
|
+
}
|
|
419
|
+
// ============================================================================
|
|
420
|
+
// Module diffing
|
|
421
|
+
// ============================================================================
|
|
422
|
+
function diffModules(oldModules, newModules) {
|
|
423
|
+
const result = [];
|
|
424
|
+
const oldMap = byName(oldModules);
|
|
425
|
+
const newMap = byName(newModules);
|
|
426
|
+
for (const [name, mod] of oldMap) {
|
|
427
|
+
if (!newMap.has(name)) {
|
|
428
|
+
result.push({
|
|
429
|
+
name,
|
|
430
|
+
change: 'removed',
|
|
431
|
+
entities: { added: [], removed: mod.entities },
|
|
432
|
+
commands: { added: [], removed: mod.commands },
|
|
433
|
+
stores: { added: [], removed: mod.stores },
|
|
434
|
+
events: { added: [], removed: mod.events },
|
|
435
|
+
policies: { added: [], removed: mod.policies },
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
for (const [name, mod] of newMap) {
|
|
440
|
+
const old = oldMap.get(name);
|
|
441
|
+
if (!old) {
|
|
442
|
+
result.push({
|
|
443
|
+
name,
|
|
444
|
+
change: 'added',
|
|
445
|
+
entities: { added: mod.entities, removed: [] },
|
|
446
|
+
commands: { added: mod.commands, removed: [] },
|
|
447
|
+
stores: { added: mod.stores, removed: [] },
|
|
448
|
+
events: { added: mod.events, removed: [] },
|
|
449
|
+
policies: { added: mod.policies, removed: [] },
|
|
450
|
+
});
|
|
451
|
+
continue;
|
|
452
|
+
}
|
|
453
|
+
const entitiesDiff = diffStringArrays(old.entities, mod.entities);
|
|
454
|
+
const commandsDiff = diffStringArrays(old.commands, mod.commands);
|
|
455
|
+
const storesDiff = diffStringArrays(old.stores, mod.stores);
|
|
456
|
+
const eventsDiff = diffStringArrays(old.events, mod.events);
|
|
457
|
+
const policiesDiff = diffStringArrays(old.policies, mod.policies);
|
|
458
|
+
const hasChanges = entitiesDiff.added.length > 0 || entitiesDiff.removed.length > 0 ||
|
|
459
|
+
commandsDiff.added.length > 0 || commandsDiff.removed.length > 0 ||
|
|
460
|
+
storesDiff.added.length > 0 || storesDiff.removed.length > 0 ||
|
|
461
|
+
eventsDiff.added.length > 0 || eventsDiff.removed.length > 0 ||
|
|
462
|
+
policiesDiff.added.length > 0 || policiesDiff.removed.length > 0;
|
|
463
|
+
if (hasChanges) {
|
|
464
|
+
result.push({
|
|
465
|
+
name,
|
|
466
|
+
change: 'changed',
|
|
467
|
+
entities: entitiesDiff,
|
|
468
|
+
commands: commandsDiff,
|
|
469
|
+
stores: storesDiff,
|
|
470
|
+
events: eventsDiff,
|
|
471
|
+
policies: policiesDiff,
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
return result.sort((a, b) => a.name.localeCompare(b.name));
|
|
476
|
+
}
|
|
477
|
+
// ============================================================================
|
|
478
|
+
// String array diffing helper
|
|
479
|
+
// ============================================================================
|
|
480
|
+
function diffStringArrays(oldArr, newArr) {
|
|
481
|
+
const oldSet = new Set(oldArr);
|
|
482
|
+
const newSet = new Set(newArr);
|
|
483
|
+
return {
|
|
484
|
+
added: newArr.filter(v => !oldSet.has(v)).sort(),
|
|
485
|
+
removed: oldArr.filter(v => !newSet.has(v)).sort(),
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
// ============================================================================
|
|
489
|
+
// Main diff function
|
|
490
|
+
// ============================================================================
|
|
491
|
+
/**
|
|
492
|
+
* Compare two IR versions and produce a structured diff report.
|
|
493
|
+
*/
|
|
494
|
+
export function diffIR(oldIR, newIR) {
|
|
495
|
+
const entityDiffs = diffEntities(oldIR, newIR);
|
|
496
|
+
const commandDiffs = diffCommands(oldIR.commands, newIR.commands);
|
|
497
|
+
const policyDiffs = diffPolicies(oldIR.policies, newIR.policies);
|
|
498
|
+
const storeDiffs = diffStores(oldIR.stores, newIR.stores);
|
|
499
|
+
const eventDiffs = diffEvents(oldIR.events, newIR.events);
|
|
500
|
+
const moduleDiffs = diffModules(oldIR.modules, newIR.modules);
|
|
501
|
+
const entitiesAdded = entityDiffs.filter(d => d.change === 'added').length;
|
|
502
|
+
const entitiesRemoved = entityDiffs.filter(d => d.change === 'removed').length;
|
|
503
|
+
const entitiesChanged = entityDiffs.filter(d => d.change === 'changed').length;
|
|
504
|
+
const commandsAdded = commandDiffs.filter(d => d.change === 'added').length;
|
|
505
|
+
const commandsRemoved = commandDiffs.filter(d => d.change === 'removed').length;
|
|
506
|
+
const commandsChanged = commandDiffs.filter(d => d.change === 'changed').length;
|
|
507
|
+
const policiesAdded = policyDiffs.filter(d => d.change === 'added').length;
|
|
508
|
+
const policiesRemoved = policyDiffs.filter(d => d.change === 'removed').length;
|
|
509
|
+
const policiesChanged = policyDiffs.filter(d => d.change === 'changed').length;
|
|
510
|
+
const eventsAdded = eventDiffs.filter(d => d.change === 'added').length;
|
|
511
|
+
const eventsRemoved = eventDiffs.filter(d => d.change === 'removed').length;
|
|
512
|
+
const eventsChanged = eventDiffs.filter(d => d.change === 'changed').length;
|
|
513
|
+
const storesAdded = storeDiffs.filter(d => d.change === 'added').length;
|
|
514
|
+
const storesRemoved = storeDiffs.filter(d => d.change === 'removed').length;
|
|
515
|
+
const storesChanged = storeDiffs.filter(d => d.change === 'changed').length;
|
|
516
|
+
const modulesAdded = moduleDiffs.filter(d => d.change === 'added').length;
|
|
517
|
+
const modulesRemoved = moduleDiffs.filter(d => d.change === 'removed').length;
|
|
518
|
+
const hasChanges = entitiesAdded + entitiesRemoved + entitiesChanged +
|
|
519
|
+
commandsAdded + commandsRemoved + commandsChanged +
|
|
520
|
+
policiesAdded + policiesRemoved + policiesChanged +
|
|
521
|
+
eventsAdded + eventsRemoved + eventsChanged +
|
|
522
|
+
storesAdded + storesRemoved + storesChanged +
|
|
523
|
+
modulesAdded + modulesRemoved > 0;
|
|
524
|
+
return {
|
|
525
|
+
summary: {
|
|
526
|
+
entitiesAdded, entitiesRemoved, entitiesChanged,
|
|
527
|
+
commandsAdded, commandsRemoved, commandsChanged,
|
|
528
|
+
policiesAdded, policiesRemoved, policiesChanged,
|
|
529
|
+
eventsAdded, eventsRemoved, eventsChanged,
|
|
530
|
+
storesAdded, storesRemoved, storesChanged,
|
|
531
|
+
modulesAdded, modulesRemoved,
|
|
532
|
+
hasChanges,
|
|
533
|
+
},
|
|
534
|
+
modules: moduleDiffs,
|
|
535
|
+
entities: entityDiffs,
|
|
536
|
+
commands: commandDiffs,
|
|
537
|
+
policies: policyDiffs,
|
|
538
|
+
stores: storeDiffs,
|
|
539
|
+
events: eventDiffs,
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
// ============================================================================
|
|
543
|
+
// Migration generation
|
|
544
|
+
// ============================================================================
|
|
545
|
+
/**
|
|
546
|
+
* Manifest IR type to SQL type mapping.
|
|
547
|
+
* This is the default mapping; consumers can override via the Prisma projection config.
|
|
548
|
+
*/
|
|
549
|
+
function irTypeToSql(type) {
|
|
550
|
+
const nullable = type.nullable ? '' : ' NOT NULL';
|
|
551
|
+
const base = type.name === 'array' && type.generic
|
|
552
|
+
? 'JSONB' // Arrays stored as JSONB
|
|
553
|
+
: sqlScalarForTypeName(type.name);
|
|
554
|
+
return `${base}${nullable}`;
|
|
555
|
+
}
|
|
556
|
+
function sqlScalarForTypeName(name) {
|
|
557
|
+
switch (name) {
|
|
558
|
+
case 'string': return 'TEXT';
|
|
559
|
+
case 'boolean': return 'BOOLEAN';
|
|
560
|
+
case 'int': return 'INTEGER';
|
|
561
|
+
case 'bigint': return 'BIGINT';
|
|
562
|
+
case 'float': return 'DOUBLE PRECISION';
|
|
563
|
+
case 'decimal':
|
|
564
|
+
case 'money': return 'DECIMAL(12,2)';
|
|
565
|
+
case 'date': return 'DATE';
|
|
566
|
+
case 'datetime': return 'TIMESTAMPTZ';
|
|
567
|
+
case 'json': return 'JSONB';
|
|
568
|
+
case 'uuid': return 'UUID';
|
|
569
|
+
case 'text': return 'TEXT';
|
|
570
|
+
case 'bytes': return 'BYTEA';
|
|
571
|
+
default: return 'TEXT';
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
function irTypeToPrisma(type) {
|
|
575
|
+
const base = type.name === 'array' && type.generic
|
|
576
|
+
? `${irScalarToPrisma(type.generic.name)}[]`
|
|
577
|
+
: irScalarToPrisma(type.name);
|
|
578
|
+
const nullable = type.nullable ? '?' : '';
|
|
579
|
+
return `${base}${nullable}`;
|
|
580
|
+
}
|
|
581
|
+
function irScalarToPrisma(name) {
|
|
582
|
+
switch (name) {
|
|
583
|
+
case 'string': return 'String';
|
|
584
|
+
case 'boolean': return 'Boolean';
|
|
585
|
+
case 'int': return 'Int';
|
|
586
|
+
case 'bigint': return 'BigInt';
|
|
587
|
+
case 'float': return 'Float';
|
|
588
|
+
case 'decimal':
|
|
589
|
+
case 'money': return 'Decimal';
|
|
590
|
+
case 'date':
|
|
591
|
+
case 'datetime': return 'DateTime';
|
|
592
|
+
case 'json': return 'Json';
|
|
593
|
+
case 'uuid': return 'String';
|
|
594
|
+
case 'text': return 'String';
|
|
595
|
+
case 'bytes': return 'Bytes';
|
|
596
|
+
default: return 'String';
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Generate migration scripts (SQL and Prisma) from an IR diff report.
|
|
601
|
+
*
|
|
602
|
+
* The migration is advisory — the consumer decides whether to apply.
|
|
603
|
+
* Generated SQL targets PostgreSQL. Prisma output provides the equivalent
|
|
604
|
+
* Prisma schema steps.
|
|
605
|
+
*/
|
|
606
|
+
export function generateMigration(diff, _oldIR, newIR) {
|
|
607
|
+
const sql = [];
|
|
608
|
+
const prisma = [];
|
|
609
|
+
const summary = [];
|
|
610
|
+
const warnings = [];
|
|
611
|
+
// Process entity changes into table-level operations
|
|
612
|
+
for (const entityDiff of diff.entities) {
|
|
613
|
+
const tableName = entityDiff.name.toLowerCase();
|
|
614
|
+
if (entityDiff.change === 'added') {
|
|
615
|
+
sql.push(`-- Create table for entity: ${entityDiff.name}`);
|
|
616
|
+
const newEntity = newIR.entities.find(e => e.name === entityDiff.name);
|
|
617
|
+
const columns = newEntity.properties.map(p => {
|
|
618
|
+
const colDef = ` ${p.name} ${irTypeToSql(p.type)}`;
|
|
619
|
+
const isUnique = p.modifiers.includes('unique');
|
|
620
|
+
const extra = [];
|
|
621
|
+
if (p.name === 'id')
|
|
622
|
+
extra.push('PRIMARY KEY');
|
|
623
|
+
if (isUnique && p.name !== 'id')
|
|
624
|
+
extra.push('UNIQUE');
|
|
625
|
+
if (p.defaultValue) {
|
|
626
|
+
const def = serializeIRValue(p.defaultValue);
|
|
627
|
+
extra.push(`DEFAULT ${def}`);
|
|
628
|
+
}
|
|
629
|
+
return colDef + (extra.length ? ' ' + extra.join(' ') : '');
|
|
630
|
+
});
|
|
631
|
+
sql.push(`CREATE TABLE "${tableName}" (\n${columns.join(',\n')}\n);`);
|
|
632
|
+
prisma.push(`// Create model: ${entityDiff.name}`);
|
|
633
|
+
prisma.push(`model ${entityDiff.name} {`);
|
|
634
|
+
for (const p of newEntity.properties) {
|
|
635
|
+
const typeStr = irTypeToPrisma(p.type);
|
|
636
|
+
const attrs = [];
|
|
637
|
+
if (p.name === 'id')
|
|
638
|
+
attrs.push('@id');
|
|
639
|
+
if (p.modifiers.includes('unique') && p.name !== 'id')
|
|
640
|
+
attrs.push('@unique');
|
|
641
|
+
if (p.defaultValue)
|
|
642
|
+
attrs.push(`@default(${serializeIRValue(p.defaultValue)})`);
|
|
643
|
+
prisma.push(` ${p.name} ${typeStr}${attrs.length ? ' ' + attrs.join(' ') : ''}`);
|
|
644
|
+
}
|
|
645
|
+
prisma.push('}');
|
|
646
|
+
summary.push(`Added entity '${entityDiff.name}' (new table '${tableName}')`);
|
|
647
|
+
}
|
|
648
|
+
else if (entityDiff.change === 'removed') {
|
|
649
|
+
warnings.push(`DROPPING TABLE '${tableName}' — all data will be lost!`);
|
|
650
|
+
sql.push(`-- Drop table for removed entity: ${entityDiff.name}`);
|
|
651
|
+
sql.push(`DROP TABLE IF EXISTS "${tableName}";`);
|
|
652
|
+
prisma.push(`// Remove model: ${entityDiff.name}`);
|
|
653
|
+
summary.push(`Removed entity '${entityDiff.name}' (drops table '${tableName}')`);
|
|
654
|
+
}
|
|
655
|
+
else if (entityDiff.change === 'changed') {
|
|
656
|
+
sql.push(`-- Alter table for entity: ${entityDiff.name}`);
|
|
657
|
+
prisma.push(`// Alter model: ${entityDiff.name}`);
|
|
658
|
+
for (const propDiff of entityDiff.properties) {
|
|
659
|
+
if (propDiff.change === 'added') {
|
|
660
|
+
const newProp = newIR.entities.find(e => e.name === entityDiff.name)
|
|
661
|
+
.properties.find(p => p.name === propDiff.name);
|
|
662
|
+
const colType = irTypeToSql(newProp.type);
|
|
663
|
+
sql.push(`ALTER TABLE "${tableName}" ADD COLUMN "${propDiff.name}" ${colType};`);
|
|
664
|
+
prisma.push(`// Add field: ${propDiff.name} ${irTypeToPrisma(newProp.type)}`);
|
|
665
|
+
summary.push(`Added property '${entityDiff.name}.${propDiff.name}'`);
|
|
666
|
+
}
|
|
667
|
+
else if (propDiff.change === 'removed') {
|
|
668
|
+
warnings.push(`DROPPING COLUMN '${tableName}.${propDiff.name}' — data will be lost!`);
|
|
669
|
+
sql.push(`ALTER TABLE "${tableName}" DROP COLUMN IF EXISTS "${propDiff.name}";`);
|
|
670
|
+
prisma.push(`// Remove field: ${propDiff.name}`);
|
|
671
|
+
summary.push(`Removed property '${entityDiff.name}.${propDiff.name}'`);
|
|
672
|
+
}
|
|
673
|
+
else if (propDiff.change === 'changed' && propDiff.details) {
|
|
674
|
+
if (propDiff.details.type) {
|
|
675
|
+
sql.push(`ALTER TABLE "${tableName}" ALTER COLUMN "${propDiff.name}" TYPE ${propDiff.details.type.to};`);
|
|
676
|
+
prisma.push(`// Change field type: ${propDiff.name} from ${propDiff.details.type.from} to ${propDiff.details.type.to}`);
|
|
677
|
+
summary.push(`Changed type of '${entityDiff.name}.${propDiff.name}' from ${propDiff.details.type.from} to ${propDiff.details.type.to}`);
|
|
678
|
+
}
|
|
679
|
+
if (propDiff.details.modifiers) {
|
|
680
|
+
const oldUnique = propDiff.details.modifiers.from.includes('unique');
|
|
681
|
+
const newUnique = propDiff.details.modifiers.to.includes('unique');
|
|
682
|
+
if (!oldUnique && newUnique) {
|
|
683
|
+
sql.push(`ALTER TABLE "${tableName}" ADD UNIQUE ("${propDiff.name}");`);
|
|
684
|
+
}
|
|
685
|
+
else if (oldUnique && !newUnique) {
|
|
686
|
+
sql.push(`ALTER TABLE "${tableName}" DROP CONSTRAINT IF EXISTS "${tableName}_${propDiff.name}_key";`);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
// Constraint changes
|
|
692
|
+
for (const constraintDiff of entityDiff.constraints) {
|
|
693
|
+
if (constraintDiff.change === 'added') {
|
|
694
|
+
summary.push(`Added constraint '${entityDiff.name}.${constraintDiff.name}'`);
|
|
695
|
+
}
|
|
696
|
+
else if (constraintDiff.change === 'removed') {
|
|
697
|
+
summary.push(`Removed constraint '${entityDiff.name}.${constraintDiff.name}'`);
|
|
698
|
+
}
|
|
699
|
+
else if (constraintDiff.change === 'changed') {
|
|
700
|
+
summary.push(`Changed constraint '${entityDiff.name}.${constraintDiff.name}'`);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
// Store changes (may affect where data lives)
|
|
706
|
+
for (const storeDiff of diff.stores) {
|
|
707
|
+
if (storeDiff.change === 'added') {
|
|
708
|
+
summary.push(`Added store for '${storeDiff.entity}'`);
|
|
709
|
+
}
|
|
710
|
+
else if (storeDiff.change === 'removed') {
|
|
711
|
+
summary.push(`Removed store for '${storeDiff.entity}'`);
|
|
712
|
+
}
|
|
713
|
+
else if (storeDiff.change === 'changed') {
|
|
714
|
+
summary.push(`Changed store for '${storeDiff.entity}'`);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
// Event changes
|
|
718
|
+
for (const eventDiff of diff.events) {
|
|
719
|
+
summary.push(`${eventDiff.change} event '${eventDiff.name}'`);
|
|
720
|
+
}
|
|
721
|
+
// Command changes
|
|
722
|
+
for (const cmdDiff of diff.commands) {
|
|
723
|
+
summary.push(`${cmdDiff.change} command '${cmdDiff.name}'`);
|
|
724
|
+
}
|
|
725
|
+
// Policy changes
|
|
726
|
+
for (const policyDiff of diff.policies) {
|
|
727
|
+
summary.push(`${policyDiff.change} policy '${policyDiff.name}'`);
|
|
728
|
+
}
|
|
729
|
+
return { sql, prisma, summary, warnings };
|
|
730
|
+
}
|
|
731
|
+
//# sourceMappingURL=ir-diff.js.map
|