/
opt
/
canhelp
/
node_modules
/
better-auth
/
node_modules
/
better-call
/
dist
/
/opt/canhelp/node_modules/better-auth/node_modules/better-call/dist
mkdir
upload
Name
Size
Mode
Actions
adapters/
-
0755
rm
_virtual/
-
0755
rm
client.cjs
980
0644
edit
dl
rm
client.cjs.map
3882
0644
edit
dl
rm
client.d.cts
3098
0644
edit
dl
rm
client.d.mts
3098
0644
edit
dl
rm
client.mjs
617
0644
edit
dl
rm
client.mjs.map
3883
0644
edit
dl
rm
context.cjs
3936
0644
edit
dl
rm
context.cjs.map
12836
0644
edit
dl
rm
context.d.cts
12695
0644
edit
dl
rm
context.d.mts
12695
0644
edit
dl
rm
context.mjs
3796
0644
edit
dl
rm
context.mjs.map
12655
0644
edit
dl
rm
cookies.cjs
3201
0644
edit
dl
rm
cookies.cjs.map
9553
0644
edit
dl
rm
cookies.d.cts
4491
0644
edit
dl
rm
cookies.d.mts
4491
0644
edit
dl
rm
cookies.mjs
3074
0644
edit
dl
rm
cookies.mjs.map
9521
0644
edit
dl
rm
crypto.cjs
1580
0644
edit
dl
rm
crypto.cjs.map
2680
0644
edit
dl
rm
crypto.mjs
1376
0644
edit
dl
rm
crypto.mjs.map
2694
0644
edit
dl
rm
endpoint.cjs
2507
0644
edit
dl
rm
endpoint.cjs.map
21307
0644
edit
dl
rm
endpoint.d.cts
13742
0644
edit
dl
rm
endpoint.d.mts
13742
0644
edit
dl
rm
endpoint.mjs
2402
0644
edit
dl
rm
endpoint.mjs.map
21188
0644
edit
dl
rm
error.cjs
3981
0644
edit
dl
rm
error.cjs.map
7666
0644
edit
dl
rm
error.d.cts
4668
0644
edit
dl
rm
error.d.mts
4668
0644
edit
dl
rm
error.mjs
3722
0644
edit
dl
rm
error.mjs.map
7664
0644
edit
dl
rm
helper.d.cts
1579
0644
edit
dl
rm
helper.d.mts
1579
0644
edit
dl
rm
index.cjs
1534
0644
edit
dl
rm
index.d.cts
2464
0644
edit
dl
rm
index.d.mts
2464
0644
edit
dl
rm
index.mjs
880
0644
edit
dl
rm
middleware.cjs
1732
0644
edit
dl
rm
middleware.cjs.map
7961
0644
edit
dl
rm
middleware.d.cts
4446
0644
edit
dl
rm
middleware.d.mts
4446
0644
edit
dl
rm
middleware.mjs
1678
0644
edit
dl
rm
middleware.mjs.map
7897
0644
edit
dl
rm
node.cjs
684
0644
edit
dl
rm
node.cjs.map
1047
0644
edit
dl
rm
node.d.cts
432
0644
edit
dl
rm
node.d.mts
432
0644
edit
dl
rm
node.mjs
498
0644
edit
dl
rm
node.mjs.map
1016
0644
edit
dl
rm
openapi.cjs
6018
0644
edit
dl
rm
openapi.cjs.map
14067
0644
edit
dl
rm
openapi.d.cts
2541
0644
edit
dl
rm
openapi.d.mts
2541
0644
edit
dl
rm
openapi.mjs
5914
0644
edit
dl
rm
openapi.mjs.map
14030
0644
edit
dl
rm
router.cjs
4562
0644
edit
dl
rm
router.cjs.map
11641
0644
edit
dl
rm
router.d.cts
2655
0644
edit
dl
rm
router.d.mts
2655
0644
edit
dl
rm
router.mjs
4326
0644
edit
dl
rm
router.mjs.map
11586
0644
edit
dl
rm
standard-schema.d.cts
2364
0644
edit
dl
rm
standard-schema.d.mts
2364
0644
edit
dl
rm
to-response.cjs
3474
0644
edit
dl
rm
to-response.cjs.map
6869
0644
edit
dl
rm
to-response.d.cts
375
0644
edit
dl
rm
to-response.d.mts
375
0644
edit
dl
rm
to-response.mjs
3444
0644
edit
dl
rm
to-response.mjs.map
6855
0644
edit
dl
rm
utils.cjs
3063
0644
edit
dl
rm
utils.cjs.map
5492
0644
edit
dl
rm
utils.mjs
2928
0644
edit
dl
rm
utils.mjs.map
5476
0644
edit
dl
rm
validator.cjs
1351
0644
edit
dl
rm
validator.cjs.map
3098
0644
edit
dl
rm
validator.mjs
1337
0644
edit
dl
rm
validator.mjs.map
3097
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/better-auth/node_modules/better-call/dist/middleware.d.cts
(4446B)
import { Prettify } from "./helper.cjs"; import { InferBodyInput, InferHeaders, InferHeadersInput, InferMiddlewareBody, InferMiddlewareQuery, InferQueryInput, InferRequest, InferRequestInput, InferUse } from "./context.cjs"; import { EndpointContext, EndpointOptions } from "./endpoint.cjs"; //#region src/middleware.d.ts interface MiddlewareOptions extends Omit<EndpointOptions, "method"> {} type MiddlewareResponse = null | void | undefined | Record<string, any>; type MiddlewareContext<Options extends MiddlewareOptions, Context = {}> = EndpointContext<string, Options & { method: "*"; }> & { /** * Method * * The request method */ method: string; /** * Path * * The path of the endpoint */ path: string; /** * Body * * The body object will be the parsed JSON from the request and validated * against the body schema if it exists */ body: InferMiddlewareBody<Options>; /** * Query * * The query object will be the parsed query string from the request * and validated against the query schema if it exists */ query: InferMiddlewareQuery<Options>; /** * Params * * If the path is `/user/:id` and the request is `/user/1` then the * params will * be `{ id: "1" }` and if the path includes a wildcard like `/user/*` * then the * params will be `{ _: "1" }` where `_` is the wildcard key. If the * wildcard * is named like `/user/**:name` then the params will be `{ name: string }` */ params: string; /** * Request object * * If `requireRequest` is set to true in the endpoint options this will be * required */ request: InferRequest<Options>; /** * Headers * * If `requireHeaders` is set to true in the endpoint options this will be * required */ headers: InferHeaders<Options>; /** * Set header * * If it's called outside of a request it will just be ignored. */ setHeader: (key: string, value: string) => void; /** * Get header * * If it's called outside of a request it will just return null * * @param key - The key of the header * @returns */ getHeader: (key: string) => string | null; /** * JSON * * a helper function to create a JSON response with * the correct headers * and status code. If `asResponse` is set to true in * the context then * it will return a Response object instead of the * JSON object. * * @param json - The JSON object to return * @param routerResponse - The response object to * return if `asResponse` is * true in the context this will take precedence */ json: <R extends Record<string, any> | null>(json: R, routerResponse?: { status?: number; headers?: Record<string, string>; response?: Response; } | Response) => Promise<R>; /** * Middleware context */ context: Prettify<Context>; }; declare function createMiddleware<Options extends MiddlewareOptions, R>(options: Options, handler: (context: MiddlewareContext<Options>) => Promise<R>): <InputCtx extends MiddlewareInputContext<Options>>(inputContext: InputCtx) => Promise<R>; declare function createMiddleware<Options extends MiddlewareOptions, R>(handler: (context: MiddlewareContext<Options>) => Promise<R>): <InputCtx extends MiddlewareInputContext<Options>>(inputContext: InputCtx) => Promise<R>; declare namespace createMiddleware { var create: <E extends { use?: Middleware[]; }>(opts?: E) => { <Options extends MiddlewareOptions, R>(options: Options, handler: (ctx: MiddlewareContext<Options, InferUse<E["use"]>>) => Promise<R>): (inputContext: MiddlewareInputContext<Options>) => Promise<R>; <Options extends MiddlewareOptions, R_1>(handler: (ctx: MiddlewareContext<Options, InferUse<E["use"]>>) => Promise<R_1>): (inputContext: MiddlewareInputContext<Options>) => Promise<R_1>; }; } type MiddlewareInputContext<Options extends MiddlewareOptions> = InferBodyInput<Options> & InferQueryInput<Options> & InferRequestInput<Options> & InferHeadersInput<Options> & { asResponse?: boolean; returnHeaders?: boolean; use?: Middleware[]; }; type Middleware<Options extends MiddlewareOptions = MiddlewareOptions, Handler extends (inputCtx: any) => Promise<any> = any> = Handler & { options: Options; }; //#endregion export { Middleware, MiddlewareContext, MiddlewareInputContext, MiddlewareOptions, MiddlewareResponse, createMiddleware }; //# sourceMappingURL=middleware.d.cts.map
Save
cmd:
run