bun-crumb 0.10.0 → 0.11.0

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/index.d.ts CHANGED
@@ -83,6 +83,7 @@ interface RouteRequestGeneric {
83
83
  * Type of route handler `request` parameter
84
84
  */
85
85
  interface RouteRequest<T extends RouteRequestGeneric = RouteRequestGeneric> extends Omit<BunRequest, 'params'> {
86
+ query: URLSearchParams;
86
87
  params: RouteRequestParams<T['params']>;
87
88
  /**
88
89
  * #### Parses and validates body of request.
@@ -163,6 +164,14 @@ interface RouteResponse<T extends {
163
164
  * ```
164
165
  */
165
166
  setHeader: (name: Header['name'], value: Header['value']) => void;
167
+ /**
168
+ *
169
+ * @param options `Bun.Cookie` options parametr
170
+ *
171
+ *
172
+ *
173
+ *
174
+ */
166
175
  setCookie: (options: CookieInit) => void;
167
176
  }
168
177
  type Route = Partial<Record<HttpMethod, RouteOptions>>;
@@ -0,0 +1 @@
1
+ export { _routes, prepareRoutes, handleBody } from '../server';
package/dist/server.d.ts CHANGED
@@ -15,7 +15,8 @@ export type Routes = Map<RouteOptions['url'], Route>;
15
15
  export declare const _routes: Routes;
16
16
  /**
17
17
  *
18
- * Runtime function that used in request.
18
+ *
19
+ *
19
20
  * Parses body to supported content type (json, plain text) and validates it with route schema.
20
21
  *
21
22
  * @param {BunRequest} request incoming bun request.
@@ -25,6 +25,7 @@ export interface RouteRequestGeneric {
25
25
  * Type of route handler `request` parameter
26
26
  */
27
27
  export interface RouteRequest<T extends RouteRequestGeneric = RouteRequestGeneric> extends Omit<BunRequest, 'params'> {
28
+ query: URLSearchParams;
28
29
  params: RouteRequestParams<T['params']>;
29
30
  /**
30
31
  * #### Parses and validates body of request.
@@ -105,6 +106,14 @@ export interface RouteResponse<T extends {
105
106
  * ```
106
107
  */
107
108
  setHeader: (name: Header['name'], value: Header['value']) => void;
109
+ /**
110
+ *
111
+ * @param options `Bun.Cookie` options parametr
112
+ *
113
+ *
114
+ *
115
+ *
116
+ */
108
117
  setCookie: (options: CookieInit) => void;
109
118
  }
110
119
  export type Route = Partial<Record<HttpMethod, RouteOptions>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bun-crumb",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "author": "marigold",
5
5
  "module": "dist/index.js",
6
6
  "license": "UNLICENSED",