-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: re-write main parts of GUI mode to typescript (#518)
* chore: rename test-tree-builder/gui to typescript * chore: re-write tests-tree-builder/gui to typescript * chore: rename report-builder/gui to typescript * chore: re-write report-buidler/gui to typescript * chore: rename tool-runner to typescript * chore: re-write tool-runner/runner to typescript * chore: re-write gui/constants to typescript * test: fix unit tests * fix: minor bug fixes * chore: update package-lock * fix: minor bug fixes and review fixes * fix: get rid of any in report-subscriber and get rid of async in report-builder
- Loading branch information
Showing
51 changed files
with
825 additions
and
537 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {ValueOf} from 'type-fest'; | ||
|
||
export const ClientEvents = { | ||
BEGIN_SUITE: 'beginSuite', | ||
BEGIN_STATE: 'beginState', | ||
|
||
TEST_RESULT: 'testResult', | ||
|
||
RETRY: 'retry', | ||
ERROR: 'err', | ||
|
||
END: 'end' | ||
} as const; | ||
|
||
export type ClientEvents = typeof ClientEvents; | ||
|
||
export type ClientEvent = ValueOf<ClientEvents>; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const CONTROL_TYPE_BUTTON = 'button'; | ||
|
||
export const CONTROL_TYPE_RADIOBUTTON = 'radiobutton'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {ValueOf} from 'type-fest'; | ||
|
||
export const GuiEvents = { | ||
SERVER_INIT: 'serverInit', | ||
SERVER_READY: 'serverReady' | ||
} as const; | ||
|
||
export type GuiEvents = typeof GuiEvents; | ||
|
||
export type GuiEvent = ValueOf<GuiEvents>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './client-events'; | ||
export * from './custom-gui-control-types'; | ||
export * from './gui-events'; | ||
export * from './server'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const MAX_REQUEST_SIZE = '100mb'; | ||
|
||
export const KEEP_ALIVE_TIMEOUT = 120 * 1000; | ||
|
||
export const HEADERS_TIMEOUT = 125 * 1000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
'use strict'; | ||
import {Response} from 'express'; | ||
import stringify from 'json-stringify-safe'; | ||
|
||
const stringify = require('json-stringify-safe'); | ||
|
||
module.exports = class EventSource { | ||
export class EventSource { | ||
private _connections: Response[]; | ||
constructor() { | ||
this._connections = []; | ||
} | ||
|
||
addConnection(connection) { | ||
addConnection(connection: Response): void { | ||
this._connections.push(connection); | ||
} | ||
|
||
emit(event, data) { | ||
emit(event: string, data?: unknown): void { | ||
this._connections.forEach(function(connection) { | ||
connection.write('event: ' + event + '\n'); | ||
connection.write('data: ' + stringify(data) + '\n'); | ||
connection.write('\n\n'); | ||
}); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.