This commit is contained in:
Jack Kavanagh 2023-08-08 19:16:23 +02:00 committed by GitHub
parent b19f69a5c6
commit 4bf257c481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 4 deletions

View File

@ -67,8 +67,6 @@ export type CurlEvent =
| CurlErrorEvent
| CurlCloseEvent;
export type CurlEventLog = CurlEvent[];
const CurlConnections = new Map<string, Curl>();
const eventLogFileStreams = new Map<string, fs.WriteStream>();
const timelineFileStreams = new Map<string, fs.WriteStream>();

View File

@ -156,6 +156,7 @@ export default class BaseExtension {
return;
}
// FIX THIS: this is throwing unhandled exceptions
// If the result is a promise, resolve it async
if (result instanceof Promise) {
result

View File

@ -72,6 +72,7 @@ export function render(
nj?.renderString(text, templatingContext, (err: Error | null, result: any) => {
clearTimeout(id);
if (err) {
console.log('Error rendering template', err);
const sanitizedMsg = err.message
.replace(/\(unknown path\)\s/, '')
.replace(/\[Line \d+, Column \d*]/, '')

View File

@ -14,7 +14,7 @@ const Timestamp: FC<{ time: Date | number }> = ({ time }) => {
};
interface Props {
events: WebSocketEvent[] | CurlEvent[];
events: (WebSocketEvent | CurlEvent)[];
selectionId?: string;
onSelect: (event: WebSocketEvent | CurlEvent) => void;
}

View File

@ -192,7 +192,7 @@ const RealtimeActiveResponsePane: FC<{ response: WebSocketResponse | Response }>
gap: 'var(--padding-sm)',
}}
>
<select onChange={e => setEventType(e.currentTarget.value as CurlEvent['type'])}>
<select disabled={protocol === 'curl'} onChange={e => setEventType(e.currentTarget.value as CurlEvent['type'])}>
<option value="">All</option>
<option value="message">Message</option>
<option value="open">Open</option>