{"_id":"5xx-sdk","_rev":"9-eaa1dc993c2435b1f1412959f4e59d45","name":"5xx-sdk","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.0":{"name":"5xx-sdk","version":"1.0.0","keywords":["error-tracking","monitoring","errors","logging","5xx"],"license":"MIT","_id":"5xx-sdk@1.0.0","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"homepage":"https://github.com/zweb38/5xx#readme","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"6b86c63264b90b3a45d2cfde8ec04cec65ad46a7","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.0.0.tgz","fileCount":28,"integrity":"sha512-p6zFE1tHRndEQghu5omI/GS85kSE4N3FoedEtyW51mOENT78AXs1rALLgR7fSxdL/+ymsmpT6CtFf8nK8OY69Q==","signatures":[{"sig":"MEUCIEIJ1NEROwxKmi2M2J+E0MbE4OXu7R2dXCLh9ZkMQBwTAiEAxp2WvFmEYT/Tb0lyQt1mQ5SpSXguILqss617XmQJS4Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71419},"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"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"10.8.2","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"_nodeVersion":"20.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/5xx-sdk_1.0.0_1769500313315_0.6153606627169022","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"5xx-sdk","version":"1.1.0","keywords":["error-tracking","monitoring","errors","logging","5xx"],"license":"MIT","_id":"5xx-sdk@1.1.0","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"homepage":"https://github.com/zweb38/5xx#readme","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"5b628d077129397ba78fa245d9d9ad62871772ec","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.1.0.tgz","fileCount":28,"integrity":"sha512-yu6CIHM768uaIl7JvfoT+kmisGW9eaTTBDO7v+mfu6qsm5KwK5rX0n13PDDtJEtrViow2sxhvmdVIz4fEmfAvw==","signatures":[{"sig":"MEYCIQDlSGHq6lRFgRPepv20lbrqQqggf9LPWLHUIniXEzUaggIhAKFMSp5OzavpFCngglBHQv4Hf1rtr+/tnr88Kfo5mY7b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":83447},"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"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"gitHead":"a9ec9123f46e250286489200ec1153105715354f","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"11.8.0","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/5xx-sdk_1.1.0_1770189267652_0.949821041639846","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"5xx-sdk","version":"1.2.0","keywords":["error-tracking","monitoring","errors","logging","5xx"],"license":"MIT","_id":"5xx-sdk@1.2.0","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"homepage":"https://github.com/zweb38/5xx#readme","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"99c47da4c0bc20ce9cf0a514ac657708ecac213a","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.2.0.tgz","fileCount":28,"integrity":"sha512-bUMcw+w4023LrpzXBrnQEIo9rJgHMgycizZ6SemTjkUi81tjmGIHduVawZhmgBM4dGuOxJmiiWxzOJMn7zpYBQ==","signatures":[{"sig":"MEYCIQCJxPxJBsBD4XjxPE8K2dxkrD9zqszUtq7RxCVp2hVF+wIhAMZKR3zB0XU1W4UK/a8+Hv1G+SdeK5qXg88yMdIdf2hK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":136089},"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"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"gitHead":"65b06e19aa2b5dac3a9d2af20e9b356728c1ac3a","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"11.8.0","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/5xx-sdk_1.2.0_1770198456043_0.6585920626735497","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"5xx-sdk","version":"1.3.0","keywords":["error-tracking","monitoring","errors","logging","5xx"],"license":"MIT","_id":"5xx-sdk@1.3.0","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"homepage":"https://github.com/zweb38/5xx#readme","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"c026ab812d2dde4ecb764bac6d1980c55283fc3d","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.3.0.tgz","fileCount":28,"integrity":"sha512-uNvRLTv0J8TWYgcvmJOzE24ygXIt0P7neWujXmJHTUi5aWATuORReA85ELcdCtbgyj3HVzsGto5wcJyVu6fpFA==","signatures":[{"sig":"MEQCIC6mdbGGH1VRTU/5g/lnWVB8QMWnIHAvLACROEyVRQeIAiAw7UxTdjNjeKcf/F71hI/c5DAgQPVlf0UJlr4RPduvPw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":146302},"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"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"gitHead":"7256782e04c77a3145b89c1919edfd4cb16eded6","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"11.8.0","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/5xx-sdk_1.3.0_1770300809719_0.352715026256454","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"5xx-sdk","version":"1.3.1","keywords":["error-tracking","monitoring","errors","logging","5xx"],"license":"MIT","_id":"5xx-sdk@1.3.1","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"homepage":"https://github.com/zweb38/5xx#readme","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"f07ac5edf60293f07f312227cfaeed5523ecfd13","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.3.1.tgz","fileCount":28,"integrity":"sha512-eL186r6FML3s/BTy6TqpnY8aJ7TDtSRbBS8gSq7LEfB3txPC9mXqPV8HeDV+BsJeFJCnU0mQ1W3rS44/+3azwA==","signatures":[{"sig":"MEQCICPWgfpGIWm/5xADED5B+8lG7JGutCvPE4ShlEfRtHTaAiBgAelcRAyrQgWrah+t9qkyHWu4MXYWmuJfElztWxRrCg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":147335},"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"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"gitHead":"037ab93c2511f7d5aa7526ff608daf688b64a279","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"11.8.0","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/5xx-sdk_1.3.1_1770380970584_0.021037570164476938","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"5xx-sdk","version":"1.4.0","keywords":["error-tracking","monitoring","errors","logging","5xx"],"license":"MIT","_id":"5xx-sdk@1.4.0","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"homepage":"https://github.com/zweb38/5xx#readme","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"0674642af2846ab75aa30e58aaf322bbd4e0e8b4","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.4.0.tgz","fileCount":28,"integrity":"sha512-V/el89Zd/7wNNDipdpg/VWt5YW70ryeHqR7F1aX6UGYRgdST4neQZcfAr2NE8jTX97OBrDKGewjyF1z2FLNoOQ==","signatures":[{"sig":"MEYCIQD9kY+5dURZHCEL2a02E2d7L5OTrulqs/x8E813OqKzdwIhAOFe/zG+IhoNwpRntXOHLAl4aHmYtjaGz3U/9iEzgY5X","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":160199},"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"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"gitHead":"9e57c9b12ad06f33d23c13c50d99fd6b5097eedc","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"11.8.0","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/5xx-sdk_1.4.0_1776612048111_0.8397529824652892","host":"s3://npm-registry-packages-npm-production"}},"1.4.1":{"name":"5xx-sdk","version":"1.4.1","keywords":["error-tracking","monitoring","errors","logging","5xx"],"license":"MIT","_id":"5xx-sdk@1.4.1","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"homepage":"https://github.com/zweb38/5xx#readme","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"f161ff028e2880f2b347488f0d77950f68b55855","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.4.1.tgz","fileCount":28,"integrity":"sha512-AC3m9Giw7q98GVmoD7TzOUkh5QucID79uVm93QMKQhlkz5ZIdHZUWOFDSqoeaNYqD2PIC4tTMj0bYpaP6cLZlw==","signatures":[{"sig":"MEQCIGrhT1hldZ4ETxqxBoO/epXjUn1zDRsXukkCoaM2lJ3VAiAwvjvsrXNVnBr4MWIOXwNgZzHTL3kp1yktBZrmaJ3cfg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":185783},"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"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"gitHead":"8398306d9aadbf87874ec2671f70ab5090bbb999","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"11.8.0","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/5xx-sdk_1.4.1_1777470174703_0.39854500412170224","host":"s3://npm-registry-packages-npm-production"}},"1.4.2":{"name":"5xx-sdk","version":"1.4.2","keywords":["error-tracking","monitoring","errors","logging","5xx"],"license":"MIT","_id":"5xx-sdk@1.4.2","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"homepage":"https://github.com/zweb38/5xx#readme","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"7972e2440c36feaccfdf01d45c85f7d681909d30","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.4.2.tgz","fileCount":28,"integrity":"sha512-w2PcBZaG4+1jIysvefRhpvPFNf8WT4ClUly8hHarbyNBvrgP41hF+PxqKLKtURq2MJhARmZRlwHuYp/nyoejvg==","signatures":[{"sig":"MEQCIAWbb+f5s9/bgxaje4khaUDICmtRoBjNp8kQYwfNFNpDAiB1X1acBRnE1SF5sqodtNTjcB2mvJGyHppDx7uW9A4RaA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186575},"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"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"gitHead":"5e5936bec58d12aac573fc7ec0b5306774347b2a","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"11.8.0","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"tmp":"tmp/5xx-sdk_1.4.2_1777477593686_0.8964054264272117","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"_id":"5xx-sdk@1.5.0","bugs":{"url":"https://github.com/zweb38/5xx/issues"},"dist":{"shasum":"d13fa31562a9e3499f7477cd5bef88f789108419","tarball":"https://registry.npmjs.org/5xx-sdk/-/5xx-sdk-1.5.0.tgz","fileCount":28,"integrity":"sha512-QH535+jWY+SYtDgY68Q5HfTFaw1Fp6Y+fw++ZhIZQvhyt4XoZVJGcELxeufw7hvECC95F/+Pxk0JzC8/8vkT+w==","signatures":[{"sig":"MEUCIQC/BqkxOlITTtRd1Q77GODRhlx7wfiZ+gMPjx1zwIVNaAIgJKouR9VJkbxzjfT6QGWmWpjS8NbvReFaaLHS4Pb07kc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDtC3jy6/AbDrToGExHdg5oqMI1LjKHQBs2mgESKeSFbAiEA2+vc7OC9XatYgD13i9gcN3KobEoVIHOsd2PCNfxy/QU="}],"unpackedSize":350178},"main":"dist/index.js","name":"5xx-sdk","_from":"file:/Users/zakgwyther/5xx-sdk-1.5.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./node":{"types":"./dist/node.d.ts","import":"./dist/node.mjs","require":"./dist/node.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.mjs","require":"./dist/browser.js"}},"license":"MIT","scripts":{"build":"tsup","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"version":"1.5.0","_npmUser":{"name":"zcrypto","email":"zcrypto8888@gmail.com"},"homepage":"https://github.com/zweb38/5xx#readme","keywords":["error-tracking","monitoring","errors","logging","5xx"],"_resolved":"/Users/zakgwyther/5xx-sdk-1.5.0.tgz","_integrity":"sha512-QH535+jWY+SYtDgY68Q5HfTFaw1Fp6Y+fw++ZhIZQvhyt4XoZVJGcELxeufw7hvECC95F/+Pxk0JzC8/8vkT+w==","repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"_npmVersion":"11.11.1","description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","directories":{},"maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"_nodeVersion":"25.8.2","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.6.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/5xx-sdk_1.5.0_1790442957559_0.37154874026179474"}}},"time":{"created":"2026-01-27T07:51:53.314Z","modified":"2026-09-26T17:15:57.830Z","1.0.0":"2026-01-27T07:51:53.458Z","1.1.0":"2026-02-04T07:14:27.799Z","1.2.0":"2026-02-04T09:47:36.187Z","1.3.0":"2026-02-05T14:13:29.872Z","1.3.1":"2026-02-06T12:29:30.710Z","1.4.0":"2026-04-19T15:20:48.288Z","1.4.1":"2026-04-29T13:42:54.856Z","1.4.2":"2026-04-29T15:46:33.831Z","1.5.0":"2026-09-26T17:15:57.675Z"},"bugs":{"url":"https://github.com/zweb38/5xx/issues"},"license":"MIT","homepage":"https://github.com/zweb38/5xx#readme","keywords":["error-tracking","monitoring","errors","logging","5xx"],"repository":{"url":"git+https://github.com/zweb38/5xx.git","type":"git"},"description":"Lightweight error tracking SDK for JavaScript/TypeScript applications","maintainers":[{"name":"zcrypto","email":"zcrypto8888@gmail.com"}],"readme":"# 5xx-sdk\n\nLightweight error tracking and analytics SDK for JavaScript/TypeScript applications.\n\n## Installation\n\n```bash\nnpm install 5xx-sdk\n```\n\nOr copy the SDK files directly into your project.\n\n## Quick Start\n\n### Browser\n\n```typescript\nimport { FiveXXBrowser } from '5xx-sdk/browser';\n\nconst fivexx = new FiveXXBrowser({\n  apiKey: 'your-api-key',\n  endpoint: 'https://your-5xx-instance.com',\n});\n\n// Enable automatic capture of unhandled errors\nfivexx.enableAutoCapture();\n\n// Enable analytics (page views, visitor tracking, SPA navigation)\nfivexx.enableAnalytics();\n\n// Set user context (optional)\nfivexx.setUser({\n  id: 'user-123',\n  email: 'user@example.com',\n});\n\n// Manual error capture\ntry {\n  riskyOperation();\n} catch (error) {\n  fivexx.captureError(error, { context: 'checkout' });\n}\n\n// Track custom events\nfivexx.trackEvent('signup_completed', { plan: 'pro' });\n```\n\n### Node.js\n\n```typescript\nimport { FiveXXNode } from '5xx-sdk/node';\n\nconst fivexx = new FiveXXNode({\n  apiKey: 'your-api-key',\n  endpoint: 'https://your-5xx-instance.com',\n  exitOnFatalError: true,\n});\n\n// Enable automatic capture of uncaught exceptions\nfivexx.enableAutoCapture();\n\n// Wrap route handlers for automatic error capture (recommended)\n// Works with Next.js, Express, Fastify, and any framework\nexport const GET = fivexx.wrapHandler(async (req: NextRequest) => {\n  const data = await db.user.findMany();\n  return NextResponse.json(data);\n});\n\n// Wrap async functions\nconst wrappedFn = fivexx.wrapAsync(async () => {\n  await someAsyncOperation();\n});\n\n// Manual capture\nfivexx.captureError(new Error('Something went wrong'), {\n  userId: '123',\n  requestId: 'abc',\n});\n\n// Custom events from server code (queued, sent within 5 seconds)\nfivexx.trackEvent('invoice_sent', { reason: 'renewal' });\nawait fivexx.flushEvents(); // before a serverless handler returns or the process exits\n```\n\n### Universal (works in both environments)\n\n```typescript\nimport { FiveXX } from '5xx-sdk';\n\nconst fivexx = new FiveXX({\n  apiKey: 'your-api-key',\n  endpoint: 'https://your-5xx-instance.com',\n});\n\n// Manual capture only\nfivexx.captureError(new Error('Something went wrong'));\nfivexx.captureMessage('User performed invalid action');\n```\n\n## API\n\n### FiveXX (Base Client)\n\n```typescript\nnew FiveXX(options: FiveXXOptions)\n\ninterface FiveXXOptions {\n  apiKey: string;      // Your project's API key\n  endpoint: string;    // Your 5xx instance URL\n  environment?: string; // Deprecated: ignored by the server (see below)\n}\n```\n\n**Environment is a project setting.** The server stamps every error with the project's own environment (set in the project's settings, `\"production\"` by default) and ignores the `environment` value in the payload, so it has no effect on stored errors or on grouping. `environment` and `setEnvironment()` are deprecated: they still compile and are still sent for compatibility, and will be removed in SDK 2.0. The browser client's `\"development\"` default on localhost and the Node client's `NODE_ENV` default have no server-side effect either. To separate staging from production, create one project per environment and give each deployment that project's API key.\n\n**Methods:**\n- `setEnvironment(env: string)` - Deprecated, no server-side effect (environment is a project setting)\n- `setUser(user: User | null)` - Set user context for errors\n- `captureError(error: Error, metadata?: object)` - Capture an error\n- `captureMessage(message: string, metadata?: object)` - Capture a message\n\n### FiveXXBrowser\n\nExtends FiveXX with browser-specific features.\n\n**Additional Methods:**\n- `enableAutoCapture()` - Auto-capture `window.onerror` and `unhandledrejection`\n- `disableAutoCapture()` - Disable auto-capture\n- `enableAnalytics()` - Enable page view tracking, SPA navigation, and visitor analytics\n- `trackEvent(name: string, metadata?: object)` - Track a custom event. Before `enableAnalytics()` the event is dropped with a one-time console warning (analytics is opt-in, so nothing is buffered before it)\n\n**Analytics behaviour:**\n- Opt-in via `enableAnalytics()` — does not affect error tracking\n- Automatically tracks page views on load\n- SPA support: patches `pushState`/`replaceState` and listens for `popstate`\n- Batches analytics beacons and sends every 5 seconds\n- Uses `navigator.sendBeacon()` on page unload to prevent data loss, sending at most 60,000 UTF-8 bytes per flush (the browser's beacon quota is 64 KiB, shared by in-flight requests); anything over stays buffered for the next flush\n- Strips query params from URLs (keeps UTM params: `utm_source`, `utm_medium`, `utm_campaign`, and `ref`)\n- Privacy-friendly: no cookies, no fingerprinting. Visitor ID is derived server-side from IP + user agent + daily rotating salt\n- No session analytics: visitors are daily uniques, not sessions. Versions up to 1.4.2 also sent a random per-page-load `sessionId` with every batch; the server never stored it, so it was removed from the payload (the ingest endpoint still accepts and ignores it from older SDKs). `AnalyticsBatchPayload.sessionId` remains as a deprecated optional type until 2.0\n- Custom events (since 1.5.0; before that `trackEvent` only logged to the console and sent nothing): buffered with the page views, tagged with the current path, and sent in the same batches, including the `sendBeacon` flush on hide/unload, whose next beacon resends first the events of any request still pending (same ids, stored once). See [Custom events](#custom-events)\n- A batch the server rejects with a 4xx other than 429 (bad key, disallowed origin, invalid payload) is dropped rather than retried forever; network errors, 429 and 5xx keep it queued for the next flush\n- No screen-size analytics: versions up to 1.4.2 also sent `screenWidth` (`window.innerWidth`) with every page view; no analytics view read it, so it is no longer collected or stored (the endpoint still accepts and ignores it from older SDKs). `AnalyticsBeacon.screenWidth` remains as a deprecated optional type until 2.0\n\n### FiveXXNode\n\nExtends FiveXX with Node.js-specific features.\n\n**Constructor Options:**\n- `exitOnFatalError?: boolean` - Exit process after fatal errors (default: true). Queued custom events get up to 2 seconds to flush before the exit\n\n**Additional Methods:**\n- `enableAutoCapture()` - Auto-capture `uncaughtException` and `unhandledRejection`\n- `wrapHandler(fn)` - Wrap HTTP route handlers to automatically capture errors (recommended for Next.js, Express, Fastify)\n- `wrapAsync(fn, metadata?)` - Wrap any async function to capture errors\n- `trackEvent(name: string, metadata?: object)` - Track a custom event from server code (since 1.5.0). Queued and POSTed within 5 seconds, or as soon as 50 are queued; no `enableAnalytics()` step. After a 429, 5xx or any network failure (a refused or reset connection, the 3-second timeout), the batch stays queued and resends back off: `Retry-After` when the server sends one (up to an hour), otherwise 5 seconds doubling to 5 minutes, jittered. The server derives the \"visitor\" from the server's own IP and user agent, so put any user identity you need in metadata\n- `flushEvents(): Promise<void>` - Send every queued custom event now, even while backing off. Never rejects. Await it before the process exits (serverless handlers, shutdown hooks), or queued events are lost\n\n## Custom events\n\n```typescript\nfivexx.trackEvent('voice_session_ended', { reason: 'timeout', seconds: 42 });\n```\n\n- `name` loses control characters and surrounding whitespace and is cut to 100 characters; an empty name is ignored with a warning\n- `metadata` must be a plain JSON object of at most 2,048 characters when serialized. It is snapshotted at call time; anything else (an array, a cycle, a BigInt, something larger) is dropped with a warning and the event is sent without it\n- Unpaired UTF-16 surrogates (half an emoji left by `slice()`) in the name, the path or any metadata key or string are replaced with U+FFFD before sending; the server does the same\n- Events go to `POST /api/analytics` with the project API key, alongside page views (`customEvents` in the batch), so the project's domain whitelist, bot filtering and analytics rate limit apply to them too. The Node client sends the User-Agent `5xx-sdk-node/<version>`, which the server's bot filter lets through for batches with no page views (a batch that contains page views is bot-filtered whatever its User-Agent), and no Origin header (accepted on the API key alone, like any server-side request)\n- Read them back with `GET /api/analytics/events?projectId=…&period=7d` (counts per event name per UTC day; `breakdown=reason` adds per-value counts of the `reason` metadata key, the only key broken down) or page the raw events with `GET /api/export/events`. Raw events are kept 30 days (except days skipped after repeated rollup failures); after that only the daily counts remain\n- Up to 500 events are queued while the server is unreachable; newer ones are dropped with a warning\n- Each event gets a random `id` when `trackEvent` is called and keeps it on every retry and beacon; the server stores one event per `id`, so a batch resent after a lost response is not counted twice. Payloads without an `id` (hand-rolled callers) are stored at least once\n\n## Metadata\n\nYou can attach any metadata to errors:\n\n```typescript\nfivexx.captureError(error, {\n  userId: 'user-123',\n  requestId: 'req-456',\n  action: 'checkout',\n  cart: { items: 3, total: 99.99 },\n});\n```\n\nThe SDK automatically includes:\n- User context (if set via `setUser()`)\n- Browser: URL, user agent\n- Node.js: Node version, platform, PID\n\n## Domain Whitelisting\n\nIf your 5xx project has allowed domains configured, the SDK sends an `Origin` header with each request. Requests from unlisted origins are rejected with 403. Server-side (Node.js) requests have no `Origin` header and rely on API key authentication only.\n","readmeFilename":"README.md"}