[ci] format
This commit is contained in:
parent
81dce94f2a
commit
1d37ab4f9f
1 changed files with 2 additions and 5 deletions
|
@ -1,8 +1,8 @@
|
||||||
import { z } from 'astro/zod';
|
import { z } from 'astro/zod';
|
||||||
import { XMLBuilder, XMLParser } from 'fast-xml-parser';
|
import { XMLBuilder, XMLParser } from 'fast-xml-parser';
|
||||||
|
import { yellow } from 'kleur/colors';
|
||||||
import { rssSchema } from './schema.js';
|
import { rssSchema } from './schema.js';
|
||||||
import { createCanonicalURL, errorMap, isValidURL } from './util.js';
|
import { createCanonicalURL, errorMap, isValidURL } from './util.js';
|
||||||
import { yellow } from 'kleur/colors';
|
|
||||||
|
|
||||||
export { rssSchema };
|
export { rssSchema };
|
||||||
|
|
||||||
|
@ -57,10 +57,7 @@ const globResultValidator = z.record(z.function().returns(z.promise(z.any())));
|
||||||
const rssOptionsValidator = z.object({
|
const rssOptionsValidator = z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
description: z.string(),
|
description: z.string(),
|
||||||
site: z.preprocess(
|
site: z.preprocess((url) => (url instanceof URL ? url.href : url), z.string().url()),
|
||||||
url => url instanceof URL ? url.href : url,
|
|
||||||
z.string().url(),
|
|
||||||
),
|
|
||||||
items: z
|
items: z
|
||||||
.array(rssFeedItemValidator)
|
.array(rssFeedItemValidator)
|
||||||
.or(globResultValidator)
|
.or(globResultValidator)
|
||||||
|
|
Loading…
Reference in a new issue