Skip to content

Commit c6d4d99

Browse files
committed
update for api 2.0
1 parent b7b4b75 commit c6d4d99

4 files changed

Lines changed: 11 additions & 12 deletions

File tree

companion/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "../node_modules/@companion-module/base/assets/manifest.schema.json",
3+
"type": "connection",
34
"id": "your-module-name",
45
"name": "your-module-name",
56
"shortname": "module-shortname",

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
"yarn": "^4"
1717
},
1818
"dependencies": {
19-
"@companion-module/base": "~1.14.1"
19+
"@companion-module/base": "~2.0.4"
2020
},
2121
"devDependencies": {
22-
"@companion-module/tools": "^2.6.1",
23-
"prettier": "^3.7.4"
22+
"@companion-module/tools": "^3.0.1",
23+
"prettier": "^3.8.3"
2424
},
2525
"prettier": "@companion-module/tools/.prettierrc.json",
2626
"packageManager": "yarn@4.12.0"

src/feedbacks.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
const { combineRgb } = require('@companion-module/base')
2-
31
module.exports = async function (self) {
42
self.setFeedbackDefinitions({
53
ChannelState: {
64
name: 'Example Feedback',
75
type: 'boolean',
86
label: 'Channel State',
97
defaultStyle: {
10-
bgcolor: combineRgb(255, 0, 0),
11-
color: combineRgb(0, 0, 0),
8+
bgcolor: 0xff0000,
9+
color: 0x000000,
1210
},
1311
options: [
1412
{

src/variables.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = function (self) {
2-
self.setVariableDefinitions([
3-
{ variableId: 'variable1', name: 'My first variable' },
4-
{ variableId: 'variable2', name: 'My second variable' },
5-
{ variableId: 'variable3', name: 'Another variable' },
6-
])
2+
self.setVariableDefinitions({
3+
variable1: { name: 'My first variable' },
4+
variable2: { name: 'My second variable' },
5+
variable3: { name: 'Another variable' },
6+
})
77
}

0 commit comments

Comments
 (0)