You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add User-Agent header to all HTTP requests (DIS-41) (#34)
* feat: add User-Agent header to all HTTP requests (DIS-41)
Add User-Agent: opensea-cli/<version> header to all requests made by
OpenSeaClient. Version is dynamically read from package.json using
createRequire. Updates both get() and post() methods and corresponding
test assertions.
Co-Authored-By: Chris K <ckorhonen@gmail.com>
* fix: use stricter semver regex in User-Agent test assertions
Co-Authored-By: Chris K <ckorhonen@gmail.com>
* refactor: use build-time version injection instead of createRequire
Replace the runtime createRequire/package.json pattern with tsup's
define option for compile-time version injection. Also anchors the
test regex with $ to prevent false-positive matches.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: address review feedback (DIS-41)
- Replace createRequire with build-time __VERSION__ via tsup define
- Add __VERSION__ define to vitest config for test compatibility
- Anchor test regex with $ to prevent matching malformed versions
- Extract private defaultHeaders getter to reduce header duplication
Co-Authored-By: Chris K <ckorhonen@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments