UNPKG

@jackdbd/eleventy-plugin-text-to-speech

Version:

Eleventy plugin that uses text-to-speech to generate audio assets for your website, then injects audio players in your HTML.

37 lines 839 B
import { z } from 'zod'; // import { href } from '../schemas/common.js' /** * @internal */ export const write_result_success = z.object({ error: z.undefined().optional(), value: z.object({ // href, href: z.string().min(1), message: z.string().min(1) }) }); /** * @internal */ export const write_result_failure = z.object({ error: z.instanceof(Error), value: z.undefined().optional() }); /** * @internal */ export const write_result = z.union([ write_result_failure, write_result_success ]); /** * @internal */ export const write_func = z.function().returns(z.promise(write_result)); export const hosting = z.object({ config: z.object({}).passthrough(), write: write_func }); export const hosting_client = z.function().returns(hosting); //# sourceMappingURL=schemas.js.map