typekro 0.43.0 → 0.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/dist/compositions/typekro-runtime/typekro-runtime.d.ts +3 -2
  2. package/dist/compositions/typekro-runtime/typekro-runtime.d.ts.map +1 -1
  3. package/dist/compositions/typekro-runtime/typekro-runtime.js.map +1 -1
  4. package/dist/core/kubernetes/bun-api-client.d.ts.map +1 -1
  5. package/dist/core/kubernetes/bun-api-client.js +39 -9
  6. package/dist/core/kubernetes/bun-api-client.js.map +1 -1
  7. package/dist/core/kubernetes/bun-http-library.d.ts.map +1 -1
  8. package/dist/core/kubernetes/bun-http-library.js +5 -1
  9. package/dist/core/kubernetes/bun-http-library.js.map +1 -1
  10. package/dist/factories/apisix/compositions/apisix-bootstrap.d.ts +2 -1
  11. package/dist/factories/apisix/compositions/apisix-bootstrap.d.ts.map +1 -1
  12. package/dist/factories/apisix/compositions/apisix-bootstrap.js.map +1 -1
  13. package/dist/factories/apisix/compositions/apisix-helm-repository.d.ts +3 -7
  14. package/dist/factories/apisix/compositions/apisix-helm-repository.d.ts.map +1 -1
  15. package/dist/factories/apisix/compositions/apisix-helm-repository.js.map +1 -1
  16. package/dist/factories/apisix/resources/helm.d.ts +2 -2
  17. package/dist/factories/apisix/resources/helm.d.ts.map +1 -1
  18. package/dist/factories/apisix/resources/helm.js.map +1 -1
  19. package/dist/factories/cert-manager/compositions/cert-manager-bootstrap.d.ts +3 -2
  20. package/dist/factories/cert-manager/compositions/cert-manager-bootstrap.d.ts.map +1 -1
  21. package/dist/factories/cert-manager/compositions/cert-manager-bootstrap.js.map +1 -1
  22. package/dist/factories/cilium/compositions/cilium-bootstrap.d.ts +2 -76
  23. package/dist/factories/cilium/compositions/cilium-bootstrap.d.ts.map +1 -1
  24. package/dist/factories/cilium/compositions/cilium-bootstrap.js.map +1 -1
  25. package/dist/factories/cilium/resources/helm.d.ts +3 -2
  26. package/dist/factories/cilium/resources/helm.d.ts.map +1 -1
  27. package/dist/factories/cilium/resources/helm.js.map +1 -1
  28. package/dist/factories/clickhouse/compositions/clickhouse-helm-repository.d.ts +3 -7
  29. package/dist/factories/clickhouse/compositions/clickhouse-helm-repository.d.ts.map +1 -1
  30. package/dist/factories/clickhouse/compositions/clickhouse-helm-repository.js.map +1 -1
  31. package/dist/factories/clickhouse/compositions/clickhouse-operator-bootstrap.d.ts +3 -28
  32. package/dist/factories/clickhouse/compositions/clickhouse-operator-bootstrap.d.ts.map +1 -1
  33. package/dist/factories/clickhouse/compositions/clickhouse-operator-bootstrap.js.map +1 -1
  34. package/dist/factories/clickstack/compositions/clickstack-bootstrap.d.ts +7 -254
  35. package/dist/factories/clickstack/compositions/clickstack-bootstrap.d.ts.map +1 -1
  36. package/dist/factories/clickstack/compositions/clickstack-bootstrap.js.map +1 -1
  37. package/dist/factories/clickstack/compositions/clickstack-helm-repository.d.ts +3 -7
  38. package/dist/factories/clickstack/compositions/clickstack-helm-repository.d.ts.map +1 -1
  39. package/dist/factories/clickstack/compositions/clickstack-helm-repository.js.map +1 -1
  40. package/dist/factories/clickstack/compositions/k8s-telemetry.d.ts +4 -16
  41. package/dist/factories/clickstack/compositions/k8s-telemetry.d.ts.map +1 -1
  42. package/dist/factories/clickstack/compositions/k8s-telemetry.js.map +1 -1
  43. package/dist/factories/clickstack/compositions/otel-helm-repository.d.ts +3 -7
  44. package/dist/factories/clickstack/compositions/otel-helm-repository.d.ts.map +1 -1
  45. package/dist/factories/clickstack/compositions/otel-helm-repository.js.map +1 -1
  46. package/dist/factories/clickstack/types.d.ts +5 -0
  47. package/dist/factories/clickstack/types.d.ts.map +1 -1
  48. package/dist/factories/clickstack/types.js.map +1 -1
  49. package/dist/factories/clickstack/utils/storage.d.ts +13 -0
  50. package/dist/factories/clickstack/utils/storage.d.ts.map +1 -1
  51. package/dist/factories/clickstack/utils/storage.js +31 -2
  52. package/dist/factories/clickstack/utils/storage.js.map +1 -1
  53. package/dist/factories/cnpg/compositions/cnpg-bootstrap.d.ts +3 -27
  54. package/dist/factories/cnpg/compositions/cnpg-bootstrap.d.ts.map +1 -1
  55. package/dist/factories/cnpg/compositions/cnpg-bootstrap.js.map +1 -1
  56. package/dist/factories/dagster/compositions/dagster-bootstrap.d.ts +3 -450
  57. package/dist/factories/dagster/compositions/dagster-bootstrap.d.ts.map +1 -1
  58. package/dist/factories/dagster/compositions/dagster-bootstrap.js.map +1 -1
  59. package/dist/factories/dagster/compositions/dagster-helm-repository.d.ts +3 -7
  60. package/dist/factories/dagster/compositions/dagster-helm-repository.d.ts.map +1 -1
  61. package/dist/factories/dagster/compositions/dagster-helm-repository.js.map +1 -1
  62. package/dist/factories/envoy-ai-gateway/compositions/platform.d.ts +6 -34
  63. package/dist/factories/envoy-ai-gateway/compositions/platform.d.ts.map +1 -1
  64. package/dist/factories/envoy-ai-gateway/compositions/platform.js.map +1 -1
  65. package/dist/factories/envoy-ai-gateway/compositions/repository.d.ts +3 -7
  66. package/dist/factories/envoy-ai-gateway/compositions/repository.d.ts.map +1 -1
  67. package/dist/factories/envoy-ai-gateway/compositions/repository.js.map +1 -1
  68. package/dist/factories/external-dns/compositions/external-dns-bootstrap.d.ts +3 -1
  69. package/dist/factories/external-dns/compositions/external-dns-bootstrap.d.ts.map +1 -1
  70. package/dist/factories/external-dns/compositions/external-dns-bootstrap.js.map +1 -1
  71. package/dist/factories/flux/git-repository.d.ts +10 -12
  72. package/dist/factories/flux/git-repository.d.ts.map +1 -1
  73. package/dist/factories/flux/git-repository.js.map +1 -1
  74. package/dist/factories/flux/kustomize/kustomization.d.ts +17 -49
  75. package/dist/factories/flux/kustomize/kustomization.d.ts.map +1 -1
  76. package/dist/factories/flux/kustomize/kustomization.js.map +1 -1
  77. package/dist/factories/harbor/compositions/harbor-installation.d.ts +6 -309
  78. package/dist/factories/harbor/compositions/harbor-installation.d.ts.map +1 -1
  79. package/dist/factories/harbor/compositions/harbor-installation.js.map +1 -1
  80. package/dist/factories/harbor/compositions/harbor-rook-s3-credentials.d.ts +2 -8
  81. package/dist/factories/harbor/compositions/harbor-rook-s3-credentials.d.ts.map +1 -1
  82. package/dist/factories/harbor/compositions/harbor-rook-s3-credentials.js.map +1 -1
  83. package/dist/factories/hatchet/compositions/hatchet-installation.d.ts +3 -43
  84. package/dist/factories/hatchet/compositions/hatchet-installation.d.ts.map +1 -1
  85. package/dist/factories/hatchet/compositions/hatchet-installation.js.map +1 -1
  86. package/dist/factories/inngest/compositions/inngest-bootstrap.d.ts +3 -116
  87. package/dist/factories/inngest/compositions/inngest-bootstrap.d.ts.map +1 -1
  88. package/dist/factories/inngest/compositions/inngest-bootstrap.js.map +1 -1
  89. package/dist/factories/nats/compositions/nack-controller-bootstrap.d.ts +4 -15
  90. package/dist/factories/nats/compositions/nack-controller-bootstrap.d.ts.map +1 -1
  91. package/dist/factories/nats/compositions/nack-controller-bootstrap.js.map +1 -1
  92. package/dist/factories/nats/compositions/nats-bootstrap.d.ts +5 -26
  93. package/dist/factories/nats/compositions/nats-bootstrap.d.ts.map +1 -1
  94. package/dist/factories/nats/compositions/nats-bootstrap.js.map +1 -1
  95. package/dist/factories/opensearch/compositions/operator-bootstrap.d.ts +5 -23
  96. package/dist/factories/opensearch/compositions/operator-bootstrap.d.ts.map +1 -1
  97. package/dist/factories/opensearch/compositions/operator-bootstrap.js.map +1 -1
  98. package/dist/factories/opensearch/compositions/repository.d.ts +3 -7
  99. package/dist/factories/opensearch/compositions/repository.d.ts.map +1 -1
  100. package/dist/factories/opensearch/compositions/repository.js.map +1 -1
  101. package/dist/factories/ory/compositions/ory-identity-stack.d.ts +3 -2067
  102. package/dist/factories/ory/compositions/ory-identity-stack.d.ts.map +1 -1
  103. package/dist/factories/ory/compositions/ory-identity-stack.js.map +1 -1
  104. package/dist/factories/ory/compositions/ory-platform-stack.d.ts +3 -184
  105. package/dist/factories/ory/compositions/ory-platform-stack.d.ts.map +1 -1
  106. package/dist/factories/ory/compositions/ory-platform-stack.js.map +1 -1
  107. package/dist/factories/pebble/compositions/pebble-bootstrap.d.ts +3 -15
  108. package/dist/factories/pebble/compositions/pebble-bootstrap.d.ts.map +1 -1
  109. package/dist/factories/pebble/compositions/pebble-bootstrap.js.map +1 -1
  110. package/dist/factories/rook/compositions/object-storage-claim.d.ts +3 -18
  111. package/dist/factories/rook/compositions/object-storage-claim.d.ts.map +1 -1
  112. package/dist/factories/rook/compositions/object-storage-claim.js.map +1 -1
  113. package/dist/factories/rook/compositions/rook-ceph-helm-repository.d.ts +3 -7
  114. package/dist/factories/rook/compositions/rook-ceph-helm-repository.d.ts.map +1 -1
  115. package/dist/factories/rook/compositions/rook-ceph-helm-repository.js.map +1 -1
  116. package/dist/factories/rook/compositions/rook-ceph-operator-installation.d.ts +4 -30
  117. package/dist/factories/rook/compositions/rook-ceph-operator-installation.d.ts.map +1 -1
  118. package/dist/factories/rook/compositions/rook-ceph-operator-installation.js.map +1 -1
  119. package/dist/factories/rook/compositions/rook-ceph-platform.d.ts +5 -277
  120. package/dist/factories/rook/compositions/rook-ceph-platform.d.ts.map +1 -1
  121. package/dist/factories/rook/compositions/rook-ceph-platform.js.map +1 -1
  122. package/dist/factories/searxng/compositions/searxng-bootstrap.d.ts +2 -1
  123. package/dist/factories/searxng/compositions/searxng-bootstrap.d.ts.map +1 -1
  124. package/dist/factories/searxng/compositions/searxng-bootstrap.js +22 -22
  125. package/dist/factories/searxng/compositions/searxng-bootstrap.js.map +1 -1
  126. package/dist/factories/simple/index.d.ts +3 -3
  127. package/dist/factories/simple/index.d.ts.map +1 -1
  128. package/dist/factories/simple/index.js.map +1 -1
  129. package/dist/factories/traefik/compositions/traefik-bootstrap.d.ts +4 -47
  130. package/dist/factories/traefik/compositions/traefik-bootstrap.d.ts.map +1 -1
  131. package/dist/factories/traefik/compositions/traefik-bootstrap.js.map +1 -1
  132. package/dist/factories/traefik/compositions/traefik-helm-repository.d.ts +3 -7
  133. package/dist/factories/traefik/compositions/traefik-helm-repository.d.ts.map +1 -1
  134. package/dist/factories/traefik/compositions/traefik-helm-repository.js.map +1 -1
  135. package/dist/factories/traefik/resources/helm.d.ts +2 -2
  136. package/dist/factories/traefik/resources/helm.d.ts.map +1 -1
  137. package/dist/factories/traefik/resources/helm.js.map +1 -1
  138. package/dist/factories/valkey/compositions/valkey-bootstrap.d.ts +4 -16
  139. package/dist/factories/valkey/compositions/valkey-bootstrap.d.ts.map +1 -1
  140. package/dist/factories/valkey/compositions/valkey-bootstrap.js.map +1 -1
  141. package/dist/factories/valkey/compositions/valkey-helm-repository.d.ts +3 -7
  142. package/dist/factories/valkey/compositions/valkey-helm-repository.d.ts.map +1 -1
  143. package/dist/factories/valkey/compositions/valkey-helm-repository.js.map +1 -1
  144. package/package.json +7 -5
  145. package/dist/core/aspects/metadata.d.ts +0 -16
  146. package/dist/core/aspects/metadata.d.ts.map +0 -1
  147. package/dist/core/aspects/targets.d.ts +0 -9
  148. package/dist/core/aspects/targets.d.ts.map +0 -1
  149. package/dist/core/composition/analysis-metadata.d.ts +0 -15
  150. package/dist/core/composition/analysis-metadata.d.ts.map +0 -1
  151. package/dist/core/composition/index.d.ts +0 -12
  152. package/dist/core/composition/index.d.ts.map +0 -1
  153. package/dist/core/composition/nested-status-cel.d.ts +0 -82
  154. package/dist/core/composition/nested-status-cel.d.ts.map +0 -1
  155. package/dist/core/config/defaults.d.ts +0 -109
  156. package/dist/core/config/defaults.d.ts.map +0 -1
  157. package/dist/core/config/env.d.ts +0 -12
  158. package/dist/core/config/env.d.ts.map +0 -1
  159. package/dist/core/config/index.d.ts +0 -3
  160. package/dist/core/config/index.d.ts.map +0 -1
  161. package/dist/core/containers/exec.d.ts +0 -19
  162. package/dist/core/containers/exec.d.ts.map +0 -1
  163. package/dist/core/containers/registries/docker-session.d.ts +0 -14
  164. package/dist/core/containers/registries/docker-session.d.ts.map +0 -1
  165. package/dist/core/containers/registries/ecr.d.ts +0 -21
  166. package/dist/core/containers/registries/ecr.d.ts.map +0 -1
  167. package/dist/core/containers/registries/index.d.ts +0 -9
  168. package/dist/core/containers/registries/index.d.ts.map +0 -1
  169. package/dist/core/containers/registries/orbstack.d.ts +0 -13
  170. package/dist/core/containers/registries/orbstack.d.ts.map +0 -1
  171. package/dist/core/deployment/closure-planner.d.ts +0 -20
  172. package/dist/core/deployment/closure-planner.d.ts.map +0 -1
  173. package/dist/core/deployment/crd-manager.d.ts +0 -79
  174. package/dist/core/deployment/crd-manager.d.ts.map +0 -1
  175. package/dist/core/deployment/deletion-result.d.ts +0 -22
  176. package/dist/core/deployment/deletion-result.d.ts.map +0 -1
  177. package/dist/core/deployment/event-filter.d.ts +0 -142
  178. package/dist/core/deployment/event-filter.d.ts.map +0 -1
  179. package/dist/core/deployment/event-monitor.d.ts +0 -243
  180. package/dist/core/deployment/event-monitor.d.ts.map +0 -1
  181. package/dist/core/deployment/handle-tracing.d.ts +0 -14
  182. package/dist/core/deployment/handle-tracing.d.ts.map +0 -1
  183. package/dist/core/deployment/kro-instance-admission.d.ts +0 -17
  184. package/dist/core/deployment/kro-instance-admission.d.ts.map +0 -1
  185. package/dist/core/deployment/kro-instance-safety.d.ts +0 -237
  186. package/dist/core/deployment/kro-instance-safety.d.ts.map +0 -1
  187. package/dist/core/deployment/nested-composition-status.d.ts +0 -33
  188. package/dist/core/deployment/nested-composition-status.d.ts.map +0 -1
  189. package/dist/core/deployment/readiness-waiter.d.ts +0 -60
  190. package/dist/core/deployment/readiness-waiter.d.ts.map +0 -1
  191. package/dist/core/deployment/resource-applier.d.ts +0 -87
  192. package/dist/core/deployment/resource-applier.d.ts.map +0 -1
  193. package/dist/core/deployment/resource-tagging.d.ts +0 -220
  194. package/dist/core/deployment/resource-tagging.d.ts.map +0 -1
  195. package/dist/core/deployment/schema-cel-evaluator.d.ts +0 -5
  196. package/dist/core/deployment/schema-cel-evaluator.d.ts.map +0 -1
  197. package/dist/core/deployment/singleton-gitops.d.ts +0 -10
  198. package/dist/core/deployment/singleton-gitops.d.ts.map +0 -1
  199. package/dist/core/expressions/analysis/alias-inliner.d.ts +0 -14
  200. package/dist/core/expressions/analysis/alias-inliner.d.ts.map +0 -1
  201. package/dist/core/expressions/analysis/array-method-converters.d.ts +0 -19
  202. package/dist/core/expressions/analysis/array-method-converters.d.ts.map +0 -1
  203. package/dist/core/expressions/analysis/ast-helpers.d.ts +0 -49
  204. package/dist/core/expressions/analysis/ast-helpers.d.ts.map +0 -1
  205. package/dist/core/expressions/analysis/ast-node-converters.d.ts +0 -15
  206. package/dist/core/expressions/analysis/ast-node-converters.d.ts.map +0 -1
  207. package/dist/core/expressions/analysis/ast-type-guards.d.ts +0 -14
  208. package/dist/core/expressions/analysis/ast-type-guards.d.ts.map +0 -1
  209. package/dist/core/expressions/analysis/call-expression-converters.d.ts +0 -18
  210. package/dist/core/expressions/analysis/call-expression-converters.d.ts.map +0 -1
  211. package/dist/core/expressions/analysis/cel-emitter.d.ts +0 -86
  212. package/dist/core/expressions/analysis/cel-emitter.d.ts.map +0 -1
  213. package/dist/core/expressions/analysis/expression-classifier.d.ts +0 -77
  214. package/dist/core/expressions/analysis/expression-classifier.d.ts.map +0 -1
  215. package/dist/core/expressions/analysis/expression-metadata.d.ts +0 -15
  216. package/dist/core/expressions/analysis/expression-metadata.d.ts.map +0 -1
  217. package/dist/core/expressions/analysis/fn-toString-self-test.d.ts +0 -146
  218. package/dist/core/expressions/analysis/fn-toString-self-test.d.ts.map +0 -1
  219. package/dist/core/expressions/analysis/operator-utils.d.ts +0 -35
  220. package/dist/core/expressions/analysis/operator-utils.d.ts.map +0 -1
  221. package/dist/core/expressions/analysis/ready-when.d.ts +0 -3
  222. package/dist/core/expressions/analysis/ready-when.d.ts.map +0 -1
  223. package/dist/core/expressions/analysis/scope-resolver.d.ts +0 -57
  224. package/dist/core/expressions/analysis/scope-resolver.d.ts.map +0 -1
  225. package/dist/core/expressions/analysis/strict-cel.d.ts +0 -26
  226. package/dist/core/expressions/analysis/strict-cel.d.ts.map +0 -1
  227. package/dist/core/expressions/analysis/string-method-converters.d.ts +0 -27
  228. package/dist/core/expressions/analysis/string-method-converters.d.ts.map +0 -1
  229. package/dist/core/expressions/composition/composition-analyzer-helpers.d.ts +0 -114
  230. package/dist/core/expressions/composition/composition-analyzer-helpers.d.ts.map +0 -1
  231. package/dist/core/expressions/composition/composition-analyzer-ternary.d.ts +0 -78
  232. package/dist/core/expressions/composition/composition-analyzer-ternary.d.ts.map +0 -1
  233. package/dist/core/expressions/composition/composition-analyzer-traversal.d.ts +0 -37
  234. package/dist/core/expressions/composition/composition-analyzer-traversal.d.ts.map +0 -1
  235. package/dist/core/expressions/composition/context-tracker.d.ts +0 -39
  236. package/dist/core/expressions/composition/context-tracker.d.ts.map +0 -1
  237. package/dist/core/expressions/composition/expression-analyzer.d.ts +0 -101
  238. package/dist/core/expressions/composition/expression-analyzer.d.ts.map +0 -1
  239. package/dist/core/expressions/composition/imperative-analyzer.d.ts +0 -21
  240. package/dist/core/expressions/composition/imperative-analyzer.d.ts.map +0 -1
  241. package/dist/core/expressions/composition/index.d.ts +0 -17
  242. package/dist/core/expressions/composition/index.d.ts.map +0 -1
  243. package/dist/core/expressions/composition/integration-hooks.d.ts +0 -71
  244. package/dist/core/expressions/composition/integration-hooks.d.ts.map +0 -1
  245. package/dist/core/expressions/composition/scope-manager.d.ts +0 -93
  246. package/dist/core/expressions/composition/scope-manager.d.ts.map +0 -1
  247. package/dist/core/expressions/composition/types.d.ts +0 -41
  248. package/dist/core/expressions/composition/types.d.ts.map +0 -1
  249. package/dist/core/expressions/conditional/conditional-expression-processor.d.ts +0 -154
  250. package/dist/core/expressions/conditional/conditional-expression-processor.d.ts.map +0 -1
  251. package/dist/core/expressions/conditional/conditional-integration.d.ts +0 -111
  252. package/dist/core/expressions/conditional/conditional-integration.d.ts.map +0 -1
  253. package/dist/core/expressions/factory/dependency-tracker.d.ts +0 -222
  254. package/dist/core/expressions/factory/dependency-tracker.d.ts.map +0 -1
  255. package/dist/core/expressions/factory/resource-analyzer.d.ts +0 -139
  256. package/dist/core/expressions/factory/resource-analyzer.d.ts.map +0 -1
  257. package/dist/core/expressions/factory/resource-type-validator.d.ts +0 -149
  258. package/dist/core/expressions/factory/resource-type-validator.d.ts.map +0 -1
  259. package/dist/core/expressions/factory/status-ast-utils.d.ts +0 -36
  260. package/dist/core/expressions/factory/status-ast-utils.d.ts.map +0 -1
  261. package/dist/core/expressions/factory/status-cel-generation.d.ts +0 -67
  262. package/dist/core/expressions/factory/status-cel-generation.d.ts.map +0 -1
  263. package/dist/core/expressions/factory/status-field-analysis.d.ts +0 -58
  264. package/dist/core/expressions/factory/status-field-analysis.d.ts.map +0 -1
  265. package/dist/core/expressions/magic-proxy/magic-assignable-analyzer.d.ts +0 -123
  266. package/dist/core/expressions/magic-proxy/magic-assignable-analyzer.d.ts.map +0 -1
  267. package/dist/core/expressions/magic-proxy/magic-proxy-analyzer.d.ts +0 -153
  268. package/dist/core/expressions/magic-proxy/magic-proxy-analyzer.d.ts.map +0 -1
  269. package/dist/core/expressions/magic-proxy/magic-proxy-ast.d.ts +0 -44
  270. package/dist/core/expressions/magic-proxy/magic-proxy-ast.d.ts.map +0 -1
  271. package/dist/core/expressions/magic-proxy/magic-proxy-types.d.ts +0 -36
  272. package/dist/core/expressions/magic-proxy/magic-proxy-types.d.ts.map +0 -1
  273. package/dist/core/expressions/magic-proxy/optionality-analysis.d.ts +0 -54
  274. package/dist/core/expressions/magic-proxy/optionality-analysis.d.ts.map +0 -1
  275. package/dist/core/expressions/magic-proxy/optionality-cel-generation.d.ts +0 -51
  276. package/dist/core/expressions/magic-proxy/optionality-cel-generation.d.ts.map +0 -1
  277. package/dist/core/expressions/magic-proxy/optionality-hydration.d.ts +0 -84
  278. package/dist/core/expressions/magic-proxy/optionality-hydration.d.ts.map +0 -1
  279. package/dist/core/expressions/magic-proxy/optionality-optional-chaining.d.ts +0 -61
  280. package/dist/core/expressions/magic-proxy/optionality-optional-chaining.d.ts.map +0 -1
  281. package/dist/core/expressions/validation/resource-field-utils.d.ts +0 -69
  282. package/dist/core/expressions/validation/resource-field-utils.d.ts.map +0 -1
  283. package/dist/core/kubernetes/bun-watch.d.ts +0 -30
  284. package/dist/core/kubernetes/bun-watch.d.ts.map +0 -1
  285. package/dist/core/kubernetes/client-node-runtime.d.ts +0 -10
  286. package/dist/core/kubernetes/client-node-runtime.d.ts.map +0 -1
  287. package/dist/core/proxy/index.d.ts +0 -8
  288. package/dist/core/proxy/index.d.ts.map +0 -1
  289. package/dist/core/proxy/known-status-fields.d.ts +0 -27
  290. package/dist/core/proxy/known-status-fields.d.ts.map +0 -1
  291. package/dist/core/readiness/strategy-configuration.d.ts +0 -12
  292. package/dist/core/readiness/strategy-configuration.d.ts.map +0 -1
  293. package/dist/core/references/cel-lexical-scanner.d.ts +0 -113
  294. package/dist/core/references/cel-lexical-scanner.d.ts.map +0 -1
  295. package/dist/core/runtime/standalone-operation.d.ts +0 -12
  296. package/dist/core/runtime/standalone-operation.d.ts.map +0 -1
  297. package/dist/core/runtime-patches/crd-patcher.d.ts +0 -30
  298. package/dist/core/runtime-patches/crd-patcher.d.ts.map +0 -1
  299. package/dist/core/runtime-patches/crd-schema-fix.d.ts +0 -145
  300. package/dist/core/runtime-patches/crd-schema-fix.d.ts.map +0 -1
  301. package/dist/core/runtime-patches/index.d.ts +0 -8
  302. package/dist/core/runtime-patches/index.d.ts.map +0 -1
  303. package/dist/core/serialization/arktype-ast.d.ts +0 -21
  304. package/dist/core/serialization/arktype-ast.d.ts.map +0 -1
  305. package/dist/core/serialization/kro-post-processing.d.ts +0 -46
  306. package/dist/core/serialization/kro-post-processing.d.ts.map +0 -1
  307. package/dist/core/serialization/status-analysis-pipeline.d.ts +0 -67
  308. package/dist/core/serialization/status-analysis-pipeline.d.ts.map +0 -1
  309. package/dist/core/validation/cel-dialect.d.ts +0 -246
  310. package/dist/core/validation/cel-dialect.d.ts.map +0 -1
  311. package/dist/core/validation/cel-validator.d.ts +0 -77
  312. package/dist/core/validation/cel-validator.d.ts.map +0 -1
  313. package/dist/core/validation/literal-status.d.ts +0 -107
  314. package/dist/core/validation/literal-status.d.ts.map +0 -1
  315. package/dist/core/validation/structural-spec-dependence.d.ts +0 -179
  316. package/dist/core/validation/structural-spec-dependence.d.ts.map +0 -1
  317. package/dist/factories/cert-manager/utils/helm-values-mapper.d.ts +0 -23
  318. package/dist/factories/cert-manager/utils/helm-values-mapper.d.ts.map +0 -1
  319. package/dist/factories/cert-manager/utils/index.d.ts +0 -2
  320. package/dist/factories/cert-manager/utils/index.d.ts.map +0 -1
  321. package/dist/factories/flux/kustomize/types.d.ts +0 -2
  322. package/dist/factories/flux/kustomize/types.d.ts.map +0 -1
  323. package/dist/factories/nats/compositions/nack-controller-migration.d.ts +0 -18
  324. package/dist/factories/nats/compositions/nack-controller-migration.d.ts.map +0 -1
  325. package/dist/factories/ory/schemas/maester-crds.d.ts +0 -9
  326. package/dist/factories/ory/schemas/maester-crds.d.ts.map +0 -1
  327. package/dist/factories/pebble/utils/helm-values-mapper.d.ts +0 -21
  328. package/dist/factories/pebble/utils/helm-values-mapper.d.ts.map +0 -1
  329. package/dist/factories/shared.d.ts +0 -18
  330. package/dist/factories/shared.d.ts.map +0 -1
  331. package/dist/shared/own-property.d.ts +0 -15
  332. package/dist/shared/own-property.d.ts.map +0 -1
  333. package/dist/utils/cel-escape.d.ts +0 -12
  334. package/dist/utils/cel-escape.d.ts.map +0 -1
  335. package/dist/utils/cel-resource-identifiers.d.ts +0 -23
  336. package/dist/utils/cel-resource-identifiers.d.ts.map +0 -1
