-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from nateshmbhat/feature-update-refactors
Error handling feature updates
- Loading branch information
Showing
17 changed files
with
292 additions
and
191 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
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 |
---|---|---|
@@ -1,20 +1,17 @@ | ||
import { IpcChannel } from "../../commons/ipc/ipcChannelInterface" | ||
import type { ResponseInfo } from "../../renderer/behaviour"; | ||
import { IpcRendererService } from "./ipcRendererService" | ||
|
||
interface TransformedResponse { | ||
message: Object | ||
} | ||
|
||
export class RendererProcessInterface { | ||
static async onRequest(requestObject: any, metadata: any, serviceName: string, methodName: string): Promise<TransformedResponse> { | ||
const ipcResponse = await IpcRendererService.send<{ data: Object }>(IpcChannel.onRequest, { | ||
static async onRequest(requestObject: any, metadata: any, serviceName: string, methodName: string): Promise<ResponseInfo> { | ||
const ipcResponse = await IpcRendererService.send<ResponseInfo>(IpcChannel.onRequest, { | ||
params: { | ||
requestObject, | ||
metadata, | ||
serviceName, | ||
methodName | ||
} | ||
}) | ||
return { message: ipcResponse.data }; | ||
return ipcResponse | ||
} | ||
} |
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 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,9 +1,59 @@ | ||
import type { RpcProtoInfo } from "../../behaviour"; | ||
import type { RpcOperationMode } from "../../../stores"; | ||
import type { Certificate, RpcProtoInfo } from "../../behaviour"; | ||
import type { EditorEventEmitter } from "../../behaviour/responseStateController"; | ||
|
||
export interface TabConfigModel { | ||
id: string; | ||
selectedRpc: RpcProtoInfo | undefined; | ||
targetGrpcServerUrl: string; | ||
rpcOperationMode: RpcOperationMode; | ||
monitorRequestEditorState: MonitorRequestEditorModel; | ||
monitorResponseEditorState: MonitorResponseEditorModel; | ||
tlsCertificate?: Certificate, | ||
clientRequestEditorState: ClientEditorModel; | ||
clientResponseEditorState: ClientEditorModel; | ||
mockRpcEditorText: string; | ||
} | ||
|
||
export interface ClientEditorModel { | ||
text: string; | ||
metadata: string; | ||
} | ||
export interface TabListConfigModel { | ||
tabs: TabConfigModel[]; | ||
activeTabIndex: number; | ||
} | ||
|
||
///Enum only applicable for editor when it "not in client mode" | ||
export enum EditorDataFlowMode { | ||
passThrough, liveEdit | ||
} | ||
|
||
|
||
export interface MonitorRequestEditorModel { | ||
incomingRequest?: IncomingRequest | ||
eventEmitter: EditorEventEmitter; | ||
dataFlowMode: EditorDataFlowMode; | ||
} | ||
|
||
export interface MonitorResponseEditorModel { | ||
incomingResponseText?: string; | ||
eventEmitter: EditorEventEmitter; | ||
dataFlowMode: EditorDataFlowMode; | ||
} | ||
|
||
export interface RpcSelectorFileType { | ||
type: 'folder' | 'file'; | ||
name: string; | ||
//is defined only when type is 'file' | ||
protoInfo?: RpcProtoInfo; | ||
files: RpcSelectorFileType[] | ||
} | ||
|
||
export interface IncomingRequest { | ||
serviceName: string, | ||
methodName: string, | ||
requestObject: any | ||
text: string; | ||
metadata: string; | ||
} |
Oops, something went wrong.