@expo/eas-build-job 1.0.126 → 1.0.129

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/dist/generic.d.ts CHANGED
@@ -3,7 +3,7 @@ import { LoggerLevel } from '@expo/logger';
3
3
  import { BuildTrigger } from './common';
4
4
  export declare namespace Generic {
5
5
  type Job = z.infer<typeof JobZ>;
6
- const JobZ: z.ZodObject<{
6
+ const JobZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
7
7
  projectArchive: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
8
8
  type: z.ZodLiteral<import("./common").ArchiveSourceType.GIT>;
9
9
  repositoryUrl: z.ZodString;
@@ -50,76 +50,6 @@ export declare namespace Generic {
50
50
  bucketKey: string;
51
51
  metadataLocation?: string | undefined;
52
52
  }>]>;
53
- customBuildConfig: z.ZodObject<{
54
- path: z.ZodString;
55
- }, "strip", z.ZodTypeAny, {
56
- path: string;
57
- }, {
58
- path: string;
59
- }>;
60
- steps: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
61
- id: z.ZodOptional<z.ZodString>;
62
- if: z.ZodOptional<z.ZodString>;
63
- name: z.ZodOptional<z.ZodString>;
64
- working_directory: z.ZodOptional<z.ZodString>;
65
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
66
- }, {
67
- run: z.ZodString;
68
- shell: z.ZodOptional<z.ZodString>;
69
- uses: z.ZodOptional<z.ZodNever>;
70
- with: z.ZodOptional<z.ZodNever>;
71
- }>, "strip", z.ZodTypeAny, {
72
- run: string;
73
- name?: string | undefined;
74
- env?: Record<string, string> | undefined;
75
- id?: string | undefined;
76
- if?: string | undefined;
77
- working_directory?: string | undefined;
78
- uses?: undefined;
79
- with?: undefined;
80
- shell?: string | undefined;
81
- }, {
82
- run: string;
83
- name?: string | undefined;
84
- env?: Record<string, string> | undefined;
85
- id?: string | undefined;
86
- if?: string | undefined;
87
- working_directory?: string | undefined;
88
- uses?: undefined;
89
- with?: undefined;
90
- shell?: string | undefined;
91
- }>, z.ZodObject<z.objectUtil.extendShape<{
92
- id: z.ZodOptional<z.ZodString>;
93
- if: z.ZodOptional<z.ZodString>;
94
- name: z.ZodOptional<z.ZodString>;
95
- working_directory: z.ZodOptional<z.ZodString>;
96
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
97
- }, {
98
- uses: z.ZodString;
99
- with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
100
- run: z.ZodOptional<z.ZodNever>;
101
- shell: z.ZodOptional<z.ZodNever>;
102
- }>, "strip", z.ZodTypeAny, {
103
- uses: string;
104
- name?: string | undefined;
105
- env?: Record<string, string> | undefined;
106
- id?: string | undefined;
107
- if?: string | undefined;
108
- working_directory?: string | undefined;
109
- with?: Record<string, unknown> | undefined;
110
- run?: undefined;
111
- shell?: undefined;
112
- }, {
113
- uses: string;
114
- name?: string | undefined;
115
- env?: Record<string, string> | undefined;
116
- id?: string | undefined;
117
- if?: string | undefined;
118
- working_directory?: string | undefined;
119
- with?: Record<string, unknown> | undefined;
120
- run?: undefined;
121
- shell?: undefined;
122
- }>]>, "many">>;
123
53
  secrets: z.ZodObject<{
124
54
  robotAccessToken: z.ZodString;
125
55
  environmentSecrets: z.ZodArray<z.ZodObject<{
@@ -189,7 +119,16 @@ export declare namespace Generic {
189
119
  type: z.ZodOptional<z.ZodNever>;
190
120
  triggeredBy: z.ZodLiteral<BuildTrigger.GIT_BASED_INTEGRATION>;
191
121
  loggerLevel: z.ZodOptional<z.ZodNativeEnum<typeof LoggerLevel>>;
192
- }, "strip", z.ZodTypeAny, {
122
+ }, {
123
+ customBuildConfig: z.ZodObject<{
124
+ path: z.ZodString;
125
+ }, "strip", z.ZodTypeAny, {
126
+ path: string;
127
+ }, {
128
+ path: string;
129
+ }>;
130
+ steps: z.ZodOptional<z.ZodNever>;
131
+ }>, "strip", z.ZodTypeAny, {
193
132
  builderEnvironment: {
194
133
  env: Record<string, string>;
195
134
  image: string;
@@ -234,27 +173,7 @@ export declare namespace Generic {
234
173
  type?: undefined;
235
174
  platform?: undefined;
236
175
  loggerLevel?: LoggerLevel | undefined;
237
- steps?: ({
238
- uses: string;
239
- name?: string | undefined;
240
- env?: Record<string, string> | undefined;
241
- id?: string | undefined;
242
- if?: string | undefined;
243
- working_directory?: string | undefined;
244
- with?: Record<string, unknown> | undefined;
245
- run?: undefined;
246
- shell?: undefined;
247
- } | {
248
- run: string;
249
- name?: string | undefined;
250
- env?: Record<string, string> | undefined;
251
- id?: string | undefined;
252
- if?: string | undefined;
253
- working_directory?: string | undefined;
254
- uses?: undefined;
255
- with?: undefined;
256
- shell?: string | undefined;
257
- })[] | undefined;
176
+ steps?: undefined;
258
177
  }, {
259
178
  builderEnvironment: {
260
179
  env: Record<string, string>;
@@ -300,17 +219,161 @@ export declare namespace Generic {
300
219
  type?: undefined;
301
220
  platform?: undefined;
302
221
  loggerLevel?: LoggerLevel | undefined;
303
- steps?: ({
304
- uses: string;
222
+ steps?: undefined;
223
+ }>, z.ZodObject<z.objectUtil.extendShape<{
224
+ projectArchive: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
225
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.GIT>;
226
+ repositoryUrl: z.ZodString;
227
+ gitRef: z.ZodNullable<z.ZodString>;
228
+ gitCommitHash: z.ZodString;
229
+ }, "strip", z.ZodTypeAny, {
230
+ type: import("./common").ArchiveSourceType.GIT;
231
+ repositoryUrl: string;
232
+ gitRef: string | null;
233
+ gitCommitHash: string;
234
+ }, {
235
+ type: import("./common").ArchiveSourceType.GIT;
236
+ repositoryUrl: string;
237
+ gitRef: string | null;
238
+ gitCommitHash: string;
239
+ }>, z.ZodObject<{
240
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.PATH>;
241
+ path: z.ZodString;
242
+ }, "strip", z.ZodTypeAny, {
243
+ type: import("./common").ArchiveSourceType.PATH;
244
+ path: string;
245
+ }, {
246
+ type: import("./common").ArchiveSourceType.PATH;
247
+ path: string;
248
+ }>, z.ZodObject<{
249
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.URL>;
250
+ url: z.ZodString;
251
+ }, "strip", z.ZodTypeAny, {
252
+ type: import("./common").ArchiveSourceType.URL;
253
+ url: string;
254
+ }, {
255
+ type: import("./common").ArchiveSourceType.URL;
256
+ url: string;
257
+ }>, z.ZodObject<{
258
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.GCS>;
259
+ bucketKey: z.ZodString;
260
+ metadataLocation: z.ZodOptional<z.ZodString>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ type: import("./common").ArchiveSourceType.GCS;
263
+ bucketKey: string;
264
+ metadataLocation?: string | undefined;
265
+ }, {
266
+ type: import("./common").ArchiveSourceType.GCS;
267
+ bucketKey: string;
268
+ metadataLocation?: string | undefined;
269
+ }>]>;
270
+ secrets: z.ZodObject<{
271
+ robotAccessToken: z.ZodString;
272
+ environmentSecrets: z.ZodArray<z.ZodObject<{
273
+ name: z.ZodString;
274
+ value: z.ZodString;
275
+ type: z.ZodNativeEnum<typeof import("./common").EnvironmentSecretType>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ type: import("./common").EnvironmentSecretType;
278
+ value: string;
279
+ name: string;
280
+ }, {
281
+ type: import("./common").EnvironmentSecretType;
282
+ value: string;
283
+ name: string;
284
+ }>, "many">;
285
+ }, "strip", z.ZodTypeAny, {
286
+ environmentSecrets: {
287
+ type: import("./common").EnvironmentSecretType;
288
+ value: string;
289
+ name: string;
290
+ }[];
291
+ robotAccessToken: string;
292
+ }, {
293
+ environmentSecrets: {
294
+ type: import("./common").EnvironmentSecretType;
295
+ value: string;
296
+ name: string;
297
+ }[];
298
+ robotAccessToken: string;
299
+ }>;
300
+ expoDevUrl: z.ZodString;
301
+ builderEnvironment: z.ZodObject<{
302
+ image: z.ZodString;
303
+ node: z.ZodOptional<z.ZodString>;
304
+ yarn: z.ZodOptional<z.ZodString>;
305
+ pnpm: z.ZodOptional<z.ZodString>;
306
+ bun: z.ZodOptional<z.ZodString>;
307
+ env: z.ZodRecord<z.ZodString, z.ZodString>;
308
+ ndk: z.ZodOptional<z.ZodString>;
309
+ bundler: z.ZodOptional<z.ZodString>;
310
+ fastlane: z.ZodOptional<z.ZodString>;
311
+ cocoapods: z.ZodOptional<z.ZodString>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ env: Record<string, string>;
314
+ image: string;
315
+ node?: string | undefined;
316
+ yarn?: string | undefined;
317
+ pnpm?: string | undefined;
318
+ bun?: string | undefined;
319
+ ndk?: string | undefined;
320
+ bundler?: string | undefined;
321
+ fastlane?: string | undefined;
322
+ cocoapods?: string | undefined;
323
+ }, {
324
+ env: Record<string, string>;
325
+ image: string;
326
+ node?: string | undefined;
327
+ yarn?: string | undefined;
328
+ pnpm?: string | undefined;
329
+ bun?: string | undefined;
330
+ ndk?: string | undefined;
331
+ bundler?: string | undefined;
332
+ fastlane?: string | undefined;
333
+ cocoapods?: string | undefined;
334
+ }>;
335
+ platform: z.ZodOptional<z.ZodNever>;
336
+ type: z.ZodOptional<z.ZodNever>;
337
+ triggeredBy: z.ZodLiteral<BuildTrigger.GIT_BASED_INTEGRATION>;
338
+ loggerLevel: z.ZodOptional<z.ZodNativeEnum<typeof LoggerLevel>>;
339
+ }, {
340
+ customBuildConfig: z.ZodOptional<z.ZodNever>;
341
+ steps: z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
342
+ id: z.ZodOptional<z.ZodString>;
343
+ if: z.ZodOptional<z.ZodString>;
344
+ name: z.ZodOptional<z.ZodString>;
345
+ working_directory: z.ZodOptional<z.ZodString>;
346
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
347
+ }, {
348
+ run: z.ZodString;
349
+ shell: z.ZodOptional<z.ZodString>;
350
+ outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
351
+ name: z.ZodString;
352
+ required: z.ZodOptional<z.ZodBoolean>;
353
+ }, "strip", z.ZodTypeAny, {
354
+ name: string;
355
+ required?: boolean | undefined;
356
+ }, {
357
+ name: string;
358
+ required?: boolean | undefined;
359
+ }>, "many">>;
360
+ uses: z.ZodOptional<z.ZodNever>;
361
+ with: z.ZodOptional<z.ZodNever>;
362
+ }>, "strip", z.ZodTypeAny, {
363
+ run: string;
305
364
  name?: string | undefined;
306
365
  env?: Record<string, string> | undefined;
307
366
  id?: string | undefined;
308
367
  if?: string | undefined;
309
368
  working_directory?: string | undefined;
310
- with?: Record<string, unknown> | undefined;
311
- run?: undefined;
312
- shell?: undefined;
313
- } | {
369
+ uses?: undefined;
370
+ with?: undefined;
371
+ shell?: string | undefined;
372
+ outputs?: {
373
+ name: string;
374
+ required?: boolean | undefined;
375
+ }[] | undefined;
376
+ }, {
314
377
  run: string;
315
378
  name?: string | undefined;
316
379
  env?: Record<string, string> | undefined;
@@ -320,6 +383,739 @@ export declare namespace Generic {
320
383
  uses?: undefined;
321
384
  with?: undefined;
322
385
  shell?: string | undefined;
386
+ outputs?: {
387
+ name: string;
388
+ required?: boolean | undefined;
389
+ }[] | undefined;
390
+ }>, z.ZodObject<z.objectUtil.extendShape<{
391
+ id: z.ZodOptional<z.ZodString>;
392
+ if: z.ZodOptional<z.ZodString>;
393
+ name: z.ZodOptional<z.ZodString>;
394
+ working_directory: z.ZodOptional<z.ZodString>;
395
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
396
+ }, {
397
+ uses: z.ZodString;
398
+ with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
399
+ run: z.ZodOptional<z.ZodNever>;
400
+ shell: z.ZodOptional<z.ZodNever>;
401
+ outputs: z.ZodOptional<z.ZodNever>;
402
+ }>, "strip", z.ZodTypeAny, {
403
+ uses: string;
404
+ name?: string | undefined;
405
+ env?: Record<string, string> | undefined;
406
+ id?: string | undefined;
407
+ if?: string | undefined;
408
+ working_directory?: string | undefined;
409
+ with?: Record<string, string | number | Record<string, any>> | undefined;
410
+ run?: undefined;
411
+ shell?: undefined;
412
+ outputs?: undefined;
413
+ }, {
414
+ uses: string;
415
+ name?: string | undefined;
416
+ env?: Record<string, string> | undefined;
417
+ id?: string | undefined;
418
+ if?: string | undefined;
419
+ working_directory?: string | undefined;
420
+ with?: Record<string, string | number | Record<string, any>> | undefined;
421
+ run?: undefined;
422
+ shell?: undefined;
423
+ outputs?: undefined;
424
+ }>]>, "many">;
425
+ }>, "strip", z.ZodTypeAny, {
426
+ builderEnvironment: {
427
+ env: Record<string, string>;
428
+ image: string;
429
+ node?: string | undefined;
430
+ yarn?: string | undefined;
431
+ pnpm?: string | undefined;
432
+ bun?: string | undefined;
433
+ ndk?: string | undefined;
434
+ bundler?: string | undefined;
435
+ fastlane?: string | undefined;
436
+ cocoapods?: string | undefined;
437
+ };
438
+ triggeredBy: BuildTrigger.GIT_BASED_INTEGRATION;
439
+ projectArchive: {
440
+ type: import("./common").ArchiveSourceType.GIT;
441
+ repositoryUrl: string;
442
+ gitRef: string | null;
443
+ gitCommitHash: string;
444
+ } | {
445
+ type: import("./common").ArchiveSourceType.PATH;
446
+ path: string;
447
+ } | {
448
+ type: import("./common").ArchiveSourceType.URL;
449
+ url: string;
450
+ } | {
451
+ type: import("./common").ArchiveSourceType.GCS;
452
+ bucketKey: string;
453
+ metadataLocation?: string | undefined;
454
+ };
455
+ secrets: {
456
+ environmentSecrets: {
457
+ type: import("./common").EnvironmentSecretType;
458
+ value: string;
459
+ name: string;
460
+ }[];
461
+ robotAccessToken: string;
462
+ };
463
+ expoDevUrl: string;
464
+ steps: ({
465
+ uses: string;
466
+ name?: string | undefined;
467
+ env?: Record<string, string> | undefined;
468
+ id?: string | undefined;
469
+ if?: string | undefined;
470
+ working_directory?: string | undefined;
471
+ with?: Record<string, string | number | Record<string, any>> | undefined;
472
+ run?: undefined;
473
+ shell?: undefined;
474
+ outputs?: undefined;
475
+ } | {
476
+ run: string;
477
+ name?: string | undefined;
478
+ env?: Record<string, string> | undefined;
479
+ id?: string | undefined;
480
+ if?: string | undefined;
481
+ working_directory?: string | undefined;
482
+ uses?: undefined;
483
+ with?: undefined;
484
+ shell?: string | undefined;
485
+ outputs?: {
486
+ name: string;
487
+ required?: boolean | undefined;
488
+ }[] | undefined;
489
+ })[];
490
+ type?: undefined;
491
+ platform?: undefined;
492
+ customBuildConfig?: undefined;
493
+ loggerLevel?: LoggerLevel | undefined;
494
+ }, {
495
+ builderEnvironment: {
496
+ env: Record<string, string>;
497
+ image: string;
498
+ node?: string | undefined;
499
+ yarn?: string | undefined;
500
+ pnpm?: string | undefined;
501
+ bun?: string | undefined;
502
+ ndk?: string | undefined;
503
+ bundler?: string | undefined;
504
+ fastlane?: string | undefined;
505
+ cocoapods?: string | undefined;
506
+ };
507
+ triggeredBy: BuildTrigger.GIT_BASED_INTEGRATION;
508
+ projectArchive: {
509
+ type: import("./common").ArchiveSourceType.GIT;
510
+ repositoryUrl: string;
511
+ gitRef: string | null;
512
+ gitCommitHash: string;
513
+ } | {
514
+ type: import("./common").ArchiveSourceType.PATH;
515
+ path: string;
516
+ } | {
517
+ type: import("./common").ArchiveSourceType.URL;
518
+ url: string;
519
+ } | {
520
+ type: import("./common").ArchiveSourceType.GCS;
521
+ bucketKey: string;
522
+ metadataLocation?: string | undefined;
523
+ };
524
+ secrets: {
525
+ environmentSecrets: {
526
+ type: import("./common").EnvironmentSecretType;
527
+ value: string;
528
+ name: string;
529
+ }[];
530
+ robotAccessToken: string;
531
+ };
532
+ expoDevUrl: string;
533
+ steps: ({
534
+ uses: string;
535
+ name?: string | undefined;
536
+ env?: Record<string, string> | undefined;
537
+ id?: string | undefined;
538
+ if?: string | undefined;
539
+ working_directory?: string | undefined;
540
+ with?: Record<string, string | number | Record<string, any>> | undefined;
541
+ run?: undefined;
542
+ shell?: undefined;
543
+ outputs?: undefined;
544
+ } | {
545
+ run: string;
546
+ name?: string | undefined;
547
+ env?: Record<string, string> | undefined;
548
+ id?: string | undefined;
549
+ if?: string | undefined;
550
+ working_directory?: string | undefined;
551
+ uses?: undefined;
552
+ with?: undefined;
553
+ shell?: string | undefined;
554
+ outputs?: {
555
+ name: string;
556
+ required?: boolean | undefined;
557
+ }[] | undefined;
558
+ })[];
559
+ type?: undefined;
560
+ platform?: undefined;
561
+ customBuildConfig?: undefined;
562
+ loggerLevel?: LoggerLevel | undefined;
563
+ }>]>;
564
+ type PartialJob = z.infer<typeof PartialJobZ>;
565
+ const PartialJobZ: z.ZodUnion<[z.ZodObject<{
566
+ projectArchive: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
567
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.GIT>;
568
+ repositoryUrl: z.ZodString;
569
+ gitRef: z.ZodNullable<z.ZodString>;
570
+ gitCommitHash: z.ZodString;
571
+ }, "strip", z.ZodTypeAny, {
572
+ type: import("./common").ArchiveSourceType.GIT;
573
+ repositoryUrl: string;
574
+ gitRef: string | null;
575
+ gitCommitHash: string;
576
+ }, {
577
+ type: import("./common").ArchiveSourceType.GIT;
578
+ repositoryUrl: string;
579
+ gitRef: string | null;
580
+ gitCommitHash: string;
581
+ }>, z.ZodObject<{
582
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.PATH>;
583
+ path: z.ZodString;
584
+ }, "strip", z.ZodTypeAny, {
585
+ type: import("./common").ArchiveSourceType.PATH;
586
+ path: string;
587
+ }, {
588
+ type: import("./common").ArchiveSourceType.PATH;
589
+ path: string;
590
+ }>, z.ZodObject<{
591
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.URL>;
592
+ url: z.ZodString;
593
+ }, "strip", z.ZodTypeAny, {
594
+ type: import("./common").ArchiveSourceType.URL;
595
+ url: string;
596
+ }, {
597
+ type: import("./common").ArchiveSourceType.URL;
598
+ url: string;
599
+ }>, z.ZodObject<{
600
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.GCS>;
601
+ bucketKey: z.ZodString;
602
+ metadataLocation: z.ZodOptional<z.ZodString>;
603
+ }, "strip", z.ZodTypeAny, {
604
+ type: import("./common").ArchiveSourceType.GCS;
605
+ bucketKey: string;
606
+ metadataLocation?: string | undefined;
607
+ }, {
608
+ type: import("./common").ArchiveSourceType.GCS;
609
+ bucketKey: string;
610
+ metadataLocation?: string | undefined;
611
+ }>]>>;
612
+ secrets: z.ZodOptional<z.ZodObject<{
613
+ robotAccessToken: z.ZodString;
614
+ environmentSecrets: z.ZodArray<z.ZodObject<{
615
+ name: z.ZodString;
616
+ value: z.ZodString;
617
+ type: z.ZodNativeEnum<typeof import("./common").EnvironmentSecretType>;
618
+ }, "strip", z.ZodTypeAny, {
619
+ type: import("./common").EnvironmentSecretType;
620
+ value: string;
621
+ name: string;
622
+ }, {
623
+ type: import("./common").EnvironmentSecretType;
624
+ value: string;
625
+ name: string;
626
+ }>, "many">;
627
+ }, "strip", z.ZodTypeAny, {
628
+ environmentSecrets: {
629
+ type: import("./common").EnvironmentSecretType;
630
+ value: string;
631
+ name: string;
632
+ }[];
633
+ robotAccessToken: string;
634
+ }, {
635
+ environmentSecrets: {
636
+ type: import("./common").EnvironmentSecretType;
637
+ value: string;
638
+ name: string;
639
+ }[];
640
+ robotAccessToken: string;
641
+ }>>;
642
+ expoDevUrl: z.ZodOptional<z.ZodString>;
643
+ builderEnvironment: z.ZodOptional<z.ZodObject<{
644
+ image: z.ZodString;
645
+ node: z.ZodOptional<z.ZodString>;
646
+ yarn: z.ZodOptional<z.ZodString>;
647
+ pnpm: z.ZodOptional<z.ZodString>;
648
+ bun: z.ZodOptional<z.ZodString>;
649
+ env: z.ZodRecord<z.ZodString, z.ZodString>;
650
+ ndk: z.ZodOptional<z.ZodString>;
651
+ bundler: z.ZodOptional<z.ZodString>;
652
+ fastlane: z.ZodOptional<z.ZodString>;
653
+ cocoapods: z.ZodOptional<z.ZodString>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ env: Record<string, string>;
656
+ image: string;
657
+ node?: string | undefined;
658
+ yarn?: string | undefined;
659
+ pnpm?: string | undefined;
660
+ bun?: string | undefined;
661
+ ndk?: string | undefined;
662
+ bundler?: string | undefined;
663
+ fastlane?: string | undefined;
664
+ cocoapods?: string | undefined;
665
+ }, {
666
+ env: Record<string, string>;
667
+ image: string;
668
+ node?: string | undefined;
669
+ yarn?: string | undefined;
670
+ pnpm?: string | undefined;
671
+ bun?: string | undefined;
672
+ ndk?: string | undefined;
673
+ bundler?: string | undefined;
674
+ fastlane?: string | undefined;
675
+ cocoapods?: string | undefined;
676
+ }>>;
677
+ platform: z.ZodOptional<z.ZodOptional<z.ZodNever>>;
678
+ type: z.ZodOptional<z.ZodOptional<z.ZodNever>>;
679
+ triggeredBy: z.ZodOptional<z.ZodLiteral<BuildTrigger.GIT_BASED_INTEGRATION>>;
680
+ loggerLevel: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof LoggerLevel>>>;
681
+ customBuildConfig: z.ZodOptional<z.ZodObject<{
682
+ path: z.ZodString;
683
+ }, "strip", z.ZodTypeAny, {
684
+ path: string;
685
+ }, {
686
+ path: string;
687
+ }>>;
688
+ steps: z.ZodOptional<z.ZodOptional<z.ZodNever>>;
689
+ }, "strip", z.ZodTypeAny, {
690
+ type?: undefined;
691
+ builderEnvironment?: {
692
+ env: Record<string, string>;
693
+ image: string;
694
+ node?: string | undefined;
695
+ yarn?: string | undefined;
696
+ pnpm?: string | undefined;
697
+ bun?: string | undefined;
698
+ ndk?: string | undefined;
699
+ bundler?: string | undefined;
700
+ fastlane?: string | undefined;
701
+ cocoapods?: string | undefined;
702
+ } | undefined;
703
+ triggeredBy?: BuildTrigger.GIT_BASED_INTEGRATION | undefined;
704
+ projectArchive?: {
705
+ type: import("./common").ArchiveSourceType.GIT;
706
+ repositoryUrl: string;
707
+ gitRef: string | null;
708
+ gitCommitHash: string;
709
+ } | {
710
+ type: import("./common").ArchiveSourceType.PATH;
711
+ path: string;
712
+ } | {
713
+ type: import("./common").ArchiveSourceType.URL;
714
+ url: string;
715
+ } | {
716
+ type: import("./common").ArchiveSourceType.GCS;
717
+ bucketKey: string;
718
+ metadataLocation?: string | undefined;
719
+ } | undefined;
720
+ platform?: undefined;
721
+ secrets?: {
722
+ environmentSecrets: {
723
+ type: import("./common").EnvironmentSecretType;
724
+ value: string;
725
+ name: string;
726
+ }[];
727
+ robotAccessToken: string;
728
+ } | undefined;
729
+ customBuildConfig?: {
730
+ path: string;
731
+ } | undefined;
732
+ loggerLevel?: LoggerLevel | undefined;
733
+ expoDevUrl?: string | undefined;
734
+ steps?: undefined;
735
+ }, {
736
+ type?: undefined;
737
+ builderEnvironment?: {
738
+ env: Record<string, string>;
739
+ image: string;
740
+ node?: string | undefined;
741
+ yarn?: string | undefined;
742
+ pnpm?: string | undefined;
743
+ bun?: string | undefined;
744
+ ndk?: string | undefined;
745
+ bundler?: string | undefined;
746
+ fastlane?: string | undefined;
747
+ cocoapods?: string | undefined;
748
+ } | undefined;
749
+ triggeredBy?: BuildTrigger.GIT_BASED_INTEGRATION | undefined;
750
+ projectArchive?: {
751
+ type: import("./common").ArchiveSourceType.GIT;
752
+ repositoryUrl: string;
753
+ gitRef: string | null;
754
+ gitCommitHash: string;
755
+ } | {
756
+ type: import("./common").ArchiveSourceType.PATH;
757
+ path: string;
758
+ } | {
759
+ type: import("./common").ArchiveSourceType.URL;
760
+ url: string;
761
+ } | {
762
+ type: import("./common").ArchiveSourceType.GCS;
763
+ bucketKey: string;
764
+ metadataLocation?: string | undefined;
765
+ } | undefined;
766
+ platform?: undefined;
767
+ secrets?: {
768
+ environmentSecrets: {
769
+ type: import("./common").EnvironmentSecretType;
770
+ value: string;
771
+ name: string;
772
+ }[];
773
+ robotAccessToken: string;
774
+ } | undefined;
775
+ customBuildConfig?: {
776
+ path: string;
777
+ } | undefined;
778
+ loggerLevel?: LoggerLevel | undefined;
779
+ expoDevUrl?: string | undefined;
780
+ steps?: undefined;
781
+ }>, z.ZodObject<{
782
+ projectArchive: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
783
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.GIT>;
784
+ repositoryUrl: z.ZodString;
785
+ gitRef: z.ZodNullable<z.ZodString>;
786
+ gitCommitHash: z.ZodString;
787
+ }, "strip", z.ZodTypeAny, {
788
+ type: import("./common").ArchiveSourceType.GIT;
789
+ repositoryUrl: string;
790
+ gitRef: string | null;
791
+ gitCommitHash: string;
792
+ }, {
793
+ type: import("./common").ArchiveSourceType.GIT;
794
+ repositoryUrl: string;
795
+ gitRef: string | null;
796
+ gitCommitHash: string;
797
+ }>, z.ZodObject<{
798
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.PATH>;
799
+ path: z.ZodString;
800
+ }, "strip", z.ZodTypeAny, {
801
+ type: import("./common").ArchiveSourceType.PATH;
802
+ path: string;
803
+ }, {
804
+ type: import("./common").ArchiveSourceType.PATH;
805
+ path: string;
806
+ }>, z.ZodObject<{
807
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.URL>;
808
+ url: z.ZodString;
809
+ }, "strip", z.ZodTypeAny, {
810
+ type: import("./common").ArchiveSourceType.URL;
811
+ url: string;
812
+ }, {
813
+ type: import("./common").ArchiveSourceType.URL;
814
+ url: string;
815
+ }>, z.ZodObject<{
816
+ type: z.ZodLiteral<import("./common").ArchiveSourceType.GCS>;
817
+ bucketKey: z.ZodString;
818
+ metadataLocation: z.ZodOptional<z.ZodString>;
819
+ }, "strip", z.ZodTypeAny, {
820
+ type: import("./common").ArchiveSourceType.GCS;
821
+ bucketKey: string;
822
+ metadataLocation?: string | undefined;
823
+ }, {
824
+ type: import("./common").ArchiveSourceType.GCS;
825
+ bucketKey: string;
826
+ metadataLocation?: string | undefined;
827
+ }>]>>;
828
+ secrets: z.ZodOptional<z.ZodObject<{
829
+ robotAccessToken: z.ZodString;
830
+ environmentSecrets: z.ZodArray<z.ZodObject<{
831
+ name: z.ZodString;
832
+ value: z.ZodString;
833
+ type: z.ZodNativeEnum<typeof import("./common").EnvironmentSecretType>;
834
+ }, "strip", z.ZodTypeAny, {
835
+ type: import("./common").EnvironmentSecretType;
836
+ value: string;
837
+ name: string;
838
+ }, {
839
+ type: import("./common").EnvironmentSecretType;
840
+ value: string;
841
+ name: string;
842
+ }>, "many">;
843
+ }, "strip", z.ZodTypeAny, {
844
+ environmentSecrets: {
845
+ type: import("./common").EnvironmentSecretType;
846
+ value: string;
847
+ name: string;
848
+ }[];
849
+ robotAccessToken: string;
850
+ }, {
851
+ environmentSecrets: {
852
+ type: import("./common").EnvironmentSecretType;
853
+ value: string;
854
+ name: string;
855
+ }[];
856
+ robotAccessToken: string;
857
+ }>>;
858
+ expoDevUrl: z.ZodOptional<z.ZodString>;
859
+ builderEnvironment: z.ZodOptional<z.ZodObject<{
860
+ image: z.ZodString;
861
+ node: z.ZodOptional<z.ZodString>;
862
+ yarn: z.ZodOptional<z.ZodString>;
863
+ pnpm: z.ZodOptional<z.ZodString>;
864
+ bun: z.ZodOptional<z.ZodString>;
865
+ env: z.ZodRecord<z.ZodString, z.ZodString>;
866
+ ndk: z.ZodOptional<z.ZodString>;
867
+ bundler: z.ZodOptional<z.ZodString>;
868
+ fastlane: z.ZodOptional<z.ZodString>;
869
+ cocoapods: z.ZodOptional<z.ZodString>;
870
+ }, "strip", z.ZodTypeAny, {
871
+ env: Record<string, string>;
872
+ image: string;
873
+ node?: string | undefined;
874
+ yarn?: string | undefined;
875
+ pnpm?: string | undefined;
876
+ bun?: string | undefined;
877
+ ndk?: string | undefined;
878
+ bundler?: string | undefined;
879
+ fastlane?: string | undefined;
880
+ cocoapods?: string | undefined;
881
+ }, {
882
+ env: Record<string, string>;
883
+ image: string;
884
+ node?: string | undefined;
885
+ yarn?: string | undefined;
886
+ pnpm?: string | undefined;
887
+ bun?: string | undefined;
888
+ ndk?: string | undefined;
889
+ bundler?: string | undefined;
890
+ fastlane?: string | undefined;
891
+ cocoapods?: string | undefined;
892
+ }>>;
893
+ platform: z.ZodOptional<z.ZodOptional<z.ZodNever>>;
894
+ type: z.ZodOptional<z.ZodOptional<z.ZodNever>>;
895
+ triggeredBy: z.ZodOptional<z.ZodLiteral<BuildTrigger.GIT_BASED_INTEGRATION>>;
896
+ loggerLevel: z.ZodOptional<z.ZodOptional<z.ZodNativeEnum<typeof LoggerLevel>>>;
897
+ customBuildConfig: z.ZodOptional<z.ZodOptional<z.ZodNever>>;
898
+ steps: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
899
+ id: z.ZodOptional<z.ZodString>;
900
+ if: z.ZodOptional<z.ZodString>;
901
+ name: z.ZodOptional<z.ZodString>;
902
+ working_directory: z.ZodOptional<z.ZodString>;
903
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
904
+ }, {
905
+ run: z.ZodString;
906
+ shell: z.ZodOptional<z.ZodString>;
907
+ outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
908
+ name: z.ZodString;
909
+ required: z.ZodOptional<z.ZodBoolean>;
910
+ }, "strip", z.ZodTypeAny, {
911
+ name: string;
912
+ required?: boolean | undefined;
913
+ }, {
914
+ name: string;
915
+ required?: boolean | undefined;
916
+ }>, "many">>;
917
+ uses: z.ZodOptional<z.ZodNever>;
918
+ with: z.ZodOptional<z.ZodNever>;
919
+ }>, "strip", z.ZodTypeAny, {
920
+ run: string;
921
+ name?: string | undefined;
922
+ env?: Record<string, string> | undefined;
923
+ id?: string | undefined;
924
+ if?: string | undefined;
925
+ working_directory?: string | undefined;
926
+ uses?: undefined;
927
+ with?: undefined;
928
+ shell?: string | undefined;
929
+ outputs?: {
930
+ name: string;
931
+ required?: boolean | undefined;
932
+ }[] | undefined;
933
+ }, {
934
+ run: string;
935
+ name?: string | undefined;
936
+ env?: Record<string, string> | undefined;
937
+ id?: string | undefined;
938
+ if?: string | undefined;
939
+ working_directory?: string | undefined;
940
+ uses?: undefined;
941
+ with?: undefined;
942
+ shell?: string | undefined;
943
+ outputs?: {
944
+ name: string;
945
+ required?: boolean | undefined;
946
+ }[] | undefined;
947
+ }>, z.ZodObject<z.objectUtil.extendShape<{
948
+ id: z.ZodOptional<z.ZodString>;
949
+ if: z.ZodOptional<z.ZodString>;
950
+ name: z.ZodOptional<z.ZodString>;
951
+ working_directory: z.ZodOptional<z.ZodString>;
952
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
953
+ }, {
954
+ uses: z.ZodString;
955
+ with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
956
+ run: z.ZodOptional<z.ZodNever>;
957
+ shell: z.ZodOptional<z.ZodNever>;
958
+ outputs: z.ZodOptional<z.ZodNever>;
959
+ }>, "strip", z.ZodTypeAny, {
960
+ uses: string;
961
+ name?: string | undefined;
962
+ env?: Record<string, string> | undefined;
963
+ id?: string | undefined;
964
+ if?: string | undefined;
965
+ working_directory?: string | undefined;
966
+ with?: Record<string, string | number | Record<string, any>> | undefined;
967
+ run?: undefined;
968
+ shell?: undefined;
969
+ outputs?: undefined;
970
+ }, {
971
+ uses: string;
972
+ name?: string | undefined;
973
+ env?: Record<string, string> | undefined;
974
+ id?: string | undefined;
975
+ if?: string | undefined;
976
+ working_directory?: string | undefined;
977
+ with?: Record<string, string | number | Record<string, any>> | undefined;
978
+ run?: undefined;
979
+ shell?: undefined;
980
+ outputs?: undefined;
981
+ }>]>, "many">>;
982
+ }, "strip", z.ZodTypeAny, {
983
+ type?: undefined;
984
+ builderEnvironment?: {
985
+ env: Record<string, string>;
986
+ image: string;
987
+ node?: string | undefined;
988
+ yarn?: string | undefined;
989
+ pnpm?: string | undefined;
990
+ bun?: string | undefined;
991
+ ndk?: string | undefined;
992
+ bundler?: string | undefined;
993
+ fastlane?: string | undefined;
994
+ cocoapods?: string | undefined;
995
+ } | undefined;
996
+ triggeredBy?: BuildTrigger.GIT_BASED_INTEGRATION | undefined;
997
+ projectArchive?: {
998
+ type: import("./common").ArchiveSourceType.GIT;
999
+ repositoryUrl: string;
1000
+ gitRef: string | null;
1001
+ gitCommitHash: string;
1002
+ } | {
1003
+ type: import("./common").ArchiveSourceType.PATH;
1004
+ path: string;
1005
+ } | {
1006
+ type: import("./common").ArchiveSourceType.URL;
1007
+ url: string;
1008
+ } | {
1009
+ type: import("./common").ArchiveSourceType.GCS;
1010
+ bucketKey: string;
1011
+ metadataLocation?: string | undefined;
1012
+ } | undefined;
1013
+ platform?: undefined;
1014
+ secrets?: {
1015
+ environmentSecrets: {
1016
+ type: import("./common").EnvironmentSecretType;
1017
+ value: string;
1018
+ name: string;
1019
+ }[];
1020
+ robotAccessToken: string;
1021
+ } | undefined;
1022
+ customBuildConfig?: undefined;
1023
+ loggerLevel?: LoggerLevel | undefined;
1024
+ expoDevUrl?: string | undefined;
1025
+ steps?: ({
1026
+ uses: string;
1027
+ name?: string | undefined;
1028
+ env?: Record<string, string> | undefined;
1029
+ id?: string | undefined;
1030
+ if?: string | undefined;
1031
+ working_directory?: string | undefined;
1032
+ with?: Record<string, string | number | Record<string, any>> | undefined;
1033
+ run?: undefined;
1034
+ shell?: undefined;
1035
+ outputs?: undefined;
1036
+ } | {
1037
+ run: string;
1038
+ name?: string | undefined;
1039
+ env?: Record<string, string> | undefined;
1040
+ id?: string | undefined;
1041
+ if?: string | undefined;
1042
+ working_directory?: string | undefined;
1043
+ uses?: undefined;
1044
+ with?: undefined;
1045
+ shell?: string | undefined;
1046
+ outputs?: {
1047
+ name: string;
1048
+ required?: boolean | undefined;
1049
+ }[] | undefined;
1050
+ })[] | undefined;
1051
+ }, {
1052
+ type?: undefined;
1053
+ builderEnvironment?: {
1054
+ env: Record<string, string>;
1055
+ image: string;
1056
+ node?: string | undefined;
1057
+ yarn?: string | undefined;
1058
+ pnpm?: string | undefined;
1059
+ bun?: string | undefined;
1060
+ ndk?: string | undefined;
1061
+ bundler?: string | undefined;
1062
+ fastlane?: string | undefined;
1063
+ cocoapods?: string | undefined;
1064
+ } | undefined;
1065
+ triggeredBy?: BuildTrigger.GIT_BASED_INTEGRATION | undefined;
1066
+ projectArchive?: {
1067
+ type: import("./common").ArchiveSourceType.GIT;
1068
+ repositoryUrl: string;
1069
+ gitRef: string | null;
1070
+ gitCommitHash: string;
1071
+ } | {
1072
+ type: import("./common").ArchiveSourceType.PATH;
1073
+ path: string;
1074
+ } | {
1075
+ type: import("./common").ArchiveSourceType.URL;
1076
+ url: string;
1077
+ } | {
1078
+ type: import("./common").ArchiveSourceType.GCS;
1079
+ bucketKey: string;
1080
+ metadataLocation?: string | undefined;
1081
+ } | undefined;
1082
+ platform?: undefined;
1083
+ secrets?: {
1084
+ environmentSecrets: {
1085
+ type: import("./common").EnvironmentSecretType;
1086
+ value: string;
1087
+ name: string;
1088
+ }[];
1089
+ robotAccessToken: string;
1090
+ } | undefined;
1091
+ customBuildConfig?: undefined;
1092
+ loggerLevel?: LoggerLevel | undefined;
1093
+ expoDevUrl?: string | undefined;
1094
+ steps?: ({
1095
+ uses: string;
1096
+ name?: string | undefined;
1097
+ env?: Record<string, string> | undefined;
1098
+ id?: string | undefined;
1099
+ if?: string | undefined;
1100
+ working_directory?: string | undefined;
1101
+ with?: Record<string, string | number | Record<string, any>> | undefined;
1102
+ run?: undefined;
1103
+ shell?: undefined;
1104
+ outputs?: undefined;
1105
+ } | {
1106
+ run: string;
1107
+ name?: string | undefined;
1108
+ env?: Record<string, string> | undefined;
1109
+ id?: string | undefined;
1110
+ if?: string | undefined;
1111
+ working_directory?: string | undefined;
1112
+ uses?: undefined;
1113
+ with?: undefined;
1114
+ shell?: string | undefined;
1115
+ outputs?: {
1116
+ name: string;
1117
+ required?: boolean | undefined;
1118
+ }[] | undefined;
323
1119
  })[] | undefined;
324
- }>;
1120
+ }>]>;
325
1121
  }
