mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 19:17:19 +00:00
chore: run prettier
This commit is contained in:
parent
77ab2718e7
commit
873bf7eb99
54 changed files with 462 additions and 416 deletions
|
@ -1,21 +1,21 @@
|
|||
import { z } from "zod";
|
||||
import { guildPlugins } from "./plugins/availablePlugins";
|
||||
import zodToJsonSchema from "zod-to-json-schema";
|
||||
import { guildPlugins } from "./plugins/availablePlugins";
|
||||
import { zZeppelinGuildConfig } from "./types";
|
||||
|
||||
const pluginSchemaMap = guildPlugins.reduce((map, plugin) => {
|
||||
if (! plugin.info) {
|
||||
if (!plugin.info) {
|
||||
return map;
|
||||
}
|
||||
map[plugin.name] = plugin.info.configSchema;
|
||||
return map;
|
||||
}, {});
|
||||
|
||||
const fullSchema = zZeppelinGuildConfig
|
||||
.omit({ plugins: true })
|
||||
.merge(z.strictObject({
|
||||
const fullSchema = zZeppelinGuildConfig.omit({ plugins: true }).merge(
|
||||
z.strictObject({
|
||||
plugins: z.strictObject(pluginSchemaMap).partial(),
|
||||
}));
|
||||
}),
|
||||
);
|
||||
|
||||
const jsonSchema = zodToJsonSchema(fullSchema);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue