Skip to content

Commit e8e07e3

Browse files
committed
fix: update mos-connection for missing mosID bug fix (#9)
* chore: improve mos-gateway logging * fix: update mos-connection for missing mosID bug fix
1 parent 3f35590 commit e8e07e3

File tree

9 files changed

+52
-46
lines changed

9 files changed

+52
-46
lines changed

meteor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@babel/runtime": "^7.26.7",
4141
"@koa/cors": "^5.0.0",
4242
"@koa/router": "^13.1.0",
43-
"@mos-connection/helper": "^4.2.2",
43+
"@mos-connection/helper": "4.2.3",
4444
"@slack/webhook": "^7.0.4",
4545
"@sofie-automation/blueprints-integration": "portal:../packages/blueprints-integration",
4646
"@sofie-automation/corelib": "portal:../packages/corelib",

meteor/yarn.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -888,23 +888,23 @@ __metadata:
888888
languageName: node
889889
linkType: hard
890890

891-
"@mos-connection/helper@npm:^4.2.2":
892-
version: 4.2.2
893-
resolution: "@mos-connection/helper@npm:4.2.2"
891+
"@mos-connection/helper@npm:4.2.3":
892+
version: 4.2.3
893+
resolution: "@mos-connection/helper@npm:4.2.3"
894894
dependencies:
895-
"@mos-connection/model": "npm:4.2.2"
895+
"@mos-connection/model": "npm:4.2.3"
896896
iconv-lite: "npm:^0.6.3"
897897
tslib: "npm:^2.5.3"
898898
xml-js: "npm:^1.6.11"
899899
xmlbuilder: "npm:^15.1.1"
900-
checksum: 10/aa81a2808ac48439d0d6c5b586f302bed7f04c0d2bb8795d950b4df856f7ab0904f16464fe7a4838908caf6b26ac91a7ea2d5a1b24dcaed67111dd9f449ed168
900+
checksum: 10/e11b2abebebefa82f5ac4526086957bbb652bbf0cf7bdfd5ae79318c40127e591092d596880569d3fa9b947ce58b6d939bc43995b3480ecc06f6f3dd513d4e65
901901
languageName: node
902902
linkType: hard
903903

904-
"@mos-connection/model@npm:4.2.2, @mos-connection/model@npm:^4.2.2":
905-
version: 4.2.2
906-
resolution: "@mos-connection/model@npm:4.2.2"
907-
checksum: 10/9cf044c543e165c6579df46af7a7081a8cd0baea36b0769b3237c94eef7254959b7b84421d612d39c2f1c6da82080cfd43f795fb42ea1f7cb2b6ce21d7108aeb
904+
"@mos-connection/model@npm:4.2.3":
905+
version: 4.2.3
906+
resolution: "@mos-connection/model@npm:4.2.3"
907+
checksum: 10/57e1c0f1fb8eb7da1c2e49c0907498b50e27626293406602e1f4c7827fc7f8ea26b22c0e98afe786abf369f32a196ae0591670044f046b019f1f42c47b58d0e7
908908
languageName: node
909909
linkType: hard
910910

@@ -1172,7 +1172,7 @@ __metadata:
11721172
version: 0.0.0-use.local
11731173
resolution: "@sofie-automation/meteor-lib@portal:../packages/meteor-lib::locator=automation-core%40workspace%3A."
11741174
dependencies:
1175-
"@mos-connection/helper": "npm:^4.2.2"
1175+
"@mos-connection/helper": "npm:4.2.3"
11761176
"@sofie-automation/blueprints-integration": "npm:1.52.0"
11771177
"@sofie-automation/corelib": "npm:1.52.0"
11781178
"@sofie-automation/shared-lib": "npm:1.52.0"
@@ -1190,7 +1190,7 @@ __metadata:
11901190
version: 0.0.0-use.local
11911191
resolution: "@sofie-automation/shared-lib@portal:../packages/shared-lib::locator=automation-core%40workspace%3A."
11921192
dependencies:
1193-
"@mos-connection/model": "npm:^4.2.2"
1193+
"@mos-connection/model": "npm:4.2.3"
11941194
timeline-state-resolver-types: "npm:9.3.0"
11951195
tslib: "npm:^2.8.1"
11961196
type-fest: "npm:^4.33.0"
@@ -2219,7 +2219,7 @@ __metadata:
22192219
"@babel/runtime": "npm:^7.26.7"
22202220
"@koa/cors": "npm:^5.0.0"
22212221
"@koa/router": "npm:^13.1.0"
2222-
"@mos-connection/helper": "npm:^4.2.2"
2222+
"@mos-connection/helper": "npm:4.2.3"
22232223
"@shopify/jest-koa-mocks": "npm:^5.3.1"
22242224
"@slack/webhook": "npm:^7.0.4"
22252225
"@sofie-automation/blueprints-integration": "portal:../packages/blueprints-integration"

packages/meteor-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"/LICENSE"
4040
],
4141
"dependencies": {
42-
"@mos-connection/helper": "^4.2.2",
42+
"@mos-connection/helper": "4.2.3",
4343
"@sofie-automation/blueprints-integration": "1.52.0",
4444
"@sofie-automation/corelib": "1.52.0",
4545
"@sofie-automation/shared-lib": "1.52.0",

packages/mos-gateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"production"
6666
],
6767
"dependencies": {
68-
"@mos-connection/connector": "^4.2.2",
68+
"@mos-connection/connector": "4.2.3",
6969
"@sofie-automation/server-core-integration": "1.52.0",
7070
"@sofie-automation/shared-lib": "1.52.0",
7171
"tslib": "^2.8.1",

packages/mos-gateway/src/coreHandler.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ export class CoreHandler {
205205
executeFunction(cmd: PeripheralDeviceCommand, fcnObject: CoreHandler | CoreMosDeviceHandler): void {
206206
if (cmd) {
207207
if (this._executedFunctions.has(cmd._id)) return // prevent it from running multiple times
208-
this.logger.debug(cmd.functionName || cmd.actionId || '', cmd.args)
208+
this.logger.debug(
209+
`Executing function "${cmd.functionName || cmd.actionId || ''}", args: ${JSON.stringify(cmd.args)}`
210+
)
211+
209212
this._executedFunctions.add(cmd._id)
210213
// console.log('executeFunction', cmd)
211214
const cb = (errStr: string | null, res?: any) => {
@@ -224,7 +227,7 @@ export class CoreHandler {
224227
// console.log('cb done')
225228
})
226229
.catch((e) => {
227-
this.logger.error(e)
230+
this.logger.error(stringifyError(e))
228231
})
229232
}
230233
// eslint-disable-next-line @typescript-eslint/ban-ts-comment

packages/mos-gateway/src/mosHandler.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ import {
2727
import * as Winston from 'winston'
2828
import { CoreHandler } from './coreHandler'
2929
import { CoreMosDeviceHandler } from './CoreMosDeviceHandler'
30-
import { Observer, PeripheralDevicePubSubCollectionsNames } from '@sofie-automation/server-core-integration'
30+
import {
31+
Observer,
32+
PeripheralDevicePubSubCollectionsNames,
33+
stringifyError,
34+
} from '@sofie-automation/server-core-integration'
3135
import {
3236
DEFAULT_MOS_TIMEOUT_TIME,
3337
DEFAULT_MOS_HEARTBEAT_INTERVAL,
@@ -154,10 +158,9 @@ export class MosHandler {
154158

155159
this._deviceOptionsChanged()
156160
}
157-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
158-
debugLog(msg: any, ...args: any[]): void {
161+
debugLog(msg: string, args?: Record<string, string>): void {
159162
if (this.debugLogging) {
160-
this._logger.debug(msg, ...args)
163+
this._logger.debug(msg, args)
161164
}
162165
}
163166
get strict(): boolean {
@@ -222,15 +225,15 @@ export class MosHandler {
222225
if (`${message}`.indexOf('<heartbeat') >= 0) {
223226
return
224227
}
225-
this.debugLog('rawMessage', source, type, message)
228+
this.debugLog(`rawMessage`, { source, type, rawMessage: message })
226229
})
227-
this.mos.on('info', (message: any) => {
230+
this.mos.on('info', (message) => {
228231
this._logger.info(message)
229232
})
230-
this.mos.on('error', (error: any) => {
231-
this._logger.error(error)
233+
this.mos.on('error', (error) => {
234+
this._logger.error(stringifyError(error))
232235
})
233-
this.mos.on('warning', (warning: any) => {
236+
this.mos.on('warning', (warning) => {
234237
this._logger.error(warning)
235238
})
236239

packages/playout-gateway/src/coreHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export class CoreHandler {
228228
this.logger.error(`executeFunction error: ${errStr}`)
229229
}
230230
fcnObject.core.coreMethods.functionReply(cmd._id, errStr, res).catch((error: any) => {
231-
this.logger.error(error)
231+
this.logger.error(stringifyError(error))
232232
})
233233
}
234234

packages/shared-lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"/LICENSE"
3939
],
4040
"dependencies": {
41-
"@mos-connection/model": "^4.2.2",
41+
"@mos-connection/model": "4.2.3",
4242
"timeline-state-resolver-types": "9.3.0",
4343
"tslib": "^2.8.1",
4444
"type-fest": "^4.33.0"

packages/yarn.lock

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4157,38 +4157,38 @@ __metadata:
41574157
languageName: node
41584158
linkType: hard
41594159

4160-
"@mos-connection/connector@npm:^4.2.2":
4161-
version: 4.2.2
4162-
resolution: "@mos-connection/connector@npm:4.2.2"
4160+
"@mos-connection/connector@npm:4.2.3":
4161+
version: 4.2.3
4162+
resolution: "@mos-connection/connector@npm:4.2.3"
41634163
dependencies:
4164-
"@mos-connection/helper": "npm:4.2.2"
4165-
"@mos-connection/model": "npm:4.2.2"
4164+
"@mos-connection/helper": "npm:4.2.3"
4165+
"@mos-connection/model": "npm:4.2.3"
41664166
eventemitter3: "npm:^5.0.1"
41674167
iconv-lite: "npm:^0.6.3"
41684168
tslib: "npm:^2.5.3"
41694169
xml-js: "npm:^1.6.11"
41704170
xmlbuilder: "npm:^15.1.1"
4171-
checksum: 10/9f130ad7e498e6df65a7736ef875c3d20d281bf29a8f5729c15f8bfd76820783dcd03cbb60d6faec76bc1a55854723fad87125c58b46aad1ec8b92ad5d827fa0
4171+
checksum: 10/fbcdbbde3ad6d756c10944972403973976ff8c8911c8ad483b34369024b98d30adf86b7553487acf3d945da6f870618d1ca18547aab92222f873182617960533
41724172
languageName: node
41734173
linkType: hard
41744174

4175-
"@mos-connection/helper@npm:4.2.2, @mos-connection/helper@npm:^4.2.2":
4176-
version: 4.2.2
4177-
resolution: "@mos-connection/helper@npm:4.2.2"
4175+
"@mos-connection/helper@npm:4.2.3":
4176+
version: 4.2.3
4177+
resolution: "@mos-connection/helper@npm:4.2.3"
41784178
dependencies:
4179-
"@mos-connection/model": "npm:4.2.2"
4179+
"@mos-connection/model": "npm:4.2.3"
41804180
iconv-lite: "npm:^0.6.3"
41814181
tslib: "npm:^2.5.3"
41824182
xml-js: "npm:^1.6.11"
41834183
xmlbuilder: "npm:^15.1.1"
4184-
checksum: 10/aa81a2808ac48439d0d6c5b586f302bed7f04c0d2bb8795d950b4df856f7ab0904f16464fe7a4838908caf6b26ac91a7ea2d5a1b24dcaed67111dd9f449ed168
4184+
checksum: 10/e11b2abebebefa82f5ac4526086957bbb652bbf0cf7bdfd5ae79318c40127e591092d596880569d3fa9b947ce58b6d939bc43995b3480ecc06f6f3dd513d4e65
41854185
languageName: node
41864186
linkType: hard
41874187

4188-
"@mos-connection/model@npm:4.2.2, @mos-connection/model@npm:^4.2.2":
4189-
version: 4.2.2
4190-
resolution: "@mos-connection/model@npm:4.2.2"
4191-
checksum: 10/9cf044c543e165c6579df46af7a7081a8cd0baea36b0769b3237c94eef7254959b7b84421d612d39c2f1c6da82080cfd43f795fb42ea1f7cb2b6ce21d7108aeb
4188+
"@mos-connection/model@npm:4.2.3":
4189+
version: 4.2.3
4190+
resolution: "@mos-connection/model@npm:4.2.3"
4191+
checksum: 10/57e1c0f1fb8eb7da1c2e49c0907498b50e27626293406602e1f4c7827fc7f8ea26b22c0e98afe786abf369f32a196ae0591670044f046b019f1f42c47b58d0e7
41924192
languageName: node
41934193
linkType: hard
41944194

@@ -6019,7 +6019,7 @@ __metadata:
60196019
version: 0.0.0-use.local
60206020
resolution: "@sofie-automation/meteor-lib@workspace:meteor-lib"
60216021
dependencies:
6022-
"@mos-connection/helper": "npm:^4.2.2"
6022+
"@mos-connection/helper": "npm:4.2.3"
60236023
"@sofie-automation/blueprints-integration": "npm:1.52.0"
60246024
"@sofie-automation/corelib": "npm:1.52.0"
60256025
"@sofie-automation/shared-lib": "npm:1.52.0"
@@ -6065,7 +6065,7 @@ __metadata:
60656065
version: 0.0.0-use.local
60666066
resolution: "@sofie-automation/shared-lib@workspace:shared-lib"
60676067
dependencies:
6068-
"@mos-connection/model": "npm:^4.2.2"
6068+
"@mos-connection/model": "npm:4.2.3"
60696069
timeline-state-resolver-types: "npm:9.3.0"
60706070
tslib: "npm:^2.8.1"
60716071
type-fest: "npm:^4.33.0"
@@ -20678,7 +20678,7 @@ asn1@evs-broadcast/node-asn1:
2067820678
version: 0.0.0-use.local
2067920679
resolution: "mos-gateway@workspace:mos-gateway"
2068020680
dependencies:
20681-
"@mos-connection/connector": "npm:^4.2.2"
20681+
"@mos-connection/connector": "npm:4.2.3"
2068220682
"@sofie-automation/server-core-integration": "npm:1.52.0"
2068320683
"@sofie-automation/shared-lib": "npm:1.52.0"
2068420684
tslib: "npm:^2.8.1"

0 commit comments

Comments
 (0)