mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-27 15:58:48 +00:00
15f4bd8eff
* chore: migrate from zod/v3 to zod/v4 This commit contains the logic changes * chore: migrate imports from zod/v3 to zod/v4 This contains import updates and adds explicit record keys as zod/v4 requires these now * ci: enforce usage of zod/v4
27 lines
724 B
TypeScript
27 lines
724 B
TypeScript
import { z } from 'zod/v4';
|
|
import { Yaml } from '../../../util/schema-utils/index.ts';
|
|
|
|
export const CrowStep = z.object({
|
|
image: z.string().optional(),
|
|
});
|
|
|
|
export const CrowStepWithName = CrowStep.extend({
|
|
name: z.string(),
|
|
});
|
|
|
|
export const CrowConfig = Yaml.pipe(
|
|
z.object({
|
|
pipeline: z
|
|
.union([z.record(z.string(), CrowStep), z.array(CrowStepWithName)])
|
|
.optional(),
|
|
steps: z
|
|
.union([z.record(z.string(), CrowStep), z.array(CrowStepWithName)])
|
|
.optional(),
|
|
clone: z.record(z.string(), CrowStep).optional(),
|
|
services: z.record(z.string(), CrowStep).optional(),
|
|
}),
|
|
);
|
|
|
|
export type CrowConfig = z.infer<typeof CrowConfig>;
|
|
export type CrowStep = z.infer<typeof CrowStep>;
|