@ts-pf/stream 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-pf/stream",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Opt-in StreamCodec and stream() for root AsyncIterable (JSONL)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ts-pf",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@standard-schema/spec": "^1.0.0",
|
|
50
|
-
"@ts-pf/contract": "0.1.
|
|
51
|
-
"@ts-pf/http": "0.1.
|
|
52
|
-
"@ts-pf/protocol": "0.1.
|
|
50
|
+
"@ts-pf/contract": "0.1.4",
|
|
51
|
+
"@ts-pf/http": "0.1.2",
|
|
52
|
+
"@ts-pf/protocol": "0.1.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@ts-pf/client": "0.1.
|
|
56
|
-
"@ts-pf/client-http": "0.1.
|
|
57
|
-
"@ts-pf/server": "0.
|
|
58
|
-
"@ts-pf/server-http": "0.
|
|
55
|
+
"@ts-pf/client": "0.1.4",
|
|
56
|
+
"@ts-pf/client-http": "0.1.4",
|
|
57
|
+
"@ts-pf/server": "0.3.0",
|
|
58
|
+
"@ts-pf/server-http": "0.2.0",
|
|
59
59
|
"zod": "^4.0.0"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -25,7 +25,11 @@ new FetchLink({ url: '/rpc', codec })
|
|
|
25
25
|
procedure.output(stream(z.object({ token: z.string() })))
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Root only. Same codec on handler and link.
|
|
28
|
+
Root only. Same codec on handler and link. Item checks follow the server validation flags. Stream input items are checked unless `validation.input` is `false`. Stream output items are checked only when `validation.output` is `true`:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
new FetchHandler(app, { codec, validation: { output: true } })
|
|
32
|
+
```
|
|
29
33
|
|
|
30
34
|
## API
|
|
31
35
|
|