@lokalise/fastify-extras 15.2.0 → 16.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.
|
@@ -16,7 +16,9 @@ exports.getRequestIdFastifyAppConfig = getRequestIdFastifyAppConfig;
|
|
|
16
16
|
function plugin(fastify, opts, done) {
|
|
17
17
|
fastify.addHook('onRequest', function onRequestContextProvider(req, res, next) {
|
|
18
18
|
req.reqContext = {
|
|
19
|
-
logger: req.log
|
|
19
|
+
logger: req.log.child({
|
|
20
|
+
'x-request-id': req.id,
|
|
21
|
+
}),
|
|
20
22
|
reqId: req.id,
|
|
21
23
|
};
|
|
22
24
|
// Store request_id in AsyncLocalStorage to be picked up by instrumentation tooling, such as OpenTelemetry
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestContextProviderPlugin.js","sourceRoot":"","sources":["../../lib/plugins/requestContextProviderPlugin.ts"],"names":[],"mappings":";;;;AAAA,mCAAmC;AAEnC,8DAAyD;AASzD,4EAA+B;AAElB,QAAA,oBAAoB,GAAG,YAAY,CAAA;AAyBhD,SAAgB,4BAA4B;IAI1C,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAA,mBAAU,GAAE;QAC5B,eAAe,EAAE,cAAc;KAChC,CAAA;AACH,CAAC;AARD,oEAQC;AAED,SAAS,MAAM,CAAC,OAAwB,EAAE,IAAa,EAAE,IAAgB;IACvE,OAAO,CAAC,OAAO,CACb,WAAW,EACX,SAAS,wBAAwB,CAC/B,GAAmB,EACnB,GAAiB,EACjB,IAA6B;QAE7B,GAAG,CAAC,UAAU,GAAG;YACf,MAAM,EAAE,GAAG,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"requestContextProviderPlugin.js","sourceRoot":"","sources":["../../lib/plugins/requestContextProviderPlugin.ts"],"names":[],"mappings":";;;;AAAA,mCAAmC;AAEnC,8DAAyD;AASzD,4EAA+B;AAElB,QAAA,oBAAoB,GAAG,YAAY,CAAA;AAyBhD,SAAgB,4BAA4B;IAI1C,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAA,mBAAU,GAAE;QAC5B,eAAe,EAAE,cAAc;KAChC,CAAA;AACH,CAAC;AARD,oEAQC;AAED,SAAS,MAAM,CAAC,OAAwB,EAAE,IAAa,EAAE,IAAgB;IACvE,OAAO,CAAC,OAAO,CACb,WAAW,EACX,SAAS,wBAAwB,CAC/B,GAAmB,EACnB,GAAiB,EACjB,IAA6B;QAE7B,GAAG,CAAC,UAAU,GAAG;YACf,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC;gBACpB,cAAc,EAAE,GAAG,CAAC,EAAE;aACvB,CAAC;YACF,KAAK,EAAE,GAAG,CAAC,EAAE;SACd,CAAA;QAED,0GAA0G;QAC1G,gCAAc,CAAC,GAAG,CAAC,4BAAoB,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;QAEhD,IAAI,EAAE,CAAA;IACR,CAAC,CACF,CAAA;IAED,OAAO,CAAC,OAAO,CACb,QAAQ,EACR,CAAC,GAAmB,EAAE,GAAiB,EAAE,OAAO,EAAE,IAA6B,EAAE,EAAE;QACjF,KAAK,GAAG,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,EAAE,CAAC,CAAA;QACvC,IAAI,EAAE,CAAA;IACR,CAAC,CACF,CAAA;IAED,IAAI,EAAE,CAAA;AACR,CAAC;AAEY,QAAA,4BAA4B,GAAG,IAAA,wBAAE,EAAC,MAAM,EAAE;IACrD,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,iCAAiC;CACxC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/fastify-extras",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "Opinionated set of fastify plugins, commonly used in Lokalise",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Lokalise",
|
|
@@ -43,49 +43,49 @@
|
|
|
43
43
|
"version": "auto-changelog -p && git add CHANGELOG.md"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@bugsnag/js": "^7.
|
|
47
|
-
"@opentelemetry/api": "1.
|
|
48
|
-
"@opentelemetry/exporter-trace-otlp-grpc": "0.
|
|
49
|
-
"@opentelemetry/instrumentation": "0.
|
|
50
|
-
"@opentelemetry/resources": "1.
|
|
51
|
-
"@opentelemetry/sdk-trace-base": "1.
|
|
52
|
-
"@opentelemetry/sdk-trace-node": "1.
|
|
53
|
-
"@opentelemetry/semantic-conventions": "1.
|
|
54
|
-
"@prisma/instrumentation": "^5.
|
|
46
|
+
"@bugsnag/js": "^7.22.2",
|
|
47
|
+
"@opentelemetry/api": "1.7.0",
|
|
48
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "0.45.0",
|
|
49
|
+
"@opentelemetry/instrumentation": "0.45.0",
|
|
50
|
+
"@opentelemetry/resources": "1.18.0",
|
|
51
|
+
"@opentelemetry/sdk-trace-base": "1.18.0",
|
|
52
|
+
"@opentelemetry/sdk-trace-node": "1.18.0",
|
|
53
|
+
"@opentelemetry/semantic-conventions": "1.18.0",
|
|
54
|
+
"@prisma/instrumentation": "^5.6.0",
|
|
55
55
|
"@splitsoftware/splitio": "^10.23.1",
|
|
56
56
|
"@amplitude/analytics-node": "^1.3.4",
|
|
57
|
-
"fastify-metrics": "^10.
|
|
57
|
+
"fastify-metrics": "^10.4.1",
|
|
58
58
|
"fastify-plugin": "^4.5.1",
|
|
59
59
|
"tslib": "^2.6.2"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@fastify/request-context": "^5.0.0",
|
|
63
|
-
"fastify": "^4.
|
|
63
|
+
"fastify": "^4.24.3",
|
|
64
64
|
"newrelic": "^11.0.0",
|
|
65
|
-
"pino": "^8.
|
|
65
|
+
"pino": "^8.16.2"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@fastify/request-context": "^5.0.0",
|
|
69
|
-
"@lokalise/node-core": "^8.
|
|
70
|
-
"@types/newrelic": "^9.14.
|
|
71
|
-
"@types/node": "^
|
|
72
|
-
"@amplitude/analytics-types": "^2.
|
|
73
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
74
|
-
"@typescript-eslint/parser": "^6.
|
|
69
|
+
"@lokalise/node-core": "^8.2.1",
|
|
70
|
+
"@types/newrelic": "^9.14.3",
|
|
71
|
+
"@types/node": "^20.10.1",
|
|
72
|
+
"@amplitude/analytics-types": "^2.3.1",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
74
|
+
"@typescript-eslint/parser": "^6.13.1",
|
|
75
75
|
"@vitest/coverage-v8": "^0.34.6",
|
|
76
76
|
"auto-changelog": "^2.4.0",
|
|
77
|
-
"eslint": "^8.
|
|
77
|
+
"eslint": "^8.54.0",
|
|
78
78
|
"eslint-config-prettier": "^9.0.0",
|
|
79
|
-
"eslint-plugin-import": "^2.
|
|
80
|
-
"eslint-plugin-vitest": "^0.3.
|
|
79
|
+
"eslint-plugin-import": "^2.29.0",
|
|
80
|
+
"eslint-plugin-vitest": "^0.3.10",
|
|
81
81
|
"eslint-plugin-prettier": "^5.0.0",
|
|
82
|
-
"fastify": "^4.
|
|
83
|
-
"newrelic": "11.
|
|
84
|
-
"pino": "^8.
|
|
85
|
-
"prettier": "^3.0
|
|
82
|
+
"fastify": "^4.24.3",
|
|
83
|
+
"newrelic": "11.6.0",
|
|
84
|
+
"pino": "^8.16.2",
|
|
85
|
+
"prettier": "^3.1.0",
|
|
86
86
|
"shx": "^0.3.4",
|
|
87
87
|
"ts-node": "^10.9.1",
|
|
88
|
-
"typescript": "^5.
|
|
88
|
+
"typescript": "^5.3.2",
|
|
89
89
|
"vitest": "^0.34.6",
|
|
90
90
|
"vite": "4.5.0"
|
|
91
91
|
},
|