Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changepacks/changepack_log_bTLoWLJTloIs9pkFN38NE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"changes":{"packages/webpack-plugin/package.json":"Patch","packages/next-plugin/package.json":"Patch","packages/utils/package.json":"Patch","packages/vite-plugin/package.json":"Patch","packages/zod/package.json":"Patch","packages/fetch/package.json":"Patch","packages/core/package.json":"Patch","packages/rsbuild-plugin/package.json":"Patch","packages/generator/package.json":"Patch","packages/react-query/package.json":"Patch"},"note":"implement zod","date":"2026-01-04T11:21:33.541821Z"}
1 change: 1 addition & 0 deletions .changepacks/changepack_log_pD6lylXWV9brQzAlQutNu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"changes":{"packages/zod/package.json":"Minor"},"note":"Implement zod","date":"2026-01-04T11:21:57.546730400Z"}
28 changes: 26 additions & 2 deletions bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@devup-api/fetch": "workspace:*",
"@devup-api/next-plugin": "workspace:*",
"@devup-api/react-query": "workspace:*",
"@devup-api/zod": "workspace:*",
"@devup-ui/react": "^1",
"next": "^16.1.0",
"react": "^19.2.3",
Expand Down Expand Up @@ -100,7 +101,7 @@
"name": "@devup-api/fetch",
"version": "0.1.13",
"dependencies": {
"@devup-api/core": "workspace:*",
"@devup-api/core": "workspace:^",
},
"devDependencies": {
"@types/node": "^25.0",
Expand Down Expand Up @@ -143,7 +144,7 @@
"name": "@devup-api/react-query",
"version": "0.1.5",
"dependencies": {
"@devup-api/fetch": "workspace:*",
"@devup-api/fetch": "workspace:^",
"@tanstack/react-query": ">=5.90",
},
"devDependencies": {
Expand Down Expand Up @@ -194,6 +195,7 @@
},
"devDependencies": {
"@types/node": "^25.0",
"openapi-types": "^12.1",
"typescript": "^5.9",
},
"peerDependencies": {
Expand All @@ -218,6 +220,22 @@
"@devup-api/core": "*",
},
},
"packages/zod": {
"name": "@devup-api/zod",
"version": "0.1.13",
"dependencies": {
"@devup-api/fetch": "workspace:^",
"zod": ">=4",
},
"devDependencies": {
"@types/node": "^25.0",
"typescript": "^5.9",
"zod": "^4.3.5",
},
"peerDependencies": {
"zod": "^3.0.0",
},
},
},
"packages": {
"@adobe/css-tools": ["@adobe/css-tools@4.4.4", "", {}, "sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg=="],
Expand Down Expand Up @@ -298,6 +316,8 @@

"@devup-api/webpack-plugin": ["@devup-api/webpack-plugin@workspace:packages/webpack-plugin"],

"@devup-api/zod": ["@devup-api/zod@workspace:packages/zod"],

"@devup-ui/next-plugin": ["@devup-ui/next-plugin@1.0.59", "", { "dependencies": { "@devup-ui/wasm": "1.0.51", "@devup-ui/webpack-plugin": "1.0.49", "glob": "^13.0", "next": "^16.0" } }, "sha512-u44tjZZROuWkny/b5ZRvmiNSRvpgvrs+91npGejTx3w7dp+9y17B3GajrNkEytglT5c/45ItAaOR3fwRYwWnbA=="],

"@devup-ui/react": ["@devup-ui/react@1.0.29", "", { "dependencies": { "csstype-extra": "latest", "react": "^19.2" } }, "sha512-RGmnTOMsksV/IOiqU9yCQZW+hQ/WAgo4qVyh+gsbzZQc4tM3fDUKctOF72Wm2Be7n2sn+JVHhocEaAWNkPeIig=="],
Expand Down Expand Up @@ -858,12 +878,16 @@

"yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="],

"zod": ["zod@4.3.5", "", {}, "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g=="],

"@babel/core/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],

"@babel/helper-compilation-targets/lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="],

"@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],

"@devup-api/zod/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],

