mirror of
https://github.com/renovatebot/renovate.git
synced 2026-11-02 10:33:39 +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
26 lines
647 B
TypeScript
26 lines
647 B
TypeScript
import { z } from 'zod/v4';
|
|
import { MaybeTimestamp } from '../../../util/timestamp.ts';
|
|
|
|
export type GalaxyV1 = z.infer<typeof GalaxyV1>;
|
|
export const GalaxyV1 = z.object({
|
|
results: z.array(
|
|
z.object({
|
|
summary_fields: z.object({
|
|
versions: z.array(
|
|
z
|
|
.object({
|
|
name: z.string(),
|
|
created: MaybeTimestamp,
|
|
})
|
|
.transform(({ name, created }) => ({
|
|
version: name,
|
|
releaseTimestamp: created,
|
|
})),
|
|
),
|
|
}),
|
|
github_user: z.string().optional(),
|
|
github_repo: z.string().optional(),
|
|
}),
|
|
),
|
|
});
|