better-call 1.0.9 → 1.0.10
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 +7 -2
- 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 +7 -2
- package/dist/index.js.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/{router-Bn_wF2y_.d.cts → router-BEp4ze3Q.d.cts} +4 -0
- package/dist/{router-Bn_wF2y_.d.ts → router-BEp4ze3Q.d.ts} +4 -0
- package/package.json +1 -1
package/dist/client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BetterFetchOption, BetterFetchResponse } from '@better-fetch/fetch';
|
|
2
|
-
import { j as Router, X as UnionToIntersection, b as Endpoint, U as HasRequiredKeys } from './router-
|
|
2
|
+
import { j as Router, X as UnionToIntersection, b as Endpoint, U as HasRequiredKeys } from './router-BEp4ze3Q.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, X as UnionToIntersection, b as Endpoint, U as HasRequiredKeys } from './router-
|
|
2
|
+
import { j as Router, X as UnionToIntersection, b as Endpoint, U as HasRequiredKeys } from './router-BEp4ze3Q.js';
|
|
3
3
|
|
|
4
4
|
type HasRequired<T extends {
|
|
5
5
|
body?: any;
|
package/dist/index.cjs
CHANGED
|
@@ -230,7 +230,12 @@ function toResponse(data, init) {
|
|
|
230
230
|
body = data;
|
|
231
231
|
headers.set("Content-Type", "application/octet-stream");
|
|
232
232
|
} else if (isJSONSerializable(data)) {
|
|
233
|
-
body = JSON.stringify(data)
|
|
233
|
+
body = JSON.stringify(data, (key, value) => {
|
|
234
|
+
if (typeof value === "bigint") {
|
|
235
|
+
return value.toString();
|
|
236
|
+
}
|
|
237
|
+
return value;
|
|
238
|
+
});
|
|
234
239
|
headers.set("Content-Type", "application/json");
|
|
235
240
|
}
|
|
236
241
|
return new Response(body, {
|
|
@@ -4894,7 +4899,7 @@ var createRouter = (endpoints, config) => {
|
|
|
4894
4899
|
headers: request.headers,
|
|
4895
4900
|
params: route.params ? JSON.parse(JSON.stringify(route.params)) : {},
|
|
4896
4901
|
request,
|
|
4897
|
-
body: await getBody(handler.options.cloneRequest ? request.clone() : request),
|
|
4902
|
+
body: handler.options.disableBody ? void 0 : await getBody(handler.options.cloneRequest ? request.clone() : request),
|
|
4898
4903
|
query,
|
|
4899
4904
|
_flag: "router",
|
|
4900
4905
|
asResponse: true,
|