From cd92561a02e58f02d5c97351cc67934f77ecb5fb Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Tue, 20 Apr 2021 12:01:54 +0100 Subject: [PATCH] fix: Remove ExpectedPlayoutItemContentBase from tsr-types [publish] --- src/devices/device.ts | 10 ++++------ src/devices/vizMSE.ts | 8 ++++---- src/expectedPlayoutItems.ts | 10 ++++++++++ src/index.ts | 1 + src/types/src/expectedPlayoutItems.ts | 10 +--------- 5 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 src/expectedPlayoutItems.ts diff --git a/src/devices/device.ts b/src/devices/device.ts index 51aa0be424..2824370008 100644 --- a/src/devices/device.ts +++ b/src/devices/device.ts @@ -1,14 +1,12 @@ import * as _ from 'underscore' import { TimelineState } from 'superfly-timeline' -import { - Mappings, - DeviceType, - ExpectedPlayoutItemContent -} from '../types/src' +import { Mappings, DeviceType } from '../types/src' import { EventEmitter } from 'events' import { CommandReport, DoOnTime } from '../doOnTime' import { DeviceInitOptions, DeviceOptionsAny } from '../types/src/device' import { MediaObject } from '../types/src/mediaObject' +import { ExpectedPlayoutItem } from '../expectedPlayoutItems' + /* This is a base class for all the Device wrappers. The Device wrappers will @@ -189,7 +187,7 @@ export abstract class Device extends EventEmitter implements IDevice { get supportsExpectedPlayoutItems (): boolean { return false } - public handleExpectedPlayoutItems (_expectedPlayoutItems: Array): void { + public handleExpectedPlayoutItems (_expectedPlayoutItems: Array): void { // When receiving a new list of playoutItems. // by default, do nothing } diff --git a/src/devices/vizMSE.ts b/src/devices/vizMSE.ts index 98f4e6c57e..a0bdf41eb3 100644 --- a/src/devices/vizMSE.ts +++ b/src/devices/vizMSE.ts @@ -17,7 +17,6 @@ import { TimelineObjVIZMSEElementInternal, TimelineContentTypeVizMSE, TimelineObjVIZMSEElementPilot, - ExpectedPlayoutItemContent, VIZMSEPlayoutItemContent, DeviceOptionsVizMSE, TimelineObjVIZMSEAny, @@ -45,6 +44,7 @@ import * as crypto from 'crypto' import * as net from 'net' import * as request from 'request' import { MediaObject } from '../types/src/mediaObject' +import { ExpectedPlayoutItem } from '../expectedPlayoutItems' /** The ideal time to prepare elements before going on air */ const IDEAL_PREPARE_TIME = 1000 @@ -224,7 +224,7 @@ export class VizMSEDevice extends DeviceWithState implements IDevic get supportsExpectedPlayoutItems (): boolean { return true } - public handleExpectedPlayoutItems (expectedPlayoutItems: Array): void { + public handleExpectedPlayoutItems (expectedPlayoutItems: Array): void { this.emit('debug', 'VIZDEBUG: handleExpectedPlayoutItems called') if (this._vizmseManager) { this.emit('debug', 'VIZDEBUG: manager exists') @@ -778,7 +778,7 @@ class VizMSEManager extends EventEmitter { private _rundown: VRundown | undefined private _elementCache: {[hash: string]: CachedVElement } = {} - private _expectedPlayoutItems: Array = [] + private _expectedPlayoutItems: Array = [] private _monitorAndLoadElementsTimeout?: NodeJS.Timer private _monitorMSEConnectionTimeout?: NodeJS.Timer private _lastTimeCommandSent: number = 0 @@ -868,7 +868,7 @@ class VizMSEManager extends EventEmitter { * Set the collection of expectedPlayoutItems. * These will be monitored and can be triggered to pre-load. */ - public setExpectedPlayoutItems (expectedPlayoutItems: Array) { + public setExpectedPlayoutItems (expectedPlayoutItems: Array) { this.emit('debug', 'VIZDEBUG: setExpectedPlayoutItems called') if (this.preloadAllElements) { this.emit('debug', 'VIZDEBUG: preload elements allowed') diff --git a/src/expectedPlayoutItems.ts b/src/expectedPlayoutItems.ts new file mode 100644 index 0000000000..2b51fab4b1 --- /dev/null +++ b/src/expectedPlayoutItems.ts @@ -0,0 +1,10 @@ +import { ExpectedPlayoutItemContent } from './types/src' + +export interface ExpectedPlayoutItemContentBase { + /** Id of the rundown the items comes from */ + rundownId: string + /** Id of the rundown playlist the items comes from */ + playlistId: string +} + +export type ExpectedPlayoutItem = ExpectedPlayoutItemContent & ExpectedPlayoutItemContentBase diff --git a/src/index.ts b/src/index.ts index ba32fc34f1..5e34f5b2a9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ export * from './conductor' export * from './doOnTime' +export * from './expectedPlayoutItems' export { CasparCGDevice } from './devices/casparCG' export { HyperdeckDevice } from './devices/hyperdeck' export { QuantelDevice } from './devices/quantel' diff --git a/src/types/src/expectedPlayoutItems.ts b/src/types/src/expectedPlayoutItems.ts index c2554d4e7d..88d7b66039 100644 --- a/src/types/src/expectedPlayoutItems.ts +++ b/src/types/src/expectedPlayoutItems.ts @@ -1,11 +1,3 @@ import { VIZMSEPlayoutItemContent } from './vizMSE' -export type ExpectedPlayoutItemContent = ExpectedPlayoutItemContentVizMSE - -export interface ExpectedPlayoutItemContentBase { - /** Id of the rundown the items comes from */ - rundownId: string - /** Id of the rundown playlist the items comes from */ - playlistId: string -} -export type ExpectedPlayoutItemContentVizMSE = ExpectedPlayoutItemContentBase & VIZMSEPlayoutItemContent +export type ExpectedPlayoutItemContent = VIZMSEPlayoutItemContent