@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,675 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* manifest load-test command
|
|
3
|
+
*
|
|
4
|
+
* Generates k6 or Artillery load test scripts from IR entities and commands.
|
|
5
|
+
* Produces self-contained scripts with realistic data generation (faker.js
|
|
6
|
+
* patterns), configurable ramp-up profiles, SLO thresholds, and optional
|
|
7
|
+
* integration with the Manifest performance profiler.
|
|
8
|
+
*/
|
|
9
|
+
import fs from 'node:fs/promises';
|
|
10
|
+
import path from 'node:path';
|
|
11
|
+
import chalk from 'chalk';
|
|
12
|
+
import ora from 'ora';
|
|
13
|
+
// ---------- Defaults ----------
|
|
14
|
+
const DEFAULT_RAMP_UP = '10s:5,30s:20,1m:50';
|
|
15
|
+
const DEFAULT_BASE_URL = 'http://localhost:3000';
|
|
16
|
+
const DEFAULT_FORMAT = 'k6';
|
|
17
|
+
// ---------- Parsers ----------
|
|
18
|
+
function parseRampUp(input) {
|
|
19
|
+
const raw = input || DEFAULT_RAMP_UP;
|
|
20
|
+
const stages = [];
|
|
21
|
+
for (const part of raw.split(',')) {
|
|
22
|
+
const trimmed = part.trim();
|
|
23
|
+
if (!trimmed)
|
|
24
|
+
continue;
|
|
25
|
+
const [duration, targetRaw] = trimmed.split(':');
|
|
26
|
+
if (!duration || !targetRaw) {
|
|
27
|
+
throw new Error(`Invalid ramp-up stage: "${trimmed}". Expected format: "duration:target" (e.g. "30s:20")`);
|
|
28
|
+
}
|
|
29
|
+
const target = parseInt(targetRaw.trim(), 10);
|
|
30
|
+
if (isNaN(target) || target < 0) {
|
|
31
|
+
throw new Error(`Invalid ramp-up target: "${targetRaw}". Must be a non-negative integer.`);
|
|
32
|
+
}
|
|
33
|
+
if (!/^\d+[smh]$/.test(duration.trim())) {
|
|
34
|
+
throw new Error(`Invalid ramp-up duration: "${duration}". Must end with s, m, or h (e.g. "30s", "5m").`);
|
|
35
|
+
}
|
|
36
|
+
stages.push({ duration: duration.trim(), target });
|
|
37
|
+
}
|
|
38
|
+
if (stages.length === 0) {
|
|
39
|
+
throw new Error('Ramp-up profile must have at least one stage.');
|
|
40
|
+
}
|
|
41
|
+
return stages;
|
|
42
|
+
}
|
|
43
|
+
function parseSlo(input) {
|
|
44
|
+
if (!input)
|
|
45
|
+
return [];
|
|
46
|
+
const thresholds = [];
|
|
47
|
+
for (const part of input.split(',')) {
|
|
48
|
+
const trimmed = part.trim();
|
|
49
|
+
if (!trimmed)
|
|
50
|
+
continue;
|
|
51
|
+
// Syntax: metric:op:value[:abort]
|
|
52
|
+
// Examples: p95:<:500ms | error_rate:<=:0.01 | p99:<:1s:abort
|
|
53
|
+
const segments = trimmed.split(':');
|
|
54
|
+
if (segments.length < 3) {
|
|
55
|
+
throw new Error(`Invalid SLO threshold: "${trimmed}". Expected format: "metric:op:value" (e.g. "p95:<:500ms")`);
|
|
56
|
+
}
|
|
57
|
+
const [metric, op, valueRaw, ...flags] = segments;
|
|
58
|
+
const opTrimmed = op;
|
|
59
|
+
if (!['<', '<=', '>', '>='].includes(opTrimmed)) {
|
|
60
|
+
throw new Error(`Invalid SLO operator: "${op}". Must be one of: <, <=, >, >=.`);
|
|
61
|
+
}
|
|
62
|
+
const value = parseDurationOrNumber(valueRaw.trim());
|
|
63
|
+
const abortOnFail = flags.includes('abort');
|
|
64
|
+
thresholds.push({ metric: metric.trim(), op: opTrimmed, value, abortOnFail });
|
|
65
|
+
}
|
|
66
|
+
return thresholds;
|
|
67
|
+
}
|
|
68
|
+
/** Parse a value like "500ms", "1s", "0.01", or "42" into a number (ms or fraction). */
|
|
69
|
+
function parseDurationOrNumber(raw) {
|
|
70
|
+
if (raw.endsWith('ms')) {
|
|
71
|
+
return parseFloat(raw.slice(0, -2));
|
|
72
|
+
}
|
|
73
|
+
if (raw.endsWith('s')) {
|
|
74
|
+
return parseFloat(raw.slice(0, -1)) * 1000;
|
|
75
|
+
}
|
|
76
|
+
if (raw.endsWith('m')) {
|
|
77
|
+
return parseFloat(raw.slice(0, -1)) * 60 * 1000;
|
|
78
|
+
}
|
|
79
|
+
return parseFloat(raw);
|
|
80
|
+
}
|
|
81
|
+
// ---------- IR loading (mirrors seed.ts) ----------
|
|
82
|
+
async function loadIR(source) {
|
|
83
|
+
if (!source) {
|
|
84
|
+
throw new Error('No source specified. Provide a .manifest or .ir.json file.');
|
|
85
|
+
}
|
|
86
|
+
const resolved = path.resolve(process.cwd(), source);
|
|
87
|
+
const stat = await fs.stat(resolved).catch(() => null);
|
|
88
|
+
if (!stat) {
|
|
89
|
+
throw new Error(`Source not found: ${source}`);
|
|
90
|
+
}
|
|
91
|
+
if (stat.isFile()) {
|
|
92
|
+
if (resolved.endsWith('.ir.json')) {
|
|
93
|
+
const content = await fs.readFile(resolved, 'utf-8');
|
|
94
|
+
return JSON.parse(content);
|
|
95
|
+
}
|
|
96
|
+
const { compileToIR } = await import('@angriff36/manifest/ir-compiler');
|
|
97
|
+
const fileContent = await fs.readFile(resolved, 'utf-8');
|
|
98
|
+
const result = await compileToIR(fileContent, { sourcePath: resolved });
|
|
99
|
+
if (!result.ir) {
|
|
100
|
+
const errors = (result.diagnostics || [])
|
|
101
|
+
.filter((d) => d.severity === 'error')
|
|
102
|
+
.map((d) => d.message)
|
|
103
|
+
.join('; ');
|
|
104
|
+
throw new Error(`Compilation failed: ${errors || 'unknown error'}`);
|
|
105
|
+
}
|
|
106
|
+
return result.ir;
|
|
107
|
+
}
|
|
108
|
+
const { glob } = await import('glob');
|
|
109
|
+
const irFiles = await glob('**/*.ir.json', { cwd: resolved });
|
|
110
|
+
if (irFiles.length === 0) {
|
|
111
|
+
throw new Error(`No .ir.json files found in directory: ${source}`);
|
|
112
|
+
}
|
|
113
|
+
const first = path.join(resolved, irFiles[0]);
|
|
114
|
+
const content = await fs.readFile(first, 'utf-8');
|
|
115
|
+
return JSON.parse(content);
|
|
116
|
+
}
|
|
117
|
+
// ---------- IR inspection ----------
|
|
118
|
+
function pickCommands(ir, filter) {
|
|
119
|
+
const allCommands = [];
|
|
120
|
+
// Build a map of command name -> full command object (from top-level ir.commands)
|
|
121
|
+
const cmdByName = new Map();
|
|
122
|
+
for (const cmd of ir.commands) {
|
|
123
|
+
cmdByName.set(cmd.name, cmd);
|
|
124
|
+
}
|
|
125
|
+
// Collect commands referenced by entities
|
|
126
|
+
const seen = new Set();
|
|
127
|
+
for (const entity of ir.entities) {
|
|
128
|
+
for (const ref of entity.commands) {
|
|
129
|
+
// entity.commands is string[] (name references)
|
|
130
|
+
const cmdName = typeof ref === 'string' ? ref : ref.name;
|
|
131
|
+
if (!cmdName || seen.has(cmdName))
|
|
132
|
+
continue;
|
|
133
|
+
const full = cmdByName.get(cmdName);
|
|
134
|
+
if (full) {
|
|
135
|
+
allCommands.push({ ...full, entityName: entity.name });
|
|
136
|
+
seen.add(cmdName);
|
|
137
|
+
}
|
|
138
|
+
else if (typeof ref !== 'string') {
|
|
139
|
+
// Embedded command object
|
|
140
|
+
allCommands.push({ ...ref, entityName: entity.name });
|
|
141
|
+
seen.add(cmdName);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// Also include any top-level commands not already seen
|
|
146
|
+
for (const cmd of ir.commands) {
|
|
147
|
+
if (!seen.has(cmd.name)) {
|
|
148
|
+
allCommands.push(cmd);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (!filter || filter.length === 0)
|
|
152
|
+
return allCommands;
|
|
153
|
+
const set = new Set(filter);
|
|
154
|
+
const matched = allCommands.filter((c) => set.has(c.name));
|
|
155
|
+
if (matched.length === 0) {
|
|
156
|
+
throw new Error(`No matching commands for --command ${filter.join(', ')}. ` +
|
|
157
|
+
`Available: ${allCommands.map((c) => c.name).join(', ')}`);
|
|
158
|
+
}
|
|
159
|
+
return matched;
|
|
160
|
+
}
|
|
161
|
+
function pickEntities(ir, filter) {
|
|
162
|
+
if (!filter || filter.length === 0)
|
|
163
|
+
return ir.entities;
|
|
164
|
+
const set = new Set(filter);
|
|
165
|
+
const matched = ir.entities.filter((e) => set.has(e.name));
|
|
166
|
+
if (matched.length === 0) {
|
|
167
|
+
throw new Error(`No matching entities for --entity ${filter.join(', ')}. ` +
|
|
168
|
+
`Available: ${ir.entities.map((e) => e.name).join(', ')}`);
|
|
169
|
+
}
|
|
170
|
+
return matched;
|
|
171
|
+
}
|
|
172
|
+
// ---------- faker.js code generation ----------
|
|
173
|
+
/**
|
|
174
|
+
* Generate a JavaScript expression that returns a realistic value for the
|
|
175
|
+
* given IR property. Uses inline faker-style helpers (no external deps).
|
|
176
|
+
*/
|
|
177
|
+
function generateFakerExpr(prop, entityName) {
|
|
178
|
+
const name = prop.name.toLowerCase();
|
|
179
|
+
const typeName = (prop.type.name || '').toLowerCase();
|
|
180
|
+
// Name-based faker patterns
|
|
181
|
+
if (name === 'email' || name.endsWith('email'))
|
|
182
|
+
return 'faker.email()';
|
|
183
|
+
if (name === 'firstname' || name === 'first_name')
|
|
184
|
+
return 'faker.firstName()';
|
|
185
|
+
if (name === 'lastname' || name === 'last_name')
|
|
186
|
+
return 'faker.lastName()';
|
|
187
|
+
if (name === 'name' || name === 'fullname' || name === 'full_name')
|
|
188
|
+
return 'faker.fullName()';
|
|
189
|
+
if (name === 'username')
|
|
190
|
+
return 'faker.userName()';
|
|
191
|
+
if (name === 'phone' || name === 'phonenumber')
|
|
192
|
+
return 'faker.phoneNumber()';
|
|
193
|
+
if (name === 'url' || name === 'website')
|
|
194
|
+
return 'faker.url()';
|
|
195
|
+
if (name === 'title')
|
|
196
|
+
return 'faker.title()';
|
|
197
|
+
if (name === 'description' || name === 'bio' || name === 'notes')
|
|
198
|
+
return 'faker.sentence()';
|
|
199
|
+
if (name === 'slug')
|
|
200
|
+
return 'faker.slug()';
|
|
201
|
+
if (name === 'uuid' || name === 'id')
|
|
202
|
+
return 'faker.uuid()';
|
|
203
|
+
if (name === 'status' || name === 'state')
|
|
204
|
+
return 'faker.status()';
|
|
205
|
+
if (name === 'city')
|
|
206
|
+
return 'faker.city()';
|
|
207
|
+
if (name === 'country')
|
|
208
|
+
return 'faker.country()';
|
|
209
|
+
if (name === 'zipcode' || name === 'zip' || name === 'postalcode')
|
|
210
|
+
return 'faker.zipCode()';
|
|
211
|
+
if (name === 'address')
|
|
212
|
+
return 'faker.address()';
|
|
213
|
+
if (name === 'company' || name === 'companyname')
|
|
214
|
+
return 'faker.companyName()';
|
|
215
|
+
if (name === 'avatar' || name.endsWith('avatar'))
|
|
216
|
+
return 'faker.avatarUrl()';
|
|
217
|
+
if (name === 'age')
|
|
218
|
+
return `Math.floor(Math.random() * 72) + 18`;
|
|
219
|
+
if (name === 'price' || name === 'amount' || name === 'total') {
|
|
220
|
+
return `Math.round((Math.random() * 990 + 10) * 100) / 100`;
|
|
221
|
+
}
|
|
222
|
+
if (name === 'quantity' || name === 'count' || name === 'stock') {
|
|
223
|
+
return `Math.floor(Math.random() * 500)`;
|
|
224
|
+
}
|
|
225
|
+
if (name === 'year')
|
|
226
|
+
return `${new Date().getFullYear() - Math.floor(Math.random() * 5)}`;
|
|
227
|
+
if (name === 'rating' || name === 'score') {
|
|
228
|
+
return `Math.round((Math.random() * 5) * 10) / 10`;
|
|
229
|
+
}
|
|
230
|
+
// Type-based fallback
|
|
231
|
+
if (typeName === 'string' || typeName === 'text') {
|
|
232
|
+
if (name.includes('name'))
|
|
233
|
+
return 'faker.word()';
|
|
234
|
+
return 'faker.word()';
|
|
235
|
+
}
|
|
236
|
+
if (typeName === 'int' || typeName === 'integer') {
|
|
237
|
+
return `Math.floor(Math.random() * 1000) + 1`;
|
|
238
|
+
}
|
|
239
|
+
if (typeName === 'number' || typeName === 'float' || typeName === 'decimal') {
|
|
240
|
+
return `Math.round(Math.random() * 10000) / 100`;
|
|
241
|
+
}
|
|
242
|
+
if (typeName === 'boolean')
|
|
243
|
+
return `Math.random() < 0.5`;
|
|
244
|
+
if (typeName === 'uuid')
|
|
245
|
+
return 'faker.uuid()';
|
|
246
|
+
if (typeName === 'timestamp' || typeName === 'datetime' || typeName === 'date') {
|
|
247
|
+
return 'new Date(Date.now() - Math.random() * 90 * 86400000).toISOString()';
|
|
248
|
+
}
|
|
249
|
+
if (typeName === 'array')
|
|
250
|
+
return '[]';
|
|
251
|
+
if (typeName === 'object' || typeName.startsWith('map'))
|
|
252
|
+
return '{}';
|
|
253
|
+
// Ultimate fallback: FK-style id
|
|
254
|
+
return `'${entityName.toLowerCase()}_' + faker.uuid().slice(0, 8)`;
|
|
255
|
+
}
|
|
256
|
+
// ---------- Self-contained faker helpers ----------
|
|
257
|
+
// These are inlined into every generated script so the output is portable.
|
|
258
|
+
const FAKER_HELPERS_JS = `
|
|
259
|
+
// ---- faker.js-compatible helpers (self-contained, no deps) ----
|
|
260
|
+
const FIRST_NAMES = ['Alice','Bob','Carol','David','Eve','Frank','Grace','Hank','Ivy','Jack','Kate','Leo','Maya','Nick','Olive','Paul','Quinn','Rita','Sam','Tara','Uma','Victor','Wendy','Xavier','Yara','Zane'];
|
|
261
|
+
const LAST_NAMES = ['Smith','Johnson','Williams','Brown','Jones','Garcia','Miller','Davis','Rodriguez','Martinez','Hernandez','Lopez','Wilson','Anderson','Thomas','Taylor','Moore','Jackson','Martin','Lee'];
|
|
262
|
+
const DOMAINS = ['example.com','test.org','demo.io','mail.net','sample.co','placeholder.dev'];
|
|
263
|
+
const WORDS = ['systems','patterns','architecture','workflows','practices','foundations','principles','techniques','strategies','concepts','modules','components','services','layers','domains'];
|
|
264
|
+
const STATUSES = ['active','pending','archived','draft','published','review','approved','rejected'];
|
|
265
|
+
const COMPANIES = ['Acme','Globex','Initech','Umbrella','Cyberdyne','Hooli','Pied Piper','Massive Dynamic','Stark','Wayne','Wonka','Soylent'];
|
|
266
|
+
const CITIES = ['Springfield','Portland','Salem','Boulder','Austin','Reno','Boise','Fresno','Tacoma','Lansing','Albany','Macon'];
|
|
267
|
+
const COUNTRIES = ['United States','Canada','United Kingdom','Germany','France','Japan','Australia','Brazil','India','Mexico'];
|
|
268
|
+
|
|
269
|
+
function pick(arr) { return arr[Math.floor(Math.random() * arr.length)]; }
|
|
270
|
+
function randInt(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; }
|
|
271
|
+
|
|
272
|
+
const faker = {
|
|
273
|
+
uuid: () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
274
|
+
const r = (Math.random() * 16) | 0;
|
|
275
|
+
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
276
|
+
return v.toString(16);
|
|
277
|
+
}),
|
|
278
|
+
email: () => pick(FIRST_NAMES).toLowerCase() + '.' + pick(LAST_NAMES).toLowerCase() + '@' + pick(DOMAINS),
|
|
279
|
+
firstName: () => pick(FIRST_NAMES),
|
|
280
|
+
lastName: () => pick(LAST_NAMES),
|
|
281
|
+
fullName: () => pick(FIRST_NAMES) + ' ' + pick(LAST_NAMES),
|
|
282
|
+
userName: () => pick(FIRST_NAMES).toLowerCase() + randInt(1, 99),
|
|
283
|
+
phoneNumber: () => '+1-555-' + String(randInt(100, 999)) + '-' + String(randInt(1000, 9999)),
|
|
284
|
+
url: () => 'https://' + pick(DOMAINS) + '/' + pick(WORDS),
|
|
285
|
+
title: () => pick(['Introduction to','Advanced','Practical','Modern','Essential','Building']) + ' ' + pick(WORDS),
|
|
286
|
+
sentence: () => pick(FIRST_NAMES) + ' ' + pick(LAST_NAMES) + ' #' + randInt(1, 999),
|
|
287
|
+
slug: () => pick(WORDS) + '-' + randInt(1, 999),
|
|
288
|
+
status: () => pick(STATUSES),
|
|
289
|
+
city: () => pick(CITIES),
|
|
290
|
+
country: () => pick(COUNTRIES),
|
|
291
|
+
zipCode: () => String(randInt(10000, 99999)),
|
|
292
|
+
address: () => randInt(100, 9999) + ' ' + pick(WORDS) + ' St, ' + pick(CITIES),
|
|
293
|
+
companyName: () => pick(COMPANIES) + ' ' + pick(['Inc','LLC','Corp','Ltd','Group']),
|
|
294
|
+
avatarUrl: () => 'https://i.pravatar.cc/150?u=' + randInt(1, 9999),
|
|
295
|
+
word: () => pick(WORDS),
|
|
296
|
+
boolean: () => Math.random() < 0.5,
|
|
297
|
+
integer: (min, max) => randInt(min || 1, max || 1000),
|
|
298
|
+
float: (min, max) => Math.round((Math.random() * ((max || 100) - (min || 0)) + (min || 0)) * 100) / 100,
|
|
299
|
+
};
|
|
300
|
+
// ---- end faker helpers ----
|
|
301
|
+
`;
|
|
302
|
+
// ---------- k6 generator ----------
|
|
303
|
+
function generateK6Script(entityName, command, properties, opts) {
|
|
304
|
+
const pathSuffix = commandNameToPath(command.name);
|
|
305
|
+
const bodyProps = [];
|
|
306
|
+
for (const prop of properties) {
|
|
307
|
+
if (prop.name === 'id')
|
|
308
|
+
continue;
|
|
309
|
+
bodyProps.push(` ${prop.name}: ${generateFakerExpr(prop, entityName)}`);
|
|
310
|
+
}
|
|
311
|
+
const bodyObj = bodyProps.length > 0 ? `{\n${bodyProps.join(',\n')}\n }` : '{}';
|
|
312
|
+
const stages = opts.rampUp
|
|
313
|
+
.map((s) => ` { duration: '${s.duration}', target: ${s.target} },`)
|
|
314
|
+
.join('\n');
|
|
315
|
+
const thresholds = opts.slo
|
|
316
|
+
.map((t) => {
|
|
317
|
+
const key = sloMetricToK6Key(t.metric);
|
|
318
|
+
const abort = t.abortOnFail ? `, abortOnFail: true` : '';
|
|
319
|
+
return ` '${key}': [{ threshold: '${t.op.replace('<=', '<').replace('>=', '>')}${formatK6Value(t.metric, t.value)}'${abort} }],`;
|
|
320
|
+
})
|
|
321
|
+
.join('\n');
|
|
322
|
+
const thresholdBlock = thresholds
|
|
323
|
+
? `\n thresholds: {\n${thresholds}\n },`
|
|
324
|
+
: '';
|
|
325
|
+
const profileHeader = opts.profilerIntegration
|
|
326
|
+
? ` * - Profiler integration: timestamps emitted via console.log for correlation
|
|
327
|
+
* with \`manifest profile\` output.`
|
|
328
|
+
: '';
|
|
329
|
+
return `/**
|
|
330
|
+
* k6 load test for ${entityName}.${command.name}
|
|
331
|
+
* Generated by \`manifest load-test\`
|
|
332
|
+
*
|
|
333
|
+
* Ramp-up: ${opts.rampUp.map((s) => `${s.duration}@${s.target}VU`).join(' → ')}
|
|
334
|
+
* SLO: ${opts.slo.length > 0 ? opts.slo.map((t) => `${t.metric} ${t.op} ${t.value}`).join(', ') : 'none'}${profileHeader}
|
|
335
|
+
*/
|
|
336
|
+
|
|
337
|
+
import http from 'k6/http';
|
|
338
|
+
import { check, sleep, group } from 'k6';
|
|
339
|
+
|
|
340
|
+
${FAKER_HELPERS_JS}
|
|
341
|
+
|
|
342
|
+
export const options = {
|
|
343
|
+
stages: [
|
|
344
|
+
${stages}
|
|
345
|
+
],${thresholdBlock}
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
const BASE_URL = __ENV.BASE_URL || '${opts.baseUrl}';
|
|
349
|
+
const TIMEOUT = '${opts.timeout}ms';
|
|
350
|
+
|
|
351
|
+
export default function () {
|
|
352
|
+
group('${entityName}.${command.name}', function () {
|
|
353
|
+
const payload = JSON.stringify(${bodyObj});
|
|
354
|
+
|
|
355
|
+
const params = {
|
|
356
|
+
headers: { 'Content-Type': 'application/json' },
|
|
357
|
+
tags: { command: '${command.name}', entity: '${entityName}' },
|
|
358
|
+
timeout: TIMEOUT,
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
const res = http.post(\`\${BASE_URL}/api/${pathSuffix}\`, payload, params);
|
|
362
|
+
|
|
363
|
+
${opts.profilerIntegration ? ` // Emit per-request timing for profiler correlation\n console.log(\`profile phase=action duration=\${res.timings.duration} cmd=${command.name} vu=\${__VU} iter=\${__ITER}\`);` : ''}
|
|
364
|
+
|
|
365
|
+
check(res, {
|
|
366
|
+
'status is 2xx': (r) => r.status >= 200 && r.status < 300,
|
|
367
|
+
'response time < 2s': (r) => r.timings.duration < 2000,
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
sleep(0.1);
|
|
372
|
+
}
|
|
373
|
+
`;
|
|
374
|
+
}
|
|
375
|
+
function commandNameToPath(name) {
|
|
376
|
+
// Convert camelCase / PascalCase command names to kebab-case URL segments.
|
|
377
|
+
return name
|
|
378
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
379
|
+
.replace(/[_\s]+/g, '-')
|
|
380
|
+
.toLowerCase();
|
|
381
|
+
}
|
|
382
|
+
function sloMetricToK6Key(metric) {
|
|
383
|
+
if (metric === 'p95')
|
|
384
|
+
return 'http_req_duration{expected_response:true}';
|
|
385
|
+
if (metric === 'p99')
|
|
386
|
+
return 'http_req_duration{expected_response:true}';
|
|
387
|
+
if (metric === 'p50')
|
|
388
|
+
return 'http_req_duration{expected_response:true}';
|
|
389
|
+
if (metric === 'error_rate')
|
|
390
|
+
return 'http_req_failed';
|
|
391
|
+
if (metric === 'http_req_duration')
|
|
392
|
+
return 'http_req_duration';
|
|
393
|
+
if (metric.startsWith('http_'))
|
|
394
|
+
return metric;
|
|
395
|
+
return `http_req_duration{name:"${metric}"}`;
|
|
396
|
+
}
|
|
397
|
+
function formatK6Value(metric, value) {
|
|
398
|
+
if (metric === 'error_rate')
|
|
399
|
+
return `${value}`;
|
|
400
|
+
return `${value}ms`;
|
|
401
|
+
}
|
|
402
|
+
// ---------- Artillery generator ----------
|
|
403
|
+
function generateArtilleryConfig(entityName, command, opts) {
|
|
404
|
+
const pathSuffix = commandNameToPath(command.name);
|
|
405
|
+
const phases = opts.rampUp
|
|
406
|
+
.map((s) => ` - duration: ${s.duration}\n arrivalRate: ${Math.max(1, Math.floor(s.target / 10))}`)
|
|
407
|
+
.join('\n');
|
|
408
|
+
// Artillery does not have native SLO thresholds like k6, so we encode them
|
|
409
|
+
// as a configurable block in the processor.
|
|
410
|
+
const sloBlock = JSON.stringify(opts.slo, null, 4)
|
|
411
|
+
.split('\n')
|
|
412
|
+
.map((l) => ' ' + l)
|
|
413
|
+
.join('\n');
|
|
414
|
+
return `config:
|
|
415
|
+
target: '${opts.baseUrl}'
|
|
416
|
+
phases:
|
|
417
|
+
${phases}
|
|
418
|
+
defaults:
|
|
419
|
+
headers:
|
|
420
|
+
Content-Type: 'application/json'
|
|
421
|
+
plugins:
|
|
422
|
+
metrics-by-endpoint:
|
|
423
|
+
useOnlyRequestNames: true
|
|
424
|
+
variables:
|
|
425
|
+
__slo_thresholds: |
|
|
426
|
+
${sloBlock}
|
|
427
|
+
|
|
428
|
+
scenarios:
|
|
429
|
+
- name: '${entityName}.${command.name}'
|
|
430
|
+
flow:
|
|
431
|
+
- post:
|
|
432
|
+
url: '/api/${pathSuffix}'
|
|
433
|
+
json:
|
|
434
|
+
__placeholder: true # Real data generated by processor.js
|
|
435
|
+
expect:
|
|
436
|
+
- statusCode: [200, 201, 202]
|
|
437
|
+
`;
|
|
438
|
+
}
|
|
439
|
+
function generateArtilleryProcessor(entityName, command, properties, opts) {
|
|
440
|
+
const bodyLines = [];
|
|
441
|
+
for (const prop of properties) {
|
|
442
|
+
if (prop.name === 'id')
|
|
443
|
+
continue;
|
|
444
|
+
const expr = generateFakerExpr(prop, entityName);
|
|
445
|
+
bodyLines.push(` ${prop.name}: ${expr},`);
|
|
446
|
+
}
|
|
447
|
+
const bodyObj = bodyLines.length > 0 ? `{\n${bodyLines.join('\n')}\n}` : '{}';
|
|
448
|
+
const sloCheck = opts.slo.length > 0
|
|
449
|
+
? `
|
|
450
|
+
|
|
451
|
+
// SLO threshold evaluation (post-run check)
|
|
452
|
+
function evaluateSLOs(report) {
|
|
453
|
+
const thresholds = ${JSON.stringify(opts.slo)};
|
|
454
|
+
const violations = [];
|
|
455
|
+
for (const t of thresholds) {
|
|
456
|
+
let observed;
|
|
457
|
+
if (t.metric === 'error_rate') {
|
|
458
|
+
observed = (report.errors || 0) / Math.max(1, report.requestsCompleted);
|
|
459
|
+
} else if (t.metric === 'p95' || t.metric === 'p99' || t.metric === 'p50') {
|
|
460
|
+
const p = t.metric.replace('p', '');
|
|
461
|
+
observed = report.latency && report.latency[p] ? report.latency[p] : 0;
|
|
462
|
+
} else {
|
|
463
|
+
observed = report[t.metric] || 0;
|
|
464
|
+
}
|
|
465
|
+
const passed = eval(\`\${observed} \${t.op} \${t.value}\`);
|
|
466
|
+
if (!passed) {
|
|
467
|
+
violations.push({ metric: t.metric, observed, threshold: t.value, op: t.op });
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
return violations;
|
|
471
|
+
}`
|
|
472
|
+
: '';
|
|
473
|
+
const profileLog = opts.profilerIntegration
|
|
474
|
+
? `
|
|
475
|
+
|
|
476
|
+
// Emit per-request timing for profiler correlation
|
|
477
|
+
function logProfileTiming(requestParams, response, context, ee, next) {
|
|
478
|
+
if (context.vars && context.vars.__profile) {
|
|
479
|
+
console.log(\`profile phase=action duration=\${response.timings ? response.timings.response : 0} cmd=${command.name} vu=\${context.vars.$vu} iter=\${context.vars.$iter}\`);
|
|
480
|
+
}
|
|
481
|
+
return next();
|
|
482
|
+
}`
|
|
483
|
+
: '';
|
|
484
|
+
return `/**
|
|
485
|
+
* Artillery processor for ${entityName}.${command.name}
|
|
486
|
+
* Generated by \`manifest load-test\`
|
|
487
|
+
*/
|
|
488
|
+
|
|
489
|
+
${FAKER_HELPERS_JS}
|
|
490
|
+
|
|
491
|
+
// Generate a request body from the IR entity properties
|
|
492
|
+
function generateRequestBody(context, events, done) {
|
|
493
|
+
context.vars.body = JSON.stringify(${bodyObj});
|
|
494
|
+
return done();
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
module.exports = {
|
|
498
|
+
generateRequestBody,${sloCheck ? '\n evaluateSLOs,' : ''}${profileLog ? '\n logProfileTiming,' : ''}
|
|
499
|
+
};
|
|
500
|
+
`;
|
|
501
|
+
}
|
|
502
|
+
// ---------- File writing ----------
|
|
503
|
+
function pickPropertiesForCommand(entity, command) {
|
|
504
|
+
// Collect property names referenced by the command.
|
|
505
|
+
// Commands have `parameters` + `actions[].target`.
|
|
506
|
+
const referencedProps = new Set();
|
|
507
|
+
// From parameters
|
|
508
|
+
if (Array.isArray(command.parameters)) {
|
|
509
|
+
for (const p of command.parameters) {
|
|
510
|
+
if (p && typeof p === 'object' && 'name' in p) {
|
|
511
|
+
referencedProps.add(p.name);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
// From actions (e.g. { kind: 'mutate', target: 'status' })
|
|
516
|
+
if (Array.isArray(command.actions)) {
|
|
517
|
+
for (const a of command.actions) {
|
|
518
|
+
if (a && typeof a === 'object' && a.target) {
|
|
519
|
+
referencedProps.add(a.target);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
if (referencedProps.size > 0) {
|
|
524
|
+
return entity.properties.filter((p) => p.name === 'id' || referencedProps.has(p.name));
|
|
525
|
+
}
|
|
526
|
+
// Fallback: all non-id properties
|
|
527
|
+
return entity.properties;
|
|
528
|
+
}
|
|
529
|
+
function findEntityForCommand(ir, command) {
|
|
530
|
+
const name = command.entityName ?? command.entity;
|
|
531
|
+
return ir.entities.find((e) => e.name === name);
|
|
532
|
+
}
|
|
533
|
+
// ---------- Main command ----------
|
|
534
|
+
export async function loadTestCommand(options = {}) {
|
|
535
|
+
const spinner = ora('Loading IR').start();
|
|
536
|
+
try {
|
|
537
|
+
const format = options.format || DEFAULT_FORMAT;
|
|
538
|
+
if (format !== 'k6' && format !== 'artillery') {
|
|
539
|
+
throw new Error(`Invalid format: ${format}. Use "k6" or "artillery".`);
|
|
540
|
+
}
|
|
541
|
+
const baseUrl = options.baseUrl || DEFAULT_BASE_URL;
|
|
542
|
+
const rampUp = parseRampUp(options.rampUp);
|
|
543
|
+
const slo = parseSlo(options.slo);
|
|
544
|
+
const timeout = options.timeout || 30000;
|
|
545
|
+
spinner.text = 'Loading IR';
|
|
546
|
+
const ir = await loadIR(options.source);
|
|
547
|
+
if (!ir.entities || ir.entities.length === 0) {
|
|
548
|
+
spinner.warn('No entities found in IR');
|
|
549
|
+
return {
|
|
550
|
+
format,
|
|
551
|
+
baseUrl,
|
|
552
|
+
rampUp,
|
|
553
|
+
slo,
|
|
554
|
+
commands: [],
|
|
555
|
+
entities: [],
|
|
556
|
+
files: {},
|
|
557
|
+
profilerIntegration: !!options.profile,
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
const entities = pickEntities(ir, options.entity);
|
|
561
|
+
const commands = pickCommands(ir, options.command);
|
|
562
|
+
if (commands.length === 0) {
|
|
563
|
+
spinner.warn('No commands found in IR');
|
|
564
|
+
return {
|
|
565
|
+
format,
|
|
566
|
+
baseUrl,
|
|
567
|
+
rampUp,
|
|
568
|
+
slo,
|
|
569
|
+
commands: [],
|
|
570
|
+
entities: entities.map((e) => e.name),
|
|
571
|
+
files: {},
|
|
572
|
+
profilerIntegration: !!options.profile,
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
spinner.text = `Generating ${format} scripts for ${commands.length} command(s)`;
|
|
576
|
+
const outputDir = options.output
|
|
577
|
+
? path.resolve(process.cwd(), options.output)
|
|
578
|
+
: path.resolve(process.cwd(), 'load-tests');
|
|
579
|
+
const files = {};
|
|
580
|
+
for (const cmd of commands) {
|
|
581
|
+
const entity = findEntityForCommand(ir, cmd);
|
|
582
|
+
const props = entity
|
|
583
|
+
? pickPropertiesForCommand(entity, cmd)
|
|
584
|
+
: [];
|
|
585
|
+
if (format === 'k6') {
|
|
586
|
+
const script = generateK6Script(cmd.entityName || 'Unknown', cmd, props, {
|
|
587
|
+
baseUrl,
|
|
588
|
+
rampUp,
|
|
589
|
+
slo,
|
|
590
|
+
timeout,
|
|
591
|
+
profilerIntegration: !!options.profile,
|
|
592
|
+
});
|
|
593
|
+
const fileName = `${(cmd.entityName || 'cmd').toLowerCase()}-${commandNameToPath(cmd.name)}.js`;
|
|
594
|
+
const filePath = path.join(outputDir, fileName);
|
|
595
|
+
files[filePath] = script;
|
|
596
|
+
}
|
|
597
|
+
else {
|
|
598
|
+
// Artillery: generates two files per command (yaml + processor js)
|
|
599
|
+
const yaml = generateArtilleryConfig(cmd.entityName || 'Unknown', cmd, {
|
|
600
|
+
baseUrl,
|
|
601
|
+
rampUp,
|
|
602
|
+
slo,
|
|
603
|
+
});
|
|
604
|
+
const proc = generateArtilleryProcessor(cmd.entityName || 'Unknown', cmd, props, {
|
|
605
|
+
slo,
|
|
606
|
+
profilerIntegration: !!options.profile,
|
|
607
|
+
});
|
|
608
|
+
const baseName = `${(cmd.entityName || 'cmd').toLowerCase()}-${commandNameToPath(cmd.name)}`;
|
|
609
|
+
files[path.join(outputDir, `${baseName}.yml`)] = yaml;
|
|
610
|
+
files[path.join(outputDir, `${baseName}.processor.js`)] = proc;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
// Write all files
|
|
614
|
+
if (!options.json) {
|
|
615
|
+
await fs.mkdir(outputDir, { recursive: true });
|
|
616
|
+
for (const [filePath, content] of Object.entries(files)) {
|
|
617
|
+
await fs.writeFile(filePath, content, 'utf-8');
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
const result = {
|
|
621
|
+
format,
|
|
622
|
+
baseUrl,
|
|
623
|
+
rampUp,
|
|
624
|
+
slo,
|
|
625
|
+
commands: commands.map((c) => `${c.entityName || ''}.${c.name}`.replace(/^\./, '')),
|
|
626
|
+
entities: entities.map((e) => e.name),
|
|
627
|
+
files,
|
|
628
|
+
profilerIntegration: !!options.profile,
|
|
629
|
+
};
|
|
630
|
+
if (options.json) {
|
|
631
|
+
// For JSON output, don't include full file contents in stdout — too large.
|
|
632
|
+
const compact = { ...result, files: Object.fromEntries(Object.keys(files).map((k) => [k, '<generated>'])) };
|
|
633
|
+
console.log(JSON.stringify(compact, null, 2));
|
|
634
|
+
spinner.succeed(`Generated ${Object.keys(files).length} file(s) for ${commands.length} command(s)`);
|
|
635
|
+
return result;
|
|
636
|
+
}
|
|
637
|
+
spinner.succeed(`Generated ${Object.keys(files).length} file(s) → ${path.relative(process.cwd(), outputDir)}`);
|
|
638
|
+
// Human summary
|
|
639
|
+
console.log('');
|
|
640
|
+
console.log(chalk.bold('Load test summary:'));
|
|
641
|
+
console.log(` ${chalk.gray('Format:')} ${format}`);
|
|
642
|
+
console.log(` ${chalk.gray('Base URL:')} ${baseUrl}`);
|
|
643
|
+
console.log(` ${chalk.gray('Ramp-up:')} ${rampUp.map((s) => `${s.duration}@${s.target}VU`).join(' → ')}`);
|
|
644
|
+
if (slo.length > 0) {
|
|
645
|
+
console.log(` ${chalk.gray('SLO:')} ${slo.map((t) => `${t.metric} ${t.op} ${t.value}`).join(', ')}`);
|
|
646
|
+
}
|
|
647
|
+
if (options.profile) {
|
|
648
|
+
console.log(` ${chalk.gray('Profiler:')} integration enabled`);
|
|
649
|
+
}
|
|
650
|
+
console.log(` ${chalk.gray('Commands:')} ${result.commands.join(', ')}`);
|
|
651
|
+
console.log(` ${chalk.gray('Output:')} ${path.relative(process.cwd(), outputDir)}`);
|
|
652
|
+
if (format === 'k6') {
|
|
653
|
+
const firstFile = Object.keys(files)[0];
|
|
654
|
+
if (firstFile) {
|
|
655
|
+
console.log('');
|
|
656
|
+
console.log(chalk.gray('Run with:'));
|
|
657
|
+
console.log(chalk.white(` k6 run ${path.relative(process.cwd(), firstFile)}`));
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
else {
|
|
661
|
+
const ymlFile = Object.keys(files).find((f) => f.endsWith('.yml'));
|
|
662
|
+
if (ymlFile) {
|
|
663
|
+
console.log('');
|
|
664
|
+
console.log(chalk.gray('Run with:'));
|
|
665
|
+
console.log(chalk.white(` artillery run ${path.relative(process.cwd(), ymlFile)}`));
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
return result;
|
|
669
|
+
}
|
|
670
|
+
catch (error) {
|
|
671
|
+
spinner.fail(`Load test generation failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
672
|
+
throw error;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
//# sourceMappingURL=load-test.js.map
|