{"_id":"@allstak/nuxt","_rev":"2-0bfed6593f52d214faf9f2a347ce9401","name":"@allstak/nuxt","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@allstak/nuxt","version":"0.1.0","keywords":["nuxt","nuxt3","nuxt4","nuxt-module","nitro","observability","error-tracking","logging","monitoring","tracing","allstak"],"author":{"name":"AllStak","email":"sdk@allstak.sa"},"license":"MIT","_id":"@allstak/nuxt@0.1.0","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"homepage":"https://allstak.sa","bugs":{"url":"https://github.com/AllStak/allstak-nuxt/issues"},"dist":{"shasum":"cf92f2283447968fcad13dc6faac1e3dbfc108b7","tarball":"https://registry.npmjs.org/@allstak/nuxt/-/nuxt-0.1.0.tgz","fileCount":20,"integrity":"sha512-wQaw/ZARt9gdr4hL97zpWU+C3Gz0Kt2Hr7SGAbfzKr3ON1sxp1fPmahfOs8vbObok/llVQ+2qcjB5exj9v6PPA==","signatures":[{"sig":"MEYCIQCaMzlhlJQyGTUjkmkzwgCquvSyTDrC9ML6XmDCceuYdQIhAMLbayr7V7rTHAIzRFMb7//tvks6Kd447RYbk1ZmNaS7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allstak%2fnuxt@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31863},"main":"./dist/module.mjs","type":"module","types":"./dist/types.d.mts","exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"gitHead":"c0710ae4c1722ad1f37033879c2b4a4e9971b43f","scripts":{"test":"vitest run","build":"nuxt-module-build build","prepack":"nuxt-module-build build","typecheck":"nuxt-module-build prepare && tsc --noEmit -p .nuxt/tsconfig.json"},"_npmUser":{"name":"allstak-","email":"hello@allstak.sa"},"repository":{"url":"git+https://github.com/AllStak/allstak-nuxt.git","type":"git"},"_npmVersion":"10.8.2","description":"Official AllStak SDK for Nuxt 3 / Nuxt 4 — error tracking, structured logs, distributed tracing, and observability for the client and the Nitro server.","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@nuxt/kit":"^3.7.0 || ^4.0.0","@allstak/js":"^0.3.0","@allstak/vue":"^0.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.4.0","nuxt":"^3.18.0","vitest":"^2.1.0","typescript":"^5.8.3","@types/node":"^22.0.0","@nuxt/module-builder":"^1.0.0"},"peerDependencies":{"nuxt":"^3.7.0 || ^4.0.0"},"peerDependenciesMeta":{"nuxt":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/nuxt_0.1.0_1780089314039_0.7192867082926768","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@allstak/nuxt","version":"0.1.1","description":"Official AllStak SDK for Nuxt 3 / Nuxt 4 — error tracking, structured logs, distributed tracing, and observability for the client and the Nitro server.","keywords":["nuxt","nuxt3","nuxt4","nuxt-module","nitro","observability","error-tracking","logging","monitoring","tracing","allstak"],"type":"module","homepage":"https://allstak.sa","repository":{"type":"git","url":"git+https://github.com/AllStak/allstak-nuxt.git"},"bugs":{"url":"https://github.com/AllStak/allstak-nuxt/issues"},"license":"MIT","author":{"name":"AllStak","email":"sdk@allstak.sa"},"exports":{".":{"types":"./dist/types.d.mts","import":"./dist/module.mjs"}},"main":"./dist/module.mjs","types":"./dist/types.d.mts","scripts":{"prepack":"nuxt-module-build build","build":"nuxt-module-build build","typecheck":"nuxt-module-build prepare && tsc --noEmit -p .nuxt/tsconfig.json","test":"vitest run"},"peerDependencies":{"nuxt":"^3.7.0 || ^4.0.0"},"peerDependenciesMeta":{"nuxt":{"optional":true}},"dependencies":{"@allstak/js":"^0.3.0","@allstak/vue":"^0.1.0","@nuxt/kit":"^3.7.0 || ^4.0.0"},"devDependencies":{"@nuxt/module-builder":"^1.0.0","@types/node":"^22.0.0","nuxt":"^3.18.0","typescript":"^5.8.3","vitest":"^2.1.0","vue":"^3.4.0"},"publishConfig":{"access":"public","provenance":true,"registry":"https://registry.npmjs.org/"},"_id":"@allstak/nuxt@0.1.1","gitHead":"8c2c90566d6db0f151f212eaa958ee1f03094f48","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-4iQvQtRSSRtJtZZeb7mnd+m5MwYfm6oW02i5PMgP9yMjWB5RG53yXGfTF2yFImdTbUufXCkGQxJOFQqPmBhHzw==","shasum":"bf5e11dfbc88ffa5b3a9c82e379c2a4605c2012e","tarball":"https://registry.npmjs.org/@allstak/nuxt/-/nuxt-0.1.1.tgz","fileCount":20,"unpackedSize":32211,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@allstak%2fnuxt@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFQvCstdeaSIC+1yi09Z0/BT8cPkODLayTkBgLrsdu2gAiEA+kn3uQnq8Vf+j7FaATUGzM2Yzpb0lOVY0LAPkOFgLWY="}]},"_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/nuxt_0.1.1_1780099188773_0.884851333787344"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-29T21:15:13.849Z","modified":"2026-05-29T23:59:49.217Z","0.1.0":"2026-05-29T21:15:14.168Z","0.1.1":"2026-05-29T23:59:48.920Z"},"bugs":{"url":"https://github.com/AllStak/allstak-nuxt/issues"},"author":{"name":"AllStak","email":"sdk@allstak.sa"},"license":"MIT","homepage":"https://allstak.sa","keywords":["nuxt","nuxt3","nuxt4","nuxt-module","nitro","observability","error-tracking","logging","monitoring","tracing","allstak"],"repository":{"type":"git","url":"git+https://github.com/AllStak/allstak-nuxt.git"},"description":"Official AllStak SDK for Nuxt 3 / Nuxt 4 — error tracking, structured logs, distributed tracing, and observability for the client and the Nitro server.","maintainers":[{"name":"allstak-","email":"hello@allstak.sa"}],"readme":"# @allstak/nuxt\n\n[![npm](https://img.shields.io/npm/v/@allstak/nuxt.svg)](https://www.npmjs.com/package/@allstak/nuxt)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nOfficial AllStak SDK for **Nuxt 3 / Nuxt 4**, shipped as a Nuxt module. Captures uncaught errors on the client and the Nitro server, wraps every server request in a span, opens navigation spans on route changes, stitches client↔server traces through SSR meta tags, and surfaces the full AllStak observability API on both runtimes.\n\nBuilt on `@allstak/vue` (client) and `@allstak/js` (server).\n\n## Install\n\n```bash\nnpm install @allstak/nuxt\n# or\npnpm add @allstak/nuxt\n# or\nyarn add @allstak/nuxt\n```\n\n`nuxt@^3.7 || ^4` is a peer dependency. Nuxt >= 3.14 is recommended.\n\n## Setup\n\nRegister the module and provide your ingest key through `runtimeConfig`:\n\n```ts\n// nuxt.config.ts\nexport default defineNuxtConfig({\n  modules: ['@allstak/nuxt'],\n\n  runtimeConfig: {\n    public: {\n      allstak: {\n        apiKey: process.env.ALLSTAK_API_KEY,\n        environment: process.env.NODE_ENV,\n        release: process.env.APP_VERSION,\n      },\n    },\n  },\n\n  // Optional — client.config / server.config-equivalent options:\n  allstak: {\n    client: { tracesSampleRate: 1.0 },\n    server: { tracesSampleRate: 1.0 },\n  },\n});\n```\n\nThat single entry wires:\n\n- **Client** — delegates init and the Vue glue to `@allstak/vue`'s plugin (with `attachErrorHandler: false` so Nuxt's own error handling isn't hijacked), captures errors via the `vue:error` and `app:error` hooks, and opens a `navigation` span per route change.\n- **Server (Nitro)** — calls `AllStak.init` on the server, captures unhandled errors via the Nitro `error` hook, wraps each request in an `http.server` span, and injects trace meta tags into the SSR `<head>`.\n- Reads `runtimeConfig.public.allstak` for `apiKey` / `host` / `environment` / `release` / `dist` so secrets never have to live in `nuxt.config`.\n\n## Using the API\n\nThe full client API is available from `@allstak/nuxt/client`, and the full server API from `@allstak/nuxt/server`:\n\n```ts\n// A client component\nimport { AllStak, useAllStak } from '@allstak/nuxt/client';\n\nconst allstak = useAllStak();\nallstak.captureException(new Error('payment declined'));\n```\n\n```ts\n// server/api/orders.post.ts\nimport { AllStak } from '@allstak/nuxt/server';\n\nexport default defineEventHandler(async (event) => {\n  AllStak.addBreadcrumb({ type: 'order', message: 'creating order' });\n  // ...\n});\n```\n\n## Module options\n\nConfigured under the `allstak` key in `nuxt.config.ts`:\n\n| Option | Default | Purpose |\n|---|---|---|\n| `enabled` | `true` | Master switch. `false` registers nothing. |\n| `client` | `true` | Wire the client plugin. Pass an object to set client init config (sampling, filters, …). |\n| `server` | `true` | Wire the Nitro server plugin. Pass an object to set server init config. |\n| `injectTraceMetaTags` | `true` | Inject SSR trace meta tags for client↔server trace continuity (skipped for pre-render / SWR). |\n| `autoInjectServerAllStak` | `'plugin'` | Server-init strategy: `'plugin'`, `'top-level-import'`, or `'experimental_dynamic-import'`. |\n| `experimental_entrypointWrappedFunctions` | `['default','handler','server']` | Entry functions wrapped by the dynamic-import strategy. |\n| `sourceMapsUploadOptions` | — | Source-map upload config (`org`, `project`, `authToken`, `release`, `sourcemaps`). Enables `sourcemap.client: 'hidden'`. |\n| `debug` | `false` | Verbose module + runtime logging. |\n\n### Public runtime config\n\nThe browser-safe ingest config lives under `runtimeConfig.public.allstak`:\n\n| Field | Purpose |\n|---|---|\n| `apiKey` | Publishable ingest key. |\n| `host` | Override the AllStak ingest host. |\n| `environment` | Deployment environment (e.g. `production`). |\n| `release` | Release identifier for grouping. |\n| `dist` | Build distribution identifier. |\n\nThe server plugin also reads `ALLSTAK_API_KEY` / `ALLSTAK_HOST` / `APP_VERSION` from `process.env` as a fallback for the build-artifact and top-level-import server-init strategies, where runtime config may not be assembled yet.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}