typekro 0.2.2 → 0.3.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.
Files changed (197) hide show
  1. package/README.md +4 -3
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/core/composition/imperative.d.ts.map +1 -1
  4. package/dist/core/composition/imperative.js +15 -2
  5. package/dist/core/composition/imperative.js.map +1 -1
  6. package/dist/core/composition/typekro-runtime/typekro-runtime.d.ts.map +1 -1
  7. package/dist/core/composition/typekro-runtime/typekro-runtime.js +24 -25
  8. package/dist/core/composition/typekro-runtime/typekro-runtime.js.map +1 -1
  9. package/dist/core/dependencies/type-guards.d.ts.map +1 -1
  10. package/dist/core/dependencies/type-guards.js +7 -2
  11. package/dist/core/dependencies/type-guards.js.map +1 -1
  12. package/dist/core/deployment/engine.d.ts +0 -1
  13. package/dist/core/deployment/engine.d.ts.map +1 -1
  14. package/dist/core/deployment/engine.js +0 -1
  15. package/dist/core/deployment/engine.js.map +1 -1
  16. package/dist/core/errors.d.ts +85 -0
  17. package/dist/core/errors.d.ts.map +1 -1
  18. package/dist/core/errors.js +135 -0
  19. package/dist/core/errors.js.map +1 -1
  20. package/dist/core/expressions/analyzer.d.ts +584 -0
  21. package/dist/core/expressions/analyzer.d.ts.map +1 -0
  22. package/dist/core/expressions/analyzer.js +2956 -0
  23. package/dist/core/expressions/analyzer.js.map +1 -0
  24. package/dist/core/expressions/cache.d.ts +136 -0
  25. package/dist/core/expressions/cache.d.ts.map +1 -0
  26. package/dist/core/expressions/cache.js +347 -0
  27. package/dist/core/expressions/cache.js.map +1 -0
  28. package/dist/core/expressions/cel-conversion-engine.d.ts +126 -0
  29. package/dist/core/expressions/cel-conversion-engine.d.ts.map +1 -0
  30. package/dist/core/expressions/cel-conversion-engine.js +293 -0
  31. package/dist/core/expressions/cel-conversion-engine.js.map +1 -0
  32. package/dist/core/expressions/compile-time-validation.d.ts +270 -0
  33. package/dist/core/expressions/compile-time-validation.d.ts.map +1 -0
  34. package/dist/core/expressions/compile-time-validation.js +506 -0
  35. package/dist/core/expressions/compile-time-validation.js.map +1 -0
  36. package/dist/core/expressions/composition-integration.d.ts +315 -0
  37. package/dist/core/expressions/composition-integration.d.ts.map +1 -0
  38. package/dist/core/expressions/composition-integration.js +936 -0
  39. package/dist/core/expressions/composition-integration.js.map +1 -0
  40. package/dist/core/expressions/conditional-expression-processor.d.ts +154 -0
  41. package/dist/core/expressions/conditional-expression-processor.d.ts.map +1 -0
  42. package/dist/core/expressions/conditional-expression-processor.js +479 -0
  43. package/dist/core/expressions/conditional-expression-processor.js.map +1 -0
  44. package/dist/core/expressions/conditional-integration.d.ts +133 -0
  45. package/dist/core/expressions/conditional-integration.d.ts.map +1 -0
  46. package/dist/core/expressions/conditional-integration.js +293 -0
  47. package/dist/core/expressions/conditional-integration.js.map +1 -0
  48. package/dist/core/expressions/conditional-validation.d.ts +181 -0
  49. package/dist/core/expressions/conditional-validation.d.ts.map +1 -0
  50. package/dist/core/expressions/conditional-validation.js +460 -0
  51. package/dist/core/expressions/conditional-validation.js.map +1 -0
  52. package/dist/core/expressions/context-aware-generator.d.ts +127 -0
  53. package/dist/core/expressions/context-aware-generator.d.ts.map +1 -0
  54. package/dist/core/expressions/context-aware-generator.js +500 -0
  55. package/dist/core/expressions/context-aware-generator.js.map +1 -0
  56. package/dist/core/expressions/context-detector.d.ts +148 -0
  57. package/dist/core/expressions/context-detector.d.ts.map +1 -0
  58. package/dist/core/expressions/context-detector.js +546 -0
  59. package/dist/core/expressions/context-detector.js.map +1 -0
  60. package/dist/core/expressions/context-switcher.d.ts +185 -0
  61. package/dist/core/expressions/context-switcher.d.ts.map +1 -0
  62. package/dist/core/expressions/context-switcher.js +515 -0
  63. package/dist/core/expressions/context-switcher.js.map +1 -0
  64. package/dist/core/expressions/context-validator.d.ts +176 -0
  65. package/dist/core/expressions/context-validator.d.ts.map +1 -0
  66. package/dist/core/expressions/context-validator.js +452 -0
  67. package/dist/core/expressions/context-validator.js.map +1 -0
  68. package/dist/core/expressions/custom-context-manager.d.ts +194 -0
  69. package/dist/core/expressions/custom-context-manager.d.ts.map +1 -0
  70. package/dist/core/expressions/custom-context-manager.js +390 -0
  71. package/dist/core/expressions/custom-context-manager.js.map +1 -0
  72. package/dist/core/expressions/expression-proxy.d.ts +80 -0
  73. package/dist/core/expressions/expression-proxy.d.ts.map +1 -0
  74. package/dist/core/expressions/expression-proxy.js +227 -0
  75. package/dist/core/expressions/expression-proxy.js.map +1 -0
  76. package/dist/core/expressions/factory-integration.d.ts +132 -0
  77. package/dist/core/expressions/factory-integration.d.ts.map +1 -0
  78. package/dist/core/expressions/factory-integration.js +327 -0
  79. package/dist/core/expressions/factory-integration.js.map +1 -0
  80. package/dist/core/expressions/factory-pattern-handler.d.ts +88 -0
  81. package/dist/core/expressions/factory-pattern-handler.d.ts.map +1 -0
  82. package/dist/core/expressions/factory-pattern-handler.js +336 -0
  83. package/dist/core/expressions/factory-pattern-handler.js.map +1 -0
  84. package/dist/core/expressions/field-hydration-processor.d.ts +188 -0
  85. package/dist/core/expressions/field-hydration-processor.d.ts.map +1 -0
  86. package/dist/core/expressions/field-hydration-processor.js +562 -0
  87. package/dist/core/expressions/field-hydration-processor.js.map +1 -0
  88. package/dist/core/expressions/imperative-analyzer.d.ts +21 -0
  89. package/dist/core/expressions/imperative-analyzer.d.ts.map +1 -0
  90. package/dist/core/expressions/imperative-analyzer.js +343 -0
  91. package/dist/core/expressions/imperative-analyzer.js.map +1 -0
  92. package/dist/core/expressions/index.d.ts +54 -0
  93. package/dist/core/expressions/index.d.ts.map +1 -0
  94. package/dist/core/expressions/index.js +50 -0
  95. package/dist/core/expressions/index.js.map +1 -0
  96. package/dist/core/expressions/lazy-analysis.d.ts +1128 -0
  97. package/dist/core/expressions/lazy-analysis.d.ts.map +1 -0
  98. package/dist/core/expressions/lazy-analysis.js +2443 -0
  99. package/dist/core/expressions/lazy-analysis.js.map +1 -0
  100. package/dist/core/expressions/magic-assignable-analyzer.d.ts +123 -0
  101. package/dist/core/expressions/magic-assignable-analyzer.d.ts.map +1 -0
  102. package/dist/core/expressions/magic-assignable-analyzer.js +352 -0
  103. package/dist/core/expressions/magic-assignable-analyzer.js.map +1 -0
  104. package/dist/core/expressions/magic-proxy-analyzer.d.ts +206 -0
  105. package/dist/core/expressions/magic-proxy-analyzer.d.ts.map +1 -0
  106. package/dist/core/expressions/magic-proxy-analyzer.js +639 -0
  107. package/dist/core/expressions/magic-proxy-analyzer.js.map +1 -0
  108. package/dist/core/expressions/magic-proxy-detector.d.ts +154 -0
  109. package/dist/core/expressions/magic-proxy-detector.d.ts.map +1 -0
  110. package/dist/core/expressions/magic-proxy-detector.js +242 -0
  111. package/dist/core/expressions/magic-proxy-detector.js.map +1 -0
  112. package/dist/core/expressions/migration-helpers.d.ts +133 -0
  113. package/dist/core/expressions/migration-helpers.d.ts.map +1 -0
  114. package/dist/core/expressions/migration-helpers.js +443 -0
  115. package/dist/core/expressions/migration-helpers.js.map +1 -0
  116. package/dist/core/expressions/optionality-handler.d.ts +503 -0
  117. package/dist/core/expressions/optionality-handler.d.ts.map +1 -0
  118. package/dist/core/expressions/optionality-handler.js +1306 -0
  119. package/dist/core/expressions/optionality-handler.js.map +1 -0
  120. package/dist/core/expressions/readiness-integration.d.ts +119 -0
  121. package/dist/core/expressions/readiness-integration.d.ts.map +1 -0
  122. package/dist/core/expressions/readiness-integration.js +386 -0
  123. package/dist/core/expressions/readiness-integration.js.map +1 -0
  124. package/dist/core/expressions/resource-analyzer.d.ts +486 -0
  125. package/dist/core/expressions/resource-analyzer.d.ts.map +1 -0
  126. package/dist/core/expressions/resource-analyzer.js +1086 -0
  127. package/dist/core/expressions/resource-analyzer.js.map +1 -0
  128. package/dist/core/expressions/resource-validation.d.ts +187 -0
  129. package/dist/core/expressions/resource-validation.d.ts.map +1 -0
  130. package/dist/core/expressions/resource-validation.js +552 -0
  131. package/dist/core/expressions/resource-validation.js.map +1 -0
  132. package/dist/core/expressions/runtime-error-mapper.d.ts +138 -0
  133. package/dist/core/expressions/runtime-error-mapper.d.ts.map +1 -0
  134. package/dist/core/expressions/runtime-error-mapper.js +412 -0
  135. package/dist/core/expressions/runtime-error-mapper.js.map +1 -0
  136. package/dist/core/expressions/source-map.d.ts +168 -0
  137. package/dist/core/expressions/source-map.d.ts.map +1 -0
  138. package/dist/core/expressions/source-map.js +350 -0
  139. package/dist/core/expressions/source-map.js.map +1 -0
  140. package/dist/core/expressions/status-builder-analyzer.d.ts +353 -0
  141. package/dist/core/expressions/status-builder-analyzer.d.ts.map +1 -0
  142. package/dist/core/expressions/status-builder-analyzer.js +1301 -0
  143. package/dist/core/expressions/status-builder-analyzer.js.map +1 -0
  144. package/dist/core/expressions/type-inference.d.ts +184 -0
  145. package/dist/core/expressions/type-inference.d.ts.map +1 -0
  146. package/dist/core/expressions/type-inference.js +838 -0
  147. package/dist/core/expressions/type-inference.js.map +1 -0
  148. package/dist/core/expressions/type-safety.d.ts +203 -0
  149. package/dist/core/expressions/type-safety.d.ts.map +1 -0
  150. package/dist/core/expressions/type-safety.js +442 -0
  151. package/dist/core/expressions/type-safety.js.map +1 -0
  152. package/dist/core/expressions/types.d.ts +282 -0
  153. package/dist/core/expressions/types.d.ts.map +1 -0
  154. package/dist/core/expressions/types.js +8 -0
  155. package/dist/core/expressions/types.js.map +1 -0
  156. package/dist/core/kubernetes/client-provider.js +2 -2
  157. package/dist/core/kubernetes/client-provider.js.map +1 -1
  158. package/dist/core/serialization/core.d.ts.map +1 -1
  159. package/dist/core/serialization/core.js +573 -9
  160. package/dist/core/serialization/core.js.map +1 -1
  161. package/dist/core/types/deployment.d.ts +4 -0
  162. package/dist/core/types/deployment.d.ts.map +1 -1
  163. package/dist/core/types/deployment.js.map +1 -1
  164. package/dist/core/types/index.d.ts +1 -0
  165. package/dist/core/types/index.d.ts.map +1 -1
  166. package/dist/core/types/index.js.map +1 -1
  167. package/dist/core.d.ts +1 -1
  168. package/dist/core.d.ts.map +1 -1
  169. package/dist/core.js +1 -1
  170. package/dist/core.js.map +1 -1
  171. package/dist/factories/helm/helm-release.d.ts.map +1 -1
  172. package/dist/factories/helm/helm-release.js +0 -5
  173. package/dist/factories/helm/helm-release.js.map +1 -1
  174. package/dist/factories/helm/types.d.ts +1 -1
  175. package/dist/factories/helm/types.d.ts.map +1 -1
  176. package/dist/factories/shared.d.ts.map +1 -1
  177. package/dist/factories/shared.js +21 -1
  178. package/dist/factories/shared.js.map +1 -1
  179. package/dist/factories/simple/index.d.ts +2 -2
  180. package/dist/factories/simple/index.d.ts.map +1 -1
  181. package/dist/factories/simple/workloads/deployment.d.ts +3 -3
  182. package/dist/factories/simple/workloads/deployment.d.ts.map +1 -1
  183. package/dist/factories/simple/workloads/deployment.js +37 -11
  184. package/dist/factories/simple/workloads/deployment.js.map +1 -1
  185. package/dist/index.d.ts +1 -1
  186. package/dist/index.d.ts.map +1 -1
  187. package/dist/index.js +1 -1
  188. package/dist/index.js.map +1 -1
  189. package/dist/utils/index.d.ts +1 -1
  190. package/dist/utils/index.d.ts.map +1 -1
  191. package/dist/utils/index.js +1 -1
  192. package/dist/utils/index.js.map +1 -1
  193. package/dist/utils/type-guards.d.ts +6 -0
  194. package/dist/utils/type-guards.d.ts.map +1 -1
  195. package/dist/utils/type-guards.js +25 -2
  196. package/dist/utils/type-guards.js.map +1 -1
  197. package/package.json +6 -1
@@ -0,0 +1,479 @@
1
+ /**
2
+ * Conditional Expression Processor for JavaScript to CEL Conversion
3
+ *
4
+ * This module provides functionality to process conditional expressions like
5
+ * includeWhen and readyWhen that contain KubernetesRef objects, converting
6
+ * them to appropriate CEL expressions for different deployment strategies.
7
+ */
8
+ import { getComponentLogger } from '../logging/index.js';
9
+ import { isKubernetesRef } from '../../utils/type-guards.js';
10
+ import { CEL_EXPRESSION_BRAND } from '../constants/brands.js';
11
+ import { MagicProxyDetector } from './magic-proxy-detector.js';
12
+ import { ExpressionContextDetector } from './context-detector.js';
13
+ const logger = getComponentLogger('conditional-expression-processor');
14
+ /**
15
+ * Conditional Expression Processor
16
+ *
17
+ * Processes conditional expressions containing KubernetesRef objects and converts
18
+ * them to appropriate CEL expressions for different deployment contexts.
19
+ */
20
+ export class ConditionalExpressionProcessor {
21
+ magicProxyDetector;
22
+ contextDetector;
23
+ constructor() {
24
+ this.magicProxyDetector = new MagicProxyDetector();
25
+ this.contextDetector = new ExpressionContextDetector();
26
+ }
27
+ /**
28
+ * Process an includeWhen expression containing KubernetesRef objects
29
+ *
30
+ * @param expression - The includeWhen expression to process
31
+ * @param context - Factory context
32
+ * @param config - Processing configuration
33
+ * @returns Processing result
34
+ */
35
+ processIncludeWhenExpression(expression, context, config = {}) {
36
+ const startTime = performance.now();
37
+ logger.debug('Processing includeWhen expression', {
38
+ factoryType: context.factoryType,
39
+ factoryName: context.factoryName,
40
+ expressionType: typeof expression
41
+ });
42
+ const result = {
43
+ expression,
44
+ wasProcessed: false,
45
+ original: expression,
46
+ conditionalType: 'includeWhen',
47
+ contextResult: this.contextDetector.detectContextFromFunction('includeWhen', [expression], {
48
+ factoryType: context.factoryType,
49
+ functionContext: 'includeWhen'
50
+ }),
51
+ validationErrors: [],
52
+ metrics: {
53
+ processingTimeMs: 0,
54
+ referencesProcessed: 0,
55
+ expressionsGenerated: 0
56
+ },
57
+ ...(config.includeDebugInfo ? {
58
+ debugInfo: {
59
+ detectedReferences: [],
60
+ processingSteps: []
61
+ }
62
+ } : {})
63
+ };
64
+ // Detect KubernetesRef objects in the expression
65
+ const detection = this.magicProxyDetector.detectKubernetesRefs(expression, {
66
+ maxDepth: config.maxDepth || 10,
67
+ includeDetailedPaths: true,
68
+ analyzeReferenceSources: true
69
+ });
70
+ if (config.includeDebugInfo && result.debugInfo) {
71
+ result.debugInfo.detectedReferences = detection.references.map(ref => ref.ref);
72
+ result.debugInfo.processingSteps.push(`Detected ${detection.references.length} KubernetesRef objects`);
73
+ }
74
+ // Validate the expression for includeWhen context (regardless of KubernetesRef presence)
75
+ const validationErrors = this.validateIncludeWhenExpression(expression, detection, config);
76
+ result.validationErrors = validationErrors;
77
+ if (config.includeDebugInfo && result.debugInfo) {
78
+ result.debugInfo.processingSteps.push(`Validation errors: ${validationErrors.length}`);
79
+ }
80
+ // If no KubernetesRef objects found, return as-is (but with validation results)
81
+ if (!detection.hasKubernetesRefs) {
82
+ result.metrics.processingTimeMs = performance.now() - startTime;
83
+ return result;
84
+ }
85
+ if (validationErrors.length > 0 && config.strictValidation) {
86
+ result.metrics.processingTimeMs = performance.now() - startTime;
87
+ return result;
88
+ }
89
+ // Process the expression based on factory type
90
+ const processed = this.processConditionalExpression(expression, detection, context, 'includeWhen', config, result);
91
+ result.expression = processed;
92
+ result.wasProcessed = true;
93
+ result.metrics.referencesProcessed = detection.references.length;
94
+ result.metrics.processingTimeMs = performance.now() - startTime;
95
+ logger.debug('includeWhen expression processing completed', {
96
+ wasProcessed: result.wasProcessed,
97
+ referencesProcessed: result.metrics.referencesProcessed,
98
+ processingTimeMs: result.metrics.processingTimeMs
99
+ });
100
+ return result;
101
+ }
102
+ /**
103
+ * Process a readyWhen expression containing KubernetesRef objects
104
+ *
105
+ * @param expression - The readyWhen expression to process
106
+ * @param context - Factory context
107
+ * @param config - Processing configuration
108
+ * @returns Processing result
109
+ */
110
+ processReadyWhenExpression(expression, context, config = {}) {
111
+ const startTime = performance.now();
112
+ logger.debug('Processing readyWhen expression', {
113
+ factoryType: context.factoryType,
114
+ factoryName: context.factoryName,
115
+ expressionType: typeof expression
116
+ });
117
+ const result = {
118
+ expression,
119
+ wasProcessed: false,
120
+ original: expression,
121
+ conditionalType: 'readyWhen',
122
+ contextResult: this.contextDetector.detectContextFromFunction('readyWhen', [expression], {
123
+ factoryType: context.factoryType,
124
+ functionContext: 'readyWhen'
125
+ }),
126
+ validationErrors: [],
127
+ metrics: {
128
+ processingTimeMs: 0,
129
+ referencesProcessed: 0,
130
+ expressionsGenerated: 0
131
+ },
132
+ ...(config.includeDebugInfo ? {
133
+ debugInfo: {
134
+ detectedReferences: [],
135
+ processingSteps: []
136
+ }
137
+ } : {})
138
+ };
139
+ // Detect KubernetesRef objects in the expression
140
+ const detection = this.magicProxyDetector.detectKubernetesRefs(expression, {
141
+ maxDepth: config.maxDepth || 10,
142
+ includeDetailedPaths: true,
143
+ analyzeReferenceSources: true
144
+ });
145
+ if (config.includeDebugInfo && result.debugInfo) {
146
+ result.debugInfo.detectedReferences = detection.references.map(ref => ref.ref);
147
+ result.debugInfo.processingSteps.push(`Detected ${detection.references.length} KubernetesRef objects`);
148
+ }
149
+ // Validate the expression for readyWhen context (regardless of KubernetesRef presence)
150
+ const validationErrors = this.validateReadyWhenExpression(expression, detection, config);
151
+ result.validationErrors = validationErrors;
152
+ // If no KubernetesRef objects found, return as-is (but with validation results)
153
+ if (!detection.hasKubernetesRefs) {
154
+ result.metrics.processingTimeMs = performance.now() - startTime;
155
+ return result;
156
+ }
157
+ result.validationErrors = validationErrors;
158
+ if (validationErrors.length > 0 && config.strictValidation) {
159
+ result.metrics.processingTimeMs = performance.now() - startTime;
160
+ return result;
161
+ }
162
+ // Process the expression based on factory type
163
+ const processed = this.processConditionalExpression(expression, detection, context, 'readyWhen', config, result);
164
+ result.expression = processed;
165
+ result.wasProcessed = true;
166
+ result.metrics.referencesProcessed = detection.references.length;
167
+ result.metrics.processingTimeMs = performance.now() - startTime;
168
+ logger.debug('readyWhen expression processing completed', {
169
+ wasProcessed: result.wasProcessed,
170
+ referencesProcessed: result.metrics.referencesProcessed,
171
+ processingTimeMs: result.metrics.processingTimeMs
172
+ });
173
+ return result;
174
+ }
175
+ /**
176
+ * Process a custom conditional expression containing KubernetesRef objects
177
+ *
178
+ * @param expression - The conditional expression to process
179
+ * @param context - Factory context
180
+ * @param config - Processing configuration
181
+ * @returns Processing result
182
+ */
183
+ processCustomConditionalExpression(expression, context, config = {}) {
184
+ const startTime = performance.now();
185
+ logger.debug('Processing custom conditional expression', {
186
+ factoryType: context.factoryType,
187
+ factoryName: context.factoryName,
188
+ expressionType: typeof expression
189
+ });
190
+ const result = {
191
+ expression,
192
+ wasProcessed: false,
193
+ original: expression,
194
+ conditionalType: 'custom',
195
+ contextResult: this.contextDetector.detectContextFromFunction('conditional', [expression], {
196
+ factoryType: context.factoryType,
197
+ functionContext: 'conditional'
198
+ }),
199
+ validationErrors: [],
200
+ metrics: {
201
+ processingTimeMs: 0,
202
+ referencesProcessed: 0,
203
+ expressionsGenerated: 0
204
+ },
205
+ ...(config.includeDebugInfo ? {
206
+ debugInfo: {
207
+ detectedReferences: [],
208
+ processingSteps: []
209
+ }
210
+ } : {})
211
+ };
212
+ // Detect KubernetesRef objects in the expression
213
+ const detection = this.magicProxyDetector.detectKubernetesRefs(expression, {
214
+ maxDepth: config.maxDepth || 10,
215
+ includeDetailedPaths: true,
216
+ analyzeReferenceSources: true
217
+ });
218
+ if (config.includeDebugInfo && result.debugInfo) {
219
+ result.debugInfo.detectedReferences = detection.references.map(ref => ref.ref);
220
+ result.debugInfo.processingSteps.push(`Detected ${detection.references.length} KubernetesRef objects`);
221
+ }
222
+ // Validate the expression for conditional context (regardless of KubernetesRef presence)
223
+ const validationErrors = this.validateCustomConditionalExpression(expression, detection, config);
224
+ result.validationErrors = validationErrors;
225
+ // If no KubernetesRef objects found, return as-is (but with validation results)
226
+ if (!detection.hasKubernetesRefs) {
227
+ result.metrics.processingTimeMs = performance.now() - startTime;
228
+ return result;
229
+ }
230
+ result.validationErrors = validationErrors;
231
+ if (validationErrors.length > 0 && config.strictValidation) {
232
+ result.metrics.processingTimeMs = performance.now() - startTime;
233
+ return result;
234
+ }
235
+ // Process the expression based on factory type
236
+ const processed = this.processConditionalExpression(expression, detection, context, 'custom', config, result);
237
+ result.expression = processed;
238
+ result.wasProcessed = true;
239
+ result.metrics.referencesProcessed = detection.references.length;
240
+ result.metrics.processingTimeMs = performance.now() - startTime;
241
+ logger.debug('Custom conditional expression processing completed', {
242
+ wasProcessed: result.wasProcessed,
243
+ referencesProcessed: result.metrics.referencesProcessed,
244
+ processingTimeMs: result.metrics.processingTimeMs
245
+ });
246
+ return result;
247
+ }
248
+ /**
249
+ * Core conditional expression processing logic
250
+ */
251
+ processConditionalExpression(expression, detection, context, conditionalType, config, result) {
252
+ // Handle direct KubernetesRef objects
253
+ if (isKubernetesRef(expression)) {
254
+ if (config.includeDebugInfo && result.debugInfo) {
255
+ result.debugInfo.processingSteps.push('Processing direct KubernetesRef');
256
+ }
257
+ if (context.factoryType === 'kro') {
258
+ // For Kro factories, convert to CEL expression
259
+ const celExpr = this.convertKubernetesRefToConditionalCel(expression, conditionalType, context);
260
+ result.metrics.expressionsGenerated = 1;
261
+ return celExpr;
262
+ }
263
+ else {
264
+ // For direct factories, preserve the reference
265
+ return expression;
266
+ }
267
+ }
268
+ // Handle boolean expressions with KubernetesRef objects
269
+ if (this.isBooleanExpressionWithRefs(expression, detection)) {
270
+ if (config.includeDebugInfo && result.debugInfo) {
271
+ result.debugInfo.processingSteps.push('Processing boolean expression with KubernetesRef objects');
272
+ }
273
+ return this.processBooleanExpression(expression, detection, context, conditionalType, result);
274
+ }
275
+ // Handle complex conditional expressions
276
+ if (this.isComplexConditionalExpression(expression, detection)) {
277
+ if (config.includeDebugInfo && result.debugInfo) {
278
+ result.debugInfo.processingSteps.push('Processing complex conditional expression');
279
+ }
280
+ return this.processComplexConditionalExpression(expression, detection, context, conditionalType, result);
281
+ }
282
+ // Handle objects and arrays recursively
283
+ if (expression && typeof expression === 'object') {
284
+ if (config.includeDebugInfo && result.debugInfo) {
285
+ result.debugInfo.processingSteps.push('Processing object/array with nested KubernetesRef objects');
286
+ }
287
+ return this.processObjectWithConditionalRefs(expression, detection, context, conditionalType, config, result);
288
+ }
289
+ // Fallback: return as-is
290
+ return expression;
291
+ }
292
+ /**
293
+ * Convert a KubernetesRef to a conditional CEL expression
294
+ */
295
+ convertKubernetesRefToConditionalCel(ref, conditionalType, context) {
296
+ const celExpression = this.generateConditionalCelFromRef(ref, conditionalType, context);
297
+ return {
298
+ [CEL_EXPRESSION_BRAND]: true,
299
+ expression: celExpression,
300
+ type: 'boolean' // Conditional expressions should evaluate to boolean
301
+ };
302
+ }
303
+ /**
304
+ * Generate CEL expression from KubernetesRef for conditional context
305
+ */
306
+ generateConditionalCelFromRef(ref, conditionalType, _context) {
307
+ const resourceId = ref.resourceId;
308
+ const fieldPath = ref.fieldPath;
309
+ // Handle schema references
310
+ if (resourceId === '__schema__') {
311
+ return `schema.${fieldPath}`;
312
+ }
313
+ // Handle resource references based on conditional type
314
+ switch (conditionalType) {
315
+ case 'includeWhen':
316
+ // includeWhen expressions typically reference schema fields for configuration
317
+ return `${resourceId}.${fieldPath}`;
318
+ case 'readyWhen':
319
+ // readyWhen expressions typically reference resource status fields
320
+ return `${resourceId}.${fieldPath}`;
321
+ default:
322
+ // Custom conditional expressions use standard resource references
323
+ return `${resourceId}.${fieldPath}`;
324
+ }
325
+ }
326
+ /**
327
+ * Check if expression is a boolean expression with KubernetesRef objects
328
+ */
329
+ isBooleanExpressionWithRefs(expression, detection) {
330
+ // This is a simplified check - in a real implementation, we'd parse the expression
331
+ return typeof expression === 'string' &&
332
+ detection.hasKubernetesRefs &&
333
+ /[><=!]=?|&&|\|\||true|false/.test(expression);
334
+ }
335
+ /**
336
+ * Check if expression is a complex conditional expression
337
+ */
338
+ isComplexConditionalExpression(expression, detection) {
339
+ return typeof expression === 'string' &&
340
+ detection.hasKubernetesRefs &&
341
+ expression.includes('?') && expression.includes(':');
342
+ }
343
+ /**
344
+ * Process boolean expressions with KubernetesRef objects
345
+ */
346
+ processBooleanExpression(expression, _detection, _context, _conditionalType, result) {
347
+ // For now, return as-is since boolean expression parsing is complex
348
+ // In a full implementation, this would parse the boolean expression and convert
349
+ // embedded KubernetesRef objects to CEL expressions
350
+ if (result.debugInfo) {
351
+ result.debugInfo.processingSteps.push('Boolean expression processing not fully implemented');
352
+ }
353
+ return expression;
354
+ }
355
+ /**
356
+ * Process complex conditional expressions with KubernetesRef objects
357
+ */
358
+ processComplexConditionalExpression(expression, _detection, _context, _conditionalType, result) {
359
+ // For now, return as-is since complex conditional parsing is complex
360
+ // In a full implementation, this would parse the conditional expression and convert
361
+ // embedded KubernetesRef objects to CEL expressions
362
+ if (result.debugInfo) {
363
+ result.debugInfo.processingSteps.push('Complex conditional expression processing not fully implemented');
364
+ }
365
+ return expression;
366
+ }
367
+ /**
368
+ * Process objects and arrays with conditional KubernetesRef objects
369
+ */
370
+ processObjectWithConditionalRefs(value, detection, context, conditionalType, config, result) {
371
+ if (Array.isArray(value)) {
372
+ return value.map((item) => {
373
+ if (isKubernetesRef(item)) {
374
+ result.metrics.expressionsGenerated++;
375
+ return context.factoryType === 'kro'
376
+ ? this.convertKubernetesRefToConditionalCel(item, conditionalType, context)
377
+ : item;
378
+ }
379
+ // Recursively process nested items
380
+ if (this.magicProxyDetector.containsKubernetesRefs(item)) {
381
+ const nestedResult = this.processConditionalExpression(item, detection, context, conditionalType, config, result);
382
+ return nestedResult;
383
+ }
384
+ return item;
385
+ });
386
+ }
387
+ if (value && typeof value === 'object' && value.constructor === Object) {
388
+ const processed = {};
389
+ for (const [key, val] of Object.entries(value)) {
390
+ if (isKubernetesRef(val)) {
391
+ result.metrics.expressionsGenerated++;
392
+ processed[key] = context.factoryType === 'kro'
393
+ ? this.convertKubernetesRefToConditionalCel(val, conditionalType, context)
394
+ : val;
395
+ }
396
+ else if (this.magicProxyDetector.containsKubernetesRefs(val)) {
397
+ const nestedResult = this.processConditionalExpression(val, detection, context, conditionalType, config, result);
398
+ processed[key] = nestedResult;
399
+ }
400
+ else {
401
+ processed[key] = val;
402
+ }
403
+ }
404
+ return processed;
405
+ }
406
+ return value;
407
+ }
408
+ /**
409
+ * Validate includeWhen expression
410
+ */
411
+ validateIncludeWhenExpression(expression, _detection, _config) {
412
+ const errors = [];
413
+ // includeWhen expressions should evaluate to boolean
414
+ if (typeof expression === 'string' && !this.looksLikeBooleanExpression(expression)) {
415
+ errors.push('includeWhen expressions should evaluate to boolean values');
416
+ }
417
+ // Check for common patterns that might not work in conditional context
418
+ if (typeof expression === 'string' && expression.includes('||') && !expression.includes('&&')) {
419
+ errors.push('includeWhen expressions with only OR operators may not behave as expected');
420
+ }
421
+ return errors;
422
+ }
423
+ /**
424
+ * Validate readyWhen expression
425
+ */
426
+ validateReadyWhenExpression(expression, detection, _config) {
427
+ const errors = [];
428
+ // readyWhen expressions should evaluate to boolean
429
+ if (typeof expression === 'string' && !this.looksLikeBooleanExpression(expression)) {
430
+ errors.push('readyWhen expressions should evaluate to boolean values');
431
+ }
432
+ // readyWhen expressions should typically reference status fields
433
+ const hasStatusReferences = detection.references.some(ref => ref.fieldPath.includes('status'));
434
+ if (!hasStatusReferences && detection.references.length > 0) {
435
+ errors.push('readyWhen expressions should typically reference resource status fields');
436
+ }
437
+ return errors;
438
+ }
439
+ /**
440
+ * Validate custom conditional expression
441
+ */
442
+ validateCustomConditionalExpression(expression, _detection, _config) {
443
+ const errors = [];
444
+ // Custom conditional expressions should be well-formed
445
+ if (typeof expression === 'string' && expression.includes('?') && !expression.includes(':')) {
446
+ errors.push('Conditional expressions with ? must also include :');
447
+ }
448
+ return errors;
449
+ }
450
+ /**
451
+ * Check if expression looks like it evaluates to boolean
452
+ */
453
+ looksLikeBooleanExpression(expression) {
454
+ return /[><=!]=?|&&|\|\||true|false|ready|available|enabled|disabled/.test(expression.toLowerCase());
455
+ }
456
+ }
457
+ /**
458
+ * Global conditional expression processor instance
459
+ */
460
+ export const conditionalExpressionProcessor = new ConditionalExpressionProcessor();
461
+ /**
462
+ * Utility function to process includeWhen expressions
463
+ */
464
+ export function processIncludeWhen(expression, context, config) {
465
+ return conditionalExpressionProcessor.processIncludeWhenExpression(expression, context, config);
466
+ }
467
+ /**
468
+ * Utility function to process readyWhen expressions
469
+ */
470
+ export function processReadyWhen(expression, context, config) {
471
+ return conditionalExpressionProcessor.processReadyWhenExpression(expression, context, config);
472
+ }
473
+ /**
474
+ * Utility function to process custom conditional expressions
475
+ */
476
+ export function processCustomConditional(expression, context, config) {
477
+ return conditionalExpressionProcessor.processCustomConditionalExpression(expression, context, config);
478
+ }
479
+ //# sourceMappingURL=conditional-expression-processor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditional-expression-processor.js","sourceRoot":"","sources":["../../../src/core/expressions/conditional-expression-processor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,yBAAyB,EAE1B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,GAAG,kBAAkB,CAAC,kCAAkC,CAAC,CAAC;AA6CtE;;;;;GAKG;AACH,MAAM,OAAO,8BAA8B;IACjC,kBAAkB,CAAqB;IACvC,eAAe,CAA4B;IAEnD;QACE,IAAI,CAAC,kBAAkB,GAAG,IAAI,kBAAkB,EAAE,CAAC;QACnD,IAAI,CAAC,eAAe,GAAG,IAAI,yBAAyB,EAAE,CAAC;IACzD,CAAC;IAED;;;;;;;OAOG;IACH,4BAA4B,CAC1B,UAAa,EACb,OAAiC,EACjC,SAAsC,EAAE;QAExC,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAEpC,MAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE;YAChD,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,OAAO,UAAU;SAClC,CAAC,CAAC;QAEH,MAAM,MAAM,GAAmC;YAC7C,UAAU;YACV,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,UAAU;YACpB,eAAe,EAAE,aAAa;YAC9B,aAAa,EAAE,IAAI,CAAC,eAAe,CAAC,yBAAyB,CAAC,aAAa,EAAE,CA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GAAG,IAAI,8BAA8B,EAAE,CAAC;AAEnF;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAa,EACb,OAAiC,EACjC,MAAoC;IAEpC,OAAO,8BAA8B,CAAC,4BAA4B,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAClG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAAa,EACb,OAAiC,EACjC,MAAoC;IAEpC,OAAO,8BAA8B,CAAC,0BAA0B,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAChG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,UAAa,EACb,OAAiC,EACjC,MAAoC;IAEpC,OAAO,8BAA8B,CAAC,kCAAkC,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACxG,CAAC"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Conditional Expression Integration for Factory Functions
3
+ *
4
+ * This module provides integration points for conditional expressions like
5
+ * includeWhen and readyWhen in factory functions, enabling automatic
6
+ * KubernetesRef detection and CEL conversion.
7
+ */
8
+ import type { Enhanced } from '../types/index.js';
9
+ import { type ConditionalExpressionConfig, type ConditionalExpressionResult } from './conditional-expression-processor.js';
10
+ import type { FactoryExpressionContext } from './types.js';
11
+ /**
12
+ * Configuration for conditional expression integration
13
+ */
14
+ export interface ConditionalIntegrationConfig extends ConditionalExpressionConfig {
15
+ /** Whether to automatically process conditional expressions */
16
+ autoProcess?: boolean;
17
+ /** Whether to validate conditional expressions */
18
+ validateExpressions?: boolean;
19
+ }
20
+ /**
21
+ * Conditional expression properties that can be added to Enhanced resources
22
+ */
23
+ export interface ConditionalExpressionProperties {
24
+ /** Condition for including this resource in deployment */
25
+ includeWhen?: any;
26
+ /** Condition for considering this resource ready */
27
+ readyWhen?: any;
28
+ /** Custom conditional expressions */
29
+ conditionals?: Record<string, any>;
30
+ }
31
+ /**
32
+ * Enhanced resource with conditional expression support
33
+ */
34
+ export type EnhancedWithConditionals<TSpec, TStatus> = Enhanced<TSpec, TStatus> & ConditionalExpressionProperties & {
35
+ /** Set includeWhen condition */
36
+ withIncludeWhen(condition: any): EnhancedWithConditionals<TSpec, TStatus>;
37
+ /** Set readyWhen condition */
38
+ withReadyWhen(condition: any): EnhancedWithConditionals<TSpec, TStatus>;
39
+ /** Add custom conditional expression */
40
+ withConditional(name: string, condition: any): EnhancedWithConditionals<TSpec, TStatus>;
41
+ };
42
+ /**
43
+ * Result of conditional expression integration
44
+ */
45
+ export interface ConditionalIntegrationResult {
46
+ /** Whether any conditional expressions were processed */
47
+ hasConditionals: boolean;
48
+ /** Processing results for each conditional expression */
49
+ results: {
50
+ includeWhen?: ConditionalExpressionResult;
51
+ readyWhen?: ConditionalExpressionResult;
52
+ conditionals?: Record<string, ConditionalExpressionResult>;
53
+ };
54
+ /** Total processing time */
55
+ totalProcessingTimeMs: number;
56
+ /** Any integration warnings */
57
+ warnings: string[];
58
+ }
59
+ /**
60
+ * Conditional Expression Integrator
61
+ *
62
+ * Integrates conditional expression processing with factory functions
63
+ * and Enhanced resources.
64
+ */
65
+ export declare class ConditionalExpressionIntegrator {
66
+ private processor;
67
+ constructor();
68
+ /**
69
+ * Add conditional expression support to an Enhanced resource
70
+ *
71
+ * @param resource - Enhanced resource to augment
72
+ * @param config - Integration configuration
73
+ * @returns Enhanced resource with conditional expression support
74
+ */
75
+ addConditionalSupport<TSpec, TStatus>(resource: Enhanced<TSpec, TStatus>, config?: ConditionalIntegrationConfig): EnhancedWithConditionals<TSpec, TStatus>;
76
+ /**
77
+ * Process all conditional expressions on an Enhanced resource
78
+ *
79
+ * @param resource - Enhanced resource with conditional expressions
80
+ * @param context - Factory context
81
+ * @param config - Integration configuration
82
+ * @returns Processing results
83
+ */
84
+ processResourceConditionals<TSpec, TStatus>(resource: EnhancedWithConditionals<TSpec, TStatus>, context: FactoryExpressionContext, config?: ConditionalIntegrationConfig): ConditionalIntegrationResult;
85
+ /**
86
+ * Extract conditional expressions from a resource for serialization
87
+ *
88
+ * @param resource - Enhanced resource with conditional expressions
89
+ * @returns Conditional expressions ready for serialization
90
+ */
91
+ extractConditionalsForSerialization<TSpec, TStatus>(resource: EnhancedWithConditionals<TSpec, TStatus>): Record<string, any>;
92
+ /**
93
+ * Validate that conditional expressions are appropriate for the factory type
94
+ *
95
+ * @param resource - Enhanced resource with conditional expressions
96
+ * @param factoryType - Target factory type
97
+ * @returns Validation results
98
+ */
99
+ validateConditionalsForFactory<TSpec, TStatus>(resource: EnhancedWithConditionals<TSpec, TStatus>, factoryType: 'direct' | 'kro'): {
100
+ isValid: boolean;
101
+ errors: string[];
102
+ warnings: string[];
103
+ };
104
+ }
105
+ /**
106
+ * Global conditional expression integrator instance
107
+ */
108
+ export declare const conditionalExpressionIntegrator: ConditionalExpressionIntegrator;
109
+ /**
110
+ * Utility function to add conditional support to an Enhanced resource
111
+ *
112
+ * @param resource - Enhanced resource to augment
113
+ * @param config - Integration configuration
114
+ * @returns Enhanced resource with conditional expression support
115
+ */
116
+ export declare function withConditionalSupport<TSpec, TStatus>(resource: Enhanced<TSpec, TStatus>, config?: ConditionalIntegrationConfig): EnhancedWithConditionals<TSpec, TStatus>;
117
+ /**
118
+ * Utility function to process conditional expressions on a resource
119
+ *
120
+ * @param resource - Enhanced resource with conditional expressions
121
+ * @param context - Factory context
122
+ * @param config - Integration configuration
123
+ * @returns Processing results
124
+ */
125
+ export declare function processResourceConditionals<TSpec, TStatus>(resource: EnhancedWithConditionals<TSpec, TStatus>, context: FactoryExpressionContext, config?: ConditionalIntegrationConfig): ConditionalIntegrationResult;
126
+ /**
127
+ * Utility function to extract conditionals for serialization
128
+ *
129
+ * @param resource - Enhanced resource with conditional expressions
130
+ * @returns Conditional expressions ready for serialization
131
+ */
132
+ export declare function extractConditionalsForSerialization<TSpec, TStatus>(resource: EnhancedWithConditionals<TSpec, TStatus>): Record<string, any>;
133
+ //# sourceMappingURL=conditional-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditional-integration.d.ts","sourceRoot":"","sources":["../../../src/core/expressions/conditional-integration.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAG,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EACjC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAK3D;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,2BAA2B;IAC/E,+DAA+D;IAC/D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,0DAA0D;IAC1D,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,oDAAoD;IACpD,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,qCAAqC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,CAAC,KAAK,EAAE,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,GAAG,+BAA+B,GAAG;IAClH,gCAAgC;IAChC,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1E,8BAA8B;IAC9B,aAAa,CAAC,SAAS,EAAE,GAAG,GAAG,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACxE,wCAAwC;IACxC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,GAAG,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;CACzF,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,yDAAyD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