@fluojs/terminus 1.0.0-beta.3 → 1.0.0-beta.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 (3) hide show
  1. package/README.ko.md +10 -0
  2. package/README.md +10 -0
  3. package/package.json +8 -8
package/README.ko.md CHANGED
@@ -23,6 +23,8 @@ fluo 애플리케이션을 위한 헬스 인디케이터(Health Indicator) 툴
23
23
  pnpm add @fluojs/terminus
24
24
  ```
25
25
 
26
+ `path`로 health endpoint를 custom path 아래에 mount할 수 있고, `readinessChecks`로 애플리케이션별 readiness logic을 Terminus indicator 및 platform readiness check와 합성할 수 있습니다.
27
+
26
28
  ## 사용 시점
27
29
 
28
30
  - 외부 의존성(데이터베이스, Redis, API 등)의 상태를 애플리케이션 헬스 체크 결과에 포함해야 할 때.
@@ -114,6 +116,7 @@ TerminusModule.forRoot({
114
116
  - 지원하지 않는 status, 빈 결과, 객체가 아닌 인디케이터 결과는 조용히 버려지지 않고 `down` 진단으로 보고됩니다.
115
117
  - 같은 실행에서 이미 보고된 key를 다른 인디케이터가 다시 사용하면, Terminus는 먼저 기록된 entry를 유지하고 데이터를 조용히 덮어쓰는 대신 결정적인 `*-duplicate-key-error` contributor를 추가합니다.
116
118
  - 플랫폼 health/readiness 실패는 `/health` 응답에서 결정적인 `fluo-platform-health`, `fluo-platform-readiness` contributor로 노출됩니다.
119
+ - Runtime diagnostics가 있으면 `/health` response에 platform health/readiness detail을 담은 `platform` block이 포함될 수 있습니다.
117
120
 
118
121
  ## 공개 API 개요
119
122
 
@@ -121,6 +124,7 @@ TerminusModule.forRoot({
121
124
 
122
125
  - `static forRoot(options: TerminusModuleOptions): ModuleType`
123
126
  - 인디케이터 및 provider 등록을 위한 메인 엔트리 포인트입니다.
127
+ - Option에는 `indicators`, `indicatorProviders`, `readinessChecks`, `execution.indicatorTimeoutMs`, `path`가 포함됩니다.
124
128
 
125
129
  ### `TerminusHealthService`
126
130
 
@@ -129,6 +133,12 @@ TerminusModule.forRoot({
129
133
  - `isHealthy(): Promise<boolean>`
130
134
  - 현재 집계 결과가 완전히 healthy 상태인지 반환합니다.
131
135
 
136
+ ### 직접 helper와 token
137
+
138
+ - `runHealthCheck(...)`, `assertHealthCheck(...)`: 직접 aggregation/testing helper입니다.
139
+ - `TERMINUS_HEALTH_INDICATORS`, `TERMINUS_INDICATOR_PROVIDER_TOKENS`: 등록된 indicator와 provider token을 위한 DI token입니다.
140
+ - Built-in indicator는 `create*HealthIndicator()` 및 `create*HealthIndicatorProvider()` helper도 노출합니다.
141
+
132
142
  ### `@fluojs/terminus/redis`
133
143
 
134
144
  - `RedisHealthIndicator`, `createRedisHealthIndicator()`, `createRedisHealthIndicatorProvider()`
package/README.md CHANGED
@@ -103,6 +103,8 @@ TerminusModule.forRoot({
103
103
  });
104
104
  ```
105
105
 
106
+ Use `path` to mount the health endpoints under a custom path, and `readinessChecks` to compose application-specific readiness logic with Terminus indicator and platform readiness checks.
107
+
106
108
  ### Failure Semantics
107
109
 
108
110
  When an indicator fails, it throws a `HealthCheckError`. The `TerminusHealthService` aggregates these failures into a report:
@@ -114,6 +116,7 @@ When an indicator fails, it throws a `HealthCheckError`. The `TerminusHealthServ
114
116
  - Unsupported, empty, or non-object indicator results are reported as `down` diagnostics instead of being silently discarded.
115
117
  - If an indicator reuses a key that was already reported earlier in the same run, Terminus keeps the first entry and adds a deterministic `*-duplicate-key-error` contributor instead of silently overwriting data.
116
118
  - Platform health/readiness failures are surfaced as deterministic `fluo-platform-health` and `fluo-platform-readiness` contributors in `/health` responses.
119
+ - `/health` responses may include a `platform` block with platform health/readiness details when runtime diagnostics are available.
117
120
 
118
121
  ## Public API Overview
119
122
 
@@ -121,6 +124,7 @@ When an indicator fails, it throws a `HealthCheckError`. The `TerminusHealthServ
121
124
 
122
125
  - `static forRoot(options: TerminusModuleOptions): ModuleType`
123
126
  - Main entry point for registering indicators and providers.
127
+ - Options include `indicators`, `indicatorProviders`, `readinessChecks`, `execution.indicatorTimeoutMs`, and `path`.
124
128
 
125
129
  ### `TerminusHealthService`
126
130
 
@@ -129,6 +133,12 @@ When an indicator fails, it throws a `HealthCheckError`. The `TerminusHealthServ
129
133
  - `isHealthy(): Promise<boolean>`
130
134
  - Returns whether the current aggregated report is fully healthy.
131
135
 
136
+ ### Direct helpers and tokens
137
+
138
+ - `runHealthCheck(...)`, `assertHealthCheck(...)`: Direct aggregation/testing helpers.
139
+ - `TERMINUS_HEALTH_INDICATORS`, `TERMINUS_INDICATOR_PROVIDER_TOKENS`: DI tokens for registered indicators and provider tokens.
140
+ - Built-in indicators also expose `create*HealthIndicator()` and `create*HealthIndicatorProvider()` helpers.
141
+
132
142
  ### `@fluojs/terminus/redis`
133
143
 
134
144
  - `RedisHealthIndicator`, `createRedisHealthIndicator()`, `createRedisHealthIndicatorProvider()`
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "liveness",
10
10
  "health-check"
11
11
  ],
12
- "version": "1.0.0-beta.3",
12
+ "version": "1.0.0-beta.4",
13
13
  "private": false,
14
14
  "license": "MIT",
15
15
  "repository": {
@@ -40,15 +40,15 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "@fluojs/di": "^1.0.0-beta.4",
44
- "@fluojs/http": "^1.0.0-beta.3",
45
- "@fluojs/core": "^1.0.0-beta.2",
46
- "@fluojs/runtime": "^1.0.0-beta.4"
43
+ "@fluojs/core": "^1.0.0-beta.4",
44
+ "@fluojs/di": "^1.0.0-beta.6",
45
+ "@fluojs/http": "^1.0.0-beta.10",
46
+ "@fluojs/runtime": "^1.0.0-beta.11"
47
47
  },
48
48
  "peerDependencies": {
49
- "@fluojs/drizzle": "^1.0.0-beta.2",
50
- "@fluojs/prisma": "^1.0.0-beta.2",
51
- "@fluojs/redis": "^1.0.0-beta.2"
49
+ "@fluojs/drizzle": "^1.0.0-beta.3",
50
+ "@fluojs/prisma": "^1.0.0-beta.3",
51
+ "@fluojs/redis": "^1.0.0-beta.3"
52
52
  },
53
53
  "peerDependenciesMeta": {
54
54
  "@fluojs/drizzle": {