@expo/eas-build-job 1.0.119 → 1.0.126

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 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-04-24
15
+ Change Date: 2027-07-01
16
16
 
17
17
  Change License: MIT
18
18
 
package/dist/generic.d.ts CHANGED
@@ -57,6 +57,69 @@ export declare namespace Generic {
57
57
  }, {
58
58
  path: string;
59
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">>;
60
123
  secrets: z.ZodObject<{
61
124
  robotAccessToken: z.ZodString;
62
125
  environmentSecrets: z.ZodArray<z.ZodObject<{
@@ -171,6 +234,27 @@ export declare namespace Generic {
171
234
  type?: undefined;
172
235
  platform?: undefined;
173
236
  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;
174
258
  }, {
175
259
  builderEnvironment: {
176
260
  env: Record<string, string>;
@@ -216,5 +300,26 @@ export declare namespace Generic {
216
300
  type?: undefined;
217
301
  platform?: undefined;
218
302
  loggerLevel?: LoggerLevel | undefined;
303
+ steps?: ({
304
+ uses: string;
305
+ name?: string | undefined;
306
+ env?: Record<string, string> | undefined;
307
+ id?: string | undefined;
308
+ if?: string | undefined;
309
+ working_directory?: string | undefined;
310
+ with?: Record<string, unknown> | undefined;
311
+ run?: undefined;
312
+ shell?: undefined;
313
+ } | {
314
+ run: string;
315
+ name?: string | undefined;
316
+ env?: Record<string, string> | undefined;
317
+ id?: string | undefined;
318
+ if?: string | undefined;
319
+ working_directory?: string | undefined;
320
+ uses?: undefined;
321
+ with?: undefined;
322
+ shell?: string | undefined;
323
+ })[] | undefined;
219
324
  }>;
220
325
  }
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({
@@ -25,6 +26,7 @@ var Generic;
25
26
  customBuildConfig: zod_1.z.object({
26
27
  path: zod_1.z.string(),
27
28
  }),
29
+ steps: zod_1.z.array(step_1.StepZ).optional(),
28
30
  secrets: zod_1.z.object({
29
31
  robotAccessToken: zod_1.z.string(),
30
32
  environmentSecrets: zod_1.z.array(common_1.EnvironmentSecretZ),
@@ -1 +1 @@
1
- {"version":3,"file":"generic.js","sourceRoot":"","sources":["../src/generic.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yCAA2C;AAE3C,qCAAkF;AAElF,IAAiB,OAAO,CAkCvB;AAlCD,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,E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CgB,OAAO,uBAAP,OAAO,QAkCvB","sourcesContent":["import { z } from 'zod';\nimport { LoggerLevel } from '@expo/logger';\n\nimport { ArchiveSourceSchemaZ, BuildTrigger, EnvironmentSecretZ } from './common';\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 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,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;QAC3B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,GAAG,EAAE,OAAC,CAAC,M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mCvB","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"]}
package/dist/index.d.ts CHANGED
@@ -8,3 +8,4 @@ export * as errors from './errors';
8
8
  export * from './artifacts';
9
9
  export * from './context';
10
10
  export * from './generic';
11
+ export * from './step';
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,365 @@
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.ZodUnknown>>;
66
+ run: z.ZodOptional<z.ZodNever>;
67
+ shell: z.ZodOptional<z.ZodNever>;
68
+ }>, "strip", z.ZodTypeAny, {
69
+ uses: string;
70
+ name?: string | undefined;
71
+ env?: Record<string, string> | undefined;
72
+ id?: string | undefined;
73
+ if?: string | undefined;
74
+ working_directory?: string | undefined;
75
+ with?: Record<string, unknown> | undefined;
76
+ run?: undefined;
77
+ shell?: undefined;
78
+ }, {
79
+ uses: string;
80
+ name?: string | undefined;
81
+ env?: Record<string, string> | undefined;
82
+ id?: string | undefined;
83
+ if?: string | undefined;
84
+ working_directory?: string | undefined;
85
+ with?: Record<string, unknown> | undefined;
86
+ run?: undefined;
87
+ shell?: undefined;
88
+ }>;
89
+ export type FunctionStep = z.infer<typeof FunctionStepZ>;
90
+ export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
91
+ /**
92
+ * Unique identifier for the step.
93
+ *
94
+ * @example
95
+ * id: step1
96
+ */
97
+ id: z.ZodOptional<z.ZodString>;
98
+ /**
99
+ * Expression that determines whether the step should run.
100
+ * Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
101
+ */
102
+ if: z.ZodOptional<z.ZodString>;
103
+ /**
104
+ * The name of the step.
105
+ *
106
+ * @example
107
+ * name: 'Step 1'
108
+ */
109
+ name: z.ZodOptional<z.ZodString>;
110
+ /**
111
+ * The working directory to run the step in.
112
+ *
113
+ * @example
114
+ * working_directory: ./my-working-directory
115
+ *
116
+ * @default depends on the project settings
117
+ */
118
+ working_directory: z.ZodOptional<z.ZodString>;
119
+ /**
120
+ * Env variables override for the step.
121
+ *
122
+ * @example
123
+ * env:
124
+ * MY_ENV_VAR: my-value
125
+ * ANOTHER_ENV_VAR: another-value
126
+ */
127
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
128
+ }, {
129
+ /**
130
+ * The command-line programs to run as a step.
131
+ *
132
+ * @example
133
+ * run: echo Hello, world!
134
+ *
135
+ * @example
136
+ * run: |
137
+ * npm install
138
+ * npx expo prebuild
139
+ * pod install
140
+ */
141
+ run: z.ZodString;
142
+ /**
143
+ * The shell to run the "run" command with.
144
+ *
145
+ * @example
146
+ * shell: 'sh'
147
+ *
148
+ * @default 'bash'
149
+ */
150
+ shell: z.ZodOptional<z.ZodString>;
151
+ uses: z.ZodOptional<z.ZodNever>;
152
+ with: z.ZodOptional<z.ZodNever>;
153
+ }>, "strip", z.ZodTypeAny, {
154
+ run: string;
155
+ name?: string | undefined;
156
+ env?: Record<string, string> | undefined;
157
+ id?: string | undefined;
158
+ if?: string | undefined;
159
+ working_directory?: string | undefined;
160
+ uses?: undefined;
161
+ with?: undefined;
162
+ shell?: string | undefined;
163
+ }, {
164
+ run: string;
165
+ name?: string | undefined;
166
+ env?: Record<string, string> | undefined;
167
+ id?: string | undefined;
168
+ if?: string | undefined;
169
+ working_directory?: string | undefined;
170
+ uses?: undefined;
171
+ with?: undefined;
172
+ shell?: string | undefined;
173
+ }>;
174
+ export type ShellStep = z.infer<typeof ShellStepZ>;
175
+ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
176
+ /**
177
+ * Unique identifier for the step.
178
+ *
179
+ * @example
180
+ * id: step1
181
+ */
182
+ id: z.ZodOptional<z.ZodString>;
183
+ /**
184
+ * Expression that determines whether the step should run.
185
+ * Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
186
+ */
187
+ if: z.ZodOptional<z.ZodString>;
188
+ /**
189
+ * The name of the step.
190
+ *
191
+ * @example
192
+ * name: 'Step 1'
193
+ */
194
+ name: z.ZodOptional<z.ZodString>;
195
+ /**
196
+ * The working directory to run the step in.
197
+ *
198
+ * @example
199
+ * working_directory: ./my-working-directory
200
+ *
201
+ * @default depends on the project settings
202
+ */
203
+ working_directory: z.ZodOptional<z.ZodString>;
204
+ /**
205
+ * Env variables override for the step.
206
+ *
207
+ * @example
208
+ * env:
209
+ * MY_ENV_VAR: my-value
210
+ * ANOTHER_ENV_VAR: another-value
211
+ */
212
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
213
+ }, {
214
+ /**
215
+ * The command-line programs to run as a step.
216
+ *
217
+ * @example
218
+ * run: echo Hello, world!
219
+ *
220
+ * @example
221
+ * run: |
222
+ * npm install
223
+ * npx expo prebuild
224
+ * pod install
225
+ */
226
+ run: z.ZodString;
227
+ /**
228
+ * The shell to run the "run" command with.
229
+ *
230
+ * @example
231
+ * shell: 'sh'
232
+ *
233
+ * @default 'bash'
234
+ */
235
+ shell: z.ZodOptional<z.ZodString>;
236
+ uses: z.ZodOptional<z.ZodNever>;
237
+ with: z.ZodOptional<z.ZodNever>;
238
+ }>, "strip", z.ZodTypeAny, {
239
+ run: string;
240
+ name?: string | undefined;
241
+ env?: Record<string, string> | undefined;
242
+ id?: string | undefined;
243
+ if?: string | undefined;
244
+ working_directory?: string | undefined;
245
+ uses?: undefined;
246
+ with?: undefined;
247
+ shell?: string | undefined;
248
+ }, {
249
+ run: string;
250
+ name?: string | undefined;
251
+ env?: Record<string, string> | undefined;
252
+ id?: string | undefined;
253
+ if?: string | undefined;
254
+ working_directory?: string | undefined;
255
+ uses?: undefined;
256
+ with?: undefined;
257
+ shell?: string | undefined;
258
+ }>, z.ZodObject<z.objectUtil.extendShape<{
259
+ /**
260
+ * Unique identifier for the step.
261
+ *
262
+ * @example
263
+ * id: step1
264
+ */
265
+ id: z.ZodOptional<z.ZodString>;
266
+ /**
267
+ * Expression that determines whether the step should run.
268
+ * Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
269
+ */
270
+ if: z.ZodOptional<z.ZodString>;
271
+ /**
272
+ * The name of the step.
273
+ *
274
+ * @example
275
+ * name: 'Step 1'
276
+ */
277
+ name: z.ZodOptional<z.ZodString>;
278
+ /**
279
+ * The working directory to run the step in.
280
+ *
281
+ * @example
282
+ * working_directory: ./my-working-directory
283
+ *
284
+ * @default depends on the project settings
285
+ */
286
+ working_directory: z.ZodOptional<z.ZodString>;
287
+ /**
288
+ * Env variables override for the step.
289
+ *
290
+ * @example
291
+ * env:
292
+ * MY_ENV_VAR: my-value
293
+ * ANOTHER_ENV_VAR: another-value
294
+ */
295
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
296
+ }, {
297
+ /**
298
+ * The custom EAS function to run as a step.
299
+ * It can be a function provided by EAS or a custom function defined by the user.
300
+ *
301
+ * @example
302
+ * uses: eas/build
303
+ *
304
+ * @example
305
+ * uses: my-custom-function
306
+ */
307
+ uses: z.ZodString;
308
+ /**
309
+ * The arguments to pass to the function.
310
+ *
311
+ * @example
312
+ * with:
313
+ * arg1: value1
314
+ * arg2: ['ala', 'ma', 'kota']
315
+ * arg3:
316
+ * key1: value1
317
+ * key2:
318
+ * - value1
319
+ * arg4: ${{ steps.step1.outputs.test }}
320
+ */
321
+ with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
322
+ run: z.ZodOptional<z.ZodNever>;
323
+ shell: z.ZodOptional<z.ZodNever>;
324
+ }>, "strip", z.ZodTypeAny, {
325
+ uses: string;
326
+ name?: string | undefined;
327
+ env?: Record<string, string> | undefined;
328
+ id?: string | undefined;
329
+ if?: string | undefined;
330
+ working_directory?: string | undefined;
331
+ with?: Record<string, unknown> | undefined;
332
+ run?: undefined;
333
+ shell?: undefined;
334
+ }, {
335
+ uses: string;
336
+ name?: string | undefined;
337
+ env?: Record<string, string> | undefined;
338
+ id?: string | undefined;
339
+ if?: string | undefined;
340
+ working_directory?: string | undefined;
341
+ with?: Record<string, unknown> | undefined;
342
+ run?: undefined;
343
+ shell?: undefined;
344
+ }>]>;
345
+ /**
346
+ * Structure of a custom EAS job step.
347
+ *
348
+ * GHA step fields skipped here:
349
+ * - `with.entrypoint`
350
+ * - `continue-on-error`
351
+ * - `timeout-minutes`
352
+ *
353
+ * * @example
354
+ * steps:
355
+ * - uses: eas/maestro-test
356
+ * id: step1
357
+ * name: Step 1
358
+ * with:
359
+ * flow_path: |
360
+ * maestro/sign_in.yaml
361
+ * maestro/create_post.yaml
362
+ * maestro/sign_out.yaml
363
+ * - run: echo Hello, world!
364
+ */
365
+ export type Step = z.infer<typeof StepZ>;
package/dist/step.js ADDED
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StepZ = exports.ShellStepZ = exports.FunctionStepZ = void 0;
4
+ const zod_1 = require("zod");
5
+ const CommonStepZ = zod_1.z.object({
6
+ /**
7
+ * Unique identifier for the step.
8
+ *
9
+ * @example
10
+ * id: step1
11
+ */
12
+ id: zod_1.z.string().optional(),
13
+ /**
14
+ * Expression that determines whether the step should run.
15
+ * Based on the GitHub Actions job step `if` field (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsif).
16
+ */
17
+ if: zod_1.z.string().optional(),
18
+ /**
19
+ * The name of the step.
20
+ *
21
+ * @example
22
+ * name: 'Step 1'
23
+ */
24
+ name: zod_1.z.string().optional(),
25
+ /**
26
+ * The working directory to run the step in.
27
+ *
28
+ * @example
29
+ * working_directory: ./my-working-directory
30
+ *
31
+ * @default depends on the project settings
32
+ */
33
+ working_directory: zod_1.z.string().optional(),
34
+ /**
35
+ * Env variables override for the step.
36
+ *
37
+ * @example
38
+ * env:
39
+ * MY_ENV_VAR: my-value
40
+ * ANOTHER_ENV_VAR: another-value
41
+ */
42
+ env: zod_1.z.record(zod_1.z.string()).optional(),
43
+ });
44
+ exports.FunctionStepZ = CommonStepZ.extend({
45
+ /**
46
+ * The custom EAS function to run as a step.
47
+ * It can be a function provided by EAS or a custom function defined by the user.
48
+ *
49
+ * @example
50
+ * uses: eas/build
51
+ *
52
+ * @example
53
+ * uses: my-custom-function
54
+ */
55
+ uses: zod_1.z.string(),
56
+ /**
57
+ * The arguments to pass to the function.
58
+ *
59
+ * @example
60
+ * with:
61
+ * arg1: value1
62
+ * arg2: ['ala', 'ma', 'kota']
63
+ * arg3:
64
+ * key1: value1
65
+ * key2:
66
+ * - value1
67
+ * arg4: ${{ steps.step1.outputs.test }}
68
+ */
69
+ with: zod_1.z.record(zod_1.z.unknown()).optional(),
70
+ run: zod_1.z.never().optional(),
71
+ shell: zod_1.z.never().optional(),
72
+ });
73
+ exports.ShellStepZ = CommonStepZ.extend({
74
+ /**
75
+ * The command-line programs to run as a step.
76
+ *
77
+ * @example
78
+ * run: echo Hello, world!
79
+ *
80
+ * @example
81
+ * run: |
82
+ * npm install
83
+ * npx expo prebuild
84
+ * pod install
85
+ */
86
+ run: zod_1.z.string(),
87
+ /**
88
+ * The shell to run the "run" command with.
89
+ *
90
+ * @example
91
+ * shell: 'sh'
92
+ *
93
+ * @default 'bash'
94
+ */
95
+ shell: zod_1.z.string().optional(),
96
+ uses: zod_1.z.never().optional(),
97
+ with: zod_1.z.never().optional(),
98
+ });
99
+ exports.StepZ = zod_1.z.union([exports.ShellStepZ, exports.FunctionStepZ]);
100
+ //# sourceMappingURL=step.js.map
@@ -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;;;;;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,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IAEtC,GAAG,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACzB,KAAK,EAAE,OAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;CAC5B,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;IAE5B,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","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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/eas-build-job",
3
- "version": "1.0.119",
3
+ "version": "1.0.126",
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": "456f48a4e63cf0bb297f40a6a952b3c8d78cbe77"
38
+ "gitHead": "b329acd121e1a7d98d71d0ecf7396c8b875612a9"
39
39
  }