{"_id":"@allstak/vue","_rev":"2-48aaec101bf9bc0bdbbcefe706b8c4c5","name":"@allstak/vue","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@allstak/vue","version":"0.1.0","keywords":["vue","vue3","observability","error-tracking","logging","monitoring","tracing","allstak"],"author":{"name":"AllStak","email":"sdk@allstak.sa"},"license":"MIT","_id":"@allstak/vue@0.1.0","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/AllStak/allstak-vue/issues"},"dist":{"shasum":"135133ca8d28d004909fc3c05ff6ce47f9a1b3f2","tarball":"https://registry.npmjs.org/@allstak/vue/-/vue-0.1.0.tgz","fileCount":10,"integrity":"sha512-P+7978vgdW1ZPwgs3DFwoVUDFCNVjslEqh4A1brsLg369aw2EBSTPm0xd4ikxD9YV0zjLJpMqAA33/kzyKFovQ==","signatures":[{"sig":"MEUCIQDqPzpXNsHCtzULQ8GO66cOOYLkHHEeazPGR1QNMWsigQIgWqnxlhDFjPr6MBWxtZFTWvumpnAto5DvWkDr3bdAux0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allstak%2fvue@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":94781},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"474f534184c1e62a0bb6286d7664bbb089727583","scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"repository":{"url":"git+https://github.com/AllStak/allstak-vue.git","type":"git"},"_npmVersion":"10.8.2","description":"Official AllStak SDK for Vue 3 — error tracking, structured logs, distributed tracing, and observability for Vue applications.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@allstak/js":"^0.3.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","tsup":"^8.0.0","jsdom":"^25.0.0","vitest":"^2.1.0","typescript":"^5.4.0","vue-router":"^4.4.0","@types/node":"^22.0.0","@vue/test-utils":"^2.4.0","@vitejs/plugin-vue":"^5.0.0"},"peerDependencies":{"vue":"^3.2.0","vue-router":"^4.0.0"},"peerDependenciesMeta":{"vue-router":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/vue_0.1.0_1780089173408_0.9795800941579884","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@allstak/vue","version":"0.2.0","description":"Official AllStak SDK for Vue 3 — error tracking, structured logs, distributed tracing, and observability for Vue applications.","keywords":["vue","vue3","observability","error-tracking","logging","monitoring","tracing","allstak"],"homepage":"https://allstak.sa","repository":{"type":"git","url":"git+https://github.com/AllStak/allstak-vue.git"},"bugs":{"url":"https://github.com/AllStak/allstak-vue/issues"},"license":"MIT","author":{"name":"AllStak","email":"sdk@allstak.sa"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","typecheck":"tsc --noEmit","test":"vitest run"},"peerDependencies":{"vue":"^3.2.0","vue-router":"^4.0.0"},"peerDependenciesMeta":{"vue-router":{"optional":true}},"dependencies":{"@allstak/js":"^0.3.0"},"devDependencies":{"@types/node":"^22.0.0","@vue/test-utils":"^2.4.0","@vitejs/plugin-vue":"^5.0.0","jsdom":"^25.0.0","tsup":"^8.0.0","typescript":"^5.4.0","vitest":"^2.1.0","vue":"^3.4.0","vue-router":"^4.4.0"},"publishConfig":{"access":"public","provenance":true,"registry":"https://registry.npmjs.org/"},"_id":"@allstak/vue@0.2.0","gitHead":"7a563c885b5ab6ab0905a28976a9dfbdc19e1421","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-3s2mDdwLk/9D+Q+0TgIz1kTlWCAv4/Q702bJq/BU9A7mLSZxa1AtEoFM53T4AYKF+m950U9EctZQghJVSahbkw==","shasum":"c29ebdc7acecb9e73bb967987122a103b6726d43","tarball":"https://registry.npmjs.org/@allstak/vue/-/vue-0.2.0.tgz","fileCount":10,"unpackedSize":109461,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allstak%2fvue@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD3zdSh89rcc33tj7XriebigWTNwnBY0Er05l/QhyfkswIhAKE4yt1bjcyWwKe7ouKaqhRXKMgqxCB6WaBF0sA8GSHd"}]},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"directories":{},"maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vue_0.2.0_1780099096921_0.5928442853406293"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-29T21:12:53.214Z","modified":"2026-05-29T23:58:17.359Z","0.1.0":"2026-05-29T21:12:53.556Z","0.2.0":"2026-05-29T23:58:17.070Z"},"bugs":{"url":"https://github.com/AllStak/allstak-vue/issues"},"author":{"name":"AllStak","email":"sdk@allstak.sa"},"license":"MIT","homepage":"https://allstak.sa","keywords":["vue","vue3","observability","error-tracking","logging","monitoring","tracing","allstak"],"repository":{"type":"git","url":"git+https://github.com/AllStak/allstak-vue.git"},"description":"Official AllStak SDK for Vue 3 — error tracking, structured logs, distributed tracing, and observability for Vue applications.","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"readme":"# @allstak/vue\n\n[![npm](https://img.shields.io/npm/v/@allstak/vue.svg)](https://www.npmjs.com/package/@allstak/vue)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nOfficial AllStak SDK for **Vue 3**. Captures uncaught exceptions, structured logs, navigation spans, HTTP requests, and web vitals — with first-class composition-API ergonomics.\n\n## Install\n\n```bash\nnpm install @allstak/vue\n# or\npnpm add @allstak/vue\n# or\nyarn add @allstak/vue\n```\n\n`vue@^3.2` is a peer dependency; `vue-router@^4` is optional.\n\n## Setup\n\n```ts\nimport { createApp } from 'vue';\nimport { AllStakPlugin } from '@allstak/vue';\nimport App from './App.vue';\n\ncreateApp(App)\n  .use(AllStakPlugin, {\n    apiKey: import.meta.env.VITE_ALLSTAK_API_KEY,\n    environment: import.meta.env.MODE,\n    release: import.meta.env.VITE_APP_VERSION,\n  })\n  .mount('#app');\n```\n\nThat single `use(AllStakPlugin, …)` wires:\n\n- `app.config.errorHandler` — every uncaught render/lifecycle error becomes an Issue\n- A `$allstak` injection key + `globalProperties.$allstak`\n- Auto release-health sessions\n- The full `@allstak/js` ingest pipeline (HTTP, db, logs, breadcrumbs, web-vitals)\n\n## Composition API\n\n```ts\nimport { useAllStak, useAllStakUser, useAllStakSpan } from '@allstak/vue';\n\nconst allstak = useAllStak();\nallstak.captureException(new Error('payment declined'));\n\n// Bind a user for the lifetime of this component (cleared on unmount)\nuseAllStakUser({ id: currentUser.id, email: currentUser.email });\n\n// Open a span; finished automatically on unmount\nconst span = useAllStakSpan({ op: 'checkout.review', description: 'review-cart' });\nspan.setTag('cart_size', items.value.length);\n```\n\n## vue-router\n\nNavigation instrumentation is **automatic**. Register vue-router before the\nplugin (or pass the router via the `router` option) and every route change\nbecomes a `navigation` span + breadcrumb — no extra call required:\n\n```ts\nimport { createApp } from 'vue';\nimport { createRouter, createWebHistory } from 'vue-router';\nimport { AllStakPlugin } from '@allstak/vue';\nimport App from './App.vue';\n\nconst router = createRouter({ history: createWebHistory(), routes });\n\ncreateApp(App)\n  .use(router)        // register the router first, then…\n  .use(AllStakPlugin, { apiKey: import.meta.env.VITE_ALLSTAK_API_KEY })\n  .mount('#app');\n```\n\nIf the plugin runs before `app.use(router)`, pass the router explicitly:\n\n```ts\ncreateApp(App)\n  .use(AllStakPlugin, { apiKey: '…', router })\n  .use(router)\n  .mount('#app');\n```\n\nYou can still wire it by hand (e.g. when `autoInstrumentRouter: false`):\n\n```ts\nimport { installRouterInstrumentation } from '@allstak/vue';\n\nconst router = createRouter({ history: createWebHistory(), routes });\ninstallRouterInstrumentation(router);\n```\n\nAuto-instrumentation is on by default and a safe no-op when vue-router isn't\ninstalled; set `autoInstrumentRouter: false` to opt out. Router errors become\nIssues. Instrumenting the same router twice is a no-op.\n\n## Component performance tracing\n\nOpt in to per-component render timing. A span (`ui.vue.<operation>`, described\nas `Vue <ComponentName>`) is opened around each tracked component's lifecycle\nphase.\n\n```ts\nimport { createApp } from 'vue';\nimport { AllStakPlugin } from '@allstak/vue';\n\ncreateApp(App)\n  .use(AllStakPlugin, {\n    apiKey: import.meta.env.VITE_ALLSTAK_API_KEY,\n    tracingOptions: {\n      trackComponents: true,      // or a list: ['Checkout', 'Cart']\n      hooks: ['mount', 'update'], // default: ['mount']\n    },\n  })\n  .mount('#app');\n```\n\nOr install it standalone on an existing app:\n\n```ts\nimport { installComponentTracing } from '@allstak/vue';\n\ninstallComponentTracing(app, { trackComponents: ['Dashboard'] });\n```\n\n## Error boundary\n\n```vue\n<script setup>\nimport { AllStakErrorBoundary } from '@allstak/vue';\n</script>\n\n<template>\n  <AllStakErrorBoundary>\n    <RiskyWidget />\n    <template #fallback=\"{ error }\">\n      <p>Sorry — something broke. ({{ error?.message }})</p>\n    </template>\n  </AllStakErrorBoundary>\n</template>\n```\n\n## Configuration\n\n`AllStakPlugin` accepts every option that `@allstak/js`'s `AllStak.init` accepts, plus:\n\n| Option | Default | Purpose |\n|---|---|---|\n| `attachErrorHandler` | `true` | Install `app.config.errorHandler` |\n| `attachWarnHandler` | `false` | Install `app.config.warnHandler` as breadcrumbs |\n| `skipInit` | `false` | Skip the `AllStak.init` call if you've already done it |\n| `tracingOptions` | — | Enable component-render tracing (`trackComponents`, `hooks`) |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}