yedra 0.19.3 → 0.19.4
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/routing/app.js +1 -0
- package/dist/routing/rest.d.ts +6 -3
- package/dist/routing/rest.js +5 -0
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { y };
|
|
|
3
3
|
export type { ConnectMiddleware } from './routing/app.js';
|
|
4
4
|
export { Yedra } from './routing/app.js';
|
|
5
5
|
export { BadRequestError, ConflictError, ForbiddenError, HttpError, NotFoundError, PaymentRequiredError, UnauthorizedError, } from './routing/errors.js';
|
|
6
|
-
export { Delete, Get, Post, Put } from './routing/rest.js';
|
|
6
|
+
export { Delete, Get, Patch, Post, Put } from './routing/rest.js';
|
|
7
7
|
export type { YedraWebSocket } from './routing/websocket.js';
|
|
8
8
|
export { Ws } from './routing/websocket.js';
|
|
9
9
|
export { SecurityScheme } from './util/security.js';
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,6 @@ import * as y from './lib.js';
|
|
|
2
2
|
export { y };
|
|
3
3
|
export { Yedra } from './routing/app.js';
|
|
4
4
|
export { BadRequestError, ConflictError, ForbiddenError, HttpError, NotFoundError, PaymentRequiredError, UnauthorizedError, } from './routing/errors.js';
|
|
5
|
-
export { Delete, Get, Post, Put } from './routing/rest.js';
|
|
5
|
+
export { Delete, Get, Patch, Post, Put } from './routing/rest.js';
|
|
6
6
|
export { Ws } from './routing/websocket.js';
|
|
7
7
|
export { SecurityScheme } from './util/security.js';
|
package/dist/routing/app.js
CHANGED
package/dist/routing/rest.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ type EndpointOptions<Params extends Record<string, Schema<unknown>>, Query exten
|
|
|
46
46
|
do: (req: ReqObject<Typeof<ObjectSchema<Params>>, Typeof<ObjectSchema<Query>>, Typeof<ObjectSchema<Headers>>, Typeof<Req>>) => ResObject<TypeofAccepts<Res>>;
|
|
47
47
|
};
|
|
48
48
|
export declare abstract class RestEndpoint {
|
|
49
|
-
abstract get method(): 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
49
|
+
abstract get method(): 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
50
50
|
abstract handle(req: {
|
|
51
51
|
url: string;
|
|
52
52
|
body: Readable;
|
|
@@ -72,8 +72,8 @@ declare class ConcreteRestEndpoint<Params extends Record<string, Schema<unknown>
|
|
|
72
72
|
private paramsSchema;
|
|
73
73
|
private querySchema;
|
|
74
74
|
private headersSchema;
|
|
75
|
-
constructor(method: 'GET' | 'POST' | 'PUT' | 'DELETE', options: EndpointOptions<Params, Query, Headers, Req, Res>);
|
|
76
|
-
get method(): 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
75
|
+
constructor(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', options: EndpointOptions<Params, Query, Headers, Req, Res>);
|
|
76
|
+
get method(): 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
77
77
|
handle(req: {
|
|
78
78
|
url: string;
|
|
79
79
|
body: Readable;
|
|
@@ -97,6 +97,9 @@ export declare class Post<Params extends Record<string, Schema<unknown>>, Query
|
|
|
97
97
|
export declare class Put<Params extends Record<string, Schema<unknown>>, Query extends Record<string, Schema<unknown>>, Headers extends Record<string, Schema<unknown>>, Req extends BodyType<unknown, unknown>, Res extends BodyType<unknown, unknown>> extends ConcreteRestEndpoint<Params, Query, Headers, Req, Res> {
|
|
98
98
|
constructor(options: EndpointOptions<Params, Query, Headers, Req, Res>);
|
|
99
99
|
}
|
|
100
|
+
export declare class Patch<Params extends Record<string, Schema<unknown>>, Query extends Record<string, Schema<unknown>>, Headers extends Record<string, Schema<unknown>>, Req extends BodyType<unknown, unknown>, Res extends BodyType<unknown, unknown>> extends ConcreteRestEndpoint<Params, Query, Headers, Req, Res> {
|
|
101
|
+
constructor(options: EndpointOptions<Params, Query, Headers, Req, Res>);
|
|
102
|
+
}
|
|
100
103
|
export declare class Delete<Params extends Record<string, Schema<unknown>>, Query extends Record<string, Schema<unknown>>, Headers extends Record<string, Schema<unknown>>, Res extends BodyType<unknown, unknown>> extends ConcreteRestEndpoint<Params, Query, Headers, NoneBody, Res> {
|
|
101
104
|
constructor(options: Omit<EndpointOptions<Params, Query, Headers, NoneBody, Res>, 'req'>);
|
|
102
105
|
}
|
package/dist/routing/rest.js
CHANGED
|
@@ -171,6 +171,11 @@ export class Put extends ConcreteRestEndpoint {
|
|
|
171
171
|
super('PUT', options);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
+
export class Patch extends ConcreteRestEndpoint {
|
|
175
|
+
constructor(options) {
|
|
176
|
+
super('PATCH', options);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
174
179
|
export class Delete extends ConcreteRestEndpoint {
|
|
175
180
|
constructor(options) {
|
|
176
181
|
super('DELETE', { req: none(), ...options });
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yedra",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"repository": "github:0codekit/yedra",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@biomejs/biome": "^2.3.
|
|
8
|
-
"@types/bun": "^1.3.
|
|
9
|
-
"@types/node": "^25.0.
|
|
7
|
+
"@biomejs/biome": "^2.3.12",
|
|
8
|
+
"@types/bun": "^1.3.6",
|
|
9
|
+
"@types/node": "^25.0.10",
|
|
10
10
|
"@types/uuid": "^11.0.0",
|
|
11
11
|
"@types/ws": "^8.18.1",
|
|
12
12
|
"typescript": "^5.9.3"
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"@opentelemetry/api": "^1.9.0",
|
|
38
38
|
"mime": "^4.1.0",
|
|
39
39
|
"uuid": "^13.0.0",
|
|
40
|
-
"ws": "^8.
|
|
40
|
+
"ws": "^8.19.0"
|
|
41
41
|
}
|
|
42
42
|
}
|