@foxglove/schemas 1.4.0 → 1.5.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/internal/__snapshots__/{exportTypescriptSchemata.test.ts.snap → exportTypeScriptSchemas.test.ts.snap} +242 -242
- package/internal/exportTypeScriptSchemas.d.ts +7 -0
- package/internal/exportTypeScriptSchemas.d.ts.map +1 -0
- package/internal/{exportTypescriptSchemata.js → exportTypeScriptSchemas.js} +12 -12
- package/internal/exportTypeScriptSchemas.js.map +1 -0
- package/internal/exportTypeScriptSchemas.test.d.ts +2 -0
- package/internal/exportTypeScriptSchemas.test.d.ts.map +1 -0
- package/internal/exportTypeScriptSchemas.test.js +10 -0
- package/internal/exportTypeScriptSchemas.test.js.map +1 -0
- package/internal/exportTypeScriptSchemas.test.ts +8 -0
- package/internal/{exportTypescriptSchemata.ts → exportTypeScriptSchemas.ts} +9 -9
- package/internal/index.d.ts +2 -1
- package/internal/index.d.ts.map +1 -1
- package/internal/index.js +2 -1
- package/internal/index.js.map +1 -1
- package/internal/index.ts +2 -1
- package/package.json +1 -1
- package/scripts/updateGeneratedFiles.js +3 -3
- package/scripts/updateGeneratedFiles.js.map +1 -1
- package/scripts/updateGeneratedFiles.ts +3 -3
- package/internal/exportTypescriptSchemata.d.ts +0 -7
- package/internal/exportTypescriptSchemata.d.ts.map +0 -1
- package/internal/exportTypescriptSchemata.js.map +0 -1
- package/internal/exportTypescriptSchemata.test.d.ts +0 -2
- package/internal/exportTypescriptSchemata.test.d.ts.map +0 -1
- package/internal/exportTypescriptSchemata.test.js +0 -10
- package/internal/exportTypescriptSchemata.test.js.map +0 -1
- package/internal/exportTypescriptSchemata.test.ts +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`
|
|
4
|
-
{
|
|
5
|
-
"ArrowPrimitive"
|
|
3
|
+
exports[`exportTypeScriptSchemas exports schemas 1`] = `
|
|
4
|
+
Map {
|
|
5
|
+
"ArrowPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
6
6
|
|
|
7
7
|
import { Color } from "./Color";
|
|
8
8
|
import { Pose } from "./Pose";
|
|
@@ -28,7 +28,7 @@ export type ArrowPrimitive = {
|
|
|
28
28
|
color: Color;
|
|
29
29
|
};
|
|
30
30
|
",
|
|
31
|
-
"CameraCalibration"
|
|
31
|
+
"CameraCalibration" => "// Generated by https://github.com/foxglove/schemas
|
|
32
32
|
|
|
33
33
|
import { Time } from "./Time";
|
|
34
34
|
|
|
@@ -108,7 +108,7 @@ export type CameraCalibration = {
|
|
|
108
108
|
P: [number, number, number, number, number, number, number, number, number, number, number, number];
|
|
109
109
|
};
|
|
110
110
|
",
|
|
111
|
-
"CircleAnnotation"
|
|
111
|
+
"CircleAnnotation" => "// Generated by https://github.com/foxglove/schemas
|
|
112
112
|
|
|
113
113
|
import { Color } from "./Color";
|
|
114
114
|
import { Point2 } from "./Point2";
|
|
@@ -135,7 +135,7 @@ export type CircleAnnotation = {
|
|
|
135
135
|
outline_color: Color;
|
|
136
136
|
};
|
|
137
137
|
",
|
|
138
|
-
"Color"
|
|
138
|
+
"Color" => "// Generated by https://github.com/foxglove/schemas
|
|
139
139
|
|
|
140
140
|
/** A color in RGBA format */
|
|
141
141
|
export type Color = {
|
|
@@ -152,7 +152,7 @@ export type Color = {
|
|
|
152
152
|
a: number;
|
|
153
153
|
};
|
|
154
154
|
",
|
|
155
|
-
"CompressedImage"
|
|
155
|
+
"CompressedImage" => "// Generated by https://github.com/foxglove/schemas
|
|
156
156
|
|
|
157
157
|
import { Time } from "./Time";
|
|
158
158
|
|
|
@@ -175,25 +175,7 @@ export type CompressedImage = {
|
|
|
175
175
|
format: string;
|
|
176
176
|
};
|
|
177
177
|
",
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
import { Color } from "./Color";
|
|
181
|
-
import { Pose } from "./Pose";
|
|
182
|
-
import { Vector3 } from "./Vector3";
|
|
183
|
-
|
|
184
|
-
/** A primitive representing a cube or rectangular prism */
|
|
185
|
-
export type CubePrimitive = {
|
|
186
|
-
/** Position of the center of the cube and orientation of the cube */
|
|
187
|
-
pose: Pose;
|
|
188
|
-
|
|
189
|
-
/** Size of the cube along each axis */
|
|
190
|
-
size: Vector3;
|
|
191
|
-
|
|
192
|
-
/** Color of the cube */
|
|
193
|
-
color: Color;
|
|
194
|
-
};
|
|
195
|
-
",
|
|
196
|
-
"CylinderPrimitive": "// Generated by https://github.com/foxglove/schemas
|
|
178
|
+
"CylinderPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
197
179
|
|
|
198
180
|
import { Color } from "./Color";
|
|
199
181
|
import { Pose } from "./Pose";
|
|
@@ -217,12 +199,25 @@ export type CylinderPrimitive = {
|
|
|
217
199
|
color: Color;
|
|
218
200
|
};
|
|
219
201
|
",
|
|
220
|
-
"
|
|
221
|
-
|
|
222
|
-
|
|
202
|
+
"CubePrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
203
|
+
|
|
204
|
+
import { Color } from "./Color";
|
|
205
|
+
import { Pose } from "./Pose";
|
|
206
|
+
import { Vector3 } from "./Vector3";
|
|
207
|
+
|
|
208
|
+
/** A primitive representing a cube or rectangular prism */
|
|
209
|
+
export type CubePrimitive = {
|
|
210
|
+
/** Position of the center of the cube and orientation of the cube */
|
|
211
|
+
pose: Pose;
|
|
212
|
+
|
|
213
|
+
/** Size of the cube along each axis */
|
|
214
|
+
size: Vector3;
|
|
215
|
+
|
|
216
|
+
/** Color of the cube */
|
|
217
|
+
color: Color;
|
|
223
218
|
};
|
|
224
219
|
",
|
|
225
|
-
"FrameTransform"
|
|
220
|
+
"FrameTransform" => "// Generated by https://github.com/foxglove/schemas
|
|
226
221
|
|
|
227
222
|
import { Quaternion } from "./Quaternion";
|
|
228
223
|
import { Time } from "./Time";
|
|
@@ -246,7 +241,7 @@ export type FrameTransform = {
|
|
|
246
241
|
rotation: Quaternion;
|
|
247
242
|
};
|
|
248
243
|
",
|
|
249
|
-
"FrameTransforms"
|
|
244
|
+
"FrameTransforms" => "// Generated by https://github.com/foxglove/schemas
|
|
250
245
|
|
|
251
246
|
import { FrameTransform } from "./FrameTransform";
|
|
252
247
|
|
|
@@ -256,7 +251,7 @@ export type FrameTransforms = {
|
|
|
256
251
|
transforms: FrameTransform[];
|
|
257
252
|
};
|
|
258
253
|
",
|
|
259
|
-
"GeoJSON"
|
|
254
|
+
"GeoJSON" => "// Generated by https://github.com/foxglove/schemas
|
|
260
255
|
|
|
261
256
|
/** GeoJSON data for annotating maps */
|
|
262
257
|
export type GeoJSON = {
|
|
@@ -264,7 +259,7 @@ export type GeoJSON = {
|
|
|
264
259
|
geojson: string;
|
|
265
260
|
};
|
|
266
261
|
",
|
|
267
|
-
"Grid"
|
|
262
|
+
"Grid" => "// Generated by https://github.com/foxglove/schemas
|
|
268
263
|
|
|
269
264
|
import { PackedElementField } from "./PackedElementField";
|
|
270
265
|
import { Pose } from "./Pose";
|
|
@@ -301,7 +296,7 @@ export type Grid = {
|
|
|
301
296
|
data: Uint8Array;
|
|
302
297
|
};
|
|
303
298
|
",
|
|
304
|
-
"ImageAnnotations"
|
|
299
|
+
"ImageAnnotations" => "// Generated by https://github.com/foxglove/schemas
|
|
305
300
|
|
|
306
301
|
import { CircleAnnotation } from "./CircleAnnotation";
|
|
307
302
|
import { PointsAnnotation } from "./PointsAnnotation";
|
|
@@ -319,7 +314,7 @@ export type ImageAnnotations = {
|
|
|
319
314
|
texts: TextAnnotation[];
|
|
320
315
|
};
|
|
321
316
|
",
|
|
322
|
-
"KeyValuePair"
|
|
317
|
+
"KeyValuePair" => "// Generated by https://github.com/foxglove/schemas
|
|
323
318
|
|
|
324
319
|
/** A key with its associated value */
|
|
325
320
|
export type KeyValuePair = {
|
|
@@ -330,7 +325,7 @@ export type KeyValuePair = {
|
|
|
330
325
|
value: string;
|
|
331
326
|
};
|
|
332
327
|
",
|
|
333
|
-
"LaserScan"
|
|
328
|
+
"LaserScan" => "// Generated by https://github.com/foxglove/schemas
|
|
334
329
|
|
|
335
330
|
import { Pose } from "./Pose";
|
|
336
331
|
import { Time } from "./Time";
|
|
@@ -359,7 +354,7 @@ export type LaserScan = {
|
|
|
359
354
|
intensities: number[];
|
|
360
355
|
};
|
|
361
356
|
",
|
|
362
|
-
"LinePrimitive"
|
|
357
|
+
"LinePrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
363
358
|
|
|
364
359
|
import { Color } from "./Color";
|
|
365
360
|
import { LineType } from "./LineType";
|
|
@@ -397,21 +392,7 @@ export type LinePrimitive = {
|
|
|
397
392
|
indices: number[];
|
|
398
393
|
};
|
|
399
394
|
",
|
|
400
|
-
"
|
|
401
|
-
|
|
402
|
-
/** An enumeration indicating how input points should be interpreted to create lines */
|
|
403
|
-
export enum LineType {
|
|
404
|
-
/** Connected line segments: 0-1, 1-2, ..., (n-1)-n */
|
|
405
|
-
LINE_STRIP = 0,
|
|
406
|
-
|
|
407
|
-
/** Closed polygon: 0-1, 1-2, ..., (n-1)-n, n-0 */
|
|
408
|
-
LINE_LOOP = 1,
|
|
409
|
-
|
|
410
|
-
/** Individual line segments: 0-1, 2-3, 4-5, ... */
|
|
411
|
-
LINE_LIST = 2,
|
|
412
|
-
}
|
|
413
|
-
",
|
|
414
|
-
"LocationFix": "// Generated by https://github.com/foxglove/schemas
|
|
395
|
+
"LocationFix" => "// Generated by https://github.com/foxglove/schemas
|
|
415
396
|
|
|
416
397
|
import { PositionCovarianceType } from "./PositionCovarianceType";
|
|
417
398
|
import { Time } from "./Time";
|
|
@@ -440,7 +421,7 @@ export type LocationFix = {
|
|
|
440
421
|
position_covariance_type: PositionCovarianceType;
|
|
441
422
|
};
|
|
442
423
|
",
|
|
443
|
-
"Log"
|
|
424
|
+
"Log" => "// Generated by https://github.com/foxglove/schemas
|
|
444
425
|
|
|
445
426
|
import { LogLevel } from "./LogLevel";
|
|
446
427
|
import { Time } from "./Time";
|
|
@@ -466,24 +447,97 @@ export type Log = {
|
|
|
466
447
|
line: number;
|
|
467
448
|
};
|
|
468
449
|
",
|
|
469
|
-
"
|
|
450
|
+
"SceneEntityDeletion" => "// Generated by https://github.com/foxglove/schemas
|
|
470
451
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
UNKNOWN = 0,
|
|
452
|
+
import { SceneEntityDeletionType } from "./SceneEntityDeletionType";
|
|
453
|
+
import { Time } from "./Time";
|
|
474
454
|
|
|
475
|
-
|
|
455
|
+
/** Command to remove previously published entities */
|
|
456
|
+
export type SceneEntityDeletion = {
|
|
457
|
+
/** Timestamp of the deletion. Only matching entities earlier than this timestamp will be deleted. */
|
|
458
|
+
timestamp: Time;
|
|
476
459
|
|
|
477
|
-
|
|
460
|
+
/** Type of deletion action to perform */
|
|
461
|
+
type: SceneEntityDeletionType;
|
|
478
462
|
|
|
479
|
-
|
|
463
|
+
/** Identifier which must match if \`type\` is \`MATCHING_ID\`. */
|
|
464
|
+
id: string;
|
|
465
|
+
};
|
|
466
|
+
",
|
|
467
|
+
"SceneEntity" => "// Generated by https://github.com/foxglove/schemas
|
|
480
468
|
|
|
481
|
-
|
|
469
|
+
import { ArrowPrimitive } from "./ArrowPrimitive";
|
|
470
|
+
import { CubePrimitive } from "./CubePrimitive";
|
|
471
|
+
import { CylinderPrimitive } from "./CylinderPrimitive";
|
|
472
|
+
import { Duration } from "./Duration";
|
|
473
|
+
import { KeyValuePair } from "./KeyValuePair";
|
|
474
|
+
import { LinePrimitive } from "./LinePrimitive";
|
|
475
|
+
import { ModelPrimitive } from "./ModelPrimitive";
|
|
476
|
+
import { SpherePrimitive } from "./SpherePrimitive";
|
|
477
|
+
import { TextPrimitive } from "./TextPrimitive";
|
|
478
|
+
import { Time } from "./Time";
|
|
479
|
+
import { TriangleListPrimitive } from "./TriangleListPrimitive";
|
|
482
480
|
|
|
483
|
-
|
|
484
|
-
|
|
481
|
+
/** A visual element in a 3D scene. An entity may be composed of multiple primitives which all share the same frame of reference. */
|
|
482
|
+
export type SceneEntity = {
|
|
483
|
+
/** Timestamp of the entity */
|
|
484
|
+
timestamp: Time;
|
|
485
|
+
|
|
486
|
+
/** Frame of reference */
|
|
487
|
+
frame_id: string;
|
|
488
|
+
|
|
489
|
+
/** Identifier for the entity. A entity will replace any prior entity on the same topic with the same \`id\`. */
|
|
490
|
+
id: string;
|
|
491
|
+
|
|
492
|
+
/** Length of time (relative to \`timestamp\`) after which the entity should be automatically removed. Zero value indicates the entity should remain visible until it is replaced or deleted. */
|
|
493
|
+
lifetime: Duration;
|
|
494
|
+
|
|
495
|
+
/** Whether the entity should keep its location in the fixed frame (false) or follow the frame specified in \`frame_id\` as it moves relative to the fixed frame (true) */
|
|
496
|
+
frame_locked: boolean;
|
|
497
|
+
|
|
498
|
+
/** Additional user-provided metadata associated with the entity. Keys must be unique. */
|
|
499
|
+
metadata: KeyValuePair[];
|
|
500
|
+
|
|
501
|
+
/** Arrow primitives */
|
|
502
|
+
arrows: ArrowPrimitive[];
|
|
503
|
+
|
|
504
|
+
/** Cube primitives */
|
|
505
|
+
cubes: CubePrimitive[];
|
|
506
|
+
|
|
507
|
+
/** Sphere primitives */
|
|
508
|
+
spheres: SpherePrimitive[];
|
|
509
|
+
|
|
510
|
+
/** Cylinder primitives */
|
|
511
|
+
cylinders: CylinderPrimitive[];
|
|
512
|
+
|
|
513
|
+
/** Line primitives */
|
|
514
|
+
lines: LinePrimitive[];
|
|
515
|
+
|
|
516
|
+
/** Triangle list primitives */
|
|
517
|
+
triangles: TriangleListPrimitive[];
|
|
518
|
+
|
|
519
|
+
/** Text primitives */
|
|
520
|
+
texts: TextPrimitive[];
|
|
521
|
+
|
|
522
|
+
/** Model primitives */
|
|
523
|
+
models: ModelPrimitive[];
|
|
524
|
+
};
|
|
525
|
+
",
|
|
526
|
+
"SceneUpdate" => "// Generated by https://github.com/foxglove/schemas
|
|
527
|
+
|
|
528
|
+
import { SceneEntity } from "./SceneEntity";
|
|
529
|
+
import { SceneEntityDeletion } from "./SceneEntityDeletion";
|
|
530
|
+
|
|
531
|
+
/** An update to the entities displayed in a 3D scene */
|
|
532
|
+
export type SceneUpdate = {
|
|
533
|
+
/** Scene entities to delete */
|
|
534
|
+
deletions: SceneEntityDeletion[];
|
|
535
|
+
|
|
536
|
+
/** Scene entities to add or replace */
|
|
537
|
+
entities: SceneEntity[];
|
|
538
|
+
};
|
|
485
539
|
",
|
|
486
|
-
"ModelPrimitive"
|
|
540
|
+
"ModelPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
487
541
|
|
|
488
542
|
import { Color } from "./Color";
|
|
489
543
|
import { Pose } from "./Pose";
|
|
@@ -513,30 +567,7 @@ export type ModelPrimitive = {
|
|
|
513
567
|
data: Uint8Array;
|
|
514
568
|
};
|
|
515
569
|
",
|
|
516
|
-
"
|
|
517
|
-
|
|
518
|
-
/** Numeric type */
|
|
519
|
-
export enum NumericType {
|
|
520
|
-
UNKNOWN = 0,
|
|
521
|
-
|
|
522
|
-
UINT8 = 1,
|
|
523
|
-
|
|
524
|
-
INT8 = 2,
|
|
525
|
-
|
|
526
|
-
UINT16 = 3,
|
|
527
|
-
|
|
528
|
-
INT16 = 4,
|
|
529
|
-
|
|
530
|
-
UINT32 = 5,
|
|
531
|
-
|
|
532
|
-
INT32 = 6,
|
|
533
|
-
|
|
534
|
-
FLOAT32 = 7,
|
|
535
|
-
|
|
536
|
-
FLOAT64 = 8,
|
|
537
|
-
}
|
|
538
|
-
",
|
|
539
|
-
"PackedElementField": "// Generated by https://github.com/foxglove/schemas
|
|
570
|
+
"PackedElementField" => "// Generated by https://github.com/foxglove/schemas
|
|
540
571
|
|
|
541
572
|
import { NumericType } from "./NumericType";
|
|
542
573
|
|
|
@@ -552,7 +583,7 @@ export type PackedElementField = {
|
|
|
552
583
|
type: NumericType;
|
|
553
584
|
};
|
|
554
585
|
",
|
|
555
|
-
"Point2"
|
|
586
|
+
"Point2" => "// Generated by https://github.com/foxglove/schemas
|
|
556
587
|
|
|
557
588
|
/** A point representing a position in 2D space */
|
|
558
589
|
export type Point2 = {
|
|
@@ -563,7 +594,7 @@ export type Point2 = {
|
|
|
563
594
|
y: number;
|
|
564
595
|
};
|
|
565
596
|
",
|
|
566
|
-
"Point3"
|
|
597
|
+
"Point3" => "// Generated by https://github.com/foxglove/schemas
|
|
567
598
|
|
|
568
599
|
/** A point representing a position in 3D space */
|
|
569
600
|
export type Point3 = {
|
|
@@ -577,7 +608,7 @@ export type Point3 = {
|
|
|
577
608
|
z: number;
|
|
578
609
|
};
|
|
579
610
|
",
|
|
580
|
-
"PointCloud"
|
|
611
|
+
"PointCloud" => "// Generated by https://github.com/foxglove/schemas
|
|
581
612
|
|
|
582
613
|
import { PackedElementField } from "./PackedElementField";
|
|
583
614
|
import { Pose } from "./Pose";
|
|
@@ -604,7 +635,7 @@ export type PointCloud = {
|
|
|
604
635
|
data: Uint8Array;
|
|
605
636
|
};
|
|
606
637
|
",
|
|
607
|
-
"PointsAnnotation"
|
|
638
|
+
"PointsAnnotation" => "// Generated by https://github.com/foxglove/schemas
|
|
608
639
|
|
|
609
640
|
import { Color } from "./Color";
|
|
610
641
|
import { Point2 } from "./Point2";
|
|
@@ -635,26 +666,7 @@ export type PointsAnnotation = {
|
|
|
635
666
|
thickness: number;
|
|
636
667
|
};
|
|
637
668
|
",
|
|
638
|
-
"
|
|
639
|
-
|
|
640
|
-
/** Type of points annotation */
|
|
641
|
-
export enum PointsAnnotationType {
|
|
642
|
-
UNKNOWN = 0,
|
|
643
|
-
|
|
644
|
-
/** Individual points: 0, 1, 2, ... */
|
|
645
|
-
POINTS = 1,
|
|
646
|
-
|
|
647
|
-
/** Closed polygon: 0-1, 1-2, ..., (n-1)-n, n-0 */
|
|
648
|
-
LINE_LOOP = 2,
|
|
649
|
-
|
|
650
|
-
/** Connected line segments: 0-1, 1-2, ..., (n-1)-n */
|
|
651
|
-
LINE_STRIP = 3,
|
|
652
|
-
|
|
653
|
-
/** Individual line segments: 0-1, 2-3, 4-5, ... */
|
|
654
|
-
LINE_LIST = 4,
|
|
655
|
-
}
|
|
656
|
-
",
|
|
657
|
-
"Pose": "// Generated by https://github.com/foxglove/schemas
|
|
669
|
+
"Pose" => "// Generated by https://github.com/foxglove/schemas
|
|
658
670
|
|
|
659
671
|
import { Quaternion } from "./Quaternion";
|
|
660
672
|
import { Vector3 } from "./Vector3";
|
|
@@ -668,7 +680,7 @@ export type Pose = {
|
|
|
668
680
|
orientation: Quaternion;
|
|
669
681
|
};
|
|
670
682
|
",
|
|
671
|
-
"PoseInFrame"
|
|
683
|
+
"PoseInFrame" => "// Generated by https://github.com/foxglove/schemas
|
|
672
684
|
|
|
673
685
|
import { Pose } from "./Pose";
|
|
674
686
|
import { Time } from "./Time";
|
|
@@ -685,7 +697,7 @@ export type PoseInFrame = {
|
|
|
685
697
|
pose: Pose;
|
|
686
698
|
};
|
|
687
699
|
",
|
|
688
|
-
"PosesInFrame"
|
|
700
|
+
"PosesInFrame" => "// Generated by https://github.com/foxglove/schemas
|
|
689
701
|
|
|
690
702
|
import { Pose } from "./Pose";
|
|
691
703
|
import { Time } from "./Time";
|
|
@@ -702,20 +714,7 @@ export type PosesInFrame = {
|
|
|
702
714
|
poses: Pose[];
|
|
703
715
|
};
|
|
704
716
|
",
|
|
705
|
-
"
|
|
706
|
-
|
|
707
|
-
/** Type of position covariance */
|
|
708
|
-
export enum PositionCovarianceType {
|
|
709
|
-
UNKNOWN = 0,
|
|
710
|
-
|
|
711
|
-
APPROXIMATED = 1,
|
|
712
|
-
|
|
713
|
-
DIAGONAL_KNOWN = 2,
|
|
714
|
-
|
|
715
|
-
KNOWN = 3,
|
|
716
|
-
}
|
|
717
|
-
",
|
|
718
|
-
"Quaternion": "// Generated by https://github.com/foxglove/schemas
|
|
717
|
+
"Quaternion" => "// Generated by https://github.com/foxglove/schemas
|
|
719
718
|
|
|
720
719
|
/** A [quaternion](https://eater.net/quaternions) representing a rotation in 3D space */
|
|
721
720
|
export type Quaternion = {
|
|
@@ -732,7 +731,7 @@ export type Quaternion = {
|
|
|
732
731
|
w: number;
|
|
733
732
|
};
|
|
734
733
|
",
|
|
735
|
-
"RawImage"
|
|
734
|
+
"RawImage" => "// Generated by https://github.com/foxglove/schemas
|
|
736
735
|
|
|
737
736
|
import { Time } from "./Time";
|
|
738
737
|
|
|
@@ -764,108 +763,7 @@ export type RawImage = {
|
|
|
764
763
|
data: Uint8Array;
|
|
765
764
|
};
|
|
766
765
|
",
|
|
767
|
-
"
|
|
768
|
-
|
|
769
|
-
import { ArrowPrimitive } from "./ArrowPrimitive";
|
|
770
|
-
import { CubePrimitive } from "./CubePrimitive";
|
|
771
|
-
import { CylinderPrimitive } from "./CylinderPrimitive";
|
|
772
|
-
import { Duration } from "./Duration";
|
|
773
|
-
import { KeyValuePair } from "./KeyValuePair";
|
|
774
|
-
import { LinePrimitive } from "./LinePrimitive";
|
|
775
|
-
import { ModelPrimitive } from "./ModelPrimitive";
|
|
776
|
-
import { SpherePrimitive } from "./SpherePrimitive";
|
|
777
|
-
import { TextPrimitive } from "./TextPrimitive";
|
|
778
|
-
import { Time } from "./Time";
|
|
779
|
-
import { TriangleListPrimitive } from "./TriangleListPrimitive";
|
|
780
|
-
|
|
781
|
-
/** A visual element in a 3D scene. An entity may be composed of multiple primitives which all share the same frame of reference. */
|
|
782
|
-
export type SceneEntity = {
|
|
783
|
-
/** Timestamp of the entity */
|
|
784
|
-
timestamp: Time;
|
|
785
|
-
|
|
786
|
-
/** Frame of reference */
|
|
787
|
-
frame_id: string;
|
|
788
|
-
|
|
789
|
-
/** Identifier for the entity. A entity will replace any prior entity on the same topic with the same \`id\`. */
|
|
790
|
-
id: string;
|
|
791
|
-
|
|
792
|
-
/** Length of time (relative to \`timestamp\`) after which the entity should be automatically removed. Zero value indicates the entity should remain visible until it is replaced or deleted. */
|
|
793
|
-
lifetime: Duration;
|
|
794
|
-
|
|
795
|
-
/** Whether the entity should keep its location in the fixed frame (false) or follow the frame specified in \`frame_id\` as it moves relative to the fixed frame (true) */
|
|
796
|
-
frame_locked: boolean;
|
|
797
|
-
|
|
798
|
-
/** Additional user-provided metadata associated with the entity. Keys must be unique. */
|
|
799
|
-
metadata: KeyValuePair[];
|
|
800
|
-
|
|
801
|
-
/** Arrow primitives */
|
|
802
|
-
arrows: ArrowPrimitive[];
|
|
803
|
-
|
|
804
|
-
/** Cube primitives */
|
|
805
|
-
cubes: CubePrimitive[];
|
|
806
|
-
|
|
807
|
-
/** Sphere primitives */
|
|
808
|
-
spheres: SpherePrimitive[];
|
|
809
|
-
|
|
810
|
-
/** Cylinder primitives */
|
|
811
|
-
cylinders: CylinderPrimitive[];
|
|
812
|
-
|
|
813
|
-
/** Line primitives */
|
|
814
|
-
lines: LinePrimitive[];
|
|
815
|
-
|
|
816
|
-
/** Triangle list primitives */
|
|
817
|
-
triangles: TriangleListPrimitive[];
|
|
818
|
-
|
|
819
|
-
/** Text primitives */
|
|
820
|
-
texts: TextPrimitive[];
|
|
821
|
-
|
|
822
|
-
/** Model primitives */
|
|
823
|
-
models: ModelPrimitive[];
|
|
824
|
-
};
|
|
825
|
-
",
|
|
826
|
-
"SceneEntityDeletion": "// Generated by https://github.com/foxglove/schemas
|
|
827
|
-
|
|
828
|
-
import { SceneEntityDeletionType } from "./SceneEntityDeletionType";
|
|
829
|
-
import { Time } from "./Time";
|
|
830
|
-
|
|
831
|
-
/** Command to remove previously published entities */
|
|
832
|
-
export type SceneEntityDeletion = {
|
|
833
|
-
/** Timestamp of the deletion. Only matching entities earlier than this timestamp will be deleted. */
|
|
834
|
-
timestamp: Time;
|
|
835
|
-
|
|
836
|
-
/** Type of deletion action to perform */
|
|
837
|
-
type: SceneEntityDeletionType;
|
|
838
|
-
|
|
839
|
-
/** Identifier which must match if \`type\` is \`MATCHING_ID\`. */
|
|
840
|
-
id: string;
|
|
841
|
-
};
|
|
842
|
-
",
|
|
843
|
-
"SceneEntityDeletionType": "// Generated by https://github.com/foxglove/schemas
|
|
844
|
-
|
|
845
|
-
/** An enumeration indicating which entities should match a SceneEntityDeletion command */
|
|
846
|
-
export enum SceneEntityDeletionType {
|
|
847
|
-
/** Delete the existing entity on the same topic that has the provided \`id\` */
|
|
848
|
-
MATCHING_ID = 0,
|
|
849
|
-
|
|
850
|
-
/** Delete all existing entities on the same topic */
|
|
851
|
-
ALL = 1,
|
|
852
|
-
}
|
|
853
|
-
",
|
|
854
|
-
"SceneUpdate": "// Generated by https://github.com/foxglove/schemas
|
|
855
|
-
|
|
856
|
-
import { SceneEntity } from "./SceneEntity";
|
|
857
|
-
import { SceneEntityDeletion } from "./SceneEntityDeletion";
|
|
858
|
-
|
|
859
|
-
/** An update to the entities displayed in a 3D scene */
|
|
860
|
-
export type SceneUpdate = {
|
|
861
|
-
/** Scene entities to delete */
|
|
862
|
-
deletions: SceneEntityDeletion[];
|
|
863
|
-
|
|
864
|
-
/** Scene entities to add or replace */
|
|
865
|
-
entities: SceneEntity[];
|
|
866
|
-
};
|
|
867
|
-
",
|
|
868
|
-
"SpherePrimitive": "// Generated by https://github.com/foxglove/schemas
|
|
766
|
+
"SpherePrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
869
767
|
|
|
870
768
|
import { Color } from "./Color";
|
|
871
769
|
import { Pose } from "./Pose";
|
|
@@ -883,7 +781,7 @@ export type SpherePrimitive = {
|
|
|
883
781
|
color: Color;
|
|
884
782
|
};
|
|
885
783
|
",
|
|
886
|
-
"TextAnnotation"
|
|
784
|
+
"TextAnnotation" => "// Generated by https://github.com/foxglove/schemas
|
|
887
785
|
|
|
888
786
|
import { Color } from "./Color";
|
|
889
787
|
import { Point2 } from "./Point2";
|
|
@@ -910,7 +808,7 @@ export type TextAnnotation = {
|
|
|
910
808
|
background_color: Color;
|
|
911
809
|
};
|
|
912
810
|
",
|
|
913
|
-
"TextPrimitive"
|
|
811
|
+
"TextPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
914
812
|
|
|
915
813
|
import { Color } from "./Color";
|
|
916
814
|
import { Pose } from "./Pose";
|
|
@@ -936,12 +834,7 @@ export type TextPrimitive = {
|
|
|
936
834
|
text: string;
|
|
937
835
|
};
|
|
938
836
|
",
|
|
939
|
-
"
|
|
940
|
-
sec: number;
|
|
941
|
-
nsec: number;
|
|
942
|
-
};
|
|
943
|
-
",
|
|
944
|
-
"TriangleListPrimitive": "// Generated by https://github.com/foxglove/schemas
|
|
837
|
+
"TriangleListPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
945
838
|
|
|
946
839
|
import { Color } from "./Color";
|
|
947
840
|
import { Point3 } from "./Point3";
|
|
@@ -969,7 +862,7 @@ export type TriangleListPrimitive = {
|
|
|
969
862
|
indices: number[];
|
|
970
863
|
};
|
|
971
864
|
",
|
|
972
|
-
"Vector2"
|
|
865
|
+
"Vector2" => "// Generated by https://github.com/foxglove/schemas
|
|
973
866
|
|
|
974
867
|
/** A vector in 2D space that represents a direction only */
|
|
975
868
|
export type Vector2 = {
|
|
@@ -980,7 +873,7 @@ export type Vector2 = {
|
|
|
980
873
|
y: number;
|
|
981
874
|
};
|
|
982
875
|
",
|
|
983
|
-
"Vector3"
|
|
876
|
+
"Vector3" => "// Generated by https://github.com/foxglove/schemas
|
|
984
877
|
|
|
985
878
|
/** A vector in 3D space that represents a direction only */
|
|
986
879
|
export type Vector3 = {
|
|
@@ -994,7 +887,114 @@ export type Vector3 = {
|
|
|
994
887
|
z: number;
|
|
995
888
|
};
|
|
996
889
|
",
|
|
997
|
-
"
|
|
890
|
+
"LineType" => "// Generated by https://github.com/foxglove/schemas
|
|
891
|
+
|
|
892
|
+
/** An enumeration indicating how input points should be interpreted to create lines */
|
|
893
|
+
export enum LineType {
|
|
894
|
+
/** Connected line segments: 0-1, 1-2, ..., (n-1)-n */
|
|
895
|
+
LINE_STRIP = 0,
|
|
896
|
+
|
|
897
|
+
/** Closed polygon: 0-1, 1-2, ..., (n-1)-n, n-0 */
|
|
898
|
+
LINE_LOOP = 1,
|
|
899
|
+
|
|
900
|
+
/** Individual line segments: 0-1, 2-3, 4-5, ... */
|
|
901
|
+
LINE_LIST = 2,
|
|
902
|
+
}
|
|
903
|
+
",
|
|
904
|
+
"LogLevel" => "// Generated by https://github.com/foxglove/schemas
|
|
905
|
+
|
|
906
|
+
/** Log level */
|
|
907
|
+
export enum LogLevel {
|
|
908
|
+
UNKNOWN = 0,
|
|
909
|
+
|
|
910
|
+
DEBUG = 1,
|
|
911
|
+
|
|
912
|
+
INFO = 2,
|
|
913
|
+
|
|
914
|
+
WARNING = 3,
|
|
915
|
+
|
|
916
|
+
ERROR = 4,
|
|
917
|
+
|
|
918
|
+
FATAL = 5,
|
|
919
|
+
}
|
|
920
|
+
",
|
|
921
|
+
"SceneEntityDeletionType" => "// Generated by https://github.com/foxglove/schemas
|
|
922
|
+
|
|
923
|
+
/** An enumeration indicating which entities should match a SceneEntityDeletion command */
|
|
924
|
+
export enum SceneEntityDeletionType {
|
|
925
|
+
/** Delete the existing entity on the same topic that has the provided \`id\` */
|
|
926
|
+
MATCHING_ID = 0,
|
|
927
|
+
|
|
928
|
+
/** Delete all existing entities on the same topic */
|
|
929
|
+
ALL = 1,
|
|
930
|
+
}
|
|
931
|
+
",
|
|
932
|
+
"NumericType" => "// Generated by https://github.com/foxglove/schemas
|
|
933
|
+
|
|
934
|
+
/** Numeric type */
|
|
935
|
+
export enum NumericType {
|
|
936
|
+
UNKNOWN = 0,
|
|
937
|
+
|
|
938
|
+
UINT8 = 1,
|
|
939
|
+
|
|
940
|
+
INT8 = 2,
|
|
941
|
+
|
|
942
|
+
UINT16 = 3,
|
|
943
|
+
|
|
944
|
+
INT16 = 4,
|
|
945
|
+
|
|
946
|
+
UINT32 = 5,
|
|
947
|
+
|
|
948
|
+
INT32 = 6,
|
|
949
|
+
|
|
950
|
+
FLOAT32 = 7,
|
|
951
|
+
|
|
952
|
+
FLOAT64 = 8,
|
|
953
|
+
}
|
|
954
|
+
",
|
|
955
|
+
"PointsAnnotationType" => "// Generated by https://github.com/foxglove/schemas
|
|
956
|
+
|
|
957
|
+
/** Type of points annotation */
|
|
958
|
+
export enum PointsAnnotationType {
|
|
959
|
+
UNKNOWN = 0,
|
|
960
|
+
|
|
961
|
+
/** Individual points: 0, 1, 2, ... */
|
|
962
|
+
POINTS = 1,
|
|
963
|
+
|
|
964
|
+
/** Closed polygon: 0-1, 1-2, ..., (n-1)-n, n-0 */
|
|
965
|
+
LINE_LOOP = 2,
|
|
966
|
+
|
|
967
|
+
/** Connected line segments: 0-1, 1-2, ..., (n-1)-n */
|
|
968
|
+
LINE_STRIP = 3,
|
|
969
|
+
|
|
970
|
+
/** Individual line segments: 0-1, 2-3, 4-5, ... */
|
|
971
|
+
LINE_LIST = 4,
|
|
972
|
+
}
|
|
973
|
+
",
|
|
974
|
+
"PositionCovarianceType" => "// Generated by https://github.com/foxglove/schemas
|
|
975
|
+
|
|
976
|
+
/** Type of position covariance */
|
|
977
|
+
export enum PositionCovarianceType {
|
|
978
|
+
UNKNOWN = 0,
|
|
979
|
+
|
|
980
|
+
APPROXIMATED = 1,
|
|
981
|
+
|
|
982
|
+
DIAGONAL_KNOWN = 2,
|
|
983
|
+
|
|
984
|
+
KNOWN = 3,
|
|
985
|
+
}
|
|
986
|
+
",
|
|
987
|
+
"Duration" => "export type Duration = {
|
|
988
|
+
sec: number;
|
|
989
|
+
nsec: number;
|
|
990
|
+
};
|
|
991
|
+
",
|
|
992
|
+
"Time" => "export type Time = {
|
|
993
|
+
sec: number;
|
|
994
|
+
nsec: number;
|
|
995
|
+
};
|
|
996
|
+
",
|
|
997
|
+
"index" => "export * from "./ArrowPrimitive";
|
|
998
998
|
export * from "./CameraCalibration";
|
|
999
999
|
export * from "./CircleAnnotation";
|
|
1000
1000
|
export * from "./Color";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Export schemas as TypeScript source code, keyed by the file base name (without `.ts` suffix).
|
|
3
|
+
*
|
|
4
|
+
* @returns a map of file base name => schema source.
|
|
5
|
+
*/
|
|
6
|
+
export declare function exportTypeScriptSchemas(): Map<string, string>;
|
|
7
|
+
//# sourceMappingURL=exportTypeScriptSchemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportTypeScriptSchemas.d.ts","sourceRoot":"","sources":["exportTypeScriptSchemas.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAyB7D"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.exportTypeScriptSchemas = void 0;
|
|
4
4
|
const generateTypeScript_1 = require("./generateTypeScript");
|
|
5
5
|
const schemas_1 = require("./schemas");
|
|
6
6
|
/**
|
|
7
|
-
* Export
|
|
7
|
+
* Export schemas as TypeScript source code, keyed by the file base name (without `.ts` suffix).
|
|
8
8
|
*
|
|
9
|
-
* @returns a
|
|
9
|
+
* @returns a map of file base name => schema source.
|
|
10
10
|
*/
|
|
11
|
-
function
|
|
12
|
-
const schemas =
|
|
11
|
+
function exportTypeScriptSchemas() {
|
|
12
|
+
const schemas = new Map();
|
|
13
13
|
for (const schema of Object.values(schemas_1.foxgloveMessageSchemas)) {
|
|
14
|
-
schemas
|
|
14
|
+
schemas.set(schema.name, (0, generateTypeScript_1.generateTypeScript)(schema));
|
|
15
15
|
}
|
|
16
16
|
for (const schema of Object.values(schemas_1.foxgloveEnumSchemas)) {
|
|
17
|
-
schemas
|
|
17
|
+
schemas.set(schema.name, (0, generateTypeScript_1.generateTypeScript)(schema));
|
|
18
18
|
}
|
|
19
|
-
schemas
|
|
20
|
-
schemas
|
|
19
|
+
schemas.set("Duration", generateTypeScript_1.DURATION_TS);
|
|
20
|
+
schemas.set("Time", generateTypeScript_1.TIME_TS);
|
|
21
21
|
const allSchemaNames = [
|
|
22
22
|
...Object.values(schemas_1.foxgloveMessageSchemas),
|
|
23
23
|
...Object.values(schemas_1.foxgloveEnumSchemas),
|
|
@@ -26,8 +26,8 @@ function exportTypescriptSchemata() {
|
|
|
26
26
|
for (const schema of allSchemaNames) {
|
|
27
27
|
indexTS += `export * from "./${schema.name}";\n`;
|
|
28
28
|
}
|
|
29
|
-
schemas
|
|
29
|
+
schemas.set("index", indexTS);
|
|
30
30
|
return schemas;
|
|
31
31
|
}
|
|
32
|
-
exports.
|
|
33
|
-
//# sourceMappingURL=
|
|
32
|
+
exports.exportTypeScriptSchemas = exportTypeScriptSchemas;
|
|
33
|
+
//# sourceMappingURL=exportTypeScriptSchemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportTypeScriptSchemas.js","sourceRoot":"","sources":["exportTypeScriptSchemas.ts"],"names":[],"mappings":";;;AAAA,6DAAgF;AAChF,uCAAwE;AAExE;;;;GAIG;AACH,SAAgB,uBAAuB;IACrC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE1C,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,gCAAsB,CAAC,EAAE;QAC1D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC,CAAC;KACtD;IAED,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,6BAAmB,CAAC,EAAE;QACvD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC,CAAC;KACtD;IAED,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,gCAAW,CAAC,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,4BAAO,CAAC,CAAC;IAE7B,MAAM,cAAc,GAAG;QACrB,GAAG,MAAM,CAAC,MAAM,CAAC,gCAAsB,CAAC;QACxC,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAmB,CAAC;KACtC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE;QACnC,OAAO,IAAI,oBAAoB,MAAM,CAAC,IAAI,MAAM,CAAC;KAClD;IACD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE9B,OAAO,OAAO,CAAC;AACjB,CAAC;AAzBD,0DAyBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportTypeScriptSchemas.test.d.ts","sourceRoot":"","sources":["exportTypeScriptSchemas.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const exportTypeScriptSchemas_1 = require("./exportTypeScriptSchemas");
|
|
4
|
+
describe("exportTypeScriptSchemas", () => {
|
|
5
|
+
it("exports schemas", () => {
|
|
6
|
+
const schemas = (0, exportTypeScriptSchemas_1.exportTypeScriptSchemas)();
|
|
7
|
+
expect(schemas).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=exportTypeScriptSchemas.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportTypeScriptSchemas.test.js","sourceRoot":"","sources":["exportTypeScriptSchemas.test.ts"],"names":[],"mappings":";;AAAA,uEAAoE;AAEpE,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACvC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;QACzB,MAAM,OAAO,GAAG,IAAA,iDAAuB,GAAE,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -2,23 +2,23 @@ import { DURATION_TS, TIME_TS, generateTypeScript } from "./generateTypeScript";
|
|
|
2
2
|
import { foxgloveEnumSchemas, foxgloveMessageSchemas } from "./schemas";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Export
|
|
5
|
+
* Export schemas as TypeScript source code, keyed by the file base name (without `.ts` suffix).
|
|
6
6
|
*
|
|
7
|
-
* @returns a
|
|
7
|
+
* @returns a map of file base name => schema source.
|
|
8
8
|
*/
|
|
9
|
-
export function
|
|
10
|
-
const schemas
|
|
9
|
+
export function exportTypeScriptSchemas(): Map<string, string> {
|
|
10
|
+
const schemas = new Map<string, string>();
|
|
11
11
|
|
|
12
12
|
for (const schema of Object.values(foxgloveMessageSchemas)) {
|
|
13
|
-
schemas
|
|
13
|
+
schemas.set(schema.name, generateTypeScript(schema));
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
for (const schema of Object.values(foxgloveEnumSchemas)) {
|
|
17
|
-
schemas
|
|
17
|
+
schemas.set(schema.name, generateTypeScript(schema));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
schemas
|
|
21
|
-
schemas
|
|
20
|
+
schemas.set("Duration", DURATION_TS);
|
|
21
|
+
schemas.set("Time", TIME_TS);
|
|
22
22
|
|
|
23
23
|
const allSchemaNames = [
|
|
24
24
|
...Object.values(foxgloveMessageSchemas),
|
|
@@ -28,7 +28,7 @@ export function exportTypescriptSchemata(): Record<string, string> {
|
|
|
28
28
|
for (const schema of allSchemaNames) {
|
|
29
29
|
indexTS += `export * from "./${schema.name}";\n`;
|
|
30
30
|
}
|
|
31
|
-
schemas
|
|
31
|
+
schemas.set("index", indexTS);
|
|
32
32
|
|
|
33
33
|
return schemas;
|
|
34
34
|
}
|
package/internal/index.d.ts
CHANGED
package/internal/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC"}
|
package/internal/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./
|
|
4
|
+
tslib_1.__exportStar(require("./exportTypeScriptSchemas"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./generateTypeScript"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./generateJsonSchema"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./generateProto"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./generateRos"), exports);
|
package/internal/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,+DAAqC;AACrC,+DAAqC;AACrC,0DAAgC;AAChC,wDAA8B;AAC9B,oDAA0B;AAC1B,kDAAwB"}
|
package/internal/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ const promises_1 = tslib_1.__importDefault(require("fs/promises"));
|
|
|
6
6
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
7
7
|
const rimraf_1 = tslib_1.__importDefault(require("rimraf"));
|
|
8
8
|
const internal_1 = require("../internal");
|
|
9
|
-
const
|
|
9
|
+
const exportTypeScriptSchemas_1 = require("../internal/exportTypeScriptSchemas");
|
|
10
10
|
const generateFlatbufferSchema_1 = require("../internal/generateFlatbufferSchema");
|
|
11
11
|
const generateJsonSchema_1 = require("../internal/generateJsonSchema");
|
|
12
12
|
const generateMarkdown_1 = require("../internal/generateMarkdown");
|
|
@@ -79,8 +79,8 @@ async function main({ outDir, rosOutDir }) {
|
|
|
79
79
|
});
|
|
80
80
|
await logProgress("Generating TypeScript definitions", async () => {
|
|
81
81
|
await promises_1.default.mkdir(path_1.default.join(outDir, "typescript"), { recursive: true });
|
|
82
|
-
const schemas = (0,
|
|
83
|
-
for (const [name, source] of
|
|
82
|
+
const schemas = (0, exportTypeScriptSchemas_1.exportTypeScriptSchemas)();
|
|
83
|
+
for (const [name, source] of schemas.entries()) {
|
|
84
84
|
await promises_1.default.writeFile(path_1.default.join(outDir, "typescript", `${name}.ts`), source);
|
|
85
85
|
}
|
|
86
86
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateGeneratedFiles.js","sourceRoot":"","sources":["updateGeneratedFiles.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,mEAA6B;AAC7B,wDAAwB;AACxB,4DAA4B;AAE5B,0CAAuE;AACvE,
|
|
1
|
+
{"version":3,"file":"updateGeneratedFiles.js","sourceRoot":"","sources":["updateGeneratedFiles.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,mEAA6B;AAC7B,wDAAwB;AACxB,4DAA4B;AAE5B,0CAAuE;AACvE,iFAA8E;AAC9E,mFAK8C;AAC9C,uEAAoE;AACpE,mEAAgE;AAChE,6DAA0D;AAC1D,iDAAkF;AAElF,KAAK,UAAU,WAAW,CAAC,OAAe,EAAE,IAAyB;IACnE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,MAAM,CAAC,CAAC;IACvC,MAAM,IAAI,EAAE,CAAC;IACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACjC,CAA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AM,kBAAE,CAAC,SAAS,CAAC,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;SAC3E;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACnD,MAAM,kBAAE,CAAC,SAAS,CAChB,cAAI,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,EAC9B,IAAA,mCAAgB,EAAC,MAAM,CAAC,MAAM,CAAC,gCAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,6BAAmB,CAAC,CAAC,CAC5F,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,mBAAO;KACJ,cAAc,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;KACzD,cAAc,CAAC,qBAAqB,EAAE,oDAAoD,CAAC;KAC3F,MAAM,CAAC,IAAI,CAAC,CAAC;AAEhB,mBAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import path from "path";
|
|
|
4
4
|
import rimraf from "rimraf";
|
|
5
5
|
|
|
6
6
|
import { generateRosMsg, generateRosMsgDefinition } from "../internal";
|
|
7
|
-
import {
|
|
7
|
+
import { exportTypeScriptSchemas } from "../internal/exportTypeScriptSchemas";
|
|
8
8
|
import {
|
|
9
9
|
BYTE_VECTOR_FB,
|
|
10
10
|
DURATION_FB,
|
|
@@ -101,8 +101,8 @@ async function main({ outDir, rosOutDir }: { outDir: string; rosOutDir: string }
|
|
|
101
101
|
|
|
102
102
|
await logProgress("Generating TypeScript definitions", async () => {
|
|
103
103
|
await fs.mkdir(path.join(outDir, "typescript"), { recursive: true });
|
|
104
|
-
const schemas =
|
|
105
|
-
for (const [name, source] of
|
|
104
|
+
const schemas = exportTypeScriptSchemas();
|
|
105
|
+
for (const [name, source] of schemas.entries()) {
|
|
106
106
|
await fs.writeFile(path.join(outDir, "typescript", `${name}.ts`), source);
|
|
107
107
|
}
|
|
108
108
|
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Export typescript schema as source, keyed by the schema name.
|
|
3
|
-
*
|
|
4
|
-
* @returns a record of schema name => schema source.
|
|
5
|
-
*/
|
|
6
|
-
export declare function exportTypescriptSchemata(): Record<string, string>;
|
|
7
|
-
//# sourceMappingURL=exportTypescriptSchemata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exportTypescriptSchemata.d.ts","sourceRoot":"","sources":["exportTypescriptSchemata.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAyBjE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exportTypescriptSchemata.js","sourceRoot":"","sources":["exportTypescriptSchemata.ts"],"names":[],"mappings":";;;AAAA,6DAAgF;AAChF,uCAAwE;AAExE;;;;GAIG;AACH,SAAgB,wBAAwB;IACtC,MAAM,OAAO,GAA2B,EAAE,CAAC;IAE3C,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,gCAAsB,CAAC,EAAE;QAC1D,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC;KACnD;IAED,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,6BAAmB,CAAC,EAAE;QACvD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAA,uCAAkB,EAAC,MAAM,CAAC,CAAC;KACnD;IAED,OAAO,CAAC,UAAU,CAAC,GAAG,gCAAW,CAAC;IAClC,OAAO,CAAC,MAAM,CAAC,GAAG,4BAAO,CAAC;IAE1B,MAAM,cAAc,GAAG;QACrB,GAAG,MAAM,CAAC,MAAM,CAAC,gCAAsB,CAAC;QACxC,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAmB,CAAC;KACtC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/C,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE;QACnC,OAAO,IAAI,oBAAoB,MAAM,CAAC,IAAI,MAAM,CAAC;KAClD;IACD,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAE3B,OAAO,OAAO,CAAC;AACjB,CAAC;AAzBD,4DAyBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exportTypescriptSchemata.test.d.ts","sourceRoot":"","sources":["exportTypescriptSchemata.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const exportTypescriptSchemata_1 = require("./exportTypescriptSchemata");
|
|
4
|
-
describe("exportTypescriptSchemata", () => {
|
|
5
|
-
it("exports schemata", () => {
|
|
6
|
-
const schemas = (0, exportTypescriptSchemata_1.exportTypescriptSchemata)();
|
|
7
|
-
expect(schemas).toMatchSnapshot();
|
|
8
|
-
});
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=exportTypescriptSchemata.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exportTypescriptSchemata.test.js","sourceRoot":"","sources":["exportTypescriptSchemata.test.ts"],"names":[],"mappings":";;AAAA,yEAAsE;AAEtE,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC1B,MAAM,OAAO,GAAG,IAAA,mDAAwB,GAAE,CAAC;QAC3C,MAAM,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|