Skip to content

Commit af0e922

Browse files
committed
Merge branch 'release/26.03'
2 parents 91845d1 + 78b15af commit af0e922

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

meteor/server/publications/packageManager/expectedPackages/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { MappingExt, MappingsExt, StudioRouteSet } from '@sofie-automation/corel
33
import { ReadonlyDeep } from 'type-fest'
44
import { getActiveRoutes, getRoutedMappings } from '@sofie-automation/meteor-lib/dist/collections/Studios'
55

6-
type MappingExtWithOriginalName = MappingExt & { originalLayerName: string }
6+
type MappingExtWithOriginalName = ReadonlyDeep<MappingExt> & { originalLayerName: string }
77
type MappingsExtWithOriginalName = {
88
[layerName: string]: MappingExtWithOriginalName
99
}
@@ -13,7 +13,7 @@ export function buildMappingsToDeviceIdMap(
1313
): Map<string, PeripheralDeviceId[]> {
1414
// Map the expectedPackages onto their specified layer:
1515
const mappingsWithPackages: MappingsExtWithOriginalName = {}
16-
for (const [layerName, mapping] of Object.entries<MappingExt>(studioMappings)) {
16+
for (const [layerName, mapping] of Object.entries<ReadonlyDeep<MappingExt>>(studioMappings)) {
1717
mappingsWithPackages[layerName] = {
1818
...mapping,
1919
originalLayerName: layerName,

meteor/server/publications/pieceContentStatusUI/checkPieceContentStatus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ function routeExpectedPackage(
11861186
expectedPackage: ExpectedPackage.Base
11871187
): Set<PeripheralDeviceId> {
11881188
// Collect the relevant mappings
1189-
const mappingsWithPackages: MappingsExt = {}
1189+
const mappingsWithPackages: { [layerName: string]: ReadonlyDeep<MappingExt> } = {}
11901190
for (const layerName of expectedPackage.layers) {
11911191
const mapping = studioMappings[layerName]
11921192

@@ -1201,5 +1201,5 @@ function routeExpectedPackage(
12011201
const routedMappings = getRoutedMappings(mappingsWithPackages, routes)
12021202

12031203
// Find the referenced deviceIds
1204-
return new Set(Object.values<MappingExt>(routedMappings).map((mapping) => mapping.deviceId))
1204+
return new Set(Object.values<ReadonlyDeep<MappingExt>>(routedMappings).map((mapping) => mapping.deviceId))
12051205
}

packages/job-worker/src/playout/lookahead/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function parseSearchDistance(rawVal: number | undefined): number {
3636
}
3737
}
3838

39-
function findLargestLookaheadDistance(mappings: Array<[string, MappingExt]>): number {
39+
function findLargestLookaheadDistance(mappings: Array<[string, ReadonlyDeep<MappingExt>]>): number {
4040
const values = mappings.map(([_id, m]) => parseSearchDistance(m.lookaheadMaxSearchDistance))
4141
return _.max(values)
4242
}
@@ -80,7 +80,7 @@ export async function getLookeaheadObjects(
8080
): Promise<Array<TimelineObjRundown & OnGenerateTimelineObjExt>> {
8181
const span = context.startSpan('getLookeaheadObjects')
8282
const allMappings = context.studio.mappings
83-
const mappingsToConsider = Object.entries<MappingExt>(allMappings).filter(
83+
const mappingsToConsider = Object.entries<ReadonlyDeep<MappingExt>>(allMappings).filter(
8484
([_id, map]) => map.lookahead !== LookaheadMode.NONE && map.lookahead !== undefined
8585
)
8686
if (mappingsToConsider.length === 0) {

packages/meteor-lib/src/collections/Studios.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from '@sofie-automation/corelib/dist/dataModel/Studio'
88
import { omit } from '@sofie-automation/corelib/dist/lib'
99
import { protectString } from '@sofie-automation/corelib/dist/protectedString'
10+
import { ReadonlyDeep } from 'type-fest'
1011

1112
export function getActiveRoutes(routeSets: Record<string, StudioRouteSet>): ResultingMappingRoutes {
1213
const routes: ResultingMappingRoutes = {
@@ -47,7 +48,7 @@ export function getActiveRoutes(routeSets: Record<string, StudioRouteSet>): Resu
4748

4849
return routes
4950
}
50-
export function getRoutedMappings<M extends MappingExt>(
51+
export function getRoutedMappings<M extends ReadonlyDeep<MappingExt>>(
5152
inputMappings: { [layerName: string]: M },
5253
mappingRoutes: ResultingMappingRoutes
5354
): { [layerName: string]: M } {

packages/webui/src/client/ui/Settings/Studio/Mappings.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import {
4444
translateStringIfHasNamespaces,
4545
} from '../../../lib/forms/schemaFormUtil.js'
4646
import { Studios } from '../../../collections/index.js'
47+
import { ReadonlyDeep } from 'type-fest'
4748

4849
export interface MappingsSettingsManifest {
4950
displayName: string
@@ -189,7 +190,7 @@ interface DeletedEntryProps {
189190
manifestNames: Record<string | number, string>
190191
translationNamespaces: string[]
191192

192-
mapping: MappingExt
193+
mapping: ReadonlyDeep<MappingExt>
193194
layerId: string
194195
doUndelete: (itemId: string) => void
195196
}
@@ -531,7 +532,7 @@ function StudioMappingsEntry({
531532
interface MappingSummaryProps {
532533
translationNamespaces: string[]
533534
fields: SchemaSummaryField[]
534-
mapping: MappingExt
535+
mapping: ReadonlyDeep<MappingExt>
535536
}
536537
function MappingSummary({ translationNamespaces, fields, mapping }: Readonly<MappingSummaryProps>) {
537538
if (fields.length > 0) {

0 commit comments

Comments
 (0)