Skip to content

Commit

Permalink
Merge pull request #50 from phillipivan/master
Browse files Browse the repository at this point in the history
v2.5.1
  • Loading branch information
phillipivan authored Dec 3, 2024
2 parents 4324ba7 + 6911064 commit 3024ff5
Show file tree
Hide file tree
Showing 3 changed files with 367 additions and 516 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generic-emberplus",
"version": "2.5.0",
"version": "2.5.1",
"main": "dist/index.js",
"scripts": {
"prepare": "husky",
Expand Down Expand Up @@ -44,7 +44,7 @@
"prettier": "^3.4.1",
"rimraf": "^6.0.1",
"typescript": "~5.7.2",
"typescript-eslint": "^8.16.0"
"typescript-eslint": "^8.17.0"
},
"prettier": "@companion-module/tools/.prettierrc.json",
"packageManager": "[email protected]"
Expand Down
7 changes: 5 additions & 2 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ export async function resolvePath(context: CompanionCommonCallbackContext, path:
}

const setValue =
(self: InstanceBase<EmberPlusConfig>, emberClient: EmberClient, type: EmberModel.ParameterType, queue: PQueue) =>
(self: EmberPlusInstance, emberClient: EmberClient, type: EmberModel.ParameterType, queue: PQueue) =>
async (action: CompanionActionEvent, context: CompanionActionContext): Promise<void> => {
const path = await resolvePath(context, action.options['path']?.toString() ?? '')
if (action.options.variable) {
await self.registerNewParameter(path)
}
queue
.add(async () => {
const path = await resolvePath(context, action.options['path']?.toString() ?? '')
const node = await emberClient.getElementByPath(path)
// TODO - do we handle not found?
if (node && node.contents.type === EmberModel.ElementType.Parameter) {
Expand Down
Loading

0 comments on commit 3024ff5

Please sign in to comment.