Skip to content

Commit 6aa4104

Browse files
committed
feat: meteor 2.16
1 parent 7c907cc commit 6aa4104

File tree

70 files changed

+1145
-601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1145
-601
lines changed

meteor/.meteor/packages

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
# but you can also edit it by hand.
1010

1111
[email protected] # Packages every Meteor app needs to have
12-
[email protected].7 # The database Meteor supports right now
12+
[email protected].10 # The database Meteor supports right now
1313
[email protected] # Reactive variable for tracker
1414

15-
[email protected].7 # Enable ECMAScript2015+ syntax in app code
16-
[email protected].4 # Enable TypeScript syntax in .ts and .tsx modules
15+
[email protected].8 # Enable ECMAScript2015+ syntax in app code
16+
[email protected].5 # Enable TypeScript syntax in .ts and .tsx modules
1717
[email protected] # Server-side component of the `meteor shell` command
1818

19-
[email protected].2 # Meteor's client-side reactive programming library
19+
[email protected].3 # Meteor's client-side reactive programming library
2020

2121
2222
ostrio:meteor-root
23-
accounts-password@2.3.4
23+
accounts-password@2.4.0
2424

2525
2626
zodern:types

meteor/.meteor/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
METEOR@2.13.3
1+
METEOR@2.16

meteor/.meteor/versions

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
2-
accounts-password@2.3.4
1+
2+
accounts-password@2.4.0
33
44
5-
5+
66
77
88
9-
9+
1010
11-
check@1.3.2
11+
check@1.4.1
1212
13-
14-
15-
16-
ddp-server@2.6.2
13+
14+
15+
16+
ddp-server@2.7.1
1717
1818
19-
19+
2020
2121
2222
2323
24-
24+
2525
26-
26+
2727
2828
2929
3030
3131
3232
3333
34-
35-
34+
35+
3636
37-
38-
39-
modules@0.19.0
37+
38+
39+
modules@0.20.0
4040
41-
41+
4242
4343
4444
45-
npm-mongo@4.16.0
45+
npm-mongo@4.17.2
4646
4747
4848
4949
5050
51-
51+
5252
5353
5454
5555
5656
5757
58-
59-
60-
61-
underscore@1.0.13
58+
59+
60+
61+
underscore@1.6.1
6262
63-
63+
6464
6565

