Skip to content

Commit 4002cb6

Browse files
committed
model
1 parent ddb3a0f commit 4002cb6

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

packages/core/src/generate.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
import path from "path";
2+
import { z } from "zod";
23

34
import { Provider, Model } from "./schema.js";
45

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+
518
export async function generate(directory: string) {
619
const result = {} as Record<string, Provider>;
720
for await (const providerPath of new Bun.Glob("*/provider.toml").scan({

0 commit comments

Comments
 (0)