Handle legacy single-object manyDecks config
Build and push CoqDecks / build (push) Successful in 1m6s
Build and push CoqDecks / build (push) Successful in 1m6s
Old configs have manyDecks as a plain object; new format is an array. Wrap the old format in an array so existing deployments keep working without a config migration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -171,7 +171,12 @@ const parseManyDecks = (
|
||||
const parseSources = (sources: BaseSources<UnparsedDuration>): Sources => ({
|
||||
...(sources.builtIn !== undefined ? { builtIn: sources.builtIn } : {}),
|
||||
...(sources.manyDecks !== undefined
|
||||
? { manyDecks: sources.manyDecks.map(parseManyDecks) }
|
||||
? {
|
||||
manyDecks: (Array.isArray(sources.manyDecks)
|
||||
? sources.manyDecks
|
||||
: [sources.manyDecks]
|
||||
).map(parseManyDecks),
|
||||
}
|
||||
: {}),
|
||||
...(sources.jsonAgainstHumanity !== undefined
|
||||
? { jsonAgainstHumanity: sources.jsonAgainstHumanity }
|
||||
|
||||
Reference in New Issue
Block a user