@foxglove/schemas 1.5.1 → 1.6.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/.github/workflows/ci.yml +4 -0
- package/README.md +1 -1
- package/internal/__snapshots__/exportTypeScriptSchemas.test.ts.snap +68 -0
- package/internal/exportTypeScriptSchemas.d.ts +2 -1
- package/internal/exportTypeScriptSchemas.d.ts.map +1 -1
- package/internal/exportTypeScriptSchemas.js +3 -3
- package/internal/exportTypeScriptSchemas.js.map +1 -1
- package/internal/exportTypeScriptSchemas.ts +11 -4
- package/internal/generateFlatbufferSchema.test.js +2 -2
- package/internal/generateFlatbufferSchema.test.ts +2 -2
- package/internal/generateJsonSchema.test.js +4 -4
- package/internal/generateJsonSchema.test.ts +4 -4
- package/internal/generateOmgIdl.d.ts +5 -0
- package/internal/generateOmgIdl.d.ts.map +1 -0
- package/internal/generateOmgIdl.js +131 -0
- package/internal/generateOmgIdl.js.map +1 -0
- package/internal/generateOmgIdl.test.d.ts +2 -0
- package/internal/generateOmgIdl.test.d.ts.map +1 -0
- package/internal/generateOmgIdl.test.js +177 -0
- package/internal/generateOmgIdl.test.js.map +1 -0
- package/internal/generateOmgIdl.test.ts +187 -0
- package/internal/generateOmgIdl.ts +141 -0
- package/internal/generateProto.test.js +2 -2
- package/internal/generateProto.test.ts +2 -2
- package/internal/generateRos.test.js +24 -24
- package/internal/generateRos.test.js.map +1 -1
- package/internal/generateRos.test.ts +26 -24
- package/internal/generateTypeScript.d.ts +8 -1
- package/internal/generateTypeScript.d.ts.map +1 -1
- package/internal/generateTypeScript.js +21 -2
- package/internal/generateTypeScript.js.map +1 -1
- package/internal/generateTypeScript.test.js +101 -2
- package/internal/generateTypeScript.test.js.map +1 -1
- package/internal/generateTypeScript.test.ts +102 -2
- package/internal/generateTypeScript.ts +35 -2
- package/internal/schemas.d.ts +1 -0
- package/internal/schemas.d.ts.map +1 -1
- package/internal/schemas.js +28 -0
- package/internal/schemas.js.map +1 -1
- package/internal/schemas.ts +31 -0
- package/internal/testFixtures.js +2 -2
- package/internal/testFixtures.ts +2 -2
- package/package.json +2 -1
- package/schemas/README.md +67 -0
- package/schemas/flatbuffer/CompressedVideo.fbs +24 -0
- package/schemas/jsonschema/CompressedVideo.json +37 -0
- package/schemas/jsonschema/index.d.ts +37 -0
- package/schemas/jsonschema/index.d.ts.map +1 -1
- package/schemas/jsonschema/index.js +38 -1
- package/schemas/jsonschema/index.js.map +1 -1
- package/schemas/jsonschema/index.ts +38 -0
- package/schemas/omgidl/foxglove/ArrowPrimitive.idl +29 -0
- package/schemas/omgidl/foxglove/CameraCalibration.idl +75 -0
- package/schemas/omgidl/foxglove/CircleAnnotation.idl +30 -0
- package/schemas/omgidl/foxglove/Color.idl +24 -0
- package/schemas/omgidl/foxglove/CompressedImage.idl +24 -0
- package/schemas/omgidl/foxglove/CompressedVideo.idl +24 -0
- package/schemas/omgidl/foxglove/CubePrimitive.idl +21 -0
- package/schemas/omgidl/foxglove/CylinderPrimitive.idl +27 -0
- package/schemas/omgidl/foxglove/Duration.idl +8 -0
- package/schemas/omgidl/foxglove/FrameTransform.idl +27 -0
- package/schemas/omgidl/foxglove/FrameTransforms.idl +13 -0
- package/schemas/omgidl/foxglove/GeoJSON.idl +11 -0
- package/schemas/omgidl/foxglove/Grid.idl +40 -0
- package/schemas/omgidl/foxglove/ImageAnnotations.idl +21 -0
- package/schemas/omgidl/foxglove/KeyValuePair.idl +14 -0
- package/schemas/omgidl/foxglove/LaserScan.idl +32 -0
- package/schemas/omgidl/foxglove/LinePrimitive.idl +39 -0
- package/schemas/omgidl/foxglove/LineType.idl +20 -0
- package/schemas/omgidl/foxglove/LocationFix.idl +32 -0
- package/schemas/omgidl/foxglove/Log.idl +29 -0
- package/schemas/omgidl/foxglove/LogLevel.idl +26 -0
- package/schemas/omgidl/foxglove/ModelPrimitive.idl +33 -0
- package/schemas/omgidl/foxglove/NumericType.idl +35 -0
- package/schemas/omgidl/foxglove/PackedElementField.idl +19 -0
- package/schemas/omgidl/foxglove/Point2.idl +14 -0
- package/schemas/omgidl/foxglove/Point3.idl +17 -0
- package/schemas/omgidl/foxglove/PointCloud.idl +30 -0
- package/schemas/omgidl/foxglove/PointsAnnotation.idl +34 -0
- package/schemas/omgidl/foxglove/PointsAnnotationType.idl +27 -0
- package/schemas/omgidl/foxglove/Pose.idl +17 -0
- package/schemas/omgidl/foxglove/PoseInFrame.idl +20 -0
- package/schemas/omgidl/foxglove/PosesInFrame.idl +20 -0
- package/schemas/omgidl/foxglove/PositionCovarianceType.idl +20 -0
- package/schemas/omgidl/foxglove/Quaternion.idl +21 -0
- package/schemas/omgidl/foxglove/RawImage.idl +33 -0
- package/schemas/omgidl/foxglove/SceneEntity.idl +62 -0
- package/schemas/omgidl/foxglove/SceneEntityDeletion.idl +20 -0
- package/schemas/omgidl/foxglove/SceneEntityDeletionType.idl +16 -0
- package/schemas/omgidl/foxglove/SceneUpdate.idl +17 -0
- package/schemas/omgidl/foxglove/SpherePrimitive.idl +21 -0
- package/schemas/omgidl/foxglove/TextAnnotation.idl +31 -0
- package/schemas/omgidl/foxglove/TextPrimitive.idl +29 -0
- package/schemas/omgidl/foxglove/Time.idl +8 -0
- package/schemas/omgidl/foxglove/TriangleListPrimitive.idl +29 -0
- package/schemas/omgidl/foxglove/Vector2.idl +16 -0
- package/schemas/omgidl/foxglove/Vector3.idl +20 -0
- package/schemas/proto/foxglove/CompressedVideo.proto +24 -0
- package/schemas/ros1/CompressedVideo.msg +18 -0
- package/schemas/ros2/CompressedVideo.msg +18 -0
- package/schemas/typescript/ArrowPrimitive.d.ts.map +1 -1
- package/schemas/typescript/ArrowPrimitive.js +1 -0
- package/schemas/typescript/ArrowPrimitive.js.map +1 -1
- package/schemas/typescript/ArrowPrimitive.ts +1 -0
- package/schemas/typescript/CameraCalibration.d.ts.map +1 -1
- package/schemas/typescript/CameraCalibration.js +1 -0
- package/schemas/typescript/CameraCalibration.js.map +1 -1
- package/schemas/typescript/CameraCalibration.ts +1 -0
- package/schemas/typescript/CircleAnnotation.d.ts.map +1 -1
- package/schemas/typescript/CircleAnnotation.js +1 -0
- package/schemas/typescript/CircleAnnotation.js.map +1 -1
- package/schemas/typescript/CircleAnnotation.ts +1 -0
- package/schemas/typescript/Color.d.ts.map +1 -1
- package/schemas/typescript/Color.js +1 -0
- package/schemas/typescript/Color.js.map +1 -1
- package/schemas/typescript/Color.ts +1 -0
- package/schemas/typescript/CompressedImage.d.ts.map +1 -1
- package/schemas/typescript/CompressedImage.js +1 -0
- package/schemas/typescript/CompressedImage.js.map +1 -1
- package/schemas/typescript/CompressedImage.ts +1 -0
- package/schemas/typescript/CompressedVideo.d.ts +17 -0
- package/schemas/typescript/CompressedVideo.d.ts.map +1 -0
- package/schemas/typescript/CompressedVideo.js +5 -0
- package/schemas/typescript/CompressedVideo.js.map +1 -0
- package/schemas/typescript/CompressedVideo.ts +23 -0
- package/schemas/typescript/CubePrimitive.d.ts.map +1 -1
- package/schemas/typescript/CubePrimitive.js +1 -0
- package/schemas/typescript/CubePrimitive.js.map +1 -1
- package/schemas/typescript/CubePrimitive.ts +1 -0
- package/schemas/typescript/CylinderPrimitive.d.ts.map +1 -1
- package/schemas/typescript/CylinderPrimitive.js +1 -0
- package/schemas/typescript/CylinderPrimitive.js.map +1 -1
- package/schemas/typescript/CylinderPrimitive.ts +1 -0
- package/schemas/typescript/FrameTransform.d.ts.map +1 -1
- package/schemas/typescript/FrameTransform.js +1 -0
- package/schemas/typescript/FrameTransform.js.map +1 -1
- package/schemas/typescript/FrameTransform.ts +1 -0
- package/schemas/typescript/FrameTransforms.d.ts.map +1 -1
- package/schemas/typescript/FrameTransforms.js +1 -0
- package/schemas/typescript/FrameTransforms.js.map +1 -1
- package/schemas/typescript/FrameTransforms.ts +1 -0
- package/schemas/typescript/GeoJSON.d.ts.map +1 -1
- package/schemas/typescript/GeoJSON.js +1 -0
- package/schemas/typescript/GeoJSON.js.map +1 -1
- package/schemas/typescript/GeoJSON.ts +1 -0
- package/schemas/typescript/Grid.d.ts.map +1 -1
- package/schemas/typescript/Grid.js +1 -0
- package/schemas/typescript/Grid.js.map +1 -1
- package/schemas/typescript/Grid.ts +1 -0
- package/schemas/typescript/ImageAnnotations.d.ts.map +1 -1
- package/schemas/typescript/ImageAnnotations.js +1 -0
- package/schemas/typescript/ImageAnnotations.js.map +1 -1
- package/schemas/typescript/ImageAnnotations.ts +1 -0
- package/schemas/typescript/KeyValuePair.d.ts.map +1 -1
- package/schemas/typescript/KeyValuePair.js +1 -0
- package/schemas/typescript/KeyValuePair.js.map +1 -1
- package/schemas/typescript/KeyValuePair.ts +1 -0
- package/schemas/typescript/LaserScan.d.ts.map +1 -1
- package/schemas/typescript/LaserScan.js +1 -0
- package/schemas/typescript/LaserScan.js.map +1 -1
- package/schemas/typescript/LaserScan.ts +1 -0
- package/schemas/typescript/LinePrimitive.d.ts.map +1 -1
- package/schemas/typescript/LinePrimitive.js +1 -0
- package/schemas/typescript/LinePrimitive.js.map +1 -1
- package/schemas/typescript/LinePrimitive.ts +1 -0
- package/schemas/typescript/LineType.d.ts.map +1 -1
- package/schemas/typescript/LineType.js +1 -0
- package/schemas/typescript/LineType.js.map +1 -1
- package/schemas/typescript/LineType.ts +1 -0
- package/schemas/typescript/LocationFix.d.ts.map +1 -1
- package/schemas/typescript/LocationFix.js +1 -0
- package/schemas/typescript/LocationFix.js.map +1 -1
- package/schemas/typescript/LocationFix.ts +1 -0
- package/schemas/typescript/Log.d.ts.map +1 -1
- package/schemas/typescript/Log.js +1 -0
- package/schemas/typescript/Log.js.map +1 -1
- package/schemas/typescript/Log.ts +1 -0
- package/schemas/typescript/LogLevel.d.ts.map +1 -1
- package/schemas/typescript/LogLevel.js +1 -0
- package/schemas/typescript/LogLevel.js.map +1 -1
- package/schemas/typescript/LogLevel.ts +1 -0
- package/schemas/typescript/ModelPrimitive.d.ts.map +1 -1
- package/schemas/typescript/ModelPrimitive.js +1 -0
- package/schemas/typescript/ModelPrimitive.js.map +1 -1
- package/schemas/typescript/ModelPrimitive.ts +1 -0
- package/schemas/typescript/NumericType.d.ts.map +1 -1
- package/schemas/typescript/NumericType.js +1 -0
- package/schemas/typescript/NumericType.js.map +1 -1
- package/schemas/typescript/NumericType.ts +1 -0
- package/schemas/typescript/PackedElementField.d.ts.map +1 -1
- package/schemas/typescript/PackedElementField.js +1 -0
- package/schemas/typescript/PackedElementField.js.map +1 -1
- package/schemas/typescript/PackedElementField.ts +1 -0
- package/schemas/typescript/Point2.d.ts.map +1 -1
- package/schemas/typescript/Point2.js +1 -0
- package/schemas/typescript/Point2.js.map +1 -1
- package/schemas/typescript/Point2.ts +1 -0
- package/schemas/typescript/Point3.d.ts.map +1 -1
- package/schemas/typescript/Point3.js +1 -0
- package/schemas/typescript/Point3.js.map +1 -1
- package/schemas/typescript/Point3.ts +1 -0
- package/schemas/typescript/PointCloud.d.ts.map +1 -1
- package/schemas/typescript/PointCloud.js +1 -0
- package/schemas/typescript/PointCloud.js.map +1 -1
- package/schemas/typescript/PointCloud.ts +1 -0
- package/schemas/typescript/PointsAnnotation.d.ts.map +1 -1
- package/schemas/typescript/PointsAnnotation.js +1 -0
- package/schemas/typescript/PointsAnnotation.js.map +1 -1
- package/schemas/typescript/PointsAnnotation.ts +1 -0
- package/schemas/typescript/PointsAnnotationType.d.ts.map +1 -1
- package/schemas/typescript/PointsAnnotationType.js +1 -0
- package/schemas/typescript/PointsAnnotationType.js.map +1 -1
- package/schemas/typescript/PointsAnnotationType.ts +1 -0
- package/schemas/typescript/Pose.d.ts.map +1 -1
- package/schemas/typescript/Pose.js +1 -0
- package/schemas/typescript/Pose.js.map +1 -1
- package/schemas/typescript/Pose.ts +1 -0
- package/schemas/typescript/PoseInFrame.d.ts.map +1 -1
- package/schemas/typescript/PoseInFrame.js +1 -0
- package/schemas/typescript/PoseInFrame.js.map +1 -1
- package/schemas/typescript/PoseInFrame.ts +1 -0
- package/schemas/typescript/PosesInFrame.d.ts.map +1 -1
- package/schemas/typescript/PosesInFrame.js +1 -0
- package/schemas/typescript/PosesInFrame.js.map +1 -1
- package/schemas/typescript/PosesInFrame.ts +1 -0
- package/schemas/typescript/PositionCovarianceType.d.ts.map +1 -1
- package/schemas/typescript/PositionCovarianceType.js +1 -0
- package/schemas/typescript/PositionCovarianceType.js.map +1 -1
- package/schemas/typescript/PositionCovarianceType.ts +1 -0
- package/schemas/typescript/Quaternion.d.ts.map +1 -1
- package/schemas/typescript/Quaternion.js +1 -0
- package/schemas/typescript/Quaternion.js.map +1 -1
- package/schemas/typescript/Quaternion.ts +1 -0
- package/schemas/typescript/RawImage.d.ts.map +1 -1
- package/schemas/typescript/RawImage.js +1 -0
- package/schemas/typescript/RawImage.js.map +1 -1
- package/schemas/typescript/RawImage.ts +1 -0
- package/schemas/typescript/SceneEntity.d.ts.map +1 -1
- package/schemas/typescript/SceneEntity.js +1 -0
- package/schemas/typescript/SceneEntity.js.map +1 -1
- package/schemas/typescript/SceneEntity.ts +1 -0
- package/schemas/typescript/SceneEntityDeletion.d.ts.map +1 -1
- package/schemas/typescript/SceneEntityDeletion.js +1 -0
- package/schemas/typescript/SceneEntityDeletion.js.map +1 -1
- package/schemas/typescript/SceneEntityDeletion.ts +1 -0
- package/schemas/typescript/SceneEntityDeletionType.d.ts.map +1 -1
- package/schemas/typescript/SceneEntityDeletionType.js +1 -0
- package/schemas/typescript/SceneEntityDeletionType.js.map +1 -1
- package/schemas/typescript/SceneEntityDeletionType.ts +1 -0
- package/schemas/typescript/SceneUpdate.d.ts.map +1 -1
- package/schemas/typescript/SceneUpdate.js +1 -0
- package/schemas/typescript/SceneUpdate.js.map +1 -1
- package/schemas/typescript/SceneUpdate.ts +1 -0
- package/schemas/typescript/SpherePrimitive.d.ts.map +1 -1
- package/schemas/typescript/SpherePrimitive.js +1 -0
- package/schemas/typescript/SpherePrimitive.js.map +1 -1
- package/schemas/typescript/SpherePrimitive.ts +1 -0
- package/schemas/typescript/TextAnnotation.d.ts.map +1 -1
- package/schemas/typescript/TextAnnotation.js +1 -0
- package/schemas/typescript/TextAnnotation.js.map +1 -1
- package/schemas/typescript/TextAnnotation.ts +1 -0
- package/schemas/typescript/TextPrimitive.d.ts.map +1 -1
- package/schemas/typescript/TextPrimitive.js +1 -0
- package/schemas/typescript/TextPrimitive.js.map +1 -1
- package/schemas/typescript/TextPrimitive.ts +1 -0
- package/schemas/typescript/TriangleListPrimitive.d.ts.map +1 -1
- package/schemas/typescript/TriangleListPrimitive.js +1 -0
- package/schemas/typescript/TriangleListPrimitive.js.map +1 -1
- package/schemas/typescript/TriangleListPrimitive.ts +1 -0
- package/schemas/typescript/Vector2.d.ts.map +1 -1
- package/schemas/typescript/Vector2.js +1 -0
- package/schemas/typescript/Vector2.js.map +1 -1
- package/schemas/typescript/Vector2.ts +1 -0
- package/schemas/typescript/Vector3.d.ts.map +1 -1
- package/schemas/typescript/Vector3.js +1 -0
- package/schemas/typescript/Vector3.js.map +1 -1
- package/schemas/typescript/Vector3.ts +1 -0
- package/schemas/typescript/index.d.ts +1 -0
- package/schemas/typescript/index.d.ts.map +1 -1
- package/schemas/typescript/index.js +1 -0
- package/schemas/typescript/index.js.map +1 -1
- package/schemas/typescript/index.ts +1 -0
- package/scripts/updateGeneratedFiles.js +12 -0
- package/scripts/updateGeneratedFiles.js.map +1 -1
- package/scripts/updateGeneratedFiles.ts +19 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -20,6 +20,8 @@ jobs:
|
|
|
20
20
|
rm Linux.flatc.binary.clang++-12.zip
|
|
21
21
|
sudo mv flatc /usr/local/bin
|
|
22
22
|
- uses: arduino/setup-protoc@v1
|
|
23
|
+
with:
|
|
24
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
23
25
|
- uses: actions/setup-node@v3
|
|
24
26
|
with:
|
|
25
27
|
node-version: 16.x
|
|
@@ -69,6 +71,8 @@ jobs:
|
|
|
69
71
|
steps:
|
|
70
72
|
- uses: actions/checkout@v3
|
|
71
73
|
- uses: arduino/setup-protoc@v1
|
|
74
|
+
with:
|
|
75
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
72
76
|
- name: Install Flatbuffer compiler
|
|
73
77
|
run: |
|
|
74
78
|
curl -LO https://github.com/google/flatbuffers/releases/download/v23.1.21/Linux.flatc.binary.clang++-12.zip
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Message schemas supported by [Foxglove Studio](https://studio.foxglove.dev)
|
|
|
13
13
|
|
|
14
14
|
See [Foxglove Schemas documentation](https://foxglove.dev/docs/studio/messages).
|
|
15
15
|
|
|
16
|
-
The [schemas](./schemas) folder contains type definitions generated for ROS 1, ROS 2, Protobuf, JSON Schema, and
|
|
16
|
+
The [schemas](./schemas) folder contains type definitions generated for ROS 1, ROS 2, Protobuf, JSON Schema, TypeScript, and OMG IDL.
|
|
17
17
|
|
|
18
18
|
These schemas can be used in [MCAP](https://github.com/foxglove/mcap) files or [Foxglove WebSocket](https://github.com/foxglove/ws-protocol) servers to take advantage of Foxglove Studio's visualizations.
|
|
19
19
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
exports[`exportTypeScriptSchemas exports schemas 1`] = `
|
|
4
4
|
Map {
|
|
5
5
|
"ArrowPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
6
|
+
// Options: {}
|
|
6
7
|
|
|
7
8
|
import { Color } from "./Color";
|
|
8
9
|
import { Pose } from "./Pose";
|
|
@@ -29,6 +30,7 @@ export type ArrowPrimitive = {
|
|
|
29
30
|
};
|
|
30
31
|
",
|
|
31
32
|
"CameraCalibration" => "// Generated by https://github.com/foxglove/schemas
|
|
33
|
+
// Options: {}
|
|
32
34
|
|
|
33
35
|
import { Time } from "./Time";
|
|
34
36
|
|
|
@@ -109,6 +111,7 @@ export type CameraCalibration = {
|
|
|
109
111
|
};
|
|
110
112
|
",
|
|
111
113
|
"CircleAnnotation" => "// Generated by https://github.com/foxglove/schemas
|
|
114
|
+
// Options: {}
|
|
112
115
|
|
|
113
116
|
import { Color } from "./Color";
|
|
114
117
|
import { Point2 } from "./Point2";
|
|
@@ -136,6 +139,7 @@ export type CircleAnnotation = {
|
|
|
136
139
|
};
|
|
137
140
|
",
|
|
138
141
|
"Color" => "// Generated by https://github.com/foxglove/schemas
|
|
142
|
+
// Options: {}
|
|
139
143
|
|
|
140
144
|
/** A color in RGBA format */
|
|
141
145
|
export type Color = {
|
|
@@ -153,6 +157,7 @@ export type Color = {
|
|
|
153
157
|
};
|
|
154
158
|
",
|
|
155
159
|
"CompressedImage" => "// Generated by https://github.com/foxglove/schemas
|
|
160
|
+
// Options: {}
|
|
156
161
|
|
|
157
162
|
import { Time } from "./Time";
|
|
158
163
|
|
|
@@ -174,8 +179,33 @@ export type CompressedImage = {
|
|
|
174
179
|
*/
|
|
175
180
|
format: string;
|
|
176
181
|
};
|
|
182
|
+
",
|
|
183
|
+
"CompressedVideo" => "// Generated by https://github.com/foxglove/schemas
|
|
184
|
+
// Options: {}
|
|
185
|
+
|
|
186
|
+
import { Time } from "./Time";
|
|
187
|
+
|
|
188
|
+
/** A single frame of a compressed video bitstream */
|
|
189
|
+
export type CompressedVideo = {
|
|
190
|
+
/** Timestamp of image */
|
|
191
|
+
timestamp: Time;
|
|
192
|
+
|
|
193
|
+
/** Frame of reference for the image. The origin of the frame is the optical center of the camera. +x points to the right in the image, +y points down, and +z points into the plane of the image. */
|
|
194
|
+
frame_id: string;
|
|
195
|
+
|
|
196
|
+
/** Compressed video frame data. For packet-based video codecs this data must begin and end on packet boundaries (no partial packets), and must contain enough video packets to decode exactly one image (either a keyframe or delta frame). */
|
|
197
|
+
data: Uint8Array;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Video format
|
|
201
|
+
*
|
|
202
|
+
* Supported values: \`h264\`
|
|
203
|
+
*/
|
|
204
|
+
format: string;
|
|
205
|
+
};
|
|
177
206
|
",
|
|
178
207
|
"CylinderPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
208
|
+
// Options: {}
|
|
179
209
|
|
|
180
210
|
import { Color } from "./Color";
|
|
181
211
|
import { Pose } from "./Pose";
|
|
@@ -200,6 +230,7 @@ export type CylinderPrimitive = {
|
|
|
200
230
|
};
|
|
201
231
|
",
|
|
202
232
|
"CubePrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
233
|
+
// Options: {}
|
|
203
234
|
|
|
204
235
|
import { Color } from "./Color";
|
|
205
236
|
import { Pose } from "./Pose";
|
|
@@ -218,6 +249,7 @@ export type CubePrimitive = {
|
|
|
218
249
|
};
|
|
219
250
|
",
|
|
220
251
|
"FrameTransform" => "// Generated by https://github.com/foxglove/schemas
|
|
252
|
+
// Options: {}
|
|
221
253
|
|
|
222
254
|
import { Quaternion } from "./Quaternion";
|
|
223
255
|
import { Time } from "./Time";
|
|
@@ -242,6 +274,7 @@ export type FrameTransform = {
|
|
|
242
274
|
};
|
|
243
275
|
",
|
|
244
276
|
"FrameTransforms" => "// Generated by https://github.com/foxglove/schemas
|
|
277
|
+
// Options: {}
|
|
245
278
|
|
|
246
279
|
import { FrameTransform } from "./FrameTransform";
|
|
247
280
|
|
|
@@ -252,6 +285,7 @@ export type FrameTransforms = {
|
|
|
252
285
|
};
|
|
253
286
|
",
|
|
254
287
|
"GeoJSON" => "// Generated by https://github.com/foxglove/schemas
|
|
288
|
+
// Options: {}
|
|
255
289
|
|
|
256
290
|
/** GeoJSON data for annotating maps */
|
|
257
291
|
export type GeoJSON = {
|
|
@@ -260,6 +294,7 @@ export type GeoJSON = {
|
|
|
260
294
|
};
|
|
261
295
|
",
|
|
262
296
|
"Grid" => "// Generated by https://github.com/foxglove/schemas
|
|
297
|
+
// Options: {}
|
|
263
298
|
|
|
264
299
|
import { PackedElementField } from "./PackedElementField";
|
|
265
300
|
import { Pose } from "./Pose";
|
|
@@ -297,6 +332,7 @@ export type Grid = {
|
|
|
297
332
|
};
|
|
298
333
|
",
|
|
299
334
|
"ImageAnnotations" => "// Generated by https://github.com/foxglove/schemas
|
|
335
|
+
// Options: {}
|
|
300
336
|
|
|
301
337
|
import { CircleAnnotation } from "./CircleAnnotation";
|
|
302
338
|
import { PointsAnnotation } from "./PointsAnnotation";
|
|
@@ -315,6 +351,7 @@ export type ImageAnnotations = {
|
|
|
315
351
|
};
|
|
316
352
|
",
|
|
317
353
|
"KeyValuePair" => "// Generated by https://github.com/foxglove/schemas
|
|
354
|
+
// Options: {}
|
|
318
355
|
|
|
319
356
|
/** A key with its associated value */
|
|
320
357
|
export type KeyValuePair = {
|
|
@@ -326,6 +363,7 @@ export type KeyValuePair = {
|
|
|
326
363
|
};
|
|
327
364
|
",
|
|
328
365
|
"LaserScan" => "// Generated by https://github.com/foxglove/schemas
|
|
366
|
+
// Options: {}
|
|
329
367
|
|
|
330
368
|
import { Pose } from "./Pose";
|
|
331
369
|
import { Time } from "./Time";
|
|
@@ -355,6 +393,7 @@ export type LaserScan = {
|
|
|
355
393
|
};
|
|
356
394
|
",
|
|
357
395
|
"LinePrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
396
|
+
// Options: {}
|
|
358
397
|
|
|
359
398
|
import { Color } from "./Color";
|
|
360
399
|
import { LineType } from "./LineType";
|
|
@@ -393,6 +432,7 @@ export type LinePrimitive = {
|
|
|
393
432
|
};
|
|
394
433
|
",
|
|
395
434
|
"LocationFix" => "// Generated by https://github.com/foxglove/schemas
|
|
435
|
+
// Options: {}
|
|
396
436
|
|
|
397
437
|
import { PositionCovarianceType } from "./PositionCovarianceType";
|
|
398
438
|
import { Time } from "./Time";
|
|
@@ -422,6 +462,7 @@ export type LocationFix = {
|
|
|
422
462
|
};
|
|
423
463
|
",
|
|
424
464
|
"Log" => "// Generated by https://github.com/foxglove/schemas
|
|
465
|
+
// Options: {}
|
|
425
466
|
|
|
426
467
|
import { LogLevel } from "./LogLevel";
|
|
427
468
|
import { Time } from "./Time";
|
|
@@ -448,6 +489,7 @@ export type Log = {
|
|
|
448
489
|
};
|
|
449
490
|
",
|
|
450
491
|
"SceneEntityDeletion" => "// Generated by https://github.com/foxglove/schemas
|
|
492
|
+
// Options: {}
|
|
451
493
|
|
|
452
494
|
import { SceneEntityDeletionType } from "./SceneEntityDeletionType";
|
|
453
495
|
import { Time } from "./Time";
|
|
@@ -465,6 +507,7 @@ export type SceneEntityDeletion = {
|
|
|
465
507
|
};
|
|
466
508
|
",
|
|
467
509
|
"SceneEntity" => "// Generated by https://github.com/foxglove/schemas
|
|
510
|
+
// Options: {}
|
|
468
511
|
|
|
469
512
|
import { ArrowPrimitive } from "./ArrowPrimitive";
|
|
470
513
|
import { CubePrimitive } from "./CubePrimitive";
|
|
@@ -524,6 +567,7 @@ export type SceneEntity = {
|
|
|
524
567
|
};
|
|
525
568
|
",
|
|
526
569
|
"SceneUpdate" => "// Generated by https://github.com/foxglove/schemas
|
|
570
|
+
// Options: {}
|
|
527
571
|
|
|
528
572
|
import { SceneEntity } from "./SceneEntity";
|
|
529
573
|
import { SceneEntityDeletion } from "./SceneEntityDeletion";
|
|
@@ -538,6 +582,7 @@ export type SceneUpdate = {
|
|
|
538
582
|
};
|
|
539
583
|
",
|
|
540
584
|
"ModelPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
585
|
+
// Options: {}
|
|
541
586
|
|
|
542
587
|
import { Color } from "./Color";
|
|
543
588
|
import { Pose } from "./Pose";
|
|
@@ -568,6 +613,7 @@ export type ModelPrimitive = {
|
|
|
568
613
|
};
|
|
569
614
|
",
|
|
570
615
|
"PackedElementField" => "// Generated by https://github.com/foxglove/schemas
|
|
616
|
+
// Options: {}
|
|
571
617
|
|
|
572
618
|
import { NumericType } from "./NumericType";
|
|
573
619
|
|
|
@@ -584,6 +630,7 @@ export type PackedElementField = {
|
|
|
584
630
|
};
|
|
585
631
|
",
|
|
586
632
|
"Point2" => "// Generated by https://github.com/foxglove/schemas
|
|
633
|
+
// Options: {}
|
|
587
634
|
|
|
588
635
|
/** A point representing a position in 2D space */
|
|
589
636
|
export type Point2 = {
|
|
@@ -595,6 +642,7 @@ export type Point2 = {
|
|
|
595
642
|
};
|
|
596
643
|
",
|
|
597
644
|
"Point3" => "// Generated by https://github.com/foxglove/schemas
|
|
645
|
+
// Options: {}
|
|
598
646
|
|
|
599
647
|
/** A point representing a position in 3D space */
|
|
600
648
|
export type Point3 = {
|
|
@@ -609,6 +657,7 @@ export type Point3 = {
|
|
|
609
657
|
};
|
|
610
658
|
",
|
|
611
659
|
"PointCloud" => "// Generated by https://github.com/foxglove/schemas
|
|
660
|
+
// Options: {}
|
|
612
661
|
|
|
613
662
|
import { PackedElementField } from "./PackedElementField";
|
|
614
663
|
import { Pose } from "./Pose";
|
|
@@ -636,6 +685,7 @@ export type PointCloud = {
|
|
|
636
685
|
};
|
|
637
686
|
",
|
|
638
687
|
"PointsAnnotation" => "// Generated by https://github.com/foxglove/schemas
|
|
688
|
+
// Options: {}
|
|
639
689
|
|
|
640
690
|
import { Color } from "./Color";
|
|
641
691
|
import { Point2 } from "./Point2";
|
|
@@ -667,6 +717,7 @@ export type PointsAnnotation = {
|
|
|
667
717
|
};
|
|
668
718
|
",
|
|
669
719
|
"Pose" => "// Generated by https://github.com/foxglove/schemas
|
|
720
|
+
// Options: {}
|
|
670
721
|
|
|
671
722
|
import { Quaternion } from "./Quaternion";
|
|
672
723
|
import { Vector3 } from "./Vector3";
|
|
@@ -681,6 +732,7 @@ export type Pose = {
|
|
|
681
732
|
};
|
|
682
733
|
",
|
|
683
734
|
"PoseInFrame" => "// Generated by https://github.com/foxglove/schemas
|
|
735
|
+
// Options: {}
|
|
684
736
|
|
|
685
737
|
import { Pose } from "./Pose";
|
|
686
738
|
import { Time } from "./Time";
|
|
@@ -698,6 +750,7 @@ export type PoseInFrame = {
|
|
|
698
750
|
};
|
|
699
751
|
",
|
|
700
752
|
"PosesInFrame" => "// Generated by https://github.com/foxglove/schemas
|
|
753
|
+
// Options: {}
|
|
701
754
|
|
|
702
755
|
import { Pose } from "./Pose";
|
|
703
756
|
import { Time } from "./Time";
|
|
@@ -715,6 +768,7 @@ export type PosesInFrame = {
|
|
|
715
768
|
};
|
|
716
769
|
",
|
|
717
770
|
"Quaternion" => "// Generated by https://github.com/foxglove/schemas
|
|
771
|
+
// Options: {}
|
|
718
772
|
|
|
719
773
|
/** A [quaternion](https://eater.net/quaternions) representing a rotation in 3D space */
|
|
720
774
|
export type Quaternion = {
|
|
@@ -732,6 +786,7 @@ export type Quaternion = {
|
|
|
732
786
|
};
|
|
733
787
|
",
|
|
734
788
|
"RawImage" => "// Generated by https://github.com/foxglove/schemas
|
|
789
|
+
// Options: {}
|
|
735
790
|
|
|
736
791
|
import { Time } from "./Time";
|
|
737
792
|
|
|
@@ -764,6 +819,7 @@ export type RawImage = {
|
|
|
764
819
|
};
|
|
765
820
|
",
|
|
766
821
|
"SpherePrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
822
|
+
// Options: {}
|
|
767
823
|
|
|
768
824
|
import { Color } from "./Color";
|
|
769
825
|
import { Pose } from "./Pose";
|
|
@@ -782,6 +838,7 @@ export type SpherePrimitive = {
|
|
|
782
838
|
};
|
|
783
839
|
",
|
|
784
840
|
"TextAnnotation" => "// Generated by https://github.com/foxglove/schemas
|
|
841
|
+
// Options: {}
|
|
785
842
|
|
|
786
843
|
import { Color } from "./Color";
|
|
787
844
|
import { Point2 } from "./Point2";
|
|
@@ -809,6 +866,7 @@ export type TextAnnotation = {
|
|
|
809
866
|
};
|
|
810
867
|
",
|
|
811
868
|
"TextPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
869
|
+
// Options: {}
|
|
812
870
|
|
|
813
871
|
import { Color } from "./Color";
|
|
814
872
|
import { Pose } from "./Pose";
|
|
@@ -835,6 +893,7 @@ export type TextPrimitive = {
|
|
|
835
893
|
};
|
|
836
894
|
",
|
|
837
895
|
"TriangleListPrimitive" => "// Generated by https://github.com/foxglove/schemas
|
|
896
|
+
// Options: {}
|
|
838
897
|
|
|
839
898
|
import { Color } from "./Color";
|
|
840
899
|
import { Point3 } from "./Point3";
|
|
@@ -863,6 +922,7 @@ export type TriangleListPrimitive = {
|
|
|
863
922
|
};
|
|
864
923
|
",
|
|
865
924
|
"Vector2" => "// Generated by https://github.com/foxglove/schemas
|
|
925
|
+
// Options: {}
|
|
866
926
|
|
|
867
927
|
/** A vector in 2D space that represents a direction only */
|
|
868
928
|
export type Vector2 = {
|
|
@@ -874,6 +934,7 @@ export type Vector2 = {
|
|
|
874
934
|
};
|
|
875
935
|
",
|
|
876
936
|
"Vector3" => "// Generated by https://github.com/foxglove/schemas
|
|
937
|
+
// Options: {}
|
|
877
938
|
|
|
878
939
|
/** A vector in 3D space that represents a direction only */
|
|
879
940
|
export type Vector3 = {
|
|
@@ -888,6 +949,7 @@ export type Vector3 = {
|
|
|
888
949
|
};
|
|
889
950
|
",
|
|
890
951
|
"LineType" => "// Generated by https://github.com/foxglove/schemas
|
|
952
|
+
// Options: {}
|
|
891
953
|
|
|
892
954
|
/** An enumeration indicating how input points should be interpreted to create lines */
|
|
893
955
|
export enum LineType {
|
|
@@ -902,6 +964,7 @@ export enum LineType {
|
|
|
902
964
|
}
|
|
903
965
|
",
|
|
904
966
|
"LogLevel" => "// Generated by https://github.com/foxglove/schemas
|
|
967
|
+
// Options: {}
|
|
905
968
|
|
|
906
969
|
/** Log level */
|
|
907
970
|
export enum LogLevel {
|
|
@@ -919,6 +982,7 @@ export enum LogLevel {
|
|
|
919
982
|
}
|
|
920
983
|
",
|
|
921
984
|
"SceneEntityDeletionType" => "// Generated by https://github.com/foxglove/schemas
|
|
985
|
+
// Options: {}
|
|
922
986
|
|
|
923
987
|
/** An enumeration indicating which entities should match a SceneEntityDeletion command */
|
|
924
988
|
export enum SceneEntityDeletionType {
|
|
@@ -930,6 +994,7 @@ export enum SceneEntityDeletionType {
|
|
|
930
994
|
}
|
|
931
995
|
",
|
|
932
996
|
"NumericType" => "// Generated by https://github.com/foxglove/schemas
|
|
997
|
+
// Options: {}
|
|
933
998
|
|
|
934
999
|
/** Numeric type */
|
|
935
1000
|
export enum NumericType {
|
|
@@ -953,6 +1018,7 @@ export enum NumericType {
|
|
|
953
1018
|
}
|
|
954
1019
|
",
|
|
955
1020
|
"PointsAnnotationType" => "// Generated by https://github.com/foxglove/schemas
|
|
1021
|
+
// Options: {}
|
|
956
1022
|
|
|
957
1023
|
/** Type of points annotation */
|
|
958
1024
|
export enum PointsAnnotationType {
|
|
@@ -972,6 +1038,7 @@ export enum PointsAnnotationType {
|
|
|
972
1038
|
}
|
|
973
1039
|
",
|
|
974
1040
|
"PositionCovarianceType" => "// Generated by https://github.com/foxglove/schemas
|
|
1041
|
+
// Options: {}
|
|
975
1042
|
|
|
976
1043
|
/** Type of position covariance */
|
|
977
1044
|
export enum PositionCovarianceType {
|
|
@@ -999,6 +1066,7 @@ export * from "./CameraCalibration";
|
|
|
999
1066
|
export * from "./CircleAnnotation";
|
|
1000
1067
|
export * from "./Color";
|
|
1001
1068
|
export * from "./CompressedImage";
|
|
1069
|
+
export * from "./CompressedVideo";
|
|
1002
1070
|
export * from "./CubePrimitive";
|
|
1003
1071
|
export * from "./CylinderPrimitive";
|
|
1004
1072
|
export * from "./FrameTransform";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { GenerateTypeScriptOptions } from "./generateTypeScript";
|
|
1
2
|
/**
|
|
2
3
|
* Export schemas as TypeScript source code, keyed by the file base name (without `.ts` suffix).
|
|
3
4
|
*
|
|
4
5
|
* @returns a map of file base name => schema source.
|
|
5
6
|
*/
|
|
6
|
-
export declare function exportTypeScriptSchemas(): Map<string, string>;
|
|
7
|
+
export declare function exportTypeScriptSchemas(options?: GenerateTypeScriptOptions): Map<string, string>;
|
|
7
8
|
//# sourceMappingURL=exportTypeScriptSchemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportTypeScriptSchemas.d.ts","sourceRoot":"","sources":["exportTypeScriptSchemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exportTypeScriptSchemas.d.ts","sourceRoot":"","sources":["exportTypeScriptSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,yBAAyB,EAG1B,MAAM,sBAAsB,CAAC;AAG9B;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,yBAA8B,GACtC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAyBrB"}
|
|
@@ -8,13 +8,13 @@ const schemas_1 = require("./schemas");
|
|
|
8
8
|
*
|
|
9
9
|
* @returns a map of file base name => schema source.
|
|
10
10
|
*/
|
|
11
|
-
function exportTypeScriptSchemas() {
|
|
11
|
+
function exportTypeScriptSchemas(options = {}) {
|
|
12
12
|
const schemas = new Map();
|
|
13
13
|
for (const schema of Object.values(schemas_1.foxgloveMessageSchemas)) {
|
|
14
|
-
schemas.set(schema.name, (0, generateTypeScript_1.generateTypeScript)(schema));
|
|
14
|
+
schemas.set(schema.name, (0, generateTypeScript_1.generateTypeScript)(schema, options));
|
|
15
15
|
}
|
|
16
16
|
for (const schema of Object.values(schemas_1.foxgloveEnumSchemas)) {
|
|
17
|
-
schemas.set(schema.name, (0, generateTypeScript_1.generateTypeScript)(schema));
|
|
17
|
+
schemas.set(schema.name, (0, generateTypeScript_1.generateTypeScript)(schema, options));
|
|
18
18
|
}
|
|
19
19
|
schemas.set("Duration", generateTypeScript_1.DURATION_TS);
|
|
20
20
|
schemas.set("Time", generateTypeScript_1.TIME_TS);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportTypeScriptSchemas.js","sourceRoot":"","sources":["exportTypeScriptSchemas.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"exportTypeScriptSchemas.js","sourceRoot":"","sources":["exportTypeScriptSchemas.ts"],"names":[],"mappings":";;;AAAA,6DAK8B;AAC9B,uCAAwE;AAExE;;;;GAIG;AACH,SAAgB,uBAAuB,CACrC,UAAqC,EAAE;IAEvC,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,EAAE,OAAO,CAAC,CAAC,CAAC;KAC/D;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,EAAE,OAAO,CAAC,CAAC,CAAC;KAC/D;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;AA3BD,0DA2BC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
DURATION_TS,
|
|
3
|
+
GenerateTypeScriptOptions,
|
|
4
|
+
TIME_TS,
|
|
5
|
+
generateTypeScript,
|
|
6
|
+
} from "./generateTypeScript";
|
|
2
7
|
import { foxgloveEnumSchemas, foxgloveMessageSchemas } from "./schemas";
|
|
3
8
|
|
|
4
9
|
/**
|
|
@@ -6,15 +11,17 @@ import { foxgloveEnumSchemas, foxgloveMessageSchemas } from "./schemas";
|
|
|
6
11
|
*
|
|
7
12
|
* @returns a map of file base name => schema source.
|
|
8
13
|
*/
|
|
9
|
-
export function exportTypeScriptSchemas(
|
|
14
|
+
export function exportTypeScriptSchemas(
|
|
15
|
+
options: GenerateTypeScriptOptions = {},
|
|
16
|
+
): Map<string, string> {
|
|
10
17
|
const schemas = new Map<string, string>();
|
|
11
18
|
|
|
12
19
|
for (const schema of Object.values(foxgloveMessageSchemas)) {
|
|
13
|
-
schemas.set(schema.name, generateTypeScript(schema));
|
|
20
|
+
schemas.set(schema.name, generateTypeScript(schema, options));
|
|
14
21
|
}
|
|
15
22
|
|
|
16
23
|
for (const schema of Object.values(foxgloveEnumSchemas)) {
|
|
17
|
-
schemas.set(schema.name, generateTypeScript(schema));
|
|
24
|
+
schemas.set(schema.name, generateTypeScript(schema, options));
|
|
18
25
|
}
|
|
19
26
|
|
|
20
27
|
schemas.set("Duration", DURATION_TS);
|
|
@@ -112,12 +112,12 @@ describe("generateJsonSchema", () => {
|
|
|
112
112
|
"description": "An enum field",
|
|
113
113
|
"oneOf": [
|
|
114
114
|
{
|
|
115
|
-
"const":
|
|
115
|
+
"const": 0,
|
|
116
116
|
"description": "Value A",
|
|
117
117
|
"title": "A",
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
|
-
"const":
|
|
120
|
+
"const": 1,
|
|
121
121
|
"description": "Value B",
|
|
122
122
|
"title": "B",
|
|
123
123
|
},
|
|
@@ -130,12 +130,12 @@ describe("generateJsonSchema", () => {
|
|
|
130
130
|
"description": "An enum array field",
|
|
131
131
|
"oneOf": [
|
|
132
132
|
{
|
|
133
|
-
"const":
|
|
133
|
+
"const": 0,
|
|
134
134
|
"description": "Value A",
|
|
135
135
|
"title": "A",
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
|
-
"const":
|
|
138
|
+
"const": 1,
|
|
139
139
|
"description": "Value B",
|
|
140
140
|
"title": "B",
|
|
141
141
|
},
|
|
@@ -111,12 +111,12 @@ describe("generateJsonSchema", () => {
|
|
|
111
111
|
"description": "An enum field",
|
|
112
112
|
"oneOf": [
|
|
113
113
|
{
|
|
114
|
-
"const":
|
|
114
|
+
"const": 0,
|
|
115
115
|
"description": "Value A",
|
|
116
116
|
"title": "A",
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
|
-
"const":
|
|
119
|
+
"const": 1,
|
|
120
120
|
"description": "Value B",
|
|
121
121
|
"title": "B",
|
|
122
122
|
},
|
|
@@ -129,12 +129,12 @@ describe("generateJsonSchema", () => {
|
|
|
129
129
|
"description": "An enum array field",
|
|
130
130
|
"oneOf": [
|
|
131
131
|
{
|
|
132
|
-
"const":
|
|
132
|
+
"const": 0,
|
|
133
133
|
"description": "Value A",
|
|
134
134
|
"title": "A",
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
|
-
"const":
|
|
137
|
+
"const": 1,
|
|
138
138
|
"description": "Value B",
|
|
139
139
|
"title": "B",
|
|
140
140
|
},
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FoxgloveSchema } from "./types";
|
|
2
|
+
export declare const TIME_IDL = "module foxglove {\n\nstruct Time {\n uint32 sec;\n uint32 nsec;\n};\n\n};\n";
|
|
3
|
+
export declare const DURATION_IDL = "module foxglove {\n\nstruct Duration {\n int32 sec;\n uint32 nsec;\n};\n\n};\n";
|
|
4
|
+
export declare function generateOmgIdl(schema: FoxgloveSchema): string;
|
|
5
|
+
//# sourceMappingURL=generateOmgIdl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateOmgIdl.d.ts","sourceRoot":"","sources":["generateOmgIdl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,SAAS,CAAC;AAiB5D,eAAO,MAAM,QAAQ,kFASpB,CAAC;AAEF,eAAO,MAAM,YAAY,qFASxB,CAAC;AAEF,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAqG7D"}
|