@bugspotter/sdk 0.2.5-alpha.5 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +11 -0
- package/CHANGELOG.md +81 -149
- package/dist/bugspotter.min.js +1 -1
- package/dist/capture/console.d.ts +1 -0
- package/dist/capture/console.js +17 -4
- package/dist/capture/network.d.ts +6 -0
- package/dist/capture/network.js +12 -2
- package/dist/capture/screenshot.js +3 -2
- package/dist/core/buffer.js +2 -1
- package/dist/core/bug-reporter.js +16 -5
- package/dist/core/circular-buffer.js +4 -1
- package/dist/core/compress.js +2 -1
- package/dist/core/file-upload-handler.js +5 -2
- package/dist/core/offline-queue.js +5 -2
- package/dist/core/transport.js +4 -2
- package/dist/core/upload-helpers.js +3 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.js +16889 -44
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +3 -1
- package/dist/utils/sanitize-patterns.js +15 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/widget/components/form-validator.js +2 -1
- package/dist/widget/components/style-manager.d.ts +17 -0
- package/dist/widget/components/style-manager.js +318 -108
- package/dist/widget/components/template-manager.js +2 -1
- package/dist/widget/modal.js +11 -4
- package/eslint.config.js +89 -0
- package/package.json +28 -14
- package/rollup.config.js +25 -0
package/.prettierrc
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -5,176 +5,108 @@ All notable changes to the BugSpotter SDK will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.
|
|
8
|
+
## [0.3.1] - 2026-01-13
|
|
9
9
|
|
|
10
|
+
### Added
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Features
|
|
19
|
-
|
|
20
|
-
* add upload progress feedback and screenshot proxy endpoint ([#565](https://github.com/apexbridge-tech/bugspotter/issues/565)) ([d0dd05f](https://github.com/apexbridge-tech/bugspotter/commit/d0dd05f96b6006af8f98ae9aab25ad82758bd80f))
|
|
21
|
-
|
|
22
|
-
## [0.2.3-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.2.2-alpha.5...sdk-v0.2.3-alpha.5) (2026-01-03)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Features
|
|
26
|
-
|
|
27
|
-
* release SDK 0.3.0 with duplicate prevention system ([#532](https://github.com/apexbridge-tech/bugspotter/issues/532)) ([c61b8c8](https://github.com/apexbridge-tech/bugspotter/commit/c61b8c8e9ed99d0ef9b95e7422ed82b41a93a561))
|
|
28
|
-
|
|
29
|
-
## [0.2.2-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.2.1-alpha.5...sdk-v0.2.2-alpha.5) (2025-11-24)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Features
|
|
33
|
-
|
|
34
|
-
* **sdk:** Add mouse event sampling settings support ([#313](https://github.com/apexbridge-tech/bugspotter/issues/313)) ([dd49bd0](https://github.com/apexbridge-tech/bugspotter/commit/dd49bd0fba99be1b3c6043669c9df8c4ae04f8c9))
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Bug Fixes
|
|
38
|
-
|
|
39
|
-
* **ci:** auto-format CHANGELOG in release-please PRs ([#300](https://github.com/apexbridge-tech/bugspotter/issues/300)) ([35a5541](https://github.com/apexbridge-tech/bugspotter/commit/35a5541450d75029964d060587784682f2ac3613))
|
|
40
|
-
|
|
41
|
-
## [0.2.1-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.2.0-alpha.5...sdk-v0.2.1-alpha.5) (2025-11-21)
|
|
42
|
-
|
|
43
|
-
### Bug Fixes
|
|
44
|
-
|
|
45
|
-
- **test:** load rrweb from CDN for replay verification ([#297](https://github.com/apexbridge-tech/bugspotter/issues/297)) ([cbd575f](https://github.com/apexbridge-tech/bugspotter/commit/cbd575f4ab50da7b81df5be13d8a48fd48f391e6))
|
|
46
|
-
|
|
47
|
-
### Documentation
|
|
48
|
-
|
|
49
|
-
- **sdk:** update README to mention session replay feature ([#298](https://github.com/apexbridge-tech/bugspotter/issues/298)) ([28535c2](https://github.com/apexbridge-tech/bugspotter/commit/28535c2cf9df4deaebb96a92a4503a7371813142))
|
|
50
|
-
|
|
51
|
-
## [0.2.0-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.1.3-alpha.5...sdk-v0.2.0-alpha.5) (2025-11-21)
|
|
52
|
-
|
|
53
|
-
### ⚠ BREAKING CHANGES
|
|
54
|
-
|
|
55
|
-
- **sdk:** BugSpotter.init() is now async and returns Promise<BugSpotter>. All callers must use `await BugSpotter.init(config)` instead of `BugSpotter.init(config)`. This change enables fetching replay quality settings from the backend before SDK initialization.
|
|
56
|
-
|
|
57
|
-
### Features
|
|
58
|
-
|
|
59
|
-
- **sdk:** add backend-controlled replay settings support ([#290](https://github.com/apexbridge-tech/bugspotter/issues/290)) ([0ea7c3b](https://github.com/apexbridge-tech/bugspotter/commit/0ea7c3b1ab456def3fd37c26bca6cf70da0f3ff9))
|
|
60
|
-
|
|
61
|
-
## [0.1.3-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.1.2-alpha.5...sdk-v0.1.3-alpha.5) (2025-11-13)
|
|
62
|
-
|
|
63
|
-
### Tests
|
|
12
|
+
- Node.js 22 LTS support for long-term stability
|
|
13
|
+
- pnpm 9.15.0 integration with improved dependency resolution
|
|
14
|
+
- Cross-browser E2E test suite (Chromium, Firefox, WebKit)
|
|
15
|
+
- Enhanced CI/CD pipeline with better error handling
|
|
16
|
+
- CDN deployment support in release workflow
|
|
64
17
|
|
|
65
|
-
|
|
18
|
+
### Changed
|
|
66
19
|
|
|
67
|
-
|
|
20
|
+
- Updated Firefox large DOM test timeout from 35s to 45s for better compatibility
|
|
21
|
+
- Improved ESLint configuration for test environments
|
|
22
|
+
- Better handling of runtime-injected globals in type checking
|
|
68
23
|
|
|
69
|
-
###
|
|
24
|
+
### Fixed
|
|
70
25
|
|
|
71
|
-
-
|
|
26
|
+
- Resolved pnpm version conflict between CI config and package.json
|
|
27
|
+
- Fixed E2E test timeouts for slower browser environments
|
|
28
|
+
- Corrected TypeScript type definitions for test mocks
|
|
72
29
|
|
|
73
|
-
## [0.
|
|
30
|
+
## [0.3.0] - 2025-12-20
|
|
74
31
|
|
|
75
|
-
###
|
|
32
|
+
### Added
|
|
76
33
|
|
|
77
|
-
- **
|
|
34
|
+
- **Duplicate Prevention System**: Automatic detection and prevention of duplicate bug reports
|
|
35
|
+
- **Backend-Controlled Replay Settings**: Dynamic replay configuration from server
|
|
36
|
+
- **Upload Progress Feedback**: Real-time progress indication for file uploads
|
|
37
|
+
- **Screenshot Proxy Endpoint**: Server-side screenshot proxy support
|
|
38
|
+
- **SDK Internal Log Filtering**: Automatic exclusion of SDK's own logs from reports
|
|
78
39
|
|
|
79
|
-
|
|
40
|
+
### Changed
|
|
80
41
|
|
|
81
|
-
|
|
42
|
+
- BugSpotter.init() is now async (returns Promise<BugSpotter>)
|
|
43
|
+
- Improved transport layer architecture
|
|
44
|
+
- Enhanced offline queue management
|
|
82
45
|
|
|
83
|
-
|
|
84
|
-
- add FloatingButton widget and fix UMD exports ([b7e170e](https://github.com/apexbridge-tech/bugspotter/commit/b7e170eea47c7883722e59038a0d16b911c59588))
|
|
85
|
-
- add FloatingButton widget with refactored architecture ([87a3d0e](https://github.com/apexbridge-tech/bugspotter/commit/87a3d0e69cea86db01e2847323440f296f045b16))
|
|
86
|
-
- add gzip compression reducing payloads by 70-90% ([489e182](https://github.com/apexbridge-tech/bugspotter/commit/489e182ea072e3ffc43b58700b60288f6a255c22))
|
|
87
|
-
- add gzip compression reducing payloads by 70-90% ([c545acf](https://github.com/apexbridge-tech/bugspotter/commit/c545acf6fe9a973c74a54f63a560b4fd96465e83))
|
|
88
|
-
- add screenshot capture with html-to-image ([fae3eb7](https://github.com/apexbridge-tech/bugspotter/commit/fae3eb70fbf52d5b7c217f4d6d001735b661159d))
|
|
89
|
-
- add session replay with rrweb ([175bd74](https://github.com/apexbridge-tech/bugspotter/commit/175bd74765d7f49b4be681c02eae0d7bbe8b1bc4))
|
|
90
|
-
- add type safety system with shared types, Zod validation, and contract tests ([a3e436a](https://github.com/apexbridge-tech/bugspotter/commit/a3e436a931abda2cf30c85b32e5af2e011b7b3d9))
|
|
91
|
-
- complete BugSpotter v0.1.0 with full documentation ([651153b](https://github.com/apexbridge-tech/bugspotter/commit/651153b2d4c86b9653df6164539991ea92c41942))
|
|
92
|
-
- complete core SDK with all capture modules ([54fe97a](https://github.com/apexbridge-tech/bugspotter/commit/54fe97af32b2ee1aa09f5657b28b89e40454cb0a))
|
|
93
|
-
- fixed bug in NetworkCapture + eslint + prettier ([75e2d92](https://github.com/apexbridge-tech/bugspotter/commit/75e2d9290d82ea3f9b377e3b189ce933f7e3e336))
|
|
94
|
-
- initial project structure ([7109dc2](https://github.com/apexbridge-tech/bugspotter/commit/7109dc2e284ea8692081965e4b5a9cce4dc1b1e0))
|
|
95
|
-
- **sdk:** bump to 0.1.0-alpha.5 with improved release workflow ([#219](https://github.com/apexbridge-tech/bugspotter/issues/219)) ([a191b7b](https://github.com/apexbridge-tech/bugspotter/commit/a191b7b998863f00df4bd24f529057e4c4160a73))
|
|
96
|
-
- vitest configured + unit tests for capture ([381d11e](https://github.com/apexbridge-tech/bugspotter/commit/381d11e8ea45376c56ded0d62c2c37a726002acf))
|
|
46
|
+
## [0.2.0] - 2025-11-21
|
|
97
47
|
|
|
98
|
-
###
|
|
48
|
+
### Added
|
|
99
49
|
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
- **
|
|
50
|
+
- **Session Replay**: Recording with rrweb (configurable buffer duration up to 30s)
|
|
51
|
+
- **Mouse Event Sampling**: Configurable intervals for mouse tracking
|
|
52
|
+
- **Comprehensive E2E Tests**: Full test suite with Playwright (Chromium, Firefox, WebKit)
|
|
53
|
+
- **Shadow DOM Support**: Complete replay capture for Shadow DOM content
|
|
54
|
+
- **Type Safety Enhancements**: Improved Zod validation and type definitions
|
|
103
55
|
|
|
104
|
-
###
|
|
56
|
+
### Changed
|
|
105
57
|
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
- optimize demo & documentation structure ([22c2171](https://github.com/apexbridge-tech/bugspotter/commit/22c21712229f19b1280d1406c2fac60655d41c4a))
|
|
110
|
-
- Phase 2 - Extract shared capture architecture ([48d007c](https://github.com/apexbridge-tech/bugspotter/commit/48d007cecfc4651ded10a8c7fd4651fcec499fbd))
|
|
111
|
-
- Phase 2 - Extract shared capture architecture ([ea88dda](https://github.com/apexbridge-tech/bugspotter/commit/ea88dda3cdbb07d72f96d707a3ebb97edf93379c))
|
|
112
|
-
- Phase 2 - Extract shared capture architecture ([72f2425](https://github.com/apexbridge-tech/bugspotter/commit/72f242575c46c3c813bf15234ca95d5624b7d7d4))
|
|
113
|
-
- remove deprecated code and unused variables ([392bbb9](https://github.com/apexbridge-tech/bugspotter/commit/392bbb9c91e3d57a49b9650782b778aea9607d50))
|
|
58
|
+
- Refactored capture classes with better options and performance
|
|
59
|
+
- Improved transport and offline queue architecture
|
|
60
|
+
- Enhanced error handling in retry logic
|
|
114
61
|
|
|
115
|
-
###
|
|
62
|
+
### Fixed
|
|
116
63
|
|
|
117
|
-
-
|
|
64
|
+
- Content-Type header removal from presigned URL uploads (fixed 403 errors)
|
|
65
|
+
- rrweb CDN loading for reliable replay verification
|
|
66
|
+
- Release workflow prerelease tag support
|
|
118
67
|
|
|
119
68
|
## [0.1.0] - 2025-11-01
|
|
120
69
|
|
|
121
70
|
### Added
|
|
122
71
|
|
|
123
|
-
|
|
124
|
-
- Screenshot
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
|
|
72
|
+
#### Core Capture Features
|
|
73
|
+
- **Screenshot Capture**: Full-page screenshots with CSP-safe html-to-image library
|
|
74
|
+
- **Console Logging**: Capture all console messages with stack traces
|
|
75
|
+
- **Network Tracking**: Monitor all HTTP requests (fetch/XHR) with timing
|
|
76
|
+
- **Browser Metadata**: Automatic detection of browser, OS, viewport
|
|
77
|
+
- **DOM Capture**: Complete DOM structure preservation
|
|
78
|
+
|
|
79
|
+
#### Data Protection & Privacy
|
|
80
|
+
- **PII Sanitization**: Automatic detection and redaction of sensitive data
|
|
130
81
|
- Built-in patterns: email, phone, credit card, SSN, IIN, IP address
|
|
131
|
-
- Custom pattern support
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
- **
|
|
149
|
-
- **
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
- 345 tests (unit + E2E + Playwright)
|
|
163
|
-
- Full test coverage for core functionality
|
|
164
|
-
|
|
165
|
-
## [Unreleased]
|
|
166
|
-
|
|
167
|
-
### Planned Features
|
|
168
|
-
|
|
169
|
-
- Real-time error tracking
|
|
170
|
-
- Performance monitoring
|
|
171
|
-
- User session tracking
|
|
172
|
-
- Custom event tracking
|
|
173
|
-
- Source map support
|
|
174
|
-
- Analytics dashboard integration
|
|
175
|
-
- Webhooks support
|
|
176
|
-
- Additional integrations (Slack, Discord, Email)
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
[0.1.0]: https://github.com/apexbridge-tech/bugspotter/releases/tag/sdk-v0.1.0
|
|
82
|
+
- Custom regex pattern support
|
|
83
|
+
- Per-element CSS selector-based exclusion
|
|
84
|
+
- **Content Security Policy (CSP) Compliant**: No eval, no inline scripts
|
|
85
|
+
|
|
86
|
+
#### Reliability & Performance
|
|
87
|
+
- **Compression**: gzip compression reduces payloads by 70-90%
|
|
88
|
+
- **Direct Upload**: Presigned URL uploads with 97% memory reduction vs base64
|
|
89
|
+
- **Offline Queue**: Store and sync bug reports when network unavailable
|
|
90
|
+
- **Exponential Backoff**: Intelligent retry strategy with configurable delays
|
|
91
|
+
- **Circular Buffering**: Efficient memory usage for long-running sessions
|
|
92
|
+
|
|
93
|
+
#### User Interface
|
|
94
|
+
- **Floating Widget Button**: Customizable position (corner/edge), styling, and icon
|
|
95
|
+
- **Bug Report Modal**: User-friendly form with validation for manual submission
|
|
96
|
+
- **Responsive Design**: Optimized for both desktop and mobile viewports
|
|
97
|
+
|
|
98
|
+
#### Authentication & Integration
|
|
99
|
+
- **Multiple Auth Types**: API Key, Bearer token, custom headers
|
|
100
|
+
- **Framework Agnostic**: Works with vanilla JavaScript and all major frameworks
|
|
101
|
+
|
|
102
|
+
#### Module Formats & TypeScript
|
|
103
|
+
- **ESM, CommonJS, UMD**: Support for all modern module systems
|
|
104
|
+
- **TypeScript Support**: Full type definitions with proper generic types
|
|
105
|
+
- **Source Maps**: Included for debugging and production support
|
|
106
|
+
|
|
107
|
+
#### Documentation
|
|
108
|
+
- Complete API reference with examples
|
|
109
|
+
- Framework integration guides (React, Vue, Angular, Next.js, Nuxt, Svelte)
|
|
110
|
+
- Session replay configuration and best practices
|
|
111
|
+
- PII sanitization customization guide
|
|
112
|
+
- Direct upload implementation guide
|