feat: fetch gateway information without requiring rest in ws (#10651)

* feat: overridable initial gateway URL

* chore: discussion changes

* chore: requested change

* chore: other changes

* Update packages/ws/src/ws/WebSocketManager.ts

* style: run ESLint

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Vlad Frangu
2025-01-13 12:23:41 +02:00
committed by GitHub
parent 1e29bb4049
commit 5f7d335290
5 changed files with 114 additions and 27 deletions

View File

@@ -68,7 +68,7 @@ export const DefaultWebSocketManagerOptions = {
handshakeTimeout: 30_000,
helloTimeout: 60_000,
readyTimeout: 15_000,
} as const satisfies Omit<OptionalWebSocketManagerOptions, 'token'>;
} as const satisfies Omit<OptionalWebSocketManagerOptions, 'fetchGatewayInformation' | 'token'>;
export const ImportantGatewayOpcodes = new Set([
GatewayOpcodes.Heartbeat,