@tahminator/sapling 2.1.2 → 2.1.3

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/index.d.cts CHANGED
@@ -853,11 +853,6 @@ declare class Sapling {
853
853
  * ```
854
854
  */
855
855
  static registerApp(app: e.Express): e.Express;
856
- /**
857
- * @internal
858
- * visible for testing
859
- */
860
- static _onPostStartup(): void;
861
856
  /**
862
857
  * Serialize a value into a JSON string.
863
858
  *
@@ -1130,26 +1125,20 @@ declare class HealthRegistrar {
1130
1125
  * Health checks will be used to determine whether service can serve traffic or not (a.k.a `readiness`).
1131
1126
  */
1132
1127
  add(healthCheck: HealthCheck): void;
1133
- /**
1134
- * @internal used by Sapling library, used to determine once all
1135
- * checks have been registered and server is, at the very least, alive.
1136
- */
1137
- _markLive(): void;
1138
- /**
1139
- * @internal
1140
- */
1141
- _liveness(): Promise<boolean>;
1142
- /**
1143
- * @internal
1144
- */
1145
- _readiness(): Promise<boolean>;
1146
1128
  }
1147
1129
  //#endregion
1148
1130
  //#region src/middleware/default/health/index.d.ts
1149
1131
  /**
1150
1132
  * Enable the serving of `ready` and `live` endpoints.
1151
1133
  *
1152
- * Configure any middleware-specific settings with `Sapling.Extras.health`
1134
+ * `live` and `ready` endpoint returns 200 with `{ up: true }`, else 503 with `{ up: false }`
1135
+ *
1136
+ * Customize endpoint paths with `Sapling.Extras.health`.
1137
+ * Register readiness checks via {@link HealthRegistrar}.
1138
+ *
1139
+ * explanation of `liveness` vs. `readiness`
1140
+ * @see https://kubernetes.io/docs/concepts/workloads/pods/probes/#liveness-probe
1141
+ * @see https://kubernetes.io/docs/concepts/workloads/pods/probes/#readiness-probe
1153
1142
  */
1154
1143
  declare class DefaultHealthMiddleware {
1155
1144
  private readonly healthRegistrar;
package/dist/index.d.mts CHANGED
@@ -853,11 +853,6 @@ declare class Sapling {
853
853
  * ```
854
854
  */
855
855
  static registerApp(app: e.Express): e.Express;
856
- /**
857
- * @internal
858
- * visible for testing
859
- */
860
- static _onPostStartup(): void;
861
856
  /**
862
857
  * Serialize a value into a JSON string.
863
858
  *
@@ -1130,26 +1125,20 @@ declare class HealthRegistrar {
1130
1125
  * Health checks will be used to determine whether service can serve traffic or not (a.k.a `readiness`).
1131
1126
  */
1132
1127
  add(healthCheck: HealthCheck): void;
1133
- /**
1134
- * @internal used by Sapling library, used to determine once all
1135
- * checks have been registered and server is, at the very least, alive.
1136
- */
1137
- _markLive(): void;
1138
- /**
1139
- * @internal
1140
- */
1141
- _liveness(): Promise<boolean>;
1142
- /**
1143
- * @internal
1144
- */
1145
- _readiness(): Promise<boolean>;
1146
1128
  }
1147
1129
  //#endregion
1148
1130
  //#region src/middleware/default/health/index.d.ts
1149
1131
  /**
1150
1132
  * Enable the serving of `ready` and `live` endpoints.
1151
1133
  *
1152
- * Configure any middleware-specific settings with `Sapling.Extras.health`
1134
+ * `live` and `ready` endpoint returns 200 with `{ up: true }`, else 503 with `{ up: false }`
1135
+ *
1136
+ * Customize endpoint paths with `Sapling.Extras.health`.
1137
+ * Register readiness checks via {@link HealthRegistrar}.
1138
+ *
1139
+ * explanation of `liveness` vs. `readiness`
1140
+ * @see https://kubernetes.io/docs/concepts/workloads/pods/probes/#liveness-probe
1141
+ * @see https://kubernetes.io/docs/concepts/workloads/pods/probes/#readiness-probe
1153
1142
  */
1154
1143
  declare class DefaultHealthMiddleware {
1155
1144
  private readonly healthRegistrar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tahminator/sapling",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "author": "Tahmid Ahmed",
5
5
  "description": "A library to help you write cleaner Express.js code",
6
6
  "repository": {