@expo/eas-build-job 1.0.169 → 1.0.172

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/common.d.ts CHANGED
@@ -172,18 +172,56 @@ export declare const StaticWorkflowInterpolationContextZ: z.ZodObject<{
172
172
  ref: z.ZodString;
173
173
  ref_name: z.ZodString;
174
174
  ref_type: z.ZodString;
175
+ label: z.ZodOptional<z.ZodString>;
176
+ event: z.ZodOptional<z.ZodObject<{
177
+ label: z.ZodOptional<z.ZodObject<{
178
+ name: z.ZodString;
179
+ }, "strip", z.ZodTypeAny, {
180
+ name: string;
181
+ }, {
182
+ name: string;
183
+ }>>;
184
+ schedule: z.ZodOptional<z.ZodString>;
185
+ }, "strip", z.ZodTypeAny, {
186
+ label?: {
187
+ name: string;
188
+ } | undefined;
189
+ schedule?: string | undefined;
190
+ }, {
191
+ label?: {
192
+ name: string;
193
+ } | undefined;
194
+ schedule?: string | undefined;
195
+ }>>;
196
+ schedule: z.ZodOptional<z.ZodString>;
175
197
  }, "strip", z.ZodTypeAny, {
176
198
  event_name: "push" | "pull_request" | "workflow_dispatch";
177
199
  sha: string;
178
200
  ref: string;
179
201
  ref_name: string;
180
202
  ref_type: string;
203
+ label?: string | undefined;
204
+ schedule?: string | undefined;
205
+ event?: {
206
+ label?: {
207
+ name: string;
208
+ } | undefined;
209
+ schedule?: string | undefined;
210
+ } | undefined;
181
211
  }, {
182
212
  event_name: "push" | "pull_request" | "workflow_dispatch";
183
213
  sha: string;
184
214
  ref: string;
185
215
  ref_name: string;
186
216
  ref_type: string;
217
+ label?: string | undefined;
218
+ schedule?: string | undefined;
219
+ event?: {
220
+ label?: {
221
+ name: string;
222
+ } | undefined;
223
+ schedule?: string | undefined;
224
+ } | undefined;
187
225
  }>>;
188
226
  env: z.ZodRecord<z.ZodString, z.ZodString>;
189
227
  }, "strip", z.ZodTypeAny, {
@@ -202,6 +240,14 @@ export declare const StaticWorkflowInterpolationContextZ: z.ZodObject<{
202
240
  ref: string;
203
241
  ref_name: string;
204
242
  ref_type: string;
243
+ label?: string | undefined;
244
+ schedule?: string | undefined;
245
+ event?: {
246
+ label?: {
247
+ name: string;
248
+ } | undefined;
249
+ schedule?: string | undefined;
250
+ } | undefined;
205
251
  } | undefined;
206
252
  }, {
207
253
  env: Record<string, string>;
@@ -219,6 +265,14 @@ export declare const StaticWorkflowInterpolationContextZ: z.ZodObject<{
219
265
  ref: string;
220
266
  ref_name: string;
221
267
  ref_type: string;
268
+ label?: string | undefined;
269
+ schedule?: string | undefined;
270
+ event?: {
271
+ label?: {
272
+ name: string;
273
+ } | undefined;
274
+ schedule?: string | undefined;
275
+ } | undefined;
222
276
  } | undefined;
223
277
  }>;
224
278
  export type StaticWorkflowInterpolationContext = z.infer<typeof StaticWorkflowInterpolationContextZ>;
package/dist/common.js CHANGED
@@ -133,6 +133,18 @@ exports.StaticWorkflowInterpolationContextZ = zod_1.z.object({
133
133
  ref: zod_1.z.string(),
134
134
  ref_name: zod_1.z.string(),
135
135
  ref_type: zod_1.z.string(),
136
+ label: zod_1.z.string().optional(),
137
+ event: zod_1.z
138
+ .object({
139
+ label: zod_1.z
140
+ .object({
141
+ name: zod_1.z.string(),
142
+ })
143
+ .optional(),
144
+ schedule: zod_1.z.string().optional(),
145
+ })
146
+ .optional(),
147
+ schedule: zod_1.z.string().optional(),
136
148
  })
137
149
  // We need to .optional() to support jobs that are not triggered by a GitHub event.
