@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.
- package/README.md +31 -909
- package/dist/chunk-25g22350.js +58 -0
- package/dist/chunk-b699cfes.js +130 -0
- package/dist/chunk-f6pw36av.js +1299 -0
- package/dist/{chunk-jh7jk0bn.js → chunk-sz4pvqxy.js} +1 -57
- package/dist/client/module.d.ts +2 -7
- package/dist/client/service.d.ts +11 -22
- package/dist/client.d.ts +1 -2
- package/dist/client.js +12 -142
- package/dist/compression/compression.d.ts +7 -12
- package/dist/compression/options.d.ts +11 -23
- package/dist/health/indicators.d.ts +5 -10
- package/dist/index.d.ts +13 -21
- package/dist/index.js +102 -1484
- package/dist/internal.d.ts +36 -0
- package/dist/internal.js +154 -0
- package/dist/route/metadata.d.ts +6 -9
- package/dist/route/schema.d.ts +27 -55
- package/dist/server/application.d.ts +33 -89
- package/dist/server/client-address.d.ts +6 -13
- package/dist/server/errors.d.ts +24 -55
- package/dist/server/request-id.d.ts +6 -11
- package/dist/server/request-logging.d.ts +29 -101
- package/dist/server/routes.d.ts +7 -19
- package/dist/server/trace-context.d.ts +6 -10
- package/dist/static/files.d.ts +5 -13
- package/dist/static/module.d.ts +10 -19
- package/dist/throttle/guard.d.ts +6 -9
- package/dist/throttle/module.d.ts +6 -8
- package/dist/throttle/store.d.ts +11 -20
- package/dist/ws/middleware.d.ts +12 -21
- package/dist/ws/redis-relay.d.ts +9 -19
- package/package.json +6 -2
package/dist/ws/redis-relay.d.ts
CHANGED
|
@@ -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
|
-
*
|
|
11
|
-
*
|
|
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
|
|
27
|
-
* `@dunx/http` no dependency
|
|
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
|
-
*
|
|
35
|
-
*
|
|
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": "
|
|
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": "^
|
|
65
|
+
"@dunx/core": "^3.0.1",
|
|
62
66
|
"@types/bun": ">=1.3.0"
|
|
63
67
|
},
|
|
64
68
|
"peerDependenciesMeta": {
|