mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-31 09:41:46 +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
773 B
TypeScript
27 lines
773 B
TypeScript
import { z } from 'zod/v4';
|
|
import { DockerDatasource } from '../../../datasource/docker/index.ts';
|
|
import { id as dockerVersioning } from '../../../versioning/docker/index.ts';
|
|
import type { PackageDependency } from '../../types.ts';
|
|
|
|
export const ociRules = ['oci_pull', '_oci_pull'] as const;
|
|
|
|
export const OciTarget = z
|
|
.object({
|
|
rule: z.enum(ociRules),
|
|
name: z.string(),
|
|
image: z.string(),
|
|
tag: z.string().optional(),
|
|
digest: z.string().optional(),
|
|
})
|
|
.transform(({ rule, name, image, tag, digest }): PackageDependency[] => [
|
|
{
|
|
datasource: DockerDatasource.id,
|
|
versioning: dockerVersioning,
|
|
depType: rule,
|
|
depName: name,
|
|
packageName: image,
|
|
currentValue: tag,
|
|
currentDigest: digest,
|
|
},
|
|
]);
|