Commit 0f3dfe2
committed
Scope dd_debugger source override to URL building only
The previous commit (09376b1) widened `TransportConfiguration.source`
to `TransportSource` so the `dd_debugger` override could ride through
it. That forced `Configuration` to redeclare `source: SdkSource` to
narrow the inherited type back down for consumers like
`defaultContext.ts` (where `RumEvent.source` does not accept
`dd_debugger`), and it required overload signatures on
`computeTransportConfiguration` to preserve that narrowing at the
return-type boundary.
None of that is actually necessary: nothing reads `source` off a
`TransportConfiguration` outside of `validateAndBuildConfiguration`
spreading it into `Configuration`. The override only needs to reach the
endpoint builders so the `ddsource` URL parameter gets the right value.
Keep the override strictly internal to URL building:
- `TransportConfiguration.source` is back to `SdkSource`, matching its
pre-09376b12b shape.
- `computeTransportConfiguration` drops the overload pair and exposes a
single signature with optional `sourceOverride`.
- The override is plumbed into `ResolvedSourceInitConfiguration` and
flows to the endpoint builders, but the returned struct's `source`
is always the validated `SdkSource`.
- The redundant `source: SdkSource` redeclaration on `Configuration`
is removed.
Wire behavior is unchanged: URLs still go out with
`?ddsource=dd_debugger&...&dd-evp-origin=browser`.1 parent 0ee8b66 commit 0f3dfe2
2 files changed
Lines changed: 12 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
| |||
Lines changed: 12 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
41 | 40 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
52 | 44 | | |
53 | 45 | | |
54 | | - | |
| 46 | + | |
| 47 | + | |
55 | 48 | | |
56 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
| |||
0 commit comments