@kerebron/extension-server-hono 0.4.5 → 0.4.6

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.
Files changed (61) hide show
  1. package/esm/HonoYjsMemAdapter.d.ts +2 -1
  2. package/esm/HonoYjsMemAdapter.d.ts.map +1 -1
  3. package/esm/HonoYjsMemAdapter.js +1 -0
  4. package/esm/_dnt.polyfills.d.ts +7 -0
  5. package/esm/_dnt.polyfills.d.ts.map +1 -0
  6. package/esm/_dnt.polyfills.js +1 -0
  7. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/compose.d.ts +15 -0
  8. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/compose.d.ts.map +1 -0
  9. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/compose.js +64 -0
  10. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/context.d.ts +452 -0
  11. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/context.d.ts.map +1 -0
  12. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/context.js +513 -0
  13. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/helper/websocket/index.d.ts +70 -0
  14. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/helper/websocket/index.d.ts.map +1 -0
  15. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/helper/websocket/index.js +95 -0
  16. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/hono-base.d.ts +221 -0
  17. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/hono-base.d.ts.map +1 -0
  18. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/hono-base.js +498 -0
  19. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/http-exception.d.ts +60 -0
  20. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/http-exception.d.ts.map +1 -0
  21. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/http-exception.js +71 -0
  22. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/request/constants.d.ts +2 -0
  23. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/request/constants.d.ts.map +1 -0
  24. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/request/constants.js +1 -0
  25. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/request.d.ts +314 -0
  26. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/request.d.ts.map +1 -0
  27. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/request.js +370 -0
  28. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/router.d.ts +98 -0
  29. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/router.d.ts.map +1 -0
  30. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/router.js +25 -0
  31. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/types.d.ts +563 -0
  32. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/types.d.ts.map +1 -0
  33. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/types.js +11 -0
  34. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/body.d.ts +80 -0
  35. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/body.d.ts.map +1 -0
  36. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/body.js +111 -0
  37. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/constants.d.ts +5 -0
  38. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/constants.d.ts.map +1 -0
  39. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/constants.js +4 -0
  40. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/headers.d.ts +9 -0
  41. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/headers.d.ts.map +1 -0
  42. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/headers.js +5 -0
  43. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/html.d.ts +45 -0
  44. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/html.d.ts.map +1 -0
  45. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/html.js +122 -0
  46. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/http-status.d.ts +33 -0
  47. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/http-status.d.ts.map +1 -0
  48. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/http-status.js +5 -0
  49. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/mime.d.ts +71 -0
  50. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/mime.d.ts.map +1 -0
  51. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/mime.js +83 -0
  52. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/types.d.ts +75 -0
  53. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/types.d.ts.map +1 -0
  54. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/types.js +5 -0
  55. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/url.d.ts +30 -0
  56. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/url.d.ts.map +1 -0
  57. package/esm/deps/jsr.io/@hono/hono/4.10.7/src/utils/url.js +255 -0
  58. package/esm/mod.d.ts +2 -1
  59. package/esm/mod.d.ts.map +1 -1
  60. package/esm/mod.js +1 -1
  61. package/package.json +3 -1
@@ -1,4 +1,5 @@
1
- import { WSEvents } from 'hono/ws';
1
+ import "./_dnt.polyfills.js";
2
+ import { WSEvents } from './deps/jsr.io/@hono/hono/4.10.7/src/helper/websocket/index.js';
2
3
  import * as Y from 'yjs';
3
4
  import * as awarenessProtocol from 'y-protocols/awareness';
4
5
  import { HonoWsAdapter } from './mod.js';
