better-call 1.0.19 → 1.0.21
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 +6 -0
- 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 +6 -0
- package/dist/index.js.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/router-DCy0wnVr.d.cts +2771 -0
- package/dist/router-DCy0wnVr.d.ts +2771 -0
- package/package.json +1 -1
- package/dist/router-DcqXHY8X.d.cts +0 -1285
- package/dist/router-DcqXHY8X.d.ts +0 -1285
package/dist/client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BetterFetchOption, BetterFetchResponse } from '@better-fetch/fetch';
|
|
2
|
-
import { j as Router, Z as UnionToIntersection, b as Endpoint, W as HasRequiredKeys } from './router-
|
|
2
|
+
import { j as Router, Z as UnionToIntersection, b as Endpoint, W as HasRequiredKeys } from './router-DCy0wnVr.cjs';
|
|
3
3
|
|
|
4
4
|
type HasRequired<T extends {
|
|
5
5
|
body?: any;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BetterFetchOption, BetterFetchResponse } from '@better-fetch/fetch';
|
|
2
|
-
import { j as Router, Z as UnionToIntersection, b as Endpoint, W as HasRequiredKeys } from './router-
|
|
2
|
+
import { j as Router, Z as UnionToIntersection, b as Endpoint, W as HasRequiredKeys } from './router-DCy0wnVr.js';
|
|
3
3
|
|
|
4
4
|
type HasRequired<T extends {
|
|
5
5
|
body?: any;
|
package/dist/index.cjs
CHANGED
|
@@ -727,6 +727,12 @@ var createEndpoint2 = (path, options, handler) => {
|
|
|
727
727
|
response
|
|
728
728
|
} : response;
|
|
729
729
|
};
|
|
730
|
+
internalHandler.wrap = (fn) => {
|
|
731
|
+
const wrappedFn = async (context) => {
|
|
732
|
+
return fn(context, handler);
|
|
733
|
+
};
|
|
734
|
+
return createEndpoint2(path, options, wrappedFn);
|
|
735
|
+
};
|
|
730
736
|
internalHandler.options = options;
|
|
731
737
|
internalHandler.path = path;
|
|
732
738
|
return internalHandler;
|