@kiyasov/platform-hono 1.5.0 → 1.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiyasov/platform-hono",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Nest adapter for Hono",
5
5
  "author": "Islam Kiiasov",
6
6
  "repository": {
@@ -28,38 +28,38 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@apollo/server": "^4.11.3",
32
- "@hono/node-server": "^1.13.8",
33
- "@nestjs/apollo": "^13.0.2",
34
- "@nestjs/graphql": "^13.0.2",
35
- "hono": "^4.7.1"
31
+ "@apollo/server": "^4.12.2",
32
+ "@hono/node-server": "^1.14.4",
33
+ "@nestjs/apollo": "^13.1.0",
34
+ "@nestjs/graphql": "^13.1.0",
35
+ "hono": "^4.7.11"
36
36
  },
37
37
  "devDependencies": {
38
- "@eslint/js": "^9.20.0",
39
- "@nestjs/cli": "^11.0.2",
40
- "@nestjs/common": "^11.0.9",
41
- "@nestjs/core": "^11.0.9",
42
- "@swc/cli": "^0.6.0",
43
- "@swc/core": "^1.10.16",
44
- "@types/autocannon": "^7.12.6",
45
- "@types/bun": "^1.2.2",
38
+ "@eslint/js": "^9.29.0",
39
+ "@nestjs/cli": "^11.0.7",
40
+ "@nestjs/common": "^11.1.3",
41
+ "@nestjs/core": "^11.1.3",
42
+ "@swc/cli": "^0.7.7",
43
+ "@swc/core": "^1.12.1",
44
+ "@types/autocannon": "^7.12.7",
45
+ "@types/bun": "^1.2.16",
46
46
  "@types/busboy": "^1.5.4",
47
47
  "autocannon": "^8.0.0",
48
- "bun": "^1.2.2",
49
- "eslint": "^9.20.1",
50
- "eslint-config-prettier": "^10.0.1",
51
- "eslint-plugin-perfectionist": "^4.9.0",
52
- "eslint-plugin-prettier": "^5.2.3",
53
- "globals": "^15.15.0",
54
- "graphql": "^16.10.0",
48
+ "bun": "^1.2.16",
49
+ "eslint": "^9.29.0",
50
+ "eslint-config-prettier": "^10.1.5",
51
+ "eslint-plugin-perfectionist": "^4.14.0",
52
+ "eslint-plugin-prettier": "^5.4.1",
53
+ "globals": "^16.2.0",
54
+ "graphql": "^16.11.0",
55
55
  "graphql-subscriptions": "^3.0.0",
56
- "prettier": "^3.5.1",
56
+ "prettier": "^3.5.3",
57
57
  "reflect-metadata": "^0.2.2",
58
58
  "rimraf": "^6.0.1",
59
- "rxjs": "^7.8.1",
59
+ "rxjs": "^7.8.2",
60
60
  "tsc": "^2.0.4",
61
- "typescript": "^5.7.3",
62
- "typescript-eslint": "^8.24.0"
61
+ "typescript": "^5.8.3",
62
+ "typescript-eslint": "^8.34.1"
63
63
  },
64
64
  "scripts": {
65
65
  "build:esm": "bun ./node_modules/typescript/bin/tsc --p tsconfig.esm.json",
@@ -71,5 +71,11 @@
71
71
  "benchmark:bun": "bun dev:bun & ( sleep 5 && autocannon -c 200 -d 5 -p 10 http://localhost:3000 )",
72
72
  "benchmark:bun:file": "bun run dev:bun & ( sleep 5 && bun run ./benchmarks/benchmark.mjs)",
73
73
  "benchmark:node:file": "bun run dev & ( sleep 5 && node ./benchmarks/benchmark.mjs)"
74
- }
74
+ },
75
+ "trustedDependencies": [
76
+ "@apollo/protobufjs",
77
+ "@nestjs/core",
78
+ "@swc/core",
79
+ "bun"
80
+ ]
75
81
  }
@@ -224,8 +224,9 @@ export class HonoAdapter extends AbstractHttpAdapter<
224
224
  public setNotFoundHandler(handler: RequestHandler) {
225
225
  this.instance.notFound(async (ctx: Context) => {
226
226
  await handler(ctx.req, ctx);
227
+ await this.status(ctx, HttpStatus.NOT_FOUND);
227
228
 
228
- return this.getBody(ctx);
229
+ return this.getBody(ctx, 'Not Found');
229
230
  });
230
231
  }
231
232
 
@@ -246,7 +247,7 @@ export class HonoAdapter extends AbstractHttpAdapter<
246
247
  return ctx.finalized;
247
248
  }
248
249
 
249
- public async getHeader?(ctx: Ctx, name: string) {
250
+ public async getHeader(ctx: Ctx, name: string) {
250
251
  if (typeof ctx === 'function') {
251
252
  ctx = await ctx();
252
253
  }
@@ -262,7 +263,7 @@ export class HonoAdapter extends AbstractHttpAdapter<
262
263
  ctx.res.headers.set(name, value);
263
264
  }
264
265
 
265
- public async appendHeader?(ctx: Ctx, name: string, value: string) {
266
+ public async appendHeader(ctx: Ctx, name: string, value: string) {
266
267
  if (typeof ctx === 'function') {
267
268
  ctx = await ctx();
268
269
  }