@dunx/http 3.3.0 → 3.3.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/dist/health/controller.d.ts +7 -2
- package/dist/index.js +3 -1
- package/package.json +2 -2
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
* finishes every `onInit` before `listen()` binds, so a connection refused *is* "not
|
|
4
4
|
* started yet" and a third endpoint would restate it.
|
|
5
5
|
*
|
|
6
|
-
* `@Public()` because a probe has no credentials
|
|
7
|
-
*
|
|
6
|
+
* `@Public()` because a probe has no credentials, and `@SkipThrottle()` for the same
|
|
7
|
+
* reason: a probe is not a caller with a budget. `app.use(ThrottleGuard)` covers
|
|
8
|
+
* every route, so without the exemption an orchestrator polling a pod that is
|
|
9
|
+
* already shedding load reads 429, calls the process unhealthy and restarts it.
|
|
10
|
+
*
|
|
11
|
+
* Both routes are documented, under the `Health` tag;
|
|
12
|
+
* `HealthModule.forRoot({ documented: false })` mounts
|
|
8
13
|
* {@link HiddenHealthController} instead.
|
|
9
14
|
*/
|
|
10
15
|
export declare class HealthController {
|
package/dist/index.js
CHANGED
|
@@ -2307,7 +2307,7 @@ class ThrottleOptions {
|
|
|
2307
2307
|
subject;
|
|
2308
2308
|
store;
|
|
2309
2309
|
constructor(init) {
|
|
2310
|
-
if (init.prefix.trim() === "") {
|
|
2310
|
+
if (typeof init.prefix !== "string" || init.prefix.trim() === "") {
|
|
2311
2311
|
throw new AppError9("ThrottleModule needs a prefix naming this application, and it has no " + "default: two apps sharing one Redis with one throttle namespace each " + "spend the other's budget. Pass something like { prefix: 'orders-api' }.");
|
|
2312
2312
|
}
|
|
2313
2313
|
if (!Number.isInteger(init.limit) || init.limit < 1) {
|
|
@@ -2957,10 +2957,12 @@ var _dec = [
|
|
|
2957
2957
|
];
|
|
2958
2958
|
var _dec2 = [
|
|
2959
2959
|
Public2(),
|
|
2960
|
+
SkipThrottle(),
|
|
2960
2961
|
Get("/live", probeResponses)
|
|
2961
2962
|
];
|
|
2962
2963
|
var _dec3 = [
|
|
2963
2964
|
Public2(),
|
|
2965
|
+
SkipThrottle(),
|
|
2964
2966
|
Get("/ready", probeResponses)
|
|
2965
2967
|
];
|
|
2966
2968
|
var _health = new WeakMap;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dunx/http",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "Bun.serve adapter for the dunx framework: controllers, middleware and WebSocket gateways",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@opentelemetry/sdk-trace-node": "2.11.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@dunx/core": "^3.3.
|
|
68
|
+
"@dunx/core": "^3.3.2",
|
|
69
69
|
"@types/bun": ">=1.4.1"
|
|
70
70
|
},
|
|
71
71
|
"peerDependenciesMeta": {
|