We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddb3a0f commit 4002cb6Copy full SHA for 4002cb6
1 file changed
packages/core/src/generate.ts
@@ -1,7 +1,20 @@
1
import path from "path";
2
+import { z } from "zod";
3
4
import { Provider, Model } from "./schema.js";
5
6
+const ExtendsModel = Model.sourceType()
7
+ .partial()
8
+ .extend({
9
+ extends: z
10
+ .object({
11
+ from: z.string(),
12
+ omit: z.array(z.string()).optional(),
13
+ })
14
+ .strict(),
15
16
+ .strict();
17
+
18
export async function generate(directory: string) {
19
const result = {} as Record<string, Provider>;
20
for await (const providerPath of new Bun.Glob("*/provider.toml").scan({
0 commit comments