timonel 2.8.1 → 2.8.3

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 (50) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cli.d.ts +0 -1
  3. package/dist/cli.js +290 -226
  4. package/dist/index.d.ts +0 -5
  5. package/dist/index.js +0 -6
  6. package/dist/lib/helm.d.ts +0 -472
  7. package/dist/lib/helm.js +0 -481
  8. package/dist/lib/helmChartWriter.d.ts +0 -178
  9. package/dist/lib/helmChartWriter.js +0 -180
  10. package/dist/lib/resources/baseResourceProvider.d.ts +0 -46
  11. package/dist/lib/resources/baseResourceProvider.js +1 -47
  12. package/dist/lib/resources/cloud/aws/awsResources.d.ts +0 -144
  13. package/dist/lib/resources/cloud/aws/awsResources.js +1 -163
  14. package/dist/lib/resources/cloud/aws/karpenterResources.d.ts +0 -132
  15. package/dist/lib/resources/cloud/aws/karpenterResources.js +0 -75
  16. package/dist/lib/rutter.d.ts +0 -324
  17. package/dist/lib/rutter.js +8 -352
  18. package/dist/lib/security.d.ts +0 -119
  19. package/dist/lib/security.js +4 -160
  20. package/dist/lib/umbrella.d.ts +0 -24
  21. package/dist/lib/umbrella.js +0 -24
  22. package/dist/lib/umbrellaRutter.d.ts +0 -71
  23. package/dist/lib/umbrellaRutter.js +2 -82
  24. package/dist/lib/utils/helmHelpers.d.ts +0 -39
  25. package/dist/lib/utils/helmHelpers.js +0 -32
  26. package/package.json +1 -1
  27. package/dist/cli.d.ts.map +0 -1
  28. package/dist/cli.js.map +0 -1
  29. package/dist/index.d.ts.map +0 -1
  30. package/dist/index.js.map +0 -1
  31. package/dist/lib/helm.d.ts.map +0 -1
  32. package/dist/lib/helm.js.map +0 -1
  33. package/dist/lib/helmChartWriter.d.ts.map +0 -1
  34. package/dist/lib/helmChartWriter.js.map +0 -1
  35. package/dist/lib/resources/baseResourceProvider.d.ts.map +0 -1
  36. package/dist/lib/resources/baseResourceProvider.js.map +0 -1
  37. package/dist/lib/resources/cloud/aws/awsResources.d.ts.map +0 -1
  38. package/dist/lib/resources/cloud/aws/awsResources.js.map +0 -1
  39. package/dist/lib/resources/cloud/aws/karpenterResources.d.ts.map +0 -1
  40. package/dist/lib/resources/cloud/aws/karpenterResources.js.map +0 -1
  41. package/dist/lib/rutter.d.ts.map +0 -1
  42. package/dist/lib/rutter.js.map +0 -1
  43. package/dist/lib/security.d.ts.map +0 -1
  44. package/dist/lib/security.js.map +0 -1
  45. package/dist/lib/umbrella.d.ts.map +0 -1
  46. package/dist/lib/umbrella.js.map +0 -1
  47. package/dist/lib/umbrellaRutter.d.ts.map +0 -1
  48. package/dist/lib/umbrellaRutter.js.map +0 -1
  49. package/dist/lib/utils/helmHelpers.d.ts.map +0 -1
  50. package/dist/lib/utils/helmHelpers.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- /**
2
- * @fileoverview Main entry point for Timonel - TypeScript library for programmatic Helm chart generation
3
- * @since 1.0.0
4
- */
5
1
  export * from './lib/helm.js';
6
2
  export * from './lib/helmChartWriter.js';
7
3
  export * from './lib/rutter.js';
@@ -11,4 +7,3 @@ export type { AWSALBIngressSpec, AWSEBSStorageClassSpec, AWSEFSStorageClassSpec,
11
7
  export type { KarpenterDisruption, KarpenterDisruptionBudget, KarpenterEC2NodeClassSpec, KarpenterNodeClaimSpec, KarpenterNodePoolSpec, } from './lib/resources/cloud/aws/karpenterResources.js';
12
8
  export { DEFAULT_TERMINATION_GRACE_PERIOD, isValidDisruptionBudget, isValidKubernetesDuration, KarpenterVersionUtils, } from './lib/resources/cloud/aws/karpenterResources.js';
13
9
  export { AWS_HELPERS, formatHelpers, generateHelpersTemplate, getDefaultHelpers, STANDARD_HELPERS, type HelperDefinition, } from './lib/utils/helmHelpers.js';
14
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,13 +1,7 @@
1
- /**
2
- * @fileoverview Main entry point for Timonel - TypeScript library for programmatic Helm chart generation
3
- * @since 1.0.0
4
- */
5
1
  export * from './lib/helm.js';
6
2
  export * from './lib/helmChartWriter.js';
7
3
  export * from './lib/rutter.js';
8
4
  export * from './lib/security.js';
9
5
  export * from './lib/umbrella.js';
10
6
  export { DEFAULT_TERMINATION_GRACE_PERIOD, isValidDisruptionBudget, isValidKubernetesDuration, KarpenterVersionUtils, } from './lib/resources/cloud/aws/karpenterResources.js';
11
- // Re-export specific items from new modules to avoid conflicts
12
7
  export { AWS_HELPERS, formatHelpers, generateHelpersTemplate, getDefaultHelpers, STANDARD_HELPERS, } from './lib/utils/helmHelpers.js';
13
- //# sourceMappingURL=index.js.map
@@ -1,159 +1,15 @@
1
- /**
2
- * @fileoverview Helpers to embed Helm template expressions while staying type-safe in TypeScript.
3
- * We treat Helm placeholders as opaque strings that will be preserved in YAML.
4
- * @since 0.1.0
5
- */
6
- /**
7
- * Creates a reference to a value in .Values of Helm
8
- *
9
- * Generates a Helm template expression that references a value
10
- * in the chart's values.yaml file using dot notation.
11
- *
12
- * @param {string} path - Path to the value using dot notation (e.g., 'image.tag')
13
- * @returns {string} Helm template expression (e.g., '{{ .Values.image.tag }}')
14
- * @throws {Error} If the path is not valid for Helm templates
15
- *
16
- * @example
17
- * ```typescript
18
- * const imageTag = valuesRef('image.tag');
19
- * // Returns: '{{ .Values.image.tag }}'
20
- *
21
- * const replicas = valuesRef('deployment.replicas');
22
- * // Returns: '{{ .Values.deployment.replicas }}'
23
- * ```
24
- *
25
- * @since 0.1.0
26
- */
27
1
  export declare function valuesRef(path: string): string;
28
- /**
29
- * Creates a required reference to a value in .Values of Helm
30
- *
31
- * Similar to valuesRef, but uses Helm's 'required' function to
32
- * ensure the value is present, failing chart rendering if not provided.
33
- *
34
- * @param {string} path - Path to the value using dot notation
35
- * @param {string} [message] - Custom error message if value is missing
36
- * @returns {string} Helm template expression with required validation
37
- * @throws {Error} If the path is not valid for Helm templates
38
- *
39
- * @example
40
- * ```typescript
41
- * const dbPassword = requiredValuesRef('database.password', 'Database password is required');
42
- * // Returns: '{{ required "Database password is required" .Values.database.password }}'
43
- *
44
- * const apiKey = requiredValuesRef('api.key');
45
- * // Returns: '{{ required "api.key is required" .Values.api.key }}'
46
- * ```
47
- *
48
- * @since 0.1.0
49
- */
50
2
  export declare function requiredValuesRef(path: string, message?: string): string;
51
- /**
52
- * Built-in Helm references for release and chart metadata
53
- *
54
- * Object containing the most common references to Helm's built-in
55
- * variables for release and chart information.
56
- *
57
- * @namespace helm
58
- * @since 0.1.0
59
- *
60
- * @example
61
- * ```typescript
62
- * const deploymentName = `${helm.releaseName}-deployment`;
63
- * // Uses: '{{ .Release.Name }}-deployment'
64
- *
65
- * const version = helm.chartVersion;
66
- * // Uses: '{{ .Chart.Version }}'
67
- * ```
68
- */
69
3
  export declare const helm: {
70
- /** Release name: {{ .Release.Name }} */
71
4
  releaseName: string;
72
- /** Chart name: {{ .Chart.Name }} */
73
5
  chartName: string;
74
- /** Chart version: {{ .Chart.Version }} */
75
6
  chartVersion: string;
76
- /** Release namespace: {{ .Release.Namespace }} */
77
7
  namespace: string;
78
8
  };
79
- /**
80
- * Quotes a Helm template expression for safe YAML embedding
81
- *
82
- * Ensures Helm template expressions are properly quoted to avoid
83
- * YAML parsing issues when the expression contains special characters.
84
- *
85
- * @param {string} expr - Helm template expression to quote
86
- * @returns {string} Quoted expression if it's a Helm template, otherwise unchanged
87
- *
88
- * @example
89
- * ```typescript
90
- * const quoted = quote('{{ .Values.image.tag }}');
91
- * // Returns: "'{{ .Values.image.tag }}'"
92
- *
93
- * const normal = quote('nginx:1.21');
94
- * // Returns: "nginx:1.21"
95
- * ```
96
- *
97
- * @since 0.1.0
98
- */
99
9
  export declare function quote(expr: string): string;
100
- /**
101
- * Indents text by specified number of spaces
102
- *
103
- * Helper function that matches Helm's indent function behavior,
104
- * adding the specified number of spaces to each non-empty line.
105
- *
106
- * @param {number} n - Number of spaces to indent
107
- * @param {string} expr - Text to indent
108
- * @returns {string} Indented text
109
- *
110
- * @example
111
- * ```typescript
112
- * const indented = indent(4, 'line1\nline2');
113
- * // Returns: " line1\n line2"
114
- * ```
115
- *
116
- * @since 0.1.0
117
- */
118
10
  export declare function indent(n: number, expr: string): string;
119
- /**
120
- * Inserts a call to a named Helm template using template function
121
- *
122
- * @param {string} name - Name of the template to call
123
- * @param {string} [context='.'] - Context to pass to the template
124
- * @returns {string} Helm template expression
125
- *
126
- * @example
127
- * ```typescript
128
- * const tmpl = template('myapp.labels');
129
- * // Returns: '{{ template "myapp.labels" . }}'
130
- * ```
131
- *
132
- * @since 0.1.0
133
- */
134
11
  export declare function template(name: string, context?: string): string;
135
- /**
136
- * Inserts a call to a named Helm template using include function
137
- *
138
- * Preferred over template() as include allows piping and better error handling.
139
- *
140
- * @param {string} name - Name of the template to include
141
- * @param {string} [context='.'] - Context to pass to the template
142
- * @returns {string} Helm template expression
143
- *
144
- * @example
145
- * ```typescript
146
- * const tmpl = include('myapp.labels');
147
- * // Returns: '{{ include "myapp.labels" . }}'
148
- * ```
149
- *
150
- * @since 0.1.0
151
- */
152
12
  export declare function include(name: string, context?: string): string;
153
- /**
154
- * Branded types for better type safety in Helm template paths
155
- * @since 1.1.0
156
- */
157
13
  export type HelmPath = string & {
158
14
  readonly __brand: unique symbol;
159
15
  };
@@ -169,323 +25,23 @@ export type StringPath = HelmPath & {
169
25
  export type FloatPath = HelmPath & {
170
26
  readonly __floatType: unique symbol;
171
27
  };
172
- /**
173
- * Configuration options for typed reference creation
174
- * @since 1.1.0
175
- */
176
28
  interface TypedRefOptions {
177
- /** Whether to include default value handling */
178
29
  withDefault?: boolean;
179
- /** Default value to use if the path is not set */
180
30
  defaultValue?: string | number | boolean;
181
- /** Whether to quote string values */
182
31
  quote?: boolean;
183
32
  }
184
- /**
185
- * Factory function to create typed Helm value references with reduced code duplication
186
- * @param path - The path to the value in the Helm values
187
- * @param type - The expected type of the value
188
- * @param options - Additional options for reference creation
189
- * @returns A string that can be used in Helm templates
190
- * @throws {Error} If the path is invalid
191
- * @since 1.1.0
192
- */
193
33
  export declare function createTypedRef(path: string, type: 'number' | 'boolean' | 'string' | 'float', options?: TypedRefOptions): string;
194
- /**
195
- * Creates a numeric reference from .Values with int cast
196
- *
197
- * Generates a Helm template expression that casts the value to integer,
198
- * truncating any decimal places.
199
- *
200
- * @param {string} path - Path to the value using dot notation
201
- * @param {TypedRefOptions} [options] - Additional options for reference creation
202
- * @returns {string} Helm template expression with int cast
203
- * @throws {Error} If the path is not valid for Helm templates
204
- *
205
- * @example
206
- * ```typescript
207
- * const replicas = numberRef('deployment.replicas');
208
- * // Returns: '{{ .Values.deployment.replicas | int }}'
209
- * ```
210
- *
211
- * @since 0.1.0
212
- */
213
34
  export declare function numberRef(path: string, options?: TypedRefOptions): string;
214
- /**
215
- * Creates a boolean reference from .Values with toBool cast
216
- *
217
- * @param {string} path - Path to the value using dot notation
218
- * @param {TypedRefOptions} [options] - Additional options for reference creation
219
- * @returns {string} Helm template expression with toBool cast
220
- * @throws {Error} If the path is not valid for Helm templates
221
- *
222
- * @example
223
- * ```typescript
224
- * const enabled = boolRef('feature.enabled');
225
- * // Returns: '{{ .Values.feature.enabled | toBool }}'
226
- * ```
227
- *
228
- * @since 0.1.0
229
- */
230
35
  export declare function boolRef(path: string, options?: TypedRefOptions): string;
231
- /**
232
- * Creates a string reference from .Values with toString cast
233
- *
234
- * @param {string} path - Path to the value using dot notation
235
- * @param {TypedRefOptions} [options] - Additional options for reference creation
236
- * @returns {string} Helm template expression with toString cast
237
- * @throws {Error} If the path is not valid for Helm templates
238
- *
239
- * @example
240
- * ```typescript
241
- * const version = stringRef('app.version');
242
- * // Returns: '{{ .Values.app.version | toString }}'
243
- * ```
244
- *
245
- * @since 0.1.0
246
- */
247
36
  export declare function stringRef(path: string, options?: TypedRefOptions): string;
248
- /**
249
- * Creates a float reference from .Values with float64 cast
250
- *
251
- * @param {string} path - Path to the value using dot notation
252
- * @param {TypedRefOptions} [options] - Additional options for reference creation
253
- * @returns {string} Helm template expression with float64 cast
254
- * @throws {Error} If the path is not valid for Helm templates
255
- *
256
- * @example
257
- * ```typescript
258
- * const ratio = floatRef('scaling.ratio');
259
- * // Returns: '{{ .Values.scaling.ratio | float64 }}'
260
- * ```
261
- *
262
- * @since 0.1.0
263
- */
264
37
  export declare function floatRef(path: string, options?: TypedRefOptions): string;
265
- /**
266
- * Creates a conditional reference to a value in .Values
267
- *
268
- * Generates a Helm template expression that conditionally renders
269
- * the value only if the condition is truthy.
270
- *
271
- * @param {string} path - Path to the value using dot notation
272
- * @param {string} condition - Path to the condition value
273
- * @returns {string} Helm template expression with conditional logic
274
- * @throws {Error} If the path or condition is not valid for Helm templates
275
- *
276
- * @example
277
- * ```typescript
278
- * const secretName = conditionalRef('database.secretName', 'database.enabled');
279
- * // Returns: '{{ if .Values.database.enabled }}{{ .Values.database.secretName }}{{ end }}'
280
- * ```
281
- *
282
- * @since 2.6.0
283
- */
284
38
  export declare function conditionalRef(path: string, condition: string): string;
285
- /**
286
- * Wraps a complete YAML manifest in a Helm conditional
287
- *
288
- * Generates a Helm template that conditionally renders an entire
289
- * Kubernetes manifest based on a values condition.
290
- *
291
- * @param {string} yamlContent - Complete YAML manifest content
292
- * @param {string} condition - Path to the condition value
293
- * @returns {string} YAML content wrapped in Helm conditional
294
- * @throws {Error} If the condition path is not valid for Helm templates
295
- *
296
- * @example
297
- * ```typescript
298
- * const namespaceYaml = `
299
- * apiVersion: v1
300
- * kind: Namespace
301
- * metadata:
302
- * name: my-namespace
303
- * `;
304
- * const conditionalNamespace = conditionalManifest(namespaceYaml, 'createNamespace');
305
- * // Returns: '{{ if .Values.createNamespace }}\napiVersion: v1\nkind: Namespace...{{ end }}'
306
- * ```
307
- *
308
- * @since 2.7.4
309
- */
310
39
  export declare function conditionalManifest(yamlContent: string, condition: string): string;
311
- /**
312
- * Creates a reference to a value in .Values with a default fallback
313
- *
314
- * Generates a Helm template expression that uses the default filter
315
- * to provide a fallback value when the path is not set.
316
- *
317
- * @param {string} path - Path to the value using dot notation
318
- * @param {string} defaultValue - Default value to use if path is not set
319
- * @returns {string} Helm template expression with default fallback
320
- * @throws {Error} If the path is not valid for Helm templates
321
- *
322
- * @example
323
- * ```typescript
324
- * const image = defaultRef('image.tag', 'latest');
325
- * // Returns: '{{ .Values.image.tag | default "latest" }}'
326
- * ```
327
- *
328
- * @since 2.6.0
329
- */
330
40
  export declare function defaultRef(path: string, defaultValue: string): string;
331
- /**
332
- * Creates a base64-encoded reference to a value in .Values
333
- *
334
- * Generates a Helm template expression that encodes the value
335
- * using base64 encoding, useful for secrets and certificates.
336
- *
337
- * @param {string} path - Path to the value using dot notation
338
- * @returns {string} Helm template expression with base64 encoding
339
- * @throws {Error} If the path is not valid for Helm templates
340
- *
341
- * @example
342
- * ```typescript
343
- * const encodedSecret = base64Ref('secrets.apiKey');
344
- * // Returns: '{{ .Values.secrets.apiKey | b64enc }}'
345
- * ```
346
- *
347
- * @since 2.6.0
348
- */
349
41
  export declare function base64Ref(path: string): string;
350
- /**
351
- * Creates a JSON-serialized reference to a value in .Values
352
- *
353
- * Generates a Helm template expression that serializes the value
354
- * to JSON format, useful for complex configuration objects.
355
- *
356
- * @param {string} path - Path to the value using dot notation
357
- * @returns {string} Helm template expression with JSON serialization
358
- * @throws {Error} If the path is not valid for Helm templates
359
- *
360
- * @example
361
- * ```typescript
362
- * const configJson = jsonRef('app.config');
363
- * // Returns: '{{ .Values.app.config | toJson }}'
364
- * ```
365
- *
366
- * @since 2.6.0
367
- */
368
42
  export declare function jsonRef(path: string): string;
369
- /**
370
- * Flow Control Functions for Helm Templates
371
- *
372
- * These functions provide programmatic access to Helm's flow control structures:
373
- * if/else, with, and range for conditional logic and iteration.
374
- *
375
- * @since 1.4.0
376
- */
377
- /**
378
- * Creates a conditional if block in Helm templates
379
- *
380
- * Generates Helm template expressions for conditional logic using if/else/end.
381
- * Supports complex conditions with comparison operators and pipeline expressions.
382
- *
383
- * @param {string} condition - The condition to evaluate (e.g., 'eq .Values.env "production"')
384
- * @param {string} content - Content to include when condition is true
385
- * @param {string} [elseContent] - Optional content for else block
386
- * @returns {string} Complete Helm if/else template block
387
- * @throws {Error} If condition contains potentially unsafe template expressions
388
- *
389
- * @example
390
- * ```typescript
391
- * const conditionalConfig = helmIf(
392
- * 'eq .Values.environment "production"',
393
- * 'replicas: 3\nresources:\n limits:\n memory: "1Gi"',
394
- * 'replicas: 1\nresources:\n limits:\n memory: "512Mi"'
395
- * );
396
- * // Returns:
397
- * // {{- if eq .Values.environment "production" }}
398
- * // replicas: 3
399
- * // resources:
400
- * // limits:
401
- * // memory: "1Gi"
402
- * // {{- else }}
403
- * // replicas: 1
404
- * // resources:
405
- * // limits:
406
- * // memory: "512Mi"
407
- * // {{- end }}
408
- * ```
409
- *
410
- * @since 2.8.0
411
- */
412
43
  export declare function helmIf(condition: string, content: string, elseContent?: string): string;
413
- /**
414
- * Creates a with block for scoped template context
415
- *
416
- * Generates Helm template expressions using 'with' to change the template context.
417
- * Useful for accessing nested values without repeating the full path.
418
- *
419
- * @param {string} path - Path to set as new context (e.g., '.Values.database')
420
- * @param {string} content - Content to render within the new context
421
- * @param {string} [elseContent] - Optional content when path is empty/nil
422
- * @returns {string} Complete Helm with/else/end template block
423
- * @throws {Error} If path is not valid for Helm templates
424
- *
425
- * @example
426
- * ```typescript
427
- * const dbConfig = helmWith(
428
- * '.Values.database',
429
- * 'host: {{ .host }}\nport: {{ .port }}\nname: {{ .name }}',
430
- * 'host: "localhost"\nport: 5432\nname: "defaultdb"'
431
- * );
432
- * // Returns:
433
- * // {{- with .Values.database }}
434
- * // host: {{ .host }}
435
- * // port: {{ .port }}
436
- * // name: {{ .name }}
437
- * // {{- else }}
438
- * // host: "localhost"
439
- * // port: 5432
440
- * // name: "defaultdb"
441
- * // {{- end }}
442
- * ```
443
- *
444
- * @since 2.8.0
445
- */
446
44
  export declare function helmWith(path: string, content: string, elseContent?: string): string;
447
- /**
448
- * Creates a range loop for iterating over collections
449
- *
450
- * Generates Helm template expressions using 'range' to iterate over lists, maps, or other collections.
451
- * Supports both simple iteration and key-value iteration for maps.
452
- *
453
- * @param {string} collection - Collection to iterate over (e.g., '.Values.items')
454
- * @param {string} content - Content template for each iteration
455
- * @param {object} [options] - Configuration options for the range loop
456
- * @param {boolean} [options.keyValue=false] - Whether to iterate with key-value pairs
457
- * @param {string} [options.keyVar='$key'] - Variable name for keys in key-value iteration
458
- * @param {string} [options.valueVar='$value'] - Variable name for values in key-value iteration
459
- * @param {string} [options.indexVar='$index'] - Variable name for index in indexed iteration
460
- * @param {string} [options.itemVar='$item'] - Variable name for items in simple iteration
461
- * @returns {string} Complete Helm range/end template block
462
- * @throws {Error} If collection path is not valid
463
- *
464
- * @example
465
- * ```typescript
466
- * // Simple list iteration
467
- * const serviceList = helmRange(
468
- * '.Values.services',
469
- * '- name: {{ .name }}\n port: {{ .port }}'
470
- * );
471
- *
472
- * // Key-value map iteration
473
- * const envVars = helmRange(
474
- * '.Values.env',
475
- * '- name: {{ $key }}\n value: {{ $value | quote }}',
476
- * { keyValue: true }
477
- * );
478
- *
479
- * // Indexed iteration
480
- * const indexedItems = helmRange(
481
- * '.Values.items',
482
- * '{{ $index }}: {{ $item }}',
483
- * { indexVar: '$i', itemVar: '$val' }
484
- * );
485
- * ```
486
- *
487
- * @since 2.8.0
488
- */
489
45
  export declare function helmRange(collection: string, content: string, options?: {
490
46
  keyValue?: boolean;
491
47
  keyVar?: string;
@@ -493,36 +49,8 @@ export declare function helmRange(collection: string, content: string, options?:
493
49
  indexVar?: string;
494
50
  itemVar?: string;
495
51
  }): string;
496
- /**
497
- * Creates a complex conditional with multiple else-if branches
498
- *
499
- * Generates Helm template expressions for complex conditional logic with multiple branches.
500
- * Useful for handling multiple environment configurations or feature flags.
501
- *
502
- * @param {Array<{condition: string, content: string}>} branches - Array of condition-content pairs
503
- * @param {string} [defaultContent] - Default content when no conditions match
504
- * @returns {string} Complete Helm if/else-if/else/end template block
505
- * @throws {Error} If branches array is empty or contains invalid conditions
506
- *
507
- * @example
508
- * ```typescript
509
- * const envConfig = helmIfElseIf([
510
- * {
511
- * condition: 'eq .Values.environment "production"',
512
- * content: 'replicas: 5\nresources.limits.memory: "2Gi"'
513
- * },
514
- * {
515
- * condition: 'eq .Values.environment "staging"',
516
- * content: 'replicas: 2\nresources.limits.memory: "1Gi"'
517
- * }
518
- * ], 'replicas: 1\nresources.limits.memory: "512Mi"');
519
- * ```
520
- *
521
- * @since 2.8.0
522
- */
523
52
  export declare function helmIfElseIf(branches: Array<{
524
53
  condition: string;
525
54
  content: string;
526
55
  }>, defaultContent?: string): string;
527
56
  export {};
528
- //# sourceMappingURL=helm.d.ts.map