@sebspark/health-check 0.1.3 → 0.1.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.
package/dist/index.js CHANGED
@@ -162,21 +162,21 @@ var HealthMonitor = class {
162
162
  const health = await this.health();
163
163
  res.status(200).json(health);
164
164
  } catch (err) {
165
- next(err);
165
+ next?.(err);
166
166
  }
167
167
  });
168
168
  router.get("/health/ping", (_req, res, next) => {
169
169
  try {
170
170
  res.status(200).json(this.ping());
171
171
  } catch (err) {
172
- next(err);
172
+ next?.(err);
173
173
  }
174
174
  });
175
175
  router.get("/health/live", (_req, res, next) => {
176
176
  try {
177
177
  res.status(200).json(this.live());
178
178
  } catch (err) {
179
- next(err);
179
+ next?.(err);
180
180
  }
181
181
  });
182
182
  router.get("/health/ready", async (_req, res, next) => {
@@ -184,7 +184,7 @@ var HealthMonitor = class {
184
184
  const readiness = await this.ready();
185
185
  res.status(200).json(readiness);
186
186
  } catch (err) {
187
- next(err);
187
+ next?.(err);
188
188
  }
189
189
  });
190
190
  const errorHandler = (err, _req, res, _next) => {
package/dist/index.mjs CHANGED
@@ -124,21 +124,21 @@ var HealthMonitor = class {
124
124
  const health = await this.health();
125
125
  res.status(200).json(health);
126
126
  } catch (err) {
127
- next(err);
127
+ next?.(err);
128
128
  }
129
129
  });
130
130
  router.get("/health/ping", (_req, res, next) => {
131
131
  try {
132
132
  res.status(200).json(this.ping());
133
133
  } catch (err) {
134
- next(err);
134
+ next?.(err);
135
135
  }
136
136
  });
137
137
  router.get("/health/live", (_req, res, next) => {
138
138
  try {
139
139
  res.status(200).json(this.live());
140
140
  } catch (err) {
141
- next(err);
141
+ next?.(err);
142
142
  }
143
143
  });
144
144
  router.get("/health/ready", async (_req, res, next) => {
@@ -146,7 +146,7 @@ var HealthMonitor = class {
146
146
  const readiness = await this.ready();
147
147
  res.status(200).json(readiness);
148
148
  } catch (err) {
149
- next(err);
149
+ next?.(err);
150
150
  }
151
151
  });
152
152
  const errorHandler = (err, _req, res, _next) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebspark/health-check",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -17,16 +17,16 @@
17
17
  "typecheck": "vitest --typecheck.only --passWithNoTests"
18
18
  },
19
19
  "dependencies": {
20
- "express": "^5.1.0"
20
+ "express": "5.1.0",
21
+ "express-serve-static-core": "0.1.1"
21
22
  },
22
23
  "devDependencies": {
23
- "@google-cloud/pubsub": "^5.2.0",
24
- "@testcontainers/gcloud": "^11.7.2",
25
- "@testcontainers/mockserver": "^11.7.2",
26
- "@testcontainers/redis": "^11.7.2",
27
- "mockserver-client": "^5.15.0",
28
- "supertest": "^7.1.4",
29
- "testcontainers": "^11.7.2",
30
- "tsconfig": "*"
24
+ "@google-cloud/pubsub": "5.2.0",
25
+ "@sebspark/tsconfig": "*",
26
+ "@testcontainers/gcloud": "11.7.2",
27
+ "@testcontainers/mockserver": "11.7.2",
28
+ "@testcontainers/redis": "11.7.2",
29
+ "mockserver-client": "5.15.0",
30
+ "supertest": "7.1.4"
31
31
  }
32
32
  }