"@devup-ui/next-plugin/next": ["next@16.0.10", "", { "dependencies": { "@next/env": "16.0.10", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "16.0.10", "@next/swc-darwin-x64": "16.0.10", "@next/swc-linux-arm64-gnu": "16.0.10", "@next/swc-linux-arm64-musl": "16.0.10", "@next/swc-linux-x64-gnu": "16.0.10", "@next/swc-linux-x64-musl": "16.0.10", "@next/swc-win32-arm64-msvc": "16.0.10", "@next/swc-win32-x64-msvc": "16.0.10", "sharp": "^0.34.4" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-RtWh5PUgI+vxlV3HdR+IfWA1UUHu0+Ram/JBO4vWB54cVPentCD0e+lxyAYEsDTqGGMg7qpjhKh6dc6aW7W/sA=="],

"@devup-ui/webpack-plugin/@devup-ui/wasm": ["@devup-ui/wasm@1.0.47", "", {}, "sha512-RPktfdg53bK5BqAyhfs9hA5vzAiH0D63w60S+ACaoIPXpqQaQp2Lh9pl3Mi6E+8KA0Div/hoQCLfYxuAefodrg=="],
Expand Down
8 changes: 8 additions & 0 deletions examples/next/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { createApi, type DevupObject } from '@devup-api/fetch'
import { createQueryClient } from '@devup-api/react-query'
import { schemas } from '@devup-api/zod'
import { Box, Text } from '@devup-ui/react'
import { useEffect } from 'react'

Expand All @@ -15,6 +16,13 @@ const api2 = createApi({

const queryClient = createQueryClient(api)

// Example usage of Zod schemas (will be populated after build)
const schema = schemas['openapi.json'].request.CreateUserRequest
const _a = schema.parse({
name: 'John Doe',
email: 'foo@bar.com',
})

export default function Home() {
const { data, isLoading, error } = queryClient.useQuery('GET', 'getUsers', {
// params: { id: 1 },
Expand Down
1 change: 1 addition & 0 deletions examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@devup-api/next-plugin": "workspace:*",
"@devup-api/fetch": "workspace:*",
"@devup-api/react-query": "workspace:*",
"@devup-api/zod": "workspace:*",
"@devup-ui/react": "^1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"lint": "biome check",
"lint:fix": "biome check --write",
"prepare": "husky",
"build": "bun run -F @devup-api/core build && bun run -F @devup-api/utils build && bun run -F @devup-api/generator build && bun run -F @devup-api/fetch build && bun run -F @devup-api/webpack-plugin build && bun run -F @devup-api/vite-plugin build && bun run -F @devup-api/next-plugin build && bun run -F @devup-api/rsbuild-plugin build && bun run -F @devup-api/react-query build",
"publish": "bun publish --cwd packages/core && bun publish --cwd packages/utils && bun publish --cwd packages/generator && bun publish --cwd packages/fetch && bun publish --cwd packages/webpack-plugin && bun publish --cwd packages/vite-plugin && bun publish --cwd packages/next-plugin && bun publish --cwd packages/rsbuild-plugin && bun publish --cwd packages/react-query"
"build": "bun run -F @devup-api/core build && bun run -F @devup-api/utils build && bun run -F @devup-api/generator build && bun run -F @devup-api/fetch build && bun run -F @devup-api/zod build && bun run -F @devup-api/webpack-plugin build && bun run -F @devup-api/vite-plugin build && bun run -F @devup-api/next-plugin build && bun run -F @devup-api/rsbuild-plugin build && bun run -F @devup-api/react-query build",
"publish": "bun publish --cwd packages/core && bun publish --cwd packages/utils && bun publish --cwd packages/generator && bun publish --cwd packages/fetch && bun publish --cwd packages/zod && bun publish --cwd packages/webpack-plugin && bun publish --cwd packages/vite-plugin && bun publish --cwd packages/next-plugin && bun publish --cwd packages/rsbuild-plugin && bun publish --cwd packages/react-query"
},
"workspaces": [
"packages/*",
Expand Down
Loading