mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-25 23:11:31 +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
24 lines
670 B
TypeScript
24 lines
670 B
TypeScript
import { z } from 'zod/v4';
|
|
import { regEx } from '../../../util/regex.ts';
|
|
import { Json } from '../../../util/schema-utils/index.ts';
|
|
|
|
export const EksAddonsFilter = Json.pipe(
|
|
z.object({
|
|
addonName: z
|
|
.string()
|
|
.nonempty()
|
|
.regex(regEx('^[a-z0-9][a-z0-9-]*[a-z0-9]$')),
|
|
kubernetesVersion: z
|
|
.string()
|
|
.regex(regEx('^(?<major>\\d+)\\.(?<minor>\\d+)$'))
|
|
.optional(),
|
|
default: z
|
|
.union([z.boolean(), z.string().transform((value) => value === 'true')])
|
|
.optional(),
|
|
region: z.string().optional(),
|
|
profile: z.string().optional(),
|
|
}),
|
|
);
|
|
|
|
export type EksAddonsFilter = z.infer<typeof EksAddonsFilter>;
|