mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 03:43:50 +00:00
Small clean-up (#1815)
* chore: remove old comment * chore: smal lclean up of a e2e test * chore: bump to beta.6 * chore: cleanup imports * fix integration values com in ms * allow linkStart and timeStrategy from API * remove local mac dist
This commit is contained in:
committed by
GitHub
parent
4a27973de1
commit
da7c0d4ff2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@getontime/cli",
|
||||
"version": "4.0.0-beta.5",
|
||||
"version": "4.0.0-beta.6",
|
||||
"author": "Carlos Valente",
|
||||
"description": "Time keeping for live events",
|
||||
"repository": "https://github.com/cpvalente/ontime",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ontime-ui",
|
||||
"version": "4.0.0-beta.5",
|
||||
"version": "4.0.0-beta.6",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { PropsWithChildren, useRef, useState } from 'react';
|
||||
import { IoCheckmark } from 'react-icons/io5';
|
||||
import { IoCopy } from 'react-icons/io5';
|
||||
import { IoCheckmark, IoCopy } from 'react-icons/io5';
|
||||
|
||||
import copyToClipboard from '../../utils/copyToClipboard';
|
||||
import { cx } from '../../utils/styleUtils';
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
import { IoApps } from 'react-icons/io5';
|
||||
import { IoSettingsOutline } from 'react-icons/io5';
|
||||
import { IoApps, IoSettingsOutline } from 'react-icons/io5';
|
||||
|
||||
import { useFadeOutOnInactivity } from '../../../hooks/useFadeOutOnInactivity';
|
||||
import { cx } from '../../../utils/styleUtils';
|
||||
|
||||
@@ -77,7 +77,7 @@ export default function OntimeActionForm({
|
||||
New time
|
||||
<Input
|
||||
{...register(`outputs.${index}.time`, {
|
||||
required: { value: true, message: 'Required field' }, //TODO:(automation set aux) not sure what way around to have the string and where to have the ms value
|
||||
required: { value: true, message: 'Required field' },
|
||||
})}
|
||||
fluid
|
||||
placeholder='eg: 10m5s'
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React from 'react';
|
||||
import { createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from 'react-router';
|
||||
import { Routes } from 'react-router';
|
||||
import { createRoutesFromChildren, matchRoutes, Routes, useLocation, useNavigationType } from 'react-router';
|
||||
import * as Sentry from '@sentry/react';
|
||||
|
||||
import { ONTIME_VERSION } from './ONTIME_VERSION';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ontime-electron",
|
||||
"version": "4.0.0-beta.5",
|
||||
"version": "4.0.0-beta.6",
|
||||
"author": "Carlos Valente",
|
||||
"description": "Time keeping for live events",
|
||||
"repository": "https://github.com/cpvalente/ontime",
|
||||
@@ -25,7 +25,6 @@
|
||||
"lint": "eslint . --quiet",
|
||||
"dist-win": "electron-builder --publish=never --x64 --win",
|
||||
"dist-mac": "electron-builder --publish=never --mac",
|
||||
"dist-mac:local": "electron-builder --publish=never --mac -c.mac.identity=null",
|
||||
"dist-linux": "electron-builder --publish=never --x64 --linux"
|
||||
},
|
||||
"build": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@getontime/resolver",
|
||||
"version": "4.0.0-beta.5",
|
||||
"version": "4.0.0-beta.6",
|
||||
"type": "module",
|
||||
"repository": "https://github.com/cpvalente/ontime",
|
||||
"types": "./dist/main.d.ts",
|
||||
|
||||
@@ -13,8 +13,15 @@ export { SimplePlayback, SimpleDirection } from 'ontime-types';
|
||||
|
||||
// entries
|
||||
export type { OntimeEvent, OntimeGroup, EntryCustomFields, CustomFields, Rundown } from 'ontime-types';
|
||||
export { SupportedEntry, isOntimeEvent, isOntimeGroup, isOntimeDelay, isOntimeMilestone } from 'ontime-types';
|
||||
export {
|
||||
SupportedEntry,
|
||||
isOntimeEvent,
|
||||
isOntimeGroup,
|
||||
isOntimeDelay,
|
||||
isOntimeMilestone,
|
||||
TimeStrategy,
|
||||
} from 'ontime-types';
|
||||
|
||||
// functions
|
||||
export { isWsPacketToClient } from './websocket.js';
|
||||
export type { SocketSender } from './websocket.js';
|
||||
export type { SocketSender } from './websocket.js';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "ontime-server",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"version": "4.0.0-beta.5",
|
||||
"version": "4.0.0-beta.6",
|
||||
"exports": "./src/index.js",
|
||||
"dependencies": {
|
||||
"@googleapis/sheets": "^5.0.5",
|
||||
|
||||
@@ -199,7 +199,7 @@ function parseOntimeAction(maybeOntimeAction: object): OntimeAction {
|
||||
return {
|
||||
type: 'ontime',
|
||||
action: maybeOntimeAction.action,
|
||||
time: maybeOntimeAction.time, //TODO:(automation set aux) not sure what way around to have the string and where to have the ms value
|
||||
time: maybeOntimeAction.time,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
import { EndAction, TimerType, isKeyOfType } from 'ontime-types';
|
||||
import { MILLIS_PER_SECOND, maxDuration } from 'ontime-utils';
|
||||
import { EndAction, TimeStrategy, TimerType, isKeyOfType } from 'ontime-types';
|
||||
import { maxDuration } from 'ontime-utils';
|
||||
|
||||
import { coerceBoolean, coerceColour, coerceEnum, coerceNumber, coerceString } from '../utils/coerceType.js';
|
||||
import { getDataProvider } from '../classes/data-provider/DataProvider.js';
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {number} value time amount in seconds
|
||||
* @param {number} value time amount in milliseconds
|
||||
* @returns {number} time in milliseconds clamped to 0 and max duration
|
||||
*/
|
||||
function clampDuration(value: number): number {
|
||||
const valueInMillis = value * MILLIS_PER_SECOND;
|
||||
if (valueInMillis > maxDuration || valueInMillis < 0) {
|
||||
if (value > maxDuration || value < 0) {
|
||||
throw new Error('Times should be from 0 to 23:59:59');
|
||||
}
|
||||
return valueInMillis;
|
||||
return value;
|
||||
}
|
||||
|
||||
const propertyConversion = {
|
||||
@@ -34,6 +33,9 @@ const propertyConversion = {
|
||||
endAction: (value: unknown) => coerceEnum<EndAction>(value, EndAction),
|
||||
timerType: (value: unknown) => coerceEnum<TimerType>(value, TimerType),
|
||||
|
||||
linkStart: coerceBoolean,
|
||||
timeStrategy: (value: unknown) => coerceEnum<TimeStrategy>(value, TimeStrategy),
|
||||
|
||||
duration: (value: unknown) => clampDuration(coerceNumber(value)),
|
||||
timeStart: (value: unknown) => clampDuration(coerceNumber(value)),
|
||||
timeEnd: (value: unknown) => clampDuration(coerceNumber(value)),
|
||||
|
||||
Reference in New Issue
Block a user