@dronedeploy/rocos-js-sdk 3.0.30 → 3.1.0
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/caller/CallerStreamAbstract.js +1 -2
- package/cjs/api/streams/caller/CallerStreamNode.js +18 -8
- package/cjs/api/streams/command/CommandStreamNode.js +17 -7
- package/cjs/api/streams/control/ControlStreamNode.js +17 -7
- package/cjs/api/streams/fileAccessor/FileAccessorStreamNode.js +17 -7
- package/cjs/api/streams/search/SearchStreamNode.js +17 -7
- package/cjs/api/streams/telemetry/TelemetryStream.js +1 -0
- package/cjs/api/streams/telemetry/TelemetryStreamConnect.d.ts +26 -0
- package/cjs/api/streams/telemetry/TelemetryStreamConnect.js +145 -0
- package/cjs/api/streams/telemetry/TelemetryStreamNode.js +18 -9
- package/cjs/grpc/conker_pb.grpc-client.js +17 -7
- package/cjs/grpc/connect/teletubby_pb.d.ts +635 -0
- package/cjs/grpc/connect/teletubby_pb.js +196 -0
- package/cjs/grpc/filagree_pb.grpc-client.js +17 -7
- package/cjs/grpc/pigeon_pb.grpc-client.js +17 -7
- package/cjs/grpc/rambo.v1_pb.grpc-client.js +17 -7
- package/cjs/grpc/serviette.v1_pb.grpc-client.js +17 -7
- package/cjs/grpc/slowlane_pb.grpc-client.js +17 -7
- package/cjs/grpc/teletubby_pb.grpc-client.js +17 -7
- package/cjs/helpers/callerMessageHelpers.js +2 -3
- package/cjs/helpers/flattenOneOf.js +2 -3
- package/cjs/helpers/generateUUID.js +1 -2
- package/cjs/helpers/getSha256Hex.d.ts +1 -1
- package/cjs/helpers/getSha256HexNode.d.ts +1 -1
- package/cjs/helpers/kscript/index.js +17 -7
- package/cjs/helpers/kscript/utils.js +1 -2
- package/cjs/helpers/splitRobotTopic.js +1 -2
- package/cjs/helpers/stringToUint8Array.js +1 -8
- package/cjs/helpers/websandbox/connection.d.ts +1 -1
- package/cjs/logger/RocosLogger.js +9 -30
- package/cjs/models/IRocosSDKConfig.d.ts +2 -0
- package/cjs/models/IStreamConfig.d.ts +3 -0
- package/cjs/models/asset-storage/SyncIntegrations.d.ts +1 -2
- package/cjs/services/CallerService.js +1 -2
- package/cjs/services/SpotProvisioningServiceNode.d.ts +0 -1
- package/cjs/services/TelemetryService.js +5 -0
- package/esm/api/streams/caller/CallerStreamAbstract.js +1 -2
- package/esm/api/streams/caller/CallerStreamNode.js +1 -1
- package/esm/api/streams/telemetry/TelemetryStream.js +1 -0
- package/esm/api/streams/telemetry/TelemetryStreamConnect.d.ts +26 -0
- package/esm/api/streams/telemetry/TelemetryStreamConnect.js +141 -0
- package/esm/api/streams/telemetry/TelemetryStreamNode.js +1 -2
- package/esm/grpc/connect/teletubby_pb.d.ts +635 -0
- package/esm/grpc/connect/teletubby_pb.js +193 -0
- package/esm/helpers/generateUUID.js +1 -2
- package/esm/helpers/getSha256Hex.d.ts +1 -1
- package/esm/helpers/getSha256HexNode.d.ts +1 -1
- package/esm/helpers/stringToUint8Array.js +1 -8
- package/esm/helpers/websandbox/connection.d.ts +1 -1
- package/esm/logger/RocosLogger.js +9 -7
- package/esm/models/IRocosSDKConfig.d.ts +2 -0
- package/esm/models/IStreamConfig.d.ts +3 -0
- package/esm/models/asset-storage/SyncIntegrations.d.ts +1 -2
- package/esm/services/CallerService.js +1 -2
- package/esm/services/SpotProvisioningServiceNode.d.ts +0 -1
- package/esm/services/TelemetryService.js +5 -0
- package/package.json +5 -7
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.2.5 with parameter "target=ts"
|
|
2
|
+
// @generated from file teletubby.proto (package teletubby.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
|
|
5
|
+
/**
|
|
6
|
+
* Describes the file teletubby.proto.
|
|
7
|
+
*/
|
|
8
|
+
export const file_teletubby = /*@__PURE__*/ fileDesc("Cg90ZWxld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JIAWIGcHJvdG8z");
|
|
9
|
+
/**
|
|
10
|
+
* Describes the message teletubby.v1.TelemetryMessage.
|
|
11
|
+
* Use `create(TelemetryMessageSchema)` to create a new message.
|
|
12
|
+
*/
|
|
13
|
+
export const TelemetryMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 0);
|
|
14
|
+
/**
|
|
15
|
+
* Describes the message teletubby.v1.ReceiverStreamMessage.
|
|
16
|
+
* Use `create(ReceiverStreamMessageSchema)` to create a new message.
|
|
17
|
+
*/
|
|
18
|
+
export const ReceiverStreamMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 1);
|
|
19
|
+
/**
|
|
20
|
+
* Describes the message teletubby.v1.TelemetryStreamMessage.
|
|
21
|
+
* Use `create(TelemetryStreamMessageSchema)` to create a new message.
|
|
22
|
+
*/
|
|
23
|
+
export const TelemetryStreamMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 2);
|
|
24
|
+
/**
|
|
25
|
+
* Describes the message teletubby.v1.TelemetryMessageAck.
|
|
26
|
+
* Use `create(TelemetryMessageAckSchema)` to create a new message.
|
|
27
|
+
*/
|
|
28
|
+
export const TelemetryMessageAckSchema = /*@__PURE__*/ messageDesc(file_teletubby, 3);
|
|
29
|
+
/**
|
|
30
|
+
* Describes the message teletubby.v1.TelemetryStreamAck.
|
|
31
|
+
* Use `create(TelemetryStreamAckSchema)` to create a new message.
|
|
32
|
+
*/
|
|
33
|
+
export const TelemetryStreamAckSchema = /*@__PURE__*/ messageDesc(file_teletubby, 4);
|
|
34
|
+
/**
|
|
35
|
+
* Describes the message teletubby.v1.ConfigMessage.
|
|
36
|
+
* Use `create(ConfigMessageSchema)` to create a new message.
|
|
37
|
+
*/
|
|
38
|
+
export const ConfigMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 5);
|
|
39
|
+
/**
|
|
40
|
+
* Describes the message teletubby.v1.ConfigAction.
|
|
41
|
+
* Use `create(ConfigActionSchema)` to create a new message.
|
|
42
|
+
*/
|
|
43
|
+
export const ConfigActionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 6);
|
|
44
|
+
/**
|
|
45
|
+
* Describes the message teletubby.v1.TelemetryRequest.
|
|
46
|
+
* Use `create(TelemetryRequestSchema)` to create a new message.
|
|
47
|
+
*/
|
|
48
|
+
export const TelemetryRequestSchema = /*@__PURE__*/ messageDesc(file_teletubby, 7);
|
|
49
|
+
/**
|
|
50
|
+
* Describes the message teletubby.v1.TelemetryQueryRequest.
|
|
51
|
+
* Use `create(TelemetryQueryRequestSchema)` to create a new message.
|
|
52
|
+
*/
|
|
53
|
+
export const TelemetryQueryRequestSchema = /*@__PURE__*/ messageDesc(file_teletubby, 8);
|
|
54
|
+
/**
|
|
55
|
+
* Describes the message teletubby.v1.TelemetryAction.
|
|
56
|
+
* Use `create(TelemetryActionSchema)` to create a new message.
|
|
57
|
+
*/
|
|
58
|
+
export const TelemetryActionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 9);
|
|
59
|
+
/**
|
|
60
|
+
* Describes the message teletubby.v1.SubscribeOperation.
|
|
61
|
+
* Use `create(SubscribeOperationSchema)` to create a new message.
|
|
62
|
+
*/
|
|
63
|
+
export const SubscribeOperationSchema = /*@__PURE__*/ messageDesc(file_teletubby, 10);
|
|
64
|
+
/**
|
|
65
|
+
* Describes the message teletubby.v1.UnsubscribeOperation.
|
|
66
|
+
* Use `create(UnsubscribeOperationSchema)` to create a new message.
|
|
67
|
+
*/
|
|
68
|
+
export const UnsubscribeOperationSchema = /*@__PURE__*/ messageDesc(file_teletubby, 11);
|
|
69
|
+
/**
|
|
70
|
+
* Describes the message teletubby.v1.SubscribeOption.
|
|
71
|
+
* Use `create(SubscribeOptionSchema)` to create a new message.
|
|
72
|
+
*/
|
|
73
|
+
export const SubscribeOptionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 12);
|
|
74
|
+
/**
|
|
75
|
+
* Describes the message teletubby.v1.UnsubscribeOption.
|
|
76
|
+
* Use `create(UnsubscribeOptionSchema)` to create a new message.
|
|
77
|
+
*/
|
|
78
|
+
export const UnsubscribeOptionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 13);
|
|
79
|
+
/**
|
|
80
|
+
* Describes the message teletubby.v1.ReceiverGroupSubscribeOption.
|
|
81
|
+
* Use `create(ReceiverGroupSubscribeOptionSchema)` to create a new message.
|
|
82
|
+
*/
|
|
83
|
+
export const ReceiverGroupSubscribeOptionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 14);
|
|
84
|
+
/**
|
|
85
|
+
* Describes the message teletubby.v1.ReceiverGroupUnsubscribeOption.
|
|
86
|
+
* Use `create(ReceiverGroupUnsubscribeOptionSchema)` to create a new message.
|
|
87
|
+
*/
|
|
88
|
+
export const ReceiverGroupUnsubscribeOptionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 15);
|
|
89
|
+
/**
|
|
90
|
+
* Describes the message teletubby.v1.TelemetryRequestAck.
|
|
91
|
+
* Use `create(TelemetryRequestAckSchema)` to create a new message.
|
|
92
|
+
*/
|
|
93
|
+
export const TelemetryRequestAckSchema = /*@__PURE__*/ messageDesc(file_teletubby, 16);
|
|
94
|
+
/**
|
|
95
|
+
* Describes the message teletubby.v1.RegistrationMessage.
|
|
96
|
+
* Use `create(RegistrationMessageSchema)` to create a new message.
|
|
97
|
+
*/
|
|
98
|
+
export const RegistrationMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 17);
|
|
99
|
+
/**
|
|
100
|
+
* Describes the message teletubby.v1.ServiceStatusRequest.
|
|
101
|
+
* Use `create(ServiceStatusRequestSchema)` to create a new message.
|
|
102
|
+
*/
|
|
103
|
+
export const ServiceStatusRequestSchema = /*@__PURE__*/ messageDesc(file_teletubby, 18);
|
|
104
|
+
/**
|
|
105
|
+
* Describes the message teletubby.v1.Query.
|
|
106
|
+
* Use `create(QuerySchema)` to create a new message.
|
|
107
|
+
*/
|
|
108
|
+
export const QuerySchema = /*@__PURE__*/ messageDesc(file_teletubby, 19);
|
|
109
|
+
/**
|
|
110
|
+
* Describes the message teletubby.v1.QueryOrPredicate.
|
|
111
|
+
* Use `create(QueryOrPredicateSchema)` to create a new message.
|
|
112
|
+
*/
|
|
113
|
+
export const QueryOrPredicateSchema = /*@__PURE__*/ messageDesc(file_teletubby, 20);
|
|
114
|
+
/**
|
|
115
|
+
* Describes the message teletubby.v1.Predicate.
|
|
116
|
+
* Use `create(PredicateSchema)` to create a new message.
|
|
117
|
+
*/
|
|
118
|
+
export const PredicateSchema = /*@__PURE__*/ messageDesc(file_teletubby, 21);
|
|
119
|
+
/**
|
|
120
|
+
* Describes the message teletubby.v1.Heartbeat.
|
|
121
|
+
* Use `create(HeartbeatSchema)` to create a new message.
|
|
122
|
+
*/
|
|
123
|
+
export const HeartbeatSchema = /*@__PURE__*/ messageDesc(file_teletubby, 22);
|
|
124
|
+
/**
|
|
125
|
+
* @generated from enum teletubby.v1.TelemetryAckStatus
|
|
126
|
+
*/
|
|
127
|
+
export var TelemetryAckStatus;
|
|
128
|
+
(function (TelemetryAckStatus) {
|
|
129
|
+
/**
|
|
130
|
+
* @generated from enum value: OK = 0;
|
|
131
|
+
*/
|
|
132
|
+
TelemetryAckStatus[TelemetryAckStatus["OK"] = 0] = "OK";
|
|
133
|
+
/**
|
|
134
|
+
* @generated from enum value: REJECT = 1;
|
|
135
|
+
*/
|
|
136
|
+
TelemetryAckStatus[TelemetryAckStatus["REJECT"] = 1] = "REJECT";
|
|
137
|
+
})(TelemetryAckStatus || (TelemetryAckStatus = {}));
|
|
138
|
+
/**
|
|
139
|
+
* Describes the enum teletubby.v1.TelemetryAckStatus.
|
|
140
|
+
*/
|
|
141
|
+
export const TelemetryAckStatusSchema = /*@__PURE__*/ enumDesc(file_teletubby, 0);
|
|
142
|
+
/**
|
|
143
|
+
* @generated from enum teletubby.v1.LogicalOperation
|
|
144
|
+
*/
|
|
145
|
+
export var LogicalOperation;
|
|
146
|
+
(function (LogicalOperation) {
|
|
147
|
+
/**
|
|
148
|
+
* @generated from enum value: OR = 0;
|
|
149
|
+
*/
|
|
150
|
+
LogicalOperation[LogicalOperation["OR"] = 0] = "OR";
|
|
151
|
+
})(LogicalOperation || (LogicalOperation = {}));
|
|
152
|
+
/**
|
|
153
|
+
* Describes the enum teletubby.v1.LogicalOperation.
|
|
154
|
+
*/
|
|
155
|
+
export const LogicalOperationSchema = /*@__PURE__*/ enumDesc(file_teletubby, 1);
|
|
156
|
+
/**
|
|
157
|
+
* @generated from enum teletubby.v1.ComparisonOperation
|
|
158
|
+
*/
|
|
159
|
+
export var ComparisonOperation;
|
|
160
|
+
(function (ComparisonOperation) {
|
|
161
|
+
/**
|
|
162
|
+
* @generated from enum value: EQUAL = 0;
|
|
163
|
+
*/
|
|
164
|
+
ComparisonOperation[ComparisonOperation["EQUAL"] = 0] = "EQUAL";
|
|
165
|
+
})(ComparisonOperation || (ComparisonOperation = {}));
|
|
166
|
+
/**
|
|
167
|
+
* Describes the enum teletubby.v1.ComparisonOperation.
|
|
168
|
+
*/
|
|
169
|
+
export const ComparisonOperationSchema = /*@__PURE__*/ enumDesc(file_teletubby, 2);
|
|
170
|
+
/**
|
|
171
|
+
* @generated from enum teletubby.v1.PredicateAttribute
|
|
172
|
+
*/
|
|
173
|
+
export var PredicateAttribute;
|
|
174
|
+
(function (PredicateAttribute) {
|
|
175
|
+
/**
|
|
176
|
+
* @generated from enum value: TAG = 0;
|
|
177
|
+
*/
|
|
178
|
+
PredicateAttribute[PredicateAttribute["TAG"] = 0] = "TAG";
|
|
179
|
+
})(PredicateAttribute || (PredicateAttribute = {}));
|
|
180
|
+
/**
|
|
181
|
+
* Describes the enum teletubby.v1.PredicateAttribute.
|
|
182
|
+
*/
|
|
183
|
+
export const PredicateAttributeSchema = /*@__PURE__*/ enumDesc(file_teletubby, 3);
|
|
184
|
+
/**
|
|
185
|
+
* @generated from service teletubby.v1.TelemetryReceiver
|
|
186
|
+
*/
|
|
187
|
+
export const TelemetryReceiver = /*@__PURE__*/ serviceDesc(file_teletubby, 0);
|
|
188
|
+
/**
|
|
189
|
+
* Will be deprecated in the future
|
|
190
|
+
*
|
|
191
|
+
* @generated from service teletubby.v1.TelemetryGateway
|
|
192
|
+
*/
|
|
193
|
+
export const TelemetryGateway = /*@__PURE__*/ serviceDesc(file_teletubby, 1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getSha256Hex: (arrayBuffer:
|
|
1
|
+
export declare const getSha256Hex: (arrayBuffer: BufferSource) => Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getSha256HexNode: (arrayBuffer:
|
|
1
|
+
export declare const getSha256HexNode: (arrayBuffer: BufferSource) => Promise<string>;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { Buffer } from 'buffer';
|
|
2
1
|
export const stringToUint8Array = (input) => {
|
|
3
|
-
|
|
4
|
-
const buf = new Buffer(input);
|
|
5
|
-
const result = new Uint8Array(buf.length);
|
|
6
|
-
for (let i = 0; i < buf.length; i++) {
|
|
7
|
-
result[i] = buf[i];
|
|
8
|
-
}
|
|
9
|
-
return result;
|
|
2
|
+
return new TextEncoder().encode(input ? input : '');
|
|
10
3
|
};
|
|
@@ -38,7 +38,7 @@ export default class Connection<Local extends APIDeclaration<Local>, Remote exte
|
|
|
38
38
|
* @param name - name of remote method to call
|
|
39
39
|
* @param args - arguments to pass to remote method
|
|
40
40
|
*/
|
|
41
|
-
callRemoteMethod<Method extends keyof Remote>(name: Method, ...args:
|
|
41
|
+
callRemoteMethod<Method extends keyof Remote>(name: Method, ...args: Remote[Method] extends (...args: infer A) => unknown ? A : never): Promise<Remote[Method] extends (...args: never) => infer R ? R : never>;
|
|
42
42
|
/** Log a message if debug mode is enabled */
|
|
43
43
|
log(...args: unknown[]): void;
|
|
44
44
|
private onMessageListener;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import * as prefix from 'loglevel-plugin-prefix';
|
|
2
1
|
import log from 'loglevel';
|
|
2
|
+
const originalFactory = log.methodFactory;
|
|
3
|
+
log.methodFactory = (methodName, level, loggerName) => {
|
|
4
|
+
const rawMethod = originalFactory(methodName, level, loggerName);
|
|
5
|
+
const name = typeof loggerName === 'symbol' ? loggerName.toString() : loggerName;
|
|
6
|
+
return (...args) => {
|
|
7
|
+
rawMethod(`[${new Date()}] ${methodName.toUpperCase()} ${name}:`, ...args);
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
// setDefaultLevel applies the methodFactory above by rebuilding the logging methods
|
|
3
11
|
log.setDefaultLevel('silent');
|
|
4
|
-
prefix.reg(log);
|
|
5
|
-
prefix.apply(log, {
|
|
6
|
-
format(level, name, timestamp) {
|
|
7
|
-
return `[${timestamp}] ${level.toUpperCase()} ${name}:`;
|
|
8
|
-
},
|
|
9
|
-
});
|
|
10
12
|
export class RocosLogger {
|
|
11
13
|
static getInstance(name) {
|
|
12
14
|
if (name) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IStreamOptions } from './IStreamOptions';
|
|
2
2
|
import { ServiceEnum } from './ServiceEnum';
|
|
3
|
+
import { TelemetryTransport } from './IStreamConfig';
|
|
3
4
|
export type IRocosSDKConfig = AuthorisedConfig & {
|
|
4
5
|
overrides?: Partial<Record<ServiceEnum, Partial<AuthorisedConfig>>>;
|
|
5
6
|
};
|
|
@@ -10,6 +11,7 @@ interface ConfigBase {
|
|
|
10
11
|
options?: IStreamOptions;
|
|
11
12
|
port?: number;
|
|
12
13
|
insecure?: boolean;
|
|
14
|
+
transport?: TelemetryTransport;
|
|
13
15
|
hooks?: {
|
|
14
16
|
http?: {
|
|
15
17
|
onResponse?: (res: Response) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IStreamOptions } from './IStreamOptions';
|
|
2
|
+
export type TelemetryTransport = 'grpc-web' | 'connect';
|
|
2
3
|
export interface IStreamConfig {
|
|
3
4
|
url: string;
|
|
4
5
|
token: string;
|
|
@@ -6,4 +7,6 @@ export interface IStreamConfig {
|
|
|
6
7
|
options?: IStreamOptions;
|
|
7
8
|
port?: number;
|
|
8
9
|
insecure?: boolean;
|
|
10
|
+
transport?: TelemetryTransport;
|
|
11
|
+
grpcWebFormat?: 'text' | 'binary';
|
|
9
12
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { JSONSchema7 } from 'json-schema';
|
|
2
1
|
export interface AssetSyncDefinitionModel {
|
|
3
2
|
path: string;
|
|
4
3
|
enabled: boolean;
|
|
@@ -20,7 +19,7 @@ export interface AssetSyncDefinitionsModel<I extends AssetSyncDefinitionModel =
|
|
|
20
19
|
export interface AssetSyncIntegrationProviderModel {
|
|
21
20
|
provider: string;
|
|
22
21
|
name: string;
|
|
23
|
-
schema:
|
|
22
|
+
schema: Record<string, unknown>;
|
|
24
23
|
}
|
|
25
24
|
export interface AssetSyncIntegrationModel extends CreateAssetSyncIntegrationModel {
|
|
26
25
|
id: string;
|
|
@@ -6,7 +6,6 @@ import { BaseStreamService } from './BaseStreamService';
|
|
|
6
6
|
import { CallerStream } from '../api/streams/caller/CallerStream';
|
|
7
7
|
import { IDENTIFIER_NAME_CALLER } from '../constants/identifier';
|
|
8
8
|
import { splitRobotTopic } from '../helpers';
|
|
9
|
-
import { v4 } from 'uuid';
|
|
10
9
|
export class CallerService extends BaseStreamService {
|
|
11
10
|
constructor(config) {
|
|
12
11
|
super('CallerService', config);
|
|
@@ -63,7 +62,7 @@ export class CallerService extends BaseStreamService {
|
|
|
63
62
|
}
|
|
64
63
|
getCallerParams(params, component, topic) {
|
|
65
64
|
return {
|
|
66
|
-
uid: params.options?.uid ??
|
|
65
|
+
uid: params.options?.uid ?? crypto.randomUUID(),
|
|
67
66
|
projectId: params.projectId,
|
|
68
67
|
callsign: params.callsign,
|
|
69
68
|
subSystem: '',
|
|
@@ -5,6 +5,7 @@ import { BaseStreamService } from './BaseStreamService';
|
|
|
5
5
|
import { IDENTIFIER_NAME_TELEMETRY } from '../constants/identifier';
|
|
6
6
|
import { RocosStore } from '../store/RocosStore';
|
|
7
7
|
import { TelemetryStream } from '../api/streams/telemetry/TelemetryStream';
|
|
8
|
+
import { TelemetryStreamConnect } from '../api/streams/telemetry/TelemetryStreamConnect';
|
|
8
9
|
import { arrayUnique } from '../helpers/arrayUnique';
|
|
9
10
|
import { flattenCallsignsLookup } from '../helpers/flattenCallsignsLookup';
|
|
10
11
|
import { getUniqueId } from '../helpers/getUniqueId';
|
|
@@ -159,6 +160,7 @@ export class TelemetryService extends BaseStreamService {
|
|
|
159
160
|
options: this.config.options,
|
|
160
161
|
port: this.config.port,
|
|
161
162
|
insecure: this.config.insecure,
|
|
163
|
+
transport: this.config.transport,
|
|
162
164
|
});
|
|
163
165
|
if (!newStream.isNew) {
|
|
164
166
|
newStream.stream.statusStream$.subscribe((msg) => {
|
|
@@ -171,6 +173,9 @@ export class TelemetryService extends BaseStreamService {
|
|
|
171
173
|
return newStream.stream;
|
|
172
174
|
}
|
|
173
175
|
getStream(config) {
|
|
176
|
+
if (config.transport === 'connect') {
|
|
177
|
+
return new TelemetryStreamConnect(config);
|
|
178
|
+
}
|
|
174
179
|
return new TelemetryStream(config);
|
|
175
180
|
}
|
|
176
181
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dronedeploy/rocos-js-sdk",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Javascript SDK for rocos",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -22,16 +22,14 @@
|
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"devDependencies": {},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@bufbuild/protobuf": "2.12.0",
|
|
26
|
+
"@connectrpc/connect": "^2.1.1",
|
|
27
|
+
"@connectrpc/connect-web": "^2.1.1",
|
|
25
28
|
"@grpc/grpc-js": "^1.7.1",
|
|
26
29
|
"@protobuf-ts/grpcweb-transport": "^2.9.1",
|
|
27
|
-
"@protobuf-ts/plugin": "^2.9.1",
|
|
28
30
|
"@protobuf-ts/runtime": "^2.9.1",
|
|
29
|
-
"@types/json-schema": "^7.0.14",
|
|
30
31
|
"acorn": "^8.11.3",
|
|
31
|
-
"
|
|
32
|
-
"loglevel": "^1.7.1",
|
|
33
|
-
"loglevel-plugin-prefix": "^0.8.4",
|
|
34
|
-
"uuid": "^9.0.0"
|
|
32
|
+
"loglevel": "^1.7.1"
|
|
35
33
|
},
|
|
36
34
|
"peerDependencies": {
|
|
37
35
|
"rxjs": "^6.6.6 || ^7.0.0"
|