@navios/core 1.0.0-alpha.2 → 1.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/lib/{index-BJjk2X1S.d.mts → index-BISYCYEG.d.mts} +435 -180
  3. package/lib/index-BISYCYEG.d.mts.map +1 -0
  4. package/lib/{index-DZ6NU03y.d.cts → index-CP80H6Dh.d.cts} +435 -180
  5. package/lib/index-CP80H6Dh.d.cts.map +1 -0
  6. package/lib/index.cjs +3 -2
  7. package/lib/index.d.cts +2 -2
  8. package/lib/index.d.mts +2 -2
  9. package/lib/index.mjs +2 -2
  10. package/lib/legacy-compat/index.cjs +38 -124
  11. package/lib/legacy-compat/index.cjs.map +1 -1
  12. package/lib/legacy-compat/index.d.cts +4 -60
  13. package/lib/legacy-compat/index.d.cts.map +1 -1
  14. package/lib/legacy-compat/index.d.mts +4 -60
  15. package/lib/legacy-compat/index.d.mts.map +1 -1
  16. package/lib/legacy-compat/index.mjs +12 -118
  17. package/lib/legacy-compat/index.mjs.map +1 -1
  18. package/lib/{src-C46ePe3d.cjs → src-CC5lmk_Q.cjs} +167 -2
  19. package/lib/src-CC5lmk_Q.cjs.map +1 -0
  20. package/lib/{src-K2k0riYJ.mjs → src-j1cBuAgy.mjs} +162 -3
  21. package/lib/src-j1cBuAgy.mjs.map +1 -0
  22. package/lib/testing/index.cjs +2 -2
  23. package/lib/testing/index.d.cts +1 -1
  24. package/lib/testing/index.d.mts +1 -1
  25. package/lib/testing/index.mjs +1 -1
  26. package/lib/{use-guards.decorator-B6tghdxM.cjs → use-guards.decorator-DtCGXcWZ.cjs} +2 -2
  27. package/lib/{use-guards.decorator-B6tghdxM.cjs.map → use-guards.decorator-DtCGXcWZ.cjs.map} +1 -1
  28. package/package.json +2 -2
  29. package/src/__tests__/attribute.factory.spec.mts +300 -0
  30. package/src/__tests__/guard-runner.service.spec.mts +399 -0
  31. package/src/__tests__/logger.service.spec.mts +147 -0
  32. package/src/__tests__/responders.spec.mts +6 -5
  33. package/src/interfaces/abstract-http-handler-adapter.interface.mts +86 -2
  34. package/src/legacy-compat/attribute.factory.mts +2 -2
  35. package/src/legacy-compat/decorators/controller.decorator.mts +1 -1
  36. package/src/legacy-compat/decorators/endpoint.decorator.mts +1 -1
  37. package/src/legacy-compat/decorators/header.decorator.mts +2 -1
  38. package/src/legacy-compat/decorators/http-code.decorator.mts +2 -1
  39. package/src/legacy-compat/decorators/index.mts +2 -2
  40. package/src/legacy-compat/decorators/module.decorator.mts +1 -1
  41. package/src/legacy-compat/decorators/multipart.decorator.mts +1 -1
  42. package/src/legacy-compat/decorators/stream.decorator.mts +1 -1
  43. package/src/legacy-compat/decorators/use-guards.decorator.mts +1 -1
  44. package/src/legacy-compat/index.mts +10 -5
  45. package/src/services/abstract-handler-adapter.service.mts +366 -0
  46. package/src/services/index.mts +1 -0
  47. package/lib/index-BJjk2X1S.d.mts.map +0 -1
  48. package/lib/index-DZ6NU03y.d.cts.map +0 -1
  49. package/lib/src-C46ePe3d.cjs.map +0 -1
  50. package/lib/src-K2k0riYJ.mjs.map +0 -1
  51. package/src/legacy-compat/context-compat.mts +0 -95
  52. package/src/legacy-compat/decorators/factory.decorator.mts +0 -37
  53. package/src/legacy-compat/decorators/injectable.decorator.mts +0 -41
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["classMetadataMap","WeakMap","getConstructor","prototype","constructor","createClassContext","target","has","set","metadata","get","kind","name","addInitializer","createMethodContext","propertyKey","descriptor","Error","static","private","access","value","Module","OriginalModule","createClassContext","options","controllers","imports","guards","target","context","originalDecorator","Controller","OriginalController","createClassContext","options","target","context","originalDecorator","Endpoint","OriginalEndpoint","createMethodContext","endpoint","target","propertyKey","descriptor","Error","typedDescriptor","context","originalDecorator","result","value","UseGuards","OriginalUseGuards","createClassContext","createMethodContext","guards","decoratorImpl","target","propertyKey","descriptor","undefined","context","originalDecorator","result","value","Header","OriginalHeader","createMethodContext","name","value","target","propertyKey","descriptor","context","originalDecorator","result","HttpCode","OriginalHttpCode","createMethodContext","code","target","propertyKey","descriptor","context","originalDecorator","result","value","Multipart","OriginalMultipart","createMethodContext","endpoint","target","propertyKey","descriptor","Error","context","originalDecorator","result","value","Stream","OriginalStream","createMethodContext","endpoint","target","propertyKey","descriptor","value","Error","typedDescriptor","context","originalDecorator","result","Injectable","OriginalInjectable","createClassContext","options","target","context","originalDecorator","Object","keys","length","Factory","OriginalFactory","createClassContext","options","target","context","originalDecorator","Object","keys","length","getControllerMetadata","getEndpointMetadata","getModuleMetadata","hasControllerMetadata","hasModuleMetadata","getManagedMetadata","hasManagedMetadata","createClassContext","createMethodContext","LegacyAttributeFactory","createAttribute","token","schema","res","value","decorator","target","propertyKey","descriptor","isMethodDecorator","undefined","context","metadata","validatedValue","safeParse","success","Error","toString","error","customAttributes","set","data","isController","isModule","isManaged","get","attribute","getAll","values","Array","from","entries","filter","key","map","length","getLast","i","has","AttributeFactory"],"sources":["../../src/legacy-compat/context-compat.mts","../../src/legacy-compat/decorators/module.decorator.mts","../../src/legacy-compat/decorators/controller.decorator.mts","../../src/legacy-compat/decorators/endpoint.decorator.mts","../../src/legacy-compat/decorators/use-guards.decorator.mts","../../src/legacy-compat/decorators/header.decorator.mts","../../src/legacy-compat/decorators/http-code.decorator.mts","../../src/legacy-compat/decorators/multipart.decorator.mts","../../src/legacy-compat/decorators/stream.decorator.mts","../../src/legacy-compat/decorators/injectable.decorator.mts","../../src/legacy-compat/decorators/factory.decorator.mts","../../src/legacy-compat/attribute.factory.mts"],"sourcesContent":["/**\n * Compatibility layer for converting legacy decorator signatures to Stage 3 format.\n *\n * This module provides utilities to create mock Stage 3 decorator contexts\n * from legacy decorator arguments, and manages metadata storage using WeakMap.\n */\n\nimport type { ClassType } from '@navios/di'\n\n// WeakMap to store metadata for legacy decorators\n// Keyed by class constructor for class decorators\n// For method decorators, we use the class constructor (extracted from the prototype)\nconst classMetadataMap = new WeakMap<ClassType, Record<string | symbol, any>>()\n\n/**\n * Gets the constructor from a prototype (for method decorators).\n */\nfunction getConstructor(prototype: any): ClassType | null {\n if (!prototype || typeof prototype !== 'object') {\n return null\n }\n // In legacy decorators, target is the prototype\n // The constructor is typically available via prototype.constructor\n const constructor = prototype.constructor\n if (constructor && typeof constructor === 'function') {\n return constructor as ClassType\n }\n return null\n}\n\n/**\n * Creates a mock ClassDecoratorContext for legacy class decorators.\n * @internal\n */\nexport function createClassContext(target: ClassType): ClassDecoratorContext {\n // Get or create metadata storage for this class\n if (!classMetadataMap.has(target)) {\n classMetadataMap.set(target, {})\n }\n const metadata = classMetadataMap.get(target)!\n\n return {\n kind: 'class',\n name: target.name,\n metadata,\n addInitializer() {\n // Legacy decorators don't support initializers\n },\n } as ClassDecoratorContext\n}\n\n/**\n * Creates a mock ClassMethodDecoratorContext for legacy method decorators.\n *\n * Note: Method decorators need to share metadata with the class context\n * because endpoint metadata is stored at the class level.\n * @internal\n */\nexport function createMethodContext(\n target: any,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor,\n): ClassMethodDecoratorContext {\n // For method decorators, target is the prototype\n // We need to get the class constructor to access class-level metadata\n const constructor = getConstructor(target)\n if (!constructor) {\n throw new Error(\n '[Navios] Could not determine class constructor from method decorator target.',\n )\n }\n\n // Get or create metadata storage for the class\n // Method decorators share metadata with the class\n if (!classMetadataMap.has(constructor)) {\n classMetadataMap.set(constructor, {})\n }\n const metadata = classMetadataMap.get(constructor)!\n\n return {\n kind: 'method',\n name: propertyKey,\n metadata,\n static: false, // We can't determine this from legacy decorators\n private: false, // We can't determine this from legacy decorators\n access: {\n has: () => true,\n get: () => descriptor.value,\n set: () => {},\n },\n addInitializer() {\n // Legacy decorators don't support initializers\n },\n } as ClassMethodDecoratorContext\n}\n","import type { ClassType } from '@navios/di'\n\nimport { Module as OriginalModule, type ModuleOptions } from '../../decorators/module.decorator.mjs'\nimport { createClassContext } from '../context-compat.mjs'\n\n/**\n * Legacy-compatible Module decorator.\n * \n * Works with TypeScript experimental decorators (legacy API).\n * \n * @param options - Module configuration options\n * @returns A class decorator compatible with legacy decorator API\n * \n * @example\n * ```typescript\n * @Module({\n * controllers: [UserController, AuthController],\n * imports: [DatabaseModule],\n * guards: [AuthGuard],\n * })\n * export class AppModule {}\n * ```\n */\nexport function Module(\n options: ModuleOptions = {\n controllers: [],\n imports: [],\n guards: [],\n },\n) {\n return function (target: ClassType) {\n const context = createClassContext(target)\n const originalDecorator = OriginalModule(options)\n return originalDecorator(target, context)\n }\n}\n\n","import type { ClassType } from '@navios/di'\n\nimport type { ControllerOptions } from '../../decorators/controller.decorator.mjs'\n\nimport { Controller as OriginalController } from '../../decorators/controller.decorator.mjs'\nimport { createClassContext } from '../context-compat.mjs'\n\n/**\n * Legacy-compatible Controller decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n *\n * @param options - Controller configuration options\n * @returns A class decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller({ guards: [AuthGuard] })\n * export class UserController {\n * @Endpoint(getUserEndpoint)\n * async getUser() { }\n * }\n * ```\n */\nexport function Controller(options: ControllerOptions = {}) {\n return function (target: ClassType) {\n const context = createClassContext(target)\n const originalDecorator = OriginalController(options)\n return originalDecorator(target, context)\n }\n}\n","import type {\n EndpointHandler,\n EndpointOptions,\n RequestArgs,\n} from '@navios/builder'\nimport type { z } from 'zod/v4'\n\nimport { Endpoint as OriginalEndpoint } from '../../decorators/endpoint.decorator.mjs'\nimport { createMethodContext } from '../context-compat.mjs'\n\n/**\n * Type helper to constrain a PropertyDescriptor's value to match an endpoint signature.\n * Note: In legacy decorators, type constraints are checked when the decorator is applied,\n * but may not be preserved perfectly when decorators are stacked.\n */\ntype EndpointMethodDescriptor<Config extends EndpointOptions> =\n TypedPropertyDescriptor<\n (\n params: RequestArgs<\n Config['url'],\n Config['querySchema'],\n Config['requestSchema'],\n Config['urlParamsSchema'],\n true\n >,\n ) => Promise<z.input<Config['responseSchema']>>\n >\n\n/**\n * Legacy-compatible Endpoint decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n * Provides type safety by ensuring method signatures match the endpoint configuration.\n *\n * @param endpoint - The endpoint declaration from @navios/builder\n * @returns A method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller()\n * export class UserController {\n * @Endpoint(getUserEndpoint)\n * async getUser(request: EndpointParams<typeof getUserEndpoint>): EndpointResult<typeof getUserEndpoint> {\n * return { id: '1', name: 'John' }\n * }\n * }\n * ```\n */\nexport function Endpoint<const Config extends EndpointOptions>(\n endpoint: EndpointHandler<Config, false>,\n) {\n return function (\n target: any,\n propertyKey: string | symbol,\n descriptor: EndpointMethodDescriptor<Config>,\n ): PropertyDescriptor | void {\n if (!descriptor) {\n throw new Error(\n '[Navios] @Endpoint decorator requires a method descriptor. Make sure experimentalDecorators is enabled.',\n )\n }\n // Type check the descriptor value matches expected signature\n const typedDescriptor = descriptor as EndpointMethodDescriptor<Config>\n const context = createMethodContext(target, propertyKey, typedDescriptor)\n const originalDecorator = OriginalEndpoint(endpoint)\n // @ts-expect-error - we don't need to type the value\n const result = originalDecorator(typedDescriptor.value, context)\n if (result !== typedDescriptor.value) {\n typedDescriptor.value = result as any\n }\n return typedDescriptor\n }\n}\n","import type {\n ClassType,\n ClassTypeWithInstance,\n InjectionToken,\n} from '@navios/di'\n\nimport type { CanActivate } from '../../interfaces/index.mjs'\n\nimport { UseGuards as OriginalUseGuards } from '../../decorators/use-guards.decorator.mjs'\nimport { createClassContext, createMethodContext } from '../context-compat.mjs'\n\n/**\n * Legacy-compatible UseGuards decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n * Can be applied to classes or methods.\n *\n * @param guards - Guard classes or injection tokens to apply\n * @returns A class or method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * // Apply to a controller\n * @Controller()\n * @UseGuards(AuthGuard, RoleGuard)\n * export class UserController { }\n *\n * // Apply to a specific endpoint\n * @Controller()\n * export class UserController {\n * @Endpoint(getUserEndpoint)\n * @UseGuards(AuthGuard)\n * async getUser() { }\n * }\n * ```\n */\nexport function UseGuards(\n ...guards: (\n | ClassTypeWithInstance<CanActivate>\n | InjectionToken<CanActivate, undefined>\n )[]\n) {\n // Create the decorator function\n // Note: TypeScript's legacy decorator system has strict type checking for decorators\n // We use a flexible implementation that works for both class and method decorators\n function decoratorImpl(\n target: ClassType | Function,\n propertyKey?: string | symbol,\n descriptor?: PropertyDescriptor,\n ): any {\n // Determine if this is a class or method decorator\n if (propertyKey !== undefined && descriptor !== undefined) {\n // Method decorator\n const context = createMethodContext(\n target as Function,\n propertyKey,\n descriptor,\n )\n const originalDecorator = OriginalUseGuards(...guards)\n const result = originalDecorator(descriptor.value, context)\n if (result !== descriptor.value) {\n descriptor.value = result\n }\n return descriptor\n } else {\n // Class decorator\n const context = createClassContext(target as ClassType)\n const originalDecorator = OriginalUseGuards(...guards)\n return originalDecorator(target as ClassType, context)\n }\n }\n\n // Return with 'any' type to work around TypeScript's strict decorator checking\n // TypeScript's legacy decorator system cannot properly type-check decorators\n // that work as both class and method decorators. The runtime behavior is correct.\n // When used as a class decorator, it returns the class (preserving type at runtime)\n // When used as a method decorator, it returns the PropertyDescriptor\n // @ts-ignore - TypeScript limitation with dual-purpose legacy decorators\n return decoratorImpl as any\n}\n","import type { HttpHeader } from '../../interfaces/index.mjs'\n\nimport { Header as OriginalHeader } from '../../decorators/header.decorator.mjs'\nimport { createMethodContext } from '../context-compat.mjs'\n\n/**\n * Legacy-compatible Header decorator.\n * \n * Works with TypeScript experimental decorators (legacy API).\n * \n * @param name - The header name (e.g., 'Content-Type', 'Cache-Control')\n * @param value - The header value (string, number, or array of strings)\n * @returns A method decorator compatible with legacy decorator API\n * \n * @example\n * ```typescript\n * @Controller()\n * export class UserController {\n * @Endpoint(getUserEndpoint)\n * @Header('Cache-Control', 'max-age=3600')\n * async getUser() {\n * return { id: '1', name: 'John' }\n * }\n * }\n * ```\n */\nexport function Header(name: HttpHeader, value: string | number | string[]) {\n return function <T extends object>(\n target: T,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor,\n ) {\n const context = createMethodContext(target, propertyKey, descriptor)\n const originalDecorator = OriginalHeader(name, value)\n const result = originalDecorator(descriptor.value, context)\n if (result !== descriptor.value) {\n descriptor.value = result\n }\n return descriptor\n }\n}\n\n","import { HttpCode as OriginalHttpCode } from '../../decorators/http-code.decorator.mjs'\nimport { createMethodContext } from '../context-compat.mjs'\n\n/**\n * Legacy-compatible HttpCode decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n *\n * @param code - The HTTP status code to return (e.g., 201, 204, 202)\n * @returns A method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller()\n * export class UserController {\n * @Endpoint(createUserEndpoint)\n * @HttpCode(201)\n * async createUser() {\n * return { id: '1', name: 'John' }\n * }\n * }\n * ```\n */\nexport function HttpCode(code: number) {\n return function <T extends object>(\n target: T,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor,\n ) {\n const context = createMethodContext(target, propertyKey, descriptor)\n const originalDecorator = OriginalHttpCode(code)\n const result = originalDecorator(descriptor.value, context)\n if (result !== descriptor.value) {\n descriptor.value = result\n }\n return descriptor\n }\n}\n","import type {\n EndpointHandler,\n EndpointOptions,\n RequestArgs,\n} from '@navios/builder'\nimport type { z } from 'zod/v4'\n\nimport { Multipart as OriginalMultipart } from '../../decorators/multipart.decorator.mjs'\nimport { createMethodContext } from '../context-compat.mjs'\n\n/**\n * Type helper to constrain a PropertyDescriptor's value to match a multipart endpoint signature.\n * Note: In legacy decorators, type constraints are checked when the decorator is applied,\n * but may not be preserved perfectly when decorators are stacked.\n */\ntype MultipartMethodDescriptor<Config extends EndpointOptions> =\n TypedPropertyDescriptor<\n (\n params: RequestArgs<\n Config['url'],\n Config['querySchema'],\n Config['requestSchema'],\n Config['urlParamsSchema'],\n true\n >,\n ) => Promise<z.input<Config['responseSchema']>>\n >\n\n/**\n * Legacy-compatible Multipart decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n * Provides type safety by ensuring method signatures match the endpoint configuration.\n *\n * @param endpoint - The multipart endpoint declaration from @navios/builder\n * @returns A method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller()\n * export class FileController {\n * @Multipart(uploadFileEndpoint)\n * async uploadFile(request: MultipartParams<typeof uploadFileEndpoint>): MultipartResult<typeof uploadFileEndpoint> {\n * const { file } = request.data\n * return { url: 'https://example.com/file.jpg' }\n * }\n * }\n * ```\n */\nexport function Multipart<const Config extends EndpointOptions>(\n endpoint: EndpointHandler<Config, false>,\n) {\n return function <T extends object>(\n target: T,\n propertyKey: string | symbol,\n descriptor: MultipartMethodDescriptor<Config>,\n ): PropertyDescriptor | void {\n if (!descriptor) {\n throw new Error(\n '[Navios] @Multipart decorator requires a method descriptor. Make sure experimentalDecorators is enabled.',\n )\n }\n const context = createMethodContext(target, propertyKey, descriptor)\n const originalDecorator = OriginalMultipart(endpoint)\n // @ts-expect-error - we don't need to type the value\n const result = originalDecorator(descriptor.value, context)\n if (result !== descriptor.value) {\n descriptor.value = result as any\n }\n return descriptor\n }\n}\n","import type {\n BaseEndpointOptions,\n RequestArgs,\n StreamHandler,\n} from '@navios/builder'\n\nimport { Stream as OriginalStream } from '../../decorators/stream.decorator.mjs'\nimport { createMethodContext } from '../context-compat.mjs'\n\n/**\n * Type helper to constrain a PropertyDescriptor's value to match a stream endpoint signature.\n * Supports both with and without reply parameter (Bun doesn't use reply parameter).\n * Note: In legacy decorators, type constraints are checked when the decorator is applied,\n * but may not be preserved perfectly when decorators are stacked.\n */\ntype StreamMethodDescriptor<Config extends BaseEndpointOptions> =\n | TypedPropertyDescriptor<\n (\n params: RequestArgs<\n Config['url'],\n Config['querySchema'],\n Config['requestSchema'],\n Config['urlParamsSchema'],\n true\n >,\n reply: any,\n ) => any\n >\n | TypedPropertyDescriptor<\n (\n params: RequestArgs<\n Config['url'],\n Config['querySchema'],\n Config['requestSchema'],\n Config['urlParamsSchema'],\n true\n >,\n ) => any\n >\n\n/**\n * Legacy-compatible Stream decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n * Provides type safety by ensuring method signatures match the endpoint configuration.\n *\n * @param endpoint - The stream endpoint declaration from @navios/builder\n * @returns A method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller()\n * export class FileController {\n * @Stream(downloadFileEndpoint)\n * async downloadFile(request: StreamParams<typeof downloadFileEndpoint>, reply: any) {\n * const { fileId } = request.urlParams\n * // Stream file data to reply\n * }\n * }\n * ```\n */\nexport function Stream<const Config extends BaseEndpointOptions>(\n endpoint: StreamHandler<Config, false>,\n) {\n return function (\n target: any,\n propertyKey: string | symbol,\n descriptor: StreamMethodDescriptor<Config>,\n ): PropertyDescriptor | void {\n if (!descriptor || !descriptor.value) {\n throw new Error(\n '[Navios] @Stream decorator requires a method descriptor. Make sure experimentalDecorators is enabled.',\n )\n }\n // Type check the descriptor value matches expected signature\n const typedDescriptor = descriptor as StreamMethodDescriptor<Config>\n const context = createMethodContext(target, propertyKey, typedDescriptor)\n const originalDecorator = OriginalStream(endpoint)\n // Stage3 decorator returns void in type signature but actually returns the function\n // We know value is defined because we checked above\n const result = originalDecorator(typedDescriptor.value!, context) as\n | typeof typedDescriptor.value\n | void\n if (result && result !== typedDescriptor.value) {\n typedDescriptor.value = result as any\n }\n return typedDescriptor\n }\n}\n","import type { ClassType } from '@navios/di'\n\nimport {\n Injectable as OriginalInjectable,\n type InjectableOptions,\n} from '@navios/di'\n\nimport { createClassContext } from '../context-compat.mjs'\n\nexport type { InjectableOptions }\n\n/**\n * Legacy-compatible Injectable decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n *\n * @param options - Injectable configuration options\n * @returns A class decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Injectable()\n * export class UserService {\n * getUser(id: string) {\n * return { id, name: 'John' }\n * }\n * }\n * ```\n */\nexport function Injectable(options: InjectableOptions = {}) {\n return function (target: ClassType) {\n const context = createClassContext(target)\n // Use the no-args overload when options is empty, otherwise pass options\n const originalDecorator =\n Object.keys(options).length === 0\n ? OriginalInjectable()\n : // @ts-expect-error - InjectableOptions is a union type, we let runtime handle it\n OriginalInjectable(options)\n return originalDecorator(target, context)\n }\n}\n","import type { ClassType, FactoryOptions } from '@navios/di'\n\nimport { Factory as OriginalFactory } from '@navios/di'\n\nimport { createClassContext } from '../context-compat.mjs'\n\nexport type { FactoryOptions }\n\n/**\n * Legacy-compatible Factory decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n *\n * @param options - Factory configuration options\n * @returns A class decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Factory()\n * export class DatabaseConnectionFactory {\n * create() {\n * return { host: 'localhost', port: 5432 }\n * }\n * }\n * ```\n */\nexport function Factory(options: FactoryOptions = {}) {\n return function (target: ClassType) {\n const context = createClassContext(target)\n // Use the no-args overload when options is empty, otherwise pass options\n const originalDecorator =\n Object.keys(options).length === 0\n ? OriginalFactory()\n : OriginalFactory(options)\n return originalDecorator(target, context)\n }\n}\n","import type { z, ZodType } from 'zod/v4'\nimport type { ClassType } from '@navios/di'\n\nimport type {\n ControllerMetadata,\n HandlerMetadata,\n ModuleMetadata,\n} from '../metadata/index.mjs'\n\nimport {\n getControllerMetadata,\n getEndpointMetadata,\n getModuleMetadata,\n hasControllerMetadata,\n hasModuleMetadata,\n} from '../metadata/index.mjs'\nimport {\n getManagedMetadata,\n hasManagedMetadata,\n} from '../metadata/navios-managed.metadata.mjs'\nimport { createClassContext, createMethodContext } from './context-compat.mjs'\n\n/**\n * Type for a legacy class/method attribute decorator without a value.\n *\n * Attributes are custom metadata decorators that can be applied to modules,\n * controllers, and endpoints.\n */\nexport type LegacyClassAttribute = {\n (): ClassDecorator & MethodDecorator\n token: symbol\n}\n\n/**\n * Type for a legacy class/method attribute decorator with a validated value.\n *\n * @typeParam S - The Zod schema type for validation\n */\nexport type LegacyClassSchemaAttribute<S extends ZodType> = {\n (value: z.input<S>): ClassDecorator & MethodDecorator\n token: symbol\n schema: ZodType\n}\n\n/**\n * Legacy-compatible factory for creating custom attribute decorators.\n *\n * Works with TypeScript experimental decorators (legacy API).\n *\n * Attributes allow you to add custom metadata to modules, controllers, and endpoints.\n * This is useful for cross-cutting concerns like rate limiting, caching, API versioning, etc.\n *\n * @example\n * ```typescript\n * // Create a simple boolean attribute\n * const Public = LegacyAttributeFactory.createAttribute(Symbol.for('Public'))\n *\n * // Use it as a decorator\n * @Controller()\n * @Public()\n * export class PublicController { }\n *\n * // Check if attribute exists\n * if (LegacyAttributeFactory.has(Public, controllerMetadata)) {\n * // Skip authentication\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Create an attribute with a validated value\n * const RateLimit = LegacyAttributeFactory.createAttribute(\n * Symbol.for('RateLimit'),\n * z.object({ requests: z.number(), window: z.number() })\n * )\n *\n * // Use it with a value\n * @Endpoint(apiEndpoint)\n * @RateLimit({ requests: 100, window: 60000 })\n * async handler() { }\n *\n * // Get the value\n * const limit = LegacyAttributeFactory.get(RateLimit, endpointMetadata)\n * // limit is typed as { requests: number, window: number } | null\n * ```\n */\nexport class LegacyAttributeFactory {\n /**\n * Creates a simple attribute decorator without a value.\n *\n * @param token - A unique symbol to identify this attribute\n * @returns A decorator function that can be applied to classes or methods\n *\n * @example\n * ```typescript\n * const Public = LegacyAttributeFactory.createAttribute(Symbol.for('Public'))\n *\n * @Public()\n * @Controller()\n * export class PublicController { }\n * ```\n */\n static createAttribute(token: symbol): LegacyClassAttribute\n /**\n * Creates an attribute decorator with a validated value.\n *\n * @param token - A unique symbol to identify this attribute\n * @param schema - A Zod schema to validate the attribute value\n * @returns A decorator function that accepts a value and can be applied to classes or methods\n *\n * @example\n * ```typescript\n * const RateLimit = LegacyAttributeFactory.createAttribute(\n * Symbol.for('RateLimit'),\n * z.object({ requests: z.number(), window: z.number() })\n * )\n *\n * @RateLimit({ requests: 100, window: 60000 })\n * @Endpoint(apiEndpoint)\n * async handler() { }\n * ```\n */\n static createAttribute<T extends ZodType>(\n token: symbol,\n schema: T,\n ): LegacyClassSchemaAttribute<T>\n\n static createAttribute(token: symbol, schema?: ZodType) {\n const res = (value?: unknown) => {\n // Return a decorator that can handle both class and method targets\n function decorator(target: any): any\n function decorator(\n target: any,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor,\n ): PropertyDescriptor\n function decorator(\n target: any,\n propertyKey?: string | symbol,\n descriptor?: PropertyDescriptor,\n ): any {\n const isMethodDecorator =\n propertyKey !== undefined && descriptor !== undefined\n\n if (isMethodDecorator) {\n // Method decorator - apply to endpoint\n const context = createMethodContext(target, propertyKey, descriptor)\n const metadata = getEndpointMetadata(descriptor.value, context)\n\n if (schema) {\n const validatedValue = schema.safeParse(value)\n if (!validatedValue.success) {\n throw new Error(\n `[Navios] Invalid value for attribute ${token.toString()}: ${validatedValue.error}`,\n )\n }\n metadata.customAttributes.set(token, validatedValue.data)\n } else {\n metadata.customAttributes.set(token, true)\n }\n return descriptor\n } else {\n // Class decorator\n const isController = hasControllerMetadata(target as ClassType)\n const isModule = hasModuleMetadata(target as ClassType)\n const isManaged = hasManagedMetadata(target as ClassType)\n\n if (!isController && !isModule && !isManaged) {\n throw new Error(\n '[Navios] Attribute can only be applied to classes with @Controller, @Module, or other Navios-managed decorators',\n )\n }\n\n const context = createClassContext(target)\n const metadata = isController\n ? getControllerMetadata(target, context)\n : isModule\n ? getModuleMetadata(target, context)\n : isManaged\n ? getManagedMetadata(target)!\n : null\n\n if (!metadata) {\n throw new Error(\n '[Navios] Could not determine metadata for attribute target',\n )\n }\n\n if (schema) {\n const validatedValue = schema.safeParse(value)\n if (!validatedValue.success) {\n throw new Error(\n `[Navios] Invalid value for attribute ${token.toString()}: ${validatedValue.error}`,\n )\n }\n metadata.customAttributes.set(token, validatedValue.data)\n } else {\n metadata.customAttributes.set(token, true)\n }\n return target\n }\n }\n return decorator\n }\n res.token = token\n if (schema) {\n res.schema = schema\n }\n return res\n }\n\n /**\n * Gets the value of an attribute from metadata.\n *\n * Returns `null` if the attribute is not present.\n * For simple attributes (without values), returns `true` if present.\n *\n * @param attribute - The attribute decorator\n * @param target - The metadata object (module, controller, or handler)\n * @returns The attribute value, `true` for simple attributes, or `null` if not found\n *\n * @example\n * ```typescript\n * const isPublic = LegacyAttributeFactory.get(Public, controllerMetadata)\n * // isPublic is true | null\n *\n * const rateLimit = LegacyAttributeFactory.get(RateLimit, endpointMetadata)\n * // rateLimit is { requests: number, window: number } | null\n * ```\n */\n static get(\n attribute: LegacyClassAttribute,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): true | null\n static get<T extends ZodType>(\n attribute: LegacyClassSchemaAttribute<T>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): z.output<T> | null\n static get(\n attribute: LegacyClassAttribute | LegacyClassSchemaAttribute<any>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ) {\n return target.customAttributes.get(attribute.token) ?? null\n }\n\n /**\n * Gets all values of an attribute from metadata (useful when an attribute can appear multiple times).\n *\n * Returns `null` if the attribute is not present.\n *\n * @param attribute - The attribute decorator\n * @param target - The metadata object (module, controller, or handler)\n * @returns An array of attribute values, or `null` if not found\n *\n * @example\n * ```typescript\n * const tags = LegacyAttributeFactory.getAll(Tag, endpointMetadata)\n * // tags is string[] | null\n * ```\n */\n static getAll(\n attribute: LegacyClassAttribute,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): Array<true> | null\n static getAll<T extends ZodType>(\n attribute: LegacyClassSchemaAttribute<T>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): Array<z.output<T>> | null\n static getAll(\n attribute: LegacyClassAttribute | LegacyClassSchemaAttribute<any>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ) {\n const values = Array.from(target.customAttributes.entries())\n .filter(([key]) => key === attribute.token)\n .map(([, value]) => value)\n return values.length > 0 ? values : null\n }\n\n /**\n * Gets the last value of an attribute from an array of metadata objects.\n *\n * Searches from the end of the array backwards, useful for finding the most\n * specific attribute value (e.g., endpoint-level overrides module-level).\n *\n * @param attribute - The attribute decorator\n * @param target - An array of metadata objects (typically [module, controller, handler])\n * @returns The last attribute value found, or `null` if not found\n *\n * @example\n * ```typescript\n * // Check attribute hierarchy: endpoint -> controller -> module\n * const rateLimit = LegacyAttributeFactory.getLast(RateLimit, [\n * moduleMetadata,\n * controllerMetadata,\n * endpointMetadata\n * ])\n * ```\n */\n static getLast(\n attribute: LegacyClassAttribute,\n target: (ModuleMetadata | ControllerMetadata | HandlerMetadata<any>)[],\n ): true | null\n static getLast<T extends ZodType>(\n attribute: LegacyClassSchemaAttribute<T>,\n target: (ModuleMetadata | ControllerMetadata | HandlerMetadata<any>)[],\n ): z.output<T> | null\n static getLast(\n attribute: LegacyClassAttribute | LegacyClassSchemaAttribute<any>,\n target: (ModuleMetadata | ControllerMetadata | HandlerMetadata<any>)[],\n ) {\n for (let i = target.length - 1; i >= 0; i--) {\n const value = target[i].customAttributes.get(attribute.token)\n if (value) {\n return value\n }\n }\n return null\n }\n\n /**\n * Checks if an attribute is present on the metadata object.\n *\n * @param attribute - The attribute decorator\n * @param target - The metadata object (module, controller, or handler)\n * @returns `true` if the attribute is present, `false` otherwise\n *\n * @example\n * ```typescript\n * if (LegacyAttributeFactory.has(Public, controllerMetadata)) {\n * // Skip authentication\n * }\n * ```\n */\n static has(\n attribute: LegacyClassAttribute,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): boolean\n static has<T extends ZodType>(\n attribute: LegacyClassSchemaAttribute<T>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): boolean\n static has(\n attribute: LegacyClassAttribute | LegacyClassSchemaAttribute<any>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ) {\n return target.customAttributes.has(attribute.token)\n }\n}\n\n// Re-export as AttributeFactory for convenience\nexport { LegacyAttributeFactory as AttributeFactory }\n"],"mappings":";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Y,UAAUV,MAAAA;AACxC,UAAI,CAACS,eAAeE,QAClB,OAAM,IAAIC,MACR,wCAAwCf,MAAMgB,UAAQ,CAAG,IAAIJ,eAAeK,QAAO;AAGvFN,eAASO,iBAAiBC,IAAInB,OAAOY,eAAeQ,KAAI;WAExDT,UAASO,iBAAiBC,IAAInB,OAAO,KAAA;AAEvC,YAAOK;;;AAGX,UAAOD;;AAETF,MAAIF,QAAQA;AACZ,MAAIC,OACFC,KAAID,SAASA;AAEf,SAAOC;;CA8BT,OAAOsB,IACLC,WACApB,QACA;AACA,SAAOA,OAAOa,iBAAiBM,IAAIC,UAAUzB,MAAK,IAAK;;CA0BzD,OAAO0B,OACLD,WACApB,QACA;EACA,MAAMsB,SAASC,MAAMC,KAAKxB,OAAOa,iBAAiBY,SAAO,CAAA,CACtDC,QAAQ,CAACC,SAASA,QAAQP,UAAUzB,MAAK,CACzCiC,KAAK,GAAG9B,WAAWA,MAAAA;AACtB,SAAOwB,OAAOO,SAAS,IAAIP,SAAS;;CA+BtC,OAAOQ,QACLV,WACApB,QACA;AACA,OAAK,IAAI+B,IAAI/B,OAAO6B,SAAS,GAAGE,KAAK,GAAGA,KAAK;GAC3C,MAAMjC,QAAQE,OAAO+B,GAAGlB,iBAAiBM,IAAIC,UAAUzB,MAAK;AAC5D,OAAIG,MACF,QAAOA;;AAGX,SAAO;;CAyBT,OAAOkC,IACLZ,WACApB,QACA;AACA,SAAOA,OAAOa,iBAAiBmB,IAAIZ,UAAUzB,MAAK"}
1
+ {"version":3,"file":"index.cjs","names":["createClassContext","Module","OriginalModule","options","controllers","imports","guards","target","context","originalDecorator","createClassContext","Controller","OriginalController","options","target","context","originalDecorator","createMethodContext","Endpoint","OriginalEndpoint","endpoint","target","propertyKey","descriptor","Error","typedDescriptor","context","originalDecorator","result","value","createClassContext","createMethodContext","UseGuards","OriginalUseGuards","guards","decoratorImpl","target","propertyKey","descriptor","undefined","context","originalDecorator","result","value","createMethodContext","Header","OriginalHeader","name","value","target","propertyKey","descriptor","context","originalDecorator","result","createMethodContext","HttpCode","OriginalHttpCode","code","target","propertyKey","descriptor","context","originalDecorator","result","value","createMethodContext","Multipart","OriginalMultipart","endpoint","target","propertyKey","descriptor","Error","context","originalDecorator","result","value","createMethodContext","Stream","OriginalStream","endpoint","target","propertyKey","descriptor","value","Error","typedDescriptor","context","originalDecorator","result","createClassContext","createMethodContext","getControllerMetadata","getEndpointMetadata","getModuleMetadata","hasControllerMetadata","hasModuleMetadata","getManagedMetadata","hasManagedMetadata","LegacyAttributeFactory","createAttribute","token","schema","res","value","decorator","target","propertyKey","descriptor","isMethodDecorator","undefined","context","metadata","validatedValue","safeParse","success","Error","toString","error","customAttributes","set","data","isController","isModule","isManaged","get","attribute","getAll","values","Array","from","entries","filter","key","map","length","getLast","i","has","AttributeFactory"],"sources":["../../src/legacy-compat/decorators/module.decorator.mts","../../src/legacy-compat/decorators/controller.decorator.mts","../../src/legacy-compat/decorators/endpoint.decorator.mts","../../src/legacy-compat/decorators/use-guards.decorator.mts","../../src/legacy-compat/decorators/header.decorator.mts","../../src/legacy-compat/decorators/http-code.decorator.mts","../../src/legacy-compat/decorators/multipart.decorator.mts","../../src/legacy-compat/decorators/stream.decorator.mts","../../src/legacy-compat/attribute.factory.mts"],"sourcesContent":["import type { ClassType } from '@navios/di'\nimport { createClassContext } from '@navios/di/legacy-compat'\n\nimport { Module as OriginalModule, type ModuleOptions } from '../../decorators/module.decorator.mjs'\n\n/**\n * Legacy-compatible Module decorator.\n * \n * Works with TypeScript experimental decorators (legacy API).\n * \n * @param options - Module configuration options\n * @returns A class decorator compatible with legacy decorator API\n * \n * @example\n * ```typescript\n * @Module({\n * controllers: [UserController, AuthController],\n * imports: [DatabaseModule],\n * guards: [AuthGuard],\n * })\n * export class AppModule {}\n * ```\n */\nexport function Module(\n options: ModuleOptions = {\n controllers: [],\n imports: [],\n guards: [],\n },\n) {\n return function (target: ClassType) {\n const context = createClassContext(target)\n const originalDecorator = OriginalModule(options)\n return originalDecorator(target, context)\n }\n}\n\n","import type { ClassType } from '@navios/di'\nimport { createClassContext } from '@navios/di/legacy-compat'\n\nimport type { ControllerOptions } from '../../decorators/controller.decorator.mjs'\n\nimport { Controller as OriginalController } from '../../decorators/controller.decorator.mjs'\n\n/**\n * Legacy-compatible Controller decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n *\n * @param options - Controller configuration options\n * @returns A class decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller({ guards: [AuthGuard] })\n * export class UserController {\n * @Endpoint(getUserEndpoint)\n * async getUser() { }\n * }\n * ```\n */\nexport function Controller(options: ControllerOptions = {}) {\n return function (target: ClassType) {\n const context = createClassContext(target)\n const originalDecorator = OriginalController(options)\n return originalDecorator(target, context)\n }\n}\n","import type {\n EndpointHandler,\n EndpointOptions,\n RequestArgs,\n} from '@navios/builder'\nimport { createMethodContext } from '@navios/di/legacy-compat'\nimport type { z } from 'zod/v4'\n\nimport { Endpoint as OriginalEndpoint } from '../../decorators/endpoint.decorator.mjs'\n\n/**\n * Type helper to constrain a PropertyDescriptor's value to match an endpoint signature.\n * Note: In legacy decorators, type constraints are checked when the decorator is applied,\n * but may not be preserved perfectly when decorators are stacked.\n */\ntype EndpointMethodDescriptor<Config extends EndpointOptions> =\n TypedPropertyDescriptor<\n (\n params: RequestArgs<\n Config['url'],\n Config['querySchema'],\n Config['requestSchema'],\n Config['urlParamsSchema'],\n true\n >,\n ) => Promise<z.input<Config['responseSchema']>>\n >\n\n/**\n * Legacy-compatible Endpoint decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n * Provides type safety by ensuring method signatures match the endpoint configuration.\n *\n * @param endpoint - The endpoint declaration from @navios/builder\n * @returns A method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller()\n * export class UserController {\n * @Endpoint(getUserEndpoint)\n * async getUser(request: EndpointParams<typeof getUserEndpoint>): EndpointResult<typeof getUserEndpoint> {\n * return { id: '1', name: 'John' }\n * }\n * }\n * ```\n */\nexport function Endpoint<const Config extends EndpointOptions>(\n endpoint: EndpointHandler<Config, false>,\n) {\n return function (\n target: any,\n propertyKey: string | symbol,\n descriptor: EndpointMethodDescriptor<Config>,\n ): PropertyDescriptor | void {\n if (!descriptor) {\n throw new Error(\n '[Navios] @Endpoint decorator requires a method descriptor. Make sure experimentalDecorators is enabled.',\n )\n }\n // Type check the descriptor value matches expected signature\n const typedDescriptor = descriptor as EndpointMethodDescriptor<Config>\n const context = createMethodContext(target, propertyKey, typedDescriptor)\n const originalDecorator = OriginalEndpoint(endpoint)\n // @ts-expect-error - we don't need to type the value\n const result = originalDecorator(typedDescriptor.value, context)\n if (result !== typedDescriptor.value) {\n typedDescriptor.value = result as any\n }\n return typedDescriptor\n }\n}\n","import type {\n ClassType,\n ClassTypeWithInstance,\n InjectionToken,\n} from '@navios/di'\nimport { createClassContext, createMethodContext } from '@navios/di/legacy-compat'\n\nimport type { CanActivate } from '../../interfaces/index.mjs'\n\nimport { UseGuards as OriginalUseGuards } from '../../decorators/use-guards.decorator.mjs'\n\n/**\n * Legacy-compatible UseGuards decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n * Can be applied to classes or methods.\n *\n * @param guards - Guard classes or injection tokens to apply\n * @returns A class or method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * // Apply to a controller\n * @Controller()\n * @UseGuards(AuthGuard, RoleGuard)\n * export class UserController { }\n *\n * // Apply to a specific endpoint\n * @Controller()\n * export class UserController {\n * @Endpoint(getUserEndpoint)\n * @UseGuards(AuthGuard)\n * async getUser() { }\n * }\n * ```\n */\nexport function UseGuards(\n ...guards: (\n | ClassTypeWithInstance<CanActivate>\n | InjectionToken<CanActivate, undefined>\n )[]\n) {\n // Create the decorator function\n // Note: TypeScript's legacy decorator system has strict type checking for decorators\n // We use a flexible implementation that works for both class and method decorators\n function decoratorImpl(\n target: ClassType | Function,\n propertyKey?: string | symbol,\n descriptor?: PropertyDescriptor,\n ): any {\n // Determine if this is a class or method decorator\n if (propertyKey !== undefined && descriptor !== undefined) {\n // Method decorator\n const context = createMethodContext(\n target as Function,\n propertyKey,\n descriptor,\n )\n const originalDecorator = OriginalUseGuards(...guards)\n const result = originalDecorator(descriptor.value, context)\n if (result !== descriptor.value) {\n descriptor.value = result\n }\n return descriptor\n } else {\n // Class decorator\n const context = createClassContext(target as ClassType)\n const originalDecorator = OriginalUseGuards(...guards)\n return originalDecorator(target as ClassType, context)\n }\n }\n\n // Return with 'any' type to work around TypeScript's strict decorator checking\n // TypeScript's legacy decorator system cannot properly type-check decorators\n // that work as both class and method decorators. The runtime behavior is correct.\n // When used as a class decorator, it returns the class (preserving type at runtime)\n // When used as a method decorator, it returns the PropertyDescriptor\n // @ts-ignore - TypeScript limitation with dual-purpose legacy decorators\n return decoratorImpl as any\n}\n","import { createMethodContext } from '@navios/di/legacy-compat'\n\nimport type { HttpHeader } from '../../interfaces/index.mjs'\n\nimport { Header as OriginalHeader } from '../../decorators/header.decorator.mjs'\n\n/**\n * Legacy-compatible Header decorator.\n * \n * Works with TypeScript experimental decorators (legacy API).\n * \n * @param name - The header name (e.g., 'Content-Type', 'Cache-Control')\n * @param value - The header value (string, number, or array of strings)\n * @returns A method decorator compatible with legacy decorator API\n * \n * @example\n * ```typescript\n * @Controller()\n * export class UserController {\n * @Endpoint(getUserEndpoint)\n * @Header('Cache-Control', 'max-age=3600')\n * async getUser() {\n * return { id: '1', name: 'John' }\n * }\n * }\n * ```\n */\nexport function Header(name: HttpHeader, value: string | number | string[]) {\n return function <T extends object>(\n target: T,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor,\n ) {\n const context = createMethodContext(target, propertyKey, descriptor)\n const originalDecorator = OriginalHeader(name, value)\n const result = originalDecorator(descriptor.value, context)\n if (result !== descriptor.value) {\n descriptor.value = result\n }\n return descriptor\n }\n}\n\n","import { createMethodContext } from '@navios/di/legacy-compat'\n\nimport { HttpCode as OriginalHttpCode } from '../../decorators/http-code.decorator.mjs'\n\n/**\n * Legacy-compatible HttpCode decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n *\n * @param code - The HTTP status code to return (e.g., 201, 204, 202)\n * @returns A method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller()\n * export class UserController {\n * @Endpoint(createUserEndpoint)\n * @HttpCode(201)\n * async createUser() {\n * return { id: '1', name: 'John' }\n * }\n * }\n * ```\n */\nexport function HttpCode(code: number) {\n return function <T extends object>(\n target: T,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor,\n ) {\n const context = createMethodContext(target, propertyKey, descriptor)\n const originalDecorator = OriginalHttpCode(code)\n const result = originalDecorator(descriptor.value, context)\n if (result !== descriptor.value) {\n descriptor.value = result\n }\n return descriptor\n }\n}\n","import type {\n EndpointHandler,\n EndpointOptions,\n RequestArgs,\n} from '@navios/builder'\nimport { createMethodContext } from '@navios/di/legacy-compat'\nimport type { z } from 'zod/v4'\n\nimport { Multipart as OriginalMultipart } from '../../decorators/multipart.decorator.mjs'\n\n/**\n * Type helper to constrain a PropertyDescriptor's value to match a multipart endpoint signature.\n * Note: In legacy decorators, type constraints are checked when the decorator is applied,\n * but may not be preserved perfectly when decorators are stacked.\n */\ntype MultipartMethodDescriptor<Config extends EndpointOptions> =\n TypedPropertyDescriptor<\n (\n params: RequestArgs<\n Config['url'],\n Config['querySchema'],\n Config['requestSchema'],\n Config['urlParamsSchema'],\n true\n >,\n ) => Promise<z.input<Config['responseSchema']>>\n >\n\n/**\n * Legacy-compatible Multipart decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n * Provides type safety by ensuring method signatures match the endpoint configuration.\n *\n * @param endpoint - The multipart endpoint declaration from @navios/builder\n * @returns A method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller()\n * export class FileController {\n * @Multipart(uploadFileEndpoint)\n * async uploadFile(request: MultipartParams<typeof uploadFileEndpoint>): MultipartResult<typeof uploadFileEndpoint> {\n * const { file } = request.data\n * return { url: 'https://example.com/file.jpg' }\n * }\n * }\n * ```\n */\nexport function Multipart<const Config extends EndpointOptions>(\n endpoint: EndpointHandler<Config, false>,\n) {\n return function <T extends object>(\n target: T,\n propertyKey: string | symbol,\n descriptor: MultipartMethodDescriptor<Config>,\n ): PropertyDescriptor | void {\n if (!descriptor) {\n throw new Error(\n '[Navios] @Multipart decorator requires a method descriptor. Make sure experimentalDecorators is enabled.',\n )\n }\n const context = createMethodContext(target, propertyKey, descriptor)\n const originalDecorator = OriginalMultipart(endpoint)\n // @ts-expect-error - we don't need to type the value\n const result = originalDecorator(descriptor.value, context)\n if (result !== descriptor.value) {\n descriptor.value = result as any\n }\n return descriptor\n }\n}\n","import type {\n BaseEndpointOptions,\n RequestArgs,\n StreamHandler,\n} from '@navios/builder'\nimport { createMethodContext } from '@navios/di/legacy-compat'\n\nimport { Stream as OriginalStream } from '../../decorators/stream.decorator.mjs'\n\n/**\n * Type helper to constrain a PropertyDescriptor's value to match a stream endpoint signature.\n * Supports both with and without reply parameter (Bun doesn't use reply parameter).\n * Note: In legacy decorators, type constraints are checked when the decorator is applied,\n * but may not be preserved perfectly when decorators are stacked.\n */\ntype StreamMethodDescriptor<Config extends BaseEndpointOptions> =\n | TypedPropertyDescriptor<\n (\n params: RequestArgs<\n Config['url'],\n Config['querySchema'],\n Config['requestSchema'],\n Config['urlParamsSchema'],\n true\n >,\n reply: any,\n ) => any\n >\n | TypedPropertyDescriptor<\n (\n params: RequestArgs<\n Config['url'],\n Config['querySchema'],\n Config['requestSchema'],\n Config['urlParamsSchema'],\n true\n >,\n ) => any\n >\n\n/**\n * Legacy-compatible Stream decorator.\n *\n * Works with TypeScript experimental decorators (legacy API).\n * Provides type safety by ensuring method signatures match the endpoint configuration.\n *\n * @param endpoint - The stream endpoint declaration from @navios/builder\n * @returns A method decorator compatible with legacy decorator API\n *\n * @example\n * ```typescript\n * @Controller()\n * export class FileController {\n * @Stream(downloadFileEndpoint)\n * async downloadFile(request: StreamParams<typeof downloadFileEndpoint>, reply: any) {\n * const { fileId } = request.urlParams\n * // Stream file data to reply\n * }\n * }\n * ```\n */\nexport function Stream<const Config extends BaseEndpointOptions>(\n endpoint: StreamHandler<Config, false>,\n) {\n return function (\n target: any,\n propertyKey: string | symbol,\n descriptor: StreamMethodDescriptor<Config>,\n ): PropertyDescriptor | void {\n if (!descriptor || !descriptor.value) {\n throw new Error(\n '[Navios] @Stream decorator requires a method descriptor. Make sure experimentalDecorators is enabled.',\n )\n }\n // Type check the descriptor value matches expected signature\n const typedDescriptor = descriptor as StreamMethodDescriptor<Config>\n const context = createMethodContext(target, propertyKey, typedDescriptor)\n const originalDecorator = OriginalStream(endpoint)\n // Stage3 decorator returns void in type signature but actually returns the function\n // We know value is defined because we checked above\n const result = originalDecorator(typedDescriptor.value!, context) as\n | typeof typedDescriptor.value\n | void\n if (result && result !== typedDescriptor.value) {\n typedDescriptor.value = result as any\n }\n return typedDescriptor\n }\n}\n","import type { ClassType } from '@navios/di'\nimport { createClassContext, createMethodContext } from '@navios/di/legacy-compat'\nimport type { z, ZodType } from 'zod/v4'\n\nimport type {\n ControllerMetadata,\n HandlerMetadata,\n ModuleMetadata,\n} from '../metadata/index.mjs'\n\nimport {\n getControllerMetadata,\n getEndpointMetadata,\n getModuleMetadata,\n hasControllerMetadata,\n hasModuleMetadata,\n} from '../metadata/index.mjs'\nimport {\n getManagedMetadata,\n hasManagedMetadata,\n} from '../metadata/navios-managed.metadata.mjs'\n\n/**\n * Type for a legacy class/method attribute decorator without a value.\n *\n * Attributes are custom metadata decorators that can be applied to modules,\n * controllers, and endpoints.\n */\nexport type LegacyClassAttribute = {\n (): ClassDecorator & MethodDecorator\n token: symbol\n}\n\n/**\n * Type for a legacy class/method attribute decorator with a validated value.\n *\n * @typeParam S - The Zod schema type for validation\n */\nexport type LegacyClassSchemaAttribute<S extends ZodType> = {\n (value: z.input<S>): ClassDecorator & MethodDecorator\n token: symbol\n schema: ZodType\n}\n\n/**\n * Legacy-compatible factory for creating custom attribute decorators.\n *\n * Works with TypeScript experimental decorators (legacy API).\n *\n * Attributes allow you to add custom metadata to modules, controllers, and endpoints.\n * This is useful for cross-cutting concerns like rate limiting, caching, API versioning, etc.\n *\n * @example\n * ```typescript\n * // Create a simple boolean attribute\n * const Public = LegacyAttributeFactory.createAttribute(Symbol.for('Public'))\n *\n * // Use it as a decorator\n * @Controller()\n * @Public()\n * export class PublicController { }\n *\n * // Check if attribute exists\n * if (LegacyAttributeFactory.has(Public, controllerMetadata)) {\n * // Skip authentication\n * }\n * ```\n *\n * @example\n * ```typescript\n * // Create an attribute with a validated value\n * const RateLimit = LegacyAttributeFactory.createAttribute(\n * Symbol.for('RateLimit'),\n * z.object({ requests: z.number(), window: z.number() })\n * )\n *\n * // Use it with a value\n * @Endpoint(apiEndpoint)\n * @RateLimit({ requests: 100, window: 60000 })\n * async handler() { }\n *\n * // Get the value\n * const limit = LegacyAttributeFactory.get(RateLimit, endpointMetadata)\n * // limit is typed as { requests: number, window: number } | null\n * ```\n */\nexport class LegacyAttributeFactory {\n /**\n * Creates a simple attribute decorator without a value.\n *\n * @param token - A unique symbol to identify this attribute\n * @returns A decorator function that can be applied to classes or methods\n *\n * @example\n * ```typescript\n * const Public = LegacyAttributeFactory.createAttribute(Symbol.for('Public'))\n *\n * @Public()\n * @Controller()\n * export class PublicController { }\n * ```\n */\n static createAttribute(token: symbol): LegacyClassAttribute\n /**\n * Creates an attribute decorator with a validated value.\n *\n * @param token - A unique symbol to identify this attribute\n * @param schema - A Zod schema to validate the attribute value\n * @returns A decorator function that accepts a value and can be applied to classes or methods\n *\n * @example\n * ```typescript\n * const RateLimit = LegacyAttributeFactory.createAttribute(\n * Symbol.for('RateLimit'),\n * z.object({ requests: z.number(), window: z.number() })\n * )\n *\n * @RateLimit({ requests: 100, window: 60000 })\n * @Endpoint(apiEndpoint)\n * async handler() { }\n * ```\n */\n static createAttribute<T extends ZodType>(\n token: symbol,\n schema: T,\n ): LegacyClassSchemaAttribute<T>\n\n static createAttribute(token: symbol, schema?: ZodType) {\n const res = (value?: unknown) => {\n // Return a decorator that can handle both class and method targets\n function decorator(target: any): any\n function decorator(\n target: any,\n propertyKey: string | symbol,\n descriptor: PropertyDescriptor,\n ): PropertyDescriptor\n function decorator(\n target: any,\n propertyKey?: string | symbol,\n descriptor?: PropertyDescriptor,\n ): any {\n const isMethodDecorator =\n propertyKey !== undefined && descriptor !== undefined\n\n if (isMethodDecorator) {\n // Method decorator - apply to endpoint\n const context = createMethodContext(target, propertyKey, descriptor)\n const metadata = getEndpointMetadata(descriptor.value, context)\n\n if (schema) {\n const validatedValue = schema.safeParse(value)\n if (!validatedValue.success) {\n throw new Error(\n `[Navios] Invalid value for attribute ${token.toString()}: ${validatedValue.error}`,\n )\n }\n metadata.customAttributes.set(token, validatedValue.data)\n } else {\n metadata.customAttributes.set(token, true)\n }\n return descriptor\n } else {\n // Class decorator\n const isController = hasControllerMetadata(target as ClassType)\n const isModule = hasModuleMetadata(target as ClassType)\n const isManaged = hasManagedMetadata(target as ClassType)\n\n if (!isController && !isModule && !isManaged) {\n throw new Error(\n '[Navios] Attribute can only be applied to classes with @Controller, @Module, or other Navios-managed decorators',\n )\n }\n\n const context = createClassContext(target)\n const metadata = isController\n ? getControllerMetadata(target, context)\n : isModule\n ? getModuleMetadata(target, context)\n : isManaged\n ? getManagedMetadata(target)!\n : null\n\n if (!metadata) {\n throw new Error(\n '[Navios] Could not determine metadata for attribute target',\n )\n }\n\n if (schema) {\n const validatedValue = schema.safeParse(value)\n if (!validatedValue.success) {\n throw new Error(\n `[Navios] Invalid value for attribute ${token.toString()}: ${validatedValue.error}`,\n )\n }\n metadata.customAttributes.set(token, validatedValue.data)\n } else {\n metadata.customAttributes.set(token, true)\n }\n return target\n }\n }\n return decorator\n }\n res.token = token\n if (schema) {\n res.schema = schema\n }\n return res\n }\n\n /**\n * Gets the value of an attribute from metadata.\n *\n * Returns `null` if the attribute is not present.\n * For simple attributes (without values), returns `true` if present.\n *\n * @param attribute - The attribute decorator\n * @param target - The metadata object (module, controller, or handler)\n * @returns The attribute value, `true` for simple attributes, or `null` if not found\n *\n * @example\n * ```typescript\n * const isPublic = LegacyAttributeFactory.get(Public, controllerMetadata)\n * // isPublic is true | null\n *\n * const rateLimit = LegacyAttributeFactory.get(RateLimit, endpointMetadata)\n * // rateLimit is { requests: number, window: number } | null\n * ```\n */\n static get(\n attribute: LegacyClassAttribute,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): true | null\n static get<T extends ZodType>(\n attribute: LegacyClassSchemaAttribute<T>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): z.output<T> | null\n static get(\n attribute: LegacyClassAttribute | LegacyClassSchemaAttribute<any>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ) {\n return target.customAttributes.get(attribute.token) ?? null\n }\n\n /**\n * Gets all values of an attribute from metadata (useful when an attribute can appear multiple times).\n *\n * Returns `null` if the attribute is not present.\n *\n * @param attribute - The attribute decorator\n * @param target - The metadata object (module, controller, or handler)\n * @returns An array of attribute values, or `null` if not found\n *\n * @example\n * ```typescript\n * const tags = LegacyAttributeFactory.getAll(Tag, endpointMetadata)\n * // tags is string[] | null\n * ```\n */\n static getAll(\n attribute: LegacyClassAttribute,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): Array<true> | null\n static getAll<T extends ZodType>(\n attribute: LegacyClassSchemaAttribute<T>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): Array<z.output<T>> | null\n static getAll(\n attribute: LegacyClassAttribute | LegacyClassSchemaAttribute<any>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ) {\n const values = Array.from(target.customAttributes.entries())\n .filter(([key]) => key === attribute.token)\n .map(([, value]) => value)\n return values.length > 0 ? values : null\n }\n\n /**\n * Gets the last value of an attribute from an array of metadata objects.\n *\n * Searches from the end of the array backwards, useful for finding the most\n * specific attribute value (e.g., endpoint-level overrides module-level).\n *\n * @param attribute - The attribute decorator\n * @param target - An array of metadata objects (typically [module, controller, handler])\n * @returns The last attribute value found, or `null` if not found\n *\n * @example\n * ```typescript\n * // Check attribute hierarchy: endpoint -> controller -> module\n * const rateLimit = LegacyAttributeFactory.getLast(RateLimit, [\n * moduleMetadata,\n * controllerMetadata,\n * endpointMetadata\n * ])\n * ```\n */\n static getLast(\n attribute: LegacyClassAttribute,\n target: (ModuleMetadata | ControllerMetadata | HandlerMetadata<any>)[],\n ): true | null\n static getLast<T extends ZodType>(\n attribute: LegacyClassSchemaAttribute<T>,\n target: (ModuleMetadata | ControllerMetadata | HandlerMetadata<any>)[],\n ): z.output<T> | null\n static getLast(\n attribute: LegacyClassAttribute | LegacyClassSchemaAttribute<any>,\n target: (ModuleMetadata | ControllerMetadata | HandlerMetadata<any>)[],\n ) {\n for (let i = target.length - 1; i >= 0; i--) {\n const value = target[i].customAttributes.get(attribute.token)\n if (value) {\n return value\n }\n }\n return null\n }\n\n /**\n * Checks if an attribute is present on the metadata object.\n *\n * @param attribute - The attribute decorator\n * @param target - The metadata object (module, controller, or handler)\n * @returns `true` if the attribute is present, `false` otherwise\n *\n * @example\n * ```typescript\n * if (LegacyAttributeFactory.has(Public, controllerMetadata)) {\n * // Skip authentication\n * }\n * ```\n */\n static has(\n attribute: LegacyClassAttribute,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): boolean\n static has<T extends ZodType>(\n attribute: LegacyClassSchemaAttribute<T>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ): boolean\n static has(\n attribute: LegacyClassAttribute | LegacyClassSchemaAttribute<any>,\n target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>,\n ) {\n return target.customAttributes.has(attribute.token)\n }\n}\n\n// Re-export as AttributeFactory for convenience\nexport { LegacyAttributeFactory as AttributeFactory }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAuBA,SAAgBC,OACdE,UAAyB;CACvBC,aAAa,EAAE;CACfC,SAAS,EAA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AIF,QAAQA;AACZ,MAAIC,OACFC,KAAID,SAASA;AAEf,SAAOC;;CA8BT,OAAOsB,IACLC,WACApB,QACA;AACA,SAAOA,OAAOa,iBAAiBM,IAAIC,UAAUzB,MAAK,IAAK;;CA0BzD,OAAO0B,OACLD,WACApB,QACA;EACA,MAAMsB,SAASC,MAAMC,KAAKxB,OAAOa,iBAAiBY,SAAO,CAAA,CACtDC,QAAQ,CAACC,SAASA,QAAQP,UAAUzB,MAAK,CACzCiC,KAAK,GAAG9B,WAAWA,MAAAA;AACtB,SAAOwB,OAAOO,SAAS,IAAIP,SAAS;;CA+BtC,OAAOQ,QACLV,WACApB,QACA;AACA,OAAK,IAAI+B,IAAI/B,OAAO6B,SAAS,GAAGE,KAAK,GAAGA,KAAK;GAC3C,MAAMjC,QAAQE,OAAO+B,GAAGlB,iBAAiBM,IAAIC,UAAUzB,MAAK;AAC5D,OAAIG,MACF,QAAOA;;AAGX,SAAO;;CAyBT,OAAOkC,IACLZ,WACApB,QACA;AACA,SAAOA,OAAOa,iBAAiBmB,IAAIZ,UAAUzB,MAAK"}
@@ -1,7 +1,8 @@
1
- import { Cn as ControllerOptions, an as ModuleMetadata, at as MultipartResult, bn as EndpointParams, gn as HandlerMetadata, gt as HttpHeader, it as MultipartParams, nt as StreamParams, st as ModuleOptions, un as ControllerMetadata, vt as CanActivate, xn as EndpointResult } from "../index-DZ6NU03y.cjs";
2
- import { ClassType, ClassTypeWithInstance, FactoryOptions, InjectableOptions, InjectionToken } from "@navios/di";
1
+ import { On as EndpointParams, St as HttpHeader, ct as StreamParams, dt as MultipartResult, jn as ControllerOptions, kn as EndpointResult, pn as ModuleMetadata, pt as ModuleOptions, ut as MultipartParams, vn as ControllerMetadata, wn as HandlerMetadata, wt as CanActivate } from "../index-CP80H6Dh.cjs";
2
+ import { ClassType, ClassTypeWithInstance, InjectionToken } from "@navios/di";
3
3
  import { ZodType, z as z$1 } from "zod/v4";
4
4
  import { BaseEndpointOptions, EndpointHandler, EndpointOptions, RequestArgs, StreamHandler } from "@navios/builder";
5
+ import { Factory, FactoryOptions, Injectable, InjectableOptions, createClassContext, createMethodContext } from "@navios/di/legacy-compat";
5
6
 
6
7
  //#region src/legacy-compat/decorators/module.decorator.d.mts
7
8
 
@@ -210,48 +211,6 @@ type StreamMethodDescriptor<Config extends BaseEndpointOptions> = TypedPropertyD
210
211
  */
211
212
  declare function Stream<const Config extends BaseEndpointOptions>(endpoint: StreamHandler<Config, false>): (target: any, propertyKey: string | symbol, descriptor: StreamMethodDescriptor<Config>) => PropertyDescriptor | void;
212
213
  //#endregion
213
- //#region src/legacy-compat/decorators/injectable.decorator.d.mts
214
- /**
215
- * Legacy-compatible Injectable decorator.
216
- *
217
- * Works with TypeScript experimental decorators (legacy API).
218
- *
219
- * @param options - Injectable configuration options
220
- * @returns A class decorator compatible with legacy decorator API
221
- *
222
- * @example
223
- * ```typescript
224
- * @Injectable()
225
- * export class UserService {
226
- * getUser(id: string) {
227
- * return { id, name: 'John' }
228
- * }
229
- * }
230
- * ```
231
- */
232
- declare function Injectable(options?: InjectableOptions): (target: ClassType) => ClassType;
233
- //#endregion
234
- //#region src/legacy-compat/decorators/factory.decorator.d.mts
235
- /**
236
- * Legacy-compatible Factory decorator.
237
- *
238
- * Works with TypeScript experimental decorators (legacy API).
239
- *
240
- * @param options - Factory configuration options
241
- * @returns A class decorator compatible with legacy decorator API
242
- *
243
- * @example
244
- * ```typescript
245
- * @Factory()
246
- * export class DatabaseConnectionFactory {
247
- * create() {
248
- * return { host: 'localhost', port: 5432 }
249
- * }
250
- * }
251
- * ```
252
- */
253
- declare function Factory(options?: FactoryOptions): (target: ClassType) => ClassType;
254
- //#endregion
255
214
  //#region src/legacy-compat/attribute.factory.d.mts
256
215
  /**
257
216
  * Type for a legacy class/method attribute decorator without a value.
@@ -430,20 +389,5 @@ declare class LegacyAttributeFactory {
430
389
  static has<T extends ZodType>(attribute: LegacyClassSchemaAttribute<T>, target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>): boolean;
431
390
  }
432
391
  //#endregion
433
- //#region src/legacy-compat/context-compat.d.mts
434
- /**
435
- * Creates a mock ClassDecoratorContext for legacy class decorators.
436
- * @internal
437
- */
438
- declare function createClassContext(target: ClassType): ClassDecoratorContext;
439
- /**
440
- * Creates a mock ClassMethodDecoratorContext for legacy method decorators.
441
- *
442
- * Note: Method decorators need to share metadata with the class context
443
- * because endpoint metadata is stored at the class level.
444
- * @internal
445
- */
446
- declare function createMethodContext(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): ClassMethodDecoratorContext;
447
- //#endregion
448
- export { LegacyAttributeFactory as AttributeFactory, LegacyAttributeFactory, Controller, type ControllerOptions, Endpoint, type EndpointParams, type EndpointResult, Factory, Header, HttpCode, Injectable, type LegacyClassAttribute, type LegacyClassSchemaAttribute, Module, type ModuleOptions, Multipart, type MultipartParams, type MultipartResult, Stream, type StreamParams, UseGuards, createClassContext, createMethodContext };
392
+ export { LegacyAttributeFactory as AttributeFactory, LegacyAttributeFactory, Controller, type ControllerOptions, Endpoint, type EndpointParams, type EndpointResult, Factory, type FactoryOptions, Header, HttpCode, Injectable, type InjectableOptions, type LegacyClassAttribute, type LegacyClassSchemaAttribute, Module, type ModuleOptions, Multipart, type MultipartParams, type MultipartResult, Stream, type StreamParams, UseGuards, createClassContext, createMethodContext };
449
393
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/legacy-compat/decorators/module.decorator.mts","../../src/legacy-compat/decorators/controller.decorator.mts","../../src/legacy-compat/decorators/endpoint.decorator.mts","../../src/legacy-compat/decorators/use-guards.decorator.mts","../../src/legacy-compat/decorators/header.decorator.mts","../../src/legacy-compat/decorators/http-code.decorator.mts","../../src/legacy-compat/decorators/multipart.decorator.mts","../../src/legacy-compat/decorators/stream.decorator.mts","../../src/legacy-compat/decorators/injectable.decorator.mts","../../src/legacy-compat/decorators/factory.decorator.mts","../../src/legacy-compat/attribute.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AAA,EAmEL,oBAnEK,EAAA,MAAA,EAoER,cApEQ,GAoES,kBApET,GAoE8B,eApE9B,CAAA,GAAA,CAAA,CAAA,EAAA,OAAA;EAAT,OAAE,GAAA,CAAA,UAsEU,OAtEV,CAAA,CAAA,SAAA,EAuEE,0BAvEF,CAuE6B,CAvE7B,CAAA,EAAA,MAAA,EAwED,cAxEC,GAwEgB,kBAxEhB,GAwEqC,eAxErC,CAAA,GAAA,CAAA,CAAA,EAAA,OAAA;;;;;;;;iBCzOG,kBAAA,SAA2B,YAAY;;;AVVvD;;;;;iBUkCgB,mBAAA,wDAGF,qBACX"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/legacy-compat/decorators/module.decorator.mts","../../src/legacy-compat/decorators/controller.decorator.mts","../../src/legacy-compat/decorators/endpoint.decorator.mts","../../src/legacy-compat/decorators/use-guards.decorator.mts","../../src/legacy-compat/decorators/header.decorator.mts","../../src/legacy-compat/decorators/http-code.decorator.mts","../../src/legacy-compat/decorators/multipart.decorator.mts","../../src/legacy-compat/decorators/stream.decorator.mts","../../src/legacy-compat/attribute.factory.mts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;AAuBA;;;;;;;;ACCA;;;;;iBDDgB,MAAA,WACL,yBAMgB,cAAS;;;;;;;;AAPpC;;;;;;;;ACCA;;;;AACoC,iBADpB,UAAA,CACoB,OAAA,CAAA,EADA,iBACA,CAAA,EAAA,CAAA,MAAA,EAAT,SAAS,EAAA,GAAA,SAAA;;;;;;;;ADFpC,KERK,wBFQiB,CAAA,eERuB,eFQvB,CAAA,GEPpB,uBFOoB,CAAA,CAAA,MAAA,EELR,WFKQ,CEJd,MFIc,CAAA,KAAA,CAAA,EEHd,MFGc,CAAA,aAAA,CAAA,EEFd,MFEc,CAAA,eAAA,CAAA,EEDd,MFCc,CAAA,iBAAA,CAAA,EAAA,IAAA,CAAA,EAAA,GEEb,OFFa,CEEL,GAAA,CAAE,KFFG,CEEG,MFFH,CAAA,gBAAA,CAA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AA,CAAA,UAmCO,OAnCP,CAAA,CAAA,SAAA,EAoCL,0BApCK,CAoCsB,CApCtB,CAAA,EAAA,MAAA,EAAA,CAqCP,cArCO,GAqCU,kBArCV,GAqC+B,eArC/B,CAAA,GAAA,CAAA,CAAA,EAAA,CAAA,EAsCf,GAAA,CAAE,MAtCa,CAsCN,CAtCM,CAAA,GAAA,IAAA;EAAT;;;;;;;;;;;;;;EAmEI,OAAA,GAAA,CAAA,SAAA,EAAA,oBAAA,EAAA,MAAA,EACH,cADG,GACc,kBADd,GACmC,eADnC,CAAA,GAAA,CAAA,CAAA,EAAA,OAAA;EACH,OAAA,GAAA,CAAA,UAEW,OAFX,CAAA,CAAA,SAAA,EAGG,0BAHH,CAG8B,CAH9B,CAAA,EAAA,MAAA,EAIA,cAJA,GAIiB,kBAJjB,GAIsC,eAJtC,CAAA,GAAA,CAAA,CAAA,EAAA,OAAA"}
@@ -1,7 +1,8 @@
1
- import { Cn as ControllerOptions, an as ModuleMetadata, at as MultipartResult, bn as EndpointParams, gn as HandlerMetadata, gt as HttpHeader, it as MultipartParams, nt as StreamParams, st as ModuleOptions, un as ControllerMetadata, vt as CanActivate, xn as EndpointResult } from "../index-BJjk2X1S.mjs";
2
- import { ClassType, ClassTypeWithInstance, FactoryOptions, InjectableOptions, InjectionToken } from "@navios/di";
1
+ import { On as EndpointParams, St as HttpHeader, ct as StreamParams, dt as MultipartResult, jn as ControllerOptions, kn as EndpointResult, pn as ModuleMetadata, pt as ModuleOptions, ut as MultipartParams, vn as ControllerMetadata, wn as HandlerMetadata, wt as CanActivate } from "../index-BISYCYEG.mjs";
2
+ import { ClassType, ClassTypeWithInstance, InjectionToken } from "@navios/di";
3
3
  import { ZodType, z as z$1 } from "zod/v4";
4
4
  import { BaseEndpointOptions, EndpointHandler, EndpointOptions, RequestArgs, StreamHandler } from "@navios/builder";
5
+ import { Factory, FactoryOptions, Injectable, InjectableOptions, createClassContext, createMethodContext } from "@navios/di/legacy-compat";
5
6
 
6
7
  //#region src/legacy-compat/decorators/module.decorator.d.mts
7
8
 
@@ -210,48 +211,6 @@ type StreamMethodDescriptor<Config extends BaseEndpointOptions> = TypedPropertyD
210
211
  */
211
212
  declare function Stream<const Config extends BaseEndpointOptions>(endpoint: StreamHandler<Config, false>): (target: any, propertyKey: string | symbol, descriptor: StreamMethodDescriptor<Config>) => PropertyDescriptor | void;
212
213
  //#endregion
213
- //#region src/legacy-compat/decorators/injectable.decorator.d.mts
214
- /**
215
- * Legacy-compatible Injectable decorator.
216
- *
217
- * Works with TypeScript experimental decorators (legacy API).
218
- *
219
- * @param options - Injectable configuration options
220
- * @returns A class decorator compatible with legacy decorator API
221
- *
222
- * @example
223
- * ```typescript
224
- * @Injectable()
225
- * export class UserService {
226
- * getUser(id: string) {
227
- * return { id, name: 'John' }
228
- * }
229
- * }
230
- * ```
231
- */
232
- declare function Injectable(options?: InjectableOptions): (target: ClassType) => ClassType;
233
- //#endregion
234
- //#region src/legacy-compat/decorators/factory.decorator.d.mts
235
- /**
236
- * Legacy-compatible Factory decorator.
237
- *
238
- * Works with TypeScript experimental decorators (legacy API).
239
- *
240
- * @param options - Factory configuration options
241
- * @returns A class decorator compatible with legacy decorator API
242
- *
243
- * @example
244
- * ```typescript
245
- * @Factory()
246
- * export class DatabaseConnectionFactory {
247
- * create() {
248
- * return { host: 'localhost', port: 5432 }
249
- * }
250
- * }
251
- * ```
252
- */
253
- declare function Factory(options?: FactoryOptions): (target: ClassType) => ClassType;
254
- //#endregion
255
214
  //#region src/legacy-compat/attribute.factory.d.mts
