mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
fix(context): tolerate legacy setup.completed_steps and optional driver
- Accept and drop the legacy setup.completed_steps field so existing ktx.yaml files migrated from older versions still load. - Make connections.<id>.driver optional in the schema; runtime code already produces a clear "no driver" error at use time.
This commit is contained in:
parent
38e71a94e7
commit
6102be488e
1 changed files with 7 additions and 4 deletions
|
|
@ -99,9 +99,12 @@ const scanSchema = z.strictObject({
|
|||
relationships: scanRelationshipsSchema.prefault({}),
|
||||
});
|
||||
|
||||
const setupSchema = z.strictObject({
|
||||
database_connection_ids: z.array(z.string().min(1)).default([]),
|
||||
});
|
||||
const setupSchema = z
|
||||
.strictObject({
|
||||
database_connection_ids: z.array(z.string().min(1)).default([]),
|
||||
completed_steps: z.unknown().optional(),
|
||||
})
|
||||
.transform(({ database_connection_ids }) => ({ database_connection_ids }));
|
||||
|
||||
const storageGitSchema = z.strictObject({
|
||||
auto_commit: z.boolean().default(true),
|
||||
|
|
@ -115,7 +118,7 @@ const storageSchema = z.strictObject({
|
|||
});
|
||||
|
||||
const connectionSchema = z.looseObject({
|
||||
driver: z.string().min(1),
|
||||
driver: z.string().min(1).optional(),
|
||||
url: z.string().optional(),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue