@melloware/react-logviewer
Advanced tools
Comparing version 5.2.4 to 5.3.0
@@ -19,3 +19,3 @@ import { List } from "immutable"; | ||
/** | ||
* Callback allback which formats the websocket data stream. | ||
* Callback which formats the websocket data stream. | ||
*/ | ||
@@ -33,2 +33,33 @@ formatMessage?: ((message: any) => string) | undefined; | ||
} | ||
export interface EventSourceOptions { | ||
/** | ||
* Boolean indicating if CORS should be set to include credentials | ||
*/ | ||
withCredentials?: boolean; | ||
/** | ||
* Callback when the eventsource is opened | ||
*/ | ||
onOpen?: ((e: Event, eventSource: EventSource) => void) | undefined; | ||
/** | ||
* Callback when the eventsource is closed | ||
*/ | ||
onClose?: ((e: Event) => void) | undefined; | ||
/** | ||
* Callback when the eventsource has an error | ||
*/ | ||
onError?: ((e: Event) => void) | undefined; | ||
/** | ||
* Callback which formats the eventsource data stream. | ||
*/ | ||
formatMessage?: ((message: any) => string) | undefined; | ||
/** | ||
* Set to true, to reconnect the EventSource automatically. | ||
*/ | ||
reconnect?: boolean; | ||
/** | ||
* Set the time to wait between reconnects in seconds. | ||
* Default is 1s | ||
*/ | ||
reconnectWait?: number; | ||
} | ||
export interface ErrorStatus extends Error { | ||
@@ -243,2 +274,11 @@ /** | ||
/** | ||
* Set to `true` to specify that url is an eventsource URL. | ||
* Defaults to `false` to download data until completion. | ||
*/ | ||
eventsource?: boolean; | ||
/** | ||
* Options object which will be passed through to evensource. | ||
*/ | ||
eventsourceOptions?: EventSourceOptions; | ||
/** | ||
* Set the width in pixels for the component. | ||
@@ -245,0 +285,0 @@ * Defaults to `'auto'` if unspecified. |
@@ -19,3 +19,3 @@ import { List } from "immutable"; | ||
/** | ||
* Callback allback which formats the websocket data stream. | ||
* Callback which formats the websocket data stream. | ||
*/ | ||
@@ -33,2 +33,33 @@ formatMessage?: ((message: any) => string) | undefined; | ||
} | ||
export interface EventSourceOptions { | ||
/** | ||
* Boolean indicating if CORS should be set to include credentials | ||
*/ | ||
withCredentials?: boolean; | ||
/** | ||
* Callback when the eventsource is opened | ||
*/ | ||
onOpen?: ((e: Event, eventSource: EventSource) => void) | undefined; | ||
/** | ||
* Callback when the eventsource is closed | ||
*/ | ||
onClose?: ((e: Event) => void) | undefined; | ||
/** | ||
* Callback when the eventsource has an error | ||
*/ | ||
onError?: ((e: Event) => void) | undefined; | ||
/** | ||
* Callback which formats the eventsource data stream. | ||
*/ | ||
formatMessage?: ((message: any) => string) | undefined; | ||
/** | ||
* Set to true, to reconnect the EventSource automatically. | ||
*/ | ||
reconnect?: boolean; | ||
/** | ||
* Set the time to wait between reconnects in seconds. | ||
* Default is 1s | ||
*/ | ||
reconnectWait?: number; | ||
} | ||
export interface ErrorStatus extends Error { | ||
@@ -243,2 +274,11 @@ /** | ||
/** | ||
* Set to `true` to specify that url is an eventsource URL. | ||
* Defaults to `false` to download data until completion. | ||
*/ | ||
eventsource?: boolean; | ||
/** | ||
* Options object which will be passed through to evensource. | ||
*/ | ||
eventsourceOptions?: EventSourceOptions; | ||
/** | ||
* Set the width in pixels for the component. | ||
@@ -245,0 +285,0 @@ * Defaults to `'auto'` if unspecified. |
@@ -114,3 +114,3 @@ import * as mitt from 'mitt'; | ||
/** | ||
* Callback allback which formats the websocket data stream. | ||
* Callback which formats the websocket data stream. | ||
*/ | ||
@@ -128,2 +128,33 @@ formatMessage?: ((message: any) => string) | undefined; | ||
} | ||
interface EventSourceOptions { | ||
/** | ||
* Boolean indicating if CORS should be set to include credentials | ||
*/ | ||
withCredentials?: boolean; | ||
/** | ||
* Callback when the eventsource is opened | ||
*/ | ||
onOpen?: ((e: Event, eventSource: EventSource) => void) | undefined; | ||
/** | ||
* Callback when the eventsource is closed | ||
*/ | ||
onClose?: ((e: Event) => void) | undefined; | ||
/** | ||
* Callback when the eventsource has an error | ||
*/ | ||
onError?: ((e: Event) => void) | undefined; | ||
/** | ||
* Callback which formats the eventsource data stream. | ||
*/ | ||
formatMessage?: ((message: any) => string) | undefined; | ||
/** | ||
* Set to true, to reconnect the EventSource automatically. | ||
*/ | ||
reconnect?: boolean; | ||
/** | ||
* Set the time to wait between reconnects in seconds. | ||
* Default is 1s | ||
*/ | ||
reconnectWait?: number; | ||
} | ||
interface ErrorStatus extends Error { | ||
@@ -338,2 +369,11 @@ /** | ||
/** | ||
* Set to `true` to specify that url is an eventsource URL. | ||
* Defaults to `false` to download data until completion. | ||
*/ | ||
eventsource?: boolean; | ||
/** | ||
* Options object which will be passed through to evensource. | ||
*/ | ||
eventsourceOptions?: EventSourceOptions; | ||
/** | ||
* Set the width in pixels for the component. | ||
@@ -340,0 +380,0 @@ * Defaults to `'auto'` if unspecified. |
{ | ||
"name": "@melloware/react-logviewer", | ||
"version": "5.2.4", | ||
"version": "5.3.0", | ||
"description": "React Lazy LogViewer", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -9,3 +9,3 @@ [![npm](https://img.shields.io/npm/v/%40melloware%2Freact-logviewer?style=for-the-badge&color=green)](https://www.npmjs.com/package/%40melloware/react-logviewer) | ||
React component that loads and views remote text in the browser lazily and efficiently. Logs can be loaded from static text, a URL, or a WebSocket and including ANSI highlighting. | ||
React component that loads and views remote text in the browser lazily and efficiently. Logs can be loaded from static text, a URL, a WebSocket, or an EventSource and including ANSI highlighting. | ||
Forked from [mozilla-frontend-infra/react-lazylog](https://github.com/mozilla-frontend-infra/react-lazylog). | ||
@@ -12,0 +12,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1930485
54
19089