fastify-decorators
Advanced tools
Comparing version 3.4.1 to 3.5.0
@@ -34,3 +34,3 @@ "use strict"; | ||
async function loadControllers(config, fastify) { | ||
await Promise.all(config.controllers.map(controller => loadController(controller, fastify, config))); | ||
await Promise.all(config.controllers.map((controller) => loadController(controller, fastify, config))); | ||
} | ||
@@ -62,3 +62,3 @@ function autoLoadModules(config) { | ||
} | ||
else if (filter.test((filePath.name))) { | ||
else if (filter.test(filePath.name)) { | ||
yield fullFilePath; | ||
@@ -71,6 +71,4 @@ } | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
return require(module).__esModule | ||
? require(module).default | ||
: require(module); | ||
return require(module).__esModule ? require(module).default : require(module); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL2Jvb3RzdHJhcC9ib290c3RyYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBR0gsbURBQWdDO0FBQ2hDLDJCQUFpQztBQUNqQywrQkFBNEI7QUFDNUIsOENBQXlDO0FBSXpDLHlEQUFzRDtBQUN0RCx3Q0FBMkQ7QUFDM0QsOERBQTBEO0FBRTFELE1BQU0sV0FBVyxHQUFHLDBCQUEwQixDQUFDO0FBRWxDLFFBQUEsU0FBUyxHQUF3Qyx3QkFBRSxDQUFrQixLQUFLLEVBQUUsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFO0lBQ3hHLHlCQUFXLENBQUMsR0FBRyxDQUFDLDhCQUFvQixFQUFFLGdDQUFjLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztJQUMvRCxNQUFNLFdBQVcsR0FBRyxJQUFJLEdBQUcsRUFBd0IsQ0FBQztJQUNwRCxNQUFNLFVBQVUsR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDO0lBRXJDLElB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kIHdpdGggZm9yIGF3YWl0IChjb25zdCBmaWxlUGF0aCBvZiBmcy5vcGVuZGlyKSBpbiBOb2RlLmpzID49IDEyLjEyXG4gICAgZm9yIChjb25zdCBmaWxlUGF0aCBvZiByZWFkZGlyU3luYyhkaXJQYXRoLCB7IHdpdGhGaWxlVHlwZXM6IHRydWUgfSkpIHtcbiAgICAgIGNvbnN0IGZ1bGxGaWxlUGF0aCA9IGpvaW4oZGlyUGF0aCwgZmlsZVBhdGgubmFtZSk7XG5cbiAgICAgIGlmIChmaWxlUGF0aC5pc0RpcmVjdG9yeSgpKSB7XG4gICAgICAgIGRpcmVjdG9yaWVzVG9SZWFkLmFkZChmdWxsRmlsZVBhdGgpO1xuICAgICAgfSBlbHNlIGlmIChmaWx0ZXIudGVzdChmaWxlUGF0aC5uYW1lKSkge1xuICAgICAgICB5aWVsZCBmdWxsRmlsZVBhdGg7XG4gICAgICB9XG4gICAgfVxuICB9XG59XG5cbmZ1bmN0aW9uIGxvYWRNb2R1bGUobW9kdWxlOiBzdHJpbmcpOiBJbmplY3RhYmxlQ29udHJvbGxlciB7XG4gIC8qIGVzbGludC1kaXNhYmxlIEB0eXBlc2NyaXB0LWVzbGludC9uby12YXItcmVxdWlyZXMgKi9cbiAgcmV0dXJuIHJlcXVpcmUobW9kdWxlKS5fX2VzTW9kdWxlID8gcmVxdWlyZShtb2R1bGUpLmRlZmF1bHQgOiByZXF1aXJlKG1vZHVsZSk7XG59XG4iXX0= |
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
@@ -7,8 +8,22 @@ | ||
## 3.5.0 | ||
### Added | ||
- `configureControllerTest` decorate `FastifyInstance` with controller property | ||
### Changed | ||
- Huge documentation rework | ||
## 3.4.1 | ||
### Fixed | ||
- FastifyInstance not available for injection in tests | ||
## 3.4.0 | ||
### Added | ||
- Hooks and error handlers support for stateless controllers (ControllerType.REQUEST) | ||
@@ -18,2 +33,3 @@ - Support for async services testing | ||
### Fixed | ||
- Hooks override in RequestHandler when hook with same name defined multiple times | ||
@@ -25,11 +41,17 @@ - Invalid RequestHandler constructor call when it has hooks | ||
## 3.3.1 | ||
### Fixed | ||
- Warning when install due to unsatisfied peer dependency - `fastify-plugin` | ||
## 3.3.0 | ||
### Added | ||
- support for services that need an async setup ([#58](https://github.com/L2jLiga/fastify-decorators/issues/58)) | ||
## 3.2.4 | ||
### Fixed | ||
- Bootstrap controllers properly | ||
@@ -39,3 +61,5 @@ - Remove a global flag from mask if presents | ||
## 3.2.3 | ||
### Changed | ||
- Use `fastify-plugin` helper for `bootstrap` | ||
@@ -45,17 +69,23 @@ - Use `import type` from TypeScript 3.8 (for TS < 3.8 users do `.d.ts` downlevel) | ||
## 3.2.2 | ||
### Fixed | ||
- Avoid redundant wrapping when configuring mocks for testing | ||
## 3.2.1 | ||
### Fixed | ||
- Request handlers decorators (GET, POST, PUT etc) ignore second argument: | ||
```typescript | ||
class Ctrl { | ||
@GET('/', { schema: { body: { type: 'string' } } }) // fastify options were ignored | ||
get() {} | ||
} | ||
``` | ||
```ts | ||
class Ctrl { | ||
@GET('/', { schema: { body: { type: 'string' } } }) // fastify options were ignored | ||
get() {} | ||
} | ||
``` | ||
## 3.2.0 | ||
### Added | ||
- `@ErrorHandler` support for request handlers | ||
@@ -65,23 +95,33 @@ - `@Hook` support for request handlers | ||
### Changed | ||
- Do not register empty error handlers | ||
## 3.1.1 | ||
### Fixed | ||
- Cannot read property 'get' of undefined when using `configureControllerTest` on class with dependencies provided via `@Inject` decorator. | ||
## 3.1.0 | ||
### Added | ||
- More strict check for `@Controller` decorator | ||
### Fixed | ||
- Possible call stack size exceeded when using autobootstrap | ||
## 3.0.0 | ||
### Added | ||
- `@ErrorHandler` decorator for error handling within controllers | ||
### Changed | ||
- *BREAKING*: move to Fastify 3 | ||
- _BREAKING_: move to Fastify 3 | ||
### Fixed | ||
- `package.json` was missed in `fastify-decorators/testing` |
@@ -25,6 +25,10 @@ "use strict"; | ||
inject_controller_options_1.injectControllerOptions(controller); | ||
(controller)[symbols_1.CREATOR].register = async (instance, injectablesMap = injectables_1.injectables, cacheResult = true) => { | ||
controller[symbols_1.CREATOR].register = async (instance, injectablesMap = injectables_1.injectables, cacheResult = true) => { | ||
controller[symbols_1.INJECTABLES] = injectablesMap; | ||
controller.prototype[symbols_1.INJECTABLES] = injectablesMap; | ||
await instance.register(async (instance) => controller_type_1.ControllerTypeStrategies[type](instance, controller, injectablesMap, cacheResult), { prefix: route }); | ||
let controllerInstance; | ||
await instance.register(async (instance) => { | ||
controllerInstance = await controller_type_1.ControllerTypeStrategies[type](instance, controller, injectablesMap, cacheResult); | ||
}, { prefix: route }); | ||
return controllerInstance; | ||
}; | ||
@@ -34,2 +38,2 @@ }; | ||
exports.Controller = Controller; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2NvbnRyb2xsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBS0gsMENBQTZDO0FBQzdDLHlEQUFzRDtBQUN0RCx3Q0FBa0Q7QUFDbEQsbUZBQThFO0FBQzlFLGtFQUF3RTtBQUV4RSxTQUFTLFVBQVUsQ0FBQyxNQUFrQztJQUNsRCxJQUFJLE9BQU8sTUFBTSxLQUFLLFFBQVE7UUFBRSxNQUFNLEdBQUcsRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLENBQUM7SUFFM0QsT0FBTyxFQUFFLElBQUksRUFBRSx5QkFBYyxDQUFDLFNBQVMsRUFBRSxLQUFLLEVBQUUsR0FBRyxFQUFFLEdBQUcsTUFBTSxFQUFFLENBQUM7QUFDckUsQ0FBQztBQVFELFNBQWdCLFVBQVUsQ0FBQyxNQUFrQztJQUN6RCxPQUFPLENBQUMsVUFBMkIsRUFBUSxFQUFFO1FBQ3pD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ycm9yPy5jb2RlID09PSBwYXJhbWV0ZXIsIGhhbmRsZXJOYW1lKSxcbiAgICAgICk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGNvbnN0cnVjdG9yW0VSUk9SX0hBTkRMRVJTXS5wdXNoKGhhbmRsZXJGYWN0b3J5KChlcnJvcj86IEVycm9yKSA9PiBlcnJvciBpbnN0YW5jZW9mIHBhcmFtZXRlciwgaGFuZGxlck5hbWUpKTtcbiAgICB9XG4gIH07XG59XG5cbmludGVyZmFjZSBFcnJvcldpdGhDb2RlIGV4dGVuZHMgRXJyb3Ige1xuICBjb2RlPzogc3RyaW5nO1xufVxuXG5mdW5jdGlvbiBoYW5kbGVyRmFjdG9yeShhY2NlcHRzOiA8VCBleHRlbmRzIEVycm9yPihlcnJvcj86IFQpID0+IGJvb2xlYW4sIGhhbmRsZXJOYW1lOiBzdHJpbmcgfCBzeW1ib2wpOiBFcnJvckhhbmRsZXIge1xuICByZXR1cm4geyBhY2NlcHRzLCBoYW5kbGVyTmFtZSB9O1xufVxuIl19 |
@@ -72,2 +72,2 @@ "use strict"; | ||
exports.hasServiceInjection = hasServiceInjection; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3MtcHJvcGVydGllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2hlbHBlcnMvY2xhc3MtcHJvcGVydGllcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFHSCwyQ0FBbUY7QUFHbkYsU0FBZ0IsY0FBYyxDQUFDLEdBQStCO0lBQzFELElBQUksQ0FBQyxDQUFDLGtCQUFRLElBQUksR0FBRyxDQUFDLEVBQUU7UUFDcEIsT0FBTyxDQUFDLGNBQWMsQ0FBQyxHQUFHLEVBQUUsa0JBQVEsRUFBRTtZQUNsQyxLQUFLLEVBQUU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cmFibGU6IGZhbHNlLFxuICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcbiAgICAgIHdyaXRhYmxlOiBmYWxzZSxcbiAgICB9KTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gaGFzU2VydmljZUluamVjdGlvbjxUPih2YWw6IFQpOiB2YWwgaXMgVCAmIHsgW1NFUlZJQ0VfSU5KRUNUSU9OXTogU2VydmljZUluamVjdGlvbltdIH0ge1xuICByZXR1cm4gU0VSVklDRV9JTkpFQ1RJT04gaW4gdmFsO1xufVxuIl19 |
@@ -28,2 +28,2 @@ "use strict"; | ||
exports.createErrorsHandler = createErrorsHandler; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLWVycm9ycy1oYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vbGliL2RlY29yYXRvcnMvaGVscGVycy9jcmVhdGUtZXJyb3JzLWhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBS0gsU0FBZ0IsbUJBQW1CLENBQy9CLGFBQTZCLEVBQUUsYUFBa0I7SUFFakQsT0FBTyxLQUFLLFVBQVUsWUFBWSxDQUFDLEtBQVksRUFBRSxPQUF1QixFQUFFLEtBQW1CO1FBQ3pGLEtBQUssTUFBTSxPQUFPLElBQUksYUFBYSxFQUFFO1lBQ2pDLElBQUksT0FBTyxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRTtnQkFDeEIsSUFBSTtvQkFDQSxNQUFNLGFBQWEsQ0FBQyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUMsS0FBSyxFQUFFLE9BQU8sRUFBRSxLQUFLLENBQUMsQ0FBQztvQkFDaEUsT0FBTztpQkFDVjtnQkFBQyxPQUFPLENBQUMsRUFBRTtvQkFDUixLQUFLLEdBQUcsQ0FBQy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lSZXBseSkgPT4gUHJvbWlzZTx2b2lkPiB7XG4gIHJldHVybiBhc3luYyBmdW5jdGlvbiBlcnJvckhhbmRsZXIoZXJyb3I6IEVycm9yLCByZXF1ZXN0OiBGYXN0aWZ5UmVxdWVzdCwgcmVwbHk6IEZhc3RpZnlSZXBseSk6IFByb21pc2U8dm9pZD4ge1xuICAgIGZvciAoY29uc3QgaGFuZGxlciBvZiBlcnJvckhhbmRsZXJzKSB7XG4gICAgICBpZiAoaGFuZGxlci5hY2NlcHRzKGVycm9yKSkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgIGF3YWl0IGNsYXNzSW5zdGFuY2VbaGFuZGxlci5oYW5kbGVyTmFtZV0oZXJyb3IsIHJlcXVlc3QsIHJlcGx5KTtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICBlcnJvciA9IGU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICB0aHJvdyBlcnJvcjtcbiAgfTtcbn1cbiJdfQ== |
@@ -22,2 +22,2 @@ "use strict"; | ||
exports.injectControllerOptions = injectControllerOptions; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5qZWN0LWNvbnRyb2xsZXItb3B0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2hlbHBlcnMvaW5qZWN0LWNvbnRyb2xsZXItb3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFHSCwyQ0FBd0M7QUFFeEMsU0FBZ0IsdUJBQXVCLENBQUMsVUFBbUI7SUFDdkQsSUFBSSxVQUFVLFlBQVksUUFBUSxFQUFFO1FBQ2hDLElBQUksQ0FBQyxDQUFDLGlCQUFPLElBQUksVUFBVSxDQUFDLEVBQUU7WUFD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WQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9naXRodWIuY29tL0wyakxpZ2EvZmFzdGlmeS1kZWNvcmF0b3JzL2Jsb2IvbWFzdGVyL0xJQ0VOU0VcbiAqL1xuXG5pbXBvcnQgdHlwZSB7IEluamVjdGFibGVDb250cm9sbGVyIH0gZnJvbSAnLi4vLi4vaW50ZXJmYWNlcyc7XG5pbXBvcnQgeyBDUkVBVE9SIH0gZnJvbSAnLi4vLi4vc3ltYm9scyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBpbmplY3RDb250cm9sbGVyT3B0aW9ucyhjb250cm9sbGVyOiB1bmtub3duKTogYXNzZXJ0cyBjb250cm9sbGVyIGlzIEluamVjdGFibGVDb250cm9sbGVyIHtcbiAgaWYgKGNvbnRyb2xsZXIgaW5zdGFuY2VvZiBGdW5jdGlvbikge1xuICAgIGlmICghKENSRUFUT1IgaW4gY29udHJvbGxlcikpIHtcbiAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShjb250cm9sbGVyLCBDUkVBVE9SLCB7IHZhbHVlOiB7fSB9KTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH1cblxuICB0aHJvdyBuZXcgRXJyb3IoJ0ludmFsaWQgdXNhZ2Ugb2YgQENvbnRyb2xsZXIgZGVjb3JhdG9yJyk7XG59XG4iXX0= |
@@ -38,3 +38,3 @@ "use strict"; | ||
return metadata | ||
.map(value => injectables.get(value)) | ||
.map((value) => injectables.get(value)) | ||
.map((value) => { | ||
@@ -46,2 +46,2 @@ if (value) | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5qZWN0LWRlcGVuZGVuY2llcy5qcyIsInNvdXJjZVJvb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Q29uc3RydWN0b3I8Qz4sXG4gIGluamVjdGFibGVzOiBJbmplY3RhYmxlcyxcbiAgY2FjaGVSZXN1bHQ6IGJvb2xlYW4sXG4gIGNsYXNzTmFtZTogc3RyaW5nLFxuKSB7XG4gIGNvbnN0IG1ldGFkYXRhID0gUmVmbGVjdC5nZXRNZXRhZGF0YSgnZGVzaWduOnBhcmFtdHlwZXMnLCBjb25zdHJ1Y3RvcikgfHwgW107XG4gIHJldHVybiBtZXRhZGF0YVxuICAgIC5tYXAoKHZhbHVlKSA9PiBpbmplY3RhYmxlcy5nZXQodmFsdWUpKVxuICAgIC5tYXAoKHZhbHVlOiBJbmplY3RhYmxlU2VydmljZSB8IHVuZGVmaW5lZCkgPT4ge1xuICAgICAgaWYgKHZhbHVlKSByZXR1cm4gdmFsdWVbQ1JFQVRPUl0ucmVnaXN0ZXIoaW5qZWN0YWJsZXMsIGNhY2hlUmVzdWx0KTtcbiAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgIGBJbnZhbGlkIGFyZ3VtZW50IHByb3ZpZGVkIGluICR7Y2xhc3NOYW1lfSdzIGNvbnN0cnVjdG9yLiBFeHBlY3RlZCBjbGFzcyBhbm5vdGF0ZWQgd2l0aCBAU2VydmljZS5gLFxuICAgICAgKTtcbiAgICB9KTtcbn1cbiJdfQ== |
@@ -15,4 +15,4 @@ /** | ||
}; | ||
export declare function requestDecoratorsFactory(method: HttpMethods): (routeOrConfig?: (string | RouteConfig), options?: RouteShorthandOptions) => (target: any, propKey?: (string | symbol)) => void; | ||
export declare function requestDecoratorsFactory(method: HttpMethods): (routeOrConfig?: string | RouteConfig, options?: RouteShorthandOptions) => (target: any, propKey?: string | symbol) => void; | ||
export declare function controllerMethodDecoratorsFactory(method: HttpMethods, config: ParsedRouteConfig, { constructor }: any, propKey: string | symbol): void; | ||
export {}; |
@@ -19,3 +19,4 @@ "use strict"; | ||
return { | ||
...parsed, options: { ...parsed.options } | ||
...parsed, | ||
options: { ...parsed.options }, | ||
}; | ||
@@ -80,2 +81,2 @@ } | ||
exports.controllerMethodDecoratorsFactory = controllerMethodDecoratorsFactory; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC1kZWNvcmF0b3JzLmZhY3RvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWIvZGVjb3JhdG9ycy9oZWxwZXJzL3JlcXVlc3QtZGVjb3JhdG9ycy5mYWN0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUc7OztBQUlILDJDQUF5RTtBQUN6RSx5REFBZ0Y7QUFDaEYsbUVBQThEO0FBSzlELFNBQVMsV0FBVyxDQUFDLFNBQStCLEdBQUcsRUFBRSxVQUFpQyxFQUFFO0lBQ3hGLElBQUksT0FBTyxNQUFNLEtBQUssUUFBUTtRQUFFLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxFQUFFLE9BQU8sRUFBRSxDQUFDO0lBRWhFLE1BQU0sTUFBTSxHQUFHLEVBQUUsT0FBTyxFQUFFLEdBQUcsTUFBTSxFQUFFLENBQUM7SUFDdEMsT0FBTztRQUNILEdBQUcsTUFBTSxFQUFFLE9BQU8sRUFBRSxFQUFFLEdBQUcsTUFBTSxDQUFDLE9BQU8sRUFBRTtLQUM1QyxDQUFDO0FBQ04sQ0FBQztBQUVELE1BQU0sb0JBQW9CLEdBQUcsSUFBSSxPQUFPLEVBQWtDLENBQUM7QUFFM0UsU0FBUyxTQUFTLENBQUMsTUFBVyxFQUFFLE9BQXVCLEVBQUUsR0FBRyxJQUFlO0lBQ3ZFLElBQUksb0JBQW9CLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQztRQUFFLE9BQU8sb0JBQW9CLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ2hGLE1BQU0sTUFBTSxHQUFHLElB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IChwcm9wS2V5KSB7XG4gICAgICAgICAgICAgICAgY29udHJvbGxlck1ldGhvZERlY29yYXRvcnNGYWN0b3J5KG1ldGhvZCwgY29uZmlnLCB0YXJnZXQsIHByb3BLZXkpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGFyZ2V0W0NSRUFUT1JdID0ge1xuICAgICAgICAgICAgICAgIHJlZ2lzdGVyOiAoaW5zdGFuY2U6IEZhc3RpZnlJbnN0YW5jZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaGFzSG9va3ModGFyZ2V0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBob29rIG9mIHRhcmdldFtIT09LU10gYXMgUmVxdWVzdEhvb2tbXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGhvb2tGbiA9IChyZXF1ZXN0OiBGYXN0aWZ5UmVxdWVzdCwgLi4ucmVzdDogdW5rbm93bltdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRUYXJnZXQodGFyZ2V0LCByZXF1ZXN0LCAuLi5yZXN0KVtob29rLmhhbmRsZXJOYW1lXShyZXF1ZXN0LCAuLi5yZXN0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3B0aW9uID0gY29uZmlnLm9wdGlvbnNbaG9vay5uYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9uID09IG51bGwpIGNvbmZpZy5vcHRpb25zW2hvb2submFtZV0gPSBob29rRm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoQXJyYXkuaXNBcnJheShvcHRpb24pKSBvcHRpb24ucHVzaChob29rRm4pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgY29uZmlnLm9wdGlvbnNbaG9vay5uYW1lXSA9IFtvcHRpb24gYXMgKC4uLmFyZ3M6IHVua25vd25bXSkgPT4gdm9pZCwgaG9va0ZuXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoaGFzRXJyb3JIYW5kbGVycyh0YXJnZXQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcub3B0aW9ucy5lcnJvckhhbmRsZXIgPSAoZXJyb3IsIHJlcXVlc3QsIC4uLnJlc3QpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlcnJvcnNIYW5kbGVyID0gY3JlYXRlRXJyb3JzSGFuZGxlcih0YXJnZXRbRVJST1JfSEFORExFUlNdLCBnZXRUYXJnZXQodGFyZ2V0LCByZXF1ZXN0LCAuLi5yZXN0KSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXJyb3JzSGFuZGxlcihlcnJvciwgcmVxdWVzdCwgLi4ucmVzdCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGluc3RhbmNlW21ldGhvZF0oY29uZmlnLnVybCwgY29uZmlnLm9wdGlvbnMsIGZ1bmN0aW9uIChyZXF1ZXN0LCAuLi5yZXN0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0VGFyZ2V0KHRhcmdldCwgcmVxdWVzdCwgLi4ucmVzdCkuaGFuZGxlKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgIH07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjb250cm9sbGVyTWV0aG9kRGVjb3JhdG9yc0ZhY3RvcnkobWV0aG9kOiBIdHRwTWV0aG9kcywgY29uZmlnOiBQ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ydWN0b3IgfTogYW55LCBoYW5kbGVyTmFtZTogc3RyaW5nIHwgc3ltYm9sKSA9PiB7XG4gICAgZW5zdXJlSG9va3MoY29uc3RydWN0b3IpO1xuXG4gICAgY29uc3RydWN0b3JbSE9PS1NdLnB1c2goe1xuICAgICAgbmFtZSxcbiAgICAgIGhhbmRsZXJOYW1lLFxuICAgIH0pO1xuICB9O1xufVxuIl19 |
@@ -17,3 +17,3 @@ "use strict"; | ||
target[symbols_1.INITIALIZER] = (self) => { | ||
Promise.all(dependencies.map(dep => exports.readyMap.get(dep))) | ||
Promise.all(dependencies.map((dep) => exports.readyMap.get(dep))) | ||
.then(() => self[propertyKey]()) | ||
@@ -27,2 +27,2 @@ .then(ready.resolve) | ||
exports.Initializer = Initializer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5pdGlhbGl6ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvZGVjb3JhdG9ycy9pbml0aWFsaXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx3Q0FBeUM7QUFDekMsZ0RBQTZDO0FBRWhDLFFBQUEsUUFBUSxHQUFHLElBQUksR0FBRyxFQUFzQixDQUFDO0FBRXREOzs7O0dBSUc7QUFDSCxTQUFnQixXQUFXLENBQUMsZUFBc0IsRUFBRTtJQUNoRCxPQUFPLENBQUMsZUFBb0IsRUFBRSxXQUFXLEVBQUUsRUFBRTtRQUN6QyxNQUFNLE1BQU0sR0FBRyxlQUFlLENBQUMsV0FBVyxDQUFDO1FBQzNDLE1BQU0sS0FBSyxHQUFHLElBQUksbUJBQVEsRUFBRSxDQUFDO1FBRTdCLE1BQU0sQ0FBQyxxQkFBVyxDQUFDLEdBQUcsQ0FBQyxJQUFTLEVBQUUsRUFBRTtZQUNoQyxPQUFPLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxHQUFHLENBQUMsR0F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JnZXRQcm90b3R5cGU6IGFueSwgcHJvcGVydHlLZXkpID0+IHtcbiAgICAgICAgY29uc3QgdGFyZ2V0ID0gdGFyZ2V0UHJvdG90eXBlLmNvbnN0cnVjdG9yO1xuICAgICAgICBjb25zdCByZWFkeSA9IG5ldyBEZWZlcnJlZCgpO1xuXG4gICAgICAgIHRhcmdldFtJTklUSUFMSVpFUl0gPSAoc2VsZjogYW55KSA9PiB7XG4gICAgICAgICAgICBQcm9taXNlLmFsbChkZXBlbmRlbmNpZXMubWFwKGRlcCA9PiByZWFkeU1hcC5nZXQoZGVwKSkpXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4gc2VsZltwcm9wZXJ0eUtleV0oKSlcbiAgICAgICAgICAgICAgICAudGhlbihyZWFkeS5yZXNvbHZlKVxuICAgICAgICAgICAgICAgIC5jYXRjaChyZWFkeS5yZWplY3QpO1xuICAgICAgICB9O1xuXG4gICAgICAgIHJlYWR5TWFwLnNldCh0YXJnZXQsIHJlYWR5LnByb21pc2UpO1xuICAgIH07XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5pdGlhbGl6ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvZGVjb3JhdG9ycy9pbml0aWFsaXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx3Q0FBeUM7QUFDekMsZ0RBQTZDO0FBRWhDLFFBQUEsUUFBUSxHQUFHLElBQUksR0FBRyxFQUFzQixDQUFDO0FBRXREOzs7O0dBSUc7QUFDSCxTQUFnQixXQUFXLENBQUMsZUFBc0IsRUFBRTtJQUNsRCxPQUFPLENBQUMsZUFBb0IsRUFBRSxXQUFXLEVBQUUsRUFBRTtRQUMzQyxNQUFNLE1BQU0sR0FBRyxlQUFlLENBQUMsV0FBVyxDQUFDO1FBQzNDLE1BQU0sS0FBSyxHQUFHLElBQUksb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WFsaXplZCBiZWZvcmUgdGhpcyBvbmUgd2lsbCBiZVxuICovXG5leHBvcnQgZnVuY3Rpb24gSW5pdGlhbGl6ZXIoZGVwZW5kZW5jaWVzOiBhbnlbXSA9IFtdKTogTWV0aG9kRGVjb3JhdG9yIHtcbiAgcmV0dXJuICh0YXJnZXRQcm90b3R5cGU6IGFueSwgcHJvcGVydHlLZXkpID0+IHtcbiAgICBjb25zdCB0YXJnZXQgPSB0YXJnZXRQcm90b3R5cGUuY29uc3RydWN0b3I7XG4gICAgY29uc3QgcmVhZHkgPSBuZXcgRGVmZXJyZWQoKTtcblxuICAgIHRhcmdldFtJTklUSUFMSVpFUl0gPSAoc2VsZjogYW55KSA9PiB7XG4gICAgICBQcm9taXNlLmFsbChkZXBlbmRlbmNpZXMubWFwKChkZXApID0+IHJlYWR5TWFwLmdldChkZXApKSlcbiAgICAgICAgLnRoZW4oKCkgPT4gc2VsZltwcm9wZXJ0eUtleV0oKSlcbiAgICAgICAgLnRoZW4ocmVhZHkucmVzb2x2ZSlcbiAgICAgICAgLmNhdGNoKHJlYWR5LnJlamVjdCk7XG4gICAgfTtcblxuICAgIHJlYWR5TWFwLnNldCh0YXJnZXQsIHJlYWR5LnByb21pc2UpO1xuICB9O1xufVxuIl19 |
@@ -30,2 +30,2 @@ "use strict"; | ||
exports.Inject = Inject; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5qZWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL2RlY29yYXRvcnMvaW5qZWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBOzs7Ozs7R0FNRztBQUNILHdDQUErQztBQUMvQyxpRUFBb0U7QUFFcEU7Ozs7Ozs7OztHQVNHO0FBQ0gsU0FBZ0IsTUFBTSxDQUFDLElBQStCO0lBQ2xELE9BQU8sQ0FBQyxNQUFNLEVBQUUsV0FBVyx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| ||
export declare const ControllerTypeStrategies: { | ||
readonly 0: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => void; | ||
readonly 0: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => any; | ||
readonly 1: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => void; | ||
}; |
@@ -46,2 +46,3 @@ "use strict"; | ||
registerHooks(constructor[symbols_1.HOOKS], instance, controllerInstance); | ||
return controllerInstance; | ||
}, | ||
@@ -51,3 +52,3 @@ [registry_1.ControllerType.REQUEST](instance, constructor, injectablesMap, cacheResult) { | ||
if (class_properties_1.hasHandlers(constructor)) | ||
constructor[symbols_1.HANDLERS].forEach(handler => { | ||
constructor[symbols_1.HANDLERS].forEach((handler) => { | ||
const { url, method, handlerMethod, options } = handler; | ||
@@ -64,3 +65,3 @@ instance[method](url, options, function (request, ...args) { | ||
if (class_properties_1.hasHooks(constructor)) | ||
constructor[symbols_1.HOOKS].forEach(hook => instance.addHook(hook.name, (request, ...rest) => { | ||
constructor[symbols_1.HOOKS].forEach((hook) => instance.addHook(hook.name, (request, ...rest) => { | ||
return getTarget(request)[hook.handlerName](request, ...rest); | ||
@@ -71,3 +72,3 @@ })); | ||
function registerHandlers(handlers, instance, controllerInstance) { | ||
handlers.forEach(handler => { | ||
handlers.forEach((handler) => { | ||
instance[handler.method](handler.url, handler.options, controllerInstance[handler.handlerMethod].bind(controllerInstance)); | ||
@@ -77,3 +78,3 @@ }); | ||
function registerHooks(hooks, instance, controllerInstance) { | ||
hooks.forEach(hook => { | ||
hooks.forEach((hook) => { | ||
instance.addHook(hook.name, controllerInstance[hook.handlerName].bind(controllerInstance)); | ||
@@ -85,2 +86,2 @@ }); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci10eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi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Ck7XG4gICAgICAgIH0pLFxuICAgICAgKTtcbiAgfSxcbn0gYXMgY29uc3Q7XG5cbmZ1bmN0aW9uIHJlZ2lzdGVySGFuZGxlcnMoaGFuZGxlcnM6IEhhbmRsZXJbXSwgaW5zdGFuY2U6IEZhc3RpZnlJbnN0YW5jZSwgY29udHJvbGxlckluc3RhbmNlOiBhbnkpOiB2b2lkIHtcbiAgaGFuZGxlcnMuZm9yRWFjaCgoaGFuZGxlcikgPT4ge1xuICAgIGluc3RhbmNlW2hhbmRsZXIubWV0aG9kXShcbiAgICAgIGhhbmRsZXIudXJsLFxuICAgICAgaGFuZGxlci5vcHRpb25zLFxuICAgICAgY29udHJvbGxlckluc3RhbmNlW2hhbmRsZXIuaGFuZGxlck1ldGhvZF0uYmluZChjb250cm9sbGVySW5zdGFuY2UpLFxuICAgICk7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiByZWdpc3Rlckhvb2tzKGhvb2tzOiBIb29rW10sIGluc3RhbmNlOiBGYXN0aWZ5SW5zdGFuY2UsIGNvbnRyb2xsZXJJbnN0YW5jZTogYW55KTogdm9pZCB7XG4gIGhvb2tzLmZvckVhY2goKGhvb2spID0+IHtcbiAgICBpbnN0YW5jZS5hZGRIb29rKGhvb2submFtZSwgY29udHJvbGxlckluc3RhbmNlW2hvb2suaGFuZGxlck5hbWVdLmJpbmQoY29udHJvbGxlckluc3RhbmNlKSk7XG4gIH0pO1xufVxuXG5mdW5jdGlvbiByZWdpc3RlckVycm9ySGFuZGxlcnMoZXJyb3JIYW5kbGVyczogRXJyb3JIYW5kbGVyW10sIGluc3RhbmNlOiBGYXN0aWZ5SW5zdGFuY2UsIGNsYXNzSW5zdGFuY2U6IGFueSkge1xuICBpbnN0YW5jZS5zZXRFcnJvckhhbmRsZXIoY3JlYXRlRXJyb3JzSGFuZGxlcihlcnJvckhhbmRsZXJzLCBjbGFzc0luc3RhbmNlKSk7XG59XG4iXX0= |
<h1 style="text-align: center">Fastify decorators</h1> | ||
## Bootstrap controllers | ||
Controller is class decorated with `@Controller` and designed to handle request to its routes. | ||
### by using controllers list | ||
### Creating controller | ||
It's possible to bootstrap controllers without necessarily knowing where they are and just treat them as "modules". | ||
For that reason `bootstrap` method has `controller` options parameter that accepts array of controllers to bootstrap. | ||
First step is to create a class and decorate it | ||
*Usage*: | ||
```typescript | ||
import { bootstrap } from 'fastify-decorators'; | ||
import AuthController from './src/auth/auth.controller'; | ||
import UserController from './src/user/user.controller'; | ||
import { PaymentController } from './src/payment/PaymentController'; | ||
```ts | ||
import { Controller } from 'fastify-decorators'; | ||
// Require the framework and instantiate it | ||
const instance = require('fastify')(); | ||
// Define bootstrap options | ||
const bootstrapOptions = { | ||
controllers: [ | ||
AuthController, | ||
UserController, | ||
PaymentController, | ||
], | ||
}; | ||
// Register our bootstrap with options | ||
instance.register(bootstrap, bootstrapOptions); | ||
@Controller() | ||
export default class SimpleController {} | ||
``` | ||
### by using autoloader | ||
_Controller decorator configuration_: | ||
Let's imagine that: | ||
- We already have the directory named `controllers` which contains all our controllers | ||
- Each handler contains `.controller.` in its name. | ||
Controller decorator may accept 2 kinds of options | ||
To make it works without manual loading we can use `bootstrap` method: | ||
```typescript | ||
import { bootstrap } from 'fastify-decorators'; | ||
import { resolve } from 'path'; | ||
1. String which represent route URL which will be the root path of our controller's endpoints. | ||
// Require the framework and instantiate it | ||
const instance = require('fastify')(); | ||
default is `'/'` | ||
// Define bootstrap options | ||
const bootstrapOptions = { | ||
// This option defines path to directory with files to load | ||
directory: resolve(__dirname, `controllers`), | ||
1. Object which contains `route` representing URL used as the root path and `type` for controller type. | ||
// This option defines which pattern should file match | ||
mask: /\.controller\./ | ||
}; | ||
Controller must be one of the two types: | ||
// Register our bootstrap with options | ||
instance.register(bootstrap, bootstrapOptions); | ||
``` | ||
- `ControllerType.SINGLETON` - creates single class instance for all requests | ||
- `ControllerType.REQUEST` - creates new class instance per request | ||
## Writing controllers | ||
### Creating handlers | ||
The Fastify decorators module exports set of decorators to implement controllers with multiple handlers and hooks. | ||
Controller is able to handle different HTTP requests methods with different routes. | ||
For that, we need to declare a controller class method and decorate it with HTTP method decorator. | ||
### Base class | ||
_List of available decorators_: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, 'HEAD' and `OPTIONS`. | ||
There also special decorator in place - `ALL` which will handle all types of request. | ||
Every controller should be decorated with `@Controller` decorator and exported: | ||
```typescript | ||
import { Controller } from 'fastify-decorators'; | ||
@Controller('/') | ||
export default class SimpleController { | ||
} | ||
``` | ||
### Handlers | ||
To mark controller method as handler you have to use one of the following decorators: | ||
- `ALL` | ||
- `GET` | ||
- `POST` | ||
- `PUT` | ||
- `PATCH` | ||
- `DELETE` | ||
- `OPTIONS` | ||
- `HEAD` | ||
*example*: | ||
```typescript | ||
```ts | ||
import { FastifyRequest, FastifyReply } from 'fastify'; | ||
import { Controller, GET } from 'fastify-decorators'; | ||
@Controller('/') | ||
@Controller() | ||
export default class SimpleController { | ||
@GET('/') | ||
async getHandler(request, reply) { | ||
return 'Hello world!' | ||
} | ||
} | ||
``` | ||
@GET() | ||
async getHandler(request: FastifyRequest, reply: FastifyReply) { | ||
return 'Hello world!'; | ||
} | ||
### Controller configuration | ||
Controller may have to different behaviours: | ||
- `Singleton` (default) - creates single controller instance for all requests | ||
- `Request` - creates new controller instance for each request | ||
If you would like to use behaviour different to `Singleton` then you need specify it in decorator like in example below: | ||
```typescript | ||
import { Controller, ControllerType, GET } from 'fastify-decorators'; | ||
@Controller({ | ||
route: '/', | ||
type: ControllerType.REQUEST, | ||
}) | ||
export default class SimpleController { | ||
@GET('/') | ||
async getHandler(request, reply) { | ||
return 'Hello world!' | ||
} | ||
@POST() | ||
async postHandler(request: FastifyRequest, reply: FastifyReply) { | ||
// Doing some activities here | ||
} | ||
} | ||
``` | ||
### Requests handlers configuration | ||
Read [Request Handlers] for more info. | ||
Not only controller but also handlers within may have complex configuration, to use it you can provide [`RouteConfig`] object instead of string in method decorator. | ||
For example if we want to specify response type for our endpoint above we can use configuration object with a schema specified: | ||
### Injecting services | ||
```typescript | ||
import { Controller, ControllerType, GET } from 'fastify-decorators'; | ||
@Controller({ | ||
route: '/', | ||
type: ControllerType.REQUEST, | ||
}) | ||
export default class SimpleController { | ||
@GET({ | ||
url: '/', | ||
options: { | ||
schema: { | ||
response: { | ||
200: { type: 'string' }, | ||
}, | ||
}, | ||
}, | ||
}) | ||
async getHandler(request, reply) { | ||
return 'Hello world!' | ||
} | ||
} | ||
``` | ||
Controllers may depend on other services and for such cases library provides dependency injection mechanism. | ||
Decorators accept `RouteConfig` with follow fields: | ||
To inject service you will need to decorate your service with `@Service` decorator. | ||
| name | type | required | description | | ||
|---------|-----------------|:--------:|--------------------------------------------------| | ||
| url | `string` | yes | Route url which will be passed to Fastify | | ||
| options | [`RouteConfig`] | no | Config for route which will be passed to Fastify | | ||
_Example_: | ||
**NOTE**: These decorators can't be mixed, and you can use only one decorator per method. | ||
```ts | ||
import { Service } from 'fastify-decorators'; | ||
### Dependency injection and access to Fastify instance | ||
@Service() | ||
export class MyService {} | ||
``` | ||
Main article [Dependency injection] | ||
After that you can inject the service into other service or controller with one of 3 ways: | ||
Since v2 `fastify-decorators` supports DI mechanism. | ||
DI able to provide `FastifyInstance` for your controllers. It is possible via `@Inject` decorator: | ||
_getInstanceByToken_: | ||
```typescript | ||
import { FastifyInstance } from 'fastify'; | ||
import { GET, ControllerType, Controller, Inject, FastifyInstanceToken } from 'fastify-decorators'; | ||
```ts | ||
import { getInstanceByToken, Controller } from 'fastify-decorators'; | ||
import { MyService } from './my-service'; | ||
@Controller({ | ||
route: '/', | ||
type: ControllerType.REQUEST, | ||
}) | ||
export default class SimpleController { | ||
@Inject(FastifyInstanceToken) | ||
private instance!: FastifyInstance; | ||
@GET({ | ||
url: '/', | ||
options: { | ||
schema: { | ||
response: { | ||
200: { type: 'string' }, | ||
}, | ||
}, | ||
}, | ||
}) | ||
async getHandler(request, reply) { | ||
return 'Hello world!' | ||
} | ||
@GET('/routes') | ||
async routes() { | ||
return this.instance.printRoutes(); | ||
} | ||
@Controller() | ||
export class MyController { | ||
myService: MyService = getInstanceByToken(MyService); | ||
} | ||
``` | ||
#### Accessing FastifyInstance in decorators | ||
_Inject_: | ||
If you need `FastifyInstance` in decorators (for example to determine specific hooks for route) `fastify-decorators` provides `getInstanceByToken` function. | ||
This function accepts injectable token which is `FastifyInstanceToken` for the instance. | ||
```ts | ||
import { Controller, Inject } from 'fastify-decorators'; | ||
import { MyService } from './my-service'; | ||
*Note*: Be aware instance property should be static otherwise decorators cannot get access to it. | ||
@Controller() | ||
export class MyController { | ||
@Inject(MyService) | ||
myService!: MyService; | ||
} | ||
``` | ||
```typescript | ||
import { FastifyInstance } from 'fastify'; | ||
import { Controller, FastifyInstanceToken, GET, getInstanceByToken } from 'fastify-decorators'; | ||
_Constructor parameters_: | ||
@Controller({ route: '' }) | ||
export default class MyController { | ||
private static instance = getInstanceByToken<FastifyInstance>(FastifyInstanceToken); | ||
```ts | ||
import { Controller } from 'fastify-decorators'; | ||
import { MyService } from './my-service'; | ||
@GET({ | ||
url: '', | ||
options: { | ||
preValidation: MyController.instance.preValidationDecorator | ||
} | ||
}) | ||
public async validatedRoute() { | ||
/* Some stuff */ | ||
} | ||
@Controller() | ||
export class MyController { | ||
constructor(public myService: MyService) {} | ||
} | ||
``` | ||
### Hooks | ||
Read [Services and dependency injection] for more info | ||
### Creating hooks | ||
There are also decorator which allows using [Fastify Hooks]: | ||
```typescript | ||
```ts | ||
import { Controller, Hook } from 'fastify-decorators'; | ||
@@ -236,6 +124,6 @@ | ||
export default class SimpleController { | ||
@Hook('onSend') | ||
async onSend(request, reply) { | ||
reply.removeHeader('X-Powered-By'); | ||
} | ||
@Hook('onSend') | ||
async onSend(request, reply) { | ||
reply.removeHeader('X-Powered-By'); | ||
} | ||
} | ||
@@ -250,3 +138,3 @@ ``` | ||
```typescript | ||
```ts | ||
import fs from 'fs'; | ||
@@ -256,28 +144,28 @@ import path from 'path'; | ||
class TokenNotFoundError extends Error { | ||
} | ||
class TokenNotFoundError extends Error {} | ||
@Controller('/') | ||
export default class SimpleController { | ||
@GET('/') | ||
async get(request, reply) { | ||
// may throw FS_READ_ERROR | ||
const content = fs.readFileSync(path.join(__dirname, request.query.fileName)); | ||
@GET('/') | ||
async get(request, reply) { | ||
// may throw FS_READ_ERROR | ||
const content = fs.readFileSync(path.join(__dirname, request.query.fileName)); | ||
if (!content.includes('token')) { | ||
throw new TokenNotFoundError('Token not found in file requested') | ||
} | ||
return { message: 'ok' } | ||
if (!content.includes('token')) { | ||
throw new TokenNotFoundError('Token not found in file requested'); | ||
} | ||
@ErrorHandler(TokenNotFoundError) | ||
handleTokenNotFound(error: TokenNotFoundError, request, reply) { | ||
reply.status(403).send({ message: 'You have no access' }); | ||
} | ||
return { message: 'ok' }; | ||
} | ||
@ErrorHandler(TokenNotFoundError) | ||
handleTokenNotFound(error: TokenNotFoundError, request, reply) { | ||
reply.status(403).send({ message: 'You have no access' }); | ||
} | ||
} | ||
``` | ||
[Fastify Hooks]: https://github.com/fastify/fastify/blob/master/docs/Hooks.md | ||
[`RouteConfig`]: https://github.com/fastify/fastify/blob/master/docs/Routes.md | ||
[Dependency Injection]: Dependency-Injection.md | ||
[request handlers]: ./Request%20Handlers.md | ||
[services and dependency injection]: ./Services%20and%20dependency%20injection.md | ||
[fastify hooks]: https://github.com/fastify/fastify/blob/master/docs/Hooks.md | ||
[`routeconfig`]: https://github.com/fastify/fastify/blob/master/docs/Routes.md |
@@ -7,8 +7,17 @@ <h1 style="text-align: center">Fastify decorators</h1> | ||
- [Notes about dependency injection](#notes-about-dependency-injection) | ||
- [Using `configureControllerTest`](#using-configurecontrollertest) | ||
- [Using `configureServiceTest`](#using-configureservicetest) | ||
- [Services without async initializer](#sync-service-testing) | ||
- [Services with async initializer](#async-service-testing) | ||
- [Services without async initializer](#sync-service-testing) | ||
- [Services with async initializer](#async-service-testing) | ||
- [Bootstrap whole server](#bootstrap-whole-server) | ||
### Notes about dependency injection | ||
fastify-decorators provide dependency injection functionality only when [`reflect-metadata`] required. | ||
It leads to mandatory of requiring this package to tests as well. | ||
As example for Jest you can take a look on our [`jest.environment.js`] | ||
### Using `configureControllerTest` | ||
@@ -19,6 +28,7 @@ | ||
*Note*: if mock was not provided for one or more dependencies then originals will be used. | ||
_Note_: if mock was not provided for one or more dependencies then originals will be used. | ||
*Usage*: | ||
```typescript | ||
_Usage_: | ||
```ts | ||
import { FastifyInstance } from 'fastify'; | ||
@@ -31,3 +41,3 @@ import { configureControllerTest } from 'fastify-decorators/testing'; | ||
let instance: FastifyInstance; | ||
const authService = { authorize: jest.fn() } | ||
const authService = { authorize: jest.fn() }; | ||
@@ -45,3 +55,3 @@ beforeEach(async () => { | ||
}); | ||
afterEach(() => jest.restoreAllMocks()); | ||
afterEach(() => jest.restoreAllMocks()); | ||
@@ -57,3 +67,3 @@ it(`should reply with 'ok' if authorization success`, async () => { | ||
expect(JSON.parse(result.body)).toEqual({ message: 'ok' }); | ||
expect(result.json()).toEqual({ message: 'ok' }); | ||
}); | ||
@@ -63,2 +73,40 @@ }); | ||
#### Accessing controller instance | ||
The `configureControllerTest` decorate Fastify instance with `controller` property which may be used to access controller instance. | ||
_Note_: controller will be `undefined` in case "per request" type is used. | ||
_Example_: | ||
```ts | ||
import { FastifyInstance } from 'fastify'; | ||
import { configureControllerTest } from 'fastify-decorators/testing'; | ||
import { AuthController } from '../src/auth.controller'; | ||
describe('Controller: AuthController', () => { | ||
let instance: FastifyInstance; | ||
beforeEach(async () => { | ||
instance = await configureControllerTest({ | ||
controller: AuthController, | ||
}); | ||
}); | ||
afterEach(() => jest.restoreAllMocks()); | ||
it(`should reply with 'ok' if authorization success`, async () => { | ||
const controllerInstance = instance.controller; | ||
jest.spyOn(controllerInstance, 'authorize').mockReturnValue(Promise.resolve({ message: 'ok' })); | ||
const result = await instance.inject({ | ||
url: '/authorize', | ||
method: 'POST', | ||
payload: { login: 'test', password: 'test' }, | ||
}); | ||
expect(result.json()).toEqual({ message: 'ok' }); | ||
}); | ||
}); | ||
``` | ||
### Using `configureServiceTest` | ||
@@ -68,3 +116,3 @@ | ||
*Note*: if mock was not provided for one or more dependencies then originals will be used. | ||
_Note_: if mock was not provided for one or more dependencies then originals will be used. | ||
@@ -75,4 +123,5 @@ #### Sync service testing | ||
*Usage*: | ||
```typescript | ||
_Usage_: | ||
```ts | ||
import { configureServiceTest } from 'fastify-decorators/testing'; | ||
@@ -102,3 +151,4 @@ import { RolesService } from '../src/roles.service'; | ||
rolesService.isAdmin.and.returnValue(false); | ||
const bearer = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlcyI6W119.0Dd6yUeJ4UbCr8WyXOiK3BhqVVwJFk5c53ipJBWenmc'; | ||
const bearer = | ||
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlcyI6W119.0Dd6yUeJ4UbCr8WyXOiK3BhqVVwJFk5c53ipJBWenmc'; | ||
@@ -117,3 +167,3 @@ const result = service.hasSufficientRole(bearer); | ||
```typescript | ||
```ts | ||
import { configureServiceTest } from 'fastify-decorators/testing'; | ||
@@ -143,3 +193,4 @@ import { RolesService } from '../src/roles.service'; | ||
rolesService.isAdmin.and.returnValue(false); | ||
const bearer = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlcyI6W119.0Dd6yUeJ4UbCr8WyXOiK3BhqVVwJFk5c53ipJBWenmc'; | ||
const bearer = | ||
'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlcyI6W119.0Dd6yUeJ4UbCr8WyXOiK3BhqVVwJFk5c53ipJBWenmc'; | ||
@@ -158,11 +209,14 @@ const result = service.hasSufficientRole(bearer); | ||
*Note*: read more at [Fastify testing documentation](https://github.com/fastify/fastify/blob/master/docs/Testing.md) | ||
_Note_: read more at [Fastify testing documentation](https://github.com/fastify/fastify/blob/master/docs/Testing.md) | ||
*Example*: | ||
_Example_: | ||
*src/index.ts*: | ||
```typescript | ||
_src/index.ts_: | ||
```ts | ||
import fastify from 'fastify'; | ||
const instance = fastify({ /* options */ }); | ||
const instance = fastify({ | ||
/* options */ | ||
}); | ||
@@ -174,9 +228,14 @@ /* your code */ | ||
*test/auth.spec.ts*: | ||
```typescript | ||
import { instance } from '../src' | ||
_test/auth.spec.ts_: | ||
```ts | ||
import { instance } from '../src'; | ||
describe('Application: authorization', () => { | ||
beforeEach(() => { /* Setup logic for test */ }); | ||
afterEach(() => { /* Teardown logic for test */ }); | ||
beforeEach(() => { | ||
/* Setup logic for test */ | ||
}); | ||
afterEach(() => { | ||
/* Teardown logic for test */ | ||
}); | ||
@@ -196,1 +255,4 @@ it('should check credentials and reply with result', async () => { | ||
``` | ||
[`reflect-metadata`]: http://npmjs.com/package/reflect-metadata | ||
[`jest.environment.js`]: ../jest.environment.js |
@@ -10,2 +10,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLWNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9pbnRlcmZhY2VzL2Jvb3RzdHJhcC1jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBBbmRyZXkgQ2hhbGtpbiA8TDJqTGlnYUBnbWFpbC5jb20+IChodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYSkuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBM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4/OiBib29sZWFuO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIENvbnRyb2xsZXJzTGlzdENvbmZpZyBleHRlbmRzIEZhc3RpZnlQbHVnaW5PcHRpb25zIHtcbiAgICAvKipcbiAgICAgKiBMaXN0IG9mIENvbnRyb2xsZXIgY2xhc3NlcyB0byBib290c3RyYXBcbiAgICAgKi9cbiAgICBjb250cm9sbGVyczogQ29uc3RydWN0b3I8dW5rbm93bj5bXTtcblxuICAgIC8qKlxuICAgICAqIEJ5IGRlZmF1bHQgYXBwbGljYXRpb24gd2lsbCBmYWlscyB0byBib290c3RyYXAgaWYgb25lIG9yIG1vcmUgb2YgbG9hZGVkIGZpbGVzIGRvZXMgbm90IGNvbnRhaW4gdmFsaWQgY29udHJvbGxlciBvciBoYW5kbGVyXG4gICAgICogVGhpcyBvcHRpb24gYWxsb3dzIHRvIGNoYW5nZSB0aGlzIGJlaGF2aW9yXG4gICAgICogQGRlZmF1bHQgZmFsc2VcbiAgICAgKi9cbiAgICBza2lwQnJva2VuPzogYm9vbGVhbjtcbn1cblxuZXhwb3J0IHR5cGUgQm9vdHN0cmFwQ29uZmlnID0gQXV0b0xvYWRDb25maWcgfCBDb250cm9sbGVyc0xpc3RDb25maWc7XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLWNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9pbnRlcmZhY2VzL2Jvb3RzdHJhcC1jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBBbmRyZXkgQ2hhbGtpbiA8TDJqTGlnYUBnbWFpbC5jb20+IChodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYSkuIEFsbCB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xlclxuICAgKiBUaGlzIG9wdGlvbiBhbGxvd3MgdG8gY2hhbmdlIHRoaXMgYmVoYXZpb3JcbiAgICogQGRlZmF1bHQgZmFsc2VcbiAgICovXG4gIHNraXBCcm9rZW4/OiBib29sZWFuO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIENvbnRyb2xsZXJzTGlzdENvbmZpZyBleHRlbmRzIEZhc3RpZnlQbHVnaW5PcHRpb25zIHtcbiAgLyoqXG4gICAqIExpc3Qgb2YgQ29udHJvbGxlciBjbGFzc2VzIHRvIGJvb3RzdHJhcFxuICAgKi9cbiAgY29udHJvbGxlcnM6IENvbnN0cnVjdG9yPHVua25vd24+W107XG5cbiAgLyoqXG4gICAqIEJ5IGRlZmF1bHQgYXBwbGljYXRpb24gd2lsbCBmYWlscyB0byBib290c3RyYXAgaWYgb25lIG9yIG1vcmUgb2YgbG9hZGVkIGZpbGVzIGRvZXMgbm90IGNvbnRhaW4gdmFsaWQgY29udHJvbGxlciBvciBoYW5kbGVyXG4gICAqIFRoaXMgb3B0aW9uIGFsbG93cyB0byBjaGFuZ2UgdGhpcyBiZWhhdmlvclxuICAgKiBAZGVmYXVsdCBmYWxzZVxuICAgKi9cbiAgc2tpcEJyb2tlbj86IGJvb2xlYW47XG59XG5cbmV4cG9ydCB0eXBlIEJvb3RzdHJhcENvbmZpZyA9IEF1dG9Mb2FkQ29uZmlnIHwgQ29udHJvbGxlcnNMaXN0Q29uZmlnO1xuIl19 |
@@ -10,2 +10,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci1jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvaW50ZXJmYWNlcy9jb250cm9sbGVyLWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEFuZHJleSBDaGFsa2luIDxMMmpMaWdhQGdtYWlsLmNvbT4gKGh0dHBzOi8vZ2l0aHViLmNvbS9MMmpMaWdhKS4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYS9mYXN0aWZ5LWRlY29yYXRvcnMvYmxvYi9tYXN0ZXIvTElDRU5TRVxuICovXG5cbmltcG9ydCB0eXBlIHsgQ29udHJvbGxlclR5cGUgfSBmcm9tICcuLi9yZWdpc3RyeSc7XG5cbi8qKlxuICogQ29uZmlnIGZvciBjb250cm9sbGVyc1xuICovXG5leHBvcnQgaW50ZXJmYWNlIENvbnRyb2xsZXJDb25maWcge1xuICAgIC8qKlxuICAgICAqIENvbnRyb2xsZXIgYmFzZSByb3V0ZVxuICAgICAqL1xuICAgIHJvdXRlOiBzdHJpbmc7XG5cbiAgICAvKipcbiAgICAgKiBDb250cm9sbGVyIHR5cGVcbiAgICAgKi9cbiAgICB0eXBlPzogQ29udHJvbGxlclR5cGU7XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci1jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvaW50ZXJmYWNlcy9jb250cm9sbGVyLWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEFuZHJleSBDaGFsa2luIDxMMmpMaWdhQGdtYWlsLmNvbT4gKGh0dHBzOi8vZ2l0aHViLmNvbS9MMmpMaWdhKS4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYS9mYXN0aWZ5LWRlY29yYXRvcnMvYmxvYi9tYXN0ZXIvTElDRU5TRVxuICovXG5cbmltcG9ydCB0eXBlIHsgQ29udHJvbGxlclR5cGUgfSBmcm9tICcuLi9yZWdpc3RyeSc7XG5cbi8qKlxuICogQ29uZmlnIGZvciBjb250cm9sbGVyc1xuICovXG5leHBvcnQgaW50ZXJmYWNlIENvbnRyb2xsZXJDb25maWcge1xuICAvKipcbiAgICogQ29udHJvbGxlciBiYXNlIHJvdXRlXG4gICAqL1xuICByb3V0ZTogc3RyaW5nO1xuXG4gIC8qKlxuICAgKiBDb250cm9sbGVyIHR5cGVcbiAgICovXG4gIHR5cGU/OiBDb250cm9sbGVyVHlwZTtcbn1cbiJdfQ== |
@@ -10,2 +10,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9pbnRlcmZhY2VzL2NvbnRyb2xsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBBbmRyZXkgQ2hhbGtpbiA8TDJqT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B8IHN5bWJvbDtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBIb29rIHtcbiAgbmFtZTogYW55O1xuICBoYW5kbGVyTmFtZTogc3RyaW5nIHwgc3ltYm9sO1xufVxuIl19 |
@@ -10,2 +10,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5qZWN0YWJsZS1jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9pbnRlcmZhY2VzL2luamVjdGFibGUtY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBBbmRyZXkgQ2hhbGtpbiA8TDJqTGlnYUBnbWFpbC5jb20+IChodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYSkuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2Vuc2UgdGhhdCBjYW4gYmVcbiAqIGZvdW5kIGluIHRoZSBMSUNFTlNFIGZpbGUgYXQgaHR0cHM6Ly9naXRodWIuY29tL0wyakxpZ2EvZmFzdGlmeS1kZWNvcmF0b3JzL2Jsb2IvbWFzdGVyL0xJQ0VOU0VcbiAqL1xuXG5pbXBvcnQgdHlwZSB7IEZhc3RpZnlJbnN0YW5jZSB9IGZyb20gJ2Zhc3RpZnknO1xuaW1wb3J0IHR5cGUgeyBDUkVBVE9SLCBJTklUSUFMSVpFUiwgSU5KRUNUQUJMRVMgfSBmcm9tICcuLi9zeW1ib2xzJztcblxuZXhwb3J0IHR5cGUgSW5qZWN0YWJsZXMgPSBNYXA8c3RyaW5nIHwgc3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ZXIoaW5zdGFuY2U/OiBGYXN0aWZ5SW5zdGFuY2UsIGluamVjdGFibGVzPzogSW5qZWN0YWJsZXMsIGNhY2hlUmVzdWx0PzogYm9vbGVhbik6IFByb21pc2U8dm9pZD47XG4gIH07XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSW5qZWN0YWJsZUNsYXNzIHtcbiAgW0lOSkVDVEFCTEVTXTogSW5qZWN0YWJsZXM7XG5cbiAgbmV3ICgpOiBhbnk7XG5cbiAgbmV3ICguLi5hcmdzOiB1bmtub3duW10pOiBhbnk7XG59XG4iXX0= |
@@ -22,2 +22,2 @@ "use strict"; | ||
exports.RequestHandler = RequestHandler; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC1oYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL2ludGVyZmFjZXMvcmVxdWVzdC1oYW5kbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUc7OztBQVdILHdDQUFxQztBQUVyQzs7R0FFRztBQUNILE1BQXNCLGNBQWM7SUFPaEMsWUFBZ0MsT0FBOEQsRUFDOUQsS0FBbUY7UUFEbkYsWUFBTyxHQUFQLE9BQU8sQ0FBdUQ7UUFDOUQsVUFBSyxHQUFMLEtBQUssQ0FBOEU7SUFDbkgsQ0FBQztDQVdKO0FBcEJELHdDQW9CQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQGxpY2Vuc2VcbiAqIENvcHlyaWdodCBBbmRyZXkgQ2hhbGtpbiA8TDJqTGlnYUBnbWFpbC5jb20+IChodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYSkuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4gKlxuICogVXNlIG9mIHRoaXMgc291cmNlIGNvZGUgaXMgZ292ZXJuZWQgYnkgYW4gTUlULXN0eWxlIGxpY2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defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUtY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL2ludGVyZmFjZXMvcm91dGUtY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUciLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgQW5kcmV5IENoYWxraW4gPEwyakxpZ2FAZ21haWwuY29tPiAoaHR0cHM6Ly9naXRodWIuY29tL0wyakxpZ2EpLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vZ2l0aHViLmNvbS9MMmpMaWdhL2Zhc3RpZnktZGVjb3JhdG9ycy9ibG9iL21hc3Rlci9MSUNFTlNFXG4gKi9cblxuaW1wb3J0IHR5cGUgeyBSb3V0ZVNob3J0aGFuZE9wdGlvbnMgfSBmcm9tICdmYXN0aWZ5JztcblxuLyoqXG4gKiBDb21tb24gY29uZmlnIGZvciBhbGwgcm91dGUgaGFuZGxlcnNcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBSb3V0ZUNvbmZpZyB7XG4gICAgLyoqXG4gICAgICogUm91dGUgdXJsIHdoaWNoIHdpbGwgYmUgcGFzc2VkIHRvIEZhc3RpZnlcbiAgICAgKi9cbiAgICB1cmw6IHN0cmluZztcblxuICAgIC8qKlxuICAgICAqIFJvdXRlIG9wdGlvbnMgd2hpY2ggd2lsbCBiZSBwYXNzZWQgdG8gRmFzdGlmeVxuICAgICAqL1x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wYXNzZWQgdG8gRmFzdGlmeVxuICAgKi9cbiAgb3B0aW9ucz86IFJvdXRlU2hvcnRoYW5kT3B0aW9ucztcbn1cbiJdfQ== |
{ | ||
"name": "fastify-decorators", | ||
"version": "3.4.1", | ||
"version": "3.5.0", | ||
"description": "Set of Typescript decorators to build Fastify server with controllers, services and hooks", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
303
README.md
@@ -12,14 +12,57 @@ [![Fastify decorators](./assets/logo.png)](https://github.com/L2jLiga/fastify-decorators) | ||
This package developed to provide useful typescript decorators to implement RequestHandler pattern with [Fastify]. | ||
> **Framework aimed to provide useful TypeScript decorators to implement controllers, services and request handlers, built with [Fastify].** | ||
**NOTE**: Fastify-decorators was developed with fastify `^3.0.0` and may not work with other versions. | ||
**NOTE**: fastify-decorators was developed with fastify `^3.0.0` and may not work with other versions. | ||
## Install | ||
## Benefits | ||
via npm: | ||
- **Fastify compatible** - Built with [Fastify] and supports all its features and plugins | ||
- **JSON Schema validation** - Build [JSON Schemas](https://json-schema.org/) to validate and speedup your requests and replies | ||
- **High performance** - Framework adds as less overhead to Fastify as it can | ||
- **Highly customizable** - Create your controllers, services and their methods as you wish | ||
- **100% TypeScript** - Written in [TypeScript](https://www.typescriptlang.org/) and comes with all the required typings | ||
- **Built-in DI** - Provides simple Dependency Injection interface to bind your entries | ||
## Documentation | ||
- [Getting started](#getting-started) | ||
- [Controllers] | ||
- [Request Handlers] | ||
- [Services and dependency injection] | ||
- [Hooks] | ||
- [Error handling] | ||
- [Testing] | ||
- [Migration guide (V3)] | ||
## IDE Support | ||
- [JetBrains IDE plugin] | ||
## Alternatives | ||
- **[NestJS]** - A progressive Node.js framework for building efficient, reliable and scalable server-side applications. | ||
- **[Fastify Resty]** - Modern and declarative REST API framework for superfast and oversimplification backend development, build on top of Fastify and TypeScript. | ||
## Getting started | ||
Hello! Thank you for checking out fastify-decorators! | ||
This documents aims to be gentle introduction to the fastify-decorators and its usages. | ||
### Prerequisites | ||
- Typescript | ||
- Fastify | ||
- typings for NodeJS (`@types/node` package installed) | ||
### Install | ||
Install with npm | ||
``` | ||
npm install fastify-decorators --save | ||
npm i fastify-decorators --save | ||
``` | ||
via yarn: | ||
Install with yarn | ||
``` | ||
@@ -29,142 +72,178 @@ yarn add fastify-decorators | ||
## IDE support | ||
### Additional TypeScript configuration | ||
- [JetBrains IDE plugin] | ||
Fastify-decorators requires `experimentalDecorators` feature to be enabled. For this you need to update your TypeScript config: | ||
## Documentation | ||
_tsconfig.json_: | ||
- [Getting Started] | ||
- [Request Handler] | ||
- [Controllers] | ||
- [Dependency Injection] | ||
- [Testing] | ||
- [Migration guide (V3)] | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"experimentalDecorators": true | ||
} | ||
} | ||
``` | ||
## Basic usage | ||
_Note_: if you struggle which `target` please refer to table below: | ||
### Controller | ||
| Node version | target | | ||
| ------------ | ------ | | ||
| 10.x | es2018 | | ||
| 12.x | es2019 | | ||
| 14.x | es2020 | | ||
*src/sample.controller.ts*: | ||
```typescript | ||
import { Controller, GET } from 'fastify-decorators'; | ||
`fastify-decorators` itself use `"target": "es2018"` to support NodeJS 10+ (see [Node.js ES2018 Support]). | ||
@Controller('/sample') | ||
export default class SampleController { | ||
@GET('/') | ||
async handle() { | ||
return 'It works!'; | ||
} | ||
} | ||
``` | ||
### Your first server | ||
### Request Handler | ||
#### Request handler way | ||
*src/sample.handler.ts*: | ||
```typescript | ||
import { GET, RequestHandler } from 'fastify-decorators'; | ||
Let's write your first server with request handler: | ||
@GET('/sample') | ||
export default class SampleHandler extends RequestHandler { | ||
async handle() { | ||
return 'It works!'; | ||
} | ||
} | ||
_Project structure_: | ||
``` | ||
├── index.ts | ||
├── handlers | ||
│ └── first.handler.ts | ||
└── tsconfig.json | ||
``` | ||
### Bootstrapping | ||
_index.ts_: | ||
*index.ts*: | ||
```typescript | ||
```ts | ||
import { bootstrap } from 'fastify-decorators'; | ||
import fastify = require('fastify'); | ||
import { resolve } from 'path'; | ||
// Create Fastify instance | ||
const instance = fastify(); | ||
// Require the framework and instantiate it | ||
const instance = require('fastify')(); | ||
// Register handlers auto-bootstrap | ||
instance.register(bootstrap, { | ||
directory: resolve(__dirname, `src`), | ||
mask: /\.(controller|handler)\./ | ||
// Specify directory with our handler | ||
directory: resolve(__dirname, `handlers`), | ||
// Specify mask to match only our handler | ||
mask: /\.handler\./, | ||
}); | ||
// Run the server! | ||
instance.listen(3000); | ||
``` | ||
**NOTE**: Using decorators require `experimentalDecorators` to be enabled in `tsconfig.json` | ||
_handlers/first.handler.ts_: | ||
## API | ||
```ts | ||
import { GET, RequestHandler } from 'fastify-decorators'; | ||
### bootstrap | ||
@GET({ | ||
url: '/hello', | ||
}) | ||
export default class FirstHandler extends RequestHandler { | ||
async handle() { | ||
return 'Hello world!'; | ||
} | ||
} | ||
``` | ||
`bootstrap` is Fastify plugin to autoload all decorated modules | ||
#### Controllers way | ||
*example*: | ||
```typescript | ||
import fastify = require('fastify'); | ||
import {bootstrap} from 'fastify-decorators'; | ||
fastify-decorators also provides way to build controllers with multiple handlers: | ||
const instance = fastify(); | ||
_Project structure_: | ||
instance.register(bootstrap, options) | ||
``` | ||
├── index.ts | ||
├── controllers | ||
│ └── first.controller.ts | ||
└── tsconfig.json | ||
``` | ||
#### Bootstrap options | ||
_index.ts_: | ||
| name | type | required | description | | ||
|-------------------|--------------------|:--------:|----------------------------------------------------------| | ||
| directory | `string` | yes | Specify directory where controllers/handlers are located | | ||
| mask | `string`, `RegExp` | no | Specify mask for files filter | | ||
| prefix | `string` | no | Specify prefix for routes | | ||
```ts | ||
import { bootstrap } from 'fastify-decorators'; | ||
import { resolve } from 'path'; | ||
### Decorators | ||
// Require the framework and instantiate it | ||
const instance = require('fastify')(); | ||
List of available decorators for handlers: | ||
- `GET` | ||
- `POST` | ||
- `PUT` | ||
- `DELETE` | ||
- `HEAD` | ||
- `OPTIONS` | ||
- `ALL` | ||
// Register handlers auto-bootstrap | ||
instance.register(bootstrap, { | ||
// Specify directory with our controllers | ||
directory: resolve(__dirname, `controllers`), | ||
*example*: | ||
```typescript | ||
import { POST, RequestHandler } from 'fastify-decorators'; | ||
// Specify mask to match only our controllers | ||
mask: /\.controller\./, | ||
}); | ||
@POST(options) | ||
export default class SimpleHandler extends RequestHandler { | ||
async handle() {return ''} | ||
// Run the server! | ||
instance.listen(3000); | ||
``` | ||
_controllers/first.controller.ts_: | ||
```ts | ||
import { Controller, GET } from 'fastify-decorators'; | ||
@Controller({ route: '/' }) | ||
export default class FirstController { | ||
@GET({ url: '/hello' }) | ||
async helloHandler() { | ||
return 'Hello world!'; | ||
} | ||
@GET({ url: '/goodbye' }) | ||
async goodbyeHandler() { | ||
return 'Bye-bye!'; | ||
} | ||
} | ||
``` | ||
Also fastify-decorators provides decorator for Controllers implementation: | ||
Also, we need to enable `experimentalDecorators` feature in our TypeScript config | ||
- `Controller` decorator uses on class | ||
- `hook` decorator to uses on methods to define [Fastify Hook] | ||
- Same decorators as for handlers use on methods to define [Fastify Route] | ||
_tsconfig.json_: | ||
#### Controller decorator options: | ||
Controller accepts `string` as route parameter. | ||
It also possible to passthroughs configuration object in case if complex configuration needed: | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"experimentalDecorators": true | ||
} | ||
} | ||
``` | ||
| name | type | required | description | | ||
|-------|-----------------------|:--------:|--------------------------------------------------| | ||
| route | string | yes | Controller base route | | ||
| type | `ControllerType` enum | no | Define controller behaviour. Default `SINGLETON` | | ||
### Build and run server | ||
#### Hook decorator options: | ||
| name | type | required | description | | ||
|-------|--------|:--------:|-----------------------| | ||
| name | string | yes | Hook name | | ||
After all our files done we have to build server before we can run it: | ||
#### Handler decorators options (for controllers and handlers both) | ||
Handler decorators accept `srting` as URL parameter. | ||
It also possible to passthroughs configuration object in case if complex configuration needed: | ||
1. Add to our package.json script to build server: | ||
| name | type | required | description | | ||
|---------|-----------------|:--------:|--------------------------------------------------| | ||
| url | `string` | yes | Route url which will be passed to Fastify | | ||
| options | [`RouteConfig`] | no | Config for route which will be passed to Fastify | | ||
``` | ||
"scripts": { | ||
"build": "tsc" | ||
} | ||
``` | ||
1. Run build script | ||
With npm: | ||
``` | ||
npm run build | ||
``` | ||
with yarn: | ||
``` | ||
yarn build | ||
``` | ||
1. Start server | ||
``` | ||
node index.ts | ||
``` | ||
Awesome, that was easy. | ||
[node.js es2018 support]: https://node.green/#ES2018 | ||
## License | ||
@@ -174,14 +253,14 @@ | ||
[Fastify]: https://npmjs.org/package/fastify | ||
[JetBrains IDE plugin]: https://plugins.jetbrains.com/plugin/13801-fastify-decorators | ||
[MIT License]: https://github.com/L2jLiga/fastify-decorators/blob/master/LICENSE | ||
[`RouteConfig`]: https://github.com/fastify/fastify/blob/master/docs/Routes.md | ||
[Fastify Hook]: https://github.com/fastify/fastify/blob/master/docs/Hooks.md | ||
[Fastify Route]: https://github.com/fastify/fastify/blob/master/docs/Routes.md | ||
[Getting Started]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.1/docs/Getting-Started.md | ||
[Request Handler]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.1/docs/Request-Handlers.md | ||
[Controllers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.1/docs/Controllers.md | ||
[Dependency Injection]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.1/docs/Dependency-Injection.md | ||
[Testing]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.1/docs/Testing.md | ||
[Migration guide (V3)]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.1/docs/Migration-to-v3.md | ||
[fastify]: https://npmjs.org/package/fastify | ||
[jetbrains ide plugin]: https://plugins.jetbrains.com/plugin/13801-fastify-decorators | ||
[mit license]: https://github.com/L2jLiga/fastify-decorators/blob/master/LICENSE | ||
[nestjs]: https://nestjs.com/ | ||
[fastify resty]: https://github.com/FastifyResty/fastify-resty | ||
[bootstrapping]: https://github.com/L2jLiga/fastify-decorators/blob/v3.5.0/docs/Bootstrapping.md | ||
[controllers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.5.0/docs/Controllers.md | ||
[request handlers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.5.0/docs/Request%20Handlers.md | ||
[services and dependency injection]: https://github.com/L2jLiga/fastify-decorators/blob/v3.5.0/docs/Services%20and%20dependency%20injection.md | ||
[hooks]: https://github.com/L2jLiga/fastify-decorators/blob/v3.5.0/docs/Hooks.md | ||
[error handling]: https://github.com/L2jLiga/fastify-decorators/blob/v3.5.0/docs/Error%20handling.md | ||
[testing]: https://github.com/L2jLiga/fastify-decorators/blob/v3.5.0/docs/Testing.md | ||
[migration guide (v3)]: docs/Migration%20to%20v3.md |
@@ -18,2 +18,2 @@ "use strict"; | ||
})(ControllerType = exports.ControllerType || (exports.ControllerType = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci10eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3JlZ2lzdHJ5L2NvbnRyb2xsZXItdHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7R0FFRztBQUNILElBQVksY0FVWDtBQVZELFdBQVksY0FBYztJQUN0Qjs7T0FFRztJQUNILDZEQUFTLENBQUE7SUFFVDs7T0FFRztJQUNILHlEQUFPLENBQUE7QUFDWCxDQUFDLEVBVlcsY0FBYyxHQUFkLHNCQUFjLEtBQWQsc0JBQWMsUUFVekIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEVudW0gdXNlZCB0byBkZWZpbmUgY29udHJvbGxlciB0eXBlXG4gKi9cbmV4cG9ydCBlbnVtIENvbnRyb2xsZXJUeXBlIHtcbiAgICAvKipcbiAgICAgKiBDb250cm9sbGVyIHdpbGwgdXNlIFNJTkdMRVRPTiBzdHJhdGVneVxuICAgICAqL1xuICAgIFNJTkdMRVRPTixcblxuICAgIC8qKlxuICAgICAqIENvbnRyb2xsZXIgd2lsbCB1c2UgUkVRVUVTVCBzdHJhdGVneVxuICAgICAqL1xuICAgIFJFUVVFU1Rcbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci10eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3JlZ2lzdHJ5L2NvbnRyb2xsZXItdHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQTs7R0FFRztBQUNILElBQVksY0FVWDtBQVZELFdBQVksY0FBYztJQUN4Qjs7T0FFRztJQUNILDZEQUFTLENBQUE7SUFFVDs7T0FFRztJQUNILHlEQUFPLENBQUE7QUFDVCxDQUFDLEVBVlcsY0FBYyxHQUFkLHNCQUFjLEtBQWQsc0JBQWMsUUFVekIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEVudW0gdXNlZCB0byBkZWZpbmUgY29udHJvbGxlciB0eXBlXG4gKi9cbmV4cG9ydCBlbnVtIENvbnRyb2xsZXJUeXBlIHtcbiAgLyoqXG4gICAqIENvbnRyb2xsZXIgd2lsbCB1c2UgU0lOR0xFVE9OIHN0cmF0ZWd5XG4gICAqL1xuICBTSU5HTEVUT04sXG5cbiAgLyoqXG4gICAqIENvbnRyb2xsZXIgd2lsbCB1c2UgUkVRVUVTVCBzdHJhdGVneVxuICAgKi9cbiAgUkVRVUVTVCxcbn1cbiJdfQ== |
@@ -6,2 +6,2 @@ "use strict"; | ||
Object.defineProperty(exports, "ControllerType", { enumerable: true, get: function () { return controller_type_1.ControllerType; } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvcmVnaXN0cnkvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscURBQW1EO0FBQTFDLGlIQUFBLGNBQWMsT0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IENvbnRyb2xsZXJUeXBlIH0gZnJvbSAnLi9jb250cm9sbGVyLXR5cGUnO1xyXG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvcmVnaXN0cnkvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscURBQW1EO0FBQTFDLGlIQUFBLGNBQWMsT0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7IENvbnRyb2xsZXJUeXBlIH0gZnJvbSAnLi9jb250cm9sbGVyLXR5cGUnO1xuIl19 |
@@ -10,6 +10,9 @@ /** | ||
import type { ServiceMock } from './service-mock'; | ||
export interface ControllerTestConfig { | ||
controller: any; | ||
import { Constructor } from '../decorators/helpers/inject-dependencies'; | ||
export interface ControllerTestConfig<C = any> { | ||
controller: C; | ||
mocks?: ServiceMock[]; | ||
} | ||
export declare function configureControllerTest(config: ControllerTestConfig): Promise<FastifyInstance>; | ||
export declare function configureControllerTest<C>(config: ControllerTestConfig<Constructor<C>>): Promise<FastifyInstance & { | ||
controller: C; | ||
}>; |
@@ -25,9 +25,9 @@ "use strict"; | ||
const controller = config.controller; | ||
await controller[symbols_1.CREATOR].register(instance, injectablesWithMocks, false); | ||
await Promise.all([ | ||
...getInjectedProps(controller), | ||
...getInjectedProps(controller.prototype), | ||
...getConstructorArgs(controller), | ||
].map(value => injectablesWithMocks.get(value)).map(it => decorators_1.readyMap.get(it))); | ||
const controllerInstance = await controller[symbols_1.CREATOR].register(instance, injectablesWithMocks, false); | ||
instance.decorate('controller', controllerInstance); | ||
await Promise.all([...getInjectedProps(controller), ...getInjectedProps(controller.prototype), ...getConstructorArgs(controller)] | ||
.map((value) => injectablesWithMocks.get(value)) | ||
.map((it) => decorators_1.readyMap.get(it))); | ||
await instance.ready(); | ||
// @ts-expect-error we have decorated instance, TypeScript can't handle it :( | ||
return instance; | ||
@@ -39,3 +39,3 @@ } | ||
return []; | ||
return target[symbols_1.SERVICE_INJECTION].map(it => it.name); | ||
return target[symbols_1.SERVICE_INJECTION].map((it) => it.name); | ||
} | ||
@@ -45,2 +45,2 @@ function getConstructorArgs(constructor) { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJlLWNvbnRyb2xsZXItdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi90ZXN0aW5nL2NvbmZpZ3VyZS1jb250cm9sbGVyLXRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBRUgscUNBQW1EO0FBRW5ELHlEQUFzRDtBQUN0RCx3Q0FBOEU7QUFDOUUsbURBQStDO0FBRS9DLDhDQUF5QztBQUd6Qyw2RUFBNkU7QUFDN0UsOERBQTBEO0FBWW5ELEtBQUssVUFBVSx1QkFBdUIsQ0FBQyxNQUE0QjtJQUN0RSxNQUFNLFFBQVEsR0FBRyxpQkFBTyxFQUFFLENBQUM7SUFDM0IsTUFBTSxvQkFBb0IsR0FBRyw0QkFBWSxDQUFDLE1BQU0sQ0FBQyx5QkFBVyxFQUFFLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUM1RSxJQUFJLENBQUMsb0JBQW9CLENBQUMsR0FBRyxDQUFDLDhCQUFvQixDQUFDLEVBQUU7UUFDakQsb0JBQW9CLENBQUMsR0FBRyxDQUFDLDhCQUFvQixFQUFFLGdDQUFjLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQztLQUM1RTtJQUVELE1BQU0sVUFBVSxHQUF5QixNQUFNLENBQUMsVUFBVSxDQUFDO0lBQzNELE1BQ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m5hbWUpO1xufVxuXG5mdW5jdGlvbiBnZXRDb25zdHJ1Y3RvckFyZ3MoY29uc3RydWN0b3I6IEluamVjdGFibGVDbGFzcyk6IEFycmF5PHVua25vd24+IHtcbiAgcmV0dXJuIFJlZmxlY3QuZ2V0TWV0YWRhdGEoJ2Rlc2lnbjpwYXJhbXR5cGVzJywgY29uc3RydWN0b3IpIHx8IFtdO1xufVxuIl19 |
@@ -36,5 +36,3 @@ "use strict"; | ||
if (promise == null) | ||
promise = hasAsyncInitializer(service) | ||
? decorators_1.readyMap.get(service).then(() => target) | ||
: Promise.resolve(target); | ||
promise = hasAsyncInitializer(service) ? decorators_1.readyMap.get(service).then(() => target) : Promise.resolve(target); | ||
return promise[p].bind(promise); | ||
@@ -55,2 +53,2 @@ } | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJlLXNlcnZpY2UtdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi90ZXN0aW5nL2NvbmZpZ3VyZS1zZXJ2aWNlLXRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBSUgseURBQXNEO0FBQ3RELHdDQUF3RTtBQUN4RSxtREFBK0M7QUFFL0MsOENBQXlDO0FBQ3pDLDhEQUEwRDtBQUMxRCxxQ0FBa0M7QUFPbEM7Ozs7R0FJRztBQUNILHdEQUF3RDtBQUN4RCxTQUFnQixvQkFBb0IsQ0FBeUIsTUFBa0M7SUFDM0YsTUFBTSxPQUFPLEdBQXlCLE1BQU0sQ0FBQyxPQUFPLENBQUM7SUFDckQsTUFBTSxvQkFBb0IsR0FBRyw0QkFBWSxDQUFDLE1BQU0sQ0FBQyx5QkFBVyxFQUFFLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUM1RSxJQUFJLENBQUMsb0JBQW9CLENBQUMsR0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lKSEudGhlbigoKSA9PiB0YXJnZXQpIDogUHJvbWlzZS5yZXNvbHZlKHRhcmdldCk7XG5cbiAgICAgICAgcmV0dXJuIHByb21pc2VbcCBhcyAndGhlbicgfCAnY2F0Y2gnIHwgJ2ZpbmFsbHknXS5iaW5kKHByb21pc2UpO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGFyZ2V0W3BdO1xuICAgIH0sXG4gIH0pIGFzIFByb21pc2U8U2VydmljZT4gJiBTZXJ2aWNlO1xufVxuXG5mdW5jdGlvbiBpc0luamVjdGFibGU8U2VydmljZT4oc2VydmljZTogQ29uc3RydWN0b3I8U2VydmljZT4pOiBhc3NlcnRzIHNlcnZpY2UgaXMgSW5qZWN0YWJsZVNlcnZpY2Uge1xuICBpZiAoIShDUkVBVE9SIGluIHNlcnZpY2UpKSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKCdQcm92aWRlZCBzZXJ2aWNlIGRvZXMgbm90IGFubm90YXRlZCB3aXRoIEBTZXJ2aWNlIScpO1xuICB9XG59XG5cbmZ1bmN0aW9uIGhhc0FzeW5jSW5pdGlhbGl6ZXIoc2VydmljZTogSW5qZWN0YWJsZVNlcnZpY2UpOiBzZXJ2aWNlIGlzIEluamVjdGFibGVTZXJ2aWNlICYgUmVxdWlyZWQ8SW5qZWN0YWJsZVNlcnZpY2U+IHtcbiAgcmV0dXJuIElOSVRJQUxJWkVSIGluIHNlcnZpY2U7XG59XG4iXX0= |
@@ -22,2 +22,2 @@ "use strict"; | ||
exports.MocksManager = MocksManager; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ja3MtbWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi90ZXN0aW5nL21vY2tzLW1hbmFnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBR0gsOERBQTBEO0F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gICAgbW9ja3NNYXAuc2V0KHByb3ZpZGUsIHdyYXBJbmplY3RhYmxlKHVzZVZhbHVlKSk7XG4gICAgfVxuXG4gICAgcmV0dXJuIG1vY2tzTWFwO1xuICB9XG59XG4iXX0= |
@@ -10,2 +10,2 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1tb2NrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3Rlc3Rpbmcvc2VydmljZS1tb2NrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUciLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgQW5kcmV5IENoYWxraW4gPEwyakxpZ2FAZ21haWwuY29tPiAoaHR0cHM6Ly9naXRodWIuY29tL0wyakxpZ2EpLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vZ2l0aHViLmNvbS9MMmpMaWdhL2Zhc3RpZnktZGVjb3JhdG9ycy9ibG9iL21hc3Rlci9MSUNFTlNFXG4gKi9cblxuZXhwb3J0IGludGVyZmFjZSBTZXJ2aWNlTW9jayB7XG4gICAgcHJvdmlkZTogc3RyaW5nIHwgc3ltYm9sIHwgUmVjb3JkPHN0cmluZyB8IHN5bWJvbCB8IG51bWJlciwgYW55PjtcbiAgICB1c2VWYWx1ZTogUmVjb3JkPHN0cmluZyB8IHN5bWJvbCB8IG51bWJlciwgdW5rbm93bj47XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS1tb2NrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3Rlc3Rpbmcvc2VydmljZS1tb2NrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUciLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgQW5kcmV5IENoYWxraW4gPEwyakxpZ2FAZ21haWwuY29tPiAoaHR0cHM6Ly9naXRodWIuY29tL0wyakxpZ2EpLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHlsZSBsaWNlbnNlIHRoYXQgY2FuIGJlXG4gKiBmb3VuZCBpbiB0aGUgTElDRU5TRSBmaWxlIGF0IGh0dHBzOi8vZ2l0aHViLmNvbS9MMmpMaWdhL2Zhc3RpZnktZGVjb3JhdG9ycy9ibG9iL21hc3Rlci9MSUNFTlNFXG4gKi9cblxuZXhwb3J0IGludGVyZmFjZSBTZXJ2aWNlTW9jayB7XG4gIHByb3ZpZGU6IHN0cmluZyB8IHN5bWJvbCB8IFJlY29yZDxzdHJpbmcgfCBzeW1ib2wgfCBudW1iZXIsIGFueT47XG4gIHVzZVZhbHVlOiBSZWNvcmQ8c3RyaW5nIHwgc3ltYm9sIHwgbnVtYmVyLCB1bmtub3duPjtcbn1cbiJdfQ== |
@@ -15,4 +15,4 @@ /** | ||
}; | ||
export declare function requestDecoratorsFactory(method: HttpMethods): (routeOrConfig?: (string | RouteConfig), options?: RouteShorthandOptions) => (target: any, propKey?: (string | symbol)) => void; | ||
export declare function requestDecoratorsFactory(method: HttpMethods): (routeOrConfig?: string | RouteConfig, options?: RouteShorthandOptions) => (target: any, propKey?: string | symbol) => void; | ||
export declare function controllerMethodDecoratorsFactory(method: HttpMethods, config: ParsedRouteConfig, { constructor }: any, propKey: string | symbol): void; | ||
export {}; |
@@ -24,4 +24,4 @@ /** | ||
export declare const ControllerTypeStrategies: { | ||
readonly 0: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => void; | ||
readonly 0: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => any; | ||
readonly 1: (instance: FastifyInstance, constructor: InjectableController, injectablesMap: Injectables, cacheResult: boolean) => void; | ||
}; |
@@ -10,6 +10,9 @@ /** | ||
import { ServiceMock } from './service-mock'; | ||
export interface ControllerTestConfig { | ||
controller: any; | ||
import { Constructor } from '../decorators/helpers/inject-dependencies'; | ||
export interface ControllerTestConfig<C = any> { | ||
controller: C; | ||
mocks?: ServiceMock[]; | ||
} | ||
export declare function configureControllerTest(config: ControllerTestConfig): Promise<FastifyInstance>; | ||
export declare function configureControllerTest<C>(config: ControllerTestConfig<Constructor<C>>): Promise<FastifyInstance & { | ||
controller: C; | ||
}>; |
@@ -22,2 +22,2 @@ "use strict"; | ||
exports.Deferred = Deferred; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmZXJyZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvdXRpbHMvZGVmZXJyZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsTUFBYSxRQUFRO0lBQXJCO1FBYXFCLGFBQVEsR0FBZSxJQUFJLE9BQU8sQ0FBSSxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsRUFBRTtZQUNuRSxJQUFJLENBQUMsUUFBUSxHQUFHLE9BQU8sQ0FBQztZQUN4QixJQUFJLENBQUMsT0FBTyxHQUFHLE1BQU0sQ0FBQztRQUMxQixDQUFDLENBQ0osQ0FBQztJQUlOLENBQUM7SUFwQkcsSUFBSSxPQ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3IFByb21pc2U8VD4oKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgIHRoaXMuX3Jlc29sdmUgPSByZXNvbHZlO1xuICAgIHRoaXMuX3JlamVjdCA9IHJlamVjdDtcbiAgfSk7XG5cbiAgcHJpdmF0ZSBfcmVzb2x2ZSE6ICh2YWx1ZTogVCB8IFByb21pc2VMaWtlPFQ+KSA9PiB2b2lkO1xuICBwcml2YXRlIF9yZWplY3QhOiAocmVhc29uPzogRXJyb3IpID0+IHZvaWQ7XG59XG4iXX0= |
@@ -16,4 +16,3 @@ "use strict"; | ||
verifyInjectable(token, injectable); | ||
return injectable[symbols_1.CREATOR] | ||
.register(injectables_1.injectables); | ||
return injectable[symbols_1.CREATOR].register(injectables_1.injectables); | ||
} | ||
@@ -25,2 +24,2 @@ exports.getInstanceByToken = getInstanceByToken; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWluc3RhbmNlLWJ5LXRva2VuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3V0aWxzL2dldC1pbnN0YW5jZS1ieS10b2tlbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFJSCx5REFBc0Q7QUFDdEQsd0NBQXFDO0FBRXJDLFNBQWdCLGtCQUFrQixDQUFPLEtBQTBDO0lBQy9FLE1BQU0sVUFBVSxHQUFrQyx5QkFBVyxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUN6RSxnQkFBZ0IsQ0FBQyxLQUFLLEVBQUUsVUFBVSxDQUFDLENBQUM7SUFFcEMsT0FBTyxVQUFVLENBQUMsaUJBQU8sQ0FBQztTQUNyQixRQUFRLENBQU8seUJBQVcsQ0FBQyxDQUFDO0FBQ3JDLENBQUM7QUFORCxnREFNQztBQUVELFNBQVMsZ0JBQWdCLENBQU8sS0FBMEMsR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9ydCBmdW5jdGlvbiBnZXRJbnN0YW5jZUJ5VG9rZW48VHlwZT4odG9rZW46IHN0cmluZyB8IHN5bWJvbCB8IENvbnN0cnVjdG9yPFR5cGU+KTogVHlwZSB7XG4gIGNvbnN0IGluamVjdGFibGU6IEluamVjdGFibGVTZXJ2aWNlIHwgdW5kZWZpbmVkID0gaW5qZWN0YWJsZXMuZ2V0KHRva2VuKTtcbiAgdmVyaWZ5SW5qZWN0YWJsZSh0b2tlbiwgaW5qZWN0YWJsZSk7XG5cbiAgcmV0dXJuIGluamVjdGFibGVbQ1JFQVRPUl0ucmVnaXN0ZXI8VHlwZT4oaW5qZWN0YWJsZXMpO1xufVxuXG5mdW5jdGlvbiB2ZXJpZnlJbmplY3RhYmxlPFR5cGU+KFxuICB0b2tlbjogc3RyaW5nIHwgc3ltYm9sIHwgQ29uc3RydWN0b3I8VHlwZT4sXG4gIGluamVjdGFibGU6IEluamVjdGFibGVTZXJ2aWNlIHwgdW5kZWZpbmVkLFxuKTogYXNzZXJ0cyBpbmplY3RhYmxlIGlzIEluamVjdGFibGVTZXJ2aWNlIHtcbiAgaWYgKCFpbmplY3RhYmxlKSB0aHJvdyBuZXcgRXJyb3IoYEluamVjdGFibGUgbm90IGZvdW5kIGZvciB0b2tlbiBcIiR7dG9rZW4udG9TdHJpbmcoKX1cImApO1xufVxuIl19 |
@@ -22,2 +22,2 @@ "use strict"; | ||
exports.wrapInjectable = wrapInjectable; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JhcC1pbmplY3RhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3V0aWxzL3dyYXAtaW5qZWN0YWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFHSCx3Q0FBcUM7QUFFckMsU0FBZ0IsY0FBYyxDQUFJLE1BQVM7SUFDdkMsT0F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SB7XG4gIHJldHVybiA8SW5qZWN0YWJsZVNlcnZpY2U+e1xuICAgIFtDUkVBVE9SXToge1xuICAgICAgcmVnaXN0ZXIoKSB7XG4gICAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgICB9LFxuICAgIH0sXG4gIH07XG59XG4iXX0= |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2246
264
245967