hono-adapter-aws-lambda 1.3.2 → 1.3.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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -4
  2. package/package.json +27 -40
package/dist/index.mjs CHANGED
@@ -202,17 +202,17 @@ class TriggerFactory {
202
202
  this.simpleRouter[eventSource] = thisEventSource = {};
203
203
  this.honoApp.on(METHOD, getTriggerPath(eventSource), async (c) => {
204
204
  if (thisEventSource["$!"]) {
205
- return this.internalApp.fetch(makeLocalRequest(METHOD, `/${eventSource}/$!`));
205
+ return this.internalApp.fetch(makeLocalRequest(METHOD, `/${eventSource}/$!`), c.env);
206
206
  }
207
207
  const resObj = {};
208
208
  for (const route in thisEventSource) {
209
209
  if (route[0] === "$")
210
210
  continue;
211
- const res = await this.internalApp.fetch(makeLocalRequest(METHOD, `/${eventSource}/${route}`));
211
+ const res = await this.internalApp.fetch(makeLocalRequest(METHOD, `/${eventSource}/${route}`), c.env);
212
212
  resObj[route] = /^application\/json/.test(res.headers.get("content-type") || "") ? await res.json() : await res.text();
213
213
  }
214
214
  if (thisEventSource["$="]) {
215
- return this.internalApp.fetch(makeLocalRequest(METHOD, `/${eventSource}/$=`));
215
+ return this.internalApp.fetch(makeLocalRequest(METHOD, `/${eventSource}/$=`), c.env);
216
216
  }
217
217
  return c.json(resObj);
218
218
  });
@@ -253,7 +253,7 @@ class TriggerEventProcessor {
253
253
  }
254
254
  }
255
255
  const triggerProcessor = new TriggerEventProcessor();
256
- const triggerPathUUID = `${process.env.SECRET_SALT}-${Date.now()}-${globalThis.crypto.randomUUID()}`;
256
+ const triggerPathUUID = `${process.env.HONO_TRIGGER_SALT}-${Date.now()}-${Math.random()}`;
257
257
  function getTriggerPath(path) {
258
258
  return mergePath(triggerPathUUID, path);
259
259
  }
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "hono-adapter-aws-lambda",
3
3
  "type": "module",
4
- "version": "1.3.2",
5
- "packageManager": "pnpm@10.11.0",
4
+ "version": "1.3.4",
6
5
  "description": "",
7
6
  "author": "NamesMT <dangquoctrung123@gmail.com>",
8
7
  "license": "MIT",
@@ -36,22 +35,6 @@
36
35
  "engines": {
37
36
  "node": ">=18.20.3"
38
37
  },
39
- "scripts": {
40
- "start": "NODE_ENV=dev tsx src/index.ts",
41
- "watch": "NODE_ENV=dev tsx watch src/index.ts",
42
- "stub": "unbuild --stub",
43
- "dev": "pnpm run watch",
44
- "play": "pnpm run stub && pnpm run --filter playground dev",
45
- "play:useBuild": "pnpm run build && pnpm run --filter playground dev",
46
- "lint": "eslint .",
47
- "test": "vitest",
48
- "test:types": "tsc --noEmit --skipLibCheck",
49
- "check": "pnpm lint && pnpm test:types && vitest run --coverage",
50
- "build": "unbuild",
51
- "release": "pnpm dlx changelogen@latest --release --push --publish",
52
- "prepare": "simple-git-hooks",
53
- "prepublishOnly": "pnpm run build"
54
- },
55
38
  "peerDependencies": {
56
39
  "hono": ">=4.7.11"
57
40
  },
@@ -62,35 +45,39 @@
62
45
  },
63
46
  "dependencies": {
64
47
  "@namesmt/utils-lambda": "^0.1.4",
65
- "@types/aws-lambda": "^8.10.149"
48
+ "@types/aws-lambda": "^8.10.160"
66
49
  },
67
50
  "devDependencies": {
68
- "@antfu/eslint-config": "^4.13.2",
69
- "@types/node": "^20.17.57",
70
- "@vitest/coverage-v8": "^3.1.4",
71
- "eslint": "^9.28.0",
51
+ "@antfu/eslint-config": "^7.2.0",
52
+ "@types/node": "^24.10.9",
53
+ "@vitest/coverage-v8": "^3.2.4",
54
+ "eslint": "^9.39.2",
72
55
  "klona": "^2.0.6",
73
- "lint-staged": "^16.1.0",
74
- "simple-git-hooks": "^2.13.0",
75
- "tsx": "^4.19.4",
76
- "typescript": "^5.8.3",
77
- "unbuild": "^3.5.0",
78
- "vitest": "^3.1.4"
79
- },
80
- "pnpm": {
81
- "overrides": {
82
- "is-core-module": "npm:@nolyfill/is-core-module@^1.0.39"
83
- },
84
- "onlyBuiltDependencies": [
85
- "esbuild",
86
- "simple-git-hooks",
87
- "unrs-resolver"
88
- ]
56
+ "lint-staged": "^16.2.7",
57
+ "simple-git-hooks": "^2.13.1",
58
+ "tsx": "^4.21.0",
59
+ "typescript": "^5.9.3",
60
+ "unbuild": "^3.6.1",
61
+ "vitest": "^3.2.4"
89
62
  },
90
63
  "simple-git-hooks": {
91
64
  "pre-commit": "pnpm lint-staged"
92
65
  },
93
66
  "lint-staged": {
94
67
  "*": "eslint --fix"
68
+ },
69
+ "scripts": {
70
+ "start": "NODE_ENV=dev tsx src/index.ts",
71
+ "watch": "NODE_ENV=dev tsx watch src/index.ts",
72
+ "stub": "unbuild --stub",
73
+ "dev": "pnpm run watch",
74
+ "play": "pnpm run stub && pnpm run --filter playground dev",
75
+ "play:useBuild": "pnpm run build && pnpm run --filter playground dev",
76
+ "lint": "eslint .",
77
+ "test": "vitest",
78
+ "test:types": "tsc --noEmit --skipLibCheck",
79
+ "check": "pnpm lint && pnpm test:types && vitest run --coverage",
80
+ "build": "unbuild",
81
+ "release": "pnpm dlx changelogen@latest --release --push --publish"
95
82
  }
96
- }
83
+ }