@@ -1 +1 @@
1
- {"version":3,"file":"HonoYjsMemAdapter.d.ts","sourceRoot":"","sources":["../src/HonoYjsMemAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEz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AE,SAAS,EAAE,CAAC,EAAE,UAAU;IAUnC,cAAc,CAAC,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS;CA8DzD"}
@@ -4,6 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _HonoYjsMemAdapter_instances, _HonoYjsMemAdapter_terminate, _HonoYjsMemAdapter_removeSocket;
7
+ import "./_dnt.polyfills.js";
7
8
  import * as Y from 'yjs';
8
9
  import * as syncProtocol from 'y-protocols/sync';
9
10
  import * as awarenessProtocol from 'y-protocols/awareness';
@@ -0,0 +1,7 @@
1
+ declare global {
2
+ interface Error {
3
+ cause?: unknown;
4
+ }
5
+ }
6
+ export {};
7
+ //# sourceMappingURL=_dnt.polyfills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK;QACb,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CACF;AAED,OAAO,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import type { Context } from './context.js';
2
+ import type { Env, ErrorHandler, Next, NotFoundHandler } from './types.js';
3
+ /**
4
+ * Compose middleware functions into a single function based on `koa-compose` package.
5
+ *
6
+ * @template E - The environment type.
7
+ *
8
+ * @param {[[Function, unknown], unknown][] | [[Function]][]} middleware - An array of middleware functions and their corresponding parameters.
9
+ * @param {ErrorHandler<E>} [onError] - An optional error handler function.
10
+ * @param {NotFoundHandler<E>} [onNotFound] - An optional not-found handler function.
11
+ *
12
+ * @returns {(context: Context, next?: Next) => Promise<Context>} - A composed middleware function.
13
+ */
14
+ export declare const compose: <E extends Env = Env>(middleware: [[Function, unknown], unknown][] | [[Function]][], onError?: ErrorHandler<E>, onNotFound?: NotFoundHandler<E>) => ((context: Context, next?: Next) => Promise<Context>);
15
+ //# sourceMappingURL=compose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@hono/hono/4.10.7/src/compose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAE1E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,GAAG,GAAG,GAAG,EACzC,YAAY,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,EAC7D,UAAU,YAAY,CAAC,CAAC,CAAC,EACzB,aAAa,eAAe,CAAC,CAAC,CAAC,KAC9B,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC,CAsDtD,CAAA"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Compose middleware functions into a single function based on `koa-compose` package.
3
+ *
4
+ * @template E - The environment type.
5
+ *
6
+ * @param {[[Function, unknown], unknown][] | [[Function]][]} middleware - An array of middleware functions and their corresponding parameters.
7
+ * @param {ErrorHandler<E>} [onError] - An optional error handler function.
8
+ * @param {NotFoundHandler<E>} [onNotFound] - An optional not-found handler function.
9
+ *
10
+ * @returns {(context: Context, next?: Next) => Promise<Context>} - A composed middleware function.
11
+ */
12
+ export const compose = (middleware, onError, onNotFound) => {
13
+ return (context, next) => {
14
+ let index = -1;
15
+ return dispatch(0);
16
+ /**
17
+ * Dispatch the middleware functions.
18
+ *
19
+ * @param {number} i - The current index in the middleware array.
20
+ *
21
+ * @returns {Promise<Context>} - A promise that resolves to the context.
22
+ */
23
+ async function dispatch(i) {
24
+ if (i <= index) {
25
+ throw new Error('next() called multiple times');
26
+ }
27
+ index = i;
28
+ let res;
29
+ let isError = false;
30
+ let handler;
31
+ if (middleware[i]) {
32
+ handler = middleware[i][0][0];
33
+ context.req.routeIndex = i;
34
+ }
35
+ else {
36
+ handler = (i === middleware.length && next) || undefined;
37
+ }
38
+ if (handler) {
39
+ try {
40
+ res = await handler(context, () => dispatch(i + 1));
41
+ }
42
+ catch (err) {
43
+ if (err instanceof Error && onError) {
44
+ context.error = err;
45
+ res = await onError(err, context);
46
+ isError = true;
47
+ }
48
+ else {
49
+ throw err;
50
+ }
51
+ }
52
+ }
53
+ else {
54
+ if (context.finalized === false && onNotFound) {
55
+ res = await onNotFound(context);
56
+ }
57
+ }
58
+ if (res && (context.finalized === false || isError)) {
59
+ context.res = res;
60
+ }
61
+ return context;
62
+ }
63
+ };
64
+ };
@@ -0,0 +1,452 @@
1
+ import { HonoRequest } from './request.js';
2
+ import type { Result } from './router.js';
3
+ import type { Env, FetchEventLike, H, Input, NotFoundHandler, RouterRoute, TypedResponse } from './types.js';
4
+ import type { ResponseHeader } from './utils/headers.js';
5
+ import type { ContentfulStatusCode, RedirectStatusCode, StatusCode } from './utils/http-status.js';
6
+ import type { BaseMime } from './utils/mime.js';
7
+ import type { InvalidJSONValue, IsAny, JSONParsed, JSONValue } from './utils/types.js';
8
+ type HeaderRecord = Record<'Content-Type', BaseMime> | Record<ResponseHeader, string | string[]> | Record<string, string | string[]>;
9
+ /**
10
+ * Data type can be a string, ArrayBuffer, Uint8Array (buffer), or ReadableStream.
11
+ */
12
+ export type Data = string | ArrayBuffer | ReadableStream | Uint8Array<ArrayBuffer>;
13
+ /**
14
+ * Interface for the execution context in a web worker or similar environment.
15
+ */
16
+ export interface ExecutionContext {
17
+ /**
18
+ * Extends the lifetime of the event callback until the promise is settled.
19
+ *
20
+ * @param promise - A promise to wait for.
21
+ */
22
+ waitUntil(promise: Promise<unknown>): void;
23
+ /**
24
+ * Allows the event to be passed through to subsequent event listeners.
25
+ */
26
+ passThroughOnException(): void;
27
+ /**
28
+ * For compatibility with Wrangler 4.x.
29
+ */
30
+ props: any;
31
+ }
32
+ /**
33
+ * Interface for context variable mapping.
34
+ */
35
+ export interface ContextVariableMap {
36
+ }
37
+ /**
38
+ * Interface for context renderer.
39
+ */
40
+ export interface ContextRenderer {
41
+ }
42
+ /**
43
+ * Interface representing a renderer for content.
44
+ *
45
+ * @interface DefaultRenderer
46
+ * @param {string | Promise<string>} content - The content to be rendered, which can be either a string or a Promise resolving to a string.
47
+ * @returns {Response | Promise<Response>} - The response after rendering the content, which can be either a Response or a Promise resolving to a Response.
48
+ */
49
+ interface DefaultRenderer {
50
+ (content: string | Promise<string>): Response | Promise<Response>;
51
+ }
52
+ /**
53
+ * Renderer type which can either be a ContextRenderer or DefaultRenderer.
54
+ */
55
+ export type Renderer = ContextRenderer extends Function ? ContextRenderer : DefaultRenderer;
56
+ /**
57
+ * Extracts the props for the renderer.
58
+ */
59
+ export type PropsForRenderer = [...Required<Parameters<Renderer>>] extends [unknown, infer Props] ? Props : unknown;
60
+ export type Layout<T = Record<string, any>> = (props: T) => any;
61
+ /**
62
+ * Interface for getting context variables.
63
+ *
64
+ * @template E - Environment type.
65
+ */
66
+ interface Get<E extends Env> {
67
+ <Key extends keyof E['Variables']>(key: Key): E['Variables'][Key];
68
+ <Key extends keyof ContextVariableMap>(key: Key): ContextVariableMap[Key];
69
+ }
70
+ /**
71
+ * Interface for setting context variables.
72
+ *
73
+ * @template E - Environment type.
74
+ */
75
+ interface Set<E extends Env> {
76
+ <Key extends keyof E['Variables']>(key: Key, value: E['Variables'][Key]): void;
77
+ <Key extends keyof ContextVariableMap>(key: Key, value: ContextVariableMap[Key]): void;
78
+ }
79
+ /**
80
+ * Interface for creating a new response.
81
+ */
82
+ interface NewResponse {
83
+ (data: Data | null, status?: StatusCode, headers?: HeaderRecord): Response;
84
+ (data: Data | null, init?: ResponseOrInit): Response;
85
+ }
86
+ /**
87
+ * Interface for responding with a body.
88
+ */
89
+ interface BodyRespond {
90
+ <T extends Data, U extends ContentfulStatusCode>(data: T, status?: U, headers?: HeaderRecord): Response & TypedResponse<T, U, 'body'>;
91
+ <T extends Data, U extends ContentfulStatusCode>(data: T, init?: ResponseOrInit<U>): Response & TypedResponse<T, U, 'body'>;
92
+ <T extends null, U extends StatusCode>(data: T, status?: U, headers?: HeaderRecord): Response & TypedResponse<null, U, 'body'>;
93
+ <T extends null, U extends StatusCode>(data: T, init?: ResponseOrInit<U>): Response & TypedResponse<null, U, 'body'>;
94
+ }
95
+ /**
96
+ * Interface for responding with text.
97
+ *
98
+ * @interface TextRespond
99
+ * @template T - The type of the text content.
100
+ * @template U - The type of the status code.
101
+ *
102
+ * @param {T} text - The text content to be included in the response.
103
+ * @param {U} [status] - An optional status code for the response.
104
+ * @param {HeaderRecord} [headers] - An optional record of headers to include in the response.
105
+ *
106
+ * @returns {Response & TypedResponse<T, U, 'text'>} - The response after rendering the text content, typed with the provided text and status code types.
107
+ */
108
+ interface TextRespond {
109
+ <T extends string, U extends ContentfulStatusCode = ContentfulStatusCode>(text: T, status?: U, headers?: HeaderRecord): Response & TypedResponse<T, U, 'text'>;
110
+ <T extends string, U extends ContentfulStatusCode = ContentfulStatusCode>(text: T, init?: ResponseOrInit<U>): Response & TypedResponse<T, U, 'text'>;
111
+ }
112
+ /**
113
+ * Interface for responding with JSON.
114
+ *
115
+ * @interface JSONRespond
116
+ * @template T - The type of the JSON value or simplified unknown type.
117
+ * @template U - The type of the status code.
118
+ *
119
+ * @param {T} object - The JSON object to be included in the response.
120
+ * @param {U} [status] - An optional status code for the response.
121
+ * @param {HeaderRecord} [headers] - An optional record of headers to include in the response.
122
+ *
123
+ * @returns {JSONRespondReturn<T, U>} - The response after rendering the JSON object, typed with the provided object and status code types.
124
+ */
125
+ interface JSONRespond {
126
+ <T extends JSONValue | {} | InvalidJSONValue, U extends ContentfulStatusCode = ContentfulStatusCode>(object: T, status?: U, headers?: HeaderRecord): JSONRespondReturn<T, U>;
127
+ <T extends JSONValue | {} | InvalidJSONValue, U extends ContentfulStatusCode = ContentfulStatusCode>(object: T, init?: ResponseOrInit<U>): JSONRespondReturn<T, U>;
128
+ }
129
+ /**
130
+ * @template T - The type of the JSON value or simplified unknown type.
131
+ * @template U - The type of the status code.
132
+ *
133
+ * @returns {Response & TypedResponse<JSONParsed<T>, U, 'json'>} - The response after rendering the JSON object, typed with the provided object and status code types.
134
+ */
135
+ type JSONRespondReturn<T extends JSONValue | {} | InvalidJSONValue, U extends ContentfulStatusCode> = Response & TypedResponse<JSONParsed<T>, U, 'json'>;
136
+ /**
137
+ * Interface representing a function that responds with HTML content.
138
+ *
139
+ * @param html - The HTML content to respond with, which can be a string or a Promise that resolves to a string.
140
+ * @param status - (Optional) The HTTP status code for the response.
141
+ * @param headers - (Optional) A record of headers to include in the response.
142
+ * @param init - (Optional) The response initialization object.
143
+ *
144
+ * @returns A Response object or a Promise that resolves to a Response object.
145
+ */
146
+ interface HTMLRespond {
147
+ <T extends string | Promise<string>>(html: T, status?: ContentfulStatusCode, headers?: HeaderRecord): T extends string ? Response : Promise<Response>;
148
+ <T extends string | Promise<string>>(html: T, init?: ResponseOrInit<ContentfulStatusCode>): T extends string ? Response : Promise<Response>;
149
+ }
150
+ /**
151
+ * Options for configuring the context.
152
+ *
153
+ * @template E - Environment type.
154
+ */
155
+ type ContextOptions<E extends Env> = {
156
+ /**
157
+ * Bindings for the environment.
158
+ */
159
+ env: E['Bindings'];
160
+ /**
161
+ * Execution context for the request.
162
+ */
163
+ executionCtx?: FetchEventLike | ExecutionContext | undefined;
164
+ /**
165
+ * Handler for not found responses.
166
+ */
167
+ notFoundHandler?: NotFoundHandler<E>;
168
+ matchResult?: Result<[H, RouterRoute]>;
169
+ path?: string;
170
+ };
171
+ interface SetHeadersOptions {
172
+ append?: boolean;
173
+ }
174
+ interface SetHeaders {
175
+ (name: 'Content-Type', value?: BaseMime, options?: SetHeadersOptions): void;
176
+ (name: ResponseHeader, value?: string, options?: SetHeadersOptions): void;
177
+ (name: string, value?: string, options?: SetHeadersOptions): void;
178
+ }
179
+ type ResponseHeadersInit = [string, string][] | Record<'Content-Type', BaseMime> | Record<ResponseHeader, string> | Record<string, string> | Headers;
180
+ interface ResponseInit<T extends StatusCode = StatusCode> {
181
+ headers?: ResponseHeadersInit;
182
+ status?: T;
183
+ statusText?: string;
184
+ }
185
+ type ResponseOrInit<T extends StatusCode = StatusCode> = ResponseInit<T> | Response;
186
+ export declare const TEXT_PLAIN = "text/plain; charset=UTF-8";
187
+ export declare class Context<E extends Env = any, P extends string = any, I extends Input = {}> {
188
+ #private;
189
+ /**
190
+ * `.env` can get bindings (environment variables, secrets, KV namespaces, D1 database, R2 bucket etc.) in Cloudflare Workers.
191
+ *
192
+ * @see {@link https://hono.dev/docs/api/context#env}
193
+ *
194
+ * @example
195
+ * ```ts
196
+ * // Environment object for Cloudflare Workers
197
+ * app.get('*', async c => {
198
+ * const counter = c.env.COUNTER
199
+ * })
200
+ * ```
201
+ */
202
+ env: E['Bindings'];
203
+ finalized: boolean;
204
+ /**
205
+ * `.error` can get the error object from the middleware if the Handler throws an error.
206
+ *
207
+ * @see {@link https://hono.dev/docs/api/context#error}
208
+ *
209
+ * @example
210
+ * ```ts
211
+ * app.use('*', async (c, next) => {
212
+ * await next()
213
+ * if (c.error) {
214
+ * // do something...
215
+ * }
216
+ * })
217
+ * ```
218
+ */
219
+ error: Error | undefined;
220
+ /**
221
+ * Creates an instance of the Context class.
222
+ *
223
+ * @param req - The Request object.
224
+ * @param options - Optional configuration options for the context.
225
+ */
226
+ constructor(req: Request, options?: ContextOptions<E>);
227
+ /**
228
+ * `.req` is the instance of {@link HonoRequest}.
229
+ */
230
+ get req(): HonoRequest<P, I['out']>;
231
+ /**
232
+ * @see {@link https://hono.dev/docs/api/context#event}
233
+ * The FetchEvent associated with the current request.
234
+ *
235
+ * @throws Will throw an error if the context does not have a FetchEvent.
236
+ */
237
+ get event(): FetchEventLike;
238
+ /**
239
+ * @see {@link https://hono.dev/docs/api/context#executionctx}
240
+ * The ExecutionContext associated with the current request.
241
+ *
242
+ * @throws Will throw an error if the context does not have an ExecutionContext.
243
+ */
244
+ get executionCtx(): ExecutionContext;
245
+ /**
246
+ * @see {@link https://hono.dev/docs/api/context#res}
247
+ * The Response object for the current request.
248
+ */
249
+ get res(): Response;
250
+ /**
251
+ * Sets the Response object for the current request.
252
+ *
253
+ * @param _res - The Response object to set.
254
+ */
255
+ set res(_res: Response | undefined);
256
+ /**
257
+ * `.render()` can create a response within a layout.
258
+ *
259
+ * @see {@link https://hono.dev/docs/api/context#render-setrenderer}
260
+ *
261
+ * @example
262
+ * ```ts
263
+ * app.get('/', (c) => {
264
+ * return c.render('Hello!')
265
+ * })
266
+ * ```
267
+ */
268
+ render: Renderer;
269
+ /**
270
+ * Sets the layout for the response.
271
+ *
272
+ * @param layout - The layout to set.
273
+ * @returns The layout function.
274
+ */
275
+ setLayout: (layout: Layout<PropsForRenderer & {
276
+ Layout: Layout;
277
+ }>) => Layout<PropsForRenderer & {
278
+ Layout: Layout;
279
+ }>;
280
+ /**
281
+ * Gets the current layout for the response.
282
+ *
283
+ * @returns The current layout function.
284
+ */
285
+ getLayout: () => Layout<PropsForRenderer & {
286
+ Layout: Layout;
287
+ }> | undefined;
288
+ /**
289
+ * `.setRenderer()` can set the layout in the custom middleware.
290
+ *
291
+ * @see {@link https://hono.dev/docs/api/context#render-setrenderer}
292
+ *
293
+ * @example
294
+ * ```tsx
295
+ * app.use('*', async (c, next) => {
296
+ * c.setRenderer((content) => {
297
+ * return c.html(
298
+ * <html>
299
+ * <body>
300
+ * <p>{content}</p>
301
+ * </body>
302
+ * </html>
303
+ * )
304
+ * })
305
+ * await next()
306
+ * })
307
+ * ```
308
+ */
309
+ setRenderer: (renderer: Renderer) => void;
310
+ /**
311
+ * `.header()` can set headers.
312
+ *
313
+ * @see {@link https://hono.dev/docs/api/context#header}
314
+ *
315
+ * @example
316
+ * ```ts
317
+ * app.get('/welcome', (c) => {
318
+ * // Set headers
319
+ * c.header('X-Message', 'Hello!')
320
+ * c.header('Content-Type', 'text/plain')
321
+ *
322
+ * return c.body('Thank you for coming')
323
+ * })
324
+ * ```
325
+ */
326
+ header: SetHeaders;
327
+ status: (status: StatusCode) => void;
328
+ /**
329
+ * `.set()` can set the value specified by the key.
330
+ *
331
+ * @see {@link https://hono.dev/docs/api/context#set-get}
332
+ *
333
+ * @example
334
+ * ```ts
335
+ * app.use('*', async (c, next) => {
336
+ * c.set('message', 'Hono is hot!!')
337
+ * await next()
338
+ * })
339
+ * ```
340
+ */
341
+ set: Set<IsAny<E> extends true ? {
342
+ Variables: ContextVariableMap & Record<string, any>;
343
+ } : E>;
344
+ /**
345
+ * `.get()` can use the value specified by the key.
346
+ *
347
+ * @see {@link https://hono.dev/docs/api/context#set-get}
348
+ *
349
+ * @example
350
+ * ```ts
351
+ * app.get('/', (c) => {
352
+ * const message = c.get('message')
353
+ * return c.text(`The message is "${message}"`)
354
+ * })
355
+ * ```
356
+ */
357
+ get: Get<IsAny<E> extends true ? {
358
+ Variables: ContextVariableMap & Record<string, any>;
359
+ } : E>;
360
+ /**
361
+ * `.var` can access the value of a variable.
362
+ *
363
+ * @see {@link https://hono.dev/docs/api/context#var}
364
+ *
365
+ * @example
366
+ * ```ts
367
+ * const result = c.var.client.oneMethod()
368
+ * ```
369
+ */
370
+ get var(): Readonly<ContextVariableMap & (IsAny<E['Variables']> extends true ? Record<string, any> : E['Variables'])>;
371
+ newResponse: NewResponse;
372
+ /**
373
+ * `.body()` can return the HTTP response.
374
+ * You can set headers with `.header()` and set HTTP status code with `.status`.
375
+ * This can also be set in `.text()`, `.json()` and so on.
376
+ *
377
+ * @see {@link https://hono.dev/docs/api/context#body}
378
+ *
379
+ * @example
380
+ * ```ts
381
+ * app.get('/welcome', (c) => {
382
+ * // Set headers
383
+ * c.header('X-Message', 'Hello!')
384
+ * c.header('Content-Type', 'text/plain')
385
+ * // Set HTTP status code
386
+ * c.status(201)
387
+ *
388
+ * // Return the response body
389
+ * return c.body('Thank you for coming')
390
+ * })
391
+ * ```
392
+ */
393
+ body: BodyRespond;
394
+ /**
395
+ * `.text()` can render text as `Content-Type:text/plain`.
396
+ *
397
+ * @see {@link https://hono.dev/docs/api/context#text}
398
+ *
399
+ * @example
400
+ * ```ts
401
+ * app.get('/say', (c) => {
402
+ * return c.text('Hello!')
403
+ * })
404
+ * ```
405
+ */
406
+ text: TextRespond;
407
+ /**
408
+ * `.json()` can render JSON as `Content-Type:application/json`.
409
+ *
410
+ * @see {@link https://hono.dev/docs/api/context#json}
411
+ *
412
+ * @example
413
+ * ```ts
414
+ * app.get('/api', (c) => {
415
+ * return c.json({ message: 'Hello!' })
416
+ * })
417
+ * ```
418
+ */
419
+ json: JSONRespond;
420
+ html: HTMLRespond;
421
+ /**
422
+ * `.redirect()` can Redirect, default status code is 302.
423
+ *
424
+ * @see {@link https://hono.dev/docs/api/context#redirect}
425
+ *
426
+ * @example
427
+ * ```ts
428
+ * app.get('/redirect', (c) => {
429
+ * return c.redirect('/')
430
+ * })
431
+ * app.get('/redirect-permanently', (c) => {
432
+ * return c.redirect('/', 301)
433
+ * })
434
+ * ```
435
+ */
436
+ redirect: <T extends RedirectStatusCode = 302>(location: string | URL, status?: T) => Response & TypedResponse<undefined, T, "redirect">;
437
+ /**
438
+ * `.notFound()` can return the Not Found Response.
439
+ *
440
+ * @see {@link https://hono.dev/docs/api/context#notfound}
441
+ *
442
+ * @example
443
+ * ```ts
444
+ * app.get('/notfound', (c) => {
445
+ * return c.notFound()
446
+ * })
447
+ * ```
448
+ */
449
+ notFound: () => Response | Promise<Response>;
450
+ }
451
+ export {};
452
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@hono/hono/4.10.7/src/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAA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