Skip to content

Commit

Permalink
try adding /validate sub export with zod
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed May 2, 2024
1 parent 1fcb6a0 commit 8386d58
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 7 deletions.
18 changes: 16 additions & 2 deletions packages/api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 14 additions & 4 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"name": "@oxide/api",
"version": "0.1.0-alpha.0",
"version": "0.1.0-alpha.1",
"description": "TypeScript client for the Oxide API",
"engines": {
"node": ">=18"
},
"type": "module",
"main": "./dist/Api.js",
"exports": {
"import": "./dist/Api.js",
"require": "./dist/Api.cjs"
".": {
"import": "./dist/Api.js",
"require": "./dist/Api.cjs"
},
"./validate": {
"import": "./dist/validate.js",
"require": "./dist/validate.cjs"
}
},
"scripts": {
"build": "tsup --dts",
Expand All @@ -36,11 +42,15 @@
},
"tsup": {
"entry": [
"src/Api.ts"
"src/Api.ts",
"src/validate.ts"
],
"format": [
"cjs",
"esm"
]
},
"dependencies": {
"zod": "^3.23.5"
}
}
17 changes: 17 additions & 0 deletions packages/api/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compileOnSave": false,
"compilerOptions": {
"noEmit": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"lib": ["es2019", "dom", "DOM.Iterable"],
"module": "es2020",
"moduleResolution": "node",
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "ES2020"
}
}
2 changes: 1 addition & 1 deletion packages/openapi-gen-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"strict": true,
"target": "ES2020",
"types": ["vite/client", "vitest/importMeta"]
},
}
}

0 comments on commit 8386d58

Please sign in to comment.