better-call 1.0.15-beta.1 → 1.0.16
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 +11 -11
- 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 +9 -11
- package/dist/index.js.map +1 -1
- package/dist/node.cjs +13 -10
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +13 -10
- package/dist/node.js.map +1 -1
- package/dist/{router-BcwNrqXF.d.cts → router-c8myTmx-.d.cts} +22 -53
- package/dist/{router-BcwNrqXF.d.ts → router-c8myTmx-.d.ts} +22 -53
- package/package.json +1 -1
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,
|
|
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-c8myTmx-.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,
|
|
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-c8myTmx-.js';
|
|
2
2
|
|
|
3
3
|
type JSONResponse = {
|
|
4
4
|
body: Record<string, any>;
|
package/dist/index.js
CHANGED
|
@@ -12,12 +12,6 @@ function isErrorStackTraceLimitWritable() {
|
|
|
12
12
|
}
|
|
13
13
|
return Object.prototype.hasOwnProperty.call(desc, "writable") ? desc.writable : desc.set !== void 0;
|
|
14
14
|
}
|
|
15
|
-
var ErrorWithStack = class extends Error {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.name = "ErrorWithStack";
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
15
|
function hideInternalStackFrames(stack) {
|
|
22
16
|
const lines = stack.split("\n at ");
|
|
23
17
|
if (lines.length <= 1) {
|
|
@@ -28,7 +22,7 @@ function hideInternalStackFrames(stack) {
|
|
|
28
22
|
}
|
|
29
23
|
function makeErrorForHideStackFrame(Base, clazz) {
|
|
30
24
|
class HideStackFramesError extends Base {
|
|
31
|
-
#
|
|
25
|
+
#hiddenStack;
|
|
32
26
|
constructor(...args) {
|
|
33
27
|
if (isErrorStackTraceLimitWritable()) {
|
|
34
28
|
const limit = Error.stackTraceLimit;
|
|
@@ -38,12 +32,14 @@ function makeErrorForHideStackFrame(Base, clazz) {
|
|
|
38
32
|
} else {
|
|
39
33
|
super(...args);
|
|
40
34
|
}
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
const stack = new Error().stack;
|
|
36
|
+
if (stack) {
|
|
37
|
+
this.#hiddenStack = hideInternalStackFrames(stack.replace(/^Error/, this.name));
|
|
38
|
+
}
|
|
43
39
|
}
|
|
44
40
|
// use `getter` here to avoid the stack trace being captured by loggers
|
|
45
|
-
get
|
|
46
|
-
return this.#
|
|
41
|
+
get errorStack() {
|
|
42
|
+
return this.#hiddenStack;
|
|
47
43
|
}
|
|
48
44
|
// This is a workaround for wpt tests that expect that the error
|
|
49
45
|
// constructor has a `name` property of the base class.
|
|
@@ -3179,6 +3175,8 @@ export {
|
|
|
3179
3175
|
generator,
|
|
3180
3176
|
getCookieKey,
|
|
3181
3177
|
getHTML,
|
|
3178
|
+
hideInternalStackFrames,
|
|
3179
|
+
makeErrorForHideStackFrame,
|
|
3182
3180
|
parseCookies,
|
|
3183
3181
|
serializeCookie,
|
|
3184
3182
|
serializeSignedCookie,
|