Skip to content

Commit 81ec8b0

Browse files
committed
wip
1 parent fb0dabe commit 81ec8b0

File tree

8 files changed

+202
-234
lines changed

8 files changed

+202
-234
lines changed

meteor/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
"@babel/core": "^7.26.0",
7878
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
7979
"@shopify/jest-koa-mocks": "^5.3.1",
80-
"@sofie-automation/code-standard-preset": "github:SuperFlyTV/sofie-code-standard-preset#commit=83e28ec8c6e0ea6287c20814f5dcb0cde1226b3d",
81-
"@sofie-automation/eslint-plugin": "^0.1.1",
80+
"@sofie-automation/code-standard-preset": "github:SuperFlyTV/sofie-code-standard-preset#commit=68d950c8fc2213b59fa1609a40c59bd4b3d44b2c",
8281
"@types/app-root-path": "^1.2.8",
8382
"@types/body-parser": "^1.19.5",
8483
"@types/deep-extend": "^0.6.2",

meteor/yarn.lock

Lines changed: 79 additions & 161 deletions
Large diffs are not rendered by default.

packages/corelib/src/mongo.ts

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export function mongoWhere<T>(o: Record<string, any>, selector: MongoQuery<T>):
154154
}
155155
export function mongoFindOptions<TDoc extends { _id: ProtectedString<any> }>(
156156
docs0: ReadonlyArray<TDoc>,
157-
options?: FindOptions<TDoc>,
157+
options?: FindOptions<TDoc>
158158
): TDoc[] {
159159
let docs = [...docs0] // Shallow clone it
160160
if (options) {
@@ -241,7 +241,7 @@ export function mongoFindOptions<TDoc extends { _id: ProtectedString<any> }>(
241241
export function mongoModify<TDoc extends { _id: ProtectedString<any> }>(
242242
selector: MongoQuery<TDoc>,
243243
doc: TDoc,
244-
modifier: MongoModifier<TDoc>,
244+
modifier: MongoModifier<TDoc>
245245
): TDoc {
246246
let replace = false
247247
for (const [key, value] of Object.entries<any>(modifier)) {
@@ -293,7 +293,7 @@ export function mutatePath<T>(
293293
obj: Record<string, unknown>,
294294
path: string,
295295
substitutions: Record<string, unknown>,
296-
mutator: (parentObj: Record<string, unknown>, key: string) => T,
296+
mutator: (parentObj: Record<string, unknown>, key: string) => T
297297
): void {
298298
if (!path) throw new Error('parameter path missing')
299299

@@ -333,7 +333,7 @@ export function mutatePath<T>(
333333
if (attr === '$') {
334334
if (!_.isArray(o))
335335
throw new Error(
336-
'Object at "' + currentPath + '" is not an array ("' + o + '") (in path "' + path + '")',
336+
'Object at "' + currentPath + '" is not an array ("' + o + '") (in path "' + path + '")'
337337
)
338338

339339
const info = generateWildcardAttrInfo()
@@ -352,7 +352,7 @@ export function mutatePath<T>(
352352
} else {
353353
if (!_.isObject(o[attr]))
354354
throw new Error(
355-
'Object propery "' + attr + '" is not an object ("' + o[attr] + '") (in path "' + path + '")',
355+
'Object propery "' + attr + '" is not an object ("' + o[attr] + '") (in path "' + path + '")'
356356
)
357357
}
358358
o = o[attr]
@@ -369,7 +369,7 @@ export function mutatePath<T>(
369369
o.forEach((val, i) => {
370370
// mutate any objects which match
371371
if (_.isMatch(val, info.query)) {
372-
mutator(o, i + '')
372+
mutator(o as any, i + '')
373373
}
374374
})
375375
} else {
@@ -389,13 +389,7 @@ export function pushOntoPath<T>(obj: Record<string, unknown>, path: string, valu
389389
} else {
390390
if (!_.isArray(o[lastAttr]))
391391
throw new Error(
392-
'Object propery "' +
393-
lastAttr +
394-
'" is not an array ("' +
395-
o[lastAttr] +
396-
'") (in path "' +
397-
path +
398-
'")',
392+
'Object propery "' + lastAttr + '" is not an array ("' + o[lastAttr] + '") (in path "' + path + '")'
399393
)
400394
}
401395
const arr: any = o[lastAttr]
@@ -416,13 +410,7 @@ export function pullFromPath<T>(obj: Record<string, unknown>, path: string, matc
416410
if (_.has(o, lastAttr)) {
417411
if (!_.isArray(o[lastAttr]))
418412
throw new Error(
419-
'Object propery "' +
420-
lastAttr +
421-
'" is not an array ("' +
422-
o[lastAttr] +
423-
'") (in path "' +
424-
path +
425-
'")',
413+
'Object propery "' + lastAttr + '" is not an array ("' + o[lastAttr] + '") (in path "' + path + '")'
426414
)
427415

428416
return (o[lastAttr] = _.filter(o[lastAttr] as any, (entry: T) => !_.isMatch(entry, matchValue)))
@@ -443,13 +431,13 @@ export function setOntoPath<T>(
443431
obj: Record<string, unknown>,
444432
path: string,
445433
substitutions: Record<string, unknown>,
446-
valueToSet: T,
434+
valueToSet: T
447435
): void {
448436
mutatePath(
449437
obj,
450438
path,
451439
substitutions,
452-
(parentObj: Record<string, unknown>, key: string) => (parentObj[key] = valueToSet),
440+
(parentObj: Record<string, unknown>, key: string) => (parentObj[key] = valueToSet)
453441
)
454442
}
455443
/**

packages/live-status-gateway/tsconfig.build.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"live-status-gateway": ["./src/index.ts"]
1111
},
1212
"types": ["node"],
13-
"resolveJsonModule": true
14-
},
13+
"resolveJsonModule": true,
14+
"skipLibCheck": true
15+
}
1516
}

packages/mos-gateway/tsconfig.build.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"mos-gateway": ["./src/index.ts"]
1111
},
1212
"types": ["node"],
13-
"resolveJsonModule": true
13+
"resolveJsonModule": true,
14+
"skipLibCheck": true
1415
}
1516
}

packages/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"devDependencies": {
4040
"@babel/core": "^7.26.0",
4141
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
42-
"@sofie-automation/code-standard-preset": "github:SuperFlyTV/sofie-code-standard-preset#commit=83e28ec8c6e0ea6287c20814f5dcb0cde1226b3d",
42+
"@sofie-automation/code-standard-preset": "github:SuperFlyTV/sofie-code-standard-preset#commit=68d950c8fc2213b59fa1609a40c59bd4b3d44b2c",
4343
"@types/amqplib": "^0.10.6",
4444
"@types/debug": "^4.1.12",
4545
"@types/ejson": "^2.2.2",

packages/webui/src/client/ui/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ export const App: React.FC = function App() {
9898
.catch(catchError('documentElement.requestFullscreen'))
9999

100100
// Use Keyboard API to lock the keyboard and disable all browser shortcuts
101-
if (!('keyboard' in navigator)) return
102-
// but we check for its availability, so it should be fine.
103-
// Keyboard Lock: https://wicg.github.io/keyboard-lock/
104-
navigator.keyboard.lock().catch(catchError('keyboard.lock'))
101+
if (!('keyboard' in navigator))
102+
return // but we check for its availability, so it should be fine.
103+
// Keyboard Lock: https://wicg.github.io/keyboard-lock/
104+
;(navigator.keyboard as any).lock().catch(catchError('keyboard.lock'))
105105
},
106106
{
107107
once: true,

0 commit comments

Comments
 (0)