256
215
  /**
257
216
  * Type for a legacy class/method attribute decorator without a value.
@@ -430,20 +389,5 @@ declare class LegacyAttributeFactory {
430
389
  static has<T extends ZodType>(attribute: LegacyClassSchemaAttribute<T>, target: ModuleMetadata | ControllerMetadata | HandlerMetadata<any>): boolean;
431
390
  }
432
391
  //#endregion
433
- //#region src/legacy-compat/context-compat.d.mts
434
- /**
435
- * Creates a mock ClassDecoratorContext for legacy class decorators.
436
- * @internal
437
- */
438
- declare function createClassContext(target: ClassType): ClassDecoratorContext;
439
- /**
440
- * Creates a mock ClassMethodDecoratorContext for legacy method decorators.
441
- *
442
- * Note: Method decorators need to share metadata with the class context
443
- * because endpoint metadata is stored at the class level.
444
- * @internal
445
- */
446
- declare function createMethodContext(target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor): ClassMethodDecoratorContext;
447
- //#endregion
448
- export { LegacyAttributeFactory as AttributeFactory, LegacyAttributeFactory, Controller, type ControllerOptions, Endpoint, type EndpointParams, type EndpointResult, Factory, Header, HttpCode, Injectable, type LegacyClassAttribute, type LegacyClassSchemaAttribute, Module, type ModuleOptions, Multipart, type MultipartParams, type MultipartResult, Stream, type StreamParams, UseGuards, createClassContext, createMethodContext };
392
+ export { LegacyAttributeFactory as AttributeFactory, LegacyAttributeFactory, Controller, type ControllerOptions, Endpoint, type EndpointParams, type EndpointResult, Factory, type FactoryOptions, Header, HttpCode, Injectable, type InjectableOptions, type LegacyClassAttribute, type LegacyClassSchemaAttribute, Module, type ModuleOptions, Multipart, type MultipartParams, type MultipartResult, Stream, type StreamParams, UseGuards, createClassContext, createMethodContext };
449
393
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/legacy-compat/decorators/module.decorator.mts","../../src/legacy-compat/decorators/controller.decorator.mts","../../src/legacy-compat/decorators/endpoint.decorator.mts","../../src/legacy-compat/decorators/use-guards.decorator.mts","../../src/legacy-compat/decorators/header.decorator.mts","../../src/legacy-compat/decorators/http-code.decorator.mts","../../src/legacy-compat/decorators/multipart.decorator.mts","../../src/legacy-compat/decorators/stream.decorator.mts","../../src/legacy-compat/decorators/injectable.decorator.mts","../../src/legacy-compat/decorators/factory.decorator.mts","../../src/legacy-compat/attribute.factory.mts","../../src/legacy-compat/context-compat.mts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAuBA;;;;;;;;ACCA;;;;;;iBDDgB,MAAA,WACL,yBAMgB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AAE,GAAA,CAAA,UAsEU,OAtEV,CAAA,CAAA,SAAA,EAuEE,0BAvEF,CAuE6B,CAvE7B,CAAA,EAAA,MAAA,EAwED,cAxEC,GAwEgB,kBAxEhB,GAwEqC,eAxErC,CAAA,GAAA,CAAA,CAAA,EAAA,OAAA;;;;;;;;iBCzOG,kBAAA,SAA2B,YAAY;;;AVVvD;;;;;iBUkCgB,mBAAA,wDAGF,qBACX"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/legacy-compat/decorators/module.decorator.mts","../../src/legacy-compat/decorators/controller.decorator.mts","../../src/legacy-compat/decorators/endpoint.decorator.mts","../../src/legacy-compat/decorators/use-guards.decorator.mts","../../src/legacy-compat/decorators/header.decorator.mts","../../src/legacy-compat/decorators/http-code.decorator.mts","../../src/legacy-compat/decorators/multipart.decorator.mts","../../src/legacy-compat/decorators/stream.decorator.mts","../../src/legacy-compat/attribute.factory.mts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;AAuBA;;;;;;;;ACCA;;;;;iBDDgB,MAAA,WACL,yBAMgB,cAAS;;;;;;;;AAPpC;;;;;;;;ACCA;;;;AACoC,iBADpB,UAAA,CACoB,OAAA,CAAA,EADA,iBACA,CAAA,EAAA,CAAA,MAAA,EAAT,SAAS,EAAA,GAAA,SAAA;;;;;;;;ADFpC,KERK,wBFQiB,CAAA,eERuB,eFQvB,CAAA,GEPpB,uBFOoB,CAAA,CAAA,MAAA,EELR,WFKQ,CEJd,MFIc,CAAA,KAAA,CAAA,EEHd,MFGc,CAAA,aAAA,CAAA,EEFd,MFEc,CAAA,eAAA,CAAA,EEDd,MFCc,CAAA,iBAAA,CAAA,EAAA,IAAA,CAAA,EAAA,GEEb,OFFa,CEEL,GAAA,CAAE,KFFG,CEEG,MFFH,CAAA,gBAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;ACCtB;;;;;;;;AClB+B;;;;;AAgBvB,iBA0BQ,QA1BR,CAAA,qBA0BsC,eA1BtC,CAAA,CAAA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