Skip to content

Commit 902a5e5

Browse files
committed
Merge remote-tracking branch 'nrk/release52' into bbc-release52
2 parents 94bc7c6 + d421e78 commit 902a5e5

File tree

9 files changed

+55
-47
lines changed

9 files changed

+55
-47
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.23.9",
4141
"@koa/cors": "^5.0.0",
4242
"@koa/router": "^12.0.1",
43-
"@mos-connection/helper": "v4.2.0-alpha.1",
43+
"@mos-connection/helper": "v4.2.0",
4444
"@slack/webhook": "^6.1.0",
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
@@ -935,23 +935,23 @@ __metadata:
935935
languageName: node
936936
linkType: hard
937937

938-
"@mos-connection/helper@npm:v4.2.0-alpha.1":
939-
version: 4.2.0-alpha.1
940-
resolution: "@mos-connection/helper@npm:4.2.0-alpha.1"
938+
"@mos-connection/helper@npm:v4.2.0":
939+
version: 4.2.0
940+
resolution: "@mos-connection/helper@npm:4.2.0"
941941
dependencies:
942-
"@mos-connection/model": 4.2.0-alpha.1
942+
"@mos-connection/model": 4.2.0
943943
iconv-lite: ^0.6.3
944944
tslib: ^2.5.3
945945
xml-js: ^1.6.11
946946
xmlbuilder: ^15.1.1
947-
checksum: ad809b542065b921e2d16e30f9ce04fba03d39c18a2944af2a440bfa33e05820954e0448cc6f38a3ed3d043b9b6c9b052cb24af0e6504d4c6723e5864c3df780
947+
checksum: 2f0f049bb6b4323f6b3ff8ed10ed92bea3ad01b7b69ae18414a72bda00a3600ae40e73906663c1274ac3d380b9875b59c971a3aaa2b871114a516da4c7a510c8
948948
languageName: node
949949
linkType: hard
950950

951-
"@mos-connection/model@npm:4.2.0-alpha.1, @mos-connection/model@npm:v4.2.0-alpha.1":
952-
version: 4.2.0-alpha.1
953-
resolution: "@mos-connection/model@npm:4.2.0-alpha.1"
954-
checksum: d0bbbbe86254cf7d17f52a71d4a6b7241749ee784faf4c1d7079852bdce758562a7b2a7d1d92637dafd5d3de433bff6b04e8a969d426be65b384118028b0f6f8
951+
"@mos-connection/model@npm:4.2.0, @mos-connection/model@npm:v4.2.0":
952+
version: 4.2.0
953+
resolution: "@mos-connection/model@npm:4.2.0"
954+
checksum: dda98d14d498c7680aefb2aa143bbe5506f89673e072d84076b77226671b01a4452313c8aed1194e06dbb3d3cbe6561615536c96bb2e34e6223ebd4ee8eb548f
955955
languageName: node
956956
linkType: hard
957957

@@ -1221,7 +1221,7 @@ __metadata:
12211221
version: 0.0.0-use.local
12221222
resolution: "@sofie-automation/meteor-lib@portal:../packages/meteor-lib::locator=automation-core%40workspace%3A."
12231223
dependencies:
1224-
"@mos-connection/helper": v4.2.0-alpha.1
1224+
"@mos-connection/helper": v4.2.0
12251225
"@sofie-automation/blueprints-integration": 1.52.0-in-development
12261226
"@sofie-automation/corelib": 1.52.0-in-development
12271227
"@sofie-automation/shared-lib": 1.52.0-in-development
@@ -1239,7 +1239,7 @@ __metadata:
12391239
version: 0.0.0-use.local
12401240
resolution: "@sofie-automation/shared-lib@portal:../packages/shared-lib::locator=automation-core%40workspace%3A."
12411241
dependencies:
1242-
"@mos-connection/model": v4.2.0-alpha.1
1242+
"@mos-connection/model": v4.2.0
12431243
timeline-state-resolver-types: 9.2.0-nightly-release52-20240923-122840-58cfbb259.0
12441244
tslib: ^2.6.2
12451245
type-fest: ^3.13.1
@@ -2271,7 +2271,7 @@ __metadata:
22712271
"@babel/runtime": ^7.23.9
22722272
"@koa/cors": ^5.0.0
22732273
"@koa/router": ^12.0.1
2274-
"@mos-connection/helper": v4.2.0-alpha.1
2274+
"@mos-connection/helper": v4.2.0
22752275
"@shopify/jest-koa-mocks": ^5.1.1
22762276
"@slack/webhook": ^6.1.0
22772277
"@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": "v4.2.0-alpha.1",
42+
"@mos-connection/helper": "v4.2.0",
4343
"@sofie-automation/blueprints-integration": "1.52.0-in-development",
4444
"@sofie-automation/corelib": "1.52.0-in-development",
4545
"@sofie-automation/shared-lib": "1.52.0-in-development",

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": "v4.2.0-alpha.1",
68+
"@mos-connection/connector": "v4.2.0",
6969
"@sofie-automation/server-core-integration": "1.52.0-in-development",
7070
"@sofie-automation/shared-lib": "1.52.0-in-development",
7171
"tslib": "^2.6.2",

packages/mos-gateway/src/CoreMosDeviceHandler.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ interface IStoryItemChange {
6262
itemDiff: PartialDeep<IMOSItem>
6363
}
6464

65+
export interface CoreMosDeviceHandlerOptions {
66+
openMediaHotStandby?: boolean
67+
}
68+
6569
/**
6670
* Represents a connection between a mos-device and Core
6771
*/
@@ -76,15 +80,20 @@ export class CoreMosDeviceHandler {
7680
private _pendingStoryItemChanges: Array<IStoryItemChange> = []
7781
private _pendingChangeTimeout: number = 60 * 1000
7882
private mosTypes: MosTypes
79-
private _openMediaHotStandby: boolean
83+
private _options: CoreMosDeviceHandlerOptions
8084

8185
private _messageQueue: Queue
8286

83-
constructor(parent: CoreHandler, mosDevice: IMOSDevice, mosHandler: MosHandler, openMediaHotStandby: boolean) {
87+
constructor(
88+
parent: CoreHandler,
89+
mosDevice: IMOSDevice,
90+
mosHandler: MosHandler,
91+
options: CoreMosDeviceHandlerOptions
92+
) {
8493
this._coreParentHandler = parent
8594
this._mosDevice = mosDevice
8695
this._mosHandler = mosHandler
87-
this._openMediaHotStandby = openMediaHotStandby
96+
this._options = options
8897

8998
this._messageQueue = new Queue()
9099

@@ -141,7 +150,7 @@ export class CoreMosDeviceHandler {
141150
let statusCode: StatusCode
142151
const messages: Array<string> = []
143152

144-
if (this._openMediaHotStandby) {
153+
if (this._options.openMediaHotStandby) {
145154
// OpenMedia treats secondary server as hot-standby
146155
// And thus is not considered as a warning if it's not connected
147156
if (connectionStatus.PrimaryConnected) {

packages/mos-gateway/src/coreHandler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { MosHandler } from './mosHandler'
1818
import { DeviceConfig } from './connector'
1919
import { MOS_DEVICE_CONFIG_MANIFEST } from './configManifest'
2020
import { getVersions } from './versions'
21-
import { CoreMosDeviceHandler } from './CoreMosDeviceHandler'
21+
import { CoreMosDeviceHandler, CoreMosDeviceHandlerOptions } from './CoreMosDeviceHandler'
2222
import { PeripheralDeviceCommandId } from '@sofie-automation/shared-lib/dist/core/model/Ids'
2323

2424
export interface CoreConfig {
@@ -145,10 +145,10 @@ export class CoreHandler {
145145
async registerMosDevice(
146146
mosDevice: IMOSDevice,
147147
mosHandler: MosHandler,
148-
openMediaHotStandby: boolean
148+
deviceOptions: CoreMosDeviceHandlerOptions
149149
): Promise<CoreMosDeviceHandler> {
150150
this.logger.info('registerMosDevice -------------')
151-
const coreMos = new CoreMosDeviceHandler(this, mosDevice, mosHandler, openMediaHotStandby)
151+
const coreMos = new CoreMosDeviceHandler(this, mosDevice, mosHandler, deviceOptions)
152152

153153
this._coreMosHandlers.push(coreMos)
154154
return coreMos.init().then(() => {

packages/mos-gateway/src/mosHandler.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ export class MosHandler {
243243

244244
if (!this._coreHandler) throw Error('_coreHandler is undefined!')
245245

246-
const coreMosHandler = await this._coreHandler.registerMosDevice(
247-
mosDevice,
248-
this,
249-
mosDevice.idSecondary ? this._openMediaHotStandby[mosDevice.idSecondary] : false
250-
)
246+
const coreMosHandler = await this._coreHandler.registerMosDevice(mosDevice, this, {
247+
openMediaHotStandby: mosDevice.idSecondary
248+
? this._openMediaHotStandby[mosDevice.idSecondary]
249+
: false,
250+
})
251251
// this._logger.info('mosDevice registered -------------')
252252
// Setup message flow between the devices:
253253

@@ -489,7 +489,6 @@ export class MosHandler {
489489
deviceOptions.primary.heartbeatInterval || DEFAULT_MOS_HEARTBEAT_INTERVAL
490490

491491
if (deviceOptions.secondary?.id && this._openMediaHotStandby[deviceOptions.secondary.id]) {
492-
//@ts-expect-error this is not yet added to the official mos-connection
493492
deviceOptions.secondary.openMediaHotStandby = true
494493
}
495494

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": "v4.2.0-alpha.1",
41+
"@mos-connection/model": "v4.2.0",
4242
"timeline-state-resolver-types": "9.2.0-nightly-release52-20240923-122840-58cfbb259.0",
4343
"tslib": "^2.6.2",
4444
"type-fest": "^3.13.1"

packages/yarn.lock

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3576,38 +3576,38 @@ __metadata:
35763576
languageName: node
35773577
linkType: hard
35783578

3579-
"@mos-connection/connector@npm:v4.2.0-alpha.1":
3580-
version: 4.2.0-alpha.1
3581-
resolution: "@mos-connection/connector@npm:4.2.0-alpha.1"
3579+
"@mos-connection/connector@npm:v4.2.0":
3580+
version: 4.2.0
3581+
resolution: "@mos-connection/connector@npm:4.2.0"
35823582
dependencies:
3583-
"@mos-connection/helper": 4.2.0-alpha.1
3584-
"@mos-connection/model": 4.2.0-alpha.1
3583+
"@mos-connection/helper": 4.2.0
3584+
"@mos-connection/model": 4.2.0
35853585
eventemitter3: ^5.0.1
35863586
iconv-lite: ^0.6.3
35873587
tslib: ^2.5.3
35883588
xml-js: ^1.6.11
35893589
xmlbuilder: ^15.1.1
3590-
checksum: 9cecd2b0f631b1b9894a84db3fd6659d8afe11aa03acaac9798263568e35202d4f7da9694be8028c721c695e7365b2a56aa7243281b4834353e0e413d128df7a
3590+
checksum: e443fc08aa64dec0ad7d13b41ce9e0565f98f969a759b10e76b3961f8d5f2690e7b6fa321d2539e1cb16d88a4d05b439ab07fcf03c49bc7e10bfed69f9ff7081
35913591
languageName: node
35923592
linkType: hard
35933593

3594-
"@mos-connection/helper@npm:4.2.0-alpha.1, @mos-connection/helper@npm:v4.2.0-alpha.1":
3595-
version: 4.2.0-alpha.1
3596-
resolution: "@mos-connection/helper@npm:4.2.0-alpha.1"
3594+
"@mos-connection/helper@npm:4.2.0, @mos-connection/helper@npm:v4.2.0":
3595+
version: 4.2.0
3596+
resolution: "@mos-connection/helper@npm:4.2.0"
35973597
dependencies:
3598-
"@mos-connection/model": 4.2.0-alpha.1
3598+
"@mos-connection/model": 4.2.0
35993599
iconv-lite: ^0.6.3
36003600
tslib: ^2.5.3
36013601
xml-js: ^1.6.11
36023602
xmlbuilder: ^15.1.1
3603-
checksum: ad809b542065b921e2d16e30f9ce04fba03d39c18a2944af2a440bfa33e05820954e0448cc6f38a3ed3d043b9b6c9b052cb24af0e6504d4c6723e5864c3df780
3603+
checksum: 2f0f049bb6b4323f6b3ff8ed10ed92bea3ad01b7b69ae18414a72bda00a3600ae40e73906663c1274ac3d380b9875b59c971a3aaa2b871114a516da4c7a510c8
36043604
languageName: node
36053605
linkType: hard
36063606

3607-
"@mos-connection/model@npm:4.2.0-alpha.1, @mos-connection/model@npm:v4.2.0-alpha.1":
3608-
version: 4.2.0-alpha.1
3609-
resolution: "@mos-connection/model@npm:4.2.0-alpha.1"
3610-
checksum: d0bbbbe86254cf7d17f52a71d4a6b7241749ee784faf4c1d7079852bdce758562a7b2a7d1d92637dafd5d3de433bff6b04e8a969d426be65b384118028b0f6f8
3607+
"@mos-connection/model@npm:4.2.0, @mos-connection/model@npm:v4.2.0":
3608+
version: 4.2.0
3609+
resolution: "@mos-connection/model@npm:4.2.0"
3610+
checksum: dda98d14d498c7680aefb2aa143bbe5506f89673e072d84076b77226671b01a4452313c8aed1194e06dbb3d3cbe6561615536c96bb2e34e6223ebd4ee8eb548f
36113611
languageName: node
36123612
linkType: hard
36133613

@@ -5233,7 +5233,7 @@ __metadata:
52335233
version: 0.0.0-use.local
52345234
resolution: "@sofie-automation/meteor-lib@workspace:meteor-lib"
52355235
dependencies:
5236-
"@mos-connection/helper": v4.2.0-alpha.1
5236+
"@mos-connection/helper": v4.2.0
52375237
"@sofie-automation/blueprints-integration": 1.52.0-in-development
52385238
"@sofie-automation/corelib": 1.52.0-in-development
52395239
"@sofie-automation/shared-lib": 1.52.0-in-development
@@ -5280,7 +5280,7 @@ __metadata:
52805280
version: 0.0.0-use.local
52815281
resolution: "@sofie-automation/shared-lib@workspace:shared-lib"
52825282
dependencies:
5283-
"@mos-connection/model": v4.2.0-alpha.1
5283+
"@mos-connection/model": v4.2.0
52845284
timeline-state-resolver-types: 9.2.0-nightly-release52-20240923-122840-58cfbb259.0
52855285
tslib: ^2.6.2
52865286
type-fest: ^3.13.1
@@ -19507,7 +19507,7 @@ asn1@evs-broadcast/node-asn1:
1950719507
version: 0.0.0-use.local
1950819508
resolution: "mos-gateway@workspace:mos-gateway"
1950919509
dependencies:
19510-
"@mos-connection/connector": v4.2.0-alpha.1
19510+
"@mos-connection/connector": v4.2.0
1951119511
"@sofie-automation/server-core-integration": 1.52.0-in-development
1951219512
"@sofie-automation/shared-lib": 1.52.0-in-development
1951319513
tslib: ^2.6.2

0 commit comments

Comments
 (0)