tardis-machine
Advanced tools
Comparing version 3.7.4 to 3.7.5
@@ -7,3 +7,5 @@ import { ComputableFactory, Disconnect, MapperFactory, NormalizedData, ReplayNormalizedOptions, StreamNormalizedOptions } from 'tardis-dev'; | ||
export declare type ReplayNormalizedRequestOptions = ReplayNormalizedOptionsWithDataType | ReplayNormalizedOptionsWithDataType[]; | ||
export declare type StreamNormalizedOptionsWithDataType = StreamNormalizedOptions<any, any> & WithDataType; | ||
export declare type StreamNormalizedOptionsWithDataType = StreamNormalizedOptions<any, any> & WithDataType & { | ||
withErrorMessages?: boolean; | ||
}; | ||
export declare type StreamNormalizedRequestOptions = StreamNormalizedOptionsWithDataType | StreamNormalizedOptionsWithDataType[]; | ||
@@ -10,0 +12,0 @@ export declare function getNormalizers(dataTypes: string[]): IterableIterator<MapperFactory<any, any>>; |
@@ -32,2 +32,10 @@ "use strict"; | ||
subSequentErrorsCount[exchange]++; | ||
if (option.withErrorMessages && !ws.closed) { | ||
ws.send(JSON.stringify({ | ||
type: 'error', | ||
exchange, | ||
localTimestamp: new Date(), | ||
details: error.message | ||
})); | ||
} | ||
(0, debug_1.debug)('WebSocket /ws-stream-normalized %s WS connection error: %o', exchange, error); | ||
@@ -34,0 +42,0 @@ } |
{ | ||
"name": "tardis-machine", | ||
"version": "3.7.4", | ||
"version": "3.7.5", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=12" |
@@ -26,3 +26,3 @@ import { | ||
export type StreamNormalizedOptionsWithDataType = StreamNormalizedOptions<any, any> & WithDataType | ||
export type StreamNormalizedOptionsWithDataType = StreamNormalizedOptions<any, any> & WithDataType & { withErrorMessages?: boolean } | ||
@@ -29,0 +29,0 @@ export type StreamNormalizedRequestOptions = StreamNormalizedOptionsWithDataType | StreamNormalizedOptionsWithDataType[] |
@@ -35,2 +35,13 @@ import qs from 'querystring' | ||
if (option.withErrorMessages && !ws.closed) { | ||
ws.send( | ||
JSON.stringify({ | ||
type: 'error', | ||
exchange, | ||
localTimestamp: new Date(), | ||
details: error.message | ||
}) | ||
) | ||
} | ||
debug('WebSocket /ws-stream-normalized %s WS connection error: %o', exchange, error) | ||
@@ -37,0 +48,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
176825
3040