138
150
  .optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,6BAAwB;AAGxB,iCAAuC;AAEvC,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ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AAE,CAAC,KAAK,EAAE;YACxB,OAAO,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;SAC3B,CAAC;QACF,SAAS,EAAE,aAAG,CAAC,MAAM,CAAC;YACpB,iBAAiB,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;YACpC,KAAK,EAAE,aAAG,CAAC,KAAK,EAAE;iBACf,KAAK,CAAC,aAAG,CAAC,GAAG,EAAE,CAAC;iBAChB,QAAQ,EAAE;iBACV,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,oBAAa,EAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC;YAC9D,OAAO,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,aAAG,CAAC,MAAM,EAAE,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;SACrE,CAAC;KACH,CAAC;IACF,SAAS,EAAE,aAAG,CAAC,MAAM,CAAC;QACpB,iBAAiB,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;QACpC,KAAK,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;QACxB,OAAO,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;KAC3B,CAAC;CACH,CAAC,CAAC","sourcesContent":["import Joi from 'joi';\nimport { z } from 'zod';\n\nimport { BuildPhase, BuildPhaseResult } from './logs';\nimport { validateSteps } from './step';\n\nexport enum BuildMode {\n BUILD = 'build',\n RESIGN = 'resign',\n CUSTOM = 'custom',\n REPACK = 'repack',\n}\n\nexport enum Workflow {\n GENERIC = 'generic',\n MANAGED = 'managed',\n UNKNOWN = 'unknown',\n}\n\nexport enum Platform {\n ANDROID = 'android',\n IOS = 'ios',\n}\n\nexport enum ArchiveSourceType {\n NONE = 'NONE',\n URL = 'URL',\n PATH = 'PATH',\n GCS = 'GCS',\n GIT = 'GIT',\n}\n\nexport enum BuildTrigger {\n EAS_CLI = 'EAS_CLI',\n GIT_BASED_INTEGRATION = 'GIT_BASED_INTEGRATION',\n}\n\nexport type ArchiveSource =\n | { type: ArchiveSourceType.NONE }\n | { type: ArchiveSourceType.GCS; bucketKey: string; metadataLocation?: string }\n | { type: ArchiveSourceType.URL; url: string }\n | { type: ArchiveSourceType.PATH; path: string }\n | {\n type: ArchiveSourceType.GIT;\n /**\n * Url that can be used to clone repository.\n * It should contain embedded credentials for private registries.\n */\n repositoryUrl: string;\n /** A Git ref - points to a branch head, tag head or a branch name. */\n gitRef: string | null;\n /**\n * Git commit hash.\n */\n gitCommitHash: string;\n };\n\nexport const ArchiveSourceSchema = Joi.object<ArchiveSource>({\n type: Joi.string()\n .valid(...Object.values(ArchiveSourceType))\n .required(),\n})\n .when(Joi.object({ type: ArchiveSourceType.GCS }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.GCS).required(),\n bucketKey: Joi.string().required(),\n metadataLocation: Joi.string(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.URL }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.URL).required(),\n url: Joi.string().uri().required(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.GIT }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.GIT).required(),\n repositoryUrl: Joi.string().required(),\n gitCommitHash: Joi.string().required(),\n gitRef: Joi.string().allow(null).required(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.PATH }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.PATH).required(),\n path: Joi.string().required(),\n }),\n });\n\nexport const ArchiveSourceSchemaZ = z.discriminatedUnion('type', [\n z.object({\n type: z.literal(ArchiveSourceType.GIT),\n repositoryUrl: z.string().url(),\n gitRef: z.string().nullable(),\n gitCommitHash: z.string(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.PATH),\n path: z.string(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.URL),\n url: z.string().url(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.GCS),\n bucketKey: z.string(),\n metadataLocation: z.string().optional(),\n }),\n]);\n\nexport type Env = Record<string, string>;\nexport const EnvSchema = Joi.object().pattern(Joi.string(), Joi.string());\n\nexport type EnvironmentSecret = {\n name: string;\n type: EnvironmentSecretType;\n value: string;\n};\nexport enum EnvironmentSecretType {\n STRING = 'string',\n FILE = 'file',\n}\nexport const EnvironmentSecretsSchema = Joi.array().items(\n Joi.object({\n name: Joi.string().required(),\n value: Joi.string().allow('').required(),\n type: Joi.string()\n .valid(...Object.values(EnvironmentSecretType))\n .required(),\n })\n);\nexport const EnvironmentSecretZ = z.object({\n name: z.string(),\n value: z.string(),\n type: z.nativeEnum(EnvironmentSecretType),\n});\n\nexport interface Cache {\n disabled: boolean;\n clear: boolean;\n key?: string;\n /**\n * @deprecated We don't cache anything by default anymore.\n */\n cacheDefaultPaths?: boolean;\n /**\n * @deprecated We use paths now since there is no default caching anymore.\n */\n customPaths?: string[];\n paths: string[];\n}\n\nexport const CacheSchema = Joi.object({\n disabled: Joi.boolean().default(false),\n clear: Joi.boolean().default(false),\n key: Joi.string().allow('').max(128),\n cacheDefaultPaths: Joi.boolean(),\n customPaths: Joi.array().items(Joi.string()),\n paths: Joi.array().items(Joi.string()).default([]),\n});\n\nexport interface BuildPhaseStats {\n buildPhase: BuildPhase;\n result: BuildPhaseResult;\n durationMs: number;\n}\n\nexport const StaticWorkflowInterpolationContextZ = z.object({\n after: z.record(\n z.string(),\n z.object({\n status: z.string(),\n outputs: z.record(z.string(), z.string().nullable()),\n })\n ),\n needs: z.record(\n z.string(),\n z.object({\n status: z.string(),\n outputs: z.record(z.string(), z.string().nullable()),\n })\n ),\n github: z\n .object({\n event_name: z.enum(['push', 'pull_request', 'workflow_dispatch']),\n sha: z.string(),\n ref: z.string(),\n ref_name: z.string(),\n ref_type: z.string(),\n })\n // We need to .optional() to support jobs that are not triggered by a GitHub event.\n .optional(),\n env: z.record(z.string()),\n});\n\nexport type StaticWorkflowInterpolationContext = z.infer<\n typeof StaticWorkflowInterpolationContextZ\n>;\n\nexport type DynamicInterpolationContext = {\n success: () => boolean;\n failure: () => boolean;\n always: () => boolean;\n never: () => boolean;\n fromJSON: (value: string) => unknown;\n toJSON: (value: unknown) => string;\n};\n\nexport type WorkflowInterpolationContext = StaticWorkflowInterpolationContext &\n DynamicInterpolationContext;\n\nexport const CustomBuildConfigSchema = Joi.object().when('.mode', {\n is: BuildMode.CUSTOM,\n then: Joi.object().when('.customBuildConfig.path', {\n is: Joi.exist(),\n then: Joi.object({\n customBuildConfig: Joi.object({\n path: Joi.string().required(),\n }).required(),\n steps: Joi.any().strip(),\n outputs: Joi.any().strip(),\n }),\n otherwise: Joi.object({\n customBuildConfig: Joi.any().strip(),\n steps: Joi.array()\n .items(Joi.any())\n .required()\n .custom((steps) => validateSteps(steps), 'steps validation'),\n outputs: Joi.object().pattern(Joi.string(), Joi.string()).required(),\n }),\n }),\n otherwise: Joi.object({\n customBuildConfig: Joi.any().strip(),\n steps: Joi.any().strip(),\n outputs: Joi.any().strip(),\n }),\n});\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,6BAAwB;AAGxB,iCAAuC;AAEvC,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;AACrB,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAED,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,uBAAW,CAAA;AACb,CAAC,EAHW,QAAQ,wBAAR,QA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G,CAAC,MAAM,CAAC;gBAC5B,IAAI,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC9B,CAAC,CAAC,QAAQ,EAAE;YACb,KAAK,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;YACxB,OAAO,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;SAC3B,CAAC;QACF,SAAS,EAAE,aAAG,CAAC,MAAM,CAAC;YACpB,iBAAiB,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;YACpC,KAAK,EAAE,aAAG,CAAC,KAAK,EAAE;iBACf,KAAK,CAAC,aAAG,CAAC,GAAG,EAAE,CAAC;iBAChB,QAAQ,EAAE;iBACV,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,oBAAa,EAAC,KAAK,CAAC,EAAE,kBAAkB,CAAC;YAC9D,OAAO,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,aAAG,CAAC,MAAM,EAAE,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;SACrE,CAAC;KACH,CAAC;IACF,SAAS,EAAE,aAAG,CAAC,MAAM,CAAC;QACpB,iBAAiB,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;QACpC,KAAK,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;QACxB,OAAO,EAAE,aAAG,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE;KAC3B,CAAC;CACH,CAAC,CAAC","sourcesContent":["import Joi from 'joi';\nimport { z } from 'zod';\n\nimport { BuildPhase, BuildPhaseResult } from './logs';\nimport { validateSteps } from './step';\n\nexport enum BuildMode {\n BUILD = 'build',\n RESIGN = 'resign',\n CUSTOM = 'custom',\n REPACK = 'repack',\n}\n\nexport enum Workflow {\n GENERIC = 'generic',\n MANAGED = 'managed',\n UNKNOWN = 'unknown',\n}\n\nexport enum Platform {\n ANDROID = 'android',\n IOS = 'ios',\n}\n\nexport enum ArchiveSourceType {\n NONE = 'NONE',\n URL = 'URL',\n PATH = 'PATH',\n GCS = 'GCS',\n GIT = 'GIT',\n}\n\nexport enum BuildTrigger {\n EAS_CLI = 'EAS_CLI',\n GIT_BASED_INTEGRATION = 'GIT_BASED_INTEGRATION',\n}\n\nexport type ArchiveSource =\n | { type: ArchiveSourceType.NONE }\n | { type: ArchiveSourceType.GCS; bucketKey: string; metadataLocation?: string }\n | { type: ArchiveSourceType.URL; url: string }\n | { type: ArchiveSourceType.PATH; path: string }\n | {\n type: ArchiveSourceType.GIT;\n /**\n * Url that can be used to clone repository.\n * It should contain embedded credentials for private registries.\n */\n repositoryUrl: string;\n /** A Git ref - points to a branch head, tag head or a branch name. */\n gitRef: string | null;\n /**\n * Git commit hash.\n */\n gitCommitHash: string;\n };\n\nexport const ArchiveSourceSchema = Joi.object<ArchiveSource>({\n type: Joi.string()\n .valid(...Object.values(ArchiveSourceType))\n .required(),\n})\n .when(Joi.object({ type: ArchiveSourceType.GCS }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.GCS).required(),\n bucketKey: Joi.string().required(),\n metadataLocation: Joi.string(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.URL }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.URL).required(),\n url: Joi.string().uri().required(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.GIT }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.GIT).required(),\n repositoryUrl: Joi.string().required(),\n gitCommitHash: Joi.string().required(),\n gitRef: Joi.string().allow(null).required(),\n }),\n })\n .when(Joi.object({ type: ArchiveSourceType.PATH }).unknown(), {\n then: Joi.object({\n type: Joi.string().valid(ArchiveSourceType.PATH).required(),\n path: Joi.string().required(),\n }),\n });\n\nexport const ArchiveSourceSchemaZ = z.discriminatedUnion('type', [\n z.object({\n type: z.literal(ArchiveSourceType.GIT),\n repositoryUrl: z.string().url(),\n gitRef: z.string().nullable(),\n gitCommitHash: z.string(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.PATH),\n path: z.string(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.URL),\n url: z.string().url(),\n }),\n z.object({\n type: z.literal(ArchiveSourceType.GCS),\n bucketKey: z.string(),\n metadataLocation: z.string().optional(),\n }),\n]);\n\nexport type Env = Record<string, string>;\nexport const EnvSchema = Joi.object().pattern(Joi.string(), Joi.string());\n\nexport type EnvironmentSecret = {\n name: string;\n type: EnvironmentSecretType;\n value: string;\n};\nexport enum EnvironmentSecretType {\n STRING = 'string',\n FILE = 'file',\n}\nexport const EnvironmentSecretsSchema = Joi.array().items(\n Joi.object({\n name: Joi.string().required(),\n value: Joi.string().allow('').required(),\n type: Joi.string()\n .valid(...Object.values(EnvironmentSecretType))\n .required(),\n })\n);\nexport const EnvironmentSecretZ = z.object({\n name: z.string(),\n value: z.string(),\n type: z.nativeEnum(EnvironmentSecretType),\n});\n\nexport interface Cache {\n disabled: boolean;\n clear: boolean;\n key?: string;\n /**\n * @deprecated We don't cache anything by default anymore.\n */\n cacheDefaultPaths?: boolean;\n /**\n * @deprecated We use paths now since there is no default caching anymore.\n */\n customPaths?: string[];\n paths: string[];\n}\n\nexport const CacheSchema = Joi.object({\n disabled: Joi.boolean().default(false),\n clear: Joi.boolean().default(false),\n key: Joi.string().allow('').max(128),\n cacheDefaultPaths: Joi.boolean(),\n customPaths: Joi.array().items(Joi.string()),\n paths: Joi.array().items(Joi.string()).default([]),\n});\n\nexport interface BuildPhaseStats {\n buildPhase: BuildPhase;\n result: BuildPhaseResult;\n durationMs: number;\n}\n\nexport const StaticWorkflowInterpolationContextZ = z.object({\n after: z.record(\n z.string(),\n z.object({\n status: z.string(),\n outputs: z.record(z.string(), z.string().nullable()),\n })\n ),\n needs: z.record(\n z.string(),\n z.object({\n status: z.string(),\n outputs: z.record(z.string(), z.string().nullable()),\n })\n ),\n github: z\n .object({\n event_name: z.enum(['push', 'pull_request', 'workflow_dispatch']),\n sha: z.string(),\n ref: z.string(),\n ref_name: z.string(),\n ref_type: z.string(),\n label: z.string().optional(),\n event: z\n .object({\n label: z\n .object({\n name: z.string(),\n })\n .optional(),\n schedule: z.string().optional(),\n })\n .optional(),\n schedule: z.string().optional(),\n })\n // We need to .optional() to support jobs that are not triggered by a GitHub event.\n .optional(),\n env: z.record(z.string()),\n});\n\nexport type StaticWorkflowInterpolationContext = z.infer<\n typeof StaticWorkflowInterpolationContextZ\n>;\n\nexport type DynamicInterpolationContext = {\n success: () => boolean;\n failure: () => boolean;\n always: () => boolean;\n never: () => boolean;\n fromJSON: (value: string) => unknown;\n toJSON: (value: unknown) => string;\n};\n\nexport type WorkflowInterpolationContext = StaticWorkflowInterpolationContext &\n DynamicInterpolationContext;\n\nexport const CustomBuildConfigSchema = Joi.object().when('.mode', {\n is: BuildMode.CUSTOM,\n then: Joi.object().when('.customBuildConfig.path', {\n is: Joi.exist(),\n then: Joi.object({\n customBuildConfig: Joi.object({\n path: Joi.string().required(),\n }).required(),\n steps: Joi.any().strip(),\n outputs: Joi.any().strip(),\n }),\n otherwise: Joi.object({\n customBuildConfig: Joi.any().strip(),\n steps: Joi.array()\n .items(Joi.any())\n .required()\n .custom((steps) => validateSteps(steps), 'steps validation'),\n outputs: Joi.object().pattern(Joi.string(), Joi.string()).required(),\n }),\n }),\n otherwise: Joi.object({\n customBuildConfig: Joi.any().strip(),\n steps: Joi.any().strip(),\n outputs: Joi.any().strip(),\n }),\n});\n"]}
package/dist/generic.d.ts CHANGED
@@ -146,18 +146,56 @@ export declare namespace Generic {
146
146
  ref: z.ZodString;
147
147
  ref_name: z.ZodString;
148
148
  ref_type: z.ZodString;
149
+ label: z.ZodOptional<z.ZodString>;
150
+ event: z.ZodOptional<z.ZodObject<{
151
+ label: z.ZodOptional<z.ZodObject<{
152
+ name: z.ZodString;
153
+ }, "strip", z.ZodTypeAny, {
154
+ name: string;
155
+ }, {
156
+ name: string;
157
+ }>>;
158
+ schedule: z.ZodOptional<z.ZodString>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ label?: {
161
+ name: string;
162
+ } | undefined;
163
+ schedule?: string | undefined;
164
+ }, {
165
+ label?: {
166
+ name: string;
167
+ } | undefined;
168
+ schedule?: string | undefined;
169
+ }>>;
170
+ schedule: z.ZodOptional<z.ZodString>;
149
171
  }, "strip", z.ZodTypeAny, {
150
172
  event_name: "push" | "pull_request" | "workflow_dispatch";
151
173
  sha: string;
152
174
  ref: string;
153
175
  ref_name: string;
154
176
  ref_type: string;
177
+ label?: string | undefined;
178
+ schedule?: string | undefined;
179
+ event?: {
180
+ label?: {
181
+ name: string;
182
+ } | undefined;
183
+ schedule?: string | undefined;
184
+ } | undefined;
155
185
  }, {
156
186
  event_name: "push" | "pull_request" | "workflow_dispatch";
157
187
  sha: string;
158
188
  ref: string;
159
189
  ref_name: string;
160
190
  ref_type: string;
191
+ label?: string | undefined;
192
+ schedule?: string | undefined;
193
+ event?: {
194
+ label?: {
195
+ name: string;
196
+ } | undefined;
197
+ schedule?: string | undefined;
198
+ } | undefined;
161
199
  }>>;
162
200
  env: z.ZodRecord<z.ZodString, z.ZodString>;
163
201
  }, "strip", z.ZodTypeAny, {
@@ -176,6 +214,14 @@ export declare namespace Generic {
176
214
  ref: string;
177
215
  ref_name: string;
178
216
  ref_type: string;
217
+ label?: string | undefined;
218
+ schedule?: string | undefined;
219
+ event?: {
220
+ label?: {
221
+ name: string;
222
+ } | undefined;
223
+ schedule?: string | undefined;
224
+ } | undefined;
179
225
  } | undefined;
180
226
  }, {
181
227
  env: Record<string, string>;
@@ -193,6 +239,14 @@ export declare namespace Generic {
193
239
  ref: string;
194
240
  ref_name: string;
195
241
  ref_type: string;
242
+ label?: string | undefined;
243
+ schedule?: string | undefined;
244
+ event?: {
245
+ label?: {
246
+ name: string;
247
+ } | undefined;
248
+ schedule?: string | undefined;
249
+ } | undefined;
196
250
  } | undefined;
197
251
  }>>;
198
252
  initiatingUserId: z.ZodString;
@@ -206,7 +260,10 @@ export declare namespace Generic {
206
260
  }, {
207
261
  run: z.ZodString;
208
262
  shell: z.ZodOptional<z.ZodString>;
209
- outputs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
263
+ outputs: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, {
264
+ name: string;
265
+ required: boolean;
266
+ }, string>, z.ZodObject<{
210
267
  name: z.ZodString;
211
268
  required: z.ZodOptional<z.ZodBoolean>;
212
269
  }, "strip", z.ZodTypeAny, {
@@ -215,10 +272,7 @@ export declare namespace Generic {
215
272
  }, {
216
273
  name: string;
217
274
  required?: boolean | undefined;
218
- }>, {
219
- name: string;
220
- required?: boolean | undefined;
221
- }, unknown>, "many">>;
275
+ }>]>, "many">>;
222
276
  uses: z.ZodOptional<z.ZodNever>;
223
277
  with: z.ZodOptional<z.ZodNever>;
224
278
  }>, "strip", z.ZodTypeAny, {
@@ -231,10 +285,13 @@ export declare namespace Generic {
231
285
  uses?: undefined;
232
286
  with?: undefined;
233
287
  shell?: string | undefined;
234
- outputs?: {
288
+ outputs?: ({
289
+ name: string;
290
+ required: boolean;
291
+ } | {
235
292
  name: string;
236
293
  required?: boolean | undefined;
237
- }[] | undefined;
294
+ })[] | undefined;
238
295
  }, {
239
296
  run: string;
240
297
  id?: string | undefined;
@@ -245,7 +302,10 @@ export declare namespace Generic {
245
302
  uses?: undefined;
246
303
  with?: undefined;
247
304
  shell?: string | undefined;
248
- outputs?: unknown[] | undefined;
305
+ outputs?: (string | {
306
+ name: string;
307
+ required?: boolean | undefined;
308
+ })[] | undefined;
249
309
  }>, z.ZodObject<z.objectUtil.extendShape<{
250
310
  id: z.ZodOptional<z.ZodString>;
251
311
  if: z.ZodOptional<z.ZodString>;
@@ -304,10 +364,13 @@ export declare namespace Generic {
304
364
  uses?: undefined;
305
365
  with?: undefined;
306
366
  shell?: string | undefined;
307
- outputs?: {
367
+ outputs?: ({
368
+ name: string;
369
+ required: boolean;
370
+ } | {
308
371
  name: string;
309
372
  required?: boolean | undefined;
310
- }[] | undefined;
373
+ })[] | undefined;
311
374
  })[];
312
375
  builderEnvironment: {
313
376
  env: Record<string, string>;
@@ -369,6 +432,14 @@ export declare namespace Generic {
369
432
  ref: string;
370
433
  ref_name: string;
371
434
  ref_type: string;
435
+ label?: string | undefined;
436
+ schedule?: string | undefined;
437
+ event?: {
438
+ label?: {
439
+ name: string;
440
+ } | undefined;
441
+ schedule?: string | undefined;
442
+ } | undefined;
372
443
  } | undefined;
373
444
  } | undefined;
374
445
  }, {
@@ -393,7 +464,10 @@ export declare namespace Generic {
393
464
  uses?: undefined;
394
465
  with?: undefined;
395
466
  shell?: string | undefined;
396
- outputs?: unknown[] | undefined;
467
+ outputs?: (string | {
468
+ name: string;
469
+ required?: boolean | undefined;
470
+ })[] | undefined;
397
471
  })[];
398
472
  builderEnvironment: {
399
473
  env: Record<string, string>;
@@ -455,6 +529,14 @@ export declare namespace Generic {
455
529
  ref: string;
456
530
  ref_name: string;
457
531
  ref_type: string;
532
+ label?: string | undefined;
533
+ schedule?: string | undefined;
534
+ event?: {
535
+ label?: {
536
+ name: string;
537
+ } | undefined;
538
+ schedule?: string | undefined;
539
+ } | undefined;
458
540
  } | undefined;
459
541
  } | undefined;
460
542
  }>;
