Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add audit page, SQLite followup fixes, fixed side navigation, fix std…
…out/stderr (#208) * Fix for insert * Fixes * Add navigation * Add all routes * Clean up navigation * Final fixes * Try reoderd * Drop settings from desktop menu * Move to nanoid * Work on positions * Move to nanoid * Break out editor page * More progress on state tests * More progress on views and panelPositions * Hook up eslint * Fin for eslint * Fixes for file panel * Some stuff working * Fix for reorder test * Drop console logs, update dark mode * Fixes for ca certs * Add new panel dropdown * Fix graph/table shortcut button spacing * No more usedebouncedstate * Fix for onblur * Fixes for format * Fix for gofmt * Switch to useDebouncedCallback * Fix for eslint * Add dashboard/export header * Make navigation a function of input pages * History basic showing * Fixes for eslint * Fix for fmt * Eval tests are failing * Fixes for tests * Start react ee tests * Bump coverage * Start react ee tests * Rename file * Fix for copyright * Fix for some more tests * Fix for test * Fixes for in-memory mode * Fix for localstorage store * Fix for new project * Attempt at supporting resize on create * http.location * Fixes for tsc * Add notification icon to stdout/stderr when present * Smaller * Delete results file before evalling * Always close file * No need for deleting results * Fixes for errors * Try using apckage managers for go * Fix for mac * Fix for error check * Continue manual install of go on mac * Fix for EOL on windows * Fix for new project on desktop * Its about the pathname * Set loading
- Loading branch information
Showing
96 changed files
with
4,528 additions
and
1,330 deletions.
There are no files selected for viewing
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,2 @@ | ||
ui/scripts/* | ||
ui/state.test.js |
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,28 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"jest" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended" | ||
], | ||
"rules": { | ||
"react/jsx-no-target-blank": 'off', | ||
"react/no-children-prop": 'off', | ||
"@typescript-eslint/no-explicit-any": 'off', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_', | ||
}, | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { contextBridge, ipcRenderer, IpcRendererEvent } from 'electron'; | ||
import { RPC_ASYNC_REQUEST, RPC_ASYNC_RESPONSE } from '../shared/constants'; | ||
import log from '../shared/log'; | ||
import { Endpoint, IPCRendererResponse, WindowAsyncRPC } from '../shared/rpc'; | ||
|
||
let messageNumber = -1; | ||
|
||
export function bridgeAsyncRPC() { | ||
const asyncRPC: WindowAsyncRPC = async function < | ||
Request, | ||
Response = void, | ||
EndpointT extends string = Endpoint | ||
>(resource: EndpointT, projectId: string, body: Request): Promise<Response> { | ||
const payload = { | ||
// Assign a new message number | ||
messageNumber: ++messageNumber, | ||
resource, | ||
body, | ||
projectId, | ||
}; | ||
ipcRenderer.send(RPC_ASYNC_REQUEST, payload); | ||
|
||
const result = await new Promise<IPCRendererResponse<Response>>( | ||
(resolve, reject) => { | ||
try { | ||
ipcRenderer.once( | ||
`${RPC_ASYNC_RESPONSE}:${payload.messageNumber}`, | ||
(e: IpcRendererEvent, response: IPCRendererResponse<Response>) => | ||
resolve(response) | ||
); | ||
} catch (e) { | ||
reject(e); | ||
} | ||
} | ||
); | ||
|
||
if (result.kind === 'error') { | ||
try { | ||
throw result.error; | ||
} catch (e) { | ||
// The result.error object isn't a real Error at this point with | ||
// prototype after going through serialization. So throw it to get | ||
// a real Error instance that has full info for logs. | ||
log.error(e); | ||
throw e; | ||
} | ||
} | ||
|
||
return result.body; | ||
}; | ||
|
||
contextBridge.exposeInMainWorld('asyncRPC', asyncRPC); | ||
} |
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
Oops, something went wrong.