Skip to content

Commit 3f43171

Browse files
committed
style(reactive-rpc): 💄 run Prettier
1 parent 10ef9eb commit 3f43171

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/__tests__/reactive-rpc/uws/ws/rx-rpc/RpcPersistentClient.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ if (process.env.TEST_E2E) {
5959
channel: {
6060
newChannel: () =>
6161
new WebSocketChannel({
62-
newSocket: () =>
63-
new WebSocket(url, [protocolSpecifier]) as any,
62+
newSocket: () => new WebSocket(url, [protocolSpecifier]) as any,
6463
}),
6564
},
6665
});

src/reactive-rpc/common/rpc/RpcMessageStreamProcessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export class RpcMessageStreamProcessor<Ctx = unknown> {
242242
public onNotificationMessage(message: msg.NotificationMessage, ctx: Ctx): void {
243243
const {method, value} = message;
244244
if (!method || method.length > 128) throw RpcError.fromCode(RpcErrorCodes.INVALID_METHOD);
245-
const request = value && (typeof value === 'object') ? value?.data : undefined;
245+
const request = value && typeof value === 'object' ? value?.data : undefined;
246246
this.caller.notification(method, request, ctx).catch((error: unknown) => {});
247247
}
248248
}

src/reactive-rpc/server/context.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ const CODECS_REGEX = /rpc.(\w{0,32})\.(\w{0,32})\.(\w{0,32})(?:\-(\w{0,32}))?/;
1313

1414
export class ConnectionContext<Meta = Record<string, unknown>> {
1515
private static findIp(req: HttpRequest, res: HttpResponse): string {
16-
return req.getHeader('x-forwarded-for') ||
16+
return (
17+
req.getHeader('x-forwarded-for') ||
1718
req.getHeader('x-real-ip') ||
18-
Buffer.from(res.getRemoteAddressAsText()).toString();
19+
Buffer.from(res.getRemoteAddressAsText()).toString()
20+
);
1921
}
2022

2123
private static findToken(req: HttpRequest, params: string[] | null): string {

0 commit comments

Comments
 (0)