@@ -602,18 +684,56 @@ export declare namespace Generic {
602
684
  ref: z.ZodString;
603
685
  ref_name: z.ZodString;
604
686
  ref_type: z.ZodString;
687
+ label: z.ZodOptional<z.ZodString>;
688
+ event: z.ZodOptional<z.ZodObject<{
689
+ label: z.ZodOptional<z.ZodObject<{
690
+ name: z.ZodString;
691
+ }, "strip", z.ZodTypeAny, {
692
+ name: string;
693
+ }, {
694
+ name: string;
695
+ }>>;
696
+ schedule: z.ZodOptional<z.ZodString>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ label?: {
699
+ name: string;
700
+ } | undefined;
701
+ schedule?: string | undefined;
702
+ }, {
703
+ label?: {
704
+ name: string;
705
+ } | undefined;
706
+ schedule?: string | undefined;
707
+ }>>;
708
+ schedule: z.ZodOptional<z.ZodString>;
605
709
  }, "strip", z.ZodTypeAny, {
606
710
  event_name: "push" | "pull_request" | "workflow_dispatch";
607
711
  sha: string;
608
712
  ref: string;
609
713
  ref_name: string;
610
714
  ref_type: string;
715
+ label?: string | undefined;
716
+ schedule?: string | undefined;
717
+ event?: {
718
+ label?: {
719
+ name: string;
720
+ } | undefined;
721
+ schedule?: string | undefined;
722
+ } | undefined;
611
723
  }, {
612
724
  event_name: "push" | "pull_request" | "workflow_dispatch";
613
725
  sha: string;
614
726
  ref: string;
615
727
  ref_name: string;
616
728
  ref_type: string;
729
+ label?: string | undefined;
730
+ schedule?: string | undefined;
731
+ event?: {
732
+ label?: {
733
+ name: string;
734
+ } | undefined;
735
+ schedule?: string | undefined;
736
+ } | undefined;
617
737
  }>>;
618
738
  env: z.ZodRecord<z.ZodString, z.ZodString>;
619
739
  }, "strip", z.ZodTypeAny, {
@@ -632,6 +752,14 @@ export declare namespace Generic {
632
752
  ref: string;
633
753
  ref_name: string;
634
754
  ref_type: string;
755
+ label?: string | undefined;
756
+ schedule?: string | undefined;
757
+ event?: {
758
+ label?: {
759
+ name: string;
760
+ } | undefined;
761
+ schedule?: string | undefined;
762
+ } | undefined;
635
763
  } | undefined;
636
764
  }, {
637
765
  env: Record<string, string>;
@@ -649,6 +777,14 @@ export declare namespace Generic {
649
777
  ref: string;
650
778
  ref_name: string;
651
779
  ref_type: string;
780
+ label?: string | undefined;
781
+ schedule?: string | undefined;
782
+ event?: {
783
+ label?: {
784
+ name: string;
785
+ } | undefined;
786
+ schedule?: string | undefined;
787
+ } | undefined;
652
788
  } | undefined;
653
789
  }>>>;
654
790
  initiatingUserId: z.ZodOptional<z.ZodString>;
@@ -662,7 +798,10 @@ export declare namespace Generic {
662
798
  }, {
663
799
  run: z.ZodString;
664
800
  shell: z.ZodOptional<z.ZodString>;
665
- outputs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
801
+ outputs: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, {
802
+ name: string;
803
+ required: boolean;
804
+ }, string>, z.ZodObject<{
666
805
  name: z.ZodString;
667
806
  required: z.ZodOptional<z.ZodBoolean>;
668
807
  }, "strip", z.ZodTypeAny, {
@@ -671,10 +810,7 @@ export declare namespace Generic {
671
810
  }, {
672
811
  name: string;
673
812
  required?: boolean | undefined;
674
- }>, {
675
- name: string;
676
- required?: boolean | undefined;
677
- }, unknown>, "many">>;
813
+ }>]>, "many">>;
678
814
  uses: z.ZodOptional<z.ZodNever>;