package/dist/generic.js CHANGED
@@ -21,12 +21,8 @@ var Generic;
21
21
  fastlane: zod_1.z.string().optional(),
22
22
  cocoapods: zod_1.z.string().optional(),
23
23
  });
24
- Generic.JobZ = zod_1.z.object({
24
+ const CommonJobZ = zod_1.z.object({
25
25
  projectArchive: common_1.ArchiveSourceSchemaZ,
26
- customBuildConfig: zod_1.z.object({
27
- path: zod_1.z.string(),
28
- }),
29
- steps: zod_1.z.array(step_1.StepZ).optional(),
30
26
  secrets: zod_1.z.object({
31
27
  robotAccessToken: zod_1.z.string(),
32
28
  environmentSecrets: zod_1.z.array(common_1.EnvironmentSecretZ),
@@ -39,5 +35,17 @@ var Generic;
39
35
  triggeredBy: zod_1.z.literal(common_1.BuildTrigger.GIT_BASED_INTEGRATION),
40
36
  loggerLevel: zod_1.z.nativeEnum(logger_1.LoggerLevel).optional(),
41
37
  });
38
+ const PathJobZ = CommonJobZ.extend({
39
+ customBuildConfig: zod_1.z.object({
40
+ path: zod_1.z.string(),
41
+ }),
42
+ steps: zod_1.z.never().optional(),
43
+ });
44
+ const StepsJobZ = CommonJobZ.extend({
45
+ customBuildConfig: zod_1.z.never().optional(),
46
+ steps: zod_1.z.array(step_1.StepZ).min(1),
47
+ });
48
+ Generic.JobZ = zod_1.z.union([PathJobZ, StepsJobZ]);
49
+ Generic.PartialJobZ = zod_1.z.union([PathJobZ.partial(), StepsJobZ.partial()]);
42
50
  })(Generic || (exports.Generic = Generic = {}));
43
51
  //# sourceMappingURL=generic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAA2C;AAE3C,qCAAkF;AAClF,iCAA+B;AAE/B,IAAiB,OAAO,CAmCvB;AAnCD,WAAiB,OAAO;IACtB,MAAM,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;QACzC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;QACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC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oBAAW,CAAC,CAAC,QAAQ,EAAE;KAClD,CAAC,CAAC;AACL,CAAC,EAnCgB,OAAO,uBAAP,OAAO,QAmCvB","sourcesContent":["import { z } from 'zod';\nimport { LoggerLevel } from '@expo/logger';\n\nimport { ArchiveSourceSchemaZ, BuildTrigger, EnvironmentSecretZ } from './common';\nimport { StepZ } from './step';\n\nexport namespace Generic {\n const BuilderEnvironmentSchemaZ = z.object({\n image: z.string(),\n node: z.string().optional(),\n yarn: z.string().optional(),\n pnpm: z.string().optional(),\n bun: z.string().optional(),\n env: z.record(z.string()),\n // Linux\n ndk: z.string().optional(),\n // macOS\n bundler: z.string().optional(),\n fastlane: z.string().optional(),\n cocoapods: z.string().optional(),\n });\n\n export type Job = z.infer<typeof JobZ>;\n export const JobZ = z.object({\n projectArchive: ArchiveSourceSchemaZ,\n customBuildConfig: z.object({\n path: z.string(),\n }),\n steps: z.array(StepZ).optional(),\n secrets: z.object({\n robotAccessToken: z.string(),\n environmentSecrets: z.array(EnvironmentSecretZ),\n }),\n expoDevUrl: z.string().url(),\n builderEnvironment: BuilderEnvironmentSchemaZ,\n // We use this to discern between Android.Job, Ios.Job and Generic.Job.\n platform: z.never().optional(),\n type: z.never().optional(),\n triggeredBy: z.literal(BuildTrigger.GIT_BASED_INTEGRATION),\n loggerLevel: z.nativeEnum(LoggerLevel).optional(),\n });\n}\n"]}
1
+ {"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAA2C;AAE3C,qCAAkF;AAClF,iCAA+B;AAE/B,IAAiB,OAAO,CAgDvB;AAhDD,WAAiB,OAAO;IACtB,MAAM,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;QACzC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;QACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ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AI,EAAE,OAAC,CAAC,MAAM,EAAE;SACjB,CAAC;QACF,KAAK,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KAC5B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC;QAClC,iBAAiB,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACvC,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,YAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KAC7B,CAAC,CAAC;IAGU,YAAI,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAGtC,mBAAW,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAChF,CAAC,EAhDgB,OAAO,uBAAP,OAAO,QAgDvB","sourcesContent":["import { z } from 'zod';\nimport { LoggerLevel } from '@expo/logger';\n\nimport { ArchiveSourceSchemaZ, BuildTrigger, EnvironmentSecretZ } from './common';\nimport { StepZ } from './step';\n\nexport namespace Generic {\n const BuilderEnvironmentSchemaZ = z.object({\n image: z.string(),\n node: z.string().optional(),\n yarn: z.string().optional(),\n pnpm: z.string().optional(),\n bun: z.string().optional(),\n env: z.record(z.string()),\n // Linux\n ndk: z.string().optional(),\n // macOS\n bundler: z.string().optional(),\n fastlane: z.string().optional(),\n cocoapods: z.string().optional(),\n });\n\n const CommonJobZ = z.object({\n projectArchive: ArchiveSourceSchemaZ,\n secrets: z.object({\n robotAccessToken: z.string(),\n environmentSecrets: z.array(EnvironmentSecretZ),\n }),\n expoDevUrl: z.string().url(),\n builderEnvironment: BuilderEnvironmentSchemaZ,\n // We use this to discern between Android.Job, Ios.Job and Generic.Job.\n platform: z.never().optional(),\n type: z.never().optional(),\n triggeredBy: z.literal(BuildTrigger.GIT_BASED_INTEGRATION),\n loggerLevel: z.nativeEnum(LoggerLevel).optional(),\n });\n\n const PathJobZ = CommonJobZ.extend({\n customBuildConfig: z.object({\n path: z.string(),\n }),\n steps: z.never().optional(),\n });\n\n const StepsJobZ = CommonJobZ.extend({\n customBuildConfig: z.never().optional(),\n steps: z.array(StepZ).min(1),\n });\n\n export type Job = z.infer<typeof JobZ>;\n export const JobZ = z.union([PathJobZ, StepsJobZ]);\n\n export type PartialJob = z.infer<typeof PartialJobZ>;\n export const PartialJobZ = z.union([PathJobZ.partial(), StepsJobZ.partial()]);\n}\n"]}
package/dist/step.d.ts CHANGED
@@ -62,9 +62,10 @@ export declare const FunctionStepZ: z.ZodObject<z.objectUtil.extendShape<{
62
62
  * - value1
63
63
  * arg4: ${{ steps.step1.outputs.test }}
64
64
  */
65
- with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
65
+ with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
66
66
  run: z.ZodOptional<z.ZodNever>;
67
67
  shell: z.ZodOptional<z.ZodNever>;
68
+ outputs: z.ZodOptional<z.ZodNever>;
68
69
  }>, "strip", z.ZodTypeAny, {
69
70
  uses: string;
70
71
  name?: string | undefined;
@@ -72,9 +73,10 @@ export declare const FunctionStepZ: z.ZodObject<z.objectUtil.extendShape<{
72
73
  id?: string | undefined;
73
74
  if?: string | undefined;
74
75
  working_directory?: string | undefined;
75
- with?: Record<string, unknown> | undefined;
76
+ with?: Record<string, string | number | Record<string, any>> | undefined;
76
77
  run?: undefined;
77
78
  shell?: undefined;
79
+ outputs?: undefined;
78
80
  }, {
79
81
  uses: string;
80
82
  name?: string | undefined;
@@ -82,9 +84,10 @@ export declare const FunctionStepZ: z.ZodObject<z.objectUtil.extendShape<{
82
84
  id?: string | undefined;
83
85
  if?: string | undefined;
84
86
  working_directory?: string | undefined;
85
- with?: Record<string, unknown> | undefined;
87
+ with?: Record<string, string | number | Record<string, any>> | undefined;
86
88
  run?: undefined;
87
89
  shell?: undefined;
90
+ outputs?: undefined;
88
91
  }>;
89
92
  export type FunctionStep = z.infer<typeof FunctionStepZ>;
90
93
  export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
@@ -148,6 +151,27 @@ export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
148
151
  * @default 'bash'
149
152
  */
150
153
  shell: z.ZodOptional<z.ZodString>;
154
+ /**
155
+ * The outputs of the step.
156
+ *
157
+ * @example
158
+ * outputs:
159
+ * - name: my_output
160
+ * required: true
161
+ * - name: my_optional_output
162
+ * required: false
163
+ * - name: my_optional_output_without_required
164
+ */
165
+ outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
166
+ name: z.ZodString;
167
+ required: z.ZodOptional<z.ZodBoolean>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ name: string;
170
+ required?: boolean | undefined;
171
+ }, {
172
+ name: string;
173
+ required?: boolean | undefined;
174
+ }>, "many">>;
151
175
  uses: z.ZodOptional<z.ZodNever>;
152
176
  with: z.ZodOptional<z.ZodNever>;
153
177
  }>, "strip", z.ZodTypeAny, {
@@ -160,6 +184,10 @@ export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
160
184
  uses?: undefined;
161
185
  with?: undefined;
162
186
  shell?: string | undefined;
187
+ outputs?: {
188
+ name: string;
189
+ required?: boolean | undefined;
190
+ }[] | undefined;
163
191
  }, {
164
192
  run: string;
165
193
  name?: string | undefined;
@@ -170,6 +198,10 @@ export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
170
198
  uses?: undefined;
171
199
  with?: undefined;
172
200
  shell?: string | undefined;
201
+ outputs?: {
202
+ name: string;
203
+ required?: boolean | undefined;
204
+ }[] | undefined;
173
205
  }>;
174
206
  export type ShellStep = z.infer<typeof ShellStepZ>;
175
207
  export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
@@ -233,6 +265,27 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
233
265
  * @default 'bash'
234
266
  */
235
267
  shell: z.ZodOptional<z.ZodString>;
268
+ /**
269
+ * The outputs of the step.
270
+ *
271
+ * @example
272
+ * outputs:
273
+ * - name: my_output
274
+ * required: true
275
+ * - name: my_optional_output
276
+ * required: false
277
+ * - name: my_optional_output_without_required
278
+ */
279
+ outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
280
+ name: z.ZodString;
281
+ required: z.ZodOptional<z.ZodBoolean>;
282
+ }, "strip", z.ZodTypeAny, {
283
+ name: string;
284
+ required?: boolean | undefined;
285
+ }, {
286
+ name: string;
287
+ required?: boolean | undefined;
288
+ }>, "many">>;
236
289
  uses: z.ZodOptional<z.ZodNever>;
237
290
  with: z.ZodOptional<z.ZodNever>;
238
291
  }>, "strip", z.ZodTypeAny, {
@@ -245,6 +298,10 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
245
298
  uses?: undefined;
246
299
  with?: undefined;
247
300
  shell?: string | undefined;
301
+ outputs?: {
302
+ name: string;
303
+ required?: boolean | undefined;
304
+ }[] | undefined;
248
305
  }, {
249
306
  run: string;
250
307
  name?: string | undefined;
@@ -255,6 +312,10 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
255
312
  uses?: undefined;
256
313
  with?: undefined;
257
314
  shell?: string | undefined;
315
+ outputs?: {
316
+ name: string;
317
+ required?: boolean | undefined;
318
+ }[] | undefined;
258
319
  }>, z.ZodObject<z.objectUtil.extendShape<{
259
320
  /**
260
321
  * Unique identifier for the step.
@@ -318,9 +379,10 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
318
379
  * - value1
319
380
  * arg4: ${{ steps.step1.outputs.test }}
320
381
  */
321
- with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
382
+ with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
322
383
  run: z.ZodOptional<z.ZodNever>;
323
384
  shell: z.ZodOptional<z.ZodNever>;
385
+ outputs: z.ZodOptional<z.ZodNever>;
324
386
  }>, "strip", z.ZodTypeAny, {
325
387
  uses: string;
326
388
  name?: string | undefined;
@@ -328,9 +390,10 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
328
390
  id?: string | undefined;
329
391
  if?: string | undefined;
330
392
  working_directory?: string | undefined;
331
- with?: Record<string, unknown> | undefined;
393
+ with?: Record<string, string | number | Record<string, any>> | undefined;
332
394
  run?: undefined;
333
395
  shell?: undefined;
396
+ outputs?: undefined;
334
397
  }, {
335
398
  uses: string;
336
399
  name?: string | undefined;
@@ -338,9 +401,10 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
338
401
  id?: string | undefined;
339
402
  if?: string | undefined;
340
403
  working_directory?: string | undefined;
341
- with?: Record<string, unknown> | undefined;
404
+ with?: Record<string, string | number | Record<string, any>> | undefined;
342
405
  run?: undefined;
343
406
  shell?: undefined;
407
+ outputs?: undefined;
344
408
  }>]>;
