Skip to content

Commit 52f345d

Browse files
abdullahahmedaymc9
andauthored
Export "objects" in zod schemas (#655)
Co-authored-by: Yiming <yiming@whimslab.io>
1 parent d2bffb6 commit 52f345d

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * as models from './models';
22
export * as input from './input';
3+
export * as objects from './objects';

packages/runtime/res/zod/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
22
models: require('./models'),
33
input: require('./input'),
4+
objects: require('./objects')
45
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '.zenstack/zod/objects';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
let schemas;
2+
try {
3+
schemas = require('.zenstack/zod/objects/index');
4+
} catch {}
5+
6+
module.exports = schemas && {
7+
...schemas,
8+
};

0 commit comments

Comments
 (0)