679
815
  with: z.ZodOptional<z.ZodNever>;
680
816
  }>, "strip", z.ZodTypeAny, {
@@ -687,10 +823,13 @@ export declare namespace Generic {
687
823
  uses?: undefined;
688
824
  with?: undefined;
689
825
  shell?: string | undefined;
690
- outputs?: {
826
+ outputs?: ({
827
+ name: string;
828
+ required: boolean;
829
+ } | {
691
830
  name: string;
692
831
  required?: boolean | undefined;
693
- }[] | undefined;
832
+ })[] | undefined;
694
833
  }, {
695
834
  run: string;
696
835
  id?: string | undefined;
@@ -701,7 +840,10 @@ export declare namespace Generic {
701
840
  uses?: undefined;
702
841
  with?: undefined;
703
842
  shell?: string | undefined;
704
- outputs?: unknown[] | undefined;
843
+ outputs?: (string | {
844
+ name: string;
845
+ required?: boolean | undefined;
846
+ })[] | undefined;
705
847
  }>, z.ZodObject<z.objectUtil.extendShape<{
706
848
  id: z.ZodOptional<z.ZodString>;
707
849
  if: z.ZodOptional<z.ZodString>;
@@ -762,10 +904,13 @@ export declare namespace Generic {
762
904
  uses?: undefined;
763
905
  with?: undefined;
764
906
  shell?: string | undefined;
765
- outputs?: {
907
+ outputs?: ({
908
+ name: string;
909
+ required: boolean;
910
+ } | {
766
911
  name: string;
767
912
  required?: boolean | undefined;
768
- }[] | undefined;
913
+ })[] | undefined;
769
914
  })[] | undefined;
770
915
  builderEnvironment?: {
771
916
  env: Record<string, string>;
@@ -824,6 +969,14 @@ export declare namespace Generic {
824
969
  ref: string;
825
970
  ref_name: string;
826
971
  ref_type: string;
972
+ label?: string | undefined;
973
+ schedule?: string | undefined;
974
+ event?: {
975
+ label?: {
976
+ name: string;
977
+ } | undefined;
978
+ schedule?: string | undefined;
979
+ } | undefined;
827
980
  } | undefined;
828
981
  } | undefined;
829
982
  expoDevUrl?: string | undefined;
@@ -851,7 +1004,10 @@ export declare namespace Generic {
851
1004
  uses?: undefined;
852
1005
  with?: undefined;
853
1006
  shell?: string | undefined;
854
- outputs?: unknown[] | undefined;
1007
+ outputs?: (string | {
1008
+ name: string;
1009
+ required?: boolean | undefined;
1010
+ })[] | undefined;
855
1011
  })[] | undefined;
856
1012
  builderEnvironment?: {
857
1013
  env: Record<string, string>;
@@ -910,6 +1066,14 @@ export declare namespace Generic {
910
1066
  ref: string;
911
1067
  ref_name: string;
912
1068
  ref_type: string;
1069
+ label?: string | undefined;
1070
+ schedule?: string | undefined;
1071
+ event?: {
1072
+ label?: {
1073
+ name: string;
1074
+ } | undefined;
1075
+ schedule?: string | undefined;
1076
+ } | undefined;
913
1077
  } | undefined;
914
1078
  } | undefined;
915
1079
  expoDevUrl?: string | undefined;
package/dist/step.d.ts CHANGED
@@ -162,7 +162,10 @@ export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
162
162
  * required: false
163
163
  * - name: my_optional_output_without_required
164
164
  */
165
- outputs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
165
+ outputs: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, {
166
+ name: string;
167
+ required: boolean;
168
+ }, string>, z.ZodObject<{
166
169
  name: z.ZodString;
167
170
  required: z.ZodOptional<z.ZodBoolean>;
168
171
  }, "strip", z.ZodTypeAny, {
@@ -171,10 +174,7 @@ export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
171
174
  }, {
172
175
  name: string;
173
176
  required?: boolean | undefined;
174
- }>, {
175
- name: string;
176
- required?: boolean | undefined;
177
- }, unknown>, "many">>;
177
+ }>]>, "many">>;
178
178
  uses: z.ZodOptional<z.ZodNever>;
