{"_id":"@argusdev/sdk-nestjs","_rev":"2-a966766d4162a7008fe14862bebf94bd","name":"@argusdev/sdk-nestjs","dist-tags":{"latest":"0.4.0"},"versions":{"0.3.0":{"name":"@argusdev/sdk-nestjs","version":"0.3.0","keywords":["argus","error-tracking","monitoring","sdk","nestjs","nest"],"author":"Treasure Odetokun","license":"MIT","_id":"@argusdev/sdk-nestjs@0.3.0","maintainers":[{"name":"oluwatobicodes","email":"odetokuntreasure6@gmail.com"}],"homepage":"https://github.com/oluwatobicode/argus#readme","dist":{"shasum":"932eaac853aba22121c50a1b6751c43f8a141b56","tarball":"https://registry.npmjs.org/@argusdev/sdk-nestjs/-/sdk-nestjs-0.3.0.tgz","fileCount":8,"integrity":"sha512-Kg+qNLz+MYBC+7VZHjMMk7zLoz6vGdC8CYoLYP71BM7KwPyMIasrbTHvfRhf4j8wyFJvHnaVyZyCEvkwX6YYdA==","signatures":[{"sig":"MEQCIEhtiANN14R7JvBh9JKWTMcqfYslHUZM7+Rh4sx9tM9NAiBDO04yCyqiSz8eL+3i4EIKXKgFQbjjXQWLoSG0JEV61g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10937},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsc --watch","test":"node --test","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"oluwatobicodes","email":"odetokuntreasure6@gmail.com"},"repository":{"url":"git+https://github.com/oluwatobicode/argus.git","type":"git","directory":"packages/sdk-nestjs"},"description":"Argus SDK for NestJS — global exception filter on top of @argusdev/sdk-node. Works with Express and Fastify adapters.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@argusdev/sdk-core":"0.3.0","@argusdev/sdk-node":"0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"~6.0.3","@types/node":"^26.0.1"},"_npmOperationalInternal":{"tmp":"tmp/sdk-nestjs_0.3.0_1786963795153_0.8147020791994839","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@argusdev/sdk-nestjs","version":"0.4.0","description":"Argus SDK for NestJS — global exception filter (Express + Fastify) with source context: the crashing code lines, read at capture and shown in the dashboard.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"dependencies":{"@argusdev/sdk-node":"0.4.0","@argusdev/sdk-core":"0.4.0"},"devDependencies":{"@types/node":"^26.0.1","typescript":"~6.0.3"},"license":"MIT","author":"Treasure Odetokun","homepage":"https://github.com/oluwatobicode/argus#readme","keywords":["argus","error-tracking","monitoring","sdk","nestjs","nest"],"repository":{"type":"git","url":"git+https://github.com/oluwatobicode/argus.git","directory":"packages/sdk-nestjs"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","dev":"tsc --watch","typecheck":"tsc --noEmit","test":"node --test"},"_nodeVersion":"24.18.0","_id":"@argusdev/sdk-nestjs@0.4.0","dist":{"integrity":"sha512-yyAXzb+jphzASUwbXITHMCHmEqtZR5YmXolE+Jso8l4NCN1lxAqanLW8gBBDlK566sWBBT8ggYGQQOgwQmkFtQ==","shasum":"62ee4d44ccef6bfe804ceb1da8eacae70a285e0a","tarball":"https://registry.npmjs.org/@argusdev/sdk-nestjs/-/sdk-nestjs-0.4.0.tgz","fileCount":8,"unpackedSize":11397,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCFPmTogIrFRuauP2fXP5ZsVBrCk2jLfFkgBTsj28bwBAIgLtLebUFzvPeD/Y/ZELMSpOSFE02mXZDiSuyyPEzdALk="}]},"_npmUser":{"name":"oluwatobicodes","email":"odetokuntreasure6@gmail.com"},"directories":{},"maintainers":[{"name":"oluwatobicodes","email":"odetokuntreasure6@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk-nestjs_0.4.0_1787055765172_0.8800141101971839"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T10:49:54.942Z","modified":"2026-08-18T12:22:46.005Z","0.3.0":"2026-08-17T10:49:55.293Z","0.4.0":"2026-08-18T12:22:45.327Z"},"author":"Treasure Odetokun","license":"MIT","homepage":"https://github.com/oluwatobicode/argus#readme","keywords":["argus","error-tracking","monitoring","sdk","nestjs","nest"],"repository":{"type":"git","url":"git+https://github.com/oluwatobicode/argus.git","directory":"packages/sdk-nestjs"},"description":"Argus SDK for NestJS — global exception filter (Express + Fastify) with source context: the crashing code lines, read at capture and shown in the dashboard.","maintainers":[{"name":"oluwatobicodes","email":"odetokuntreasure6@gmail.com"}],"readme":"# @argusdev/sdk-nestjs\n\nNestJS SDK for [Argus](https://github.com/oluwatobicode/argus) — a global exception filter on top of `@argusdev/sdk-node`. Nest resolves every route error to a response itself, so process-level handlers never see them; a filter is the only reliable hook.\n\n## Install\n\n```bash\nnpm install @argusdev/sdk-nestjs\n```\n\n## Usage\n\n```ts\n// main.ts\nimport { NestFactory } from \"@nestjs/core\";\nimport { init, ArgusExceptionFilter } from \"@argusdev/sdk-nestjs\";\nimport { AppModule } from \"./app.module\";\n\ninit({ dsn: process.env.ARGUS_DSN!, environment: \"production\" });\n\nconst app = await NestFactory.create(AppModule);\napp.useGlobalFilters(new ArgusExceptionFilter());\nawait app.listen(3000);\n```\n\nWorks with both the **Express and Fastify** adapters. `init()` is `@argusdev/sdk-node`'s — it also hooks `uncaughtException`/`unhandledRejection`, so errors outside the request cycle (startup, timers, queues) are reported too.\n\n## What gets reported — and what doesn't\n\n| Thrown                                   | Captured | Response                        |\n| ---------------------------------------- | -------- | ------------------------------- |\n| plain `Error` (the bug)                  | ✅       | Nest's default 500 body         |\n| `HttpException` with status ≥ 500        | ✅       | the exception's own status/body |\n| `HttpException` 4xx (`NotFoundException`, validation 400s…) | ❌ | the exception's own status/body |\n\n4xx `HttpException`s are control flow, not crashes — capturing every 404 and validation error would bury real Issues in noise. Captured events carry `httpStatus`, method, URL, and `user-agent` (cookies and `authorization` are never forwarded), and captured errors are re-logged to the console — we observe, never absorb.\n\nThe filter owns the response (that's what a Nest filter is), so it reproduces Nest's default behavior exactly — verified against a real Nest 11 app: clients see byte-identical responses.\n\n## No `@nestjs/*` dependency\n\n`ArgusExceptionFilter` has no `@Catch()` decorator and imports nothing from Nest. Nest reads catch-scope metadata off the instance; with none present the filter is catch-all — exactly what a global reporter wants. It's structurally assignable to Nest's `ExceptionFilter`:\n\n```ts\nimport type { ExceptionFilter } from \"@nestjs/common\";\nconst filter: ExceptionFilter = new ArgusExceptionFilter();\n```\n\n`HttpException` is detected by shape (`getStatus`/`getResponse`), not `instanceof` — so duplicate `@nestjs/common` copies in one `node_modules` can't break detection.\n\nManual capture anywhere:\n\n```ts\nimport { captureException } from \"@argusdev/sdk-nestjs\";\n\nawait captureException(err, { tags: { job: \"invoice-sync\" } });\n```\n\n## Source context (v0.4+)\n\nEvery captured event ships with the ±5 source lines around each in-app stack frame, read off disk at capture time — the Argus dashboard shows the actual broken code with the crashing line highlighted. No source maps, no configuration; `node_modules` frames are skipped and any read failure silently degrades to \"no snippet\". (Inherited from `@argusdev/sdk-node`, which this SDK builds on.)\n\nMIT © Treasure Odetokun\n","readmeFilename":""}