meteor/server/__tests__/_testEnvironment.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ describe('Basic test of test environment', () => {
153153
const studios = await Studios.findFetchAsync({})
154154
expect(studios).toHaveLength(1)
155155

156-
const observer = Studios.observeChanges({ _id: protectString('abc') }, {})
156+
const observer = await Studios.observeChanges({ _id: protectString('abc') }, {})
157157
expect(observer).toBeTruthy()
158158

159159
await Studios.insertAsync({

meteor/server/api/ExternalMessageQueue.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Meteor } from 'meteor/meteor'
22
import { check } from '../lib/check'
33
import { StatusCode } from '@sofie-automation/blueprints-integration'
4-
import { deferAsync, getCurrentTime } from '../lib/lib'
4+
import { deferAsync, getCurrentTime, MeteorStartupAsync } from '../lib/lib'
55
import { registerClassToMeteorMethods } from '../methods'
66
import {
77
NewExternalMessageQueueAPI,
@@ -50,18 +50,19 @@ function updateExternalMessageQueueStatus(): void {
5050
}
5151
}
5252

53-
ExternalMessageQueue.observeChanges(
54-
{
55-
sent: { $not: { $gt: 0 } },
56-
tryCount: { $gt: 3 },
57-
},
58-
{
59-
added: updateExternalMessageQueueStatus,
60-
changed: updateExternalMessageQueueStatus,
61-
removed: updateExternalMessageQueueStatus,
62-
}
63-
)
64-
Meteor.startup(() => {
53+
MeteorStartupAsync(async () => {
54+
await ExternalMessageQueue.observeChanges(
55+
{
56+
sent: { $not: { $gt: 0 } },
57+
tryCount: { $gt: 3 },
58+
},
59+
{
60+
added: updateExternalMessageQueueStatus,
61+
changed: updateExternalMessageQueueStatus,
62+
removed: updateExternalMessageQueueStatus,
63+
}
64+
)
65+
6566
updateExternalMessageQueueStatus()
6667
// triggerdoMessageQueue(5000)
6768
})

meteor/server/api/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ export namespace ServerClientAPI {
422422

423423
class ServerClientAPIClass extends MethodContextAPI implements NewClientAPI {
424424
async clientLogger(type: string, ...args: string[]): Promise<void> {
425+
triggerWriteAccessBecauseNoCheckNecessary()
426+
425427
const loggerFunction: LeveledLogMethodFixed = (logger as any)[type] || logger.log
426428

427429
loggerFunction(args.join(', '))

meteor/server/api/deviceTriggers/RundownContentObserver.ts

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
rundownPlaylistFieldSpecifier,
2424
segmentFieldSpecifier,
2525
} from './reactiveContentCache'
26+
import { waitForAllObserversReady } from '../../publications/lib/lib'
2627

2728
const REACTIVITY_DEBOUNCE = 20
2829

@@ -37,41 +38,56 @@ export class RundownContentObserver {
3738
}
3839
#disposed = false
3940

40-
constructor(
41-
rundownPlaylistId: RundownPlaylistId,
42-
showStyleBaseId: ShowStyleBaseId,
43-
rundownIds: RundownId[],
44-
onChanged: ChangedHandler
45-
) {
46-
logger.silly(`Creating RundownContentObserver for playlist "${rundownPlaylistId}"`)
41+
private constructor(onChanged: ChangedHandler) {
4742
const { cache, cancel: cancelCache } = createReactiveContentCache(() => {
4843
this.#cleanup = onChanged(cache)
4944
if (this.#disposed) this.#cleanup()
5045
}, REACTIVITY_DEBOUNCE)
5146

5247
this.#cache = cache
5348
this.#cancelCache = cancelCache
49+
}
50+
51+
static async create(
52+
rundownPlaylistId: RundownPlaylistId,
53+
showStyleBaseId: ShowStyleBaseId,
54+
rundownIds: RundownId[],
55+
onChanged: ChangedHandler
56+
): Promise<RundownContentObserver> {
57+
logger.silly(`Creating RundownContentObserver for playlist "${rundownPlaylistId}"`)
58+
59+
const observer = new RundownContentObserver(onChanged)
60+
61+
await observer.initObservers(rundownPlaylistId, showStyleBaseId, rundownIds)
5462

55-
this.#observers = [
56-
RundownPlaylists.observeChanges(rundownPlaylistId, cache.RundownPlaylists.link(), {
63+
return observer
64+
}
65+
66+
private async initObservers(
67+
rundownPlaylistId: RundownPlaylistId,
68+
showStyleBaseId: ShowStyleBaseId,
69+
rundownIds: RundownId[]
70+
) {
71+
this.#observers = await waitForAllObserversReady([
72+
RundownPlaylists.observeChanges(rundownPlaylistId, this.#cache.RundownPlaylists.link(), {
5773
projection: rundownPlaylistFieldSpecifier,
5874
}),
59-
ShowStyleBases.observeChanges(showStyleBaseId, cache.ShowStyleBases.link()),
75+
ShowStyleBases.observeChanges(showStyleBaseId, this.#cache.ShowStyleBases.link()),
6076
TriggeredActions.observeChanges(
6177
{
6278
showStyleBaseId: {
6379
$in: [showStyleBaseId, null],
6480
},
6581
},
66-
cache.TriggeredActions.link()
82+
this.#cache.TriggeredActions.link()
6783
),
6884
Segments.observeChanges(
6985
{
7086
rundownId: {
7187
$in: rundownIds,
7288
},
7389
},
74-
cache.Segments.link(),
90+
this.#cache.Segments.link(),
7591
{
7692
projection: segmentFieldSpecifier,
7793
}
@@ -82,7 +98,7 @@ export class RundownContentObserver {
8298
$in: rundownIds,
8399
},
84100
},
85-
cache.Parts.link(),
101+
this.#cache.Parts.link(),
86102
{
87103
projection: partFieldSpecifier,
88104
}
@@ -96,7 +112,7 @@ export class RundownContentObserver {
96112
$ne: true,
97113
},
98114
},
99-
cache.PartInstances.link(),
115+
this.#cache.PartInstances.link(),
100116
{
101117
projection: partInstanceFieldSpecifier,
102118
}
@@ -107,7 +123,7 @@ export class RundownContentObserver {
107123
$in: rundownIds,
108124
},
109125
},
110-
cache.RundownBaselineAdLibActions.link(),
126+
this.#cache.RundownBaselineAdLibActions.link(),
111127
{
112128
projection: adLibActionFieldSpecifier,
113129
}
@@ -118,7 +134,7 @@ export class RundownContentObserver {
118134
$in: rundownIds,
119135
},
120136
},
121-
cache.RundownBaselineAdLibPieces.link(),
137+
this.#cache.RundownBaselineAdLibPieces.link(),
122138
{
123139
projection: adLibPieceFieldSpecifier,
124140
}
@@ -129,7 +145,7 @@ export class RundownContentObserver {
129145
$in: rundownIds,
130146
},
131147
},
132-
cache.AdLibActions.link(),
148+
this.#cache.AdLibActions.link(),
133149
{
134150
projection: adLibActionFieldSpecifier,
135151
}
@@ -140,12 +156,12 @@ export class RundownContentObserver {
140156
$in: rundownIds,
141157
},
142158
},
143-
cache.AdLibPieces.link(),
159+
this.#cache.AdLibPieces.link(),
144160
{
145161
projection: adLibPieceFieldSpecifier,
146162
}
147163
),
148-
]
164+
])
149165
}
150166

151167
public get cache(): ContentCache {

0 commit comments

Comments
 (0)