@lokalise/fastify-extras 5.3.0 → 5.3.2
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 +1 -1
- package/dist/plugins/bugsnagPlugin.d.ts +1 -1
- package/dist/plugins/metricsPlugin.d.ts +1 -1
- package/dist/plugins/metricsPlugin.spec.js +3 -3
- package/dist/plugins/metricsPlugin.spec.js.map +1 -1
- package/dist/plugins/newrelicTransactionManagerPlugin.d.ts +1 -1
- package/dist/plugins/opentelemetry/prismaOtelTracingPlugin.d.ts +1 -1
- package/dist/plugins/publicHealthcheckPlugin.d.ts +3 -1
- package/dist/plugins/publicHealthcheckPlugin.js +16 -2
- package/dist/plugins/publicHealthcheckPlugin.js.map +1 -1
- package/dist/plugins/publicHealthcheckPlugin.spec.js +28 -4
- package/dist/plugins/publicHealthcheckPlugin.spec.js.map +1 -1
- package/dist/plugins/requestContextProviderPlugin.d.ts +1 -1
- package/dist/plugins/splitIOFeatureManagerPlugin.d.ts +1 -1
- package/package.json +21 -22
package/dist/index.d.ts
CHANGED
|
@@ -11,4 +11,4 @@ export type { ErrorObjectResolver, MetricsPluginOptions } from './plugins/metric
|
|
|
11
11
|
export { prismaOtelTracingPlugin } from './plugins/opentelemetry/prismaOtelTracingPlugin';
|
|
12
12
|
export type { PrismaOtelTracingPluginConfig } from './plugins/opentelemetry/prismaOtelTracingPlugin';
|
|
13
13
|
export { publicHealthcheckPlugin } from './plugins/publicHealthcheckPlugin';
|
|
14
|
-
export type { PublicHealthcheckPluginOptions } from './plugins/publicHealthcheckPlugin';
|
|
14
|
+
export type { PublicHealthcheckPluginOptions, HealthCheck } from './plugins/publicHealthcheckPlugin';
|
|
@@ -12,4 +12,4 @@ export interface BugsnagPluginConfig {
|
|
|
12
12
|
bugsnag: NodeConfig;
|
|
13
13
|
isEnabled: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare const bugsnagPlugin: import("fastify").FastifyPluginCallback<BugsnagPluginConfig, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault
|
|
15
|
+
export declare const bugsnagPlugin: import("fastify").FastifyPluginCallback<BugsnagPluginConfig, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
|
|
@@ -6,4 +6,4 @@ export interface MetricsPluginOptions {
|
|
|
6
6
|
bindAddress?: string;
|
|
7
7
|
errorObjectResolver: ErrorObjectResolver;
|
|
8
8
|
}
|
|
9
|
-
export declare const metricsPlugin: import("fastify").FastifyPluginCallback<MetricsPluginOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault
|
|
9
|
+
export declare const metricsPlugin: import("fastify").FastifyPluginCallback<MetricsPluginOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
|
|
@@ -23,9 +23,9 @@ describe('metricsPlugin', () => {
|
|
|
23
23
|
await app.close();
|
|
24
24
|
});
|
|
25
25
|
it('returns Prometheus metrics', async () => {
|
|
26
|
-
const response = await (0, node_core_1.sendGet)('http://127.0.0.1:9080', '/metrics');
|
|
27
|
-
expect(response.statusCode).toBe(200);
|
|
28
|
-
expect(response.body).toEqual(expect.any(String));
|
|
26
|
+
const response = await (0, node_core_1.sendGet)((0, node_core_1.buildClient)('http://127.0.0.1:9080'), '/metrics');
|
|
27
|
+
expect(response.result.statusCode).toBe(200);
|
|
28
|
+
expect(response.result.body).toEqual(expect.any(String));
|
|
29
29
|
});
|
|
30
30
|
it('handles an error', async () => {
|
|
31
31
|
expect.assertions(2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metricsPlugin.spec.js","sourceRoot":"","sources":["../../lib/plugins/metricsPlugin.spec.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"metricsPlugin.spec.js","sourceRoot":"","sources":["../../lib/plugins/metricsPlugin.spec.ts"],"names":[],"mappings":";;;AAAA,mDAA0D;AAE1D,8DAA6B;AAE7B,mDAA+C;AAE/C,KAAK,UAAU,O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CAAC,CAAC,CAAA;SACH;QAAC,OAAO,GAAG,EAAE;YACZ,sDAAsD;YACtD,MAAM,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;gBACxB,OAAO,EAAE,qDAAqD;aAC/D,CAAC,CAAA;SACH;QAED,MAAM,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC;YACjC,IAAI,EAAE,YAAY;SACnB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -14,4 +14,4 @@ export declare class NewRelicTransactionManager {
|
|
|
14
14
|
start(jobName: string): void;
|
|
15
15
|
stop(jobId: string): void;
|
|
16
16
|
}
|
|
17
|
-
export declare const newrelicTransactionManagerPlugin: import("fastify").FastifyPluginCallback<NewRelicTransactionManagerOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault
|
|
17
|
+
export declare const newrelicTransactionManagerPlugin: import("fastify").FastifyPluginCallback<NewRelicTransactionManagerOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
|
|
@@ -4,4 +4,4 @@ export interface PrismaOtelTracingPluginConfig {
|
|
|
4
4
|
samplingRatio: number;
|
|
5
5
|
serviceName: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const prismaOtelTracingPlugin: import("fastify").FastifyPluginCallback<PrismaOtelTracingPluginConfig, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault
|
|
7
|
+
export declare const prismaOtelTracingPlugin: import("fastify").FastifyPluginCallback<PrismaOtelTracingPluginConfig, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export interface PublicHealthcheckPluginOptions {
|
|
2
2
|
responsePayload?: Record<string, unknown>;
|
|
3
|
+
healthChecks: readonly HealthCheck[];
|
|
3
4
|
}
|
|
4
|
-
export
|
|
5
|
+
export type HealthCheck = () => Promise<boolean>;
|
|
6
|
+
export declare const publicHealthcheckPlugin: import("fastify").FastifyPluginCallback<PublicHealthcheckPluginOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
|
|
@@ -4,7 +4,7 @@ exports.publicHealthcheckPlugin = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fastify_plugin_1 = tslib_1.__importDefault(require("fastify-plugin"));
|
|
6
6
|
function plugin(app, opts, done) {
|
|
7
|
-
const responsePayload = opts.responsePayload ?? {
|
|
7
|
+
const responsePayload = opts.responsePayload ?? {};
|
|
8
8
|
app.route({
|
|
9
9
|
url: '/',
|
|
10
10
|
method: 'GET',
|
|
@@ -15,7 +15,21 @@ function plugin(app, opts, done) {
|
|
|
15
15
|
hide: true,
|
|
16
16
|
},
|
|
17
17
|
handler: async (_, reply) => {
|
|
18
|
-
|
|
18
|
+
let isHealthy = true;
|
|
19
|
+
if (opts.healthChecks.length) {
|
|
20
|
+
const results = await Promise.all(opts.healthChecks.map((healthcheck) => {
|
|
21
|
+
return healthcheck();
|
|
22
|
+
}));
|
|
23
|
+
if (results.find((entry) => {
|
|
24
|
+
return !entry;
|
|
25
|
+
}) === false) {
|
|
26
|
+
isHealthy = false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return reply.send({
|
|
30
|
+
...responsePayload,
|
|
31
|
+
heartbeat: isHealthy ? 'HEALTHY' : 'FAIL',
|
|
32
|
+
});
|
|
19
33
|
},
|
|
20
34
|
});
|
|
21
35
|
done();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicHealthcheckPlugin.js","sourceRoot":"","sources":["../../lib/plugins/publicHealthcheckPlugin.ts"],"names":[],"mappings":";;;;AACA,4EAA+B;
|
|
1
|
+
{"version":3,"file":"publicHealthcheckPlugin.js","sourceRoot":"","sources":["../../lib/plugins/publicHealthcheckPlugin.ts"],"names":[],"mappings":";;;;AACA,4EAA+B;AAS/B,SAAS,MAAM,CAAC,GAAoB,EAAE,IAAoC,EAAE,IAAgB;IAC1F,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,IAAI,EAAE,CAAA;IAClD,GAAG,CAAC,KAAK,CAAC;QACR,GAAG,EAAE,GAAG;QACR,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,OAAO;QACjB,MAAM,EAAE;YACN,kCAAkC;YAClC,mBAAmB;YACnB,IAAI,EAAE,IAAI;SACX;QACD,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE;YAC1B,IAAI,SAAS,GAAG,IAAI,CAAA;YACpB,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;gBAC5B,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;oBACpC,OAAO,WAAW,EAAE,CAAA;gBACtB,CAAC,CAAC,CACH,CAAA;gBACD,IACE,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;oBACrB,OAAO,CAAC,KAAK,CAAA;gBACf,CAAC,CAAC,KAAK,KAAK,EACZ;oBACA,SAAS,GAAG,KAAK,CAAA;iBAClB;aACF;YAED,OAAO,KAAK,CAAC,IAAI,CAAC;gBAChB,GAAG,eAAe;gBAClB,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM;aAC1C,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;IACF,IAAI,EAAE,CAAA;AACR,CAAC;AAEY,QAAA,uBAAuB,GAAG,IAAA,wBAAE,EAAC,MAAM,EAAE;IAChD,OAAO,EAAE,KAAK;IACd,IAAI,EAAE,2BAA2B;CAClC,CAAC,CAAA"}
|
|
@@ -3,6 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const fastify_1 = tslib_1.__importDefault(require("fastify"));
|
|
5
5
|
const publicHealthcheckPlugin_1 = require("./publicHealthcheckPlugin");
|
|
6
|
+
const positiveHealthcheck = () => {
|
|
7
|
+
return Promise.resolve(true);
|
|
8
|
+
};
|
|
9
|
+
const negativeHealthcheck = () => {
|
|
10
|
+
return Promise.resolve(false);
|
|
11
|
+
};
|
|
6
12
|
async function initApp(opts) {
|
|
7
13
|
const app = (0, fastify_1.default)();
|
|
8
14
|
await app.register(publicHealthcheckPlugin_1.publicHealthcheckPlugin, opts);
|
|
@@ -15,16 +21,34 @@ describe('publicHealthcheckPlugin', () => {
|
|
|
15
21
|
await app.close();
|
|
16
22
|
});
|
|
17
23
|
it('returns a heartbeat', async () => {
|
|
18
|
-
app = await initApp();
|
|
24
|
+
app = await initApp({ healthChecks: [] });
|
|
19
25
|
const response = await app.inject().get('/').end();
|
|
20
26
|
expect(response.statusCode).toBe(200);
|
|
21
|
-
expect(response.json()).toEqual({
|
|
27
|
+
expect(response.json()).toEqual({ heartbeat: 'HEALTHY' });
|
|
22
28
|
});
|
|
23
29
|
it('returns custom heartbeat', async () => {
|
|
24
|
-
app = await initApp({ responsePayload: { version: 1 } });
|
|
30
|
+
app = await initApp({ responsePayload: { version: 1 }, healthChecks: [] });
|
|
25
31
|
const response = await app.inject().get('/').end();
|
|
26
32
|
expect(response.statusCode).toBe(200);
|
|
27
|
-
expect(response.json()).toEqual({ version: 1 });
|
|
33
|
+
expect(response.json()).toEqual({ heartbeat: 'HEALTHY', version: 1 });
|
|
34
|
+
});
|
|
35
|
+
it('returns false if one healthcheck fails', async () => {
|
|
36
|
+
app = await initApp({
|
|
37
|
+
responsePayload: { version: 1 },
|
|
38
|
+
healthChecks: [negativeHealthcheck, positiveHealthcheck],
|
|
39
|
+
});
|
|
40
|
+
const response = await app.inject().get('/').end();
|
|
41
|
+
expect(response.statusCode).toBe(200);
|
|
42
|
+
expect(response.json()).toEqual({ heartbeat: 'FAIL', version: 1 });
|
|
43
|
+
});
|
|
44
|
+
it('returns true if all healthchecks pass', async () => {
|
|
45
|
+
app = await initApp({
|
|
46
|
+
responsePayload: { version: 1 },
|
|
47
|
+
healthChecks: [positiveHealthcheck, positiveHealthcheck],
|
|
48
|
+
});
|
|
49
|
+
const response = await app.inject().get('/').end();
|
|
50
|
+
expect(response.statusCode).toBe(200);
|
|
51
|
+
expect(response.json()).toEqual({ heartbeat: 'HEALTHY', version: 1 });
|
|
28
52
|
});
|
|
29
53
|
});
|
|
30
54
|
//# sourceMappingURL=publicHealthcheckPlugin.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicHealthcheckPlugin.spec.js","sourceRoot":"","sources":["../../lib/plugins/publicHealthcheckPlugin.spec.ts"],"names":[],"mappings":";;;AACA,8DAA6B;AAG7B,uEAAmE;AAEnE,KAAK,UAAU,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"publicHealthcheckPlugin.spec.js","sourceRoot":"","sources":["../../lib/plugins/publicHealthcheckPlugin.spec.ts"],"names":[],"mappings":";;;AACA,8DAA6B;AAG7B,uEAAmE;AAEnE,MAAM,mBAAmB,GAAgB,GAAG,EAAE;IAC5C,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAC9B,CAAC,CAAA;AACD,MAAM,mBAAmB,GAAgB,GAAG,EAAE;IAC5C,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAC/B,CAAC,CAAA;AAED,KAAK,UAAU,OAAO,CAAC,IAAoC;IACzD,MAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAA;IACrB,MAAM,GAAG,CAAC,QAAQ,CAAC,iDAAuB,EAAE,IAAI,CAAC,CAAA;IACjD,MAAM,GAAG,CAAC,KAAK,EAAE,CAAA;IACjB,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,IAAI,GAAoB,CAAA;IACxB,QAAQ,CAAC,KAAK,IAAI,EAAE;QAClB,MAAM,GAAG,CAAC,KAAK,EAAE,CAAA;IACnB,CAAC,CAAC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AC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;QAClD,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACrC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;IACpE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;QACrD,GAAG,GAAG,MAAM,OAAO,CAAC;YAClB,eAAe,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;YAC/B,YAAY,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;SACzD,CAAC,CAAA;QAEF,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;QAClD,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACrC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;IACvE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -14,4 +14,4 @@ declare module 'fastify' {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
export declare function getRequestIdFastifyAppConfig(): Pick<FastifyServerOptions, 'genReqId' | 'requestIdHeader'>;
|
|
17
|
-
export declare const requestContextProviderPlugin: import("fastify").FastifyPluginCallback<import("fastify").FastifyPluginOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault
|
|
17
|
+
export declare const requestContextProviderPlugin: import("fastify").FastifyPluginCallback<import("fastify").FastifyPluginOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
|
|
@@ -21,4 +21,4 @@ export declare class SplitIOFeatureManager {
|
|
|
21
21
|
track(key: SplitIO.SplitKey, trafficType: string, eventType: string, value?: number, properties?: Properties): boolean;
|
|
22
22
|
shutdown(): Promise<void>;
|
|
23
23
|
}
|
|
24
|
-
export declare const splitIOFeatureManagerPlugin: import("fastify").FastifyPluginCallback<SplitIOOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault
|
|
24
|
+
export declare const splitIOFeatureManagerPlugin: import("fastify").FastifyPluginCallback<SplitIOOptions, import("fastify").RawServerDefault, import("fastify").FastifyTypeProviderDefault>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/fastify-extras",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
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.
|
|
46
|
+
"@bugsnag/js": "^7.20.0",
|
|
47
47
|
"@opentelemetry/api": "^1.3.0",
|
|
48
48
|
"@opentelemetry/exporter-trace-otlp-grpc": "^0.34.0",
|
|
49
49
|
"@opentelemetry/instrumentation": "^0.34.0",
|
|
@@ -51,41 +51,40 @@
|
|
|
51
51
|
"@opentelemetry/sdk-trace-base": "^1.8.0",
|
|
52
52
|
"@opentelemetry/sdk-trace-node": "^1.8.0",
|
|
53
53
|
"@opentelemetry/semantic-conventions": "^1.8.0",
|
|
54
|
-
"@prisma/instrumentation": "^4.
|
|
55
|
-
"fastify-metrics": "^10.0
|
|
54
|
+
"@prisma/instrumentation": "^4.9.0",
|
|
55
|
+
"fastify-metrics": "^10.3.0",
|
|
56
56
|
"fastify-plugin": "^4.5.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@fastify/request-context": "^4.2.0",
|
|
60
|
-
"fastify": "^4.
|
|
61
|
-
"newrelic": "^9.
|
|
60
|
+
"fastify": "^4.15.0",
|
|
61
|
+
"newrelic": "^9.15.0",
|
|
62
62
|
"@splitsoftware/splitio": "^10.22.3",
|
|
63
|
-
"pino": "^8.
|
|
63
|
+
"pino": "^8.11.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@fastify/request-context": "^4.2.0",
|
|
67
|
-
"@lokalise/node-core": "^
|
|
68
|
-
"@types/jest": "^29.
|
|
67
|
+
"@lokalise/node-core": "^4.1.1",
|
|
68
|
+
"@types/jest": "^29.5.0",
|
|
69
69
|
"@types/newrelic": "^9.4.0",
|
|
70
|
-
"@types/node": "^18.11
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
72
|
-
"@typescript-eslint/parser": "^5.
|
|
70
|
+
"@types/node": "^18.15.11",
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
|
72
|
+
"@typescript-eslint/parser": "^5.58.0",
|
|
73
73
|
"auto-changelog": "^2.4.0",
|
|
74
|
-
"eslint": "^8.
|
|
75
|
-
"eslint-config-prettier": "^8.
|
|
74
|
+
"eslint": "^8.38.0",
|
|
75
|
+
"eslint-config-prettier": "^8.8.0",
|
|
76
76
|
"eslint-plugin-import": "^2.27.5",
|
|
77
77
|
"eslint-plugin-jest": "^27.2.1",
|
|
78
78
|
"eslint-plugin-prettier": "^4.2.1",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"prettier": "^2.8.3",
|
|
79
|
+
"fastify": "^4.15.0",
|
|
80
|
+
"jest": "^29.5.0",
|
|
81
|
+
"newrelic": "^9.15.0",
|
|
82
|
+
"pino": "^8.11.0",
|
|
83
|
+
"prettier": "^2.8.7",
|
|
85
84
|
"shx": "^0.3.4",
|
|
86
|
-
"ts-jest": "^29.0
|
|
85
|
+
"ts-jest": "^29.1.0",
|
|
87
86
|
"ts-node": "^10.9.1",
|
|
88
|
-
"typescript": "
|
|
87
|
+
"typescript": "^5.0.4"
|
|
89
88
|
},
|
|
90
89
|
"engines": {
|
|
91
90
|
"node": ">=18"
|