Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Sep 27, 2023
1 parent a99387d commit e213068
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion apps/package-manager/packages/generic/src/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ExpectedPackageId,
PackageContainerId,
AccessorId,
objectEntries,
} from '@sofie-package-manager/api'
import { ExpectationManager, ExpectationManagerServerOptions } from '@sofie-package-manager/expectation-manager'
import { CoreHandler, CoreConfig } from './coreHandler'
Expand All @@ -20,7 +21,6 @@ import chokidar from 'chokidar'
import fs from 'fs'
import { promisify } from 'util'
import path from 'path'
import { objectEntries } from '@sofie-package-manager/api'

const fsAccess = promisify(fs.access)
const fsReadFile = promisify(fs.readFile)
Expand Down
9 changes: 1 addition & 8 deletions shared/packages/api/src/websocketConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,7 @@ export function isMessageIdentifyClient(message: unknown): message is MessageIde
export type NotAssignedPartyId = ProtectedString<'NotAssigned', string>

/** Ids of any communicating parties */
export type PartyId =
| NotAssignedPartyId
| WorkerAgentId
| ExpectationManagerId
| AppContainerId
| WorkforceId
| ExpectationManagerId
| AppContainerId
export type PartyId = NotAssignedPartyId | WorkerAgentId | ExpectationManagerId | AppContainerId | WorkforceId

/** A Hook defines */
export type Hook<ServerMethods extends MethodsInterfaceBase, ClientMethods extends MethodsInterfaceBase> = (
Expand Down
3 changes: 2 additions & 1 deletion shared/packages/expectationManager/src/workerAgentApi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ExpectationManagerId, PackageContainerId } from '@sofie-package-manager/api'
import {
ExpectationManagerId,
PackageContainerId,
ExpectationManagerWorkerAgent,
AdapterServer,
Expectation,
Expand Down
5 changes: 4 additions & 1 deletion shared/packages/worker/src/expectationManagerApi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { PackageContainerId, MonitorId, WorkerAgentId, WorkInProgressLocalId } from '@sofie-package-manager/api'
import {
PackageContainerId,
MonitorId,
WorkerAgentId,
WorkInProgressLocalId,
StatusCode,
ExpectationManagerWorkerAgent,
AdapterClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
Reason,
stringifyError,
AccessorId,
startTimer,
} from '@sofie-package-manager/api'
import {
isFileShareAccessorHandle,
Expand All @@ -32,7 +33,6 @@ import {
import { doFileCopyExpectation, isFileFulfilled, isFileReadyToStartWorkingOn } from './lib/file'
import { getSourceHTTPHandle } from './lib/quantel'
import { FFMpegProcess, spawnFFMpeg } from './lib/ffmpeg'
import { startTimer } from '@sofie-package-manager/api'

/**
* Copies a file from one of the sources and into the target PackageContainer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ReturnTypeIsExpectationReadyToStartWorkingOn,
ReturnTypeRemoveExpectation,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import {
isCorePackageInfoAccessorHandle,
Expand All @@ -21,7 +22,6 @@ import {
import { IWorkInProgress, WorkInProgress } from '../../../lib/workInProgress'
import { checkWorkerHasAccessToPackageContainersOnPackage, lookupAccessorHandles, LookupPackageContainer } from './lib'
import { PackageReadStream, PutPackageHandler } from '../../../accessorHandlers/genericHandle'
import { startTimer } from '@sofie-package-manager/api'

/**
* Copies a file from one of the sources and into the target PackageContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Expectation,
ReturnTypeIsExpectationFulfilled,
ReturnTypeIsExpectationReadyToStartWorkingOn,
startTimer,
} from '@sofie-package-manager/api'
import {
isATEMAccessorHandle,
Expand All @@ -24,7 +25,6 @@ import { CancelablePromise } from '../../../../lib/cancelablePromise'
import { PackageReadStream, PutPackageHandler } from '../../../../accessorHandlers/genericHandle'
import { diff } from 'deep-diff'
import { quantelFileflowCopy } from '../../lib/quantelFileflow'
import { startTimer } from '@sofie-package-manager/api'

export async function isFileReadyToStartWorkingOn(
worker: GenericWorker,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ReturnTypeRemoveExpectation,
assertNever,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import {
isFileShareAccessorHandle,
Expand All @@ -28,7 +29,6 @@ import {
} from './lib'
import { FFMpegProcess, spawnFFMpeg } from './lib/ffmpeg'
import { WindowsWorker } from '../windowsWorker'
import { startTimer } from '@sofie-package-manager/api'

/**
* Generates a low-res preview video of a source video file, and stores the resulting file into the target PackageContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ReturnTypeRemoveExpectation,
assertNever,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import { getStandardCost } from '../lib/lib'
import { GenericWorker } from '../../../worker'
Expand All @@ -29,7 +30,6 @@ import {
} from './lib'
import { FFMpegProcess, spawnFFMpeg } from './lib/ffmpeg'
import { WindowsWorker } from '../windowsWorker'
import { startTimer } from '@sofie-package-manager/api'

/**
* Generates a thumbnail image from a source video file, and stores the resulting file into the target PackageContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ReturnTypeIsExpectationReadyToStartWorkingOn,
ReturnTypeRemoveExpectation,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import { isCorePackageInfoAccessorHandle } from '../../../accessorHandlers/accessor'
import { IWorkInProgress, WorkInProgress } from '../../../lib/workInProgress'
Expand All @@ -26,7 +27,6 @@ import {
scanWithFFProbe,
} from './lib/scan'
import { WindowsWorker } from '../windowsWorker'
import { startTimer } from '@sofie-package-manager/api'

/**
* Performs a "deep scan" of the source package and saves the result file into the target PackageContainer (a Sofie Core collection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ReturnTypeIsExpectationReadyToStartWorkingOn,
ReturnTypeRemoveExpectation,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import { isCorePackageInfoAccessorHandle } from '../../../accessorHandlers/accessor'
import { IWorkInProgress, WorkInProgress } from '../../../lib/workInProgress'
Expand All @@ -25,7 +26,6 @@ import {
} from './lib/scan'
import { WindowsWorker } from '../windowsWorker'
import { LoudnessScanResult, PackageInfoType } from './lib/coreApi'
import { startTimer } from '@sofie-package-manager/api'

/**
* Performs a "deep scan" of the source package and saves the result file into the target PackageContainer (a Sofie Core collection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ReturnTypeIsExpectationReadyToStartWorkingOn,
ReturnTypeRemoveExpectation,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import { isCorePackageInfoAccessorHandle } from '../../../accessorHandlers/accessor'
import { IWorkInProgress, WorkInProgress } from '../../../lib/workInProgress'
Expand All @@ -19,7 +20,6 @@ import { CancelablePromise } from '../../../lib/cancelablePromise'
import { isAnFFMpegSupportedSourceAccessor, isAnFFMpegSupportedSourceAccessorHandle, scanWithFFProbe } from './lib/scan'
import { WindowsWorker } from '../windowsWorker'
import { PackageInfoType } from './lib/coreApi'
import { startTimer } from '@sofie-package-manager/api'

/**
* Scans the source package and saves the result file into the target PackageContainer (a Sofie Core collection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import {
ReturnTypeIsExpectationReadyToStartWorkingOn,
ReturnTypeRemoveExpectation,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import { isQuantelClipAccessorHandle } from '../../../accessorHandlers/accessor'
import { IWorkInProgress, WorkInProgress } from '../../../lib/workInProgress'
import { checkWorkerHasAccessToPackageContainersOnPackage, lookupAccessorHandles, LookupPackageContainer } from './lib'
import { startTimer } from '@sofie-package-manager/api'

export const QuantelClipCopy: ExpectationWindowsHandler = {
doYouSupportExpectation(exp: Expectation.Any, genericWorker: GenericWorker): ReturnTypeDoYouSupportExpectation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ReturnTypeIsExpectationReadyToStartWorkingOn,
ReturnTypeRemoveExpectation,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import {
isFileShareAccessorHandle,
Expand All @@ -28,7 +29,6 @@ import {
import { getSourceHTTPHandle } from './lib/quantel'
import { FFMpegProcess, spawnFFMpeg } from './lib/ffmpeg'
import { WindowsWorker } from '../windowsWorker'
import { startTimer } from '@sofie-package-manager/api'

export const QuantelClipPreview: ExpectationWindowsHandler = {
doYouSupportExpectation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
literal,
Reason,
stringifyError,
startTimer,
} from '@sofie-package-manager/api'
import { getStandardCost } from '../lib/lib'
import { GenericWorker } from '../../../worker'
Expand All @@ -25,7 +26,6 @@ import { checkWorkerHasAccessToPackageContainersOnPackage, lookupAccessorHandles
import { PackageReadStream, PutPackageHandler } from '../../../accessorHandlers/genericHandle'
import { WindowsWorker } from '../windowsWorker'
import { getSourceHTTPHandle, QuantelClipMetadata } from './lib/quantel'
import { startTimer } from '@sofie-package-manager/api'

/**
* Generates a thumbnail image from a source quantel clip, and stores the resulting file into the target PackageContainer
Expand Down

0 comments on commit e213068

Please sign in to comment.