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.0.0 to 3.1.0

21

bootstrap/bootstrap.js

@@ -50,11 +50,14 @@ "use strict";

async function* findModules(path, filter) {
// TODO: can be replaced with for await (const filePath of fs.opendir) in Node.js >= 12.12
for (const filePath of await readdir(path, { withFileTypes: true })) {
const fullFilePath = path_1.join(path, filePath.name);
if (filePath.isDirectory()) {
yield* findModules(fullFilePath, filter);
const directoriesToRead = [path];
for (let dirPath = directoriesToRead.pop(); dirPath !== undefined; dirPath = directoriesToRead.pop()) {
// TODO: can be replaced with for await (const filePath of fs.opendir) in Node.js >= 12.12
for (const filePath of await readdir(dirPath, { withFileTypes: true })) {
const fullFilePath = path_1.join(dirPath, filePath.name);
if (filePath.isDirectory()) {
directoriesToRead.push(fullFilePath);
}
else if (filter.test((filePath.name))) {
yield fullFilePath;
}
}
else if (filter.test((filePath.name))) {
yield fullFilePath;
}
}

@@ -68,2 +71,2 @@ }

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

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

## [Unreleased]
## 3.1.0
### Added
- More strict check for `@Controller` decorator
### Fixed
- Possible call stack size exceeded when using autobootstrap
## 3.0.0

@@ -10,0 +17,0 @@ ### Added

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

function ErrorHandler(parameter) {
return function (target, handlerName) {
inject_controller_options_1.injectDefaultControllerOptions(target.constructor);
const controllerOpts = target.constructor[symbols_1.CREATOR];
return function ({ constructor }, handlerName) {
inject_controller_options_1.injectDefaultControllerOptions(constructor);
const controllerOpts = constructor[symbols_1.CREATOR];
if (parameter == null) {

@@ -33,2 +33,2 @@ controllerOpts.errorHandlers.push(handlerFactory(() => true, handlerName));

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3ItaGFuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2Vycm9yLWhhbmRsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBR0gsd0NBQXFDO0FBQ3JDLG1GQUFxRjtBQU9yRixTQUFnQixZQUFZLENBQTZCLFNBQXNCO0lBQzNFLE9BQU8sVUFBVSxNQUFXLEVBQUUsV0FBNEI7UUFDdEQsMERBQThCLENBQUMsTUFBTSxDQUFD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Jyb3IpID0+IGVycm9yIGluc3RhbmNlb2YgcGFyYW1ldGVyLCBoYW5kbGVyTmFtZSkpO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuaW50ZXJmYWNlIEVycm9yV2l0aENvZGUgZXh0ZW5kcyBFcnJvciB7XG4gICAgY29kZT86IHN0cmluZztcbn1cblxuZnVuY3Rpb24gaGFuZGxlckZhY3RvcnkoYWNjZXB0czogPFQgZXh0ZW5kcyBFcnJvcj4oZXJyb3I/OiBUKSA9PiBib29sZWFuLCBoYW5kbGVyTmFtZTogc3RyaW5nIHwgc3ltYm9sKTogRXJyb3JIYW5kbGVyIHtcbiAgICByZXR1cm4geyBhY2NlcHRzLCBoYW5kbGVyTmFtZSB9O1xufVxuIl19

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

function injectDefaultControllerOptions(controller) {
if (!controller[symbols_1.CREATOR]) {
controller[symbols_1.CREATOR] = getDefaultControllerOptions();
if (controller instanceof Function) {
if (!(symbols_1.CREATOR in controller)) {
Object.defineProperty(controller, symbols_1.CREATOR, { value: getDefaultControllerOptions() });
}
return;
}
throw new Error('Invalid usage of @Controller decorator');
}

@@ -26,2 +30,2 @@ exports.injectDefaultControllerOptions = injectDefaultControllerOptions;

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5qZWN0LWNvbnRyb2xsZXItb3B0aW9ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2hlbHBlcnMvaW5qZWN0LWNvbnRyb2xsZXItb3B0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7OztHQU1HOzs7QUFJSCwyQ0FBd0M7QUFFeEMsU0FBZ0IsOEJBQThCLENBQUMsVUFBbUI7SUFDOUQsSUFBSSxDQUF5QixVQUFXLENBQUMsaUJBQU8sQ0FBQyxFQUFFO1FBQ3ZCLFVBQVcsQ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0cnVjdG9yIHtcbiAgICBpZiAoY29udHJvbGxlciBpbnN0YW5jZW9mIEZ1bmN0aW9uKSB7XG4gICAgICAgIGlmICghKENSRUFUT1IgaW4gY29udHJvbGxlcikpIHtcbiAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShjb250cm9sbGVyLCBDUkVBVE9SLCB7IHZhbHVlOiBnZXREZWZhdWx0Q29udHJvbGxlck9wdGlvbnMoKSB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICB0aHJvdyBuZXcgRXJyb3IoJ0ludmFsaWQgdXNhZ2Ugb2YgQENvbnRyb2xsZXIgZGVjb3JhdG9yJyk7XG59XG5cbmZ1bmN0aW9uIGdldERlZmF1bHRDb250cm9sbGVyT3B0aW9ucygpOiBDb250cm9sbGVySGFuZGxlcnNBbmRIb29rczxTZXJ2ZXIsIEluY29taW5nTWVzc2FnZSwgU2VydmVyUmVzcG9uc2U+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICBoYW5kbGVyczogW10sXG4gICAgICAgIGVycm9ySGFuZGxlcnM6IFtdLFxuICAgICAgICBob29rczogW10sXG4gICAgfTtcbn1cbiJdfQ==

@@ -8,7 +8,6 @@ /**

*/
/// <reference types="node" />
import { RouteShorthandOptions } from 'fastify';
import { RouteConfig } from '../../interfaces';
import { HttpMethods } from './http-methods';
export declare function requestDecoratorsFactory(method: HttpMethods): (routeOrConfig?: string | RouteConfig | undefined, options?: RouteShorthandOptions<import("http").Server, import("http").IncomingMessage, import("http").ServerResponse, import("fastify").RequestGenericInterface, unknown> | undefined) => (target: any, propKey?: string | symbol | undefined) => void;
export declare function controllerMethodDecoratorsFactory(method: HttpMethods, config: RouteConfig, 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: RouteConfig, { constructor }: any, propKey: string | symbol): void;

@@ -22,8 +22,10 @@ "use strict";

return function (target, propKey) {
if (propKey)
return controllerMethodDecoratorsFactory(method, config, target, propKey);
if (propKey) {
controllerMethodDecoratorsFactory(method, config, target, propKey);
return;
}
target[symbols_1.CREATOR] = {
register: (instance) => instance[method](config.url, config.options, function (...args) {
return new target(...args).handle();
})
}),
};

@@ -34,5 +36,5 @@ };

exports.requestDecoratorsFactory = requestDecoratorsFactory;
function controllerMethodDecoratorsFactory(method, config, target, propKey) {
inject_controller_options_1.injectDefaultControllerOptions(target.constructor);
const controllerOpts = target.constructor[symbols_1.CREATOR];
function controllerMethodDecoratorsFactory(method, config, { constructor }, propKey) {
inject_controller_options_1.injectDefaultControllerOptions(constructor);
const controllerOpts = constructor[symbols_1.CREATOR];
controllerOpts.handlers.push({

@@ -42,6 +44,6 @@ url: config.url,

options: config.options || {},
handlerMethod: propKey
handlerMethod: propKey,
});
}
exports.controllerMethodDecoratorsFactory = controllerMethodDecoratorsFactory;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdC1kZWNvcmF0b3JzLmZhY3RvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWIvZGVjb3JhdG9ycy9oZWxwZXJzL3JlcXVlc3QtZGVjb3JhdG9ycy5mYWN0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7O0dBTUc7OztBQUlILDJDQUF3QztBQUV4QywyRUFBNkU7QUFFN0UsU0FBUyxXQUFXLENBQUMsU0FBK0IsR0FBRyxFQUFFLFVBQWlDLEVBQUU7SUFDeEYsSUFBSSxPQUFPLE1BQU0sS0FBSyxRQUFRO1FBQUUsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLENBQUM7SUFFaEUsT0FBTyxFQUFFLE9BQU8sRUFBR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0ZhY3RvcnkobWV0aG9kLCBjb25maWcsIHRhcmdldCwgcHJvcEtleSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0YXJnZXRbQ1JFQVRPUl0gPSB7XG4gICAgICAgICAgICAgICAgcmVnaXN0ZXI6IChpbnN0YW5jZTogRmFzdGlmeUluc3RhbmNlKSA9PiBpbnN0YW5jZVttZXRob2RdKGNvbmZpZy51cmwsIGNvbmZpZy5vcHRpb25zLCBmdW5jdGlvbiAoLi4uYXJncykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKDxSZXF1ZXN0SGFuZGxlcj5uZXcgdGFyZ2V0KC4uLmFyZ3MpKS5oYW5kbGUoKTtcbiAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgfTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGNvbnRyb2xsZXJNZXRob2REZWNvcmF0b3JzRmFjdG9yeShtZXRob2Q6IEh0dHBNZXRob2RzLCBjb25maWc6IFJvdXRlQ29uZmlnLCB7IGNvbnN0cnVjdG9yIH06IGFueSwgcHJvcEtleTogc3RyaW5nIHwgc3ltYm9sKTogdm9pZCB7XG4gICAgaW5qZWN0RGVmYXVsdENvbnRyb2xsZXJPcHRpb25zKGNvbnN0cnVjdG9yKTtcblxuICAgIGNvbnN0IGNvbnRyb2xsZXJPcHRzID0gY29uc3RydWN0b3JbQ1JFQVRPUl07XG5cbiAgICBjb250cm9sbGVyT3B0cy5oYW5kbGVycy5wdXNoKHtcbiAgICAgICAgdXJsOiBjb25maWcudXJsLFxuICAgICAgICBtZXRob2QsXG4gICAgICAgIG9wdGlvbnM6IGNvbmZpZy5vcHRpb25zIHx8IHt9LFxuICAgICAgICBoYW5kbGVyTWV0aG9kOiBwcm9wS2V5LFxuICAgIH0pO1xufVxuIl19

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

function Hook(name) {
return (target, handlerName) => {
inject_controller_options_1.injectDefaultControllerOptions(target.constructor);
const controllerOpts = target.constructor[symbols_1.CREATOR];
return ({ constructor }, handlerName) => {
inject_controller_options_1.injectDefaultControllerOptions(constructor);
const controllerOpts = constructor[symbols_1.CREATOR];
controllerOpts.hooks.push({

@@ -28,2 +28,2 @@ name,

exports.Hook = Hook;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9vay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9kZWNvcmF0b3JzL2hvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7R0FNRzs7O0FBR0gsd0NBQXFDO0FBQ3JDLG1GQUFxRjtBQUVyRjs7R0FFRztBQUNILFNBQWdCLElBQUksQ0FBQyxJQUFZO0lBQzdCLE9BQU8sQ0FBQyxNQUFXLEVBQUUsV0FBNEIsRUFBRSxFQUFFO1FBQ2pELDBEQUE4QixDQUFDLE1BQU0sQ0FBQyxXQUFXLENBQUMsQ0FBQztRQUVuRCxNQUFNLGNBQWMsR0FBMkIsTUFBTSxDQUFDLFdBQVksQ0FBQyxpQkFBTyxDQUFDLENBQUM7UUFFNUUsY0FBYyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUM7WUFDdEIsSUFBSTtZQUNKLFdBQVc7U0FDZCxDQUFDLENBQUM7SUFDUCxDQUFDLENBQUM7QUFDTixDQUFDO0FBWEQsb0JBV0MiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgQW5kcmV5IENoYWxraW4gPEwyakxpZ2FAZ21haWwuY29tPiAoaHR0cHM6Ly9naXRodWIuY29tL0wyakxpZ2EpLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuICpcbiAqIFVzZSBvZiB0aGlzIHNvdXJjZSBjb2RlIGlzIGdvdmVybmVkIGJ5IGFuIE1JVC1zdHl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B9IGZyb20gJy4vaGVscGVycy9pbmplY3QtY29udHJvbGxlci1vcHRpb25zJztcblxuLyoqXG4gKiBDcmVhdGVzIGhhbmRsZXIgd2hpY2ggbGlzdGVuIHZhcmlvdXMgaG9va3NcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIEhvb2sobmFtZTogc3RyaW5nKTogTWV0aG9kRGVjb3JhdG9yIHtcbiAgICByZXR1cm4gKHsgY29uc3RydWN0b3IgfTogYW55LCBoYW5kbGVyTmFtZTogc3RyaW5nIHwgc3ltYm9sKSA9PiB7XG4gICAgICAgIGluamVjdERlZmF1bHRDb250cm9sbGVyT3B0aW9ucyhjb25zdHJ1Y3Rvcik7XG5cbiAgICAgICAgY29uc3QgY29udHJvbGxlck9wdHMgPSBjb25zdHJ1Y3RvcltDUkVBVE9SXTtcblxuICAgICAgICBjb250cm9sbGVyT3B0cy5ob29rcy5wdXNoKHtcbiAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICBoYW5kbGVyTmFtZVxuICAgICAgICB9KTtcbiAgICB9O1xufVxuIl19
{
"name": "fastify-decorators",
"version": "3.0.0",
"version": "3.1.0",
"description": "Build your Fastify server with controllers, services and hooks",

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

@@ -170,7 +170,7 @@ # Fastify decorators

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