@lokalise/fastify-extras 12.0.0 → 13.1.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.d.ts CHANGED
@@ -6,6 +6,8 @@ export { newrelicTransactionManagerPlugin, NewRelicTransactionManager, } from '.
6
6
  export type { NewRelicTransactionManagerOptions } from './plugins/newrelicTransactionManagerPlugin';
7
7
  export { splitIOFeatureManagerPlugin, SplitIOFeatureManager, } from './plugins/splitIOFeatureManagerPlugin';
8
8
  export type { SplitIOOptions } from './plugins/splitIOFeatureManagerPlugin';
9
+ export { healthcheckMetricsPlugin } from './plugins/healthcheckMetricsPlugin';
10
+ export type { PrometheusHealthCheck, HealthcheckResult, HealthcheckMetricsPluginOptions, } from './plugins/healthcheckMetricsPlugin';
9
11
  export { metricsPlugin } from './plugins/metricsPlugin';
10
12
  export type { ErrorObjectResolver, MetricsPluginOptions } from './plugins/metricsPlugin';
11
13
  export { prismaOtelTracingPlugin } from './plugins/opentelemetry/prismaOtelTracingPlugin';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Amplitude = exports.amplitudePlugin = exports.publicHealthcheckPlugin = exports.prismaOtelTracingPlugin = exports.metricsPlugin = exports.SplitIOFeatureManager = exports.splitIOFeatureManagerPlugin = exports.NewRelicTransactionManager = exports.newrelicTransactionManagerPlugin = exports.REQUEST_ID_STORE_KEY = exports.getRequestIdFastifyAppConfig = exports.requestContextProviderPlugin = exports.reportErrorToBugsnag = exports.bugsnagPlugin = void 0;
3
+ exports.Amplitude = exports.amplitudePlugin = exports.publicHealthcheckPlugin = exports.prismaOtelTracingPlugin = exports.metricsPlugin = exports.healthcheckMetricsPlugin = exports.SplitIOFeatureManager = exports.splitIOFeatureManagerPlugin = exports.NewRelicTransactionManager = exports.newrelicTransactionManagerPlugin = exports.REQUEST_ID_STORE_KEY = exports.getRequestIdFastifyAppConfig = exports.requestContextProviderPlugin = exports.reportErrorToBugsnag = exports.bugsnagPlugin = void 0;
4
4
  var bugsnagPlugin_1 = require("./plugins/bugsnagPlugin");
5
5
  Object.defineProperty(exports, "bugsnagPlugin", { enumerable: true, get: function () { return bugsnagPlugin_1.bugsnagPlugin; } });
6
6
  Object.defineProperty(exports, "reportErrorToBugsnag", { enumerable: true, get: function () { return bugsnagPlugin_1.reportErrorToBugsnag; } });
