better-call 1.0.7 → 1.0.8
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/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/index.cjs +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/{router-mvPUuWw_.d.cts → router-Bn_wF2y_.d.cts} +7 -0
- package/dist/{router-mvPUuWw_.d.ts → router-Bn_wF2y_.d.ts} +7 -0
- package/package.json +2 -2
package/dist/node.d.cts
CHANGED
package/dist/node.d.ts
CHANGED
|
@@ -788,6 +788,13 @@ interface EndpointOptions {
|
|
|
788
788
|
* List of middlewares to use
|
|
789
789
|
*/
|
|
790
790
|
use?: Middleware[];
|
|
791
|
+
/**
|
|
792
|
+
* A callback to run before any API error is throw or returned
|
|
793
|
+
*
|
|
794
|
+
* @param e - The API error
|
|
795
|
+
* @returns - The response to return
|
|
796
|
+
*/
|
|
797
|
+
onAPIError?: (e: APIError) => void | Promise<void>;
|
|
791
798
|
}
|
|
792
799
|
type EndpointContext<Path extends string, Options extends EndpointOptions, Context = {}> = {
|
|
793
800
|
/**
|
|
@@ -788,6 +788,13 @@ interface EndpointOptions {
|
|
|
788
788
|
* List of middlewares to use
|
|
789
789
|
*/
|
|
790
790
|
use?: Middleware[];
|
|
791
|
+
/**
|
|
792
|
+
* A callback to run before any API error is throw or returned
|
|
793
|
+
*
|
|
794
|
+
* @param e - The API error
|
|
795
|
+
* @returns - The response to return
|
|
796
|
+
*/
|
|
797
|
+
onAPIError?: (e: APIError) => void | Promise<void>;
|
|
791
798
|
}
|
|
792
799
|
type EndpointContext<Path extends string, Options extends EndpointOptions, Context = {}> = {
|
|
793
800
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-call",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type-fest": "^4.23.0",
|
|
21
21
|
"typescript": "^5.6.0-beta",
|
|
22
22
|
"valibot": "1.0.0-beta.15",
|
|
23
|
-
"vitest": "^3.
|
|
23
|
+
"vitest": "^3.1.1",
|
|
24
24
|
"zod": "^3.24.1"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|