mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 22:29:06 +00:00
f619736677
Co-authored-by: Rhys Arkins <rhys@arkins.net> Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
25 lines
628 B
TypeScript
25 lines
628 B
TypeScript
import { z } from 'zod';
|
|
import { Toml } from '../../../util/schema-utils';
|
|
|
|
export const GleamToml = Toml.pipe(
|
|
z.object({
|
|
name: z.string(),
|
|
dependencies: z.record(z.string(), z.string()).optional(),
|
|
['dev-dependencies']: z.record(z.string(), z.string()).optional(),
|
|
}),
|
|
);
|
|
|
|
const Package = z.object({
|
|
name: z.string(),
|
|
version: z.string(),
|
|
requirements: z.array(z.string()).optional(),
|
|
});
|
|
|
|
export const ManifestToml = Toml.pipe(
|
|
z.object({
|
|
packages: z.array(Package).optional(),
|
|
}),
|
|
);
|
|
|
|
export type GleamToml = z.infer<typeof GleamToml>;
|
|
export type ManifestToml = z.infer<typeof ManifestToml>;
|