chore: urls are using the global websocket url
This commit is contained in:
@ -388,7 +388,9 @@ class EngineConnection extends EventTarget {
|
||||
|
||||
// SHOULD ONLY BE USED FOR VITESTS
|
||||
connectLite(callback: () => void) {
|
||||
const url = withWebSocketURL(`?video_res_width=${256}&video_res_height=${256}`)
|
||||
const url = withWebSocketURL(
|
||||
`?video_res_width=${256}&video_res_height=${256}`
|
||||
)
|
||||
this.websocket = new WebSocket(url, [])
|
||||
this.websocket.binaryType = 'arraybuffer'
|
||||
|
||||
@ -1531,7 +1533,9 @@ export class EngineCommandManager extends EventTarget {
|
||||
additionalSettings +=
|
||||
'&show_grid=' + (this.settings.showScaleGrid ? 'true' : 'false')
|
||||
const pool = !this.settings.pool ? '' : `&pool=${this.settings.pool}`
|
||||
const url = withWebSocketURL(`?video_res_width=${width}&video_res_height=${height}${additionalSettings}${pool}`)
|
||||
const url = withWebSocketURL(
|
||||
`?video_res_width=${width}&video_res_height=${height}${additionalSettings}${pool}`
|
||||
)
|
||||
this.engineConnection = new EngineConnection({
|
||||
engineCommandManager: this,
|
||||
url,
|
||||
|
@ -1,4 +1,8 @@
|
||||
import { withAPIBaseURL, withSiteBaseURL, withWebSocketURL } from '@src/lib/withBaseURL'
|
||||
import {
|
||||
withAPIBaseURL,
|
||||
withSiteBaseURL,
|
||||
withWebSocketURL,
|
||||
} from '@src/lib/withBaseURL'
|
||||
|
||||
describe('withBaseURL', () => {
|
||||
/**
|
||||
|
@ -1,4 +1,8 @@
|
||||
import { VITE_KC_API_BASE_URL, VITE_KC_SITE_BASE_URL, VITE_KC_API_WS_MODELING_URL } from '@src/env'
|
||||
import {
|
||||
VITE_KC_API_BASE_URL,
|
||||
VITE_KC_SITE_BASE_URL,
|
||||
VITE_KC_API_WS_MODELING_URL,
|
||||
} from '@src/env'
|
||||
|
||||
export function withAPIBaseURL(path: string): string {
|
||||
return VITE_KC_API_BASE_URL + path
|
||||
@ -8,6 +12,6 @@ export function withSiteBaseURL(path: string): string {
|
||||
return VITE_KC_SITE_BASE_URL + path
|
||||
}
|
||||
|
||||
export function withWebSocketURL(path: string) : string {
|
||||
export function withWebSocketURL(path: string): string {
|
||||
return VITE_KC_API_WS_MODELING_URL + path
|
||||
}
|
||||
|
Reference in New Issue
Block a user