yedra 0.17.9 → 0.17.11

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.
@@ -274,6 +274,7 @@ yedra_request_duration_sum{method="${method}",status="${status}"} ${data?.durati
274
274
  metricsServer.on('request', async (req, res) => {
275
275
  if (req.method === 'GET' && req.url === metricsEndpoint.path) {
276
276
  res.writeHead(200);
277
+ res.setHeader('content-type', 'text/plain; version=0.0.4; charset=utf-8; escaping=underscores');
277
278
  res.write(this.metrics());
278
279
  if (metricsEndpoint.get !== undefined) {
279
280
  res.write(await metricsEndpoint.get());
@@ -14,11 +14,11 @@ type ReqObject<Params, Query, Headers, Body> = {
14
14
  type ResObject<Body> = Promise<{
15
15
  status?: number;
16
16
  body: Body;
17
- headers?: Record<string, string>;
17
+ headers?: Record<string, string | undefined>;
18
18
  }> | {
19
19
  status?: number;
20
20
  body: Body;
21
- headers?: Record<string, string>;
21
+ headers?: Record<string, string | undefined>;
22
22
  };
23
23
  type EndpointOptions<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>> = {
24
24
  category: string;
@@ -51,7 +51,7 @@ export declare abstract class RestEndpoint {
51
51
  }): Promise<{
52
52
  status?: number;
53
53
  body: unknown;
54
- headers?: Record<string, string>;
54
+ headers?: Record<string, string | undefined>;
55
55
  }>;
56
56
  abstract isHidden(): boolean;
57
57
  abstract documentation(path: string, securitySchemes: Set<SecurityScheme>): object;
@@ -78,7 +78,7 @@ declare class ConcreteRestEndpoint<Params extends Record<string, Schema<unknown>
78
78
  }): Promise<{
79
79
  status?: number;
80
80
  body: unknown;
81
- headers?: Record<string, string>;
81
+ headers?: Record<string, string | undefined>;
82
82
  }>;
83
83
  isHidden(): boolean;
84
84
  documentation(path: string, securitySchemes: Set<SecurityScheme>): object;
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "yedra",
3
- "version": "0.17.9",
3
+ "version": "0.17.11",
4
4
  "repository": "github:0codekit/yedra",
5
5
  "main": "dist/index.js",
6
6
  "devDependencies": {
7
- "@biomejs/biome": "^2.2.2",
8
- "@types/bun": "^1.2.21",
9
- "@types/node": "^24.3.0",
10
- "@types/uuid": "^10.0.0",
7
+ "@biomejs/biome": "^2.2.4",
8
+ "@types/bun": "^1.2.23",
9
+ "@types/node": "^24.6.1",
10
+ "@types/uuid": "^11.0.0",
11
11
  "@types/ws": "^8.18.1",
12
- "typescript": "^5.9.2"
12
+ "typescript": "^5.9.3"
13
13
  },
14
14
  "bugs": "https://github.com/0codekit/yedra/issues",
15
15
  "contributors": [
@@ -34,8 +34,8 @@
34
34
  "types": "dist/index.d.ts",
35
35
  "type": "module",
36
36
  "dependencies": {
37
- "mime": "^4.0.7",
38
- "uuid": "^11.1.0",
37
+ "mime": "^4.1.0",
38
+ "uuid": "^13.0.0",
39
39
  "ws": "^8.18.3"
40
40
  }
41
41
  }