{"_id":"@alby-sh/report","name":"@alby-sh/report","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@alby-sh/report","version":"0.1.0","description":"Official Alby error tracking SDK for Node.js and TypeScript","keywords":["alby","error-tracking","monitoring","observability","crash-reporting"],"homepage":"https://github.com/alby-sh/alby-sdk-js","license":"MIT","author":{"name":"Alby","email":"info@alby.sh"},"repository":{"type":"git","url":"git+https://github.com/alby-sh/alby-sdk-js.git"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"bin":{"alby":"dist/cli.cjs"},"scripts":{"build":"tsup","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","lint":"tsc --noEmit","prepublishOnly":"npm run build"},"dependencies":{"error-stack-parser":"^2.1.4"},"devDependencies":{"@types/node":"^20.11.0","tsup":"^8.0.0","typescript":"^5.3.0","vitest":"^1.2.0"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"_id":"@alby-sh/report@0.1.0","gitHead":"a2fc450fd798be1b40dba89a517628497e39a99a","bugs":{"url":"https://github.com/alby-sh/alby-sdk-js/issues"},"_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-TojE60GVhY90Qpra7PRbxHhxAa9HKqGhOCf4FR9jxCrvIqVRQ7Dd7H5a+kL/SMH8QlamPqLArnByoe1FvCGaFQ==","shasum":"bc0d8d41e822c035373eb12470e53799f44c9dd9","tarball":"https://registry.npmjs.org/@alby-sh/report/-/report-0.1.0.tgz","fileCount":11,"unpackedSize":97894,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alby-sh%2freport@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICrHxYtGHkmhWPsDdVxfV5TJpr99znoIUYVUBM+36W32AiBEuh7/GXKdbo7NomFRmWNJk8vF/+57/LZ27N4c7z6sfQ=="}]},"_npmUser":{"name":"albertopisaroni","email":"a.pisaroni@truesolutions.io"},"directories":{},"maintainers":[{"name":"albertopisaroni","email":"a.pisaroni@truesolutions.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/report_0.1.0_1776680091271_0.2635241360151779"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-20T10:14:51.203Z","0.1.0":"2026-04-20T10:14:51.404Z","modified":"2026-04-20T10:14:51.813Z"},"maintainers":[{"name":"albertopisaroni","email":"a.pisaroni@truesolutions.io"}],"description":"Official Alby error tracking SDK for Node.js and TypeScript","homepage":"https://github.com/alby-sh/alby-sdk-js","keywords":["alby","error-tracking","monitoring","observability","crash-reporting"],"repository":{"type":"git","url":"git+https://github.com/alby-sh/alby-sdk-js.git"},"author":{"name":"Alby","email":"info@alby.sh"},"bugs":{"url":"https://github.com/alby-sh/alby-sdk-js/issues"},"license":"MIT","readme":"# @alby-sh/report\n\n[![npm version](https://img.shields.io/npm/v/@alby-sh/report.svg?color=cb3837&logo=npm)](https://www.npmjs.com/package/@alby-sh/report)\n[![npm downloads](https://img.shields.io/npm/dm/@alby-sh/report.svg?color=cb3837)](https://www.npmjs.com/package/@alby-sh/report)\n[![CI](https://github.com/alby-sh/alby-sdk-js/actions/workflows/ci.yml/badge.svg)](https://github.com/alby-sh/alby-sdk-js/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![Node ≥18](https://img.shields.io/badge/node-%E2%89%A518-brightgreen)](./package.json)\n\nOfficial [Alby](https://alby.sh) error-tracking SDK for Node.js and TypeScript.\n\nCaptures uncaught exceptions, unhandled rejections, and anything you explicitly report, then ships them to your Alby project where an AI agent can auto-open a fix task.\n\n## Install\n\n```bash\nnpm install @alby-sh/report\n```\n\n## Use\n\n```ts\nimport { Alby } from '@alby-sh/report'\n\nAlby.init({\n  dsn: process.env.ALBY_DSN,      // https://<key>@alby.sh/ingest/v1/<app-id>\n  release: '1.4.2',\n  environment: 'production',\n})\n\n// Uncaught exceptions and unhandled rejections are sent automatically.\n\n// Manual report:\ntry {\n  doThing()\n} catch (err) {\n  Alby.captureException(err)\n}\n\n// Non-error events:\nAlby.captureMessage('Failed to acquire lease', 'warning')\n\n// Enrich:\nAlby.setUser({ id: 'u_412', email: 'ada@example.com' })\nAlby.setTag('region', 'eu-west-3')\nAlby.setContext('billing_tenant', { plan: 'pro', seats: 12 })\nAlby.addBreadcrumb({ type: 'http', message: 'GET /api/orders/42' })\n\n// Before exit (e.g. in a short-lived CLI):\nawait Alby.flush(2000)\n```\n\n## Source-map upload\n\nAfter a production build:\n\n```bash\nexport ALBY_DSN=\"https://<key>@alby.sh/ingest/v1/<app-id>\"\nexport ALBY_TOKEN=\"<your Alby personal access token>\"\n\nnpx alby sourcemaps upload \\\n  --dsn \"$ALBY_DSN\" \\\n  --release \"$npm_package_version\" \\\n  --url-prefix \"https://app.example.com/static/\" \\\n  dist/**/*.map\n```\n\n## Wire protocol\n\nThis SDK speaks the [Alby Ingest Protocol v1](./PROTOCOL_V1.md). If you're writing a new SDK (different runtime, different language) start there.\n\n## Options\n\n| Option          | Type             | Default         | Notes |\n|-----------------|------------------|-----------------|-------|\n| `dsn`           | `string`         | — (required)    | The DSN from your Alby app settings. |\n| `release`       | `string`         | ''              | Your build version. Enables release tracking / auto-resolve. |\n| `environment`   | `string`         | `NODE_ENV`      | `production` / `staging` / `dev` / anything. |\n| `sampleRate`    | `0..1`           | `1`             | Fraction of events actually sent. |\n| `platform`      | `string`         | `'node'`/`'browser'` | Override auto-detection. |\n| `serverName`    | `string`         | `os.hostname()` | Attached to every event. |\n| `autoRegister`  | `boolean`        | `true`          | Install process-level handlers. |\n| `transport`     | `Transport`      | `FetchTransport`| Custom delivery (tests, batching, filesystem spool). |\n| `debug`         | `boolean`        | `false`         | Log SDK diagnostics. |\n\n## Links\n\n- Website: [alby.sh](https://alby.sh)\n- Report issues: [GitHub Issues](https://github.com/alby-sh/alby-sdk-js/issues)\n- Other SDKs: [alby-sdk-browser](https://github.com/alby-sh/alby-sdk-browser) · [alby-sdk-php](https://github.com/alby-sh/alby-sdk-php) · [alby-sdk-python](https://github.com/alby-sh/alby-sdk-python)\n\n## License\n\nMIT — © Alby.\n","readmeFilename":"README.md","_rev":"1-288bbd5e97ecb7400b7d2118453924d9"}