better-call 1.0.26 → 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 CHANGED
@@ -1,4 +1,4 @@
1
- import { Endpoint, HasRequiredKeys, Router, UnionToIntersection } from "./router-CeSGPJlX.cjs";
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-BH6Wndse.js";
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 _statusCode = {
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 : _statusCode[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