@expo/eas-build-job
Advanced tools
Comparing version 1.0.126 to 1.0.128
@@ -6,3 +6,3 @@ import { z } from 'zod'; | ||
type Job = z.infer<typeof JobZ>; | ||
const JobZ: z.ZodObject<{ | ||
const JobZ: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{ | ||
projectArchive: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ | ||
@@ -54,2 +54,72 @@ type: z.ZodLiteral<import("./common").ArchiveSourceType.GIT>; | ||
}>]>; | ||
secrets: z.ZodObject<{ | ||
robotAccessToken: z.ZodString; | ||
environmentSecrets: z.ZodArray<z.ZodObject<{ | ||
name: z.ZodString; | ||
value: z.ZodString; | ||
type: z.ZodNativeEnum<typeof import("./common").EnvironmentSecretType>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: import("./common").EnvironmentSecretType; | ||
value: string; | ||
name: string; | ||
}, { | ||
type: import("./common").EnvironmentSecretType; | ||
value: string; | ||
name: string; | ||
}>, "many">; | ||
}, "strip", z.ZodTypeAny, { | ||
environmentSecrets: { | ||
type: import("./common").EnvironmentSecretType; | ||
value: string; | ||
name: string; | ||
}[]; | ||
robotAccessToken: string; | ||
}, { | ||
environmentSecrets: { | ||
type: import("./common").EnvironmentSecretType; | ||
value: string; | ||
name: string; | ||
}[]; | ||
robotAccessToken: string; | ||
}>; | ||
expoDevUrl: z.ZodString; | ||
builderEnvironment: z.ZodObject<{ | ||
image: z.ZodString; | ||
node: z.ZodOptional<z.ZodString>; | ||
yarn: z.ZodOptional<z.ZodString>; | ||
pnpm: z.ZodOptional<z.ZodString>; | ||
bun: z.ZodOptional<z.ZodString>; | ||
env: z.ZodRecord<z.ZodString, z.ZodString>; | ||
ndk: z.ZodOptional<z.ZodString>; | ||
bundler: z.ZodOptional<z.ZodString>; | ||
fastlane: z.ZodOptional<z.ZodString>; | ||
cocoapods: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
env: Record<string, string>; | ||
image: string; | ||
node?: string | undefined; | ||
yarn?: string | undefined; | ||
pnpm?: string | undefined; | ||
bun?: string | undefined; | ||
ndk?: string | undefined; | ||
bundler?: string | undefined; | ||
fastlane?: string | undefined; | ||
cocoapods?: string | undefined; | ||
}, { | ||
env: Record<string, string>; | ||
image: string; | ||
node?: string | undefined; | ||
yarn?: string | undefined; | ||
pnpm?: string | undefined; | ||
bun?: string | undefined; | ||
ndk?: string | undefined; | ||
bundler?: string | undefined; | ||
fastlane?: string | undefined; | ||
cocoapods?: string | undefined; | ||
}>; | ||
platform: z.ZodOptional<z.ZodNever>; | ||
type: z.ZodOptional<z.ZodNever>; | ||
triggeredBy: z.ZodLiteral<BuildTrigger.GIT_BASED_INTEGRATION>; | ||
loggerLevel: z.ZodOptional<z.ZodNativeEnum<typeof LoggerLevel>>; | ||
}, { | ||
customBuildConfig: z.ZodObject<{ | ||
@@ -62,65 +132,142 @@ path: z.ZodString; | ||
}>; | ||
steps: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodOptional<z.ZodString>; | ||
if: z.ZodOptional<z.ZodString>; | ||
name: z.ZodOptional<z.ZodString>; | ||
working_directory: z.ZodOptional<z.ZodString>; | ||
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
steps: z.ZodOptional<z.ZodNever>; | ||
}>, "strip", z.ZodTypeAny, { | ||
builderEnvironment: { | ||
env: Record<string, string>; | ||
image: string; | ||
node?: string | undefined; | ||
yarn?: string | undefined; | ||
pnpm?: string | undefined; | ||
bun?: string | undefined; | ||
ndk?: string | undefined; | ||
bundler?: string | undefined; | ||
fastlane?: string | undefined; | ||
cocoapods?: string | undefined; | ||
}; | ||
triggeredBy: BuildTrigger.GIT_BASED_INTEGRATION; | ||
projectArchive: { | ||
type: import("./common").ArchiveSourceType.GIT; | ||
repositoryUrl: string; | ||
gitRef: string | null; | ||
gitCommitHash: string; | ||
} | { | ||
type: import("./common").ArchiveSourceType.PATH; | ||
path: string; | ||
} | { | ||
type: import("./common").ArchiveSourceType.URL; | ||
url: string; | ||
} | { | ||
type: import("./common").ArchiveSourceType.GCS; | ||
bucketKey: string; | ||
metadataLocation?: string | undefined; | ||
}; | ||
secrets: { | ||
environmentSecrets: { | ||
type: import("./common").EnvironmentSecretType; | ||
value: string; | ||
name: string; | ||
}[]; | ||
robotAccessToken: string; | ||
}; | ||
customBuildConfig: { | ||
path: string; | ||
}; | ||
expoDevUrl: string; | ||
type?: undefined; | ||
platform?: undefined; | ||
loggerLevel?: LoggerLevel | undefined; | ||
steps?: undefined; | ||
}, { | ||
builderEnvironment: { | ||
env: Record<string, string>; | ||
image: string; | ||
node?: string | undefined; | ||
yarn?: string | undefined; | ||
pnpm?: string | undefined; | ||
bun?: string | undefined; | ||
ndk?: string | undefined; | ||
bundler?: string | undefined; | ||
fastlane?: string | undefined; | ||
cocoapods?: string | undefined; | ||
}; | ||
triggeredBy: BuildTrigger.GIT_BASED_INTEGRATION; | ||
projectArchive: { | ||
type: import("./common").ArchiveSourceType.GIT; | ||
repositoryUrl: string; | ||
gitRef: string | null; | ||
gitCommitHash: string; | ||
} | { | ||
type: import("./common").ArchiveSourceType.PATH; | ||
path: string; | ||
} | { | ||
type: import("./common").ArchiveSourceType.URL; | ||
url: string; | ||
} | { | ||
type: import("./common").ArchiveSourceType.GCS; | ||
bucketKey: string; | ||
metadataLocation?: string | undefined; | ||
}; | ||
secrets: { | ||
environmentSecrets: { | ||
type: import("./common").EnvironmentSecretType; | ||
value: string; | ||
name: string; | ||
}[]; | ||
robotAccessToken: string; | ||
}; | ||
customBuildConfig: { | ||
path: string; | ||
}; | ||
expoDevUrl: string; | ||
type?: undefined; | ||
platform?: undefined; | ||
loggerLevel?: LoggerLevel | undefined; | ||
steps?: undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
projectArchive: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ | ||
type: z.ZodLiteral<import("./common").ArchiveSourceType.GIT>; | ||
repositoryUrl: z.ZodString; | ||
gitRef: z.ZodNullable<z.ZodString>; | ||
gitCommitHash: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: import("./common").ArchiveSourceType.GIT; | ||
repositoryUrl: string; | ||
gitRef: string | null; | ||
gitCommitHash: string; | ||
}, { | ||
run: z.ZodString; | ||
shell: z.ZodOptional<z.ZodString>; | ||
uses: z.ZodOptional<z.ZodNever>; | ||
with: z.ZodOptional<z.ZodNever>; | ||
}>, "strip", z.ZodTypeAny, { | ||
run: string; | ||
name?: string | undefined; | ||
env?: Record<string, string> | undefined; | ||
id?: string | undefined; | ||
if?: string | undefined; | ||
working_directory?: string | undefined; | ||
uses?: undefined; | ||
with?: undefined; | ||
shell?: string | undefined; | ||
type: import("./common").ArchiveSourceType.GIT; | ||
repositoryUrl: string; | ||
gitRef: string | null; | ||
gitCommitHash: string; | ||
}>, z.ZodObject<{ | ||
type: z.ZodLiteral<import("./common").ArchiveSourceType.PATH>; | ||
path: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: import("./common").ArchiveSourceType.PATH; | ||
path: string; | ||
}, { | ||
run: string; | ||
name?: string | undefined; | ||
env?: Record<string, string> | undefined; | ||
id?: string | undefined; | ||
if?: string | undefined; | ||
working_directory?: string | undefined; | ||
uses?: undefined; | ||
with?: undefined; | ||
shell?: string | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodOptional<z.ZodString>; | ||
if: z.ZodOptional<z.ZodString>; | ||
name: z.ZodOptional<z.ZodString>; | ||
working_directory: z.ZodOptional<z.ZodString>; | ||
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
type: import("./common").ArchiveSourceType.PATH; | ||
path: string; | ||
}>, z.ZodObject<{ | ||
type: z.ZodLiteral<import("./common").ArchiveSourceType.URL>; | ||
url: z.ZodString; | ||
}, "strip", z.ZodTypeAny, { | ||
type: import("./common").ArchiveSourceType.URL; | ||
url: string; | ||
}, { | ||
uses: z.ZodString; | ||
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; | ||
run: z.ZodOptional<z.ZodNever>; | ||
shell: z.ZodOptional<z.ZodNever>; | ||
}>, "strip", z.ZodTypeAny, { | ||
uses: string; | ||
name?: string | undefined; | ||
env?: Record<string, string> | undefined; | ||
id?: string | undefined; | ||
if?: string | undefined; | ||
working_directory?: string | undefined; | ||
with?: Record<string, unknown> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
type: import("./common").ArchiveSourceType.URL; | ||
url: string; | ||
}>, z.ZodObject<{ | ||
type: z.ZodLiteral<import("./common").ArchiveSourceType.GCS>; | ||
bucketKey: z.ZodString; | ||
metadataLocation: z.ZodOptional<z.ZodString>; | ||
}, "strip", z.ZodTypeAny, { | ||
type: import("./common").ArchiveSourceType.GCS; | ||
bucketKey: string; | ||
metadataLocation?: string | undefined; | ||
}, { | ||
uses: string; | ||
name?: string | undefined; | ||
env?: Record<string, string> | undefined; | ||
id?: string | undefined; | ||
if?: string | undefined; | ||
working_directory?: string | undefined; | ||
with?: Record<string, unknown> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
}>]>, "many">>; | ||
type: import("./common").ArchiveSourceType.GCS; | ||
bucketKey: string; | ||
metadataLocation?: string | undefined; | ||
}>]>; | ||
secrets: z.ZodObject<{ | ||
@@ -195,3 +342,89 @@ robotAccessToken: z.ZodString; | ||
loggerLevel: z.ZodOptional<z.ZodNativeEnum<typeof LoggerLevel>>; | ||
}, "strip", z.ZodTypeAny, { | ||
}, { | ||
customBuildConfig: z.ZodOptional<z.ZodNever>; | ||
steps: z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodOptional<z.ZodString>; | ||
if: z.ZodOptional<z.ZodString>; | ||
name: z.ZodOptional<z.ZodString>; | ||
working_directory: z.ZodOptional<z.ZodString>; | ||
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
}, { | ||
run: z.ZodString; | ||
shell: z.ZodOptional<z.ZodString>; | ||
outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{ | ||
name: z.ZodString; | ||
required: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
name: string; | ||
required?: boolean | undefined; | ||
}, { | ||
name: string; | ||
required?: boolean | undefined; | ||
}>, "many">>; | ||
uses: z.ZodOptional<z.ZodNever>; | ||
with: z.ZodOptional<z.ZodNever>; | ||
}>, "strip", z.ZodTypeAny, { | ||
run: string; | ||
name?: string | undefined; | ||
env?: Record<string, string> | undefined; | ||
id?: string | undefined; | ||
if?: string | undefined; | ||
working_directory?: string | undefined; | ||
uses?: undefined; | ||
with?: undefined; | ||
shell?: string | undefined; | ||
outputs?: { | ||
name: string; | ||
required?: boolean | undefined; | ||
}[] | undefined; | ||
}, { | ||
run: string; | ||
name?: string | undefined; | ||
env?: Record<string, string> | undefined; | ||
id?: string | undefined; | ||
if?: string | undefined; | ||
working_directory?: string | undefined; | ||
uses?: undefined; | ||
with?: undefined; | ||
shell?: string | undefined; | ||
outputs?: { | ||
name: string; | ||
required?: boolean | undefined; | ||
}[] | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
id: z.ZodOptional<z.ZodString>; | ||
if: z.ZodOptional<z.ZodString>; | ||
name: z.ZodOptional<z.ZodString>; | ||
working_directory: z.ZodOptional<z.ZodString>; | ||
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
}, { | ||
uses: z.ZodString; | ||
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>; | ||
run: z.ZodOptional<z.ZodNever>; | ||
shell: z.ZodOptional<z.ZodNever>; | ||
outputs: z.ZodOptional<z.ZodNever>; | ||
}>, "strip", z.ZodTypeAny, { | ||
uses: string; | ||
name?: string | undefined; | ||
env?: Record<string, string> | undefined; | ||
id?: string | undefined; | ||
if?: string | undefined; | ||
working_directory?: string | undefined; | ||
with?: Record<string, string | number | Record<string, any>> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
outputs?: undefined; | ||
}, { | ||
uses: string; | ||
name?: string | undefined; | ||
env?: Record<string, string> | undefined; | ||
id?: string | undefined; | ||
if?: string | undefined; | ||
working_directory?: string | undefined; | ||
with?: Record<string, string | number | Record<string, any>> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
outputs?: undefined; | ||
}>]>, "many">; | ||
}>, "strip", z.ZodTypeAny, { | ||
builderEnvironment: { | ||
@@ -234,10 +467,4 @@ env: Record<string, string>; | ||
}; | ||
customBuildConfig: { | ||
path: string; | ||
}; | ||
expoDevUrl: string; | ||
type?: undefined; | ||
platform?: undefined; | ||
loggerLevel?: LoggerLevel | undefined; | ||
steps?: ({ | ||
steps: ({ | ||
uses: string; | ||
@@ -249,5 +476,6 @@ name?: string | undefined; | ||
working_directory?: string | undefined; | ||
with?: Record<string, unknown> | undefined; | ||
with?: Record<string, string | number | Record<string, any>> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
@@ -263,3 +491,11 @@ run: string; | ||
shell?: string | undefined; | ||
})[] | undefined; | ||
outputs?: { | ||
name: string; | ||
required?: boolean | undefined; | ||
}[] | undefined; | ||
})[]; | ||
type?: undefined; | ||
platform?: undefined; | ||
customBuildConfig?: undefined; | ||
loggerLevel?: LoggerLevel | undefined; | ||
}, { | ||
@@ -303,10 +539,4 @@ builderEnvironment: { | ||
}; | ||
customBuildConfig: { | ||
path: string; | ||
}; | ||
expoDevUrl: string; | ||
type?: undefined; | ||
platform?: undefined; | ||
loggerLevel?: LoggerLevel | undefined; | ||
steps?: ({ | ||
steps: ({ | ||
uses: string; | ||
@@ -318,5 +548,6 @@ name?: string | undefined; | ||
working_directory?: string | undefined; | ||
with?: Record<string, unknown> | undefined; | ||
with?: Record<string, string | number | Record<string, any>> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
@@ -332,4 +563,12 @@ run: string; | ||
shell?: string | undefined; | ||
})[] | undefined; | ||
}>; | ||
outputs?: { | ||
name: string; | ||
required?: boolean | undefined; | ||
}[] | undefined; | ||
})[]; | ||
type?: undefined; | ||
platform?: undefined; | ||
customBuildConfig?: undefined; | ||
loggerLevel?: LoggerLevel | undefined; | ||
}>]>; | ||
} |
@@ -24,8 +24,4 @@ "use strict"; | ||
}); | ||
Generic.JobZ = zod_1.z.object({ | ||
const CommonJobZ = zod_1.z.object({ | ||
projectArchive: common_1.ArchiveSourceSchemaZ, | ||
customBuildConfig: zod_1.z.object({ | ||
path: zod_1.z.string(), | ||
}), | ||
steps: zod_1.z.array(step_1.StepZ).optional(), | ||
secrets: zod_1.z.object({ | ||
@@ -43,3 +39,15 @@ robotAccessToken: zod_1.z.string(), | ||
}); | ||
Generic.JobZ = zod_1.z.union([ | ||
CommonJobZ.extend({ | ||
customBuildConfig: zod_1.z.object({ | ||
path: zod_1.z.string(), | ||
}), | ||
steps: zod_1.z.never().optional(), | ||
}), | ||
CommonJobZ.extend({ | ||
customBuildConfig: zod_1.z.never().optional(), | ||
steps: zod_1.z.array(step_1.StepZ).min(1), | ||
}), | ||
]); | ||
})(Generic || (exports.Generic = Generic = {})); | ||
//# sourceMappingURL=generic.js.map |
@@ -65,5 +65,6 @@ import { z } from 'zod'; | ||
*/ | ||
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; | ||
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>; | ||
run: z.ZodOptional<z.ZodNever>; | ||
shell: z.ZodOptional<z.ZodNever>; | ||
outputs: z.ZodOptional<z.ZodNever>; | ||
}>, "strip", z.ZodTypeAny, { | ||
@@ -76,5 +77,6 @@ uses: string; | ||
working_directory?: string | undefined; | ||
with?: Record<string, unknown> | undefined; | ||
with?: Record<string, string | number | Record<string, any>> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
outputs?: undefined; | ||
}, { | ||
@@ -87,5 +89,6 @@ uses: string; | ||
working_directory?: string | undefined; | ||
with?: Record<string, unknown> | undefined; | ||
with?: Record<string, string | number | Record<string, any>> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
outputs?: undefined; | ||
}>; | ||
@@ -154,2 +157,23 @@ export type FunctionStep = z.infer<typeof FunctionStepZ>; | ||
shell: z.ZodOptional<z.ZodString>; | ||
/** | ||
* The outputs of the step. | ||
* | ||
* @example | ||
* outputs: | ||
* - name: my_output | ||
* required: true | ||
* - name: my_optional_output | ||
* required: false | ||
* - name: my_optional_output_without_required | ||
*/ | ||
outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{ | ||
name: z.ZodString; | ||
required: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
name: string; | ||
required?: boolean | undefined; | ||
}, { | ||
name: string; | ||
required?: boolean | undefined; | ||
}>, "many">>; | ||
uses: z.ZodOptional<z.ZodNever>; | ||
@@ -167,2 +191,6 @@ with: z.ZodOptional<z.ZodNever>; | ||
shell?: string | undefined; | ||
outputs?: { | ||
name: string; | ||
required?: boolean | undefined; | ||
}[] | undefined; | ||
}, { | ||
@@ -178,2 +206,6 @@ run: string; | ||
shell?: string | undefined; | ||
outputs?: { | ||
name: string; | ||
required?: boolean | undefined; | ||
}[] | undefined; | ||
}>; | ||
@@ -242,2 +274,23 @@ export type ShellStep = z.infer<typeof ShellStepZ>; | ||
shell: z.ZodOptional<z.ZodString>; | ||
/** | ||
* The outputs of the step. | ||
* | ||
* @example | ||
* outputs: | ||
* - name: my_output | ||
* required: true | ||
* - name: my_optional_output | ||
* required: false | ||
* - name: my_optional_output_without_required | ||
*/ | ||
outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{ | ||
name: z.ZodString; | ||
required: z.ZodOptional<z.ZodBoolean>; | ||
}, "strip", z.ZodTypeAny, { | ||
name: string; | ||
required?: boolean | undefined; | ||
}, { | ||
name: string; | ||
required?: boolean | undefined; | ||
}>, "many">>; | ||
uses: z.ZodOptional<z.ZodNever>; | ||
@@ -255,2 +308,6 @@ with: z.ZodOptional<z.ZodNever>; | ||
shell?: string | undefined; | ||
outputs?: { | ||
name: string; | ||
required?: boolean | undefined; | ||
}[] | undefined; | ||
}, { | ||
@@ -266,2 +323,6 @@ run: string; | ||
shell?: string | undefined; | ||
outputs?: { | ||
name: string; | ||
required?: boolean | undefined; | ||
}[] | undefined; | ||
}>, z.ZodObject<z.objectUtil.extendShape<{ | ||
@@ -330,5 +391,6 @@ /** | ||
*/ | ||
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; | ||
with: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodRecord<z.ZodString, z.ZodAny>]>>>; | ||
run: z.ZodOptional<z.ZodNever>; | ||
shell: z.ZodOptional<z.ZodNever>; | ||
outputs: z.ZodOptional<z.ZodNever>; | ||
}>, "strip", z.ZodTypeAny, { | ||
@@ -341,5 +403,6 @@ uses: string; | ||
working_directory?: string | undefined; | ||
with?: Record<string, unknown> | undefined; | ||
with?: Record<string, string | number | Record<string, any>> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
outputs?: undefined; | ||
}, { | ||
@@ -352,5 +415,6 @@ uses: string; | ||
working_directory?: string | undefined; | ||
with?: Record<string, unknown> | undefined; | ||
with?: Record<string, string | number | Record<string, any>> | undefined; | ||
run?: undefined; | ||
shell?: undefined; | ||
outputs?: undefined; | ||
}>]>; | ||
@@ -378,1 +442,4 @@ /** | ||
export type Step = z.infer<typeof StepZ>; | ||
export declare function validateSteps(maybeSteps: unknown): Step[]; | ||
export declare function isStepShellStep(step: Step): step is ShellStep; | ||
export declare function isStepFunctionStep(step: Step): step is FunctionStep; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StepZ = exports.ShellStepZ = exports.FunctionStepZ = void 0; | ||
exports.isStepFunctionStep = exports.isStepShellStep = exports.validateSteps = exports.StepZ = exports.ShellStepZ = exports.FunctionStepZ = void 0; | ||
const zod_1 = require("zod"); | ||
const StepOutputZ = zod_1.z.object({ | ||
name: zod_1.z.string(), | ||
required: zod_1.z.boolean().optional(), | ||
}); | ||
const CommonStepZ = zod_1.z.object({ | ||
@@ -69,5 +73,6 @@ /** | ||
*/ | ||
with: zod_1.z.record(zod_1.z.unknown()).optional(), | ||
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(), | ||
run: zod_1.z.never().optional(), | ||
shell: zod_1.z.never().optional(), | ||
outputs: zod_1.z.never().optional(), | ||
}); | ||
@@ -97,2 +102,14 @@ exports.ShellStepZ = CommonStepZ.extend({ | ||
shell: zod_1.z.string().optional(), | ||
/** | ||
* The outputs of the step. | ||
* | ||
* @example | ||
* outputs: | ||
* - name: my_output | ||
* required: true | ||
* - name: my_optional_output | ||
* required: false | ||
* - name: my_optional_output_without_required | ||
*/ | ||
outputs: zod_1.z.array(StepOutputZ).optional(), | ||
uses: zod_1.z.never().optional(), | ||
@@ -102,2 +119,15 @@ with: zod_1.z.never().optional(), | ||
exports.StepZ = zod_1.z.union([exports.ShellStepZ, exports.FunctionStepZ]); | ||
function validateSteps(maybeSteps) { | ||
const steps = zod_1.z.array(exports.StepZ).min(1).parse(maybeSteps); | ||
return steps; | ||
} | ||
exports.validateSteps = validateSteps; | ||
function isStepShellStep(step) { | ||
return step.run !== undefined; | ||
} | ||
exports.isStepShellStep = isStepShellStep; | ||
function isStepFunctionStep(step) { | ||
return step.uses !== undefined; | ||
} | ||
exports.isStepFunctionStep = isStepFunctionStep; | ||
//# sourceMappingURL=step.js.map |
{ | ||
"name": "@expo/eas-build-job", | ||
"version": "1.0.126", | ||
"version": "1.0.128", | ||
"main": "dist/index.js", | ||
@@ -38,3 +38,3 @@ "types": "dist/index.d.ts", | ||
}, | ||
"gitHead": "b329acd121e1a7d98d71d0ecf7396c8b875612a9" | ||
"gitHead": "8f98df8074316d9d152f00ae6deba610dfea1b6f" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
168481
2591