@ultimat3/http 22.3.6 → 22.5.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/package.json +5 -5
- package/src/server.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/http",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.5.0",
|
|
4
4
|
"description": "Owned request lifecycle over Bun.serve: router, ordered pipeline, problem+json errors",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"test": "bun test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ultimat3/core": "22.
|
|
35
|
-
"@ultimat3/i18n": "22.
|
|
36
|
-
"@ultimat3/schema": "22.
|
|
37
|
-
"@ultimat3/time": "22.
|
|
34
|
+
"@ultimat3/core": "22.5.0",
|
|
35
|
+
"@ultimat3/i18n": "22.5.0",
|
|
36
|
+
"@ultimat3/schema": "22.5.0",
|
|
37
|
+
"@ultimat3/time": "22.5.0"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/src/server.ts
CHANGED
|
@@ -290,7 +290,11 @@ export const createServer = (options: ServerOptions): ServerHandle => {
|
|
|
290
290
|
// Health endpoints answer outside the pipeline on purpose: a draining or
|
|
291
291
|
// rate-limited process must still be able to say what it is doing.
|
|
292
292
|
'/healthz': () => healthResponse(healthzPayload()),
|
|
293
|
-
|
|
293
|
+
// `?deep=1` always answers on the dependencies, whatever `health.readiness` says.
|
|
294
|
+
'/readyz': (request: Request) =>
|
|
295
|
+
healthResponse(
|
|
296
|
+
readyzPayload({ deep: new URL(request.url).searchParams.get('deep') === '1' }),
|
|
297
|
+
),
|
|
294
298
|
},
|
|
295
299
|
};
|
|
296
300
|
// Two calls, not one options object with a spread: `Bun.serve` types `fetch` as returning a
|