@venok/core 2.0.1-next.3 → 2.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context/proxy.js +0 -12
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/context/proxy.js
CHANGED
|
@@ -37,18 +37,6 @@ class VenokProxy {
|
|
|
37
37
|
exceptionsHandler.next(error, host);
|
|
38
38
|
return args;
|
|
39
39
|
}
|
|
40
|
-
createExceptionLayerProxy(targetCallback, exceptionsHandler, type) {
|
|
41
|
-
return async (err, req, res, next) => {
|
|
42
|
-
try {
|
|
43
|
-
await targetCallback(err, req, res, next);
|
|
44
|
-
} catch (e) {
|
|
45
|
-
const host = new ExecutionContextHost([req, res, next]);
|
|
46
|
-
host.setType(type);
|
|
47
|
-
exceptionsHandler.next(e, host);
|
|
48
|
-
return res;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
40
|
}
|
|
53
41
|
export {
|
|
54
42
|
VenokProxy
|
package/dist/index.d.ts
CHANGED
|
@@ -2185,8 +2185,7 @@ declare class VenokExceptionFilterContext extends ExceptionFilterContextCreator
|
|
|
2185
2185
|
|
|
2186
2186
|
declare class VenokProxy {
|
|
2187
2187
|
createProxy<TContext extends string = ContextType>(targetCallback: (...args: any[]) => any, exceptionsHandler: VenokExceptionsHandler, type?: ContextType): (...args: any[]) => Promise<any>;
|
|
2188
|
-
|
|
2189
|
-
createExceptionLayerProxy<TContext extends string = ContextType>(targetCallback: <TError>(err: TError, ...args: any[]) => void | Promise<void>, exceptionsHandler: VenokExceptionsHandler, type?: TContext): <TError>(err: TError, req: any, res: any, next: any) => Promise<any>;
|
|
2188
|
+
protected handleError<T>(exceptionsHandler: VenokExceptionsHandler, args: any[], error: T, type?: ContextType): any[];
|
|
2190
2189
|
}
|
|
2191
2190
|
|
|
2192
2191
|
/**
|
|
@@ -3132,4 +3131,4 @@ declare class MetaHostStorage {
|
|
|
3132
3131
|
private static getMetaKeyByInstanceWrapper;
|
|
3133
3132
|
}
|
|
3134
3133
|
|
|
3135
|
-
export { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE, type Abstract, ApplicationConfig, ApplicationContext, ApplicationContextOptions, type ArgumentMetadata, type ArgumentsHost, type AttachedEnhancerDefinition, type BeforeApplicationShutdown, Bind, CATCH_WATERMARK, CUSTOM_ROUTE_ARGS_METADATA, type CallHandler, type CanActivate, Catch, CircularDependencyException, type ClassDecoratorOptions, type ClassNode, type ClassProvider, ConsoleLogger, type ConsoleLoggerOptions, ContextCreator, type ContextId, ContextIdFactory, type ContextIdResolver, type ContextIdResolverFn, type ContextIdStrategy, type ContextType, ContextUtils, Module$1 as CoreModule, type CreateDecoratorOptions, type CustomDecorator, type CustomParamFactory, type DecoratorOptions, type DecoratorsType, Dependencies, DependenciesScanner, DeterministicUuidRegistry, type DynamicModule, ENHANCER_KEY_TO_SUBTYPE_MAP, ENHANCER_TOKEN_TO_SUBTYPE_MAP, ENTRY_PROVIDER_WATERMARK, EXCEPTION_FILTERS_METADATA, type Edge, type EnhancerMetadataCacheEntry, type EnhancerSubtype, type Entrypoint, type ExceptionFilter, type ExceptionFilterMetadata, type ExecutionContext, ExecutionContextHost, type ExistingProvider, type ExternalContextOptions, type ExternalHandlerMetadata, type Extras, FILTER_CATCH_EXCEPTIONS, FORBIDDEN_MESSAGE, type FactoryProvider, type ForwardReference, GLOBAL_MODULE_METADATA, GUARDS_METADATA, type GetOrResolveOptions, type GetParamsMetadata, Global, GraphInspector, GuardsConsumer, GuardsContextCreator, HANDLER_METADATA_SYMBOL, HandlerMetadataStorage, type HostComponentInfo, INJECTABLE_WATERMARK, INQUIRER, INSTANCE_ID_SYMBOL, INSTANCE_METADATA_SYMBOL, INTERCEPTORS_METADATA, INVALID_CLASS_MESSAGE, INVALID_CLASS_SCOPE_MESSAGE, INVALID_EXCEPTION_FILTER, INVALID_MODULE_MESSAGE, InitializeOnPreviewAllowlist, Inject, Injectable, type InjectableToken, type InjectionToken, Injector, type InjectorDependency, type InjectorDependencyContext, type InstancePerContext, InstanceWrapper, InterceptorsConsumer, InterceptorsContextCreator, type IntrospectionResult, InvalidClassException, InvalidClassModuleException, InvalidClassScopeException, InvalidDecoratorItemException, InvalidExceptionFilterException, InvalidModuleException, LOG_LEVELS, LazyModuleLoader, type LazyModuleLoaderLoadOptions, type LogLevel, Logger, type LoggerService, MESSAGES, MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION, MODULE_INIT_MESSAGE, MODULE_METADATA, MODULE_PATH, MetaHostStorage, MetadataScanner, type MethodDecoratorOptions, Module, type ModuleDefinition, type ModuleFactory, type ModuleMetadata, type ModuleNode, type ModuleOptions, ModuleRef, type ModuleRefGetOrResolveOpts, ModulesContainer, type Node, OPTIONAL_DEPS_METADATA, OPTIONAL_PROPERTY_DEPS_METADATA, type OnApplicationBootstrap, type OnApplicationShutdown, type OnModuleDestroy, type OnModuleInit, Optional, type OptionalFactoryDependency, type OrphanedEnhancerDefinition, PARAMTYPES_METADATA, PIPES_METADATA, PROPERTY_DEPS_METADATA, PROVIDER_ID_KEY, type ParamData, type ParamDecoratorEnhancer, type ParamMetadata, type ParamProperties, type ParamsMetadata, PartialGraphHost, type PipeTransform, PipesConsumer, PipesContextCreator, type PropertyDependency, type PropertyMetadata, type Provider, REQUEST, REQUEST_CONTEXT_ID, ROUTE_ARGS_METADATA, type ReflectableClassDecorator, type ReflectableDecorator, type ReflectableDecorators, type ReflectableMethodDecorator, Reflector, ReflectorAliasProvider, RuntimeException, SCOPE_OPTIONS_METADATA, SELF_DECLARED_DEPS_METADATA, STATIC_CONTEXT, Scope, type ScopeOptions, type SelectOptions, SerializedGraph, type SerializedGraphJson, type SerializedGraphMetadata, type SerializedGraphStatus, SetMetadata, type SetMetadataType, SilentLogger, type Transform, type Type, UNDEFINED_FORWARDREF_MESSAGE, UNDEFINED_MODULE_MESSAGE, UNHANDLED_RUNTIME_EXCEPTION, UNKNOWN_DEPENDENCIES_MESSAGE, UNKNOWN_EXPORT_MESSAGE, USING_INVALID_CLASS_AS_A_MODULE_MESSAGE, UndefinedDependencyException, UndefinedForwardRefException, UndefinedModuleException, UnknownDependenciesException, UnknownElementException, UnknownExportException, UnknownModuleException, UseFilters, UseGuards, UseInterceptors, UsePipes, UuidFactory, UuidFactoryMode, type ValueProvider, type VenokApplicationContext, VenokContainer, VenokContextCreator, type VenokContextCreatorInterface, VenokExceptionFilterContext, VenokFactory, type VenokInterceptor, type VenokModule, type VenokParamsFactoryInterface, VenokProxy, type WithRequired, type WithTransform, applyDecorators, assignCustomParameterMetadata, assignMetadata, colors, createContextId, createNativeParamDecorator, createNativeParamDecoratorWithoutPipes, createParamDecorator, createParamDecoratorWithoutPipes, extendArrayMetadata, filterLogLevels, flatten, getClassScope, getNonTransientInstances, getTransientInstances, inquirerProvider, isClassProvider, isColorAllowed, isConstructor, isDurable, isEmpty, isFactoryProvider, isFunction, isLogLevel, isLogLevelEnabled, isNull, isNumber, isObject, isPlainObject, isString, isSymbol, isUndefined, isValueProvider, mixin, noop, randomStringGenerator, requestProvider, rethrow, validateEach, yellow };
|
|
3134
|
+
export { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE, type Abstract, ApplicationConfig, ApplicationContext, ApplicationContextOptions, type ArgumentMetadata, type ArgumentsHost, type AttachedEnhancerDefinition, type BeforeApplicationShutdown, Bind, CATCH_WATERMARK, CUSTOM_ROUTE_ARGS_METADATA, type CallHandler, type CanActivate, Catch, CircularDependencyException, type ClassDecoratorOptions, type ClassNode, type ClassProvider, ConsoleLogger, type ConsoleLoggerOptions, ContextCreator, type ContextId, ContextIdFactory, type ContextIdResolver, type ContextIdResolverFn, type ContextIdStrategy, type ContextType, ContextUtils, Module$1 as CoreModule, type CreateDecoratorOptions, type CustomDecorator, type CustomParamFactory, type DecoratorOptions, type DecoratorsType, Dependencies, DependenciesScanner, DeterministicUuidRegistry, type DynamicModule, ENHANCER_KEY_TO_SUBTYPE_MAP, ENHANCER_TOKEN_TO_SUBTYPE_MAP, ENTRY_PROVIDER_WATERMARK, EXCEPTION_FILTERS_METADATA, type Edge, type EnhancerMetadataCacheEntry, type EnhancerSubtype, type Entrypoint, type ExceptionFilter, ExceptionFilterContextCreator, type ExceptionFilterMetadata, type ExecutionContext, ExecutionContextHost, type ExistingProvider, type ExternalContextOptions, type ExternalHandlerMetadata, type Extras, FILTER_CATCH_EXCEPTIONS, FORBIDDEN_MESSAGE, type FactoryProvider, type ForwardReference, GLOBAL_MODULE_METADATA, GUARDS_METADATA, type GetOrResolveOptions, type GetParamsMetadata, Global, GraphInspector, GuardsConsumer, GuardsContextCreator, HANDLER_METADATA_SYMBOL, HandlerMetadataStorage, type HostComponentInfo, INJECTABLE_WATERMARK, INQUIRER, INSTANCE_ID_SYMBOL, INSTANCE_METADATA_SYMBOL, INTERCEPTORS_METADATA, INVALID_CLASS_MESSAGE, INVALID_CLASS_SCOPE_MESSAGE, INVALID_EXCEPTION_FILTER, INVALID_MODULE_MESSAGE, InitializeOnPreviewAllowlist, Inject, Injectable, type InjectableToken, type InjectionToken, Injector, type InjectorDependency, type InjectorDependencyContext, type InstancePerContext, InstanceWrapper, InterceptorsConsumer, InterceptorsContextCreator, type IntrospectionResult, InvalidClassException, InvalidClassModuleException, InvalidClassScopeException, InvalidDecoratorItemException, InvalidExceptionFilterException, InvalidModuleException, LOG_LEVELS, LazyModuleLoader, type LazyModuleLoaderLoadOptions, type LogLevel, Logger, type LoggerService, MESSAGES, MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION, MODULE_INIT_MESSAGE, MODULE_METADATA, MODULE_PATH, MetaHostStorage, MetadataScanner, type MethodDecoratorOptions, Module, type ModuleDefinition, type ModuleFactory, type ModuleMetadata, type ModuleNode, type ModuleOptions, ModuleRef, type ModuleRefGetOrResolveOpts, ModulesContainer, type Node, OPTIONAL_DEPS_METADATA, OPTIONAL_PROPERTY_DEPS_METADATA, type OnApplicationBootstrap, type OnApplicationShutdown, type OnModuleDestroy, type OnModuleInit, Optional, type OptionalFactoryDependency, type OrphanedEnhancerDefinition, PARAMTYPES_METADATA, PIPES_METADATA, PROPERTY_DEPS_METADATA, PROVIDER_ID_KEY, type ParamData, type ParamDecoratorEnhancer, type ParamMetadata, type ParamProperties, type ParamsMetadata, PartialGraphHost, type PipeTransform, PipesConsumer, PipesContextCreator, type PropertyDependency, type PropertyMetadata, type Provider, REQUEST, REQUEST_CONTEXT_ID, ROUTE_ARGS_METADATA, type ReflectableClassDecorator, type ReflectableDecorator, type ReflectableDecorators, type ReflectableMethodDecorator, Reflector, ReflectorAliasProvider, RuntimeException, SCOPE_OPTIONS_METADATA, SELF_DECLARED_DEPS_METADATA, STATIC_CONTEXT, Scope, type ScopeOptions, type SelectOptions, SerializedGraph, type SerializedGraphJson, type SerializedGraphMetadata, type SerializedGraphStatus, SetMetadata, type SetMetadataType, SilentLogger, type Transform, type Type, UNDEFINED_FORWARDREF_MESSAGE, UNDEFINED_MODULE_MESSAGE, UNHANDLED_RUNTIME_EXCEPTION, UNKNOWN_DEPENDENCIES_MESSAGE, UNKNOWN_EXPORT_MESSAGE, USING_INVALID_CLASS_AS_A_MODULE_MESSAGE, UndefinedDependencyException, UndefinedForwardRefException, UndefinedModuleException, UnknownDependenciesException, UnknownElementException, UnknownExportException, UnknownModuleException, UseFilters, UseGuards, UseInterceptors, UsePipes, UuidFactory, UuidFactoryMode, type ValueProvider, type VenokApplicationContext, VenokContainer, VenokContextCreator, type VenokContextCreatorInterface, VenokExceptionFilterContext, VenokExceptionsHandler, VenokFactory, type VenokInterceptor, type VenokModule, type VenokParamsFactoryInterface, VenokProxy, type WithRequired, type WithTransform, applyDecorators, assignCustomParameterMetadata, assignMetadata, colors, createContextId, createNativeParamDecorator, createNativeParamDecoratorWithoutPipes, createParamDecorator, createParamDecoratorWithoutPipes, extendArrayMetadata, filterLogLevels, flatten, getClassScope, getNonTransientInstances, getTransientInstances, inquirerProvider, isClassProvider, isColorAllowed, isConstructor, isDurable, isEmpty, isFactoryProvider, isFunction, isLogLevel, isLogLevelEnabled, isNull, isNumber, isObject, isPlainObject, isString, isSymbol, isUndefined, isValueProvider, mixin, noop, randomStringGenerator, requestProvider, rethrow, validateEach, yellow };
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,9 @@ export * from "./errors/exceptions/unknown-element.exception.js";
|
|
|
58
58
|
export * from "./errors/exceptions/unknown-export.exception.js";
|
|
59
59
|
export * from "./errors/exceptions/unknown-module.exception.js";
|
|
60
60
|
export * from "./errors/messages.js";
|
|
61
|
+
export * from "./exceptions/handler.js";
|
|
61
62
|
export * from "./filters/context.js";
|
|
63
|
+
export * from "./filters/context-creator.js";
|
|
62
64
|
export * from "./guards/consumer.js";
|
|
63
65
|
export * from "./guards/context-creator.js";
|
|
64
66
|
export * from "./helpers/color.helper.js";
|