@temporary-name/json-schema 1.9.3-alpha.dff27b31c00072e392d67d0cd8ca5b94835839f9 → 1.9.3-alpha.e098b3d1c5bffbad2fadfda89ba01f6452db46b5
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/dist/index.mjs +8 -6
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -348,12 +348,14 @@ class experimental_SmartCoercionPlugin {
|
|
|
348
348
|
init(options) {
|
|
349
349
|
options.clientInterceptors ??= [];
|
|
350
350
|
options.clientInterceptors.unshift(async (options2) => {
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
351
|
+
const { bodySchema, pathSchema, querySchema } = options2.procedure["~orpc"].schemas;
|
|
352
|
+
const coercedBody = await this.#coerce(bodySchema, options2.input.body);
|
|
353
|
+
const coercedPath = await this.#coerce(pathSchema, options2.input.path);
|
|
354
|
+
const coercedQuery = await this.#coerce(querySchema, options2.input.query);
|
|
355
|
+
return options2.next({
|
|
356
|
+
...options2,
|
|
357
|
+
input: { body: coercedBody, path: coercedPath, query: coercedQuery }
|
|
358
|
+
});
|
|
357
359
|
});
|
|
358
360
|
}
|
|
359
361
|
async #coerce(schema, value) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporary-name/json-schema",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.9.3-alpha.
|
|
4
|
+
"version": "1.9.3-alpha.e098b3d1c5bffbad2fadfda89ba01f6452db46b5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.stainless.com/",
|
|
7
7
|
"repository": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"zod": "^4.1.11",
|
|
32
|
-
"@temporary-name/
|
|
33
|
-
"@temporary-name/shared": "1.9.3-alpha.
|
|
34
|
-
"@temporary-name/zod": "1.9.3-alpha.
|
|
35
|
-
"@temporary-name/
|
|
32
|
+
"@temporary-name/interop": "1.9.3-alpha.e098b3d1c5bffbad2fadfda89ba01f6452db46b5",
|
|
33
|
+
"@temporary-name/shared": "1.9.3-alpha.e098b3d1c5bffbad2fadfda89ba01f6452db46b5",
|
|
34
|
+
"@temporary-name/zod": "1.9.3-alpha.e098b3d1c5bffbad2fadfda89ba01f6452db46b5",
|
|
35
|
+
"@temporary-name/server": "1.9.3-alpha.e098b3d1c5bffbad2fadfda89ba01f6452db46b5"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {},
|
|
38
38
|
"scripts": {
|