@@ -1,146 +0,0 @@
1
- /**
2
- * fn.toString() Self-Test
3
- *
4
- * TypeKro relies on `fn.toString()` producing parseable JavaScript source code in
5
- * multiple critical code paths (status builder analysis, composition body analysis,
6
- * imperative composition analysis, readyWhen callback conversion, and expression
7
- * classification). This module provides a self-test that verifies the current runtime
8
- * environment produces parseable output.
9
- *
10
- * ## Why this matters
11
- *
12
- * The `Function.prototype.toString()` output varies by runtime and build configuration:
13
- *
14
- * | Environment | Arrow function toString() | Parseable? |
15
- * |--------------------------|-----------------------------------------------|------------|
16
- * | Node.js / Bun (no build) | `(x) => x + 1` | Yes |
17
- * | Bun (transpiled) | `(x) => x + 1` (quotes normalized to double) | Yes |
18
- * | esbuild (minified) | `x=>x+1` (whitespace removed) | Yes |
19
- * | esbuild (mangled) | `a=>a+1` (names mangled) | Partial* |
20
- * | Terser (mangled) | `a=>a+1` | Partial* |
21
- * | Webpack mode=production | May inline or remove function bodies | No |
22
- * | Closure Compiler ADVANCED | Removes/renames everything | No |
23
- *
24
- * *Partial: AST parses, but parameter names are mangled so `schema.spec.name`
25
- * becomes `a.spec.name` — the composition analyzer needs the original names.
26
- *
27
- * ## Build configurations that break TypeKro
28
- *
29
- * 1. **Variable name mangling** (`esbuild --mangle`, `terser --mangle-props`):
30
- * Renames function parameters. Status builder analysis depends on parameter names
31
- * matching resource keys (e.g., `(schema, resources) => ...`).
32
- *
33
- * 2. **Dead code elimination** with tree-shaking that removes function bodies:
34
- * The composition analyzer needs the full function body to detect if/for/ternary
35
- * patterns.
36
- *
37
- * 3. **Advanced minification** (Closure Compiler ADVANCED, UglifyJS with `compress`):
38
- * May restructure control flow, inline functions, or evaluate expressions at
39
- * compile time, making the source unparseable or semantically different.
40
- *
41
- * 4. **Source-to-source transforms** that don't preserve function structure:
42
- * SWC with certain plugins, Babel transforms that rewrite arrow functions to
43
- * regular functions with different parameter patterns.
44
- *
45
- * ## Safe configurations
46
- *
47
- * - **No bundler** (direct TypeScript execution via Bun or ts-node): Always works
48
- * - **esbuild with `--minify-whitespace` only** (no `--mangle`): Works
49
- * - **Webpack mode=development**: Works
50
- * - **Vite dev mode**: Works
51
- * - **Any bundler with `Function.prototype.toString` polyfill that preserves source**: Works
52
- *
53
- * ## Call sites that depend on fn.toString()
54
- *
55
- * | File | Usage |
56
- * |-------------------------------------|------------------------------------------|
57
- * | `serialization/yaml.ts` | readyWhen callback → CEL conversion |
58
- * | `deployment/debug-logger.ts` | Evaluator type inspection (non-critical) |
59
- * | `expressions/factory/status-builder-analyzer.ts` | Status builder AST parsing |
60
- * | `expressions/context/context-detector.ts` | Expression complexity analysis|
61
- * | `expressions/analysis/expression-classifier.ts` | Function body analysis |
62
- * | `expressions/composition/composition-analyzer.ts` | Composition body detection |
63
- * | `expressions/composition/imperative-analyzer.ts` | Imperative composition parse |
64
- * | `expressions/composition/expression-analyzer.ts` | Pattern detection |
65
- *
66
- * ## Future alternative: TypeScript Compiler API
67
- *
68
- * As an opt-in alternative to `fn.toString()` + acorn parsing, the TypeScript Compiler
69
- * API (`typescript` package) could be used to analyze user-supplied functions at build
70
- * time or at schema-registration time. This would eliminate the runtime dependency on
71
- * `fn.toString()` producing parseable output entirely.
72
- *
73
- * ### How it would work
74
- *
75
- * 1. **At `toResourceGraph()` call time**, capture the source file path and position of
76
- * the status builder / composition function using `Error().stack` or a build plugin.
77
- * 2. **Use `ts.createProgram()`** to parse the original TypeScript source (not the
78
- * transpiled output) with full type information.
79
- * 3. **Walk the AST** using `ts.forEachChild()` to find the function node at the
80
- * captured position and extract parameter types, return types, and body structure.
81
- * 4. **Cache results** keyed by file path + position so re-analysis is free.
82
- *
83
- * ### Advantages
84
- *
85
- * - Works regardless of bundler/minifier configuration
86
- * - Has access to full TypeScript type information (not just runtime values)
87
- * - Can detect type errors in status builders at registration time
88
- * - No runtime `fn.toString()` calls needed
89
- *
90
- * ### Challenges (estimated 2+ weeks to implement)
91
- *
92
- * - **Source location capture**: Reliably mapping a runtime function call back to its
93
- * source file position is non-trivial. `Error().stack` line numbers may not match
94
- * original TS source after transpilation. A build plugin (Bun plugin, esbuild plugin)
95
- * could inject source locations at compile time.
96
- * - **TypeScript as a dependency**: The `typescript` package is ~45MB. It should be an
97
- * optional peer dependency, loaded dynamically with `import('typescript')`.
98
- * - **Performance**: `ts.createProgram()` is expensive (~500ms-2s for a medium project).
99
- * Must be lazy and cached. Could use `ts.createLanguageService()` for incremental
100
- * parsing.
101
- * - **Monorepo / workspace support**: Source files may be in different packages with
102
- * different tsconfig.json files. The API would need to resolve the correct config.
103
- * - **Runtime-only environments**: Users running TypeKro without access to source files
104
- * (e.g., in a Docker container with only compiled JS) would still need the
105
- * `fn.toString()` fallback.
106
- * - **Test coverage**: All 12 call sites would need dual-path testing (TS API path +
107
- * fn.toString() fallback path).
108
- *
109
- * ### Recommendation
110
- *
111
- * Keep `fn.toString()` as the default path with the self-test as a safety net. The TS
112
- * Compiler API approach should be a future opt-in for users who need bundler-safe
113
- * analysis. Implementation should wait until there is concrete user demand from a
114
- * production deployment that uses aggressive minification.
115
- */
116
- export interface FnToStringSelfTestResult {
117
- /** Whether the runtime produces parseable fn.toString() output */
118
- parseable: boolean;
119
- /** Whether parameter names are preserved (not mangled) */
120
- parameterNamesPreserved: boolean;
121
- /** Whether function bodies are preserved (not stripped) */
122
- functionBodiesPreserved: boolean;
123
- /** Whether arrow function syntax is preserved */
124
- arrowSyntaxPreserved: boolean;
125
- /** Overall: is the environment compatible with TypeKro's analysis features? */
126
- compatible: boolean;
127
- /** Detailed diagnostics */
128
- diagnostics: string[];
129
- }
130
- /**
131
- * Run the fn.toString() self-test.
132
- *
133
- * Call this early in the application lifecycle to detect incompatible
134
- * build configurations before they cause subtle analysis failures.
135
- *
136
- * @returns Self-test results with compatibility assessment
137
- */
138
- export declare function runFnToStringSelfTest(): FnToStringSelfTestResult;
139
- /**
140
- * Validate the runtime environment and log warnings if fn.toString() analysis
141
- * will not work correctly. This is a no-op if the environment is compatible.
142
- *
143
- * Call once during application initialization.
144
- */
145
- export declare function validateFnToStringEnvironment(): void;
146
- //# sourceMappingURL=fn-toString-self-test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fn-toString-self-test.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/analysis/fn-toString-self-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkHG;AAuBH,MAAM,WAAW,wBAAwB;IACvC,kEAAkE;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,uBAAuB,EAAE,OAAO,CAAC;IACjC,2DAA2D;IAC3D,uBAAuB,EAAE,OAAO,CAAC;IACjC,iDAAiD;IACjD,oBAAoB,EAAE,OAAO,CAAC;IAC9B,+EAA+E;IAC/E,UAAU,EAAE,OAAO,CAAC;IACpB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI,wBAAwB,CA6EhE;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CA6BpD"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Operator mapping, precedence, and boolean-test utilities.
3
- *
4
- * All functions are pure (stateless) – extracted from JavaScriptToCelAnalyzer
5
- * to reduce the class to a slim orchestrator.
6
- */
7
- /** Map a JavaScript logical/comparison operator to its CEL equivalent. */
8
- export declare function mapOperatorToCel(operator: string): string;
9
- /** Map a JavaScript binary operator (including arithmetic) to CEL. Throws for unsupported ops. */
10
- export declare function convertBinaryOperator(operator: string): string;
11
- /** Get numeric precedence for an operator (lower = binds less tightly). */
12
- export declare function getOperatorPrecedence(operator: string): number;
13
- /** Whether an operator is left-associative. Ternary (`?`) is the only right-associative one. */
14
- export declare function isLeftAssociative(operator: string): boolean;
15
- /**
16
- * Find the "main" (lowest-precedence) operator at depth-0 in an expression string.
17
- */
18
- export declare function getMainOperator(expression: string): string | null;
19
- /**
20
- * Wrap `expression` in parentheses when its main operator has lower precedence
21
- * than `parentOperator`, or when it is a right operand with equal precedence
22
- * for left-associative operators.
23
- */
24
- export declare function addParenthesesIfNeeded(expression: string, parentOperator?: string, isLeftOperand?: boolean): string;
25
- /** Check whether an expression string already contains a boolean comparison. */
26
- export declare function isBooleanExpression(expression: string): boolean;
27
- /**
28
- * Convert a CEL expression to a boolean test.
29
- * If the expression is already boolean, return it unchanged;
30
- * otherwise wrap it in truthy-check conditions.
31
- */
32
- export declare function convertToBooleanTest(expression: string): string;
33
- /** Infer a representative zero-value from a Kubernetes field path. */
34
- export declare function inferTypeFromFieldPath(fieldPath: string): string | number | boolean | Record<string, unknown> | unknown[];
35
- //# sourceMappingURL=operator-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operator-utils.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/analysis/operator-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmBH,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD;AAkBD,kGAAkG;AAClG,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAU9D;AAsBD,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA4BjE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,MAAM,EACvB,aAAa,CAAC,EAAE,OAAO,GACtB,MAAM,CAiBR;AAID,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAG/D;AAID,sEAAsE;AACtE,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,CA6BjE"}
@@ -1,3 +0,0 @@
1
- /** Lower the supported readyWhen callback subset into a CEL expression. */
2
- export declare function convertReadyWhenCallbackToCel(fn: (...args: unknown[]) => unknown, resourceId: string): string;
3
- //# sourceMappingURL=ready-when.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ready-when.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/analysis/ready-when.ts"],"names":[],"mappings":"AAgGA,2EAA2E;AAC3E,wBAAgB,6BAA6B,CAC3C,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACnC,UAAU,EAAE,MAAM,GACjB,MAAM,CA0BR"}
@@ -1,57 +0,0 @@
1
- /**
2
- * Scope Resolver — Dependency extraction and resource reference resolution
3
- *
4
- * Extracted from analyzer.ts. Contains all methods that extract KubernetesRef
5
- * dependencies from expression strings, resolve resource/schema references,
6
- * and generate CEL field paths from KubernetesRef objects.
7
- */
8
- import type { CelExpression, KubernetesRef } from '../../types/common.js';
9
- import type { Enhanced } from '../../types/kubernetes.js';
10
- import type { SchemaProxy } from '../../types/serialization.js';
11
- import type { AnalysisContext, CelConversionResult } from './shared-types.js';
12
- export { isResourceReference } from './cel-emitter.js';
13
- /**
14
- * Generate CEL expression from KubernetesRef based on context.
15
- * Handles the core KubernetesRef to CEL field path conversion (resourceId.fieldPath).
16
- */
17
- export declare function generateCelFromKubernetesRef(ref: KubernetesRef<unknown>, context: AnalysisContext): string;
18
- /**
19
- * Convert a KubernetesRef directly to a CEL expression.
20
- * This is the main method for KubernetesRef to CEL field path conversion.
21
- */
22
- export declare function convertKubernetesRefToCel(ref: KubernetesRef<unknown>, context: AnalysisContext, typeValidator?: {
23
- validateKubernetesRef: (ref: KubernetesRef<unknown>, availableReferences: Record<string, Enhanced<unknown, unknown>>, schemaProxy?: SchemaProxy<Record<string, unknown>, Record<string, unknown>>) => {
24
- valid: boolean;
25
- errors: {
26
- message: string;
27
- }[];
28
- };
29
- }): CelExpression;
30
- /**
31
- * Extract resource reference strings from an expression.
32
- * Returns array of strings like "deployment.status.readyReplicas".
33
- */
34
- export declare function extractResourceReferencesFromExpression(expression: string): string[];
35
- /**
36
- * Extract dependencies from JavaScript expression string and return them.
37
- * Looks for resource references and schema references in the expression text.
38
- */
39
- export declare function extractDependenciesFromExpressionString(expression: string, context: AnalysisContext): KubernetesRef<unknown>[];
40
- /**
41
- * Extract dependencies from JavaScript expression and add them to context.dependencies.
42
- * This is the mutation-based variant used by the special case handlers.
43
- */
44
- export declare function extractDependenciesFromExpression(expression: string, context: AnalysisContext): void;
45
- /**
46
- * Handle optional chaining expressions.
47
- */
48
- export declare function handleOptionalChainingExpression(expression: string, context: AnalysisContext): CelConversionResult;
49
- /**
50
- * Handle expressions with both optional chaining and nullish coalescing.
51
- */
52
- export declare function handleMixedOptionalAndNullishExpression(expression: string, context: AnalysisContext): CelConversionResult;
53
- /**
54
- * Handle nullish coalescing expressions.
55
- */
56
- export declare function handleNullishCoalescingExpression(expression: string, context: AnalysisContext): CelConversionResult;
57
- //# sourceMappingURL=scope-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scope-resolver.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/analysis/scope-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAI9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,aAAa,CAAC,OAAO,CAAC,EAC3B,OAAO,EAAE,eAAe,GACvB,MAAM,CAwBR;AAID;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,aAAa,CAAC,OAAO,CAAC,EAC3B,OAAO,EAAE,eAAe,EACxB,aAAa,CAAC,EAAE;IACd,qBAAqB,EAAE,CACrB,GAAG,EAAE,aAAa,CAAC,OAAO,CAAC,EAC3B,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,EAC/D,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KACxE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,EAAE,CAAA;KAAE,CAAC;CACxD,GACA,aAAa,CAsCf;AAID;;;GAGG;AACH,wBAAgB,uCAAuC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAcpF;AAID;;;GAGG;AACH,wBAAgB,uCAAuC,CACrD,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB,aAAa,CAAC,OAAO,CAAC,EAAE,CAiE1B;AAID;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB,IAAI,CAuJN;AAID;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB,mBAAmB,CAoErB;AAED;;GAEG;AACH,wBAAgB,uCAAuC,CACrD,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB,mBAAmB,CAmErB;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,eAAe,GACvB,mBAAmB,CAmErB"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Strict CEL diagnostics mode resolution.
3
- *
4
- * When the JS→CEL analyzer cannot prove an emitted CEL expression
5
- * type-checks (e.g. a member expression references a resource that is not
6
- * part of the resource graph), the default behavior is lenient: emit the
7
- * expression anyway and log a warning. The failure then only surfaces when
8
- * KRO rejects the ResourceGraphDefinition on a live cluster — potentially
9
- * long after serialization.
10
- *
11
- * In strict mode the conversion throws at analysis/serialization time with
12
- * the offending expression instead.
13
- *
14
- * Strictness is resolved from (highest precedence first):
15
- * 1. An explicit `strictCelDiagnostics` flag (on the `AnalysisContext`, or
16
- * threaded from factory options such as
17
- * `.factory('kro', { strictCelDiagnostics: true })`).
18
- * 2. The `TYPEKRO_STRICT_CEL` environment variable (`1` or `true`).
19
- *
20
- * The environment variable is consulted ONLY here so the global default is
21
- * defined in a single place rather than scattered across diagnostic sites.
22
- */
23
- export declare function isStrictCelDiagnosticsEnabled(context?: {
24
- strictCelDiagnostics?: boolean | undefined;
25
- }): boolean;
26
- //# sourceMappingURL=strict-cel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"strict-cel.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/analysis/strict-cel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,CAAC,EAAE;IACtD,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC5C,GAAG,OAAO,CAMV"}
@@ -1,27 +0,0 @@
1
- /**
2
- * JavaScript string method → CEL expression converters.
3
- *
4
- * Each function converts a specific JS string method call to its CEL equivalent.
5
- * All functions are stateless – they receive a `convertNode` callback for recursion.
6
- */
7
- import type { Expression as ESTreeExpression, SpreadElement as ESTreeSpreadElement } from 'estree';
8
- import type { CelExpression } from '../../types/common.js';
9
- import type { AnalysisContext, ConvertNodeFn } from './shared-types.js';
10
- type Args = readonly (ESTreeExpression | ESTreeSpreadElement)[];
11
- export declare function convertStringIncludes(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
12
- export declare function convertStringStartsWith(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
13
- export declare function convertStringEndsWith(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
14
- export declare function convertStringToLowerCase(object: CelExpression, args: Args, _context: AnalysisContext): CelExpression;
15
- export declare function convertStringToUpperCase(object: CelExpression, args: Args, _context: AnalysisContext): CelExpression;
16
- export declare function convertStringTrim(object: CelExpression, args: Args, _context: AnalysisContext): CelExpression;
17
- export declare function convertStringSubstring(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
18
- export declare function convertStringSlice(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
19
- export declare function convertStringSplit(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
20
- export declare function convertStringPadStart(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
21
- export declare function convertStringPadEnd(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
22
- export declare function convertStringRepeat(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
23
- export declare function convertStringReplace(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
24
- export declare function convertStringIndexOf(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
25
- export declare function convertStringLastIndexOf(object: CelExpression, args: Args, context: AnalysisContext, convertNode: ConvertNodeFn): CelExpression;
26
- export {};
27
- //# sourceMappingURL=string-method-converters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string-method-converters.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/analysis/string-method-converters.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,gBAAgB,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAInG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAExE,KAAK,IAAI,GAAG,SAAS,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,EAAE,CAAC;AAIhE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAcf;AAID,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAcf;AAID,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAcf;AAID,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,eAAe,GACxB,aAAa,CAaf;AAID,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,eAAe,GACxB,aAAa,CAaf;AAID,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,eAAe,GACxB,aAAa,CAaf;AAID,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAsBf;AAID,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAsBf;AAID,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAcf;AAID,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAgBf;AAID,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAgBf;AAID,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAcf;AAID,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAef;AAID,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAcf;AAID,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,aAAa,GACzB,aAAa,CAcf"}
@@ -1,114 +0,0 @@
1
- /**
2
- * Stateless utility functions for the composition body analyzer.
3
- *
4
- * Used by both ternary analysis and AST traversal modules.
5
- */
6
- import { type LexicalAliasScope } from '../analysis/alias-inliner.js';
7
- import type { ASTNode, CallExpression, FactoryCallInfo } from './composition-analyzer-types.js';
8
- /**
9
- * Extract source text from an AST node using character ranges.
10
- */
11
- export declare function getSource(node: ASTNode, fullSource: string): string;
12
- /**
13
- * Check if a CallExpression is a factory call (Deployment, ConfigMap, Service, etc.)
14
- * by looking at the callee name against the central FactoryRegistry.
15
- *
16
- * Custom factories become first-class by calling `registerFactory()` at import
17
- * time — no need to edit this file.
18
- */
19
- export declare function isFactoryCall(node: ASTNode): node is CallExpression;
20
- /** Extract the factory function name from a factory call expression */
21
- export declare function extractFactoryName(call: CallExpression): string;
22
- /**
23
- * Extract the `id` property value from factory call arguments.
24
- *
25
- * Factory calls like `Deployment({ name: ..., id: 'web' })` have
26
- * an ObjectExpression as their first argument containing the id property.
27
- */
28
- export declare function extractFactoryId(call: CallExpression): string | undefined;
29
- export declare function conditionToCel(node: ASTNode, fullSource: string, specParamName: string, optionalFieldNames?: Set<string>, lexicalAliases?: LexicalAliasScope): string;
30
- /**
31
- * Convert an iterable source expression to a Kro forEach CEL reference.
32
- *
33
- * e.g. `spec.regions` → `${schema.spec.regions}`
34
- * e.g. `spec.workers.filter(w => w.enabled)` → `${schema.spec.workers.filter(w, w.enabled)}`
35
- */
36
- export declare function iterableToCel(node: ASTNode, fullSource: string, specParamName: string): string;
37
- /**
38
- * Check if a condition node is a compile-time literal (e.g. `true`, `false`, `1`).
39
- * Compile-time literals should NOT produce includeWhen directives.
40
- */
41
- export declare function isCompileTimeLiteral(node: ASTNode): boolean;
42
- /**
43
- * Check if a condition references the schema spec parameter.
44
- * Only conditions that reference schema fields should produce includeWhen.
45
- */
46
- export declare function referencesSpec(node: ASTNode, specParamName: string): boolean;
47
- /**
48
- * Check if an expression references a resource's status field — i.e.,
49
- * contains a `<identifier>.status.<field>` MemberExpression where the
50
- * root identifier is NOT the spec parameter and NOT a known JS global.
51
- *
52
- * Returns the `{ variableName, statusField }` if found, or `undefined`.
53
- * Used by the ternary detector to widen its gate beyond spec-only conditions.
54
- *
55
- * **Limitation — compound conditions**: Returns on the first match
56
- * (`VisitorOption.Break`). For compound expressions like
57
- * `cache.status.ready && db.status.instances >= 1`, only the first
58
- * status ref (`cache.status.ready`) is captured. The inverted run
59
- * then flips only that field, which may not fully invert the ternary
60
- * if the second condition also contributes. This is acceptable for
61
- * now: compound resource-status ternaries are rare, and `dependsOn`
62
- * + `Cel.cond` can handle them explicitly.
63
- */
64
- export declare function extractResourceStatusRef(node: ASTNode, specParamName: string, optionalFieldNames?: Set<string>): {
65
- variableName: string;
66
- statusField: string;
67
- conditionExpression?: string;
68
- } | undefined;
69
- /**
70
- * Rewrite every `<jsVariable>.status.` reference in a CEL-ish condition to its
71
- * serialized KRO resource ID. Compound conditions can reference more than the
72
- * primary variable captured by `extractResourceStatusRef`.
73
- */
74
- export declare function remapResourceStatusReferences(conditionExpression: string, variableToResourceId: Map<string, string>): string;
75
- /**
76
- * Find all factory calls in a subtree and return their resource IDs and factory names.
77
- */
78
- export declare function findFactoryCallsInSubtree(node: ASTNode): FactoryCallInfo[];
79
- /**
80
- * Extract the spec parameter name from the composition function source.
81
- *
82
- * Handles patterns:
83
- * (spec) => { ... }
84
- * function(spec) { ... }
85
- * (spec) => expr
86
- */
87
- export declare function extractSpecParamName(functionSource: string): string;
88
- /**
89
- * Convert a full expression AST node to a CEL string (not just conditions).
90
- *
91
- * Reuses the same transforms as conditionToCel:
92
- * - `spec.` → `schema.spec.`
93
- * - `===` → `==`, `!==` → `!=`
94
- * - Single quotes → double quotes
95
- * - Wraps in `${}`
96
- */
97
- export declare function expressionToCel(node: ASTNode, fullSource: string, specParamName: string, optionalFieldNames?: Set<string>, lexicalAliases?: LexicalAliasScope): string;
98
- /**
99
- * Map a factory argument property key name to its template property path.
100
- *
101
- * Factory arguments like `{ name: ..., image: ..., replicas: ... }` map to
102
- * template paths like `spec.replicas`. Special keys are mapped differently:
103
- * - `name` → `metadata.name`
104
- * - `id` → skipped (internal, not a template property)
105
- * - Everything else → `spec.{key}`
106
- */
107
- export declare function factoryArgKeyToTemplatePath(key: string): string | undefined;
108
- /**
109
- * Negate a CEL condition expression.
110
- *
111
- * `${schema.spec.monitoring}` → `${!schema.spec.monitoring}`
112
- */
113
- export declare function negateCondition(condition: string): string;
114
- //# sourceMappingURL=composition-analyzer-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"composition-analyzer-helpers.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/composition/composition-analyzer-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,eAAe,EAIhB,MAAM,iCAAiC,CAAC;AAsEzC;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAMnE;AAMD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,cAAc,CAgBnE;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAW/D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAqBzE;AAuFD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAChC,cAAc,CAAC,EAAE,iBAAiB,GACjC,MAAM,CA4MR;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CA8B9F;AAMD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAQ3D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAe5E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,OAAO,EACb,aAAa,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC/B;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CA0KzF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,mBAAmB,EAAE,MAAM,EAC3B,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACxC,MAAM,CAQR;AAMD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,EAAE,CAkB1E;AAMD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAYnE;AAMD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAChC,cAAc,CAAC,EAAE,iBAAiB,GACjC,MAAM,CAER;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAY3E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAIzD"}
@@ -1,78 +0,0 @@
1
- /**
2
- * Ternary detection and collection aggregate analysis for the composition analyzer.
3
- *
4
- * Handles:
5
- * - Ternary expressions in factory arguments → CEL conditionals in templates
6
- * - Ternary expressions in return statements → CEL conditionals in status
7
- * - Collection aggregate patterns (`.map().length`, `.every()`, `.some()`, etc.)
8
- */
9
- import type { LexicalAliasScope } from '../analysis/alias-inliner.js';
10
- import type { ASTAnalysisResult, ASTNode, CallExpression, CollectionVariable } from './composition-analyzer-types.js';
11
- /**
12
- * Scan a factory call's ObjectExpression argument for property values that are
13
- * ConditionalExpression (ternary) nodes referencing the spec parameter.
14
- *
15
- * At runtime, `spec.env === 'production' ? 3 : 1` evaluates to `1` because
16
- * `===` on proxies returns false. But in the serialized Kro YAML, this should
17
- * be a CEL conditional: `${schema.spec.env == "production" ? 3 : 1}`.
18
- *
19
- * Detected ternaries are stored as templateOverrides in the analysis result.
20
- */
21
- export declare function analyzeFactoryArgTernaries(call: CallExpression, resourceId: string, fullSource: string, specParamName: string, result: ASTAnalysisResult, optionalFieldNames?: Set<string>, lexicalAliases?: LexicalAliasScope): void;
22
- /**
23
- * Analyze a ReturnStatement's object literal for ternary expressions
24
- * referencing the spec parameter. These become status overrides.
25
- */
26
- export declare function analyzeReturnStatementTernaries(returnNode: ASTNode, fullSource: string, specParamName: string, result: ASTAnalysisResult, optionalFieldNames?: Set<string>, lexicalAliases?: LexicalAliasScope): void;
27
- /**
28
- * Check if a CallExpression is a `.map()` call on a spec array whose callback
29
- * contains factory calls. If so, return the resource ID from the factory.
30
- *
31
- * Matches: spec.workers.map(worker => Deployment({...}))
32
- * Also matches transpiled inline forms (no variable assignment).
33
- */
34
- export declare function findFactoryMapCall(node: ASTNode, specParamName: string): string | undefined;
35
- /**
36
- * Convert a callback expression to a CEL lambda body.
37
- *
38
- * Given: `(w) => w.status.readyReplicas > 0`
39
- * Extracts the body source and replaces `w.status.X` with the CEL form.
40
- * The callback parameter becomes the CEL lambda variable.
41
- */
42
- export declare function callbackToCelLambda(callbackNode: ASTNode, fullSource: string, _resourceId: string): {
43
- lambdaVar: string;
44
- body: string;
45
- } | undefined;
46
- /**
47
- * Analyze the return statement for collection aggregate expressions.
48
- *
49
- * Detects patterns like (with or without intermediate variables):
50
- * spec.workers.map(cb).length → size(workerDep)
51
- * spec.workers.map(cb).every((w) => ...) → workerDep.all(w, ...)
52
- * spec.workers.map(cb).some((w) => ...) → workerDep.exists(w, ...)
53
- * spec.workers.map(cb).filter((w) => ...).length → size(workerDep.filter(w, ...))
54
- * spec.workers.map(cb).map((w) => ...).join(sep) → workerDep.map(w, ...).join(sep)
55
- *
56
- * Also handles transpiled forms where variable assignments are inlined.
57
- */
58
- export declare function analyzeReturnCollectionAggregates(returnNode: ASTNode, fullSource: string, _collections: Map<string, CollectionVariable>, specParamName: string, result: ASTAnalysisResult): void;
59
- /**
60
- * Try to convert an expression node containing collection aggregate patterns to CEL.
61
- *
62
- * Detects patterns like `spec.workers.map(factoryCb).length` and converts to
63
- * `size(workerDep)`. Works directly on the expression tree without requiring
64
- * variable tracking (handles transpiler inlining).
65
- *
66
- * Returns the CEL expression string (wrapped in ${}) or undefined.
67
- */
68
- export declare function convertCollectionExpressionToCel(node: ASTNode, fullSource: string, specParamName: string, collections?: Map<string, CollectionVariable>): string | undefined;
69
- /**
70
- * Convert a call expression on a factory-producing collection to CEL (unwrapped).
71
- *
72
- * Walks up the chain to find the originating `spec.arr.map(factoryCb)` call,
73
- * extracts the resource ID, then converts the aggregate method to CEL.
74
- *
75
- * Returns the CEL expression WITHOUT ${} wrapper, or undefined.
76
- */
77
- export declare function convertCollectionCallToCel(call: CallExpression, fullSource: string, specParamName: string, collections?: Map<string, CollectionVariable>): string | undefined;
78
- //# sourceMappingURL=composition-analyzer-ternary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"composition-analyzer-ternary.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/composition/composition-analyzer-ternary.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAWtE,OAAO,KAAK,EACV,iBAAiB,EACjB,OAAO,EACP,cAAc,EACd,kBAAkB,EAOnB,MAAM,iCAAiC,CAAC;AAQzC;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,iBAAiB,EACzB,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAChC,cAAc,CAAC,EAAE,iBAAiB,GACjC,IAAI,CAcN;AA2YD;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,iBAAiB,EACzB,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAChC,cAAc,CAAC,EAAE,iBAAiB,GACjC,IAAI,CA+CN;AAMD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAoB3F;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,OAAO,EACrB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAkCjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAC7C,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,iBAAiB,GACxB,IAAI,CAgCN;AAED;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAC5C,MAAM,GAAG,SAAS,CA8CpB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAC5C,MAAM,GAAG,SAAS,CAsFpB"}
@@ -1,37 +0,0 @@
1
- /**
2
- * Core recursive AST traversal for the composition body analyzer.
3
- *
4
- * Contains the mutually recursive `walkBody`, `walkStatement`, and `walkExpression`
5
- * functions, plus the `registerResourceControlFlow` and `extractFunctionBody` helpers.
6
- *
7
- * These functions MUST stay together because they are mutually recursive.
8
- */
9
- import type { ASTAnalysisResult, ASTNode, TraversalContext } from './composition-analyzer-types.js';
10
- /**
11
- * Walk the AST body to find factory calls and their enclosing control flow.
12
- *
13
- * This uses a recursive visitor that tracks the current stack of control flow
14
- * constructs (ForOfStatement, IfStatement) and attaches them when a factory
15
- * call is found.
16
- */
17
- export declare function walkBody(body: ASTNode[], fullSource: string, specParamName: string, ctx: TraversalContext, result: ASTAnalysisResult): void;
18
- export declare function walkStatement(node: ASTNode, fullSource: string, specParamName: string, ctx: TraversalContext, result: ASTAnalysisResult): void;
19
- /**
20
- * Walk an expression node looking for factory calls and control flow patterns.
21
- */
22
- export declare function walkExpression(node: ASTNode, fullSource: string, specParamName: string, ctx: TraversalContext, result: ASTAnalysisResult): void;
23
- /**
24
- * Register the control flow context for a resource.
25
- *
26
- * If the resource was already seen, this merges the contexts (this handles
27
- * cases where a factory call appears in multiple code paths, though this
28
- * is unlikely for well-formed compositions).
29
- */
30
- export declare function registerResourceControlFlow(resourceId: string, factoryName: string, ctx: TraversalContext, result: ASTAnalysisResult): void;
31
- /**
32
- * Extract the body statements from the parsed function AST.
33
- */
34
- export declare function extractFunctionBody(ast: ASTNode & {
35
- body: ASTNode[];
36
- }): ASTNode[] | null;
37
- //# sourceMappingURL=composition-analyzer-traversal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"composition-analyzer-traversal.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/composition/composition-analyzer-traversal.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqBH,OAAO,KAAK,EACV,iBAAiB,EACjB,OAAO,EAUP,gBAAgB,EAEjB,MAAM,iCAAiC,CAAC;AAgCzC;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,OAAO,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,iBAAiB,GACxB,IAAI,CAIN;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,iBAAiB,GACxB,IAAI,CAuON;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,iBAAiB,GACxB,IAAI,CA2RN;AAMD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,iBAAiB,GACxB,IAAI,CA8BN;AAMD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,EAAE,CAAA;CAAE,GAAG,OAAO,EAAE,GAAG,IAAI,CAyBxF"}
@@ -1,39 +0,0 @@
1
- /**
2
- * Context-Aware Resource Tracking for Composition Integration
3
- *
4
- * Tracks KubernetesRef usage across composition contexts, providing caching
5
- * and cross-resource reference analysis.
6
- */
7
- import type { CompositionContext } from '../../composition/context.js';
8
- import type { KubernetesRef } from '../../types/common.js';
9
- import type { Enhanced } from '../../types.js';
10
- /**
11
- * Context-aware resource tracking for composition integration
12
- */
13
- export declare class CompositionContextTracker {
14
- private contextAnalysisCache;
15
- resourceKubernetesRefCache: Map<string, KubernetesRef<unknown>[]>;
16
- /**
17
- * Track KubernetesRef usage in a composition context
18
- */
19
- trackCompositionContext(context: CompositionContext): {
20
- totalKubernetesRefs: number;
21
- resourcesWithKubernetesRefs: string[];
22
- crossResourceReferences: Array<{
23
- sourceResource: string;
24
- targetResource: string;
25
- fieldPath: string;
26
- }>;
27
- };
28
- /**
29
- * Get cached KubernetesRef objects for a resource
30
- */
31
- getCachedResourceKubernetesRefs(resourceId: string): KubernetesRef<unknown>[];
32
- /**
33
- * Clear caches for a specific context
34
- */
35
- clearContextCache(contextId: string): void;
36
- /** Delegate to canonical implementation in type-guards.ts */
37
- extractKubernetesRefsFromResource(resource: Enhanced<unknown, unknown>): KubernetesRef<unknown>[];
38
- }
39
- //# sourceMappingURL=context-tracker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-tracker.d.ts","sourceRoot":"","sources":["../../../../src/core/expressions/composition/context-tracker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;GAEG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,oBAAoB,CAAmE;IACxF,0BAA0B,wCAA+C;IAEhF;;OAEG;IACH,uBAAuB,CAAC,OAAO,EAAE,kBAAkB,GAAG;QACpD,mBAAmB,EAAE,MAAM,CAAC;QAC5B,2BAA2B,EAAE,MAAM,EAAE,CAAC;QACtC,uBAAuB,EAAE,KAAK,CAAC;YAC7B,cAAc,EAAE,MAAM,CAAC;YACvB,cAAc,EAAE,MAAM,CAAC;YACvB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC,CAAC;KACJ;IAwCD;;OAEG;IACH,+BAA+B,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,EAAE;IAI7E;;OAEG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI1C,6DAA6D;IACtD,iCAAiC,CACtC,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,GACnC,aAAa,CAAC,OAAO,CAAC,EAAE;CAG5B"}