{"_id":"@captain_sylvan/nest-bugsnag","_rev":"3-94ef5a6b7c83afbbe5e43deb9c9657e0","name":"@captain_sylvan/nest-bugsnag","dist-tags":{"latest":"6.1.3"},"versions":{"6.1.1":{"name":"@captain_sylvan/nest-bugsnag","version":"6.1.1","description":"A Nest module wrapper for bugsnag","keywords":["nestjs","bugsnag","logger"],"engines":{"node":"16.13.2"},"type":"git","url":"https://github.com/sravinet/nest-bugsnag","homepage":"https://github.com/sravinet/nest-bugsnag","bugs":{"url":"https://github.com/sravinet/nest-bugsnag/issues"},"main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Sylvan Ravinet"},"license":"MIT","scripts":{"clean:build":"npm run clean && npm run build","build":"tsc -p tsconfig.json","clean":"rimraf dist","postbuild":"ts-node postbuild.ts","prepublishOnly":"npm run clean:build","test":"jest --config jest.config.json"},"publishConfig":{"access":"public"},"dependencies":{"@bugsnag/js":"7.16.0","@bugsnag/plugin-express":"7.16.0","@nestjs/common":"8.2.6","@nestjs/core":"8.2.6","@nestjs/platform-express":"8.2.6","reflect-metadata":"^0.1.13","rimraf":"3.0.2","rxjs":"7.5.2"},"devDependencies":{"@nestjs/testing":"8.2.6","@types/jest":"27.4.0","@types/supertest":"^2.0.9","jest":"27.4.7","nodemon":"2.0.15","supertest":"6.2.2","ts-jest":"27.1.3","ts-node":"10.4.0","typescript":"4.5.5"},"peerDependencies":{"@bugsnag/js":"^7.1.0","@bugsnag/plugin-express":"^7.1.0","@nestjs/common":"^6.11.11","@nestjs/platform-express":"^6.11.11","reflect-metadata":"^0.1.13","rxjs":"^6.5.5"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/sravinet/nest-bugsnag.git"},"gitHead":"f91178b3c4f86b5ab56840fb80d2b377581afabe","_id":"@captain_sylvan/nest-bugsnag@6.1.1","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-v8JwBzrB71Hz/rac/o/iyYl7G9GTpMeBwyPANb23btyHknjmmKrb0Z5t1WSfLA+cwY4tzCHgbk5tiqFUUNiclA==","shasum":"03ce6d7ef9c28ff823a523a03c50333840f40623","tarball":"https://registry.npmjs.org/@captain_sylvan/nest-bugsnag/-/nest-bugsnag-6.1.1.tgz","fileCount":22,"unpackedSize":24041,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9X/9CRA9TVsSAnZWagAAwyoQAI9ryxM0HHiWBlothF5Z\nl3B+mxPatATlG+j35qlttBk1ehNV/xkNzkEgSzFTnLUBvzyIkep1gVOQ+Vvu\nV5WoXl9QI/Q97D2KyqK5AC3tYKhepf48XMTZU5NKaSrP15XJbj1KWOKHntHt\nZrGEr8uZjM2uHH7b2uYhAYC+K8cwn6tauSh3bkD/qfD1hmd2m5p5lPWXyMZi\nBAPAMc0nCZRp6PYWupbtmmqXsqQ11Db/Yo4h4XH9+lhAyWPllnqdc9Fpk6sv\n8TBi9xsWE+BQz4sON63d+AQES+wVwDothkvsiaQlqpKiRIwjb8Zq/rG5ALSh\n9zFisjo/rItaSB3zEEA2IojZO92wFdXMsvhWFGKRiVoexR0D5AcltkVWheDo\n53HK1bH8XlmGVmBRSVyyAkflZiOn0hr4M2KMhzR7R386riqxtSRAMOmC5lUV\nxBG0pZDhsr1HRaxVDC38mnyMANW/JIjnxuepaRsPjH6ZDUGYLOygUPN6IUWN\n8G6MblfKRvR3qv60WRY6r6+jbHgn82R5SwN1PKiiHdVuJWVfrRtm+27Qsm94\n1bZ4zqMBAwJ5B6ZzJBbVOrZPDSMMGdp8Zt1/Ztfc0vnEQJZoHxDv0Yk8tdXG\ntellxTKypinZywYISof629NP8dmaMhNQ7sRPF38WVmkTa+YLpd8qOSu/sla3\nx5Cs\r\n=1CQm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDub57iIaJW1fbNVQ80kUVws/5aTdrgvlUMQejI2puDEAiEAy7GzWfpWOpqnZmt6yyvlivzOMuxK+ZHBzfFXRbUJa5w="}]},"_npmUser":{"name":"captain_sylvan","email":"cto@captain-mail.com"},"maintainers":[{"name":"captain_sylvan","email":"cto@captain-mail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-bugsnag_6.1.1_1643479037752_0.08009203464182035"},"_hasShrinkwrap":false},"6.1.2":{"name":"@captain_sylvan/nest-bugsnag","version":"6.1.2","description":"A Nest module wrapper for bugsnag","keywords":["nestjs","bugsnag","logger"],"engines":{"node":"16.13.2"},"url":"https://github.com/sravinet/nest-bugsnag","homepage":"https://github.com/sravinet/nest-bugsnag","bugs":{"url":"https://github.com/sravinet/nest-bugsnag/issues"},"main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Sylvan Ravinet"},"license":"MIT","scripts":{"clean:build":"npm run clean && npm run build","build":"tsc -p tsconfig.json","clean":"rimraf dist","postbuild":"ts-node postbuild.ts","prepublishOnly":"npm run clean:build","test":"jest --config jest.config.json"},"publishConfig":{"access":"public"},"dependencies":{"@bugsnag/js":"7.16.0","@bugsnag/plugin-express":"7.16.0","@nestjs/common":"8.2.6","@nestjs/core":"8.2.6","@nestjs/platform-express":"8.2.6","reflect-metadata":"^0.1.13","rimraf":"3.0.2","rxjs":"7.5.2"},"devDependencies":{"@nestjs/testing":"8.2.6","@types/jest":"27.4.0","@types/supertest":"^2.0.9","jest":"27.4.7","nodemon":"2.0.15","supertest":"6.2.2","ts-jest":"27.1.3","ts-node":"10.4.0","typescript":"4.5.5"},"peerDependencies":{"@bugsnag/js":"^7.1.0","@bugsnag/plugin-express":"^7.1.0","@nestjs/common":"^6.11.11","@nestjs/platform-express":"^6.11.11","reflect-metadata":"^0.1.13","rxjs":"^6.5.5"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/sravinet/nest-bugsnag.git"},"gitHead":"8b60299345db3f13b4c4ad0d37a590d99f955a53","_id":"@captain_sylvan/nest-bugsnag@6.1.2","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-N6qp5xGkZBjiCCd2lLMBFVYOoeNn30oLsR2jF74ITNieAmZXK1q5TUkmHqa/ZJhAklE0UP4fN6KsmNlgxmUCwQ==","shasum":"d52626178c2ce833a74fe7331b41d45110c9526d","tarball":"https://registry.npmjs.org/@captain_sylvan/nest-bugsnag/-/nest-bugsnag-6.1.2.tgz","fileCount":22,"unpackedSize":24007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9aYwCRA9TVsSAnZWagAAQKUQAI08zjPZRd1m6l5G1Rub\nLbcRBm3GLPzI2vN2CUVU1IGaMYdeee32H5H8zJMqZYOEmV8AR/XHubXQLh1K\nK9fzyfYDQvd8/xcSZd2vRFQ3JuF76WDAqf44+lBqiYKRWpj01ZIATKdsXg8L\n1JEPBeZRTNRxI3A0EeMJUCOwfTZZ2rx02mrvjZVEZHXA4QCO3opWXskXar+F\n4tpKMKt+oAeUXdAYhGnclkweFFxx1GcUb4+5fDCJ7k54s2Of8WSKOgZw9y/h\nsB1PcjMKS3w6SXIi2XLYCgGifulnzOh3pYCZFgB9xn9T6ap7Kj5g0bGdsSen\nKsxKoHMOpXaDk6CLMlVi9FgRpaMgFnchJwDGZE61+5VTuKG3t9o6qZbfidK1\nOjtsoGZzZQDPzfYAPuVEyg3y1shTMRiQSiCmWgQ3hl1JCHVZiNuUK35VRQtU\nxh3FH2m3GXKnVYcgdiv7omsPLr5SVbyOIJLqHS4G12m/LePfoXkFOcjfZmIH\nqNde2gYwzBYHFaX+Cw/gD3b8eOxshXM0KbKpr7q+iPyTCFE501PJECiwCbgL\nCkCm4jjGZt8yJfLBaWXkYBwTwCZUYFAFFYGpHsL+9PX4eAq5ZWvqYb7O96fX\n8lguU87MAQoIAYiwAGkTpW4rDyn8/5gvWYUUTC0QPGU0aOiUcbJ7cK0xNQIR\nJtmK\r\n=EPN6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpWg0Bxn/iOE+fDDHDo1ImuOmU65BXQ54OBnCJo4RdXAIgYppZy1Z8H2FqZGMafdqaY53+3Zn+nNTptSXiQ2gO9YE="}]},"_npmUser":{"name":"captain_sylvan","email":"cto@captain-mail.com"},"maintainers":[{"name":"captain_sylvan","email":"cto@captain-mail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-bugsnag_6.1.2_1643488816563_0.2954352416404342"},"_hasShrinkwrap":false},"6.1.3":{"name":"@captain_sylvan/nest-bugsnag","version":"6.1.3","description":"A Nest module wrapper for bugsnag","keywords":["nestjs","bugsnag","logger"],"engines":{"node":"16.13.2"},"url":"https://github.com/sravinet/nest-bugsnag","homepage":"https://github.com/sravinet/nest-bugsnag","bugs":{"url":"https://github.com/sravinet/nest-bugsnag/issues"},"main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Sylvan Ravinet"},"license":"MIT","scripts":{"clean:build":"npm run clean && npm run build","build":"tsc -p tsconfig.json","clean":"rimraf dist","postbuild":"ts-node postbuild.ts","prepublishOnly":"npm run clean:build","test":"jest --config jest.config.json"},"publishConfig":{"access":"public"},"dependencies":{"@bugsnag/js":"7.16.0","@bugsnag/plugin-express":"7.16.0","@nestjs/common":"8.2.6","@nestjs/core":"8.2.6","@nestjs/platform-express":"8.2.6","reflect-metadata":"^0.1.13","rimraf":"3.0.2","rxjs":"7.5.2"},"devDependencies":{"@nestjs/testing":"8.2.6","@types/jest":"27.4.0","@types/supertest":"^2.0.9","jest":"27.4.7","nodemon":"2.0.15","supertest":"6.2.2","ts-jest":"27.1.3","ts-node":"10.4.0","typescript":"4.5.5"},"peerDependencies":{"@bugsnag/js":"7.16.0","@bugsnag/plugin-express":"7.16.0","@nestjs/common":"8.2.6","@nestjs/core":"8.2.6","@nestjs/platform-express":"8.2.6","reflect-metadata":"^0.1.13","rxjs":"^6.5.5","rimraf":"3.0.2"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/sravinet/nest-bugsnag.git"},"gitHead":"8b60299345db3f13b4c4ad0d37a590d99f955a53","_id":"@captain_sylvan/nest-bugsnag@6.1.3","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-eC/SKN2sr2S4vAafuTXVQC7Qu7DAET98fvsmox8jXZEMrq5nuS37wZRfPMKsTR0Z2zebjqY8U0gaTDUF2ykBHA==","shasum":"c68f155671c3cf6115a808f5031008343615825a","tarball":"https://registry.npmjs.org/@captain_sylvan/nest-bugsnag/-/nest-bugsnag-6.1.3.tgz","fileCount":22,"unpackedSize":24099,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9bFbCRA9TVsSAnZWagAAd8kP/1kEWXGdH5Asa6hFGB14\ngsQQv66KzfwgQDv1/gcav6PW9bslVdL/afQ4py+uXlZXFUkR5FlBy53xWcoV\nSFzrpnqXKV9sE3WMqUcRDFhYGokIGYuU18GZZG/4bAOH1CECvJHQ0xU8mckl\njJFTlaXrl2oHl8WEbkfxFaCj1gD8D0JvNMKlSIP7fn7axfYXFIDavA0D8iAj\nN87obooEK9TRqzdo7tS+AN/ARFdNiBCehD9k4YeUigurVPZ4mFXYreteQ58b\nEVAjCcRMzL5HSPYCV0169QopQZxYd6BoAPWttefbjzJ5hDTduqU++v8Jrzpe\nyQtEwTUjJJ8KntJkWGujF5xRwsjHuZq/hiTjZm2wc3OSMEquODr8VrJ42z//\nDZPjQQHr+FemHcy5U5twSi9IZJXHgC7hlC1etirbBAx3nID4Lb2g6UAiR3FK\nikethx6g4AkXtv8TKZdazUuYFnMWETQELBW9MMHEdgiOjEzQ+e36SzFLBwYk\nwNiy/MMTRX6lOUgzEicVO8DmijmPKke4z33faUeEMjGzyeZZYzNgr+CHlDDt\nKm8D/jyj0YB8AD8ju1iVTtdnmSgA/+86pwDc69UZFtChD8rB/4KXW7CyIoEW\nYn8QCvKtvyJxxfpkZjci6Q6xZP0+VJwUcnCol3KeiqGScd0LDRdQAyPYlWDU\nQUtb\r\n=sY7N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH+ZvlRMMNpdvkX5KZmI+IUFX53xtiAAxQWIFA3s7KLCAiEAvdj9/1dKudbz71MMBfQjJWkeBcCRG80UQz1o3JFRqjI="}]},"_npmUser":{"name":"captain_sylvan","email":"cto@captain-mail.com"},"maintainers":[{"name":"captain_sylvan","email":"cto@captain-mail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nest-bugsnag_6.1.3_1643491675323_0.8529107850909001"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-29T17:57:17.708Z","6.1.1":"2022-01-29T17:57:17.896Z","modified":"2022-04-04T21:46:54.583Z","6.1.2":"2022-01-29T20:40:16.707Z","6.1.3":"2022-01-29T21:27:55.582Z"},"maintainers":[{"name":"captain_sylvan","email":"cto@captain-mail.com"}],"description":"A Nest module wrapper for bugsnag","homepage":"https://github.com/sravinet/nest-bugsnag","keywords":["nestjs","bugsnag","logger"],"repository":{"type":"git","url":"git+https://github.com/sravinet/nest-bugsnag.git"},"author":{"name":"Sylvan Ravinet"},"bugs":{"url":"https://github.com/sravinet/nest-bugsnag/issues"},"license":"MIT","readme":"<p align=\"center\">\n  <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /></a>\n</p>\n\n <p align=\"center\">A Nest module wrapper for bugsnag logger.</p>\n \n<p align=\"center\">\n\n<a href=\"https://www.npmjs.com/package/@nkaurelien/nest-bugsnag\"><img src=\"https://img.shields.io/npm/v/@nkaurelien/nest-bugsnag.svg\" alt=\"NPM Version\" /></a>\n<a href=\"https://github.com/nkaurelien/nest-bugsnag\"><img src=\"https://img.shields.io/npm/l/@nkaurelien/nest-bugsnag.svg\" alt=\"Package License\" /></a>\n<a href=\"https://twitter.com/AstridNkumbe\"><img src=\"https://img.shields.io/twitter/follow/AstridNkumbe.svg?style=social&label=Follow\"></a>\n\n</p>\n\n## Description\n\nA [Nest](https://github.com/nestjs/nest) module wrapper for [bugsnag-js](https://github.com/bugsnag/bugsnag-js) logger.\n\n## Installation\n\n```bash\n$ npm i @bugsnag/plugin-express --save\n$ npm i @nkaurelien/nest-bugsnag --save\n```\n\n## Quick Start\n\nImport the `BugsnagModule` into the module. For example `AppModule`:\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { BugsnagModule } from '@nkaurelien/nest-bugsnag';\nimport BugsnagPluginExpress from '@bugsnag/plugin-express'\n\n\n@Module({\n  imports: [\n    BugsnagModule.forRoot({\n          apiKey: '<API_KEY>',\n          plugins: [BugsnagPluginExpress],\n      }),\n  ],\n})\nexport class AppModule { }\n```\n\nIn the **main.ts** file, change the HTTP platform to use express\n\n```typescript\n// change\nconst app = await NestFactory.create(AppModule);\n// to\nconst app = await NestFactory.create<NestExpressApplication>(AppModule);\n```\n\nThis handles any errors that Express catches  \n\n```typescript\napp.get(BugsnagService).handleAnyErrors(app);\n```\n\nThen you can inject BugsnagService. Example:\n\n```typescript\nimport { Controller } from '@nestjs/common';\nimport { BugsnagService } from '@nkaurelien/nest-bugsnag';\n\n@Controller('cats')\nexport class CatsController {\n  constructor(private readonly logger: BugsnagService) { }\n}\n```\n\nBugsnagService has instance property which wrap bugsnag client. So you can access it by calling:\n\n```typescript\ntry {\n  something.risky()\n} catch (e) {\n    this.logger.instance.notify('message');\n}\n```\n In your controller, you can call req.bugsnag.notify(err)  which will include information about the request in the error report. For example:\n \n```typescript\n @Get()\n getHello(@Request() req): string {\n     req.bugsnag.notify(\n         new Error('First Error'),\n         function (event) {\n             // event.addMetadata('product', product)\n         });\n     return 'Hello World!';\n }\n```\nNote that `BugsnagModule` is a global module, it will be available in all you feature modules.\n\n\n## Async configuration Sample\n\n```typescript\nimport { Module } from '@nestjs/common';\nimport { BugsnagModule } from '@nkaurelien/nest-bugsnag';\n\n@Module({\n  imports: [\n    BugsnagModule.forRootAsync({\n      useFactory: (configService: ConfigService) => ({\n        // options\n      }),\n      inject: [ConfigService],\n    }),\n  ],\n})\nexport class AppModule { }\n```\n\nThe factory might be async and is able to inject dependencies through the `inject` option.\n\n\n## Keywords\nbugsnagJs, nestJs, logger\n","readmeFilename":"README.md"}