feat(shell): config: add migrate warn

This commit is contained in:
Il Harper 2024-03-05 13:17:31 +08:00
parent dc7f619b48
commit 93aa0b9bcb
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC

View File

@ -43,6 +43,16 @@ const task = (async () => {
const validateResult = await validate('ChronocatConfig')(parsedConfig)
if (validateResult) {
if (
validateResult.includes(
'#/properties/servers/items/discriminator标签 "type"',
)
)
l.warn(
'可能存在不支持的服务器类型。是否未进行从 Chronocat v0.1.x 的迁移?',
{ code: 2157 },
)
l.error(new Error(`解析配置时出现问题。${validateResult}`), {
code: 2154,
throw: true,