diff --git a/packages/api/package-lock.json b/packages/api/package-lock.json index ed3d594..bba30c9 100644 --- a/packages/api/package-lock.json +++ b/packages/api/package-lock.json @@ -1,16 +1,22 @@ { "name": "@oxide/api", - "version": "0.1.0-alpha.0", + "version": "0.1.0-alpha.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@oxide/api", - "version": "0.1.0-alpha.0", + "version": "0.1.0-alpha.1", "license": "MPL-2.0", + "dependencies": { + "zod": "^3.23.5" + }, "devDependencies": { "tsup": "^8.0.2", "typescript": "^5.4.5" + }, + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/aix-ppc64": { @@ -2047,6 +2053,14 @@ "engines": { "node": ">= 14" } + }, + "node_modules/zod": { + "version": "3.23.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.5.tgz", + "integrity": "sha512-fkwiq0VIQTksNNA131rDOsVJcns0pfVUjHzLrNBiF/O/Xxb5lQyEXkhZWcJ7npWsYlvs+h0jFWXXy4X46Em1JA==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/packages/api/package.json b/packages/api/package.json index 3c74b1d..7cc9687 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "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" @@ -8,8 +8,14 @@ "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", @@ -36,11 +42,15 @@ }, "tsup": { "entry": [ - "src/Api.ts" + "src/Api.ts", + "src/validate.ts" ], "format": [ "cjs", "esm" ] + }, + "dependencies": { + "zod": "^3.23.5" } } diff --git a/packages/api/tsconfig.json b/packages/api/tsconfig.json new file mode 100644 index 0000000..da15fd8 --- /dev/null +++ b/packages/api/tsconfig.json @@ -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" + } +} diff --git a/packages/openapi-gen-ts/tsconfig.json b/packages/openapi-gen-ts/tsconfig.json index 7e49dea..4bbd77f 100644 --- a/packages/openapi-gen-ts/tsconfig.json +++ b/packages/openapi-gen-ts/tsconfig.json @@ -14,5 +14,5 @@ "strict": true, "target": "ES2020", "types": ["vite/client", "vitest/importMeta"] - }, + } }