Skip to content

Commit

Permalink
Merge branch 'release49'
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-dewit committed Jan 18, 2024
2 parents 57890d8 + 20c00ec commit 8e3f0a1
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 30 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.1.4](https://github.com/nrkno/sofie-timeline-state-resolver/compare/8.1.3...8.1.4) (2024-01-18)

**Note:** Version bump only for package timeline-state-resolver-packages





## [8.1.3](https://github.com/nrkno/sofie-timeline-state-resolver/compare/8.1.2...8.1.3) (2024-01-02)


### Bug Fixes

* update failing ccg-connection ([54d031a](https://github.com/nrkno/sofie-timeline-state-resolver/commit/54d031a9eddbaa06a2165c41a3da5a20fea610e9))



## [8.1.2](https://github.com/nrkno/sofie-timeline-state-resolver/compare/8.1.1...8.1.2) (2023-12-21)


Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "8.1.2",
"version": "8.1.4",
"npmClient": "yarn",
"useWorkspaces": true
}
16 changes: 16 additions & 0 deletions packages/quick-tsr/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.1.4](https://github.com/nrkno/sofie-timeline-state-resolver/compare/8.1.3...8.1.4) (2024-01-18)

**Note:** Version bump only for package quick-tsr





## [8.1.3](https://github.com/nrkno/sofie-timeline-state-resolver/compare/8.1.2...8.1.3) (2024-01-02)

**Note:** Version bump only for package quick-tsr





## [8.1.2](https://github.com/nrkno/sofie-timeline-state-resolver/compare/8.1.1...8.1.2) (2023-12-21)

**Note:** Version bump only for package quick-tsr
Expand Down
4 changes: 2 additions & 2 deletions packages/quick-tsr/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "quick-tsr",
"private": true,
"version": "8.1.2",
"version": "8.1.4",
"description": "Read timeline from file, use TSR, play stuff",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -63,7 +63,7 @@
"dependencies": {
"chokidar": "^3.2.1",
"fast-clone": "^1.5.13",
"timeline-state-resolver": "8.1.2",
"timeline-state-resolver": "8.1.4",
"tslib": "^2.4.1",
"underscore": "^1.9.1"
}
Expand Down
17 changes: 17 additions & 0 deletions packages/timeline-state-resolver/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.1.4](https://github.com/nrkno/tv-automation-state-timeline-resolver/compare/8.1.3...8.1.4) (2024-01-18)

**Note:** Version bump only for package timeline-state-resolver





## [8.1.3](https://github.com/nrkno/tv-automation-state-timeline-resolver/compare/8.1.2...8.1.3) (2024-01-02)


### Bug Fixes

* update failing ccg-connection ([54d031a](https://github.com/nrkno/tv-automation-state-timeline-resolver/commit/54d031a9eddbaa06a2165c41a3da5a20fea610e9))



## [8.1.2](https://github.com/nrkno/tv-automation-state-timeline-resolver/compare/8.1.1...8.1.2) (2023-12-21)


Expand Down
10 changes: 5 additions & 5 deletions packages/timeline-state-resolver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "timeline-state-resolver",
"version": "8.1.2",
"version": "8.1.4",
"description": "Have timeline, control stuff",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand All @@ -22,8 +22,8 @@
"url": "http://superfly.tv"
},
{
"name": "Balte de Wit",
"email": "balte@superfly.tv",
"name": "Mint de Wit",
"email": "mint@superfly.tv",
"url": "http://superfly.tv"
},
{
Expand Down Expand Up @@ -92,8 +92,8 @@
"@tv2media/v-connection": "^7.3.0",
"atem-connection": "2.5.0",
"atem-state": "0.13.0",
"casparcg-connection": "^6.0.6",
"casparcg-state": "^3.0.2",
"casparcg-connection": "6.2.0",
"casparcg-state": "3.0.3",
"debug": "^4.3.1",
"deepmerge": "^4.2.2",
"emberplus-connection": "^0.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class BasicCasparCGAPI extends EventEmitter {
instances.push(this)
}

async executeCommand(command: AMCPCommand): Promise<SendResult> {
async executeCommand(command: AMCPCommand): Promise<SendResult<unknown>> {
mockDo.apply(this, command)

if (command.command === Commands.Info) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import * as _ from 'underscore'
import * as deepMerge from 'deepmerge'
import { DeviceWithState, CommandWithContext, DeviceStatus, StatusCode, literal } from '../../devices/device'
import { AMCPCommand, BasicCasparCGAPI, ClearCommand, Commands, Response } from 'casparcg-connection'
import {
AMCPCommand,
AllTypedCommands,
BasicCasparCGAPI,
ClearCommand,
Commands,
InfoChannelEntry,
Response,
} from 'casparcg-connection'
import {
DeviceType,
TimelineContentTypeCasparCg,
Expand Down Expand Up @@ -117,15 +125,15 @@ export class CasparCGDevice extends DeviceWithState<State, DeviceOptionsCasparCG

const response = await request

const channelPromises: Promise<Response>[] = []
const channelPromises: Promise<Response<InfoChannelEntry | undefined>>[] = []
const channelLength: number = response?.data?.['length'] ?? 0

// Issue commands
for (let i = 1; i <= channelLength; i++) {
// 1-based index for channels

const { error, request } = await this._ccg.executeCommand({
command: Commands.Info,
command: Commands.InfoChannel,
params: { channel: i },
})
if (error) {
Expand All @@ -141,7 +149,7 @@ export class CasparCGDevice extends DeviceWithState<State, DeviceOptionsCasparCG
const channelResults = await Promise.all(channelPromises)

// Resync if all channels have no stage object (no possibility of anything playing)
return !channelResults.find((ch) => ch.data['stage'])
return !channelResults.find((ch) => ch.data?.['stage'])
})
.catch((e) => {
this.emit('error', 'connect virgin check failed', e)
Expand Down Expand Up @@ -844,7 +852,11 @@ export class CasparCGDevice extends DeviceWithState<State, DeviceOptionsCasparCG
}
}

private _changeTrackedStateFromCommand(command: AMCPCommand, response: Response, time: number) {
private _changeTrackedStateFromCommand(
command: AMCPCommand,
response: Response<AllTypedCommands[Commands]['returnType']>,
time: number
) {
if (
response.responseCode < 300 && // TODO - maybe we accept every code except 404?
response.command.match(/Loadbg|Play|Load|Clear|Stop|Resume/i) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class MultiOSCMessageDevice extends DeviceWithState<OSCDeviceState, Devic

_.each(state.layers, (layer) => {
const mapping = mappings[layer.layer] as MappingMultiOSC | undefined
if (!mapping) return
if (!mapping || !addrToOSCMessage[mapping.connectionId]) return

if (layer.content.deviceType === DeviceType.OSC) {
const content: OSCDeviceStateContent = {
Expand Down Expand Up @@ -233,7 +233,7 @@ export class MultiOSCMessageDevice extends DeviceWithState<OSCDeviceState, Devic

for (const connectionId of Object.keys(this._connections)) {
_.each(newOscSendState[connectionId], (newCommandContent: OSCDeviceStateContent, address: string) => {
const oldLayer = oldOscSendState[connectionId][address]
const oldLayer = oldOscSendState[connectionId]?.[address]
if (!oldLayer) {
// added!
commands.push({
Expand All @@ -259,7 +259,7 @@ export class MultiOSCMessageDevice extends DeviceWithState<OSCDeviceState, Devic
})
// removed
_.each(oldOscSendState[connectionId], (oldCommandContent: OSCDeviceStateContent, address) => {
const newLayer = newOscSendState[connectionId][address]
const newLayer = newOscSendState[connectionId]?.[address]
if (!newLayer) {
// removed!
commands.push({
Expand Down
39 changes: 26 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2802,23 +2802,23 @@ caseless@~0.12.0:
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==

casparcg-connection@^6.0.0, casparcg-connection@^6.0.6:
version "6.0.6"
resolved "https://registry.yarnpkg.com/casparcg-connection/-/casparcg-connection-6.0.6.tgz#88975bb9b1f1ee6db89ab420ca058fde79b01d2f"
integrity sha512-VFGKg1KslF0mMteZoCz2gQBN+KYUbM3YiNsVWTUNyPuDV6o57iP8V++LY8geAKRYSjQ/RTB4I1QI81L7QZeJaA==
casparcg-connection@6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/casparcg-connection/-/casparcg-connection-6.2.0.tgz#592d45ff5338f99585a873ea863ec014fe36e992"
integrity sha512-iFVmaU2BgCiZlClP3j6tVPuab3CUrhXi9ZYz3U1ENDNa6HQBtWfclwdRqdJWhCwrZc+YAFxR31sovuQ+BznVlQ==
dependencies:
eventemitter3 "^4.0.7"
eventemitter3 "^5.0.1"
tslib "^2.5.0"
xml2js "^0.4.23"
xml2js "^0.6.2"

casparcg-state@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/casparcg-state/-/casparcg-state-3.0.2.tgz#ffe808b1461da1e9b6e239026f80098efdf01bff"
integrity sha512-2HOD7VGoz11k3WNAq2OrPON5m4TR+PFUvmEt7MQAxP2EE02DxGFEKyrwxuqZuO4BsjpYeo1kMkfcq618Yx5AQA==
casparcg-state@3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/casparcg-state/-/casparcg-state-3.0.3.tgz#bafd411d374c042f85cbeba2ba6553ee53097f47"
integrity sha512-dhE0VQymoZrbmIyNGf7aovijya0b/98tFsdM3/EG9vqXgdG0XXT09+r6di8pUX6nR49J+ypQP0wGK9UE0eRnfg==
dependencies:
casparcg-connection "^6.0.0"
casparcg-connection "6.2.0"
fast-clone "^1.5.13"
underscore "^1.13.2"
underscore "^1.13.6"

chalk@4.1.0:
version "4.1.0"
Expand Down Expand Up @@ -3943,6 +3943,11 @@ eventemitter3@^4.0.4, eventemitter3@^4.0.7:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==

eventemitter3@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4"
integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==

events@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
Expand Down Expand Up @@ -8801,7 +8806,7 @@ underscore.string@~3.3.4:
sprintf-js "^1.1.1"
util-deprecate "^1.0.2"

underscore@^1.13.2, underscore@^1.13.4, underscore@^1.13.6, underscore@^1.9.1:
underscore@^1.13.4, underscore@^1.13.6, underscore@^1.9.1:
version "1.13.6"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441"
integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==
Expand Down Expand Up @@ -9219,6 +9224,14 @@ xml2js@^0.4.23:
sax ">=0.6.0"
xmlbuilder "~11.0.0"

xml2js@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.6.2.tgz#dd0b630083aa09c161e25a4d0901e2b2a929b499"
integrity sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==
dependencies:
sax ">=0.6.0"
xmlbuilder "~11.0.0"

xmlbuilder@~11.0.0:
version "11.0.1"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"
Expand Down

0 comments on commit 8e3f0a1

Please sign in to comment.