Skip to content

Commit

Permalink
fix: pipe metadata along (#1178)
Browse files Browse the repository at this point in the history
* pipe metadata along

* Arrange imports back to where they were

* revert some automatic imports

* revert automatic import

* report metadata when it doesn’t exist yet

* should include metadata in result

* Remove only

* Removed setting metadata that is no longer used

* Add an assert fail

* Better check for metadata

* use bind instead

* revert changes for exposing metadata directly

* change stream emit metadata back
  • Loading branch information
danieljbruce committed Jan 27, 2023
1 parent dc3f9a0 commit 0822e4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ export class Bigtable {
gaxStream = requestFn!();
gaxStream
.on('error', stream.destroy.bind(stream))
.on('metadata', stream.emit.bind(stream, 'metadata'))
.on('request', stream.emit.bind(stream, 'request'))
.pipe(stream);
});
Expand All @@ -879,6 +880,9 @@ export class Bigtable {
.on('error', (err: Error) => {
stream.destroy(err);
})
.on('metadata', metadata => {
stream.emit('metadata', metadata);
})
.on('response', response => {
stream.emit('response', response);
})
Expand Down

0 comments on commit 0822e4d

Please sign in to comment.