Skip to content

Commit

Permalink
Add schema for v1 config
Browse files Browse the repository at this point in the history
  • Loading branch information
whatuserever committed Feb 15, 2025
1 parent 1032698 commit c2f73f3
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { z } from 'zod';
import { originalConfigSchema } from './original';

export const v1ConfigSchema = originalConfigSchema.extend({ version: z.literal(1) });

export function migrateOriginalToV1(v1Config: z.infer<typeof originalConfigSchema>): z.infer<typeof v1ConfigSchema> {
return {
...v1Config,
version: 1,
};
}

0 comments on commit c2f73f3

Please sign in to comment.