refactor: migrate custom fields to transactions

refactor: extract functions to api domain

refactor: strict custom field parsing

refactor: remove rundown cache utilities

refactor: directory restructure
This commit is contained in:
Carlos Valente
2025-06-06 21:08:30 +02:00
committed by arc-alex
parent f3b4ea0155
commit 2498e59156
75 changed files with 2060 additions and 2480 deletions
+3 -3
View File
@@ -2,11 +2,11 @@ import { writeFileSync } from 'fs';
import { join } from 'path';
import { ONTIME_VERSION } from '../ONTIME_VERSION.js';
import { get } from '../services/rundown-service/rundownCache.js';
import { getState } from '../stores/runtimeState.js';
import { publicDir } from '../setup/index.js';
import { ensureDirectory } from './fileManagement.js';
import { getCurrentRundown } from '../api-data/rundown/rundown.dao.js';
/**
* Writes a file to the crash report location
* @param fileName
@@ -31,7 +31,7 @@ function writeToFile(fileName: string, content: object) {
export function generateCrashReport(maybeError: unknown) {
const timeNow = new Date().toISOString();
const runtimeState = getState();
const rundownState = get();
const currentRundown = getCurrentRundown();
const error =
maybeError instanceof Error
? {
@@ -45,7 +45,7 @@ export function generateCrashReport(maybeError: unknown) {
version: ONTIME_VERSION,
error,
runtimeState,
rundownState,
currentRundown,
};
writeToFile(`crash-log-${timeNow}.log`, crashReport);