@dunx/http 2.5.0 → 3.0.1

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.
@@ -5,15 +5,10 @@ export interface RedisRelayOptions {
5
5
  /** @default `$VALKEY_URL`, `$REDIS_URL`, then `redis://localhost:6379` */
6
6
  readonly url?: string;
7
7
  /**
8
- * Bun's reconnection budget.
9
- *
10
- * `0` by default, and that default is not a preference: a `Bun.RedisClient` that
11
- * never connects keeps an internal retry timer alive past `close()`, and the
12
- * process then never exits. A relay is exactly the connection most likely to be
13
- * absent - a single-node deployment with `REDIS_URL` left over from staging -
14
- * so the default has to be the one that lets the app boot, degrade, and still
15
- * exit. Raise it when Redis is a hard requirement and you want Bun to reconnect
16
- * for you.
8
+ * Bun's reconnection budget. `0` by default: a `Bun.RedisClient` that never
9
+ * connects keeps a retry timer alive past `close()`, so the process never exits,
10
+ * and a relay is the connection most likely to be absent. Raise it where Redis
11
+ * is a hard requirement.
17
12
  *
18
13
  * @default 0
19
14
  */
@@ -23,17 +18,12 @@ export interface RedisRelayOptions {
23
18
  readonly tls?: boolean | Bun.TLSOptions;
24
19
  }
25
20
  /**
26
- * A {@link PubSubRelay} on `Bun.RedisClient` - a Bun global, so this costs
27
- * `@dunx/http` no dependency at all.
28
- *
29
- * **Two connections, not one.** A client in subscriber mode rejects every data
30
- * command, and throws synchronously doing it, so the subscription cannot share the
31
- * socket that publishes. This is the same split the socket.io Redis adapter makes
32
- * with its `pubClient` / `subClient`.
21
+ * A {@link PubSubRelay} on `Bun.RedisClient`, a Bun global, so it costs
22
+ * `@dunx/http` no dependency.
33
23
  *
34
- * Both are opened lazily, on the first call that needs them, and a failed one is
35
- * discarded so the next call builds a fresh connection rather than reusing a dead
36
- * one.
24
+ * Two connections: a client in subscriber mode rejects every data command, so the
25
+ * subscription cannot share the publishing socket. Both open lazily, and a failed
26
+ * one is discarded rather than reused.
37
27
  */
38
28
  export declare class RedisRelay implements PubSubRelay {
39
29
  #private;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dunx/http",
3
- "version": "2.5.0",
3
+ "version": "3.0.1",
4
4
  "description": "Bun.serve adapter for the dunx framework: controllers, middleware and WebSocket gateways",
5
5
  "keywords": [
6
6
  "bun",
@@ -40,6 +40,10 @@
40
40
  "./client": {
41
41
  "types": "./dist/client.d.ts",
42
42
  "import": "./dist/client.js"
43
+ },
44
+ "./internal": {
45
+ "types": "./dist/internal.d.ts",
46
+ "import": "./dist/internal.js"
43
47
  }
44
48
  },
45
49
  "publishConfig": {
@@ -58,7 +62,7 @@
58
62
  "@dunx/core": "workspace:*"
59
63
  },
60
64
  "peerDependencies": {
61
- "@dunx/core": "^2.5.0",
65
+ "@dunx/core": "^3.0.1",
62
66
  "@types/bun": ">=1.3.0"
63
67
  },
64
68
  "peerDependenciesMeta": {