@@ -14,6 +14,8 @@ Object.defineProperty(exports, "NewRelicTransactionManager", { enumerable: true,
14
14
  var splitIOFeatureManagerPlugin_1 = require("./plugins/splitIOFeatureManagerPlugin");
15
15
  Object.defineProperty(exports, "splitIOFeatureManagerPlugin", { enumerable: true, get: function () { return splitIOFeatureManagerPlugin_1.splitIOFeatureManagerPlugin; } });
16
16
  Object.defineProperty(exports, "SplitIOFeatureManager", { enumerable: true, get: function () { return splitIOFeatureManagerPlugin_1.SplitIOFeatureManager; } });
17
+ var healthcheckMetricsPlugin_1 = require("./plugins/healthcheckMetricsPlugin");
18
+ Object.defineProperty(exports, "healthcheckMetricsPlugin", { enumerable: true, get: function () { return healthcheckMetricsPlugin_1.healthcheckMetricsPlugin; } });
17
19
  var metricsPlugin_1 = require("./plugins/metricsPlugin");
18
20
  Object.defineProperty(exports, "metricsPlugin", { enumerable: true, get: function () { return metricsPlugin_1.metricsPlugin; } });
19
21
  var prismaOtelTracingPlugin_1 = require("./plugins/opentelemetry/prismaOtelTracingPlugin");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;AAAA,yDAA6E;AAApE,8GAAA,aAAa,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAG5C,uFAI+C;AAH7C,4IAAA,4BAA4B,OAAA;AAC5B,4IAAA,4BAA4B,OAAA;AAC5B,oIAAA,oBAAoB,OAAA;AAItB,+FAGmD;AAFjD,oJAAA,gCAAgC,OAAA;AAChC,8IAAA,0BAA0B,OAAA;AAI5B,qFAG8C;AAF5C,0IAAA,2BAA2B,OAAA;AAC3B,oIAAA,qBAAqB,OAAA;AAIvB,yDAAuD;AAA9C,8GAAA,aAAa,OAAA;AAGtB,2FAAyF;AAAhF,kIAAA,uBAAuB,OAAA;AAGhC,6EAA2E;AAAlE,kIAAA,uBAAuB,OAAA;AAGhC,6DAKkC;AAJhC,kHAAA,eAAe,OAAA;AACf,4GAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;AAAA,yDAA6E;AAApE,8GAAA,aAAa,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAG5C,uFAI+C;AAH7C,4IAAA,4BAA4B,OAAA;AAC5B,4IAAA,4BAA4B,OAAA;AAC5B,oIAAA,oBAAoB,OAAA;AAItB,+FAGmD;AAFjD,oJAAA,gCAAgC,OAAA;AAChC,8IAAA,0BAA0B,OAAA;AAI5B,qFAG8C;AAF5C,0IAAA,2BAA2B,OAAA;AAC3B,oIAAA,qBAAqB,OAAA;AAIvB,+EAA6E;AAApE,oIAAA,wBAAwB,OAAA;AAOjC,yDAAuD;AAA9C,8GAAA,aAAa,OAAA;AAGtB,2FAAyF;AAAhF,kIAAA,uBAAuB,OAAA;AAGhC,6EAA2E;AAAlE,kIAAA,uBAAuB,OAAA;AAGhC,6DAKkC;AAJhC,kHAAA,eAAe,OAAA;AACf,4GAAA,SAAS,OAAA"}
@@ -52,7 +52,7 @@ export interface AmplitudeConfig {
52
52
  * })
53
53
  * ```
54
54
  */
55
- export declare const amplitudePlugin: import("fastify").FastifyPluginCallback<AmplitudeConfig, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
55
+ export declare const amplitudePlugin: import("fastify").FastifyPluginCallback<AmplitudeConfig, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault, import("fastify").FastifyBaseLogger>;
56
56
  export declare class Amplitude {
57
57
  private readonly isEnabled;
58
58
  constructor(isEnabled: boolean);
@@ -1,5 +1,6 @@
1
1
  import type { Event, NotifiableError } from '@bugsnag/js';
2
2
  import type { NodeConfig } from '@bugsnag/node';
3
+ import type { FastifyInstance } from 'fastify';
3
4
  export type Severity = Event['severity'];
4
5
  export interface ErrorReport {
5
6
  error: NotifiableError;
@@ -12,4 +13,6 @@ export interface BugsnagPluginConfig {
12
13
  bugsnag: NodeConfig;
13
14
  isEnabled: boolean;
14
15
  }
15
- export declare const bugsnagPlugin: import("fastify").FastifyPluginCallback<BugsnagPluginConfig, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
16
+ declare function plugin(app: FastifyInstance, opts: BugsnagPluginConfig, done: () => void): void;
17
+ export declare const bugsnagPlugin: typeof plugin;
18
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { Either } from '@lokalise/node-core';
2
+ import type { FastifyInstance } from 'fastify';
3
+ export interface HealthcheckMetricsPluginOptions {
4
+ healthChecks: readonly PrometheusHealthCheck[];
5
+ }
6
+ export type HealthcheckResult = {
7
+ checkTimeInMsecs: number;
8
+ checkPassed: boolean;
9
+ };
10
+ export type PrometheusHealthCheck = {
11
+ name: string;
12
+ checker: (app: FastifyInstance) => Promise<Either<Error, HealthcheckResult>>;
13
+ };
14
+ declare function plugin(app: FastifyInstance, opts: HealthcheckMetricsPluginOptions, done: (err?: Error) => void): void;
15
+ export declare const healthcheckMetricsPlugin: typeof plugin;
16
+ export {};
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.healthcheckMetricsPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const fastify_plugin_1 = tslib_1.__importDefault(require("fastify-plugin"));
6
+ const VALID_PROMETHEUS_NAME_REGEX = /[a-zA-Z_:][a-zA-Z0-9_:]*/;
7
+ function plugin(app, opts, done) {
8
+ const invalidNames = [];
9
+ for (const healthcheck of opts.healthChecks) {
10
+ if (!VALID_PROMETHEUS_NAME_REGEX.test(healthcheck.name)) {
11
+ invalidNames.push(healthcheck.name);
12
+ }
13
+ }
14
+ if (invalidNames.length > 0) {
15
+ return done(new Error(`Invalid healthcheck names: ${JSON.stringify(invalidNames)}`));
16
+ }
17
+ try {
18
+ const promClient = app.metrics.client;
19
+ if (!promClient) {
20
+ throw new Error('Prometheus client is not registered');
21
+ }
22
+ for (const check of opts.healthChecks) {
23
+ new promClient.Gauge({
24
+ name: `${check.name}_availability`,
25
+ help: `Whether ${check.name} was available at the time`,
26
+ async collect() {
27
+ const checkResult = await check.checker(app);
28
+ if (checkResult.result?.checkPassed) {
29
+ this.set(1);
30
+ }
31
+ else {
32
+ this.set(0);
33
+ }
34
+ },
35
+ });
36
+ new promClient.Gauge({
37
+ name: `${check.name}_latency_msecs`,
38
+ help: `How long the healthcheck for ${check.name} took`,
39
+ async collect() {
40
+ const checkResult = await check.checker(app);
41
+ if (checkResult.result?.checkPassed) {
42
+ this.set(checkResult.result.checkTimeInMsecs);
43
+ }
44
+ else {
45
+ this.set(checkResult.result?.checkTimeInMsecs ?? 0);
46
+ }
47
+ },
48
+ });
49
+ }
50
+ }
51
+ catch (err) {
52
+ return done(err);
53
+ }
54
+ done();
55
+ }
56
+ exports.healthcheckMetricsPlugin = (0, fastify_plugin_1.default)(plugin, {
57
+ fastify: '4.x',
58
+ name: 'healthcheck-metrics-plugin',
59
+ });
60
+ //# sourceMappingURL=healthcheckMetricsPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthcheckMetricsPlugin.js","sourceRoot":"","sources":["../../lib/plugins/healthcheckMetricsPlugin.ts"],"names":[],"mappings":";;;;AAEA,4EAA+B;AAE/B,MAAM,2BAA2B,GAAG,0BAA0B,CAAA;AAgB9D,SAAS,MAAM,CACb,GAAoB,EACpB,IAAqC,EACrC,IAA2B;IAE3B,MAAM,YAAY,GAAG,EAAE,CAAA;IAEvB,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,YAAY,EAAE;QAC3C,IAAI,CAAC,2B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CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAA;qBAC9C;yBAAM;wBACL,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,EAAE,gBAAgB,IAAI,CAAC,CAAC,CAAA;qBACpD;gBACH,CAAC;aACF,CAAC,CAAA;SACH;KACF;IAAC,OAAO,GAAY,EAAE;QACrB,OAAO,IAAI,CAAC,GAAY,CAAC,CAAA;KAC1B;IAED,IAAI,EAAE,CAAA;AACR,CAAC;AAEY,QAAA,wBAAwB,GAAG,IAAA,wBAAE,EAAC,MAAM,EAAE;IACjD,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,4BAA4B;CACnC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const node_core_1 = require("@lokalise/node-core");
5
+ const fastify_1 = tslib_1.__importDefault(require("fastify"));
6
+ const healthcheckMetricsPlugin_1 = require("./healthcheckMetricsPlugin");
7
+ const metricsPlugin_1 = require("./metricsPlugin");
8
+ let app;
9
+ async function initApp(healthChecks) {
10
+ const testApp = (0, fastify_1.default)();
11
+ app = testApp;
12
+ await app.register(metricsPlugin_1.metricsPlugin, {
13
+ bindAddress: '0.0.0.0',
14
+ loggerOptions: false,
15
+ errorObjectResolver: (err) => err,
16
+ });
17
+ await app.register(healthcheckMetricsPlugin_1.healthcheckMetricsPlugin, {
18
+ healthChecks,
19
+ });
20
+ await app.ready();
21
+ return app;
22
+ }
23
+ describe('healthcheckMetricsPlugin', () => {
24
+ afterEach(async () => {
25
+ await app.close();
26
+ });
27
+ it('returns positive healthcheck results', async () => {
28
+ app = await initApp([
29
+ {
30
+ name: 'test_healthcheck',
31
+ // eslint-disable-next-line @typescript-eslint/require-await
32
+ checker: async () => {
33
+ return {
34
+ result: {
35
+ checkPassed: true,
36
+ checkTimeInMsecs: 345,
37
+ },
38
+ };
39
+ },
40
+ },
41
+ ]);
42
+ const response = await (0, node_core_1.sendGet)((0, node_core_1.buildClient)('http://127.0.0.1:9080'), '/metrics');
43
+ console.log(response.result.body);
44
+ expect(response.result.statusCode).toBe(200);
45
+ expect(response.result.body).toContain('test_healthcheck_availability 1');
46
+ expect(response.result.body).toContain('test_healthcheck_latency_msecs 345');
47
+ });
48
+ it('returns negative healthcheck results', async () => {
49
+ app = await initApp([
50
+ {
51
+ name: 'test_healthcheck',
52
+ // eslint-disable-next-line @typescript-eslint/require-await
53
+ checker: async () => {
54
+ return {
55
+ result: {
56
+ checkPassed: false,
57
+ checkTimeInMsecs: 1450,
58
+ },
59
+ };
60
+ },
61
+ },
62
+ ]);
63
+ const response = await (0, node_core_1.sendGet)((0, node_core_1.buildClient)('http://127.0.0.1:9080'), '/metrics');
64
+ console.log(response.result.body);
65
+ expect(response.result.statusCode).toBe(200);
66
+ expect(response.result.body).toContain('test_healthcheck_availability 0');
67
+ expect(response.result.body).toContain('test_healthcheck_latency_msecs 1450');
68
+ });
69
+ it('returns mixed healthcheck results', async () => {
70
+ app = await initApp([
71
+ {
72
+ name: 'test_healthcheck_1',
73
+ // eslint-disable-next-line @typescript-eslint/require-await
74
+ checker: async () => {
75
+ return {
76
+ result: {
77
+ checkPassed: true,
78
+ checkTimeInMsecs: 345,
79
+ },
80
+ };
81
+ },
82
+ },
83
+ {
84
+ name: 'test_healthcheck_2',
85
+ // eslint-disable-next-line @typescript-eslint/require-await
86
+ checker: async () => {
87
+ return {
88
+ result: {
89
+ checkPassed: false,
90
+ checkTimeInMsecs: 1450,
91
+ },
92
+ };
93
+ },
94
+ },
95
+ ]);
96
+ const response = await (0, node_core_1.sendGet)((0, node_core_1.buildClient)('http://127.0.0.1:9080'), '/metrics');
97
+ console.log(response.result.body);
98
+ expect(response.result.statusCode).toBe(200);
99
+ expect(response.result.body).toContain('test_healthcheck_1_availability 1');
100
+ expect(response.result.body).toContain('test_healthcheck_1_latency_msecs 345');
101
+ expect(response.result.body).toContain('test_healthcheck_2_availability 0');
102
+ expect(response.result.body).toContain('test_healthcheck_2_latency_msecs 1450');
103
+ });
104
+ it('throws on invalid healthcheck name', async () => {
105
+ await expect(initApp([
106
+ {
107
+ name: 'test healthcheck',
108
+ // eslint-disable-next-line @typescript-eslint/require-await
109
+ checker: async () => {
110
+ return {
111
+ result: {
112
+ checkPassed: false,
113
+ checkTimeInMsecs: 1450,
114
+ },
115
+ };
116
+ },
117
+ },
118
+ ])).rejects.toThrow(/Invalid metric name/);
119
+ });
120
+ });
121
+ //# sourceMappingURL=healthcheckMetricsPlugin.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthcheckMetricsPlugin.spec.js","sourceRoot":"","sources":["../../lib/plugins/healthcheckMetricsPlugin.spec.ts"],"names":[],"mappings":";;;AAAA,mDAA0D;AAE1D,8DAA6B;AAG7B,yEAAqE;AACrE,mDAA+C;AAE/C,IAAI,GAAoB,CAAA;AAExB,KAAK,UAAU,OAAO,CAAC,YAAqC;IAC1D,MAAM,OAAO,GAAG,IAAA,iBAAO,GAAE,CAAA;IACzB,GAAG,GAAG,OAAO,CAAA;IACb,MAAM,GAAG,CAAC,QAAQ,CAAC,6BAAa,EAAE;QAChC,WAAW,EAAE,SAAS;QACtB,aAAa,EAAE,KAAK;QACpB,mBAAmB,EAAE,CAAC,GAAY,EAAE,EAAE,CAAC,GAAG;KAC3C,CAAC,CAAA;IACF,MAAM,GAAG,CAAC,QAAQ,CAAC,mDAAwB,EAAE;QAC3C,YAAY;KACb,CAAC,CAAA;IAEF,MAAM,GAAG,CAAC,KAAK,EAAE,CAAA;IACjB,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,GAAG,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sCAAsC,EAAE,KAA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QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,sCAAsC,CAAC,CAAA;QAE9E,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAA;QAC3E,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,uCAAuC,CAAC,CAAA;IACjF,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,MAAM,CACV,OAAO,CAAC;YACN;gBACE,IAAI,EAAE,kBAAkB;gBACxB,4DAA4D;gBAC5D,OAAO,EAAE,KAAK,IAAI,EAAE;oBAClB,OAAO;wBACL,MAAM,EAAE;4BACN,WAAW,EAAE,KAAK;4BAClB,gBAAgB,EAAE,IAAI;yBACvB;qBACF,CAAA;gBACH,CAAC;aACF;SACF,CAAC,CACH,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,3 +1,4 @@
1
+ import type { FastifyInstance } from 'fastify';
1
2
  import type { PinoLoggerOptions } from 'fastify/types/logger';
2
3
  export type ErrorObjectResolver = (err: unknown, correlationID?: string) => unknown;
3
4
  export interface MetricsPluginOptions {
@@ -6,4 +7,6 @@ export interface MetricsPluginOptions {
6
7
  bindAddress?: string;
7
8
  errorObjectResolver: ErrorObjectResolver;
8
9
  }
9
- export declare const metricsPlugin: import("fastify").FastifyPluginCallback<MetricsPluginOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
10
+ declare function plugin(app: FastifyInstance, opts: MetricsPluginOptions): Promise<void>;
11
+ export declare const metricsPlugin: typeof plugin;
12
+ export {};
@@ -47,6 +47,9 @@ function plugin(app, opts) {
47
47
  const logObject = opts.errorObjectResolver(err);
48
48
  promServer.log.error(logObject);
49
49
  throw new Error('Critical error when trying to launch metrics server');
50
+ })
51
+ .then(() => {
52
+ // this is to consume string which plugin does not expect
50
53
  });
51
54
  }
52
55
  exports.metricsPlugin = (0, fastify_plugin_1.default)(plugin, {
@@ -1 +1 @@
1
- {"version":3,"file":"metricsPlugin.js","sourceRoot":"","sources":["../../lib/plugins/metricsPlugin.ts"],"names":[],"mappings":";;;;AACA,8DAA6B;AAE7B,8EAA4C;AAC5C,4EAA+B;AAE/B,MAAM,YAAY,GAAG,IAAI,CAAA;AAWzB,SAAS,MAAM,CAAC,GAAoB,EAAE,IAA0B;IAC9D,KAAK,GAAG,CAAC,QAAQ,CAAC,yBAAc,EAAE;QAChC,cAAc,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACjC,QAAQ,EAAE,IAAI;QACd,mBAAmB,EAAE,IAAI;QACzB,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAChC,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG,IAAA,iBAAO,EAAC;QACzB,MAAM,EAAE,IAAI,CAAC,aAAa;QAC1B,qBAAqB,EAAE,IAAI,CAAC,+BAA+B,IAAI,IAAI;KACpE,CAAC,CAAA;IAEF,UAAU,CAAC,KAAK,CAAC;QACf,GAAG,EAAE,UAAU;QACf,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,MAAM;QAChB,MAAM,EAAE;YACN,kCAAkC;YAClC,mBAAmB;YACnB,IAAI,EAAE,IAAI;SACX;QACD,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;YAC1B,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAA;YAC3D,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/C,CAAC;KACF,CAAC,CAAA;IAEF,GAAG,CAAC,OAAO,CAAC,SAAS,EA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AAE,gBAAgB;CACvB,CAAC,CAAA"}
@@ -1,3 +1,4 @@
1
+ import type { FastifyInstance } from 'fastify';
1
2
  declare module 'fastify' {
2
3
  interface FastifyInstance {
3
4
  newrelicTransactionManager: NewRelicTransactionManager;
@@ -14,4 +15,6 @@ export declare class NewRelicTransactionManager {
14
15
  start(jobName: string): void;
15
16
  stop(jobId: string): void;
16
17
  }
17
- export declare const newrelicTransactionManagerPlugin: import("fastify").FastifyPluginCallback<NewRelicTransactionManagerOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
18
+ declare function plugin(fastify: FastifyInstance, opts: NewRelicTransactionManagerOptions, done: () => void): void;
19
+ export declare const newrelicTransactionManagerPlugin: typeof plugin;
20
+ export {};
@@ -1,7 +1,10 @@
1
+ import type { FastifyInstance } from 'fastify';
1
2
  export interface PrismaOtelTracingPluginConfig {
2
3
  isEnabled: boolean;
3
4
  useBatchSpans: boolean;
4
5
  samplingRatio: number;
5
6
  serviceName: string;
6
7
  }
7
- export declare const prismaOtelTracingPlugin: import("fastify").FastifyPluginCallback<PrismaOtelTracingPluginConfig, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
8
+ declare function plugin(app: FastifyInstance, opts: PrismaOtelTracingPluginConfig, done: () => void): void;
9
+ export declare const prismaOtelTracingPlugin: typeof plugin;
10
+ export {};
@@ -5,4 +5,6 @@ export interface PublicHealthcheckPluginOptions {
5
5
  healthChecks: readonly HealthCheck[];
6
6
  }
7
7
  export type HealthCheck = (app: FastifyInstance) => Promise<Either<Error, true>>;
8
- export declare const publicHealthcheckPlugin: import("fastify").FastifyPluginCallback<PublicHealthcheckPluginOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
8
+ declare function plugin(app: FastifyInstance, opts: PublicHealthcheckPluginOptions, done: () => void): void;
9
+ export declare const publicHealthcheckPlugin: typeof plugin;
10
+ export {};
@@ -1,4 +1,4 @@
1
- import type { FastifyServerOptions, FastifyBaseLogger } from 'fastify';
1
+ import type { FastifyInstance, FastifyServerOptions, FastifyBaseLogger } from 'fastify';
2
2
  export declare const REQUEST_ID_STORE_KEY = "request_id";
3
3
  declare module 'fastify' {
4
4
  interface FastifyRequest {
@@ -19,4 +19,6 @@ declare module '@fastify/request-context' {
19
19
  }
20
20
  }
21
21
  export declare function getRequestIdFastifyAppConfig(): Pick<FastifyServerOptions, 'genReqId' | 'requestIdHeader'>;
22
- export declare const requestContextProviderPlugin: import("fastify").FastifyPluginCallback<import("fastify").FastifyPluginOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
22
+ declare function plugin(fastify: FastifyInstance, opts: unknown, done: () => void): void;
23
+ export declare const requestContextProviderPlugin: typeof plugin;
24
+ export {};
@@ -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,CAAC,GAAmB,EAAE,GAAiB,EAAE,IAA6B,EAAE,EAAE;QACxE,GAAG,CAAC,UAAU,GAAG;YACf,MAAM,EAAE,GAAG,CAAC,GAAG;YACf,KAAK,EAAE,GAAG,CAAC,EAAY;SACxB,CAAA;QAED,0GAA0G;QAC1G,gCAAc,CAAC,GAAG,CAAC,4BAAoB,EAAE,GAAG,CAAC,EAAY,CAAC,CAAA;QAE1D,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"}
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,CAAC,GAAmB,EAAE,GAAiB,EAAE,IAA6B,EAAE,EAAE;QACxE,GAAG,CAAC,UAAU,GAAG;YACf,MAAM,EAAE,GAAG,CAAC,GAAG;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"}
@@ -1,5 +1,6 @@
1
1
  import type SplitIO from '@splitsoftware/splitio/types/splitio';
2
2
  import type { Attributes, Properties, SplitKey, Treatment, TreatmentWithConfig } from '@splitsoftware/splitio/types/splitio';
3
+ import type { FastifyInstance } from 'fastify';
3
4
  declare module 'fastify' {
4
5
  interface FastifyInstance {
5
6
  splitIOFeatureManager: SplitIOFeatureManager;
@@ -21,4 +22,6 @@ export declare class SplitIOFeatureManager {
21
22
  track(key: SplitIO.SplitKey, trafficType: string, eventType: string, value?: number, properties?: Properties): boolean;
22
23
  shutdown(): Promise<void>;
23
24
  }
24
- export declare const splitIOFeatureManagerPlugin: import("fastify").FastifyPluginCallback<SplitIOOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
25
+ declare function plugin(fastify: FastifyInstance, opts: SplitIOOptions, done: () => void): void;
26
+ export declare const splitIOFeatureManagerPlugin: typeof plugin;
27
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/fastify-extras",
3
- "version": "12.0.0",
3
+ "version": "13.1.0",
4
4
  "description": "Opinionated set of fastify plugins, commonly used in Lokalise",
5
5
  "author": {
6
6
  "name": "Lokalise",
@@ -43,7 +43,7 @@
43
43
  "version": "auto-changelog -p && git add CHANGELOG.md"
44
44
  },
45
45
  "dependencies": {
46
- "@bugsnag/js": "^7.20.2",
46
+ "@bugsnag/js": "^7.21.0",
47
47
  "@opentelemetry/api": "^1.4.1",
48
48
  "@opentelemetry/exporter-trace-otlp-grpc": "^0.41.0",
49
49
  "@opentelemetry/instrumentation": "^0.41.0",
@@ -51,43 +51,43 @@
51
51
  "@opentelemetry/sdk-trace-base": "^1.14.0",
52
52
  "@opentelemetry/sdk-trace-node": "^1.14.0",
53
53
  "@opentelemetry/semantic-conventions": "^1.14.0",
54
- "@prisma/instrumentation": "^5.0.0",
54
+ "@prisma/instrumentation": "^5.2.0",
55
55
  "@splitsoftware/splitio": "^10.22.6",
56
56
  "@amplitude/analytics-node": "^1.3.1",
57
57
  "fastify-metrics": "^10.3.0",
58
- "fastify-plugin": "^4.5.0",
59
- "tslib": "^2.6.0"
58
+ "fastify-plugin": "^4.5.1",
59
+ "tslib": "^2.6.2"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@fastify/request-context": "^5.0.0",
63
- "fastify": "^4.18.0",
64
- "newrelic": "^10.1.1",
65
- "pino": "^8.14.1"
63
+ "fastify": "^4.22.2",
64
+ "newrelic": "^11.0.0",
65
+ "pino": "^8.15.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@fastify/request-context": "^5.0.0",
69
- "@lokalise/node-core": "^5.10.0",
69
+ "@lokalise/node-core": "^6.2.0",
70
70
  "@types/jest": "^29.5.3",
71
71
  "@types/newrelic": "^9.14.0",
72
72
  "@types/node": "^18.16.19",
73
73
  "@amplitude/analytics-types": "^2.1.1",
74
- "@typescript-eslint/eslint-plugin": "^5.62.0",
75
- "@typescript-eslint/parser": "^5.62.0",
74
+ "@typescript-eslint/eslint-plugin": "^6.6.0",
75
+ "@typescript-eslint/parser": "^6.6.0",
76
76
  "auto-changelog": "^2.4.0",
77
- "eslint": "^8.44.0",
78
- "eslint-config-prettier": "^8.8.0",
79
- "eslint-plugin-import": "^2.27.5",
80
- "eslint-plugin-jest": "^27.2.2",
77
+ "eslint": "^8.48.0",
78
+ "eslint-config-prettier": "^9.0.0",
79
+ "eslint-plugin-import": "^2.28.1",
80
+ "eslint-plugin-jest": "^27.2.3",
81
81
  "eslint-plugin-prettier": "^5.0.0",
82
- "fastify": "^4.19.2",
83
- "jest": "^29.6.1",
84
- "newrelic": "10.4.1",
85
- "pino": "^8.14.1",
86
- "prettier": "^3.0.0",
82
+ "fastify": "^4.22.2",
83
+ "jest": "^29.6.4",
84
+ "newrelic": "11.0.0",
85
+ "pino": "^8.15.0",
86
+ "prettier": "^3.0.3",
87
87
  "shx": "^0.3.4",
88
88
  "ts-jest": "^29.1.1",
89
89
  "ts-node": "^10.9.1",
90
- "typescript": "^5.1.6"
90
+ "typescript": "^5.2.2"
91
91
  },
92
92
  "engines": {
93
93
  "node": ">=18"