Files
spacedrive/apps/web/src/patches.ts
Vítor Vasconcellos 417d5d3be3 [ENG-811] Fix server Dockerfile + create CI workflow to build and publish docker image (#1012)
* Fix server docker build failing due to apt locking error
 - Replace ffmpeg dep with only the libav* and related required lib (reduce size)
 - Add warning to tauri build command when DMG background is missing
 - Minor rust fmt

* Enable assets feature for server Dockerfile
 - Fix web app not using the correct address in prod
 - Add build step for web assets in server Dockerfile

* Enable repository to be defined in server's Dockerfile
 - Enable server's release workflow to specify which repository to build to allow external PRs to work

* Fix pnpm docker cache not working
2023-06-25 15:16:11 +00:00

23 lines
620 B
TypeScript

import { wsBatchLink } from '@rspc/client/v2';
globalThis.isDev = import.meta.env.DEV;
globalThis.rspcLinks = [
// TODO
// loggerLink({
// enabled: () => getDebugState().rspcLogger
// }),
wsBatchLink({
url: (() => {
const currentURL = new URL(window.location.href);
currentURL.protocol = currentURL.protocol === 'https:' ? 'wss:' : 'ws:';
if (import.meta.env.VITE_SDSERVER_ORIGIN) {
currentURL.host = import.meta.env.VITE_SDSERVER_ORIGIN;
} else if (import.meta.env.DEV) {
currentURL.host = 'localhost:8080';
}
currentURL.pathname = 'rspc/ws';
return currentURL.href;
})()
})
];