@rise-maritime/keelson-js 0.6.0-alpha.280.dev.1 → 0.6.0-alpha.281.dev.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/dist/index.d.ts
CHANGED
|
@@ -156,6 +156,14 @@ export declare function getInterfaceDefinition(interfaceAndVersion: string): {
|
|
|
156
156
|
readonly responseStream: false;
|
|
157
157
|
readonly options: {};
|
|
158
158
|
};
|
|
159
|
+
readonly describe_file: {
|
|
160
|
+
readonly name: "describe_file";
|
|
161
|
+
readonly requestType: import("./interfaces/ReplayControl").MessageFns<import("./interfaces/ReplayControl").DescribeFileRequest>;
|
|
162
|
+
readonly requestStream: false;
|
|
163
|
+
readonly responseType: import("./interfaces/ReplayControl").MessageFns<import("./interfaces/ReplayControl").DescribeFileResponse>;
|
|
164
|
+
readonly responseStream: false;
|
|
165
|
+
readonly options: {};
|
|
166
|
+
};
|
|
159
167
|
readonly load_file: {
|
|
160
168
|
readonly name: "load_file";
|
|
161
169
|
readonly requestType: import("./interfaces/ReplayControl").MessageFns<import("./interfaces/ReplayControl").LoadFileRequest>;
|
|
@@ -22,6 +22,38 @@ export interface ListFilesResponse {
|
|
|
22
22
|
baseDirectory: string;
|
|
23
23
|
files: FileInfo[];
|
|
24
24
|
}
|
|
25
|
+
export interface DescribeFileRequest {
|
|
26
|
+
/**
|
|
27
|
+
* Path relative to the replayer's base directory, as in load_file. The file
|
|
28
|
+
* need not be loaded — a client can inspect a recording before playing it.
|
|
29
|
+
*/
|
|
30
|
+
path: string;
|
|
31
|
+
}
|
|
32
|
+
/** One channel (topic) in the file, and when it spoke. */
|
|
33
|
+
export interface ChannelInfo {
|
|
34
|
+
topic: string;
|
|
35
|
+
/** The channel's schema name as recorded, e.g. "keelson.TimestampedFloat". */
|
|
36
|
+
schemaName: string;
|
|
37
|
+
/** The channel's message encoding as recorded, e.g. "protobuf". */
|
|
38
|
+
messageEncoding: string;
|
|
39
|
+
messageCount: number;
|
|
40
|
+
/**
|
|
41
|
+
* log_time of the channel's first and last message. Unset when the channel
|
|
42
|
+
* recorded no messages. Exact, not the bounds of the chunks it appears in.
|
|
43
|
+
*/
|
|
44
|
+
firstTime: Date | undefined;
|
|
45
|
+
lastTime: Date | undefined;
|
|
46
|
+
}
|
|
47
|
+
export interface DescribeFileResponse {
|
|
48
|
+
file: FileInfo | undefined;
|
|
49
|
+
channels: ChannelInfo[];
|
|
50
|
+
/**
|
|
51
|
+
* True when the file carried no summary or no chunk indexes, so the replayer
|
|
52
|
+
* had to read it end to end. The figures are still exact; the call was just
|
|
53
|
+
* proportional to the file's size rather than to its number of chunks.
|
|
54
|
+
*/
|
|
55
|
+
fromScan: boolean;
|
|
56
|
+
}
|
|
25
57
|
export interface LoadFileRequest {
|
|
26
58
|
path: string;
|
|
27
59
|
}
|
|
@@ -46,6 +78,9 @@ export interface ReplaySuccessResponse {
|
|
|
46
78
|
export declare const FileInfo: MessageFns<FileInfo>;
|
|
47
79
|
export declare const ListFilesRequest: MessageFns<ListFilesRequest>;
|
|
48
80
|
export declare const ListFilesResponse: MessageFns<ListFilesResponse>;
|
|
81
|
+
export declare const DescribeFileRequest: MessageFns<DescribeFileRequest>;
|
|
82
|
+
export declare const ChannelInfo: MessageFns<ChannelInfo>;
|
|
83
|
+
export declare const DescribeFileResponse: MessageFns<DescribeFileResponse>;
|
|
49
84
|
export declare const LoadFileRequest: MessageFns<LoadFileRequest>;
|
|
50
85
|
export declare const SeekRequest: MessageFns<SeekRequest>;
|
|
51
86
|
export declare const SetSpeedRequest: MessageFns<SetSpeedRequest>;
|
|
@@ -64,6 +99,15 @@ export declare const ReplayControlDefinition: {
|
|
|
64
99
|
readonly responseStream: false;
|
|
65
100
|
readonly options: {};
|
|
66
101
|
};
|
|
102
|
+
/** Per-channel message counts and first/last message times for one file. */
|
|
103
|
+
readonly describe_file: {
|
|
104
|
+
readonly name: "describe_file";
|
|
105
|
+
readonly requestType: MessageFns<DescribeFileRequest>;
|
|
106
|
+
readonly requestStream: false;
|
|
107
|
+
readonly responseType: MessageFns<DescribeFileResponse>;
|
|
108
|
+
readonly responseStream: false;
|
|
109
|
+
readonly options: {};
|
|
110
|
+
};
|
|
67
111
|
readonly load_file: {
|
|
68
112
|
readonly name: "load_file";
|
|
69
113
|
readonly requestType: MessageFns<LoadFileRequest>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: ReplayControl.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.DescribeFileResponse = exports.ChannelInfo = exports.DescribeFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const empty_1 = require("./google/protobuf/empty");
|
|
@@ -283,6 +283,270 @@ exports.ListFilesResponse = {
|
|
|
283
283
|
return message;
|
|
284
284
|
},
|
|
285
285
|
};
|
|
286
|
+
function createBaseDescribeFileRequest() {
|
|
287
|
+
return { path: "" };
|
|
288
|
+
}
|
|
289
|
+
exports.DescribeFileRequest = {
|
|
290
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
291
|
+
if (message.path !== "") {
|
|
292
|
+
writer.uint32(10).string(message.path);
|
|
293
|
+
}
|
|
294
|
+
return writer;
|
|
295
|
+
},
|
|
296
|
+
decode(input, length) {
|
|
297
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
298
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
299
|
+
const message = createBaseDescribeFileRequest();
|
|
300
|
+
while (reader.pos < end) {
|
|
301
|
+
const tag = reader.uint32();
|
|
302
|
+
switch (tag >>> 3) {
|
|
303
|
+
case 1: {
|
|
304
|
+
if (tag !== 10) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
message.path = reader.string();
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
reader.skip(tag & 7);
|
|
315
|
+
}
|
|
316
|
+
return message;
|
|
317
|
+
},
|
|
318
|
+
fromJSON(object) {
|
|
319
|
+
return { path: isSet(object.path) ? globalThis.String(object.path) : "" };
|
|
320
|
+
},
|
|
321
|
+
toJSON(message) {
|
|
322
|
+
const obj = {};
|
|
323
|
+
if (message.path !== "") {
|
|
324
|
+
obj.path = message.path;
|
|
325
|
+
}
|
|
326
|
+
return obj;
|
|
327
|
+
},
|
|
328
|
+
create(base) {
|
|
329
|
+
return exports.DescribeFileRequest.fromPartial(base ?? {});
|
|
330
|
+
},
|
|
331
|
+
fromPartial(object) {
|
|
332
|
+
const message = createBaseDescribeFileRequest();
|
|
333
|
+
message.path = object.path ?? "";
|
|
334
|
+
return message;
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
function createBaseChannelInfo() {
|
|
338
|
+
return { topic: "", schemaName: "", messageEncoding: "", messageCount: 0, firstTime: undefined, lastTime: undefined };
|
|
339
|
+
}
|
|
340
|
+
exports.ChannelInfo = {
|
|
341
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
342
|
+
if (message.topic !== "") {
|
|
343
|
+
writer.uint32(10).string(message.topic);
|
|
344
|
+
}
|
|
345
|
+
if (message.schemaName !== "") {
|
|
346
|
+
writer.uint32(18).string(message.schemaName);
|
|
347
|
+
}
|
|
348
|
+
if (message.messageEncoding !== "") {
|
|
349
|
+
writer.uint32(26).string(message.messageEncoding);
|
|
350
|
+
}
|
|
351
|
+
if (message.messageCount !== 0) {
|
|
352
|
+
writer.uint32(32).uint64(message.messageCount);
|
|
353
|
+
}
|
|
354
|
+
if (message.firstTime !== undefined) {
|
|
355
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.firstTime), writer.uint32(42).fork()).join();
|
|
356
|
+
}
|
|
357
|
+
if (message.lastTime !== undefined) {
|
|
358
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.lastTime), writer.uint32(50).fork()).join();
|
|
359
|
+
}
|
|
360
|
+
return writer;
|
|
361
|
+
},
|
|
362
|
+
decode(input, length) {
|
|
363
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
364
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
365
|
+
const message = createBaseChannelInfo();
|
|
366
|
+
while (reader.pos < end) {
|
|
367
|
+
const tag = reader.uint32();
|
|
368
|
+
switch (tag >>> 3) {
|
|
369
|
+
case 1: {
|
|
370
|
+
if (tag !== 10) {
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
message.topic = reader.string();
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
case 2: {
|
|
377
|
+
if (tag !== 18) {
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
message.schemaName = reader.string();
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
case 3: {
|
|
384
|
+
if (tag !== 26) {
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
message.messageEncoding = reader.string();
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
case 4: {
|
|
391
|
+
if (tag !== 32) {
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
message.messageCount = longToNumber(reader.uint64());
|
|
395
|
+
continue;
|
|
396
|
+
}
|
|
397
|
+
case 5: {
|
|
398
|
+
if (tag !== 42) {
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
message.firstTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
case 6: {
|
|
405
|
+
if (tag !== 50) {
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
message.lastTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
reader.skip(tag & 7);
|
|
416
|
+
}
|
|
417
|
+
return message;
|
|
418
|
+
},
|
|
419
|
+
fromJSON(object) {
|
|
420
|
+
return {
|
|
421
|
+
topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
|
|
422
|
+
schemaName: isSet(object.schemaName) ? globalThis.String(object.schemaName) : "",
|
|
423
|
+
messageEncoding: isSet(object.messageEncoding) ? globalThis.String(object.messageEncoding) : "",
|
|
424
|
+
messageCount: isSet(object.messageCount) ? globalThis.Number(object.messageCount) : 0,
|
|
425
|
+
firstTime: isSet(object.firstTime) ? fromJsonTimestamp(object.firstTime) : undefined,
|
|
426
|
+
lastTime: isSet(object.lastTime) ? fromJsonTimestamp(object.lastTime) : undefined,
|
|
427
|
+
};
|
|
428
|
+
},
|
|
429
|
+
toJSON(message) {
|
|
430
|
+
const obj = {};
|
|
431
|
+
if (message.topic !== "") {
|
|
432
|
+
obj.topic = message.topic;
|
|
433
|
+
}
|
|
434
|
+
if (message.schemaName !== "") {
|
|
435
|
+
obj.schemaName = message.schemaName;
|
|
436
|
+
}
|
|
437
|
+
if (message.messageEncoding !== "") {
|
|
438
|
+
obj.messageEncoding = message.messageEncoding;
|
|
439
|
+
}
|
|
440
|
+
if (message.messageCount !== 0) {
|
|
441
|
+
obj.messageCount = Math.round(message.messageCount);
|
|
442
|
+
}
|
|
443
|
+
if (message.firstTime !== undefined) {
|
|
444
|
+
obj.firstTime = message.firstTime.toISOString();
|
|
445
|
+
}
|
|
446
|
+
if (message.lastTime !== undefined) {
|
|
447
|
+
obj.lastTime = message.lastTime.toISOString();
|
|
448
|
+
}
|
|
449
|
+
return obj;
|
|
450
|
+
},
|
|
451
|
+
create(base) {
|
|
452
|
+
return exports.ChannelInfo.fromPartial(base ?? {});
|
|
453
|
+
},
|
|
454
|
+
fromPartial(object) {
|
|
455
|
+
const message = createBaseChannelInfo();
|
|
456
|
+
message.topic = object.topic ?? "";
|
|
457
|
+
message.schemaName = object.schemaName ?? "";
|
|
458
|
+
message.messageEncoding = object.messageEncoding ?? "";
|
|
459
|
+
message.messageCount = object.messageCount ?? 0;
|
|
460
|
+
message.firstTime = object.firstTime ?? undefined;
|
|
461
|
+
message.lastTime = object.lastTime ?? undefined;
|
|
462
|
+
return message;
|
|
463
|
+
},
|
|
464
|
+
};
|
|
465
|
+
function createBaseDescribeFileResponse() {
|
|
466
|
+
return { file: undefined, channels: [], fromScan: false };
|
|
467
|
+
}
|
|
468
|
+
exports.DescribeFileResponse = {
|
|
469
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
470
|
+
if (message.file !== undefined) {
|
|
471
|
+
exports.FileInfo.encode(message.file, writer.uint32(10).fork()).join();
|
|
472
|
+
}
|
|
473
|
+
for (const v of message.channels) {
|
|
474
|
+
exports.ChannelInfo.encode(v, writer.uint32(18).fork()).join();
|
|
475
|
+
}
|
|
476
|
+
if (message.fromScan !== false) {
|
|
477
|
+
writer.uint32(24).bool(message.fromScan);
|
|
478
|
+
}
|
|
479
|
+
return writer;
|
|
480
|
+
},
|
|
481
|
+
decode(input, length) {
|
|
482
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
483
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
484
|
+
const message = createBaseDescribeFileResponse();
|
|
485
|
+
while (reader.pos < end) {
|
|
486
|
+
const tag = reader.uint32();
|
|
487
|
+
switch (tag >>> 3) {
|
|
488
|
+
case 1: {
|
|
489
|
+
if (tag !== 10) {
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
message.file = exports.FileInfo.decode(reader, reader.uint32());
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
495
|
+
case 2: {
|
|
496
|
+
if (tag !== 18) {
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
message.channels.push(exports.ChannelInfo.decode(reader, reader.uint32()));
|
|
500
|
+
continue;
|
|
501
|
+
}
|
|
502
|
+
case 3: {
|
|
503
|
+
if (tag !== 24) {
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
message.fromScan = reader.bool();
|
|
507
|
+
continue;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
511
|
+
break;
|
|
512
|
+
}
|
|
513
|
+
reader.skip(tag & 7);
|
|
514
|
+
}
|
|
515
|
+
return message;
|
|
516
|
+
},
|
|
517
|
+
fromJSON(object) {
|
|
518
|
+
return {
|
|
519
|
+
file: isSet(object.file) ? exports.FileInfo.fromJSON(object.file) : undefined,
|
|
520
|
+
channels: globalThis.Array.isArray(object?.channels)
|
|
521
|
+
? object.channels.map((e) => exports.ChannelInfo.fromJSON(e))
|
|
522
|
+
: [],
|
|
523
|
+
fromScan: isSet(object.fromScan) ? globalThis.Boolean(object.fromScan) : false,
|
|
524
|
+
};
|
|
525
|
+
},
|
|
526
|
+
toJSON(message) {
|
|
527
|
+
const obj = {};
|
|
528
|
+
if (message.file !== undefined) {
|
|
529
|
+
obj.file = exports.FileInfo.toJSON(message.file);
|
|
530
|
+
}
|
|
531
|
+
if (message.channels?.length) {
|
|
532
|
+
obj.channels = message.channels.map((e) => exports.ChannelInfo.toJSON(e));
|
|
533
|
+
}
|
|
534
|
+
if (message.fromScan !== false) {
|
|
535
|
+
obj.fromScan = message.fromScan;
|
|
536
|
+
}
|
|
537
|
+
return obj;
|
|
538
|
+
},
|
|
539
|
+
create(base) {
|
|
540
|
+
return exports.DescribeFileResponse.fromPartial(base ?? {});
|
|
541
|
+
},
|
|
542
|
+
fromPartial(object) {
|
|
543
|
+
const message = createBaseDescribeFileResponse();
|
|
544
|
+
message.file = (object.file !== undefined && object.file !== null) ? exports.FileInfo.fromPartial(object.file) : undefined;
|
|
545
|
+
message.channels = object.channels?.map((e) => exports.ChannelInfo.fromPartial(e)) || [];
|
|
546
|
+
message.fromScan = object.fromScan ?? false;
|
|
547
|
+
return message;
|
|
548
|
+
},
|
|
549
|
+
};
|
|
286
550
|
function createBaseLoadFileRequest() {
|
|
287
551
|
return { path: "" };
|
|
288
552
|
}
|
|
@@ -536,6 +800,15 @@ exports.ReplayControlDefinition = {
|
|
|
536
800
|
responseStream: false,
|
|
537
801
|
options: {},
|
|
538
802
|
},
|
|
803
|
+
/** Per-channel message counts and first/last message times for one file. */
|
|
804
|
+
describe_file: {
|
|
805
|
+
name: "describe_file",
|
|
806
|
+
requestType: exports.DescribeFileRequest,
|
|
807
|
+
requestStream: false,
|
|
808
|
+
responseType: exports.DescribeFileResponse,
|
|
809
|
+
responseStream: false,
|
|
810
|
+
options: {},
|
|
811
|
+
},
|
|
539
812
|
load_file: {
|
|
540
813
|
name: "load_file",
|
|
541
814
|
requestType: exports.LoadFileRequest,
|
|
@@ -137,6 +137,14 @@ export declare const serviceDefinitions: {
|
|
|
137
137
|
readonly responseStream: false;
|
|
138
138
|
readonly options: {};
|
|
139
139
|
};
|
|
140
|
+
readonly describe_file: {
|
|
141
|
+
readonly name: "describe_file";
|
|
142
|
+
readonly requestType: import("./ReplayControl").MessageFns<import("./ReplayControl").DescribeFileRequest>;
|
|
143
|
+
readonly requestStream: false;
|
|
144
|
+
readonly responseType: import("./ReplayControl").MessageFns<import("./ReplayControl").DescribeFileResponse>;
|
|
145
|
+
readonly responseStream: false;
|
|
146
|
+
readonly options: {};
|
|
147
|
+
};
|
|
140
148
|
readonly load_file: {
|
|
141
149
|
readonly name: "load_file";
|
|
142
150
|
readonly requestType: import("./ReplayControl").MessageFns<import("./ReplayControl").LoadFileRequest>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rise-maritime/keelson-js",
|
|
3
3
|
"//version": "NOT the published version. The release workflow overwrites it from the release tag (npm version --no-git-tag-version), so tag and artifact cannot disagree. Only matters for local installs; do not hand-bump before tagging — that manual step is what broke release 0.5.4.",
|
|
4
|
-
"version": "0.6.0-alpha.
|
|
4
|
+
"version": "0.6.0-alpha.281.dev.1",
|
|
5
5
|
"description": "Keelson JavaScript SDK with Node-RED nodes",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|