Repository navigation
Commit f430f9d
feat(toolkit-core): Share the API transport with the CLI
Move the CLI's request loop from sentry-client.ts into
@sentry/toolkit-core/api-transport: the Authorization header, the 401
refresh (any method, once), per-attempt timeouts, retries through
api-retry, request-body replay, validated redirect following with
origin provenance, and GET cache lookup, revalidation, storage, and
post-write invalidation. The host injects a CredentialProvider, header
rules, a cache, its error classes, a logger, and a span hook, so the
module stays free of Node APIs.
The CLI now configures the transport with its stored credentials,
host-scope checks, disk cache, telemetry span, and error classes.
Implements #1669 tasks 5.1 and 5.2.
Co-Authored-By: BYK <burak.kaya@sentry.io>1 parent 6b5c859 commit f430f9d
7 files changed
Lines changed: 1559 additions & 893 deletions
File tree
- docs/contributing
- packages
- cli/src/lib
- toolkit-core
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 6 | + | |
0 commit comments