179
179
  with: z.ZodOptional<z.ZodNever>;
180
180
  }>, "strip", z.ZodTypeAny, {
@@ -187,10 +187,13 @@ export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
187
187
  uses?: undefined;
188
188
  with?: undefined;
189
189
  shell?: string | undefined;
190
- outputs?: {
190
+ outputs?: ({
191
+ name: string;
192
+ required: boolean;
193
+ } | {
191
194
  name: string;
192
195
  required?: boolean | undefined;
193
- }[] | undefined;
196
+ })[] | undefined;
194
197
  }, {
195
198
  run: string;
196
199
  id?: string | undefined;
@@ -201,7 +204,10 @@ export declare const ShellStepZ: z.ZodObject<z.objectUtil.extendShape<{
201
204
  uses?: undefined;
202
205
  with?: undefined;
203
206
  shell?: string | undefined;
204
- outputs?: unknown[] | undefined;
207
+ outputs?: (string | {
208
+ name: string;
209
+ required?: boolean | undefined;
210
+ })[] | undefined;
205
211
  }>;
206
212
  export type ShellStep = z.infer<typeof ShellStepZ>;
207
213
  export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
@@ -276,7 +282,10 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
276
282
  * required: false
277
283
  * - name: my_optional_output_without_required
278
284
  */
279
- outputs: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
285
+ outputs: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodString, {
286
+ name: string;
287
+ required: boolean;
288
+ }, string>, z.ZodObject<{
280
289
  name: z.ZodString;
281
290
  required: z.ZodOptional<z.ZodBoolean>;
282
291
  }, "strip", z.ZodTypeAny, {
@@ -285,10 +294,7 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
285
294
  }, {
286
295
  name: string;
287
296
  required?: boolean | undefined;
288
- }>, {
289
- name: string;
290
- required?: boolean | undefined;
291
- }, unknown>, "many">>;
297
+ }>]>, "many">>;
292
298
  uses: z.ZodOptional<z.ZodNever>;
