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/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as APIError, k as CookieOptions, C as CookiePrefixOptions, b as Endpoint, a as EndpointContext, E as EndpointOptions, H as HTTPMethod, W as HasRequiredKeys, v as InferBody, I as InferBodyInput, J as InferHeaders, K as InferHeadersInput, z as InferInputMethod, y as InferMethod, N as InferMiddlewareBody, Q as InferMiddlewareQuery, B as InferParam, D as InferParamInput, a0 as InferParamPath, a1 as InferParamWildCard, x as InferQuery, w as InferQueryInput, F as InferRequest, G as InferRequestInput, L as InferUse, T as InputContext, Y as IsEmptyObject, $ as MergeObject, u as Method, h as Middleware, e as MiddlewareContext, g as MiddlewareInputContext, M as MiddlewareOptions, d as MiddlewareResponse, n as OpenAPIParameter, O as OpenAPISchemaType, P as Path, X as Prettify, V as RequiredKeysOf, j as Router, R as RouterConfig, a2 as StandardSchemaV1, S as Status, Z as UnionToIntersection, _ as _statusCode, c as createEndpoint, U as createInternalContext, f as createMiddleware, i as createRouter, o as generator, l as getCookieKey, q as getHTML, r as hideInternalStackFrames, t as makeErrorForHideStackFrame, p as parseCookies, s as serializeCookie, m as serializeSignedCookie } from './router-
|
|
1
|
+
export { A as APIError, k as CookieOptions, C as CookiePrefixOptions, b as Endpoint, a as EndpointContext, E as EndpointOptions, H as HTTPMethod, W as HasRequiredKeys, v as InferBody, I as InferBodyInput, J as InferHeaders, K as InferHeadersInput, z as InferInputMethod, y as InferMethod, N as InferMiddlewareBody, Q as InferMiddlewareQuery, B as InferParam, D as InferParamInput, a0 as InferParamPath, a1 as InferParamWildCard, x as InferQuery, w as InferQueryInput, F as InferRequest, G as InferRequestInput, L as InferUse, T as InputContext, Y as IsEmptyObject, $ as MergeObject, u as Method, h as Middleware, e as MiddlewareContext, g as MiddlewareInputContext, M as MiddlewareOptions, d as MiddlewareResponse, n as OpenAPIParameter, O as OpenAPISchemaType, P as Path, X as Prettify, V as RequiredKeysOf, j as Router, R as RouterConfig, a2 as StandardSchemaV1, S as Status, Z as UnionToIntersection, _ as _statusCode, c as createEndpoint, U as createInternalContext, f as createMiddleware, i as createRouter, o as generator, l as getCookieKey, q as getHTML, r as hideInternalStackFrames, t as makeErrorForHideStackFrame, p as parseCookies, s as serializeCookie, m as serializeSignedCookie } from './router-DCy0wnVr.cjs';
|
|
2
2
|
|
|
3
3
|
type JSONResponse = {
|
|
4
4
|
body: Record<string, any>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as APIError, k as CookieOptions, C as CookiePrefixOptions, b as Endpoint, a as EndpointContext, E as EndpointOptions, H as HTTPMethod, W as HasRequiredKeys, v as InferBody, I as InferBodyInput, J as InferHeaders, K as InferHeadersInput, z as InferInputMethod, y as InferMethod, N as InferMiddlewareBody, Q as InferMiddlewareQuery, B as InferParam, D as InferParamInput, a0 as InferParamPath, a1 as InferParamWildCard, x as InferQuery, w as InferQueryInput, F as InferRequest, G as InferRequestInput, L as InferUse, T as InputContext, Y as IsEmptyObject, $ as MergeObject, u as Method, h as Middleware, e as MiddlewareContext, g as MiddlewareInputContext, M as MiddlewareOptions, d as MiddlewareResponse, n as OpenAPIParameter, O as OpenAPISchemaType, P as Path, X as Prettify, V as RequiredKeysOf, j as Router, R as RouterConfig, a2 as StandardSchemaV1, S as Status, Z as UnionToIntersection, _ as _statusCode, c as createEndpoint, U as createInternalContext, f as createMiddleware, i as createRouter, o as generator, l as getCookieKey, q as getHTML, r as hideInternalStackFrames, t as makeErrorForHideStackFrame, p as parseCookies, s as serializeCookie, m as serializeSignedCookie } from './router-
|
|
1
|
+
export { A as APIError, k as CookieOptions, C as CookiePrefixOptions, b as Endpoint, a as EndpointContext, E as EndpointOptions, H as HTTPMethod, W as HasRequiredKeys, v as InferBody, I as InferBodyInput, J as InferHeaders, K as InferHeadersInput, z as InferInputMethod, y as InferMethod, N as InferMiddlewareBody, Q as InferMiddlewareQuery, B as InferParam, D as InferParamInput, a0 as InferParamPath, a1 as InferParamWildCard, x as InferQuery, w as InferQueryInput, F as InferRequest, G as InferRequestInput, L as InferUse, T as InputContext, Y as IsEmptyObject, $ as MergeObject, u as Method, h as Middleware, e as MiddlewareContext, g as MiddlewareInputContext, M as MiddlewareOptions, d as MiddlewareResponse, n as OpenAPIParameter, O as OpenAPISchemaType, P as Path, X as Prettify, V as RequiredKeysOf, j as Router, R as RouterConfig, a2 as StandardSchemaV1, S as Status, Z as UnionToIntersection, _ as _statusCode, c as createEndpoint, U as createInternalContext, f as createMiddleware, i as createRouter, o as generator, l as getCookieKey, q as getHTML, r as hideInternalStackFrames, t as makeErrorForHideStackFrame, p as parseCookies, s as serializeCookie, m as serializeSignedCookie } from './router-DCy0wnVr.js';
|
|
2
2
|
|
|
3
3
|
type JSONResponse = {
|
|
4
4
|
body: Record<string, any>;
|
package/dist/index.js
CHANGED
|
@@ -693,6 +693,12 @@ var createEndpoint2 = (path, options, handler) => {
|
|
|
693
693
|
response
|
|
694
694
|
} : response;
|
|
695
695
|
};
|
|
696
|
+
internalHandler.wrap = (fn) => {
|
|
697
|
+
const wrappedFn = async (context) => {
|
|
698
|
+
return fn(context, handler);
|
|
699
|
+
};
|
|
700
|
+
return createEndpoint2(path, options, wrappedFn);
|
|
701
|
+
};
|
|
696
702
|
internalHandler.options = options;
|
|
697
703
|
internalHandler.path = path;
|
|
698
704
|
return internalHandler;
|