fix(core): accept deprecated reference config key (#31659)
This commit is contained in:
parent
97e713e8aa
commit
90fb32be30
6 changed files with 69 additions and 2 deletions
|
|
@ -45,6 +45,9 @@ export const Info = Schema.Struct({
|
|||
references: Schema.optional(ConfigReference.Info).annotate({
|
||||
description: "Named git or local directory references",
|
||||
}),
|
||||
reference: Schema.optional(ConfigReference.Info).annotate({
|
||||
description: "@deprecated Use 'references' field instead. Named git or local directory references",
|
||||
}),
|
||||
watcher: Schema.optional(Schema.Struct({ ignore: Schema.optional(Schema.mutable(Schema.Array(Schema.String))) })),
|
||||
snapshot: Schema.optional(Schema.Boolean).annotate({
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ const keys = new Set([
|
|||
"logLevel",
|
||||
"server",
|
||||
"command",
|
||||
"reference",
|
||||
"snapshot",
|
||||
"plugin",
|
||||
"autoshare",
|
||||
|
|
@ -62,7 +63,7 @@ export function migrate(info: typeof ConfigV1.Info.Type) {
|
|||
skills: info.skills && [...(info.skills.paths ?? []), ...(info.skills.urls ?? [])],
|
||||
commands: info.command,
|
||||
instructions: info.instructions,
|
||||
references: info.references,
|
||||
references: info.references ?? info.reference,
|
||||
plugins: info.plugin?.map((plugin) =>
|
||||
typeof plugin === "string" ? plugin : { package: plugin[0], options: plugin[1] },
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue