Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-decorators

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-decorators - npm Package Compare versions

Comparing version 3.7.1 to 3.8.0

decorators/destructor.cjs

9

bootstrap/bootstrap.js

@@ -12,5 +12,7 @@ /**

import { pathToFileURL } from 'url';
import { servicesWithDestructors } from '../decorators/destructor.js';
import { readyMap } from '../decorators/index.js';
import { injectables } from '../registry/injectables.js';
import { CREATOR, FastifyInstanceToken } from '../symbols/index.js';
import { getInstanceByToken } from '../utils/get-instance-by-token.js';
import { wrapInjectable } from '../utils/wrap-injectable.js';

@@ -28,2 +30,4 @@ const defaultMask = /\.(handler|controller)\./;

await Promise.all(readyMap.values());
if (servicesWithDestructors.size)
useGracefulShutdown(fastify);
}, {

@@ -75,2 +79,5 @@ fastify: '^3.0.0',

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL2Jvb3RzdHJhcC9ib290c3RyYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBR0gsT0FBTyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDaEMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLElBQUksQ0FBQztBQUNqQyxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQzVCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFDcEMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBSWxELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUN6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kudG9TdHJpbmcoKSkudGhlbigobSkgPT4gbS5kZWZhdWx0KTtcbn1cbiJdfQ==
function useGracefulShutdown(fastify) {
fastify.addHook('onClose', () => Promise.all([...servicesWithDestructors].map(([Service, property]) => getInstanceByToken(Service)[property]())));
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL2Jvb3RzdHJhcC9ib290c3RyYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBR0gsT0FBTyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDaEMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLElBQUksQ0FBQztBQUNqQyxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQzVCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFDcEMsT0FBTyxFQUFFLHVCQUF1QixFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFFdEUsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBR2xELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUN6RCxPQUFPLEVBQUUsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDcEUsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFDdkUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBRTdELE1BQU0sV0FBVyxHQUFHLDBCQUEwQixDQUFDO0FBRS9DLE1BQU0sQ0FBQyxNQUFNLFNBQVMsR0FBd0MsRUFBRSxDQUM5RCxLQUFLLEVBQUUsT0FBTyxFQUFFLE1BQ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1bGxGaWxlUGF0aDtcbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbmFzeW5jIGZ1bmN0aW9uIGxvYWRNb2R1bGUobW9kdWxlOiBzdHJpbmcpOiBQcm9taXNlPEluamVjdGFibGVDb250cm9sbGVyPiB7XG4gIGlmICh0eXBlb2YgcmVxdWlyZSAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAvKiBlc2xpbnQtZGlzYWJsZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tdmFyLXJlcXVpcmVzICovXG4gICAgcmV0dXJuIHJlcXVpcmUobW9kdWxlKS5fX2VzTW9kdWxlID8gcmVxdWlyZShtb2R1bGUpLmRlZmF1bHQgOiByZXF1aXJlKG1vZHVsZSk7XG4gIH1cblxuICByZXR1cm4gaW1wb3J0KHBhdGhUb0ZpbGVVUkwobW9kdWxlKS50b1N0cmluZygpKS50aGVuKChtKSA9PiBtLmRlZmF1bHQpO1xufVxuXG5mdW5jdGlvbiB1c2VHcmFjZWZ1bFNodXRkb3duKGZhc3RpZnk6IEZhc3RpZnlJbnN0YW5jZSk6IHZvaWQge1xuICBmYXN0aWZ5LmFkZEhvb2soJ29uQ2xvc2UnLCAoKSA9PlxuICAgIFByb21pc2UuYWxsKFxuICAgICAgWy4uLnNlcnZpY2VzV2l0aERlc3RydWN0b3JzXS5tYXAoKFtTZXJ2aWNlLCBwcm9wZXJ0eV0pID0+XG4gICAgICAgIGdldEluc3RhbmNlQnlUb2tlbjx0eXBlb2YgU2VydmljZT4oU2VydmljZSlbcHJvcGVydHldKCksXG4gICAgICApLFxuICAgICksXG4gICk7XG59XG4iXX0=

@@ -8,2 +8,8 @@ # Changelog

## 3.8.0
### Added
- `@Destructor` decorator for services graceful shutdown
## 3.7.1

@@ -10,0 +16,0 @@

4

decorators/controller.js

@@ -27,3 +27,3 @@ /**

await instance.register(async (instance) => {
controllerInstance = await ControllerTypeStrategies[type](instance, controller, injectablesMap, cacheResult);
controllerInstance = ControllerTypeStrategies[type](instance, controller, injectablesMap, cacheResult);
}, { prefix: route });

@@ -34,2 +34,2 @@ return controllerInstance;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2NvbnRyb2xsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBS0gsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ2hFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUN6RCxPQUFPLEVBQUUsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQzNELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHdDQUF3QyxDQUFDO0FBQ2pGLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRTNFLFNBQVMsVUFBVSxDQUFDLE1BQWtDO0lBQ3BELElBQUksT0FBTyxNQUFNLEtBQUssUUFBUTtRQUFFLE1BQU0sR0FBRyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsQ0FBQztJQUUzRCxPQUFPLEVBQUUsSUFBSSxFQUFFLGNBQWMsQ0FBQyxTQUFTLEVBQUUsS0FBSyxFQUFFLEdBQUcsRUFBRSxHQUFHLE1BQU0sRUFBRSxDQUFDO0FBQ25FLENBQUM7QUFRRCxNQUFNLFVBQVUsVUFBVSxDQUFDLE1BQWtDO0lBQzNELE9BQU8sQ0FBQyxVQUEyQixFQUFRLEVBQUU7UUFDM0MsTUFBTSxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsR0FBRyxVQUFVLENBQUMsTUFBTSxDQUFD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XMsXG4gICAgICBjYWNoZVJlc3VsdCA9IHRydWUsXG4gICAgKSA9PiB7XG4gICAgICBjb250cm9sbGVyW0lOSkVDVEFCTEVTXSA9IGluamVjdGFibGVzTWFwO1xuICAgICAgY29udHJvbGxlci5wcm90b3R5cGVbSU5KRUNUQUJMRVNdID0gaW5qZWN0YWJsZXNNYXA7XG5cbiAgICAgIGxldCBjb250cm9sbGVySW5zdGFuY2U7XG5cbiAgICAgIGF3YWl0IGluc3RhbmNlLnJlZ2lzdGVyKFxuICAgICAgICBhc3luYyAoaW5zdGFuY2UpID0+IHtcbiAgICAgICAgICBjb250cm9sbGVySW5zdGFuY2UgPSBDb250cm9sbGVyVHlwZVN0cmF0ZWdpZXNbdHlwZV0oaW5zdGFuY2UsIGNvbnRyb2xsZXIsIGluamVjdGFibGVzTWFwLCBjYWNoZVJlc3VsdCk7XG4gICAgICAgIH0sXG4gICAgICAgIHsgcHJlZml4OiByb3V0ZSB9LFxuICAgICAgKTtcblxuICAgICAgcmV0dXJuIGNvbnRyb2xsZXJJbnN0YW5jZTtcbiAgICB9O1xuICB9O1xufVxuIl19

@@ -9,4 +9,4 @@ /**

import type { Constructor } from './helpers/inject-dependencies.js';
export declare function ErrorHandler(): MethodDecorator;
export declare function ErrorHandler(code: string): MethodDecorator;
export declare function ErrorHandler<T extends Error>(configuration: Constructor<T>): MethodDecorator;
export declare function ErrorHandler(): PropertyDecorator;
export declare function ErrorHandler(code: string): PropertyDecorator;
export declare function ErrorHandler<T extends Error>(configuration: Constructor<T>): PropertyDecorator;

@@ -27,2 +27,2 @@ /**

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItaGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2Vycm9yLWhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozt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IpID0+IGVycm9yIGluc3RhbmNlb2YgcGFyYW1ldGVyLCBoYW5kbGVyTmFtZSkpO1xuICAgIH1cbiAgfTtcbn1cblxuaW50ZXJmYWNlIEVycm9yV2l0aENvZGUgZXh0ZW5kcyBFcnJvciB7XG4gIGNvZGU/OiBzdHJpbmc7XG59XG5cbmZ1bmN0aW9uIGhhbmRsZXJGYWN0b3J5KGFjY2VwdHM6IDxUIGV4dGVuZHMgRXJyb3I+KGVycm9yPzogVCkgPT4gYm9vbGVhbiwgaGFuZGxlck5hbWU6IHN0cmluZyB8IHN5bWJvbCk6IElFcnJvckhhbmRsZXIge1xuICByZXR1cm4geyBhY2NlcHRzLCBoYW5kbGVyTmFtZSB9O1xufVxuIl19

@@ -8,28 +8,28 @@ /**

*/
import { ErrorHandler, Handler, Hook } from '../../interfaces/controller.js';
import { IErrorHandler, IHandler, IHook } from '../../interfaces/controller.js';
import { ERROR_HANDLERS, HANDLERS, HOOKS, SERVICE_INJECTION } from '../../symbols/index.js';
import { ServiceInjection } from './inject-dependencies.js';
export declare function ensureHandlers(val: {
[HANDLERS]?: Handler[];
[HANDLERS]?: IHandler[];
}): asserts val is {
[HANDLERS]: Handler[];
[HANDLERS]: IHandler[];
};
export declare function hasHandlers<T>(val: T): val is T & {
[HANDLERS]: Handler[];
[HANDLERS]: IHandler[];
};
export declare function ensureErrorHandlers(val: {
[ERROR_HANDLERS]?: ErrorHandler[];
[ERROR_HANDLERS]?: IErrorHandler[];
}): asserts val is {
[ERROR_HANDLERS]: ErrorHandler[];
[ERROR_HANDLERS]: IErrorHandler[];
};
export declare function hasErrorHandlers<T>(val: T): val is T & {
[ERROR_HANDLERS]: ErrorHandler[];
[ERROR_HANDLERS]: IErrorHandler[];
};
export declare function ensureHooks(val: {
[HOOKS]?: Hook[];
[HOOKS]?: IHook[];
}): asserts val is {
[HOOKS]: Hook[];
[HOOKS]: IHook[];
};
export declare function hasHooks<T>(val: T): val is T & {
[HOOKS]: Hook[];
[HOOKS]: IHook[];
};

