diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index ff9227e..acb205c 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/packages/nestlogged-fastify/.npmignore b/packages/nestlogged-fastify/.npmignore new file mode 100644 index 0000000..01e3adc --- /dev/null +++ b/packages/nestlogged-fastify/.npmignore @@ -0,0 +1,3 @@ +src/ +tsconfig.build.json +tsconfig.json \ No newline at end of file diff --git a/packages/nestlogged-fastify/README.md b/packages/nestlogged-fastify/README.md index 0021e46..b870264 100644 --- a/packages/nestlogged-fastify/README.md +++ b/packages/nestlogged-fastify/README.md @@ -3,16 +3,18 @@ This package provides some decorations to make NestJS logging simpler. It only uses Logger provided by @nestjs/common package and some dependencies required for nestjs. +This package wraps [`nestlogged`](https://www.npmjs.com/package/nestlogged), but with additional decorator to fix bugs with Fastify. + ## Installation ```sh -npm install nestlogged +npm install nestlogged-fastify ``` or ```sh -yarn add nestlogged +yarn add nestlogged-fastify ``` ## More Info diff --git a/packages/nestlogged-fastify/package.json b/packages/nestlogged-fastify/package.json index 410bf24..3ccfed7 100644 --- a/packages/nestlogged-fastify/package.json +++ b/packages/nestlogged-fastify/package.json @@ -1,15 +1,16 @@ { - "name": "nestlogged", + "name": "nestlogged-fastify", "version": "3.2.3", - "description": "A NestJS Logger Decorator Library", + "description": "A NestJS Logger Decorator Library With Fastify Support", "main": "./dist/lib/index.js", "repository": "https://git.psw.kr/p-sw/nestlogged", "author": "Shinwoo PARK", "license": "MIT", - "private": true, "dependencies": { "@nestjs/common": "^11.0.12", + "fastify": "^5.2.2", "hyperid": "^3.1.1", + "nestlogged": "^3.2.3", "reflect-metadata": "^0.1.13", "rxjs": "^7.8.1" }, diff --git a/packages/nestlogged-fastify/src/index.ts b/packages/nestlogged-fastify/src/index.ts index e69de29..63979d3 100644 --- a/packages/nestlogged-fastify/src/index.ts +++ b/packages/nestlogged-fastify/src/index.ts @@ -0,0 +1,17 @@ +export { + LoggedRoute, + LoggedFunction, + LoggedController, + LoggedInjectable, + LoggedGuard, + LoggedInterceptor, + ScopedLogger, + InjectLogger, + LoggedParam, + LoggedHeaders, + LoggedBody, + LoggedQuery, + Logged, + Returns, + getRequestLogger +} from 'nestlogged'; \ No newline at end of file diff --git a/packages/nestlogged-fastify/src/override-patched.ts b/packages/nestlogged-fastify/src/override-patched.ts new file mode 100644 index 0000000..cb42f27 --- /dev/null +++ b/packages/nestlogged-fastify/src/override-patched.ts @@ -0,0 +1,230 @@ +import { Logger, ExecutionContext } from '@nestjs/common'; +import { LoggedParamReflectData, ReturnsReflectData } from 'nestlogged/lib/reflected'; +import { LoggedMetadata } from 'nestlogged/lib/logged/metadata'; +import { + BuildType, + REQUEST_LOG_ID, + createCallLogIdentifyMessage, +} from 'nestlogged/lib/logged/utils'; +import { objectContainedLogSync, getItemByPathSync } from 'nestlogged/lib/internals/utils'; +import { ScopedLogger } from 'nestlogged/lib/logger'; +import { kRequestPayloadStream } from 'fastify/lib/symbols'; + +interface FunctionMetadata { + scopedLoggerInjectableParam?: number; + loggedParams?: LoggedParamReflectData[]; +} + +export function overrideBuild, R>( + type: 'route', + originalFunction: (...args: F) => R, + baseLogger: Logger, + metadatas: FunctionMetadata, + key: string, + returnsData: ReturnsReflectData[] | string | true, + logged: LoggedMetadata, + route: string, +): (...args: F) => R; +export function overrideBuild, R>( + type: 'function' | 'guard' | 'interceptor' | 'middleware', + originalFunction: (...args: F) => R, + baseLogger: Logger, + metadatas: FunctionMetadata, + key: string, + returnsData: ReturnsReflectData[] | string | true, + logged: LoggedMetadata, +): (...args: F) => R; +export function overrideBuild, R>( + type: BuildType, + originalFunction: (...args: F) => R, + baseLogger: Logger, + metadatas: FunctionMetadata, + key: string, + returnsData: ReturnsReflectData[] | string | true, + logged: LoggedMetadata, + route?: string, +): (...args: F) => R { + return function (...args: F): R { + // Creating ScopedLogger + let injectedLogger: Logger = baseLogger; + if (typeof metadatas.scopedLoggerInjectableParam !== 'undefined') { + if (type === 'function') { + if ( + args.length <= metadatas.scopedLoggerInjectableParam || + !(args[metadatas.scopedLoggerInjectableParam] instanceof ScopedLogger) + ) { + args[metadatas.scopedLoggerInjectableParam] = ScopedLogger.fromRoot( + baseLogger, + key, + ); + } else { + args[metadatas.scopedLoggerInjectableParam] = ScopedLogger.fromSuper( + baseLogger, + args[metadatas.scopedLoggerInjectableParam], + key, + ); + } + } else { + // special, can access to request object + if (type === 'guard' || type === 'interceptor') { + // args[0] == ExecutionContext + const ctx = args[0] as ExecutionContext; + if (ctx.getType() !== 'http') { + injectedLogger.error( + 'Cannot inject logger: Request type is not http', + ); + } else { + let req = ctx.switchToHttp().getRequest()[kRequestPayloadStream]; + if (req[REQUEST_LOG_ID] === undefined) { + req[REQUEST_LOG_ID] = ScopedLogger.createScopeId(); + } + args[metadatas.scopedLoggerInjectableParam] = ScopedLogger.fromRoot( + baseLogger, + key, + req[REQUEST_LOG_ID], + ); + } + } else if (type === 'middleware') { + let req = args[0]; + if (req[REQUEST_LOG_ID] === undefined) { + req[REQUEST_LOG_ID] = ScopedLogger.createScopeId(); + } + args[metadatas.scopedLoggerInjectableParam] = ScopedLogger.fromRoot( + baseLogger, + key, + req[REQUEST_LOG_ID], + ); + } else if (type === 'route') { + // args[metadatas.scopedLoggerInjectableParam] is now Request object, thanks to code in @LoggedRoute!!!! + let req = args[metadatas.scopedLoggerInjectableParam][kRequestPayloadStream]; + if (req[REQUEST_LOG_ID] === undefined) { + req[REQUEST_LOG_ID] = ScopedLogger.createScopeId(); + } + args[metadatas.scopedLoggerInjectableParam] = ScopedLogger.fromRoot( + baseLogger, + key, + req[REQUEST_LOG_ID], + ); + } + } + + injectedLogger = args[metadatas.scopedLoggerInjectableParam]; + } + + // If this is ExecutionContext based function (e.g. Guard, Interceptor) get Request from Context + if (type === 'guard' || type === 'interceptor') { + const context = args[0] as ExecutionContext; + if (context.getType() === 'http') { + const req = context.switchToHttp().getRequest(); + route = /* supporting FastifyRequest */ req.raw ? req.raw.url : req.url; + } + } + + // Start Log + if (logged.options.callLogLevel !== 'skip') { + const callLogIdentifyMessage = + type === 'middleware' || + type === 'guard' || + type === 'interceptor' || + type === 'route' + ? createCallLogIdentifyMessage('HIT', type, key, route) + : createCallLogIdentifyMessage('HIT', type, key); + injectedLogger[logged.options.callLogLevel]( + `${callLogIdentifyMessage} ${ + metadatas.loggedParams && metadatas.loggedParams.length > 0 + ? 'WITH ' + + metadatas.loggedParams + .map( + ({ name, index, include, exclude }) => + name + + '=' + + objectContainedLogSync(args[index], { + include, + exclude, + }), + ) + .join(', ') + : '' + }`, + ); + } + + try { + const r: R = originalFunction.call(this, ...args); // Try to call original function + + // Return Log + if (logged.options.returnLogLevel !== 'skip') { + if ( + originalFunction.constructor.name === 'AsyncFunction' || + (r && typeof r === 'object' && typeof r['then'] === 'function') + ) { + return r['then']((r: any) => { + const resultLogged = Array.isArray(returnsData) + ? typeof r === 'object' && r !== null + ? 'WITH ' + + returnsData + .map(({ name, path }) => { + const value = getItemByPathSync(r, path); + + return value !== undefined ? `${name}=${value}` : ''; + }) + .filter((v) => v.length > 0) + .join(', ') + : '' + : typeof returnsData === 'string' + ? 'WITH ' + returnsData + '=' + typeof r === 'object' + ? JSON.stringify(r) + : r + : returnsData + ? typeof r === 'object' + ? 'WITH ' + JSON.stringify(r) + : 'WITH ' + r + : ''; + + injectedLogger[logged.options.returnLogLevel]( + `${createCallLogIdentifyMessage('RETURNED', type, key, route)} ${resultLogged}`, + ); + return r; + }); + } else { + const resultLogged = Array.isArray(returnsData) + ? typeof r === 'object' && r !== null + ? 'WITH ' + + returnsData + .map(({ name, path }) => { + const value = getItemByPathSync(r, path); + + return value !== undefined ? `${name}=${value}` : ''; + }) + .filter((v) => v.length > 0) + .join(', ') + : '' + : typeof returnsData === 'string' + ? 'WITH ' + returnsData + '=' + typeof r === 'object' + ? JSON.stringify(r) + : r + : returnsData + ? typeof r === 'object' + ? 'WITH ' + JSON.stringify(r) + : 'WITH ' + r + : ''; + + injectedLogger[logged.options.returnLogLevel]( + `${createCallLogIdentifyMessage('RETURNED', type, key, route)} ${resultLogged}`, + ); + return r; + } + } else { + return r; + } + } catch (e) { + // Error Log + if (logged.options.errorLogLevel !== 'skip') { + injectedLogger[logged.options.errorLogLevel]( + `${createCallLogIdentifyMessage('ERROR', type, key, route)} ${e}`, + ); + } + throw e; + } + }; +} diff --git a/yarn.lock b/yarn.lock index 4c6d04e..d77d821 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,6 +14,59 @@ __metadata: languageName: node linkType: hard +"@fastify/ajv-compiler@npm:^4.0.0": + version: 4.0.2 + resolution: "@fastify/ajv-compiler@npm:4.0.2" + dependencies: + ajv: "npm:^8.12.0" + ajv-formats: "npm:^3.0.1" + fast-uri: "npm:^3.0.0" + checksum: 10c0/ca048db219cc958fb1b962f5dfc141f29e067ecb28a8dbe782bbef80ae3c920021468009cad613f0ed68db410890bb09c773ba2f33cb13e055b48c9c338bd8fa + languageName: node + linkType: hard + +"@fastify/error@npm:^4.0.0": + version: 4.1.0 + resolution: "@fastify/error@npm:4.1.0" + checksum: 10c0/11215eb80ec0bd0a6333d8e939461123269cdbb2eb9ec853faee50f2b8284cbd7a826e654665ff37c120bdfc4a6e0f2f17f33f84f2255291a234b012dd129d53 + languageName: node + linkType: hard + +"@fastify/fast-json-stringify-compiler@npm:^5.0.0": + version: 5.0.2 + resolution: "@fastify/fast-json-stringify-compiler@npm:5.0.2" + dependencies: + fast-json-stringify: "npm:^6.0.0" + checksum: 10c0/835f91cdb4911bbf50884ce60fa6937564e50f81cb134e81e251344ad7ec022ac500a54843e5167819a214828a369c996e68fbd5347965d336908b44904812e3 + languageName: node + linkType: hard + +"@fastify/forwarded@npm:^3.0.0": + version: 3.0.0 + resolution: "@fastify/forwarded@npm:3.0.0" + checksum: 10c0/bd139ee46c193ed9e04af2539f31fcb9e542b91917820f6cf401d5715c4c8bcccaae4a148e0ca14eeddee077ad8a3ab73e6f0f1ad769aff861fcef5f0a28e0d2 + languageName: node + linkType: hard + +"@fastify/merge-json-schemas@npm:^0.2.0": + version: 0.2.1 + resolution: "@fastify/merge-json-schemas@npm:0.2.1" + dependencies: + dequal: "npm:^2.0.3" + checksum: 10c0/dfa884a8f62d53f71de273fdcd0e501b213367767a7d8c522ae87ba6fb571b3eea85175d6e019036d7c0c5419be60305abe54899b9459f76ed5333358699efcb + languageName: node + linkType: hard + +"@fastify/proxy-addr@npm:^5.0.0": + version: 5.0.0 + resolution: "@fastify/proxy-addr@npm:5.0.0" + dependencies: + "@fastify/forwarded": "npm:^3.0.0" + ipaddr.js: "npm:^2.1.0" + checksum: 10c0/5a7d667480c3699015aa9bc12a47b6044106f412725d91a1b90f4a7845390c710486f05d322a895c633fb32a5ba1a17e598cb72e727337862034034443d59bcd + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -124,6 +177,13 @@ __metadata: languageName: node linkType: hard +"abstract-logging@npm:^2.0.1": + version: 2.0.1 + resolution: "abstract-logging@npm:2.0.1" + checksum: 10c0/304879d9babcf6772260e5ddde632e6428e1f42f7a7a116d4689e97ad813a20e0ec2dd1e0a122f3617557f40091b9ca85735de4b48c17a2041268cb47b3f8ef1 + languageName: node + linkType: hard + "acorn-walk@npm:^8.1.1": version: 8.3.0 resolution: "acorn-walk@npm:8.3.0" @@ -140,6 +200,32 @@ __metadata: languageName: node linkType: hard +"ajv-formats@npm:^3.0.1": + version: 3.0.1 + resolution: "ajv-formats@npm:3.0.1" + dependencies: + ajv: "npm:^8.0.0" + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + checksum: 10c0/168d6bca1ea9f163b41c8147bae537e67bd963357a5488a1eaf3abe8baa8eec806d4e45f15b10767e6020679315c7e1e5e6803088dfb84efa2b4e9353b83dd0a + languageName: node + linkType: hard + +"ajv@npm:^8.0.0, ajv@npm:^8.12.0": + version: 8.17.1 + resolution: "ajv@npm:8.17.1" + dependencies: + fast-deep-equal: "npm:^3.1.3" + fast-uri: "npm:^3.0.1" + json-schema-traverse: "npm:^1.0.0" + require-from-string: "npm:^2.0.2" + checksum: 10c0/ec3ba10a573c6b60f94639ffc53526275917a2df6810e4ab5a6b959d87459f9ef3f00d5e7865b82677cb7d21590355b34da14d1d0b9c32d75f95a187e76fff35 + languageName: node + linkType: hard + "ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" @@ -177,6 +263,23 @@ __metadata: languageName: node linkType: hard +"atomic-sleep@npm:^1.0.0": + version: 1.0.0 + resolution: "atomic-sleep@npm:1.0.0" + checksum: 10c0/e329a6665512736a9bbb073e1761b4ec102f7926cce35037753146a9db9c8104f5044c1662e4a863576ce544fb8be27cd2be6bc8c1a40147d03f31eb1cfb6e8a + languageName: node + linkType: hard + +"avvio@npm:^9.0.0": + version: 9.1.0 + resolution: "avvio@npm:9.1.0" + dependencies: + "@fastify/error": "npm:^4.0.0" + fastq: "npm:^1.17.1" + checksum: 10c0/bdc294a7e8f38e1e21f9d338d97d7240025db54f1005fc419cfe0499a35edf2276ab1fe91135739faa3a9437358ec6912d5a56f23361b061880333cb4f1c7884 + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -226,6 +329,13 @@ __metadata: languageName: node linkType: hard +"cookie@npm:^1.0.1": + version: 1.0.2 + resolution: "cookie@npm:1.0.2" + checksum: 10c0/fd25fe79e8fbcfcaf6aa61cd081c55d144eeeba755206c058682257cb38c4bd6795c6620de3f064c740695bb65b7949ebb1db7a95e4636efb8357a335ad3f54b + languageName: node + linkType: hard + "create-require@npm:^1.1.0": version: 1.1.1 resolution: "create-require@npm:1.1.1" @@ -244,6 +354,13 @@ __metadata: languageName: node linkType: hard +"dequal@npm:^2.0.3": + version: 2.0.3 + resolution: "dequal@npm:2.0.3" + checksum: 10c0/f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888 + languageName: node + linkType: hard + "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -272,6 +389,100 @@ __metadata: languageName: node linkType: hard +"fast-decode-uri-component@npm:^1.0.1": + version: 1.0.1 + resolution: "fast-decode-uri-component@npm:1.0.1" + checksum: 10c0/039d50c2e99d64f999c3f2126c23fbf75a04a4117e218a149ca0b1d2aeb8c834b7b19d643b9d35d4eabce357189a6a94085f78cf48869e6e26cc59b036284bc3 + languageName: node + linkType: hard + +"fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 + languageName: node + linkType: hard + +"fast-json-stringify@npm:^6.0.0": + version: 6.0.1 + resolution: "fast-json-stringify@npm:6.0.1" + dependencies: + "@fastify/merge-json-schemas": "npm:^0.2.0" + ajv: "npm:^8.12.0" + ajv-formats: "npm:^3.0.1" + fast-uri: "npm:^3.0.0" + json-schema-ref-resolver: "npm:^2.0.0" + rfdc: "npm:^1.2.0" + checksum: 10c0/898aecd164707bced980fef61b0480dd80a47f87674d7643a75a60e5eca346018ba2552de200260030215d89f218d9cd7f342df14eec88ed44d45c81e4aa0eb4 + languageName: node + linkType: hard + +"fast-querystring@npm:^1.0.0": + version: 1.1.2 + resolution: "fast-querystring@npm:1.1.2" + dependencies: + fast-decode-uri-component: "npm:^1.0.1" + checksum: 10c0/e8223273a9b199722f760f5a047a77ad049a14bd444b821502cb8218f5925e3a5fffb56b64389bca73ab2ac6f1aa7aebbe4e203e5f6e53ff5978de97c0fde4e3 + languageName: node + linkType: hard + +"fast-redact@npm:^3.1.1": + version: 3.5.0 + resolution: "fast-redact@npm:3.5.0" + checksum: 10c0/7e2ce4aad6e7535e0775bf12bd3e4f2e53d8051d8b630e0fa9e67f68cb0b0e6070d2f7a94b1d0522ef07e32f7c7cda5755e2b677a6538f1e9070ca053c42343a + languageName: node + linkType: hard + +"fast-uri@npm:^3.0.0, fast-uri@npm:^3.0.1": + version: 3.0.6 + resolution: "fast-uri@npm:3.0.6" + checksum: 10c0/74a513c2af0584448aee71ce56005185f81239eab7a2343110e5bad50c39ad4fb19c5a6f99783ead1cac7ccaf3461a6034fda89fffa2b30b6d99b9f21c2f9d29 + languageName: node + linkType: hard + +"fastify@npm:^5.2.2": + version: 5.2.2 + resolution: "fastify@npm:5.2.2" + dependencies: + "@fastify/ajv-compiler": "npm:^4.0.0" + "@fastify/error": "npm:^4.0.0" + "@fastify/fast-json-stringify-compiler": "npm:^5.0.0" + "@fastify/proxy-addr": "npm:^5.0.0" + abstract-logging: "npm:^2.0.1" + avvio: "npm:^9.0.0" + fast-json-stringify: "npm:^6.0.0" + find-my-way: "npm:^9.0.0" + light-my-request: "npm:^6.0.0" + pino: "npm:^9.0.0" + process-warning: "npm:^4.0.0" + rfdc: "npm:^1.3.1" + secure-json-parse: "npm:^3.0.1" + semver: "npm:^7.6.0" + toad-cache: "npm:^3.7.0" + checksum: 10c0/2925f6b8370f72f86c1461645cdf6895f335c30b3fca37deed70339f568e77f7d69e83656dc11994d70b239319a63615673714db3111363bd5f83a3e56424a88 + languageName: node + linkType: hard + +"fastq@npm:^1.17.1": + version: 1.19.1 + resolution: "fastq@npm:1.19.1" + dependencies: + reusify: "npm:^1.0.4" + checksum: 10c0/ebc6e50ac7048daaeb8e64522a1ea7a26e92b3cee5cd1c7f2316cdca81ba543aa40a136b53891446ea5c3a67ec215fbaca87ad405f102dd97012f62916905630 + languageName: node + linkType: hard + +"find-my-way@npm:^9.0.0": + version: 9.3.0 + resolution: "find-my-way@npm:9.3.0" + dependencies: + fast-deep-equal: "npm:^3.1.3" + fast-querystring: "npm:^1.0.0" + safe-regex2: "npm:^5.0.0" + checksum: 10c0/f221bc0c70b2c2a6f9282fd3e0ac1911fcbb68ac718da043ddcefdec3b9d884a54d6ef1bf92e1b2ff83400e50f3c22141206a8ea3308bf0e9e37fd177843425d + languageName: node + linkType: hard + "foreground-child@npm:^3.1.0": version: 3.1.1 resolution: "foreground-child@npm:3.1.1" @@ -315,6 +526,13 @@ __metadata: languageName: node linkType: hard +"ipaddr.js@npm:^2.1.0": + version: 2.2.0 + resolution: "ipaddr.js@npm:2.2.0" + checksum: 10c0/e4ee875dc1bd92ac9d27e06cfd87cdb63ca786ff9fd7718f1d4f7a8ef27db6e5d516128f52d2c560408cbb75796ac2f83ead669e73507c86282d45f84c5abbb6 + languageName: node + linkType: hard + "is-fullwidth-code-point@npm:^3.0.0": version: 3.0.0 resolution: "is-fullwidth-code-point@npm:3.0.0" @@ -349,6 +567,33 @@ __metadata: languageName: node linkType: hard +"json-schema-ref-resolver@npm:^2.0.0": + version: 2.0.1 + resolution: "json-schema-ref-resolver@npm:2.0.1" + dependencies: + dequal: "npm:^2.0.3" + checksum: 10c0/3ea894d79dd176b4ef31f1a3b7b335447b854780f2bc49af2918de0502d3eabad1889232a7a72c37f1c7ca429acc2eaad940ca5fd25f8ead044d5fecb00e0378 + languageName: node + linkType: hard + +"json-schema-traverse@npm:^1.0.0": + version: 1.0.0 + resolution: "json-schema-traverse@npm:1.0.0" + checksum: 10c0/71e30015d7f3d6dc1c316d6298047c8ef98a06d31ad064919976583eb61e1018a60a0067338f0f79cabc00d84af3fcc489bd48ce8a46ea165d9541ba17fb30c6 + languageName: node + linkType: hard + +"light-my-request@npm:^6.0.0": + version: 6.6.0 + resolution: "light-my-request@npm:6.6.0" + dependencies: + cookie: "npm:^1.0.1" + process-warning: "npm:^4.0.0" + set-cookie-parser: "npm:^2.6.0" + checksum: 10c0/1440853cd3822ab83fbb1be4456099082dec8e9e3a4ea35c9d8d7d17a7ab98c83ad0a4c39a73a8c2b31b9ca70c57506e5b7a929495c149463ca0daca0d90dc6f + languageName: node + linkType: hard + "lru-cache@npm:^6.0.0": version: 6.0.0 resolution: "lru-cache@npm:6.0.0" @@ -396,6 +641,7 @@ __metadata: dependencies: "@nestjs/common": "npm:^11.0.12" "@types/node": "npm:^20.9.1" + fastify: "npm:^5.2.2" hyperid: "npm:^3.1.1" nestlogged: "npm:^3.2.3" reflect-metadata: "npm:^0.1.13" @@ -428,6 +674,13 @@ __metadata: languageName: unknown linkType: soft +"on-exit-leak-free@npm:^2.1.0": + version: 2.1.2 + resolution: "on-exit-leak-free@npm:2.1.2" + checksum: 10c0/faea2e1c9d696ecee919026c32be8d6a633a7ac1240b3b87e944a380e8a11dc9c95c4a1f8fb0568de7ab8db3823e790f12bda45296b1d111e341aad3922a0570 + languageName: node + linkType: hard + "path-key@npm:^3.1.0": version: 3.1.1 resolution: "path-key@npm:3.1.1" @@ -445,6 +698,43 @@ __metadata: languageName: node linkType: hard +"pino-abstract-transport@npm:^2.0.0": + version: 2.0.0 + resolution: "pino-abstract-transport@npm:2.0.0" + dependencies: + split2: "npm:^4.0.0" + checksum: 10c0/02c05b8f2ffce0d7c774c8e588f61e8b77de8ccb5f8125afd4a7325c9ea0e6af7fb78168999657712ae843e4462bb70ac550dfd6284f930ee57f17f486f25a9f + languageName: node + linkType: hard + +"pino-std-serializers@npm:^7.0.0": + version: 7.0.0 + resolution: "pino-std-serializers@npm:7.0.0" + checksum: 10c0/73e694d542e8de94445a03a98396cf383306de41fd75ecc07085d57ed7a57896198508a0dec6eefad8d701044af21eb27253ccc352586a03cf0d4a0bd25b4133 + languageName: node + linkType: hard + +"pino@npm:^9.0.0": + version: 9.6.0 + resolution: "pino@npm:9.6.0" + dependencies: + atomic-sleep: "npm:^1.0.0" + fast-redact: "npm:^3.1.1" + on-exit-leak-free: "npm:^2.1.0" + pino-abstract-transport: "npm:^2.0.0" + pino-std-serializers: "npm:^7.0.0" + process-warning: "npm:^4.0.0" + quick-format-unescaped: "npm:^4.0.3" + real-require: "npm:^0.2.0" + safe-stable-stringify: "npm:^2.3.1" + sonic-boom: "npm:^4.0.1" + thread-stream: "npm:^3.0.0" + bin: + pino: bin.js + checksum: 10c0/bcd1e9d9b301bea13b95689ca9ad7105ae9451928fb6c0b67b3e58c5fe37cea1d40665f3d6641e3da00be0bbc17b89031e67abbc8ea6aac6164f399309fd78e7 + languageName: node + linkType: hard + "prettier@npm:^3.5.3": version: 3.5.3 resolution: "prettier@npm:3.5.3" @@ -454,6 +744,27 @@ __metadata: languageName: node linkType: hard +"process-warning@npm:^4.0.0": + version: 4.0.1 + resolution: "process-warning@npm:4.0.1" + checksum: 10c0/577a268b9fd5c3d9f6dbb4348220099391d830905642845d591e7ee8b1e45043d98b7b9826a3c1379bdd1686cdfe0f6cf349cb812affc5853b662e6a9896579e + languageName: node + linkType: hard + +"quick-format-unescaped@npm:^4.0.3": + version: 4.0.4 + resolution: "quick-format-unescaped@npm:4.0.4" + checksum: 10c0/fe5acc6f775b172ca5b4373df26f7e4fd347975578199e7d74b2ae4077f0af05baa27d231de1e80e8f72d88275ccc6028568a7a8c9ee5e7368ace0e18eff93a4 + languageName: node + linkType: hard + +"real-require@npm:^0.2.0": + version: 0.2.0 + resolution: "real-require@npm:0.2.0" + checksum: 10c0/23eea5623642f0477412ef8b91acd3969015a1501ed34992ada0e3af521d3c865bb2fe4cdbfec5fe4b505f6d1ef6a03e5c3652520837a8c3b53decff7e74b6a0 + languageName: node + linkType: hard + "reflect-metadata@npm:^0.1.13": version: 0.1.14 resolution: "reflect-metadata@npm:0.1.14" @@ -461,6 +772,34 @@ __metadata: languageName: node linkType: hard +"require-from-string@npm:^2.0.2": + version: 2.0.2 + resolution: "require-from-string@npm:2.0.2" + checksum: 10c0/aaa267e0c5b022fc5fd4eef49d8285086b15f2a1c54b28240fdf03599cbd9c26049fee3eab894f2e1f6ca65e513b030a7c264201e3f005601e80c49fb2937ce2 + languageName: node + linkType: hard + +"ret@npm:~0.5.0": + version: 0.5.0 + resolution: "ret@npm:0.5.0" + checksum: 10c0/220868b194f87bf1998e32e409086eec6b39e860c052bf267f8ad4d0131706a9773d45fd3f91acfb1a7c928fce002b694ab86fdba90bc8d4b8df68fa8645c5cc + languageName: node + linkType: hard + +"reusify@npm:^1.0.4": + version: 1.1.0 + resolution: "reusify@npm:1.1.0" + checksum: 10c0/4eff0d4a5f9383566c7d7ec437b671cc51b25963bd61bf127c3f3d3f68e44a026d99b8d2f1ad344afff8d278a8fe70a8ea092650a716d22287e8bef7126bb2fa + languageName: node + linkType: hard + +"rfdc@npm:^1.2.0, rfdc@npm:^1.3.1": + version: 1.4.1 + resolution: "rfdc@npm:1.4.1" + checksum: 10c0/4614e4292356cafade0b6031527eea9bc90f2372a22c012313be1dcc69a3b90c7338158b414539be863fa95bfcb2ddcd0587be696841af4e6679d85e62c060c7 + languageName: node + linkType: hard + "rimraf@npm:^5.0.5": version: 5.0.5 resolution: "rimraf@npm:5.0.5" @@ -481,6 +820,29 @@ __metadata: languageName: node linkType: hard +"safe-regex2@npm:^5.0.0": + version: 5.0.0 + resolution: "safe-regex2@npm:5.0.0" + dependencies: + ret: "npm:~0.5.0" + checksum: 10c0/83d5b1b60a5a97cb71a6e615518ec4a47761b3600aba389089be59a417498185250db2368080afc2f5e91237d68809c6c634b97a2e1cc8bd56a4c7eef2eeb6cf + languageName: node + linkType: hard + +"safe-stable-stringify@npm:^2.3.1": + version: 2.5.0 + resolution: "safe-stable-stringify@npm:2.5.0" + checksum: 10c0/baea14971858cadd65df23894a40588ed791769db21bafb7fd7608397dbdce9c5aac60748abae9995e0fc37e15f2061980501e012cd48859740796bea2987f49 + languageName: node + linkType: hard + +"secure-json-parse@npm:^3.0.1": + version: 3.0.2 + resolution: "secure-json-parse@npm:3.0.2" + checksum: 10c0/4c9c005e7fdd8528df35fcdec41dc4e8e15820ce52de19f8102da808f9400a9ed8c0a28971e3efe24b001ee1e60296af553f12bbaab81a152f702dd00af2092d + languageName: node + linkType: hard + "semver@npm:^7.3.5": version: 7.5.4 resolution: "semver@npm:7.5.4" @@ -492,6 +854,22 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.6.0": + version: 7.7.1 + resolution: "semver@npm:7.7.1" + bin: + semver: bin/semver.js + checksum: 10c0/fd603a6fb9c399c6054015433051bdbe7b99a940a8fb44b85c2b524c4004b023d7928d47cb22154f8d054ea7ee8597f586605e05b52047f048278e4ac56ae958 + languageName: node + linkType: hard + +"set-cookie-parser@npm:^2.6.0": + version: 2.7.1 + resolution: "set-cookie-parser@npm:2.7.1" + checksum: 10c0/060c198c4c92547ac15988256f445eae523f57f2ceefeccf52d30d75dedf6bff22b9c26f756bd44e8e560d44ff4ab2130b178bd2e52ef5571bf7be3bd7632d9a + languageName: node + linkType: hard + "shebang-command@npm:^2.0.0": version: 2.0.0 resolution: "shebang-command@npm:2.0.0" @@ -515,6 +893,22 @@ __metadata: languageName: node linkType: hard +"sonic-boom@npm:^4.0.1": + version: 4.2.0 + resolution: "sonic-boom@npm:4.2.0" + dependencies: + atomic-sleep: "npm:^1.0.0" + checksum: 10c0/ae897e6c2cd6d3cb7cdcf608bc182393b19c61c9413a85ce33ffd25891485589f39bece0db1de24381d0a38fc03d08c9862ded0c60f184f1b852f51f97af9684 + languageName: node + linkType: hard + +"split2@npm:^4.0.0": + version: 4.2.0 + resolution: "split2@npm:4.2.0" + checksum: 10c0/b292beb8ce9215f8c642bb68be6249c5a4c7f332fc8ecadae7be5cbdf1ea95addc95f0459ef2e7ad9d45fd1064698a097e4eb211c83e772b49bc0ee423e91534 + languageName: node + linkType: hard + "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -555,6 +949,22 @@ __metadata: languageName: node linkType: hard +"thread-stream@npm:^3.0.0": + version: 3.1.0 + resolution: "thread-stream@npm:3.1.0" + dependencies: + real-require: "npm:^0.2.0" + checksum: 10c0/c36118379940b77a6ef3e6f4d5dd31e97b8210c3f7b9a54eb8fe6358ab173f6d0acfaf69b9c3db024b948c0c5fd2a7df93e2e49151af02076b35ada3205ec9a6 + languageName: node + linkType: hard + +"toad-cache@npm:^3.7.0": + version: 3.7.0 + resolution: "toad-cache@npm:3.7.0" + checksum: 10c0/7dae2782ee20b22c9798bb8b71dec7ec6a0091021d2ea9dd6e8afccab6b65b358fdba49a02209fac574499702e2c000660721516c87c2538d1b2c0ba03e8c0c3 + languageName: node + linkType: hard + "ts-node@npm:^10.9.1": version: 10.9.1 resolution: "ts-node@npm:10.9.1"