@foxglove/rosbag2
Advanced tools
Comparing version
@@ -13,6 +13,6 @@ "use strict"; | ||
} | ||
next() { | ||
async next() { | ||
const res = this.dbIterator.next(); | ||
if (res.done === true) { | ||
return Promise.resolve({ value: undefined, done: true }); | ||
return { value: undefined, done: true }; | ||
} | ||
@@ -28,3 +28,3 @@ else { | ||
const value = { topic, timestamp, data: row.data }; | ||
return Promise.resolve({ value, done: false }); | ||
return { value, done: false }; | ||
} | ||
@@ -31,0 +31,0 @@ } |
@@ -99,3 +99,3 @@ "use strict"; | ||
} | ||
readTopics() { | ||
async readTopics() { | ||
if (this.databases_ == undefined) { | ||
@@ -105,6 +105,6 @@ throw new Error("Cannot read topics before opening rosbag"); | ||
if (this.databases_.length === 0) { | ||
return Promise.resolve([]); | ||
return []; | ||
} | ||
const firstDb = this.databases_[0]; | ||
return firstDb.readTopics(); | ||
return await firstDb.readTopics(); | ||
} | ||
@@ -111,0 +111,0 @@ readMessages(opts = {}) { |
{ | ||
"name": "@foxglove/rosbag2", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "ROS2 (Robot Operating System) bag reader and writer abstract implementation", | ||
@@ -23,4 +23,4 @@ "license": "MIT", | ||
"author": { | ||
"name": "Foxglove Technologies", | ||
"email": "support@foxglove.dev" | ||
"name": "Foxglove Technologies Inc", | ||
"email": "contact@foxglove.dev" | ||
}, | ||
@@ -43,24 +43,25 @@ "homepage": "https://github.com/foxglove/rosbag2", | ||
"devDependencies": { | ||
"@foxglove/eslint-plugin": "0.10.0", | ||
"@types/eslint": "^7", | ||
"@foxglove/eslint-plugin": "0.13.0", | ||
"@types/eslint": "^7.28.0", | ||
"@types/eslint-plugin-prettier": "^3", | ||
"@types/jest": "^26.0.23", | ||
"@types/js-yaml": "^4.0.1", | ||
"@types/prettier": "2.3.0", | ||
"@typescript-eslint/eslint-plugin": "4.28.0", | ||
"@typescript-eslint/parser": "4.28.0", | ||
"esbuild": "0.12.12", | ||
"@types/jest": "^26.0.24", | ||
"@types/js-yaml": "^4.0.2", | ||
"@types/prettier": "2.3.2", | ||
"@typescript-eslint/eslint-plugin": "4.28.4", | ||
"@typescript-eslint/parser": "4.28.4", | ||
"esbuild": "0.12.15", | ||
"esbuild-jest": "0.5.0", | ||
"eslint": "7.29.0", | ||
"eslint": "7.31.0", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint-plugin-filenames": "^1.3.2", | ||
"eslint-plugin-import": "2.23.4", | ||
"eslint-plugin-jest": "24.3.6", | ||
"eslint-plugin-prettier": "3.4.0", | ||
"jest": "27.0.5", | ||
"prettier": "2.3.1", | ||
"typescript": "4.3.4" | ||
"jest": "27.0.6", | ||
"prettier": "2.3.2", | ||
"typescript": "4.3.5" | ||
}, | ||
"dependencies": { | ||
"@foxglove/rosmsg-msgs-common": "^1.0.0", | ||
"@foxglove/rosmsg2-serialization": "^0.2.0", | ||
"@foxglove/rosmsg2-serialization": "^1.0.0", | ||
"@foxglove/rostime": "^1.1.0", | ||
@@ -67,0 +68,0 @@ "js-yaml": "^4.1.0" |
@@ -24,6 +24,6 @@ import { fromNanoSec } from "@foxglove/rostime"; | ||
next(): Promise<IteratorResult<RawMessage>> { | ||
async next(): Promise<IteratorResult<RawMessage>> { | ||
const res = this.dbIterator.next(); | ||
if (res.done === true) { | ||
return Promise.resolve({ value: undefined, done: true }); | ||
return { value: undefined, done: true }; | ||
} else { | ||
@@ -40,5 +40,5 @@ const row = res.value; | ||
const value: RawMessage = { topic, timestamp, data: row.data }; | ||
return Promise.resolve({ value, done: false }); | ||
return { value, done: false }; | ||
} | ||
} | ||
} |
@@ -116,3 +116,3 @@ import { RosMsgDefinition } from "@foxglove/rosmsg"; | ||
readTopics(): Promise<TopicDefinition[]> { | ||
async readTopics(): Promise<TopicDefinition[]> { | ||
if (this.databases_ == undefined) { | ||
@@ -123,7 +123,7 @@ throw new Error("Cannot read topics before opening rosbag"); | ||
if (this.databases_.length === 0) { | ||
return Promise.resolve([]); | ||
return []; | ||
} | ||
const firstDb = this.databases_[0]!; | ||
return firstDb.readTopics(); | ||
return await firstDb.readTopics(); | ||
} | ||
@@ -130,0 +130,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
86767
-0.08%19
5.56%+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed