@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,686 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analytics projection for Manifest IR.
|
|
3
|
+
*
|
|
4
|
+
* Generates typed analytics event schemas for Segment, Amplitude, Mixpanel,
|
|
5
|
+
* or Snowplow from IR command executions and entity state changes.
|
|
6
|
+
*
|
|
7
|
+
* Surfaces:
|
|
8
|
+
* - analytics.tracking-plan → JSON tracking plan document (all events with schemas)
|
|
9
|
+
* - analytics.events → TypeScript typed event interfaces and a track() function
|
|
10
|
+
* - analytics.handlers → Typed analytics.track() calls injected into command handlers
|
|
11
|
+
*
|
|
12
|
+
* The tracking plan follows the Segment/Tracking Plan spec format so it can
|
|
13
|
+
* be consumed by any provider's schema validation tooling.
|
|
14
|
+
*/
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Surface constants
|
|
17
|
+
// ============================================================================
|
|
18
|
+
export const SURFACE_TRACKING_PLAN = 'analytics.tracking-plan';
|
|
19
|
+
export const SURFACE_EVENTS = 'analytics.events';
|
|
20
|
+
export const SURFACE_HANDLERS = 'analytics.handlers';
|
|
21
|
+
export const SURFACES = [
|
|
22
|
+
SURFACE_TRACKING_PLAN,
|
|
23
|
+
SURFACE_EVENTS,
|
|
24
|
+
SURFACE_HANDLERS,
|
|
25
|
+
];
|
|
26
|
+
const PROVIDER_CONFIGS = {
|
|
27
|
+
segment: {
|
|
28
|
+
defaultImportPath: '@segment/analytics-next',
|
|
29
|
+
trackFn: 'analytics.track',
|
|
30
|
+
signature: 'two-arg',
|
|
31
|
+
},
|
|
32
|
+
amplitude: {
|
|
33
|
+
defaultImportPath: '@amplitude/analytics-browser',
|
|
34
|
+
trackFn: 'analytics.track',
|
|
35
|
+
signature: 'two-arg',
|
|
36
|
+
},
|
|
37
|
+
mixpanel: {
|
|
38
|
+
defaultImportPath: 'mixpanel-browser',
|
|
39
|
+
trackFn: 'mixpanel.track',
|
|
40
|
+
signature: 'two-arg',
|
|
41
|
+
},
|
|
42
|
+
snowplow: {
|
|
43
|
+
defaultImportPath: '@snowplow/browser-tracker',
|
|
44
|
+
trackFn: 'trackSelfDescribingEvent',
|
|
45
|
+
signature: 'schema-payload',
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
function normalizeOptions(options) {
|
|
49
|
+
const provider = options?.provider ?? 'segment';
|
|
50
|
+
const providerConfig = PROVIDER_CONFIGS[provider];
|
|
51
|
+
return {
|
|
52
|
+
provider,
|
|
53
|
+
importPath: options?.importPath ?? providerConfig.defaultImportPath,
|
|
54
|
+
emitHeader: options?.emitHeader !== false,
|
|
55
|
+
includeEntityProperties: options?.includeEntityProperties !== false,
|
|
56
|
+
emitPerEntityHandlers: options?.emitPerEntityHandlers !== false,
|
|
57
|
+
eventNamespace: options?.eventNamespace ?? '',
|
|
58
|
+
providerConfig,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
// ============================================================================
|
|
62
|
+
// IR type → JSON Schema type mapping (for the tracking plan)
|
|
63
|
+
// ============================================================================
|
|
64
|
+
function irTypeToJsonSchemaType(type) {
|
|
65
|
+
switch (type.name) {
|
|
66
|
+
case 'string':
|
|
67
|
+
case 'text':
|
|
68
|
+
case 'email':
|
|
69
|
+
case 'url':
|
|
70
|
+
case 'uri':
|
|
71
|
+
case 'date':
|
|
72
|
+
case 'datetime':
|
|
73
|
+
case 'uuid':
|
|
74
|
+
return 'string';
|
|
75
|
+
case 'int':
|
|
76
|
+
case 'integer':
|
|
77
|
+
case 'bigint':
|
|
78
|
+
case 'float':
|
|
79
|
+
case 'number':
|
|
80
|
+
case 'decimal':
|
|
81
|
+
case 'money':
|
|
82
|
+
return 'number';
|
|
83
|
+
case 'boolean':
|
|
84
|
+
case 'bool':
|
|
85
|
+
return 'boolean';
|
|
86
|
+
case 'json':
|
|
87
|
+
case 'object':
|
|
88
|
+
return 'object';
|
|
89
|
+
case 'array':
|
|
90
|
+
return 'array';
|
|
91
|
+
case 'map':
|
|
92
|
+
return 'object';
|
|
93
|
+
case 'bytes':
|
|
94
|
+
return 'string';
|
|
95
|
+
default:
|
|
96
|
+
return 'string';
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function irTypeToJsonSchema(type) {
|
|
100
|
+
const result = {
|
|
101
|
+
type: irTypeToJsonSchemaType(type),
|
|
102
|
+
};
|
|
103
|
+
if (type.nullable) {
|
|
104
|
+
result.nullable = true;
|
|
105
|
+
}
|
|
106
|
+
if (type.name === 'array' && type.generic) {
|
|
107
|
+
result.items = irTypeToJsonSchema(type.generic);
|
|
108
|
+
}
|
|
109
|
+
if (type.name === 'map' && type.generic) {
|
|
110
|
+
result.additionalProperties = irTypeToJsonSchema(type.generic);
|
|
111
|
+
}
|
|
112
|
+
if (type.name === 'date') {
|
|
113
|
+
result.format = 'date';
|
|
114
|
+
}
|
|
115
|
+
if (type.name === 'datetime') {
|
|
116
|
+
result.format = 'date-time';
|
|
117
|
+
}
|
|
118
|
+
if (type.name === 'uuid') {
|
|
119
|
+
result.format = 'uuid';
|
|
120
|
+
}
|
|
121
|
+
if (type.name === 'email') {
|
|
122
|
+
result.format = 'email';
|
|
123
|
+
}
|
|
124
|
+
if (type.name === 'url' || type.name === 'uri') {
|
|
125
|
+
result.format = 'uri';
|
|
126
|
+
}
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
// ============================================================================
|
|
130
|
+
// IR type → TypeScript type mapping (for typed events/handlers)
|
|
131
|
+
// ============================================================================
|
|
132
|
+
function irTypeToTs(type) {
|
|
133
|
+
switch (type.name) {
|
|
134
|
+
case 'string':
|
|
135
|
+
case 'text':
|
|
136
|
+
case 'email':
|
|
137
|
+
case 'url':
|
|
138
|
+
case 'uri':
|
|
139
|
+
case 'uuid':
|
|
140
|
+
return 'string';
|
|
141
|
+
case 'int':
|
|
142
|
+
case 'integer':
|
|
143
|
+
case 'bigint':
|
|
144
|
+
case 'float':
|
|
145
|
+
case 'number':
|
|
146
|
+
case 'decimal':
|
|
147
|
+
case 'money':
|
|
148
|
+
return 'number';
|
|
149
|
+
case 'boolean':
|
|
150
|
+
case 'bool':
|
|
151
|
+
return 'boolean';
|
|
152
|
+
case 'date':
|
|
153
|
+
case 'datetime':
|
|
154
|
+
return 'string';
|
|
155
|
+
case 'json':
|
|
156
|
+
case 'object':
|
|
157
|
+
return 'Record<string, unknown>';
|
|
158
|
+
case 'array':
|
|
159
|
+
if (type.generic) {
|
|
160
|
+
return `${irTypeToTs(type.generic)}[]`;
|
|
161
|
+
}
|
|
162
|
+
return 'unknown[]';
|
|
163
|
+
case 'map':
|
|
164
|
+
if (type.generic) {
|
|
165
|
+
return `Record<string, ${irTypeToTs(type.generic)}>`;
|
|
166
|
+
}
|
|
167
|
+
return 'Record<string, unknown>';
|
|
168
|
+
case 'bytes':
|
|
169
|
+
return 'string';
|
|
170
|
+
case 'any':
|
|
171
|
+
return 'unknown';
|
|
172
|
+
default:
|
|
173
|
+
return 'unknown';
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function irTypeToTsOptional(type, required) {
|
|
177
|
+
const base = irTypeToTs(type);
|
|
178
|
+
if (!required || type.nullable) {
|
|
179
|
+
return `${base} | null`;
|
|
180
|
+
}
|
|
181
|
+
return base;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Derive all analytics events from the IR.
|
|
185
|
+
* Sources:
|
|
186
|
+
* 1. Command emits → one event per emit per command
|
|
187
|
+
* 2. IREvent declarations
|
|
188
|
+
* 3. Entity property changes (if includeEntityProperties)
|
|
189
|
+
*/
|
|
190
|
+
function deriveEvents(ir, opts, _diagnostics) {
|
|
191
|
+
const events = [];
|
|
192
|
+
const seen = new Set();
|
|
193
|
+
// Build lookup: event name → IREvent (for payload enrichment)
|
|
194
|
+
const eventDeclByName = new Map();
|
|
195
|
+
for (const evt of ir.events) {
|
|
196
|
+
eventDeclByName.set(evt.name, evt);
|
|
197
|
+
}
|
|
198
|
+
// Derive events from commands (command execution → event)
|
|
199
|
+
for (const cmd of ir.commands) {
|
|
200
|
+
if (!cmd.entity)
|
|
201
|
+
continue;
|
|
202
|
+
for (const emitName of cmd.emits) {
|
|
203
|
+
const eventDecl = eventDeclByName.get(emitName);
|
|
204
|
+
const properties = [];
|
|
205
|
+
if (eventDecl) {
|
|
206
|
+
// Use declared event payload
|
|
207
|
+
if (Array.isArray(eventDecl.payload)) {
|
|
208
|
+
for (const field of eventDecl.payload) {
|
|
209
|
+
properties.push({
|
|
210
|
+
name: field.name,
|
|
211
|
+
type: field.type,
|
|
212
|
+
required: field.required ?? true,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
// Synthesize from command parameters
|
|
219
|
+
for (const param of cmd.parameters) {
|
|
220
|
+
properties.push({
|
|
221
|
+
name: param.name,
|
|
222
|
+
type: param.type,
|
|
223
|
+
required: param.required,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
// Add entity id reference
|
|
227
|
+
properties.push({
|
|
228
|
+
name: 'entityId',
|
|
229
|
+
type: { name: 'string', nullable: false },
|
|
230
|
+
required: true,
|
|
231
|
+
description: 'ID of the affected entity instance',
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
const eventName = namespaceEvent(emitName, opts.eventNamespace);
|
|
235
|
+
if (seen.has(eventName))
|
|
236
|
+
continue;
|
|
237
|
+
seen.add(eventName);
|
|
238
|
+
events.push({
|
|
239
|
+
name: eventName,
|
|
240
|
+
description: `Emitted when command '${cmd.name}' executes on ${cmd.entity}`,
|
|
241
|
+
entity: cmd.entity,
|
|
242
|
+
command: cmd.name,
|
|
243
|
+
channel: eventDecl?.channel,
|
|
244
|
+
properties,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
// Include standalone IREvent declarations that weren't already captured
|
|
249
|
+
for (const evt of ir.events) {
|
|
250
|
+
const eventName = namespaceEvent(evt.name, opts.eventNamespace);
|
|
251
|
+
if (seen.has(eventName))
|
|
252
|
+
continue;
|
|
253
|
+
seen.add(eventName);
|
|
254
|
+
const properties = [];
|
|
255
|
+
if (Array.isArray(evt.payload)) {
|
|
256
|
+
for (const field of evt.payload) {
|
|
257
|
+
properties.push({
|
|
258
|
+
name: field.name,
|
|
259
|
+
type: field.type,
|
|
260
|
+
required: field.required ?? true,
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
events.push({
|
|
265
|
+
name: eventName,
|
|
266
|
+
description: `Standalone event '${evt.name}' on channel '${evt.channel}'`,
|
|
267
|
+
entity: '',
|
|
268
|
+
channel: evt.channel,
|
|
269
|
+
properties,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
// Derive entity property events (state change tracking)
|
|
273
|
+
if (opts.includeEntityProperties) {
|
|
274
|
+
for (const entity of ir.entities) {
|
|
275
|
+
for (const prop of entity.properties) {
|
|
276
|
+
const eventName = namespaceEvent(`${entity.name} ${prop.name} Changed`, opts.eventNamespace);
|
|
277
|
+
if (seen.has(eventName))
|
|
278
|
+
continue;
|
|
279
|
+
seen.add(eventName);
|
|
280
|
+
events.push({
|
|
281
|
+
name: eventName,
|
|
282
|
+
description: `Entity property '${prop.name}' changed on ${entity.name}`,
|
|
283
|
+
entity: entity.name,
|
|
284
|
+
properties: [
|
|
285
|
+
{
|
|
286
|
+
name: 'entityId',
|
|
287
|
+
type: { name: 'string', nullable: false },
|
|
288
|
+
required: true,
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: 'oldValue',
|
|
292
|
+
type: prop.type,
|
|
293
|
+
required: false,
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'newValue',
|
|
297
|
+
type: prop.type,
|
|
298
|
+
required: true,
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// Sort events deterministically
|
|
306
|
+
events.sort((a, b) => a.name.localeCompare(b.name));
|
|
307
|
+
return events;
|
|
308
|
+
}
|
|
309
|
+
function namespaceEvent(name, namespace) {
|
|
310
|
+
if (!namespace)
|
|
311
|
+
return name;
|
|
312
|
+
return `${namespace} ${name}`;
|
|
313
|
+
}
|
|
314
|
+
// ============================================================================
|
|
315
|
+
// Property name helpers
|
|
316
|
+
// ============================================================================
|
|
317
|
+
function toPascalCase(name) {
|
|
318
|
+
return name
|
|
319
|
+
.split(/[\s_-]+/)
|
|
320
|
+
.map(w => w.charAt(0).toUpperCase() + w.slice(1))
|
|
321
|
+
.join('')
|
|
322
|
+
.replace(/[^a-zA-Z0-9]/g, '');
|
|
323
|
+
}
|
|
324
|
+
function toCamelCase(name) {
|
|
325
|
+
const pascal = toPascalCase(name);
|
|
326
|
+
return pascal.charAt(0).toLowerCase() + pascal.slice(1);
|
|
327
|
+
}
|
|
328
|
+
// ============================================================================
|
|
329
|
+
// Tracking plan surface (JSON document)
|
|
330
|
+
// ============================================================================
|
|
331
|
+
function generateTrackingPlan(ir, opts, _diagnostics) {
|
|
332
|
+
const events = deriveEvents(ir, opts, _diagnostics);
|
|
333
|
+
const plan = {
|
|
334
|
+
$schema: 'https://json.schemastore.org/tracking-plan.json',
|
|
335
|
+
provider: opts.provider,
|
|
336
|
+
namespace: opts.eventNamespace || undefined,
|
|
337
|
+
generatedAt: new Date().toISOString(),
|
|
338
|
+
source: {
|
|
339
|
+
irVersion: ir.version,
|
|
340
|
+
contentHash: ir.provenance.contentHash,
|
|
341
|
+
},
|
|
342
|
+
events: events.map(evt => ({
|
|
343
|
+
name: evt.name,
|
|
344
|
+
description: evt.description,
|
|
345
|
+
entity: evt.entity,
|
|
346
|
+
command: evt.command,
|
|
347
|
+
channel: evt.channel,
|
|
348
|
+
properties: Object.fromEntries(evt.properties.map(p => [
|
|
349
|
+
p.name,
|
|
350
|
+
{
|
|
351
|
+
...irTypeToJsonSchema(p.type),
|
|
352
|
+
required: p.required,
|
|
353
|
+
description: p.description,
|
|
354
|
+
},
|
|
355
|
+
])),
|
|
356
|
+
})),
|
|
357
|
+
};
|
|
358
|
+
return JSON.stringify(plan, null, 2);
|
|
359
|
+
}
|
|
360
|
+
// ============================================================================
|
|
361
|
+
// Typed events surface (TypeScript)
|
|
362
|
+
// ============================================================================
|
|
363
|
+
function generateTypedEvents(ir, opts, _diagnostics) {
|
|
364
|
+
const events = deriveEvents(ir, opts, _diagnostics);
|
|
365
|
+
const lines = [];
|
|
366
|
+
if (opts.emitHeader) {
|
|
367
|
+
lines.push('/**');
|
|
368
|
+
lines.push(' * Auto-generated by Manifest Analytics projection');
|
|
369
|
+
lines.push(` * Generated at: ${new Date().toISOString()}`);
|
|
370
|
+
lines.push(' *');
|
|
371
|
+
lines.push(` * Provider: ${opts.provider}`);
|
|
372
|
+
lines.push(' * DO NOT EDIT — regenerate with: manifest generate --surface analytics.events');
|
|
373
|
+
lines.push(' */');
|
|
374
|
+
lines.push('');
|
|
375
|
+
}
|
|
376
|
+
// Event property type interfaces
|
|
377
|
+
lines.push('// ============================================================================');
|
|
378
|
+
lines.push('// Event property types');
|
|
379
|
+
lines.push('// ============================================================================');
|
|
380
|
+
lines.push('');
|
|
381
|
+
for (const evt of events) {
|
|
382
|
+
const ifaceName = `${toPascalCase(evt.name)}Properties`;
|
|
383
|
+
if (evt.properties.length === 0) {
|
|
384
|
+
lines.push(`export type ${ifaceName} = Record<string, never>;`);
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
lines.push(`export interface ${ifaceName} {`);
|
|
388
|
+
for (const prop of evt.properties) {
|
|
389
|
+
const tsType = irTypeToTsOptional(prop.type, prop.required);
|
|
390
|
+
const optional = prop.required ? '' : '?';
|
|
391
|
+
lines.push(` ${prop.name}${optional}: ${tsType};`);
|
|
392
|
+
}
|
|
393
|
+
lines.push('}');
|
|
394
|
+
}
|
|
395
|
+
lines.push('');
|
|
396
|
+
}
|
|
397
|
+
// Event name constants
|
|
398
|
+
lines.push('// ============================================================================');
|
|
399
|
+
lines.push('// Event name constants');
|
|
400
|
+
lines.push('// ============================================================================');
|
|
401
|
+
lines.push('');
|
|
402
|
+
lines.push('export const AnalyticsEvents = {');
|
|
403
|
+
for (const evt of events) {
|
|
404
|
+
const constName = toCamelCase(evt.name);
|
|
405
|
+
lines.push(` ${constName}: ${JSON.stringify(evt.name)},`);
|
|
406
|
+
}
|
|
407
|
+
lines.push('} as const;');
|
|
408
|
+
lines.push('');
|
|
409
|
+
// Full event map (name → properties type)
|
|
410
|
+
lines.push('// ============================================================================');
|
|
411
|
+
lines.push('// Event → properties type map');
|
|
412
|
+
lines.push('// ============================================================================');
|
|
413
|
+
lines.push('');
|
|
414
|
+
lines.push('export interface AnalyticsEventMap {');
|
|
415
|
+
for (const evt of events) {
|
|
416
|
+
const ifaceName = `${toPascalCase(evt.name)}Properties`;
|
|
417
|
+
lines.push(` ${JSON.stringify(evt.name)}: ${ifaceName};`);
|
|
418
|
+
}
|
|
419
|
+
lines.push('}');
|
|
420
|
+
lines.push('');
|
|
421
|
+
// Typed track function
|
|
422
|
+
lines.push('// ============================================================================');
|
|
423
|
+
lines.push('// Typed track function');
|
|
424
|
+
lines.push('// ============================================================================');
|
|
425
|
+
lines.push('');
|
|
426
|
+
if (opts.providerConfig.signature === 'two-arg') {
|
|
427
|
+
lines.push('/**');
|
|
428
|
+
lines.push(' * Type-safe wrapper around the analytics track function.');
|
|
429
|
+
lines.push(' * Use AnalyticsEvents constants to avoid typos in event names.');
|
|
430
|
+
lines.push(' */');
|
|
431
|
+
lines.push('export function track<K extends keyof AnalyticsEventMap>(');
|
|
432
|
+
lines.push(' event: K,');
|
|
433
|
+
lines.push(' properties: AnalyticsEventMap[K],');
|
|
434
|
+
lines.push('): void {');
|
|
435
|
+
lines.push(` ${opts.providerConfig.trackFn}(event, properties as Record<string, unknown>);`);
|
|
436
|
+
lines.push('}');
|
|
437
|
+
}
|
|
438
|
+
else {
|
|
439
|
+
// snowplow uses self-describing event schema
|
|
440
|
+
lines.push('/**');
|
|
441
|
+
lines.push(' * Type-safe wrapper around Snowplow trackSelfDescribingEvent.');
|
|
442
|
+
lines.push(' * Use AnalyticsEvents constants to avoid typos in event names.');
|
|
443
|
+
lines.push(' */');
|
|
444
|
+
lines.push('export function track<K extends keyof AnalyticsEventMap>(');
|
|
445
|
+
lines.push(' event: K,');
|
|
446
|
+
lines.push(' properties: AnalyticsEventMap[K],');
|
|
447
|
+
lines.push('): void {');
|
|
448
|
+
lines.push(' const schema = {');
|
|
449
|
+
lines.push(' vendor: "com.manifest",');
|
|
450
|
+
lines.push(' name: event,');
|
|
451
|
+
lines.push(' format: "jsonschema",');
|
|
452
|
+
lines.push(' version: "1-0-0",');
|
|
453
|
+
lines.push(' };');
|
|
454
|
+
lines.push(` ${opts.providerConfig.trackFn}(schema, properties as Record<string, unknown>);`);
|
|
455
|
+
lines.push('}');
|
|
456
|
+
}
|
|
457
|
+
lines.push('');
|
|
458
|
+
return lines.join('\n');
|
|
459
|
+
}
|
|
460
|
+
function generateHandlers(ir, opts, diagnostics) {
|
|
461
|
+
const events = deriveEvents(ir, opts, diagnostics);
|
|
462
|
+
const artifacts = [];
|
|
463
|
+
// Build lookup: command → events it emits
|
|
464
|
+
const commandEvents = new Map();
|
|
465
|
+
for (const evt of events) {
|
|
466
|
+
if (evt.command && evt.entity) {
|
|
467
|
+
const key = `${evt.entity}.${evt.command}`;
|
|
468
|
+
const existing = commandEvents.get(key) ?? [];
|
|
469
|
+
existing.push(evt);
|
|
470
|
+
commandEvents.set(key, existing);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
// Group commands by entity
|
|
474
|
+
const commandsByEntity = new Map();
|
|
475
|
+
for (const cmd of ir.commands) {
|
|
476
|
+
if (!cmd.entity)
|
|
477
|
+
continue;
|
|
478
|
+
const existing = commandsByEntity.get(cmd.entity) ?? [];
|
|
479
|
+
existing.push(cmd);
|
|
480
|
+
commandsByEntity.set(cmd.entity, existing);
|
|
481
|
+
}
|
|
482
|
+
if (opts.emitPerEntityHandlers) {
|
|
483
|
+
// One file per entity
|
|
484
|
+
for (const entity of ir.entities) {
|
|
485
|
+
const cmds = commandsByEntity.get(entity.name) ?? [];
|
|
486
|
+
if (cmds.length === 0)
|
|
487
|
+
continue;
|
|
488
|
+
const code = generateEntityHandlerFile(entity.name, cmds, commandEvents, opts);
|
|
489
|
+
artifacts.push({
|
|
490
|
+
id: `analytics.handlers.${entity.name}`,
|
|
491
|
+
pathHint: `analytics/handlers/${entityNameLower(entity.name)}.ts`,
|
|
492
|
+
contentType: 'typescript',
|
|
493
|
+
code,
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
// Single file with all handlers
|
|
499
|
+
const code = generateAllHandlersFile(ir, commandEvents, opts);
|
|
500
|
+
artifacts.push({
|
|
501
|
+
id: 'analytics.handlers',
|
|
502
|
+
pathHint: 'analytics/handlers.ts',
|
|
503
|
+
contentType: 'typescript',
|
|
504
|
+
code,
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
return { artifacts, diagnostics };
|
|
508
|
+
}
|
|
509
|
+
function generateEntityHandlerFile(entityName, commands, commandEvents, opts) {
|
|
510
|
+
const lines = [];
|
|
511
|
+
if (opts.emitHeader) {
|
|
512
|
+
lines.push('/**');
|
|
513
|
+
lines.push(' * Auto-generated by Manifest Analytics projection');
|
|
514
|
+
lines.push(` * Generated at: ${new Date().toISOString()}`);
|
|
515
|
+
lines.push(' *');
|
|
516
|
+
lines.push(` * Provider: ${opts.provider}`);
|
|
517
|
+
lines.push(` * Entity: ${entityName}`);
|
|
518
|
+
lines.push(' * DO NOT EDIT — regenerate with: manifest generate --surface analytics.handlers');
|
|
519
|
+
lines.push(' */');
|
|
520
|
+
lines.push('');
|
|
521
|
+
}
|
|
522
|
+
lines.push(`import { track, AnalyticsEvents } from './analytics.events';`);
|
|
523
|
+
lines.push(`import type { ${entityName}AnalyticsContext } from './analytics.types';`);
|
|
524
|
+
lines.push('');
|
|
525
|
+
for (const cmd of commands) {
|
|
526
|
+
const key = `${entityName}.${cmd.name}`;
|
|
527
|
+
const events = commandEvents.get(key) ?? [];
|
|
528
|
+
lines.push(`/**`);
|
|
529
|
+
lines.push(` * Analytics tracking for command '${cmd.name}' on ${entityName}.`);
|
|
530
|
+
lines.push(` * Call this AFTER successful command execution.`);
|
|
531
|
+
if (events.length > 0) {
|
|
532
|
+
lines.push(` * Emits: ${events.map(e => e.name).join(', ')}`);
|
|
533
|
+
}
|
|
534
|
+
lines.push(` */`);
|
|
535
|
+
lines.push(`export function track${toPascalCase(cmd.name)}(`);
|
|
536
|
+
lines.push(` entityId: string,`);
|
|
537
|
+
lines.push(` params: Record<string, unknown>,`);
|
|
538
|
+
lines.push(` context: ${entityName}AnalyticsContext = {},`);
|
|
539
|
+
lines.push(`): void {`);
|
|
540
|
+
if (events.length === 0) {
|
|
541
|
+
lines.push(' // No events declared for this command');
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
for (const evt of events) {
|
|
545
|
+
lines.push(` track(`);
|
|
546
|
+
lines.push(` AnalyticsEvents.${toCamelCase(evt.name)},`);
|
|
547
|
+
lines.push(` {`);
|
|
548
|
+
// Entity id is always included
|
|
549
|
+
const includedProps = new Set();
|
|
550
|
+
for (const prop of evt.properties) {
|
|
551
|
+
if (prop.name === 'entityId' || prop.name === 'id') {
|
|
552
|
+
lines.push(` ${prop.name},`);
|
|
553
|
+
includedProps.add(prop.name);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
// Add command params that match event properties
|
|
557
|
+
for (const prop of evt.properties) {
|
|
558
|
+
if (includedProps.has(prop.name))
|
|
559
|
+
continue;
|
|
560
|
+
if (prop.name === 'entityId' || prop.name === 'id')
|
|
561
|
+
continue;
|
|
562
|
+
// Check if this property name maps to a command param
|
|
563
|
+
const paramMatch = cmd.parameters.find(p => p.name === prop.name);
|
|
564
|
+
if (paramMatch) {
|
|
565
|
+
lines.push(` ${prop.name}: params[${JSON.stringify(prop.name)}] as never,`);
|
|
566
|
+
}
|
|
567
|
+
else {
|
|
568
|
+
lines.push(` ${prop.name}: undefined as never,`);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
lines.push(` },`);
|
|
572
|
+
lines.push(` );`);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
lines.push(`}`);
|
|
576
|
+
lines.push('');
|
|
577
|
+
}
|
|
578
|
+
return lines.join('\n');
|
|
579
|
+
}
|
|
580
|
+
function generateAllHandlersFile(ir, commandEvents, opts) {
|
|
581
|
+
const lines = [];
|
|
582
|
+
if (opts.emitHeader) {
|
|
583
|
+
lines.push('/**');
|
|
584
|
+
lines.push(' * Auto-generated by Manifest Analytics projection');
|
|
585
|
+
lines.push(` * Generated at: ${new Date().toISOString()}`);
|
|
586
|
+
lines.push(' *');
|
|
587
|
+
lines.push(` * Provider: ${opts.provider}`);
|
|
588
|
+
lines.push(' * DO NOT EDIT — regenerate with: manifest generate --surface analytics.handlers');
|
|
589
|
+
lines.push(' */');
|
|
590
|
+
lines.push('');
|
|
591
|
+
}
|
|
592
|
+
lines.push(`import { track, AnalyticsEvents } from './analytics.events';`);
|
|
593
|
+
lines.push('');
|
|
594
|
+
// Group by entity
|
|
595
|
+
const commandsByEntity = new Map();
|
|
596
|
+
for (const cmd of ir.commands) {
|
|
597
|
+
if (!cmd.entity)
|
|
598
|
+
continue;
|
|
599
|
+
const existing = commandsByEntity.get(cmd.entity) ?? [];
|
|
600
|
+
existing.push(cmd);
|
|
601
|
+
commandsByEntity.set(cmd.entity, existing);
|
|
602
|
+
}
|
|
603
|
+
for (const [entityName, commands] of commandsByEntity) {
|
|
604
|
+
lines.push(`// ${entityName} commands`);
|
|
605
|
+
lines.push('');
|
|
606
|
+
for (const cmd of commands) {
|
|
607
|
+
const key = `${entityName}.${cmd.name}`;
|
|
608
|
+
const events = commandEvents.get(key) ?? [];
|
|
609
|
+
lines.push(`export function track${toPascalCase(cmd.name)}(`);
|
|
610
|
+
lines.push(` entityId: string,`);
|
|
611
|
+
lines.push(` params: Record<string, unknown> = {},`);
|
|
612
|
+
lines.push(`): void {`);
|
|
613
|
+
if (events.length === 0) {
|
|
614
|
+
lines.push(' // No events declared for this command');
|
|
615
|
+
}
|
|
616
|
+
else {
|
|
617
|
+
for (const evt of events) {
|
|
618
|
+
lines.push(` track(`);
|
|
619
|
+
lines.push(` AnalyticsEvents.${toCamelCase(evt.name)},`);
|
|
620
|
+
lines.push(` { entityId },`);
|
|
621
|
+
lines.push(` );`);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
lines.push(`}`);
|
|
625
|
+
lines.push('');
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
return lines.join('\n');
|
|
629
|
+
}
|
|
630
|
+
function entityNameLower(name) {
|
|
631
|
+
return name.charAt(0).toLowerCase() + name.slice(1);
|
|
632
|
+
}
|
|
633
|
+
// ============================================================================
|
|
634
|
+
// Main projection class
|
|
635
|
+
// ============================================================================
|
|
636
|
+
export class AnalyticsProjection {
|
|
637
|
+
name = 'analytics';
|
|
638
|
+
description = 'Typed analytics event schemas and track() calls for Segment, Amplitude, Mixpanel, or Snowplow';
|
|
639
|
+
surfaces = SURFACES;
|
|
640
|
+
generate(ir, request) {
|
|
641
|
+
const diagnostics = [];
|
|
642
|
+
const opts = normalizeOptions(request.options);
|
|
643
|
+
switch (request.surface) {
|
|
644
|
+
case SURFACE_TRACKING_PLAN:
|
|
645
|
+
return {
|
|
646
|
+
artifacts: [
|
|
647
|
+
{
|
|
648
|
+
id: 'analytics.tracking-plan',
|
|
649
|
+
pathHint: 'analytics/tracking-plan.json',
|
|
650
|
+
contentType: 'json',
|
|
651
|
+
code: generateTrackingPlan(ir, opts, diagnostics),
|
|
652
|
+
},
|
|
653
|
+
],
|
|
654
|
+
diagnostics,
|
|
655
|
+
};
|
|
656
|
+
case SURFACE_EVENTS:
|
|
657
|
+
return {
|
|
658
|
+
artifacts: [
|
|
659
|
+
{
|
|
660
|
+
id: 'analytics.events',
|
|
661
|
+
pathHint: 'analytics/analytics.events.ts',
|
|
662
|
+
contentType: 'typescript',
|
|
663
|
+
code: generateTypedEvents(ir, opts, diagnostics),
|
|
664
|
+
},
|
|
665
|
+
],
|
|
666
|
+
diagnostics,
|
|
667
|
+
};
|
|
668
|
+
case SURFACE_HANDLERS: {
|
|
669
|
+
const result = generateHandlers(ir, opts, diagnostics);
|
|
670
|
+
return { artifacts: result.artifacts, diagnostics: result.diagnostics };
|
|
671
|
+
}
|
|
672
|
+
default:
|
|
673
|
+
return {
|
|
674
|
+
artifacts: [],
|
|
675
|
+
diagnostics: [
|
|
676
|
+
{
|
|
677
|
+
severity: 'error',
|
|
678
|
+
code: 'ANALYTICS_UNKNOWN_SURFACE',
|
|
679
|
+
message: `Unknown surface "${request.surface}". Expected one of: ${this.surfaces.join(', ')}`,
|
|
680
|
+
},
|
|
681
|
+
],
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
//# sourceMappingURL=generator.js.map
|