Skip to content

Commit d49f07d

Browse files
committed
fix(callapi): Fix snd refactor types
- refactor(types): Rename `GetCallApiResult` to `InferCallApiResult` - refactor(core): Improve `SharedExtraOptions` to support context overriding - fix(stream): Add default generic to `ReadableStream` augmentation - docs(middlewares): Fix caching plugin usage and enable twoslash - ci(workflows): Update pnpm version to 10.24.0 - chore(deps): Update lockfile
1 parent cf0687f commit d49f07d

22 files changed

+280
-720
lines changed

.changeset/dark-ducks-unite.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@zayne-labs/callapi": patch
3+
---
4+
5+
fix(callapi): Fix snd refactor types
6+
7+
- refactor(types): Rename `GetCallApiResult` to `InferCallApiResult`
8+
- refactor(core): Improve `SharedExtraOptions` to support context overriding
9+
- fix(stream): Add default generic to `ReadableStream` augmentation
10+
- docs(middlewares): Fix caching plugin usage and enable twoslash
11+
- ci(workflows): Update pnpm version to 10.24.0
12+
- chore(deps): Update lockfile

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup pnpm
2222
uses: pnpm/action-setup@v4
2323
with:
24-
version: 10.19.0
24+
version: 10.24.0
2525

2626
- name: Setup Node.js
2727
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4

.github/workflows/lint-type-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup pnpm
2222
uses: pnpm/action-setup@v4
2323
with:
24-
version: 10.19.0
24+
version: 10.24.0
2525

2626
- name: Setup Node.js
2727
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4

.github/workflows/release-and-publish(changeset).yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup pnpm
2929
uses: pnpm/action-setup@v4
3030
with:
31-
version: 10.19.0
31+
version: 10.24.0
3232

3333
- name: Setup Node.js 20.x
3434
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4

.github/workflows/release-and-publish(pkg.pr.new).yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Setup pnpm
2727
uses: pnpm/action-setup@v4
2828
with:
29-
version: 10.19.0
29+
version: 10.24.0
3030

3131
- name: Setup Node.js 20.x
3232
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4

.github/workflows/size-limit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup pnpm
2222
uses: pnpm/action-setup@v4
2323
with:
24-
version: 10.19.0
24+
version: 10.24.0
2525

2626
- name: Setup Node.js
2727
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4

apps/dev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"devDependencies": {
1919
"@types/node": "^24.10.1",
2020
"@zayne-labs/tsconfig": "0.11.5",
21-
"tsx": "^4.20.6",
21+
"tsx": "^4.21.0",
2222
"typescript": "5.9.3",
2323
"vite": "npm:rolldown-vite@7.2.8"
2424
}

apps/dev/src/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const pluginTwo = definePlugin({
8282

8383
const apiSchema = defineSchema(
8484
{
85-
".": {
85+
"@default": {
8686
// data: z.object({ random: z.number() }),
8787
// params: z.object({ per_page: z.number() }).optional(),
8888
},

apps/docs/content/docs/middlewares.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ This reverse composition means the last middleware added gets the first chance t
116116

117117
### Response Caching
118118

119-
```ts title="caching-plugin.ts"
119+
```ts twoslash title="caching-plugin.ts"
120120
import type { PluginSetupContext } from "@zayne-labs/callapi";
121121
import { definePlugin } from "@zayne-labs/callapi/utils";
122122
import { z } from "zod";
@@ -137,7 +137,7 @@ export const cachingPlugin = () => {
137137

138138
defineExtraOptions: () => CacheOptionsSchema,
139139

140-
middlewares: ({ options }: PluginSetupContext<CacheOptions>) => {
140+
middlewares: ({ options }: PluginSetupContext<{ InferredExtraOptions: CacheOptions }>) => {
141141
const { cacheLifetime = 60_000, cachePolicy = "cache-first" } = options;
142142

143143
return {
@@ -184,7 +184,7 @@ import { createFetchClient } from "@zayne-labs/callapi";
184184

185185
const callBackendApi = createFetchClient({
186186
baseURL: "https://api.example.com",
187-
plugins: [cachingPlugin],
187+
plugins: [cachingPlugin()],
188188
cachePolicy: "cache-first",
189189
cacheLifetime: 2 * 60 * 1000, // 2 minutes
190190
});

apps/docs/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
"@zayne-labs/ui-react": "^0.10.37",
2727
"ai": "^5.0.104",
2828
"clsx": "^2.1.1",
29-
"fumadocs-core": "16.2.0",
29+
"fumadocs-core": "16.2.1",
3030
"fumadocs-docgen": "3.0.4",
3131
"fumadocs-mdx": "14.0.4",
3232
"fumadocs-twoslash": "3.1.10",
3333
"fumadocs-typescript": "4.0.13",
34-
"fumadocs-ui": "16.2.0",
34+
"fumadocs-ui": "16.2.1",
3535
"geist": "^1.5.1",
3636
"hast-util-to-jsx-runtime": "^2.3.6",
3737
"lucide-react": "^0.555.0",
3838
"motion": "^12.23.24",
39-
"next": "16.0.5",
39+
"next": "16.0.6",
4040
"radix-ui": "^1.4.3",
4141
"react": "19.2.0",
4242
"react-dom": "19.2.0",
@@ -52,10 +52,10 @@
5252
"tailwind-variants": "^3.2.2",
5353
"unist-util-visit": "^5.0.0",
5454
"zod": "^4.1.13",
55-
"zustand": "^5.0.8"
55+
"zustand": "^5.0.9"
5656
},
5757
"devDependencies": {
58-
"@next/bundle-analyzer": "^16.0.5",
58+
"@next/bundle-analyzer": "^16.0.6",
5959
"@tailwindcss/postcss": "^4.1.17",
6060
"@types/hast": "^3.0.4",
6161
"@types/mdx": "^2.0.13",

0 commit comments

Comments
 (0)