{"_id":"@arunvaradharajalu/common.decorators","_rev":"3-20c2b170bf3852f1852d40e4cc850137","name":"@arunvaradharajalu/common.decorators","description":"This package contains decorators for controller, route methods and express middleware","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@arunvaradharajalu/common.decorators","version":"1.0.0","keywords":["decorators"],"author":{"name":"Arun Varadharajalu"},"license":"ISC","_id":"@arunvaradharajalu/common.decorators@1.0.0","maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"homepage":"https://github.com/arunv11u/common.decorators#readme","bugs":{"url":"https://github.com/arunv11u/common.decorators/issues"},"dist":{"shasum":"84019769293789314f5474ca67c6c95dcfe6c6d4","tarball":"https://registry.npmjs.org/@arunvaradharajalu/common.decorators/-/common.decorators-1.0.0.tgz","fileCount":15,"integrity":"sha512-z14MkUnZnGfCBolSuyTlUJ9fUnQCWErm7vGC23A6htUSmAi1kBsSS4oYfZ1xpaq65oqpHiSAzfO0ctCLUl4c1g==","signatures":[{"sig":"MEYCIQCTcXepwmJo/fAFohtSyoOK6Aq0Pnz9cv7xTsM8hz/DIAIhAIFmdWIf/pAI5FPLhHyjcu1a1Q0cTaEM0BtHBS5W1I+P","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10786},"jest":{"roots":["<rootDir>/test"],"preset":"ts-jest","reporters":["default",["./node_modules/jest-html-reporter",{"pageTitle":"Decorator Test Report"}]],"clearMocks":true,"testEnvironment":"node"},"main":"./build/index.ts","types":"./build/index.d.ts","gitHead":"12ee0ee0e451ad5a0038e598792eebdfc3d69803","scripts":{"test":"jest --watchAll --verbose --no-cache --detectOpenHandles --env=node --coverage","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf build"},"_npmUser":{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"},"repository":{"url":"git+ssh://git@github.com/arunv11u/common.decorators.git","type":"git"},"_npmVersion":"10.2.4","description":"This package contains decorators for controller, route methods and express middleware","directories":{},"_nodeVersion":"20.11.0","dependencies":{"reflect-metadata":"^0.2.2","@arunvaradharajalu/common.app-router":"^1.1.8"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.7","ts-jest":"^29.1.4","@types/jest":"^29.5.12","@types/express":"^4.17.21","jest-html-reporter":"^3.10.2"},"_npmOperationalInternal":{"tmp":"tmp/common.decorators_1.0.0_1717561408494_0.05131398911753804","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@arunvaradharajalu/common.decorators","version":"1.0.1","keywords":["decorators"],"author":{"name":"Arun Varadharajalu"},"license":"ISC","_id":"@arunvaradharajalu/common.decorators@1.0.1","maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"homepage":"https://github.com/arunv11u/common.decorators#readme","bugs":{"url":"https://github.com/arunv11u/common.decorators/issues"},"dist":{"shasum":"6bfc0587f5d594198e4182d8e3c0cca45418b854","tarball":"https://registry.npmjs.org/@arunvaradharajalu/common.decorators/-/common.decorators-1.0.1.tgz","fileCount":15,"integrity":"sha512-TI/uBDtarQ1uY9olP9s+Xp0UxyNzKJdPich0zjFCFLG+Bv1EiBfvcTDZfqpwTZv3dNpBdr4w0N8QPwhqurzy5Q==","signatures":[{"sig":"MEQCICqBLrIX+O8IT1IMxBs7VInPS1P6/cbe+6npRJRU2fcTAiAh7e6HBbHkVXe3pu/oqlSvkGn0Tte9gypy9818C/X65Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10786},"jest":{"roots":["<rootDir>/test"],"preset":"ts-jest","reporters":["default",["./node_modules/jest-html-reporter",{"pageTitle":"Decorator Test Report"}]],"clearMocks":true,"testEnvironment":"node"},"main":"./build/index.ts","types":"./build/index.d.ts","gitHead":"34f2e05f3b55f8988a459eef723d0dfe23669f18","scripts":{"test":"jest --watchAll --verbose --no-cache --detectOpenHandles --env=node --coverage","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf build"},"_npmUser":{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"},"repository":{"url":"git+ssh://git@github.com/arunv11u/common.decorators.git","type":"git"},"_npmVersion":"10.2.4","description":"This package contains decorators for controller, route methods and express middleware","directories":{},"_nodeVersion":"20.11.0","dependencies":{"reflect-metadata":"^0.2.2","@arunvaradharajalu/common.app-router":"^1.1.8"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.7","ts-jest":"^29.1.4","@types/jest":"^29.5.12","@types/express":"^4.17.21","jest-html-reporter":"^3.10.2"},"_npmOperationalInternal":{"tmp":"tmp/common.decorators_1.0.1_1717561630194_0.6200865238961688","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@arunvaradharajalu/common.decorators","version":"1.0.2","keywords":["decorators"],"author":{"name":"Arun Varadharajalu"},"license":"ISC","_id":"@arunvaradharajalu/common.decorators@1.0.2","maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"homepage":"https://github.com/arunv11u/common.decorators#readme","bugs":{"url":"https://github.com/arunv11u/common.decorators/issues"},"dist":{"shasum":"3dc3b34c4fc5163df0b6acc772f43058f9ff5e93","tarball":"https://registry.npmjs.org/@arunvaradharajalu/common.decorators/-/common.decorators-1.0.2.tgz","fileCount":15,"integrity":"sha512-vGccF+7IeJRM5TF3jXPh4l06lAdyqPBrK3yMnWbANvx1NiCV1bHbYHDoiF2dpHB9BqvB+B3kS7tWIZZuQ/7RLA==","signatures":[{"sig":"MEYCIQCt+L36LZVh8HdOCieNTxCDjjIJ54cPS7Q//L3Sj6UaNwIhAIPCYKnW3bTwU88dZ8dJ6C4NLMDiqgiouamsA7iOy/eU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10786},"jest":{"roots":["<rootDir>/test"],"preset":"ts-jest","reporters":["default",["./node_modules/jest-html-reporter",{"pageTitle":"Decorator Test Report"}]],"clearMocks":true,"testEnvironment":"node"},"main":"./build/index.js","types":"./build/index.d.ts","gitHead":"3f9e529aad9c50695d1189c9d7d521d4ae5e80a7","scripts":{"test":"jest --watchAll --verbose --no-cache --detectOpenHandles --env=node --coverage","build":"npm run clean && tsc --project tsconfig.build.json","clean":"rimraf build"},"_npmUser":{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"},"repository":{"url":"git+ssh://git@github.com/arunv11u/common.decorators.git","type":"git"},"_npmVersion":"10.2.4","description":"This package contains decorators for controller, route methods and express middleware","directories":{},"_nodeVersion":"20.11.0","dependencies":{"reflect-metadata":"^0.2.2","@arunvaradharajalu/common.app-router":"^1.1.8"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^5.0.7","ts-jest":"^29.1.4","@types/jest":"^29.5.12","@types/express":"^4.17.21","jest-html-reporter":"^3.10.2"},"_npmOperationalInternal":{"tmp":"tmp/common.decorators_1.0.2_1717603771402_0.33390899681098896","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@arunvaradharajalu/common.decorators","version":"1.1.0","description":"This package contains decorators for controller, route methods and express middleware","main":"./build/index.js","types":"./build/index.d.ts","scripts":{"clean":"rimraf build","build":"npm run clean && tsc --project tsconfig.build.json","test":"jest --watchAll --verbose --no-cache --detectOpenHandles --env=node --coverage"},"jest":{"preset":"ts-jest","testEnvironment":"node","roots":["<rootDir>/test"],"clearMocks":true,"reporters":["default",["./node_modules/jest-html-reporter",{"pageTitle":"Decorator Test Report"}]]},"repository":{"type":"git","url":"git+ssh://git@github.com/arunv11u/common.decorators.git"},"keywords":["decorators"],"author":{"name":"Arun Varadharajalu"},"license":"ISC","bugs":{"url":"https://github.com/arunv11u/common.decorators/issues"},"homepage":"https://github.com/arunv11u/common.decorators#readme","devDependencies":{"@types/express":"^4.17.21","@types/jest":"^29.5.12","jest-html-reporter":"^3.10.2","rimraf":"^5.0.7","ts-jest":"^29.1.4"},"dependencies":{"@arunvaradharajalu/common.app-router":"^1.1.8","reflect-metadata":"^0.2.2"},"_id":"@arunvaradharajalu/common.decorators@1.1.0","gitHead":"c3ed8052a6de2c97fa1976e07055b94e658a14dd","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-b0joeM/kRXau5aqcHJ7u9zYLirBtTH8pbDnopGpa8HWkm1SV1bSLu1nzCGXDRBUKY7lAses0dg4n8Q8eYxb4UA==","shasum":"0b7af59a56d2cfd0e01b46c838baf09eccd2de48","tarball":"https://registry.npmjs.org/@arunvaradharajalu/common.decorators/-/common.decorators-1.1.0.tgz","fileCount":17,"unpackedSize":13682,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDglOUUVc0S8dijH4WSTdp/6wJM12sSmhvpDecge3ebZgIhALoimgFxf8dsJNrwmyei5opieV3poT+3ffbHSeBpuRY3"}]},"_npmUser":{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"},"directories":{},"maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/common.decorators_1.1.0_1720159549022_0.1630279998482167"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-05T04:23:28.380Z","modified":"2024-07-05T06:05:49.350Z","1.0.0":"2024-06-05T04:23:28.681Z","1.0.1":"2024-06-05T04:27:10.412Z","1.0.2":"2024-06-05T16:09:31.567Z","1.1.0":"2024-07-05T06:05:49.151Z"},"maintainers":[{"name":"arunvaradharajalu","email":"arunvaradharajalu@gmail.com"}],"author":{"name":"Arun Varadharajalu"},"repository":{"type":"git","url":"git+ssh://git@github.com/arunv11u/common.decorators.git"},"keywords":["decorators"],"license":"ISC","homepage":"https://github.com/arunv11u/common.decorators#readme","bugs":{"url":"https://github.com/arunv11u/common.decorators/issues"},"readme":"# @arunvaradharajalu/common.decorators\n\n[![npm version](https://badge.fury.io/js/%40arunvaradharajalu%2Fcommon.decorators.svg)](https://badge.fury.io/js/%40arunvaradharajalu%2Fcommon.decorators)\n[![GitHub issues](https://img.shields.io/github/issues/arunv11u/common.decorators)](https://github.com/arunv11u/common.decorators/issues)\n[![GitHub license](https://img.shields.io/github/license/arunv11u/common.decorators)](https://github.com/arunv11u/common.decorators/blob/master/LICENSE)\n\nThis package provides TypeScript decorators for defining controllers, route methods, and middleware for Express applications.\n\n## Installation\n\nInstall using npm:\n\n```bash\nnpm install @arunvaradharajalu/common.decorators\n```\n\n## Usage\n\n### Controller Decorator\n\nThe `Controller` decorator allows you to define a controller class with route handlers:\n\n```typescript\nimport { Controller } from '@arunvaradharajalu/common.decorators';\n\n@Controller('/api/users')\nclass UserController {\n  // Define route handlers here using other route decorators\n}\n```\n\n### Route Method Decorators\n\nUse route method decorators like `Get`, `Post`, `Put`, etc., to define HTTP methods and their corresponding paths:\n\n```typescript\nimport { Get, Post, Controller } from '@arunvaradharajalu/common.decorators';\n\n@Controller('/api/users')\nclass UserController {\n  @Get('/')\n  getAllUsers(req: Request, res: Response) {\n    // Handle GET request to fetch all users\n  }\n\n  @Post('/')\n  createUser(req: Request, res: Response) {\n    // Handle POST request to create a new user\n  }\n}\n```\n\n### Middleware Decorator\n\nThe `Use` decorator adds middleware to a route handler:\n\n```typescript\nimport { Get, Use, Controller } from '@arunvaradharajalu/common.decorators';\n\n@Controller('/api/users')\nclass UserController {\n  @Get('/')\n  @Use(authMiddleware)\n  getAllUsers(req: Request, res: Response) {\n    // This route uses authMiddleware\n  }\n}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request or open an issue for bug fixes, improvements, or new features.\n\n## Author\n\nArun Varadharajalu\n\n## License\n\nThis project is licensed under the ISC License.","readmeFilename":"README.md"}