345
409
  /**
346
410
  * Structure of a custom EAS job step.
@@ -363,3 +427,6 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
363
427
  * - run: echo Hello, world!
364
428
  */
365
429
  export type Step = z.infer<typeof StepZ>;
430
+ export declare function validateSteps(maybeSteps: unknown): Step[];
431
+ export declare function isStepShellStep(step: Step): step is ShellStep;
432
+ export declare function isStepFunctionStep(step: Step): step is FunctionStep;
package/dist/step.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StepZ = exports.ShellStepZ = exports.FunctionStepZ = void 0;
3
+ exports.isStepFunctionStep = exports.isStepShellStep = exports.validateSteps = exports.StepZ = exports.ShellStepZ = exports.FunctionStepZ = void 0;
4
4
  const zod_1 = require("zod");
5
+ const StepOutputZ = zod_1.z.object({
6
+ name: zod_1.z.string(),
7
+ required: zod_1.z.boolean().optional(),
8
+ });
5
9
  const CommonStepZ = zod_1.z.object({
6
10
  /**
7
11
  * Unique identifier for the step.
@@ -66,9 +70,10 @@ exports.FunctionStepZ = CommonStepZ.extend({
66
70
  * - value1
67
71
  * arg4: ${{ steps.step1.outputs.test }}
68
72
  */
69
- with: zod_1.z.record(zod_1.z.unknown()).optional(),
73
+ with: zod_1.z.record(zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.record(zod_1.z.any())], zod_1.z.boolean())).optional(),
70
74
  run: zod_1.z.never().optional(),
