fix: issue with resolving dev environment (#501)

* fix: issue with resolving dev environment

* fix: revert accidental commtit

* chore: version bump
This commit is contained in:
Carlos Valente
2023-08-31 22:08:18 +02:00
committed by GitHub
parent a3bbd74db7
commit 23dcca5527
6 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime-ui",
"version": "2.7.0",
"version": "2.7.1",
"private": true,
"dependencies": {
"@chakra-ui/react": "^2.7.0",
+2 -1
View File
@@ -12,9 +12,10 @@ export const RUNTIME = ['runtimeStore'];
const location = window.location;
const socketProtocol = location.protocol === 'https:' ? 'wss' : 'ws';
export const isProduction = import.meta.env.MODE === 'production';
const STATIC_PORT = 4001;
export const serverPort = import.meta.env.DEV ? STATIC_PORT : location.port;
export const serverPort = isProduction ? location.port : STATIC_PORT;
export const serverURL = `${location.protocol}//${location.hostname}:${serverPort}`;
export const websocketUrl = `${socketProtocol}://${location.hostname}:${serverPort}/ws`;
+2 -2
View File
@@ -1,6 +1,6 @@
import { Log, RuntimeStore } from 'ontime-types';
import { RUNTIME, websocketUrl } from '../api/apiConstants';
import { isProduction, RUNTIME, websocketUrl } from '../api/apiConstants';
import { ontimeQueryClient } from '../queryClient';
import { socketClientName } from '../stores/connectionName';
import { addLog } from '../stores/logger';
@@ -64,7 +64,7 @@ export const connectSocket = (preferredClientName?: string) => {
}
case 'ontime': {
runtime.setState(payload as RuntimeStore);
if (import.meta.env.DEV) {
if (!isProduction) {
ontimeQueryClient.setQueryData(RUNTIME, data.payload);
}
break;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime",
"version": "2.7.0",
"version": "2.7.1",
"author": "Carlos Valente",
"description": "Time keeping for live events",
"repository": "https://github.com/cpvalente/ontime",
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "ontime-server",
"type": "module",
"main": "src/index.ts",
"version": "2.7.0",
"version": "2.7.1",
"exports": "./src/index.js",
"dependencies": {
"body-parser": "^1.20.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime",
"version": "2.7.0",
"version": "2.7.1",
"description": "Time keeping for live events",
"keywords": [
"lighdev",