{"_id":"@argusdev/sdk-vue","name":"@argusdev/sdk-vue","dist-tags":{"latest":"0.3.0"},"versions":{"0.3.0":{"name":"@argusdev/sdk-vue","version":"0.3.0","description":"Argus SDK for Vue 3 — app-level error handler plugin on top of @argusdev/sdk-browser.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"dependencies":{"@argusdev/sdk-browser":"0.3.0","@argusdev/sdk-core":"0.3.0"},"peerDependencies":{"vue":">=3"},"devDependencies":{"typescript":"~6.0.3","vue":"^3.5.0"},"license":"MIT","author":"Treasure Odetokun","homepage":"https://github.com/oluwatobicode/argus#readme","keywords":["argus","error-tracking","monitoring","sdk","vue"],"repository":{"type":"git","url":"git+https://github.com/oluwatobicode/argus.git","directory":"packages/sdk-vue"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","dev":"tsc --watch","typecheck":"tsc --noEmit","test":"node --test"},"_nodeVersion":"24.18.0","_id":"@argusdev/sdk-vue@0.3.0","dist":{"integrity":"sha512-IXJd2lO/+OMirbATVX6+H7dNwjPOUCioZCa2zcjEI5aAEqcdnCk0T/PXTrRHuJLnkBOfhtMNPsIgG9nG2Y1jnQ==","shasum":"15e3be61adf22266899349610aec9871af05f7e4","tarball":"https://registry.npmjs.org/@argusdev/sdk-vue/-/sdk-vue-0.3.0.tgz","fileCount":8,"unpackedSize":8372,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICFZ9y85zIKDWHmjb4tbtTC0yaJSHCf4Y+QwW2YUxyKQAiBwMNVchDr3Q8CVSFyBs5qMnYMrbEYbD5/BI8/6/LFTqQ=="}]},"_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-vue_0.3.0_1786797982064_0.29933443264051096"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-15T12:46:21.935Z","0.3.0":"2026-08-15T12:46:22.213Z","modified":"2026-08-15T12:46:22.423Z"},"maintainers":[{"name":"oluwatobicodes","email":"odetokuntreasure6@gmail.com"}],"description":"Argus SDK for Vue 3 — app-level error handler plugin on top of @argusdev/sdk-browser.","homepage":"https://github.com/oluwatobicode/argus#readme","keywords":["argus","error-tracking","monitoring","sdk","vue"],"repository":{"type":"git","url":"git+https://github.com/oluwatobicode/argus.git","directory":"packages/sdk-vue"},"author":"Treasure Odetokun","license":"MIT","readme":"# @argusdev/sdk-vue\n\nVue 3 SDK for [Argus](https://github.com/oluwatobicode/argus) — an app-level error handler on top of `@argusdev/sdk-browser`. Catches component errors that `window.onerror` never sees.\n\n## Install\n\n```bash\nnpm install @argusdev/sdk-vue\n```\n\n## Usage\n\n```ts\nimport { createApp } from \"vue\";\nimport { argusVue } from \"@argusdev/sdk-vue\";\nimport App from \"./App.vue\";\n\ncreateApp(App)\n  .use(argusVue, { dsn: \"https://<publicKey>@<host>/<projectId>\" })\n  .mount(\"#app\");\n```\n\nThe plugin does two things: it calls the browser SDK's `init()` (so you get `window.onerror`, unhandled rejections, and web vitals for free) and installs `app.config.errorHandler`.\n\nManual capture works the same as everywhere else:\n\n```ts\nimport { captureException } from \"@argusdev/sdk-vue\";\n\ntry {\n  await save();\n} catch (err) {\n  captureException(err);\n}\n```\n\n## Options\n\nSame as `@argusdev/sdk-browser`:\n\n| Option        | Default    | What                                             |\n| ------------- | ---------- | ------------------------------------------------ |\n| `dsn`         | _required_ | `https://KEY@host/PROJECT_ID`                    |\n| `environment` | —          | e.g. `\"production\"`                              |\n| `release`     | —          | version string, for regression tracking          |\n| `vitals`      | `true`     | `page.load` transaction with LCP/CLS/FCP/TTFB    |\n\n## Why a plugin and not just `init()`\n\nVue catches errors thrown in render functions, `setup()`, lifecycle hooks, watchers, and event handlers, then routes them to `app.config.errorHandler`. They are never re-thrown, so `window.onerror` stays silent — exactly the reason the React SDK needs an error boundary.\n\nTwo tags come along for free:\n\n- `component` — the crashing component's name (`__name` from the SFC filename, or an explicit `name`)\n- `lifecycleHook` — Vue's own label for where it blew up: `\"render function\"`, `\"setup function\"`, `\"native event handler\"`, `\"watcher callback\"`…\n\nAlready have an `errorHandler`? It's chained, not replaced. If you had none, Vue's `console.error` is preserved so the error still shows up in devtools.\n\n## Already call `init()` yourself?\n\nAttach just the Vue hook:\n\n```ts\nimport { init, attachVueErrorHandler } from \"@argusdev/sdk-vue\";\n\ninit({ dsn });\nconst app = createApp(App);\nattachVueErrorHandler(app);\n```\n\n## Note on `errorCaptured`\n\nA component-level `errorCaptured` hook that returns `false` stops propagation — the error never reaches `app.config.errorHandler`, so Argus never sees it. Return nothing (or `true`) if you want it reported.\n\nMIT © Treasure Odetokun\n","readmeFilename":"","_rev":"1-d948de2e1a66ddb12794e30a4e95c9c9"}