composable.env 0.1.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.
@@ -0,0 +1,624 @@
1
+ import { z } from 'zod';
2
+ export declare const ComponentSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
3
+ export declare const DockerServiceSchema: z.ZodObject<{
4
+ image: z.ZodOptional<z.ZodString>;
5
+ build: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
6
+ context: z.ZodString;
7
+ dockerfile: z.ZodOptional<z.ZodString>;
8
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ context: string;
11
+ dockerfile?: string | undefined;
12
+ args?: Record<string, string> | undefined;
13
+ }, {
14
+ context: string;
15
+ dockerfile?: string | undefined;
16
+ args?: Record<string, string> | undefined;
17
+ }>]>>;
18
+ environment: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
+ env_file: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
20
+ ports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
21
+ volumes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
22
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23
+ platform: z.ZodOptional<z.ZodString>;
24
+ deploy: z.ZodOptional<z.ZodObject<{
25
+ resources: z.ZodOptional<z.ZodObject<{
26
+ reservations: z.ZodOptional<z.ZodObject<{
27
+ devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
+ driver: z.ZodString;
29
+ capabilities: z.ZodArray<z.ZodString, "many">;
30
+ }, "strip", z.ZodTypeAny, {
31
+ driver: string;
32
+ capabilities: string[];
33
+ }, {
34
+ driver: string;
35
+ capabilities: string[];
36
+ }>, "many">>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ devices?: {
39
+ driver: string;
40
+ capabilities: string[];
41
+ }[] | undefined;
42
+ }, {
43
+ devices?: {
44
+ driver: string;
45
+ capabilities: string[];
46
+ }[] | undefined;
47
+ }>>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ reservations?: {
50
+ devices?: {
51
+ driver: string;
52
+ capabilities: string[];
53
+ }[] | undefined;
54
+ } | undefined;
55
+ }, {
56
+ reservations?: {
57
+ devices?: {
58
+ driver: string;
59
+ capabilities: string[];
60
+ }[] | undefined;
61
+ } | undefined;
62
+ }>>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ resources?: {
65
+ reservations?: {
66
+ devices?: {
67
+ driver: string;
68
+ capabilities: string[];
69
+ }[] | undefined;
70
+ } | undefined;
71
+ } | undefined;
72
+ }, {
73
+ resources?: {
74
+ reservations?: {
75
+ devices?: {
76
+ driver: string;
77
+ capabilities: string[];
78
+ }[] | undefined;
79
+ } | undefined;
80
+ } | undefined;
81
+ }>>;
82
+ profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
83
+ condition: z.ZodOptional<z.ZodString>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ image?: string | undefined;
86
+ build?: string | {
87
+ context: string;
88
+ dockerfile?: string | undefined;
89
+ args?: Record<string, string> | undefined;
90
+ } | undefined;
91
+ environment?: string[] | undefined;
92
+ env_file?: string[] | undefined;
93
+ ports?: string[] | undefined;
94
+ volumes?: string[] | undefined;
95
+ depends_on?: string[] | undefined;
96
+ platform?: string | undefined;
97
+ deploy?: {
98
+ resources?: {
99
+ reservations?: {
100
+ devices?: {
101
+ driver: string;
102
+ capabilities: string[];
103
+ }[] | undefined;
104
+ } | undefined;
105
+ } | undefined;
106
+ } | undefined;
107
+ profiles?: string[] | undefined;
108
+ condition?: string | undefined;
109
+ }, {
110
+ image?: string | undefined;
111
+ build?: string | {
112
+ context: string;
113
+ dockerfile?: string | undefined;
114
+ args?: Record<string, string> | undefined;
115
+ } | undefined;
116
+ environment?: string[] | undefined;
117
+ env_file?: string[] | undefined;
118
+ ports?: string[] | undefined;
119
+ volumes?: string[] | undefined;
120
+ depends_on?: string[] | undefined;
121
+ platform?: string | undefined;
122
+ deploy?: {
123
+ resources?: {
124
+ reservations?: {
125
+ devices?: {
126
+ driver: string;
127
+ capabilities: string[];
128
+ }[] | undefined;
129
+ } | undefined;
130
+ } | undefined;
131
+ } | undefined;
132
+ profiles?: string[] | undefined;
133
+ condition?: string | undefined;
134
+ }>;
135
+ export declare const DockerComposeSchema: z.ZodObject<{
136
+ services: z.ZodRecord<z.ZodString, z.ZodObject<{
137
+ image: z.ZodOptional<z.ZodString>;
138
+ build: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
139
+ context: z.ZodString;
140
+ dockerfile: z.ZodOptional<z.ZodString>;
141
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ context: string;
144
+ dockerfile?: string | undefined;
145
+ args?: Record<string, string> | undefined;
146
+ }, {
147
+ context: string;
148
+ dockerfile?: string | undefined;
149
+ args?: Record<string, string> | undefined;
150
+ }>]>>;
151
+ environment: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
152
+ env_file: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
153
+ ports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
154
+ volumes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
155
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
156
+ platform: z.ZodOptional<z.ZodString>;
157
+ deploy: z.ZodOptional<z.ZodObject<{
158
+ resources: z.ZodOptional<z.ZodObject<{
159
+ reservations: z.ZodOptional<z.ZodObject<{
160
+ devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
161
+ driver: z.ZodString;
162
+ capabilities: z.ZodArray<z.ZodString, "many">;
163
+ }, "strip", z.ZodTypeAny, {
164
+ driver: string;
165
+ capabilities: string[];
166
+ }, {
167
+ driver: string;
168
+ capabilities: string[];
169
+ }>, "many">>;
170
+ }, "strip", z.ZodTypeAny, {
171
+ devices?: {
172
+ driver: string;
173
+ capabilities: string[];
174
+ }[] | undefined;
175
+ }, {
176
+ devices?: {
177
+ driver: string;
178
+ capabilities: string[];
179
+ }[] | undefined;
180
+ }>>;
181
+ }, "strip", z.ZodTypeAny, {
182
+ reservations?: {
183
+ devices?: {
184
+ driver: string;
185
+ capabilities: string[];
186
+ }[] | undefined;
187
+ } | undefined;
188
+ }, {
189
+ reservations?: {
190
+ devices?: {
191
+ driver: string;
192
+ capabilities: string[];
193
+ }[] | undefined;
194
+ } | undefined;
195
+ }>>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ resources?: {
198
+ reservations?: {
199
+ devices?: {
200
+ driver: string;
201
+ capabilities: string[];
202
+ }[] | undefined;
203
+ } | undefined;
204
+ } | undefined;
205
+ }, {
206
+ resources?: {
207
+ reservations?: {
208
+ devices?: {
209
+ driver: string;
210
+ capabilities: string[];
211
+ }[] | undefined;
212
+ } | undefined;
213
+ } | undefined;
214
+ }>>;
215
+ profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
216
+ condition: z.ZodOptional<z.ZodString>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ image?: string | undefined;
219
+ build?: string | {
220
+ context: string;
221
+ dockerfile?: string | undefined;
222
+ args?: Record<string, string> | undefined;
223
+ } | undefined;
224
+ environment?: string[] | undefined;
225
+ env_file?: string[] | undefined;
226
+ ports?: string[] | undefined;
227
+ volumes?: string[] | undefined;
228
+ depends_on?: string[] | undefined;
229
+ platform?: string | undefined;
230
+ deploy?: {
231
+ resources?: {
232
+ reservations?: {
233
+ devices?: {
234
+ driver: string;
235
+ capabilities: string[];
236
+ }[] | undefined;
237
+ } | undefined;
238
+ } | undefined;
239
+ } | undefined;
240
+ profiles?: string[] | undefined;
241
+ condition?: string | undefined;
242
+ }, {
243
+ image?: string | undefined;
244
+ build?: string | {
245
+ context: string;
246
+ dockerfile?: string | undefined;
247
+ args?: Record<string, string> | undefined;
248
+ } | undefined;
249
+ environment?: string[] | undefined;
250
+ env_file?: string[] | undefined;
251
+ ports?: string[] | undefined;
252
+ volumes?: string[] | undefined;
253
+ depends_on?: string[] | undefined;
254
+ platform?: string | undefined;
255
+ deploy?: {
256
+ resources?: {
257
+ reservations?: {
258
+ devices?: {
259
+ driver: string;
260
+ capabilities: string[];
261
+ }[] | undefined;
262
+ } | undefined;
263
+ } | undefined;
264
+ } | undefined;
265
+ profiles?: string[] | undefined;
266
+ condition?: string | undefined;
267
+ }>>;
268
+ networks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
269
+ volumes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
270
+ profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
271
+ }, "strip", z.ZodTypeAny, {
272
+ services: Record<string, {
273
+ image?: string | undefined;
274
+ build?: string | {
275
+ context: string;
276
+ dockerfile?: string | undefined;
277
+ args?: Record<string, string> | undefined;
278
+ } | undefined;
279
+ environment?: string[] | undefined;
280
+ env_file?: string[] | undefined;
281
+ ports?: string[] | undefined;
282
+ volumes?: string[] | undefined;
283
+ depends_on?: string[] | undefined;
284
+ platform?: string | undefined;
285
+ deploy?: {
286
+ resources?: {
287
+ reservations?: {
288
+ devices?: {
289
+ driver: string;
290
+ capabilities: string[];
291
+ }[] | undefined;
292
+ } | undefined;
293
+ } | undefined;
294
+ } | undefined;
295
+ profiles?: string[] | undefined;
296
+ condition?: string | undefined;
297
+ }>;
298
+ volumes?: Record<string, any> | undefined;
299
+ profiles?: string[] | undefined;
300
+ networks?: Record<string, any> | undefined;
301
+ }, {
302
+ services: Record<string, {
303
+ image?: string | undefined;
304
+ build?: string | {
305
+ context: string;
306
+ dockerfile?: string | undefined;
307
+ args?: Record<string, string> | undefined;
308
+ } | undefined;
309
+ environment?: string[] | undefined;
310
+ env_file?: string[] | undefined;
311
+ ports?: string[] | undefined;
312
+ volumes?: string[] | undefined;
313
+ depends_on?: string[] | undefined;
314
+ platform?: string | undefined;
315
+ deploy?: {
316
+ resources?: {
317
+ reservations?: {
318
+ devices?: {
319
+ driver: string;
320
+ capabilities: string[];
321
+ }[] | undefined;
322
+ } | undefined;
323
+ } | undefined;
324
+ } | undefined;
325
+ profiles?: string[] | undefined;
326
+ condition?: string | undefined;
327
+ }>;
328
+ volumes?: Record<string, any> | undefined;
329
+ profiles?: string[] | undefined;
330
+ networks?: Record<string, any> | undefined;
331
+ }>;
332
+ export declare const ProfileSchema: z.ZodObject<{
333
+ name: z.ZodString;
334
+ description: z.ZodString;
335
+ extends: z.ZodOptional<z.ZodString>;
336
+ components: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
337
+ docker: z.ZodOptional<z.ZodObject<{
338
+ services: z.ZodRecord<z.ZodString, z.ZodObject<{
339
+ image: z.ZodOptional<z.ZodString>;
340
+ build: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
341
+ context: z.ZodString;
342
+ dockerfile: z.ZodOptional<z.ZodString>;
343
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
344
+ }, "strip", z.ZodTypeAny, {
345
+ context: string;
346
+ dockerfile?: string | undefined;
347
+ args?: Record<string, string> | undefined;
348
+ }, {
349
+ context: string;
350
+ dockerfile?: string | undefined;
351
+ args?: Record<string, string> | undefined;
352
+ }>]>>;
353
+ environment: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
354
+ env_file: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
355
+ ports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
356
+ volumes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
357
+ depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
358
+ platform: z.ZodOptional<z.ZodString>;
359
+ deploy: z.ZodOptional<z.ZodObject<{
360
+ resources: z.ZodOptional<z.ZodObject<{
361
+ reservations: z.ZodOptional<z.ZodObject<{
362
+ devices: z.ZodOptional<z.ZodArray<z.ZodObject<{
363
+ driver: z.ZodString;
364
+ capabilities: z.ZodArray<z.ZodString, "many">;
365
+ }, "strip", z.ZodTypeAny, {
366
+ driver: string;
367
+ capabilities: string[];
368
+ }, {
369
+ driver: string;
370
+ capabilities: string[];
371
+ }>, "many">>;
372
+ }, "strip", z.ZodTypeAny, {
373
+ devices?: {
374
+ driver: string;
375
+ capabilities: string[];
376
+ }[] | undefined;
377
+ }, {
378
+ devices?: {
379
+ driver: string;
380
+ capabilities: string[];
381
+ }[] | undefined;
382
+ }>>;
383
+ }, "strip", z.ZodTypeAny, {
384
+ reservations?: {
385
+ devices?: {
386
+ driver: string;
387
+ capabilities: string[];
388
+ }[] | undefined;
389
+ } | undefined;
390
+ }, {
391
+ reservations?: {
392
+ devices?: {
393
+ driver: string;
394
+ capabilities: string[];
395
+ }[] | undefined;
396
+ } | undefined;
397
+ }>>;
398
+ }, "strip", z.ZodTypeAny, {
399
+ resources?: {
400
+ reservations?: {
401
+ devices?: {
402
+ driver: string;
403
+ capabilities: string[];
404
+ }[] | undefined;
405
+ } | undefined;
406
+ } | undefined;
407
+ }, {
408
+ resources?: {
409
+ reservations?: {
410
+ devices?: {
411
+ driver: string;
412
+ capabilities: string[];
413
+ }[] | undefined;
414
+ } | undefined;
415
+ } | undefined;
416
+ }>>;
417
+ profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
418
+ condition: z.ZodOptional<z.ZodString>;
419
+ }, "strip", z.ZodTypeAny, {
420
+ image?: string | undefined;
421
+ build?: string | {
422
+ context: string;
423
+ dockerfile?: string | undefined;
424
+ args?: Record<string, string> | undefined;
425
+ } | undefined;
426
+ environment?: string[] | undefined;
427
+ env_file?: string[] | undefined;
428
+ ports?: string[] | undefined;
429
+ volumes?: string[] | undefined;
430
+ depends_on?: string[] | undefined;
431
+ platform?: string | undefined;
432
+ deploy?: {
433
+ resources?: {
434
+ reservations?: {
435
+ devices?: {
436
+ driver: string;
437
+ capabilities: string[];
438
+ }[] | undefined;
439
+ } | undefined;
440
+ } | undefined;
441
+ } | undefined;
442
+ profiles?: string[] | undefined;
443
+ condition?: string | undefined;
444
+ }, {
445
+ image?: string | undefined;
446
+ build?: string | {
447
+ context: string;
448
+ dockerfile?: string | undefined;
449
+ args?: Record<string, string> | undefined;
450
+ } | undefined;
451
+ environment?: string[] | undefined;
452
+ env_file?: string[] | undefined;
453
+ ports?: string[] | undefined;
454
+ volumes?: string[] | undefined;
455
+ depends_on?: string[] | undefined;
456
+ platform?: string | undefined;
457
+ deploy?: {
458
+ resources?: {
459
+ reservations?: {
460
+ devices?: {
461
+ driver: string;
462
+ capabilities: string[];
463
+ }[] | undefined;
464
+ } | undefined;
465
+ } | undefined;
466
+ } | undefined;
467
+ profiles?: string[] | undefined;
468
+ condition?: string | undefined;
469
+ }>>;
470
+ networks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
471
+ volumes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
472
+ profiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
473
+ }, "strip", z.ZodTypeAny, {
474
+ services: Record<string, {
475
+ image?: string | undefined;
476
+ build?: string | {
477
+ context: string;
478
+ dockerfile?: string | undefined;
479
+ args?: Record<string, string> | undefined;
480
+ } | undefined;
481
+ environment?: string[] | undefined;
482
+ env_file?: string[] | undefined;
483
+ ports?: string[] | undefined;
484
+ volumes?: string[] | undefined;
485
+ depends_on?: string[] | undefined;
486
+ platform?: string | undefined;
487
+ deploy?: {
488
+ resources?: {
489
+ reservations?: {
490
+ devices?: {
491
+ driver: string;
492
+ capabilities: string[];
493
+ }[] | undefined;
494
+ } | undefined;
495
+ } | undefined;
496
+ } | undefined;
497
+ profiles?: string[] | undefined;
498
+ condition?: string | undefined;
499
+ }>;
500
+ volumes?: Record<string, any> | undefined;
501
+ profiles?: string[] | undefined;
502
+ networks?: Record<string, any> | undefined;
503
+ }, {
504
+ services: Record<string, {
505
+ image?: string | undefined;
506
+ build?: string | {
507
+ context: string;
508
+ dockerfile?: string | undefined;
509
+ args?: Record<string, string> | undefined;
510
+ } | undefined;
511
+ environment?: string[] | undefined;
512
+ env_file?: string[] | undefined;
513
+ ports?: string[] | undefined;
514
+ volumes?: string[] | undefined;
515
+ depends_on?: string[] | undefined;
516
+ platform?: string | undefined;
517
+ deploy?: {
518
+ resources?: {
519
+ reservations?: {
520
+ devices?: {
521
+ driver: string;
522
+ capabilities: string[];
523
+ }[] | undefined;
524
+ } | undefined;
525
+ } | undefined;
526
+ } | undefined;
527
+ profiles?: string[] | undefined;
528
+ condition?: string | undefined;
529
+ }>;
530
+ volumes?: Record<string, any> | undefined;
531
+ profiles?: string[] | undefined;
532
+ networks?: Record<string, any> | undefined;
533
+ }>>;
534
+ }, "strip", z.ZodTypeAny, {
535
+ name: string;
536
+ description: string;
537
+ components: Record<string, string | string[]>;
538
+ extends?: string | undefined;
539
+ docker?: {
540
+ services: Record<string, {
541
+ image?: string | undefined;
542
+ build?: string | {
543
+ context: string;
544
+ dockerfile?: string | undefined;
545
+ args?: Record<string, string> | undefined;
546
+ } | undefined;
547
+ environment?: string[] | undefined;
548
+ env_file?: string[] | undefined;
549
+ ports?: string[] | undefined;
550
+ volumes?: string[] | undefined;
551
+ depends_on?: string[] | undefined;
552
+ platform?: string | undefined;
553
+ deploy?: {
554
+ resources?: {
555
+ reservations?: {
556
+ devices?: {
557
+ driver: string;
558
+ capabilities: string[];
559
+ }[] | undefined;
560
+ } | undefined;
561
+ } | undefined;
562
+ } | undefined;
563
+ profiles?: string[] | undefined;
564
+ condition?: string | undefined;
565
+ }>;
566
+ volumes?: Record<string, any> | undefined;
567
+ profiles?: string[] | undefined;
568
+ networks?: Record<string, any> | undefined;
569
+ } | undefined;
570
+ }, {
571
+ name: string;
572
+ description: string;
573
+ components: Record<string, string | string[]>;
574
+ extends?: string | undefined;
575
+ docker?: {
576
+ services: Record<string, {
577
+ image?: string | undefined;
578
+ build?: string | {
579
+ context: string;
580
+ dockerfile?: string | undefined;
581
+ args?: Record<string, string> | undefined;
582
+ } | undefined;
583
+ environment?: string[] | undefined;
584
+ env_file?: string[] | undefined;
585
+ ports?: string[] | undefined;
586
+ volumes?: string[] | undefined;
587
+ depends_on?: string[] | undefined;
588
+ platform?: string | undefined;
589
+ deploy?: {
590
+ resources?: {
591
+ reservations?: {
592
+ devices?: {
593
+ driver: string;
594
+ capabilities: string[];
595
+ }[] | undefined;
596
+ } | undefined;
597
+ } | undefined;
598
+ } | undefined;
599
+ profiles?: string[] | undefined;
600
+ condition?: string | undefined;
601
+ }>;
602
+ volumes?: Record<string, any> | undefined;
603
+ profiles?: string[] | undefined;
604
+ networks?: Record<string, any> | undefined;
605
+ } | undefined;
606
+ }>;
607
+ export type Components = z.infer<typeof ComponentSchema>;
608
+ export type ComponentValue = string | string[];
609
+ export type DockerServiceConfig = z.infer<typeof DockerServiceSchema>;
610
+ export type DockerComposeConfig = z.infer<typeof DockerComposeSchema>;
611
+ export type Profile = z.infer<typeof ProfileSchema>;
612
+ export interface EnvironmentConfig {
613
+ [section: string]: {
614
+ [key: string]: string;
615
+ };
616
+ }
617
+ export interface BuildResult {
618
+ success: boolean;
619
+ envPath: string;
620
+ profile?: Profile;
621
+ errors?: string[];
622
+ warnings?: string[];
623
+ }
624
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe,sFAG3B,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwC9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB"}
@@ -0,0 +1,57 @@
1
+ import { z } from 'zod';
2
+ // Dynamic component schema - accepts any component name with string or string array values
3
+ export const ComponentSchema = z.record(z.string(), z.union([z.string(), z.array(z.string())]));
4
+ // Docker Compose configuration schemas
5
+ export const DockerServiceSchema = z.object({
6
+ image: z.string().optional(),
7
+ build: z
8
+ .union([
9
+ z.string(),
10
+ z.object({
11
+ context: z.string(),
12
+ dockerfile: z.string().optional(),
13
+ args: z.record(z.string()).optional(),
14
+ }),
15
+ ])
16
+ .optional(),
17
+ environment: z.array(z.string()).optional(),
18
+ env_file: z.array(z.string()).optional(),
19
+ ports: z.array(z.string()).optional(),
20
+ volumes: z.array(z.string()).optional(),
21
+ depends_on: z.array(z.string()).optional(),
22
+ platform: z.string().optional(),
23
+ deploy: z
24
+ .object({
25
+ resources: z
26
+ .object({
27
+ reservations: z
28
+ .object({
29
+ devices: z
30
+ .array(z.object({
31
+ driver: z.string(),
32
+ capabilities: z.array(z.string()),
33
+ }))
34
+ .optional(),
35
+ })
36
+ .optional(),
37
+ })
38
+ .optional(),
39
+ })
40
+ .optional(),
41
+ profiles: z.array(z.string()).optional(),
42
+ condition: z.string().optional(),
43
+ });
44
+ export const DockerComposeSchema = z.object({
45
+ services: z.record(DockerServiceSchema),
46
+ networks: z.record(z.any()).optional(),
47
+ volumes: z.record(z.any()).optional(),
48
+ profiles: z.array(z.string()).optional(),
49
+ });
50
+ export const ProfileSchema = z.object({
51
+ name: z.string(),
52
+ description: z.string(),
53
+ extends: z.string().optional(),
54
+ components: ComponentSchema,
55
+ docker: DockerComposeSchema.optional(),
56
+ });
57
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2FAA2F;AAC3F,M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