refactor: replace io-ts with zod
This commit is contained in:
parent
fafaefa1fb
commit
28692962bc
161 changed files with 1450 additions and 2105 deletions
|
@ -1,7 +1,6 @@
|
|||
import { PluginOptions } from "knub";
|
||||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { GuildPersistedData } from "../../data/GuildPersistedData";
|
||||
import { makeIoTsConfigParser } from "../../pluginUtils";
|
||||
import { trimPluginDescription } from "../../utils";
|
||||
import { GuildMemberCachePlugin } from "../GuildMemberCache/GuildMemberCachePlugin";
|
||||
import { LogsPlugin } from "../Logs/LogsPlugin";
|
||||
|
@ -9,7 +8,7 @@ import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin";
|
|||
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { LoadDataEvt } from "./events/LoadDataEvt";
|
||||
import { StoreDataEvt } from "./events/StoreDataEvt";
|
||||
import { ConfigSchema, PersistPluginType } from "./types";
|
||||
import { PersistPluginType, zPersistConfig } from "./types";
|
||||
|
||||
const defaultOptions: PluginOptions<PersistPluginType> = {
|
||||
config: {
|
||||
|
@ -28,11 +27,11 @@ export const PersistPlugin = zeppelinGuildPlugin<PersistPluginType>()({
|
|||
Re-apply roles or nicknames for users when they rejoin the server.
|
||||
Mute roles are re-applied automatically, this plugin is not required for that.
|
||||
`),
|
||||
configSchema: ConfigSchema,
|
||||
configSchema: zPersistConfig,
|
||||
},
|
||||
|
||||
dependencies: () => [LogsPlugin, RoleManagerPlugin, GuildMemberCachePlugin],
|
||||
configParser: makeIoTsConfigParser(ConfigSchema),
|
||||
configParser: (input) => zPersistConfig.parse(input),
|
||||
defaultOptions,
|
||||
|
||||
// prettier-ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue