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.4.0 to 3.4.1

4

CHANGELOG.md

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

## 3.4.1
### Fixed
- FastifyInstance not available for injection in tests
## 3.4.0

@@ -9,0 +13,0 @@ ### Added

2

package.json
{
"name": "fastify-decorators",
"version": "3.4.0",
"version": "3.4.1",
"description": "Set of Typescript decorators to build Fastify server with controllers, services and hooks",

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

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

[Getting Started]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.0/docs/Getting-Started.md
[Request Handler]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.0/docs/Request-Handlers.md
[Controllers]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.0/docs/Controllers.md
[Dependency Injection]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.0/docs/Dependency-Injection.md
[Testing]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.0/docs/Testing.md
[Migration guide (V3)]: https://github.com/L2jLiga/fastify-decorators/blob/v3.4.0/docs/Migration-to-v3.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

@@ -17,5 +17,9 @@ "use strict";

const class_properties_1 = require("../decorators/helpers/class-properties");
const wrap_injectable_1 = require("../utils/wrap-injectable");
async function configureControllerTest(config) {
const instance = fastify_1.fastify();
const injectablesWithMocks = mocks_manager_1.MocksManager.create(injectables_1.injectables, config.mocks);
if (!injectablesWithMocks.has(symbols_1.FastifyInstanceToken)) {
injectablesWithMocks.set(symbols_1.FastifyInstanceToken, wrap_injectable_1.wrapInjectable(instance));
}
const controller = config.controller;

@@ -40,2 +44,2 @@ await controller[symbols_1.CREATOR].register(instance, injectablesWithMocks, false);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJlLWNvbnRyb2xsZXItdGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi90ZXN0aW5nL2NvbmZpZ3VyZS1jb250cm9sbGVyLXRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBRUgscUNBQW1EO0FBRW5ELHlEQUFzRDtBQUN0RCx3Q0FBd0Q7QUFDeEQsbURBQStDO0FBRS9DLDhDQUF5QztBQUd6Qyw2RUFBNkU7QUFZdEUsS0FBSyxVQUFVLHVCQUF1QixDQUFDLE1BQTRCO0lBQ3RFLE1BQU0sUUFBUSxHQUFHLGlCQUFPLEVBQUUsQ0FBQztJQUMzQixNQUFNLG9CQUFvQixHQUFHLDRCQUFZLENBQUMsTUFBTSxDQUFDLHlCQUFXLEVBQUUsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBRTVFLE1BQU0sVUFBVSxHQUF5QixNQUFNLENBQUMsVUFBVSxDQUFDO0lBQzNELE1BQU0sVUFBVSxDQUFDLGlCQUFPLENBQUMsQ0FBQyxRQUFRLENBQUMsUUFBUSxFQUFFLG9CQUFvQixFQUFFLEtBQUssQ0FBQyxDQUF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G5mdW5jdGlvbiBnZXRJbmplY3RlZFByb3BzKHRhcmdldDogdW5rbm93bik6IEFycmF5PHVua25vd24+IHtcbiAgICBpZiAoIWhhc1NlcnZpY2VJbmplY3Rpb24odGFyZ2V0KSkgcmV0dXJuIFtdO1xuICAgIHJldHVybiB0YXJnZXRbU0VSVklDRV9JTkpFQ1RJT05dLm1hcChpdCA9PiBpdC5uYW1lKTtcbn1cblxuZnVuY3Rpb24gZ2V0Q29uc3RydWN0b3JBcmdzKGNvbnN0cnVjdG9yOiBJbmplY3RhYmxlQ2xhc3MpOiBBcnJheTx1bmtub3duPiB7XG4gICAgcmV0dXJuIFJlZmxlY3QuZ2V0TWV0YWRhdGEoJ2Rlc2lnbjpwYXJhbXR5cGVzJywgY29uc3RydWN0b3IpIHx8IFtdO1xufVxuIl19

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

const decorators_1 = require("../decorators");
const wrap_injectable_1 = require("../utils/wrap-injectable");
const fastify_1 = require("fastify");
/**

@@ -25,2 +27,5 @@ * Configures service for testing

const injectablesWithMocks = mocks_manager_1.MocksManager.create(injectables_1.injectables, config.mocks);
if (!injectablesWithMocks.has(symbols_1.FastifyInstanceToken)) {
injectablesWithMocks.set(symbols_1.FastifyInstanceToken, wrap_injectable_1.wrapInjectable(fastify_1.fastify()));
}
isInjectable(service);

@@ -51,2 +56,2 @@ const instance = service[symbols_1.CREATOR].register(injectablesWithMocks, false);

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

@@ -14,6 +14,5 @@ "use strict";

static create(injectables, mocks = []) {
const mocksMap = new Map(mocks.map(mock => [mock.provide, wrap_injectable_1.wrapInjectable(mock.useValue)]));
for (const [key, value] of injectables.entries()) {
const mock = mocksMap.has(value) ? mocksMap.get(value) : value;
mocksMap.set(key, mock);
const mocksMap = new Map(injectables.entries());
for (const { provide, useValue } of mocks) {
mocksMap.set(provide, wrap_injectable_1.wrapInjectable(useValue));
}

@@ -24,2 +23,2 @@ return mocksMap;

exports.MocksManager = MocksManager;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9ja3MtbWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi90ZXN0aW5nL21vY2tzLW1hbmFn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XG5pbXBvcnQgdHlwZSB7IEluamVjdGFibGVzIH0gZnJvbSAnLi4vaW50ZXJmYWNlcy9pbmplY3RhYmxlLWNsYXNzJztcbmltcG9ydCB7IHdyYXBJbmplY3RhYmxlIH0gZnJvbSAnLi4vdXRpbHMvd3JhcC1pbmplY3RhYmxlJztcbmltcG9ydCB0eXBlIHsgU2VydmljZU1vY2sgfSBmcm9tICcuL3NlcnZpY2UtbW9jayc7XG5cbmV4cG9ydCBjbGFzcyBNb2Nrc01hbmFnZXIge1xuICAgIHN0YXRpYyBjcmVhdGUoaW5qZWN0YWJsZXM6IEluamVjdGFibGVzLCBtb2NrczogU2VydmljZU1vY2tbXSA9IFtdKTogSW5qZWN0YWJsZXMge1xuICAgICAgICBjb25zdCBtb2Nrc01hcDogSW5qZWN0YWJsZXMgPSBuZXcgTWFwKGluamVjdGFibGVzLmVudHJpZXMoKSk7XG5cbiAgICAgICAgZm9yIChjb25zdCB7IHByb3ZpZGUsIHVzZVZhbHVlIH0gb2YgbW9ja3MpIHtcbiAgICAgICAgICAgIG1vY2tzTWFwLnNldChwcm92aWRlLCB3cmFwSW5qZWN0YWJsZSh1c2VWYWx1ZSkpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG1vY2tzTWFwO1xuICAgIH1cbn1cbiJdfQ==
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