Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createClient (clientName: string, server: string, options?: any) {
const serverUrl = global.e2eHarness.getUrl(server)
// @ts-ignore
const client = new DeepstreamClient(serverUrl, {
...options,
subscriptionInterval: 5,
maxReconnectInterval: 300,
maxReconnectAttempts: 20,
rpcAcceptTimeout: 100,
rpcResponseTimeout: 300,
subscriptionTimeout: 100,
recordReadAckTimeout: 100,
recordReadTimeout: 50,
recordDeleteTimeout: 100,
recordDiscardTimeout: 100,
intervalTimerResolution: 1,
offlineEnabled: false,
offlineBufferTimeout: 10000,
nativeTimerRegistry: false,
initialRecordVersion: 1,
function createClient (clientName: string, server: string, options?: any) {
const deepstreamUrl = global.e2eHarness.getUrl(server)
// @ts-ignore
const client = new DeepstreamClient(`${deepstreamUrl}-v4`, {
...options,
subscriptionInterval: 5,
maxReconnectInterval: 300,
maxReconnectAttempts: 20,
rpcAcceptTimeout: 100,
rpcResponseTimeout: 300,
subscriptionTimeout: 100,
recordReadAckTimeout: 100,
recordReadTimeout: 50,
recordDeleteTimeout: 100,
recordDiscardTimeout: 100,
intervalTimerResolution: 1,
offlineEnabled: false,
offlineBufferTimeout: 10000,
nativeTimerRegistry: false,
initialRecordVersion: 1,