File tree 4 files changed +5
-29
lines changed
4 files changed +5
-29
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,6 @@ initAsyncLocalStorage()
82
82
83
83
export { actionLocalStorage , pageLocalStorage }
84
84
85
- export const DEFAULT_WEBSOCKET_ENDPOINT = 'wss://interval.com/websocket'
86
-
87
85
export function getHttpEndpoint ( wsEndpoint : string ) {
88
86
const url = new URL ( wsEndpoint )
89
87
url . protocol = url . protocol . replace ( 'ws' , 'http' )
@@ -103,7 +101,7 @@ interface SetupConfig {
103
101
export default class IntervalClient {
104
102
#interval: Interval
105
103
#apiKey: string | undefined
106
- #endpoint: string = DEFAULT_WEBSOCKET_ENDPOINT
104
+ #endpoint: string
107
105
#httpEndpoint: string
108
106
#logger: Logger
109
107
#completeHttpRequestDelayMs: number = 3000
@@ -140,10 +138,7 @@ export default class IntervalClient {
140
138
this . #apiKey = config . apiKey
141
139
this . #logger = new Logger ( config . logLevel )
142
140
this . #config = config
143
-
144
- if ( config . endpoint ) {
145
- this . #endpoint = config . endpoint
146
- }
141
+ this . #endpoint = config . endpoint
147
142
148
143
if ( config . retryIntervalMs && config . retryIntervalMs > 0 ) {
149
144
this . #retryIntervalMs = config . retryIntervalMs
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import type { EventualMetaItem } from '../../components/displayMetadata'
16
16
import * as table_actions from './table'
17
17
import * as grid_actions from './grid'
18
18
import unauthorized from './unauthorized'
19
- import './ghostHost'
20
19
import { generateS3Urls } from '../utils/upload'
21
20
import fs from 'fs'
22
21
import fakeUsers from '../utils/fakeUsers'
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ import type {
31
31
} from './types'
32
32
import IntervalError from './classes/IntervalError'
33
33
import IntervalClient , {
34
- DEFAULT_WEBSOCKET_ENDPOINT ,
35
34
getHttpEndpoint ,
36
35
actionLocalStorage ,
37
36
pageLocalStorage ,
@@ -51,14 +50,14 @@ export type {
51
50
}
52
51
53
52
export interface InternalConfig {
54
- apiKey ?: string
53
+ apiKey : string
54
+ endpoint : string
55
55
routes ?: IntervalRouteDefinitions
56
56
routesDirectory ?: string
57
57
// TODO: Mark as deprecated soon, remove soon afterward
58
58
actions ?: Record < string , IntervalActionDefinition >
59
59
// TODO: Mark as deprecated soon, remove soon afterward
60
60
groups ?: Record < string , Page >
61
- endpoint ?: string
62
61
logLevel ?: LogLevel
63
62
retryIntervalMs ?: number
64
63
retryChunkIntervalMs ?: number
@@ -176,9 +175,7 @@ export default class Interval {
176
175
this . #apiKey = config . apiKey
177
176
this . #logger = new Logger ( config . logLevel )
178
177
179
- this . #httpEndpoint = getHttpEndpoint (
180
- config . endpoint ?? DEFAULT_WEBSOCKET_ENDPOINT
181
- )
178
+ this . #httpEndpoint = getHttpEndpoint ( config . endpoint )
182
179
183
180
this . routes = new Routes (
184
181
this ,
You can’t perform that action at this time.
0 commit comments