Skip to content

Commit

Permalink
wip: Client builds + run; Server build only.
Browse files Browse the repository at this point in the history
  • Loading branch information
KvelaGorrrrnio committed Feb 23, 2022
1 parent ecbf981 commit 13567e9
Show file tree
Hide file tree
Showing 16 changed files with 3,537 additions and 87 deletions.
2 changes: 1 addition & 1 deletion client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import io from 'socket.io-client'
//Redux:
import { createStore } from 'redux'
import { Provider as ReduxProvider } from 'react-redux'
import indexReducer from '../shared/reducers/indexReducer'
import indexReducer from './reducers/indexReducer'
import {
SOCKET_GET_SNAPSHOT_LIST,
SOCKET_GET_CCG_LIST,
Expand Down
12 changes: 12 additions & 0 deletions client/reducers/indexReducer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { combineReducers } from 'redux'
import { channels } from '../../shared/reducers/channelsReducer'
import { settings } from '../../shared/reducers/settingsReducer'
import { faders } from '../../shared/reducers/fadersReducer'

const indexReducer = combineReducers({
faders,
channels,
settings,
})

export default indexReducer
2 changes: 1 addition & 1 deletion server/MainThreadHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { SnapshotHandler } from './utils/SnapshotHandler'
import { socketServer } from './expressHandler'

import { storeUpdateSettings } from './reducers/settingsActions'
import { storeUpdateSettings } from '../shared/actions/settingsActions'
import * as IO from '../shared/SOCKET_IO_DISPATCHERS'
import * as FADER_ACTIONS from '../shared/actions/faderActions'

Expand Down
4 changes: 2 additions & 2 deletions server/__tests__/channelReducer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
storeSetAssignedFader,
storeSetCompleteChState,
storeSetOutputLevel,
} from '../reducers/channelActions'
import { IChannel, InumberOfChannels } from '../reducers/channelsReducer'
} from '../../shared/actions/channelActions'
import { IChannel, InumberOfChannels } from '../../shared/channel-types'

let fs = require('fs')
const parsedFullStoreJSON = fs.readFileSync(
Expand Down
5 changes: 2 additions & 3 deletions server/__tests__/faderReducer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import indexReducer from '../reducers/indexReducer'
import { IFader, IFaders } from '../reducers/fadersReducer'
import { IFader, IFaders } from '../../shared/faders-types'
import {
storeClearPst,
storeFaderLabel,
Expand All @@ -20,8 +20,7 @@ import {
storeTogglePst,
storeToggleVo,
storeXmix,
} from '../reducers/faderActions'
import { storeSetCompleteChState } from '../reducers/channelActions'
} from '../../shared/actions/faderActions'

let fs = require('fs')
const parsedSimpleStoreJSON = fs.readFileSync(
Expand Down
2 changes: 1 addition & 1 deletion server/mainClasses.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
MixerProtocolPresets,
MixerProtocolList,
} from './constants/MixerProtocolPresets'
} from '../shared/MixerProtocolPresets'
import { MixerGenericConnection } from './utils/MixerConnection'
import { AutomationConnection } from './utils/AutomationConnection'
import { RemoteConnection } from './utils/RemoteConnection'
Expand Down
19 changes: 12 additions & 7 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"build": "",
"build": "tsc",
"watch": "",
"test": "",
"test:watch": "",
"lint": ""
},
"devDependencies": {
"@types/node": "^17.0.20",
"@types/redux": "^3.6.0"
"@types/jest": "^27.4.1",
"@types/node": "^14.14.35",
"@types/redux": "^3.6.0",
"typescript": "^4.5.5"
},
"dependencies": {
"@babel/core": "7.13.10",
"@babel/core": "^7.13.10",
"@tv2media/logger": "^1.2.2",
"casparcg-connection": "^5.1.0",
"emberplus-connection": "^0.1.2",
"node-vmix": "1.6.0",
"emberplus-connection": "^0.0.4",
"jest": "^26.6.3",
"node-vmix": "^1.6.0",
"redux": "^4.1.2",
"ts-jest": "^26.5.3",
"vmix-js-utils": "^4.0.7",
"webmidi": "^2.5.2"
}
},
"peerDependencies": {}
}
12 changes: 12 additions & 0 deletions server/reducers/indexReducer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { combineReducers } from 'redux'
import { channels } from '../../shared/reducers/channelsReducer'
import { settings } from '../../shared/reducers/settingsReducer'
import { faders } from '../../shared/reducers/fadersReducer'

const indexReducer = combineReducers({
faders,
channels,
settings,
})

export default indexReducer
2 changes: 1 addition & 1 deletion server/reducers/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createStore } from 'redux'
import indexReducer from './indexReducer'
import { storeUpdateSettings } from './settingsActions'
import { storeUpdateSettings } from '../../shared/actions/settingsActions'
import { loadSettings } from '../utils/SettingsStorage'

let storeRedux = createStore(indexReducer)
Expand Down
9 changes: 6 additions & 3 deletions server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"compilerOptions": {
// Target latest version of ECMAScript.
"target": "ES5",
"target": "ESNEXT",
"lib": ["ESNEXT", "dom"],
// Search under node_modules for non-relative imports.
"moduleResolution": "node",
// Process & infer types from .js files.
Expand All @@ -16,7 +17,9 @@
"noImplicitAny": true,
"resolveJsonModule": true,
"module": "commonjs",
"outDir": "../dist/server"
"outDir": "../dist",
"typeRoots": ["@types", "node_modules/@types"],
},
"include": ["*"]
"include": ["../server", "../shared"],
"exclude": ["../**/node_modules/*", "../**/dist/*", "../**/*.spec.ts"]
}
2 changes: 1 addition & 1 deletion server/utils/SettingsStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { checkVersion } from './migrations'
import { storeSetCompleteChState } from '../../shared/actions/channelActions'
import { storeSetCompleteFaderState } from '../../shared/actions/faderActions'
import { logger } from './logger'
import { defaultFadersReducerState } from '../reducers/fadersReducer'
import { defaultFadersReducerState } from '../../shared/reducers/fadersReducer'

import { IChannels, InumberOfChannels } from '../../shared/channel-types'

Expand Down
2 changes: 1 addition & 1 deletion server/utils/labels.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IStore } from '../reducers/indexReducer'
import { IStore } from '../../shared/store-types'
import { state } from '../reducers/store'

export function getChannelLabel(
Expand Down
2 changes: 1 addition & 1 deletion server/utils/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const fs = require('fs')
const path = require('path')

import { logger } from './logger'
import { ISettings } from '../reducers/settingsReducer'
import { ISettings } from '../../shared/settings-types'
import { getSnapShotList, IShotStorage } from './SettingsStorage'

const version = process.env.npm_package_version
Expand Down
Loading

0 comments on commit 13567e9

Please sign in to comment.