mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 02:43:50 +00:00
v2 cleanup (#427)
* refactor: remove useless template * refactor: handle promise * refactor: associate labels to fields * refactor: simplify checking if element exists * refactor: prevent reassigning * refactor: avoid wildcard imports * refactor: simplify imports * refactor: simplify boolean comparison * chore: version bump
This commit is contained in:
@@ -6,7 +6,7 @@ import { dispatchFromAdapter } from '../controllers/integrationController.js';
|
||||
import { logger } from '../classes/Logger.js';
|
||||
|
||||
export class OscServer implements IAdapter {
|
||||
private osc: Server;
|
||||
private readonly osc: Server;
|
||||
|
||||
constructor(config: OSCSettings) {
|
||||
this.osc = new Server(config.portIn, '0.0.0.0');
|
||||
|
||||
@@ -28,7 +28,7 @@ export class SocketServer implements IAdapter {
|
||||
private readonly MAX_PAYLOAD = 1024 * 256; // 256Kb
|
||||
|
||||
private wss: WebSocketServer | null;
|
||||
private clientIds: Set<string>;
|
||||
private readonly clientIds: Set<string>;
|
||||
|
||||
constructor() {
|
||||
if (instance) {
|
||||
|
||||
@@ -37,7 +37,7 @@ export class OscIntegration implements IIntegration {
|
||||
if (validateType || validateNull) {
|
||||
return {
|
||||
success: false,
|
||||
message: `Config options incorrect`,
|
||||
message: 'Config options incorrect',
|
||||
};
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -39,7 +39,7 @@ export const parseRundown = (data): OntimeRundown => {
|
||||
}
|
||||
|
||||
// double check unique ids
|
||||
if (ids.indexOf(e?.id) !== -1) {
|
||||
if (ids.includes(e?.id)) {
|
||||
console.log('ERROR: ID collision on import, skipping');
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import multer from 'multer';
|
||||
import * as path from 'path';
|
||||
import path from 'path';
|
||||
|
||||
import { EXCEL_MIME, JSON_MIME } from './parser.js';
|
||||
import { ensureDirectory } from './fileManagement.js';
|
||||
|
||||
Reference in New Issue
Block a user