mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 03:13:47 +00:00
38e3ab979d
Addresses the review findings on the aux timer naming feature. - Aux timer names are project data, but they were only applied at bootstrap and on a settings POST. Loading another project left the previous project's names in the runtime store, so the controls and views disagreed with the settings panel until a restart. The names are now applied when a project is loaded, and patching the current project settings applies them and sends a settings refetch to the clients (loading a project already triggers a full refetch via the rundown). - Consolidate the name handling into a single normaliser in ontime-utils, used by the project file parser, the API validation and to build the default value. This creates the property when importing project files saved before the feature existed, and enforces the name length limit server side rather than only in the form. - loadNames normalises its input, so the runtime state is consistent regardless of the shape of the stored settings. - Clarify that auxTimerNames is ordered (index 0 is aux timer 1), and derive the settings form from the shared aux timer count. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCZejVTzuAY3tHTE6nB3JH
118 lines
3.6 KiB
TypeScript
118 lines
3.6 KiB
TypeScript
// runtime utils
|
|
export { validatePlayback } from './src/validate-action/validatePlayback.js';
|
|
export { isKnownTimerType, validateTimeStrategy } from './src/validate-events/validateEvent.js';
|
|
export { calculateDuration, getLinkedTimes, validateTimes } from './src/validate-times/validateTimes.js';
|
|
|
|
// rundown utils
|
|
export { getCueCandidate } from './src/cue-utils/cueUtils.js';
|
|
export { generateId } from './src/generate-id/generateId.js';
|
|
export {
|
|
addToRundown,
|
|
getEventWithId,
|
|
getFirstEvent,
|
|
getFirstEventNormal,
|
|
getFirstNormal,
|
|
getFirstGroupNormal,
|
|
getInsertAfterId,
|
|
getLastEvent,
|
|
getLastEventNormal,
|
|
getLastNormal,
|
|
getLastGroupNormal,
|
|
getNextGroupNormal,
|
|
getNextEvent,
|
|
getNextEventNormal,
|
|
getNextNormal,
|
|
getPreviousEventNormal,
|
|
getPreviousNormal,
|
|
getPreviousGroupNormal,
|
|
resolveInsertParent,
|
|
swapEventData,
|
|
} from './src/rundown-utils/rundownUtils.js';
|
|
export { getFirstRundown } from './src/rundown/rundown.utils.js';
|
|
export {
|
|
event as eventDef,
|
|
group as groupDef,
|
|
milestone as milestoneDef,
|
|
} from './src/rundown-utils/entryDefinitions.js';
|
|
export { createDelay, createEvent, createGroup, createMilestone, makeString } from './src/rundown-utils/entryUtils.js';
|
|
|
|
// time format utils
|
|
export {
|
|
dayInMs,
|
|
maxDuration,
|
|
MILLIS_PER_HOUR,
|
|
MILLIS_PER_MINUTE,
|
|
MILLIS_PER_SECOND,
|
|
millisToSeconds,
|
|
secondsInMillis,
|
|
} from './src/date-utils/conversionUtils.js';
|
|
export { isISO8601, isTimeString } from './src/date-utils/isTimeString.js';
|
|
export {
|
|
formatFromMillis,
|
|
millisToString,
|
|
pad,
|
|
removeLeadingZero,
|
|
removeSeconds,
|
|
removeTrailingZero,
|
|
} from './src/date-utils/timeFormatting.js';
|
|
export { parseUserTime } from './src/date-utils/parseUserTime.js';
|
|
export { checkRegex, regex } from './src/regex-utils/checkRegex.js';
|
|
export { isColourHex } from './src/regex-utils/isColourHex.js';
|
|
export { splitWhitespace } from './src/regex-utils/splitWhitespace.js';
|
|
|
|
export { customFieldLabelToKey, customKeyFromLabel } from './src/customField-utils/customFieldUtils.js';
|
|
|
|
// helpers from externals
|
|
export { deepmerge } from './src/externals/deepmerge.js';
|
|
|
|
// array utils
|
|
export { deleteAtIndex, insertAtIndex, mergeAtIndex, reorderArray } from './src/common/arrayUtils.js';
|
|
// object utils
|
|
export { getPropertyFromPath, isObjectEmpty, withoutUndefinedValues, isValueOfEnum } from './src/common/objectUtils.js';
|
|
|
|
// generic utilities
|
|
export { getErrorMessage } from './src/generic/generic.js';
|
|
export { obfuscate, unobfuscate } from './src/generic/generic.js';
|
|
export { isNumeric } from './src/types/types.js';
|
|
|
|
// model validation
|
|
export { validateEndAction, validateTimerType } from './src/validate-events/validateEvent.js';
|
|
|
|
// feature business logic
|
|
|
|
export { getExpectedStart } from './src/date-utils/getExpectedStart.js';
|
|
|
|
// feature business logic - rundown
|
|
export { checkIsNow } from './src/date-utils/checkIsNow.js';
|
|
export { checkIsNextDay } from './src/date-utils/checkIsNextDay.js';
|
|
export { getTimeFrom } from './src/date-utils/getTimeFrom.js';
|
|
export { isNewLatest } from './src/date-utils/isNewLatest.js';
|
|
|
|
// feature business logic - spreadsheet import
|
|
export {
|
|
type ImportCustom,
|
|
type ImportMap,
|
|
type ImportOptions,
|
|
defaultImportMap,
|
|
isImportMap,
|
|
} from './src/feature/spreadsheet-import/spreadsheetImport.js';
|
|
|
|
export { isPlaybackActive } from './src/playback-utils/playbackstate.js';
|
|
|
|
// aux timers
|
|
export {
|
|
auxTimerNameMaxLength,
|
|
normaliseAuxTimerNames,
|
|
numberOfAuxTimers,
|
|
} from './src/aux-timer-utils/auxTimerUtils.js';
|
|
|
|
//Colour
|
|
export {
|
|
colourToHex,
|
|
cssOrHexToColour,
|
|
hexToColour,
|
|
isLightColour,
|
|
mixColours,
|
|
CssColours,
|
|
} from './src/colour/colour.utils.js';
|