@sebspark/health-check 0.1.3 → 1.0.0
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 +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +11 -11
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.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "tsup-node src/index.ts --format esm,cjs --dts",
|
|
12
|
+
"build": "tsup-node src/index.ts --format esm,cjs --target node22 --dts",
|
|
13
13
|
"dev": "tsc --watch --noEmit",
|
|
14
14
|
"lint": "biome check .",
|
|
15
15
|
"test": "vitest run --passWithNoTests --coverage",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"typecheck": "vitest --typecheck.only --passWithNoTests"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"express": "
|
|
20
|
+
"express": "5.1.0",
|
|
21
|
+
"express-serve-static-core": "0.1.1"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@google-cloud/pubsub": "
|
|
24
|
-
"@
|
|
25
|
-
"@testcontainers/
|
|
26
|
-
"@testcontainers/
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
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
|
}
|