mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
30 lines
833 B
TypeScript
30 lines
833 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const ReleaseResultZodSchema = z.object({
|
|
releases: z.array(
|
|
z
|
|
.object({
|
|
version: z.string(),
|
|
isDeprecated: z.boolean().optional(),
|
|
releaseTimestamp: z.string().optional(),
|
|
sourceUrl: z.string().optional(),
|
|
sourceDirectory: z.string().optional(),
|
|
changelogUrl: z.string().optional(),
|
|
digest: z.string().optional(),
|
|
isStable: z.boolean().optional(),
|
|
})
|
|
.transform((input) => {
|
|
return {
|
|
...input,
|
|
newDigest: input.digest,
|
|
digest: undefined,
|
|
};
|
|
}),
|
|
),
|
|
tags: z.record(z.string(), z.string()).optional(),
|
|
sourceUrl: z.string().optional(),
|
|
sourceDirectory: z.string().optional(),
|
|
changelogUrl: z.string().optional(),
|
|
homepage: z.string().optional(),
|
|
});
|