@dronedeploy/rocos-js-sdk 3.1.0 → 3.1.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/cjs/api/streams/telemetry/TelemetryStreamConnect.js +6 -0
- package/cjs/models/IRocosSDKConfig.d.ts +1 -0
- package/cjs/models/IStreamConfig.d.ts +1 -0
- package/cjs/services/TelemetryService.js +1 -0
- package/esm/api/streams/telemetry/TelemetryStreamConnect.js +6 -0
- package/esm/models/IRocosSDKConfig.d.ts +1 -0
- package/esm/models/IStreamConfig.d.ts +1 -0
- package/esm/services/TelemetryService.js +1 -0
- package/package.json +1 -1
|
@@ -30,6 +30,12 @@ class TelemetryStreamConnect extends TelemetryStreamAbstract_1.TelemetryStreamAb
|
|
|
30
30
|
// payloads containing control characters (verified against a live robot on dev) and is
|
|
31
31
|
// less efficient. Binary is required for correctness here.
|
|
32
32
|
useBinaryFormat: true,
|
|
33
|
+
// Optional caller-supplied fetch. Pass a reference captured before page-level instrumentation
|
|
34
|
+
// (e.g. Datadog RUM) monkey-patches `window.fetch`: RUM clones and reads every fetch response
|
|
35
|
+
// to measure timing, and on this long-lived server-stream that clone-read stalls connect-web's
|
|
36
|
+
// read (stream connects 200 but yields no frames). When omitted, connect-web uses the global
|
|
37
|
+
// fetch. See docs/connect-rpc-investigation.md.
|
|
38
|
+
...(config.fetch ? { fetch: config.fetch } : {}),
|
|
33
39
|
});
|
|
34
40
|
this.client = (0, connect_1.createClient)(teletubby_pb_1.TelemetryGateway, transport);
|
|
35
41
|
}
|
|
@@ -164,6 +164,7 @@ class TelemetryService extends BaseStreamService_1.BaseStreamService {
|
|
|
164
164
|
port: this.config.port,
|
|
165
165
|
insecure: this.config.insecure,
|
|
166
166
|
transport: this.config.transport,
|
|
167
|
+
fetch: this.config.fetch,
|
|
167
168
|
});
|
|
168
169
|
if (!newStream.isNew) {
|
|
169
170
|
newStream.stream.statusStream$.subscribe((msg) => {
|
|
@@ -27,6 +27,12 @@ export class TelemetryStreamConnect extends TelemetryStreamAbstract {
|
|
|
27
27
|
// payloads containing control characters (verified against a live robot on dev) and is
|
|
28
28
|
// less efficient. Binary is required for correctness here.
|
|
29
29
|
useBinaryFormat: true,
|
|
30
|
+
// Optional caller-supplied fetch. Pass a reference captured before page-level instrumentation
|
|
31
|
+
// (e.g. Datadog RUM) monkey-patches `window.fetch`: RUM clones and reads every fetch response
|
|
32
|
+
// to measure timing, and on this long-lived server-stream that clone-read stalls connect-web's
|
|
33
|
+
// read (stream connects 200 but yields no frames). When omitted, connect-web uses the global
|
|
34
|
+
// fetch. See docs/connect-rpc-investigation.md.
|
|
35
|
+
...(config.fetch ? { fetch: config.fetch } : {}),
|
|
30
36
|
});
|
|
31
37
|
this.client = createClient(TelemetryGateway, transport);
|
|
32
38
|
}
|
|
@@ -161,6 +161,7 @@ export class TelemetryService extends BaseStreamService {
|
|
|
161
161
|
port: this.config.port,
|
|
162
162
|
insecure: this.config.insecure,
|
|
163
163
|
transport: this.config.transport,
|
|
164
|
+
fetch: this.config.fetch,
|
|
164
165
|
});
|
|
165
166
|
if (!newStream.isNew) {
|
|
166
167
|
newStream.stream.statusStream$.subscribe((msg) => {
|