better-call 1.0.26-beta.1 → 1.0.27
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 +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -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-BH6Wndse.d.ts → router-D1f_-c2B.d.ts} +18 -18
- package/dist/{router-CeSGPJlX.d.cts → router-DxWRTWmk.d.cts} +18 -18
- package/package.json +1 -1
package/dist/client.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Endpoint, HasRequiredKeys, Router, UnionToIntersection } from "./router-
|
|
1
|
+
import { Endpoint, HasRequiredKeys, Router, UnionToIntersection } from "./router-DxWRTWmk.cjs";
|
|
2
2
|
import { BetterFetchOption, BetterFetchResponse } from "@better-fetch/fetch";
|
|
3
3
|
|
|
4
4
|
//#region src/client.d.ts
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Endpoint, HasRequiredKeys, Router, UnionToIntersection } from "./router-
|
|
1
|
+
import { Endpoint, HasRequiredKeys, Router, UnionToIntersection } from "./router-D1f_-c2B.js";
|
|
2
2
|
import { BetterFetchOption, BetterFetchResponse } from "@better-fetch/fetch";
|
|
3
3
|
|
|
4
4
|
//#region src/client.d.ts
|
package/dist/index.cjs
CHANGED
|
@@ -48,7 +48,7 @@ function makeErrorForHideStackFrame(Base, clazz) {
|
|
|
48
48
|
});
|
|
49
49
|
return HideStackFramesError;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const statusCodes = {
|
|
52
52
|
OK: 200,
|
|
53
53
|
CREATED: 201,
|
|
54
54
|
ACCEPTED: 202,
|
|
@@ -101,7 +101,7 @@ const _statusCode = {
|
|
|
101
101
|
NETWORK_AUTHENTICATION_REQUIRED: 511
|
|
102
102
|
};
|
|
103
103
|
var InternalAPIError = class extends Error {
|
|
104
|
-
constructor(status = "INTERNAL_SERVER_ERROR", body = void 0, headers = {}, statusCode = typeof status === "number" ? status :
|
|
104
|
+
constructor(status = "INTERNAL_SERVER_ERROR", body = void 0, headers = {}, statusCode = typeof status === "number" ? status : statusCodes[status]) {
|
|
105
105
|
super(body?.message, body?.cause ? { cause: body.cause } : void 0);
|
|
106
106
|
this.status = status;
|
|
107
107
|
this.body = body;
|
|
@@ -2547,7 +2547,6 @@ const createRouter = (endpoints, config$1) => {
|
|
|
2547
2547
|
//#endregion
|
|
2548
2548
|
exports.APIError = APIError;
|
|
2549
2549
|
exports.BetterCallError = BetterCallError;
|
|
2550
|
-
exports._statusCode = _statusCode;
|
|
2551
2550
|
exports.createEndpoint = createEndpoint;
|
|
2552
2551
|
exports.createInternalContext = createInternalContext;
|
|
2553
2552
|
exports.createMiddleware = createMiddleware;
|
|
@@ -2560,5 +2559,6 @@ exports.makeErrorForHideStackFrame = makeErrorForHideStackFrame;
|
|
|
2560
2559
|
exports.parseCookies = parseCookies;
|
|
2561
2560
|
exports.serializeCookie = serializeCookie;
|
|
2562
2561
|
exports.serializeSignedCookie = serializeSignedCookie;
|
|
2562
|
+
exports.statusCodes = statusCodes;
|
|
2563
2563
|
exports.toResponse = toResponse;
|
|
2564
2564
|
//# sourceMappingURL=index.cjs.map
|