@expo/eas-build-job 1.0.119 → 1.0.128
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/LICENSE +1 -1
- package/dist/generic.d.ts +353 -9
- package/dist/generic.js +14 -4
- package/dist/generic.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/step.d.ts +432 -0
- package/dist/step.js +130 -0
- package/dist/step.js.map +1 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -12,7 +12,7 @@ Additional Use Grant: You may make use of the Licensed Work, provided that you d
|
|
|
12
12
|
to access the functionality of and directly benefit from the
|
|
13
13
|
functionality of the Licensed Work.
|
|
14
14
|
|
|
15
|
-
Change Date: 2027-
|
|
15
|
+
Change Date: 2027-07-01
|
|
16
16
|
|
|
17
17
|
Change License: MIT
|
|
18
18
|
|
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,6 +50,76 @@ export declare namespace Generic {
|
|
|
50
50
|
bucketKey: string;
|
|
51
51
|
metadataLocation?: string | undefined;
|
|
52
52
|
}>]>;
|
|
53
|
+
secrets: z.ZodObject<{
|
|
54
|
+
robotAccessToken: z.ZodString;
|
|
55
|
+
environmentSecrets: z.ZodArray<z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
value: z.ZodString;
|
|
58
|
+
type: z.ZodNativeEnum<typeof import("./common").EnvironmentSecretType>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
type: import("./common").EnvironmentSecretType;
|
|
61
|
+
value: string;
|
|
62
|
+
name: string;
|
|
63
|
+
}, {
|
|
64
|
+
type: import("./common").EnvironmentSecretType;
|
|
65
|
+
value: string;
|
|
66
|
+
name: string;
|
|
67
|
+
}>, "many">;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
environmentSecrets: {
|
|
70
|
+
type: import("./common").EnvironmentSecretType;
|
|
71
|
+
value: string;
|
|
72
|
+
name: string;
|
|
73
|
+
}[];
|
|
74
|
+
robotAccessToken: string;
|
|
75
|
+
}, {
|
|
76
|
+
environmentSecrets: {
|
|
77
|
+
type: import("./common").EnvironmentSecretType;
|
|
78
|
+
value: string;
|
|
79
|
+
name: string;
|
|
80
|
+
}[];
|
|
81
|
+
robotAccessToken: string;
|
|
82
|
+
}>;
|
|
83
|
+
expoDevUrl: z.ZodString;
|
|
84
|
+
builderEnvironment: z.ZodObject<{
|
|
85
|
+
image: z.ZodString;
|
|
86
|
+
node: z.ZodOptional<z.ZodString>;
|
|
87
|
+
yarn: z.ZodOptional<z.ZodString>;
|
|
88
|
+
pnpm: z.ZodOptional<z.ZodString>;
|
|
89
|
+
bun: z.ZodOptional<z.ZodString>;
|
|
90
|
+
env: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
91
|
+
ndk: z.ZodOptional<z.ZodString>;
|
|
92
|
+
bundler: z.ZodOptional<z.ZodString>;
|
|
93
|
+
fastlane: z.ZodOptional<z.ZodString>;
|
|
94
|
+
cocoapods: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
env: Record<string, string>;
|
|
97
|
+
image: string;
|
|
98
|
+
node?: string | undefined;
|
|
99
|
+
yarn?: string | undefined;
|
|
100
|
+
pnpm?: string | undefined;
|
|
101
|
+
bun?: string | undefined;
|
|
102
|
+
ndk?: string | undefined;
|
|
103
|
+
bundler?: string | undefined;
|
|
104
|
+
fastlane?: string | undefined;
|
|
105
|
+
cocoapods?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
env: Record<string, string>;
|
|
108
|
+
image: string;
|
|
109
|
+
node?: string | undefined;
|
|
110
|
+
yarn?: string | undefined;
|
|
111
|
+
pnpm?: string | undefined;
|
|
112
|
+
bun?: string | undefined;
|
|
113
|
+
ndk?: string | undefined;
|
|
114
|
+
bundler?: string | undefined;
|
|
115
|
+
fastlane?: string | undefined;
|
|
116
|
+
cocoapods?: string | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
platform: z.ZodOptional<z.ZodNever>;
|
|
119
|
+
type: z.ZodOptional<z.ZodNever>;
|
|
120
|
+
triggeredBy: z.ZodLiteral<BuildTrigger.GIT_BASED_INTEGRATION>;
|
|
121
|
+
loggerLevel: z.ZodOptional<z.ZodNativeEnum<typeof LoggerLevel>>;
|
|
122
|
+
}, {
|
|
53
123
|
customBuildConfig: z.ZodObject<{
|
|
54
124
|
path: z.ZodString;
|
|
55
125
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -57,6 +127,146 @@ export declare namespace Generic {
|
|
|
57
127
|
}, {
|
|
58
128
|
path: string;
|
|
59
129
|
}>;
|
|
130
|
+
steps: z.ZodOptional<z.ZodNever>;
|
|
131
|
+
}>, "strip", z.ZodTypeAny, {
|
|
132
|
+
builderEnvironment: {
|
|
133
|
+
env: Record<string, string>;
|
|
134
|
+
image: string;
|
|
135
|
+
node?: string | undefined;
|
|
136
|
+
yarn?: string | undefined;
|
|
137
|
+
pnpm?: string | undefined;
|
|
138
|
+
bun?: string | undefined;
|
|
139
|
+
ndk?: string | undefined;
|
|
140
|
+
bundler?: string | undefined;
|
|
141
|
+
fastlane?: string | undefined;
|
|
142
|
+
cocoapods?: string | undefined;
|
|
143
|
+
};
|
|
144
|
+
triggeredBy: BuildTrigger.GIT_BASED_INTEGRATION;
|
|
145
|
+
projectArchive: {
|
|
146
|
+
type: import("./common").ArchiveSourceType.GIT;
|
|
147
|
+
repositoryUrl: string;
|
|
148
|
+
gitRef: string | null;
|
|
149
|
+
gitCommitHash: string;
|
|
150
|
+
} | {
|
|
151
|
+
type: import("./common").ArchiveSourceType.PATH;
|
|
152
|
+
path: string;
|
|
153
|
+
} | {
|
|
154
|
+
type: import("./common").ArchiveSourceType.URL;
|
|
155
|
+
url: string;
|
|
156
|
+
} | {
|
|
157
|
+
type: import("./common").ArchiveSourceType.GCS;
|
|
158
|
+
bucketKey: string;
|
|
159
|
+
metadataLocation?: string | undefined;
|
|
160
|
+
};
|
|
161
|
+
secrets: {
|
|
162
|
+
environmentSecrets: {
|
|
163
|
+
type: import("./common").EnvironmentSecretType;
|
|
164
|
+
value: string;
|
|
165
|
+
name: string;
|
|
166
|
+
}[];
|
|
167
|
+
robotAccessToken: string;
|
|
168
|
+
};
|
|
169
|
+
customBuildConfig: {
|
|
170
|
+
path: string;
|
|
171
|
+
};
|
|
172
|
+
expoDevUrl: string;
|
|
173
|
+
type?: undefined;
|
|
174
|
+
platform?: undefined;
|
|
175
|
+
loggerLevel?: LoggerLevel | undefined;
|
|
176
|
+
steps?: undefined;
|
|
177
|
+
}, {
|
|
178
|
+
builderEnvironment: {
|
|
179
|
+
env: Record<string, string>;
|
|
180
|
+
image: string;
|
|
181
|
+
node?: string | undefined;
|
|
182
|
+
yarn?: string | undefined;
|
|
183
|
+
pnpm?: string | undefined;
|
|
184
|
+
bun?: string | undefined;
|
|
185
|
+
ndk?: string | undefined;
|
|
186
|
+
bundler?: string | undefined;
|
|
187
|
+
fastlane?: string | undefined;
|
|
188
|
+
cocoapods?: string | undefined;
|
|
189
|
+
};
|
|
190
|
+
triggeredBy: BuildTrigger.GIT_BASED_INTEGRATION;
|
|
191
|
+
projectArchive: {
|
|
192
|
+
type: import("./common").ArchiveSourceType.GIT;
|
|
193
|
+
repositoryUrl: string;
|
|
194
|
+
gitRef: string | null;
|
|
195
|
+
gitCommitHash: string;
|
|
196
|
+
} | {
|
|
197
|
+
type: import("./common").ArchiveSourceType.PATH;
|
|
198
|
+
path: string;
|
|
199
|
+
} | {
|
|
200
|
+
type: import("./common").ArchiveSourceType.URL;
|
|
201
|
+
url: string;
|
|
202
|
+
} | {
|
|
203
|
+
type: import("./common").ArchiveSourceType.GCS;
|
|
204
|
+
bucketKey: string;
|
|
205
|
+
metadataLocation?: string | undefined;
|
|
206
|
+
};
|
|
207
|
+
secrets: {
|
|
208
|
+
environmentSecrets: {
|
|
209
|
+
type: import("./common").EnvironmentSecretType;
|
|
210
|
+
value: string;
|
|
211
|
+
name: string;
|
|
212
|
+
}[];
|
|
213
|
+
robotAccessToken: string;
|
|
214
|
+
};
|
|
215
|
+
customBuildConfig: {
|
|
216
|
+
path: string;
|
|
217
|
+
};
|
|
218
|
+
expoDevUrl: string;
|
|
219
|
+
type?: undefined;
|
|
220
|
+
platform?: undefined;
|
|
221
|
+
loggerLevel?: LoggerLevel | undefined;
|
|
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
|
+
}>]>;
|
|
60
270
|
secrets: z.ZodObject<{
|
|
61
271
|
robotAccessToken: z.ZodString;
|
|
62
272
|
environmentSecrets: z.ZodArray<z.ZodObject<{
|
|
@@ -126,7 +336,93 @@ export declare namespace Generic {
|
|
|
126
336
|
type: z.ZodOptional<z.ZodNever>;
|
|
127
337
|
triggeredBy: z.ZodLiteral<BuildTrigger.GIT_BASED_INTEGRATION>;
|
|
128
338
|
loggerLevel: z.ZodOptional<z.ZodNativeEnum<typeof LoggerLevel>>;
|
|
129
|
-
},
|
|
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;
|
|
364
|
+
name?: string | undefined;
|
|
365
|
+
env?: Record<string, string> | undefined;
|
|
366
|
+
id?: string | undefined;
|
|
367
|
+
if?: string | undefined;
|
|
368
|
+
working_directory?: string | undefined;
|
|
369
|
+
uses?: undefined;
|
|
370
|
+
with?: undefined;
|
|
371
|
+
shell?: string | undefined;
|
|
372
|
+
outputs?: {
|
|
373
|
+
name: string;
|
|
374
|
+
required?: boolean | undefined;
|
|
375
|
+
}[] | undefined;
|
|
376
|
+
}, {
|
|
377
|
+
run: string;
|
|
378
|
+
name?: string | undefined;
|
|
379
|
+
env?: Record<string, string> | undefined;
|
|
380
|
+
id?: string | undefined;
|
|
381
|
+
if?: string | undefined;
|
|
382
|
+
working_directory?: string | undefined;
|
|
383
|
+
uses?: undefined;
|
|
384
|
+
with?: undefined;
|
|
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, {
|
|
130
426
|
builderEnvironment: {
|
|
131
427
|
env: Record<string, string>;
|
|
132
428
|
image: string;
|
|
@@ -164,12 +460,36 @@ export declare namespace Generic {
|
|
|
164
460
|
}[];
|
|
165
461
|
robotAccessToken: string;
|
|
166
462
|
};
|
|
167
|
-
customBuildConfig: {
|
|
168
|
-
path: string;
|
|
169
|
-
};
|
|
170
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
|
+
})[];
|
|
171
490
|
type?: undefined;
|
|
172
491
|
platform?: undefined;
|
|
492
|
+
customBuildConfig?: undefined;
|
|
173
493
|
loggerLevel?: LoggerLevel | undefined;
|
|
174
494
|
}, {
|
|
175
495
|
builderEnvironment: {
|
|
@@ -209,12 +529,36 @@ export declare namespace Generic {
|
|
|
209
529
|
}[];
|
|
210
530
|
robotAccessToken: string;
|
|
211
531
|
};
|
|
212
|
-
customBuildConfig: {
|
|
213
|
-
path: string;
|
|
214
|
-
};
|
|
215
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
|
+
})[];
|
|
216
559
|
type?: undefined;
|
|
217
560
|
platform?: undefined;
|
|
561
|
+
customBuildConfig?: undefined;
|
|
218
562
|
loggerLevel?: LoggerLevel | undefined;
|
|
219
|
-
}>;
|
|
563
|
+
}>]>;
|
|
220
564
|
}
|
package/dist/generic.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.Generic = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const logger_1 = require("@expo/logger");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
|
+
const step_1 = require("./step");
|
|
7
8
|
var Generic;
|
|
8
9
|
(function (Generic) {
|
|
9
10
|
const BuilderEnvironmentSchemaZ = zod_1.z.object({
|
|
@@ -20,11 +21,8 @@ var Generic;
|
|
|
20
21
|
fastlane: zod_1.z.string().optional(),
|
|
21
22
|
cocoapods: zod_1.z.string().optional(),
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
+
const CommonJobZ = zod_1.z.object({
|
|
24
25
|
projectArchive: common_1.ArchiveSourceSchemaZ,
|
|
25
|
-
customBuildConfig: zod_1.z.object({
|
|
26
|
-
path: zod_1.z.string(),
|
|
27
|
-
}),
|
|
28
26
|
secrets: zod_1.z.object({
|
|
29
27
|
robotAccessToken: zod_1.z.string(),
|
|
30
28
|
environmentSecrets: zod_1.z.array(common_1.EnvironmentSecretZ),
|
|
@@ -37,5 +35,17 @@ var Generic;
|
|
|
37
35
|
triggeredBy: zod_1.z.literal(common_1.BuildTrigger.GIT_BASED_INTEGRATION),
|
|
38
36
|
loggerLevel: zod_1.z.nativeEnum(logger_1.LoggerLevel).optional(),
|
|
39
37
|
});
|
|
38
|
+
Generic.JobZ = zod_1.z.union([
|
|
39
|
+
CommonJobZ.extend({
|
|
40
|
+
customBuildConfig: zod_1.z.object({
|
|
41
|
+
path: zod_1.z.string(),
|
|
42
|
+
}),
|
|
43
|
+
steps: zod_1.z.never().optional(),
|
|
44
|
+
}),
|
|
45
|
+
CommonJobZ.extend({
|
|
46
|
+
customBuildConfig: zod_1.z.never().optional(),
|
|
47
|
+
steps: zod_1.z.array(step_1.StepZ).min(1),
|
|
48
|
+
}),
|
|
49
|
+
]);
|
|
40
50
|
})(Generic || (exports.Generic = Generic = {}));
|
|
41
51
|
//# sourceMappingURL=generic.js.map
|
package/dist/generic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAA2C;AAE3C,qCAAkF;
|
|
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,CA4CvB;AA5CD,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;QAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,GAAG,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;QACzB,QAAQ;QACR,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC1B,QAAQ;QACR,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACjC,CAAC,CAAC;IAGH,MAAM,UAAU,GAAG,OAAC,CAAC,MAAM,CAAC;QAC1B,cAAc,EAAE,6BAAoB;QACpC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YAChB,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE;YAC5B,kBAAkB,EAAE,OAAC,CAAC,KAAK,CAAC,2BAAkB,CAAC;SAChD,CAAC;QACF,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;QAC5B,kBAAkB,EAAE,yBAAyB;QAC7C,uEAAuE;QACvE,QAAQ,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC9B,IAAI,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC1B,WAAW,EAAE,OAAC,CAAC,OAAO,CAAC,qBAAY,CAAC,qBAAqB,CAAC;QAC1D,WAAW,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAW,CAAC,CAAC,QAAQ,EAAE;KAClD,CAAC,CAAC;IAEU,YAAI,GAAG,OAAC,CAAC,KAAK,CAAC;QAC1B,UAAU,CAAC,MAAM,CAAC;YAChB,iBAAiB,EAAE,OAAC,CAAC,MAAM,CAAC;gBAC1B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;aACjB,CAAC;YACF,KAAK,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;SAC5B,CAAC;QACF,UAAU,CAAC,MAAM,CAAC;YAChB,iBAAiB,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;YACvC,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,YAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7B,CAAC;KACH,CAAC,CAAC;AACL,CAAC,EA5CgB,OAAO,uBAAP,OAAO,QA4CvB","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 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 export const JobZ = z.union([\n CommonJobZ.extend({\n customBuildConfig: z.object({\n path: z.string(),\n }),\n steps: z.never().optional(),\n }),\n CommonJobZ.extend({\n customBuildConfig: z.never().optional(),\n steps: z.array(StepZ).min(1),\n }),\n ]);\n}\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -45,4 +45,5 @@ exports.errors = __importStar(require("./errors"));
|
|
|
45
45
|
__exportStar(require("./artifacts"), exports);
|
|
46
46
|
__exportStar(require("./context"), exports);
|
|
47
47
|
__exportStar(require("./generic"), exports);
|
|
48
|
+
__exportStar(require("./step"), exports);
|
|
48
49
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAqC;AACrC,6CAA6B;AAC7B,mCAYkB;AAXhB,2GAAA,iBAAiB,OAAA;AAEjB,mGAAA,SAAS,OAAA;AAET,sGAAA,YAAY,OAAA;AAGZ,+GAAA,qBAAqB,OAAA;AACrB,kGAAA,QAAQ,OAAA;AACR,kGAAA,QAAQ,OAAA;AAGV,uCAAkG;AAA/E,4GAAA,gBAAgB,OAAA;AAAqB,iHAAA,qBAAqB,OAAA;AAC7E,wCAAsB;AACtB,yCAAuB;AACvB,mDAAmC;AACnC,8CAA4B;AAC5B,4CAA0B;AAC1B,4CAA0B","sourcesContent":["export * as Android from './android';\nexport * as Ios from './ios';\nexport {\n ArchiveSourceType,\n ArchiveSource,\n BuildMode,\n BuildPhaseStats,\n BuildTrigger,\n Env,\n EnvironmentSecret,\n EnvironmentSecretType,\n Workflow,\n Platform,\n Cache,\n} from './common';\nexport { Metadata, sanitizeMetadata, FingerprintSource, FingerprintSourceType } from './metadata';\nexport * from './job';\nexport * from './logs';\nexport * as errors from './errors';\nexport * from './artifacts';\nexport * from './context';\nexport * from './generic';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAqC;AACrC,6CAA6B;AAC7B,mCAYkB;AAXhB,2GAAA,iBAAiB,OAAA;AAEjB,mGAAA,SAAS,OAAA;AAET,sGAAA,YAAY,OAAA;AAGZ,+GAAA,qBAAqB,OAAA;AACrB,kGAAA,QAAQ,OAAA;AACR,kGAAA,QAAQ,OAAA;AAGV,uCAAkG;AAA/E,4GAAA,gBAAgB,OAAA;AAAqB,iHAAA,qBAAqB,OAAA;AAC7E,wCAAsB;AACtB,yCAAuB;AACvB,mDAAmC;AACnC,8CAA4B;AAC5B,4CAA0B;AAC1B,4CAA0B;AAC1B,yCAAuB","sourcesContent":["export * as Android from './android';\nexport * as Ios from './ios';\nexport {\n ArchiveSourceType,\n ArchiveSource,\n BuildMode,\n BuildPhaseStats,\n BuildTrigger,\n Env,\n EnvironmentSecret,\n EnvironmentSecretType,\n Workflow,\n Platform,\n Cache,\n} from './common';\nexport { Metadata, sanitizeMetadata, FingerprintSource, FingerprintSourceType } from './metadata';\nexport * from './job';\nexport * from './logs';\nexport * as errors from './errors';\nexport * from './artifacts';\nexport * from './context';\nexport * from './generic';\nexport * from './step';\n"]}
|
package/dist/step.d.ts
ADDED
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FunctionStepZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier for the step.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* id: step1
|
|
8
|
+
*/
|
|
9
|
+
id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
/**
|
|
11
|
+
* Expression that determines whether the step should run.
|
|
12
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
13
|
+
*/
|
|
14
|
+
if: z.ZodOptional<z.ZodString>;
|
|
15
|
+
/**
|
|
16
|
+
* The name of the step.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* name: 'Step 1'
|
|
20
|
+
*/
|
|
21
|
+
name: z.ZodOptional<z.ZodString>;
|
|
22
|
+
/**
|
|
23
|
+
* The working directory to run the step in.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* working_directory: ./my-working-directory
|
|
27
|
+
*
|
|
28
|
+
* @default depends on the project settings
|
|
29
|
+
*/
|
|
30
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
31
|
+
/**
|
|
32
|
+
* Env variables override for the step.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* env:
|
|
36
|
+
* MY_ENV_VAR: my-value
|
|
37
|
+
* ANOTHER_ENV_VAR: another-value
|
|
38
|
+
*/
|
|
39
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
40
|
+
}, {
|
|
41
|
+
/**
|
|
42
|
+
* The custom EAS function to run as a step.
|
|
43
|
+
* It can be a function provided by EAS or a custom function defined by the user.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* uses: eas/build
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* uses: my-custom-function
|
|
50
|
+
*/
|
|
51
|
+
uses: z.ZodString;
|
|
52
|
+
/**
|
|
53
|
+
* The arguments to pass to the function.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* with:
|
|
57
|
+
* arg1: value1
|
|
58
|
+
* arg2: ['ala', 'ma', 'kota']
|
|
59
|
+
* arg3:
|
|
60
|
+
* key1: value1
|
|
61
|
+
* key2:
|
|
62
|
+
* - value1
|
|
63
|
+
* arg4: ${{ steps.step1.outputs.test }}
|
|
64
|
+
*/
|
|
65
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
|
|
66
|
+
run: z.ZodOptional<z.ZodNever>;
|
|
67
|
+
shell: z.ZodOptional<z.ZodNever>;
|
|
68
|
+
outputs: z.ZodOptional<z.ZodNever>;
|
|
69
|
+
}>, "strip", z.ZodTypeAny, {
|
|
70
|
+
uses: string;
|
|
71
|
+
name?: string | undefined;
|
|
72
|
+
env?: Record<string, string> | undefined;
|
|
73
|
+
id?: string | undefined;
|
|
74
|
+
if?: string | undefined;
|
|
75
|
+
working_directory?: string | undefined;
|
|
76
|
+
with?: Record<string, string | number | Record<string, any>> | undefined;
|
|
77
|
+
run?: undefined;
|
|
78
|
+
shell?: undefined;
|
|
79
|
+
outputs?: undefined;
|
|
80
|
+
}, {
|
|
81
|
+
uses: string;
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
env?: Record<string, string> | undefined;
|
|
84
|
+
id?: string | undefined;
|
|
85
|
+
if?: string | undefined;
|
|
86
|
+
working_directory?: string | undefined;
|
|
87
|
+
with?: Record<string, string | number | Record<string, any>> | undefined;
|
|
88
|
+
run?: undefined;
|
|
89
|
+
shell?: undefined;
|
|
90
|
+
outputs?: undefined;
|
|
91
|
+
}>;
|
|
92
|
+
export type FunctionStep = z.infer<typeof FunctionStepZ>;
|
|
93
|
+
export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
|
|
94
|
+
/**
|
|
95
|
+
* Unique identifier for the step.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* id: step1
|
|
99
|
+
*/
|
|
100
|
+
id: z.ZodOptional<z.ZodString>;
|
|
101
|
+
/**
|
|
102
|
+
* Expression that determines whether the step should run.
|
|
103
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
104
|
+
*/
|
|
105
|
+
if: z.ZodOptional<z.ZodString>;
|
|
106
|
+
/**
|
|
107
|
+
* The name of the step.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* name: 'Step 1'
|
|
111
|
+
*/
|
|
112
|
+
name: z.ZodOptional<z.ZodString>;
|
|
113
|
+
/**
|
|
114
|
+
* The working directory to run the step in.
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* working_directory: ./my-working-directory
|
|
118
|
+
*
|
|
119
|
+
* @default depends on the project settings
|
|
120
|
+
*/
|
|
121
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
122
|
+
/**
|
|
123
|
+
* Env variables override for the step.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* env:
|
|
127
|
+
* MY_ENV_VAR: my-value
|
|
128
|
+
* ANOTHER_ENV_VAR: another-value
|
|
129
|
+
*/
|
|
130
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
131
|
+
}, {
|
|
132
|
+
/**
|
|
133
|
+
* The command-line programs to run as a step.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* run: echo Hello, world!
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* run: |
|
|
140
|
+
* npm install
|
|
141
|
+
* npx expo prebuild
|
|
142
|
+
* pod install
|
|
143
|
+
*/
|
|
144
|
+
run: z.ZodString;
|
|
145
|
+
/**
|
|
146
|
+
* The shell to run the "run" command with.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* shell: 'sh'
|
|
150
|
+
*
|
|
151
|
+
* @default 'bash'
|
|
152
|
+
*/
|
|
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">>;
|
|
175
|
+
uses: z.ZodOptional<z.ZodNever>;
|
|
176
|
+
with: z.ZodOptional<z.ZodNever>;
|
|
177
|
+
}>, "strip", z.ZodTypeAny, {
|
|
178
|
+
run: string;
|
|
179
|
+
name?: string | undefined;
|
|
180
|
+
env?: Record<string, string> | undefined;
|
|
181
|
+
id?: string | undefined;
|
|
182
|
+
if?: string | undefined;
|
|
183
|
+
working_directory?: string | undefined;
|
|
184
|
+
uses?: undefined;
|
|
185
|
+
with?: undefined;
|
|
186
|
+
shell?: string | undefined;
|
|
187
|
+
outputs?: {
|
|
188
|
+
name: string;
|
|
189
|
+
required?: boolean | undefined;
|
|
190
|
+
}[] | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
run: string;
|
|
193
|
+
name?: string | undefined;
|
|
194
|
+
env?: Record<string, string> | undefined;
|
|
195
|
+
id?: string | undefined;
|
|
196
|
+
if?: string | undefined;
|
|
197
|
+
working_directory?: string | undefined;
|
|
198
|
+
uses?: undefined;
|
|
199
|
+
with?: undefined;
|
|
200
|
+
shell?: string | undefined;
|
|
201
|
+
outputs?: {
|
|
202
|
+
name: string;
|
|
203
|
+
required?: boolean | undefined;
|
|
204
|
+
}[] | undefined;
|
|
205
|
+
}>;
|
|
206
|
+
export type ShellStep = z.infer<typeof ShellStepZ>;
|
|
207
|
+
export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
208
|
+
/**
|
|
209
|
+
* Unique identifier for the step.
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* id: step1
|
|
213
|
+
*/
|
|
214
|
+
id: z.ZodOptional<z.ZodString>;
|
|
215
|
+
/**
|
|
216
|
+
* Expression that determines whether the step should run.
|
|
217
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
218
|
+
*/
|
|
219
|
+
if: z.ZodOptional<z.ZodString>;
|
|
220
|
+
/**
|
|
221
|
+
* The name of the step.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* name: 'Step 1'
|
|
225
|
+
*/
|
|
226
|
+
name: z.ZodOptional<z.ZodString>;
|
|
227
|
+
/**
|
|
228
|
+
* The working directory to run the step in.
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* working_directory: ./my-working-directory
|
|
232
|
+
*
|
|
233
|
+
* @default depends on the project settings
|
|
234
|
+
*/
|
|
235
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
236
|
+
/**
|
|
237
|
+
* Env variables override for the step.
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* env:
|
|
241
|
+
* MY_ENV_VAR: my-value
|
|
242
|
+
* ANOTHER_ENV_VAR: another-value
|
|
243
|
+
*/
|
|
244
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
245
|
+
}, {
|
|
246
|
+
/**
|
|
247
|
+
* The command-line programs to run as a step.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* run: echo Hello, world!
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* run: |
|
|
254
|
+
* npm install
|
|
255
|
+
* npx expo prebuild
|
|
256
|
+
* pod install
|
|
257
|
+
*/
|
|
258
|
+
run: z.ZodString;
|
|
259
|
+
/**
|
|
260
|
+
* The shell to run the "run" command with.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* shell: 'sh'
|
|
264
|
+
*
|
|
265
|
+
* @default 'bash'
|
|
266
|
+
*/
|
|
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">>;
|
|
289
|
+
uses: z.ZodOptional<z.ZodNever>;
|
|
290
|
+
with: z.ZodOptional<z.ZodNever>;
|
|
291
|
+
}>, "strip", z.ZodTypeAny, {
|
|
292
|
+
run: string;
|
|
293
|
+
name?: string | undefined;
|
|
294
|
+
env?: Record<string, string> | undefined;
|
|
295
|
+
id?: string | undefined;
|
|
296
|
+
if?: string | undefined;
|
|
297
|
+
working_directory?: string | undefined;
|
|
298
|
+
uses?: undefined;
|
|
299
|
+
with?: undefined;
|
|
300
|
+
shell?: string | undefined;
|
|
301
|
+
outputs?: {
|
|
302
|
+
name: string;
|
|
303
|
+
required?: boolean | undefined;
|
|
304
|
+
}[] | undefined;
|
|
305
|
+
}, {
|
|
306
|
+
run: string;
|
|
307
|
+
name?: string | undefined;
|
|
308
|
+
env?: Record<string, string> | undefined;
|
|
309
|
+
id?: string | undefined;
|
|
310
|
+
if?: string | undefined;
|
|
311
|
+
working_directory?: string | undefined;
|
|
312
|
+
uses?: undefined;
|
|
313
|
+
with?: undefined;
|
|
314
|
+
shell?: string | undefined;
|
|
315
|
+
outputs?: {
|
|
316
|
+
name: string;
|
|
317
|
+
required?: boolean | undefined;
|
|
318
|
+
}[] | undefined;
|
|
319
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
320
|
+
/**
|
|
321
|
+
* Unique identifier for the step.
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* id: step1
|
|
325
|
+
*/
|
|
326
|
+
id: z.ZodOptional<z.ZodString>;
|
|
327
|
+
/**
|
|
328
|
+
* Expression that determines whether the step should run.
|
|
329
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
330
|
+
*/
|
|
331
|
+
if: z.ZodOptional<z.ZodString>;
|
|
332
|
+
/**
|
|
333
|
+
* The name of the step.
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* name: 'Step 1'
|
|
337
|
+
*/
|
|
338
|
+
name: z.ZodOptional<z.ZodString>;
|
|
339
|
+
/**
|
|
340
|
+
* The working directory to run the step in.
|
|
341
|
+
*
|
|
342
|
+
* @example
|
|
343
|
+
* working_directory: ./my-working-directory
|
|
344
|
+
*
|
|
345
|
+
* @default depends on the project settings
|
|
346
|
+
*/
|
|
347
|
+
working_directory: z.ZodOptional<z.ZodString>;
|
|
348
|
+
/**
|
|
349
|
+
* Env variables override for the step.
|
|
350
|
+
*
|
|
351
|
+
* @example
|
|
352
|
+
* env:
|
|
353
|
+
* MY_ENV_VAR: my-value
|
|
354
|
+
* ANOTHER_ENV_VAR: another-value
|
|
355
|
+
*/
|
|
356
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
357
|
+
}, {
|
|
358
|
+
/**
|
|
359
|
+
* The custom EAS function to run as a step.
|
|
360
|
+
* It can be a function provided by EAS or a custom function defined by the user.
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* uses: eas/build
|
|
364
|
+
*
|
|
365
|
+
* @example
|
|
366
|
+
* uses: my-custom-function
|
|
367
|
+
*/
|
|
368
|
+
uses: z.ZodString;
|
|
369
|
+
/**
|
|
370
|
+
* The arguments to pass to the function.
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* with:
|
|
374
|
+
* arg1: value1
|
|
375
|
+
* arg2: ['ala', 'ma', 'kota']
|
|
376
|
+
* arg3:
|
|
377
|
+
* key1: value1
|
|
378
|
+
* key2:
|
|
379
|
+
* - value1
|
|
380
|
+
* arg4: ${{ steps.step1.outputs.test }}
|
|
381
|
+
*/
|
|
382
|
+
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>;
|
|
383
|
+
run: z.ZodOptional<z.ZodNever>;
|
|
384
|
+
shell: z.ZodOptional<z.ZodNever>;
|
|
385
|
+
outputs: z.ZodOptional<z.ZodNever>;
|
|
386
|
+
}>, "strip", z.ZodTypeAny, {
|
|
387
|
+
uses: string;
|
|
388
|
+
name?: string | undefined;
|
|
389
|
+
env?: Record<string, string> | undefined;
|
|
390
|
+
id?: string | undefined;
|
|
391
|
+
if?: string | undefined;
|
|
392
|
+
working_directory?: string | undefined;
|
|
393
|
+
with?: Record<string, string | number | Record<string, any>> | undefined;
|
|
394
|
+
run?: undefined;
|
|
395
|
+
shell?: undefined;
|
|
396
|
+
outputs?: undefined;
|
|
397
|
+
}, {
|
|
398
|
+
uses: string;
|
|
399
|
+
name?: string | undefined;
|
|
400
|
+
env?: Record<string, string> | undefined;
|
|
401
|
+
id?: string | undefined;
|
|
402
|
+
if?: string | undefined;
|
|
403
|
+
working_directory?: string | undefined;
|
|
404
|
+
with?: Record<string, string | number | Record<string, any>> | undefined;
|
|
405
|
+
run?: undefined;
|
|
406
|
+
shell?: undefined;
|
|
407
|
+
outputs?: undefined;
|
|
408
|
+
}>]>;
|
|
409
|
+
/**
|
|
410
|
+
* Structure of a custom EAS job step.
|
|
411
|
+
*
|
|
412
|
+
* GHA step fields skipped here:
|
|
413
|
+
* - `with.entrypoint`
|
|
414
|
+
* - `continue-on-error`
|
|
415
|
+
* - `timeout-minutes`
|
|
416
|
+
*
|
|
417
|
+
* * @example
|
|
418
|
+
* steps:
|
|
419
|
+
* - uses: eas/maestro-test
|
|
420
|
+
* id: step1
|
|
421
|
+
* name: Step 1
|
|
422
|
+
* with:
|
|
423
|
+
* flow_path: |
|
|
424
|
+
* maestro/sign_in.yaml
|
|
425
|
+
* maestro/create_post.yaml
|
|
426
|
+
* maestro/sign_out.yaml
|
|
427
|
+
* - run: echo Hello, world!
|
|
428
|
+
*/
|
|
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
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isStepFunctionStep = exports.isStepShellStep = exports.validateSteps = exports.StepZ = exports.ShellStepZ = exports.FunctionStepZ = void 0;
|
|
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
|
+
});
|
|
9
|
+
const CommonStepZ = zod_1.z.object({
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier for the step.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* id: step1
|
|
15
|
+
*/
|
|
16
|
+
id: zod_1.z.string().optional(),
|
|
17
|
+
/**
|
|
18
|
+
* Expression that determines whether the step should run.
|
|
19
|
+
* Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
|
|
20
|
+
*/
|
|
21
|
+
if: zod_1.z.string().optional(),
|
|
22
|
+
/**
|
|
23
|
+
* The name of the step.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* name: 'Step 1'
|
|
27
|
+
*/
|
|
28
|
+
name: zod_1.z.string().optional(),
|
|
29
|
+
/**
|
|
30
|
+
* The working directory to run the step in.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* working_directory: ./my-working-directory
|
|
34
|
+
*
|
|
35
|
+
* @default depends on the project settings
|
|
36
|
+
*/
|
|
37
|
+
working_directory: zod_1.z.string().optional(),
|
|
38
|
+
/**
|
|
39
|
+
* Env variables override for the step.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* env:
|
|
43
|
+
* MY_ENV_VAR: my-value
|
|
44
|
+
* ANOTHER_ENV_VAR: another-value
|
|
45
|
+
*/
|
|
46
|
+
env: zod_1.z.record(zod_1.z.string()).optional(),
|
|
47
|
+
});
|
|
48
|
+
exports.FunctionStepZ = CommonStepZ.extend({
|
|
49
|
+
/**
|
|
50
|
+
* The custom EAS function to run as a step.
|
|
51
|
+
* It can be a function provided by EAS or a custom function defined by the user.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* uses: eas/build
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* uses: my-custom-function
|
|
58
|
+
*/
|
|
59
|
+
uses: zod_1.z.string(),
|
|
60
|
+
/**
|
|
61
|
+
* The arguments to pass to the function.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* with:
|
|
65
|
+
* arg1: value1
|
|
66
|
+
* arg2: ['ala', 'ma', 'kota']
|
|
67
|
+
* arg3:
|
|
68
|
+
* key1: value1
|
|
69
|
+
* key2:
|
|
70
|
+
* - value1
|
|
71
|
+
* arg4: ${{ steps.step1.outputs.test }}
|
|
72
|
+
*/
|
|
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(),
|
|
74
|
+
run: zod_1.z.never().optional(),
|
|
75
|
+
shell: zod_1.z.never().optional(),
|
|
76
|
+
outputs: zod_1.z.never().optional(),
|
|
77
|
+
});
|
|
78
|
+
exports.ShellStepZ = CommonStepZ.extend({
|
|
79
|
+
/**
|
|
80
|
+
* The command-line programs to run as a step.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* run: echo Hello, world!
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* run: |
|
|
87
|
+
* npm install
|
|
88
|
+
* npx expo prebuild
|
|
89
|
+
* pod install
|
|
90
|
+
*/
|
|
91
|
+
run: zod_1.z.string(),
|
|
92
|
+
/**
|
|
93
|
+
* The shell to run the "run" command with.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* shell: 'sh'
|
|
97
|
+
*
|
|
98
|
+
* @default 'bash'
|
|
99
|
+
*/
|
|
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(),
|
|
113
|
+
uses: zod_1.z.never().optional(),
|
|
114
|
+
with: zod_1.z.never().optional(),
|
|
115
|
+
});
|
|
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;
|
|
130
|
+
//# sourceMappingURL=step.js.map
|
package/dist/step.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
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,CAAC,MAAM,EAAE;IAChB;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAE5F,GAAG,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACzB,KAAK,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC3B,OAAO,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAIU,QAAA,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC;IAC3C;;;;;;;;;;;OAWG;IACH,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf;;;;;;;OAOG;IACH,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B;;;;;;;;;;OAUG;IACH,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;IAExC,IAAI,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC1B,IAAI,EAAE,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;AAwB1D,SAAgB,aAAa,CAAC,UAAmB;IAC/C,MAAM,KAAK,GAAG,OAAC,CAAC,KAAK,CAAC,aAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACtD,OAAO,KAAK,CAAC;AACf,CAAC;AAHD,sCAGC;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.
|
|
3
|
+
"version": "1.0.128",
|
|
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": "
|
|
38
|
+
"gitHead": "8f98df8074316d9d152f00ae6deba610dfea1b6f"
|
|
39
39
|
}
|