@holo-js/security 0.3.23 → 0.3.25

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.
@@ -17,6 +17,7 @@ type RedisClientOptions = {
17
17
  readonly maxRetriesPerRequest: number;
18
18
  };
19
19
  type RedisClusterOptions = {
20
+ readonly lazyConnect: true;
20
21
  readonly redisOptions: RedisClientOptions;
21
22
  };
22
23
  type RedisClusterStartupNode = {
@@ -70,6 +70,7 @@ function createRedisClusterOptions(config) {
70
70
  }
71
71
  const startupNodes = resolveClusterStartupNodes(config);
72
72
  return {
73
+ lazyConnect: true,
73
74
  redisOptions: {
74
75
  password: config.password,
75
76
  username: config.username,
@@ -45,6 +45,11 @@ function createRequestBody(body) {
45
45
  return copy.buffer;
46
46
  }
47
47
  async function createRequest(event) {
48
+ if (event.web?.request) {
49
+ const request = event.web.request.clone();
50
+ event._requestBody = event.web.request.body ?? void 0;
51
+ return request;
52
+ }
48
53
  const method = getMethod(event);
49
54
  const headers = createHeaders(event);
50
55
  const body = isSafeMethod(method) ? void 0 : await readRawBody(event, false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holo-js/security",
3
- "version": "0.3.23",
3
+ "version": "0.3.25",
4
4
  "description": "Holo-JS Framework - CSRF and rate-limit contracts, config, and runtime seams",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -58,8 +58,8 @@
58
58
  "test": "vitest --run --coverage"
59
59
  },
60
60
  "dependencies": {
61
- "@holo-js/config": "^0.3.23",
62
- "@holo-js/kernel": "^0.3.23"
61
+ "@holo-js/config": "^0.3.25",
62
+ "@holo-js/kernel": "^0.3.25"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "h3": "^1.15.11",