@@ -36,0 +36,0 @@ export declare function ensureServiceInjection(val: {

@@ -61,2 +61,2 @@ /**

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3MtcHJvcGVydGllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2hlbHBlcnMvY2xhc3MtcHJvcGVydGllcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFHSCxPQUFPLEVBQUUsY0FBYyxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUc1RixNQUFNLFVBQVUsY0FBYyxDQUFDLEdBQStCO0lBQzVELElBQUksQ0FBQyxDQUFDLFFBQVEsSUFBSSxHQUFHLENBQUMsRUFBRTtRQUN0QixPQUFPLENBQUMsY0FBYyxDQUFDLEdBQUcsRUFBRSxRQUFRLEVBQUU7WUFDcEMsS0FBSyxFQUFFLEVBQUU7WUFDVCxVQUFVLEVBQUUsS0FBSztZQUNqQixZQUFZLEVBQUUsS0FBSztZQUNuQixRQUFRLEVBQUUsS0FBSztTQUNoQixDQUFDLENBQUM7S0FDSjtBQUNILENBQUM7QUFFRCxNQUFNLFVBQVUsV0FBVyxDQUFJLEdBQU07SUFDbkMsT0FBTyxRQUFRLElBQUksR0FBRyxDQUFDO0FBQ3pCLENBQUM7QUFFRCxNQUFNLFVBQVUsbUJBQW1CLENBQUMsR0FFbkM7SUFDQyxJQUFJLENBQUMsQ0FBQyxjQUFjLElBQUksR0FBRyxDQUFDLEVBQUU7UUFDNUIsT0FBTyxDQUFDLGNBQWMsQ0FBQyxHQUFHLEVBQUUsY0FBYyxFQUFFO1lBQzFDLEtBQUssRUFBRSxFQUFFO1lBQ1QsVUFBVSxFQUFFLEtBQUs7WUFDakIsWUFBWSxFQU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n1cblxuZXhwb3J0IGZ1bmN0aW9uIGVuc3VyZVNlcnZpY2VJbmplY3Rpb24odmFsOiB7XG4gIFtTRVJWSUNFX0lOSkVDVElPTl0/OiBTZXJ2aWNlSW5qZWN0aW9uW107XG59KTogYXNzZXJ0cyB2YWwgaXMgeyBbU0VSVklDRV9JTkpFQ1RJT05dOiBTZXJ2aWNlSW5qZWN0aW9uW10gfSB7XG4gIGlmICghKFNFUlZJQ0VfSU5KRUNUSU9OIGluIHZhbCkpIHtcbiAgICBSZWZsZWN0LmRlZmluZVByb3BlcnR5KHZhbCwgU0VSVklDRV9JTkpFQ1RJT04sIHtcbiAgICAgIHZhbHVlOiBbXSxcbiAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcbiAgICAgIHdyaXRhYmxlOiBmYWxzZSxcbiAgICB9KTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gaGFzU2VydmljZUluamVjdGlvbjxUPih2YWw6IFQpOiB2YWwgaXMgVCAmIHsgW1NFUlZJQ0VfSU5KRUNUSU9OXTogU2VydmljZUluamVjdGlvbltdIH0ge1xuICByZXR1cm4gU0VSVklDRV9JTkpFQ1RJT04gaW4gdmFsO1xufVxuIl19

@@ -9,3 +9,3 @@ /**

import type { FastifyReply, FastifyRequest } from 'fastify';
import { ErrorHandler } from '../../interfaces/controller.js';
export declare function createErrorsHandler(errorHandlers: ErrorHandler[], classInstance: any): (error: Error, request: FastifyRequest, reply: FastifyReply) => Promise<void>;
import { IErrorHandler } from '../../interfaces/controller.js';
export declare function createErrorsHandler(errorHandlers: IErrorHandler[], classInstance: any): (error: Error, request: FastifyRequest, reply: FastifyReply) => Promise<void>;

@@ -17,2 +17,2 @@ export function createErrorsHandler(errorHandlers, classInstance) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWVycm9ycy1oYW5kbGVyLmpzIiwic291cmNlUm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YS9mYXN0aWZ5LWRlY29yYXRvcnMvYmxvYi9tYXN0ZXIvTElDRU5TRVxuICovXG5pbXBvcnQgdHlwZSB7IEZhc3RpZnlSZXBseSwgRmFzdGlmeVJlcXVlc3QgfSBmcm9tICdmYXN0aWZ5JztcbmltcG9ydCB7IElFcnJvckhhbmRsZXIgfSBmcm9tICcuLi8uLi9pbnRlcmZhY2VzL2NvbnRyb2xsZXIuanMnO1xuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlRXJyb3JzSGFuZGxlcihcbiAgZXJyb3JIYW5kbGVyczogSUVycm9ySGFuZGxlcltdLFxuICBjbGFzc0luc3RhbmNlOiBhbnksXG4pOiAoZXJyb3I6IEVycm9yLCByZXF1ZXN0OiBGYXN0aWZ5UmVxdWVzdCwgcmVwbHk6IEZhc3RpZnlSZXBseSkgPT4gUHJvbWlzZTx2b2lkPiB7XG4gIHJldHVybiBhc3luYyBmdW5jdGlvbiBlcnJvckhhbmRsZXIoZXJyb3I6IEVycm9yLCByZXF1ZXN0OiBGYXN0aWZ5UmVxdWVzdCwgcmVwbHk6IEZhc3RpZnlSZXBseSk6IFByb21pc2U8dm9pZD4ge1xuICAgIGZvciAoY29uc3QgaGFuZGxlciBvZiBlcnJvckhhbmRsZXJzKSB7XG4gICAgICBpZiAoaGFuZGxlci5hY2NlcHRzKGVycm9yKSkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGF3YWl0IGNsYXNzSW5zdGFuY2VbaGFuZGxlci5oYW5kbGVyTmFtZV0oZXJyb3IsIHJlcXVlc3QsIHJlcGx5KTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBlcnJvciA9IGU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICB0aHJvdyBlcnJvcjtcbiAgfTtcbn1cbiJdfQ==

@@ -11,2 +11,2 @@ /**

*/
export declare function Hook(name: string): MethodDecorator;
export declare function Hook(name: string): Propert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uICB9O1xufVxuIl19

@@ -1,2 +0,2 @@

export declare const readyMap: Map<any, Promise<void>>;
export declare const readyMap: Map<unknown, Promise<void>>;
/**

@@ -7,2 +7,2 @@ * Used to mark a Service method to be called after all the Services are created, but before the server starts

*/
export declare function Initializer(dependencies?: any[]): MethodDecorator;
export declare function Initializer(dependencies?: any[]): PropertyDecorator;

@@ -22,2 +22,2 @@ import { INITIALIZER } from '../symbols/index.js';

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5pdGlhbGl6ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvZGVjb3JhdG9ycy9pbml0aWFsaXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDbEQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBRWhELE1BQU0sQ0FBQyxNQUFNLFFBQVEsR0FBRyxJQUFJLEdBQUcsRUFBc0IsQ0FBQztBQUV0RDs7OztHQUlHO0FBQ0gsTUFBTSxVQUFVLFdBQVcsQ0FBQyxlQUFzQixFQUFFO0lBQ2xELE9BQU8sQ0FBQyxlQUFvQixFQUFFLFdBQVcsRUFBRSxFQUFFO1FBQzNDLE1BQU0sTUFBTSxHQUFHLGVBQWUsQ0FBQyxXQUFXLENBQUM7UUFDM0MsTUFBTSxLQUFLLEdBQUcsSUFBSSxRQUFRLEVBQUUsQ0FBQztRQUU3QixNQUFNLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxJQUFTLEVBQUUsRUFBRTtZQUNsQyxPQUFPLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxHQUFHLENBQUMsQ0FBQyxHQUFHLEVBQUUsRUFBRSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQU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lIHdpbGwgYmVcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIEluaXRpYWxpemVyKGRlcGVuZGVuY2llczogYW55W10gPSBbXSk6IFByb3BlcnR5RGVjb3JhdG9yIHtcbiAgcmV0dXJuICh0YXJnZXRQcm90b3R5cGU6IGFueSwgcHJvcGVydHlLZXk6IHN0cmluZyB8IHN5bWJvbCkgPT4ge1xuICAgIGNvbnN0IHRhcmdldCA9IHRhcmdldFByb3RvdHlwZS5jb25zdHJ1Y3RvcjtcbiAgICBjb25zdCByZWFkeSA9IG5ldyBEZWZlcnJlZCgpO1xuXG4gICAgdGFyZ2V0W0lOSVRJQUxJWkVSXSA9IChzZWxmOiBhbnkpID0+IHtcbiAgICAgIFByb21pc2UuYWxsKGRlcGVuZGVuY2llcy5tYXAoKGRlcCkgPT4gcmVhZHlNYXAuZ2V0KGRlcCkpKVxuICAgICAgICAudGhlbigoKSA9PiBzZWxmW3Byb3BlcnR5S2V5XSgpKVxuICAgICAgICAudGhlbihyZWFkeS5yZXNvbHZlKVxuICAgICAgICAuY2F0Y2gocmVhZHkucmVqZWN0KTtcbiAgICB9O1xuXG4gICAgcmVhZHlNYXAuc2V0KHRhcmdldCwgcmVhZHkucHJvbWlzZSk7XG4gIH07XG59XG4iXX0=

@@ -12,2 +12,3 @@ /**

import { ControllerType } from '../../registry/controller-type.js';
declare type ControllerFactory = (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => unknown;
/**

@@ -24,5 +25,3 @@ * Various strategies which can be applied to controller

*/
export declare const ControllerTypeStrategies: {
readonly 0: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => any;
readonly 1: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => void;
};
export declare const ControllerTypeStrategies: Record<ControllerType, ControllerFactory>;
export {};

@@ -78,2 +78,2 @@ /**

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJm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JsLFxuICAgICAgaGFuZGxlci5vcHRpb25zLFxuICAgICAgY29udHJvbGxlckluc3RhbmNlW2hhbmRsZXIuaGFuZGxlck1ldGhvZF0uYmluZChjb250cm9sbGVySW5zdGFuY2UpLFxuICAgICk7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiByZWdpc3Rlckhvb2tzKGhvb2tzOiBJSG9va1tdLCBpbnN0YW5jZTogRmFzdGlmeUluc3RhbmNlLCBjb250cm9sbGVySW5zdGFuY2U6IGFueSk6IHZvaWQge1xuICBob29rcy5mb3JFYWNoKChob29rKSA9PiB7XG4gICAgaW5zdGFuY2UuYWRkSG9vayhob29rLm5hbWUsIGNvbnRyb2xsZXJJbnN0YW5jZVtob29rLmhhbmRsZXJOYW1lXS5iaW5kKGNvbnRyb2xsZXJJbnN0YW5jZSkpO1xuICB9KTtcbn1cblxuZnVuY3Rpb24gcmVnaXN0ZXJFcnJvckhhbmRsZXJzKGVycm9ySGFuZGxlcnM6IElFcnJvckhhbmRsZXJbXSwgaW5zdGFuY2U6IEZhc3RpZnlJbnN0YW5jZSwgY2xhc3NJbnN0YW5jZTogYW55KSB7XG4gIGluc3RhbmNlLnNldEVycm9ySGFuZGxlcihjcmVhdGVFcnJvcnNIYW5kbGVyKGVycm9ySGFuZGxlcnMsIGNsYXNzSW5zdGFuY2UpKTtcbn1cbiJdfQ==

@@ -110,2 +110,27 @@ <h1 style="text-align: center">Fastify decorators</h1>

### Graceful services destroy
If you need to have stuff executed before service destroyed (e.g. close database connection) you can use `@Destructor` decorator:
```ts
import { Initializer, Destructor, Service } from 'fastify-decorators';
import { Message } from '../entity/message';
import { createConnection, Connection } from 'typeorm';
@Service()
export class ConnectionService {
connection!: Connection;
@Initializer()
async init(): Promise<void> {
this.connection = await createConnection();
}
@Destructor()
async destroy(): Promise<void> {
await this.connection.close();
}
}
```
## Injecting into Controllers

@@ -112,0 +137,0 @@

@@ -7,3 +7,6 @@ <h1 style="text-align: center">Fastify decorators</h1>

- [Notes about dependency injection](#notes-about-dependency-injection)
- [Configuring test framework](#configuring-test-framework)
- [Notes about dependency injection](#notes-about-dependency-injection)
- [Jest](#jest--26)
- [Mocha](#mocha)
- [Using `configureControllerTest`](#using-configurecontrollertest)

@@ -15,4 +18,6 @@ - [Using `configureServiceTest`](#using-configureservicetest)

### Notes about dependency injection
### Configuring test framework
#### Notes about dependency injection
fastify-decorators provide dependency injection functionality only when [`reflect-metadata`] required.

@@ -22,4 +27,89 @@

As example for Jest you can take a look on our [`jest.environment.cjs`]
#### Jest <= 26
Packages to be installed:
- [`@types/jest`](https://www.npmjs.com/package/@types/jest)
- [`jest`](https://www.npmjs.com/package/jest)
- [`reflect-metadata`](https://www.npmjs.com/package/reflect-metadata)
- [`jest-environment-node`](https://www.npmjs.com/package/jest-environment-node)
- [`ts-jest`](https://www.npmjs.com/package/ts-jest)
Also if you're using imports with file extensions then you will need:
- [jest-ts-webcompat-resolver](https://www.npmjs.com/package/jest-ts-webcompat-resolver)
- [jest-resolver](https://www.npmjs.com/package/jest-resolver)
Example configuration:
_jest.environment.js_:
```javascript
const NodeEnvironment = require('jest-environment-node');
class FastifyDecoratorsTestEnvironment extends NodeEnvironment {
setup() {
require('reflect-metadata');
this.global.Reflect = Reflect;
return super.setup();
}
}
module.exports = FastifyDecoratorsTestEnvironment;
```
_jest.config.js_:
```javascript
module.exports = {
preset: 'ts-jest',
// Note resolver required only when using imports with extensions
resolver: 'jest-ts-webcompat-resolver',
// In test environment we setup reflect-metadata
testEnvironment: './jest.environment.cjs',
// Jest does not support ESM modules well, so you will need to define mappings to CJS modules
moduleNameMapper: {
'^fastify-decorators/testing$': 'fastify-decorators/testing/index.cjs',
'^fastify-decorators$': 'fastify-decorators/index.cjs',
},
};
```
#### Mocha
Packages to be installed:
- [`@types/mocha`](https://www.npmjs.com/package/@types/mocha)
- [`mocha`](https://www.npmjs.com/package/mocha)
- [`ts-node`](https://www.npmjs.com/package/ts-node)
Example configuration:
_.mocharc.yml_:
```yaml
# Common Mocha options
bail: false
timeout: 10000
enable-source-maps: true
v8-stack-trace-limit: 100
extension:
- 'ts'
# Enable experimental TS ESM loader
loader:
- ts-node/esm
# Specify root hooks file, required for `reflect-metadata` loading
require:
- test/mocha-hooks.ts
# Specify tests pattern
spec:
- test/**/*.test.ts
- test/**/*.spec.ts
```
_test/mocha-hooks.ts_:
```typescript
import 'reflect-metadata';
```
### Using `configureControllerTest`

@@ -26,0 +116,0 @@

@@ -17,2 +17,3 @@ /**

export { Initializer } from './decorators/initializer.js';
export { Destructor } from './decorators/destructor.js';
export { Hook } from './decorators/hook.js';

@@ -19,0 +20,0 @@ export { ErrorHandler } from './decorators/error-handler.js';

@@ -15,2 +15,3 @@ /**

export { Initializer } from './decorators/initializer.js';
export { Destructor } from './decorators/destructor.js';
export { Hook } from './decorators/hook.js';

@@ -28,2 +29,2 @@ export { ErrorHandler } from './decorators/error-handler.js';

export { PUT } from './decorators/request-handlers.js';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXJELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFDeEQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBRy9ELE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUNsRCxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDaEQsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUF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FBVVCB9IGZyb20gJy4vZGVjb3JhdG9ycy9yZXF1ZXN0LWhhbmRsZXJzLmpzJztcbmV4cG9ydCB7IFJvdXRlQ29uZmlnIH0gZnJvbSAnLi9pbnRlcmZhY2VzL3JvdXRlLWNvbmZpZy5qcyc7XG4iXX0=

@@ -10,3 +10,3 @@ /**

import type { HttpMethods } from './http-methods.js';
export interface Handler {
export interface IHandler {
url: string;

@@ -17,9 +17,9 @@ method: HttpMethods;

}
export interface ErrorHandler {
export interface IErrorHandler {
accepts<T extends Error>(error?: T): boolean;
handlerName: string | symbol;
}
export interface Hook {
export interface IHook {
name: any;
handlerName: string | symbol;
}

@@ -9,2 +9,2 @@ /**

export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9pbnRlcmZhY2VzL2NvbnRyb2xsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEFuZHJleSBDaGFsa2luIDxMMmpMaWdhQGdtYWlsLmNvbT4gKGh0dHBzOi8vZ2l0aHViLmNvbS9MMmpMaWdhKS4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYS9mYXN0aWZ5LWRlY29yYXRvcnMvYmxvYi9tYXN0ZXIvTElDRU5TRVxuICovXG5cbmltcG9ydCB0eXBlIHsgUm91dGVTaG9ydGhhbmRPcHRpb25zIH0g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gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYS9mYXN0aWZ5LWRlY29yYXRvcnMvYmxvYi9tYXN0ZXIvTElDRU5TRVxuICovXG5cbmltcG9ydCB0eXBlIHsgUm91dGVTaG9ydGhhbmRPcHRpb25zIH0gZnJvbSAnZmFzdGlmeSc7XG5pbXBvcnQgdHlwZSB7IEh0dHBNZXRob2RzIH0gZnJvbSAnLi9odHRwLW1ldGhvZHMuanMnO1xuXG5leHBvcnQgaW50ZXJmYWNlIElIYW5kbGVyIHtcbiAgdXJsOiBzdHJpbmc7XG4gIG1ldGhvZDogSHR0cE1ldGhvZHM7XG4gIG9wdGlvbnM6IFJvdXRlU2hvcnRoYW5kT3B0aW9ucztcbiAgaGFuZGxlck1ldGhvZDogc3RyaW5nIHwgc3ltYm9sO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIElFcnJvckhhbmRsZXIge1xuICBhY2NlcHRzPFQgZXh0ZW5kcyBFcnJvcj4oZXJyb3I/OiBUKTogYm9vbGVhbjtcblxuICBoYW5kbGVyTmFtZTogc3RyaW5nIHwgc3ltYm9sO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIElIb29rIHtcbiAgbmFtZTogYW55O1xuICBoYW5kbGVyTmFtZTogc3RyaW5nIHwgc3ltYm9sO1xufVxuIl19

@@ -9,3 +9,3 @@ /**

export type { BootstrapConfig } from './bootstrap-config.js';
export type { ErrorHandler, Handler, Hook } from './controller.js';
export type { IErrorHandler, IHandler, IHook } from './controller.js';
export type { ControllerConfig } from './controller-config.js';

@@ -12,0 +12,0 @@ export { HttpMethods } from './http-methods.js';

@@ -9,2 +9,2 @@ /**

export { RequestHandler } from './request-handler.js';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvaW50ZXJmYWNlcy9pbmRle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vaHR0cC1tZXRob2RzLmpzJztcbmV4cG9ydCB0eXBlIHsgSW5qZWN0YWJsZUNvbnRyb2xsZXIgfSBmcm9tICcuL2luamVjdGFibGUtY2xhc3MuanMnO1xuZXhwb3J0IHsgUmVxdWVzdEhhbmRsZXIsIFJlcXVlc3RIb29rIH0gZnJvbSAnLi9yZXF1ZXN0LWhhbmRsZXIuanMnO1xuZXhwb3J0IHR5cGUgeyBSb3V0ZUNvbmZpZyB9IGZyb20gJy4vcm91dGUtY29uZmlnLmpzJztcbiJdfQ==
{
"name": "fastify-decorators",
"version": "3.7.1",
"version": "3.8.0",
"description": "Framework aimed to provide useful TypeScript decorators to implement controllers, services and request handlers, built with Fastify.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -256,9 +256,9 @@ [![Fastify decorators](./assets/logo.png)](https://github.com/L2jLiga/fastify-decorators)

[fastify resty]: https://github.com/FastifyResty/fastify-resty
[bootstrapping]: https://github.com/L2jLiga/fastify-decorators/blob/v3.7.1/docs/Bootstrapping.md
[controllers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.7.1/docs/Controllers.md
[request handlers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.7.1/docs/Request%20Handlers.md
[services and dependency injection]: https://github.com/L2jLiga/fastify-decorators/blob/v3.7.1/docs/Services%20and%20dependency%20injection.md
[hooks]: https://github.com/L2jLiga/fastify-decorators/blob/v3.7.1/docs/Hooks.md
[error handling]: https://github.com/L2jLiga/fastify-decorators/blob/v3.7.1/docs/Error%20handling.md
[testing]: https://github.com/L2jLiga/fastify-decorators/blob/v3.7.1/docs/Testing.md
[migration guide (v3)]: https://github.com/L2jLiga/fastify-decorators/blob/v3.7.1/docs/Migration%20to%20v3.md
[bootstrapping]: https://github.com/L2jLiga/fastify-decorators/blob/v3.8.0/docs/Bootstrapping.md
[controllers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.8.0/docs/Controllers.md
[request handlers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.8.0/docs/Request%20Handlers.md
[services and dependency injection]: https://github.com/L2jLiga/fastify-decorators/blob/v3.8.0/docs/Services%20and%20dependency%20injection.md
[hooks]: https://github.com/L2jLiga/fastify-decorators/blob/v3.8.0/docs/Hooks.md
[error handling]: https://github.com/L2jLiga/fastify-decorators/blob/v3.8.0/docs/Error%20handling.md
[testing]: https://github.com/L2jLiga/fastify-decorators/blob/v3.8.0/docs/Testing.md
[migration guide (v3)]: https://github.com/L2jLiga/fastify-decorators/blob/v3.8.0/docs/Migration%20to%20v3.md

@@ -9,5 +9,5 @@ /**

import { FastifyInstance } from 'fastify';
import type { ServiceMock } from './service-mock.js';
import { Constructor } from '../decorators/helpers/inject-dependencies.js';
import { Plugins } from './fastify-plugins.js';
import type { ServiceMock } from './service-mock.js';
export interface ControllerTestConfig<C = any> {

@@ -14,0 +14,0 @@ controller: C;

@@ -9,9 +9,9 @@ /**

import { fastify } from 'fastify';
import { hasServiceInjection } from '../decorators/helpers/class-properties.js';
import { readyMap } from '../decorators/index.js';
import { injectables } from '../registry/injectables.js';
import { CREATOR, FastifyInstanceToken, SERVICE_INJECTION } from '../symbols/index.js';
import { MocksManager } from './mocks-manager.js';
import { readyMap } from '../decorators/index.js';
import { hasServiceInjection } from '../decorators/helpers/class-properties.js';
import { wrapInjectable } from '../utils/wrap-injectable.js';
import { loadPlugins } from './fastify-plugins.js';
import { MocksManager } from './mocks-manager.js';
export async function configureControllerTest(config) {

@@ -42,2 +42,2 @@ const instance = fastify();

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJlLWNvbnRyb2xsZXItdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi90ZXN0aW5nL2NvbmZpZ3VyZS1jb250cm9sbGVyLXRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFFLE9BQ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tzLmdldCh2YWx1ZSkpXG4gICAgICAubWFwKChpdCkgPT4gcmVhZHlNYXAuZ2V0KGl0KSksXG4gICk7XG5cbiAgYXdhaXQgaW5zdGFuY2UucmVhZHkoKTtcblxuICAvLyBAdHMtZXhwZWN0LWVycm9yIHdlIGhhdmUgZGVjb3JhdGVkIGluc3RhbmNlLCBUeXBlU2NyaXB0IGNhbid0IGhhbmRsZSBpdCA6KFxuICByZXR1cm4gaW5zdGFuY2U7XG59XG5cbmZ1bmN0aW9uIGdldEluamVjdGVkUHJvcHModGFyZ2V0OiB1bmtub3duKTogQXJyYXk8dW5rbm93bj4ge1xuICBpZiAoIWhhc1NlcnZpY2VJbmplY3Rpb24odGFyZ2V0KSkgcmV0dXJuIFtdO1xuICByZXR1cm4gdGFyZ2V0W1NFUlZJQ0VfSU5KRUNUSU9OXS5tYXAoKGl0KSA9PiBpdC5uYW1lKTtcbn1cblxuZnVuY3Rpb24gZ2V0Q29uc3RydWN0b3JBcmdzKGNvbnN0cnVjdG9yOiBJbmplY3RhYmxlQ2xhc3MpOiBBcnJheTx1bmtub3duPiB7XG4gIHJldHVybiBSZWZsZWN0LmdldE1ldGFkYXRhKCdkZXNpZ246cGFyYW10eXBlcycsIGNvbnN0cnVjdG9yKSB8fCBbXTtcbn1cbiJdfQ==

@@ -9,4 +9,4 @@ /**

import type { Constructor } from '../decorators/helpers/inject-dependencies.js';
import { Plugins } from './fastify-plugins.js';
import type { ServiceMock } from './service-mock.js';
import { Plugins } from './fastify-plugins.js';
export interface ServiceTestConfig<Service> {

@@ -13,0 +13,0 @@ service: Constructor<Service>;

@@ -8,9 +8,9 @@ /**

*/
import { fastify } from 'fastify';
import { readyMap } from '../decorators/index.js';
import { injectables } from '../registry/injectables.js';
import { CREATOR, FastifyInstanceToken, INITIALIZER } from '../symbols/index.js';
import { MocksManager } from './mocks-manager.js';
import { readyMap } from '../decorators/index.js';
import { wrapInjectable } from '../utils/wrap-injectable.js';
import { fastify } from 'fastify';
import { loadPlugins } from './fastify-plugins.js';
import { MocksManager } from './mocks-manager.js';
/**

@@ -52,2 +52,2 @@ * Configures service for testing

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJlLXNlcnZpY2UtdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi90ZXN0aW5nL2NvbmZpZ3VyZS1zZXJ2aWNlLXRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBSUgsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQ3pELE9BQU8sRUFBRSxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsV0FBVyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDakYsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRWxELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDN0QsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUNsQyxPQUFPLEVBQUUsV0FBVyxFQUFXLE1BQU0sc0JBQXNCLENBQUM7QUFRNUQ7Ozs7R0FJRztBQUNILHdEQUF3RDtBQUN4RCxNQUFNLFVBQVUsb0JBQW9CLENBQ2xDLE1BQWtDO0lBRWxDLE1BQU0sT0FBTyxHQUF5QixNQUFNLENBQUMsT0FBTyxDQUFDO0lBQ3JELE1BQU0sb0JBQW9CLEdBQUcsWUFBWSxDQUFDLE1BQU0sQ0FBQyxXQUFXLEVBQUUsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQzVFLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxHQUFHLENBQUMsb0JBQW9CLENBQUMsR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kKHByb21pc2UpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGFyZ2V0W3BdO1xuICAgIH0sXG4gIH0pIGFzIFByb21pc2U8U2VydmljZT4gJiBTZXJ2aWNlO1xufVxuXG5mdW5jdGlvbiBpc0luamVjdGFibGU8U2VydmljZT4oc2VydmljZTogQ29uc3RydWN0b3I8U2VydmljZT4pOiBhc3NlcnRzIHNlcnZpY2UgaXMgSW5qZWN0YWJsZVNlcnZpY2Uge1xuICBpZiAoIShDUkVBVE9SIGluIHNlcnZpY2UpKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdQcm92aWRlZCBzZXJ2aWNlIGRvZXMgbm90IGFubm90YXRlZCB3aXRoIEBTZXJ2aWNlIScpO1xuICB9XG59XG5cbmZ1bmN0aW9uIGhhc0FzeW5jSW5pdGlhbGl6ZXIoc2VydmljZTogSW5qZWN0YWJsZVNlcnZpY2UpOiBzZXJ2aWNlIGlzIEluamVjdGFibGVTZXJ2aWNlICYgUmVxdWlyZWQ8SW5qZWN0YWJsZVNlcnZpY2U+IHtcbiAgcmV0dXJuIElOSVRJQUxJWkVSIGluIHNlcnZpY2U7XG59XG4iXX0=

@@ -9,4 +9,4 @@ /**

import { Constructor } from './helpers/inject-dependencies.js';
export declare function ErrorHandler(): MethodDecorator;
export declare function ErrorHandler(code: string): MethodDecorator;
export declare function ErrorHandler<T extends Error>(configuration: Constructor<T>): MethodDecorator;
export declare function ErrorHandler(): PropertyDecorator;
export declare function ErrorHandler(code: string): PropertyDecorator;
export declare function ErrorHandler<T extends Error>(configuration: Constructor<T>): PropertyDecorator;

@@ -8,22 +8,22 @@ /**

*/
import { ErrorHandler, Handler, Hook } from '../../interfaces/controller.js';
import { IErrorHandler, IHandler, IHook } from '../../interfaces/controller.js';
import { ERROR_HANDLERS, HANDLERS, HOOKS, SERVICE_INJECTION } from '../../symbols/index.js';
import { ServiceInjection } from './inject-dependencies.js';
export declare function ensureHandlers(val: {
[HANDLERS]?: Handler[];
[HANDLERS]?: IHandler[];
}): void;
export declare function hasHandlers<T>(val: T): val is T & {
[HANDLERS]: Handler[];
[HANDLERS]: IHandler[];
};
export declare function ensureErrorHandlers(val: {
[ERROR_HANDLERS]?: ErrorHandler[];
[ERROR_HANDLERS]?: IErrorHandler[];
}): void;
export declare function hasErrorHandlers<T>(val: T): val is T & {
[ERROR_HANDLERS]: ErrorHandler[];
[ERROR_HANDLERS]: IErrorHandler[];
};
export declare function ensureHooks(val: {
[HOOKS]?: Hook[];
[HOOKS]?: IHook[];
}): void;
export declare function hasHooks<T>(val: T): val is T & {
[HOOKS]: Hook[];
[HOOKS]: IHook[];
};

@@ -30,0 +30,0 @@ export declare function ensureServiceInjection(val: {

@@ -9,3 +9,3 @@ /**

import { FastifyReply, FastifyRequest } from 'fastify';
import { ErrorHandler } from '../../interfaces/controller.js';
export declare function createErrorsHandler(errorHandlers: ErrorHandler[], classInstance: any): (error: Error, request: FastifyRequest, reply: FastifyReply) => Promise<void>;
import { IErrorHandler } from '../../interfaces/controller.js';
export declare function createErrorsHandler(errorHandlers: IErrorHandler[], classInstance: any): (error: Error, request: FastifyRequest, reply: FastifyReply) => Promise<void>;

@@ -11,2 +11,2 @@ /**

*/
export declare function Hook(name: string): MethodDecorator;
export declare function Hook(name: string): PropertyDecorator;

@@ -1,2 +0,2 @@

export declare const readyMap: Map<any, Promise<void>>;
export declare const readyMap: Map<unknown, Promise<void>>;
/**

@@ -7,2 +7,2 @@ * Used to mark a Service method to be called after all the Services are created, but before the server starts

*/
export declare function Initializer(dependencies?: any[]): MethodDecorator;
export declare function Initializer(dependencies?: any[]): PropertyDecorator;

@@ -12,2 +12,3 @@ /**

import { ControllerType } from '../../registry/controller-type.js';
declare type ControllerFactory = (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => unknown;
/**

@@ -24,5 +25,3 @@ * Various strategies which can be applied to controller

*/
export declare const ControllerTypeStrategies: {
readonly 0: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => any;
readonly 1: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => void;
};
export declare const ControllerTypeStrategies: Record<ControllerType, ControllerFactory>;
export {};

@@ -17,2 +17,3 @@ /**

export { Initializer } from './decorators/initializer.js';
export { Destructor } from './decorators/destructor.js';
export { Hook } from './decorators/hook.js';

@@ -19,0 +20,0 @@ export { ErrorHandler } from './decorators/error-handler.js';

@@ -10,3 +10,3 @@ /**

import { HttpMethods } from './http-methods.js';
export interface Handler {
export interface IHandler {
url: string;

@@ -17,9 +17,9 @@ method: HttpMethods;

}
export interface ErrorHandler {
export interface IErrorHandler {
accepts<T extends Error>(error?: T): boolean;
handlerName: string | symbol;
}
export interface Hook {
export interface IHook {
name: any;
handlerName: string | symbol;
}
export { BootstrapConfig } from './bootstrap-config.js';
export { ErrorHandler, Handler, Hook } from './controller.js';
export { IErrorHandler, IHandler, IHook } from './controller.js';
export { ControllerConfig } from './controller-config.js';

@@ -4,0 +4,0 @@ export { HttpMethods } from './http-methods.js';

@@ -9,5 +9,5 @@ /**

import { FastifyInstance } from 'fastify';
import { ServiceMock } from './service-mock.js';
import { Constructor } from '../decorators/helpers/inject-dependencies.js';
import { Plugins } from './fastify-plugins.js';
import { ServiceMock } from './service-mock.js';
export interface ControllerTestConfig<C = any> {

@@ -14,0 +14,0 @@ controller: C;

@@ -9,4 +9,4 @@ /**

import { Constructor } from '../decorators/helpers/inject-dependencies.js';
import { Plugins } from './fastify-plugins.js';
import { ServiceMock } from './service-mock.js';
import { Plugins } from './fastify-plugins.js';
export interface ServiceTestConfig<Service> {

@@ -13,0 +13,0 @@ service: Constructor<Service>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc