{"_id":"@brandondunc/typescript-rest","_rev":"2-8ec57f1267db9426aced77334ad71da7","name":"@brandondunc/typescript-rest","dist-tags":{"latest":"3.0.7"},"versions":{"3.0.5":{"name":"@brandondunc/typescript-rest","version":"3.0.5","keywords":["API","REST","RESTFul","service","microservice","typescript","node server"],"author":{"name":"Thiago da Rosa de Bustamante","email":"thiago@cruxframework.org"},"license":"MIT","_id":"@brandondunc/typescript-rest@3.0.5","maintainers":[{"name":"brandondunc","email":"brandonl.duncan@gmail.com"}],"homepage":"https://github.com/thiagobustamante/typescript-rest#readme","bugs":{"url":"https://github.com/thiagobustamante/typescript-rest/issues"},"nyc":{"include":["src/**/*.ts"],"require":["ts-node/register"],"reporter":["text-summary","json","html"],"extension":[".ts"],"sourceMap":true,"instrument":true,"report-dir":"./reports/coverage"},"dist":{"shasum":"14188beb402c0aee8f77660fbfe3d7aafec98b43","tarball":"https://registry.npmjs.org/@brandondunc/typescript-rest/-/typescript-rest-3.0.5.tgz","fileCount":91,"integrity":"sha512-FMPOxGZZmdUkK0A9QJgkOghlTAI2vBd4k95S+Dh2wyEOvcPBorpSrX4nUNsLhpDBkokf9lzuXGzoSn1a7dFCWg==","signatures":[{"sig":"MEUCIAUpEf9qygn/JTk0OnfYJdqpz1MVALbp1DQ1rRRyq5kYAiEAnUG3OZRHhJR/PrvjRwRwypu4GcBBUICwKnbSm5XMO1w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1023798,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCR0LACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMhRAAo33DDvaBvLS5QukWufa1FA04BWy9mWZZVPpTSYnvOTQ8JxOf\r\nPCEKo1LTui+aoGtJQjlpRrPA3Z6a2bTtSaO0xU4kBQ5ng2DdpRd4IbUXYKuR\r\n3pAHxCP2AzF1YGtgDEr9+7oZoMMimb05GxjJjEUO3GPLVsj6rlrZqnLg/sdE\r\nMDKrDN9043QDVMebLQvxXejfexy/tWPBUjDnhL7LxtlADKlAzUZQXCCWz8RI\r\nMK2+0dtImvvzfBaTuEATEdXmMIyzi5eWFOcHr/n4g41ZXm1D3tD//1aY4IFg\r\nX64NdSloSoydv9B+6p+JguKF9t0KQZ9aKohAyrwtxyc+1XXLDQLrhvR4z0Df\r\nT7Vpk3nTBsIYvmaMjTIW7K0ITF7uuswmYypesx26j6dR64LUU2p2TLBPKsC2\r\nbDsNk3HvRsNkW+lKLGuWbbFTHvWI+W5ivT5WyGwwxqj8ff1cDDhmAwHTfZZ8\r\nuhKj613Qpqrbt4GbMcjrw7XhhcIcydZiMcttSdnAw/j8Z96AGBIeNHRyFP1i\r\n+UUWlkaUH0M5zLB5++BQpG/QVEwElsOCog2vBEYvguOeR86FTwXDoGTUy48J\r\nF/xzd/C93s8HRxgAm3YY6bvqsiV4s5EShNT8pQ3NMj7Y3GvFG7x51E2y13dw\r\nAlxO07nMiBDEdTGO6uIR76UA/dnFvvt0LcQ=\r\n=XeHE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/typescript-rest.js","engines":{"node":">=6.0.0"},"gitHead":"60328d3dadcd18c5840cab08288ac3e20d0dcffb","scripts":{"tsc":"tsc","lint":"tslint ./src/**/*.ts ./test/**/*.ts","test":"cross-env NODE_ENV=test jest --config ./test/jest.config.js --coverage --runInBand","build":"npm run clean && tsc","clean":"rimraf dist","start":"tsc -w","prepare":"rimraf dist && tsc","pretest":"cross-env NODE_ENV=test npm run build && npm run lint","lint:fix":"tslint --fix ./src/**/*.ts ./test/**/*.ts -t verbose","test:unit":"cross-env NODE_ENV=test jest --config ./test/jest.config-unit.js","test:integration":"cross-env NODE_ENV=test jest --config ./test/jest.config-integration.js --runInBand"},"typings":"./dist/typescript-rest.d.ts","_npmUser":{"name":"brandondunc","email":"brandonl.duncan@gmail.com"},"repository":{"url":"git+https://github.com/thiagobustamante/typescript-rest.git","type":"git"},"_npmVersion":"6.14.17","description":"A Library to create RESTFul APIs with Typescript","directories":{"doc":"doc","lib":"dist"},"_nodeVersion":"14.20.0","dependencies":{"path":"^0.12.7","lodash":"^4.17.21","multer":"^1.4.5-lts.1","yamljs":"^0.3.0","express":"^4.18.1","fs-extra":"^10.1.0","passport":"^0.4.1","body-parser":"^1.19.0","require-glob":"^4.1.0","@types/multer":"1.4.7","cookie-parser":"^1.4.6","@types/express":"^4.17.13","@types/passport":"^1.0.10","reflect-metadata":"^0.1.13","@types/body-parser":"1.19.2","swagger-ui-express":"^4.1.6","@types/serve-static":"^1.15.0","@types/cookie-parser":"^1.4.3"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","rimraf":"^3.0.2","tslint":"^6.1.3","request":"^2.88.0","ts-jest":"^28.0.8","ts-node":"^10.9.1","cross-env":"^7.0.3","test-wait":"^1.1.3","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/debug":"^4.1.7","jsonwebtoken":"^8.5.1","passport-jwt":"^4.0.0","@types/lodash":"^4.14.184","@types/yamljs":"^0.2.30","@types/request":"^2.48.8","typescript-ioc":"^3.0.3","@types/fs-extra":"9.0.13","@types/proxyquire":"^1.3.28","source-map-support":"^0.5.21","@types/jsonwebtoken":"^8.5.8","@types/passport-jwt":"^3.0.6","typescript-rest-ioc":"^1.0.0","tslint-config-prettier":"^1.17.0","@types/express-serve-static-core":"^4.17.30"},"_npmOperationalInternal":{"tmp":"tmp/typescript-rest_3.0.5_1661541642810_0.8168115444645259","host":"s3://npm-registry-packages"}},"3.0.6":{"name":"@brandondunc/typescript-rest","version":"3.0.6","keywords":["API","REST","RESTFul","service","microservice","typescript","node server"],"author":{"name":"Thiago da Rosa de Bustamante","email":"thiago@cruxframework.org"},"license":"MIT","_id":"@brandondunc/typescript-rest@3.0.6","maintainers":[{"name":"brandondunc","email":"brandonl.duncan@gmail.com"}],"homepage":"https://github.com/brandonduncan/typescript-rest#readme","bugs":{"url":"https://github.com/brandonduncan/typescript-rest/issues"},"nyc":{"include":["src/**/*.ts"],"require":["ts-node/register"],"reporter":["text-summary","json","html"],"extension":[".ts"],"sourceMap":true,"instrument":true,"report-dir":"./reports/coverage"},"dist":{"shasum":"f476f522a380088532949e1083643e3e9de08a6e","tarball":"https://registry.npmjs.org/@brandondunc/typescript-rest/-/typescript-rest-3.0.6.tgz","fileCount":91,"integrity":"sha512-4Mgt6d1FaFHt24qX30nQ3It9YaDA7/AzgNu9VD1EAbIKSSGBh8VDUWsn4DcamaV+HCpB6GKxrjgxAg48+C9rsg==","signatures":[{"sig":"MEQCIBzM+TgD5dmSpE+hSx0pNFXLeKyUowaLAFkYGHQ/aEXfAiBScu1BSmCO5wFcL3DzULvTFY7oesc4+k8u3EO/ac2OLA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1000018},"main":"./dist/typescript-rest.js","engines":{"node":">=6.0.0"},"gitHead":"a41405cddef250bf996f85fbb5a9f30484080b87","scripts":{"tsc":"tsc","lint":"tslint ./src/**/*.ts ./test/**/*.ts","test":"cross-env NODE_ENV=test jest --config ./test/jest.config.js --coverage --runInBand","build":"npm run clean && tsc","clean":"rimraf dist","start":"tsc -w","prepare":"rimraf dist && tsc","pretest":"cross-env NODE_ENV=test npm run build && npm run lint","lint:fix":"tslint --fix ./src/**/*.ts ./test/**/*.ts -t verbose","test:unit":"cross-env NODE_ENV=test jest --config ./test/jest.config-unit.js","test:integration":"cross-env NODE_ENV=test jest --config ./test/jest.config-integration.js --runInBand"},"typings":"./dist/typescript-rest.d.ts","_npmUser":{"name":"brandondunc","email":"brandonl.duncan@gmail.com"},"repository":{"url":"git+https://github.com/brandonduncan/typescript-rest.git","type":"git"},"_npmVersion":"6.14.18","description":"A Library to create RESTFul APIs with Typescript, forked from typscript-rest","directories":{"doc":"doc","lib":"dist"},"_nodeVersion":"14.21.3","dependencies":{"path":"^0.12.7","lodash":"^4.17.21","multer":"^1.4.5-lts.1","yamljs":"^0.3.0","express":"^4.18.1","fs-extra":"^10.1.0","passport":"^0.4.1","body-parser":"^1.19.0","require-glob":"^4.1.0","@types/multer":"1.4.7","cookie-parser":"^1.4.6","@types/express":"^4.17.13","@types/passport":"^1.0.10","reflect-metadata":"^0.1.13","@types/body-parser":"1.19.2","@types/serve-static":"^1.15.0","@types/cookie-parser":"^1.4.3"},"engineStrict":true,"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.3","rimraf":"^3.0.2","tslint":"^6.1.3","request":"^2.88.0","ts-jest":"^28.0.8","ts-node":"^10.9.1","cross-env":"^7.0.3","test-wait":"^1.1.3","typescript":"^4.7.4","@types/jest":"^28.1.7","@types/debug":"^4.1.7","jsonwebtoken":"^8.5.1","passport-jwt":"^4.0.0","@types/lodash":"^4.14.184","@types/yamljs":"^0.2.30","@types/request":"^2.48.8","typescript-ioc":"^3.0.3","@types/fs-extra":"9.0.13","@types/proxyquire":"^1.3.28","source-map-support":"^0.5.21","@types/jsonwebtoken":"^8.5.8","@types/passport-jwt":"^3.0.6","typescript-rest-ioc":"^1.0.0","tslint-config-prettier":"^1.17.0","@types/express-serve-static-core":"^4.17.30"},"_npmOperationalInternal":{"tmp":"tmp/typescript-rest_3.0.6_1689694117353_0.9111735337819569","host":"s3://npm-registry-packages"}},"3.0.7":{"name":"@brandondunc/typescript-rest","version":"3.0.7","description":"A Library to create RESTFul APIs with Typescript, forked from typscript-rest","author":{"name":"Thiago da Rosa de Bustamante","email":"thiago@cruxframework.org"},"keywords":["API","REST","RESTFul","service","microservice","typescript","node server"],"main":"./dist/typescript-rest.js","typings":"./dist/typescript-rest.d.ts","license":"MIT","scripts":{"start":"tsc -w","build":"npm run clean && tsc","clean":"rimraf dist","prepare":"rimraf dist && tsc","lint":"tslint ./src/**/*.ts ./test/**/*.ts","lint:fix":"tslint --fix ./src/**/*.ts ./test/**/*.ts -t verbose","pretest":"cross-env NODE_ENV=test npm run build && npm run lint","test":"cross-env NODE_ENV=test jest --config ./test/jest.config.js --coverage --runInBand","test:unit":"cross-env NODE_ENV=test jest --config ./test/jest.config-unit.js","test:integration":"cross-env NODE_ENV=test jest --config ./test/jest.config-integration.js --runInBand","tsc":"tsc"},"nyc":{"include":["src/**/*.ts"],"extension":[".ts"],"require":["ts-node/register"],"reporter":["text-summary","json","html"],"report-dir":"./reports/coverage","sourceMap":true,"instrument":true},"dependencies":{"@types/body-parser":"1.19.5","@types/cookie-parser":"^1.4.7","@types/express":"^5.0.0","@types/multer":"1.4.12","body-parser":"^1.20.3","cookie-parser":"^1.4.7","express":"^5.0.1","fs-extra":"^11.2.0","lodash":"^4.17.21","multer":"^1.4.5-lts.1","reflect-metadata":"^0.2.2","require-glob":"^4.1.0"},"devDependencies":{"@types/debug":"^4.1.12","@types/fs-extra":"11.0.4","@types/jest":"^29.5.14","@types/lodash":"^4.17.13","@types/node":"^22.9.0","@types/request":"^2.48.12","cross-env":"^7.0.3","jest":"^29.7.0","request":"^2.88.0","rimraf":"^6.0.1","test-wait":"^1.1.3","ts-jest":"^29.2.5","ts-node":"^10.9.2","tslint":"^6.1.3","tslint-config-prettier":"^1.17.0","typescript":"^5.6.3"},"repository":{"type":"git","url":"git+https://github.com/brandonduncan/typescript-rest.git"},"bugs":{"url":"https://github.com/brandonduncan/typescript-rest/issues"},"directories":{"lib":"dist","doc":"doc"},"engines":{"node":">=6.0.0"},"engineStrict":true,"_id":"@brandondunc/typescript-rest@3.0.7","gitHead":"76dd590eccbf371b44fae8e22218f8366a9c4874","homepage":"https://github.com/brandonduncan/typescript-rest#readme","_nodeVersion":"18.20.4","_npmVersion":"10.7.0","dist":{"integrity":"sha512-ss2WktPSOI+zXscFaB7M96OTQUKiW5gmOvTA9xjqZ11BHOUNuwDNLQ8uvsQ9OiH/1E1Ij6SzI0yHeLJo+B2T8w==","shasum":"74e1e9358bcac9546f18a4ec98af3f6346a745ef","tarball":"https://registry.npmjs.org/@brandondunc/typescript-rest/-/typescript-rest-3.0.7.tgz","fileCount":85,"unpackedSize":970074,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFTZmbpUMS3acuF7yZQouyL1JGEB9dDF+JhQBMYQWQToAiAT+Due72hRzLcOrpO6PefWNsQS2EwSayrGYbMltAbfoA=="}]},"_npmUser":{"name":"brandondunc","email":"brandonl.duncan@gmail.com"},"maintainers":[{"name":"brandondunc","email":"brandonl.duncan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/typescript-rest_3.0.7_1731106758906_0.03993724233557039"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-26T19:20:42.742Z","modified":"2024-11-08T22:59:19.347Z","3.0.5":"2022-08-26T19:20:43.204Z","3.0.6":"2023-07-18T15:28:37.590Z","3.0.7":"2024-11-08T22:59:19.135Z"},"bugs":{"url":"https://github.com/brandonduncan/typescript-rest/issues"},"author":{"name":"Thiago da Rosa de Bustamante","email":"thiago@cruxframework.org"},"license":"MIT","homepage":"https://github.com/brandonduncan/typescript-rest#readme","keywords":["API","REST","RESTFul","service","microservice","typescript","node server"],"repository":{"type":"git","url":"git+https://github.com/brandonduncan/typescript-rest.git"},"description":"A Library to create RESTFul APIs with Typescript, forked from typscript-rest","maintainers":[{"name":"brandondunc","email":"brandonl.duncan@gmail.com"}],"readme":"[![npm version](https://badge.fury.io/js/@brandondunc%2Ftypescript-rest.svg)](https://badge.fury.io/js/@brandondunc%2Ftypescript-rest.svg)\n![Master Workflow](https://github.com/brandonduncan/typescript-rest/workflows/Master%20Workflow/badge.svg)\n[![Coverage Status](https://codecov.io/gh/brandonduncan/typescript-rest/branch/master/graph/badge.svg)](https://codecov.io/gh/brandonduncan/typescript-rest)\n[![Known Vulnerabilities](https://snyk.io/test/github/brandonduncan/typescript-rest/badge.svg?targetFile=package.json)](https://snyk.io/test/github/brandonduncan/typescript-rest?targetFile=package.json)\n\n# REST Services for Typescript\nThis is a lightweight annotation-based [expressjs](http://expressjs.com/) extension for typescript.\n\nIt can be used to define your APIs using decorators.\n\n**Table of Contents** \n\n- [REST Services for Typescript](#)\n  - [Preface](#preface)\n  - [Installation](#installation)\n  - [Configuration](#configuration)\n  - [Basic Usage](#basic-usage)\n  - [Using with an IoC Container](#using-with-an-ioc-container)\n  - [Documentation](https://github.com/thiagobustamante/typescript-rest/wiki)\n  - [Boilerplate Project](#boilerplate-project)  \n\n## Preface\nThis repository was forked in August 2022 to address critical security updates since the last official typescript-rest release for those still using the library.\n\n## Installation\n\nThis library only works with typescript. Ensure it is installed:\n\n```bash\nnpm install typescript -g\n```\n\nTo install typescript-rest:\n\n```bash\nnpm install typescript-rest --save\n```\n\n## Configuration\n\nTypescript-rest requires the following TypeScript compilation options in your tsconfig.json file:\n\n```typescript\n{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true,\n    \"target\": \"es6\" // or anything newer like esnext\n  }\n}\n```\n\n## Basic Usage\n\n```typescript\nimport * as express from \"express\";\nimport {Server, Path, GET, PathParam} from \"typescript-rest\";\n\n@Path(\"/hello\")\nclass HelloService {\n  @Path(\":name\")\n  @GET\n  sayHello( @PathParam('name') name: string ): string {\n    return \"Hello \" + name;\n  }\n}\n\nlet app: express.Application = express();\nServer.buildServices(app);\n\napp.listen(3000, function() {\n  console.log('Rest Server listening on port 3000!');\n});\n\n```\n\nThat's it. You can just call now:\n\n```\nGET http://localhost:3000/hello/joe\n```\n\n## Using with an IoC Container\n\nInstall the IoC container and the serviceFactory for the IoC Container\n\n```bash\nnpm install typescript-rest --save\nnpm install typescript-ioc --save\nnpm install typescript-rest-ioc --save\n```\n\nThen add a rest.config file in the root of your project:\n\n```json\n{\n  \"serviceFactory\": \"typescript-rest-ioc\"\n}\n```\n\nAnd you can use Injections, Request scopes and all the features of the IoC Container. It is possible to use it with any other IoC Container, like Inversify.\n\nExample:\n\n```typescript\nclass HelloService {\n  sayHello(name: string) {\n    return \"Hello \" + name;\n  }\n}\n\n@Path(\"/hello\")\nclass HelloRestService {\n  @Inject\n  private helloService: HelloService;\n\n  @Path(\":name\")\n  @GET\n  sayHello( @PathParam('name') name: string): string {\n    return this.sayHello(name);\n  }\n}\n```\n\n## Complete Guide\n\nCheck our [documentation](https://github.com/thiagobustamante/typescript-rest/wiki).\n\n## Boilerplate Project\n\nYou can check [this project](https://github.com/vrudikov/typescript-rest-boilerplate) to get started.\n","readmeFilename":"README.md"}