Revert "Session version" (#1649)

* Revert "refactor: add version to session endpoint"

This reverts commit cd40a6e55e.

* Revert "Remove public event feature (#1645)"

This reverts commit 08d9e24871.

* Revert "Fix: rearrange playing event (#1640)"

This reverts commit 0649678dca.

* Revert "refactor: style tweaks to edit css modal"

This reverts commit a00ec2d02a.

* Revert "refactor: remove usages of framer-motion"

This reverts commit 54a74ccc2a.

* Revert "Upgrade expressjs (#1633)"

This reverts commit 6f3ab274bd.

* Revert "Refactor: require trigger in all events objects (#1636)"

This reverts commit 90870ecfb6.

* Revert "Fix: Correct boundary condition in applyDelay"

This reverts commit b640e0e181.

* Revert "let vite be the proxy to the dev server (#1630)"

This reverts commit c41fe824cf.

* Revert "refactor: migrate custom fields to transactions"

This reverts commit 62c8319d70.

* Revert "refactor: simplify validations"

This reverts commit b1d23467a2.

* Revert "refactor: create transaction system and apply to adding entry (#1620)"

This reverts commit 9a62daf047.

* Revert "Refactor: better rounding (#1594)"

This reverts commit b9ab1c6fd7.

* Revert "refactor: improve reorder logic"

This reverts commit c1054711b0.

* Revert "chore: simplify URLs"

This reverts commit a4d4f29a37.

* Revert "refactor: order is single source of truth"

This reverts commit 2793aadea0.

* Revert "refactor: refetch targets is enum"

This reverts commit e7cfb7d9d9.

* Revert "refactor: small ux improvements"

This reverts commit 256a851c9b.

* Revert "refactor: remove trivially inferred numEvents"

This reverts commit 4ab9c81cb8.

* Revert "feat: duplicate groups"

This reverts commit 2f13d6c89e.

* Revert "feat: create group from entry selection"

This reverts commit f1f7bad25e.

* Revert "feat: create block from rundown empty"

This reverts commit a8b52a48f7.

* Revert "fix: collapsed blocks dont render children"

This reverts commit cd0999b2ab.

* Revert "refactor: type cleanup and test improvements"

This reverts commit b4c60f3f04.

* Revert "feat: allow dissolving a block"

This reverts commit 5cefad3666.

* Revert "fix: uncontrolled prop on controlled component"

This reverts commit 7a6ecd8c34.

* Revert "refactor: improve return of reorder"

This reverts commit ba96ecfd91.

* Revert "refactor: mutations on batch elements must have IDs"

This reverts commit 7bed3757f2.

* Revert "chore: upgrade dependencies"

This reverts commit e2e755b1d2.

* Revert "refactor: extract utility to merge two arrays"

This reverts commit a77d23109d.

* Revert "refactor: change network mode defaults"

This reverts commit 0eb3b8d382.

* Revert "fix: delete nested events"

This reverts commit 0021185288.

* Revert "fix: add event at end of block"

This reverts commit 94c72ff4f6.

* Revert "refactor: make finder available in exported rundown"

This reverts commit e4c08dc9b2.

* Revert "assert non null and update test (#1604)"

This reverts commit ec74af0d62.

* Revert "Fix project renumber (#1597)"

This reverts commit b6d72dd082.

* Revert "Refactor: WebSocket from flush queue to one patch (#1595)"

This reverts commit 31c311daf0.

* Revert "Refactor: ms for api calls (#1593)"

This reverts commit e9b3cc6090.

* Revert "fix test (#1601)"

This reverts commit 543b04a097.

* Revert "fix: rebase master"

This reverts commit d39b85b6e6.

* Revert "chore: correct test path"

This reverts commit bbe107bb2b.

* Revert "refactor: extract rundown parsing"

This reverts commit c616240db1.

* Revert "chore: improve convention entry <> event"

This reverts commit 166be66ce3.

* Revert "refactor: maintain flat orders"

This reverts commit 4180d0a337.

* Revert "refactor: implement operations on nested events"

This reverts commit 78108e316c.

* Revert "refactor: process events in rundown"

This reverts commit 3bb8b70915.

* Revert "chore: improve convention entry <> event"

This reverts commit 1c4f13a0ed.

* Revert "chore: rename currentBlock > parent"

This reverts commit 3ca0abad53.

* Revert "refactor: fix delay positioning in gaps"

This reverts commit 030c8f897f.

* Revert "refactor(e2e): skip flaky test"

This reverts commit 68175cfa3b.

* Revert "refactor: improve project loading"

This reverts commit fd8f757851.

* Revert "refactor: gather group metadata"

This reverts commit 876d111c61.

* Revert "refactor: swap maintains schedule"

This reverts commit 730cb95c04.

* Revert "chore: rename files"

This reverts commit 3c388d4fb5.

* Revert "refactor: restructure model to contain an object of rundowns"

This reverts commit 2e23718d73.

* Revert "refactor: clearer relationship on rundown elements"

This reverts commit 89ea8c470b.

* Revert "refactor: use strict typing"

This reverts commit 178640bfc4.

* Revert "refactor: remove stop as a possible end action"

This reverts commit 4ed38340e0.

* Revert "refactor: restructure model to contain an object of rundowns"

This reverts commit 69eb9a5eff.

* Revert "chore: remove IDE files"

This reverts commit 351425127a.

* Revert "refactor: remove unused and legacy code"

This reverts commit 95f2ba37cc.
This commit is contained in:
Alex Christoffer Rasmussen
2025-06-20 12:28:20 +02:00
committed by GitHub
parent ad6804019b
commit 722e045b20
366 changed files with 13067 additions and 13052 deletions
@@ -1,3 +1,4 @@
import type { OntimeRundown } from '../../definitions/core/Rundown.type.js';
import type { Playback } from '../../definitions/runtime/Playback.type.js';
import type { MaybeString } from '../../utils/utils.type.js';
@@ -14,7 +15,6 @@ export interface SessionStats {
projectName: string;
playback: Playback;
timezone: string;
version: string;
}
export interface GetInfo {
@@ -51,3 +51,8 @@ export type ProjectLogoResponse = {
export type ErrorResponse = MessageResponse;
export type AuthenticationStatus = 'authenticated' | 'not_authenticated' | 'pending';
export type RundownPaginated = {
rundown: OntimeRundown;
total: number;
};
@@ -1,20 +1,22 @@
import type { OntimeEntry } from '../../definitions/core/Rundown.type.js';
import type { OntimeBlock, OntimeDelay, OntimeEvent } from '../../definitions/core/OntimeEvent.type.js';
import type { OntimeRundownEntry } from '../../definitions/core/Rundown.type.js';
export type PatchWithId<T extends OntimeEntry = OntimeEntry> = Partial<T> & { id: string };
type EventId = string;
export type NormalisedRundown = Record<EventId, OntimeRundownEntry>;
export type EventPostPayload = Partial<OntimeEntry> & {
after?: string;
before?: string;
};
export type TransientEventPayload = Partial<OntimeEntry> & {
after?: string;
before?: string;
};
export type ProjectRundownsList = {
id: string;
title: string;
numEntries: number;
export interface RundownCached {
rundown: NormalisedRundown;
order: EventId[];
revision: number;
}[];
}
export type PatchWithId = Partial<OntimeEvent | OntimeDelay | OntimeBlock> & { id: string };
export type EventPostPayload = Partial<OntimeRundownEntry> & {
after?: string;
before?: string;
};
export type TransientEventPayload = Partial<OntimeEvent | OntimeDelay | OntimeBlock> & {
after?: string;
before?: string;
};
@@ -1,15 +1,15 @@
import type {
AutomationSettings,
CustomFields,
OntimeRundown,
ProjectData,
ProjectRundowns,
Settings,
URLPreset,
ViewSettings,
} from '../index.js';
export type DatabaseModel = {
rundowns: ProjectRundowns;
rundown: OntimeRundown;
project: ProjectData;
settings: Settings;
viewSettings: ViewSettings;
@@ -2,4 +2,5 @@ export enum EndAction {
LoadNext = 'load-next',
None = 'none',
PlayNext = 'play-next',
Stop = 'stop',
}
@@ -1,10 +1,10 @@
export type CustomFieldKey = string;
export type CustomFieldLabel = string;
export type CustomField = {
type: 'string' | 'image';
colour: string;
label: string;
label: CustomFieldLabel;
};
export type CustomFields = Record<CustomFieldKey, CustomField>;
export type EntryCustomFields = Record<CustomFieldKey, string>;
export type CustomFields = Record<CustomFieldLabel, CustomField>;
export type EventCustomFields = Record<CustomFieldLabel, string>;
@@ -1,65 +1,50 @@
import type { EndAction, EntryCustomFields, MaybeNumber, TimerType, TimeStrategy, Trigger } from '../../index.js';
import type { EndAction, EventCustomFields, MaybeString, TimerType, TimeStrategy, Trigger } from '../../index.js';
export type EntryId = string;
export enum SupportedEntry {
export enum SupportedEvent {
Event = 'event',
Delay = 'delay',
Block = 'block',
}
export type OntimeBaseEvent = {
type: SupportedEntry;
id: EntryId;
type: SupportedEvent;
id: string;
};
export type OntimeDelay = OntimeBaseEvent & {
type: SupportedEntry.Delay;
type: SupportedEvent.Delay;
duration: number;
parent: EntryId | null;
};
export type OntimeBlock = OntimeBaseEvent & {
type: SupportedEntry.Block;
type: SupportedEvent.Block;
title: string;
note: string;
events: EntryId[];
skip: boolean;
colour: string;
custom: EntryCustomFields;
// !==== RUNTIME METADATA ====! //
revision: number;
startTime: MaybeNumber; // calculated at runtime
endTime: MaybeNumber; // calculated at runtime
duration: number; // calculated at runtime
isFirstLinked: boolean; // calculated at runtime, whether the first event is linked
};
export type OntimeEvent = OntimeBaseEvent & {
type: SupportedEntry.Event;
type: SupportedEvent.Event;
cue: string;
title: string;
note: string;
endAction: EndAction;
timerType: TimerType;
countToEnd: boolean;
linkStart: boolean;
linkStart: MaybeString; // ID of event to link to
timeStrategy: TimeStrategy;
timeStart: number;
timeEnd: number;
duration: number;
isPublic: boolean;
skip: boolean;
colour: string;
timeWarning: number;
timeDanger: number;
custom: EntryCustomFields;
triggers: Trigger[];
parent: EntryId | null;
// !==== RUNTIME METADATA ====! //
revision: number;
delay: number; // calculated at runtime
dayOffset: number; // calculated at runtime
gap: number; // calculated at runtime
timeWarning: number;
timeDanger: number;
custom: EventCustomFields;
triggers?: Trigger[];
};
export type PlayableEvent = OntimeEvent & { skip: false };
@@ -1,6 +1,8 @@
export type ProjectData = {
title: string;
description: string;
publicUrl: string;
publicInfo: string;
backstageUrl: string;
backstageInfo: string;
projectLogo: string | null;
@@ -1,19 +1,7 @@
import type { EntryId, OntimeBlock, OntimeDelay, OntimeEvent } from './OntimeEvent.type.js';
import type { OntimeBlock, OntimeDelay, OntimeEvent } from './OntimeEvent.type.js';
export type OntimeEntry = OntimeDelay | OntimeBlock | OntimeEvent;
export type RundownEntries = Record<EntryId, OntimeEntry>;
export type OntimeRundownEntry = OntimeDelay | OntimeBlock | OntimeEvent;
export type OntimeRundown = OntimeRundownEntry[];
// we need to create a manual union type since keys cannot be used in type unions
export type OntimeEntryCommonKeys = keyof OntimeEvent | keyof OntimeDelay | keyof OntimeBlock;
type RundownId = string;
export type ProjectRundowns = Record<RundownId, Rundown>;
export type Rundown = {
id: string;
title: string;
order: EntryId[];
flatOrder: EntryId[];
entries: RundownEntries;
revision: number;
};
@@ -1,6 +1,7 @@
import type { TimeFormat } from './TimeFormat.type.js';
export type Settings = {
app: 'ontime';
version: string;
serverPort: number;
editorKey: null | string;
@@ -46,6 +46,8 @@ export const runtimeStorePlaceholder: Readonly<RuntimeStore> = {
},
eventNow: null,
eventNext: null,
publicEventNow: null,
publicEventNext: null,
auxtimer1: {
current: 0,
direction: SimpleDirection.CountUp,
@@ -18,7 +18,9 @@ export type RuntimeStore = {
runtime: Runtime;
currentBlock: CurrentBlockState;
eventNow: OntimeEvent | null;
publicEventNow: OntimeEvent | null;
eventNext: OntimeEvent | null;
publicEventNext: OntimeEvent | null;
// extra timers
auxtimer1: SimpleTimerState;
+7 -12
View File
@@ -4,22 +4,15 @@ export type { DatabaseModel } from './definitions/DataModel.type.js';
// ---> Rundown
export { EndAction } from './definitions/EndAction.type.js';
export {
type EntryId,
type OntimeBaseEvent,
type OntimeDelay,
type OntimeBlock,
type OntimeEvent,
type PlayableEvent,
type TimeField,
SupportedEntry as SupportedEntry,
SupportedEvent,
} from './definitions/core/OntimeEvent.type.js';
export type {
OntimeEntryCommonKeys,
OntimeEntry,
RundownEntries,
Rundown,
ProjectRundowns,
} from './definitions/core/Rundown.type.js';
export type { OntimeEntryCommonKeys, OntimeRundown, OntimeRundownEntry } from './definitions/core/Rundown.type.js';
export { TimeStrategy } from './definitions/TimeStrategy.type.js';
export { TimerType } from './definitions/TimerType.type.js';
@@ -59,8 +52,8 @@ export type { URLPreset } from './definitions/core/UrlPreset.type.js';
export type {
CustomFields,
CustomField,
CustomFieldKey,
EntryCustomFields,
CustomFieldLabel,
EventCustomFields,
} from './definitions/core/CustomFields.type.js';
// SERVER RESPONSES
@@ -74,14 +67,16 @@ export type {
ErrorResponse,
ProjectFileListResponse,
MessageResponse,
RundownPaginated,
SessionStats,
ProjectLogoResponse,
} from './api/ontime-controller/BackendResponse.type.js';
export type { QuickStartData } from './api/db/db.type.js';
export type {
EventPostPayload,
NormalisedRundown,
PatchWithId,
ProjectRundownsList,
RundownCached,
TransientEventPayload,
} from './api/rundown-controller/BackendResponse.type.js';
+6 -6
View File
@@ -1,13 +1,13 @@
import type { AutomationOutput, HTTPOutput, OntimeAction, OSCOutput } from '../definitions/core/Automation.type.js';
import type { OntimeBlock, OntimeDelay, OntimeEvent, PlayableEvent } from '../definitions/core/OntimeEvent.type.js';
import { SupportedEntry } from '../definitions/core/OntimeEvent.type.js';
import type { OntimeEntry } from '../definitions/core/Rundown.type.js';
import { SupportedEvent } from '../definitions/core/OntimeEvent.type.js';
import type { OntimeRundownEntry } from '../definitions/core/Rundown.type.js';
import { type TimerLifeCycle, timerLifecycleValues } from '../definitions/core/TimerLifecycle.type.js';
type MaybeEvent = OntimeEntry | Partial<OntimeEntry> | null | undefined;
type MaybeEvent = OntimeRundownEntry | Partial<OntimeRundownEntry> | null | undefined;
export function isOntimeEvent(event: MaybeEvent): event is OntimeEvent {
return event?.type === SupportedEntry.Event;
return event?.type === SupportedEvent.Event;
}
export function isPlayableEvent(event: OntimeEvent): event is PlayableEvent {
@@ -15,11 +15,11 @@ export function isPlayableEvent(event: OntimeEvent): event is PlayableEvent {
}
export function isOntimeDelay(event: MaybeEvent): event is OntimeDelay {
return event?.type === SupportedEntry.Delay;
return event?.type === SupportedEvent.Delay;
}
export function isOntimeBlock(event: MaybeEvent): event is OntimeBlock {
return event?.type === SupportedEntry.Block;
return event?.type === SupportedEvent.Block;
}
type AnyKeys<T> = keyof T;