From 7ca8b3e8e306c4dc4bd53651bcc70aa2791fe312 Mon Sep 17 00:00:00 2001 From: Andreas Aronsson Date: Sun, 21 Apr 2024 10:33:09 +0200 Subject: [PATCH] Fix missing exports for runners, enlist runners --- .../Server/Objects/Data/ActionAudioRunner.ts | 2 +- .../Server/Objects/Data/ActionChatRunner.ts | 2 +- .../Server/Objects/Data/ActionCustomRunner.ts | 2 +- .../Objects/Data/ActionDiscordRunner.ts | 2 +- .../Data/ActionPhilipsHuePlugRunner.ts | 2 +- app/src/Shared/Objects/Data/EnlistData.ts | 43 +++++++++++++++++++ 6 files changed, 48 insertions(+), 5 deletions(-) diff --git a/app/src/Server/Objects/Data/ActionAudioRunner.ts b/app/src/Server/Objects/Data/ActionAudioRunner.ts index 80734f3..4ca9e8a 100644 --- a/app/src/Server/Objects/Data/ActionAudioRunner.ts +++ b/app/src/Server/Objects/Data/ActionAudioRunner.ts @@ -6,7 +6,7 @@ import ArrayUtils from '../../../Shared/Utils/ArrayUtils.js' import ModulesSingleton from '../../../Shared/Singletons/ModulesSingleton.js' import ActionAudio from '../../../Shared/Objects/Data/Action/ActionAudio.js' -class ActionAudioRunner extends ActionAudio { +export default class ActionAudioRunner extends ActionAudio { build(key: string): IActionCallback { return { description: 'Callback that triggers a sound and/or speech action', diff --git a/app/src/Server/Objects/Data/ActionChatRunner.ts b/app/src/Server/Objects/Data/ActionChatRunner.ts index c21bdbc..43d097d 100644 --- a/app/src/Server/Objects/Data/ActionChatRunner.ts +++ b/app/src/Server/Objects/Data/ActionChatRunner.ts @@ -8,7 +8,7 @@ import {SettingTwitchTokens} from '../../../Shared/Objects/Data/Setting/SettingT import TextHelper from '../../../Shared/Helpers/TextHelper.js' import ActionChat from '../../../Shared/Objects/Data/Action/ActionChat.js' -class ActionChatRunner extends ActionChat { +export default class ActionChatRunner extends ActionChat { build(key: string): IActionCallback { return { description: 'Callback that triggers a Twitch chat message action', diff --git a/app/src/Server/Objects/Data/ActionCustomRunner.ts b/app/src/Server/Objects/Data/ActionCustomRunner.ts index dad2df0..bf2081b 100644 --- a/app/src/Server/Objects/Data/ActionCustomRunner.ts +++ b/app/src/Server/Objects/Data/ActionCustomRunner.ts @@ -3,7 +3,7 @@ import Utils from '../../../Shared/Utils/Utils.js' import ModulesSingleton from '../../../Shared/Singletons/ModulesSingleton.js' import ActionCustom from '../../../Shared/Objects/Data/Action/ActionCustom.js' -class ActionCustomRunner extends ActionCustom { +export default class ActionCustomRunner extends ActionCustom { build(key: string): IActionCallback { return { description: 'Callback that triggers arbitrary code', diff --git a/app/src/Server/Objects/Data/ActionDiscordRunner.ts b/app/src/Server/Objects/Data/ActionDiscordRunner.ts index 5ea2459..13a9599 100644 --- a/app/src/Server/Objects/Data/ActionDiscordRunner.ts +++ b/app/src/Server/Objects/Data/ActionDiscordRunner.ts @@ -8,7 +8,7 @@ import DataUtils from '../../../Shared/Objects/Data/DataUtils.js' import TextHelper from '../../../Shared/Helpers/TextHelper.js' import ActionDiscord from '../../../Shared/Objects/Data/Action/ActionDiscord.js' -class ActionDiscordRunner extends ActionDiscord { +export default class ActionDiscordRunner extends ActionDiscord { build(key: string): IActionCallback { return { description: 'Callback that triggers a DiscordUtils message action', diff --git a/app/src/Server/Objects/Data/ActionPhilipsHuePlugRunner.ts b/app/src/Server/Objects/Data/ActionPhilipsHuePlugRunner.ts index e0ee7dd..45840a2 100644 --- a/app/src/Server/Objects/Data/ActionPhilipsHuePlugRunner.ts +++ b/app/src/Server/Objects/Data/ActionPhilipsHuePlugRunner.ts @@ -5,7 +5,7 @@ import ArrayUtils from '../../../Shared/Utils/ArrayUtils.js' import DataUtils from '../../../Shared/Objects/Data/DataUtils.js' import PhilipsHueHelper from '../../../Shared/Helpers/PhilipsHueHelper.js' -class ActionPhilipsHuePlugRunner extends ActionPhilipsHuePlug { +export default class ActionPhilipsHuePlugRunner extends ActionPhilipsHuePlug { build(key: string): IActionCallback { return { description: 'Callback that triggers a Philips Hue plug action', diff --git a/app/src/Shared/Objects/Data/EnlistData.ts b/app/src/Shared/Objects/Data/EnlistData.ts index 603097c..414e6a9 100644 --- a/app/src/Shared/Objects/Data/EnlistData.ts +++ b/app/src/Shared/Objects/Data/EnlistData.ts @@ -61,6 +61,25 @@ import PresetDiscordWebhook from './Preset/PresetDiscordWebhook.js' import PresetOBSScene, {PresetOBSFilter, PresetOBSSource} from './Preset/PresetOBS.js' import PresetPermissions from './Preset/PresetPermissions.js' import PresetPhilipsHueBulbState, {PresetPhilipsHueBulb, PresetPhilipsHuePlug} from './Preset/PresetPhilipsHue.js' +import ActionInputRunner from '../../../Server/Objects/Data/ActionInputRunner.js' +import ActionLabelRunner from '../../../Server/Objects/Data/ActionLabelRunner.js' +import ActionURIRunner from '../../../Server/Objects/Data/ActionURIRunner.js' +import ActionMoveVRSpaceRunner from '../../../Server/Objects/Data/ActionMoveVRSpaceRunner.js' +import ActionOBSRunner from '../../../Server/Objects/Data/ActionOBSRunner.js' +import ActionPhilipsHueBulbRunner from '../../../Server/Objects/Data/ActionPhilipsHueBulbRunner.js' +import ActionPipeRunner from '../../../Server/Objects/Data/ActionPipeRunner.js' +import ActionRemoteCommandRunner from '../../../Server/Objects/Data/ActionRemoteCommandRunner.js' +import ActionScreenshotRunner from '../../../Server/Objects/Data/ActionScreenshotRunner.js' +import ActionSettingTTSRunner from '../../../Server/Objects/Data/ActionSettingTTSRunner.js' +import ActionSettingVRRunner from '../../../Server/Objects/Data/ActionSettingVRRunner.js' +import ActionSignRunner from '../../../Server/Objects/Data/ActionSignRunner.js' +import ActionSpeechRunner from '../../../Server/Objects/Data/ActionSpeechRunner.js' +import ActionSystemRunner from '../../../Server/Objects/Data/ActionSystemRunner.js' +import ActionAudioRunner from '../../../Server/Objects/Data/ActionAudioRunner.js' +import ActionChatRunner from '../../../Server/Objects/Data/ActionChatRunner.js' +import ActionCustomRunner from '../../../Server/Objects/Data/ActionCustomRunner.js' +import ActionDiscordRunner from '../../../Server/Objects/Data/ActionDiscordRunner.js' +import ActionPhilipsHuePlugRunner from '../../../Server/Objects/Data/ActionPhilipsHuePlugRunner.js' /** * TODO: Try to do this dynamically in EJS when we are in Node, scan the Objects source folder and auto-generate this file. @@ -71,6 +90,7 @@ import PresetPhilipsHueBulbState, {PresetPhilipsHueBulb, PresetPhilipsHuePlug} f export default class EnlistData { static run() { const objects: AbstractData[] = [ + // region Actions new ActionAudio(), new ActionChat(), new ActionCustom(), @@ -99,6 +119,29 @@ export default class EnlistData { new ActionSystemRewardStateForEvent(), new ActionSystemUserEvent(), + // region Runners + new ActionAudioRunner(), + new ActionChatRunner(), + new ActionCustomRunner(), + new ActionDiscordRunner(), + new ActionInputRunner(), + new ActionLabelRunner(), + new ActionURIRunner(), + new ActionMoveVRSpaceRunner(), + new ActionOBSRunner(), + new ActionPhilipsHueBulbRunner(), + new ActionPhilipsHuePlugRunner(), + new ActionPipeRunner(), + new ActionRemoteCommandRunner(), + new ActionScreenshotRunner(), + new ActionSettingTTSRunner(), + new ActionSettingVRRunner(), + new ActionSignRunner(), + new ActionSpeechRunner(), + new ActionSystemRunner(), + // endregion + // endregion + new ConfigAnnounceCheer(), new ConfigAnnounceRaid(), new ConfigAnnounceSub(),