293
299
  with: z.ZodOptional<z.ZodNever>;
294
300
  }>, "strip", z.ZodTypeAny, {
@@ -301,10 +307,13 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
301
307
  uses?: undefined;
302
308
  with?: undefined;
303
309
  shell?: string | undefined;
304
- outputs?: {
310
+ outputs?: ({
311
+ name: string;
312
+ required: boolean;
313
+ } | {
305
314
  name: string;
306
315
  required?: boolean | undefined;
307
- }[] | undefined;
316
+ })[] | undefined;
308
317
  }, {
309
318
  run: string;
310
319
  id?: string | undefined;
@@ -315,7 +324,10 @@ export declare const StepZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
315
324
  uses?: undefined;
316
325
  with?: undefined;
317
326
  shell?: string | undefined;
318
- outputs?: unknown[] | undefined;
327
+ outputs?: (string | {
328
+ name: string;
329
+ required?: boolean | undefined;
330
+ })[] | undefined;
319
331
  }>, z.ZodObject<z.objectUtil.extendShape<{
320
332
  /**
321
333
  * Unique identifier for the step.
package/dist/step.js CHANGED
@@ -117,16 +117,14 @@ exports.ShellStepZ = CommonStepZ.extend({
117
117
  * - name: my_optional_output_without_required
118
118
  */
119
119
  outputs: zod_1.z
120
- .array(zod_1.z.preprocess((input) => {
120
+ .array(zod_1.z.union([
121
121
  // We allow a shorthand for outputs
122
- if (typeof input === 'string') {
123
- return { name: input, required: false };
124
- }
125
- return input;
126
- }, zod_1.z.object({
127
- name: zod_1.z.string(),
128
- required: zod_1.z.boolean().optional(),
129
- })))
122
+ zod_1.z.string().transform((name) => ({ name, required: false })),
123
+ zod_1.z.object({
124
+ name: zod_1.z.string(),
125
+ required: zod_1.z.boolean().optional(),
126
+ }),
127
+ ]))
130
128
  .optional(),
131
129
  uses: zod_1.z.never().optional(),
132
130
  with: zod_1.z.never().optional(),
package/dist/step.js.map CHANGED
@@ -1 +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,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 CommonStepZ = z.object({\n /**\n * Unique identifier for the step.\n *\n * @example\n * id: step1\n */\n id: z\n .string()\n .optional()\n .describe(\n `ID of the step. Useful for later referencing the job's outputs. Example: step with id \"setup\" and an output \"platform\" will expose its value under \"steps.setup.outputs.platform\".`\n ),\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().describe('Expression that determines whether the step should run.'),\n /**\n * The name of the step.\n *\n * @example\n * name: 'Step 1'\n */\n name: z.string().optional().describe('Name of the step.'),\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\n .string()\n .optional()\n .describe(\n `Working directory to run the step in. Relative paths like \"./assets\" or \"assets\" are resolved from the app's base directory. Absolute paths like \"/apps/mobile\" are resolved from the repository root.`\n ),\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\n .record(z.string())\n .optional()\n .describe('Additional environment variables to set for the step.'),\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\n .string()\n .describe(\n 'Name of the function to use for this step. See https://docs.expo.dev/custom-builds/schema/#built-in-eas-functions for available functions.'\n ),\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().describe('Inputs to the function.'),\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().describe('Shell script to run in the step.'),\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().describe('Shell to run the \"run\" command with.'),\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\n .array(\n z.preprocess(\n (input) => {\n // We allow a shorthand for outputs\n if (typeof input === 'string') {\n return { name: input, required: false };\n }\n return input;\n },\n z.object({\n name: z.string(),\n required: z.boolean().optional(),\n })\n )\n )\n .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"]}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,kBAAkB,CAAC,IAAU;IAC3C,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;AACjC,CAAC;AAFD,gDAEC","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\n .string()\n .optional()\n .describe(\n `ID of the step. Useful for later referencing the job's outputs. Example: step with id \"setup\" and an output \"platform\" will expose its value under \"steps.setup.outputs.platform\".`\n ),\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().describe('Expression that determines whether the step should run.'),\n /**\n * The name of the step.\n *\n * @example\n * name: 'Step 1'\n */\n name: z.string().optional().describe('Name of the step.'),\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\n .string()\n .optional()\n .describe(\n `Working directory to run the step in. Relative paths like \"./assets\" or \"assets\" are resolved from the app's base directory. Absolute paths like \"/apps/mobile\" are resolved from the repository root.`\n ),\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\n .record(z.string())\n .optional()\n .describe('Additional environment variables to set for the step.'),\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\n .string()\n .describe(\n 'Name of the function to use for this step. See https://docs.expo.dev/custom-builds/schema/#built-in-eas-functions for available functions.'\n ),\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().describe('Inputs to the function.'),\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().describe('Shell script to run in the step.'),\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().describe('Shell to run the \"run\" command with.'),\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\n .array(\n z.union([\n // We allow a shorthand for outputs\n z.string().transform((name) => ({ name, required: false })),\n z.object({\n name: z.string(),\n required: z.boolean().optional(),\n }),\n ])\n )\n .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.169",
3
+ "version": "1.0.172",
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": "c5cd63ad4b8326db3af48467e1d1b8187fd2fc1d"
38
+ "gitHead": "3fb33bcfe632cfa8e3a0e8fcceda82a8214c79c5"
39
39
  }