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.5.0 to 3.6.0

4

CHANGELOG.md

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

## 3.6.0
- `FastifyInstanceWithController` interface for testing (#93)
## 3.5.0

@@ -10,0 +14,0 @@

4

docs/Testing.md

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

import { FastifyInstance } from 'fastify';
import { configureControllerTest } from 'fastify-decorators/testing';
import { configureControllerTest, FastifyInstanceWithController } from 'fastify-decorators/testing';
import { AuthController } from '../src/auth.controller';
describe('Controller: AuthController', () => {
let instance: FastifyInstance;
let instance: FastifyInstanceWithController<AuthController>;

@@ -85,0 +85,0 @@ beforeEach(async () => {

{
"name": "fastify-decorators",
"version": "3.5.0",
"version": "3.6.0",
"description": "Set of Typescript decorators to build Fastify server with controllers, services and hooks",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -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.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
[bootstrapping]: https://github.com/L2jLiga/fastify-decorators/blob/v3.6.0/docs/Bootstrapping.md
[controllers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.6.0/docs/Controllers.md
[request handlers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.6.0/docs/Request%20Handlers.md
[services and dependency injection]: https://github.com/L2jLiga/fastify-decorators/blob/v3.6.0/docs/Services%20and%20dependency%20injection.md
[hooks]: https://github.com/L2jLiga/fastify-decorators/blob/v3.6.0/docs/Hooks.md
[error handling]: https://github.com/L2jLiga/fastify-decorators/blob/v3.6.0/docs/Error%20handling.md
[testing]: https://github.com/L2jLiga/fastify-decorators/blob/v3.6.0/docs/Testing.md
[migration guide (v3)]: https://github.com/L2jLiga/fastify-decorators/blob/v3.6.0/docs/Migration%20to%20v3.md

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

}
export declare function configureControllerTest<C>(config: ControllerTestConfig<Constructor<C>>): Promise<FastifyInstance & {
controller: C;
}>;
export declare type FastifyInstanceWithController<C> = FastifyInstance & Pick<ControllerTestConfig<C>, 'controller'>;
export declare function configureControllerTest<C>(config: ControllerTestConfig<Constructor<C>>): Promise<FastifyInstanceWithController<C>>;

@@ -43,2 +43,2 @@ "use strict";

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

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

export type { ServiceMock } from './service-mock';
export { ControllerTestConfig, configureControllerTest } from './configure-controller-test';
export { ControllerTestConfig, FastifyInstanceWithController, configureControllerTest, } from './configure-controller-test';
export { ServiceTestConfig, configureServiceTest } from './configure-service-test';

@@ -15,2 +15,2 @@ "use strict";

Object.defineProperty(exports, "configureServiceTest", { enumerable: true, get: function () { return configure_service_test_1.configureServiceTest; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvdGVzdGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFHSCx5RUFBNEY7QUFBN0Qsb0lBQUEsdUJBQXVCLE9BQUE7QUFDdEQsbUVBQW1GO0FBQXZELDhIQUFBLG9CQUFvQixPQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEFuZHJleSBDaGFsa2luIDxMMmpMaWdhQGdtYWlsLmNvbT4gKGh0dHBzOi8vZ2l0aHViLmNvbS9MMmpMaWdhKS4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2dpdGh1Yi5jb20vTDJqTGlnYS9mYXN0aWZ5LWRlY29yY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ovXG5cbmV4cG9ydCB0eXBlIHsgU2VydmljZU1vY2sgfSBmcm9tICcuL3NlcnZpY2UtbW9jayc7XG5leHBvcnQge1xuICBDb250cm9sbGVyVGVzdENvbmZpZyxcbiAgRmFzdGlmeUluc3RhbmNlV2l0aENvbnRyb2xsZXIsXG4gIGNvbmZpZ3VyZUNvbnRyb2xsZXJUZXN0LFxufSBmcm9tICcuL2NvbmZpZ3VyZS1jb250cm9sbGVyLXRlc3QnO1xuZXhwb3J0IHsgU2VydmljZVRlc3RDb25maWcsIGNvbmZpZ3VyZVNlcnZpY2VUZXN0IH0gZnJvbSAnLi9jb25maWd1cmUtc2VydmljZS10ZXN0JztcbiJdfQ==

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

}
export declare function configureControllerTest<C>(config: ControllerTestConfig<Constructor<C>>): Promise<FastifyInstance & {
controller: C;
}>;
export declare type FastifyInstanceWithController<C> = FastifyInstance & Pick<ControllerTestConfig<C>, 'controller'>;
export declare function configureControllerTest<C>(config: ControllerTestConfig<Constructor<C>>): Promise<FastifyInstanceWithController<C>>;
export { ServiceMock } from './service-mock';
export { ControllerTestConfig, configureControllerTest } from './configure-controller-test';
export { ControllerTestConfig, FastifyInstanceWithController, configureControllerTest, } from './configure-controller-test';
export { ServiceTestConfig, configureServiceTest } from './configure-service-test';
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