@savvy-web/github-action-builder 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/github-action-builder.d.ts +1 -0
- package/bin/github-action-builder.js +39 -307
- package/cli/commands/build.js +91 -0
- package/cli/commands/index.js +5 -0
- package/cli/commands/init.js +247 -0
- package/cli/commands/validate.js +42 -0
- package/errors.js +284 -0
- package/github-action.js +302 -0
- package/index.d.ts +1567 -1820
- package/index.js +10 -134
- package/layers/app.js +83 -0
- package/package.json +74 -90
- package/schemas/action-yml.js +110 -0
- package/schemas/config.js +190 -0
- package/schemas/path.js +43 -0
- package/services/build-live.js +223 -0
- package/services/build.js +63 -0
- package/services/config-live.js +111 -0
- package/services/config.js +63 -0
- package/services/persist-local-live.js +210 -0
- package/services/persist-local.js +37 -0
- package/services/validation-live.js +216 -0
- package/services/validation.js +77 -0
- package/tsdoc-metadata.json +11 -11
- package/231.js +0 -5
- package/612.js +0 -5
- package/948.js +0 -931
- /package/{tsconfig → public/tsconfig}/action.json +0 -0
package/index.d.ts
CHANGED
|
@@ -1,1820 +1,1567 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* @
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
* @
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
* @
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
*
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
*
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
* Effect.
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
* @
|
|
437
|
-
*/
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
*
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
*
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
*
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
*
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
*
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
*
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
*
|
|
681
|
-
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
* @public
|
|
696
|
-
*/
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
*
|
|
719
|
-
*
|
|
720
|
-
*
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
/**
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
/**
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
*
|
|
836
|
-
*
|
|
837
|
-
*
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
*
|
|
844
|
-
* @
|
|
845
|
-
*/
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
/**
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
*/
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
*
|
|
886
|
-
*
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
*
|
|
891
|
-
*
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
*
|
|
915
|
-
*
|
|
916
|
-
*
|
|
917
|
-
*
|
|
918
|
-
*
|
|
919
|
-
*
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
*
|
|
923
|
-
*
|
|
924
|
-
*
|
|
925
|
-
*
|
|
926
|
-
*
|
|
927
|
-
*
|
|
928
|
-
*
|
|
929
|
-
*
|
|
930
|
-
*
|
|
931
|
-
*
|
|
932
|
-
*
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
*
|
|
938
|
-
*
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
*
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
*
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
*
|
|
994
|
-
*
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
*/
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1054
|
-
*
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
*
|
|
1061
|
-
*
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
*
|
|
1069
|
-
*
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
*
|
|
1074
|
-
*
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
*
|
|
1084
|
-
*
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
*
|
|
1089
|
-
*
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
*
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
/**
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
*
|
|
1338
|
-
*
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
*
|
|
1351
|
-
*
|
|
1352
|
-
*
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
*
|
|
1370
|
-
*
|
|
1371
|
-
*
|
|
1372
|
-
*
|
|
1373
|
-
*
|
|
1374
|
-
*
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1383
|
-
*
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
*
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
*
|
|
1532
|
-
*
|
|
1533
|
-
* @public
|
|
1534
|
-
*/
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
*
|
|
1539
|
-
* @
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
*
|
|
1545
|
-
*
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
*
|
|
1556
|
-
*
|
|
1557
|
-
*
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
*
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
* A validation error item.
|
|
1569
|
-
* @internal
|
|
1570
|
-
*/
|
|
1571
|
-
export declare const ValidationErrorSchema: Schema.Struct<{
|
|
1572
|
-
/** Error code for categorization. */
|
|
1573
|
-
code: typeof Schema.String;
|
|
1574
|
-
/** Human-readable error message. */
|
|
1575
|
-
message: typeof Schema.String;
|
|
1576
|
-
/** File path where error occurred. */
|
|
1577
|
-
file: Schema.optional<typeof Schema.String>;
|
|
1578
|
-
/** Suggestion for fixing the error. */
|
|
1579
|
-
suggestion: Schema.optional<typeof Schema.String>;
|
|
1580
|
-
}>;
|
|
1581
|
-
|
|
1582
|
-
/**
|
|
1583
|
-
* Error when validation fails in strict mode (CI environment).
|
|
1584
|
-
*
|
|
1585
|
-
* @public
|
|
1586
|
-
*/
|
|
1587
|
-
export declare class ValidationFailed extends ValidationFailedBase<{
|
|
1588
|
-
/**
|
|
1589
|
-
* Number of errors encountered.
|
|
1590
|
-
*/
|
|
1591
|
-
readonly errorCount: number;
|
|
1592
|
-
/**
|
|
1593
|
-
* Number of warnings encountered.
|
|
1594
|
-
*/
|
|
1595
|
-
readonly warningCount: number;
|
|
1596
|
-
/**
|
|
1597
|
-
* Formatted validation result message.
|
|
1598
|
-
*/
|
|
1599
|
-
readonly message: string;
|
|
1600
|
-
}> {
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
* Base class for ValidationFailed error.
|
|
1605
|
-
*
|
|
1606
|
-
* @privateRemarks
|
|
1607
|
-
* This export is required for api-extractor documentation generation.
|
|
1608
|
-
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
1609
|
-
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
1610
|
-
*
|
|
1611
|
-
* @internal
|
|
1612
|
-
*/
|
|
1613
|
-
export declare const ValidationFailedBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty< { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => YieldableError & {
|
|
1614
|
-
readonly _tag: "ValidationFailed";
|
|
1615
|
-
} & Readonly<A>;
|
|
1616
|
-
|
|
1617
|
-
/**
|
|
1618
|
-
* Layer providing ValidationService (depends on ConfigService).
|
|
1619
|
-
*
|
|
1620
|
-
* @remarks
|
|
1621
|
-
* Includes ConfigService automatically.
|
|
1622
|
-
*
|
|
1623
|
-
* @public
|
|
1624
|
-
*/
|
|
1625
|
-
export declare const ValidationLayer: Layer.Layer<ValidationService, never, never>;
|
|
1626
|
-
|
|
1627
|
-
/**
|
|
1628
|
-
* Validation options for the build process.
|
|
1629
|
-
*
|
|
1630
|
-
* @public
|
|
1631
|
-
*/
|
|
1632
|
-
export declare type ValidationOptions = typeof ValidationOptionsSchema.Type;
|
|
1633
|
-
|
|
1634
|
-
/**
|
|
1635
|
-
* Schema for validation options.
|
|
1636
|
-
*
|
|
1637
|
-
* @remarks
|
|
1638
|
-
* Validation options control how strictly the build process validates
|
|
1639
|
-
* the project structure and configuration before building.
|
|
1640
|
-
*
|
|
1641
|
-
* @internal
|
|
1642
|
-
*/
|
|
1643
|
-
export declare const ValidationOptionsSchema: Schema.Struct<{
|
|
1644
|
-
/** Require action.yml to exist and be valid. Defaults to true. */
|
|
1645
|
-
requireActionYml: Schema.optionalWith<typeof Schema.Boolean, {
|
|
1646
|
-
default: () => true;
|
|
1647
|
-
}>;
|
|
1648
|
-
/** Maximum bundle size before warning/error (e.g., "5mb", "500kb"). */
|
|
1649
|
-
maxBundleSize: Schema.optional<typeof Schema.String>;
|
|
1650
|
-
/** Treat warnings as errors. Auto-detects from CI when undefined. */
|
|
1651
|
-
strict: Schema.optional<typeof Schema.Boolean>;
|
|
1652
|
-
}>;
|
|
1653
|
-
|
|
1654
|
-
/**
|
|
1655
|
-
* Validation result with errors and warnings.
|
|
1656
|
-
* @public
|
|
1657
|
-
*/
|
|
1658
|
-
export declare type ValidationResult = typeof ValidationResultSchema.Type;
|
|
1659
|
-
|
|
1660
|
-
/**
|
|
1661
|
-
* Validation result with errors and warnings.
|
|
1662
|
-
* @internal
|
|
1663
|
-
*/
|
|
1664
|
-
export declare const ValidationResultSchema: Schema.Struct<{
|
|
1665
|
-
/** Whether validation passed (no errors, or only warnings in non-strict mode). */
|
|
1666
|
-
valid: typeof Schema.Boolean;
|
|
1667
|
-
/** Validation errors. */
|
|
1668
|
-
errors: Schema.Array$<Schema.Struct<{
|
|
1669
|
-
/** Error code for categorization. */
|
|
1670
|
-
code: typeof Schema.String;
|
|
1671
|
-
/** Human-readable error message. */
|
|
1672
|
-
message: typeof Schema.String;
|
|
1673
|
-
/** File path where error occurred. */
|
|
1674
|
-
file: Schema.optional<typeof Schema.String>;
|
|
1675
|
-
/** Suggestion for fixing the error. */
|
|
1676
|
-
suggestion: Schema.optional<typeof Schema.String>;
|
|
1677
|
-
}>>;
|
|
1678
|
-
/** Validation warnings. */
|
|
1679
|
-
warnings: Schema.Array$<Schema.Struct<{
|
|
1680
|
-
/** Warning code for categorization. */
|
|
1681
|
-
code: typeof Schema.String;
|
|
1682
|
-
/** Human-readable warning message. */
|
|
1683
|
-
message: typeof Schema.String;
|
|
1684
|
-
/** File path where warning occurred. */
|
|
1685
|
-
file: Schema.optional<typeof Schema.String>;
|
|
1686
|
-
/** Suggestion for addressing the warning. */
|
|
1687
|
-
suggestion: Schema.optional<typeof Schema.String>;
|
|
1688
|
-
}>>;
|
|
1689
|
-
}>;
|
|
1690
|
-
|
|
1691
|
-
/**
|
|
1692
|
-
* ValidationService interface for validation capabilities.
|
|
1693
|
-
*
|
|
1694
|
-
* @remarks
|
|
1695
|
-
* This service handles:
|
|
1696
|
-
* - Validating configuration and entry points
|
|
1697
|
-
* - Validating action.yml structure and schema
|
|
1698
|
-
* - Formatting validation results for display
|
|
1699
|
-
* - CI-aware strict mode handling
|
|
1700
|
-
*
|
|
1701
|
-
* @example Using ValidationService with Effect
|
|
1702
|
-
* ```typescript
|
|
1703
|
-
* import { Effect } from "effect";
|
|
1704
|
-
* import { AppLayer, ConfigService, ValidationService } from "@savvy-web/github-action-builder";
|
|
1705
|
-
*
|
|
1706
|
-
* const program = Effect.gen(function* () {
|
|
1707
|
-
* const configService = yield* ConfigService;
|
|
1708
|
-
* const validationService = yield* ValidationService;
|
|
1709
|
-
*
|
|
1710
|
-
* const { config } = yield* configService.load();
|
|
1711
|
-
* const result = yield* validationService.validate(config);
|
|
1712
|
-
*
|
|
1713
|
-
* if (!result.valid) {
|
|
1714
|
-
* console.error("Validation failed:", result.errors);
|
|
1715
|
-
* }
|
|
1716
|
-
* });
|
|
1717
|
-
*
|
|
1718
|
-
* Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
|
|
1719
|
-
* ```
|
|
1720
|
-
*
|
|
1721
|
-
* @public
|
|
1722
|
-
*/
|
|
1723
|
-
export declare interface ValidationService {
|
|
1724
|
-
/**
|
|
1725
|
-
* Validate configuration and project structure.
|
|
1726
|
-
*
|
|
1727
|
-
* @param config - Configuration to validate
|
|
1728
|
-
* @param options - Validation options
|
|
1729
|
-
* @returns Effect that resolves to validation result
|
|
1730
|
-
*/
|
|
1731
|
-
readonly validate: (config: Config, options?: ValidateOptions) => Effect.Effect<ValidationResult, ValidationError>;
|
|
1732
|
-
/**
|
|
1733
|
-
* Validate action.yml file.
|
|
1734
|
-
*
|
|
1735
|
-
* @param path - Path to action.yml file
|
|
1736
|
-
* @returns Effect that resolves to action.yml validation result
|
|
1737
|
-
*/
|
|
1738
|
-
readonly validateActionYml: (path: string) => Effect.Effect<ActionYmlResult, ValidationError>;
|
|
1739
|
-
/**
|
|
1740
|
-
* Format validation result for display.
|
|
1741
|
-
*
|
|
1742
|
-
* @param result - Validation result to format
|
|
1743
|
-
* @returns Formatted string for terminal output
|
|
1744
|
-
*/
|
|
1745
|
-
readonly formatResult: (result: ValidationResult) => string;
|
|
1746
|
-
/**
|
|
1747
|
-
* Check if running in CI environment.
|
|
1748
|
-
*
|
|
1749
|
-
* @returns Effect that resolves to true if in CI
|
|
1750
|
-
*/
|
|
1751
|
-
readonly isCI: () => Effect.Effect<boolean>;
|
|
1752
|
-
/**
|
|
1753
|
-
* Check if strict mode is enabled.
|
|
1754
|
-
*
|
|
1755
|
-
* @param configStrict - Optional config override
|
|
1756
|
-
* @returns Effect that resolves to true if strict mode
|
|
1757
|
-
*/
|
|
1758
|
-
readonly isStrict: (configStrict?: boolean) => Effect.Effect<boolean>;
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
/**
|
|
1762
|
-
* ValidationService tag for dependency injection.
|
|
1763
|
-
*
|
|
1764
|
-
* @public
|
|
1765
|
-
*/
|
|
1766
|
-
export declare const ValidationService: Context.Tag<ValidationService, ValidationService>;
|
|
1767
|
-
|
|
1768
|
-
/**
|
|
1769
|
-
* A validation warning.
|
|
1770
|
-
* @public
|
|
1771
|
-
*/
|
|
1772
|
-
export declare type ValidationWarning = typeof ValidationWarningSchema.Type;
|
|
1773
|
-
|
|
1774
|
-
/**
|
|
1775
|
-
* A validation warning.
|
|
1776
|
-
* @internal
|
|
1777
|
-
*/
|
|
1778
|
-
export declare const ValidationWarningSchema: Schema.Struct<{
|
|
1779
|
-
/** Warning code for categorization. */
|
|
1780
|
-
code: typeof Schema.String;
|
|
1781
|
-
/** Human-readable warning message. */
|
|
1782
|
-
message: typeof Schema.String;
|
|
1783
|
-
/** File path where warning occurred. */
|
|
1784
|
-
file: Schema.optional<typeof Schema.String>;
|
|
1785
|
-
/** Suggestion for addressing the warning. */
|
|
1786
|
-
suggestion: Schema.optional<typeof Schema.String>;
|
|
1787
|
-
}>;
|
|
1788
|
-
|
|
1789
|
-
/**
|
|
1790
|
-
* Error when writing output files fails.
|
|
1791
|
-
*
|
|
1792
|
-
* @public
|
|
1793
|
-
*/
|
|
1794
|
-
export declare class WriteError extends WriteErrorBase<{
|
|
1795
|
-
/**
|
|
1796
|
-
* The path that failed to write.
|
|
1797
|
-
*/
|
|
1798
|
-
readonly path: string;
|
|
1799
|
-
/**
|
|
1800
|
-
* The underlying error or error message.
|
|
1801
|
-
*/
|
|
1802
|
-
readonly cause: unknown;
|
|
1803
|
-
}> {
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
* Base class for WriteError error.
|
|
1808
|
-
*
|
|
1809
|
-
* @privateRemarks
|
|
1810
|
-
* This export is required for api-extractor documentation generation.
|
|
1811
|
-
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
1812
|
-
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
1813
|
-
*
|
|
1814
|
-
* @internal
|
|
1815
|
-
*/
|
|
1816
|
-
export declare const WriteErrorBase: new <A extends Record<string, any> = {}>(args: VoidIfEmpty< { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => YieldableError & {
|
|
1817
|
-
readonly _tag: "WriteError";
|
|
1818
|
-
} & Readonly<A>;
|
|
1819
|
-
|
|
1820
|
-
export { }
|
|
1
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
//#region src/schemas/config.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Schema for entry point paths.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* GitHub Actions support three entry points:
|
|
9
|
+
* - `main`: The primary action entry point (required)
|
|
10
|
+
* - `pre`: Runs before the main action (optional)
|
|
11
|
+
* - `post`: Runs after the main action for cleanup (optional)
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
declare const EntriesSchema: Schema.Struct<{
|
|
16
|
+
/** Path to the main action entry point. Defaults to "src/main.ts". */main: Schema.optionalWith<typeof Schema.String, {
|
|
17
|
+
default: () => string;
|
|
18
|
+
}>; /** Path to the pre-action hook entry point. */
|
|
19
|
+
pre: Schema.optional<typeof Schema.String>; /** Path to the post-action hook entry point. */
|
|
20
|
+
post: Schema.optional<typeof Schema.String>;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Entry point paths configuration.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
type Entries = typeof EntriesSchema.Type;
|
|
28
|
+
/**
|
|
29
|
+
* Schema for build options.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Build options control how the TypeScript source is bundled using rsbuild.
|
|
33
|
+
* The bundler creates a single JavaScript file with all dependencies inlined.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
declare const BuildOptionsSchema: Schema.Struct<{
|
|
38
|
+
/** Enable minification to reduce bundle size. Defaults to true. */minify: Schema.optionalWith<typeof Schema.Boolean, {
|
|
39
|
+
default: () => true;
|
|
40
|
+
}>; /** Generate source maps for debugging. Defaults to false. */
|
|
41
|
+
sourceMap: Schema.optionalWith<typeof Schema.Boolean, {
|
|
42
|
+
default: () => false;
|
|
43
|
+
}>; /** Packages to exclude from the bundle (in addition to node: builtins). Defaults to []. */
|
|
44
|
+
externals: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
|
|
45
|
+
default: () => never[];
|
|
46
|
+
}>; /** Packages to exclude from the bundle and replace with a stub that throws if loaded at runtime. Use for optional transitive dependencies the action never exercises (e.g. native modules). Defaults to []. */
|
|
47
|
+
ignore: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
|
|
48
|
+
default: () => never[];
|
|
49
|
+
}>;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Build options for the bundler.
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
type BuildOptions = typeof BuildOptionsSchema.Type;
|
|
57
|
+
/**
|
|
58
|
+
* Schema for validation options.
|
|
59
|
+
*
|
|
60
|
+
* @remarks
|
|
61
|
+
* Validation options control how strictly the build process validates
|
|
62
|
+
* the project structure and configuration before building.
|
|
63
|
+
*
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
declare const ValidationOptionsSchema: Schema.Struct<{
|
|
67
|
+
/** Require action.yml to exist and be valid. Defaults to true. */requireActionYml: Schema.optionalWith<typeof Schema.Boolean, {
|
|
68
|
+
default: () => true;
|
|
69
|
+
}>; /** Maximum bundle size before warning/error (e.g., "5mb", "500kb"). */
|
|
70
|
+
maxBundleSize: Schema.optional<typeof Schema.String>; /** Treat warnings as errors. Auto-detects from CI when undefined. */
|
|
71
|
+
strict: Schema.optional<typeof Schema.Boolean>;
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* Validation options for the build process.
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
type ValidationOptions = typeof ValidationOptionsSchema.Type;
|
|
79
|
+
/**
|
|
80
|
+
* Schema for persist-local options.
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* Controls automatic copying of build output to a local action directory
|
|
84
|
+
* for testing with nektos/act.
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
declare const PersistLocalOptionsSchema: Schema.Struct<{
|
|
89
|
+
/** Enable persisting build output locally. Defaults to true. */enabled: Schema.optionalWith<typeof Schema.Boolean, {
|
|
90
|
+
default: () => true;
|
|
91
|
+
}>; /** Path for the local action directory, relative to cwd. Defaults to ".github/actions/local". */
|
|
92
|
+
path: Schema.optionalWith<typeof Schema.String, {
|
|
93
|
+
default: () => string;
|
|
94
|
+
}>; /** Generate act boilerplate files (.actrc, act-test.yml) if they don't exist. Defaults to true. */
|
|
95
|
+
actTemplate: Schema.optionalWith<typeof Schema.Boolean, {
|
|
96
|
+
default: () => true;
|
|
97
|
+
}>;
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Persist-local options for copying build output.
|
|
101
|
+
*
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
type PersistLocalOptions = typeof PersistLocalOptionsSchema.Type;
|
|
105
|
+
/**
|
|
106
|
+
* User-provided configuration input (all fields optional).
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* This schema is used for parsing user-provided configuration.
|
|
110
|
+
* All sections are optional; defaults are applied via {@link defineConfig}.
|
|
111
|
+
*
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
declare const ConfigInputSchema: Schema.Struct<{
|
|
115
|
+
entries: Schema.optional<Schema.Struct<{
|
|
116
|
+
main: Schema.optional<typeof Schema.String>;
|
|
117
|
+
pre: Schema.optional<typeof Schema.String>;
|
|
118
|
+
post: Schema.optional<typeof Schema.String>;
|
|
119
|
+
}>>;
|
|
120
|
+
build: Schema.optional<Schema.Struct<{
|
|
121
|
+
minify: Schema.optional<typeof Schema.Boolean>;
|
|
122
|
+
sourceMap: Schema.optional<typeof Schema.Boolean>;
|
|
123
|
+
externals: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
124
|
+
ignore: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
125
|
+
}>>;
|
|
126
|
+
validation: Schema.optional<Schema.Struct<{
|
|
127
|
+
requireActionYml: Schema.optional<typeof Schema.Boolean>;
|
|
128
|
+
maxBundleSize: Schema.optional<typeof Schema.String>;
|
|
129
|
+
strict: Schema.optional<typeof Schema.Boolean>;
|
|
130
|
+
}>>;
|
|
131
|
+
persistLocal: Schema.optional<Schema.Struct<{
|
|
132
|
+
enabled: Schema.optional<typeof Schema.Boolean>;
|
|
133
|
+
path: Schema.optional<typeof Schema.String>;
|
|
134
|
+
actTemplate: Schema.optional<typeof Schema.Boolean>;
|
|
135
|
+
}>>;
|
|
136
|
+
}>;
|
|
137
|
+
/**
|
|
138
|
+
* User-provided configuration input (all fields optional).
|
|
139
|
+
*
|
|
140
|
+
* @remarks
|
|
141
|
+
* Use this type when accepting configuration from users.
|
|
142
|
+
* All fields are optional and will be merged with defaults.
|
|
143
|
+
*
|
|
144
|
+
* @public
|
|
145
|
+
*/
|
|
146
|
+
type ConfigInput = typeof ConfigInputSchema.Type;
|
|
147
|
+
/**
|
|
148
|
+
* Fully resolved configuration with all defaults applied.
|
|
149
|
+
*
|
|
150
|
+
* @internal
|
|
151
|
+
*/
|
|
152
|
+
declare const ConfigSchema: Schema.Struct<{
|
|
153
|
+
entries: Schema.Struct<{
|
|
154
|
+
/** Path to the main action entry point. Defaults to "src/main.ts". */main: Schema.optionalWith<typeof Schema.String, {
|
|
155
|
+
default: () => string;
|
|
156
|
+
}>; /** Path to the pre-action hook entry point. */
|
|
157
|
+
pre: Schema.optional<typeof Schema.String>; /** Path to the post-action hook entry point. */
|
|
158
|
+
post: Schema.optional<typeof Schema.String>;
|
|
159
|
+
}>;
|
|
160
|
+
build: Schema.Struct<{
|
|
161
|
+
/** Enable minification to reduce bundle size. Defaults to true. */minify: Schema.optionalWith<typeof Schema.Boolean, {
|
|
162
|
+
default: () => true;
|
|
163
|
+
}>; /** Generate source maps for debugging. Defaults to false. */
|
|
164
|
+
sourceMap: Schema.optionalWith<typeof Schema.Boolean, {
|
|
165
|
+
default: () => false;
|
|
166
|
+
}>; /** Packages to exclude from the bundle (in addition to node: builtins). Defaults to []. */
|
|
167
|
+
externals: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
|
|
168
|
+
default: () => never[];
|
|
169
|
+
}>; /** Packages to exclude from the bundle and replace with a stub that throws if loaded at runtime. Use for optional transitive dependencies the action never exercises (e.g. native modules). Defaults to []. */
|
|
170
|
+
ignore: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
|
|
171
|
+
default: () => never[];
|
|
172
|
+
}>;
|
|
173
|
+
}>;
|
|
174
|
+
validation: Schema.Struct<{
|
|
175
|
+
/** Require action.yml to exist and be valid. Defaults to true. */requireActionYml: Schema.optionalWith<typeof Schema.Boolean, {
|
|
176
|
+
default: () => true;
|
|
177
|
+
}>; /** Maximum bundle size before warning/error (e.g., "5mb", "500kb"). */
|
|
178
|
+
maxBundleSize: Schema.optional<typeof Schema.String>; /** Treat warnings as errors. Auto-detects from CI when undefined. */
|
|
179
|
+
strict: Schema.optional<typeof Schema.Boolean>;
|
|
180
|
+
}>;
|
|
181
|
+
persistLocal: Schema.Struct<{
|
|
182
|
+
/** Enable persisting build output locally. Defaults to true. */enabled: Schema.optionalWith<typeof Schema.Boolean, {
|
|
183
|
+
default: () => true;
|
|
184
|
+
}>; /** Path for the local action directory, relative to cwd. Defaults to ".github/actions/local". */
|
|
185
|
+
path: Schema.optionalWith<typeof Schema.String, {
|
|
186
|
+
default: () => string;
|
|
187
|
+
}>; /** Generate act boilerplate files (.actrc, act-test.yml) if they don't exist. Defaults to true. */
|
|
188
|
+
actTemplate: Schema.optionalWith<typeof Schema.Boolean, {
|
|
189
|
+
default: () => true;
|
|
190
|
+
}>;
|
|
191
|
+
}>;
|
|
192
|
+
}>;
|
|
193
|
+
/**
|
|
194
|
+
* Fully resolved configuration with all defaults applied.
|
|
195
|
+
*
|
|
196
|
+
* @remarks
|
|
197
|
+
* This type represents the final configuration after all defaults
|
|
198
|
+
* have been applied. It is the result of calling {@link defineConfig}.
|
|
199
|
+
*
|
|
200
|
+
* @public
|
|
201
|
+
*/
|
|
202
|
+
type Config = typeof ConfigSchema.Type;
|
|
203
|
+
/**
|
|
204
|
+
* Define a configuration with full TypeScript support.
|
|
205
|
+
*
|
|
206
|
+
* @remarks
|
|
207
|
+
* This function validates the configuration and applies all defaults.
|
|
208
|
+
* Use it in your `action.config.ts` file for autocomplete and type checking.
|
|
209
|
+
*
|
|
210
|
+
* @param config - Partial configuration object
|
|
211
|
+
* @returns Fully resolved configuration with defaults applied
|
|
212
|
+
*
|
|
213
|
+
* @example Basic configuration file
|
|
214
|
+
* ```typescript
|
|
215
|
+
* // action.config.ts
|
|
216
|
+
* import { defineConfig } from "@savvy-web/github-action-builder";
|
|
217
|
+
*
|
|
218
|
+
* export default defineConfig({
|
|
219
|
+
* entries: {
|
|
220
|
+
* main: "src/main.ts",
|
|
221
|
+
* },
|
|
222
|
+
* build: {
|
|
223
|
+
* minify: true,
|
|
224
|
+
* },
|
|
225
|
+
* });
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* @example Full configuration with all options
|
|
229
|
+
* ```typescript
|
|
230
|
+
* // action.config.ts
|
|
231
|
+
* import { defineConfig } from "@savvy-web/github-action-builder";
|
|
232
|
+
*
|
|
233
|
+
* export default defineConfig({
|
|
234
|
+
* entries: {
|
|
235
|
+
* main: "src/action.ts",
|
|
236
|
+
* pre: "src/setup.ts",
|
|
237
|
+
* post: "src/cleanup.ts",
|
|
238
|
+
* },
|
|
239
|
+
* build: {
|
|
240
|
+
* minify: true,
|
|
241
|
+
* sourceMap: true,
|
|
242
|
+
* externals: ["@aws-sdk/client-s3"],
|
|
243
|
+
* ignore: ["libxmljs2"],
|
|
244
|
+
* },
|
|
245
|
+
* validation: {
|
|
246
|
+
* requireActionYml: true,
|
|
247
|
+
* maxBundleSize: "10mb",
|
|
248
|
+
* strict: true,
|
|
249
|
+
* },
|
|
250
|
+
* });
|
|
251
|
+
* ```
|
|
252
|
+
*
|
|
253
|
+
* @public
|
|
254
|
+
*/
|
|
255
|
+
declare function defineConfig(config?: Partial<ConfigInput>): Config;
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region src/errors.d.ts
|
|
258
|
+
/**
|
|
259
|
+
* Base class for ConfigNotFound error.
|
|
260
|
+
*
|
|
261
|
+
* @privateRemarks
|
|
262
|
+
* This export is required for api-extractor documentation generation.
|
|
263
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
264
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
265
|
+
*
|
|
266
|
+
* @internal
|
|
267
|
+
*/
|
|
268
|
+
declare const ConfigNotFoundBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
269
|
+
readonly _tag: "ConfigNotFound";
|
|
270
|
+
} & Readonly<A>;
|
|
271
|
+
/**
|
|
272
|
+
* Error when configuration file is not found.
|
|
273
|
+
*
|
|
274
|
+
* @public
|
|
275
|
+
*/
|
|
276
|
+
declare class ConfigNotFound extends ConfigNotFoundBase<{
|
|
277
|
+
/**
|
|
278
|
+
* The path that was searched for the config file.
|
|
279
|
+
*/
|
|
280
|
+
readonly path: string;
|
|
281
|
+
/**
|
|
282
|
+
* Additional context about the search.
|
|
283
|
+
*/
|
|
284
|
+
readonly message?: string;
|
|
285
|
+
}> {}
|
|
286
|
+
/**
|
|
287
|
+
* Base class for ConfigInvalid error.
|
|
288
|
+
*
|
|
289
|
+
* @privateRemarks
|
|
290
|
+
* This export is required for api-extractor documentation generation.
|
|
291
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
292
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
293
|
+
*
|
|
294
|
+
* @internal
|
|
295
|
+
*/
|
|
296
|
+
declare const ConfigInvalidBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
297
|
+
readonly _tag: "ConfigInvalid";
|
|
298
|
+
} & Readonly<A>;
|
|
299
|
+
/**
|
|
300
|
+
* Error when configuration file exists but contains invalid content.
|
|
301
|
+
*
|
|
302
|
+
* @public
|
|
303
|
+
*/
|
|
304
|
+
declare class ConfigInvalid extends ConfigInvalidBase<{
|
|
305
|
+
/**
|
|
306
|
+
* The path to the invalid config file.
|
|
307
|
+
*/
|
|
308
|
+
readonly path: string;
|
|
309
|
+
/**
|
|
310
|
+
* List of validation errors.
|
|
311
|
+
*/
|
|
312
|
+
readonly errors: ReadonlyArray<string>;
|
|
313
|
+
}> {}
|
|
314
|
+
/**
|
|
315
|
+
* Base class for ConfigLoadFailed error.
|
|
316
|
+
*
|
|
317
|
+
* @privateRemarks
|
|
318
|
+
* This export is required for api-extractor documentation generation.
|
|
319
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
320
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
321
|
+
*
|
|
322
|
+
* @internal
|
|
323
|
+
*/
|
|
324
|
+
declare const ConfigLoadFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
325
|
+
readonly _tag: "ConfigLoadFailed";
|
|
326
|
+
} & Readonly<A>;
|
|
327
|
+
/**
|
|
328
|
+
* Error when configuration file fails to load (import error, syntax error, etc.).
|
|
329
|
+
*
|
|
330
|
+
* @public
|
|
331
|
+
*/
|
|
332
|
+
declare class ConfigLoadFailed extends ConfigLoadFailedBase<{
|
|
333
|
+
/**
|
|
334
|
+
* The path to the config file that failed to load.
|
|
335
|
+
*/
|
|
336
|
+
readonly path: string;
|
|
337
|
+
/**
|
|
338
|
+
* The underlying error or error message.
|
|
339
|
+
*/
|
|
340
|
+
readonly cause: unknown;
|
|
341
|
+
}> {}
|
|
342
|
+
/**
|
|
343
|
+
* Union of all configuration-related errors.
|
|
344
|
+
*
|
|
345
|
+
* @public
|
|
346
|
+
*/
|
|
347
|
+
type ConfigError = ConfigNotFound | ConfigInvalid | ConfigLoadFailed;
|
|
348
|
+
/**
|
|
349
|
+
* Base class for MainEntryMissing error.
|
|
350
|
+
*
|
|
351
|
+
* @privateRemarks
|
|
352
|
+
* This export is required for api-extractor documentation generation.
|
|
353
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
354
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
355
|
+
*
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
358
|
+
declare const MainEntryMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
359
|
+
readonly _tag: "MainEntryMissing";
|
|
360
|
+
} & Readonly<A>;
|
|
361
|
+
/**
|
|
362
|
+
* Error when the required main entry point is missing.
|
|
363
|
+
*
|
|
364
|
+
* @public
|
|
365
|
+
*/
|
|
366
|
+
declare class MainEntryMissing extends MainEntryMissingBase<{
|
|
367
|
+
/**
|
|
368
|
+
* The expected path for the main entry.
|
|
369
|
+
*/
|
|
370
|
+
readonly expectedPath: string;
|
|
371
|
+
/**
|
|
372
|
+
* The working directory that was searched.
|
|
373
|
+
*/
|
|
374
|
+
readonly cwd: string;
|
|
375
|
+
}> {}
|
|
376
|
+
/**
|
|
377
|
+
* Base class for EntryFileMissing error.
|
|
378
|
+
*
|
|
379
|
+
* @privateRemarks
|
|
380
|
+
* This export is required for api-extractor documentation generation.
|
|
381
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
382
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
383
|
+
*
|
|
384
|
+
* @internal
|
|
385
|
+
*/
|
|
386
|
+
declare const EntryFileMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
387
|
+
readonly _tag: "EntryFileMissing";
|
|
388
|
+
} & Readonly<A>;
|
|
389
|
+
/**
|
|
390
|
+
* Error when an explicitly specified entry file is missing.
|
|
391
|
+
*
|
|
392
|
+
* @public
|
|
393
|
+
*/
|
|
394
|
+
declare class EntryFileMissing extends EntryFileMissingBase<{
|
|
395
|
+
/**
|
|
396
|
+
* The type of entry (main, pre, post).
|
|
397
|
+
*/
|
|
398
|
+
readonly entryType: "main" | "pre" | "post";
|
|
399
|
+
/**
|
|
400
|
+
* The path that was specified but not found.
|
|
401
|
+
*/
|
|
402
|
+
readonly path: string;
|
|
403
|
+
}> {}
|
|
404
|
+
/**
|
|
405
|
+
* Base class for ActionYmlMissing error.
|
|
406
|
+
*
|
|
407
|
+
* @privateRemarks
|
|
408
|
+
* This export is required for api-extractor documentation generation.
|
|
409
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
410
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
411
|
+
*
|
|
412
|
+
* @internal
|
|
413
|
+
*/
|
|
414
|
+
declare const ActionYmlMissingBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
415
|
+
readonly _tag: "ActionYmlMissing";
|
|
416
|
+
} & Readonly<A>;
|
|
417
|
+
/**
|
|
418
|
+
* Error when action.yml file is missing.
|
|
419
|
+
*
|
|
420
|
+
* @public
|
|
421
|
+
*/
|
|
422
|
+
declare class ActionYmlMissing extends ActionYmlMissingBase<{
|
|
423
|
+
/**
|
|
424
|
+
* The working directory that was searched.
|
|
425
|
+
*/
|
|
426
|
+
readonly cwd: string;
|
|
427
|
+
}> {}
|
|
428
|
+
/**
|
|
429
|
+
* Base class for ActionYmlSyntaxError error.
|
|
430
|
+
*
|
|
431
|
+
* @privateRemarks
|
|
432
|
+
* This export is required for api-extractor documentation generation.
|
|
433
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
434
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
435
|
+
*
|
|
436
|
+
* @internal
|
|
437
|
+
*/
|
|
438
|
+
declare const ActionYmlSyntaxErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
439
|
+
readonly _tag: "ActionYmlSyntaxError";
|
|
440
|
+
} & Readonly<A>;
|
|
441
|
+
/**
|
|
442
|
+
* Error when action.yml has invalid YAML syntax.
|
|
443
|
+
*
|
|
444
|
+
* @public
|
|
445
|
+
*/
|
|
446
|
+
declare class ActionYmlSyntaxError extends ActionYmlSyntaxErrorBase<{
|
|
447
|
+
/**
|
|
448
|
+
* The path to the action.yml file.
|
|
449
|
+
*/
|
|
450
|
+
readonly path: string;
|
|
451
|
+
/**
|
|
452
|
+
* The syntax error message.
|
|
453
|
+
*/
|
|
454
|
+
readonly message: string;
|
|
455
|
+
/**
|
|
456
|
+
* Line number where the error occurred, if available.
|
|
457
|
+
*/
|
|
458
|
+
readonly line?: number;
|
|
459
|
+
/**
|
|
460
|
+
* Column number where the error occurred, if available.
|
|
461
|
+
*/
|
|
462
|
+
readonly column?: number;
|
|
463
|
+
}> {}
|
|
464
|
+
/**
|
|
465
|
+
* Base class for ActionYmlSchemaError error.
|
|
466
|
+
*
|
|
467
|
+
* @privateRemarks
|
|
468
|
+
* This export is required for api-extractor documentation generation.
|
|
469
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
470
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
471
|
+
*
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
declare const ActionYmlSchemaErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
475
|
+
readonly _tag: "ActionYmlSchemaError";
|
|
476
|
+
} & Readonly<A>;
|
|
477
|
+
/**
|
|
478
|
+
* Error when action.yml fails schema validation.
|
|
479
|
+
*
|
|
480
|
+
* @public
|
|
481
|
+
*/
|
|
482
|
+
declare class ActionYmlSchemaError extends ActionYmlSchemaErrorBase<{
|
|
483
|
+
/**
|
|
484
|
+
* The path to the action.yml file.
|
|
485
|
+
*/
|
|
486
|
+
readonly path: string;
|
|
487
|
+
/**
|
|
488
|
+
* List of schema validation errors.
|
|
489
|
+
*/
|
|
490
|
+
readonly errors: ReadonlyArray<{
|
|
491
|
+
readonly path: string;
|
|
492
|
+
readonly message: string;
|
|
493
|
+
}>;
|
|
494
|
+
}> {}
|
|
495
|
+
/**
|
|
496
|
+
* Base class for ValidationFailed error.
|
|
497
|
+
*
|
|
498
|
+
* @privateRemarks
|
|
499
|
+
* This export is required for api-extractor documentation generation.
|
|
500
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
501
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
502
|
+
*
|
|
503
|
+
* @internal
|
|
504
|
+
*/
|
|
505
|
+
declare const ValidationFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
506
|
+
readonly _tag: "ValidationFailed";
|
|
507
|
+
} & Readonly<A>;
|
|
508
|
+
/**
|
|
509
|
+
* Error when validation fails in strict mode (CI environment).
|
|
510
|
+
*
|
|
511
|
+
* @public
|
|
512
|
+
*/
|
|
513
|
+
declare class ValidationFailed extends ValidationFailedBase<{
|
|
514
|
+
/**
|
|
515
|
+
* Number of errors encountered.
|
|
516
|
+
*/
|
|
517
|
+
readonly errorCount: number;
|
|
518
|
+
/**
|
|
519
|
+
* Number of warnings encountered.
|
|
520
|
+
*/
|
|
521
|
+
readonly warningCount: number;
|
|
522
|
+
/**
|
|
523
|
+
* Formatted validation result message.
|
|
524
|
+
*/
|
|
525
|
+
readonly message: string;
|
|
526
|
+
}> {}
|
|
527
|
+
/**
|
|
528
|
+
* Union of all validation-related errors.
|
|
529
|
+
*
|
|
530
|
+
* @public
|
|
531
|
+
*/
|
|
532
|
+
type ValidationError = MainEntryMissing | EntryFileMissing | ActionYmlMissing | ActionYmlSyntaxError | ActionYmlSchemaError | ValidationFailed;
|
|
533
|
+
/**
|
|
534
|
+
* Base class for BundleFailed error.
|
|
535
|
+
*
|
|
536
|
+
* @privateRemarks
|
|
537
|
+
* This export is required for api-extractor documentation generation.
|
|
538
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
539
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
540
|
+
*
|
|
541
|
+
* @internal
|
|
542
|
+
*/
|
|
543
|
+
declare const BundleFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
544
|
+
readonly _tag: "BundleFailed";
|
|
545
|
+
} & Readonly<A>;
|
|
546
|
+
/**
|
|
547
|
+
* Error when bundling with rsbuild fails.
|
|
548
|
+
*
|
|
549
|
+
* @public
|
|
550
|
+
*/
|
|
551
|
+
declare class BundleFailed extends BundleFailedBase<{
|
|
552
|
+
/**
|
|
553
|
+
* The entry file that failed to bundle.
|
|
554
|
+
*/
|
|
555
|
+
readonly entry: string;
|
|
556
|
+
/**
|
|
557
|
+
* The underlying error or error message.
|
|
558
|
+
*/
|
|
559
|
+
readonly cause: unknown;
|
|
560
|
+
}> {}
|
|
561
|
+
/**
|
|
562
|
+
* Base class for WriteError error.
|
|
563
|
+
*
|
|
564
|
+
* @privateRemarks
|
|
565
|
+
* This export is required for api-extractor documentation generation.
|
|
566
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
567
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
568
|
+
*
|
|
569
|
+
* @internal
|
|
570
|
+
*/
|
|
571
|
+
declare const WriteErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
572
|
+
readonly _tag: "WriteError";
|
|
573
|
+
} & Readonly<A>;
|
|
574
|
+
/**
|
|
575
|
+
* Error when writing output files fails.
|
|
576
|
+
*
|
|
577
|
+
* @public
|
|
578
|
+
*/
|
|
579
|
+
declare class WriteError extends WriteErrorBase<{
|
|
580
|
+
/**
|
|
581
|
+
* The path that failed to write.
|
|
582
|
+
*/
|
|
583
|
+
readonly path: string;
|
|
584
|
+
/**
|
|
585
|
+
* The underlying error or error message.
|
|
586
|
+
*/
|
|
587
|
+
readonly cause: unknown;
|
|
588
|
+
}> {}
|
|
589
|
+
/**
|
|
590
|
+
* Base class for CleanError error.
|
|
591
|
+
*
|
|
592
|
+
* @privateRemarks
|
|
593
|
+
* This export is required for api-extractor documentation generation.
|
|
594
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
595
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
596
|
+
*
|
|
597
|
+
* @internal
|
|
598
|
+
*/
|
|
599
|
+
declare const CleanErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
600
|
+
readonly _tag: "CleanError";
|
|
601
|
+
} & Readonly<A>;
|
|
602
|
+
/**
|
|
603
|
+
* Error when cleaning the output directory fails.
|
|
604
|
+
*
|
|
605
|
+
* @public
|
|
606
|
+
*/
|
|
607
|
+
declare class CleanError extends CleanErrorBase<{
|
|
608
|
+
/**
|
|
609
|
+
* The directory that failed to clean.
|
|
610
|
+
*/
|
|
611
|
+
readonly directory: string;
|
|
612
|
+
/**
|
|
613
|
+
* The underlying error or error message.
|
|
614
|
+
*/
|
|
615
|
+
readonly cause: unknown;
|
|
616
|
+
}> {}
|
|
617
|
+
/**
|
|
618
|
+
* Base class for BuildFailed error.
|
|
619
|
+
*
|
|
620
|
+
* @privateRemarks
|
|
621
|
+
* This export is required for api-extractor documentation generation.
|
|
622
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
623
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
624
|
+
*
|
|
625
|
+
* @internal
|
|
626
|
+
*/
|
|
627
|
+
declare const BuildFailedBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
628
|
+
readonly _tag: "BuildFailed";
|
|
629
|
+
} & Readonly<A>;
|
|
630
|
+
/**
|
|
631
|
+
* Error when the build process fails overall.
|
|
632
|
+
*
|
|
633
|
+
* @public
|
|
634
|
+
*/
|
|
635
|
+
declare class BuildFailed extends BuildFailedBase<{
|
|
636
|
+
/**
|
|
637
|
+
* Summary message of the build failure.
|
|
638
|
+
*/
|
|
639
|
+
readonly message: string;
|
|
640
|
+
/**
|
|
641
|
+
* Number of entries that failed.
|
|
642
|
+
*/
|
|
643
|
+
readonly failedEntries: number;
|
|
644
|
+
}> {}
|
|
645
|
+
/**
|
|
646
|
+
* Union of all build-related errors.
|
|
647
|
+
*
|
|
648
|
+
* @public
|
|
649
|
+
*/
|
|
650
|
+
type BuildError = BundleFailed | WriteError | CleanError | BuildFailed;
|
|
651
|
+
/**
|
|
652
|
+
* Base class for PersistLocalError error.
|
|
653
|
+
*
|
|
654
|
+
* @privateRemarks
|
|
655
|
+
* This export is required for api-extractor documentation generation.
|
|
656
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
657
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
658
|
+
*
|
|
659
|
+
* @internal
|
|
660
|
+
*/
|
|
661
|
+
declare const PersistLocalErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
662
|
+
readonly _tag: "PersistLocalError";
|
|
663
|
+
} & Readonly<A>;
|
|
664
|
+
/**
|
|
665
|
+
* Error when persisting build output to local action directory fails.
|
|
666
|
+
*
|
|
667
|
+
* @public
|
|
668
|
+
*/
|
|
669
|
+
declare class PersistLocalError extends PersistLocalErrorBase<{
|
|
670
|
+
/**
|
|
671
|
+
* The path involved in the failure.
|
|
672
|
+
*/
|
|
673
|
+
readonly path: string;
|
|
674
|
+
/**
|
|
675
|
+
* The underlying error or error message.
|
|
676
|
+
*/
|
|
677
|
+
readonly cause: unknown;
|
|
678
|
+
}> {}
|
|
679
|
+
/**
|
|
680
|
+
* Base class for ActionYmlPathError error.
|
|
681
|
+
*
|
|
682
|
+
* @privateRemarks
|
|
683
|
+
* This export is required for api-extractor documentation generation.
|
|
684
|
+
* Effect's Data.TaggedError creates an anonymous base class that must be
|
|
685
|
+
* explicitly exported to avoid "forgotten export" warnings. Do not delete.
|
|
686
|
+
*
|
|
687
|
+
* @internal
|
|
688
|
+
*/
|
|
689
|
+
declare const ActionYmlPathErrorBase: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
|
|
690
|
+
readonly _tag: "ActionYmlPathError";
|
|
691
|
+
} & Readonly<A>;
|
|
692
|
+
/**
|
|
693
|
+
* Error when action.yml runs paths don't resolve correctly in destination.
|
|
694
|
+
*
|
|
695
|
+
* @public
|
|
696
|
+
*/
|
|
697
|
+
declare class ActionYmlPathError extends ActionYmlPathErrorBase<{
|
|
698
|
+
/**
|
|
699
|
+
* The entry type whose path failed validation (main, pre, post).
|
|
700
|
+
*/
|
|
701
|
+
readonly entryType: string;
|
|
702
|
+
/**
|
|
703
|
+
* The path specified in action.yml.
|
|
704
|
+
*/
|
|
705
|
+
readonly specifiedPath: string;
|
|
706
|
+
/**
|
|
707
|
+
* The expected resolved path.
|
|
708
|
+
*/
|
|
709
|
+
readonly expectedPath: string;
|
|
710
|
+
}> {}
|
|
711
|
+
/**
|
|
712
|
+
* Union of all persist-local-related errors.
|
|
713
|
+
*
|
|
714
|
+
* @public
|
|
715
|
+
*/
|
|
716
|
+
type PersistError = PersistLocalError | ActionYmlPathError;
|
|
717
|
+
/**
|
|
718
|
+
* Union of all possible errors in the GitHub Action Builder.
|
|
719
|
+
*
|
|
720
|
+
* @public
|
|
721
|
+
*/
|
|
722
|
+
type AppError = ConfigError | ValidationError | BuildError | PersistError;
|
|
723
|
+
//#endregion
|
|
724
|
+
//#region src/services/config.d.ts
|
|
725
|
+
/**
|
|
726
|
+
* Options for loading configuration.
|
|
727
|
+
* @internal
|
|
728
|
+
*/
|
|
729
|
+
declare const LoadConfigOptionsSchema: Schema.Struct<{
|
|
730
|
+
/** Working directory to search for config. Accepts string, Buffer, or URL. */cwd: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>>, Schema.instanceOf<URL>]>, typeof Schema.String>>; /** Explicit path to config file. Accepts string, Buffer, or URL. */
|
|
731
|
+
configPath: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>>, Schema.instanceOf<URL>]>, typeof Schema.String>>;
|
|
732
|
+
}>;
|
|
733
|
+
/**
|
|
734
|
+
* Options for loading configuration.
|
|
735
|
+
* @public
|
|
736
|
+
*/
|
|
737
|
+
type LoadConfigOptions = typeof LoadConfigOptionsSchema.Type;
|
|
738
|
+
/**
|
|
739
|
+
* Detected entry point information.
|
|
740
|
+
* @internal
|
|
741
|
+
*/
|
|
742
|
+
declare const DetectedEntrySchema: Schema.Struct<{
|
|
743
|
+
/** Entry type (main, pre, or post). */type: Schema.Literal<["main", "pre", "post"]>; /** Absolute path to the entry file. */
|
|
744
|
+
path: typeof Schema.String; /** Output path for the bundled file. */
|
|
745
|
+
output: typeof Schema.String;
|
|
746
|
+
}>;
|
|
747
|
+
/**
|
|
748
|
+
* Detected entry point information.
|
|
749
|
+
* @public
|
|
750
|
+
*/
|
|
751
|
+
type DetectedEntry = typeof DetectedEntrySchema.Type;
|
|
752
|
+
/**
|
|
753
|
+
* Result of entry detection.
|
|
754
|
+
* @internal
|
|
755
|
+
*/
|
|
756
|
+
declare const DetectEntriesResultSchema: Schema.Struct<{
|
|
757
|
+
/** Whether detection was successful. */success: typeof Schema.Boolean; /** Detected entries. */
|
|
758
|
+
entries: Schema.Array$<Schema.Struct<{
|
|
759
|
+
/** Entry type (main, pre, or post). */type: Schema.Literal<["main", "pre", "post"]>; /** Absolute path to the entry file. */
|
|
760
|
+
path: typeof Schema.String; /** Output path for the bundled file. */
|
|
761
|
+
output: typeof Schema.String;
|
|
762
|
+
}>>;
|
|
763
|
+
}>;
|
|
764
|
+
/**
|
|
765
|
+
* Result of entry detection.
|
|
766
|
+
* @public
|
|
767
|
+
*/
|
|
768
|
+
type DetectEntriesResult = typeof DetectEntriesResultSchema.Type;
|
|
769
|
+
/**
|
|
770
|
+
* Result of configuration loading.
|
|
771
|
+
* @public
|
|
772
|
+
*/
|
|
773
|
+
interface LoadConfigResult {
|
|
774
|
+
/** The resolved configuration. */
|
|
775
|
+
config: Config;
|
|
776
|
+
/** Path to the config file that was loaded, if any. */
|
|
777
|
+
configPath?: string;
|
|
778
|
+
/** Whether defaults were used (no config file found). */
|
|
779
|
+
usingDefaults: boolean;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* ConfigService interface for configuration management capabilities.
|
|
783
|
+
*
|
|
784
|
+
* @remarks
|
|
785
|
+
* This service handles:
|
|
786
|
+
* - Loading configuration from `action.config.ts` files
|
|
787
|
+
* - Resolving partial configuration with defaults
|
|
788
|
+
* - Detecting entry points in the project
|
|
789
|
+
*
|
|
790
|
+
* @example Using ConfigService with Effect
|
|
791
|
+
* ```typescript
|
|
792
|
+
* import { Effect } from "effect";
|
|
793
|
+
* import { AppLayer, ConfigService } from "@savvy-web/github-action-builder";
|
|
794
|
+
*
|
|
795
|
+
* const program = Effect.gen(function* () {
|
|
796
|
+
* const configService = yield* ConfigService;
|
|
797
|
+
* const result = yield* configService.load({ cwd: process.cwd() });
|
|
798
|
+
* console.log("Loaded config:", result.config);
|
|
799
|
+
* });
|
|
800
|
+
*
|
|
801
|
+
* Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
|
|
802
|
+
* ```
|
|
803
|
+
*
|
|
804
|
+
* @public
|
|
805
|
+
*/
|
|
806
|
+
interface ConfigService {
|
|
807
|
+
/**
|
|
808
|
+
* Load configuration from file or use defaults.
|
|
809
|
+
*
|
|
810
|
+
* @param options - Loading options
|
|
811
|
+
* @returns Effect that resolves to the loaded configuration
|
|
812
|
+
*/
|
|
813
|
+
readonly load: (options?: LoadConfigOptions) => Effect.Effect<LoadConfigResult, ConfigError>;
|
|
814
|
+
/**
|
|
815
|
+
* Resolve partial configuration input to full configuration.
|
|
816
|
+
*
|
|
817
|
+
* @param input - Partial configuration input
|
|
818
|
+
* @returns Effect that resolves to full configuration
|
|
819
|
+
*/
|
|
820
|
+
readonly resolve: (input?: Partial<ConfigInput>) => Effect.Effect<Config, ConfigError>;
|
|
821
|
+
/**
|
|
822
|
+
* Detect entry points in the project.
|
|
823
|
+
*
|
|
824
|
+
* @param cwd - Working directory to search
|
|
825
|
+
* @param entries - Optional explicit entry configuration
|
|
826
|
+
* @returns Effect that resolves to detected entries
|
|
827
|
+
*/
|
|
828
|
+
readonly detectEntries: (cwd: string, entries?: {
|
|
829
|
+
main?: string;
|
|
830
|
+
pre?: string;
|
|
831
|
+
post?: string;
|
|
832
|
+
}) => Effect.Effect<DetectEntriesResult, MainEntryMissing>;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* ConfigService tag for dependency injection.
|
|
836
|
+
*
|
|
837
|
+
* @public
|
|
838
|
+
*/
|
|
839
|
+
declare const ConfigService: Context.Tag<ConfigService, ConfigService>;
|
|
840
|
+
//#endregion
|
|
841
|
+
//#region src/services/build.d.ts
|
|
842
|
+
/**
|
|
843
|
+
* Options for the build process.
|
|
844
|
+
* @internal
|
|
845
|
+
*/
|
|
846
|
+
declare const BuildRunnerOptionsSchema: Schema.Struct<{
|
|
847
|
+
/** Working directory for the build. Accepts string, Buffer, or URL. */cwd: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>>, Schema.instanceOf<URL>]>, typeof Schema.String>>; /** Clean output directory before building. Defaults to true. */
|
|
848
|
+
clean: Schema.optional<typeof Schema.Boolean>;
|
|
849
|
+
}>;
|
|
850
|
+
/**
|
|
851
|
+
* Options for the build process.
|
|
852
|
+
* @public
|
|
853
|
+
*/
|
|
854
|
+
type BuildRunnerOptions = typeof BuildRunnerOptionsSchema.Type;
|
|
855
|
+
/**
|
|
856
|
+
* Statistics for a single bundled entry.
|
|
857
|
+
* @internal
|
|
858
|
+
*/
|
|
859
|
+
declare const BundleStatsSchema: Schema.Struct<{
|
|
860
|
+
/** Entry type (main, pre, or post). */entry: typeof Schema.String; /** Bundle size in bytes. */
|
|
861
|
+
size: typeof Schema.Number; /** Build duration in milliseconds. */
|
|
862
|
+
duration: typeof Schema.Number; /** Output path relative to working directory. */
|
|
863
|
+
outputPath: typeof Schema.String;
|
|
864
|
+
}>;
|
|
865
|
+
/**
|
|
866
|
+
* Statistics for a single bundled entry.
|
|
867
|
+
* @public
|
|
868
|
+
*/
|
|
869
|
+
type BundleStats = typeof BundleStatsSchema.Type;
|
|
870
|
+
/**
|
|
871
|
+
* Result of bundling a single entry.
|
|
872
|
+
* @internal
|
|
873
|
+
*/
|
|
874
|
+
declare const BundleResultSchema: Schema.Struct<{
|
|
875
|
+
/** Whether bundling succeeded. */success: typeof Schema.Boolean; /** Bundle statistics if successful. */
|
|
876
|
+
stats: Schema.optional<Schema.Struct<{
|
|
877
|
+
/** Entry type (main, pre, or post). */entry: typeof Schema.String; /** Bundle size in bytes. */
|
|
878
|
+
size: typeof Schema.Number; /** Build duration in milliseconds. */
|
|
879
|
+
duration: typeof Schema.Number; /** Output path relative to working directory. */
|
|
880
|
+
outputPath: typeof Schema.String;
|
|
881
|
+
}>>; /** Error message if failed. */
|
|
882
|
+
error: Schema.optional<typeof Schema.String>;
|
|
883
|
+
}>;
|
|
884
|
+
/**
|
|
885
|
+
* Result of bundling a single entry.
|
|
886
|
+
* @public
|
|
887
|
+
*/
|
|
888
|
+
type BundleResult = typeof BundleResultSchema.Type;
|
|
889
|
+
/**
|
|
890
|
+
* Result of the complete build process.
|
|
891
|
+
* @internal
|
|
892
|
+
*/
|
|
893
|
+
declare const BuildResultSchema: Schema.Struct<{
|
|
894
|
+
/** Whether the overall build succeeded. */success: typeof Schema.Boolean; /** Results for each entry that was built. */
|
|
895
|
+
entries: Schema.Array$<Schema.Struct<{
|
|
896
|
+
/** Whether bundling succeeded. */success: typeof Schema.Boolean; /** Bundle statistics if successful. */
|
|
897
|
+
stats: Schema.optional<Schema.Struct<{
|
|
898
|
+
/** Entry type (main, pre, or post). */entry: typeof Schema.String; /** Bundle size in bytes. */
|
|
899
|
+
size: typeof Schema.Number; /** Build duration in milliseconds. */
|
|
900
|
+
duration: typeof Schema.Number; /** Output path relative to working directory. */
|
|
901
|
+
outputPath: typeof Schema.String;
|
|
902
|
+
}>>; /** Error message if failed. */
|
|
903
|
+
error: Schema.optional<typeof Schema.String>;
|
|
904
|
+
}>>; /** Total build duration in milliseconds. */
|
|
905
|
+
duration: typeof Schema.Number; /** Error message if build failed. */
|
|
906
|
+
error: Schema.optional<typeof Schema.String>;
|
|
907
|
+
}>;
|
|
908
|
+
/**
|
|
909
|
+
* Result of the complete build process.
|
|
910
|
+
* @public
|
|
911
|
+
*/
|
|
912
|
+
type BuildResult = typeof BuildResultSchema.Type;
|
|
913
|
+
/**
|
|
914
|
+
* BuildService interface for build and bundling capabilities.
|
|
915
|
+
*
|
|
916
|
+
* @remarks
|
|
917
|
+
* This service handles:
|
|
918
|
+
* - Bundling TypeScript entries with rsbuild
|
|
919
|
+
* - Managing output directory
|
|
920
|
+
* - Collecting build statistics
|
|
921
|
+
* - Formatting build results
|
|
922
|
+
*
|
|
923
|
+
* @example Using BuildService with Effect
|
|
924
|
+
* ```typescript
|
|
925
|
+
* import { Effect } from "effect";
|
|
926
|
+
* import { AppLayer, BuildService, ConfigService } from "@savvy-web/github-action-builder";
|
|
927
|
+
*
|
|
928
|
+
* const program = Effect.gen(function* () {
|
|
929
|
+
* const configService = yield* ConfigService;
|
|
930
|
+
* const buildService = yield* BuildService;
|
|
931
|
+
*
|
|
932
|
+
* const { config } = yield* configService.load();
|
|
933
|
+
* const result = yield* buildService.build(config);
|
|
934
|
+
*
|
|
935
|
+
* if (result.success) {
|
|
936
|
+
* console.log("Build complete:", result.entries.length, "entries");
|
|
937
|
+
* }
|
|
938
|
+
* });
|
|
939
|
+
*
|
|
940
|
+
* Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
|
|
941
|
+
* ```
|
|
942
|
+
*
|
|
943
|
+
* @public
|
|
944
|
+
*/
|
|
945
|
+
interface BuildService {
|
|
946
|
+
/**
|
|
947
|
+
* Build all entries from the configuration.
|
|
948
|
+
*
|
|
949
|
+
* @param config - Configuration with entry points
|
|
950
|
+
* @param options - Build options
|
|
951
|
+
* @returns Effect that resolves to build result
|
|
952
|
+
*/
|
|
953
|
+
readonly build: (config: Config, options?: BuildRunnerOptions) => Effect.Effect<BuildResult, BuildError | MainEntryMissing>;
|
|
954
|
+
/**
|
|
955
|
+
* Bundle a single entry point.
|
|
956
|
+
*
|
|
957
|
+
* @param entry - Entry to bundle
|
|
958
|
+
* @param config - Build configuration
|
|
959
|
+
* @returns Effect that resolves to bundle result
|
|
960
|
+
*/
|
|
961
|
+
readonly bundle: (entry: DetectedEntry, config: Config) => Effect.Effect<BundleResult, BuildError>;
|
|
962
|
+
/**
|
|
963
|
+
* Clean the output directory.
|
|
964
|
+
*
|
|
965
|
+
* @param outputDir - Directory to clean
|
|
966
|
+
* @returns Effect that resolves when complete
|
|
967
|
+
*/
|
|
968
|
+
readonly clean: (outputDir: string) => Effect.Effect<void, BuildError>;
|
|
969
|
+
/**
|
|
970
|
+
* Format build result for display.
|
|
971
|
+
*
|
|
972
|
+
* @param result - Build result to format
|
|
973
|
+
* @returns Formatted string for terminal output
|
|
974
|
+
*/
|
|
975
|
+
readonly formatResult: (result: BuildResult) => string;
|
|
976
|
+
/**
|
|
977
|
+
* Format bytes as human-readable string.
|
|
978
|
+
*
|
|
979
|
+
* @param bytes - Number of bytes
|
|
980
|
+
* @returns Formatted string like "1.5 MB"
|
|
981
|
+
*/
|
|
982
|
+
readonly formatBytes: (bytes: number) => string;
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* BuildService tag for dependency injection.
|
|
986
|
+
*
|
|
987
|
+
* @public
|
|
988
|
+
*/
|
|
989
|
+
declare const BuildService: Context.Tag<BuildService, BuildService>;
|
|
990
|
+
//#endregion
|
|
991
|
+
//#region src/services/persist-local.d.ts
|
|
992
|
+
/**
|
|
993
|
+
* Options for the persist operation.
|
|
994
|
+
* @internal
|
|
995
|
+
*/
|
|
996
|
+
declare const PersistLocalRunnerOptionsSchema: Schema.Struct<{
|
|
997
|
+
/** Working directory. Accepts string. */cwd: Schema.optional<typeof Schema.String>;
|
|
998
|
+
}>;
|
|
999
|
+
/**
|
|
1000
|
+
* Options for the persist operation.
|
|
1001
|
+
* @public
|
|
1002
|
+
*/
|
|
1003
|
+
type PersistLocalRunnerOptions = typeof PersistLocalRunnerOptionsSchema.Type;
|
|
1004
|
+
/**
|
|
1005
|
+
* Result of the persist-local operation.
|
|
1006
|
+
* @internal
|
|
1007
|
+
*/
|
|
1008
|
+
declare const PersistLocalResultSchema: Schema.Struct<{
|
|
1009
|
+
/** Whether the operation completed successfully. */success: typeof Schema.Boolean; /** Number of files copied (changed or new). */
|
|
1010
|
+
filesCopied: typeof Schema.Number; /** Number of files skipped (unchanged). */
|
|
1011
|
+
filesSkipped: typeof Schema.Number; /** Whether act template files were generated. */
|
|
1012
|
+
actTemplateGenerated: typeof Schema.Boolean; /** Output path where files were persisted. */
|
|
1013
|
+
outputPath: typeof Schema.String; /** Error message if failed. */
|
|
1014
|
+
error: Schema.optional<typeof Schema.String>;
|
|
1015
|
+
}>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Result of the persist-local operation.
|
|
1018
|
+
* @public
|
|
1019
|
+
*/
|
|
1020
|
+
type PersistLocalResult = typeof PersistLocalResultSchema.Type;
|
|
1021
|
+
/**
|
|
1022
|
+
* PersistLocalService interface for copying build output locally.
|
|
1023
|
+
*
|
|
1024
|
+
* @remarks
|
|
1025
|
+
* This service handles:
|
|
1026
|
+
* - Smart-syncing action.yml and dist/ to a local action directory
|
|
1027
|
+
* - Hash-based comparison to avoid unnecessary copies
|
|
1028
|
+
* - Removing stale files in the destination
|
|
1029
|
+
* - Validating action.yml runs paths resolve in the destination
|
|
1030
|
+
* - Generating act boilerplate files
|
|
1031
|
+
*
|
|
1032
|
+
* @public
|
|
1033
|
+
*/
|
|
1034
|
+
interface PersistLocalService {
|
|
1035
|
+
/**
|
|
1036
|
+
* Persist build output to the local action directory.
|
|
1037
|
+
*
|
|
1038
|
+
* @param config - Configuration with persistLocal options
|
|
1039
|
+
* @param options - Runner options (cwd, etc.)
|
|
1040
|
+
* @returns Effect that resolves to persist result
|
|
1041
|
+
*/
|
|
1042
|
+
readonly persist: (config: Config, options?: PersistLocalRunnerOptions) => Effect.Effect<PersistLocalResult, PersistLocalError | ActionYmlPathError>;
|
|
1043
|
+
/**
|
|
1044
|
+
* Format persist result for display.
|
|
1045
|
+
*
|
|
1046
|
+
* @param result - Persist result to format
|
|
1047
|
+
* @returns Formatted string for terminal output
|
|
1048
|
+
*/
|
|
1049
|
+
readonly formatResult: (result: PersistLocalResult) => string;
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* PersistLocalService tag for dependency injection.
|
|
1053
|
+
*
|
|
1054
|
+
* @public
|
|
1055
|
+
*/
|
|
1056
|
+
declare const PersistLocalService: Context.Tag<PersistLocalService, PersistLocalService>;
|
|
1057
|
+
//#endregion
|
|
1058
|
+
//#region src/services/validation.d.ts
|
|
1059
|
+
/**
|
|
1060
|
+
* Options for validation.
|
|
1061
|
+
* @internal
|
|
1062
|
+
*/
|
|
1063
|
+
declare const ValidateOptionsSchema: Schema.Struct<{
|
|
1064
|
+
/** Working directory for file operations. Accepts string, Buffer, or URL. */cwd: Schema.optional<Schema.transform<Schema.Union<[typeof Schema.String, Schema.instanceOf<Buffer<ArrayBufferLike>>, Schema.instanceOf<URL>]>, typeof Schema.String>>; /** Force strict mode regardless of environment. Auto-detects from CI when undefined. */
|
|
1065
|
+
strict: Schema.optional<typeof Schema.Boolean>;
|
|
1066
|
+
}>;
|
|
1067
|
+
/**
|
|
1068
|
+
* Options for validation.
|
|
1069
|
+
* @public
|
|
1070
|
+
*/
|
|
1071
|
+
type ValidateOptions = typeof ValidateOptionsSchema.Type;
|
|
1072
|
+
/**
|
|
1073
|
+
* A validation error item.
|
|
1074
|
+
* @internal
|
|
1075
|
+
*/
|
|
1076
|
+
declare const ValidationErrorSchema: Schema.Struct<{
|
|
1077
|
+
/** Error code for categorization. */code: typeof Schema.String; /** Human-readable error message. */
|
|
1078
|
+
message: typeof Schema.String; /** File path where error occurred. */
|
|
1079
|
+
file: Schema.optional<typeof Schema.String>; /** Suggestion for fixing the error. */
|
|
1080
|
+
suggestion: Schema.optional<typeof Schema.String>;
|
|
1081
|
+
}>;
|
|
1082
|
+
/**
|
|
1083
|
+
* A validation error item.
|
|
1084
|
+
* @public
|
|
1085
|
+
*/
|
|
1086
|
+
type ValidationErrorItem = typeof ValidationErrorSchema.Type;
|
|
1087
|
+
/**
|
|
1088
|
+
* A validation warning.
|
|
1089
|
+
* @internal
|
|
1090
|
+
*/
|
|
1091
|
+
declare const ValidationWarningSchema: Schema.Struct<{
|
|
1092
|
+
/** Warning code for categorization. */code: typeof Schema.String; /** Human-readable warning message. */
|
|
1093
|
+
message: typeof Schema.String; /** File path where warning occurred. */
|
|
1094
|
+
file: Schema.optional<typeof Schema.String>; /** Suggestion for addressing the warning. */
|
|
1095
|
+
suggestion: Schema.optional<typeof Schema.String>;
|
|
1096
|
+
}>;
|
|
1097
|
+
/**
|
|
1098
|
+
* A validation warning.
|
|
1099
|
+
* @public
|
|
1100
|
+
*/
|
|
1101
|
+
type ValidationWarning = typeof ValidationWarningSchema.Type;
|
|
1102
|
+
/**
|
|
1103
|
+
* Validation result with errors and warnings.
|
|
1104
|
+
* @internal
|
|
1105
|
+
*/
|
|
1106
|
+
declare const ValidationResultSchema: Schema.Struct<{
|
|
1107
|
+
/** Whether validation passed (no errors, or only warnings in non-strict mode). */valid: typeof Schema.Boolean; /** Validation errors. */
|
|
1108
|
+
errors: Schema.Array$<Schema.Struct<{
|
|
1109
|
+
/** Error code for categorization. */code: typeof Schema.String; /** Human-readable error message. */
|
|
1110
|
+
message: typeof Schema.String; /** File path where error occurred. */
|
|
1111
|
+
file: Schema.optional<typeof Schema.String>; /** Suggestion for fixing the error. */
|
|
1112
|
+
suggestion: Schema.optional<typeof Schema.String>;
|
|
1113
|
+
}>>; /** Validation warnings. */
|
|
1114
|
+
warnings: Schema.Array$<Schema.Struct<{
|
|
1115
|
+
/** Warning code for categorization. */code: typeof Schema.String; /** Human-readable warning message. */
|
|
1116
|
+
message: typeof Schema.String; /** File path where warning occurred. */
|
|
1117
|
+
file: Schema.optional<typeof Schema.String>; /** Suggestion for addressing the warning. */
|
|
1118
|
+
suggestion: Schema.optional<typeof Schema.String>;
|
|
1119
|
+
}>>;
|
|
1120
|
+
}>;
|
|
1121
|
+
/**
|
|
1122
|
+
* Validation result with errors and warnings.
|
|
1123
|
+
* @public
|
|
1124
|
+
*/
|
|
1125
|
+
type ValidationResult = typeof ValidationResultSchema.Type;
|
|
1126
|
+
/**
|
|
1127
|
+
* Result of action.yml validation.
|
|
1128
|
+
* @internal
|
|
1129
|
+
*/
|
|
1130
|
+
declare const ActionYmlResultSchema: Schema.Struct<{
|
|
1131
|
+
/** Whether the action.yml is valid. */valid: typeof Schema.Boolean; /** Parsed action.yml content if valid. */
|
|
1132
|
+
content: Schema.optional<typeof Schema.Any>; /** Validation errors. */
|
|
1133
|
+
errors: Schema.Array$<Schema.Struct<{
|
|
1134
|
+
/** Error code for categorization. */code: typeof Schema.String; /** Human-readable error message. */
|
|
1135
|
+
message: typeof Schema.String; /** File path where error occurred. */
|
|
1136
|
+
file: Schema.optional<typeof Schema.String>; /** Suggestion for fixing the error. */
|
|
1137
|
+
suggestion: Schema.optional<typeof Schema.String>;
|
|
1138
|
+
}>>; /** Validation warnings. */
|
|
1139
|
+
warnings: Schema.Array$<Schema.Struct<{
|
|
1140
|
+
/** Warning code for categorization. */code: typeof Schema.String; /** Human-readable warning message. */
|
|
1141
|
+
message: typeof Schema.String; /** File path where warning occurred. */
|
|
1142
|
+
file: Schema.optional<typeof Schema.String>; /** Suggestion for addressing the warning. */
|
|
1143
|
+
suggestion: Schema.optional<typeof Schema.String>;
|
|
1144
|
+
}>>;
|
|
1145
|
+
}>;
|
|
1146
|
+
/**
|
|
1147
|
+
* Result of action.yml validation.
|
|
1148
|
+
* @public
|
|
1149
|
+
*/
|
|
1150
|
+
type ActionYmlResult = typeof ActionYmlResultSchema.Type;
|
|
1151
|
+
/**
|
|
1152
|
+
* ValidationService interface for validation capabilities.
|
|
1153
|
+
*
|
|
1154
|
+
* @remarks
|
|
1155
|
+
* This service handles:
|
|
1156
|
+
* - Validating configuration and entry points
|
|
1157
|
+
* - Validating action.yml structure and schema
|
|
1158
|
+
* - Formatting validation results for display
|
|
1159
|
+
* - CI-aware strict mode handling
|
|
1160
|
+
*
|
|
1161
|
+
* @example Using ValidationService with Effect
|
|
1162
|
+
* ```typescript
|
|
1163
|
+
* import { Effect } from "effect";
|
|
1164
|
+
* import { AppLayer, ConfigService, ValidationService } from "@savvy-web/github-action-builder";
|
|
1165
|
+
*
|
|
1166
|
+
* const program = Effect.gen(function* () {
|
|
1167
|
+
* const configService = yield* ConfigService;
|
|
1168
|
+
* const validationService = yield* ValidationService;
|
|
1169
|
+
*
|
|
1170
|
+
* const { config } = yield* configService.load();
|
|
1171
|
+
* const result = yield* validationService.validate(config);
|
|
1172
|
+
*
|
|
1173
|
+
* if (!result.valid) {
|
|
1174
|
+
* console.error("Validation failed:", result.errors);
|
|
1175
|
+
* }
|
|
1176
|
+
* });
|
|
1177
|
+
*
|
|
1178
|
+
* Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
|
|
1179
|
+
* ```
|
|
1180
|
+
*
|
|
1181
|
+
* @public
|
|
1182
|
+
*/
|
|
1183
|
+
interface ValidationService {
|
|
1184
|
+
/**
|
|
1185
|
+
* Validate configuration and project structure.
|
|
1186
|
+
*
|
|
1187
|
+
* @param config - Configuration to validate
|
|
1188
|
+
* @param options - Validation options
|
|
1189
|
+
* @returns Effect that resolves to validation result
|
|
1190
|
+
*/
|
|
1191
|
+
readonly validate: (config: Config, options?: ValidateOptions) => Effect.Effect<ValidationResult, ValidationError>;
|
|
1192
|
+
/**
|
|
1193
|
+
* Validate action.yml file.
|
|
1194
|
+
*
|
|
1195
|
+
* @param path - Path to action.yml file
|
|
1196
|
+
* @returns Effect that resolves to action.yml validation result
|
|
1197
|
+
*/
|
|
1198
|
+
readonly validateActionYml: (path: string) => Effect.Effect<ActionYmlResult, ValidationError>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Format validation result for display.
|
|
1201
|
+
*
|
|
1202
|
+
* @param result - Validation result to format
|
|
1203
|
+
* @returns Formatted string for terminal output
|
|
1204
|
+
*/
|
|
1205
|
+
readonly formatResult: (result: ValidationResult) => string;
|
|
1206
|
+
/**
|
|
1207
|
+
* Check if running in CI environment.
|
|
1208
|
+
*
|
|
1209
|
+
* @returns Effect that resolves to true if in CI
|
|
1210
|
+
*/
|
|
1211
|
+
readonly isCI: () => Effect.Effect<boolean>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Check if strict mode is enabled.
|
|
1214
|
+
*
|
|
1215
|
+
* @param configStrict - Optional config override
|
|
1216
|
+
* @returns Effect that resolves to true if strict mode
|
|
1217
|
+
*/
|
|
1218
|
+
readonly isStrict: (configStrict?: boolean) => Effect.Effect<boolean>;
|
|
1219
|
+
}
|
|
1220
|
+
/**
|
|
1221
|
+
* ValidationService tag for dependency injection.
|
|
1222
|
+
*
|
|
1223
|
+
* @public
|
|
1224
|
+
*/
|
|
1225
|
+
declare const ValidationService: Context.Tag<ValidationService, ValidationService>;
|
|
1226
|
+
//#endregion
|
|
1227
|
+
//#region src/github-action.d.ts
|
|
1228
|
+
/**
|
|
1229
|
+
* Options for creating a GitHubAction builder instance.
|
|
1230
|
+
*
|
|
1231
|
+
* @remarks
|
|
1232
|
+
* All options are optional. When no options are provided, the builder
|
|
1233
|
+
* auto-detects configuration from `action.config.ts` in the current directory.
|
|
1234
|
+
*
|
|
1235
|
+
* @public
|
|
1236
|
+
*/
|
|
1237
|
+
interface GitHubActionOptions {
|
|
1238
|
+
/**
|
|
1239
|
+
* Configuration object or path to config file.
|
|
1240
|
+
*
|
|
1241
|
+
* @remarks
|
|
1242
|
+
* - If a string is provided, it's treated as a path to a config file
|
|
1243
|
+
* - If an object is provided, it's used directly as configuration
|
|
1244
|
+
* - If not provided, auto-detects `action.config.ts` or uses defaults
|
|
1245
|
+
*/
|
|
1246
|
+
config?: Partial<ConfigInput> | string;
|
|
1247
|
+
/**
|
|
1248
|
+
* Working directory for the build.
|
|
1249
|
+
*
|
|
1250
|
+
* @defaultValue `process.cwd()`
|
|
1251
|
+
*/
|
|
1252
|
+
cwd?: string;
|
|
1253
|
+
/**
|
|
1254
|
+
* Skip validation before building.
|
|
1255
|
+
*
|
|
1256
|
+
* @remarks
|
|
1257
|
+
* Skipping validation is not recommended for production builds.
|
|
1258
|
+
*
|
|
1259
|
+
* @defaultValue `false`
|
|
1260
|
+
*/
|
|
1261
|
+
skipValidation?: boolean;
|
|
1262
|
+
/**
|
|
1263
|
+
* Clean output directory before building.
|
|
1264
|
+
*
|
|
1265
|
+
* @defaultValue `true`
|
|
1266
|
+
*/
|
|
1267
|
+
clean?: boolean;
|
|
1268
|
+
/**
|
|
1269
|
+
* Custom Effect Layer to use instead of the default AppLayer.
|
|
1270
|
+
*
|
|
1271
|
+
* @remarks
|
|
1272
|
+
* Advanced option for testing or customizing service implementations.
|
|
1273
|
+
*/
|
|
1274
|
+
layer?: Layer.Layer<ConfigService | ValidationService | BuildService | PersistLocalService>;
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Result of a GitHubAction build operation.
|
|
1278
|
+
*
|
|
1279
|
+
* @remarks
|
|
1280
|
+
* The result contains detailed information about both validation and build steps.
|
|
1281
|
+
* Check the `success` property first, then examine `error`, `validation`, or `build`
|
|
1282
|
+
* for details.
|
|
1283
|
+
*
|
|
1284
|
+
* @internal
|
|
1285
|
+
*/
|
|
1286
|
+
declare const GitHubActionBuildResultSchema: Schema.Struct<{
|
|
1287
|
+
/** Whether the build completed successfully. */success: typeof Schema.Boolean; /** Build result details if the build step ran. */
|
|
1288
|
+
build: Schema.optional<Schema.Struct<{
|
|
1289
|
+
success: typeof Schema.Boolean;
|
|
1290
|
+
entries: Schema.Array$<Schema.Struct<{
|
|
1291
|
+
success: typeof Schema.Boolean;
|
|
1292
|
+
stats: Schema.optional<Schema.Struct<{
|
|
1293
|
+
entry: typeof Schema.String;
|
|
1294
|
+
size: typeof Schema.Number;
|
|
1295
|
+
duration: typeof Schema.Number;
|
|
1296
|
+
outputPath: typeof Schema.String;
|
|
1297
|
+
}>>;
|
|
1298
|
+
error: Schema.optional<typeof Schema.String>;
|
|
1299
|
+
}>>;
|
|
1300
|
+
duration: typeof Schema.Number;
|
|
1301
|
+
error: Schema.optional<typeof Schema.String>;
|
|
1302
|
+
}>>; /** Validation result if validation was performed. */
|
|
1303
|
+
validation: Schema.optional<Schema.Struct<{
|
|
1304
|
+
valid: typeof Schema.Boolean;
|
|
1305
|
+
errors: Schema.Array$<Schema.Struct<{
|
|
1306
|
+
code: typeof Schema.String;
|
|
1307
|
+
message: typeof Schema.String;
|
|
1308
|
+
file: Schema.optional<typeof Schema.String>;
|
|
1309
|
+
suggestion: Schema.optional<typeof Schema.String>;
|
|
1310
|
+
}>>;
|
|
1311
|
+
warnings: Schema.Array$<Schema.Struct<{
|
|
1312
|
+
code: typeof Schema.String;
|
|
1313
|
+
message: typeof Schema.String;
|
|
1314
|
+
file: Schema.optional<typeof Schema.String>;
|
|
1315
|
+
suggestion: Schema.optional<typeof Schema.String>;
|
|
1316
|
+
}>>;
|
|
1317
|
+
}>>; /** Persist-local result if persist was performed. */
|
|
1318
|
+
persistLocal: Schema.optional<Schema.Struct<{
|
|
1319
|
+
success: typeof Schema.Boolean;
|
|
1320
|
+
filesCopied: typeof Schema.Number;
|
|
1321
|
+
filesSkipped: typeof Schema.Number;
|
|
1322
|
+
actTemplateGenerated: typeof Schema.Boolean;
|
|
1323
|
+
outputPath: typeof Schema.String;
|
|
1324
|
+
error: Schema.optional<typeof Schema.String>;
|
|
1325
|
+
}>>; /** Error message if the build or validation failed. */
|
|
1326
|
+
error: Schema.optional<typeof Schema.String>; /** Raw error object for programmatic inspection. */
|
|
1327
|
+
cause: Schema.optional<typeof Schema.Unknown>;
|
|
1328
|
+
}>;
|
|
1329
|
+
/**
|
|
1330
|
+
* Result of a GitHubAction build operation.
|
|
1331
|
+
* @public
|
|
1332
|
+
*/
|
|
1333
|
+
type GitHubActionBuildResult = typeof GitHubActionBuildResultSchema.Type;
|
|
1334
|
+
/**
|
|
1335
|
+
* Main API class for building GitHub Actions.
|
|
1336
|
+
*
|
|
1337
|
+
* @remarks
|
|
1338
|
+
* This class provides a Promise-based interface wrapping Effect services.
|
|
1339
|
+
* It handles configuration loading, validation, and bundling in a single workflow.
|
|
1340
|
+
*
|
|
1341
|
+
* For Effect consumers, use the services directly:
|
|
1342
|
+
* - {@link ConfigService} for configuration
|
|
1343
|
+
* - {@link ValidationService} for validation
|
|
1344
|
+
* - {@link BuildService} for building
|
|
1345
|
+
*
|
|
1346
|
+
* @example Complete build workflow
|
|
1347
|
+
* ```typescript
|
|
1348
|
+
* import { GitHubAction } from "@savvy-web/github-action-builder";
|
|
1349
|
+
*
|
|
1350
|
+
* async function buildAction(): Promise<void> {
|
|
1351
|
+
* const action = GitHubAction.create();
|
|
1352
|
+
* const result = await action.build();
|
|
1353
|
+
*
|
|
1354
|
+
* if (result.success) {
|
|
1355
|
+
* console.log(`Built ${result.build?.entries.length} entry points`);
|
|
1356
|
+
* } else {
|
|
1357
|
+
* console.error(`Build failed: ${result.error}`);
|
|
1358
|
+
* process.exit(1);
|
|
1359
|
+
* }
|
|
1360
|
+
* }
|
|
1361
|
+
*
|
|
1362
|
+
* buildAction();
|
|
1363
|
+
* ```
|
|
1364
|
+
*
|
|
1365
|
+
* @example With custom configuration
|
|
1366
|
+
* ```typescript
|
|
1367
|
+
* import { GitHubAction } from "@savvy-web/github-action-builder";
|
|
1368
|
+
*
|
|
1369
|
+
* async function main(): Promise<void> {
|
|
1370
|
+
* const action = GitHubAction.create({
|
|
1371
|
+
* config: {
|
|
1372
|
+
* entries: { main: "src/action.ts" },
|
|
1373
|
+
* build: { minify: true },
|
|
1374
|
+
* },
|
|
1375
|
+
* cwd: "/path/to/project",
|
|
1376
|
+
* });
|
|
1377
|
+
*
|
|
1378
|
+
* const result = await action.build();
|
|
1379
|
+
* console.log(result.success ? "Success" : result.error);
|
|
1380
|
+
* }
|
|
1381
|
+
*
|
|
1382
|
+
* main();
|
|
1383
|
+
* ```
|
|
1384
|
+
*
|
|
1385
|
+
* @public
|
|
1386
|
+
*/
|
|
1387
|
+
declare class GitHubAction {
|
|
1388
|
+
/**
|
|
1389
|
+
* Managed runtime for running Effects.
|
|
1390
|
+
* @internal
|
|
1391
|
+
*/
|
|
1392
|
+
private readonly runtime;
|
|
1393
|
+
/**
|
|
1394
|
+
* Cached configuration after first load.
|
|
1395
|
+
* @internal
|
|
1396
|
+
*/
|
|
1397
|
+
private config;
|
|
1398
|
+
/**
|
|
1399
|
+
* Resolved options.
|
|
1400
|
+
* @internal
|
|
1401
|
+
*/
|
|
1402
|
+
private readonly cwd;
|
|
1403
|
+
private readonly configSource;
|
|
1404
|
+
private readonly skipValidation;
|
|
1405
|
+
private readonly clean;
|
|
1406
|
+
private constructor();
|
|
1407
|
+
/**
|
|
1408
|
+
* Create a new GitHubAction builder instance.
|
|
1409
|
+
*
|
|
1410
|
+
* @param options - Builder options
|
|
1411
|
+
* @returns A new GitHubAction instance
|
|
1412
|
+
*
|
|
1413
|
+
* @example
|
|
1414
|
+
* ```typescript
|
|
1415
|
+
* import { GitHubAction } from "@savvy-web/github-action-builder";
|
|
1416
|
+
*
|
|
1417
|
+
* // Auto-detect configuration
|
|
1418
|
+
* const action = GitHubAction.create();
|
|
1419
|
+
*
|
|
1420
|
+
* // With inline config
|
|
1421
|
+
* const action2 = GitHubAction.create({
|
|
1422
|
+
* config: { build: { minify: false } },
|
|
1423
|
+
* });
|
|
1424
|
+
*
|
|
1425
|
+
* // With config file path
|
|
1426
|
+
* const action3 = GitHubAction.create({
|
|
1427
|
+
* config: "./custom.config.ts",
|
|
1428
|
+
* });
|
|
1429
|
+
* ```
|
|
1430
|
+
*/
|
|
1431
|
+
static create(options?: GitHubActionOptions): GitHubAction;
|
|
1432
|
+
/**
|
|
1433
|
+
* Load and resolve configuration.
|
|
1434
|
+
*
|
|
1435
|
+
* @remarks
|
|
1436
|
+
* Configuration is cached after the first load. Subsequent calls
|
|
1437
|
+
* return the cached configuration.
|
|
1438
|
+
*
|
|
1439
|
+
* @returns Resolved configuration with all defaults applied
|
|
1440
|
+
* @throws Error if configuration file cannot be loaded or is invalid
|
|
1441
|
+
*/
|
|
1442
|
+
loadConfig(): Promise<Config>;
|
|
1443
|
+
/**
|
|
1444
|
+
* Validate the action configuration and action.yml.
|
|
1445
|
+
*
|
|
1446
|
+
* @remarks
|
|
1447
|
+
* Validation checks:
|
|
1448
|
+
* - Entry point files exist
|
|
1449
|
+
* - Output directory is writable
|
|
1450
|
+
* - action.yml exists and is valid (if required)
|
|
1451
|
+
*
|
|
1452
|
+
* In CI environments, warnings are treated as errors by default.
|
|
1453
|
+
*
|
|
1454
|
+
* @param options - Validation options
|
|
1455
|
+
* @returns Validation result with errors and warnings
|
|
1456
|
+
*/
|
|
1457
|
+
validate(options?: ValidateOptions): Promise<ValidationResult>;
|
|
1458
|
+
/**
|
|
1459
|
+
* Build the GitHub Action.
|
|
1460
|
+
*
|
|
1461
|
+
* @remarks
|
|
1462
|
+
* The build process:
|
|
1463
|
+
* 1. Loads configuration (if not already loaded)
|
|
1464
|
+
* 2. Validates the project (unless `skipValidation` is set)
|
|
1465
|
+
* 3. Bundles each entry point with rsbuild
|
|
1466
|
+
* 4. Writes output to the `dist/` directory
|
|
1467
|
+
*
|
|
1468
|
+
* @returns Build result with success status and details
|
|
1469
|
+
*
|
|
1470
|
+
* @example
|
|
1471
|
+
* ```typescript
|
|
1472
|
+
* import { GitHubAction } from "@savvy-web/github-action-builder";
|
|
1473
|
+
*
|
|
1474
|
+
* async function main(): Promise<void> {
|
|
1475
|
+
* const action = GitHubAction.create();
|
|
1476
|
+
* const result = await action.build();
|
|
1477
|
+
*
|
|
1478
|
+
* if (result.success && result.build) {
|
|
1479
|
+
* console.log(`Built ${result.build.entries.length} entries`);
|
|
1480
|
+
* } else {
|
|
1481
|
+
* console.error(result.error);
|
|
1482
|
+
* }
|
|
1483
|
+
* }
|
|
1484
|
+
*
|
|
1485
|
+
* main();
|
|
1486
|
+
* ```
|
|
1487
|
+
*/
|
|
1488
|
+
build(): Promise<GitHubActionBuildResult>;
|
|
1489
|
+
/**
|
|
1490
|
+
* Dispose the runtime and release resources.
|
|
1491
|
+
*
|
|
1492
|
+
* @remarks
|
|
1493
|
+
* Call this when you're done using the GitHubAction instance
|
|
1494
|
+
* to clean up any resources held by the Effect runtime.
|
|
1495
|
+
*/
|
|
1496
|
+
dispose(): Promise<void>;
|
|
1497
|
+
}
|
|
1498
|
+
//#endregion
|
|
1499
|
+
//#region src/layers/app.d.ts
|
|
1500
|
+
/**
|
|
1501
|
+
* Layer providing ConfigService (no dependencies).
|
|
1502
|
+
*
|
|
1503
|
+
* @remarks
|
|
1504
|
+
* Use this layer when you only need configuration management.
|
|
1505
|
+
*
|
|
1506
|
+
* @public
|
|
1507
|
+
*/
|
|
1508
|
+
declare const ConfigLayer: Layer.Layer<ConfigService, never, never>;
|
|
1509
|
+
/**
|
|
1510
|
+
* Layer providing ValidationService (depends on ConfigService).
|
|
1511
|
+
*
|
|
1512
|
+
* @remarks
|
|
1513
|
+
* Includes ConfigService automatically.
|
|
1514
|
+
*
|
|
1515
|
+
* @public
|
|
1516
|
+
*/
|
|
1517
|
+
declare const ValidationLayer: Layer.Layer<ValidationService, never, never>;
|
|
1518
|
+
/**
|
|
1519
|
+
* Layer providing BuildService (depends on ConfigService).
|
|
1520
|
+
*
|
|
1521
|
+
* @remarks
|
|
1522
|
+
* Includes ConfigService automatically.
|
|
1523
|
+
*
|
|
1524
|
+
* @public
|
|
1525
|
+
*/
|
|
1526
|
+
declare const BuildLayer: Layer.Layer<BuildService, never, never>;
|
|
1527
|
+
/**
|
|
1528
|
+
* Layer providing PersistLocalService (no dependencies).
|
|
1529
|
+
*
|
|
1530
|
+
* @remarks
|
|
1531
|
+
* Use this layer when you only need persist-local functionality.
|
|
1532
|
+
*
|
|
1533
|
+
* @public
|
|
1534
|
+
*/
|
|
1535
|
+
declare const PersistLocalLayer: Layer.Layer<PersistLocalService, never, never>;
|
|
1536
|
+
/**
|
|
1537
|
+
* Combined layer providing all services.
|
|
1538
|
+
*
|
|
1539
|
+
* @remarks
|
|
1540
|
+
* This layer composes ConfigService, ValidationService, BuildService,
|
|
1541
|
+
* and PersistLocalService.
|
|
1542
|
+
* Use this when you need access to all services in your Effect program.
|
|
1543
|
+
*
|
|
1544
|
+
* @example Using AppLayer with Effect
|
|
1545
|
+
* ```typescript
|
|
1546
|
+
* import { Effect } from "effect";
|
|
1547
|
+
* import { AppLayer, BuildService, ConfigService } from "@savvy-web/github-action-builder";
|
|
1548
|
+
*
|
|
1549
|
+
* const program = Effect.gen(function* () {
|
|
1550
|
+
* const configService = yield* ConfigService;
|
|
1551
|
+
* const buildService = yield* BuildService;
|
|
1552
|
+
*
|
|
1553
|
+
* const { config } = yield* configService.load();
|
|
1554
|
+
* const result = yield* buildService.build(config);
|
|
1555
|
+
*
|
|
1556
|
+
* return result;
|
|
1557
|
+
* });
|
|
1558
|
+
*
|
|
1559
|
+
* Effect.runPromise(program.pipe(Effect.provide(AppLayer)));
|
|
1560
|
+
* ```
|
|
1561
|
+
*
|
|
1562
|
+
* @public
|
|
1563
|
+
*/
|
|
1564
|
+
declare const AppLayer: Layer.Layer<BuildService | ConfigService | ValidationService | PersistLocalService, never, never>;
|
|
1565
|
+
//#endregion
|
|
1566
|
+
export { ActionYmlMissing, ActionYmlMissingBase, ActionYmlPathError, ActionYmlPathErrorBase, type ActionYmlResult, ActionYmlResultSchema, ActionYmlSchemaError, ActionYmlSchemaErrorBase, ActionYmlSyntaxError, ActionYmlSyntaxErrorBase, type AppError, AppLayer, type BuildError, BuildFailed, BuildFailedBase, BuildLayer, type BuildOptions, BuildOptionsSchema, type BuildResult, BuildResultSchema, type BuildRunnerOptions, BuildRunnerOptionsSchema, BuildService, BundleFailed, BundleFailedBase, type BundleResult, BundleResultSchema, type BundleStats, BundleStatsSchema, CleanError, CleanErrorBase, type Config, type ConfigError, type ConfigInput, ConfigInputSchema, ConfigInvalid, ConfigInvalidBase, ConfigLayer, ConfigLoadFailed, ConfigLoadFailedBase, ConfigNotFound, ConfigNotFoundBase, ConfigSchema, ConfigService, type DetectEntriesResult, DetectEntriesResultSchema, type DetectedEntry, DetectedEntrySchema, type Entries, EntriesSchema, EntryFileMissing, EntryFileMissingBase, GitHubAction, type GitHubActionBuildResult, GitHubActionBuildResultSchema, type GitHubActionOptions, type LoadConfigOptions, LoadConfigOptionsSchema, type LoadConfigResult, MainEntryMissing, MainEntryMissingBase, type PersistError, PersistLocalError, PersistLocalErrorBase, PersistLocalLayer, type PersistLocalOptions, PersistLocalOptionsSchema, type PersistLocalResult, PersistLocalResultSchema, type PersistLocalRunnerOptions, PersistLocalRunnerOptionsSchema, PersistLocalService, type ValidateOptions, ValidateOptionsSchema, type ValidationError, type ValidationErrorItem, ValidationErrorSchema, ValidationFailed, ValidationFailedBase, ValidationLayer, type ValidationOptions, ValidationOptionsSchema, type ValidationResult, ValidationResultSchema, ValidationService, type ValidationWarning, ValidationWarningSchema, WriteError, WriteErrorBase, defineConfig };
|
|
1567
|
+
//# sourceMappingURL=index.d.ts.map
|