@eik/service 5.4.2 → 5.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/CHANGELOG.md +14 -0
- package/lib/main.js +12 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [5.5.0](https://github.com/eik-lib/service/compare/v5.4.3...v5.5.0) (2026-08-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* set traceId on every incoming request ([#802](https://github.com/eik-lib/service/issues/802)) ([23ce91f](https://github.com/eik-lib/service/commit/23ce91fec7cb2532bb99093539f57cbe79b65987))
|
|
7
|
+
|
|
8
|
+
## [5.4.3](https://github.com/eik-lib/service/compare/v5.4.2...v5.4.3) (2026-08-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @eik/sink-memory to v2.3.0 ([#801](https://github.com/eik-lib/service/issues/801)) ([a089662](https://github.com/eik-lib/service/commit/a089662e6891c07cf0dd1e8e93337512676f5cfa))
|
|
14
|
+
|
|
1
15
|
## [5.4.2](https://github.com/eik-lib/service/compare/v5.4.1...v5.4.2) (2026-08-24)
|
|
2
16
|
|
|
3
17
|
|
package/lib/main.js
CHANGED
|
@@ -247,6 +247,18 @@ const EikService = class EikService {
|
|
|
247
247
|
|
|
248
248
|
await app.register(cors);
|
|
249
249
|
|
|
250
|
+
// Attach a trace ID to every incoming request so it can be
|
|
251
|
+
// threaded through the upload stack and included in all log lines.
|
|
252
|
+
// A plugin registered before service.api() may pre-set traceId
|
|
253
|
+
// (e.g. from a CDN-supplied header), in which case that value is
|
|
254
|
+
// used as-is. Configuring genReqId on the Fastify instance is the
|
|
255
|
+
// recommended way to source trace IDs from upstream infrastructure.
|
|
256
|
+
app.addHook("onRequest", async (request) => {
|
|
257
|
+
if (!request.raw.traceId) {
|
|
258
|
+
request.raw.traceId = request.id;
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
|
|
250
262
|
// Authentication
|
|
251
263
|
app.register(jwt, {
|
|
252
264
|
secret: config.get("jwt.secret"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eik/service",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Eik REST API as a standalone HTTP service",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/main.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/eik-lib/service#readme",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@eik/core": "2.
|
|
47
|
-
"@eik/sink": "1.
|
|
48
|
-
"@eik/sink-file-system": "2.
|
|
49
|
-
"@eik/sink-memory": "2.
|
|
46
|
+
"@eik/core": "2.3.0",
|
|
47
|
+
"@eik/sink": "1.3.0",
|
|
48
|
+
"@eik/sink-file-system": "2.3.0",
|
|
49
|
+
"@eik/sink-memory": "2.3.0",
|
|
50
50
|
"@fastify/compress": "9.2.0",
|
|
51
51
|
"@fastify/cors": "11.3.0",
|
|
52
52
|
"@fastify/jwt": "10.2.2",
|