diff --git a/.gitignore b/.gitignore index 05f2fc1..eeb2963 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea/ .vscode/ -node_modules/ \ No newline at end of file +node_modules/ +dist/ \ No newline at end of file diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 0f28c70..0f81bf6 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/dist/.yarn/install-state.gz b/dist/.yarn/install-state.gz deleted file mode 100644 index b2df8ab..0000000 Binary files a/dist/.yarn/install-state.gz and /dev/null differ diff --git a/dist/lib/index.d.ts b/dist/lib/index.d.ts deleted file mode 100644 index e42cc6f..0000000 --- a/dist/lib/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { LoggedRoute, LoggedFunction, LoggedController, LoggedInjectable, LoggedGuard, LoggedInterceptor, LoggedMiddleware, } from './logged'; -export { ScopedLogger } from './logger'; -export { InjectLogger, LoggedParam, LoggedHeaders, LoggedBody, LoggedQuery, Logged, Returns, } from './reflected'; -export { getRequestLogger } from './utils'; diff --git a/dist/lib/index.js b/dist/lib/index.js deleted file mode 100644 index fdbe9cc..0000000 --- a/dist/lib/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getRequestLogger = exports.Returns = exports.Logged = exports.LoggedQuery = exports.LoggedBody = exports.LoggedHeaders = exports.LoggedParam = exports.InjectLogger = exports.ScopedLogger = exports.LoggedMiddleware = exports.LoggedInterceptor = exports.LoggedGuard = exports.LoggedInjectable = exports.LoggedController = exports.LoggedFunction = exports.LoggedRoute = void 0; -var logged_1 = require("./logged"); -Object.defineProperty(exports, "LoggedRoute", { enumerable: true, get: function () { return logged_1.LoggedRoute; } }); -Object.defineProperty(exports, "LoggedFunction", { enumerable: true, get: function () { return logged_1.LoggedFunction; } }); -Object.defineProperty(exports, "LoggedController", { enumerable: true, get: function () { return logged_1.LoggedController; } }); -Object.defineProperty(exports, "LoggedInjectable", { enumerable: true, get: function () { return logged_1.LoggedInjectable; } }); -Object.defineProperty(exports, "LoggedGuard", { enumerable: true, get: function () { return logged_1.LoggedGuard; } }); -Object.defineProperty(exports, "LoggedInterceptor", { enumerable: true, get: function () { return logged_1.LoggedInterceptor; } }); -Object.defineProperty(exports, "LoggedMiddleware", { enumerable: true, get: function () { return logged_1.LoggedMiddleware; } }); -var logger_1 = require("./logger"); -Object.defineProperty(exports, "ScopedLogger", { enumerable: true, get: function () { return logger_1.ScopedLogger; } }); -var reflected_1 = require("./reflected"); -Object.defineProperty(exports, "InjectLogger", { enumerable: true, get: function () { return reflected_1.InjectLogger; } }); -Object.defineProperty(exports, "LoggedParam", { enumerable: true, get: function () { return reflected_1.LoggedParam; } }); -Object.defineProperty(exports, "LoggedHeaders", { enumerable: true, get: function () { return reflected_1.LoggedHeaders; } }); -Object.defineProperty(exports, "LoggedBody", { enumerable: true, get: function () { return reflected_1.LoggedBody; } }); -Object.defineProperty(exports, "LoggedQuery", { enumerable: true, get: function () { return reflected_1.LoggedQuery; } }); -Object.defineProperty(exports, "Logged", { enumerable: true, get: function () { return reflected_1.Logged; } }); -Object.defineProperty(exports, "Returns", { enumerable: true, get: function () { return reflected_1.Returns; } }); -var utils_1 = require("./utils"); -Object.defineProperty(exports, "getRequestLogger", { enumerable: true, get: function () { return utils_1.getRequestLogger; } }); diff --git a/dist/lib/internals/nest.d.ts b/dist/lib/internals/nest.d.ts deleted file mode 100644 index 3d0a16d..0000000 --- a/dist/lib/internals/nest.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum'; -import { ParamData, PipeTransform, Type } from '@nestjs/common'; -import { ROUTE_ARGS_METADATA } from '@nestjs/common/constants'; -export { RouteParamtypes, PipeTransform, Type, ROUTE_ARGS_METADATA }; -export declare function createRouteParamDecorator(paramtype: RouteParamtypes): (data?: ParamData) => ParameterDecorator; -export declare const createPipesRouteParamDecorator: (paramtype: RouteParamtypes) => (data?: any, ...pipes: (Type | PipeTransform)[]) => ParameterDecorator; diff --git a/dist/lib/internals/nest.js b/dist/lib/internals/nest.js deleted file mode 100644 index 04ca6e6..0000000 --- a/dist/lib/internals/nest.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createPipesRouteParamDecorator = exports.createRouteParamDecorator = exports.ROUTE_ARGS_METADATA = exports.RouteParamtypes = void 0; -const route_paramtypes_enum_1 = require("@nestjs/common/enums/route-paramtypes.enum"); -Object.defineProperty(exports, "RouteParamtypes", { enumerable: true, get: function () { return route_paramtypes_enum_1.RouteParamtypes; } }); -const common_1 = require("@nestjs/common"); -const constants_1 = require("@nestjs/common/constants"); -Object.defineProperty(exports, "ROUTE_ARGS_METADATA", { enumerable: true, get: function () { return constants_1.ROUTE_ARGS_METADATA; } }); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -function createRouteParamDecorator(paramtype) { - return (data) => (target, key, index) => { - const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || {}; - Reflect.defineMetadata(constants_1.ROUTE_ARGS_METADATA, (0, common_1.assignMetadata)(args, paramtype, index, data), target.constructor, key); - }; -} -exports.createRouteParamDecorator = createRouteParamDecorator; -const createPipesRouteParamDecorator = (paramtype) => (data, ...pipes) => (target, key, index) => { - const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || {}; - const hasParamData = (0, shared_utils_1.isNil)(data) || (0, shared_utils_1.isString)(data); - const paramData = hasParamData ? data : undefined; - const paramPipes = hasParamData ? pipes : [data, ...pipes]; - Reflect.defineMetadata(constants_1.ROUTE_ARGS_METADATA, (0, common_1.assignMetadata)(args, paramtype, index, paramData, ...paramPipes), target.constructor, key); -}; -exports.createPipesRouteParamDecorator = createPipesRouteParamDecorator; diff --git a/dist/lib/internals/utils.d.ts b/dist/lib/internals/utils.d.ts deleted file mode 100644 index 4df622b..0000000 --- a/dist/lib/internals/utils.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export declare const notIncludedSymbol: unique symbol; -export declare function includeObjectSync(ocv: any, opt: { - paths: string[]; -}): any; -export declare function excludeObjectSync(ocv: any, opt: { - paths: string[]; -}): any; -export declare function objectContainedLogSync(ocv: any, options?: { - include?: string[]; - exclude?: string[]; -}): string; -export declare function getItemByPathSync(obj: object, path: string | string[]): any; diff --git a/dist/lib/internals/utils.js b/dist/lib/internals/utils.js deleted file mode 100644 index 048f3cc..0000000 --- a/dist/lib/internals/utils.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getItemByPathSync = exports.objectContainedLogSync = exports.excludeObjectSync = exports.includeObjectSync = exports.notIncludedSymbol = void 0; -exports.notIncludedSymbol = Symbol('notIncluded'); -function includeObjectSync(ocv, opt) { - let current = Array.isArray(ocv) ? [] : typeof ocv === 'object' ? {} : ocv; - opt.paths.forEach((dotpath) => { - let query = ocv; - let objRef = current; - const path = dotpath.split('.'); - for (const [index, key] of Object.entries(path)) { - query = query[key]; - if (query !== undefined && objRef[key] === undefined) { - if (typeof query === 'object') { - if (Array.isArray(query)) { - objRef[key] = []; - } - else { - objRef[key] = {}; - } - } - } - if (typeof query !== 'object' || index === (path.length - 1).toString()) { - objRef[key] = query; - break; - } - objRef = objRef[key]; - } - }); - return current; -} -exports.includeObjectSync = includeObjectSync; -function excludeObjectSync(ocv, opt) { - const copied = typeof ocv === 'object' - ? Array.isArray(ocv) - ? [...ocv] - : { ...ocv } - : ocv; - opt.paths.forEach((dotpath) => { - let objRef = copied; - const path = dotpath.split('.'); - const lastIndex = (path.length - 1).toString(); - for (const [index, key] of Object.entries(path)) { - if (index === lastIndex) { - delete objRef[key]; - break; - } - objRef = objRef[key]; - if (typeof objRef !== 'object') { - break; - } - } - }); - return copied; -} -exports.excludeObjectSync = excludeObjectSync; -function objectContainedLogSync(ocv, options) { - if (options && typeof ocv === 'object' && ocv !== null) { - if (options.include && options.include.length > 0) { - return JSON.stringify(includeObjectSync(ocv, { paths: options.include })); - } - if (options.exclude && options.exclude.length > 0) { - return JSON.stringify(excludeObjectSync(ocv, { paths: options.exclude })); - } - } - if (typeof ocv === 'object' && ocv !== null) { - return JSON.stringify(ocv); - } - else { - return `${ocv}`; - } -} -exports.objectContainedLogSync = objectContainedLogSync; -function getItemByPathSync(obj, path) { - const paths = Array.isArray(path) ? path : path.split('.'); - return Object.keys(obj).includes(paths[0]) - ? typeof obj[paths[0]] === 'object' - ? getItemByPathSync(obj[paths[0]], paths.slice(1)) - : obj[paths[0]] - : undefined; -} -exports.getItemByPathSync = getItemByPathSync; diff --git a/dist/lib/logged/class.d.ts b/dist/lib/logged/class.d.ts deleted file mode 100644 index 35a92b2..0000000 --- a/dist/lib/logged/class.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ControllerOptions, ScopeOptions } from '@nestjs/common'; -export declare function LoggedInjectable(options?: ScopeOptions & { - verbose?: boolean; -}): (target: any) => void; -export declare function LoggedController(): (target: any) => void; -export declare function LoggedController(prefix: string | string[]): (target: any) => void; -export declare function LoggedController(options: ControllerOptions & { - verbose?: boolean; -}): (target: any) => void; diff --git a/dist/lib/logged/class.js b/dist/lib/logged/class.js deleted file mode 100644 index 386fc1a..0000000 --- a/dist/lib/logged/class.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedController = exports.LoggedInjectable = void 0; -const common_1 = require("@nestjs/common"); -const utils_1 = require("./utils"); -const methods_1 = require("./methods"); -function LoggedInjectable(options) { - return (target) => { - (0, utils_1.loggerInit)(target.prototype); - const logger = target.prototype.logger; - const methods = Object.getOwnPropertyNames(target.prototype); - methods.forEach((method) => { - if (method !== 'constructor' && - typeof target.prototype[method] === 'function') { - if (options && options.verbose) - logger.log(`LoggedFunction applied to ${method}`); - (0, methods_1.LoggedFunction)()(target.prototype, method, { - value: target.prototype[method], - }); - } - }); - (0, common_1.Injectable)(options)(target); - }; -} -exports.LoggedInjectable = LoggedInjectable; -function LoggedController(param) { - return (target) => { - (0, utils_1.loggerInit)(target.prototype); - const logger = target.prototype.logger; - const methods = Object.getOwnPropertyNames(target.prototype); - let verbose = typeof param === 'object' && Object.keys(param).includes('verbose') - ? param.verbose - : false; - methods.forEach((method) => { - if (method !== 'constructor' && - typeof target.prototype[method] === 'function') { - if (verbose) { - const path = Reflect.getMetadata('path', target.prototype[method]); - const httpMethod = Reflect.getMetadata('method', target.prototype[method]); - logger.log(`LoggedRoute applied to ${method} (${utils_1.RevRequestMethod[httpMethod]} ${path})`); - } - (0, methods_1.LoggedRoute)()(target.prototype, method, { - value: target.prototype[method], - }); - } - }); - (0, common_1.Controller)(param)(target); - }; -} -exports.LoggedController = LoggedController; diff --git a/dist/lib/logged/index.d.ts b/dist/lib/logged/index.d.ts deleted file mode 100644 index 67b66e2..0000000 --- a/dist/lib/logged/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './methods'; -export { LoggedController, LoggedInjectable } from './class'; diff --git a/dist/lib/logged/index.js b/dist/lib/logged/index.js deleted file mode 100644 index 0b7e383..0000000 --- a/dist/lib/logged/index.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedInjectable = exports.LoggedController = void 0; -__exportStar(require("./methods"), exports); -var class_1 = require("./class"); -Object.defineProperty(exports, "LoggedController", { enumerable: true, get: function () { return class_1.LoggedController; } }); -Object.defineProperty(exports, "LoggedInjectable", { enumerable: true, get: function () { return class_1.LoggedInjectable; } }); diff --git a/dist/lib/logged/metadata.d.ts b/dist/lib/logged/metadata.d.ts deleted file mode 100644 index 971377d..0000000 --- a/dist/lib/logged/metadata.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { OverrideBuildOptions } from './utils'; -export declare const nestLoggedMetadata: unique symbol; -export declare class LoggedMetadata { - options: OverrideBuildOptions; - constructor(options?: Partial); - updateOption(options: Partial): void; -} diff --git a/dist/lib/logged/metadata.js b/dist/lib/logged/metadata.js deleted file mode 100644 index 600ae52..0000000 --- a/dist/lib/logged/metadata.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedMetadata = exports.nestLoggedMetadata = void 0; -const utils_1 = require("./utils"); -exports.nestLoggedMetadata = Symbol('nlogdec-metadata'); -class LoggedMetadata { - constructor(options) { - this.options = { - ...utils_1.defaultOverrideBuildOptions, - ...(options ?? {}), - }; - } - updateOption(options) { - this.options = { - ...this.options, - ...options, - }; - } -} -exports.LoggedMetadata = LoggedMetadata; diff --git a/dist/lib/logged/methods/function.d.ts b/dist/lib/logged/methods/function.d.ts deleted file mode 100644 index c7ac515..0000000 --- a/dist/lib/logged/methods/function.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { OverrideBuildOptions } from '../utils'; -export declare function LoggedFunction, R>(options?: Partial): (_target: any, key: string, descriptor: TypedPropertyDescriptor<(...args: F) => R | Promise>) => void; diff --git a/dist/lib/logged/methods/function.js b/dist/lib/logged/methods/function.js deleted file mode 100644 index 7807c86..0000000 --- a/dist/lib/logged/methods/function.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedFunction = void 0; -const utils_1 = require("../utils"); -const metadata_1 = require("../metadata"); -const reflected_1 = require("../../reflected"); -const override_1 = require("../override"); -function LoggedFunction(options) { - return (_target, key, descriptor) => { - (0, utils_1.loggerInit)(_target); - const logger = _target.logger; - const fn = descriptor.value; - if (!fn || typeof fn !== 'function') { - logger.warn(`LoggedFunction decorator applied to non-function property: ${key}`); - return; - } - const logMetadata = Reflect.getOwnMetadata(metadata_1.nestLoggedMetadata, _target, key); - if (logMetadata) { - // already applied, override instead - logMetadata.updateOption(options); - return; - } - const newMetadata = new metadata_1.LoggedMetadata(options); - const all = Reflect.getMetadataKeys(fn).map((k) => [ - k, - Reflect.getMetadata(k, fn), - ]); - const scopedLoggerInjectableParam = Reflect.getOwnMetadata(reflected_1.scopedLogger, _target, key); - const loggedParams = Reflect.getOwnMetadata(reflected_1.loggedParam, _target, key); - const returnsData = Reflect.getOwnMetadata(reflected_1.returns, fn); - const overrideFunction = (0, override_1.overrideBuild)('function', fn, logger, { - scopedLoggerInjectableParam, - loggedParams, - }, key, returnsData, newMetadata); - _target[key] = overrideFunction; - descriptor.value = overrideFunction; - Reflect.defineMetadata(metadata_1.nestLoggedMetadata, newMetadata, _target, key); - all.forEach(([k, v]) => { - Reflect.defineMetadata(k, v, _target[key]); - Reflect.defineMetadata(k, v, descriptor.value); - }); - }; -} -exports.LoggedFunction = LoggedFunction; diff --git a/dist/lib/logged/methods/guard.d.ts b/dist/lib/logged/methods/guard.d.ts deleted file mode 100644 index 97fa480..0000000 --- a/dist/lib/logged/methods/guard.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ExecutionContext } from '@nestjs/common'; -import { OverrideBuildOptions } from '../utils'; -export declare function LoggedGuard, R>(options?: Partial): (_target: any, key: string, descriptor: TypedPropertyDescriptor<(context: ExecutionContext, ...args: F) => R>) => void; diff --git a/dist/lib/logged/methods/guard.js b/dist/lib/logged/methods/guard.js deleted file mode 100644 index 360c586..0000000 --- a/dist/lib/logged/methods/guard.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedGuard = void 0; -const utils_1 = require("../utils"); -const metadata_1 = require("../metadata"); -const reflected_1 = require("../../reflected"); -const override_1 = require("../override"); -function LoggedGuard(options) { - return (_target, key, descriptor) => { - (0, utils_1.loggerInit)(_target); - const logger = _target.logger; - const fn = descriptor.value; - if (!fn || typeof fn !== 'function') { - logger.warn(`LoggedGuard decorator applied to non-function property: ${key}`); - return; - } - const logMetadata = Reflect.getOwnMetadata(metadata_1.nestLoggedMetadata, _target, key); - if (logMetadata) { - // already applied, override instead - logMetadata.updateOption(options); - return; - } - const newMetadata = new metadata_1.LoggedMetadata(options); - const all = Reflect.getMetadataKeys(fn).map((k) => [ - k, - Reflect.getMetadata(k, fn), - ]); - const scopedLoggerInjectableParam = Reflect.getOwnMetadata(reflected_1.scopedLogger, _target, key); - const returnsData = Reflect.getOwnMetadata(reflected_1.returns, fn); - const overrideFunction = (0, override_1.overrideBuild)('guard', fn, logger, { - scopedLoggerInjectableParam, - loggedParams: [], - }, _target.constructor.name, returnsData, newMetadata); - _target[key] = overrideFunction; - descriptor.value = overrideFunction; - Reflect.defineMetadata(metadata_1.nestLoggedMetadata, newMetadata, _target, key); - all.forEach(([k, v]) => { - Reflect.defineMetadata(k, v, _target[key]); - Reflect.defineMetadata(k, v, descriptor.value); - }); - }; -} -exports.LoggedGuard = LoggedGuard; diff --git a/dist/lib/logged/methods/index.d.ts b/dist/lib/logged/methods/index.d.ts deleted file mode 100644 index 9aeedf1..0000000 --- a/dist/lib/logged/methods/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { LoggedFunction } from './function'; -export { LoggedRoute } from './route'; -export { LoggedGuard } from './guard'; -export { LoggedInterceptor } from './interceptor'; -export { LoggedMiddleware } from './middleware'; diff --git a/dist/lib/logged/methods/index.js b/dist/lib/logged/methods/index.js deleted file mode 100644 index d2f4aba..0000000 --- a/dist/lib/logged/methods/index.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedMiddleware = exports.LoggedInterceptor = exports.LoggedGuard = exports.LoggedRoute = exports.LoggedFunction = void 0; -var function_1 = require("./function"); -Object.defineProperty(exports, "LoggedFunction", { enumerable: true, get: function () { return function_1.LoggedFunction; } }); -var route_1 = require("./route"); -Object.defineProperty(exports, "LoggedRoute", { enumerable: true, get: function () { return route_1.LoggedRoute; } }); -var guard_1 = require("./guard"); -Object.defineProperty(exports, "LoggedGuard", { enumerable: true, get: function () { return guard_1.LoggedGuard; } }); -var interceptor_1 = require("./interceptor"); -Object.defineProperty(exports, "LoggedInterceptor", { enumerable: true, get: function () { return interceptor_1.LoggedInterceptor; } }); -var middleware_1 = require("./middleware"); -Object.defineProperty(exports, "LoggedMiddleware", { enumerable: true, get: function () { return middleware_1.LoggedMiddleware; } }); diff --git a/dist/lib/logged/methods/interceptor.d.ts b/dist/lib/logged/methods/interceptor.d.ts deleted file mode 100644 index 53f7a61..0000000 --- a/dist/lib/logged/methods/interceptor.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { OverrideBuildOptions } from '../utils'; -import { ExecutionContext } from '@nestjs/common'; -export declare function LoggedInterceptor, R>(options?: Partial): (_target: any, key: string, descriptor: TypedPropertyDescriptor<(context: ExecutionContext, ...args: F) => R>) => void; diff --git a/dist/lib/logged/methods/interceptor.js b/dist/lib/logged/methods/interceptor.js deleted file mode 100644 index e4beaba..0000000 --- a/dist/lib/logged/methods/interceptor.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedInterceptor = void 0; -const utils_1 = require("../utils"); -const metadata_1 = require("../metadata"); -const reflected_1 = require("../../reflected"); -const override_1 = require("../override"); -function LoggedInterceptor(options) { - return (_target, key, descriptor) => { - (0, utils_1.loggerInit)(_target); - const logger = _target.logger; - const fn = descriptor.value; - if (!fn || typeof fn !== 'function') { - logger.warn(`LoggedInterceptor decorator applied to non-function property: ${key}`); - return; - } - const logMetadata = Reflect.getOwnMetadata(metadata_1.nestLoggedMetadata, _target, key); - if (logMetadata) { - // already applied, override instead - logMetadata.updateOption(options); - return; - } - const newMetadata = new metadata_1.LoggedMetadata(options); - const all = Reflect.getMetadataKeys(fn).map((k) => [ - k, - Reflect.getMetadata(k, fn), - ]); - const scopedLoggerInjectableParam = Reflect.getOwnMetadata(reflected_1.scopedLogger, _target, key); - const returnsData = Reflect.getOwnMetadata(reflected_1.returns, fn); - const overrideFunction = (0, override_1.overrideBuild)('interceptor', fn, logger, { - scopedLoggerInjectableParam, - loggedParams: [], - }, _target.constructor.name, returnsData, newMetadata); - _target[key] = overrideFunction; - descriptor.value = overrideFunction; - Reflect.defineMetadata(metadata_1.nestLoggedMetadata, newMetadata, _target, key); - all.forEach(([k, v]) => { - Reflect.defineMetadata(k, v, _target[key]); - Reflect.defineMetadata(k, v, descriptor.value); - }); - }; -} -exports.LoggedInterceptor = LoggedInterceptor; diff --git a/dist/lib/logged/methods/middleware.d.ts b/dist/lib/logged/methods/middleware.d.ts deleted file mode 100644 index 66a698b..0000000 --- a/dist/lib/logged/methods/middleware.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { OverrideBuildOptions } from '../utils'; -export declare function LoggedMiddleware, R>(options?: Partial): (_target: any, key: string, descriptor: TypedPropertyDescriptor<(...args: F) => R>) => void; diff --git a/dist/lib/logged/methods/middleware.js b/dist/lib/logged/methods/middleware.js deleted file mode 100644 index 61b713d..0000000 --- a/dist/lib/logged/methods/middleware.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedMiddleware = void 0; -const utils_1 = require("../utils"); -const metadata_1 = require("../metadata"); -const reflected_1 = require("../../reflected"); -const override_1 = require("../override"); -function LoggedMiddleware(options) { - return (_target, key, descriptor) => { - (0, utils_1.loggerInit)(_target); - const logger = _target.logger; - const fn = descriptor.value; - if (!fn || typeof fn !== 'function') { - logger.warn(`LoggedMiddleware decorator applied to non-function property: ${key}`); - return; - } - const logMetadata = Reflect.getOwnMetadata(metadata_1.nestLoggedMetadata, _target, key); - if (logMetadata) { - // already applied, override instead - logMetadata.updateOption(options); - return; - } - const newMetadata = new metadata_1.LoggedMetadata(options); - const all = Reflect.getMetadataKeys(fn).map((k) => [ - k, - Reflect.getMetadata(k, fn), - ]); - const scopedLoggerInjectableParam = Reflect.getOwnMetadata(reflected_1.scopedLogger, _target, key); - const returnsData = Reflect.getOwnMetadata(reflected_1.returns, fn); - const overrideFunction = (0, override_1.overrideBuild)('middleware', fn, logger, { - scopedLoggerInjectableParam, - loggedParams: [], - }, _target.constructor.name, returnsData, newMetadata); - _target[key] = overrideFunction; - descriptor.value = overrideFunction; - Reflect.defineMetadata(metadata_1.nestLoggedMetadata, newMetadata, _target, key); - all.forEach(([k, v]) => { - Reflect.defineMetadata(k, v, _target[key]); - Reflect.defineMetadata(k, v, descriptor.value); - }); - }; -} -exports.LoggedMiddleware = LoggedMiddleware; diff --git a/dist/lib/logged/methods/route.d.ts b/dist/lib/logged/methods/route.d.ts deleted file mode 100644 index b8e0538..0000000 --- a/dist/lib/logged/methods/route.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { OverrideBuildOptions } from '../utils'; -export declare function LoggedRoute, R>(route?: string, options?: Partial): (_target: any, key: string, descriptor: TypedPropertyDescriptor<(...args: F) => R>) => void; diff --git a/dist/lib/logged/methods/route.js b/dist/lib/logged/methods/route.js deleted file mode 100644 index 462d3fc..0000000 --- a/dist/lib/logged/methods/route.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoggedRoute = void 0; -const utils_1 = require("../utils"); -const metadata_1 = require("../metadata"); -const reflected_1 = require("../../reflected"); -const override_1 = require("../override"); -const nest_1 = require("../../internals/nest"); -function LoggedRoute(route, options) { - return (_target, key, descriptor) => { - (0, utils_1.loggerInit)(_target); - const logger = _target.logger; - const fn = descriptor.value; - if (!fn || typeof fn !== 'function') { - logger.warn(`LoggedRoute decorator applied to non-function property: ${key}`); - return; - } - const logMetadata = Reflect.getOwnMetadata(metadata_1.nestLoggedMetadata, _target, key); - if (logMetadata) { - // already applied, override instead - logMetadata.updateOption(options); - return; - } - const newMetadata = new metadata_1.LoggedMetadata(options); - const all = Reflect.getMetadataKeys(fn).map((k) => [ - k, - Reflect.getMetadata(k, fn), - ]); - const httpPath = Reflect.getMetadata('path', fn); - const httpMethod = Reflect.getMetadata('method', fn); - const fullRoute = `${_target.constructor.name}::${route ?? httpPath}[${utils_1.RevRequestMethod[httpMethod]}]`; - const scopedLoggerInjectableParam = Reflect.getOwnMetadata(reflected_1.scopedLogger, _target, key); - // if @InjectLogger exists, fake nestjs as it is @Req() - if (scopedLoggerInjectableParam !== undefined) { - (0, nest_1.createRouteParamDecorator)(0)()(_target, key, scopedLoggerInjectableParam); - } - const loggedParams = Reflect.getOwnMetadata(reflected_1.loggedParam, _target, key); - const returnsData = Reflect.getOwnMetadata(reflected_1.returns, fn); - const overrideFunction = (0, override_1.overrideBuild)('route', fn, logger, { - scopedLoggerInjectableParam, - loggedParams, - }, key, returnsData, newMetadata, fullRoute); - _target[key] = overrideFunction; - descriptor.value = overrideFunction; - Reflect.defineMetadata(metadata_1.nestLoggedMetadata, newMetadata, _target, key); - all.forEach(([k, v]) => { - Reflect.defineMetadata(k, v, _target[key]); - Reflect.defineMetadata(k, v, descriptor.value); - }); - }; -} -exports.LoggedRoute = LoggedRoute; diff --git a/dist/lib/logged/override.d.ts b/dist/lib/logged/override.d.ts deleted file mode 100644 index a7d3f82..0000000 --- a/dist/lib/logged/override.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Logger } from '@nestjs/common'; -import { LoggedParamReflectData, ReturnsReflectData } from '../reflected'; -import { LoggedMetadata } from './metadata'; -interface FunctionMetadata { - scopedLoggerInjectableParam?: number; - loggedParams?: LoggedParamReflectData[]; -} -export declare 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 declare 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 {}; diff --git a/dist/lib/logged/override.js b/dist/lib/logged/override.js deleted file mode 100644 index ae9f77f..0000000 --- a/dist/lib/logged/override.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.overrideBuild = void 0; -const utils_1 = require("./utils"); -const utils_2 = require("../internals/utils"); -const logger_1 = require("../logger"); -function overrideBuild(type, originalFunction, baseLogger, metadatas, key, returnsData, logged, route) { - return function (...args) { - // Creating ScopedLogger - let injectedLogger = baseLogger; - if (typeof metadatas.scopedLoggerInjectableParam !== 'undefined') { - if (type === 'function') { - if (args.length <= metadatas.scopedLoggerInjectableParam || - !(args[metadatas.scopedLoggerInjectableParam] instanceof logger_1.ScopedLogger)) { - args[metadatas.scopedLoggerInjectableParam] = logger_1.ScopedLogger.fromRoot(baseLogger, key); - } - else { - args[metadatas.scopedLoggerInjectableParam] = logger_1.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]; - if (ctx.getType() !== 'http') { - injectedLogger.error('Cannot inject logger: Request type is not http'); - } - else { - let req = ctx.switchToHttp().getRequest(); - if (req[utils_1.REQUEST_LOG_ID] === undefined) { - req[utils_1.REQUEST_LOG_ID] = logger_1.ScopedLogger.createScopeId(); - } - args[metadatas.scopedLoggerInjectableParam] = logger_1.ScopedLogger.fromRoot(baseLogger, key, req[utils_1.REQUEST_LOG_ID]); - } - } - else if (type === 'middleware') { - let req = args[0]; - if (req[utils_1.REQUEST_LOG_ID] === undefined) { - req[utils_1.REQUEST_LOG_ID] = logger_1.ScopedLogger.createScopeId(); - } - args[metadatas.scopedLoggerInjectableParam] = logger_1.ScopedLogger.fromRoot(baseLogger, key, req[utils_1.REQUEST_LOG_ID]); - } - else if (type === 'route') { - // args[metadatas.scopedLoggerInjectableParam] is now Request object, thanks to code in @LoggedRoute!!!! - let req = args[metadatas.scopedLoggerInjectableParam]; - if (req[utils_1.REQUEST_LOG_ID] === undefined) { - req[utils_1.REQUEST_LOG_ID] = logger_1.ScopedLogger.createScopeId(); - } - args[metadatas.scopedLoggerInjectableParam] = logger_1.ScopedLogger.fromRoot(baseLogger, key, req[utils_1.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]; - 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' - ? (0, utils_1.createCallLogIdentifyMessage)('HIT', type, key, route) - : (0, utils_1.createCallLogIdentifyMessage)('HIT', type, key); - injectedLogger[logged.options.callLogLevel](`${callLogIdentifyMessage} ${metadatas.loggedParams && metadatas.loggedParams.length > 0 - ? 'WITH ' + - metadatas.loggedParams - .map(({ name, index, include, exclude }) => name + - '=' + - (0, utils_2.objectContainedLogSync)(args[index], { - include, - exclude, - })) - .join(', ') - : ''}`); - } - try { - const 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) => { - const resultLogged = Array.isArray(returnsData) - ? typeof r === 'object' && r !== null - ? 'WITH ' + - returnsData - .map(({ name, path }) => { - const value = (0, utils_2.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](`${(0, utils_1.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 = (0, utils_2.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](`${(0, utils_1.createCallLogIdentifyMessage)('RETURNED', type, key, route)} ${resultLogged}`); - return r; - } - } - else { - return r; - } - } - catch (e) { - // Error Log - if (logged.options.errorLogLevel !== 'skip') { - injectedLogger[logged.options.errorLogLevel](`${(0, utils_1.createCallLogIdentifyMessage)('ERROR', type, key, route)} ${e}`); - } - throw e; - } - }; -} -exports.overrideBuild = overrideBuild; diff --git a/dist/lib/logged/utils.d.ts b/dist/lib/logged/utils.d.ts deleted file mode 100644 index f89a9e3..0000000 --- a/dist/lib/logged/utils.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { LogLevel } from '@nestjs/common'; -export declare const RevRequestMethod: string[]; -export declare function loggerInit(_target: any): void; -export type BuildType = 'route' | 'function' | 'guard' | 'interceptor' | 'middleware'; -export declare function createCallLogIdentifyMessage(message: 'HIT' | 'RETURNED' | 'ERROR', type: BuildType, key?: string, route?: string): string; -export declare const REQUEST_LOG_ID = "__nestlogged_request_log_id__"; -export interface OverrideBuildOptions { - callLogLevel: LogLevel | 'skip'; - returnLogLevel: LogLevel | 'skip'; - errorLogLevel: LogLevel | 'skip'; - /** @deprecated use `callLogLevel: 'skip'` instead */ - skipCallLog: boolean; - /** @deprecated use `returnLogLevel: 'skip'` instead */ - skipReturnLog: boolean; - /** @deprecated use `errorLogLevel: 'skip'` instead */ - skipErrorLog: boolean; -} -export declare const defaultOverrideBuildOptions: OverrideBuildOptions; diff --git a/dist/lib/logged/utils.js b/dist/lib/logged/utils.js deleted file mode 100644 index 7d4177c..0000000 --- a/dist/lib/logged/utils.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultOverrideBuildOptions = exports.REQUEST_LOG_ID = exports.createCallLogIdentifyMessage = exports.loggerInit = exports.RevRequestMethod = void 0; -const common_1 = require("@nestjs/common"); -exports.RevRequestMethod = [ - 'GET', - 'POST', - 'PUT', - 'DELETE', - 'PATCH', - 'ALL', - 'OPTIONS', - 'HEAD', - 'SEARCH', -]; -function loggerInit(_target) { - if (!Object.getOwnPropertyNames(_target).includes('logger')) { - const newTargetLogger = new common_1.Logger(_target.constructor.name); - newTargetLogger.log('Logger Initialized.'); - Object.defineProperty(_target, 'logger', { - writable: false, - enumerable: false, - configurable: false, - value: newTargetLogger, - }); - } -} -exports.loggerInit = loggerInit; -const callLogIdentifyMessageDictionary = { - route: 'ENDPOINT', - function: 'FUNCTION', - guard: 'GUARD', - interceptor: 'INTERCEPTOR', - middleware: 'MIDDLEWARE', -}; -function createCallLogIdentifyMessage(message, type, key, route) { - if (message === 'ERROR') - return `ERROR WHILE ${callLogIdentifyMessageDictionary[type]} ${key} (${route}): `; - if (type === 'guard' || - type === 'interceptor' || - type === 'middleware' || - type === 'route') - return `${message} ${callLogIdentifyMessageDictionary[type]} ${key} (${route})`; - if (type === 'function') - return `${message} ${callLogIdentifyMessageDictionary[type]} ${key}`; - return `${message} ${callLogIdentifyMessageDictionary[type]}`; -} -exports.createCallLogIdentifyMessage = createCallLogIdentifyMessage; -exports.REQUEST_LOG_ID = '__nestlogged_request_log_id__'; -exports.defaultOverrideBuildOptions = { - callLogLevel: 'log', - returnLogLevel: 'log', - errorLogLevel: 'error', - skipCallLog: false, - skipReturnLog: false, - skipErrorLog: false, -}; diff --git a/dist/lib/logger.d.ts b/dist/lib/logger.d.ts deleted file mode 100644 index 6fc7757..0000000 --- a/dist/lib/logger.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Logger } from '@nestjs/common'; -export declare class ScopedLogger extends Logger { - private logger; - private scope; - private scopeId; - constructor(logger: Logger, scope: string[], scopeId?: string); - private scopedLog; - debug: (message: string) => void; - log: (message: string) => void; - warn: (message: string) => void; - verbose: (message: string) => void; - error: (message: string) => void; - fatal: (message: string) => void; - static fromSuper(baseLogger: Logger, logger: ScopedLogger, scope: string): ScopedLogger; - static fromRoot(logger: Logger, scope: string, scopeId?: string): ScopedLogger; - static createScopeId(): string; -} diff --git a/dist/lib/logger.js b/dist/lib/logger.js deleted file mode 100644 index 305d6d7..0000000 --- a/dist/lib/logger.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ScopedLogger = void 0; -const common_1 = require("@nestjs/common"); -const hyperid = require("hyperid"); -const createId = hyperid({ fixedLength: true }); -class ScopedLogger extends common_1.Logger { - constructor(logger, scope, scopeId = createId()) { - super(); - this.logger = logger; - this.scope = scope; - this.scopeId = scopeId; - this.debug = this.scopedLog('debug'); - this.log = this.scopedLog('log'); - this.warn = this.scopedLog('warn'); - this.verbose = this.scopedLog('verbose'); - this.error = this.scopedLog('error'); - this.fatal = this.scopedLog('fatal'); - } - scopedLog(method) { - return (message) => { - this.logger[method](`${this.scopeId ? `(ID ${this.scopeId}) | ` : ''}${this.scope.join(' -> ')}: ${message}`); - }; - } - static fromSuper(baseLogger, logger, scope) { - return new ScopedLogger(baseLogger, [...logger.scope, scope], logger.scopeId); - } - static fromRoot(logger, scope, scopeId) { - return new ScopedLogger(logger, [scope], scopeId); - } - static createScopeId() { - return createId(); - } -} -exports.ScopedLogger = ScopedLogger; diff --git a/dist/lib/reflected.d.ts b/dist/lib/reflected.d.ts deleted file mode 100644 index 24bf15c..0000000 --- a/dist/lib/reflected.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Type, PipeTransform } from './internals/nest'; -export type Path = string | string[]; -export type Paths = Path[]; -export interface IncludeExcludePath { - includePath?: Paths; - excludePath?: Paths; -} -export interface LoggedParamReflectData { - name: string; - index: number; - include?: string[]; - exclude?: string[]; -} -export interface ScopeKeyReflectData { - name: string; - index: number; - path?: string[]; - priority?: number; -} -export interface ReturnsReflectData { - name: string; - path: string; -} -export declare const scopedLogger: unique symbol; -export declare const loggedParam: unique symbol; -export declare const returns: unique symbol; -export declare function InjectLogger(target: any, propertyKey: string | symbol, parameterIndex: number): void; -type ParameterDecoratorType = (target: any, propertyKey: string | symbol, parameterIndex: number) => void; -type LoggedParamReturns = (name: string, options?: IncludeExcludePath) => ParameterDecoratorType; -export declare const Logged: LoggedParamReturns; -type Pipe = Type | PipeTransform; -export declare function LoggedParam(): LoggedParamReturns; -export declare function LoggedParam(...pipes: Pipe[]): LoggedParamReturns; -export declare function LoggedParam(property: string, ...pipes: Pipe[]): LoggedParamReturns; -export declare function LoggedQuery(): LoggedParamReturns; -export declare function LoggedQuery(...pipes: Pipe[]): LoggedParamReturns; -export declare function LoggedQuery(property: string, ...pipes: Pipe[]): LoggedParamReturns; -export declare function LoggedBody(): LoggedParamReturns; -export declare function LoggedBody(...pipes: Pipe[]): LoggedParamReturns; -export declare function LoggedBody(property: string, ...pipes: Pipe[]): LoggedParamReturns; -export declare function LoggedHeaders(property?: string): LoggedParamReturns; -export declare function Returns, R>(namePaths?: { - [name: string]: string; -} | string): (_target: any, _key: string | symbol, descriptor: TypedPropertyDescriptor<(...args: F) => Promise | R>) => void; -export {}; diff --git a/dist/lib/reflected.js b/dist/lib/reflected.js deleted file mode 100644 index b78c3d4..0000000 --- a/dist/lib/reflected.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Returns = exports.LoggedHeaders = exports.LoggedBody = exports.LoggedQuery = exports.LoggedParam = exports.Logged = exports.InjectLogger = exports.returns = exports.loggedParam = exports.scopedLogger = void 0; -const nest_1 = require("./internals/nest"); -exports.scopedLogger = Symbol('nlogdec-scopedLogger'); -exports.loggedParam = Symbol('nlogdec-loggedParam'); -exports.returns = Symbol('nlogdec-returns'); -function InjectLogger(target, propertyKey, parameterIndex) { - Reflect.defineMetadata(exports.scopedLogger, parameterIndex, target, propertyKey); -} -exports.InjectLogger = InjectLogger; -function createLoggedFunctionParam(name, options) { - return (target, propertyKey, parameterIndex) => { - const existingLoggedParams = Reflect.getOwnMetadata(exports.loggedParam, target, propertyKey) || []; - existingLoggedParams.push({ - name, - index: parameterIndex, - // If path is provided in string[] type, convert it to string path because it is used in string type - include: options && - options.includePath && - options.includePath.map((v) => (Array.isArray(v) ? v.join('.') : v)), - exclude: options && - options.excludePath && - options.excludePath.map((v) => (Array.isArray(v) ? v.join('.') : v)), - }); - Reflect.defineMetadata(exports.loggedParam, existingLoggedParams, target, propertyKey); - }; -} -const Logged = (name, options) => createLoggedFunctionParam(name, options); -exports.Logged = Logged; -function LoggedParam(property, ...pipes) { - return (name, options) => { - return (target, propertyKey, parameterIndex) => { - (0, nest_1.createPipesRouteParamDecorator)(nest_1.RouteParamtypes.PARAM)(property, ...pipes)(target, propertyKey, parameterIndex); - createLoggedFunctionParam(name, options)(target, propertyKey, parameterIndex); - }; - }; -} -exports.LoggedParam = LoggedParam; -function LoggedQuery(property, ...pipes) { - return (name, options) => { - return (target, propertyKey, parameterIndex) => { - (0, nest_1.createPipesRouteParamDecorator)(nest_1.RouteParamtypes.QUERY)(property, ...pipes)(target, propertyKey, parameterIndex); - createLoggedFunctionParam(name, options)(target, propertyKey, parameterIndex); - }; - }; -} -exports.LoggedQuery = LoggedQuery; -function LoggedBody(property, ...pipes) { - return (name, options) => { - return (target, propertyKey, parameterIndex) => { - (0, nest_1.createPipesRouteParamDecorator)(nest_1.RouteParamtypes.BODY)(property, ...pipes)(target, propertyKey, parameterIndex); - createLoggedFunctionParam(name, options)(target, propertyKey, parameterIndex); - }; - }; -} -exports.LoggedBody = LoggedBody; -function LoggedHeaders(property) { - return (name, options) => { - return (target, propertyKey, parameterIndex) => { - (0, nest_1.createRouteParamDecorator)(nest_1.RouteParamtypes.HEADERS)(property)(target, propertyKey, parameterIndex); - createLoggedFunctionParam(name, options)(target, propertyKey, parameterIndex); - }; - }; -} -exports.LoggedHeaders = LoggedHeaders; -function Returns(namePaths) { - return (_target, _key, descriptor) => { - Reflect.defineMetadata(exports.returns, namePaths - ? typeof namePaths === 'string' - ? namePaths - : Object.entries(namePaths).reduce((prev, curr) => [...prev, { name: curr[0], path: curr[1] }], []) - : true, descriptor.value); - }; -} -exports.Returns = Returns; diff --git a/dist/lib/utils.d.ts b/dist/lib/utils.d.ts deleted file mode 100644 index 1a27448..0000000 --- a/dist/lib/utils.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ScopedLogger } from './logger'; -export declare function getRequestLogger(functionName: string, req: any): ScopedLogger; diff --git a/dist/lib/utils.js b/dist/lib/utils.js deleted file mode 100644 index a8ba580..0000000 --- a/dist/lib/utils.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getRequestLogger = void 0; -const common_1 = require("@nestjs/common"); -const logger_1 = require("./logger"); -const utils_1 = require("./logged/utils"); -const logger = new common_1.Logger(); -function getRequestLogger(functionName, req) { - return new logger_1.ScopedLogger(logger, [functionName], req[utils_1.REQUEST_LOG_ID]); -} -exports.getRequestLogger = getRequestLogger; diff --git a/dist/yarn.lock b/dist/yarn.lock deleted file mode 100644 index ee58e54..0000000 --- a/dist/yarn.lock +++ /dev/null @@ -1,173 +0,0 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - -__metadata: - version: 8 - cacheKey: 10c0 - -"@lukeed/csprng@npm:^1.0.0": - version: 1.1.0 - resolution: "@lukeed/csprng@npm:1.1.0" - checksum: 10c0/5d6dcf478af732972083ab2889c294b57f1028fa13c2c240d7a4aaa079c2c75df7ef0dcbdda5419147fc6704b4adf96b2de92f1a9a72ac21c6350c4014fffe6c - languageName: node - linkType: hard - -"@nestjs/common@npm:^11.0.12": - version: 11.0.12 - resolution: "@nestjs/common@npm:11.0.12" - dependencies: - iterare: "npm:1.2.1" - tslib: "npm:2.8.1" - uid: "npm:2.0.2" - peerDependencies: - class-transformer: "*" - class-validator: "*" - reflect-metadata: ^0.1.12 || ^0.2.0 - rxjs: ^7.1.0 - peerDependenciesMeta: - class-transformer: - optional: true - class-validator: - optional: true - checksum: 10c0/cf8976279dfd04e6a6c2f909e36dcfb4d06207e8dc0eafffcd966fc2d7a147ce511f0ca616c9157fe7c1a316e81241b372d569ab8b8b0aa587cd42283ce0f0f2 - languageName: node - linkType: hard - -"@types/node@npm:^20.9.1": - version: 20.17.24 - resolution: "@types/node@npm:20.17.24" - dependencies: - undici-types: "npm:~6.19.2" - checksum: 10c0/2a39ce4c4cd4588a05b2a485cc0a1407cbea608dd1ab03e36add59d61712718d95c84b492ca5190753f0be2bce748aeeb0f2a1412e712775462befe3820b3ff9 - languageName: node - linkType: hard - -"base64-js@npm:^1.3.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf - languageName: node - linkType: hard - -"buffer@npm:^5.2.1": - version: 5.7.1 - resolution: "buffer@npm:5.7.1" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.1.13" - checksum: 10c0/27cac81cff434ed2876058d72e7c4789d11ff1120ef32c9de48f59eab58179b66710c488987d295ae89a228f835fc66d088652dffeb8e3ba8659f80eb091d55e - languageName: node - linkType: hard - -"hyperid@npm:^3.1.1": - version: 3.3.0 - resolution: "hyperid@npm:3.3.0" - dependencies: - buffer: "npm:^5.2.1" - uuid: "npm:^8.3.2" - uuid-parse: "npm:^1.1.0" - checksum: 10c0/709dafd2a25e21086a2d881adb3436a16eafd28692ebd967829ca1d5f10adf001925feb23b6aadfee464ea313d851e7ba7a5452869aaf6cde15e9149793a09e0 - languageName: node - linkType: hard - -"ieee754@npm:^1.1.13": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb - languageName: node - linkType: hard - -"iterare@npm:1.2.1": - version: 1.2.1 - resolution: "iterare@npm:1.2.1" - checksum: 10c0/02667d486e3e83ead028ba8484d927498c2ceab7e8c6a69dd881fd02abc4114f00b13abb36b592252fbb578b6e6f99ca1dfc2835408b9158c9a112a9964f453f - languageName: node - linkType: hard - -"nestlogged@workspace:.": - version: 0.0.0-use.local - resolution: "nestlogged@workspace:." - dependencies: - "@nestjs/common": "npm:^11.0.12" - "@types/node": "npm:^20.9.1" - hyperid: "npm:^3.1.1" - reflect-metadata: "npm:^0.1.13" - rxjs: "npm:^7.8.1" - typescript: "npm:^5.2.2" - languageName: unknown - linkType: soft - -"reflect-metadata@npm:^0.1.13": - version: 0.1.14 - resolution: "reflect-metadata@npm:0.1.14" - checksum: 10c0/3a6190c7f6cb224f26a012d11f9e329360c01c1945e2cbefea23976a8bacf9db6b794aeb5bf18adcb673c448a234fbc06fc41853c00a6c206b30f0777ecf019e - languageName: node - linkType: hard - -"rxjs@npm:^7.8.1": - version: 7.8.2 - resolution: "rxjs@npm:7.8.2" - dependencies: - tslib: "npm:^2.1.0" - checksum: 10c0/1fcd33d2066ada98ba8f21fcbbcaee9f0b271de1d38dc7f4e256bfbc6ffcdde68c8bfb69093de7eeb46f24b1fb820620bf0223706cff26b4ab99a7ff7b2e2c45 - languageName: node - linkType: hard - -"tslib@npm:2.8.1, tslib@npm:^2.1.0": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 - languageName: node - linkType: hard - -"typescript@npm:^5.2.2": - version: 5.8.2 - resolution: "typescript@npm:5.8.2" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/5c4f6fbf1c6389b6928fe7b8fcd5dc73bb2d58cd4e3883f1d774ed5bd83b151cbac6b7ecf11723de56d4676daeba8713894b1e9af56174f2f9780ae7848ec3c6 - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.2.2#optional!builtin": - version: 5.8.2 - resolution: "typescript@patch:typescript@npm%3A5.8.2#optional!builtin::version=5.8.2&hash=5786d5" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/5448a08e595cc558ab321e49d4cac64fb43d1fa106584f6ff9a8d8e592111b373a995a1d5c7f3046211c8a37201eb6d0f1566f15cdb7a62a5e3be01d087848e2 - languageName: node - linkType: hard - -"uid@npm:2.0.2": - version: 2.0.2 - resolution: "uid@npm:2.0.2" - dependencies: - "@lukeed/csprng": "npm:^1.0.0" - checksum: 10c0/e9d02d0562c74e74b5a2519e586db9d7f8204978e476cddd191ee1a9efb85efafdbab2dbf3fc3dde0f5da01fd9da161f37d604dabf513447fd2c03d008f1324c - languageName: node - linkType: hard - -"undici-types@npm:~6.19.2": - version: 6.19.8 - resolution: "undici-types@npm:6.19.8" - checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 - languageName: node - linkType: hard - -"uuid-parse@npm:^1.1.0": - version: 1.1.0 - resolution: "uuid-parse@npm:1.1.0" - checksum: 10c0/513d5b0407b8929c54d452e8e286a1f6f00d40a2ebf6607fc7297b9caa40eee35230dcc4ce3f178f84d89704e8147e24d1a33d680a8afb7e12a5700714db7f51 - languageName: node - linkType: hard - -"uuid@npm:^8.3.2": - version: 8.3.2 - resolution: "uuid@npm:8.3.2" - bin: - uuid: dist/bin/uuid - checksum: 10c0/bcbb807a917d374a49f475fae2e87fdca7da5e5530820ef53f65ba1d12131bd81a92ecf259cc7ce317cbe0f289e7d79fdfebcef9bfa3087c8c8a2fa304c9be54 - languageName: node - linkType: hard diff --git a/package.json b/package.json index 334016b..594e15c 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,10 @@ "author": "Shinwoo PARK", "license": "MIT", "private": true, - "dependencies": { - "@nestjs/common": "^11.0.12", - "hyperid": "^3.1.1", - "reflect-metadata": "^0.1.13", - "rxjs": "^7.8.1" - }, + "workspaces": [ + "packages/*" + ], "devDependencies": { - "@types/node": "^20.9.1", "prettier": "^3.5.3", "rimraf": "^5.0.5", "ts-node": "^10.9.1", diff --git a/dist/README.md b/packages/nestlogged-fastify/README.md similarity index 100% rename from dist/README.md rename to packages/nestlogged-fastify/README.md diff --git a/dist/package.json b/packages/nestlogged-fastify/package.json similarity index 66% rename from dist/package.json rename to packages/nestlogged-fastify/package.json index 63a3e01..410bf24 100644 --- a/dist/package.json +++ b/packages/nestlogged-fastify/package.json @@ -2,10 +2,11 @@ "name": "nestlogged", "version": "3.2.3", "description": "A NestJS Logger Decorator Library", - "main": "lib/index.js", + "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", "hyperid": "^3.1.1", @@ -16,10 +17,5 @@ "@types/node": "^20.9.1", "typescript": "^5.2.2" }, - "keywords": [ - "nest", - "nestjs", - "log", - "logging" - ] + "packageManager": "yarn@4.7.0+sha512.5a0afa1d4c1d844b3447ee3319633797bcd6385d9a44be07993ae52ff4facabccafb4af5dcd1c2f9a94ac113e5e9ff56f6130431905884414229e284e37bb7c9" } diff --git a/packages/nestlogged-fastify/src/index.ts b/packages/nestlogged-fastify/src/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/tsconfig.build.json b/packages/nestlogged-fastify/tsconfig.build.json similarity index 100% rename from tsconfig.build.json rename to packages/nestlogged-fastify/tsconfig.build.json diff --git a/tsconfig.json b/packages/nestlogged-fastify/tsconfig.json similarity index 100% rename from tsconfig.json rename to packages/nestlogged-fastify/tsconfig.json diff --git a/packages/nestlogged/README.md b/packages/nestlogged/README.md new file mode 100644 index 0000000..0021e46 --- /dev/null +++ b/packages/nestlogged/README.md @@ -0,0 +1,20 @@ +# NestJS Logging Decorators + +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. + +## Installation + +```sh +npm install nestlogged +``` + +or + +```sh +yarn add nestlogged +``` + +## More Info + +[Wiki](https://nestlogged.psw.kr) \ No newline at end of file diff --git a/packages/nestlogged/package.json b/packages/nestlogged/package.json new file mode 100644 index 0000000..410bf24 --- /dev/null +++ b/packages/nestlogged/package.json @@ -0,0 +1,21 @@ +{ + "name": "nestlogged", + "version": "3.2.3", + "description": "A NestJS Logger Decorator Library", + "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", + "hyperid": "^3.1.1", + "reflect-metadata": "^0.1.13", + "rxjs": "^7.8.1" + }, + "devDependencies": { + "@types/node": "^20.9.1", + "typescript": "^5.2.2" + }, + "packageManager": "yarn@4.7.0+sha512.5a0afa1d4c1d844b3447ee3319633797bcd6385d9a44be07993ae52ff4facabccafb4af5dcd1c2f9a94ac113e5e9ff56f6130431905884414229e284e37bb7c9" +} diff --git a/src/index.ts b/packages/nestlogged/src/index.ts similarity index 100% rename from src/index.ts rename to packages/nestlogged/src/index.ts diff --git a/src/internals/nest.ts b/packages/nestlogged/src/internals/nest.ts similarity index 100% rename from src/internals/nest.ts rename to packages/nestlogged/src/internals/nest.ts diff --git a/src/internals/utils.ts b/packages/nestlogged/src/internals/utils.ts similarity index 100% rename from src/internals/utils.ts rename to packages/nestlogged/src/internals/utils.ts diff --git a/src/logged/class.ts b/packages/nestlogged/src/logged/class.ts similarity index 100% rename from src/logged/class.ts rename to packages/nestlogged/src/logged/class.ts diff --git a/src/logged/index.ts b/packages/nestlogged/src/logged/index.ts similarity index 100% rename from src/logged/index.ts rename to packages/nestlogged/src/logged/index.ts diff --git a/src/logged/metadata.ts b/packages/nestlogged/src/logged/metadata.ts similarity index 100% rename from src/logged/metadata.ts rename to packages/nestlogged/src/logged/metadata.ts diff --git a/src/logged/methods/function.ts b/packages/nestlogged/src/logged/methods/function.ts similarity index 100% rename from src/logged/methods/function.ts rename to packages/nestlogged/src/logged/methods/function.ts diff --git a/src/logged/methods/guard.ts b/packages/nestlogged/src/logged/methods/guard.ts similarity index 100% rename from src/logged/methods/guard.ts rename to packages/nestlogged/src/logged/methods/guard.ts diff --git a/src/logged/methods/index.ts b/packages/nestlogged/src/logged/methods/index.ts similarity index 100% rename from src/logged/methods/index.ts rename to packages/nestlogged/src/logged/methods/index.ts diff --git a/src/logged/methods/interceptor.ts b/packages/nestlogged/src/logged/methods/interceptor.ts similarity index 100% rename from src/logged/methods/interceptor.ts rename to packages/nestlogged/src/logged/methods/interceptor.ts diff --git a/src/logged/methods/middleware.ts b/packages/nestlogged/src/logged/methods/middleware.ts similarity index 100% rename from src/logged/methods/middleware.ts rename to packages/nestlogged/src/logged/methods/middleware.ts diff --git a/src/logged/methods/route.ts b/packages/nestlogged/src/logged/methods/route.ts similarity index 100% rename from src/logged/methods/route.ts rename to packages/nestlogged/src/logged/methods/route.ts diff --git a/src/logged/override.ts b/packages/nestlogged/src/logged/override.ts similarity index 100% rename from src/logged/override.ts rename to packages/nestlogged/src/logged/override.ts diff --git a/src/logged/utils.ts b/packages/nestlogged/src/logged/utils.ts similarity index 100% rename from src/logged/utils.ts rename to packages/nestlogged/src/logged/utils.ts diff --git a/src/logger.ts b/packages/nestlogged/src/logger.ts similarity index 100% rename from src/logger.ts rename to packages/nestlogged/src/logger.ts diff --git a/src/reflected.ts b/packages/nestlogged/src/reflected.ts similarity index 100% rename from src/reflected.ts rename to packages/nestlogged/src/reflected.ts diff --git a/src/utils.ts b/packages/nestlogged/src/utils.ts similarity index 100% rename from src/utils.ts rename to packages/nestlogged/src/utils.ts diff --git a/packages/nestlogged/tsconfig.build.json b/packages/nestlogged/tsconfig.build.json new file mode 100644 index 0000000..1ab50dd --- /dev/null +++ b/packages/nestlogged/tsconfig.build.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "node_modules", + "dist", + "src/test", + ], + "compilerOptions": { + "experimentalDecorators": false, + "emitDecoratorMetadata": false, + } +} \ No newline at end of file diff --git a/packages/nestlogged/tsconfig.json b/packages/nestlogged/tsconfig.json new file mode 100644 index 0000000..3546de1 --- /dev/null +++ b/packages/nestlogged/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "ES2021", + "sourceMap": false, + "outDir": "./dist/lib", + "rootDir": "./src", + "declaration": true, + "declarationMap": false, + "experimentalDecorators": true, + "emitDecoratorMetadata": true + }, + "exclude": [ + "node_modules", + "dist", + ], +} diff --git a/yarn.lock b/yarn.lock index 04a2aea..33215cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -52,34 +52,6 @@ __metadata: languageName: node linkType: hard -"@lukeed/csprng@npm:^1.0.0": - version: 1.1.0 - resolution: "@lukeed/csprng@npm:1.1.0" - checksum: 10c0/5d6dcf478af732972083ab2889c294b57f1028fa13c2c240d7a4aaa079c2c75df7ef0dcbdda5419147fc6704b4adf96b2de92f1a9a72ac21c6350c4014fffe6c - languageName: node - linkType: hard - -"@nestjs/common@npm:^11.0.12": - version: 11.0.12 - resolution: "@nestjs/common@npm:11.0.12" - dependencies: - iterare: "npm:1.2.1" - tslib: "npm:2.8.1" - uid: "npm:2.0.2" - peerDependencies: - class-transformer: "*" - class-validator: "*" - reflect-metadata: ^0.1.12 || ^0.2.0 - rxjs: ^7.1.0 - peerDependenciesMeta: - class-transformer: - optional: true - class-validator: - optional: true - checksum: 10c0/cf8976279dfd04e6a6c2f909e36dcfb4d06207e8dc0eafffcd966fc2d7a147ce511f0ca616c9157fe7c1a316e81241b372d569ab8b8b0aa587cd42283ce0f0f2 - languageName: node - linkType: hard - "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -115,15 +87,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^20.9.1": - version: 20.9.1 - resolution: "@types/node@npm:20.9.1" - dependencies: - undici-types: "npm:~5.26.4" - checksum: 10c0/0cb52c0840fe9a2e8f988564da6823bb3141e34fef8cb7264762c851c0dac5d9ef4859db422dfa41cd1a864ad126a9bd3b588d0285bc9af6de814de3280da9b3 - languageName: node - linkType: hard - "acorn-walk@npm:^8.1.1": version: 8.3.0 resolution: "acorn-walk@npm:8.3.0" @@ -280,16 +243,6 @@ __metadata: languageName: node linkType: hard -"hyperid@npm:^3.1.1": - version: 3.1.1 - resolution: "hyperid@npm:3.1.1" - dependencies: - uuid: "npm:^8.3.2" - uuid-parse: "npm:^1.1.0" - checksum: 10c0/4d8f3641e60a723ea3e4b25b25a611a8d59cb8404cc4f52ee80b9844d2261edbac35c4ab3ff70f0e1ee3712c44ad5edad26aa2f2957db88288623b71e3f61db0 - 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" @@ -304,13 +257,6 @@ __metadata: languageName: node linkType: hard -"iterare@npm:1.2.1": - version: 1.2.1 - resolution: "iterare@npm:1.2.1" - checksum: 10c0/02667d486e3e83ead028ba8484d927498c2ceab7e8c6a69dd881fd02abc4114f00b13abb36b592252fbb578b6e6f99ca1dfc2835408b9158c9a112a9964f453f - languageName: node - linkType: hard - "jackspeak@npm:^2.3.5": version: 2.3.6 resolution: "jackspeak@npm:2.3.6" @@ -369,13 +315,8 @@ __metadata: version: 0.0.0-use.local resolution: "nestlogged@workspace:." dependencies: - "@nestjs/common": "npm:^11.0.12" - "@types/node": "npm:^20.9.1" - hyperid: "npm:^3.1.1" prettier: "npm:^3.5.3" - reflect-metadata: "npm:^0.1.13" rimraf: "npm:^5.0.5" - rxjs: "npm:^7.8.1" ts-node: "npm:^10.9.1" typescript: "npm:^5.2.2" languageName: unknown @@ -407,13 +348,6 @@ __metadata: languageName: node linkType: hard -"reflect-metadata@npm:^0.1.13": - version: 0.1.13 - resolution: "reflect-metadata@npm:0.1.13" - checksum: 10c0/728bff0b376b05639fd11ed80c648b61f7fe653c5b506d7ca118e58b6752b9b00810fe0c86227ecf02bd88da6251ab3eb19fd403aaf2e9ff5ef36a2fda643026 - languageName: node - linkType: hard - "rimraf@npm:^5.0.5": version: 5.0.5 resolution: "rimraf@npm:5.0.5" @@ -425,15 +359,6 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^7.8.1": - version: 7.8.1 - resolution: "rxjs@npm:7.8.1" - dependencies: - tslib: "npm:^2.1.0" - checksum: 10c0/3c49c1ecd66170b175c9cacf5cef67f8914dcbc7cd0162855538d365c83fea631167cacb644b3ce533b2ea0e9a4d0b12175186985f89d75abe73dbd8f7f06f68 - languageName: node - linkType: hard - "semver@npm:^7.3.5": version: 7.5.4 resolution: "semver@npm:7.5.4" @@ -546,20 +471,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.8.1": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 - languageName: node - linkType: hard - -"tslib@npm:^2.1.0": - version: 2.6.2 - resolution: "tslib@npm:2.6.2" - checksum: 10c0/e03a8a4271152c8b26604ed45535954c0a45296e32445b4b87f8a5abdb2421f40b59b4ca437c4346af0f28179780d604094eb64546bee2019d903d01c6c19bdb - languageName: node - linkType: hard - "typescript@npm:^5.2.2": version: 5.2.2 resolution: "typescript@npm:5.2.2" @@ -580,38 +491,6 @@ __metadata: languageName: node linkType: hard -"uid@npm:2.0.2": - version: 2.0.2 - resolution: "uid@npm:2.0.2" - dependencies: - "@lukeed/csprng": "npm:^1.0.0" - checksum: 10c0/e9d02d0562c74e74b5a2519e586db9d7f8204978e476cddd191ee1a9efb85efafdbab2dbf3fc3dde0f5da01fd9da161f37d604dabf513447fd2c03d008f1324c - languageName: node - linkType: hard - -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10c0/bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 - languageName: node - linkType: hard - -"uuid-parse@npm:^1.1.0": - version: 1.1.0 - resolution: "uuid-parse@npm:1.1.0" - checksum: 10c0/513d5b0407b8929c54d452e8e286a1f6f00d40a2ebf6607fc7297b9caa40eee35230dcc4ce3f178f84d89704e8147e24d1a33d680a8afb7e12a5700714db7f51 - languageName: node - linkType: hard - -"uuid@npm:^8.3.2": - version: 8.3.2 - resolution: "uuid@npm:8.3.2" - bin: - uuid: dist/bin/uuid - checksum: 10c0/bcbb807a917d374a49f475fae2e87fdca7da5e5530820ef53f65ba1d12131bd81a92ecf259cc7ce317cbe0f289e7d79fdfebcef9bfa3087c8c8a2fa304c9be54 - languageName: node - linkType: hard - "v8-compile-cache-lib@npm:^3.0.1": version: 3.0.1 resolution: "v8-compile-cache-lib@npm:3.0.1"