71
75
  shell: zod_1.z.never().optional(),
76
+ outputs: zod_1.z.never().optional(),
72
77
  });
73
78
  exports.ShellStepZ = CommonStepZ.extend({
74
79
  /**
@@ -93,8 +98,33 @@ exports.ShellStepZ = CommonStepZ.extend({
93
98
  * @default 'bash'
94
99
  */
95
100
  shell: zod_1.z.string().optional(),
101
+ /**
102
+ * The outputs of the step.
103
+ *
104
+ * @example
105
+ * outputs:
106
+ * - name: my_output
107
+ * required: true
108
+ * - name: my_optional_output
109
+ * required: false
110
+ * - name: my_optional_output_without_required
111
+ */
112
+ outputs: zod_1.z.array(StepOutputZ).optional(),
96
113
  uses: zod_1.z.never().optional(),
97
114
  with: zod_1.z.never().optional(),
98
115
  });
99
116
  exports.StepZ = zod_1.z.union([exports.ShellStepZ, exports.FunctionStepZ]);
117
+ function validateSteps(maybeSteps) {
118
+ const steps = zod_1.z.array(exports.StepZ).min(1).parse(maybeSteps);
119
+ return steps;
120
+ }
121
+ exports.validateSteps = validateSteps;
122
+ function isStepShellStep(step) {
123
+ return step.run !== undefined;
124
+ }
125
+ exports.isStepShellStep = isStepShellStep;
126
+ function isStepFunctionStep(step) {
127
+ return step.uses !== undefined;
128
+ }
129
+ exports.isStepFunctionStep = isStepFunctionStep;
100
130
  //# sourceMappingURL=step.js.map
package/dist/step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AE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC;AAIU,QAAA,KAAK,GAAG,OAAC,CAAC,KAAK,CAAC,CAAC,kBAAU,EAAE,qBAAa,CAAC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nconst CommonStepZ = z.object({\n /**\n * Unique identifier for the step.\n *\n * @example\n * id: step1\n */\n id: z.string().optional(),\n /**\n * Expression that determines whether the step should run.\n * Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).\n */\n if: z.string().optional(),\n /**\n * The name of the step.\n *\n * @example\n * name: 'Step 1'\n */\n name: z.string().optional(),\n /**\n * The working directory to run the step in.\n *\n * @example\n * working_directory: ./my-working-directory\n *\n * @default depends on the project settings\n */\n working_directory: z.string().optional(),\n /**\n * Env variables override for the step.\n *\n * @example\n * env:\n * MY_ENV_VAR: my-value\n * ANOTHER_ENV_VAR: another-value\n */\n env: z.record(z.string()).optional(),\n});\n\nexport const FunctionStepZ = CommonStepZ.extend({\n /**\n * The custom EAS function to run as a step.\n * It can be a function provided by EAS or a custom function defined by the user.\n *\n * @example\n * uses: eas/build\n *\n * @example\n * uses: my-custom-function\n */\n uses: z.string(),\n /**\n * The arguments to pass to the function.\n *\n * @example\n * with:\n * arg1: value1\n * arg2: ['ala', 'ma', 'kota']\n * arg3:\n * key1: value1\n * key2:\n * - value1\n * arg4: ${{ steps.step1.outputs.test }}\n */\n with: z.record(z.unknown()).optional(),\n\n run: z.never().optional(),\n shell: z.never().optional(),\n});\n\nexport type FunctionStep = z.infer<typeof FunctionStepZ>;\n\nexport const ShellStepZ = CommonStepZ.extend({\n /**\n * The command-line programs to run as a step.\n *\n * @example\n * run: echo Hello, world!\n *\n * @example\n * run: |\n * npm install\n * npx expo prebuild\n * pod install\n */\n run: z.string(),\n /**\n * The shell to run the \"run\" command with.\n *\n * @example\n * shell: 'sh'\n *\n * @default 'bash'\n */\n shell: z.string().optional(),\n\n uses: z.never().optional(),\n with: z.never().optional(),\n});\n\nexport type ShellStep = z.infer<typeof ShellStepZ>;\n\nexport const StepZ = z.union([ShellStepZ, FunctionStepZ]);\n\n/**\n * Structure of a custom EAS job step.\n *\n * GHA step fields skipped here:\n * - `with.entrypoint`\n * - `continue-on-error`\n * - `timeout-minutes`\n *\n * * @example\n * steps:\n * - uses: eas/maestro-test\n * id: step1\n * name: Step 1\n * with:\n * flow_path: |\n * maestro/sign_in.yaml\n * maestro/create_post.yaml\n * maestro/sign_out.yaml\n * - run: echo Hello, world!\n */\nexport type Step = z.infer<typeof StepZ>;\n"]}
1
+ {"version":3,"file":"step.js","sourceRoot":"","sources":["../src/step.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB;;;OAGG;IACH,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzB;;;;;OAKG;IACH,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B;;;;;;;OAOG;IACH,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC;;;;;;;OAOG;IACH,GAAG,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,WAAW,CAAC,MAAM,CAAC;IAC9C;;;;;;;;;OASG;IACH,IAAI,EAAE,OAAC,CAA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;AAED,SAAgB,eAAe,CAAC,IAAU;IACxC,OAAO,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC;AAChC,CAAC;AAFD,0CAEC;AAED,SAAgB,kBAAkB,CAAC,IAAU;IAC3C,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;AACjC,CAAC;AAFD,gDAEC","sourcesContent":["import { z } from 'zod';\n\nconst StepOutputZ = z.object({\n name: z.string(),\n required: z.boolean().optional(),\n});\n\nconst CommonStepZ = z.object({\n /**\n * Unique identifier for the step.\n *\n * @example\n * id: step1\n */\n id: z.string().optional(),\n /**\n * Expression that determines whether the step should run.\n * Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).\n */\n if: z.string().optional(),\n /**\n * The name of the step.\n *\n * @example\n * name: 'Step 1'\n */\n name: z.string().optional(),\n /**\n * The working directory to run the step in.\n *\n * @example\n * working_directory: ./my-working-directory\n *\n * @default depends on the project settings\n */\n working_directory: z.string().optional(),\n /**\n * Env variables override for the step.\n *\n * @example\n * env:\n * MY_ENV_VAR: my-value\n * ANOTHER_ENV_VAR: another-value\n */\n env: z.record(z.string()).optional(),\n});\n\nexport const FunctionStepZ = CommonStepZ.extend({\n /**\n * The custom EAS function to run as a step.\n * It can be a function provided by EAS or a custom function defined by the user.\n *\n * @example\n * uses: eas/build\n *\n * @example\n * uses: my-custom-function\n */\n uses: z.string(),\n /**\n * The arguments to pass to the function.\n *\n * @example\n * with:\n * arg1: value1\n * arg2: ['ala', 'ma', 'kota']\n * arg3:\n * key1: value1\n * key2:\n * - value1\n * arg4: ${{ steps.step1.outputs.test }}\n */\n with: z.record(z.union([z.string(), z.number(), z.record(z.any())], z.boolean())).optional(),\n\n run: z.never().optional(),\n shell: z.never().optional(),\n outputs: z.never().optional(),\n});\n\nexport type FunctionStep = z.infer<typeof FunctionStepZ>;\n\nexport const ShellStepZ = CommonStepZ.extend({\n /**\n * The command-line programs to run as a step.\n *\n * @example\n * run: echo Hello, world!\n *\n * @example\n * run: |\n * npm install\n * npx expo prebuild\n * pod install\n */\n run: z.string(),\n /**\n * The shell to run the \"run\" command with.\n *\n * @example\n * shell: 'sh'\n *\n * @default 'bash'\n */\n shell: z.string().optional(),\n /**\n * The outputs of the step.\n *\n * @example\n * outputs:\n * - name: my_output\n * required: true\n * - name: my_optional_output\n * required: false\n * - name: my_optional_output_without_required\n */\n outputs: z.array(StepOutputZ).optional(),\n\n uses: z.never().optional(),\n with: z.never().optional(),\n});\n\nexport type ShellStep = z.infer<typeof ShellStepZ>;\n\nexport const StepZ = z.union([ShellStepZ, FunctionStepZ]);\n\n/**\n * Structure of a custom EAS job step.\n *\n * GHA step fields skipped here:\n * - `with.entrypoint`\n * - `continue-on-error`\n * - `timeout-minutes`\n *\n * * @example\n * steps:\n * - uses: eas/maestro-test\n * id: step1\n * name: Step 1\n * with:\n * flow_path: |\n * maestro/sign_in.yaml\n * maestro/create_post.yaml\n * maestro/sign_out.yaml\n * - run: echo Hello, world!\n */\nexport type Step = z.infer<typeof StepZ>;\n\nexport function validateSteps(maybeSteps: unknown): Step[] {\n const steps = z.array(StepZ).min(1).parse(maybeSteps);\n return steps;\n}\n\nexport function isStepShellStep(step: Step): step is ShellStep {\n return step.run !== undefined;\n}\n\nexport function isStepFunctionStep(step: Step): step is FunctionStep {\n return step.uses !== undefined;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/eas-build-job",
3
- "version": "1.0.126",
3
+ "version": "1.0.129",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -35,5 +35,5 @@
35
35
  "node": "20.14.0",
36
36
  "yarn": "1.22.21"
37
37
  },
38
- "gitHead": "b329acd121e1a7d98d71d0ecf7396c8b875612a9"
38
+ "gitHead": "102607955edb3c4959b806d213f1c1975d9bad52"
39
39
  }