From a362fec55b9fea6db18c15a1759cf142f2441573 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Fri, 17 Feb 2023 13:07:40 +0100 Subject: [PATCH 01/54] fix: don't update the package status if a fulfilled status check fails with an error --- .../evaluationRunner/evaluateExpectationStates/fulfilled.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts index 09011d3d..7d095312 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts @@ -51,8 +51,7 @@ export async function evaluateExpectationStateFulfilled({ user: `Can't check if fulfilled, due to an error`, tech: `Error from worker ${trackedExp.session.assignedWorker.id}: ${stringifyError(error)}`, }, - // Should we se this here? - // dontUpdatePackage: true, + dontUpdatePackage: true, }) } } else { From 1a0d47761746a25692862afa7c351147db29a790 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Tue, 24 Jan 2023 11:24:15 +0000 Subject: [PATCH 02/54] feat: r50 json config schema --- .../generic/src/$schemas/options.json | 29 +++ .../packages/generic/src/configManifest.ts | 31 +-- .../packages/generic/src/coreHandler.ts | 26 +- .../packages/generic/src/credentials.ts | 4 +- .../generic/src/generateExpectations/api.ts | 9 +- .../nrk/expectations-lib.ts | 3 +- .../generateExpectations/nrk/expectations.ts | 9 +- .../packages/generic/src/generated/options.ts | 13 + .../packages/generic/src/packageManager.ts | 9 +- package.json | 6 +- scripts/schema-types.mjs | 29 +++ shared/packages/api/src/status.ts | 2 +- tsconfig.build.json | 3 +- yarn.lock | 244 +++++++++++++++++- 14 files changed, 334 insertions(+), 83 deletions(-) create mode 100644 apps/package-manager/packages/generic/src/$schemas/options.json create mode 100644 apps/package-manager/packages/generic/src/generated/options.ts create mode 100644 scripts/schema-types.mjs diff --git a/apps/package-manager/packages/generic/src/$schemas/options.json b/apps/package-manager/packages/generic/src/$schemas/options.json new file mode 100644 index 00000000..18da3399 --- /dev/null +++ b/apps/package-manager/packages/generic/src/$schemas/options.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://example.com/product.schema.json", + "title": "Package Manager Settings", + "type": "object", + "properties": { + "logLevel": { + "type": "string", + "ui:title": "Log level", + "default": "info", + "enum": ["error", "warn", "info", "verbose", "debug", "silly"] + }, + "delayRemoval": { + "type": "integer", + "ui:title": "Delay removal of packages (milliseconds)" + }, + "delayRemovalPackageInfo": { + "type": "integer", + "ui:title": "Delay removal of package scan results (milliseconds)" + }, + "useTemporaryFilePath": { + "type": "boolean", + "ui:title": "Use temporary file paths when copying", + "default": false + } + }, + "required": [], + "additionalProperties": false +} diff --git a/apps/package-manager/packages/generic/src/configManifest.ts b/apps/package-manager/packages/generic/src/configManifest.ts index 6cab35ad..3df6618d 100644 --- a/apps/package-manager/packages/generic/src/configManifest.ts +++ b/apps/package-manager/packages/generic/src/configManifest.ts @@ -1,29 +1,8 @@ -import { DeviceConfigManifest, ConfigManifestEntryType } from '@sofie-automation/server-core-integration' -import { LogLevel } from '@sofie-package-manager/api' +import { DeviceConfigManifest, JSONBlobStringify, JSONSchema } from '@sofie-automation/server-core-integration' + +import ConfigSchema = require('./$schemas/options.json') export const PACKAGE_MANAGER_DEVICE_CONFIG: DeviceConfigManifest = { - deviceConfig: [ - { - id: 'logLevel', - name: 'Log level', - type: ConfigManifestEntryType.ENUM, - values: LogLevel, - defaultVal: 'info', - }, - { - id: 'delayRemoval', - name: 'Delay removal of packages (milliseconds)', - type: ConfigManifestEntryType.INT, - }, - { - id: 'delayRemovalPackageInfo', - name: 'Delay removal of package scan results (milliseconds)', - type: ConfigManifestEntryType.INT, - }, - { - id: 'useTemporaryFilePath', - name: 'Use temporary file paths when copying', - type: ConfigManifestEntryType.BOOLEAN, - }, - ], + deviceConfigSchema: JSONBlobStringify(ConfigSchema as any), + subdeviceManifest: {}, } diff --git a/apps/package-manager/packages/generic/src/coreHandler.ts b/apps/package-manager/packages/generic/src/coreHandler.ts index 2735684b..1b3e0be4 100644 --- a/apps/package-manager/packages/generic/src/coreHandler.ts +++ b/apps/package-manager/packages/generic/src/coreHandler.ts @@ -6,16 +6,16 @@ import { Observer, Collection, CoreCredentials, + StatusCode as SofieStatusCode, + protectString, + unprotectString, + ProtectedString, + PeripheralDevicePublic, + PeripheralDeviceId, + PeripheralDeviceCommand, + ExternalPeripheralDeviceAPI, + PeripheralDeviceAPI, } from '@sofie-automation/server-core-integration' -import { - PeripheralDeviceCategory, - PeripheralDeviceType, - PERIPHERAL_SUBTYPE_PROCESS, -} from '@sofie-automation/shared-lib/dist/peripheralDevice/peripheralDeviceAPI' -import { StatusCode as SofieStatusCode } from '@sofie-automation/shared-lib/dist/lib/status' -import { protectString, unprotectString, ProtectedString } from '@sofie-automation/shared-lib/dist/lib/protectedString' -import { PeripheralDevicePublic } from '@sofie-automation/shared-lib/dist/core/model/peripheralDevice' -import { PeripheralDeviceId } from '@sofie-automation/shared-lib/dist/core/model/Ids' import { DeviceConfig } from './connector' @@ -33,8 +33,6 @@ import { } from '@sofie-package-manager/api' import { PACKAGE_MANAGER_DEVICE_CONFIG } from './configManifest' import { PackageManagerHandler } from './packageManager' -import { ExternalPeripheralDeviceAPI } from '@sofie-automation/server-core-integration/dist/lib/methods' -import { PeripheralDeviceCommand } from '@sofie-automation/shared-lib/dist/core/model/PeripheralDeviceCommand' import { getCredentials } from './credentials' export interface CoreConfig { @@ -195,9 +193,9 @@ export class CoreHandler { const options: CoreOptions = { ...credentials, - deviceCategory: PeripheralDeviceCategory.PACKAGE_MANAGER, - deviceType: PeripheralDeviceType.PACKAGE_MANAGER, - deviceSubType: PERIPHERAL_SUBTYPE_PROCESS, + deviceCategory: PeripheralDeviceAPI.PeripheralDeviceCategory.PACKAGE_MANAGER, + deviceType: PeripheralDeviceAPI.PeripheralDeviceType.PACKAGE_MANAGER, + deviceSubType: PeripheralDeviceAPI.PERIPHERAL_SUBTYPE_PROCESS, deviceName: name, watchDog: this._coreConfig ? this._coreConfig.watchdog : true, diff --git a/apps/package-manager/packages/generic/src/credentials.ts b/apps/package-manager/packages/generic/src/credentials.ts index c2797845..fe7d0b27 100644 --- a/apps/package-manager/packages/generic/src/credentials.ts +++ b/apps/package-manager/packages/generic/src/credentials.ts @@ -1,6 +1,4 @@ -import { CoreCredentials } from '@sofie-automation/server-core-integration' -// eslint-disable-next-line node/no-extraneous-import -import { protectString } from '@sofie-automation/shared-lib/dist/lib/protectedString' +import { CoreCredentials, protectString } from '@sofie-automation/server-core-integration' import { nanoid } from 'nanoid' // eslint-disable-next-line @typescript-eslint/no-var-requires diff --git a/apps/package-manager/packages/generic/src/generateExpectations/api.ts b/apps/package-manager/packages/generic/src/generateExpectations/api.ts index 844eb84f..cab5f08c 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/api.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/api.ts @@ -1,10 +1,5 @@ -import { - ActivePlaylist, - ActiveRundown, - ExpectedPackageWrap, - PackageContainers, - PackageManagerSettings, -} from '../packageManager' +import { ActivePlaylist, ActiveRundown, ExpectedPackageWrap, PackageContainers } from '../packageManager' +import { PackageManagerSettings } from '../generated/options' import { Expectation, LoggerInstance, PackageContainerExpectation } from '@sofie-package-manager/api' export interface GenerateExpectationApi { diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts index 8b842bda..8d4bbceb 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts @@ -1,4 +1,5 @@ -import { ExpectedPackageWrap, PackageManagerSettings } from '../../packageManager' +import { ExpectedPackageWrap } from '../../packageManager' +import { PackageManagerSettings } from '../../generated/options' import { Accessor, ExpectedPackage, diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts index 2ca3f459..dfcacf21 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts @@ -1,10 +1,5 @@ -import { - ActivePlaylist, - ActiveRundown, - ExpectedPackageWrap, - PackageContainers, - PackageManagerSettings, -} from '../../packageManager' +import { ActivePlaylist, ActiveRundown, ExpectedPackageWrap, PackageContainers } from '../../packageManager' +import { PackageManagerSettings } from '../../generated/options' import { ExpectedPackage, PackageContainer, Expectation, hashObj, LoggerInstance } from '@sofie-package-manager/api' import { GenerateExpectation, PriorityMagnitude } from './types' diff --git a/apps/package-manager/packages/generic/src/generated/options.ts b/apps/package-manager/packages/generic/src/generated/options.ts new file mode 100644 index 00000000..73fa5726 --- /dev/null +++ b/apps/package-manager/packages/generic/src/generated/options.ts @@ -0,0 +1,13 @@ +/* eslint-disable */ +/** + * This file was automatically generated by json-schema-to-typescript. + * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, + * and run "yarn generate-schema-types" to regenerate this file. + */ + +export interface PackageManagerSettings { + logLevel?: 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly' + delayRemoval?: number + delayRemovalPackageInfo?: number + useTemporaryFilePath?: boolean +} diff --git a/apps/package-manager/packages/generic/src/packageManager.ts b/apps/package-manager/packages/generic/src/packageManager.ts index 304b8883..994ce593 100644 --- a/apps/package-manager/packages/generic/src/packageManager.ts +++ b/apps/package-manager/packages/generic/src/packageManager.ts @@ -2,8 +2,7 @@ import _ from 'underscore' import { CoreHandler } from './coreHandler' // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' -// eslint-disable-next-line node/no-extraneous-import -import { protectString, protectStringArray } from '@sofie-automation/shared-lib/dist/lib/protectedString' +import { protectString, protectStringArray } from '@sofie-automation/server-core-integration' // eslint-disable-next-line node/no-extraneous-import import { UpdateExpectedPackageWorkStatusesChanges } from '@sofie-automation/shared-lib/dist/peripheralDevice/methodsAPI' import { @@ -33,6 +32,7 @@ import { import deepExtend from 'deep-extend' import clone = require('fast-clone') import { GenerateExpectationApi } from './generateExpectations/api' +import { PackageManagerSettings } from './generated/options' import * as NRK from './generateExpectations/nrk' @@ -1070,11 +1070,6 @@ export interface ActiveRundown { _id: string _rank: number } -export interface PackageManagerSettings { - delayRemoval: number - delayRemovalPackageInfo?: number - useTemporaryFilePath: boolean -} type ReportStatuses = { [key: string]: ReportStatus diff --git a/package.json b/package.json index 29f6d03a..1c258717 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "start:single-app": "lerna run start --stream --scope @single-app/app", "postinstall": "node scripts/update-packages.js", "do:build-win32": "yarn install && yarn build && yarn build-win32 && yarn gather-built", - "precommit": "lint-staged" + "precommit": "lint-staged", + "generate-schema-types": "node scripts/schema-types.mjs" }, "devDependencies": { "@sofie-automation/code-standard-preset": "~2.3", @@ -48,6 +49,7 @@ "fs-extra": "^9.1.0", "glob": "^8.1.0", "jest": "^29.3.1", + "json-schema-to-typescript": "^10.1.5", "lerna": "^3.22.1", "mkdirp": "^2.1.3", "rimraf": "^3.0.2", @@ -62,7 +64,7 @@ "node": ">=12.11.0" }, "dependencies": { - "@sofie-automation/server-core-integration": "1.49.0-nightly-release49-20221216-175820-6d17a49.0" + "@sofie-automation/server-core-integration": "1.50.0-nightly-release50-20230322-103759-dbb6cc5.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "lint-staged": { diff --git a/scripts/schema-types.mjs b/scripts/schema-types.mjs new file mode 100644 index 00000000..e94df009 --- /dev/null +++ b/scripts/schema-types.mjs @@ -0,0 +1,29 @@ +import { compileFromFile } from 'json-schema-to-typescript' +import * as fs from 'fs/promises' + +/** ******************************************************** + * + * This script goes through the json-schemas of all devices (located under /$schemas ) + * and auto-generates types for those schemas + * + ***********************************************************/ +const BANNER = + '/* eslint-disable */\n/**\n * This file was automatically generated by json-schema-to-typescript.\n * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,\n * and run "yarn generate-schema-types" to regenerate this file.\n */\n' + +const PrettierConf = JSON.parse( + await fs.readFile('./node_modules/@sofie-automation/code-standard-preset/.prettierrc.json') +) + +// convert mos-gateway options +try { + const schema = await compileFromFile('./apps/package-manager/packages/generic/src/$schemas/options.json', { + additionalProperties: false, + style: PrettierConf, + bannerComment: '', + }) + + await fs.writeFile('./apps/package-manager/packages/generic/src/generated/options.ts', BANNER + '\n' + schema) +} catch (e) { + console.error('Error while generating mos-gateway options.json, continuing...') + console.error(e) +} diff --git a/shared/packages/api/src/status.ts b/shared/packages/api/src/status.ts index 886013a5..5e544db0 100644 --- a/shared/packages/api/src/status.ts +++ b/shared/packages/api/src/status.ts @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { StatusCode } from '@sofie-automation/shared-lib/dist/lib/status' +import { StatusCode } from '@sofie-automation/server-core-integration' export interface Statuses { [key: string]: { message: string; statusCode: StatusCode } | null diff --git a/tsconfig.build.json b/tsconfig.build.json index 5b5c6344..a0e9a56d 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -27,7 +27,8 @@ "noUnusedParameters": true, "outDir": "./dist", "baseUrl": "./", - "esModuleInterop": true + "esModuleInterop": true, + "resolveJsonModule": true }, "compileOnSave": false, "exclude": [ diff --git a/yarn.lock b/yarn.lock index 4f6892ea..0a5602c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,6 +10,16 @@ "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" +"@apidevtools/json-schema-ref-parser@9.0.9": + version "9.0.9" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#d720f9256e3609621280584f2b47ae165359268b" + integrity sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w== + dependencies: + "@jsdevtools/ono" "^7.1.3" + "@types/json-schema" "^7.0.6" + call-me-maybe "^1.0.1" + js-yaml "^4.1.0" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" @@ -678,6 +688,11 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@jsdevtools/ono@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" + integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== + "@koa/cors@^3.0.0": version "3.3.0" resolved "https://registry.yarnpkg.com/@koa/cors/-/cors-3.3.0.tgz#b4c1c7ee303b7c968c8727f2a638a74675b50bb2" @@ -1375,6 +1390,11 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" +"@mos-connection/model@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@mos-connection/model/-/model-3.0.1.tgz#38b41d6848e3af58715ce462c5e55ddf1c5c456f" + integrity sha512-e+vrLaghYayuzq5JZABbouofseMMnGmUk0mJcGzCG4aYK3YZ/9JoTe1mJBMecbEiqFQXld8idOHv/9rO8HRy4g== + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -1577,24 +1597,26 @@ semver "^7.3.8" shelljs "^0.8.5" -"@sofie-automation/server-core-integration@1.49.0-nightly-release49-20221216-175820-6d17a49.0": - version "1.49.0-nightly-release49-20221216-175820-6d17a49.0" - resolved "https://registry.yarnpkg.com/@sofie-automation/server-core-integration/-/server-core-integration-1.49.0-nightly-release49-20221216-175820-6d17a49.0.tgz#1bcff4386d3ae92d944c40f954400acf26de3eee" - integrity sha512-BMQKgR3pqqdY92Hpsk8IVtCz6lHUng+kQv1Ml0LGfr0GJLKhUKEB6q8XKhV5AbWfIJjqvueuPG9RShvbDnROQA== +"@sofie-automation/server-core-integration@1.50.0-nightly-release50-20230322-103759-dbb6cc5.0": + version "1.50.0-nightly-release50-20230322-103759-dbb6cc5.0" + resolved "https://registry.yarnpkg.com/@sofie-automation/server-core-integration/-/server-core-integration-1.50.0-nightly-release50-20230322-103759-dbb6cc5.0.tgz#edf0d8254542861fb3b07fb23f21199387456a5a" + integrity sha512-7m4z0qiISuhxjBwgsUJqXXUkgHIIFXa3006ElP/fShH9XOym1daj5LmovUj6qDnPR/49NovYHQyXnhJl5XMPNA== dependencies: - "@sofie-automation/shared-lib" "1.49.0-nightly-release49-20221216-175820-6d17a49.0" + "@sofie-automation/shared-lib" "1.50.0-nightly-release50-20230322-103759-dbb6cc5.0" ejson "^2.2.3" eventemitter3 "^4.0.7" faye-websocket "^0.11.4" - got "^11.8.5" + got "^11.8.6" tslib "^2.4.0" underscore "^1.13.4" -"@sofie-automation/shared-lib@1.49.0-nightly-release49-20221216-175820-6d17a49.0": - version "1.49.0-nightly-release49-20221216-175820-6d17a49.0" - resolved "https://registry.yarnpkg.com/@sofie-automation/shared-lib/-/shared-lib-1.49.0-nightly-release49-20221216-175820-6d17a49.0.tgz#933761fcd3cb14bdb2d4c27135fa01e112e90cfd" - integrity sha512-mX3WPjiy4yL5H5Do/JU6PWJERmahfxRk2yHnbncrMuNX7wojtwCYsWgBhuPeu8leT1rzKcj4Ha09Io9AUlHXew== +"@sofie-automation/shared-lib@1.50.0-nightly-release50-20230322-103759-dbb6cc5.0": + version "1.50.0-nightly-release50-20230322-103759-dbb6cc5.0" + resolved "https://registry.yarnpkg.com/@sofie-automation/shared-lib/-/shared-lib-1.50.0-nightly-release50-20230322-103759-dbb6cc5.0.tgz#6533f36eb4783722f9540756bf6445b173377cbb" + integrity sha512-cx9SnK7xO4iVV3AgLO9yZP1rEHoRl2WYzVCuQo6LlRN0qp/LXKt5f2qhBqCSHd9Ef1KF2l3hFhVuYrcX4bkb4g== dependencies: + "@mos-connection/model" "^3.0.1" + timeline-state-resolver-types "8.0.0-nightly-release50-20230321-185451-d43f3dc70.0" tslib "^2.4.0" type-fest "^2.19.0" @@ -1726,6 +1748,14 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/glob@*": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.0.1.tgz#6e3041640148b7764adf21ce5c7138ad454725b0" + integrity sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw== + dependencies: + "@types/minimatch" "^5.1.2" + "@types/node" "*" + "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -1795,7 +1825,7 @@ resolved "https://registry.yarnpkg.com/@types/json-buffer/-/json-buffer-3.0.0.tgz#85c1ff0f0948fc159810d4b5be35bf8c20875f64" integrity sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ== -"@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.6", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -1877,6 +1907,11 @@ dependencies: "@types/koa" "*" +"@types/lodash@^4.14.168": + version "4.14.191" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.191.tgz#09511e7f7cba275acd8b419ddac8da9a6a79e2fa" + integrity sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ== + "@types/mime-types@^2.1.0": version "2.1.1" resolved "https://registry.yarnpkg.com/@types/mime-types/-/mime-types-2.1.1.tgz#d9ba43490fa3a3df958759adf69396c3532cf2c1" @@ -1892,6 +1927,11 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== +"@types/minimatch@^5.1.2": + version "5.1.2" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" + integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== + "@types/minimist@^1.2.0", "@types/minimist@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" @@ -3031,6 +3071,17 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-color@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.3.tgz#73769ba969080629670f3f2ef69a4bf4e7cc1879" + integrity sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.61" + es6-iterator "^2.0.3" + memoizee "^0.4.15" + timers-ext "^0.1.7" + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -3477,6 +3528,14 @@ cyclist@^1.0.1: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A== +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + dargs@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" @@ -4005,6 +4064,24 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -4017,6 +4094,24 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +es6-weak-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -4214,6 +4309,14 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -4321,6 +4424,13 @@ ext-name@^5.0.0: ext-list "^2.0.0" sort-keys-length "^1.0.0" +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -4832,6 +4942,11 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw== +get-stdin@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" + integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== + get-stream@3.0.0, get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -4962,12 +5077,19 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob-promise@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/glob-promise/-/glob-promise-3.4.0.tgz#b6b8f084504216f702dc2ce8c9bc9ac8866fdb20" + integrity sha512-q08RJ6O+eJn+dVanerAndJwIcumgbDdYiUT7zFQl3Wm1xD6fBKtah7H8ZJChj4wP+8C+QfeVy8xautR7rdmKEw== + dependencies: + "@types/glob" "*" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha512-Iozmtbqv0noj0uDDqoL0zNq0VBEfK2YFoMAZoxJe4cwphvLR+JskfF30QhXHOR4m3KrE6NLRYw+U9MRXvifyig== -glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: +glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -5801,6 +5923,11 @@ is-primitive@^3.0.1: resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-3.0.1.tgz#98c4db1abff185485a657fc2905052b940524d05" integrity sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w== +is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -6389,6 +6516,34 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-schema-ref-parser@^9.0.6: + version "9.0.9" + resolved "https://registry.yarnpkg.com/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#66ea538e7450b12af342fa3d5b8458bc1e1e013f" + integrity sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q== + dependencies: + "@apidevtools/json-schema-ref-parser" "9.0.9" + +json-schema-to-typescript@^10.1.5: + version "10.1.5" + resolved "https://registry.yarnpkg.com/json-schema-to-typescript/-/json-schema-to-typescript-10.1.5.tgz#9ac32808eb4d7c158684e270438ad07256c0cb1c" + integrity sha512-X8bNNksfCQo6LhEuqNxmZr4eZpPjXZajmimciuk8eWXzZlif9Brq7WuMGD/SOhBKcRKP2SGVDNZbC28WQqx9Rg== + dependencies: + "@types/json-schema" "^7.0.6" + "@types/lodash" "^4.14.168" + "@types/prettier" "^2.1.5" + cli-color "^2.0.0" + get-stdin "^8.0.0" + glob "^7.1.6" + glob-promise "^3.4.0" + is-glob "^4.0.1" + json-schema-ref-parser "^9.0.6" + json-stringify-safe "^5.0.1" + lodash "^4.17.20" + minimist "^1.2.5" + mkdirp "^1.0.4" + mz "^2.7.0" + prettier "^2.2.0" + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -6811,7 +6966,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== -lodash@^4.17.12, lodash@^4.17.15, lodash@^4.2.1: +lodash@^4.17.12, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.2.1: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -6886,6 +7041,13 @@ lru-cache@^7.5.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.14.1.tgz#8da8d2f5f59827edb388e63e459ac23d6d408fea" integrity sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA== +lru-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ== + dependencies: + es5-ext "~0.10.2" + macos-release@^2.2.0: version "2.5.0" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.5.0.tgz#067c2c88b5f3fb3c56a375b2ec93826220fa1ff2" @@ -6974,6 +7136,20 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== +memoizee@^0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" + integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.53" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + memory-fs@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" @@ -7321,7 +7497,7 @@ mute-stream@~0.0.4: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mz@^2.5.0: +mz@^2.5.0, mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== @@ -7398,6 +7574,11 @@ nexe@^3.3.7: resolve-dependencies "^4.2.5" rimraf "^2.6.3" +next-tick@1, next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -8195,6 +8376,11 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" +prettier@^2.2.0: + version "2.8.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" + integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== + prettier@^2.8.2: version "2.8.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160" @@ -9667,6 +9853,21 @@ timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== +timeline-state-resolver-types@8.0.0-nightly-release50-20230321-185451-d43f3dc70.0: + version "8.0.0-nightly-release50-20230321-185451-d43f3dc70.0" + resolved "https://registry.yarnpkg.com/timeline-state-resolver-types/-/timeline-state-resolver-types-8.0.0-nightly-release50-20230321-185451-d43f3dc70.0.tgz#ee39190551f617be34eca6b7fd274359ded2fffc" + integrity sha512-EHt5oMMlbnHZpiVlRAxrzJ56jkcl1mN1MxelhmHxRJugkyLb9W1n7MpVEnIyRKfBABkRrSQTyjWtfMC2Lubtlg== + dependencies: + tslib "^2.4.1" + +timers-ext@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== + dependencies: + es5-ext "~0.10.46" + next-tick "1" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -9829,6 +10030,11 @@ tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== +tslib@^2.4.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + tsscmp@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" @@ -9934,6 +10140,16 @@ type-is@^1.6.16, type-is@^1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" From c1b7077c548b12f45f6854cdf507f9b9cd94b009 Mon Sep 17 00:00:00 2001 From: Jan Starzak Date: Wed, 10 May 2023 06:49:07 +0200 Subject: [PATCH 03/54] feat: implement phase and balance measurements --- .../nrk/expectations-lib.ts | 2 + apps/single-app/app/expectedPackages.json | 17 +++--- shared/packages/api/src/expectationApi.ts | 6 ++ shared/packages/api/src/inputApi.ts | 6 ++ .../expectationHandlers/lib/coreApi.ts | 20 ++++++ .../expectationHandlers/lib/scan.ts | 61 +++++++++++++++++-- 6 files changed, 99 insertions(+), 13 deletions(-) diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts index 7aecf1b9..a051e568 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts @@ -328,6 +328,8 @@ export function generatePackageLoudness( content: null, version: { channels: packageSettings.channelSpec, + balanceDifference: packageSettings.balanceDifference ?? false, + inPhaseDifference: packageSettings.inPhaseDifference ?? false, }, }, workOptions: { diff --git a/apps/single-app/app/expectedPackages.json b/apps/single-app/app/expectedPackages.json index 2f470c74..8b92e678 100644 --- a/apps/single-app/app/expectedPackages.json +++ b/apps/single-app/app/expectedPackages.json @@ -53,10 +53,10 @@ "expectedPackages": [ { "type": "media_file", - "_id": "test", + "_id": "test9902", "contentVersionHash": "abc1234", "content": { - "filePath": "amb.mp4" + "filePath": "test2.mxf" }, "version": {}, "sources": [ @@ -65,7 +65,7 @@ "accessors": { "local": { "type": "local_folder", - "filePath": "amb.mp4" + "filePath": "test2.mxf" } } } @@ -78,14 +78,17 @@ "previewPackageSettings": null, "thumbnailContainerId": "thumbnails0_local", "thumbnailPackageSettings": { - "path": "thumbnail.png" + "path": "test2.png" }, "loudnessPackageSettings": { "channelSpec": [ - "0" - ] + "0", + "0+1" + ], + "inPhaseDifference": true, + "balanceDifference": true } } } ] -} +} \ No newline at end of file diff --git a/shared/packages/api/src/expectationApi.ts b/shared/packages/api/src/expectationApi.ts index a0656ec0..f5e3d5bb 100644 --- a/shared/packages/api/src/expectationApi.ts +++ b/shared/packages/api/src/expectationApi.ts @@ -204,6 +204,12 @@ export namespace Expectation { version: { /** List of channels or stereo channel pairs to be inspected for loudness, 0-indexed. Use channel number as string (e.g. "0") or two numbers with a plus sign for stereo pairs (e.g. "0+1") */ channels: (`${number}` | `${number}+${number}`)[] + + /** Calculate phase difference between stereo channels in the tracks */ + inPhaseDifference: boolean + + /** Calculate balance difference between stereo channels in the tracks */ + balanceDifference: boolean } } workOptions: WorkOptions.Base & WorkOptions.RemoveDelay diff --git a/shared/packages/api/src/inputApi.ts b/shared/packages/api/src/inputApi.ts index 4ba67a78..f6bea15b 100644 --- a/shared/packages/api/src/inputApi.ts +++ b/shared/packages/api/src/inputApi.ts @@ -112,6 +112,12 @@ export namespace ExpectedPackage { * f.g. ["0", "0+1"] (for single stream stereo and discreet channel stereo) and then select the correct measurement in the * blueprints based on the context */ channelSpec: SideEffectLoudnessSettingsChannelSpec[] + + /** Calculate phase difference between stereo channels in the tracks */ + inPhaseDifference?: boolean + + /** Calculate balance difference between stereo channels in the tracks */ + balanceDifference?: boolean } export type SideEffectLoudnessSettingsChannelSpec = `${number}` | `${number}+${number}` diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/coreApi.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/coreApi.ts index aaa84a2a..b7f75091 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/coreApi.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/coreApi.ts @@ -53,4 +53,24 @@ export type LoudnessScanResultForStream = rangeHigh: number /** Unit: dBFS */ truePeak: number + + /** + * If a sum of the stereo channels has lower loudness than one of the channels, then the pair is not in phase. + * This is the loudness of one of the channels, subtracted from the integrated loudness of the sum + * + * Unit: LU + * + * This will only be calculated if "layout" is "stereo" + */ + inPhaseDifference?: number + + /** + * If one of the channels is louder than the other, then the pair is not balanced. + * This is the loudness of one of the channels, subtracted from the integrated loudness of the other. + * + * Unit: LU + * + * This will only be calculated if "layout" is "stereo" + * */ + balanceDifference?: number } diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts index 43165f34..62dd34f4 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts @@ -448,12 +448,13 @@ function scanLoudnessStream( | HTTPProxyAccessorHandle | QuantelAccessorHandle, _previouslyScanned: FFProbeScanResult, - channelSpec: string + channelSpec: string, + filter?: string ): CancelablePromise { return new CancelablePromise(async (resolve, reject, onCancel) => { const stereoPairMatch = channelSpec.match(/^(\d+)\+(\d+)$/) - const singleChannel = Number.parseInt(channelSpec) - if (!stereoPairMatch && !Number.isInteger(singleChannel)) { + const singleTrack = Number.parseInt(channelSpec) + if (!stereoPairMatch && !Number.isInteger(singleTrack)) { reject(`Invalid channel specification: ${channelSpec}`) return } @@ -461,11 +462,17 @@ function scanLoudnessStream( let filterString: string if (stereoPairMatch) { - filterString = `[0:a:${stereoPairMatch[1]}][0:a:${stereoPairMatch[2]}]join=inputs=2:channel_layout=stereo,ebur128=peak=true[out]` + filterString = `[0:a:${stereoPairMatch[1]}][0:a:${stereoPairMatch[2]}]join=inputs=2:channel_layout=stereo,` } else { - filterString = `[0:a:${singleChannel}]ebur128=peak=true[out]` + filterString = `[0:a:${singleTrack}]` } + if (filter) { + filterString += filter + ',' + } + + filterString += 'ebur128=peak=true[out]' + const file = getFFMpegExecutable() const args = [ '-nostats', @@ -556,6 +563,15 @@ export function scanLoudness( ) => void ): CancelablePromise { return new CancelablePromise(async (resolve, _reject, onCancel) => { + async function getStreamIntegratedLoudness(channelSpec: `${number}` | `${number}+${number}`, filter: string) { + const resultPromise = scanLoudnessStream(sourceHandle, previouslyScanned, channelSpec, filter) + onCancel(() => { + resultPromise.cancel() + }) + const result = await resultPromise + return result.success ? result.integrated : undefined + } + if (!targetVersion.channels.length) { resolve({ channels: {}, @@ -575,7 +591,40 @@ export function scanLoudness( onCancel(() => { resultPromise.cancel() }) - const result = await resultPromise + let result = await resultPromise + + if (result.success && result.layout === 'stereo') { + let leftLoudness: number | undefined + if (targetVersion.inPhaseDifference) { + /** Measure loudness of only left channel and measure loudness of left+right mix and subtract */ + leftLoudness = await getStreamIntegratedLoudness(channelSpec, 'pan=1c|c0=1*c0') + const sumLoudness = await getStreamIntegratedLoudness(channelSpec, 'pan=1c|c0=0.5*c0+0.5*c1') + + if (leftLoudness !== undefined && sumLoudness !== undefined) { + const inPhaseDifference = sumLoudness - leftLoudness + result = { + ...result, + inPhaseDifference, + } + } + } + + if (targetVersion.balanceDifference) { + if (leftLoudness === undefined) { + leftLoudness = await getStreamIntegratedLoudness(channelSpec, 'pan=1c|c0=1*c0') + } + const rightLoudness = await getStreamIntegratedLoudness(channelSpec, 'pan=1c|c0=1*c1') + + if (leftLoudness !== undefined && rightLoudness !== undefined) { + const balanceDifference = rightLoudness - leftLoudness + result = { + ...result, + balanceDifference, + } + } + } + } + packageScanResult[channelSpec] = result } catch (e) { packageScanResult[channelSpec] = { From b9e6f1d948df71ee4735e7f46cd1d214e72a9f22 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Wed, 10 May 2023 10:49:24 +0200 Subject: [PATCH 04/54] chore: add test for config default values --- .../generic/src/__tests__/config.spec.ts | 24 +++++++++++++++++++ .../generic/src/__tests__/test.spec.ts | 7 ------ 2 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 apps/package-manager/packages/generic/src/__tests__/config.spec.ts delete mode 100644 apps/package-manager/packages/generic/src/__tests__/test.spec.ts diff --git a/apps/package-manager/packages/generic/src/__tests__/config.spec.ts b/apps/package-manager/packages/generic/src/__tests__/config.spec.ts new file mode 100644 index 00000000..8645c2b3 --- /dev/null +++ b/apps/package-manager/packages/generic/src/__tests__/config.spec.ts @@ -0,0 +1,24 @@ +import { DEFAULT_LOG_LEVEL } from '@sofie-package-manager/api' +import { + PACKAGE_MANAGER_DEVICE_CONFIG, + ConfigSchema, + DEFAULT_DELAY_REMOVAL_PACKAGE, + DEFAULT_DELAY_REMOVAL_PACKAGE_INFO, +} from '../configManifest' +import { JSONBlobParse } from '@sofie-automation/server-core-integration' + +describe('Config', () => { + test('default values', () => { + const deviceConfigSchema = JSONBlobParse( + PACKAGE_MANAGER_DEVICE_CONFIG.deviceConfigSchema + ) as any as ConfigSchema + + // Ensure that the default values are set correctly + expect(deviceConfigSchema.properties.logLevel.default).toEqual(DEFAULT_LOG_LEVEL) + expect(deviceConfigSchema.properties.delayRemoval.default).toEqual(DEFAULT_DELAY_REMOVAL_PACKAGE) + expect(deviceConfigSchema.properties.delayRemovalPackageInfo.default).toEqual( + DEFAULT_DELAY_REMOVAL_PACKAGE_INFO + ) + }) +}) +export {} diff --git a/apps/package-manager/packages/generic/src/__tests__/test.spec.ts b/apps/package-manager/packages/generic/src/__tests__/test.spec.ts deleted file mode 100644 index b65fc1f7..00000000 --- a/apps/package-manager/packages/generic/src/__tests__/test.spec.ts +++ /dev/null @@ -1,7 +0,0 @@ -describe('tmp', () => { - test('tmp', () => { - // Note: To enable tests in this package, ensure that the "test" script is present in package.json - expect(1).toEqual(1) - }) -}) -export {} From aba9bb3aa2353b33fd3d17884d818907ef30c36c Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Wed, 10 May 2023 11:01:39 +0200 Subject: [PATCH 05/54] v1.50.0-alpha.0 This version is compatible with Sofie Core release50 --- apps/_boilerplate/app/package.json | 4 ++-- apps/_boilerplate/packages/generic/package.json | 2 +- apps/appcontainer-node/app/package.json | 4 ++-- .../packages/generic/package.json | 6 +++--- apps/http-server/app/package.json | 4 ++-- apps/http-server/packages/generic/package.json | 4 ++-- apps/package-manager/app/package.json | 4 ++-- .../packages/generic/package.json | 8 ++++---- .../app/package.json | 4 ++-- .../packages/generic/package.json | 4 ++-- apps/single-app/app/package.json | 16 ++++++++-------- apps/worker/app/package.json | 4 ++-- apps/worker/packages/generic/package.json | 6 +++--- apps/workforce/app/package.json | 4 ++-- apps/workforce/packages/generic/package.json | 6 +++--- lerna.json | 2 +- shared/packages/api/package.json | 2 +- shared/packages/expectationManager/package.json | 6 +++--- shared/packages/worker/package.json | 4 ++-- shared/packages/workforce/package.json | 4 ++-- tests/internal-tests/package.json | 14 +++++++------- 21 files changed, 56 insertions(+), 56 deletions(-) diff --git a/apps/_boilerplate/app/package.json b/apps/_boilerplate/app/package.json index fcfa3937..35a9ab64 100644 --- a/apps/_boilerplate/app/package.json +++ b/apps/_boilerplate/app/package.json @@ -1,6 +1,6 @@ { "name": "@boilerplate/app", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@boilerplate/generic": "1.42.0" + "@boilerplate/generic": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/_boilerplate/packages/generic/package.json b/apps/_boilerplate/packages/generic/package.json index 052a7d1d..32adc543 100644 --- a/apps/_boilerplate/packages/generic/package.json +++ b/apps/_boilerplate/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@boilerplate/generic", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index 68e79a53..34379e90 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.42.0" + "@appcontainer-node/generic": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index ad459a4b..72c2a3c7 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.42.0", - "@sofie-package-manager/worker": "1.42.0", + "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/worker": "1.50.0-alpha.0", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index 7e439825..5711f899 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@http-server/generic": "1.42.0" + "@http-server/generic": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index f38c7781..5ac615a3 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.42.0", + "@sofie-package-manager/api": "1.50.0-alpha.0", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index 0eb68231..42ce23b2 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@package-manager/generic": "1.42.0" + "@package-manager/generic": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index 7517bcee..cb11f241 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,9 +13,9 @@ "@sofie-automation/server-core-integration": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.42.0", - "@sofie-package-manager/expectation-manager": "1.42.0", - "@sofie-package-manager/worker": "1.42.0", + "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.0", + "@sofie-package-manager/worker": "1.50.0-alpha.0", "chokidar": "^3.5.1", "data-store": "^4.0.3", "deep-extend": "^0.6.0", diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index c755c28c..da068aa7 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.42.0" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index f94512ce..467d7aa7 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,7 +12,7 @@ "dependencies": { "@koa/cors": "^4.0.0", "@koa/multer": "3.0.0", - "@sofie-package-manager/api": "1.42.0", + "@sofie-package-manager/api": "1.50.0-alpha.0", "got": "^11.8.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index bccf4745..2aec691b 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -14,13 +14,13 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.42.0", - "@http-server/generic": "1.42.0", - "@package-manager/generic": "1.42.0", - "@quantel-http-transformer-proxy/generic": "1.42.0", - "@sofie-package-manager/api": "1.42.0", - "@sofie-package-manager/worker": "1.42.0", - "@sofie-package-manager/workforce": "1.42.0", + "@appcontainer-node/generic": "1.50.0-alpha.0", + "@http-server/generic": "1.50.0-alpha.0", + "@package-manager/generic": "1.50.0-alpha.0", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.0", + "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/worker": "1.50.0-alpha.0", + "@sofie-package-manager/workforce": "1.50.0-alpha.0", "underscore": "^1.12.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 3e581121..d50e3ccf 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "description": "Boilerplace", "private": true, "scripts": { @@ -15,7 +15,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@worker/generic": "1.42.0" + "@worker/generic": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index 0c1dac5c..6d7ebcff 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.42.0", - "@sofie-package-manager/worker": "1.42.0" + "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/worker": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index 73eb1aed..b2ebd4be 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/app", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@workforce/generic": "1.42.0" + "@workforce/generic": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/packages/generic/package.json b/apps/workforce/packages/generic/package.json index 1e49d9ff..772a537c 100644 --- a/apps/workforce/packages/generic/package.json +++ b/apps/workforce/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/generic", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.42.0", - "@sofie-package-manager/workforce": "1.42.0" + "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/workforce": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/lerna.json b/lerna.json index cdbf6394..6f0ab33a 100644 --- a/lerna.json +++ b/lerna.json @@ -4,7 +4,7 @@ "apps/**", "tests/**" ], - "version": "1.42.0", + "version": "1.50.0-alpha.0", "npmClient": "yarn", "useWorkspaces": true } diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index 05db83fd..e494b1d1 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/api", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "main": "dist/index", "types": "dist/index", "files": [ diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index 9bc9c32a..c28d7b21 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -13,8 +13,8 @@ "node": ">=14.18.0" }, "dependencies": { - "@sofie-package-manager/api": "1.42.0", - "@sofie-package-manager/worker": "1.42.0", + "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/worker": "1.50.0-alpha.0", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index 5683945d..c56562c0 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -18,7 +18,7 @@ "@types/tmp": "~0.2.2" }, "dependencies": { - "@sofie-package-manager/api": "1.42.0", + "@sofie-package-manager/api": "1.50.0-alpha.0", "abort-controller": "^3.0.0", "atem-connection": "^3.2.0", "chokidar": "^3.5.1", diff --git a/shared/packages/workforce/package.json b/shared/packages/workforce/package.json index ae235679..4eba49b3 100644 --- a/shared/packages/workforce/package.json +++ b/shared/packages/workforce/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/workforce", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "main": "dist/index", "types": "dist/index", "files": [ @@ -13,7 +13,7 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.42.0" + "@sofie-package-manager/api": "1.50.0-alpha.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index 2a85aab8..a267ea54 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.42.0", + "version": "1.50.0-alpha.0", "description": "Internal tests", "private": true, "scripts": { @@ -14,12 +14,12 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.42.0", - "@package-manager/generic": "1.42.0", - "@sofie-package-manager/api": "1.42.0", - "@sofie-package-manager/expectation-manager": "1.42.0", - "@sofie-package-manager/worker": "1.42.0", - "@sofie-package-manager/workforce": "1.42.0", + "@http-server/generic": "1.50.0-alpha.0", + "@package-manager/generic": "1.50.0-alpha.0", + "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.0", + "@sofie-package-manager/worker": "1.50.0-alpha.0", + "@sofie-package-manager/workforce": "1.50.0-alpha.0", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" }, From 0276d40e2ab01cb1e9c7167ba1eb2dea43f09f00 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Wed, 10 May 2023 15:27:08 +0200 Subject: [PATCH 06/54] chore: update koa-router to 12.0.0 --- .../packages/generic/src/server.ts | 2 +- .../packages/generic/package.json | 4 ++-- .../packages/generic/src/server.ts | 4 ++-- yarn.lock | 19 +++++++++++++++++-- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/apps/http-server/packages/generic/src/server.ts b/apps/http-server/packages/generic/src/server.ts index 8534e594..6461924f 100644 --- a/apps/http-server/packages/generic/src/server.ts +++ b/apps/http-server/packages/generic/src/server.ts @@ -57,7 +57,7 @@ export class PackageProxyServer { await this._setUpRoutes() } private async _setUpRoutes(): Promise { - this.router.all('*', async (ctx, next) => { + this.router.all('(.*)', async (ctx, next) => { // Intercept and authenticate: const apiKey: string = diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index 467d7aa7..5c01b25f 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -18,7 +18,7 @@ "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", "koa-ratelimit": "^5.0.1", - "koa-router": "^8.0.8", + "koa-router": "^12.0.0", "mime-types": "^2.1.28", "mkdirp": "^1.0.4", "multer": "2.0.0-rc.2", @@ -35,7 +35,7 @@ "@types/koa-bodyparser": "^4.3.0", "@types/koa-range": "^0.3.2", "@types/koa-ratelimit": "^5.0.0", - "@types/koa-router": "^7.4.0", + "@types/koa-router": "^7.4.4", "@types/koa__cors": "^4.0.0", "@types/koa__multer": "^2.0.2", "@types/mime-types": "^2.1.0", diff --git a/apps/quantel-http-transformer-proxy/packages/generic/src/server.ts b/apps/quantel-http-transformer-proxy/packages/generic/src/server.ts index 150cdb04..52da0d22 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/src/server.ts +++ b/apps/quantel-http-transformer-proxy/packages/generic/src/server.ts @@ -69,7 +69,7 @@ export class QuantelHTTPTransformerProxy { }) // Proxy - this.router.get('/(quantel|gv)/*', async (ctx) => { + this.router.get('/(quantel|gv)/(.*)', async (ctx) => { try { // this.logger.debug(`Pass-through requests to transformer: ${ctx.path}`) if (!this.transformerURL) { @@ -120,7 +120,7 @@ export class QuantelHTTPTransformerProxy { } } }) - this.router.get('/*', async (ctx, next) => { + this.router.get('/(.*)', async (ctx, next) => { const url = `${this.transformerURL}${ctx.path}` + (ctx.querystring ? `?${ctx.querystring}` : '') try { const initReq = await got(url, { responseType: 'buffer' }) diff --git a/yarn.lock b/yarn.lock index 2568c267..42c02682 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1575,7 +1575,7 @@ "@types/koa" "*" ioredis "^5.2.3" -"@types/koa-router@^7.4.0": +"@types/koa-router@^7.4.0", "@types/koa-router@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@types/koa-router/-/koa-router-7.4.4.tgz#db72bde3616365d74f00178d5f243c4fce7da572" integrity sha512-3dHlZ6CkhgcWeF6wafEUvyyqjWYfKmev3vy1PtOmr0mBc3wpXPU5E8fBBd4YQo5bRpHPfmwC5yDaX7s4jhIN6A== @@ -5047,7 +5047,7 @@ http-cache-semantics@^4.1.0, http-cache-semantics@^4.1.1: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== -http-errors@2.0.0: +http-errors@2.0.0, http-errors@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== @@ -6317,6 +6317,16 @@ koa-ratelimit@^5.0.1: debug "^4.1.1" ms "^2.1.2" +koa-router@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/koa-router/-/koa-router-12.0.0.tgz#94276df8c7aef424b86728b0ff4a69de50050dbc" + integrity sha512-zGrdiXygGYW8WvrzeGsHZvKnHs4DzyGoqJ9a8iHlRkiwuEAOAPyI27//OlhoWdgFAEIM3qbUgr0KCuRaP/TCag== + dependencies: + http-errors "^2.0.0" + koa-compose "^4.1.0" + methods "^1.1.2" + path-to-regexp "^6.2.1" + koa-router@^8.0.8: version "8.0.8" resolved "https://registry.yarnpkg.com/koa-router/-/koa-router-8.0.8.tgz#f0b70f90dae275db8c71a41e1efb625581fb3b5a" @@ -8174,6 +8184,11 @@ path-to-regexp@1.x: dependencies: isarray "0.0.1" +path-to-regexp@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz#d54934d6798eb9e5ef14e7af7962c945906918e5" + integrity sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw== + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" From 8c7629237b4ecb38efd67e5f5941e35d8a3ae679 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Wed, 10 May 2023 15:29:26 +0200 Subject: [PATCH 07/54] v1.50.0-alpha.1 --- CHANGELOG.md | 8 ++++++++ apps/http-server/app/CHANGELOG.md | 8 ++++++++ apps/http-server/app/package.json | 4 ++-- apps/http-server/packages/generic/CHANGELOG.md | 8 ++++++++ apps/http-server/packages/generic/package.json | 2 +- apps/quantel-http-transformer-proxy/app/CHANGELOG.md | 8 ++++++++ apps/quantel-http-transformer-proxy/app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 2 +- apps/single-app/app/CHANGELOG.md | 8 ++++++++ apps/single-app/app/package.json | 6 +++--- lerna.json | 2 +- tests/internal-tests/CHANGELOG.md | 8 ++++++++ tests/internal-tests/package.json | 4 ++-- 14 files changed, 68 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 242f3219..e940b7a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + +**Note:** Version bump only for package package-manager-monorepo + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package package-manager-monorepo diff --git a/apps/http-server/app/CHANGELOG.md b/apps/http-server/app/CHANGELOG.md index 73d6f3ae..a9d96ba7 100644 --- a/apps/http-server/app/CHANGELOG.md +++ b/apps/http-server/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + +**Note:** Version bump only for package @http-server/app + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @http-server/app diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index 5711f899..034f6831 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.1", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.0" + "@http-server/generic": "1.50.0-alpha.1" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/http-server/packages/generic/CHANGELOG.md b/apps/http-server/packages/generic/CHANGELOG.md index 86276cb5..c270d5cc 100644 --- a/apps/http-server/packages/generic/CHANGELOG.md +++ b/apps/http-server/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + +**Note:** Version bump only for package @http-server/generic + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @http-server/generic diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index 5ac615a3..c259446c 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.1", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md index 064f3e65..d3571562 100644 --- a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/app + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @quantel-http-transformer-proxy/app diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index da068aa7..7bad08c9 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.1", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.0" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.1" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md index 60e626a6..6b37b5c0 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/generic + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @quantel-http-transformer-proxy/generic diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index 5c01b25f..b86801d5 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.1", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index a15874c6..70dc40f9 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + +**Note:** Version bump only for package @single-app/app + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @single-app/app diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index 2aec691b..aa1f57fc 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.1", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -15,9 +15,9 @@ }, "dependencies": { "@appcontainer-node/generic": "1.50.0-alpha.0", - "@http-server/generic": "1.50.0-alpha.0", + "@http-server/generic": "1.50.0-alpha.1", "@package-manager/generic": "1.50.0-alpha.0", - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.0", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.1", "@sofie-package-manager/api": "1.50.0-alpha.0", "@sofie-package-manager/worker": "1.50.0-alpha.0", "@sofie-package-manager/workforce": "1.50.0-alpha.0", diff --git a/lerna.json b/lerna.json index 6f0ab33a..52e8f2b4 100644 --- a/lerna.json +++ b/lerna.json @@ -4,7 +4,7 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.1", "npmClient": "yarn", "useWorkspaces": true } diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index 1cdea6c9..cc8eda45 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + +**Note:** Version bump only for package @tests/internal-tests + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @tests/internal-tests diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index a267ea54..ef911a7a 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.1", "description": "Internal tests", "private": true, "scripts": { @@ -14,7 +14,7 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.0", + "@http-server/generic": "1.50.0-alpha.1", "@package-manager/generic": "1.50.0-alpha.0", "@sofie-package-manager/api": "1.50.0-alpha.0", "@sofie-package-manager/expectation-manager": "1.50.0-alpha.0", From 252d2707c72b29bee214759cf83c54f5a6f3e9c9 Mon Sep 17 00:00:00 2001 From: Jan Starzak Date: Wed, 7 Jun 2023 14:06:37 +0200 Subject: [PATCH 08/54] feat: make PREPARE_FILE_ACCESS_TIMEOUT longer --- shared/packages/api/src/websocketConnection.ts | 2 +- .../packages/worker/src/worker/accessorHandlers/fileShare.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shared/packages/api/src/websocketConnection.ts b/shared/packages/api/src/websocketConnection.ts index 18368728..6bd0a2e8 100644 --- a/shared/packages/api/src/websocketConnection.ts +++ b/shared/packages/api/src/websocketConnection.ts @@ -8,7 +8,7 @@ export const PING_TIME = 10 * 1000 * If the sender doesn't recieve a reply after this time, * the message is considered lost. */ -export const MESSAGE_TIMEOUT = process.env.JEST_WORKER_ID !== undefined ? 3000 : 10000 +export const MESSAGE_TIMEOUT = process.env.JEST_WORKER_ID !== undefined ? 5000 : 10000 // Note: JEST_WORKER_ID is set when running in unit tests /** diff --git a/shared/packages/worker/src/worker/accessorHandlers/fileShare.ts b/shared/packages/worker/src/worker/accessorHandlers/fileShare.ts index 3ee26e24..8d46350b 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/fileShare.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/fileShare.ts @@ -22,6 +22,7 @@ import { Reason, stringifyError, promiseTimeout, + INNER_ACTION_TIMEOUT, } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { WindowsWorker } from '../workers/windowsWorker/windowsWorker' @@ -43,7 +44,7 @@ const fsWriteFile = promisify(fs.writeFile) const fsRename = promisify(fs.rename) const pExec = promisify(exec) -const PREPARE_FILE_ACCESS_TIMEOUT = 1000 +const PREPARE_FILE_ACCESS_TIMEOUT = INNER_ACTION_TIMEOUT * 0.5 const PREPARE_FILE_ACCESS_TIMEOUT_INNER = PREPARE_FILE_ACCESS_TIMEOUT * 0.8 /** Accessor handle for accessing files on a network share */ From bfaa4f9376e436ffda15bbf3c854c0df15de3607 Mon Sep 17 00:00:00 2001 From: Jan Starzak Date: Thu, 8 Jun 2023 11:31:12 +0200 Subject: [PATCH 09/54] chore: fix test --- shared/packages/api/src/websocketConnection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/packages/api/src/websocketConnection.ts b/shared/packages/api/src/websocketConnection.ts index 6bd0a2e8..18368728 100644 --- a/shared/packages/api/src/websocketConnection.ts +++ b/shared/packages/api/src/websocketConnection.ts @@ -8,7 +8,7 @@ export const PING_TIME = 10 * 1000 * If the sender doesn't recieve a reply after this time, * the message is considered lost. */ -export const MESSAGE_TIMEOUT = process.env.JEST_WORKER_ID !== undefined ? 5000 : 10000 +export const MESSAGE_TIMEOUT = process.env.JEST_WORKER_ID !== undefined ? 3000 : 10000 // Note: JEST_WORKER_ID is set when running in unit tests /** From f6b401dfe202aeff1e3dda0c97e204bb8bb5dd27 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Fri, 16 Jun 2023 13:56:54 +0100 Subject: [PATCH 10/54] chore: update server-core-integration --- .../packages/generic/src/coreHandler.ts | 23 ++++----- package.json | 2 +- yarn.lock | 47 ++++++++++--------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/apps/package-manager/packages/generic/src/coreHandler.ts b/apps/package-manager/packages/generic/src/coreHandler.ts index 6390c34d..eac9da5b 100644 --- a/apps/package-manager/packages/generic/src/coreHandler.ts +++ b/apps/package-manager/packages/generic/src/coreHandler.ts @@ -10,7 +10,7 @@ import { protectString, unprotectString, ProtectedString, - PeripheralDevicePublic, + PeripheralDeviceForDevice, PeripheralDeviceId, PeripheralDeviceCommand, ExternalPeripheralDeviceAPI, @@ -152,9 +152,7 @@ export class CoreHandler { this.logger.info('Core: Setting up subscriptions..') this.logger.info('DeviceId: ' + this.core.deviceId) await Promise.all([ - this.core.autoSubscribe('peripheralDevices', { - _id: this.core.deviceId, - }), + this.core.autoSubscribe('peripheralDeviceForDevice', this.core.deviceId), this.core.autoSubscribe('studioOfDevice', this.core.deviceId), this.core.autoSubscribe('expectedPackagesForDevice', this.core.deviceId, undefined), // this.core.autoSubscribe('timelineForDevice', this.core.deviceId), @@ -170,12 +168,12 @@ export class CoreHandler { this._observers = [] } // setup observers - const observer = this.core.observe('peripheralDevices') + const observer = this.core.observe('peripheralDeviceForDevice') observer.added = (id: string) => this.onDeviceChanged(protectString(id)) observer.changed = (id: string) => this.onDeviceChanged(protectString(id)) this.setupObserverForPeripheralDeviceCommands() - const peripheralDevices = this.core.getCollection('peripheralDevices') + const peripheralDevices = this.core.getCollection('peripheralDeviceForDevice') if (peripheralDevices) { peripheralDevices.find({}).forEach((device) => { this.onDeviceChanged(device._id) @@ -209,13 +207,14 @@ export class CoreHandler { deviceCategory: PeripheralDeviceAPI.PeripheralDeviceCategory.PACKAGE_MANAGER, deviceType: PeripheralDeviceAPI.PeripheralDeviceType.PACKAGE_MANAGER, - deviceSubType: PeripheralDeviceAPI.PERIPHERAL_SUBTYPE_PROCESS, deviceName: name, watchDog: this._coreConfig ? this._coreConfig.watchdog : true, configManifest: PACKAGE_MANAGER_DEVICE_CONFIG, + documentationUrl: 'https://github.com/nrkno/sofie-package-manager', + versions: this._getVersions().versions, } return options @@ -225,15 +224,11 @@ export class CoreHandler { } onDeviceChanged(id: PeripheralDeviceId): void { if (id === this.core.deviceId) { - const col = this.core.getCollection('peripheralDevices') - if (!col) throw new Error('collection "peripheralDevices" not found!') + const col = this.core.getCollection('peripheralDeviceForDevice') + if (!col) throw new Error('collection "peripheralDeviceForDevice" not found!') const device = col.findOne(id) - if (device) { - this.deviceSettings = device.settings || {} - } else { - this.deviceSettings = {} - } + this.deviceSettings = device?.deviceSettings || {} const logLevel = this.deviceSettings['logLevel'] ?? DEFAULT_LOG_LEVEL if (logLevel !== getLogLevel()) { diff --git a/package.json b/package.json index ed139850..24677fca 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "node": ">=12.11.0" }, "dependencies": { - "@sofie-automation/server-core-integration": "1.50.0-nightly-release50-20230322-103759-dbb6cc5.0" + "@sofie-automation/server-core-integration": "1.50.0-nightly-release50-20230615-121624-0fe1787.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "lint-staged": { diff --git a/yarn.lock b/yarn.lock index 42c02682..41fdc2a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -796,10 +796,10 @@ write-pkg "4.0.0" yargs "16.2.0" -"@mos-connection/model@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@mos-connection/model/-/model-3.0.1.tgz#38b41d6848e3af58715ce462c5e55ddf1c5c456f" - integrity sha512-e+vrLaghYayuzq5JZABbouofseMMnGmUk0mJcGzCG4aYK3YZ/9JoTe1mJBMecbEiqFQXld8idOHv/9rO8HRy4g== +"@mos-connection/model@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@mos-connection/model/-/model-3.0.4.tgz#da2648c141b2cd1e3f8fe0653525d8eca142b2f1" + integrity sha512-TPA/Y6r0XnlbMp1it5HfGVreUCuVCQdnO2r8PnSfiipdnsJSP9YiSOkNQ17+8oc1qgb8GVCrFRJhkUV8mKuweg== "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" @@ -1283,12 +1283,12 @@ semver "^7.3.8" shelljs "^0.8.5" -"@sofie-automation/server-core-integration@1.50.0-nightly-release50-20230322-103759-dbb6cc5.0": - version "1.50.0-nightly-release50-20230322-103759-dbb6cc5.0" - resolved "https://registry.yarnpkg.com/@sofie-automation/server-core-integration/-/server-core-integration-1.50.0-nightly-release50-20230322-103759-dbb6cc5.0.tgz#edf0d8254542861fb3b07fb23f21199387456a5a" - integrity sha512-7m4z0qiISuhxjBwgsUJqXXUkgHIIFXa3006ElP/fShH9XOym1daj5LmovUj6qDnPR/49NovYHQyXnhJl5XMPNA== +"@sofie-automation/server-core-integration@1.50.0-nightly-release50-20230615-121624-0fe1787.0": + version "1.50.0-nightly-release50-20230615-121624-0fe1787.0" + resolved "https://registry.yarnpkg.com/@sofie-automation/server-core-integration/-/server-core-integration-1.50.0-nightly-release50-20230615-121624-0fe1787.0.tgz#e0deaa2b5e1b925eb59fac4f01ac9e77e81980b6" + integrity sha512-dF5zZEeBbgsBZOLPkJQePgWsasi3OX/kPFI4PONtD5ixsg+jAOH/i6hQy7ywjeWtvQsiUK5H6E3uzUmBpEiSHA== dependencies: - "@sofie-automation/shared-lib" "1.50.0-nightly-release50-20230322-103759-dbb6cc5.0" + "@sofie-automation/shared-lib" "1.50.0-nightly-release50-20230615-121624-0fe1787.0" ejson "^2.2.3" eventemitter3 "^4.0.7" faye-websocket "^0.11.4" @@ -1296,13 +1296,13 @@ tslib "^2.4.0" underscore "^1.13.4" -"@sofie-automation/shared-lib@1.50.0-nightly-release50-20230322-103759-dbb6cc5.0": - version "1.50.0-nightly-release50-20230322-103759-dbb6cc5.0" - resolved "https://registry.yarnpkg.com/@sofie-automation/shared-lib/-/shared-lib-1.50.0-nightly-release50-20230322-103759-dbb6cc5.0.tgz#6533f36eb4783722f9540756bf6445b173377cbb" - integrity sha512-cx9SnK7xO4iVV3AgLO9yZP1rEHoRl2WYzVCuQo6LlRN0qp/LXKt5f2qhBqCSHd9Ef1KF2l3hFhVuYrcX4bkb4g== +"@sofie-automation/shared-lib@1.50.0-nightly-release50-20230615-121624-0fe1787.0": + version "1.50.0-nightly-release50-20230615-121624-0fe1787.0" + resolved "https://registry.yarnpkg.com/@sofie-automation/shared-lib/-/shared-lib-1.50.0-nightly-release50-20230615-121624-0fe1787.0.tgz#b1559053d8ef8b56f120293ccb30adb37ecea313" + integrity sha512-/oYawa6y/3JIwNo+a+T/OG/6nV4x31wrfMCGrq4Ud4ZU1LGgaR0l2klJlto9K54cF8K/aIPHtP45li+sf9aDkQ== dependencies: - "@mos-connection/model" "^3.0.1" - timeline-state-resolver-types "8.0.0-nightly-release50-20230321-185451-d43f3dc70.0" + "@mos-connection/model" "^3.0.4" + timeline-state-resolver-types "8.0.0-nightly-release50-20230615-051635-c51460271.0" tslib "^2.4.0" type-fest "^2.19.0" @@ -9786,12 +9786,12 @@ timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== -timeline-state-resolver-types@8.0.0-nightly-release50-20230321-185451-d43f3dc70.0: - version "8.0.0-nightly-release50-20230321-185451-d43f3dc70.0" - resolved "https://registry.yarnpkg.com/timeline-state-resolver-types/-/timeline-state-resolver-types-8.0.0-nightly-release50-20230321-185451-d43f3dc70.0.tgz#ee39190551f617be34eca6b7fd274359ded2fffc" - integrity sha512-EHt5oMMlbnHZpiVlRAxrzJ56jkcl1mN1MxelhmHxRJugkyLb9W1n7MpVEnIyRKfBABkRrSQTyjWtfMC2Lubtlg== +timeline-state-resolver-types@8.0.0-nightly-release50-20230615-051635-c51460271.0: + version "8.0.0-nightly-release50-20230615-051635-c51460271.0" + resolved "https://registry.yarnpkg.com/timeline-state-resolver-types/-/timeline-state-resolver-types-8.0.0-nightly-release50-20230615-051635-c51460271.0.tgz#e9f0fa67133847314d83ae802221812d412346db" + integrity sha512-lnWEvFCdNncFInNCmviHDOMrLuIjSjaZ8uBvo7h5fUtVHHRaLiFpudg69bR280ZorSqnEePmJNt90bvXlkrgVw== dependencies: - tslib "^2.4.1" + tslib "^2.5.1" timers-ext@^0.1.7: version "0.1.7" @@ -9952,11 +9952,16 @@ tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== -tslib@^2.3.0, tslib@^2.4.1: +tslib@^2.3.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tslib@^2.5.1: + version "2.5.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913" + integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w== + tsscmp@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" From 98efd29adedfc3e3a93a1dcb6a322b08dc7f9027 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Fri, 16 Jun 2023 13:57:55 +0100 Subject: [PATCH 11/54] fix: type error --- .../generic/src/generateExpectations/nrk/expectations.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts index 86cb1c91..a77096af 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts @@ -92,11 +92,11 @@ function getBasicExpectations( if (shouldBeIgnored(packageWrap)) continue // Verify that the expectedPackage has any source and target accessors: - const hasAnySourceAccessors = !!packageWrap.sources.find((source) => source.accessors.length > 0) - const hasAnyTargetAccessors = !!packageWrap.targets.find((target) => target.accessors.length > 0) + const hasAnySourceAccessors = !!packageWrap.sources.find((source) => Object.keys(source.accessors).length > 0) + const hasAnyTargetAccessors = !!packageWrap.targets.find((target) => Object.keys(target.accessors).length > 0) // No need to generate an expectation if there are no accessors: - if (!hasAnySourceAccessors || !hasAnyTargetAccessors) { + if (hasAnySourceAccessors || hasAnyTargetAccessors) { if (packageWrap.expectedPackage.type === ExpectedPackage.PackageType.MEDIA_FILE) { if (packageWrap.sources.length === 0) { // If there are no sources defined, just verify that the file exists on the target: From 255016f730f8c21f9ebcc9db239ab600ff477b23 Mon Sep 17 00:00:00 2001 From: Jan Starzak Date: Thu, 22 Jun 2023 15:33:31 +0200 Subject: [PATCH 12/54] v1.50.0-alpha.2 --- CHANGELOG.md | 35 +++++++++++++++++++ apps/appcontainer-node/app/CHANGELOG.md | 12 +++++++ apps/appcontainer-node/app/package.json | 6 ++-- .../packages/generic/CHANGELOG.md | 12 +++++++ .../packages/generic/package.json | 8 ++--- apps/http-server/app/CHANGELOG.md | 16 +++++++++ apps/http-server/app/package.json | 6 ++-- .../http-server/packages/generic/CHANGELOG.md | 16 +++++++++ .../http-server/packages/generic/package.json | 6 ++-- apps/package-manager/app/CHANGELOG.md | 12 +++++++ apps/package-manager/app/package.json | 6 ++-- .../packages/generic/CHANGELOG.md | 21 +++++++++++ .../packages/generic/package.json | 10 +++--- .../app/CHANGELOG.md | 16 +++++++++ .../app/package.json | 6 ++-- .../packages/generic/CHANGELOG.md | 16 +++++++++ .../packages/generic/package.json | 6 ++-- apps/single-app/app/CHANGELOG.md | 19 ++++++++++ apps/single-app/app/package.json | 18 +++++----- apps/worker/app/CHANGELOG.md | 12 +++++++ apps/worker/app/package.json | 6 ++-- apps/worker/packages/generic/CHANGELOG.md | 12 +++++++ apps/worker/packages/generic/package.json | 8 ++--- apps/workforce/app/CHANGELOG.md | 12 +++++++ apps/workforce/app/package.json | 6 ++-- apps/workforce/packages/generic/CHANGELOG.md | 12 +++++++ apps/workforce/packages/generic/package.json | 8 ++--- lerna.json | 4 +-- shared/packages/api/CHANGELOG.md | 16 +++++++++ shared/packages/api/package.json | 4 +-- .../packages/expectationManager/CHANGELOG.md | 15 ++++++++ .../packages/expectationManager/package.json | 8 ++--- shared/packages/worker/CHANGELOG.md | 20 +++++++++++ shared/packages/worker/package.json | 6 ++-- shared/packages/workforce/CHANGELOG.md | 12 +++++++ shared/packages/workforce/package.json | 6 ++-- tests/internal-tests/CHANGELOG.md | 16 +++++++++ tests/internal-tests/package.json | 16 ++++----- 38 files changed, 374 insertions(+), 72 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b81307b9..ab81bc35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,41 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Bug Fixes + +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) + + +### Features + +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) ## [1.42.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) diff --git a/apps/appcontainer-node/app/CHANGELOG.md b/apps/appcontainer-node/app/CHANGELOG.md index b9d25100..8a955b6c 100644 --- a/apps/appcontainer-node/app/CHANGELOG.md +++ b/apps/appcontainer-node/app/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @appcontainer-node/app + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @appcontainer-node/app diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index 226cd604..27487a6f 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.0" + "@appcontainer-node/generic": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -28,4 +28,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/appcontainer-node/packages/generic/CHANGELOG.md b/apps/appcontainer-node/packages/generic/CHANGELOG.md index f56829db..ef103468 100644 --- a/apps/appcontainer-node/packages/generic/CHANGELOG.md +++ b/apps/appcontainer-node/packages/generic/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @appcontainer-node/generic + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @appcontainer-node/generic diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index f18d60de..861cac4f 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.0", - "@sofie-package-manager/worker": "1.50.0-alpha.0", + "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/worker": "1.50.0-alpha.2", "underscore": "^1.12.0" }, "devDependencies": { @@ -29,4 +29,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/http-server/app/CHANGELOG.md b/apps/http-server/app/CHANGELOG.md index b4e07c5b..b0ebd5f9 100644 --- a/apps/http-server/app/CHANGELOG.md +++ b/apps/http-server/app/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @http-server/app + + + + + # [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index 7f579877..e887c6ed 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.50.0-alpha.1", + "version": "1.50.0-alpha.2", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.1" + "@http-server/generic": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -28,4 +28,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/http-server/packages/generic/CHANGELOG.md b/apps/http-server/packages/generic/CHANGELOG.md index 7447a1cb..586c7476 100644 --- a/apps/http-server/packages/generic/CHANGELOG.md +++ b/apps/http-server/packages/generic/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @http-server/generic + + + + + # [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index a87508ea..66d0b5ba 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.50.0-alpha.1", + "version": "1.50.0-alpha.2", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/api": "1.50.0-alpha.2", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", @@ -50,4 +50,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/package-manager/app/CHANGELOG.md b/apps/package-manager/app/CHANGELOG.md index 8de33f20..79973ba9 100644 --- a/apps/package-manager/app/CHANGELOG.md +++ b/apps/package-manager/app/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @package-manager/app + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @package-manager/app diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index ea765040..8b1d3ffe 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@package-manager/generic": "1.50.0-alpha.0" + "@package-manager/generic": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -27,4 +27,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/package-manager/packages/generic/CHANGELOG.md b/apps/package-manager/packages/generic/CHANGELOG.md index 118f6b8d..fc9f2560 100644 --- a/apps/package-manager/packages/generic/CHANGELOG.md +++ b/apps/package-manager/packages/generic/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Bug Fixes + +* type error ([98efd29](https://github.com/nrkno/sofie-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/sofie-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/sofie-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index c9891af9..8fd321e7 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,9 +13,9 @@ "@sofie-automation/server-core-integration": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.0", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.0", - "@sofie-package-manager/worker": "1.50.0-alpha.0", + "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.2", + "@sofie-package-manager/worker": "1.50.0-alpha.2", "chokidar": "^3.5.1", "data-store": "^4.0.3", "deep-extend": "^0.6.0", @@ -39,4 +39,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md index a3c9b5bf..fadeca6a 100644 --- a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/app + + + + + # [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index 4e36a29d..a9bd118a 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.50.0-alpha.1", + "version": "1.50.0-alpha.2", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.1" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -27,4 +27,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md index eec3123c..c876326a 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/generic + + + + + # [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index 827bdd04..e1864993 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.50.0-alpha.1", + "version": "1.50.0-alpha.2", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,7 +12,7 @@ "dependencies": { "@koa/cors": "^4.0.0", "@koa/multer": "3.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/api": "1.50.0-alpha.2", "got": "^11.8.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", @@ -58,4 +58,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index 0a91639d..c672879d 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/sofie-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + # [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index db75346c..167d2631 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.1", + "version": "1.50.0-alpha.2", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -14,13 +14,13 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.0", - "@http-server/generic": "1.50.0-alpha.1", - "@package-manager/generic": "1.50.0-alpha.0", - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.1", - "@sofie-package-manager/api": "1.50.0-alpha.0", - "@sofie-package-manager/worker": "1.50.0-alpha.0", - "@sofie-package-manager/workforce": "1.50.0-alpha.0", + "@appcontainer-node/generic": "1.50.0-alpha.2", + "@http-server/generic": "1.50.0-alpha.2", + "@package-manager/generic": "1.50.0-alpha.2", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.2", + "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/worker": "1.50.0-alpha.2", + "@sofie-package-manager/workforce": "1.50.0-alpha.2", "underscore": "^1.12.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", @@ -35,4 +35,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/worker/app/CHANGELOG.md b/apps/worker/app/CHANGELOG.md index 33cb466c..c01dc617 100644 --- a/apps/worker/app/CHANGELOG.md +++ b/apps/worker/app/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @worker/app + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @worker/app diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 870d2471..2819680f 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "description": "Boilerplace", "private": true, "scripts": { @@ -15,7 +15,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@worker/generic": "1.50.0-alpha.0" + "@worker/generic": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -29,4 +29,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/worker/packages/generic/CHANGELOG.md b/apps/worker/packages/generic/CHANGELOG.md index 2b1df50f..a2401fef 100644 --- a/apps/worker/packages/generic/CHANGELOG.md +++ b/apps/worker/packages/generic/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @worker/generic + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @worker/generic diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index 7681ea6a..19ff3dd1 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.0", - "@sofie-package-manager/worker": "1.50.0-alpha.0" + "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/worker": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -25,4 +25,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/workforce/app/CHANGELOG.md b/apps/workforce/app/CHANGELOG.md index e995a3ef..f3955794 100644 --- a/apps/workforce/app/CHANGELOG.md +++ b/apps/workforce/app/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @workforce/app + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @workforce/app diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index 5740e2b0..264ba752 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/app", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@workforce/generic": "1.50.0-alpha.0" + "@workforce/generic": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -28,4 +28,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/apps/workforce/packages/generic/CHANGELOG.md b/apps/workforce/packages/generic/CHANGELOG.md index 9a931a8b..b0f04c41 100644 --- a/apps/workforce/packages/generic/CHANGELOG.md +++ b/apps/workforce/packages/generic/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @workforce/generic + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @workforce/generic diff --git a/apps/workforce/packages/generic/package.json b/apps/workforce/packages/generic/package.json index c8a917bc..59632000 100644 --- a/apps/workforce/packages/generic/package.json +++ b/apps/workforce/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/generic", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.0", - "@sofie-package-manager/workforce": "1.50.0-alpha.0" + "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/workforce": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -25,4 +25,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/lerna.json b/lerna.json index 944024f4..c1acff97 100644 --- a/lerna.json +++ b/lerna.json @@ -4,7 +4,7 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.1", + "version": "1.50.0-alpha.2", "npmClient": "yarn", "useWorkspaces": true -} \ No newline at end of file +} diff --git a/shared/packages/api/CHANGELOG.md b/shared/packages/api/CHANGELOG.md index 70bec985..12e9b6bb 100644 --- a/shared/packages/api/CHANGELOG.md +++ b/shared/packages/api/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/sofie-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/sofie-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @sofie-package-manager/api diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index f3ce55f9..8d21336d 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/api", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "main": "dist/index", "types": "dist/index", "files": [ @@ -34,4 +34,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/shared/packages/expectationManager/CHANGELOG.md b/shared/packages/expectationManager/CHANGELOG.md index 3d2f1866..a522baef 100644 --- a/shared/packages/expectationManager/CHANGELOG.md +++ b/shared/packages/expectationManager/CHANGELOG.md @@ -3,6 +3,21 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/sofie-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @sofie-package-manager/expectation-manager diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index aef598ed..eee739d2 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -13,8 +13,8 @@ "node": ">=14.18.0" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.0", - "@sofie-package-manager/worker": "1.50.0-alpha.0", + "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/worker": "1.50.0-alpha.2", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, @@ -27,4 +27,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index 7868fbf3..a390e9a0 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Features + +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/sofie-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/sofie-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @sofie-package-manager/worker diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index 9ed2a4d0..67439062 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -18,7 +18,7 @@ "@types/tmp": "~0.2.2" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.0", + "@sofie-package-manager/api": "1.50.0-alpha.2", "abort-controller": "^3.0.0", "atem-connection": "^3.2.0", "chokidar": "^3.5.1", @@ -40,4 +40,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/shared/packages/workforce/CHANGELOG.md b/shared/packages/workforce/CHANGELOG.md index 42964790..cdb0b91d 100644 --- a/shared/packages/workforce/CHANGELOG.md +++ b/shared/packages/workforce/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @sofie-package-manager/workforce + + + + + ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @sofie-package-manager/workforce diff --git a/shared/packages/workforce/package.json b/shared/packages/workforce/package.json index 0631ae30..0bee3d0a 100644 --- a/shared/packages/workforce/package.json +++ b/shared/packages/workforce/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/workforce", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.2", "main": "dist/index", "types": "dist/index", "files": [ @@ -13,7 +13,7 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.0" + "@sofie-package-manager/api": "1.50.0-alpha.2" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { @@ -27,4 +27,4 @@ "eslint" ] } -} \ No newline at end of file +} diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index a6c1c1c3..c2d5e890 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @tests/internal-tests + + + + + # [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index 28278832..53c593b1 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.1", + "version": "1.50.0-alpha.2", "description": "Internal tests", "private": true, "scripts": { @@ -14,12 +14,12 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.1", - "@package-manager/generic": "1.50.0-alpha.0", - "@sofie-package-manager/api": "1.50.0-alpha.0", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.0", - "@sofie-package-manager/worker": "1.50.0-alpha.0", - "@sofie-package-manager/workforce": "1.50.0-alpha.0", + "@http-server/generic": "1.50.0-alpha.2", + "@package-manager/generic": "1.50.0-alpha.2", + "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.2", + "@sofie-package-manager/worker": "1.50.0-alpha.2", + "@sofie-package-manager/workforce": "1.50.0-alpha.2", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" }, @@ -35,4 +35,4 @@ "eslint" ] } -} \ No newline at end of file +} From 8d0eb29e2add77586737b38db7aa2e400647bcaa Mon Sep 17 00:00:00 2001 From: Jan Starzak Date: Thu, 22 Jun 2023 15:49:41 +0200 Subject: [PATCH 13/54] chore: remove "useWorkspaces" from lerna.json --- lerna.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lerna.json b/lerna.json index c1acff97..bbc963f4 100644 --- a/lerna.json +++ b/lerna.json @@ -5,6 +5,5 @@ "tests/**" ], "version": "1.50.0-alpha.2", - "npmClient": "yarn", - "useWorkspaces": true -} + "npmClient": "yarn" +} \ No newline at end of file From b759978e1a4d9ef2e76db63e920b6857543a826d Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Wed, 14 Jun 2023 15:55:30 +0100 Subject: [PATCH 14/54] chore: server-core-integration usage cleanup --- .../packages/generic/src/connector.ts | 4 -- .../packages/generic/src/coreHandler.ts | 64 ++++--------------- apps/single-app/app/src/singleApp.ts | 2 - 3 files changed, 13 insertions(+), 57 deletions(-) diff --git a/apps/package-manager/packages/generic/src/connector.ts b/apps/package-manager/packages/generic/src/connector.ts index b9f36372..4c61154a 100644 --- a/apps/package-manager/packages/generic/src/connector.ts +++ b/apps/package-manager/packages/generic/src/connector.ts @@ -119,10 +119,6 @@ export class Connector { return } } - /** Do a self-test. Throws if something is not working as it should */ - public checkIfWorking(): void { - this.coreHandler.checkIfWorking() - } private async initFileWatcher(packageManagerHandler: PackageManagerHandler): Promise { const fileName = path.join(process.cwd(), './expectedPackages.json') diff --git a/apps/package-manager/packages/generic/src/coreHandler.ts b/apps/package-manager/packages/generic/src/coreHandler.ts index cdd1308f..c158ed2c 100644 --- a/apps/package-manager/packages/generic/src/coreHandler.ts +++ b/apps/package-manager/packages/generic/src/coreHandler.ts @@ -19,8 +19,6 @@ import { import { DeviceConfig } from './connector' -import fs from 'fs' -import path from 'path' import { LoggerInstance, PackageManagerConfig, @@ -98,7 +96,7 @@ export class CoreHandler { this.processHandler = processHandler - this.core = new CoreConnection(this.getCoreConnectionOptions('Package manager', 'PackageManager')) + this.core = new CoreConnection(this.getCoreConnectionOptions()) this.core.onConnected(() => { this.logger.info('Core Connected!') @@ -150,9 +148,7 @@ export class CoreHandler { this.logger.info('DeviceId: ' + this.core.deviceId) await Promise.all([ this.core.autoSubscribe('peripheralDeviceForDevice', this.core.deviceId), - this.core.autoSubscribe('studioOfDevice', this.core.deviceId), this.core.autoSubscribe('expectedPackagesForDevice', this.core.deviceId, undefined), - // this.core.autoSubscribe('timelineForDevice', this.core.deviceId), this.core.autoSubscribe('peripheralDeviceCommands', this.core.deviceId), ]) @@ -184,7 +180,8 @@ export class CoreHandler { await this.updateCoreStatus() await this.core.destroy() } - getCoreConnectionOptions(name: string, subDeviceId: string): CoreOptions { + getCoreConnectionOptions(): CoreOptions { + const subDeviceId = 'PackageManager' let credentials: CoreCredentials if (this._deviceOptions.deviceId && this._deviceOptions.deviceToken) { @@ -207,14 +204,14 @@ export class CoreHandler { deviceCategory: PeripheralDeviceAPI.PeripheralDeviceCategory.PACKAGE_MANAGER, deviceType: PeripheralDeviceAPI.PeripheralDeviceType.PACKAGE_MANAGER, - deviceName: name, + deviceName: 'Package manager', watchDog: this._coreConfig ? this._coreConfig.watchdog : true, configManifest: PACKAGE_MANAGER_DEVICE_CONFIG, documentationUrl: 'https://github.com/nrkno/sofie-package-manager', - versions: this._getVersions().versions, + versions: this._getVersions(), } return options } @@ -346,7 +343,6 @@ export class CoreHandler { } private setupObserverForPeripheralDeviceCommands(): void { const observer = this.core.observe('peripheralDeviceCommands') - this.killProcess(0) this._observers.push(observer) const addedChangedCommand = (id: string) => { @@ -378,16 +374,12 @@ export class CoreHandler { } }) } - killProcess(actually: number): boolean { - if (actually === 1) { - this.logger.info('KillProcess command received, shutting down in 1000ms!') - setTimeout(() => { - // eslint-disable-next-line no-process-exit - process.exit(0) - }, 1000) - return true - } - return false + killProcess(): void { + this.logger.info('KillProcess command received, shutting down in 1000ms!') + setTimeout(() => { + // eslint-disable-next-line no-process-exit + process.exit(0) + }, 1000) } pingResponse(message: string): void { this.core.setPingResponse(message) @@ -405,10 +397,6 @@ export class CoreHandler { this.statuses = statuses await this.updateCoreStatus() } - /** Do a self-test. Throws if something is not working as it should */ - public checkIfWorking(): void { - if (this._getVersions().hadError) throw new Error('Error in getVersions()') - } private async updateCoreStatus(): Promise { let statusCode = SofieStatusCode.GOOD const messages: Array = [] @@ -441,38 +429,12 @@ export class CoreHandler { }) } } - private _getVersions(): { - hadError: boolean - versions: { [packageName: string]: string } - } { - let hadError = false + private _getVersions(): { [packageName: string]: string } { const versions: { [packageName: string]: string } = {} - const entrypointDir = path.dirname((require as any).main.filename) - versions['_process'] = process.env.npm_package_version || packageJson?.version || 'N/A' - const dirNames = ['@sofie-automation/server-core-integration'] - try { - const nodeModulesDirectories = fs.readdirSync(path.join(entrypointDir, '../node_modules')) - for (const dir of nodeModulesDirectories) { - try { - if (dirNames.includes(dir)) { - let file = path.join(entrypointDir, '../node_modules', dir, 'package.json') - file = fs.readFileSync(file, 'utf8') - const json = JSON.parse(file) - versions[dir] = json.version || 'N/A' - } - } catch (e) { - this.logger.error(`Error in _getVersions, dir "${dir}": ${stringifyError(e)}`) - hadError = true - } - } - } catch (e) { - this.logger.error(`Error in _getVersions: ${stringifyError(e)}`) - hadError = true - } - return { hadError, versions } + return versions } restartExpectation(workId: string): void { diff --git a/apps/single-app/app/src/singleApp.ts b/apps/single-app/app/src/singleApp.ts index ddc5dff3..8867ed82 100644 --- a/apps/single-app/app/src/singleApp.ts +++ b/apps/single-app/app/src/singleApp.ts @@ -64,8 +64,6 @@ export async function startSingleApp(): Promise { await quantelHTTPTransformerProxy.init() } - connector.checkIfWorking() - logger.info('Initializing Package Manager (and Expectation Manager)') // If this log line is changed, make sure that verify-build-win32.mjs is updated too. expectationManager.hookToWorkforce(workforce.getExpectationManagerHook()) await connector.init() From 281e5796a5356061d2cbdd08a0a88de757a4fbdd Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Fri, 16 Jun 2023 15:06:16 +0100 Subject: [PATCH 15/54] feat: subscribe to separated core collections SOFIE-1926 --- .../packages/generic/src/coreHandler.ts | 4 +- .../generic/src/generateExpectations/api.ts | 13 +- .../generateExpectations/nrk/expectations.ts | 21 ++- .../nrk/packageContainerExpectations.ts | 6 +- .../packages/generic/src/packageManager.ts | 133 +++++++++--------- shared/packages/api/src/inputApi.ts | 7 +- 6 files changed, 100 insertions(+), 84 deletions(-) diff --git a/apps/package-manager/packages/generic/src/coreHandler.ts b/apps/package-manager/packages/generic/src/coreHandler.ts index c158ed2c..b220e2eb 100644 --- a/apps/package-manager/packages/generic/src/coreHandler.ts +++ b/apps/package-manager/packages/generic/src/coreHandler.ts @@ -148,8 +148,10 @@ export class CoreHandler { this.logger.info('DeviceId: ' + this.core.deviceId) await Promise.all([ this.core.autoSubscribe('peripheralDeviceForDevice', this.core.deviceId), - this.core.autoSubscribe('expectedPackagesForDevice', this.core.deviceId, undefined), this.core.autoSubscribe('peripheralDeviceCommands', this.core.deviceId), + this.core.autoSubscribe('packageManagerPlayoutContext', this.core.deviceId), + this.core.autoSubscribe('packageManagerPackageContainers', this.core.deviceId), + this.core.autoSubscribe('packageManagerExpectedPackages', this.core.deviceId, undefined), ]) this.logger.info('Core: Subscriptions are set up!') diff --git a/apps/package-manager/packages/generic/src/generateExpectations/api.ts b/apps/package-manager/packages/generic/src/generateExpectations/api.ts index cab5f08c..9f0c899a 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/api.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/api.ts @@ -1,14 +1,19 @@ -import { ActivePlaylist, ActiveRundown, ExpectedPackageWrap, PackageContainers } from '../packageManager' +import { ExpectedPackageWrap, PackageContainers } from '../packageManager' import { PackageManagerSettings } from '../generated/options' import { Expectation, LoggerInstance, PackageContainerExpectation } from '@sofie-package-manager/api' +import { + PackageManagerActivePlaylist, + PackageManagerActiveRundown, + // eslint-disable-next-line node/no-extraneous-import +} from '@sofie-automation/shared-lib/dist/package-manager/publications' export interface GenerateExpectationApi { getExpectations: ( logger: LoggerInstance, managerId: string, packageContainers: PackageContainers, - _activePlaylist: ActivePlaylist, - activeRundowns: ActiveRundown[], + _activePlaylist: PackageManagerActivePlaylist | null, + activeRundowns: PackageManagerActiveRundown[], expectedPackages: ExpectedPackageWrap[], settings: PackageManagerSettings ) => { [id: string]: Expectation.Any } @@ -16,6 +21,6 @@ export interface GenerateExpectationApi { getPackageContainerExpectations: ( managerId: string, packageContainers: PackageContainers, - _activePlaylist: ActivePlaylist + _activePlaylist: PackageManagerActivePlaylist | null ) => { [id: string]: PackageContainerExpectation } } diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts index a77096af..9fb72a04 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts @@ -1,4 +1,4 @@ -import { ActivePlaylist, ActiveRundown, ExpectedPackageWrap, PackageContainers } from '../../packageManager' +import { ExpectedPackageWrap, PackageContainers } from '../../packageManager' import { PackageManagerSettings } from '../../generated/options' import { ExpectedPackage, PackageContainer, Expectation, hashObj, LoggerInstance } from '@sofie-package-manager/api' import { GenerateExpectation, PriorityMagnitude } from './types' @@ -19,14 +19,21 @@ import { } from './expectations-lib' import { getSmartbullExpectedPackages, shouldBeIgnored } from './smartbull' import { TEMPORARY_STORAGE_ID } from './lib' +import { + PackageManagerActivePlaylist, + PackageManagerActiveRundown, + // eslint-disable-next-line node/no-extraneous-import +} from '@sofie-automation/shared-lib/dist/package-manager/publications' +// eslint-disable-next-line node/no-extraneous-import +import { RundownId } from '@sofie-automation/shared-lib/dist/core/model/Ids' /** Generate and return the appropriate Expectations based on the provided expectedPackages */ export function getExpectations( logger: LoggerInstance, managerId: string, packageContainers: PackageContainers, - _activePlaylist: ActivePlaylist, - activeRundowns: ActiveRundown[], + _activePlaylist: PackageManagerActivePlaylist | null, + activeRundowns: PackageManagerActiveRundown[], expectedPackages: ExpectedPackageWrap[], settings: PackageManagerSettings ): { [id: string]: Expectation.Any } { @@ -46,7 +53,7 @@ export function getExpectations( return 0 }) // Prepare: - const activeRundownMap = new Map() + const activeRundownMap = new Map() for (const activeRundown of activeRundowns) { activeRundownMap.set(activeRundown._id, activeRundown) } @@ -353,7 +360,7 @@ function getCopyToTemporaryStorage( function addExpectation( logger: LoggerInstance, - activeRundownMap: Map, + activeRundownMap: Map, expectations: ExpectationCollection, packageWrap: ExpectedPackageWrap, exp: Expectation.Any @@ -391,13 +398,13 @@ function addExpectation( } /** Returns a priority for an expectation. */ function getPriority( - activeRundownMap: Map, + activeRundownMap: Map, packageWrap: ExpectedPackageWrap, exp: Expectation.Any ): number { // Returns the initial priority, based on the expectedPackage - const activeRundown: ActiveRundown | undefined = packageWrap.expectedPackage.rundownId + const activeRundown: PackageManagerActiveRundown | undefined = packageWrap.expectedPackage.rundownId ? activeRundownMap.get(packageWrap.expectedPackage.rundownId) : undefined diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/packageContainerExpectations.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/packageContainerExpectations.ts index 533b4ba9..aadbc091 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/packageContainerExpectations.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/packageContainerExpectations.ts @@ -1,6 +1,8 @@ -import { ActivePlaylist, PackageContainers } from '../../packageManager' +import { PackageContainers } from '../../packageManager' import { PackageContainerExpectation } from '@sofie-package-manager/api' import { SMARTBULL_STORAGE_ID, TEMPORARY_STORAGE_ID } from './lib' +// eslint-disable-next-line node/no-extraneous-import +import { PackageManagerActivePlaylist } from '@sofie-automation/shared-lib/dist/package-manager/publications' // Max age for untracked files const MAX_FILE_AGE = 30 * 24 * 3600 // 30 days @@ -8,7 +10,7 @@ const MAX_FILE_AGE = 30 * 24 * 3600 // 30 days export function getPackageContainerExpectations( managerId: string, packageContainers: PackageContainers, - _activePlaylist: ActivePlaylist + _activePlaylist: PackageManagerActivePlaylist | null ): { [id: string]: PackageContainerExpectation } { const o: { [id: string]: PackageContainerExpectation } = {} diff --git a/apps/package-manager/packages/generic/src/packageManager.ts b/apps/package-manager/packages/generic/src/packageManager.ts index 9ed56519..fe8f404c 100644 --- a/apps/package-manager/packages/generic/src/packageManager.ts +++ b/apps/package-manager/packages/generic/src/packageManager.ts @@ -2,9 +2,24 @@ import _ from 'underscore' import { CoreHandler } from './coreHandler' // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' -import { protectString, protectStringArray } from '@sofie-automation/server-core-integration' +import { + PackageManagerActivePlaylist, + PackageManagerActiveRundown, + PackageManagerExpectedPackage, + PackageManagerExpectedPackageBase, + PackageManagerPackageContainers, + PackageManagerPlayoutContext, + // eslint-disable-next-line node/no-extraneous-import +} from '@sofie-automation/shared-lib/dist/package-manager/publications' +import { + Observer, + PeripheralDeviceId, + protectString, + protectStringArray, +} from '@sofie-automation/server-core-integration' // eslint-disable-next-line node/no-extraneous-import import { UpdateExpectedPackageWorkStatusesChanges } from '@sofie-automation/shared-lib/dist/peripheralDevice/methodsAPI' +// eslint-disable-next-line node/no-extraneous-import import { ExpectationManager, ExpectationManagerCallbacks, @@ -51,7 +66,7 @@ export class PackageManagerHandler { } private _triggerUpdatedExpectedPackagesTimeout: NodeJS.Timeout | null = null public monitoredPackages: { - [monitorId: string]: ResultingExpectedPackage[] + [monitorId: string]: ExpectedPackageWrap[] } = {} settings: PackageManagerSettings = { delayRemoval: 0, @@ -61,7 +76,7 @@ export class PackageManagerHandler { private dataSnapshot: { updated: number - expectedPackages: ResultingExpectedPackage[] + expectedPackages: ExpectedPackageWrap[] packageContainers: PackageContainers expectations: { [id: string]: Expectation.Any @@ -169,17 +184,25 @@ export class PackageManagerHandler { if (this.coreHandler.notUsingCore) return // Abort if we are not using core this.logger.debug('Renewing observers') - const expectedPackagesObserver = this.coreHandler.observe('deviceExpectedPackages') - expectedPackagesObserver.added = () => { - this.triggerUpdatedExpectedPackages() - } - expectedPackagesObserver.changed = () => { - this.triggerUpdatedExpectedPackages() - } - expectedPackagesObserver.removed = () => { - this.triggerUpdatedExpectedPackages() + const triggerUpdateOnAnyChange = (observer: Observer) => { + observer.added = () => { + this.triggerUpdatedExpectedPackages() + } + observer.changed = () => { + this.triggerUpdatedExpectedPackages() + } + observer.removed = () => { + this.triggerUpdatedExpectedPackages() + } + this._observers.push(observer) } - this._observers.push(expectedPackagesObserver) + + const expectedPackagesObserver = this.coreHandler.observe('deviceExpectedPackages') + triggerUpdateOnAnyChange(expectedPackagesObserver) + + triggerUpdateOnAnyChange(this.coreHandler.observe('packageManagerPlayoutContext')) + triggerUpdateOnAnyChange(this.coreHandler.observe('packageManagerPackageContainers')) + triggerUpdateOnAnyChange(this.coreHandler.observe('packageManagerExpectedPackages')) } public triggerUpdatedExpectedPackages(): void { if (this._triggerUpdatedExpectedPackagesTimeout) { @@ -193,12 +216,8 @@ export class PackageManagerHandler { const expectedPackages: ExpectedPackageWrap[] = [] const packageContainers: PackageContainers = {} - let activePlaylist: ActivePlaylist = { - _id: '', - active: false, - rehearsal: false, - } - let activeRundowns: ActiveRundown[] = [] + let activePlaylist: PackageManagerActivePlaylist | null = null + let activeRundowns: PackageManagerActiveRundown[] = [] // Add from external data: { @@ -209,41 +228,32 @@ export class PackageManagerHandler { } if (!this.coreHandler.notUsingCore) { - const objs = this.coreHandler.getCollection('deviceExpectedPackages').find(() => true) + const playoutContextObj = this.coreHandler + .getCollection('packageManagerPlayoutContext') + .find()[0] + if (playoutContextObj) { + activePlaylist = playoutContextObj.activePlaylist + activeRundowns = playoutContextObj.activeRundowns + } else { + this.logger.warn(`packageManagerPlayoutContext collection object not found`) + return + } - const activePlaylistObj = objs.find((o) => o.type === 'active_playlist') - if (!activePlaylistObj) { - this.logger.warn(`Collection objects active_playlist not found`) - this.logger.info(`objs in deviceExpectedPackages:`, objs) + const packageContainersObj = this.coreHandler + .getCollection('packageManagerPackageContainers') + .find()[0] + if (packageContainersObj) { + Object.assign(packageContainers, packageContainersObj.packageContainers) + } else { + this.logger.warn(`packageManagerPackageContainers collection object not found`) return } - activePlaylist = activePlaylistObj.activeplaylist as ActivePlaylist - activeRundowns = activePlaylistObj.activeRundowns as ActiveRundown[] // Add from Core collections: - { - const expectedPackageObjs = objs.filter((o) => o.type === 'expected_packages') - - if (!expectedPackageObjs.length) { - this.logger.warn(`Collection objects expected_packages not found`) - this.logger.info(`objs in deviceExpectedPackages:`, objs) - return - } - for (const expectedPackageObj of expectedPackageObjs) { - for (const expectedPackage of expectedPackageObj.expectedPackages) { - // Note: There might be duplicates of packages here, to be deduplicated later - expectedPackages.push(expectedPackage) - } - } - - const packageContainerObj = objs.find((o) => o.type === 'package_containers') - if (!packageContainerObj) { - this.logger.warn(`Collection objects package_containers not found`) - this.logger.info(`objs in deviceExpectedPackages:`, objs) - return - } - Object.assign(packageContainers, packageContainerObj.packageContainers as PackageContainers) - } + const expectedPackagesObjs = this.coreHandler + .getCollection('packageManagerExpectedPackages') + .find() + expectedPackages.push(...expectedPackagesObjs) } // Add from Monitors: @@ -261,8 +271,8 @@ export class PackageManagerHandler { private handleExpectedPackages( packageContainers: PackageContainers, - activePlaylist: ActivePlaylist, - activeRundowns: ActiveRundown[], + activePlaylist: PackageManagerActivePlaylist | null, + activeRundowns: PackageManagerActiveRundown[], expectedPackages: ExpectedPackageWrap[] ) { @@ -1011,7 +1021,7 @@ export function wrapExpectedPackage( priority: 999, // Default: lowest priority sources: combinedSources, targets: combinedTargets, - playoutDeviceId: '', + playoutDeviceId: null, external: true, } } @@ -1041,33 +1051,20 @@ export function deleteAllUndefinedProperties(o } } -interface ResultingExpectedPackage { - // This interface is copied from Core - - expectedPackage: ExpectedPackage.Base & { rundownId?: string } +export interface ExpectedPackageWrap { + expectedPackage: PackageManagerExpectedPackageBase /** Lower should be done first */ priority: number sources: PackageContainerOnPackage[] targets: PackageContainerOnPackage[] - playoutDeviceId: string + playoutDeviceId: PeripheralDeviceId | null /** If set to true, this doesn't come from Core */ external?: boolean // playoutLocation: any // todo? } -export type ExpectedPackageWrap = ResultingExpectedPackage export type PackageContainers = { [containerId: string]: PackageContainer } -export interface ActivePlaylist { - _id: string - active: boolean - rehearsal: boolean -} -export interface ActiveRundown { - _id: string - _rank: number -} - type ReportStatuses = { [key: string]: ReportStatus } diff --git a/shared/packages/api/src/inputApi.ts b/shared/packages/api/src/inputApi.ts index f6bea15b..9e5efb66 100644 --- a/shared/packages/api/src/inputApi.ts +++ b/shared/packages/api/src/inputApi.ts @@ -80,15 +80,18 @@ export namespace ExpectedPackage { /** The sideEffect is used by the Package Manager to generate extra artifacts, such as thumbnails & previews */ sideEffect: { /** Which container previews are to be put into */ - previewContainerId?: string | null + previewContainerId?: string | null // null is used to disable the sideEffect previewPackageSettings?: SideEffectPreviewSettings | null /** Which container thumbnails are to be put into */ - thumbnailContainerId?: string | null + thumbnailContainerId?: string | null // null is used to disable the sideEffect thumbnailPackageSettings?: SideEffectThumbnailSettings | null /** Should the package be scanned for loudness */ loudnessPackageSettings?: SideEffectLoudnessSettings + + /** Other custom configuration */ + [key: string]: any } } export interface SideEffectPreviewSettings { From 765a1b77f155548997287f069ea0989a4362b06c Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Tue, 27 Jun 2023 15:02:51 +0100 Subject: [PATCH 16/54] chore: update @sofie-automation/server-core-integration --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 24677fca..5d9d2c1e 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "node": ">=12.11.0" }, "dependencies": { - "@sofie-automation/server-core-integration": "1.50.0-nightly-release50-20230615-121624-0fe1787.0" + "@sofie-automation/server-core-integration": "1.50.0-nightly-release50-20230627-124025-83abcdc.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "lint-staged": { diff --git a/yarn.lock b/yarn.lock index 41fdc2a9..3c70b941 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1283,12 +1283,12 @@ semver "^7.3.8" shelljs "^0.8.5" -"@sofie-automation/server-core-integration@1.50.0-nightly-release50-20230615-121624-0fe1787.0": - version "1.50.0-nightly-release50-20230615-121624-0fe1787.0" - resolved "https://registry.yarnpkg.com/@sofie-automation/server-core-integration/-/server-core-integration-1.50.0-nightly-release50-20230615-121624-0fe1787.0.tgz#e0deaa2b5e1b925eb59fac4f01ac9e77e81980b6" - integrity sha512-dF5zZEeBbgsBZOLPkJQePgWsasi3OX/kPFI4PONtD5ixsg+jAOH/i6hQy7ywjeWtvQsiUK5H6E3uzUmBpEiSHA== +"@sofie-automation/server-core-integration@1.50.0-nightly-release50-20230627-124025-83abcdc.0": + version "1.50.0-nightly-release50-20230627-124025-83abcdc.0" + resolved "https://registry.yarnpkg.com/@sofie-automation/server-core-integration/-/server-core-integration-1.50.0-nightly-release50-20230627-124025-83abcdc.0.tgz#90cf6f79dfe5095cd6c0b6c4933462ad63ee6d0f" + integrity sha512-XkWnhtzwXpY1bO/ILxtgEm94BiYQI+q69kuHcGZ2rlA8MpE8gkYnEUpDEeokjpAMN2WDreYihAq/CQX8UMgvfg== dependencies: - "@sofie-automation/shared-lib" "1.50.0-nightly-release50-20230615-121624-0fe1787.0" + "@sofie-automation/shared-lib" "1.50.0-nightly-release50-20230627-124025-83abcdc.0" ejson "^2.2.3" eventemitter3 "^4.0.7" faye-websocket "^0.11.4" @@ -1296,10 +1296,10 @@ tslib "^2.4.0" underscore "^1.13.4" -"@sofie-automation/shared-lib@1.50.0-nightly-release50-20230615-121624-0fe1787.0": - version "1.50.0-nightly-release50-20230615-121624-0fe1787.0" - resolved "https://registry.yarnpkg.com/@sofie-automation/shared-lib/-/shared-lib-1.50.0-nightly-release50-20230615-121624-0fe1787.0.tgz#b1559053d8ef8b56f120293ccb30adb37ecea313" - integrity sha512-/oYawa6y/3JIwNo+a+T/OG/6nV4x31wrfMCGrq4Ud4ZU1LGgaR0l2klJlto9K54cF8K/aIPHtP45li+sf9aDkQ== +"@sofie-automation/shared-lib@1.50.0-nightly-release50-20230627-124025-83abcdc.0": + version "1.50.0-nightly-release50-20230627-124025-83abcdc.0" + resolved "https://registry.yarnpkg.com/@sofie-automation/shared-lib/-/shared-lib-1.50.0-nightly-release50-20230627-124025-83abcdc.0.tgz#4c559dd0dce1d73a4795f9ccafbba6f0ece26e0a" + integrity sha512-lCVxvMnJyKZfMaj2cfwZUw7xMLVL5/maraTdWaiH075qL1minK/JLpWl9h77pouZsNASzU64L1ZD/mcHuZ/rqw== dependencies: "@mos-connection/model" "^3.0.4" timeline-state-resolver-types "8.0.0-nightly-release50-20230615-051635-c51460271.0" From dce2bcefc4aef4614b3301d4f51276cdf2680a75 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Tue, 27 Jun 2023 15:11:29 +0100 Subject: [PATCH 17/54] chore: fix tests --- .../nrk/__tests__/nrk.spec.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/__tests__/nrk.spec.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/__tests__/nrk.spec.ts index 6e9725bc..8454c0a8 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/__tests__/nrk.spec.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/__tests__/nrk.spec.ts @@ -1,13 +1,13 @@ import { Accessor, Expectation, ExpectedPackage, literal, LoggerInstance } from '@sofie-package-manager/api' -import * as NRK from '..' import { - ActivePlaylist, - ActiveRundown, - ExpectedPackageWrap, - PackageContainers, - wrapExpectedPackage, -} from '../../../packageManager' + PackageManagerActivePlaylist, + PackageManagerActiveRundown, + // eslint-disable-next-line node/no-extraneous-import +} from '@sofie-automation/shared-lib/dist/package-manager/publications' +import * as NRK from '..' +import { ExpectedPackageWrap, PackageContainers, wrapExpectedPackage } from '../../../packageManager' import { PackageManagerSettings } from '../../../generated/options' +import { protectString } from '@sofie-automation/server-core-integration' describe('Generate expectations - NRK', () => { test('Wrap package', () => { @@ -195,22 +195,22 @@ function setup() { } as any as LoggerInstance const managerId = 'mockManager' // const packageContainers: PackageContainers, - const activePlaylist: ActivePlaylist = { - _id: 'playlist', + const activePlaylist: PackageManagerActivePlaylist = { + _id: protectString('playlist'), active: true, rehearsal: false, } - const activeRundowns: ActiveRundown[] = [ + const activeRundowns: PackageManagerActiveRundown[] = [ { - _id: 'rundown0', + _id: protectString('rundown0'), _rank: 0, }, { - _id: 'rundown1', + _id: protectString('rundown1'), _rank: 1, }, { - _id: 'rundown2', + _id: protectString('rundown2'), _rank: 2, }, ] @@ -350,7 +350,7 @@ function wrap( if (externalProps) { // default: wrapped.external = false - wrapped.playoutDeviceId = 'device0' + wrapped.playoutDeviceId = protectString('device0') if (typeof externalProps === 'object') { wrapped = { From add5a7fd702fde39efbec6ed774d301394c0482c Mon Sep 17 00:00:00 2001 From: Jan Starzak Date: Wed, 28 Jun 2023 12:28:35 +0200 Subject: [PATCH 18/54] v1.50.0-alpha.3 --- CHANGELOG.md | 11 +++++++++++ apps/appcontainer-node/app/CHANGELOG.md | 8 ++++++++ apps/appcontainer-node/app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 6 +++--- apps/http-server/app/CHANGELOG.md | 8 ++++++++ apps/http-server/app/package.json | 4 ++-- apps/http-server/packages/generic/CHANGELOG.md | 8 ++++++++ apps/http-server/packages/generic/package.json | 4 ++-- apps/package-manager/app/CHANGELOG.md | 8 ++++++++ apps/package-manager/app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 11 +++++++++++ .../packages/generic/package.json | 8 ++++---- .../app/CHANGELOG.md | 8 ++++++++ .../app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 4 ++-- apps/single-app/app/CHANGELOG.md | 8 ++++++++ apps/single-app/app/package.json | 16 ++++++++-------- apps/worker/app/CHANGELOG.md | 8 ++++++++ apps/worker/app/package.json | 4 ++-- apps/worker/packages/generic/CHANGELOG.md | 8 ++++++++ apps/worker/packages/generic/package.json | 6 +++--- apps/workforce/app/CHANGELOG.md | 8 ++++++++ apps/workforce/app/package.json | 4 ++-- apps/workforce/packages/generic/CHANGELOG.md | 8 ++++++++ apps/workforce/packages/generic/package.json | 6 +++--- lerna.json | 4 ++-- shared/packages/api/CHANGELOG.md | 11 +++++++++++ shared/packages/api/package.json | 2 +- shared/packages/expectationManager/CHANGELOG.md | 8 ++++++++ shared/packages/expectationManager/package.json | 6 +++--- shared/packages/worker/CHANGELOG.md | 8 ++++++++ shared/packages/worker/package.json | 4 ++-- shared/packages/workforce/CHANGELOG.md | 8 ++++++++ shared/packages/workforce/package.json | 4 ++-- tests/internal-tests/CHANGELOG.md | 8 ++++++++ tests/internal-tests/package.json | 14 +++++++------- 38 files changed, 215 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab81bc35..7df753f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/appcontainer-node/app/CHANGELOG.md b/apps/appcontainer-node/app/CHANGELOG.md index 8a955b6c..884b172b 100644 --- a/apps/appcontainer-node/app/CHANGELOG.md +++ b/apps/appcontainer-node/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @appcontainer-node/app + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index 27487a6f..cce5b59b 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.2" + "@appcontainer-node/generic": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/appcontainer-node/packages/generic/CHANGELOG.md b/apps/appcontainer-node/packages/generic/CHANGELOG.md index ef103468..c8544ad3 100644 --- a/apps/appcontainer-node/packages/generic/CHANGELOG.md +++ b/apps/appcontainer-node/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @appcontainer-node/generic + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index 861cac4f..cad97d17 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.2", - "@sofie-package-manager/worker": "1.50.0-alpha.2", + "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/worker": "1.50.0-alpha.3", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/apps/http-server/app/CHANGELOG.md b/apps/http-server/app/CHANGELOG.md index b0ebd5f9..e8e699e7 100644 --- a/apps/http-server/app/CHANGELOG.md +++ b/apps/http-server/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @http-server/app + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index e887c6ed..a74187aa 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.2" + "@http-server/generic": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/http-server/packages/generic/CHANGELOG.md b/apps/http-server/packages/generic/CHANGELOG.md index 586c7476..0caa1aeb 100644 --- a/apps/http-server/packages/generic/CHANGELOG.md +++ b/apps/http-server/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @http-server/generic + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index 66d0b5ba..3a145ce3 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/api": "1.50.0-alpha.3", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", diff --git a/apps/package-manager/app/CHANGELOG.md b/apps/package-manager/app/CHANGELOG.md index 79973ba9..c481e213 100644 --- a/apps/package-manager/app/CHANGELOG.md +++ b/apps/package-manager/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @package-manager/app + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index 8b1d3ffe..8680450e 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@package-manager/generic": "1.50.0-alpha.2" + "@package-manager/generic": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/package-manager/packages/generic/CHANGELOG.md b/apps/package-manager/packages/generic/CHANGELOG.md index fc9f2560..76aa3f24 100644 --- a/apps/package-manager/packages/generic/CHANGELOG.md +++ b/apps/package-manager/packages/generic/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/sofie-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index 8fd321e7..786716e7 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,9 +13,9 @@ "@sofie-automation/server-core-integration": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.2", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.2", - "@sofie-package-manager/worker": "1.50.0-alpha.2", + "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.3", + "@sofie-package-manager/worker": "1.50.0-alpha.3", "chokidar": "^3.5.1", "data-store": "^4.0.3", "deep-extend": "^0.6.0", diff --git a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md index fadeca6a..666fbba9 100644 --- a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/app + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index a9bd118a..bb301b01 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.2" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md index c876326a..882dea8c 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/generic + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index e1864993..8ccf2f7c 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,7 +12,7 @@ "dependencies": { "@koa/cors": "^4.0.0", "@koa/multer": "3.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/api": "1.50.0-alpha.3", "got": "^11.8.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index c672879d..1784dd8a 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @single-app/app + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index 167d2631..97716eca 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -14,13 +14,13 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.2", - "@http-server/generic": "1.50.0-alpha.2", - "@package-manager/generic": "1.50.0-alpha.2", - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.2", - "@sofie-package-manager/api": "1.50.0-alpha.2", - "@sofie-package-manager/worker": "1.50.0-alpha.2", - "@sofie-package-manager/workforce": "1.50.0-alpha.2", + "@appcontainer-node/generic": "1.50.0-alpha.3", + "@http-server/generic": "1.50.0-alpha.3", + "@package-manager/generic": "1.50.0-alpha.3", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.3", + "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/worker": "1.50.0-alpha.3", + "@sofie-package-manager/workforce": "1.50.0-alpha.3", "underscore": "^1.12.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", diff --git a/apps/worker/app/CHANGELOG.md b/apps/worker/app/CHANGELOG.md index c01dc617..1294481a 100644 --- a/apps/worker/app/CHANGELOG.md +++ b/apps/worker/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @worker/app + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 2819680f..0c9310ee 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "description": "Boilerplace", "private": true, "scripts": { @@ -15,7 +15,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@worker/generic": "1.50.0-alpha.2" + "@worker/generic": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/worker/packages/generic/CHANGELOG.md b/apps/worker/packages/generic/CHANGELOG.md index a2401fef..87a208da 100644 --- a/apps/worker/packages/generic/CHANGELOG.md +++ b/apps/worker/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @worker/generic + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index 19ff3dd1..b597b169 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.2", - "@sofie-package-manager/worker": "1.50.0-alpha.2" + "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/worker": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/app/CHANGELOG.md b/apps/workforce/app/CHANGELOG.md index f3955794..7e687591 100644 --- a/apps/workforce/app/CHANGELOG.md +++ b/apps/workforce/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @workforce/app + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index 264ba752..ec9bcfad 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/app", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@workforce/generic": "1.50.0-alpha.2" + "@workforce/generic": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/packages/generic/CHANGELOG.md b/apps/workforce/packages/generic/CHANGELOG.md index b0f04c41..47e1a570 100644 --- a/apps/workforce/packages/generic/CHANGELOG.md +++ b/apps/workforce/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @workforce/generic + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/apps/workforce/packages/generic/package.json b/apps/workforce/packages/generic/package.json index 59632000..4f285f9f 100644 --- a/apps/workforce/packages/generic/package.json +++ b/apps/workforce/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/generic", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.2", - "@sofie-package-manager/workforce": "1.50.0-alpha.2" + "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/workforce": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/lerna.json b/lerna.json index bbc963f4..e64aa925 100644 --- a/lerna.json +++ b/lerna.json @@ -4,6 +4,6 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "npmClient": "yarn" -} \ No newline at end of file +} diff --git a/shared/packages/api/CHANGELOG.md b/shared/packages/api/CHANGELOG.md index 12e9b6bb..db098271 100644 --- a/shared/packages/api/CHANGELOG.md +++ b/shared/packages/api/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/sofie-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index 8d21336d..d5ec48bf 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/api", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "main": "dist/index", "types": "dist/index", "files": [ diff --git a/shared/packages/expectationManager/CHANGELOG.md b/shared/packages/expectationManager/CHANGELOG.md index a522baef..301562f5 100644 --- a/shared/packages/expectationManager/CHANGELOG.md +++ b/shared/packages/expectationManager/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @sofie-package-manager/expectation-manager + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index eee739d2..c2100c4b 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -13,8 +13,8 @@ "node": ">=14.18.0" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.2", - "@sofie-package-manager/worker": "1.50.0-alpha.2", + "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/worker": "1.50.0-alpha.3", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index a390e9a0..45a0a4f3 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @sofie-package-manager/worker + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index 67439062..3e003c01 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -18,7 +18,7 @@ "@types/tmp": "~0.2.2" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.2", + "@sofie-package-manager/api": "1.50.0-alpha.3", "abort-controller": "^3.0.0", "atem-connection": "^3.2.0", "chokidar": "^3.5.1", diff --git a/shared/packages/workforce/CHANGELOG.md b/shared/packages/workforce/CHANGELOG.md index cdb0b91d..b96c0684 100644 --- a/shared/packages/workforce/CHANGELOG.md +++ b/shared/packages/workforce/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @sofie-package-manager/workforce + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/shared/packages/workforce/package.json b/shared/packages/workforce/package.json index 0bee3d0a..210401e8 100644 --- a/shared/packages/workforce/package.json +++ b/shared/packages/workforce/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/workforce", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "main": "dist/index", "types": "dist/index", "files": [ @@ -13,7 +13,7 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.2" + "@sofie-package-manager/api": "1.50.0-alpha.3" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index c2d5e890..0c3dc6fb 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + +**Note:** Version bump only for package @tests/internal-tests + + + + + # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index 53c593b1..4060b605 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.2", + "version": "1.50.0-alpha.3", "description": "Internal tests", "private": true, "scripts": { @@ -14,12 +14,12 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.2", - "@package-manager/generic": "1.50.0-alpha.2", - "@sofie-package-manager/api": "1.50.0-alpha.2", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.2", - "@sofie-package-manager/worker": "1.50.0-alpha.2", - "@sofie-package-manager/workforce": "1.50.0-alpha.2", + "@http-server/generic": "1.50.0-alpha.3", + "@package-manager/generic": "1.50.0-alpha.3", + "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.3", + "@sofie-package-manager/worker": "1.50.0-alpha.3", + "@sofie-package-manager/workforce": "1.50.0-alpha.3", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" }, From 10e574757bcdd86a2a5aa9dade2ed34b5d0984f9 Mon Sep 17 00:00:00 2001 From: Alex Van Camp Date: Wed, 5 Jul 2023 09:58:20 -0500 Subject: [PATCH 19/54] feat: generate audio waveform images for audio-only files (and don't try to generate previews for them) --- .../windowsWorker/expectationHandlers/lib.ts | 13 ++++++++--- .../expectationHandlers/mediaFilePreview.ts | 22 +++++++++++++++++++ .../expectationHandlers/mediaFileThumbnail.ts | 13 ++++++++++- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts index cf8e9ae0..328adbfd 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts @@ -338,14 +338,21 @@ interface ThumbnailMetadata { } } /** Returns arguments for FFMpeg to generate a thumbnail image file */ -export function thumbnailFFMpegArguments(input: string, metadata: ThumbnailMetadata, seekTimeCode?: string): string[] { +export function thumbnailFFMpegArguments( + input: string, + metadata: ThumbnailMetadata, + seekTimeCode?: string, + hasVideoStream?: boolean +): string[] { return [ '-hide_banner', - seekTimeCode ? `-ss ${seekTimeCode}` : undefined, + hasVideoStream && seekTimeCode ? `-ss ${seekTimeCode}` : undefined, `-i "${input}"`, `-f image2`, '-frames:v 1', - `-vf ${!seekTimeCode ? 'thumbnail,' : ''}scale=${metadata.version.width}:${metadata.version.height}`, + hasVideoStream + ? `-vf ${!seekTimeCode ? 'thumbnail,' : ''}scale=${metadata.version.width}:${metadata.version.height}` // Creates a thumbnail of the video. + : '-filter_complex "showwavespic=s=640x240:split_channels=1"', // Creates an image of the audio waveform. '-threads 1', ].filter(Boolean) as string[] // remove undefined values } diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index a7b27c84..353b4f49 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -28,6 +28,8 @@ import { } from './lib' import { FFMpegProcess, spawnFFMpeg } from './lib/ffmpeg' import { WindowsWorker } from '../windowsWorker' +import { scanWithFFProbe, FFProbeScanResult } from './lib/scan' +import { CancelablePromise } from '../../../lib/cancelablePromise' /** * Generates a low-res preview video of a source video file, and stores the resulting file into the target PackageContainer @@ -178,9 +180,11 @@ export const MediaFilePreview: ExpectationWindowsHandler = { throw new Error(`Target AccessHandler type is wrong`) let ffMpegProcess: FFMpegProcess | undefined + let ffProbeProcess: CancelablePromise | undefined const workInProgress = new WorkInProgress({ workLabel: 'Generating preview' }, async () => { // On cancel ffMpegProcess?.cancel() + ffProbeProcess?.cancel() }).do(async () => { const tryReadPackage = await sourceHandle.checkPackageReadAccess() if (!tryReadPackage.success) throw new Error(tryReadPackage.reason.tech) @@ -220,6 +224,24 @@ export const MediaFilePreview: ExpectationWindowsHandler = { throw new Error(`Unsupported Target AccessHandler`) } + // Scan with FFProbe: + ffProbeProcess = scanWithFFProbe(sourceHandle) + const ffProbeScan: FFProbeScanResult = await ffProbeProcess + ffProbeProcess = undefined + const hasVideoStream = + ffProbeScan.streams && ffProbeScan.streams.some((stream) => stream.codec_type === 'video') + if (!hasVideoStream) { + workInProgress._reportComplete( + actualSourceVersionHash, + { + user: `Preview generation skipped due to file having no video streams`, + tech: `Completed at ${Date.now()}`, + }, + undefined + ) + return + } + const args = previewFFMpegArguments(inputPath, true, metadata) const fileOperation = await targetHandle.prepareForOperation('Generate preview', lookupSource.handle) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts index ea6f9344..2a5020e4 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts @@ -29,6 +29,8 @@ import { } from './lib' import { FFMpegProcess, spawnFFMpeg } from './lib/ffmpeg' import { WindowsWorker } from '../windowsWorker' +import { CancelablePromise } from '../../../lib/cancelablePromise' +import { scanWithFFProbe, FFProbeScanResult } from './lib/scan' /** * Generates a thumbnail image from a source video file, and stores the resulting file into the target PackageContainer @@ -148,9 +150,11 @@ export const MediaFileThumbnail: ExpectationWindowsHandler = { if (!lookupTarget.ready) throw new Error(`Can't start working due to target: ${lookupTarget.reason.tech}`) let ffMpegProcess: FFMpegProcess | undefined + let ffProbeProcess: CancelablePromise | undefined const workInProgress = new WorkInProgress({ workLabel: 'Generating thumbnail' }, async () => { // On cancel ffMpegProcess?.cancel() + ffProbeProcess?.cancel() }).do(async () => { if ( (lookupSource.accessor.type === Accessor.AccessType.LOCAL_FOLDER || @@ -220,8 +224,15 @@ export const MediaFileThumbnail: ExpectationWindowsHandler = { throw new Error(`Unsupported Target AccessHandler`) } + // Scan with FFProbe: + ffProbeProcess = scanWithFFProbe(sourceHandle) + const ffProbeScan: FFProbeScanResult = await ffProbeProcess + ffProbeProcess = undefined + const hasVideoStream = + ffProbeScan.streams && ffProbeScan.streams.some((stream) => stream.codec_type === 'video') + // Use FFMpeg to generate the thumbnail: - const args = thumbnailFFMpegArguments(inputPath, metadata, seekTimeCode) + const args = thumbnailFFMpegArguments(inputPath, metadata, seekTimeCode, hasVideoStream) const fileOperation = await targetHandle.prepareForOperation('Generate thumbnail', lookupSource.handle) From f7a9dc5255049271b5e4b1c58bc901300867708b Mon Sep 17 00:00:00 2001 From: Alex Van Camp Date: Wed, 5 Jul 2023 10:32:41 -0500 Subject: [PATCH 20/54] fix: don't error when trying to generate a preview for an audio-only file --- .../expectationHandlers/mediaFilePreview.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index a7b27c84..353b4f49 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -28,6 +28,8 @@ import { } from './lib' import { FFMpegProcess, spawnFFMpeg } from './lib/ffmpeg' import { WindowsWorker } from '../windowsWorker' +import { scanWithFFProbe, FFProbeScanResult } from './lib/scan' +import { CancelablePromise } from '../../../lib/cancelablePromise' /** * Generates a low-res preview video of a source video file, and stores the resulting file into the target PackageContainer @@ -178,9 +180,11 @@ export const MediaFilePreview: ExpectationWindowsHandler = { throw new Error(`Target AccessHandler type is wrong`) let ffMpegProcess: FFMpegProcess | undefined + let ffProbeProcess: CancelablePromise | undefined const workInProgress = new WorkInProgress({ workLabel: 'Generating preview' }, async () => { // On cancel ffMpegProcess?.cancel() + ffProbeProcess?.cancel() }).do(async () => { const tryReadPackage = await sourceHandle.checkPackageReadAccess() if (!tryReadPackage.success) throw new Error(tryReadPackage.reason.tech) @@ -220,6 +224,24 @@ export const MediaFilePreview: ExpectationWindowsHandler = { throw new Error(`Unsupported Target AccessHandler`) } + // Scan with FFProbe: + ffProbeProcess = scanWithFFProbe(sourceHandle) + const ffProbeScan: FFProbeScanResult = await ffProbeProcess + ffProbeProcess = undefined + const hasVideoStream = + ffProbeScan.streams && ffProbeScan.streams.some((stream) => stream.codec_type === 'video') + if (!hasVideoStream) { + workInProgress._reportComplete( + actualSourceVersionHash, + { + user: `Preview generation skipped due to file having no video streams`, + tech: `Completed at ${Date.now()}`, + }, + undefined + ) + return + } + const args = previewFFMpegArguments(inputPath, true, metadata) const fileOperation = await targetHandle.prepareForOperation('Generate preview', lookupSource.handle) From eec1da8ca5b03bc425f4a889adca15751276ae06 Mon Sep 17 00:00:00 2001 From: Alex Van Camp Date: Wed, 5 Jul 2023 10:35:06 -0500 Subject: [PATCH 21/54] chore: revert bug fix and focus only on feature --- .../expectationHandlers/mediaFilePreview.ts | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index 353b4f49..a7b27c84 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -28,8 +28,6 @@ import { } from './lib' import { FFMpegProcess, spawnFFMpeg } from './lib/ffmpeg' import { WindowsWorker } from '../windowsWorker' -import { scanWithFFProbe, FFProbeScanResult } from './lib/scan' -import { CancelablePromise } from '../../../lib/cancelablePromise' /** * Generates a low-res preview video of a source video file, and stores the resulting file into the target PackageContainer @@ -180,11 +178,9 @@ export const MediaFilePreview: ExpectationWindowsHandler = { throw new Error(`Target AccessHandler type is wrong`) let ffMpegProcess: FFMpegProcess | undefined - let ffProbeProcess: CancelablePromise | undefined const workInProgress = new WorkInProgress({ workLabel: 'Generating preview' }, async () => { // On cancel ffMpegProcess?.cancel() - ffProbeProcess?.cancel() }).do(async () => { const tryReadPackage = await sourceHandle.checkPackageReadAccess() if (!tryReadPackage.success) throw new Error(tryReadPackage.reason.tech) @@ -224,24 +220,6 @@ export const MediaFilePreview: ExpectationWindowsHandler = { throw new Error(`Unsupported Target AccessHandler`) } - // Scan with FFProbe: - ffProbeProcess = scanWithFFProbe(sourceHandle) - const ffProbeScan: FFProbeScanResult = await ffProbeProcess - ffProbeProcess = undefined - const hasVideoStream = - ffProbeScan.streams && ffProbeScan.streams.some((stream) => stream.codec_type === 'video') - if (!hasVideoStream) { - workInProgress._reportComplete( - actualSourceVersionHash, - { - user: `Preview generation skipped due to file having no video streams`, - tech: `Completed at ${Date.now()}`, - }, - undefined - ) - return - } - const args = previewFFMpegArguments(inputPath, true, metadata) const fileOperation = await targetHandle.prepareForOperation('Generate preview', lookupSource.handle) From 3f49920c21ace68bfe20c03caaf63b0e06534712 Mon Sep 17 00:00:00 2001 From: Alex Van Camp Date: Wed, 5 Jul 2023 15:35:26 -0500 Subject: [PATCH 22/54] chore: make the waveform image black and white --- .../src/worker/workers/windowsWorker/expectationHandlers/lib.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts index 328adbfd..7faf4c74 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts @@ -352,7 +352,7 @@ export function thumbnailFFMpegArguments( '-frames:v 1', hasVideoStream ? `-vf ${!seekTimeCode ? 'thumbnail,' : ''}scale=${metadata.version.width}:${metadata.version.height}` // Creates a thumbnail of the video. - : '-filter_complex "showwavespic=s=640x240:split_channels=1"', // Creates an image of the audio waveform. + : '-filter_complex "showwavespic=s=640x240:split_channels=1:colors=white"', // Creates an image of the audio waveform. '-threads 1', ].filter(Boolean) as string[] // remove undefined values } From db245bfca059bb33622512c8b4a6d828c80b9f7e Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 08:03:52 +0200 Subject: [PATCH 23/54] fix: update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor --- CHANGELOG.md | 2 - .../packages/generic/package.json | 3 + .../packages/generic/src/appContainer.ts | 183 +- .../packages/generic/src/workerAgentApi.ts | 2 + .../packages/generic/src/workforceApi.ts | 14 +- .../packages/generic/package.json | 3 +- .../packages/generic/src/connector.ts | 47 +- .../packages/generic/src/coreHandler.ts | 18 +- .../packages/generic/src/credentials.ts | 4 +- .../generic/src/generateExpectations/api.ts | 17 +- .../nrk/__tests__/nrk.spec.ts | 176 +- .../nrk/expectations-lib.ts | 168 +- .../generateExpectations/nrk/expectations.ts | 83 +- .../src/generateExpectations/nrk/lib.ts | 16 +- .../nrk/packageContainerExpectations.ts | 19 +- .../src/generateExpectations/nrk/smartbull.ts | 2 +- .../src/generateExpectations/nrk/types.ts | 10 +- .../packages/generic/src/packageManager.ts | 298 ++-- package.json | 5 +- shared/packages/api/package.json | 3 + shared/packages/api/src/ProtectedString.ts | 73 + shared/packages/api/src/adapterClient.ts | 24 +- shared/packages/api/src/adapterServer.ts | 13 +- shared/packages/api/src/appContainer.ts | 5 +- shared/packages/api/src/config.ts | 6 +- shared/packages/api/src/dataStorage.ts | 24 +- shared/packages/api/src/expectationApi.ts | 23 +- shared/packages/api/src/ids.ts | 31 + shared/packages/api/src/index.ts | 2 + shared/packages/api/src/inputApi.ts | 29 +- shared/packages/api/src/lib.ts | 25 +- shared/packages/api/src/methods.ts | 135 +- .../packages/api/src/packageContainerApi.ts | 7 +- shared/packages/api/src/status.ts | 5 +- shared/packages/api/src/statusReport.ts | 36 +- shared/packages/api/src/websocketClient.ts | 11 +- .../packages/api/src/websocketConnection.ts | 50 +- shared/packages/api/src/websocketServer.ts | 22 +- shared/packages/api/src/worker.ts | 7 +- .../evaluateExpectationStates/fulfilled.ts | 10 +- .../evaluateExpectationStates/new.ts | 6 +- .../evaluateExpectationStates/waiting.ts | 6 +- .../src/evaluationRunner/evaluationRunner.ts | 53 +- .../src/expectationManager.ts | 44 +- .../expectationTracker/expectationTracker.ts | 15 +- .../lib/listeningExpectationsStorage.ts | 28 +- .../lib/trackedExpectationAPI.ts | 18 +- .../lib/trackedExpectationsStorage.ts | 21 +- .../lib/trackedPackageContainerAPI.ts | 11 +- .../lib/trackedPackageContainersStorage.ts | 23 +- .../lib/trackedReceivedUpdates.ts | 139 +- .../lib/workInProgressTracker.ts | 55 +- .../expectationTracker/lib/workerScaler.ts | 2 +- .../src/internalManager/internalManager.ts | 26 +- .../lib/expectationManagerServer.ts | 16 +- .../internalManager/lib/statusReportCache.ts | 5 +- .../lib/trackedWorkerAgents.ts | 50 +- .../lib/workforceConnection.ts | 16 +- .../lib/__tests__/trackedExpectation.spec.ts | 34 +- .../src/lib/trackedExpectation.ts | 16 +- .../lib/trackedPackageContainerExpectation.ts | 6 +- .../expectationManager/src/lib/types.ts | 4 +- .../expectationManager/src/workerAgentApi.ts | 17 +- .../expectationManager/src/workforceApi.ts | 12 +- shared/packages/worker/CHANGELOG.md | 287 +--- shared/packages/worker/package.json | 3 + shared/packages/worker/src/appContainerApi.ts | 23 +- .../worker/src/expectationManagerApi.ts | 24 +- .../src/worker/accessorHandlers/accessor.ts | 4 +- .../src/worker/accessorHandlers/atem.ts | 4 +- .../accessorHandlers/corePackageInfo.ts | 21 +- .../src/worker/accessorHandlers/fileShare.ts | 27 +- .../worker/accessorHandlers/genericHandle.ts | 6 +- .../src/worker/accessorHandlers/http.ts | 12 +- .../src/worker/accessorHandlers/httpProxy.ts | 12 +- .../lib/CachedQuantelGateway.ts | 10 +- .../accessorHandlers/lib/FileHandler.ts | 12 +- .../worker/accessorHandlers/localFolder.ts | 16 +- .../src/worker/accessorHandlers/quantel.ts | 6 +- .../src/worker/lib/expectationHandler.ts | 14 +- shared/packages/worker/src/worker/lib/lib.ts | 15 +- shared/packages/worker/src/worker/worker.ts | 17 +- .../worker/workers/linuxWorker/linuxWorker.ts | 8 +- .../expectationWindowsHandler.ts | 8 +- .../expectationHandlers/fileCopy.ts | 11 +- .../expectationHandlers/fileCopyProxy.ts | 11 +- .../expectationHandlers/fileVerify.ts | 10 +- .../expectationHandlers/jsonDataCopy.ts | 8 +- .../windowsWorker/expectationHandlers/lib.ts | 3 +- .../expectationHandlers/lib/file.ts | 4 +- .../expectationHandlers/lib/quantel.ts | 4 +- .../expectationHandlers/mediaFilePreview.ts | 8 +- .../expectationHandlers/mediaFileThumbnail.ts | 8 +- .../expectationHandlers/packageDeepScan.ts | 10 +- .../packageLoudnessScan.ts | 10 +- .../expectationHandlers/packageScan.ts | 10 +- .../expectationHandlers/quantelClipCopy.ts | 8 +- .../expectationHandlers/quantelClipPreview.ts | 8 +- .../quantelClipThumbnail.ts | 8 +- .../worker/workers/windowsWorker/lib/lib.ts | 10 +- .../packageContainerExpectationHandler.ts | 3 +- .../workers/windowsWorker/windowsWorker.ts | 10 +- shared/packages/worker/src/workerAgent.ts | 200 ++- shared/packages/worker/src/workforceApi.ts | 14 +- .../packages/workforce/src/appContainerApi.ts | 14 +- .../workforce/src/expectationManagerApi.ts | 2 + .../packages/workforce/src/workerAgentApi.ts | 7 +- .../packages/workforce/src/workerHandler.ts | 25 +- shared/packages/workforce/src/workforce.ts | 205 ++- .../src/__mocks__/child_process.ts | 2 +- tests/internal-tests/src/__mocks__/fs.ts | 4 +- .../tv-automation-quantel-gateway-client.ts | 2 +- .../src/__tests__/basic.spec.ts | 79 +- .../src/__tests__/issues.spec.ts | 166 +- .../src/__tests__/lib/containers.ts | 40 +- .../src/__tests__/lib/coreMockAPI.ts | 58 +- .../src/__tests__/lib/setupEnv.ts | 90 +- .../src/__tests__/quantel.spec.ts | 108 +- yarn.lock | 1468 ++++++++--------- 119 files changed, 2997 insertions(+), 2394 deletions(-) create mode 100644 shared/packages/api/src/ProtectedString.ts create mode 100644 shared/packages/api/src/ids.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 7df753f3..f9985aa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,7 +79,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package package-manager-monorepo -# <<<<<<< HEAD ## [1.42.1-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.42.1-alpha.0) (2023-06-09) @@ -87,7 +86,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline - URL handling was broken, because it treated URLs as file paths ([827a939](https://github.com/nrkno/tv-automation-package-manager/commit/827a93961e9647927aef7970af8babbab028a29e)) -> > > > > > > master # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index cad97d17..78ffd7dd 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -9,6 +9,9 @@ "build:main": "tsc -p tsconfig.json", "__test": "jest" }, + "peerDependencies": { + "@sofie-automation/shared-lib": "*" + }, "dependencies": { "@sofie-package-manager/api": "1.50.0-alpha.3", "@sofie-package-manager/worker": "1.50.0-alpha.3", diff --git a/apps/appcontainer-node/packages/generic/src/appContainer.ts b/apps/appcontainer-node/packages/generic/src/appContainer.ts index c3cf16ca..9d6de805 100644 --- a/apps/appcontainer-node/packages/generic/src/appContainer.ts +++ b/apps/appcontainer-node/packages/generic/src/appContainer.ts @@ -24,7 +24,18 @@ import { DataStore, literal, WorkForceAppContainer, + mapEntries, + findValue, + AppContainerId, + AppType, + AppId, + WorkerAgentId, + unprotectString, + DataId, + LockId, + protectString, } from '@sofie-package-manager/api' + import { WorkforceAPI } from './workforceApi' import { WorkerAgentAPI } from './workerAgentApi' @@ -37,16 +48,17 @@ const MAX_APP_ID = 10000000 export class AppContainer { private workforceAPI: WorkforceAPI - private id: string + private id: AppContainerId private workForceConnectionOptions: ClientConnectionOptions private appId = 0 private usedInspectPorts = new Set() private busyPorts = new Set() - private apps: { - [appId: string]: { + private apps: Map< + AppId, + { process: cp.ChildProcess - appType: string + appType: AppType /** Set to true when the process is about to be killed */ toBeKilled: boolean restarts: number @@ -58,10 +70,8 @@ export class AppContainer { lastPing: number start: number } - } = {} - private availableApps: { - [appType: string]: AvailableAppInfo - } = {} + > = new Map() + private availableApps: Map = new Map() private websocketServer?: WebsocketServer private monitorAppsTimer: NodeJS.Timer | undefined @@ -77,6 +87,7 @@ export class AppContainer { constructor(logger: LoggerInstance, private config: AppContainerProcessConfig) { this.logger = logger.category('AppContainer') + this.id = config.appContainer.appContainerId this.workerStorage = new DataStore(this.logger, WORKER_DATA_LOCK_TIMEOUT) @@ -92,22 +103,21 @@ export class AppContainer { switch (client.clientType) { case 'workerAgent': { - const workForceMethods = this.getWorkerAgentAPI(client.clientId) - const api = new WorkerAgentAPI(workForceMethods, { + const clientId = client.clientId as WorkerAgentId + const workForceMethods = this.getWorkerAgentAPI(clientId) + const api = new WorkerAgentAPI(this.id, workForceMethods, { type: 'websocket', clientConnection: client, }) - const app = this.apps[client.clientId] + const app = this.apps.get(clientId) if (!app) { - throw new Error( - `Unknown app "${client.clientId}" just connected to the appContainer` - ) + throw new Error(`Unknown app "${clientId}" just connected to the appContainer`) } client.once('close', () => { - this.logger.warn(`Connection to Worker "${client.clientId}" closed`) + this.logger.warn(`Connection to Worker "${clientId}" closed`) app.workerAgentApi = null - this.workerStorage.releaseLockForTag(client.clientId) + this.workerStorage.releaseLockForTag(unprotectString(clientId)) }) this.logger.info(`Connection to Worker "${client.clientId}" established`) app.workerAgentApi = api @@ -141,7 +151,7 @@ export class AppContainer { }) } - this.workforceAPI = new WorkforceAPI(this.logger) + this.workforceAPI = new WorkforceAPI(this.id, this.logger) this.workforceAPI.on('disconnected', () => { this.logger.warn('Workforce disconnected') }) @@ -150,11 +160,8 @@ export class AppContainer { this.workforceAPI .registerAvailableApps( - Object.entries(this.availableApps).map((o) => { - const appType: string = o[0] - return { - appType: appType, - } + mapEntries(this.availableApps, (appType: AppType) => { + return { appType } }) ) .then(() => { @@ -169,7 +176,6 @@ export class AppContainer { this.logger.error(`WorkforceAPI error event: ${stringifyError(err)}`) }) - this.id = config.appContainer.appContainerId this.workForceConnectionOptions = this.config.appContainer.workforceURL ? { type: 'websocket', @@ -192,9 +198,8 @@ export class AppContainer { } await this.workforceAPI.init( - this.id, this.workForceConnectionOptions, - literal({ + literal>({ setLogLevel: this.setLogLevel.bind(this), _debugKill: this._debugKill.bind(this), _debugSendKillConnections: this._debugSendKillConnections.bind(this), @@ -220,13 +225,15 @@ export class AppContainer { this.logger.info(`Initialized"`) } /** Return the API-methods that the AppContainer exposes to the WorkerAgent */ - private getWorkerAgentAPI(clientId: string): AppContainerWorkerAgent.AppContainer { + private getWorkerAgentAPI(clientId: WorkerAgentId): AppContainerWorkerAgent.AppContainer { return { + id: clientId, ping: async (): Promise => { - this.apps[clientId].lastPing = Date.now() + const app = this.apps.get(clientId) + if (app) app.lastPing = Date.now() }, requestSpinDown: async (): Promise => { - const app = this.apps[clientId] + const app = this.apps.get(clientId) if (app) { if (this.getAppCount(app.appType) > this.config.appContainer.minRunningApps) { this.spinDown(clientId, `Requested by app`).catch((error) => { @@ -236,32 +243,32 @@ export class AppContainer { } }, workerStorageWriteLock: async ( - dataId: string, + dataId: DataId, customTimeout?: number - ): Promise<{ lockId: string; current: any | undefined }> => { - return this.workerStorage.getWriteLock(dataId, customTimeout, clientId) + ): Promise<{ lockId: LockId; current: any | undefined }> => { + return this.workerStorage.getWriteLock(dataId, customTimeout, unprotectString(clientId)) }, - workerStorageReleaseLock: async (dataId: string, lockId: string): Promise => { + workerStorageReleaseLock: async (dataId: DataId, lockId: LockId): Promise => { return this.workerStorage.releaseLock(dataId, lockId) }, - workerStorageWrite: async (dataId: string, lockId: string, data: string): Promise => { + workerStorageWrite: async (dataId: DataId, lockId: LockId, data: string): Promise => { return this.workerStorage.write(dataId, lockId, data) }, - workerStorageRead: async (dataId: string): Promise => { + workerStorageRead: async (dataId: DataId): Promise => { return this.workerStorage.read(dataId) }, } } - private getAppCount(appType: string): number { + private getAppCount(appType: AppType): number { let count = 0 - for (const app of Object.values(this.apps)) { + for (const app of this.apps.values()) { if (app.appType === appType) count++ } return count } private async setupAvailableApps() { - const getWorkerArgs = (appId: string): string[] => { + const getWorkerArgs = (appId: AppId): string[] => { return [ `--workerId=${appId}`, `--workforceURL=${this.config.appContainer.workforceURL}`, @@ -291,13 +298,14 @@ export class AppContainer { } if (process.execPath.match(/node.exe$/)) { // Process runs as a node process, we're probably in development mode. - this.availableApps['worker'] = { + const appType = protectString('worker') + this.availableApps.set(appType, { file: process.execPath, - args: (appId: string) => { + args: (appId: AppId) => { return [path.resolve('.', '../../worker/app/dist/index.js'), ...getWorkerArgs(appId)] }, cost: 0, - } + }) } else { // Process is a compiled executable // Look for the worker executable in the same folder: @@ -307,18 +315,20 @@ export class AppContainer { ;(await fs.promises.readdir(dirPath)).forEach((fileName) => { if (fileName.match(/worker/i)) { - this.availableApps[fileName] = { + // We use the filename to identify the appType: + const appType: AppType = protectString(fileName) + this.availableApps.set(appType, { file: path.join(dirPath, fileName), - args: (appId: string) => { + args: (appId: AppId) => { return [...getWorkerArgs(appId)] }, cost: 0, - } + }) } }) } this.logger.info(`Available apps`) - for (const [appType, availableApp] of Object.entries(this.availableApps)) { + for (const [appType, availableApp] of this.availableApps.entries()) { this.logger.info(`${appType}: ${availableApp.file}`) } } @@ -352,9 +362,9 @@ export class AppContainer { async requestAppTypeForExpectation( exp: Expectation.Any - ): Promise<{ success: true; appType: string; cost: number } | { success: false; reason: Reason }> { + ): Promise<{ success: true; appType: AppType; cost: number } | { success: false; reason: Reason }> { this.logger.debug(`Got request for resources, for exp "${exp.id}"`) - if (Object.keys(this.apps).length >= this.config.appContainer.maxRunningApps) { + if (this.apps.size >= this.config.appContainer.maxRunningApps) { this.logger.debug(`Is already at our limit, no more resources available`) // If we're at our limit, we can't possibly run anything else return { @@ -366,26 +376,28 @@ export class AppContainer { } } - this.logger.debug(`Available apps: ${Object.keys(this.availableApps).join(', ')}`) + this.logger.debug(`Available apps: ${Array.from(this.availableApps.keys()).join(', ')}`) - for (const [appType, availableApp] of Object.entries(this.availableApps)) { + for (const [appType, availableApp] of this.availableApps.entries()) { // Do we already have any instance of the appType running? - let runningApp = Object.values(this.apps).find((app) => { + let runningApp = Array.from(this.apps.values()).find((app) => { return app.appType === appType }) if (!runningApp) { - const newAppId = await this.spinUp(appType, true) // todo: make it not die too soon + const newAppId = await this._spinUp(appType, true) // todo: make it not die too soon // wait for the app to connect to us: await tryAfewTimes(async () => { - if (this.apps[newAppId].workerAgentApi) { + const app = this.apps.get(newAppId) + if (!app) throw new Error(`Worker "${newAppId}" not found`) + if (app.workerAgentApi) { return true } await waitTime(200) return false }, 10) - runningApp = this.apps[newAppId] + runningApp = this.apps.get(newAppId) if (!runningApp) throw new Error(`Worker "${newAppId}" didn't connect in time`) } if (runningApp?.workerAgentApi) { @@ -412,9 +424,9 @@ export class AppContainer { async requestAppTypeForPackageContainer( packageContainer: PackageContainerExpectation - ): Promise<{ success: true; appType: string; cost: number } | { success: false; reason: Reason }> { + ): Promise<{ success: true; appType: AppType; cost: number } | { success: false; reason: Reason }> { this.logger.debug(`Got request for resources, for packageContainer "${packageContainer.id}"`) - if (Object.keys(this.apps).length >= this.config.appContainer.maxRunningApps) { + if (this.apps.size >= this.config.appContainer.maxRunningApps) { this.logger.debug(`Is already at our limit, no more resources available`) // If we're at our limit, we can't possibly run anything else return { @@ -426,26 +438,28 @@ export class AppContainer { } } - this.logger.debug(`Available apps: ${Object.keys(this.availableApps).join(', ')}`) + this.logger.debug(`Available apps: ${Array.from(this.availableApps.keys()).join(', ')}`) - for (const [appType, availableApp] of Object.entries(this.availableApps)) { + for (const [appType, availableApp] of this.availableApps.entries()) { // Do we already have any instance of the appType running? - let runningApp = Object.values(this.apps).find((app) => { + let runningApp = findValue(this.apps, (_, app) => { return app.appType === appType }) if (!runningApp) { - const newAppId = await this.spinUp(appType, true) // todo: make it not die too soon + const newAppId = await this._spinUp(appType, true) // todo: make it not die too soon // wait for the app to connect to us: await tryAfewTimes(async () => { - if (this.apps[newAppId].workerAgentApi) { + const app = this.apps.get(newAppId) + if (!app) throw new Error(`Worker "${newAppId}" not found`) + if (app.workerAgentApi) { return true } await waitTime(200) return false }, 10) - runningApp = this.apps[newAppId] + runningApp = this.apps.get(newAppId) if (!runningApp) throw new Error(`Worker "${newAppId}" didn't connect in time`) } if (runningApp?.workerAgentApi) { @@ -469,11 +483,11 @@ export class AppContainer { }, } } - private getNewAppId(): string { - const newAppId = `${this.id}_${this.appId++}` + private getNewAppId(): AppId { + const newAppId = protectString(`${this.id}_${this.appId++}`) - if (this.apps[newAppId] !== undefined) { - const existingApp = this.apps[newAppId] + const existingApp = this.apps.get(newAppId) + if (existingApp !== undefined) { throw new Error( `New AppId "${newAppId}" is still being used by an existing process, existing process is "${ existingApp.appType @@ -488,8 +502,11 @@ export class AppContainer { return newAppId } - async spinUp(appType: string, longSpinDownTime = false): Promise { - const availableApp = this.availableApps[appType] + async spinUp(appType: AppType, longSpinDownTime = false): Promise { + return this._spinUp(appType, longSpinDownTime) + } + private async _spinUp(appType: AppType, longSpinDownTime = false): Promise { + const availableApp = this.availableApps.get(appType) if (!availableApp) throw new Error(`Unknown appType "${appType}"`) const appId = this.getNewAppId() @@ -497,7 +514,7 @@ export class AppContainer { this.logger.debug(`Spinning up app "${appId}" of type "${appType}"`) const child = this.setupChildProcess(appType, appId, availableApp) - this.apps[appId] = { + this.apps.set(appId, { process: child, appType: appType, toBeKilled: false, @@ -508,11 +525,11 @@ export class AppContainer { spinDownTime: this.config.appContainer.spinDownTime * (longSpinDownTime ? 10 : 1), workerAgentApi: null, start: Date.now(), - } + }) return appId } - async spinDown(appId: string, reason: string): Promise { - const app = this.apps[appId] + async spinDown(appId: AppId, reason: string): Promise { + const app = this.apps.get(appId) if (!app) throw new Error(`App "${appId}" not found`) this.logger.verbose(`Spinning down app "${appId}" due to: ${reason}`) @@ -525,11 +542,11 @@ export class AppContainer { app.workerAgentApi = null app.process.removeAllListeners() - delete this.apps[appId] + this.apps.delete(appId) } /** This is used to kill all ChildProcesses when terminating */ private killAllApps() { - Object.entries(this.apps).forEach(([appId, app]) => { + this.apps.forEach((app, appId) => { app.toBeKilled = true const success = app.process.kill() if (!success) @@ -538,19 +555,17 @@ export class AppContainer { app.workerAgentApi = null app.process.removeAllListeners() }) - this.apps = {} + this.apps.clear() } - async getRunningApps(): Promise<{ appId: string; appType: string }[]> { - return Object.entries(this.apps).map((o) => { - const [appId, app] = o - + async getRunningApps(): Promise<{ appId: AppId; appType: AppType }[]> { + return mapEntries(this.apps, (appId, app) => { return { appId: appId, appType: app.appType, } }) } - private setupChildProcess(appType: string, appId: string, availableApp: AvailableAppInfo): cp.ChildProcess { + private setupChildProcess(appType: AppType, appId: AppId, availableApp: AvailableAppInfo): cp.ChildProcess { const cwd = process.execPath.match(/node.exe$/) ? undefined // Process runs as a node process, we're probably in development mode. : path.dirname(process.execPath) // Process runs as a node process, we're probably in development mode. @@ -600,7 +615,7 @@ export class AppContainer { }) child.once('exit', (code) => { if (inspectPort) this.usedInspectPorts.delete(inspectPort) - const app = this.apps[appId] + const app = this.apps.get(appId) if (app) { if (!app.toBeKilled) { // Try to restart the application @@ -631,7 +646,7 @@ export class AppContainer { return child } private monitorApps() { - for (const [appId, app] of Object.entries(this.apps)) { + for (const [appId, app] of this.apps.entries()) { if (app.monitorPing) { if (Date.now() - app.lastPing > APPCONTAINER_PING_TIME * 2.5) { // The app seems to have crashed. @@ -656,13 +671,13 @@ export class AppContainer { }) } private async spinUpMinimumApps(): Promise { - for (const appType of Object.keys(this.availableApps)) { + for (const appType of this.availableApps.keys()) { while (this.getAppCount(appType) < this.config.appContainer.minRunningApps) { - await this.spinUp(appType) + await this._spinUp(appType) } } } - private logFromApp(appId: string, appType: string, data: any, defaultLog: LeveledLogMethod): void { + private logFromApp(appId: AppId, appType: AppType, data: any, defaultLog: LeveledLogMethod): void { const messages = `${data}`.split('\n') for (const message of messages) { @@ -742,7 +757,7 @@ export class AppContainer { } interface AvailableAppInfo { file: string - args: (appId: string) => string[] + args: (appId: AppId) => string[] /** Some kind of value, how much it costs to run it, per minute */ cost: number } diff --git a/apps/appcontainer-node/packages/generic/src/workerAgentApi.ts b/apps/appcontainer-node/packages/generic/src/workerAgentApi.ts index 338e8179..3defa40d 100644 --- a/apps/appcontainer-node/packages/generic/src/workerAgentApi.ts +++ b/apps/appcontainer-node/packages/generic/src/workerAgentApi.ts @@ -6,6 +6,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, PackageContainerExpectation, + AppContainerId, } from '@sofie-package-manager/api' /** @@ -18,6 +19,7 @@ export class WorkerAgentAPI implements AppContainerWorkerAgent.WorkerAgent { constructor( + public id: AppContainerId, methods: AppContainerWorkerAgent.AppContainer, options: AdapterServerOptions ) { diff --git a/apps/appcontainer-node/packages/generic/src/workforceApi.ts b/apps/appcontainer-node/packages/generic/src/workforceApi.ts index 855d3190..880b92b3 100644 --- a/apps/appcontainer-node/packages/generic/src/workforceApi.ts +++ b/apps/appcontainer-node/packages/generic/src/workforceApi.ts @@ -1,4 +1,10 @@ -import { AdapterClient, LoggerInstance, WorkForceAppContainer } from '@sofie-package-manager/api' +import { + AdapterClient, + AppContainerId, + AppType, + LoggerInstance, + WorkForceAppContainer, +} from '@sofie-package-manager/api' /** * Exposes the API-methods of a Workforce, to be called from the AppContainer @@ -9,10 +15,10 @@ export class WorkforceAPI extends AdapterClient implements WorkForceAppContainer.WorkForce { - constructor(logger: LoggerInstance) { - super(logger.category('WorkforceAPI'), 'appContainer') + constructor(public id: AppContainerId, logger: LoggerInstance) { + super(logger.category('WorkforceAPI'), id, 'appContainer') } - async registerAvailableApps(availableApps: { appType: string }[]): Promise { + async registerAvailableApps(availableApps: { appType: AppType }[]): Promise { return this._sendMessage('registerAvailableApps', availableApps) } } diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index 786716e7..59b8c25d 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -10,7 +10,8 @@ "test": "jest" }, "peerDependencies": { - "@sofie-automation/server-core-integration": "*" + "@sofie-automation/server-core-integration": "*", + "@sofie-automation/shared-lib": "*" }, "dependencies": { "@sofie-package-manager/api": "1.50.0-alpha.3", diff --git a/apps/package-manager/packages/generic/src/connector.ts b/apps/package-manager/packages/generic/src/connector.ts index 4c61154a..51c8e930 100644 --- a/apps/package-manager/packages/generic/src/connector.ts +++ b/apps/package-manager/packages/generic/src/connector.ts @@ -7,6 +7,11 @@ import { ExpectedPackage, literal, Accessor, + protectString, + ExpectationManagerId, + ExpectedPackageId, + PackageContainerId, + AccessorId, } from '@sofie-package-manager/api' import { ExpectationManager, ExpectationManagerServerOptions } from '@sofie-package-manager/expectation-manager' import { CoreHandler, CoreConfig } from './coreHandler' @@ -15,6 +20,7 @@ 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) @@ -72,7 +78,7 @@ export class Connector { this.packageManagerHandler = new PackageManagerHandler( this.logger, - config.packageManager.deviceId || 'manager0', + protectString(config.packageManager.deviceId || 'manager0'), packageManagerServerOptions, config.packageManager.accessUrl || undefined, workForceConnectionOptions, @@ -128,18 +134,14 @@ export class Connector { await fsWriteFile( fileName, JSON.stringify( - literal<{ - description: string - packageContainers: PackageContainers - expectedPackages: ExpectedPackage.Any[] - }>({ + literal({ description: 'This file is intended for debugging use. By passing the argument --watchFiles=true, the application will monitor this file as a second source of packages, so we can fiddle without going through Core', packageContainers: { - source0: { + [protectString('source0')]: { label: 'Source 0', accessors: { - local: { + [protectString('local')]: { type: Accessor.AccessType.LOCAL_FOLDER, label: 'Local', folderPath: 'D:\\media\\source0', @@ -148,10 +150,10 @@ export class Connector { }, }, }, - target0: { + [protectString('target0')]: { label: 'Target 0', accessors: { - local: { + [protectString('local')]: { type: Accessor.AccessType.LOCAL_FOLDER, label: 'Local', folderPath: 'D:\\media\\target0', @@ -160,10 +162,10 @@ export class Connector { }, }, }, - internet: { + [protectString('internet')]: { label: 'The Internet', accessors: { - http: { + [protectString('http')]: { type: Accessor.AccessType.HTTP, baseUrl: '', allowRead: true, @@ -176,7 +178,7 @@ export class Connector { expectedPackages: [ { type: ExpectedPackage.PackageType.MEDIA_FILE, - _id: 'test', + _id: protectString('test'), contentVersionHash: 'abc1234', content: { filePath: 'amb.mp4', @@ -184,9 +186,9 @@ export class Connector { version: {}, sources: [ { - containerId: 'source0', + containerId: protectString('source0'), accessors: { - local: { + [protectString('local')]: { type: Accessor.AccessType.LOCAL_FOLDER, filePath: 'amb.mp4', }, @@ -240,10 +242,15 @@ export class Connector { if (!(await fsExist(fileName))) return const str = await fsReadFile(fileName, { encoding: 'utf-8' }) - const o = JSON.parse(str) + const o: WatchFile = JSON.parse(str) if (o.packageContainers && o.expectedPackages) { - packageManagerHandler.setExternalData(o.packageContainers, o.expectedPackages) + const packageContainers: PackageContainers = {} + for (const [id, container] of objectEntries(o.packageContainers)) { + packageContainers[id] = container + } + + packageManagerHandler.setExternalData(packageContainers, o.expectedPackages) } } } @@ -251,3 +258,9 @@ export class Connector { return this.packageManagerHandler.getExpectationManager() } } + +interface WatchFile { + description: string + packageContainers: PackageContainers + expectedPackages: ExpectedPackage.Any[] +} diff --git a/apps/package-manager/packages/generic/src/coreHandler.ts b/apps/package-manager/packages/generic/src/coreHandler.ts index b220e2eb..f0ccf7d1 100644 --- a/apps/package-manager/packages/generic/src/coreHandler.ts +++ b/apps/package-manager/packages/generic/src/coreHandler.ts @@ -9,7 +9,6 @@ import { StatusCode as SofieStatusCode, protectString, unprotectString, - ProtectedString, PeripheralDeviceForDevice, PeripheralDeviceId, PeripheralDeviceCommand, @@ -25,12 +24,17 @@ import { ProcessHandler, StatusCode, Statuses, + Status, stringifyError, hashObj, setLogLevel, getLogLevel, ensureValidValue, DEFAULT_LOG_LEVEL, + ExpectationId, + PackageContainerId, + AppId, + CoreProtectedString, } from '@sofie-package-manager/api' import { DEFAULT_DELAY_REMOVAL_PACKAGE, @@ -327,7 +331,7 @@ export class CoreHandler { } getCollection< DBObj extends { - _id: ProtectedString | string + _id: CoreProtectedString | string } = never >(collectionName: string): Collection { if (!this.core && this.notUsingCore) throw new Error('core.observe called, even though notUsingCore is true.') @@ -413,7 +417,7 @@ export class CoreHandler { } if (statusCode === SofieStatusCode.GOOD) { - for (const status of Object.values(this.statuses)) { + for (const status of Object.values(this.statuses)) { if (status && status.statusCode !== StatusCode.GOOD) { statusCode = Math.max(statusCode, status.statusCode) messages.push(status.message) @@ -439,16 +443,16 @@ export class CoreHandler { return versions } - restartExpectation(workId: string): void { + restartExpectation(workId: ExpectationId): void { return this._packageManagerHandler?.restartExpectation(workId) } restartAllExpectations(): void { return this._packageManagerHandler?.restartAllExpectations() } - abortExpectation(workId: string): void { + abortExpectation(workId: ExpectationId): void { return this._packageManagerHandler?.abortExpectation(workId) } - restartPackageContainer(containerId: string): void { + restartPackageContainer(containerId: PackageContainerId): void { return this._packageManagerHandler?.restartPackageContainer(containerId) } troubleshoot(): any { @@ -457,7 +461,7 @@ export class CoreHandler { async getExpetationManagerStatus(): Promise { return this._packageManagerHandler?.getExpetationManagerStatus() } - async debugKillApp(appId: string): Promise { + async debugKillApp(appId: AppId): Promise { return this._packageManagerHandler?.debugKillApp(appId) } } diff --git a/apps/package-manager/packages/generic/src/credentials.ts b/apps/package-manager/packages/generic/src/credentials.ts index fe7d0b27..a733a0ba 100644 --- a/apps/package-manager/packages/generic/src/credentials.ts +++ b/apps/package-manager/packages/generic/src/credentials.ts @@ -1,4 +1,4 @@ -import { CoreCredentials, protectString } from '@sofie-automation/server-core-integration' +import { CoreCredentials, PeripheralDeviceId, protectString } from '@sofie-automation/server-core-integration' import { nanoid } from 'nanoid' // eslint-disable-next-line @typescript-eslint/no-var-requires @@ -14,7 +14,7 @@ export function getCredentials(name: string): CoreCredentials { let credentials: CoreCredentials = store.get('CoreCredentials') if (!credentials) { credentials = { - deviceId: protectString(nanoid()), + deviceId: protectString(nanoid()), deviceToken: nanoid(), } store.set('CoreCredentials', credentials) diff --git a/apps/package-manager/packages/generic/src/generateExpectations/api.ts b/apps/package-manager/packages/generic/src/generateExpectations/api.ts index 9f0c899a..d42d216c 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/api.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/api.ts @@ -1,6 +1,13 @@ import { ExpectedPackageWrap, PackageContainers } from '../packageManager' import { PackageManagerSettings } from '../generated/options' -import { Expectation, LoggerInstance, PackageContainerExpectation } from '@sofie-package-manager/api' +import { + Expectation, + ExpectationId, + ExpectationManagerId, + LoggerInstance, + PackageContainerExpectation, + PackageContainerId, +} from '@sofie-package-manager/api' import { PackageManagerActivePlaylist, PackageManagerActiveRundown, @@ -10,17 +17,17 @@ import { export interface GenerateExpectationApi { getExpectations: ( logger: LoggerInstance, - managerId: string, + managerId: ExpectationManagerId, packageContainers: PackageContainers, _activePlaylist: PackageManagerActivePlaylist | null, activeRundowns: PackageManagerActiveRundown[], expectedPackages: ExpectedPackageWrap[], settings: PackageManagerSettings - ) => { [id: string]: Expectation.Any } + ) => { [id: ExpectationId]: Expectation.Any } getPackageContainerExpectations: ( - managerId: string, + managerId: ExpectationManagerId, packageContainers: PackageContainers, _activePlaylist: PackageManagerActivePlaylist | null - ) => { [id: string]: PackageContainerExpectation } + ) => { [id: PackageContainerId]: PackageContainerExpectation } } diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/__tests__/nrk.spec.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/__tests__/nrk.spec.ts index 8454c0a8..05260427 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/__tests__/nrk.spec.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/__tests__/nrk.spec.ts @@ -1,4 +1,17 @@ -import { Accessor, Expectation, ExpectedPackage, literal, LoggerInstance } from '@sofie-package-manager/api' +import { + Accessor, + AccessorId, + Expectation, + ExpectationManagerId, + ExpectedPackage, + ExpectedPackageId, + literal, + LoggerInstance, + objectSize, + objectValues, + PackageContainerId, + protectString, +} from '@sofie-package-manager/api' import { PackageManagerActivePlaylist, PackageManagerActiveRundown, @@ -7,9 +20,10 @@ import { import * as NRK from '..' import { ExpectedPackageWrap, PackageContainers, wrapExpectedPackage } from '../../../packageManager' import { PackageManagerSettings } from '../../../generated/options' -import { protectString } from '@sofie-automation/server-core-integration' +import * as Core from '@sofie-automation/server-core-integration' describe('Generate expectations - NRK', () => { + const MANAGER_ID = protectString('test') test('Wrap package', () => { const o = setup() @@ -35,7 +49,7 @@ describe('Generate expectations - NRK', () => { const expectations = NRK.api.getExpectations( o.logger, - 'test', + MANAGER_ID, o.packageContainers, o.activePlaylist, o.activeRundowns, @@ -43,7 +57,7 @@ describe('Generate expectations - NRK', () => { o.settings ) - expect(Object.keys(expectations)).toHaveLength(0) + expect(objectSize(expectations)).toBe(0) }) test('Simple package', () => { const o = setup() @@ -52,7 +66,7 @@ describe('Generate expectations - NRK', () => { const expectations = NRK.api.getExpectations( o.logger, - 'test', + MANAGER_ID, o.packageContainers, o.activePlaylist, o.activeRundowns, @@ -60,15 +74,14 @@ describe('Generate expectations - NRK', () => { o.settings ) - expect(Object.keys(expectations)).toHaveLength(6) // copy, scan, deep-scan, thumbnail, preview, loudness - // expect(expectations).toMatchSnapshot() + expect(objectSize(expectations)).toBe(6) // copy, scan, deep-scan, thumbnail, preview, loudness - const eCopy = Object.values(expectations).find((e) => e.type === Expectation.Type.FILE_COPY) - const eScan = Object.values(expectations).find((e) => e.type === Expectation.Type.PACKAGE_SCAN) - const eDeepScan = Object.values(expectations).find((e) => e.type === Expectation.Type.PACKAGE_DEEP_SCAN) - const eLoudness = Object.values(expectations).find((e) => e.type === Expectation.Type.PACKAGE_LOUDNESS_SCAN) - const eThumbnail = Object.values(expectations).find((e) => e.type === Expectation.Type.MEDIA_FILE_THUMBNAIL) - const ePreview = Object.values(expectations).find((e) => e.type === Expectation.Type.MEDIA_FILE_PREVIEW) + const eCopy = objectValues(expectations).find((e) => e.type === Expectation.Type.FILE_COPY) + const eScan = objectValues(expectations).find((e) => e.type === Expectation.Type.PACKAGE_SCAN) + const eDeepScan = objectValues(expectations).find((e) => e.type === Expectation.Type.PACKAGE_DEEP_SCAN) + const eLoudness = objectValues(expectations).find((e) => e.type === Expectation.Type.PACKAGE_LOUDNESS_SCAN) + const eThumbnail = objectValues(expectations).find((e) => e.type === Expectation.Type.MEDIA_FILE_THUMBNAIL) + const ePreview = objectValues(expectations).find((e) => e.type === Expectation.Type.MEDIA_FILE_PREVIEW) expect(eCopy).toBeTruthy() expect(eScan).toBeTruthy() @@ -86,7 +99,7 @@ describe('Generate expectations - NRK', () => { o.packageContainers, { ...copy(o.packages.simpleMedia), - _id: 'a', + _id: protectString('a'), }, true ), @@ -94,7 +107,7 @@ describe('Generate expectations - NRK', () => { o.packageContainers, { ...copy(o.packages.simpleMedia), - _id: 'b', + _id: protectString('b'), }, true ), @@ -102,7 +115,7 @@ describe('Generate expectations - NRK', () => { const expectations = NRK.api.getExpectations( o.logger, - 'test', + MANAGER_ID, o.packageContainers, o.activePlaylist, o.activeRundowns, @@ -110,9 +123,9 @@ describe('Generate expectations - NRK', () => { o.settings ) - expect(Object.keys(expectations)).toHaveLength(6) // copy, scan, deep-scan, thumbnail, preview, loudness + expect(objectSize(expectations)).toBe(6) // copy, scan, deep-scan, thumbnail, preview, loudness - const eCopy = Object.values(expectations).find((e) => e.type === Expectation.Type.FILE_COPY) + const eCopy = objectValues(expectations).find((e) => e.type === Expectation.Type.FILE_COPY) expect(eCopy).toBeTruthy() expect(eCopy?.fromPackages).toHaveLength(2) }) @@ -125,7 +138,7 @@ describe('Generate expectations - NRK', () => { o.packageContainers, { ...copy(o.packages.simpleMedia), - _id: 'a', + _id: protectString('a'), }, { priority: 2, @@ -135,7 +148,7 @@ describe('Generate expectations - NRK', () => { o.packageContainers, { ...copy(o.packages.simpleMedia2), - _id: 'b', + _id: protectString('b'), }, { priority: 1, @@ -145,7 +158,7 @@ describe('Generate expectations - NRK', () => { const expectations = NRK.api.getExpectations( o.logger, - 'test', + MANAGER_ID, o.packageContainers, o.activePlaylist, o.activeRundowns, @@ -153,9 +166,9 @@ describe('Generate expectations - NRK', () => { o.settings ) - expect(Object.keys(expectations)).toHaveLength(12) // 2x (copy, scan, deep-scan, thumbnail, preview, loudness) + expect(objectSize(expectations)).toBe(12) // 2x (copy, scan, deep-scan, thumbnail, preview, loudness) - const sorted = Object.values(expectations).sort((a, b) => { + const sorted = objectValues(expectations).sort((a, b) => { // Lowest first: (lower is better) if (a.priority > b.priority) return 1 if (a.priority < b.priority) return -1 @@ -196,21 +209,21 @@ function setup() { const managerId = 'mockManager' // const packageContainers: PackageContainers, const activePlaylist: PackageManagerActivePlaylist = { - _id: protectString('playlist'), + _id: Core.protectString('playlist'), active: true, rehearsal: false, } const activeRundowns: PackageManagerActiveRundown[] = [ { - _id: protectString('rundown0'), + _id: Core.protectString('rundown0'), _rank: 0, }, { - _id: protectString('rundown1'), + _id: Core.protectString('rundown1'), _rank: 1, }, { - _id: protectString('rundown2'), + _id: Core.protectString('rundown2'), _rank: 2, }, ] @@ -218,59 +231,60 @@ function setup() { delayRemoval: 0, useTemporaryFilePath: false, } - const packageContainers: PackageContainers = { - source0: { - label: 'Source 0', - accessors: { - local: literal({ - type: Accessor.AccessType.LOCAL_FOLDER, - folderPath: 'C:\\source0', - label: 'Local', - allowRead: true, - allowWrite: true, - }), - }, + const packageContainers: PackageContainers = {} + + packageContainers[protectString('source0')] = { + label: 'Source 0', + accessors: { + [protectString('local')]: literal({ + type: Accessor.AccessType.LOCAL_FOLDER, + folderPath: 'C:\\source0', + label: 'Local', + allowRead: true, + allowWrite: true, + }), }, - target0: { - label: 'Target 0', - accessors: { - local: literal({ - type: Accessor.AccessType.LOCAL_FOLDER, - folderPath: 'C:\\target', - label: 'Local', - allowRead: true, - allowWrite: true, - }), - }, + } + packageContainers[protectString('target0')] = { + label: 'Target 0', + accessors: { + [protectString('local')]: literal({ + type: Accessor.AccessType.LOCAL_FOLDER, + folderPath: 'C:\\target', + label: 'Local', + allowRead: true, + allowWrite: true, + }), }, - previews: { - label: 'Target for Previews', - accessors: { - local: literal({ - type: Accessor.AccessType.LOCAL_FOLDER, - folderPath: 'C:\\targetPreviews', - label: 'Local', - allowRead: true, - allowWrite: true, - }), - }, + } + packageContainers[protectString('previews')] = { + label: 'Target for Previews', + accessors: { + [protectString('local')]: literal({ + type: Accessor.AccessType.LOCAL_FOLDER, + folderPath: 'C:\\targetPreviews', + label: 'Local', + allowRead: true, + allowWrite: true, + }), }, - thumbnails: { - label: 'Target for Thumbnails', - accessors: { - local: literal({ - type: Accessor.AccessType.LOCAL_FOLDER, - folderPath: 'C:\\targetThumbnails', - label: 'Local', - allowRead: true, - allowWrite: true, - }), - }, + } + packageContainers[protectString('thumbnails')] = { + label: 'Target for Thumbnails', + accessors: { + [protectString('local')]: literal({ + type: Accessor.AccessType.LOCAL_FOLDER, + folderPath: 'C:\\targetThumbnails', + label: 'Local', + allowRead: true, + allowWrite: true, + }), }, } + const packages = { simpleMedia: literal({ - _id: 'simpleMedia', + _id: protectString('simpleMedia'), contentVersionHash: 'hash0', layers: ['target0'], type: ExpectedPackage.PackageType.MEDIA_FILE, @@ -280,16 +294,16 @@ function setup() { version: {}, sources: [ { - containerId: 'source0', + containerId: protectString('source0'), accessors: {}, }, ], sideEffect: { - previewContainerId: 'previews', + previewContainerId: protectString('previews'), previewPackageSettings: { path: 'simpleMedia-preview.webm', }, - thumbnailContainerId: 'thumbnails', + thumbnailContainerId: protectString('thumbnails'), thumbnailPackageSettings: { path: 'simpleMedia-thumbnail.webm', }, @@ -299,7 +313,7 @@ function setup() { }, }), simpleMedia2: literal({ - _id: 'simpleMedia2', + _id: protectString('simpleMedia2'), contentVersionHash: 'hash0', layers: ['target0'], type: ExpectedPackage.PackageType.MEDIA_FILE, @@ -309,16 +323,16 @@ function setup() { version: {}, sources: [ { - containerId: 'source0', + containerId: protectString('source0'), accessors: {}, }, ], sideEffect: { - previewContainerId: 'previews', + previewContainerId: protectString('previews'), previewPackageSettings: { path: 'simpleMedia2-preview.webm', }, - thumbnailContainerId: 'thumbnails', + thumbnailContainerId: protectString('thumbnails'), thumbnailPackageSettings: { path: 'simpleMedia2-thumbnail.webm', }, @@ -350,7 +364,7 @@ function wrap( if (externalProps) { // default: wrapped.external = false - wrapped.playoutDeviceId = protectString('device0') + wrapped.playoutDeviceId = Core.protectString('device0') if (typeof externalProps === 'object') { wrapped = { diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts index 2d98d448..5344cbfe 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations-lib.ts @@ -8,6 +8,10 @@ import { hashObj, literal, assertNever, + ExpectationManagerId, + PackageContainerId, + protectString, + ExpectationId, } from '@sofie-package-manager/api' import { ExpectedPackageWrapJSONData, @@ -15,6 +19,7 @@ import { ExpectedPackageWrapQuantel, PriorityAdditions, } from './types' +import { CORE_COLLECTION_ACCESSOR_ID } from './lib' type SomeClipCopyExpectation = | Expectation.FileCopy @@ -25,14 +30,22 @@ type SomeClipCopyExpectation = type SomeClipFileOnDiskCopyExpectation = Expectation.FileCopy | Expectation.FileCopyProxy | Expectation.FileVerify export function generateMediaFileCopy( - managerId: string, + managerId: ExpectationManagerId, expWrap: ExpectedPackageWrap, settings: PackageManagerSettings ): Expectation.FileCopy { const expWrapMediaFile = expWrap as ExpectedPackageWrapMediaFile + const endRequirement: Expectation.FileCopy['endRequirement'] = { + targets: expWrapMediaFile.targets as Expectation.SpecificPackageContainerOnPackage.FileTarget[], + content: expWrapMediaFile.expectedPackage.content, + version: { + type: Expectation.Version.Type.FILE_ON_DISK, + ...expWrapMediaFile.expectedPackage.version, + }, + } const exp: Expectation.FileCopy = { - id: '', // set later + id: protectString(hashObj(endRequirement)), priority: expWrap.priority + PriorityAdditions.COPY, managerId: managerId, fromPackages: [ @@ -56,32 +69,33 @@ export function generateMediaFileCopy( sources: expWrapMediaFile.sources, }, - endRequirement: { - targets: expWrapMediaFile.targets as Expectation.SpecificPackageContainerOnPackage.FileTarget[], - content: expWrapMediaFile.expectedPackage.content, - version: { - type: Expectation.Version.Type.FILE_ON_DISK, - ...expWrapMediaFile.expectedPackage.version, - }, - }, + endRequirement: endRequirement, workOptions: { removeDelay: settings.delayRemoval, allowWaitForCPU: false, useTemporaryFilePath: settings.useTemporaryFilePath, }, } - exp.id = hashObj(exp.endRequirement) + return exp } export function generateMediaFileVerify( - managerId: string, + managerId: ExpectationManagerId, expWrap: ExpectedPackageWrap, _settings: PackageManagerSettings ): Expectation.FileVerify { const expWrapMediaFile = expWrap as ExpectedPackageWrapMediaFile + const endRequirement: Expectation.FileVerify['endRequirement'] = { + targets: expWrapMediaFile.targets as Expectation.SpecificPackageContainerOnPackage.FileTarget[], + content: expWrapMediaFile.expectedPackage.content, + version: { + type: Expectation.Version.Type.FILE_ON_DISK, + ...expWrapMediaFile.expectedPackage.version, + }, + } const exp: Expectation.FileVerify = { - id: '', // set later + id: protectString(hashObj(endRequirement)), priority: expWrap.priority + PriorityAdditions.COPY, managerId: managerId, fromPackages: [ @@ -103,22 +117,18 @@ export function generateMediaFileVerify( sources: [], }, - endRequirement: { - targets: expWrapMediaFile.targets as Expectation.SpecificPackageContainerOnPackage.FileTarget[], - content: expWrapMediaFile.expectedPackage.content, - version: { - type: Expectation.Version.Type.FILE_ON_DISK, - ...expWrapMediaFile.expectedPackage.version, - }, - }, + endRequirement, workOptions: { allowWaitForCPU: false, }, } - exp.id = hashObj(exp.endRequirement) + return exp } -export function generateQuantelCopy(managerId: string, expWrap: ExpectedPackageWrap): Expectation.QuantelClipCopy { +export function generateQuantelCopy( + managerId: ExpectationManagerId, + expWrap: ExpectedPackageWrap +): Expectation.QuantelClipCopy { const expWrapQuantelClip = expWrap as ExpectedPackageWrapQuantel const content = expWrapQuantelClip.expectedPackage.content @@ -136,8 +146,16 @@ export function generateQuantelCopy(managerId: string, expWrap: ExpectedPackageW } const label = title && guid ? `${title} (${guid})` : title || guid + const endRequirement: Expectation.QuantelClipCopy['endRequirement'] = { + targets: expWrapQuantelClip.targets as [Expectation.SpecificPackageContainerOnPackage.QuantelClip], + content: content, + version: { + type: Expectation.Version.Type.QUANTEL_CLIP, + ...expWrapQuantelClip.expectedPackage.version, + }, + } const exp: Expectation.QuantelClipCopy = { - id: '', // set later + id: protectString(hashObj(endRequirement)), priority: expWrap.priority + PriorityAdditions.COPY, managerId: managerId, type: Expectation.Type.QUANTEL_CLIP_COPY, @@ -162,20 +180,12 @@ export function generateQuantelCopy(managerId: string, expWrap: ExpectedPackageW sources: expWrapQuantelClip.sources, }, - endRequirement: { - targets: expWrapQuantelClip.targets as [Expectation.SpecificPackageContainerOnPackage.QuantelClip], - content: content, - version: { - type: Expectation.Version.Type.QUANTEL_CLIP, - ...expWrapQuantelClip.expectedPackage.version, - }, - }, + endRequirement, workOptions: { allowWaitForCPU: false, // removeDelay: 0 // Not used by Quantel }, } - exp.id = hashObj(exp.endRequirement) return exp } @@ -191,7 +201,7 @@ export function generatePackageScan( } return literal({ - id: expectation.id + '_scan', + id: protectString(expectation.id + '_scan'), priority: priority, managerId: expectation.managerId, type: Expectation.Type.PACKAGE_SCAN, @@ -213,10 +223,10 @@ export function generatePackageScan( endRequirement: { targets: [ { - containerId: '__corePackageInfo', + containerId: protectString('__corePackageInfo'), label: 'Core package info', accessors: { - coreCollection: { + [CORE_COLLECTION_ACCESSOR_ID]: { type: Accessor.AccessType.CORE_PACKAGE_INFO, }, }, @@ -230,8 +240,8 @@ export function generatePackageScan( allowWaitForCPU: false, removeDelay: settings.delayRemovalPackageInfo, }, - dependsOnFullfilled: [expectation.id], - triggerByFullfilledIds: [expectation.id], + dependsOnFulfilled: [expectation.id], + triggerByFulfilledIds: [expectation.id], }) } export function generatePackageDeepScan( @@ -239,7 +249,7 @@ export function generatePackageDeepScan( settings: PackageManagerSettings ): Expectation.PackageDeepScan { return literal({ - id: expectation.id + '_deepscan', + id: protectString(expectation.id + '_deepscan'), priority: expectation.priority + PriorityAdditions.DEEP_SCAN, managerId: expectation.managerId, type: Expectation.Type.PACKAGE_DEEP_SCAN, @@ -261,10 +271,10 @@ export function generatePackageDeepScan( endRequirement: { targets: [ { - containerId: '__corePackageInfo', + containerId: protectString('__corePackageInfo'), label: 'Core package info', accessors: { - coreCollection: { + [CORE_COLLECTION_ACCESSOR_ID]: { type: Accessor.AccessType.CORE_PACKAGE_INFO, }, }, @@ -284,8 +294,8 @@ export function generatePackageDeepScan( usesCPUCount: 1, removeDelay: settings.delayRemovalPackageInfo, }, - dependsOnFullfilled: [expectation.id], - triggerByFullfilledIds: [expectation.id], + dependsOnFulfilled: [expectation.id], + triggerByFulfilledIds: [expectation.id], }) } @@ -295,7 +305,7 @@ export function generatePackageLoudness( settings: PackageManagerSettings ): Expectation.PackageLoudnessScan { return literal({ - id: expectation.id + '_loudness', + id: protectString(expectation.id + '_loudness'), priority: expectation.priority + PriorityAdditions.LOUDNESS_SCAN, managerId: expectation.managerId, type: Expectation.Type.PACKAGE_LOUDNESS_SCAN, @@ -317,10 +327,10 @@ export function generatePackageLoudness( endRequirement: { targets: [ { - containerId: '__corePackageInfo', + containerId: protectString('__corePackageInfo'), label: 'Core package info', accessors: { - coreCollection: { + [CORE_COLLECTION_ACCESSOR_ID]: { type: Accessor.AccessType.CORE_PACKAGE_INFO, }, }, @@ -339,19 +349,19 @@ export function generatePackageLoudness( usesCPUCount: 1, removeDelay: settings.delayRemovalPackageInfo, }, - dependsOnFullfilled: [expectation.id], - triggerByFullfilledIds: [expectation.id], + dependsOnFulfilled: [expectation.id], + triggerByFulfilledIds: [expectation.id], }) } export function generateMediaFileThumbnail( expectation: SomeClipFileOnDiskCopyExpectation, - packageContainerId: string, + packageContainerId: PackageContainerId, settings: ExpectedPackage.SideEffectThumbnailSettings, packageContainer: PackageContainer ): Expectation.MediaFileThumbnail { return literal({ - id: expectation.id + '_thumbnail', + id: protectString(expectation.id + '_thumbnail'), priority: expectation.priority + PriorityAdditions.THUMBNAIL, managerId: expectation.managerId, type: Expectation.Type.MEDIA_FILE_THUMBNAIL, @@ -394,18 +404,18 @@ export function generateMediaFileThumbnail( removeDelay: 0, // The removal of the thumnail shouldn't be delayed removePackageOnUnFulfill: true, }, - dependsOnFullfilled: [expectation.id], - triggerByFullfilledIds: [expectation.id], + dependsOnFulfilled: [expectation.id], + triggerByFulfilledIds: [expectation.id], }) } export function generateMediaFilePreview( expectation: SomeClipFileOnDiskCopyExpectation, - packageContainerId: string, + packageContainerId: PackageContainerId, settings: ExpectedPackage.SideEffectPreviewSettings, packageContainer: PackageContainer ): Expectation.MediaFilePreview { return literal({ - id: expectation.id + '_preview', + id: protectString(expectation.id + '_preview'), priority: expectation.priority + PriorityAdditions.PREVIEW, managerId: expectation.managerId, type: Expectation.Type.MEDIA_FILE_PREVIEW, @@ -447,19 +457,19 @@ export function generateMediaFilePreview( removeDelay: 0, // The removal of the preview shouldn't be delayed removePackageOnUnFulfill: true, }, - dependsOnFullfilled: [expectation.id], - triggerByFullfilledIds: [expectation.id], + dependsOnFulfilled: [expectation.id], + triggerByFulfilledIds: [expectation.id], }) } export function generateQuantelClipThumbnail( expectation: Expectation.QuantelClipCopy, - packageContainerId: string, + packageContainerId: PackageContainerId, settings: ExpectedPackage.SideEffectThumbnailSettings, packageContainer: PackageContainer ): Expectation.QuantelClipThumbnail { return literal({ - id: expectation.id + '_thumbnail', + id: protectString(expectation.id + '_thumbnail'), priority: expectation.priority + PriorityAdditions.THUMBNAIL, managerId: expectation.managerId, type: Expectation.Type.QUANTEL_CLIP_THUMBNAIL, @@ -501,18 +511,18 @@ export function generateQuantelClipThumbnail( removeDelay: 0, // The removal of the thumbnail shouldn't be delayed removePackageOnUnFulfill: true, }, - dependsOnFullfilled: [expectation.id], - triggerByFullfilledIds: [expectation.id], + dependsOnFulfilled: [expectation.id], + triggerByFulfilledIds: [expectation.id], }) } export function generateQuantelClipPreview( expectation: Expectation.QuantelClipCopy, - packageContainerId: string, + packageContainerId: PackageContainerId, settings: ExpectedPackage.SideEffectPreviewSettings, packageContainer: PackageContainer ): Expectation.QuantelClipPreview { return literal({ - id: expectation.id + '_preview', + id: protectString(expectation.id + '_preview'), priority: expectation.priority + PriorityAdditions.PREVIEW, managerId: expectation.managerId, type: Expectation.Type.QUANTEL_CLIP_PREVIEW, @@ -556,20 +566,28 @@ export function generateQuantelClipPreview( removeDelay: 0, // The removal of the preview shouldn't be delayed removePackageOnUnFulfill: true, }, - dependsOnFullfilled: [expectation.id], - triggerByFullfilledIds: [expectation.id], + dependsOnFulfilled: [expectation.id], + triggerByFulfilledIds: [expectation.id], }) } export function generateJsonDataCopy( - managerId: string, + managerId: ExpectationManagerId, expWrap: ExpectedPackageWrap, settings: PackageManagerSettings ): Expectation.JsonDataCopy { const expWrapMediaFile = expWrap as ExpectedPackageWrapJSONData + const endRequirement: Expectation.JsonDataCopy['endRequirement'] = { + targets: expWrapMediaFile.targets as Expectation.SpecificPackageContainerOnPackage.FileTarget[], + content: expWrapMediaFile.expectedPackage.content, + version: { + type: Expectation.Version.Type.FILE_ON_DISK, + ...expWrapMediaFile.expectedPackage.version, + }, + } const exp: Expectation.JsonDataCopy = { - id: '', // set later + id: protectString(hashObj(endRequirement)), priority: expWrap.priority + PriorityAdditions.COPY, managerId: managerId, fromPackages: [ @@ -593,28 +611,20 @@ export function generateJsonDataCopy( sources: expWrapMediaFile.sources, }, - endRequirement: { - targets: expWrapMediaFile.targets as Expectation.SpecificPackageContainerOnPackage.FileTarget[], - content: expWrapMediaFile.expectedPackage.content, - version: { - type: Expectation.Version.Type.FILE_ON_DISK, - ...expWrapMediaFile.expectedPackage.version, - }, - }, + endRequirement, workOptions: { removeDelay: settings.delayRemoval, useTemporaryFilePath: settings.useTemporaryFilePath, allowWaitForCPU: false, }, } - exp.id = hashObj(exp.endRequirement) return exp } export function generatePackageCopyFileProxy( expectation: Expectation.FileCopy | Expectation.FileVerify | Expectation.QuantelClipCopy, settings: PackageManagerSettings, - packageContainerId: string, + packageContainerId: PackageContainerId, packageContainer: PackageContainer ): Expectation.FileCopyProxy | undefined { let priority = expectation.priority + PriorityAdditions.COPY_PROXY @@ -638,7 +648,7 @@ export function generatePackageCopyFileProxy( if (!filePath) return undefined return literal({ - id: expectation.id + '_proxy', + id: protectString(expectation.id + '_proxy'), priority: priority, managerId: expectation.managerId, type: Expectation.Type.FILE_COPY_PROXY, @@ -676,8 +686,8 @@ export function generatePackageCopyFileProxy( allowWaitForCPU: false, removeDelay: settings.delayRemovalPackageInfo, }, - dependsOnFullfilled: [expectation.id], - triggerByFullfilledIds: [expectation.id], + dependsOnFulfilled: [expectation.id], + triggerByFulfilledIds: [expectation.id], originalExpectation: expectation, }) diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts index 9fb72a04..dfe1c0f7 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/expectations.ts @@ -1,6 +1,17 @@ import { ExpectedPackageWrap, PackageContainers } from '../../packageManager' import { PackageManagerSettings } from '../../generated/options' -import { ExpectedPackage, PackageContainer, Expectation, hashObj, LoggerInstance } from '@sofie-package-manager/api' +import { + ExpectedPackage, + PackageContainer, + Expectation, + hashObj, + LoggerInstance, + ExpectationManagerId, + ExpectationId, + objectEntries, + objectValues, + objectSize, +} from '@sofie-package-manager/api' import { GenerateExpectation, PriorityMagnitude } from './types' import { @@ -30,22 +41,22 @@ import { RundownId } from '@sofie-automation/shared-lib/dist/core/model/Ids' /** Generate and return the appropriate Expectations based on the provided expectedPackages */ export function getExpectations( logger: LoggerInstance, - managerId: string, + managerId: ExpectationManagerId, packageContainers: PackageContainers, _activePlaylist: PackageManagerActivePlaylist | null, activeRundowns: PackageManagerActiveRundown[], expectedPackages: ExpectedPackageWrap[], settings: PackageManagerSettings -): { [id: string]: Expectation.Any } { +): Record { const expectations: ExpectationCollection = {} // Note: All of this is a preliminary implementation! // A blueprint-like plug-in architecture might be a future idea /** If set, we should first copy media to a temporary storage and use that for side-effects */ - const useTemporaryStorage = packageContainers[TEMPORARY_STORAGE_ID] as PackageContainer | undefined + const useTemporaryStorage = packageContainers[TEMPORARY_STORAGE_ID] - // Sort, so that we handle the high-prio first: + // Sort, so that we handle the high-priority first: expectedPackages.sort((a, b) => { // Lowest first: (lower is better) if (a.priority > b.priority) return 1 @@ -75,16 +86,16 @@ export function getExpectations( // Add side-effects from the initial expectations: injectSideEffectExpectations(logger, packageContainers, settings, expectations, useTemporaryStorage) - const returnExpectations: { [id: string]: Expectation.Any } = {} - for (const [id, exp] of Object.entries(expectations)) { - returnExpectations[id] = exp as any + const returnExpectations: ExpectationCollection = {} + for (const [id, exp] of objectEntries(expectations)) { + returnExpectations[id] = exp } return returnExpectations } /** Generate and return the most basic expectations based on the provided expectedPackages */ function getBasicExpectations( _logger: LoggerInstance, - managerId: string, + managerId: ExpectationManagerId, expectedPackages: ExpectedPackageWrap[], settings: PackageManagerSettings ) { @@ -99,8 +110,8 @@ function getBasicExpectations( if (shouldBeIgnored(packageWrap)) continue // Verify that the expectedPackage has any source and target accessors: - const hasAnySourceAccessors = !!packageWrap.sources.find((source) => Object.keys(source.accessors).length > 0) - const hasAnyTargetAccessors = !!packageWrap.targets.find((target) => Object.keys(target.accessors).length > 0) + const hasAnySourceAccessors = !!packageWrap.sources.find((source) => objectSize(source.accessors) > 0) + const hasAnyTargetAccessors = !!packageWrap.targets.find((target) => objectSize(target.accessors) > 0) // No need to generate an expectation if there are no accessors: if (hasAnySourceAccessors || hasAnyTargetAccessors) { @@ -138,21 +149,24 @@ function injectSideEffectExpectations( if (!useTemporaryStorage) { for (const expectation of groupExpectations(expectations)) { // Get side-effects and add them to the expectations: - copyProps(expectations, getSideEffectOfExpectation(_logger, packageContainers, settings, expectation)) + copyExpectationCollection( + expectations, + getSideEffectOfExpectation(_logger, packageContainers, settings, expectation) + ) } } else { - const temoraryStorageExpectations: ExpectationCollection = {} + const temporaryStorageExpectations: ExpectationCollection = {} for (const expectation0 of groupExpectations(expectations)) { // We need to copy the expectation to a temporary storage, - // get those expectations and put them in temoraryStorageExpectations: - copyProps( - temoraryStorageExpectations, + // get those expectations and put them in temporaryStorageExpectations: + copyExpectationCollection( + temporaryStorageExpectations, getCopyToTemporaryStorage(_logger, useTemporaryStorage, settings, expectation0) ) } - // Okay, now let's generate the side-effects from the temoraryStorageExpectations instead: - for (const [id, expectation] of Object.entries(temoraryStorageExpectations)) { + // Okay, now let's generate the side-effects from the temporaryStorageExpectations instead: + for (const [id, expectation] of objectEntries(temporaryStorageExpectations)) { // get side-effects: const resultingExpectations: ExpectationCollection = getSideEffectOfExpectation( _logger, @@ -160,11 +174,11 @@ function injectSideEffectExpectations( settings, expectation ) - if (Object.keys(resultingExpectations).length > 0) { + if (objectSize(resultingExpectations) > 0) { // Add the CopyToTemporaryStorage expectation: expectations[id] = expectation - copyProps(expectations, resultingExpectations) + copyExpectationCollection(expectations, resultingExpectations) } } } @@ -178,7 +192,7 @@ function groupExpectations(expectations: ExpectationCollection): GenerateExpecta const groupedExpectations: GenerateExpectation[] = [] const handledSources = new Set() - for (const expectation of Object.values(expectations)) { + for (const expectation of objectValues(expectations)) { let alreadyHandled = false for (const fromPackage of expectation.fromPackages) { const key = hashObj(fromPackage) @@ -232,9 +246,7 @@ function getSideEffectOfExpectation( } if (expectation0.sideEffect?.thumbnailContainerId && expectation0.sideEffect?.thumbnailPackageSettings) { - const packageContainer = packageContainers[expectation0.sideEffect.thumbnailContainerId] as - | PackageContainer - | undefined + const packageContainer = packageContainers[expectation0.sideEffect.thumbnailContainerId] if (packageContainer) { const thumbnail = generateMediaFileThumbnail( @@ -248,9 +260,7 @@ function getSideEffectOfExpectation( } if (expectation0.sideEffect?.previewContainerId && expectation0.sideEffect?.previewPackageSettings) { - const packageContainer = packageContainers[expectation0.sideEffect.previewContainerId] as - | PackageContainer - | undefined + const packageContainer = packageContainers[expectation0.sideEffect.previewContainerId] if (packageContainer) { const preview = generateMediaFilePreview( @@ -285,9 +295,7 @@ function getSideEffectOfExpectation( } if (expectation0.sideEffect?.thumbnailContainerId && expectation0.sideEffect?.thumbnailPackageSettings) { - const packageContainer = packageContainers[expectation0.sideEffect.thumbnailContainerId] as - | PackageContainer - | undefined + const packageContainer = packageContainers[expectation0.sideEffect.thumbnailContainerId] if (packageContainer) { const thumbnail = generateQuantelClipThumbnail( @@ -301,9 +309,7 @@ function getSideEffectOfExpectation( } if (expectation0.sideEffect?.previewContainerId && expectation0.sideEffect?.previewPackageSettings) { - const packageContainer = packageContainers[expectation0.sideEffect.previewContainerId] as - | PackageContainer - | undefined + const packageContainer = packageContainers[expectation0.sideEffect.previewContainerId] if (packageContainer) { const preview = generateQuantelClipPreview( @@ -418,9 +424,10 @@ function getPriority( return exp.priority + PriorityMagnitude.OTHER } } -interface ExpectationCollection { - [id: string]: GenerateExpectation -} -function copyProps(org: { [key: string]: T }, add: { [key: string]: T }): void { - Object.entries(add).forEach(([key, value]) => (org[key] = value)) +type ExpectationCollection = Record + +function copyExpectationCollection(org: ExpectationCollection, add: ExpectationCollection): void { + for (const [key, value] of objectEntries(add)) { + org[key] = value + } } diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/lib.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/lib.ts index f4e65b98..27932a48 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/lib.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/lib.ts @@ -1,10 +1,22 @@ +import { AccessorId, PackageContainerId, protectString } from '@sofie-package-manager/api' + /** * Magic PackageContainer ID. * When a PackageContainer with this ID is present, it'll be used as for the "smartbull" feature. */ -export const SMARTBULL_STORAGE_ID = 'source-smartbull' +export const SMARTBULL_STORAGE_ID: PackageContainerId = protectString('source-smartbull') + /** * Magic Temporary storage ID. * When a PackageContainer with this ID is present, it'll be used as for the "smartbull" feature. */ -export const TEMPORARY_STORAGE_ID = 'temporary-storage' +export const TEMPORARY_STORAGE_ID: PackageContainerId = protectString('temporary-storage') + +/** + * Magic Source Monitor ID. + * When a PackageContainer with this ID is present, it'll be used to monitor sources + */ +export const SOURCE_MONITOR_STORAGE_ID: PackageContainerId = protectString('source_monitor') + +/** Accessor that points to a Sofie Core collection */ +export const CORE_COLLECTION_ACCESSOR_ID: AccessorId = protectString('coreCollection') diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/packageContainerExpectations.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/packageContainerExpectations.ts index aadbc091..4372a867 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/packageContainerExpectations.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/packageContainerExpectations.ts @@ -1,6 +1,11 @@ import { PackageContainers } from '../../packageManager' -import { PackageContainerExpectation } from '@sofie-package-manager/api' -import { SMARTBULL_STORAGE_ID, TEMPORARY_STORAGE_ID } from './lib' +import { + PackageContainerExpectation, + ExpectationManagerId, + PackageContainerId, + objectEntries, +} from '@sofie-package-manager/api' +import { SMARTBULL_STORAGE_ID, SOURCE_MONITOR_STORAGE_ID, TEMPORARY_STORAGE_ID } from './lib' // eslint-disable-next-line node/no-extraneous-import import { PackageManagerActivePlaylist } from '@sofie-automation/shared-lib/dist/package-manager/publications' @@ -8,15 +13,15 @@ import { PackageManagerActivePlaylist } from '@sofie-automation/shared-lib/dist/ const MAX_FILE_AGE = 30 * 24 * 3600 // 30 days export function getPackageContainerExpectations( - managerId: string, + managerId: ExpectationManagerId, packageContainers: PackageContainers, _activePlaylist: PackageManagerActivePlaylist | null -): { [id: string]: PackageContainerExpectation } { - const o: { [id: string]: PackageContainerExpectation } = {} +): Record { + const o: Record = {} - for (const [containerId, packageContainer] of Object.entries(packageContainers)) { + for (const [containerId, packageContainer] of objectEntries(packageContainers)) { // This is temporary, to test/show how a monitor would work: - if (containerId === 'source_monitor') { + if (containerId === SOURCE_MONITOR_STORAGE_ID) { o[containerId] = { ...packageContainer, id: containerId, diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/smartbull.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/smartbull.ts index a7ded3a7..673ca812 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/smartbull.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/smartbull.ts @@ -11,7 +11,7 @@ export function shouldBeIgnored(packageWrap: ExpectedPackageWrap): boolean { else return false } export function expectedPackageIsSmartbull(packageWrap: ExpectedPackageWrap): boolean { - return !!packageWrap.expectedPackage._id.match(/smartbull_auto_clip/) + return !!packageWrap.expectedPackage._id.includes('smartbull_auto_clip') } export function expectedPackageIsSmartbullSource(packageWrap: ExpectedPackageWrap): boolean { if (expectedPackageIsSmartbull(packageWrap)) return false diff --git a/apps/package-manager/packages/generic/src/generateExpectations/nrk/types.ts b/apps/package-manager/packages/generic/src/generateExpectations/nrk/types.ts index 58bf9b35..87fbd42a 100644 --- a/apps/package-manager/packages/generic/src/generateExpectations/nrk/types.ts +++ b/apps/package-manager/packages/generic/src/generateExpectations/nrk/types.ts @@ -1,7 +1,7 @@ import { ExpectedPackageWrap } from '../../packageManager' -import { ExpectedPackage, Expectation } from '@sofie-package-manager/api' +import { ExpectedPackage, Expectation, PackageContainerId } from '@sofie-package-manager/api' -export type GenerateExpectation = Expectation.Base & { +export type GenerateExpectation = Expectation.Any & { sideEffect?: ExpectedPackage.Base['sideEffect'] external?: boolean } @@ -9,7 +9,7 @@ export type GenerateExpectation = Expectation.Base & { export interface ExpectedPackageWrapMediaFile extends ExpectedPackageWrap { expectedPackage: ExpectedPackage.ExpectedPackageMediaFile sources: { - containerId: string + containerId: PackageContainerId label: string accessors: NonNullable }[] @@ -17,7 +17,7 @@ export interface ExpectedPackageWrapMediaFile extends ExpectedPackageWrap { export interface ExpectedPackageWrapQuantel extends ExpectedPackageWrap { expectedPackage: ExpectedPackage.ExpectedPackageQuantelClip sources: { - containerId: string + containerId: PackageContainerId label: string accessors: NonNullable }[] @@ -25,7 +25,7 @@ export interface ExpectedPackageWrapQuantel extends ExpectedPackageWrap { export interface ExpectedPackageWrapJSONData extends ExpectedPackageWrap { expectedPackage: ExpectedPackage.ExpectedPackageJSONData sources: { - containerId: string + containerId: PackageContainerId label: string accessors: NonNullable }[] diff --git a/apps/package-manager/packages/generic/src/packageManager.ts b/apps/package-manager/packages/generic/src/packageManager.ts index fe8f404c..abe913a8 100644 --- a/apps/package-manager/packages/generic/src/packageManager.ts +++ b/apps/package-manager/packages/generic/src/packageManager.ts @@ -1,7 +1,14 @@ import _ from 'underscore' import { CoreHandler } from './coreHandler' // eslint-disable-next-line node/no-extraneous-import -import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' +import { + ExpectedPackageStatusAPI, + ExpectedPackage as ExpectedPackageOrg, +} from '@sofie-automation/shared-lib/dist/package-manager/package' +import { + ExpectedPackageId as CoreExpectedPackageId, + ExpectedPackageWorkStatusId, +} from '@sofie-automation/shared-lib/dist/core/model/Ids' import { PackageManagerActivePlaylist, PackageManagerActiveRundown, @@ -11,12 +18,7 @@ import { PackageManagerPlayoutContext, // eslint-disable-next-line node/no-extraneous-import } from '@sofie-automation/shared-lib/dist/package-manager/publications' -import { - Observer, - PeripheralDeviceId, - protectString, - protectStringArray, -} from '@sofie-automation/server-core-integration' +import { Observer, PeripheralDeviceId } from '@sofie-automation/server-core-integration' // eslint-disable-next-line node/no-extraneous-import import { UpdateExpectedPackageWorkStatusesChanges } from '@sofie-automation/shared-lib/dist/peripheralDevice/methodsAPI' // eslint-disable-next-line node/no-extraneous-import @@ -43,6 +45,23 @@ import { Accessor, AccessorOnPackage, Statuses, + Status, + ExpectationManagerId, + PackageContainerId, + ExpectedPackageId, + ExpectationId, + MonitorId, + AppId, + AccessorId, + AnyProtectedString, + objectEntries, + objectSize, + ProtectedString, + protectString, + unprotectString, + convProtectedString, + objectKeys, + objectValues, } from '@sofie-package-manager/api' import deepExtend from 'deep-extend' import clone = require('fast-clone') @@ -57,7 +76,7 @@ export class PackageManagerHandler { public expectationManager: ExpectationManager - private expectedPackageCache: { [id: string]: ExpectedPackageWrap } = {} + private expectedPackageCache: Map = new Map() public packageContainersCache: PackageContainers = {} private externalData: { packageContainers: PackageContainers; expectedPackages: ExpectedPackageWrap[] } = { @@ -65,9 +84,7 @@ export class PackageManagerHandler { expectedPackages: [], } private _triggerUpdatedExpectedPackagesTimeout: NodeJS.Timeout | null = null - public monitoredPackages: { - [monitorId: string]: ExpectedPackageWrap[] - } = {} + public monitoredPackages: Map = new Map() settings: PackageManagerSettings = { delayRemoval: 0, useTemporaryFilePath: false, @@ -78,10 +95,8 @@ export class PackageManagerHandler { updated: number expectedPackages: ExpectedPackageWrap[] packageContainers: PackageContainers - expectations: { - [id: string]: Expectation.Any - } - packageContainerExpectations: { [id: string]: PackageContainerExpectation } + expectations: { [id: ExpectationId]: Expectation.Any } + packageContainerExpectations: { [id: PackageContainerId]: PackageContainerExpectation } } = { updated: 0, expectedPackages: [], @@ -95,7 +110,7 @@ export class PackageManagerHandler { private logger: LoggerInstance constructor( logger: LoggerInstance, - private managerId: string, + private managerId: ExpectationManagerId, private serverOptions: ExpectationManagerServerOptions, private serverAccessUrl: string | undefined, private workForceConnectionOptions: ClientConnectionOptions, @@ -253,12 +268,14 @@ export class PackageManagerHandler { const expectedPackagesObjs = this.coreHandler .getCollection('packageManagerExpectedPackages') .find() - expectedPackages.push(...expectedPackagesObjs) + for (const expectedPackagesObj of expectedPackagesObjs) { + expectedPackages.push(expectedPackagesObj as any as ExpectedPackageWrap) + } } // Add from Monitors: { - for (const monitorExpectedPackages of Object.values(this.monitoredPackages)) { + for (const monitorExpectedPackages of this.monitoredPackages.values()) { for (const expectedPackage of monitorExpectedPackages) { expectedPackages.push(expectedPackage) } @@ -277,17 +294,19 @@ export class PackageManagerHandler { expectedPackages: ExpectedPackageWrap[] ) { // Step 0: Save local cache: - this.expectedPackageCache = {} + this.expectedPackageCache = new Map() this.packageContainersCache = packageContainers for (const exp of expectedPackages) { // Note: There might be duplicates in expectedPackages - const existing = this.expectedPackageCache[exp.expectedPackage._id] + const expId: ExpectedPackageId = exp.expectedPackage._id + + const existing = this.expectedPackageCache.get(expId) if ( !existing || existing.priority > exp.priority // If the existing priority is lower (ie higher), replace it ) { - this.expectedPackageCache[exp.expectedPackage._id] = exp + this.expectedPackageCache.set(expId, exp) } } @@ -307,7 +326,7 @@ export class PackageManagerHandler { expectedPackages, this.settings ) - this.logger.debug(`Has ${Object.keys(expectations).length} expectations`) + this.logger.debug(`Has ${objectSize(expectations)} expectations`) // this.logger.debug(JSON.stringify(expectations, null, 2)) this.dataSnapshot.expectations = expectations @@ -316,7 +335,7 @@ export class PackageManagerHandler { this.packageContainersCache, activePlaylist ) - this.logger.debug(`Has ${Object.keys(packageContainerExpectations).length} packageContainerExpectations`) + this.logger.debug(`Has ${objectSize(packageContainerExpectations)} packageContainerExpectations`) this.dataSnapshot.packageContainerExpectations = packageContainerExpectations this.dataSnapshot.updated = Date.now() @@ -327,7 +346,7 @@ export class PackageManagerHandler { this.expectationManager.updateExpectations(expectations) } - public restartExpectation(workId: string): void { + public restartExpectation(workId: ExpectationId): void { // This method can be called from core this.expectationManager.restartExpectation(workId) } @@ -335,11 +354,11 @@ export class PackageManagerHandler { // This method can be called from core this.expectationManager.restartAllExpectations() } - public abortExpectation(workId: string): void { + public abortExpectation(workId: ExpectationId): void { // This method can be called from core this.expectationManager.abortExpectation(workId) } - public restartPackageContainer(containerId: string): void { + public restartPackageContainer(containerId: PackageContainerId): void { // This method can be called from core this.expectationManager.restartPackageContainer(containerId) } @@ -363,25 +382,27 @@ export class PackageManagerHandler { this.workForceConnectionOptions.type === 'websocket' ? this.workForceConnectionOptions.url : null, lastUpdated: this.dataSnapshot.updated, countExpectedPackages: this.dataSnapshot.expectedPackages.length, - countPackageContainers: Object.keys(this.dataSnapshot.packageContainers).length, - countExpectations: Object.keys(this.dataSnapshot.expectations).length, - countPackageContainerExpectations: Object.keys(this.dataSnapshot.packageContainerExpectations).length, + countPackageContainers: objectSize(this.dataSnapshot.packageContainers), + countExpectations: objectSize(this.dataSnapshot.expectations), + countPackageContainerExpectations: objectSize(this.dataSnapshot.packageContainerExpectations), }, updated: Date.now(), } } - public async debugKillApp(appId: string): Promise { + public async debugKillApp(appId: AppId): Promise { return this.expectationManager.debugKillApp(appId) } - /** Ensures that the packageContainerExpectations containes the mandatory expectations */ + /** Ensures that the packageContainerExpectations contains the mandatory expectations */ private ensureMandatoryPackageContainerExpectations(packageContainerExpectations: { - [id: string]: PackageContainerExpectation + [id: PackageContainerId]: PackageContainerExpectation }): void { - for (const [containerId, packageContainer] of Object.entries(this.packageContainersCache)) { + for (const [containerId, packageContainer] of objectEntries( + this.packageContainersCache + )) { /** Is the Container writeable */ let isWriteable = false - for (const accessor of Object.values(packageContainer.accessors)) { + for (const accessor of objectValues(packageContainer.accessors)) { if (accessor.allowWrite) { isWriteable = true break @@ -400,9 +421,10 @@ export class PackageManagerHandler { } if (isWriteable) { // All writeable packageContainers should have the clean-up cronjob: - if (!packageContainerExpectations[containerId].cronjobs.cleanup) { + const existing = packageContainerExpectations[containerId] as PackageContainerExpectation | undefined + if (existing && !existing.cronjobs.cleanup) { // Add cronjob to clean up: - packageContainerExpectations[containerId].cronjobs.cleanup = { + existing.cronjobs.cleanup = { label: 'Clean up old packages', } } @@ -424,26 +446,35 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks private increment = 1 - private toReportExpectationStatuses: ReportStatuses = {} - public reportedExpectationStatuses: ReportStatuses = {} + private toReportExpectationStatuses: ReportStatuses< + ExpectationId, + ExpectedPackageStatusAPI.WorkStatus | null, + undefined + > = new Map() + public reportedExpectationStatuses: ReportStatuses = + new Map() private toReportPackageStatus: ReportStatuses< + PackageOnPackageId, ExpectedPackageStatusAPI.PackageContainerPackageStatus | null, - { containerId: string; packageId: string } - > = {} + { containerId: PackageContainerId; packageId: ExpectedPackageId } + > = new Map() public reportedPackageStatuses: ReportStatuses< + PackageOnPackageId, ExpectedPackageStatusAPI.PackageContainerPackageStatus, - { containerId: string; packageId: string } - > = {} + { containerId: PackageContainerId; packageId: ExpectedPackageId } + > = new Map() private toReportPackageContainerStatus: ReportStatuses< + PackageContainerId, ExpectedPackageStatusAPI.PackageContainerStatus | null, undefined - > = {} + > = new Map() public reportedPackageContainerStatuses: ReportStatuses< + PackageContainerId, ExpectedPackageStatusAPI.PackageContainerStatus, undefined - > = {} + > = new Map() private expectationManagerStatuses: Statuses = {} constructor(logger: LoggerInstance, private packageManager: PackageManagerHandler) { @@ -451,7 +482,7 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks } public reportExpectationStatus( - expectationId: string, + expectationId: ExpectationId, expectaction: Expectation.Any | null, actualVersionHash: string | null, statusInfo: { @@ -463,13 +494,13 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks } ): void { if (!expectaction) { - if (this.toReportExpectationStatuses[expectationId]) { + if (this.toReportExpectationStatuses.has(expectationId)) { this.updateExpectationStatus(expectationId, null) } } else { if (!expectaction.statusReport.sendReport) return // Don't report the status - const previouslyReported = this.toReportExpectationStatuses[expectationId]?.status + const previouslyReported = this.toReportExpectationStatuses.get(expectationId)?.status // Remove undefined properties, so they don't mess with the spread operators below: deleteAllUndefinedProperties(expectaction.statusReport) @@ -493,11 +524,12 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks ...statusInfo, fromPackages: expectaction.fromPackages.map((fromPackage) => { - const prevPromPackage = this.toReportExpectationStatuses[expectationId]?.status?.fromPackages.find( - (p) => p.id === fromPackage.id - ) + const fromPackageId = unprotectString(fromPackage.id) + const prevPromPackage = this.toReportExpectationStatuses + .get(expectationId) + ?.status?.fromPackages.find((p) => p.id === fromPackageId) return { - id: fromPackage.id, + id: fromPackageId, expectedContentVersionHash: fromPackage.expectedContentVersionHash, actualContentVersionHash: actualVersionHash || prevPromPackage?.actualContentVersionHash || '', } @@ -518,15 +550,15 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks } } public reportPackageContainerPackageStatus( - containerId: string, - packageId: string, + containerId: PackageContainerId, + packageId: ExpectedPackageId, packageStatus: Omit | null ): void { - const packageContainerPackageId = `${containerId}_${packageId}` + const packageContainerPackageId = packageOnPackageId(containerId, packageId) if (!packageStatus) { this.updatePackageContainerPackageStatus(containerId, packageId, null) } else { - const previouslyReported = this.toReportPackageStatus[packageContainerPackageId]?.status + const previouslyReported = this.toReportPackageStatus.get(packageContainerPackageId)?.status const containerStatus: ExpectedPackageStatusAPI.PackageContainerPackageStatus = { // Default properties: @@ -556,13 +588,13 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks } } public reportPackageContainerExpectationStatus( - containerId: string, + containerId: PackageContainerId, statusInfo: ExpectedPackageStatusAPI.PackageContainerStatus | null ): void { if (!statusInfo) { this.updatePackageContainerStatus(containerId, null) } else { - const previouslyReported = this.toReportPackageContainerStatus[containerId]?.status + const previouslyReported = this.toReportPackageContainerStatus.get(containerId)?.status const containerStatus: ExpectedPackageStatusAPI.PackageContainerStatus = { // Default properties: @@ -600,14 +632,14 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks if (this.packageManager.coreHandler.notUsingCore) return // Abort if we are not using core return this.packageManager.coreHandler.coreMethods.fetchPackageInfoMetadata( message.arguments[0], - protectStringArray(message.arguments[1]) + convProtectedString(message.arguments[1]) ) } case 'updatePackageInfo': { if (this.packageManager.coreHandler.notUsingCore) return // Abort if we are not using core return this.packageManager.coreHandler.coreMethods.updatePackageInfo( message.arguments[0], - protectString(message.arguments[1]), + convProtectedString(message.arguments[1]), message.arguments[2], message.arguments[3], message.arguments[4] @@ -617,7 +649,7 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks if (this.packageManager.coreHandler.notUsingCore) return // Abort if we are not using core return this.packageManager.coreHandler.coreMethods.removePackageInfo( message.arguments[0], - protectString(message.arguments[1]), + convProtectedString(message.arguments[1]), message.arguments[2] ) } @@ -635,52 +667,55 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks if (this.packageManager.coreHandler.notUsingCore) return // Abort if we are not using core - this.reportedExpectationStatuses = {} + this.reportedExpectationStatuses = new Map() await this.packageManager.coreHandler.coreMethods.removeAllExpectedPackageWorkStatusOfDevice() - this.reportedPackageContainerStatuses = {} + this.reportedPackageContainerStatuses = new Map() await this.packageManager.coreHandler.coreMethods.removeAllPackageContainerPackageStatusesOfDevice() - this.reportedPackageStatuses = {} + this.reportedPackageStatuses = new Map() await this.packageManager.coreHandler.coreMethods.removeAllPackageContainerStatusesOfDevice() } public onCoreConnected() { this.triggerReportUpdatedStatuses() } - private updateExpectationStatus(expectationId: string, workStatus: ExpectedPackageStatusAPI.WorkStatus | null) { - this.toReportExpectationStatuses[expectationId] = { + private updateExpectationStatus( + expectationId: ExpectationId, + workStatus: ExpectedPackageStatusAPI.WorkStatus | null + ) { + this.toReportExpectationStatuses.set(expectationId, { status: workStatus, ids: undefined, hash: this.getIncrement(), - } + }) this.triggerReportUpdatedStatuses() } private updatePackageContainerPackageStatus( - containerId: string, - packageId: string, + containerId: PackageContainerId, + packageId: ExpectedPackageId, packageStatus: ExpectedPackageStatusAPI.PackageContainerPackageStatus | null ): void { - const key = `${containerId}_${packageId}` - this.toReportPackageStatus[key] = { + const key = packageOnPackageId(containerId, packageId) + this.toReportPackageStatus.set(key, { status: packageStatus, ids: { containerId, packageId, }, hash: this.getIncrement(), - } + }) this.triggerReportUpdatedStatuses() } private updatePackageContainerStatus( - containerId: string, + containerId: PackageContainerId, containerStatus: ExpectedPackageStatusAPI.PackageContainerStatus | null ) { - this.toReportPackageContainerStatus[containerId] = { + this.toReportPackageContainerStatus.set(containerId, { status: containerStatus, ids: undefined, hash: this.getIncrement(), - } + }) this.triggerReportUpdatedStatuses() } private triggerReportUpdatedStatuses() { @@ -735,18 +770,18 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks if (change.type === 'delete') { sendToCore.push({ type: 'delete', - id: protectString(expectationId), + id: convProtectedString(expectationId), }) } else if (change.type === 'insert') { sendToCore.push({ type: 'insert', - id: protectString(expectationId), + id: convProtectedString(expectationId), status: change.status, }) } else { // Updated - const reported = this.reportedExpectationStatuses[expectationId] + const reported = this.reportedExpectationStatuses.get(expectationId) if (!reported) throw new Error( `Internal Error: Expectation ${expectationId} not found in reportedExpectationStatuses (it should be)` @@ -761,7 +796,7 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks if (!_.isEmpty(mod)) { sendToCore.push({ type: 'update', - id: protectString(expectationId), + id: convProtectedString(expectationId), status: mod, }) } else { @@ -792,15 +827,15 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks if (change.type === 'delete') { return { type: 'delete', - containerId: change.ids.containerId, - packageId: change.ids.packageId, + containerId: unprotectString(change.ids.containerId), + packageId: unprotectString(change.ids.packageId), } } else { // Inserted / Updated return { type: 'update', - containerId: change.ids.containerId, - packageId: change.ids.packageId, + containerId: unprotectString(change.ids.containerId), + packageId: unprotectString(change.ids.packageId), status: change.status, } } @@ -819,13 +854,13 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks if (change.type === 'delete') { return { type: 'delete', - containerId: change.key, + containerId: unprotectString(change.key), } } else { // Inserted / Updated return { type: 'update', - containerId: change.key, + containerId: unprotectString(change.key), status: change.status, } } @@ -835,18 +870,18 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks ) } - private async reportStatus( - toReportStatus: ReportStatuses, - reportedStatuses: ReportStatuses, - sendChanges: (changesToSend: ChangesTosend) => Promise + private async reportStatus( + toReportStatus: ReportStatuses, + reportedStatuses: ReportStatuses, + sendChanges: (changesToSend: ChangesTosend) => Promise ): Promise { - const changesTosend: ChangesTosend = [] + const changesTosend: ChangesTosend = [] - for (const [key, o] of Object.entries(toReportStatus)) { + for (const [key, o] of toReportStatus.entries()) { if (o.hash !== null) { if (!o.status) { // Removed - if (reportedStatuses[key]) { + if (reportedStatuses.has(key)) { changesTosend.push({ type: 'delete', key, @@ -857,7 +892,7 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks } else { // Inserted / Updated changesTosend.push({ - type: reportedStatuses[key] ? 'update' : 'insert', + type: reportedStatuses.has(key) ? 'update' : 'insert', key, ids: o.ids, status: o.status, @@ -877,24 +912,24 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks for (const change of changesTosend) { // Store the status we just sent into reportedStatuses: if (change.type === 'delete') { - delete reportedStatuses[change.key] + reportedStatuses.delete(change.key) } else { - reportedStatuses[change.key] = { + reportedStatuses.set(change.key, { hash: change.hash, ids: change.ids, status: change.status, - } + }) } // Now, check if the toReportStatus hash is still the same: - const orgToReportStaus = toReportStatus[change.key] as ReportStatus | undefined + const orgToReportStaus = toReportStatus.get(change.key) as ReportStatus | undefined if (orgToReportStaus && orgToReportStaus.hash === change.hash) { // Ok, this means that we have sent the latest update to Core. if (orgToReportStaus.status === null) { // The original data was deleted, so we can delete it, to prevent mamory leaks: - delete toReportStatus[change.key] - delete reportedStatuses[change.key] + toReportStatus.delete(change.key) + reportedStatuses.delete(change.key) } else { // Set the hash to null orgToReportStaus.hash = null @@ -916,8 +951,8 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks const statuses: Statuses = {} for (const [containerId, container] of [ - ...Object.entries(this.reportedPackageContainerStatuses), - ...Object.entries(this.toReportPackageContainerStatus), + ...Array.from(this.reportedPackageContainerStatuses.entries()), + ...Array.from(this.toReportPackageContainerStatus.entries()), ]) { statuses[`container-${containerId}`] = container.status ? { @@ -927,7 +962,7 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks : null } - for (const [id, status] of Object.entries(this.expectationManagerStatuses)) { + for (const [id, status] of Object.entries(this.expectationManagerStatuses)) { statuses[`expectationManager-${id}`] = status } this.packageManager.coreHandler @@ -935,7 +970,11 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks .catch((e) => this.logger.error(`Error in updateCoreStatus : ${stringifyError(e)}`)) } - private reportMonitoredPackages(_containerId: string, monitorId: string, expectedPackages: ExpectedPackage.Any[]) { + private reportMonitoredPackages( + _containerId: PackageContainerId, + monitorId: MonitorId, + expectedPackages: ExpectedPackage.Any[] + ) { const expectedPackagesWraps: ExpectedPackageWrap[] = [] for (const expectedPackage of expectedPackages) { @@ -949,7 +988,7 @@ class ExpectationManagerCallbacksHandler implements ExpectationManagerCallbacks `reportMonitoredPackages: ${expectedPackages.length} packages, ${expectedPackagesWraps.length} wraps` ) - this.packageManager.monitoredPackages[monitorId] = expectedPackagesWraps + this.packageManager.monitoredPackages.set(monitorId, expectedPackagesWraps) this.packageManager.triggerUpdatedExpectedPackages() } @@ -963,8 +1002,9 @@ export function wrapExpectedPackage( expectedPackage: ExpectedPackage.Any ): ExpectedPackageWrap | undefined { const combinedSources: PackageContainerOnPackage[] = [] + for (const packageSource of expectedPackage.sources) { - const lookedUpSource: PackageContainer = packageContainers[packageSource.containerId] + const lookedUpSource = packageContainers[packageSource.containerId] as PackageContainer | undefined if (lookedUpSource) { // We're going to combine the accessor attributes set on the Package with the ones defined on the source: const combinedSource: PackageContainerOnPackage = { @@ -973,8 +1013,8 @@ export function wrapExpectedPackage( containerId: packageSource.containerId, } - const accessorIds = _.uniq( - Object.keys(lookedUpSource.accessors).concat(Object.keys(packageSource.accessors || {})) + const accessorIds: AccessorId[] = _.uniq( + objectKeys(lookedUpSource.accessors).concat(objectKeys(packageSource.accessors || {})) ) for (const accessorId of accessorIds) { @@ -998,16 +1038,14 @@ export function wrapExpectedPackage( for (const layer of expectedPackage.layers) { // Hack: we use the layer name as a 1-to-1 relation to a target containerId - const packageContainerId: string = layer + const packageContainerId = protectString(layer) // hack if (packageContainerId) { - const lookedUpTarget = packageContainers[packageContainerId] + const lookedUpTarget = packageContainers[packageContainerId] as PackageContainer | undefined if (lookedUpTarget) { combinedTargets.push({ ...omit(clone(lookedUpTarget), 'accessors'), - accessors: lookedUpTarget.accessors as { - [accessorId: string]: AccessorOnPackage.Any - }, + accessors: lookedUpTarget.accessors, containerId: packageContainerId, }) } @@ -1017,7 +1055,7 @@ export function wrapExpectedPackage( if (combinedSources.length) { if (combinedTargets.length) { return { - expectedPackage: expectedPackage, + expectedPackage: expectedPackage as any, priority: 999, // Default: lowest priority sources: combinedSources, targets: combinedTargets, @@ -1050,9 +1088,25 @@ export function deleteAllUndefinedProperties(o } } } +export type ConvertExpectedPackage = Omit & { + _id: ExpectedPackageId + sources: Array< + Omit & { + containerId: PackageContainerId // Converts string -> PackageContainerId + accessors: { + [accessorId: AccessorId]: AccessorOnPackage.Any + } + } + > + + sideEffect: Omit & { + previewContainerId?: PackageContainerId | null + thumbnailContainerId?: PackageContainerId | null + } +} export interface ExpectedPackageWrap { - expectedPackage: PackageManagerExpectedPackageBase + expectedPackage: ConvertExpectedPackage /** Lower should be done first */ priority: number sources: PackageContainerOnPackage[] @@ -1063,29 +1117,33 @@ export interface ExpectedPackageWrap { // playoutLocation: any // todo? } -export type PackageContainers = { [containerId: string]: PackageContainer } +export type PackageContainers = Record + +type ReportStatuses = Map> -type ReportStatuses = { - [key: string]: ReportStatus -} type ReportStatus = { status: Status ids: Ids /** A unique value updated whenever the status is updated, or set to null if the status has already been reported. */ hash: number | null } -type ChangesTosend = ( +type ChangesTosend = ( | { type: 'update' | 'insert' - key: string + key: ID ids: Ids status: Status hash: number } | { type: 'delete' - key: string + key: ID ids: Ids hash: number } )[] + +type PackageOnPackageId = ProtectedString<'PackageOnPackageId', string> +function packageOnPackageId(containerId: PackageContainerId, packageId: ExpectedPackageId): PackageOnPackageId { + return protectString(`${containerId}_${packageId}`) +} diff --git a/package.json b/package.json index 5d9d2c1e..0263283c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "generate-schema-types": "node scripts/schema-types.mjs" }, "devDependencies": { - "@sofie-automation/code-standard-preset": "~2.3", + "@sofie-automation/code-standard-preset": "^2.5.1", "@types/jest": "^29.2.5", "deep-extend": "^0.6.0", "find": "^0.3.0", @@ -68,7 +68,8 @@ "node": ">=12.11.0" }, "dependencies": { - "@sofie-automation/server-core-integration": "1.50.0-nightly-release50-20230627-124025-83abcdc.0" + "@sofie-automation/server-core-integration": "1.50.0-nightly-release50-20230627-124025-83abcdc.0", + "@sofie-automation/shared-lib": "1.50.0-nightly-release50-20230627-124025-83abcdc.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "lint-staged": { diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index d5ec48bf..eb7871db 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -12,6 +12,9 @@ "build:main": "tsc -p tsconfig.json", "test": "jest" }, + "peerDependencies": { + "@sofie-automation/shared-lib": "*" + }, "devDependencies": { "@types/winston": "^2.3.9", "@types/ws": "^8.5.4" diff --git a/shared/packages/api/src/ProtectedString.ts b/shared/packages/api/src/ProtectedString.ts new file mode 100644 index 00000000..f25ac7af --- /dev/null +++ b/shared/packages/api/src/ProtectedString.ts @@ -0,0 +1,73 @@ +import { ProtectedString as CoreProtectedString } from '@sofie-automation/shared-lib/dist/lib/protectedString' +export { CoreProtectedString } + +/** + * Defines a string of a certain _type_. + * The actual values at runtime are the actual string itself, + * however during compile-time we pretend that all protected strings are prefixed with their type. + */ +export type ProtectedString = `@@protectedString/${Type}/${Value}` +export type AnyProtectedString = ProtectedString + +export function protectString(str: string): T +export function protectString(str: string | undefined): T | undefined +export function protectString(str: CoreProtectedString): T +export function protectString(str: string | null): T | null +export function protectString( + str: string | undefined | null | CoreProtectedString +): T | undefined | null { + return str as any +} +export function unprotectString(str: T): string +export function unprotectString(str: T | undefined): string | undefined +export function unprotectString(str: T | null): string | null +export function unprotectString(str: T | undefined | null): string | undefined | null { + return str as any +} +export function isProtectedString(str: unknown): str is AnyProtectedString { + return typeof str === 'string' +} + +/** Like Object.entries() but returns stricter types */ +export function objectEntries(obj: Record): [T, V][] { + return Object.entries(obj) as any +} +/** Like Object.keys() but returns stricter types */ +export function objectKeys(obj: Record): T[] { + return Object.keys(obj) as any +} +/** Like Object.values() but returns stricter types */ +export function objectValues(obj: Record): V[] { + return Object.values(obj) +} +/** + * Like Object.keys().length. + * Returns the number of keys in an object. + */ +export function objectSize(obj: Record): number { + return Object.keys(obj).length +} + +/** Conversion between the old Core ProtectedString and the new one */ +export function convProtectedString>(a: A): B +export function convProtectedString[]>(a: A): B +export function convProtectedString>(a: B): A +export function convProtectedString[]>(a: B): A +export function convProtectedString(a: undefined): any { + return a +} + +export function recordToMap(obj: Record): Map { + const m = new Map() + for (const [key, value] of objectEntries(obj)) { + m.set(key, value) + } + return m +} +export function mapToRecord(map: Map): Record { + const obj: Record = {} + for (const [key, value] of map.entries()) { + obj[key] = value + } + return obj +} diff --git a/shared/packages/api/src/adapterClient.ts b/shared/packages/api/src/adapterClient.ts index 044e7062..fe4a3c4c 100644 --- a/shared/packages/api/src/adapterClient.ts +++ b/shared/packages/api/src/adapterClient.ts @@ -3,13 +3,17 @@ import { promiseTimeout, stringifyError } from './lib' import { LoggerInstance } from './logger' import { WebsocketClient } from './websocketClient' import { Hook, MessageBase, MessageIdentifyClient, ACTION_TIMEOUT } from './websocketConnection' +import { MethodsInterfaceBase } from './methods' /** * The AdapterClient's sub-classes are used to connect to an AdapterServer in order to provide type-safe communication between processes (using web-sockets), * or (in the case where they run in the same process) hook directly into the AdapterServer, to call the methods directly. * @see {@link ./adapterServer.ts} */ -export abstract class AdapterClient extends HelpfulEventEmitter { +export abstract class AdapterClient< + ME extends MethodsInterfaceBase, + OTHER extends MethodsInterfaceBase +> extends HelpfulEventEmitter { /** Used for internal connections */ private serverHook?: Hook @@ -17,20 +21,24 @@ export abstract class AdapterClient extends HelpfulEventEmitter { throw new Error('.init() must be called first!') } - constructor(protected logger: LoggerInstance, private clientType: MessageIdentifyClient['clientType']) { + constructor( + protected logger: LoggerInstance, + protected id: OTHER['id'], + private clientType: MessageIdentifyClient['clientType'] + ) { super() } - private conn?: WebsocketClient + private conn?: WebsocketClient private terminated = false private _connected = false - async init(id: string, connectionOptions: ClientConnectionOptions, clientMethods: ME): Promise { + async init(connectionOptions: ClientConnectionOptions, clientMethods: Omit): Promise { if (connectionOptions.type === 'websocket') { const conn = new WebsocketClient( this.logger, - id, + this.id, connectionOptions.url, this.clientType, async (message: MessageBase) => { @@ -56,14 +64,14 @@ export abstract class AdapterClient extends HelpfulEventEmitter { conn.on('connected', () => { if (this.listenerCount('connected') === 0) { - this.logger.debug(`Websocket client connected ("${id}", ${this.clientType})`) + this.logger.debug(`Websocket client connected ("${this.id}", ${this.clientType})`) } this.emit('connected') this._connected = true }) conn.on('disconnected', () => { if (this.listenerCount('disconnected') === 0) { - this.logger.debug(`Websocket client disconnected ("${id}", ${this.clientType})`) + this.logger.debug(`Websocket client disconnected ("${this.id}", ${this.clientType})`) } this.emit('disconnected') this._connected = false @@ -78,7 +86,7 @@ export abstract class AdapterClient extends HelpfulEventEmitter { if (!this.serverHook) throw new Error(`AdapterClient: can't init() an internal connection, call hook() first!`) - const serverHook: OTHER = this.serverHook(id, clientMethods) + const serverHook: OTHER = this.serverHook(this.id, clientMethods) this._sendMessage = async (type: keyof OTHER, ...args: any[]) => { if (this.terminated) throw new Error(`Can't send message due to being terminated`) diff --git a/shared/packages/api/src/adapterServer.ts b/shared/packages/api/src/adapterServer.ts index b739e475..d87267c7 100644 --- a/shared/packages/api/src/adapterServer.ts +++ b/shared/packages/api/src/adapterServer.ts @@ -1,4 +1,5 @@ import { promiseTimeout, stringifyError } from './lib' +import { MethodsInterfaceBase } from './methods' import { ACTION_TIMEOUT, MessageBase } from './websocketConnection' import { ClientConnection } from './websocketServer' @@ -7,8 +8,8 @@ import { ClientConnection } from './websocketServer' * or (in the case where they run in the same process) hook directly into the AdapterServer, to call the methods directly. * @see {@link ./adapterClient.ts} */ -export abstract class AdapterServer { - protected _sendMessage: (type: keyof OTHER, ...args: any[]) => Promise +export abstract class AdapterServer { + protected _sendMessage: (type: keyof Omit, ...args: any[]) => Promise public readonly type: string @@ -36,8 +37,8 @@ export abstract class AdapterServer { } }) } else { - const clientHook: OTHER = options.hookMethods - this._sendMessage = async (type: keyof OTHER, ...args: any[]) => { + const clientHook: Omit = options.hookMethods + this._sendMessage = async (type: keyof Omit, ...args: any[]) => { const fcn = clientHook[type] as unknown as (...args: any[]) => any if (fcn) { try { @@ -61,6 +62,6 @@ export abstract class AdapterServer { } } /** Options for the AdapterServer */ -export type AdapterServerOptions = +export type AdapterServerOptions = | { type: 'websocket'; clientConnection: ClientConnection } - | { type: 'internal'; hookMethods: OTHER } + | { type: 'internal'; hookMethods: Omit } diff --git a/shared/packages/api/src/appContainer.ts b/shared/packages/api/src/appContainer.ts index f559e847..86287fda 100644 --- a/shared/packages/api/src/appContainer.ts +++ b/shared/packages/api/src/appContainer.ts @@ -1,3 +1,4 @@ +import { AppContainerId, AppId } from './ids' import { WorkerAgentConfig } from './worker' /** The AppContainer is a host application responsible for spawning other applications */ @@ -9,7 +10,7 @@ export const APPCONTAINER_MAX_KEEPALIVE = 6 * 3600 * 1000 // ms (6 hours) export interface AppContainerConfig { workforceURL: string | null port: number | null - appContainerId: string + appContainerId: AppContainerId minRunningApps: number maxRunningApps: number maxAppKeepalive: number @@ -44,7 +45,7 @@ export namespace AppContainer { /** Information about an App running in an AppContainer */ export interface App { /** Uniquely identifies a running instance of an app. */ - appId: string + appId: AppId } } diff --git a/shared/packages/api/src/config.ts b/shared/packages/api/src/config.ts index 90ecab4a..f1ff5ea7 100644 --- a/shared/packages/api/src/config.ts +++ b/shared/packages/api/src/config.ts @@ -3,6 +3,8 @@ import yargs = require('yargs/yargs') import _ from 'underscore' import { WorkerAgentConfig } from './worker' import { AppContainerConfig } from './appContainer' +import { protectString } from './ProtectedString' +import { AppContainerId, WorkerAgentId } from './ids' /* * This file contains various CLI argument definitions, used by the various processes that together constitutes the Package Manager @@ -418,7 +420,7 @@ export async function getWorkerConfig(): Promise { return { process: getProcessConfig(argv), worker: { - workerId: argv.workerId, + workerId: protectString(argv.workerId), workforceURL: argv.workforceURL, appContainerURL: argv.appContainerURL, @@ -451,7 +453,7 @@ export async function getAppContainerConfig(): Promise(argv.appContainerId), maxRunningApps: argv.maxRunningApps, minRunningApps: argv.minRunningApps, maxAppKeepalive: argv.maxAppKeepalive, diff --git a/shared/packages/api/src/dataStorage.ts b/shared/packages/api/src/dataStorage.ts index d663a611..de3e3d75 100644 --- a/shared/packages/api/src/dataStorage.ts +++ b/shared/packages/api/src/dataStorage.ts @@ -1,3 +1,4 @@ +import { ProtectedString, protectString } from './ProtectedString' import { LoggerInstance } from './logger' /** @@ -5,11 +6,11 @@ import { LoggerInstance } from './logger' */ export class DataStore { private storage = new Map< - string, // dataId + DataId, { /** When this is set, prevents others from reading and writing */ accessLock: { - lockId: string + lockId: LockId /** created time [timestamp] */ created: number /** time to live [timestamp] */ @@ -23,7 +24,7 @@ export class DataStore { >() /** An Access Claim is basically a read-queue for accessing/reading a data-point. */ private accessClaims = new Map< - string, + DataId, { ttl: number resolve: () => void @@ -56,10 +57,10 @@ export class DataStore { /** Request to aquire a write lock */ async getWriteLock( - dataId: string, + dataId: DataId, customTimeout?: number, tag?: string - ): Promise<{ lockId: string; current: any | undefined }> { + ): Promise<{ lockId: LockId; current: any | undefined }> { // Wait for getting access to the data: await this._waitForAccess(dataId) // Set a write lock: @@ -74,7 +75,7 @@ export class DataStore { if (!data) throw new Error(`Internal error: No data for "${dataId}"`) if (this.lockI >= Number.MAX_SAFE_INTEGER) this.lockI = 0 - const lockId = `write_${this.lockI++}` + const lockId = protectString(`write_${this.lockI++}`) const timeoutDuration = customTimeout ?? this._timeoutTime data.accessLock = { lockId: lockId, @@ -88,7 +89,7 @@ export class DataStore { return { lockId, current: data.data } } - releaseLock(dataId: string, lockId: string): void { + releaseLock(dataId: DataId, lockId: LockId): void { const data = this.storage.get(dataId) if (!data) return if (!data.accessLock) return @@ -107,7 +108,7 @@ export class DataStore { } }) } - write(dataId: string, lockId: string, writeData: string): void { + write(dataId: DataId, lockId: LockId, writeData: string): void { const data = this.storage.get(dataId) if (!data) throw new Error(`DataStorage: Error when trying to write data: "${dataId}" not found`) if (!data.accessLock) @@ -122,7 +123,7 @@ export class DataStore { data.data = writeData this.releaseLock(dataId, lockId) } - async read(dataId: string): Promise { + async read(dataId: DataId): Promise { // Wait for getting access to the data: await this._waitForAccess(dataId) @@ -131,7 +132,7 @@ export class DataStore { return data.data } - private async _waitForAccess(dataId: string): Promise { + private async _waitForAccess(dataId: DataId): Promise { return new Promise((resolve, reject) => { if (!this.accessClaims.has(dataId)) { this.accessClaims.set(dataId, []) @@ -224,3 +225,6 @@ export class DataStore { this._triggerHandleClaims(runAgain) } } + +export type DataId = ProtectedString<'DataId', string> +export type LockId = ProtectedString<'LockId', string> diff --git a/shared/packages/api/src/expectationApi.ts b/shared/packages/api/src/expectationApi.ts index f5e3d5bb..c463e430 100644 --- a/shared/packages/api/src/expectationApi.ts +++ b/shared/packages/api/src/expectationApi.ts @@ -1,6 +1,7 @@ // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' import { AccessorOnPackage, PackageContainerOnPackage } from './inputApi' +import { AccessorId, ExpectationId, ExpectationManagerId, ExpectedPackageId } from './ids' /* * This file contains definitions for Expectations, the internal datastructure upon which the Package Manager operates. @@ -49,11 +50,11 @@ export namespace Expectation { /** Common attributes of all Expectations */ export interface Base { - id: string + id: ExpectationId type: Type /** Id of the ExpectationManager the expectation was created from */ - managerId: string + managerId: ExpectationManagerId /** Expectation priority. Lower will be handled first. Note: This is not absolute, the actual execution order might vary. */ priority: number @@ -61,7 +62,7 @@ export namespace Expectation { /** A list of which expectedPackages that resultet in this expectation */ fromPackages: { /** ExpectedPackage id */ - id: string + id: ExpectedPackageId /** Reference to the contentVersionHash of the ExpectedPackage, used to reference the expected content+version of the Package */ expectedContentVersionHash: string }[] @@ -85,14 +86,14 @@ export namespace Expectation { /** Contains info that can be used during work on an expectation. Changes in this does NOT cause an invalidation of the expectation. */ workOptions: WorkOptions.Base /** Reference to another expectation. - * Won't start until ALL other expectations are fullfilled. + * Won't start until ALL other expectations are fulfilled. * If any of the other expectations are not fulfilled, this wont be fulfilled either. */ - dependsOnFullfilled?: string[] + dependsOnFulfilled?: ExpectationId[] /** Reference to another expectation. - * On fullfillement, this will be triggered immediately. + * On fulfillement, this will be triggered immediately. */ - triggerByFullfilledIds?: string[] + triggerByFulfilledIds?: ExpectationId[] } /** Defines a File Copy. A File is to be copied from one of the Sources, to the Target. */ @@ -337,7 +338,7 @@ export namespace Expectation { /** Defines a PackageContainer for "Files" (ie the stuff stored on a hard drive or equivalent). Contains the various accessors that support reading files. */ export interface FileSource extends PackageContainerOnPackage { accessors: { - [accessorId: string]: + [accessorId: AccessorId]: | AccessorOnPackage.LocalFolder | AccessorOnPackage.FileShare | AccessorOnPackage.HTTP @@ -348,7 +349,7 @@ export namespace Expectation { /** Defines a PackageContainer for "Files" (ie the stuff stored on a hard drive or equivalent). Contains the various accessors that support writing files. */ export interface FileTarget extends PackageContainerOnPackage { accessors: { - [accessorId: string]: + [accessorId: AccessorId]: | AccessorOnPackage.LocalFolder | AccessorOnPackage.FileShare | AccessorOnPackage.HTTPProxy @@ -357,13 +358,13 @@ export namespace Expectation { /** Defines a PackageContainer for CorePackage (A collection in Sofie-Core accessible through an API). */ export interface CorePackage extends PackageContainerOnPackage { accessors: { - [accessorId: string]: AccessorOnPackage.CorePackageCollection + [accessorId: AccessorId]: AccessorOnPackage.CorePackageCollection } } /** Defines a PackageContainer for Quantel clips, stored on Quantel servers. */ export interface QuantelClip extends PackageContainerOnPackage { accessors: { - [accessorId: string]: AccessorOnPackage.Quantel + [accessorId: AccessorId]: AccessorOnPackage.Quantel } } } diff --git a/shared/packages/api/src/ids.ts b/shared/packages/api/src/ids.ts new file mode 100644 index 00000000..b612e342 --- /dev/null +++ b/shared/packages/api/src/ids.ts @@ -0,0 +1,31 @@ +import { ProtectedString, protectString } from './ProtectedString' + +// From Core +export type ExpectedPackageId = ProtectedString<'ExpectedPackageId', string> + +// Workforce +export type WorkforceId = ProtectedString<'WorkforceId', string> +export const WORKFORCE_ID: WorkforceId = protectString('workforce') + +// Expectation Manager: +export type ExpectationManagerId = ProtectedString<'ExpectationManagerId', string> +export type PackageContainerId = ProtectedString<'PackageContainerId', string> +// export { ExpectedPackageId } from '@sofie-automation/shared-lib/dist/core/model/Ids' + +export type WorkInProgressId = ProtectedString<'WorkInProgressId', string> + +// AppContainer: +export type AppContainerId = ProtectedString<'AppContainerId', string> +export type AppType = ProtectedString<'AppType', string> +export type AppId = WorkerAgentId // | OtherWorkerType? + +// Worker: +export type WorkerAgentId = ProtectedString<'WorkerAgentId', string> +export type MonitorId = ProtectedString<'MonitorId', string> +/** Work-in-progress id, locally unique to a Worker */ +export type WorkInProgressLocalId = ProtectedString<'WorkInProgressLocalId', string> + +// Expectations +export type ExpectationId = ProtectedString<'ExpectationId', string> + +export type AccessorId = ProtectedString<'AccessorId', string> diff --git a/shared/packages/api/src/index.ts b/shared/packages/api/src/index.ts index 2215dc17..d0d593b3 100644 --- a/shared/packages/api/src/index.ts +++ b/shared/packages/api/src/index.ts @@ -5,6 +5,7 @@ export * from './config' export * from './expectationApi' export * from './inputApi' export * from './HelpfulEventEmitter' +export * from './ids' export * from './dataStorage' export * from './lib' export * from './logger' @@ -17,3 +18,4 @@ export * from './websocketClient' export { MessageBase, MessageReply, MessageIdentifyClient, Hook, INNER_ACTION_TIMEOUT } from './websocketConnection' export * from './websocketServer' export * from './worker' +export * from './ProtectedString' diff --git a/shared/packages/api/src/inputApi.ts b/shared/packages/api/src/inputApi.ts index 9e5efb66..6ad4c4f6 100644 --- a/shared/packages/api/src/inputApi.ts +++ b/shared/packages/api/src/inputApi.ts @@ -1,5 +1,6 @@ // eslint-disable-next-line node/no-extraneous-import import { StatusCode as SofieStatusCode } from '@sofie-automation/shared-lib/dist/lib/status' +import { PackageContainerId, ExpectedPackageId, AccessorId } from './ids' // import { assertTrue, EnumExtends, assertEnumValuesExtends } from './lib' /* eslint-disable @typescript-eslint/no-namespace */ @@ -42,7 +43,7 @@ export namespace ExpectedPackage { /** Generic (used in extends) */ export interface Base { /** Unique id of the expectedPackage */ - _id: string + _id: ExpectedPackageId /** Reference to which timeline-layer(s) the Package is going to be used in. * (Used to route the package to the right playout-device (targets)) */ @@ -72,19 +73,19 @@ export namespace ExpectedPackage { */ sources: { /** Reference to a PackageContainer */ - containerId: string + containerId: PackageContainerId /** Locally defined Accessors, these are combined (deep extended) with the PackageContainer (if it is found) Accessors */ - accessors: { [accessorId: string]: AccessorOnPackage.Any } + accessors: Record }[] /** The sideEffect is used by the Package Manager to generate extra artifacts, such as thumbnails & previews */ sideEffect: { /** Which container previews are to be put into */ - previewContainerId?: string | null // null is used to disable the sideEffect + previewContainerId?: PackageContainerId | null // null is used to disable the sideEffect previewPackageSettings?: SideEffectPreviewSettings | null /** Which container thumbnails are to be put into */ - thumbnailContainerId?: string | null // null is used to disable the sideEffect + thumbnailContainerId?: PackageContainerId | null // null is used to disable the sideEffect thumbnailPackageSettings?: SideEffectThumbnailSettings | null /** Should the package be scanned for loudness */ @@ -138,9 +139,9 @@ export namespace ExpectedPackage { checkSumType?: 'sha' | 'md5' | 'whatever' } sources: { - containerId: string + containerId: PackageContainerId accessors: { - [accessorId: string]: + [accessorId: AccessorId]: | AccessorOnPackage.LocalFolder | AccessorOnPackage.FileShare | AccessorOnPackage.HTTP @@ -167,8 +168,8 @@ export namespace ExpectedPackage { cloneId?: number } sources: { - containerId: string - accessors: { [accessorId: string]: AccessorOnPackage.Quantel } + containerId: PackageContainerId + accessors: { [accessorId: AccessorId]: AccessorOnPackage.Quantel } }[] } @@ -180,9 +181,9 @@ export namespace ExpectedPackage { } version: any // {} sources: { - containerId: string + containerId: PackageContainerId accessors: { - [accessorId: string]: + [accessorId: AccessorId]: | AccessorOnPackage.HTTP | AccessorOnPackage.HTTPProxy | AccessorOnPackage.LocalFolder @@ -203,7 +204,7 @@ export interface PackageContainer { label: string /** A list of ways to access the PackageContainer. Note: The accessors are different ways to access THE SAME PackageContainer. */ - accessors: { [accessorId: string]: Accessor.Any } + accessors: { [accessorId: AccessorId]: Accessor.Any } } /** Defines different ways of accessing a PackageContainer. @@ -361,10 +362,10 @@ export namespace AccessorOnPackage { } export interface PackageContainerOnPackage extends Omit { - containerId: string + containerId: PackageContainerId /** Short name, for displaying to user */ label: string - accessors: { [accessorId: string]: AccessorOnPackage.Any } + accessors: { [accessorId: AccessorId]: AccessorOnPackage.Any } } // Note: Not re-exporting ExpectedPackageStatusAPI in this file, since that is purely a Sofie-Core API diff --git a/shared/packages/api/src/lib.ts b/shared/packages/api/src/lib.ts index 0f475d89..db50e241 100644 --- a/shared/packages/api/src/lib.ts +++ b/shared/packages/api/src/lib.ts @@ -1,5 +1,6 @@ import crypto from 'crypto' import { compact } from 'underscore' +import { AnyProtectedString } from './ProtectedString' /** Helper function to force the input to be of a certain type. */ export function literal(o: T): T { @@ -269,16 +270,16 @@ export function isNodeRunningInDebugMode(): boolean { */ export function deferGets( fcn: (...args: Args) => Promise -): (groupId: string, ...args: Args) => Promise { +): (groupId: string | AnyProtectedString, ...args: Args) => Promise { const defers = new Map< - string, + string | AnyProtectedString, { resolve: (value: Result) => void reject: (err: any) => void }[] >() - return async (groupId: string, ...args: Args) => { + return async (groupId: string | AnyProtectedString, ...args: Args) => { return new Promise((resolve, reject) => { // Check if there already is a call waiting: const waiting = defers.get(groupId) @@ -317,7 +318,7 @@ export function removeUndefinedProperties(o)) { if (value !== undefined) o2[key] = value } return o2 as T @@ -326,3 +327,19 @@ export function ensureValidValue(value: T, check: (value: any) => boolean, de if (check(value)) return value return defaultValue } +/** + * Convenience method to map entries of a Map. + * Array.from(myMap.entries()).map(([key, value]) => console.log(key, value)) + * mapEntries(myMap, (key, value) => console.log(key, value)) + */ +export function mapEntries(map: Map, cb: (key: K, value: V) => R): R[] { + return Array.from(map.entries()).map(([key, value]) => cb(key, value)) +} +/** + * Convenience method to find() a value in a Map. + */ +export function findValue(map: Map, cb: (key: K, value: V) => boolean): V | undefined { + const found = Array.from(map.entries()).find(([key, value]) => cb(key, value)) + if (found === undefined) return undefined + return found[1] +} diff --git a/shared/packages/api/src/methods.ts b/shared/packages/api/src/methods.ts index 77bc4a4e..af079c9e 100644 --- a/shared/packages/api/src/methods.ts +++ b/shared/packages/api/src/methods.ts @@ -7,7 +7,7 @@ import { ReturnTypeDisposePackageContainerMonitors, ReturnTypeDoYouSupportExpectation, ReturnTypeDoYouSupportPackageContainer, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, ReturnTypeRunPackageContainerCronJob, @@ -17,6 +17,20 @@ import { WorkerStatusReport, WorkforceStatusReport } from './statusReport' import { LogLevel } from './logger' import { ExpectedPackage, StatusCode } from './inputApi' import { Statuses } from './status' +import { + AppContainerId, + AppId, + AppType, + PackageContainerId, + ExpectedPackageId, + ExpectationManagerId, + MonitorId, + WorkerAgentId, + WorkforceId, + WorkInProgressLocalId, +} from './ids' +import { DataId, LockId } from './dataStorage' +import { PartyId } from './websocketConnection' /** Contains textual descriptions for statuses. */ export type Reason = ExpectedPackageStatusAPI.Reason @@ -24,24 +38,31 @@ export type Reason = ExpectedPackageStatusAPI.Reason * This file contains API definitions for the methods used to communicate between the Workforce, Worker and Expectation-Manager. */ +export interface MethodsInterfaceBase { + /** Id of the party that calls the methods */ + id: PartyId +} + /** Methods used by ExpectationManager and WorkForce */ export namespace WorkForceExpectationManager { /** Methods on WorkForce, called by ExpectationManager */ - export interface WorkForce { + export interface WorkForce extends MethodsInterfaceBase { + id: ExpectationManagerId setLogLevel: (logLevel: LogLevel) => Promise - setLogLevelOfApp: (appId: string, logLevel: LogLevel) => Promise - _debugKillApp(appId: string): Promise + setLogLevelOfApp: (appId: AppId, logLevel: LogLevel) => Promise + _debugKillApp(appId: AppId): Promise _debugSendKillConnections(): Promise getStatusReport: () => Promise requestResourcesForExpectation: (exp: Expectation.Any) => Promise requestResourcesForPackageContainer: (packageContainer: PackageContainerExpectation) => Promise - registerExpectationManager: (managerId: string, url: string) => Promise + registerExpectationManager: (managerId: ExpectationManagerId, url: string) => Promise } /** Methods on ExpectationManager, called by WorkForce */ // eslint-disable-next-line @typescript-eslint/no-empty-interface - export interface ExpectationManager { + export interface ExpectationManager extends MethodsInterfaceBase { + id: WorkforceId setLogLevel: (logLevel: LogLevel) => Promise _debugKill: () => Promise _debugSendKillConnections: () => Promise @@ -53,38 +74,41 @@ export namespace WorkForceExpectationManager { /** Methods used by WorkForce and WorkerAgent */ export namespace WorkForceWorkerAgent { /** Methods on WorkerAgent, called by WorkForce */ - export interface WorkerAgent { + export interface WorkerAgent extends MethodsInterfaceBase { + id: WorkforceId setLogLevel: (logLevel: LogLevel) => Promise _debugKill: () => Promise _debugSendKillConnections: () => Promise getStatusReport: () => Promise - expectationManagerAvailable: (id: string, url: string) => Promise - expectationManagerGone: (id: string) => Promise + expectationManagerAvailable: (id: ExpectationManagerId, url: string) => Promise + expectationManagerGone: (id: ExpectationManagerId) => Promise } /** Methods on WorkForce, called by WorkerAgent */ - export interface WorkForce { - getExpectationManagerList: () => Promise<{ id: string; url: string }[]> + export interface WorkForce extends MethodsInterfaceBase { + id: WorkerAgentId + getExpectationManagerList: () => Promise<{ id: ExpectationManagerId; url: string }[]> } } /** Methods used by ExpectedManager and WorkerAgent */ export namespace ExpectationManagerWorkerAgent { /** Methods on WorkerAgent, called by ExpectedManager */ - export interface WorkerAgent { + export interface WorkerAgent extends MethodsInterfaceBase { + id: ExpectationManagerId doYouSupportExpectation: (exp: Expectation.Any) => Promise getCostForExpectation: (exp: Expectation.Any) => Promise isExpectationReadyToStartWorkingOn: ( exp: Expectation.Any ) => Promise - isExpectationFullfilled: ( + isExpectationFulfilled: ( exp: Expectation.Any, - wasFullfilled: boolean - ) => Promise + wasFulfilled: boolean + ) => Promise workOnExpectation: (exp: Expectation.Any, cost: ExpectationCost, timeout: number) => Promise removeExpectation: (exp: Expectation.Any) => Promise - cancelWorkInProgress: (wipId: number) => Promise + cancelWorkInProgress: (wipId: WorkInProgressLocalId) => Promise // PackageContainer-related methods: doYouSupportPackageContainer: ( @@ -97,27 +121,37 @@ export namespace ExpectationManagerWorkerAgent { packageContainer: PackageContainerExpectation ) => Promise disposePackageContainerMonitors: ( - packageContainerId: string + packageContainerId: PackageContainerId ) => Promise } /** Methods on ExpectedManager, called by WorkerAgent */ - export interface ExpectationManager { + export interface ExpectationManager extends MethodsInterfaceBase { + id: WorkerAgentId messageFromWorker: (message: MessageFromWorkerPayload.Any) => Promise // Events emitted from a workInProgress: - wipEventProgress: (wipId: number, actualVersionHash: string | null, progress: number) => Promise - wipEventDone: (wipId: number, actualVersionHash: string, reason: Reason, result: any) => Promise - wipEventError: (wipId: number, reason: Reason) => Promise + wipEventProgress: ( + wipId: WorkInProgressLocalId, + actualVersionHash: string | null, + progress: number + ) => Promise + wipEventDone: ( + wipId: WorkInProgressLocalId, + actualVersionHash: string, + reason: Reason, + result: any + ) => Promise + wipEventError: (wipId: WorkInProgressLocalId, reason: Reason) => Promise monitorStatus: ( - packageContainerId: string, - monitorId: string, + packageContainerId: PackageContainerId, + monitorId: MonitorId, status: StatusCode, reason: Reason ) => Promise } export interface WorkInProgressInfo { - wipId: number + wipId: WorkInProgressLocalId properties: WorkInProgressProperties } export interface WorkInProgressProperties { @@ -132,7 +166,10 @@ export namespace ExpectationManagerWorkerAgent { startCost: number reason: Reason } - export type MessageFromWorker = (managerId: string, message: MessageFromWorkerPayload.Any) => Promise + export type MessageFromWorker = ( + managerId: ExpectationManagerId, + message: MessageFromWorkerPayload.Any + ) => Promise export type MessageFromWorkerSerialized = (message: MessageFromWorkerPayload.Any) => Promise // eslint-disable-next-line @typescript-eslint/no-namespace @@ -148,14 +185,14 @@ export namespace ExpectationManagerWorkerAgent { arguments: [ // type: string, - packageIds: string[] + packageIds: ExpectedPackageId[] ] } export interface UpdatePackageInfo extends Base { type: 'updatePackageInfo' arguments: [ type: string, - packageId: string, + packageId: ExpectedPackageId, expectedContentVersionHash: string, actualContentVersionHash: string, payload: any @@ -166,7 +203,7 @@ export namespace ExpectationManagerWorkerAgent { arguments: [ // type: string, - packageId: string, + packageId: ExpectedPackageId, removeDelay: number | undefined ] } @@ -174,8 +211,8 @@ export namespace ExpectationManagerWorkerAgent { type: 'reportFromMonitorPackages' arguments: [ // - containerId: string, - monitorId: string, + containerId: PackageContainerId, + monitorId: MonitorId, expectedPackages: ExpectedPackage.Any[] ] } @@ -189,34 +226,36 @@ export namespace ExpectationManagerWorkerAgent { /** Methods used by WorkForce and AppContainer */ export namespace WorkForceAppContainer { /** Methods on AppContainer, called by WorkForce */ - export interface AppContainer { + export interface AppContainer extends MethodsInterfaceBase { + id: WorkforceId setLogLevel: (logLevel: LogLevel) => Promise _debugKill: () => Promise _debugSendKillConnections: () => Promise requestAppTypeForExpectation: ( exp: Expectation.Any - ) => Promise<{ success: true; appType: string; cost: number } | { success: false; reason: Reason }> + ) => Promise<{ success: true; appType: AppType; cost: number } | { success: false; reason: Reason }> requestAppTypeForPackageContainer: ( packageContainer: PackageContainerExpectation - ) => Promise<{ success: true; appType: string; cost: number } | { success: false; reason: Reason }> + ) => Promise<{ success: true; appType: AppType; cost: number } | { success: false; reason: Reason }> - spinUp: ( - appType: 'worker' // | other - ) => Promise - spinDown: (appId: string, reason: string) => Promise - getRunningApps: () => Promise<{ appId: string; appType: string }[]> + spinUp: (appType: AppType) => Promise + spinDown: (appId: AppId, reason: string) => Promise + getRunningApps: () => Promise<{ appId: AppId; appType: AppType }[]> } /** Methods on WorkForce, called by AppContainer */ - export interface WorkForce { - registerAvailableApps: (availableApps: { appType: string }[]) => Promise + export interface WorkForce extends MethodsInterfaceBase { + id: AppContainerId + + registerAvailableApps: (availableApps: { appType: AppType }[]) => Promise } } /** Methods used by AppContainer and WorkerAgent */ export namespace AppContainerWorkerAgent { /** Methods on WorkerAgent, called by AppContainer */ - export interface WorkerAgent { + export interface WorkerAgent extends MethodsInterfaceBase { + id: AppContainerId setLogLevel: (logLevel: LogLevel) => Promise _debugKill: () => Promise @@ -227,13 +266,15 @@ export namespace AppContainerWorkerAgent { setSpinDownTime: (spinDownTime: number) => Promise } /** Methods on AppContainer, called by WorkerAgent */ - export interface AppContainer { + export interface AppContainer extends MethodsInterfaceBase { + id: WorkerAgentId + ping: () => Promise requestSpinDown: () => Promise - /** Aquire a write lock, the returned id is then used in workerStorageWrite to write */ - workerStorageWriteLock: (dataId: string, customTimeout?: number) => Promise<{ lockId: string; current: any }> - workerStorageReleaseLock: (dataId: string, lockId: string) => Promise - workerStorageWrite: (dataId: string, lockId: string, data: string) => Promise - workerStorageRead: (dataId: string) => Promise + /** Acquire a write lock, the returned id is then used in workerStorageWrite to write */ + workerStorageWriteLock: (dataId: DataId, customTimeout?: number) => Promise<{ lockId: LockId; current: any }> + workerStorageReleaseLock: (dataId: DataId, lockId: LockId) => Promise + workerStorageWrite: (dataId: DataId, lockId: LockId, data: string) => Promise + workerStorageRead: (dataId: DataId) => Promise } } diff --git a/shared/packages/api/src/packageContainerApi.ts b/shared/packages/api/src/packageContainerApi.ts index c9fca3bf..297184cc 100644 --- a/shared/packages/api/src/packageContainerApi.ts +++ b/shared/packages/api/src/packageContainerApi.ts @@ -1,15 +1,16 @@ +import { PackageContainerId, ExpectationManagerId } from './ids' import { PackageContainer } from './inputApi' /* - * This file contains definitions for Package Container Expectations, an internal datastructure upon which the Package Manager operates. + * This file contains definitions for Package Container Expectations, an internal data structure upon which the Package Manager operates. */ /** A PackageContainerExpectation defines what functionality to run for a Package Container. */ export interface PackageContainerExpectation extends PackageContainer { /** ID of the PackageContainer */ - id: string + id: PackageContainerId /** ID of the manager that created the expectation */ - managerId: string + managerId: ExpectationManagerId /** Defines which cronjobs are expected to run */ cronjobs: { /** How often the cronjob should run (approximately) */ diff --git a/shared/packages/api/src/status.ts b/shared/packages/api/src/status.ts index 5e544db0..14883acb 100644 --- a/shared/packages/api/src/status.ts +++ b/shared/packages/api/src/status.ts @@ -1,6 +1,7 @@ // eslint-disable-next-line node/no-extraneous-import import { StatusCode } from '@sofie-automation/server-core-integration' -export interface Statuses { - [key: string]: { message: string; statusCode: StatusCode } | null +export type Statuses = { + [key: string]: Status | null } +export type Status = { message: string; statusCode: StatusCode } diff --git a/shared/packages/api/src/statusReport.ts b/shared/packages/api/src/statusReport.ts index b8b53a59..216a0de0 100644 --- a/shared/packages/api/src/statusReport.ts +++ b/shared/packages/api/src/statusReport.ts @@ -1,20 +1,32 @@ +import { + AppContainerId, + AppType, + PackageContainerId, + ExpectationId, + ExpectationManagerId, + MonitorId, + WorkInProgressId, + WorkerAgentId, + WorkInProgressLocalId, +} from './ids' + export interface WorkforceStatusReport { workerAgents: WorkerStatusReport[] expectationManagers: { - id: string + id: ExpectationManagerId url?: string }[] appContainers: { - id: string + id: AppContainerId initialized: boolean availableApps: { - appType: string + appType: AppType }[] }[] } export interface ExpectationManagerStatusReport { - id: string + id: ExpectationManagerId updated: number expectationStatistics: { countTotal: number @@ -32,23 +44,23 @@ export interface ExpectationManagerStatusReport { } times: { [key: string]: number } workerAgents: { - workerId: string + workerId: WorkerAgentId }[] worksInProgress: { - id: string + id: WorkInProgressId lastUpdated: number - workerId: string + workerId: WorkerAgentId cost: number label: string progress: number - expectationId: string + expectationId: ExpectationId }[] } export interface WorkerStatusReport { - id: string + id: WorkerAgentId activeMonitors: { - containerId: string - monitorId: string + containerId: PackageContainerId + monitorId: MonitorId label: string }[] @@ -56,7 +68,7 @@ export interface WorkerStatusReport { cost: number startCost: number cancelled: boolean - wipId: number + wipId: WorkInProgressLocalId progress: number lastUpdated: number }[] diff --git a/shared/packages/api/src/websocketClient.ts b/shared/packages/api/src/websocketClient.ts index e87998e7..86711cda 100644 --- a/shared/packages/api/src/websocketClient.ts +++ b/shared/packages/api/src/websocketClient.ts @@ -1,10 +1,10 @@ import WebSocket from 'ws' import { stringifyError } from './lib' import { LoggerInstance } from './logger' -import { MessageBase, MessageIdentifyClient, PING_TIME, WebsocketConnection } from './websocketConnection' +import { PartyId, MessageBase, MessageIdentifyClient, PING_TIME, WebsocketConnection } from './websocketConnection' /** A Class which handles a connection to a Websocket server */ -export class WebsocketClient extends WebsocketConnection { +export class WebsocketClient extends WebsocketConnection { private pingTimeout?: NodeJS.Timeout private RETRY_CONNECT_TIME = 3000 private closed = false @@ -16,7 +16,7 @@ export class WebsocketClient extends WebsocketConnection { private logger: LoggerInstance constructor( logger: LoggerInstance, - private readonly id: string, + private readonly id: ID, private readonly url: string, private readonly clientType: MessageIdentifyClient['clientType'], onMessage: (message: MessageBase) => Promise @@ -50,11 +50,12 @@ export class WebsocketClient extends WebsocketConnection { ws.once('open', () => { this.watchForHeartbeat() - const message: MessageIdentifyClient = { + const message = { internalType: 'identify_client', clientType: this.clientType, id: this.id, - } + } as MessageIdentifyClient + ws.send(JSON.stringify(message)) this.emit('connected') diff --git a/shared/packages/api/src/websocketConnection.ts b/shared/packages/api/src/websocketConnection.ts index 18368728..56fa901f 100644 --- a/shared/packages/api/src/websocketConnection.ts +++ b/shared/packages/api/src/websocketConnection.ts @@ -2,6 +2,10 @@ import WebSocket from 'ws' import { HelpfulEventEmitter } from './HelpfulEventEmitter' import { stringifyError } from './lib' +import { AppContainerId, ExpectationManagerId, WorkerAgentId, WorkforceId } from './ids' +import { MethodsInterfaceBase } from './methods' +import { ProtectedString } from './ProtectedString' + export const PING_TIME = 10 * 1000 /** * Timeout of messages. @@ -134,11 +138,49 @@ export interface MessageReply { result?: any error?: string } -export interface MessageIdentifyClient { +export type MessageIdentifyClient = + | MessageIdentifyClientNotAssigned + | MessageIdentifyClientWorkerAgent + | MessageIdentifyClientExpectationManager + | MessageIdentifyClientAppContainer + +export interface MessageIdentifyClientBase extends MessageBase { internalType: 'identify_client' - clientType: 'N/A' | 'workerAgent' | 'expectationManager' | 'appContainer' - id: string } +export interface MessageIdentifyClientNotAssigned extends MessageIdentifyClientBase { + clientType: 'N/A' + id: NotAssignedPartyId +} +export interface MessageIdentifyClientWorkerAgent extends MessageIdentifyClientBase { + clientType: 'workerAgent' + id: WorkerAgentId +} +export interface MessageIdentifyClientExpectationManager extends MessageIdentifyClientBase { + clientType: 'expectationManager' + id: ExpectationManagerId +} +export interface MessageIdentifyClientAppContainer extends MessageIdentifyClientBase { + clientType: 'appContainer' + id: AppContainerId +} +export function isMessageIdentifyClient(message: unknown): message is MessageIdentifyClient { + return Boolean(typeof message === 'object' && message && (message as any).internalType === 'identify_client') +} + +export type NotAssignedPartyId = ProtectedString<'NotAssigned', string> + +/** Ids of any communicating parties */ +export type PartyId = + | NotAssignedPartyId + | WorkerAgentId + | ExpectationManagerId + | AppContainerId + | WorkforceId + | ExpectationManagerId + | AppContainerId /** A Hook defines */ -export type Hook = (clientId: string, clientHook: ClientMethods) => ServerMethods +export type Hook = ( + otherId: ServerMethods['id'], + clientHook: Omit +) => ServerMethods diff --git a/shared/packages/api/src/websocketServer.ts b/shared/packages/api/src/websocketServer.ts index c6bf62a2..5d7d0267 100644 --- a/shared/packages/api/src/websocketServer.ts +++ b/shared/packages/api/src/websocketServer.ts @@ -1,9 +1,17 @@ import WebSocket from 'ws' import { stringifyError } from './lib' -import { MessageBase, MessageIdentifyClient, PING_TIME, WebsocketConnection } from './websocketConnection' +import { + PartyId, + MessageBase, + MessageIdentifyClient, + PING_TIME, + WebsocketConnection, + isMessageIdentifyClient, +} from './websocketConnection' import { HelpfulEventEmitter } from './HelpfulEventEmitter' import { LoggerInstance } from './logger' +import { protectString } from './ProtectedString' export type OnMessageHandler = (message: MessageBase) => Promise @@ -72,8 +80,8 @@ export class ClientConnection extends WebsocketConnection { private pingInterval: NodeJS.Timeout private hasReceivedPingFromClient = true private failedPingCount = 0 - public clientType: ClientType = 'N/A' - public clientId = 'N/A' + public clientType: MessageIdentifyClient['clientType'] = 'N/A' + public clientId: PartyId = protectString('N/A') private isClosed = false private logger: LoggerInstance @@ -118,10 +126,9 @@ export class ClientConnection extends WebsocketConnection { this.ws.on('message', (messageStr: string) => { const message = JSON.parse(messageStr) - if (message.internalType === 'identify_client') { - const ident = message as unknown as MessageIdentifyClient - this.clientType = ident.clientType - this.clientId = ident.id + if (isMessageIdentifyClient(message)) { + this.clientType = message.clientType + this.clientId = message.id this.emit('clientTypeReceived') } else { @@ -145,4 +152,3 @@ export class ClientConnection extends WebsocketConnection { this._onLostConnection() } } -export type ClientType = MessageIdentifyClient['clientType'] diff --git a/shared/packages/api/src/worker.ts b/shared/packages/api/src/worker.ts index 9144b68c..948c4c13 100644 --- a/shared/packages/api/src/worker.ts +++ b/shared/packages/api/src/worker.ts @@ -2,6 +2,7 @@ * This file contains API definitions for the Worker methods */ +import { MonitorId, WorkerAgentId } from './ids' import { Reason } from './methods' export type ReturnTypeDoYouSupportExpectation = @@ -32,7 +33,7 @@ export type ReturnTypeIsExpectationReadyToStartWorkingOn = isWaitingForAnother?: boolean reason: Reason } -export type ReturnTypeIsExpectationFullfilled = +export type ReturnTypeIsExpectationFulfilled = | { fulfilled: true } @@ -51,7 +52,7 @@ export type ReturnTypeRemoveExpectation = /** Configurations for any of the workers */ export interface WorkerAgentConfig { - workerId: string + workerId: WorkerAgentId /** * The time to wait when determining if the source package is stable or not (this is used to wait for growing files) * Set to 0 to disable the stability check. @@ -93,7 +94,7 @@ export type ReturnTypeDisposePackageContainerMonitors = export type ReturnTypeSetupPackageContainerMonitors = | { success: true - monitors: { [monitorId: string]: MonitorProperties } + monitors: Record } | { success: false diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts index c258062f..0b1baf99 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts @@ -17,9 +17,9 @@ export async function evaluateExpectationStateFulfilled({ timeSinceLastEvaluation, }: EvaluateContext): Promise { assertState(trackedExp, ExpectedPackageStatusAPI.WorkStatusState.FULFILLED) - // TODO: Some monitor that is able to invalidate if it isn't fullfilled anymore? + // TODO: Some monitor that is able to invalidate if it isn't fulfilled anymore? - if (timeSinceLastEvaluation > tracker.getFullfilledWaitTime()) { + if (timeSinceLastEvaluation > tracker.getFulfilledWaitTime()) { if (!trackedExp.session) trackedExp.session = {} await manager.workerAgents.assignWorkerToSession(trackedExp) if (trackedExp.session.assignedWorker) { @@ -39,12 +39,12 @@ export async function evaluateExpectationStateFulfilled({ if (!notFulfilledReason) { // Check if it is still fulfilled: - const fulfilled = await trackedExp.session.assignedWorker.worker.isExpectationFullfilled( + const fulfilled = await trackedExp.session.assignedWorker.worker.isExpectationFulfilled( trackedExp.exp, true ) if (!fulfilled.fulfilled) { - // It appears like it's not fullfilled anymore + // It appears like it's not fulfilled anymore notFulfilledReason = fulfilled.reason } } @@ -67,7 +67,7 @@ export async function evaluateExpectationStateFulfilled({ }) } else { // Yes it is still fullfiled - // No need to update the tracked state, since it's already fullfilled: + // No need to update the tracked state, since it's already fulfilled: // this.updateTrackedExp(trackedExp, WorkStatusState.FULFILLED, fulfilled.reason) } } catch (error) { diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/new.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/new.ts index 0a107772..49bf9f6b 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/new.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/new.ts @@ -19,7 +19,7 @@ export async function evaluateExpectationStateNew({ manager, tracker, trackedExp trackedExp ) - const availableWorkersCount = Object.keys(trackedExp.availableWorkers).length + const availableWorkersCount = trackedExp.availableWorkers.size if (availableWorkersCount > 0) { if (hasQueriedAnyone) { tracker.trackedExpectationAPI.updateTrackedExpectationStatus(trackedExp, { @@ -40,7 +40,7 @@ export async function evaluateExpectationStateNew({ manager, tracker, trackedExp }) } } else { - if (!Object.keys(trackedExp.queriedWorkers).length) { + if (!trackedExp.queriedWorkers.size) { if (!workerCount) { tracker.trackedExpectationAPI.updateTrackedExpectationStatus(trackedExp, { state: ExpectedPackageStatusAPI.WorkStatusState.NEW, @@ -69,7 +69,7 @@ export async function evaluateExpectationStateNew({ manager, tracker, trackedExp user: `Found no workers who supports this Expectation, due to: ${trackedExp.noAvailableWorkersReason.user}`, tech: `Found no workers who supports this Expectation: "${ trackedExp.noAvailableWorkersReason.tech - }", have asked workers: [${Object.keys(trackedExp.queriedWorkers).join(',')}]`, + }", have asked workers: [${Array.from(trackedExp.queriedWorkers.keys()).join(',')}]`, }, // Don't update the package status, since we don't know anything about the package yet: dontUpdatePackage: true, diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts index 7cbb6ce7..e236376b 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts @@ -25,7 +25,7 @@ export async function evaluateExpectationStateWaiting({ if (trackedExp.session.assignedWorker) { try { // First, check if it is already fulfilled: - const fulfilled = await trackedExp.session.assignedWorker.worker.isExpectationFullfilled( + const fulfilled = await trackedExp.session.assignedWorker.worker.isExpectationFulfilled( trackedExp.exp, false ) @@ -34,7 +34,7 @@ export async function evaluateExpectationStateWaiting({ tracker.trackedExpectationAPI.updateTrackedExpectationStatus(trackedExp, { state: ExpectedPackageStatusAPI.WorkStatusState.FULFILLED, }) - if (tracker.trackedExpectationAPI.onExpectationFullfilled(trackedExp)) { + if (tracker.trackedExpectationAPI.onExpectationFulfilled(trackedExp)) { // Something was triggered, run again ASAP: trackedExp.session.triggerOtherExpectationsAgain = true } @@ -66,7 +66,7 @@ export async function evaluateExpectationStateWaiting({ } else { // Not ready to start if (readyToStart.isWaitingForAnother) { - // Not ready to start because it's waiting for another expectation to be fullfilled first + // Not ready to start because it's waiting for another expectation to be fulfilled first // Stay here in WAITING state: tracker.trackedExpectationAPI.updateTrackedExpectationStatus(trackedExp, { reason: readyToStart.reason, diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluationRunner.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluationRunner.ts index 39f4f4a6..d6054c3b 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluationRunner.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluationRunner.ts @@ -2,9 +2,11 @@ import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' import { diff, + ExpectationId, literal, LoggerInstance, - PackageContainerExpectation, + objectEntries, + objectSize, Reason, StatusCode, stringifyError, @@ -19,7 +21,7 @@ import { TrackedPackageContainerExpectation } from '../lib/trackedPackageContain /** * The EvaluationRunner goes through one pass of evaluation of expectations. - * When an evaulation is scheduled to run, + * When an evaluation is scheduled to run, * a new instance of EvaluationRunner is created, then the async .run() method is called. * After .run() is done, the instance is not used again. */ @@ -86,13 +88,11 @@ export class EvaluationRunner { const cancelPromises: Promise[] = [] // Added / Changed Expectations - for (const id of Object.keys(this.tracker.receivedUpdates.expectations)) { - const exp = this.tracker.receivedUpdates.expectations[id] - + for (const exp of this.tracker.receivedUpdates.getExpectations()) { let diffExplanation: string | null = null let difference: null | 'new' | 'major' | 'minor' = null - const existingtrackedExp = this.tracker.trackedExpectations.get(id) + const existingtrackedExp = this.tracker.trackedExpectations.get(exp.id) if (!existingtrackedExp) { // new difference = 'new' @@ -120,7 +120,7 @@ export class EvaluationRunner { if (difference === 'new' || difference === 'major') { const newTrackedExp = getDefaultTrackedExpectation(exp, existingtrackedExp) - this.tracker.trackedExpectations.upsert(id, newTrackedExp) + this.tracker.trackedExpectations.upsert(exp.id, newTrackedExp) if (difference === 'new') { this.tracker.trackedExpectationAPI.updateTrackedExpectationStatus(newTrackedExp, { state: ExpectedPackageStatusAPI.WorkStatusState.NEW, @@ -145,7 +145,7 @@ export class EvaluationRunner { } else if (difference === 'minor') { // A minor update doesn't require a full re-evaluation of the expectation. - const trackedExp = this.tracker.trackedExpectations.get(id) + const trackedExp = this.tracker.trackedExpectations.get(exp.id) if (trackedExp) { this.logger.debug( `Minor update of expectation "${expLabel(trackedExp)}": ${diff(existingtrackedExp?.exp, exp)}` @@ -162,7 +162,7 @@ export class EvaluationRunner { if (!trackedExp) continue trackedExp.errorCount = 0 // Also reset the errorCount, to start fresh. - if (!this.tracker.receivedUpdates.expectations[id]) { + if (!this.tracker.receivedUpdates.expectationExist(id)) { // This expectation has been removed // TODO: handled removed expectations! @@ -187,12 +187,12 @@ export class EvaluationRunner { // Restarted Expectations: if (this.tracker.receivedUpdates.restartAllExpectations) { for (const id of this.tracker.trackedExpectations.getIds()) { - this.tracker.receivedUpdates.restartExpectations[id] = true + this.tracker.receivedUpdates.restartExpectations(id) } } this.tracker.receivedUpdates.restartAllExpectations = false - for (const id of Object.keys(this.tracker.receivedUpdates.restartExpectations)) { + for (const id of this.tracker.receivedUpdates.getRestartExpectations()) { const trackedExp = this.tracker.trackedExpectations.get(id) if (trackedExp) { if (trackedExp.state == ExpectedPackageStatusAPI.WorkStatusState.WORKING) { @@ -214,10 +214,10 @@ export class EvaluationRunner { trackedExp.lastEvaluationTime = 0 // To rerun ASAP } } - this.tracker.receivedUpdates.restartExpectations = {} + this.tracker.receivedUpdates.clearRestartExpectations() // Aborted: - for (const id of Object.keys(this.tracker.receivedUpdates.abortExpectations)) { + for (const id of this.tracker.receivedUpdates.getAbortExpectations()) { const trackedExp = this.tracker.trackedExpectations.get(id) if (trackedExp) { if (trackedExp.state == ExpectedPackageStatusAPI.WorkStatusState.WORKING) { @@ -238,7 +238,7 @@ export class EvaluationRunner { }) } } - this.tracker.receivedUpdates.abortExpectations = {} + this.tracker.receivedUpdates.clearAbortExpectations() // We have now handled all new updates: this.tracker.receivedUpdates.expectationsHasBeenUpdated = false @@ -259,7 +259,7 @@ export class EvaluationRunner { const times: { [key: string]: number } = {} - const removeIds: string[] = [] + const removeIds: ExpectationId[] = [] const tracked = this.tracker.trackedExpectations.list() @@ -377,16 +377,13 @@ export class EvaluationRunner { this.tracker.receivedUpdates.packageContainersHasBeenUpdated = false // Added / Changed - for (const containerId of Object.keys(this.tracker.receivedUpdates.packageContainers)) { - const packageContainer: PackageContainerExpectation = - this.tracker.receivedUpdates.packageContainers[containerId] - + for (const packageContainer of this.tracker.receivedUpdates.getPackageContainers()) { let isNew = false let isUpdated = false let trackedPackageContainer: TrackedPackageContainerExpectation - const existingPackageContainer = this.tracker.trackedPackageContainers.get(containerId) + const existingPackageContainer = this.tracker.trackedPackageContainers.get(packageContainer.id) if (!existingPackageContainer) { // Is new @@ -394,7 +391,7 @@ export class EvaluationRunner { isUpdated = true trackedPackageContainer = { - id: containerId, + id: packageContainer.id, packageContainer: packageContainer, currentWorker: null, waitingForWorkerTime: null, @@ -410,13 +407,13 @@ export class EvaluationRunner { monitors: {}, }, } - this.tracker.trackedPackageContainers.upsert(containerId, trackedPackageContainer) + this.tracker.trackedPackageContainers.upsert(packageContainer.id, trackedPackageContainer) } else { trackedPackageContainer = existingPackageContainer if (!_.isEqual(existingPackageContainer.packageContainer, packageContainer)) { isUpdated = true - } else if (this.tracker.receivedUpdates.restartPackageContainers[containerId]) { + } else if (this.tracker.receivedUpdates.isRestartPackageContainer(packageContainer.id)) { isUpdated = true } } @@ -451,7 +448,7 @@ export class EvaluationRunner { // Removed: for (const trackedPackageContainer of this.tracker.trackedPackageContainers.list()) { const containerId = trackedPackageContainer.id - if (!this.tracker.receivedUpdates.packageContainers[containerId]) { + if (!this.tracker.receivedUpdates.getPackageContainer(containerId)) { // This packageContainersExpectation has been removed if (trackedPackageContainer.currentWorker) { @@ -494,7 +491,7 @@ export class EvaluationRunner { } } - this.tracker.receivedUpdates.restartPackageContainers = {} + this.tracker.receivedUpdates.clearRestartExpectations() } private async _evaluateAllTrackedPackageContainers(): Promise { for (const trackedPackageContainer of this.tracker.trackedPackageContainers.list()) { @@ -563,7 +560,7 @@ export class EvaluationRunner { } }) ) - if (Object.keys(trackedPackageContainer.packageContainer.accessors).length > 0) { + if (objectSize(trackedPackageContainer.packageContainer.accessors) > 0) { if (!trackedPackageContainer.currentWorker) { if (this.manager.workerAgents.list().length) { notSupportReason = { @@ -618,7 +615,7 @@ export class EvaluationRunner { continue // Break further execution for this PackageContainer } - if (Object.keys(trackedPackageContainer.packageContainer.monitors).length !== 0) { + if (objectSize(trackedPackageContainer.packageContainer.monitors) !== 0) { if (!trackedPackageContainer.monitorIsSetup) { const monitorSetup = await workerAgent.api.setupPackageContainerMonitors( trackedPackageContainer.packageContainer @@ -627,7 +624,7 @@ export class EvaluationRunner { trackedPackageContainer.status.monitors = {} if (monitorSetup.success) { trackedPackageContainer.monitorIsSetup = true - for (const [monitorId, monitor] of Object.entries(monitorSetup.monitors)) { + for (const [monitorId, monitor] of objectEntries(monitorSetup.monitors)) { if (trackedPackageContainer.status.monitors[monitorId]) { // In case there no monitor status has been emitted yet: this.tracker.trackedPackageContainerAPI.updateTrackedPackageContainerMonitorStatus( diff --git a/shared/packages/expectationManager/src/expectationManager.ts b/shared/packages/expectationManager/src/expectationManager.ts index 4d6b3ef5..f4ff9f3a 100644 --- a/shared/packages/expectationManager/src/expectationManager.ts +++ b/shared/packages/expectationManager/src/expectationManager.ts @@ -10,6 +10,12 @@ import { Statuses, Hook, WorkForceExpectationManager, + ExpectationManagerId, + PackageContainerId, + ExpectationId, + ExpectedPackageId, + AppId, + WorkerAgentId, } from '@sofie-package-manager/api' import { InternalManager } from './internalManager/internalManager' import { ExpectationTrackerConstants } from './lib/constants' @@ -23,7 +29,7 @@ export class ExpectationManager { private internalManager: InternalManager constructor( logger: LoggerInstance, - managerId: string, + managerId: ExpectationManagerId, serverOptions: ExpectationManagerServerOptions, serverAccessBaseUrl: string | undefined, workForceConnectionOptions: ClientConnectionOptions, @@ -60,32 +66,34 @@ export class ExpectationManager { > { return this.internalManager.getWorkerAgentHook() } - removeWorkerAgentHook(clientId: string): void { + removeWorkerAgentHook(clientId: WorkerAgentId): void { return this.internalManager.removeWorkerAgentHook(clientId) } resetWork(): void { this.internalManager.resetWork() } - get managerId(): string { + get managerId(): ExpectationManagerId { return this.internalManager.managerId } /** Called when there is an updated set of PackageContainerExpectations. */ - updatePackageContainerExpectations(packageContainers: { [id: string]: PackageContainerExpectation }): void { + updatePackageContainerExpectations( + packageContainers: Record + ): void { // We store the incoming expectations here, so that we don't modify anything in the middle of the _evaluateExpectations() iteration loop. - this.internalManager.tracker.receivedUpdates.packageContainers = packageContainers + this.internalManager.tracker.receivedUpdates.setPackageContainers(packageContainers) this.internalManager.tracker.triggerEvaluationNow() } /** Called when there is an updated set of Expectations. */ - updateExpectations(expectations: { [id: string]: Expectation.Any }): void { + updateExpectations(expectations: Record): void { // We store the incoming expectations here, so that we don't modify anything in the middle of the _evaluateExpectations() iteration loop. - this.internalManager.tracker.receivedUpdates.expectations = expectations + this.internalManager.tracker.receivedUpdates.setExpectations(expectations) this.internalManager.tracker.triggerEvaluationNow() } /** Request that an Expectation is restarted. This functions returns immediately, not waiting for a result. */ - restartExpectation(expectationId: string): void { - this.internalManager.tracker.receivedUpdates.restartExpectations[expectationId] = true + restartExpectation(expectationId: ExpectationId): void { + this.internalManager.tracker.receivedUpdates.restartExpectations(expectationId) this.internalManager.tracker.triggerEvaluationNow() } /** Request that all Expectations are restarted. This functions returns immediately, not waiting for a result. */ @@ -98,12 +106,12 @@ export class ExpectationManager { * Any future attempts to check on the Expectation will be ignored. * To un-Abort, call this.restartExpectation(). * This functions returns immediately, not waiting for a result. */ - abortExpectation(expectationId: string): void { - this.internalManager.tracker.receivedUpdates.abortExpectations[expectationId] = true + abortExpectation(expectationId: ExpectationId): void { + this.internalManager.tracker.receivedUpdates.abortExpectations(expectationId) this.internalManager.tracker.triggerEvaluationNow() } - restartPackageContainer(containerId: string): void { - this.internalManager.tracker.receivedUpdates.restartPackageContainers[containerId] = true + restartPackageContainer(containerId: PackageContainerId): void { + this.internalManager.tracker.receivedUpdates.restartPackageContainers(containerId) this.internalManager.tracker.triggerEvaluationNow() } @@ -121,7 +129,7 @@ export class ExpectationManager { expectationManager: this.internalManager.statusReport.get(), } } - async debugKillApp(appId: string): Promise { + async debugKillApp(appId: AppId): Promise { return this.internalManager.workforceConnection.workforceAPI._debugKillApp(appId) } } @@ -144,7 +152,7 @@ export type MessageFromWorker = (message: ExpectationManagerWorkerAgent.MessageF export interface ExpectationManagerCallbacks { reportExpectationStatus: ( - expectationId: string, + expectationId: ExpectationId, expectaction: Expectation.Any | null, actualVersionHash: string | null, statusInfo: { @@ -156,12 +164,12 @@ export interface ExpectationManagerCallbacks { } ) => void reportPackageContainerPackageStatus: ( - containerId: string, - packageId: string, + containerId: PackageContainerId, + packageId: ExpectedPackageId, packageStatus: Omit | null ) => void reportPackageContainerExpectationStatus: ( - containerId: string, + containerId: PackageContainerId, statusInfo: ExpectedPackageStatusAPI.PackageContainerStatus | null ) => void messageFromWorker: MessageFromWorker diff --git a/shared/packages/expectationManager/src/expectationTracker/expectationTracker.ts b/shared/packages/expectationManager/src/expectationTracker/expectationTracker.ts index 36577968..91aad591 100644 --- a/shared/packages/expectationManager/src/expectationTracker/expectationTracker.ts +++ b/shared/packages/expectationManager/src/expectationTracker/expectationTracker.ts @@ -1,4 +1,11 @@ -import { HelpfulEventEmitter, LoggerInstance, Reason, StatusCode } from '@sofie-package-manager/api' +import { + HelpfulEventEmitter, + LoggerInstance, + Reason, + StatusCode, + PackageContainerId, + MonitorId, +} from '@sofie-package-manager/api' import { EvaluationScheduler } from './lib/evaluationScheduler' import { ExpectationManagerCallbacks } from '../expectationManager' import { ListeningExpectationsStorage } from './lib/listeningExpectationsStorage' @@ -83,7 +90,7 @@ export class ExpectationTracker extends HelpfulEventEmitter { } /** Returns the appropriate time to wait before checking a fulfilled expectation again */ - public getFullfilledWaitTime(): number { + public getFulfilledWaitTime(): number { return ( // Default minimum time to wait: this.constants.FULLFILLED_MONITOR_TIME + @@ -93,8 +100,8 @@ export class ExpectationTracker extends HelpfulEventEmitter { } /** Called when there is a monitor-status-update from a worker */ public async onMonitorStatus( - packageContainerId: string, - monitorId: string, + packageContainerId: PackageContainerId, + monitorId: MonitorId, status: StatusCode, reason: Reason ): Promise { diff --git a/shared/packages/expectationManager/src/expectationTracker/lib/listeningExpectationsStorage.ts b/shared/packages/expectationManager/src/expectationTracker/lib/listeningExpectationsStorage.ts index 4b8ea228..27b83916 100644 --- a/shared/packages/expectationManager/src/expectationTracker/lib/listeningExpectationsStorage.ts +++ b/shared/packages/expectationManager/src/expectationTracker/lib/listeningExpectationsStorage.ts @@ -1,14 +1,14 @@ -import { LoggerInstance } from '@sofie-package-manager/api' +import { ExpectationId, LoggerInstance } from '@sofie-package-manager/api' import { ExpectationTracker } from '../expectationTracker' /** Keeps track of which Expectations are waiting for the fullfillment of other Expectations */ export class ListeningExpectationsStorage { /** - * key-value store of which expectations are triggered when another is fullfilled. + * key-value store of which expectations are triggered when another is fulfilled. * The value is a list of the expectations that listen to the fullfillment * The key is the id of the expectation they are listening to */ - private _listeningExpectations: { [fullfilledId: string]: string[] } = {} + private _listeningExpectations: Map = new Map() private logger: LoggerInstance constructor(logger: LoggerInstance, private tracker: ExpectationTracker) { @@ -19,29 +19,29 @@ export class ListeningExpectationsStorage { * Repopulate the cache of which expectations are listening to whom */ public rePopulate(): void { - this._listeningExpectations = {} + this._listeningExpectations.clear() // Go through all expectations: for (const trackedExp of this.tracker.getSortedTrackedExpectations()) { - if (trackedExp.exp.triggerByFullfilledIds) { + if (trackedExp.exp.triggerByFulfilledIds) { // Go through the ids of expectations that are listening to this expextation: - for (const listeningToId of trackedExp.exp.triggerByFullfilledIds) { + for (const listeningToId of trackedExp.exp.triggerByFulfilledIds) { if (listeningToId === trackedExp.id) { - this.logger.warn( - `triggerByFullfilledIds not allowed to contain it's own id: "${trackedExp.id}"` - ) + this.logger.warn(`triggerByFulfilledIds not allowed to contain it's own id: "${trackedExp.id}"`) continue // ignore references to self } - if (!this._listeningExpectations[listeningToId]) { - this._listeningExpectations[listeningToId] = [] + let listening = this._listeningExpectations.get(listeningToId) + if (!listening) { + listening = [] + this._listeningExpectations.set(listeningToId, listening) } - this._listeningExpectations[listeningToId].push(trackedExp.id) + listening.push(trackedExp.id) } } } } /** Returns a list of the expectations that are listening to this id */ - public getListeningExpectations(id: string): string[] { - return this._listeningExpectations[id] || [] + public getListeningExpectations(id: ExpectationId): ExpectationId[] { + return this._listeningExpectations.get(id) ?? [] } } diff --git a/shared/packages/expectationManager/src/expectationTracker/lib/trackedExpectationAPI.ts b/shared/packages/expectationManager/src/expectationTracker/lib/trackedExpectationAPI.ts index 2f957da2..66eaf92c 100644 --- a/shared/packages/expectationManager/src/expectationTracker/lib/trackedExpectationAPI.ts +++ b/shared/packages/expectationManager/src/expectationTracker/lib/trackedExpectationAPI.ts @@ -110,7 +110,7 @@ export class TrackedExpectationAPI { workerAgent: WorkerAgentAPI, trackedExp: TrackedExpectation ): Promise { - // First check if the Expectation depends on the fullfilled-status of another Expectation: + // First check if the Expectation depends on the fulfilled-status of another Expectation: const waitingFor = this.isExpectationWaitingForOther(trackedExp) if (waitingFor) { @@ -128,10 +128,10 @@ export class TrackedExpectationAPI { } /** Checks if the expectation is waiting for another expectation, and returns the awaited Expectation, otherwise null */ public isExpectationWaitingForOther(trackedExp: TrackedExpectation): TrackedExpectation | null { - if (trackedExp.exp.dependsOnFullfilled?.length) { - // Check if those are fullfilled: + if (trackedExp.exp.dependsOnFulfilled?.length) { + // Check if those are fulfilled: let waitingFor: TrackedExpectation | undefined = undefined - for (const id of trackedExp.exp.dependsOnFullfilled) { + for (const id of trackedExp.exp.dependsOnFulfilled) { const trackedExp = this.tracker.trackedExpectations.get(id) if (trackedExp && trackedExp.state !== ExpectedPackageStatusAPI.WorkStatusState.FULFILLED) { waitingFor = trackedExp @@ -145,14 +145,14 @@ export class TrackedExpectationAPI { return null } /** - * To be called when trackedExp.status turns fullfilled. - * Triggers any other expectations that listens to (are dependant on) the fullfilled one. + * To be called when trackedExp.status turns fulfilled. + * Triggers any other expectations that listens to (are dependant on) the fulfilled one. * @returns true if any other expectations where triggered (ie evaluation should run again ASAP) */ - public onExpectationFullfilled(fullfilledExp: TrackedExpectation): boolean { + public onExpectationFulfilled(fulfilledExp: TrackedExpectation): boolean { let hasTriggeredSomething = false - if (fullfilledExp.state === ExpectedPackageStatusAPI.WorkStatusState.FULFILLED) { - const expectationsToTrigger = this.tracker.listeningExpectations.getListeningExpectations(fullfilledExp.id) + if (fulfilledExp.state === ExpectedPackageStatusAPI.WorkStatusState.FULFILLED) { + const expectationsToTrigger = this.tracker.listeningExpectations.getListeningExpectations(fulfilledExp.id) // Go through the listening expectations and mark them to be re-evaluated ASAP: for (const id of expectationsToTrigger) { diff --git a/shared/packages/expectationManager/src/expectationTracker/lib/trackedExpectationsStorage.ts b/shared/packages/expectationManager/src/expectationTracker/lib/trackedExpectationsStorage.ts index c219be3b..a8a57f0d 100644 --- a/shared/packages/expectationManager/src/expectationTracker/lib/trackedExpectationsStorage.ts +++ b/shared/packages/expectationManager/src/expectationTracker/lib/trackedExpectationsStorage.ts @@ -1,20 +1,21 @@ +import { ExpectationId } from '@sofie-package-manager/api' import { sortTrackedExpectations, TrackedExpectation } from '../../lib/trackedExpectation' import { ExpectationTracker } from '../expectationTracker' /** Storage for Expectations */ export class TrackedExpectationsStorage { - private trackedExpectations: { [id: string]: TrackedExpectation } = {} + private trackedExpectations: Map = new Map() private cacheIsDirty = true - private cacheIds: string[] = [] + private cacheIds: ExpectationId[] = [] private cacheList: TrackedExpectation[] = [] constructor(private tracker: ExpectationTracker) {} - public get(id: string): TrackedExpectation | undefined { - return this.trackedExpectations[id] + public get(id: ExpectationId): TrackedExpectation | undefined { + return this.trackedExpectations.get(id) } - public getIds(): string[] { + public getIds(): ExpectationId[] { this.updateCache() return this.cacheIds } @@ -26,18 +27,18 @@ export class TrackedExpectationsStorage { return this.cacheList } /** Add or Update a tracked Expectation */ - public upsert(id: string, trackedExp: TrackedExpectation): void { + public upsert(id: ExpectationId, trackedExp: TrackedExpectation): void { if (trackedExp.id !== id) throw new Error(`Internal Error: upsert: id not matching trackedExpectation id!`) - this.trackedExpectations[id] = trackedExp + this.trackedExpectations.set(id, trackedExp) this.cacheIsDirty = true } - public remove(id: string): void { - delete this.trackedExpectations[id] + public remove(id: ExpectationId): void { + this.trackedExpectations.delete(id) this.cacheIsDirty = true } public clear(): void { - this.trackedExpectations = {} + this.trackedExpectations.clear() this.cacheIsDirty = true } diff --git a/shared/packages/expectationManager/src/expectationTracker/lib/trackedPackageContainerAPI.ts b/shared/packages/expectationManager/src/expectationTracker/lib/trackedPackageContainerAPI.ts index ed88f2f9..fdf3a9c3 100644 --- a/shared/packages/expectationManager/src/expectationTracker/lib/trackedPackageContainerAPI.ts +++ b/shared/packages/expectationManager/src/expectationTracker/lib/trackedPackageContainerAPI.ts @@ -1,6 +1,6 @@ // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' -import { deepEqual, Reason, StatusCode } from '@sofie-package-manager/api' +import { deepEqual, MonitorId, Reason, StatusCode, unprotectString } from '@sofie-package-manager/api' import { TrackedPackageContainerExpectation } from '../../lib/trackedPackageContainerExpectation' import { ExpectationTracker } from '../expectationTracker' @@ -41,7 +41,7 @@ export class TrackedPackageContainerAPI { /** Update the status of a PackageContainer monitor */ public updateTrackedPackageContainerMonitorStatus( trackedPackageContainer: TrackedPackageContainerExpectation, - monitorId: string, + monitorId: MonitorId, monitorLabel: string | undefined, status: StatusCode, statusReason: Reason @@ -50,16 +50,17 @@ export class TrackedPackageContainerAPI { let updatedStatus = false trackedPackageContainer.status.statusChanged = Date.now() + const monitorIdStr = unprotectString(monitorId) - const existingMonitorStatus = trackedPackageContainer.status.monitors[monitorId] + const existingMonitorStatus = trackedPackageContainer.status.monitors[monitorIdStr] const newMonitorStatus: ExpectedPackageStatusAPI.PackageContainerMonitorStatus = { - label: monitorLabel || existingMonitorStatus?.label || monitorId, + label: monitorLabel || existingMonitorStatus?.label || monitorIdStr, status: status, statusReason: statusReason, } if (!existingMonitorStatus || !deepEqual(existingMonitorStatus, newMonitorStatus)) { - trackedPackageContainer.status.monitors[monitorId] = newMonitorStatus + trackedPackageContainer.status.monitors[monitorIdStr] = newMonitorStatus updatedStatus = true } diff --git a/shared/packages/expectationManager/src/expectationTracker/lib/trackedPackageContainersStorage.ts b/shared/packages/expectationManager/src/expectationTracker/lib/trackedPackageContainersStorage.ts index 2c56f989..0d54273a 100644 --- a/shared/packages/expectationManager/src/expectationTracker/lib/trackedPackageContainersStorage.ts +++ b/shared/packages/expectationManager/src/expectationTracker/lib/trackedPackageContainersStorage.ts @@ -1,17 +1,18 @@ +import { PackageContainerId } from '@sofie-package-manager/api' import { TrackedPackageContainerExpectation } from '../../lib/trackedPackageContainerExpectation' /** Storage for Tracked PackageContainerExpectations*/ export class TrackedPackageContainersStorage { - private trackedPackageContainers: { [id: string]: TrackedPackageContainerExpectation } = {} + private trackedPackageContainers: Map = new Map() private cacheIsDirty = true - private cacheIds: string[] = [] + private cacheIds: PackageContainerId[] = [] private cacheList: TrackedPackageContainerExpectation[] = [] - public get(containerId: string): TrackedPackageContainerExpectation | undefined { - return this.trackedPackageContainers[containerId] + public get(containerId: PackageContainerId): TrackedPackageContainerExpectation | undefined { + return this.trackedPackageContainers.get(containerId) } - public getIds(): string[] { + public getIds(): PackageContainerId[] { this.updateCache() return this.cacheIds } @@ -23,26 +24,26 @@ export class TrackedPackageContainersStorage { return this.cacheList } /** Add or Update a tracked PackageContainer */ - public upsert(containerId: string, trackedPackageContainer: TrackedPackageContainerExpectation): void { + public upsert(containerId: PackageContainerId, trackedPackageContainer: TrackedPackageContainerExpectation): void { if (trackedPackageContainer.id !== containerId) throw new Error(`Internal Error: upsert: id not matching packageContainer id!`) - this.trackedPackageContainers[containerId] = trackedPackageContainer + this.trackedPackageContainers.set(containerId, trackedPackageContainer) this.cacheIsDirty = true } - public remove(containerId: string): void { - delete this.trackedPackageContainers[containerId] + public remove(containerId: PackageContainerId): void { + this.trackedPackageContainers.delete(containerId) this.cacheIsDirty = true } public clear(): void { - this.trackedPackageContainers = {} + this.trackedPackageContainers.clear() this.cacheIsDirty = true } private updateCache(): void { if (!this.cacheIsDirty) return - this.cacheList = Object.values(this.trackedPackageContainers) + this.cacheList = Array.from(this.trackedPackageContainers.values()) this.cacheIds = this.cacheList.map((e) => e.id) this.cacheIsDirty = false diff --git a/shared/packages/expectationManager/src/expectationTracker/lib/trackedReceivedUpdates.ts b/shared/packages/expectationManager/src/expectationTracker/lib/trackedReceivedUpdates.ts index e969e8ac..997a4fb7 100644 --- a/shared/packages/expectationManager/src/expectationTracker/lib/trackedReceivedUpdates.ts +++ b/shared/packages/expectationManager/src/expectationTracker/lib/trackedReceivedUpdates.ts @@ -1,36 +1,44 @@ -import { Expectation, PackageContainerExpectation } from '@sofie-package-manager/api' +import { + PackageContainerId, + Expectation, + ExpectationId, + PackageContainerExpectation, + ensureArray, + AnyProtectedString, + objectKeys, +} from '@sofie-package-manager/api' import _ from 'underscore' /** Store for various incoming data, to be processed on next iteration round */ export class TrackedReceivedUpdates { /** Store for incoming Expectations */ - private _expectations: { [id: string]: Expectation.Any } = {} + private _expectations: Map = new Map() /** Set to true when there have been changes to expectations.receivedUpdates */ private _expectationsHasBeenUpdated = false /** Store for incoming Restart-calls */ - private _restartExpectations: { [id: string]: true } = {} + private _restartExpectations: Set = new Set() /** Store for incoming Abort-calls */ - private _abortExpectations: { [id: string]: true } = {} + private _abortExpectations: Set = new Set() /** Store for incoming RestartAll-calls */ private _restartAllExpectations = false /** Store for incoming PackageContainerExpectations */ - private _packageContainers: { [id: string]: PackageContainerExpectation } = {} + private _packageContainers: Map = new Map() /** Set to true when there have been changes to expectations.receivedUpdates */ private _packageContainersHasBeenUpdated = false /** Store for incoming restart-container calls */ - private _restartPackageContainers: { [containerId: string]: true } = {} + private _restartPackageContainers: Set = new Set() public clear(): void { - this._expectations = {} + this._expectations.clear() this._expectationsHasBeenUpdated = false - this._packageContainers = {} + this._packageContainers.clear() this._packageContainersHasBeenUpdated = false - this._restartExpectations = {} - this._abortExpectations = {} - this._restartPackageContainers = {} + this._restartExpectations.clear() + this._abortExpectations.clear() + this._restartPackageContainers.clear() this._restartAllExpectations = false } @@ -40,35 +48,50 @@ export class TrackedReceivedUpdates { public set expectationsHasBeenUpdated(value: boolean) { this._expectationsHasBeenUpdated = value } - public get expectations(): { [id: string]: Expectation.Any } { - return this._expectations + // public get expectations(): Map { + // return this._expectations + // } + getExpectations(): IterableIterator { + return this._expectations.values() } - public set expectations(value: { [id: string]: Expectation.Any }) { - if (!_.isEqual(this._expectations, value)) { - this._expectations = value + expectationExist(id: ExpectationId): boolean { + return this._expectations.has(id) + } + public setExpectations(newValues: Record): void { + const changed = this.setMap(this._expectations, newValues) + if (changed) { this._expectationsHasBeenUpdated = true } } - public get restartExpectations(): { [id: string]: true } { - return this._restartExpectations - } - public set restartExpectations(value: { [id: string]: true }) { - if (!_.isEqual(this._restartExpectations, value)) { - this._restartExpectations = value - this._expectationsHasBeenUpdated = true + public getRestartExpectations(): ExpectationId[] { + return Array.from(this._restartExpectations.values()) + } + public restartExpectations(ids: ExpectationId | ExpectationId[]): void { + for (const id of ensureArray(ids)) { + if (!this._restartExpectations.has(id)) { + this._restartExpectations.add(id) + this._expectationsHasBeenUpdated = true + } } } - - public get abortExpectations(): { [id: string]: true } { - return this._abortExpectations + public clearRestartExpectations(): void { + this._restartExpectations.clear() } - public set abortExpectations(value: { [id: string]: true }) { - if (!_.isEqual(this._abortExpectations, value)) { - this._abortExpectations = value - this._expectationsHasBeenUpdated = true + public getAbortExpectations(): ExpectationId[] { + return Array.from(this._abortExpectations.values()) + } + public abortExpectations(ids: ExpectationId | ExpectationId[]): void { + for (const id of ensureArray(ids)) { + if (!this._abortExpectations.has(id)) { + this._abortExpectations.add(id) + this._expectationsHasBeenUpdated = true + } } } + public clearAbortExpectations(): void { + this._abortExpectations.clear() + } public get restartAllExpectations(): boolean { return this._restartAllExpectations @@ -86,19 +109,55 @@ export class TrackedReceivedUpdates { public set packageContainersHasBeenUpdated(value: boolean) { this._packageContainersHasBeenUpdated = value } - public get packageContainers(): { [id: string]: PackageContainerExpectation } { - return this._packageContainers + + public getPackageContainers(): PackageContainerExpectation[] { + return Array.from(this._packageContainers.values()) } - public set packageContainers(value: { [id: string]: PackageContainerExpectation }) { - this._packageContainers = value - this._packageContainersHasBeenUpdated = true + public getPackageContainer(id: PackageContainerId): PackageContainerExpectation | undefined { + return this._packageContainers.get(id) + } + public setPackageContainers(newMap: Record): void { + const changed = this.setMap(this._packageContainers, newMap) + if (changed) { + this._packageContainersHasBeenUpdated = true + } } - public get restartPackageContainers(): { [containerId: string]: true } { - return this._restartPackageContainers + public isRestartPackageContainer(containerId: PackageContainerId): boolean { + return this._restartPackageContainers.has(containerId) + } + public restartPackageContainers(containerIds: PackageContainerId | PackageContainerId[]): void { + for (const containerId of ensureArray(containerIds)) { + if (!this._restartPackageContainers.has(containerId)) { + this._restartPackageContainers.add(containerId) + this._packageContainersHasBeenUpdated = true + } + } } - public set restartPackageContainers(value: { [containerId: string]: true }) { - this._restartPackageContainers = value - this._packageContainersHasBeenUpdated = true + + private setMap( + existing: Map, + incoming: Record + ): boolean { + let changed = false + for (const id of _.uniq([...existing.keys(), ...objectKeys(incoming)])) { + const incomingValue = incoming[id] as T | undefined + + if (!_.isEqual(existing.get(id), incomingValue)) { + if (incomingValue) { + // ensure that the id is the same as the key: + if (incomingValue.id !== id) + throw new Error(`key "${id}" does not match .id property "${incomingValue.id}"`) + + existing.set(id, incomingValue) + } else { + existing.delete(id) + } + + changed = true + } + } + + return changed } } diff --git a/shared/packages/expectationManager/src/expectationTracker/lib/workInProgressTracker.ts b/shared/packages/expectationManager/src/expectationTracker/lib/workInProgressTracker.ts index 508ac3f7..6b813867 100644 --- a/shared/packages/expectationManager/src/expectationTracker/lib/workInProgressTracker.ts +++ b/shared/packages/expectationManager/src/expectationTracker/lib/workInProgressTracker.ts @@ -1,6 +1,15 @@ // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' -import { ExpectationManagerWorkerAgent, LoggerInstance, Reason, stringifyError } from '@sofie-package-manager/api' +import { + ExpectationManagerWorkerAgent, + LoggerInstance, + Reason, + WorkInProgressId, + WorkInProgressLocalId, + WorkerAgentId, + protectString, + stringifyError, +} from '@sofie-package-manager/api' import { expLabel, TrackedExpectation } from '../../lib/trackedExpectation' import { ExpectationTracker } from '../expectationTracker' import { WorkerAgentAPI } from '../../workerAgentApi' @@ -10,27 +19,27 @@ import { WorkerAgentAPI } from '../../workerAgentApi' * It receives update-events from a Worker */ export class WorkInProgressTracker { - private worksInProgress: { [id: string]: WorkInProgress } = {} + private worksInProgress: Map = new Map() private logger: LoggerInstance constructor(logger: LoggerInstance, private tracker: ExpectationTracker) { this.logger = logger.category('WIPTracker') } - public getWorksInProgress(): { [id: string]: WorkInProgress } { + public getWorksInProgress(): Map { return this.worksInProgress } - public upsert(workerId: string, wipId: number, wip: WorkInProgress): void { - this.worksInProgress[this.getId(workerId, wipId)] = wip + public upsert(workerId: WorkerAgentId, wipId: WorkInProgressLocalId, wip: WorkInProgress): void { + this.worksInProgress.set(this.getId(workerId, wipId), wip) } - private get(id: string): WorkInProgress | undefined { - return this.worksInProgress[id] + private get(id: WorkInProgressId): WorkInProgress | undefined { + return this.worksInProgress.get(id) } - private remove(id: string): void { - delete this.worksInProgress[id] + private remove(id: WorkInProgressId): void { + this.worksInProgress.delete(id) } /** Monitor the Works in progress, to restart them if necessary. */ public checkWorksInProgress(): void { - for (const [wipId, wip] of Object.entries(this.worksInProgress)) { + for (const [wipId, wip] of this.worksInProgress.entries()) { if (wip.trackedExp.state === ExpectedPackageStatusAPI.WorkStatusState.WORKING) { if (Date.now() - wip.lastUpdated > this.tracker.constants.WORK_TIMEOUT_TIME) { // It seems that the work has stalled.. @@ -66,12 +75,12 @@ export class WorkInProgressTracker { } /** Called when there is a progress-message from a worker */ public async onWipEventProgress( - clientId: string, - wipId: number, + clientId: WorkerAgentId, + wipId: WorkInProgressLocalId, actualVersionHash: string | null, progress: number ): Promise { - const wip = this.worksInProgress[`${clientId}_${wipId}`] + const wip = this.worksInProgress.get(this.getId(clientId, wipId)) if (wip) { wip.lastUpdated = Date.now() if (wip.trackedExp.state === ExpectedPackageStatusAPI.WorkStatusState.WORKING) { @@ -91,8 +100,8 @@ export class WorkInProgressTracker { } /** Called when there is a done-message from a worker */ public async onWipEventDone( - workerId: string, - wipId: number, + workerId: WorkerAgentId, + wipId: WorkInProgressLocalId, actualVersionHash: string, reason: Reason, _result: unknown @@ -112,7 +121,7 @@ export class WorkInProgressTracker { }, }) - if (this.tracker.trackedExpectationAPI.onExpectationFullfilled(wip.trackedExp)) { + if (this.tracker.trackedExpectationAPI.onExpectationFulfilled(wip.trackedExp)) { // Something was triggered, run again asap. // We should reevaluate asap, so that any other expectation which might be waiting on this work could start. this.tracker.triggerEvaluationNow() @@ -126,8 +135,8 @@ export class WorkInProgressTracker { } } /** Called when there is a error-message from a worker */ - public async onWipEventError(clientId: string, wipId: number, reason: Reason): Promise { - const wip = this.worksInProgress[this.getId(clientId, wipId)] + public async onWipEventError(clientId: WorkerAgentId, wipId: WorkInProgressLocalId, reason: Reason): Promise { + const wip = this.worksInProgress.get(this.getId(clientId, wipId)) if (wip) { wip.lastUpdated = Date.now() if (wip.trackedExp.state === ExpectedPackageStatusAPI.WorkStatusState.WORKING) { @@ -140,20 +149,20 @@ export class WorkInProgressTracker { } else { // Expectation not in WORKING state, ignore } - delete this.worksInProgress[`${clientId}_${wipId}`] + this.worksInProgress.delete(this.getId(clientId, wipId)) } else { // not found, ignore } } - private getId(workerId: string, wipId: number): string { - return `${workerId}_${wipId}` + private getId(workerId: WorkerAgentId, wipId: WorkInProgressLocalId): WorkInProgressId { + return protectString(`${workerId}_${wipId}`) } } export interface WorkInProgress { - wipId: number + wipId: WorkInProgressLocalId properties: ExpectationManagerWorkerAgent.WorkInProgressProperties trackedExp: TrackedExpectation - workerId: string + workerId: WorkerAgentId worker: WorkerAgentAPI cost: number startCost: number diff --git a/shared/packages/expectationManager/src/expectationTracker/lib/workerScaler.ts b/shared/packages/expectationManager/src/expectationTracker/lib/workerScaler.ts index 08e0f448..ff26c549 100644 --- a/shared/packages/expectationManager/src/expectationTracker/lib/workerScaler.ts +++ b/shared/packages/expectationManager/src/expectationTracker/lib/workerScaler.ts @@ -64,7 +64,7 @@ export class WorkerScaler { exp.state === ExpectedPackageStatusAPI.WorkStatusState.READY /** Not supported by any worker */ - const notSupportedByAnyWorker: boolean = Object.keys(exp.availableWorkers).length === 0 + const notSupportedByAnyWorker: boolean = exp.availableWorkers.size === 0 /** No worker has had time to work on it lately */ const notAssignedToAnyWorker: boolean = !!exp.noWorkerAssignedTime && diff --git a/shared/packages/expectationManager/src/internalManager/internalManager.ts b/shared/packages/expectationManager/src/internalManager/internalManager.ts index f6ed20b9..94a44ac0 100644 --- a/shared/packages/expectationManager/src/internalManager/internalManager.ts +++ b/shared/packages/expectationManager/src/internalManager/internalManager.ts @@ -7,6 +7,11 @@ import { Reason, removeUndefinedProperties, stringifyError, + ExpectationManagerId, + WorkerAgentId, + WorkInProgressLocalId, + PackageContainerId, + MonitorId, } from '@sofie-package-manager/api' import { WorkerAgentAPI } from '../workerAgentApi' @@ -46,7 +51,7 @@ export class InternalManager { constructor( logger: LoggerInstance, - public readonly managerId: string, + public readonly managerId: ExpectationManagerId, serverOptions: ExpectationManagerServerOptions, /** At what url the ExpectationManager can be reached on */ serverAccessBaseUrl: string | undefined, @@ -117,11 +122,11 @@ export class InternalManager { ExpectationManagerWorkerAgent.ExpectationManager, ExpectationManagerWorkerAgent.WorkerAgent > { - return (clientId: string, clientMethods: ExpectationManagerWorkerAgent.WorkerAgent) => { + return (clientId: WorkerAgentId, clientMethods) => { // On connection from a workerAgent const workerAgentMethods = this.getWorkerAgentAPI(clientId) - const api = new WorkerAgentAPI(workerAgentMethods, { + const api = new WorkerAgentAPI(this.managerId, workerAgentMethods, { type: 'internal', hookMethods: clientMethods, }) @@ -130,7 +135,7 @@ export class InternalManager { return workerAgentMethods } } - removeWorkerAgentHook(clientId: string): void { + removeWorkerAgentHook(clientId: WorkerAgentId): void { const workerAgent = this.workerAgents.get(clientId) if (!workerAgent) throw new Error(`WorkerAgent "${clientId}" not found!`) @@ -142,8 +147,9 @@ export class InternalManager { } /** Return the API-methods that the ExpectationManager exposes to the WorkerAgent */ - public getWorkerAgentAPI(clientId: string): ExpectationManagerWorkerAgent.ExpectationManager { + public getWorkerAgentAPI(clientId: WorkerAgentId): ExpectationManagerWorkerAgent.ExpectationManager { return { + id: clientId, messageFromWorker: async ( message: ExpectationManagerWorkerAgent.MessageFromWorkerPayload.Any ): Promise => { @@ -151,26 +157,26 @@ export class InternalManager { }, wipEventProgress: async ( - wipId: number, + wipId: WorkInProgressLocalId, actualVersionHash: string | null, progress: number ): Promise => { await this.tracker.worksInProgress.onWipEventProgress(clientId, wipId, actualVersionHash, progress) }, wipEventDone: async ( - wipId: number, + wipId: WorkInProgressLocalId, actualVersionHash: string, reason: Reason, result: any ): Promise => { await this.tracker.worksInProgress.onWipEventDone(clientId, wipId, actualVersionHash, reason, result) }, - wipEventError: async (wipId: number, reason: Reason): Promise => { + wipEventError: async (wipId: WorkInProgressLocalId, reason: Reason): Promise => { await this.tracker.worksInProgress.onWipEventError(clientId, wipId, reason) }, monitorStatus: async ( - packageContainerId: string, - monitorId: string, + packageContainerId: PackageContainerId, + monitorId: MonitorId, status: StatusCode, reason: Reason ) => { diff --git a/shared/packages/expectationManager/src/internalManager/lib/expectationManagerServer.ts b/shared/packages/expectationManager/src/internalManager/lib/expectationManagerServer.ts index f0f28282..94efdecc 100644 --- a/shared/packages/expectationManager/src/internalManager/lib/expectationManagerServer.ts +++ b/shared/packages/expectationManager/src/internalManager/lib/expectationManagerServer.ts @@ -6,6 +6,7 @@ import { StatusCode, stringifyError, WebsocketServer, + WorkerAgentId, } from '@sofie-package-manager/api' import { ExpectationManagerServerOptions } from '../../expectationManager' import { WorkerAgentAPI } from '../../workerAgentApi' @@ -40,23 +41,24 @@ export class ExpectationManagerServer { switch (client.clientType) { case 'workerAgent': { - const expectationManagerMethods = this.manager.getWorkerAgentAPI(client.clientId) + const clientId = client.clientId as WorkerAgentId + const expectationManagerMethods = this.manager.getWorkerAgentAPI(clientId) - const api = new WorkerAgentAPI(expectationManagerMethods, { + const api = new WorkerAgentAPI(this.manager.managerId, expectationManagerMethods, { type: 'websocket', clientConnection: client, }) - this.manager.workerAgents.upsert(client.clientId, { api, connected: true }) + this.manager.workerAgents.upsert(clientId, { api, connected: true }) client.once('close', () => { - this.logger.warn(`Connection to Worker "${client.clientId}" closed`) + this.logger.warn(`Connection to Worker "${clientId}" closed`) - const workerAgent = this.manager.workerAgents.get(client.clientId) + const workerAgent = this.manager.workerAgents.get(clientId) if (workerAgent) { workerAgent.connected = false - this.manager.workerAgents.remove(client.clientId) + this.manager.workerAgents.remove(clientId) } }) - this.logger.info(`Connection to Worker "${client.clientId}" established`) + this.logger.info(`Connection to Worker "${clientId}" established`) this.manager.tracker.triggerEvaluationNow() break } diff --git a/shared/packages/expectationManager/src/internalManager/lib/statusReportCache.ts b/shared/packages/expectationManager/src/internalManager/lib/statusReportCache.ts index 662d0960..a24bc7e5 100644 --- a/shared/packages/expectationManager/src/internalManager/lib/statusReportCache.ts +++ b/shared/packages/expectationManager/src/internalManager/lib/statusReportCache.ts @@ -1,7 +1,6 @@ // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' import { assertNever, ExpectationManagerStatusReport } from '@sofie-package-manager/api' - import { InternalManager } from '../internalManager' /** */ @@ -47,7 +46,7 @@ export class StatusReportCache { workerId: workerId, } }), - worksInProgress: Object.entries(this.manager.tracker.worksInProgress.getWorksInProgress()).map( + worksInProgress: Array.from(this.manager.tracker.worksInProgress.getWorksInProgress().entries()).map( ([id, wip]) => { return { id: id, @@ -83,7 +82,7 @@ export class StatusReportCache { expectationStatistics.countAborted++ } else assertNever(exp.state) - if (Object.keys(exp.availableWorkers).length === 0) { + if (exp.availableWorkers.size === 0) { expectationStatistics.countNoAvailableWorkers++ } if ( diff --git a/shared/packages/expectationManager/src/internalManager/lib/trackedWorkerAgents.ts b/shared/packages/expectationManager/src/internalManager/lib/trackedWorkerAgents.ts index 6d48c49a..88ee2513 100644 --- a/shared/packages/expectationManager/src/internalManager/lib/trackedWorkerAgents.ts +++ b/shared/packages/expectationManager/src/internalManager/lib/trackedWorkerAgents.ts @@ -1,5 +1,5 @@ import { PromisePool } from '@supercharge/promise-pool' -import { LoggerInstance, Reason, stringifyError } from '@sofie-package-manager/api' +import { LoggerInstance, Reason, WorkerAgentId, stringifyError } from '@sofie-package-manager/api' import { ExpectationStateHandlerSession, WorkerAgentAssignment } from '../../lib/types' import { WorkerAgentAPI } from '../../workerAgentApi' import { ExpectationTracker } from '../../expectationTracker/expectationTracker' @@ -7,31 +7,29 @@ import { TrackedExpectation } from '../../lib/trackedExpectation' /** Storage for WorkerAgents */ export class TrackedWorkerAgents { - private workerAgents: { - [workerId: string]: TrackedWorkerAgent - } = {} + private workerAgents: Map = new Map() private logger: LoggerInstance constructor(logger: LoggerInstance, private tracker: ExpectationTracker) { this.logger = logger.category('TrackedWorkerAgents') } - public get(workerId: string): TrackedWorkerAgent | undefined { - return this.workerAgents[workerId] + public get(workerId: WorkerAgentId): TrackedWorkerAgent | undefined { + return this.workerAgents.get(workerId) } - public list(): { workerId: string; workerAgent: TrackedWorkerAgent }[] { - return Object.entries(this.workerAgents).map(([workerId, workerAgent]) => { + public list(): { workerId: WorkerAgentId; workerAgent: TrackedWorkerAgent }[] { + return Array.from(this.workerAgents.entries()).map(([workerId, workerAgent]) => { return { workerId, workerAgent, } }) } - public upsert(workerId: string, workerAgent: TrackedWorkerAgent): void { - this.workerAgents[workerId] = workerAgent + public upsert(workerId: WorkerAgentId, workerAgent: TrackedWorkerAgent): void { + this.workerAgents.set(workerId, workerAgent) } - public remove(workerId: string): void { - delete this.workerAgents[workerId] + public remove(workerId: WorkerAgentId): void { + this.workerAgents.delete(workerId) } /** @@ -53,23 +51,21 @@ export class TrackedWorkerAgents { if (!workerAgent.connected) return // Only ask each worker once, or after a certain time has passed: - if ( - !trackedExp.queriedWorkers[workerId] || - Date.now() - trackedExp.queriedWorkers[workerId] > this.tracker.constants.WORKER_SUPPORT_TIME - ) { - trackedExp.queriedWorkers[workerId] = Date.now() + const queriedWorker = trackedExp.queriedWorkers.get(workerId) + if (!queriedWorker || Date.now() - queriedWorker > this.tracker.constants.WORKER_SUPPORT_TIME) { + trackedExp.queriedWorkers.set(workerId, Date.now()) hasQueriedAnyone = true try { const support = await workerAgent.api.doYouSupportExpectation(trackedExp.exp) if (support.support) { - trackedExp.availableWorkers[workerId] = true + trackedExp.availableWorkers.add(workerId) } else { - delete trackedExp.availableWorkers[workerId] + trackedExp.availableWorkers.delete(workerId) trackedExp.noAvailableWorkersReason = support.reason } } catch (err) { - delete trackedExp.availableWorkers[workerId] + trackedExp.availableWorkers.delete(workerId) if ((err + '').match(/timeout/i)) { trackedExp.noAvailableWorkersReason = { @@ -106,11 +102,11 @@ export class TrackedWorkerAgents { let countQueried = 0 let countInfinite = 0 - const workerIds = Object.keys(trackedExp.availableWorkers) + const workerIds = Array.from(trackedExp.availableWorkers.keys()) let noCostReason: Reason = { user: `${workerIds.length} workers are currently busy`, - tech: `${workerIds.length} busy, ${Object.keys(trackedExp.queriedWorkers).length} queried`, + tech: `${workerIds.length} busy, ${trackedExp.queriedWorkers.size} queried`, } const workerCosts: WorkerAgentAssignment[] = [] @@ -118,11 +114,11 @@ export class TrackedWorkerAgents { // We're using PromisePool to query a batch of workers at a time: await PromisePool.for(workerIds) .withConcurrency(BATCH_SIZE) - .handleError(async (error, workerId: string) => { + .handleError(async (error, workerId: WorkerAgentId) => { // Log the error this.logger.error(`Error in assignWorkerToSession for worker "${workerId}": ${stringifyError(error)}`) }) - .process(async (workerId: string) => { + .process(async (workerId: WorkerAgentId) => { // Abort if we have gotten enough answers: if (workerCosts.length >= minWorkerCount) return @@ -180,7 +176,7 @@ export class TrackedWorkerAgents { if (!session) throw new Error('ExpectationManager: Internal error: Session not set') if (session.assignedWorker) return // A worker has already been assigned - if (!Object.keys(trackedExp.availableWorkers).length) { + if (!trackedExp.availableWorkers.size) { session.noAssignedWorkerReason = { user: `No workers available`, tech: `No workers available` } } @@ -196,9 +192,7 @@ export class TrackedWorkerAgents { } else { session.noAssignedWorkerReason = { user: `Waiting for a free worker, ${noCostReason.user}`, - tech: `Waiting for a free worker ${noCostReason.tech} (${ - Object.keys(trackedExp.availableWorkers).length - } busy, ${countQueried} asked, ${countInfinite} infinite cost)`, + tech: `Waiting for a free worker ${noCostReason.tech} (${trackedExp.availableWorkers.size} busy, ${countQueried} asked, ${countInfinite} infinite cost)`, } } } diff --git a/shared/packages/expectationManager/src/internalManager/lib/workforceConnection.ts b/shared/packages/expectationManager/src/internalManager/lib/workforceConnection.ts index 711af117..15fb2558 100644 --- a/shared/packages/expectationManager/src/internalManager/lib/workforceConnection.ts +++ b/shared/packages/expectationManager/src/internalManager/lib/workforceConnection.ts @@ -1,11 +1,15 @@ import { + AppId, ClientConnectionOptions, LoggerInstance, LogLevel, setLogLevel, + Status, StatusCode, Statuses, stringifyError, + unprotectString, + WORKFORCE_ID, } from '@sofie-package-manager/api' import { WorkforceAPI } from '../../workforceApi' import { InternalManager } from '../internalManager' @@ -25,17 +29,17 @@ export class WorkforceConnection { ) { this.logger = logger.category('WorkforceConnection') - this.workforceAPI = new WorkforceAPI(this.logger) + this.workforceAPI = new WorkforceAPI(this.manager.managerId, this.logger) this.workforceAPI.on('disconnected', () => { this.logger.warn('Workforce disconnected') - this.manager.statuses.update('workforce', { + this.manager.statuses.update(unprotectString(WORKFORCE_ID), { statusCode: StatusCode.BAD, message: 'Workforce disconnected (Restart Package Manager if this persists)', }) }) this.workforceAPI.on('connected', () => { this.logger.info('Workforce connected') - this.manager.statuses.update('workforce', { statusCode: StatusCode.GOOD, message: '' }) + this.manager.statuses.update(unprotectString(WORKFORCE_ID), { statusCode: StatusCode.GOOD, message: '' }) this.workforceAPI .registerExpectationManager( @@ -55,7 +59,7 @@ export class WorkforceConnection { }) } public async init(): Promise { - await this.workforceAPI.init(this.manager.managerId, this.workForceConnectionOptions, { + await this.workforceAPI.init(this.workForceConnectionOptions, { setLogLevel: async (logLevel: LogLevel): Promise => { setLogLevel(logLevel) }, @@ -70,7 +74,7 @@ export class WorkforceConnection { await this._debugSendKillConnections() }, onWorkForceStatus: async (statuses: Statuses): Promise => { - for (const [id, status] of Object.entries(statuses)) { + for (const [id, status] of Object.entries(statuses)) { this.manager.statuses.update(`workforce-${id}`, status) } }, @@ -85,7 +89,7 @@ export class WorkforceConnection { this.workforceAPI.terminate() } - async setLogLevelOfApp(appId: string, logLevel: LogLevel): Promise { + async setLogLevelOfApp(appId: AppId, logLevel: LogLevel): Promise { return this.workforceAPI.setLogLevelOfApp(appId, logLevel) } diff --git a/shared/packages/expectationManager/src/lib/__tests__/trackedExpectation.spec.ts b/shared/packages/expectationManager/src/lib/__tests__/trackedExpectation.spec.ts index dad0e646..02d52cbb 100644 --- a/shared/packages/expectationManager/src/lib/__tests__/trackedExpectation.spec.ts +++ b/shared/packages/expectationManager/src/lib/__tests__/trackedExpectation.spec.ts @@ -1,4 +1,4 @@ -import { Expectation } from '@sofie-package-manager/api' +import { Expectation, ExpectationId, protectString } from '@sofie-package-manager/api' import { getDefaultConstants } from '../constants' import { TrackedExpectation, getDefaultTrackedExpectation, sortTrackedExpectations } from '../trackedExpectation' @@ -6,9 +6,9 @@ test('sortTrackedExpectations', () => { // ensure that sort order is correct const exp: Expectation.FileCopy = { - id: 'N/A', + id: protectString('N/A'), type: Expectation.Type.FILE_COPY, - managerId: '', + managerId: protectString(''), priority: 0, fromPackages: [], statusReport: { @@ -37,7 +37,7 @@ test('sortTrackedExpectations', () => { { ...getDefaultTrackedExpectation({ ...exp, - id: 'highest-priority', + id: protectString('highest-priority'), priority: 1, }), lastEvaluationTime: now - 10 * 1000, // 10 second ago @@ -45,7 +45,7 @@ test('sortTrackedExpectations', () => { { ...getDefaultTrackedExpectation({ ...exp, - id: 'highest-priority-recently-evaluated', + id: protectString('highest-priority-recently-evaluated'), priority: 1, }), lastEvaluationTime: now - 1000, // 1 second ago @@ -53,19 +53,19 @@ test('sortTrackedExpectations', () => { { ...getDefaultTrackedExpectation({ ...exp, - id: 'highest-priority-never-evaluated', + id: protectString('highest-priority-never-evaluated'), priority: 1, }), }, getDefaultTrackedExpectation({ ...exp, - id: 'high-priority', + id: protectString('high-priority'), priority: 10, }), { ...getDefaultTrackedExpectation({ ...exp, - id: 'high-prio-with-error', + id: protectString('high-prio-with-error'), priority: 10, }), lastError: { @@ -76,7 +76,7 @@ test('sortTrackedExpectations', () => { { ...getDefaultTrackedExpectation({ ...exp, - id: 'high-prio-with-old-error', + id: protectString('high-prio-with-old-error'), priority: 10, }), lastError: { @@ -87,7 +87,7 @@ test('sortTrackedExpectations', () => { { ...getDefaultTrackedExpectation({ ...exp, - id: 'high-prio-with-older-error', + id: protectString('high-prio-with-older-error'), priority: 10, }), lastError: { @@ -97,18 +97,18 @@ test('sortTrackedExpectations', () => { }, getDefaultTrackedExpectation({ ...exp, - id: 'medium-priority', + id: protectString('medium-priority'), priority: 50, }), getDefaultTrackedExpectation({ ...exp, - id: 'low-priority', + id: protectString('low-priority'), priority: 100, }), { ...getDefaultTrackedExpectation({ ...exp, - id: 'low-prio-with-error', + id: protectString('low-prio-with-error'), priority: 100, }), lastError: { @@ -119,7 +119,7 @@ test('sortTrackedExpectations', () => { { ...getDefaultTrackedExpectation({ ...exp, - id: 'low-prio-with-most-recent-error', + id: protectString('low-prio-with-most-recent-error'), priority: 100, }), lastError: { @@ -129,14 +129,14 @@ test('sortTrackedExpectations', () => { }, getDefaultTrackedExpectation({ ...exp, - id: 'lowest-priority', + id: protectString('lowest-priority'), priority: 999, }), ] - const trackedExpectations: { [id: string]: TrackedExpectation } = {} + const trackedExpectations: Map = new Map() tracked.forEach((tracked) => { - trackedExpectations[tracked.id] = tracked + trackedExpectations.set(tracked.id, tracked) }) const sorted = sortTrackedExpectations(trackedExpectations, getDefaultConstants()) diff --git a/shared/packages/expectationManager/src/lib/trackedExpectation.ts b/shared/packages/expectationManager/src/lib/trackedExpectation.ts index 3720d1cc..91b614c5 100644 --- a/shared/packages/expectationManager/src/lib/trackedExpectation.ts +++ b/shared/packages/expectationManager/src/lib/trackedExpectation.ts @@ -1,13 +1,13 @@ // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' -import { Expectation, Reason } from '@sofie-package-manager/api' +import { Expectation, ExpectationId, Reason, WorkerAgentId } from '@sofie-package-manager/api' import { ExpectationStateHandlerSession } from '../lib/types' import { ExpectationTrackerConstants } from './constants' /** Persistant data structure used to track the progress of an Expectation */ export interface TrackedExpectation { /** Unique ID of the tracked expectation */ - id: string + id: ExpectationId /** The Expectation */ exp: Expectation.Any @@ -20,9 +20,9 @@ export interface TrackedExpectation { prevStatusReasons: { [status: string]: Reason } /** List of worker ids that have gotten the question wether they support this expectation */ - queriedWorkers: { [workerId: string]: number } + queriedWorkers: Map /** List of worker ids that supports this Expectation */ - availableWorkers: { [workerId: string]: true } + availableWorkers: Set /** Contains the latest reason why a worker refused to support an Expectation */ noAvailableWorkersReason: Reason /** Timestamp of the last time the expectation was evaluated. */ @@ -68,10 +68,10 @@ export function expLabel(exp: TrackedExpectation): string { } export function sortTrackedExpectations( - trackedExpectations: { [id: string]: TrackedExpectation }, + trackedExpectations: Map, constants: ExpectationTrackerConstants ): TrackedExpectation[] { - const tracked: TrackedExpectation[] = Object.values(trackedExpectations) + const tracked: TrackedExpectation[] = Array.from(trackedExpectations.values()) tracked.sort((a, b) => { const aLastErrorTime: number = a.lastError?.time ?? 0 const bLastErrorTime: number = b.lastError?.time ?? 0 @@ -107,8 +107,8 @@ export function getDefaultTrackedExpectation( id: exp.id, exp: exp, state: existingtrackedExp?.state || ExpectedPackageStatusAPI.WorkStatusState.NEW, - queriedWorkers: {}, - availableWorkers: {}, + queriedWorkers: new Map(), + availableWorkers: new Set(), noAvailableWorkersReason: { user: 'Unknown reason', tech: 'N/A (init)', diff --git a/shared/packages/expectationManager/src/lib/trackedPackageContainerExpectation.ts b/shared/packages/expectationManager/src/lib/trackedPackageContainerExpectation.ts index 4c312ca9..a8eeb324 100644 --- a/shared/packages/expectationManager/src/lib/trackedPackageContainerExpectation.ts +++ b/shared/packages/expectationManager/src/lib/trackedPackageContainerExpectation.ts @@ -1,17 +1,17 @@ // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' -import { PackageContainerExpectation } from '@sofie-package-manager/api' +import { PackageContainerId, PackageContainerExpectation, WorkerAgentId } from '@sofie-package-manager/api' export interface TrackedPackageContainerExpectation { /** Unique ID of the tracked packageContainer */ - id: string + id: PackageContainerId /** The PackageContainerExpectation */ packageContainer: PackageContainerExpectation /** True whether the packageContainer was newly updated */ isUpdated: boolean /** The currently assigned Worker */ - currentWorker: string | null + currentWorker: WorkerAgentId | null /** Timestamp to track how long the packageContainer has been waiting for a worker (can't start working), used to request more resources */ waitingForWorkerTime: number | null diff --git a/shared/packages/expectationManager/src/lib/types.ts b/shared/packages/expectationManager/src/lib/types.ts index 933fb360..1c8dac93 100644 --- a/shared/packages/expectationManager/src/lib/types.ts +++ b/shared/packages/expectationManager/src/lib/types.ts @@ -1,4 +1,4 @@ -import { ExpectationManagerWorkerAgent, Reason } from '@sofie-package-manager/api' +import { ExpectationManagerWorkerAgent, Reason, WorkerAgentId } from '@sofie-package-manager/api' import { WorkerAgentAPI } from '../workerAgentApi' /** Contains some data which is persisted during an evaluation-session */ @@ -17,7 +17,7 @@ export interface ExpectationStateHandlerSession { } export interface WorkerAgentAssignment { worker: WorkerAgentAPI - id: string + id: WorkerAgentId cost: ExpectationManagerWorkerAgent.ExpectationCost randomCost: number } diff --git a/shared/packages/expectationManager/src/workerAgentApi.ts b/shared/packages/expectationManager/src/workerAgentApi.ts index 2d929f1c..49c88d1f 100644 --- a/shared/packages/expectationManager/src/workerAgentApi.ts +++ b/shared/packages/expectationManager/src/workerAgentApi.ts @@ -1,10 +1,11 @@ +import { ExpectationManagerId, PackageContainerId } from '@sofie-package-manager/api' import { ExpectationManagerWorkerAgent, AdapterServer, Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeIsExpectationReadyToStartWorkingOn, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeRemoveExpectation, AdapterServerOptions, PackageContainerExpectation, @@ -12,6 +13,7 @@ import { ReturnTypeRunPackageContainerCronJob, ReturnTypeSetupPackageContainerMonitors, ReturnTypeDisposePackageContainerMonitors, + WorkInProgressLocalId, } from '@sofie-package-manager/api' /** @@ -24,6 +26,7 @@ export class WorkerAgentAPI implements ExpectationManagerWorkerAgent.WorkerAgent { constructor( + public id: ExpectationManagerId, methods: ExpectationManagerWorkerAgent.ExpectationManager, options: AdapterServerOptions ) { @@ -44,12 +47,12 @@ export class WorkerAgentAPI // Note: This call is ultimately received in shared/packages/worker/src/workerAgent.ts return this._sendMessage('isExpectationReadyToStartWorkingOn', exp) } - async isExpectationFullfilled( + async isExpectationFulfilled( exp: Expectation.Any, - wasFullfilled: boolean - ): Promise { + wasFulfilled: boolean + ): Promise { // Note: This call is ultimately received in shared/packages/worker/src/workerAgent.ts - return this._sendMessage('isExpectationFullfilled', exp, wasFullfilled) + return this._sendMessage('isExpectationFulfilled', exp, wasFulfilled) } async workOnExpectation( exp: Expectation.Any, @@ -64,7 +67,7 @@ export class WorkerAgentAPI return this._sendMessage('removeExpectation', exp) } - async cancelWorkInProgress(wipId: number): Promise { + async cancelWorkInProgress(wipId: WorkInProgressLocalId): Promise { // Note: This call is ultimately received in shared/packages/worker/src/workerAgent.ts return this._sendMessage('cancelWorkInProgress', wipId) } @@ -89,7 +92,7 @@ export class WorkerAgentAPI return this._sendMessage('setupPackageContainerMonitors', packageContainer) } async disposePackageContainerMonitors( - packageContainerId: string + packageContainerId: PackageContainerId ): Promise { // Note: This call is ultimately received in shared/packages/worker/src/workerAgent.ts return this._sendMessage('disposePackageContainerMonitors', packageContainerId) diff --git a/shared/packages/expectationManager/src/workforceApi.ts b/shared/packages/expectationManager/src/workforceApi.ts index 62bb1302..02ebcd89 100644 --- a/shared/packages/expectationManager/src/workforceApi.ts +++ b/shared/packages/expectationManager/src/workforceApi.ts @@ -6,6 +6,8 @@ import { WorkforceStatusReport, Expectation, PackageContainerExpectation, + ExpectationManagerId, + AppId, } from '@sofie-package-manager/api' /** @@ -17,11 +19,11 @@ export class WorkforceAPI extends AdapterClient implements WorkForceExpectationManager.WorkForce { - constructor(logger: LoggerInstance) { - super(logger.category('WorkforceAPI'), 'expectationManager') + constructor(public id: ExpectationManagerId, logger: LoggerInstance) { + super(logger.category('WorkforceAPI'), id, 'expectationManager') } - async registerExpectationManager(managerId: string, url: string): Promise { + async registerExpectationManager(managerId: ExpectationManagerId, url: string): Promise { // Note: This call is ultimately received in shared/packages/workforce/src/workforce.ts return this._sendMessage('registerExpectationManager', managerId, url) } @@ -33,11 +35,11 @@ export class WorkforceAPI // Note: This call is ultimately received in shared/packages/workforce/src/workforce.ts return this._sendMessage('setLogLevel', logLevel) } - async setLogLevelOfApp(appId: string, logLevel: LogLevel): Promise { + async setLogLevelOfApp(appId: AppId, logLevel: LogLevel): Promise { // Note: This call is ultimately received in shared/packages/workforce/src/workforce.ts return this._sendMessage('setLogLevelOfApp', appId, logLevel) } - async _debugKillApp(appId: string): Promise { + async _debugKillApp(appId: AppId): Promise { // Note: This call is ultimately received in shared/packages/workforce/src/workforce.ts return this._sendMessage('_debugKillApp', appId) } diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index 45a0a4f3..1ecf1f18 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -7,383 +7,232 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **Note:** Version bump only for package @sofie-package-manager/worker - - - - # [1.50.0-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) - ### Features -* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/sofie-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) - - +- make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/sofie-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) # [1.50.0-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) - ### Features -* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/sofie-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) - - - - +- implement phase and balance measurements ([c1b7077](https://github.com/nrkno/sofie-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) ## [1.42.1](https://github.com/nrkno/sofie-package-manager/compare/v1.42.1-alpha.4...v1.42.1) (2023-06-19) **Note:** Version bump only for package @sofie-package-manager/worker - - - - ## [1.42.1-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.42.0...v1.42.1-alpha.0) (2023-06-09) - ### Bug Fixes -* URL handling was broken, because it treated URLs as file paths ([827a939](https://github.com/nrkno/sofie-package-manager/commit/827a93961e9647927aef7970af8babbab028a29e)) - - - - +- URL handling was broken, because it treated URLs as file paths ([827a939](https://github.com/nrkno/sofie-package-manager/commit/827a93961e9647927aef7970af8babbab028a29e)) # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @sofie-package-manager/worker - - - - # [1.42.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.4...v1.42.0-alpha.5) (2023-05-10) **Note:** Version bump only for package @sofie-package-manager/worker - - - - # [1.42.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.3...v1.42.0-alpha.4) (2023-05-03) **Note:** Version bump only for package @sofie-package-manager/worker - - - - # [1.42.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.2...v1.42.0-alpha.3) (2023-05-03) **Note:** Version bump only for package @sofie-package-manager/worker - - - - # [1.42.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.1...v1.42.0-alpha.2) (2023-05-03) - ### Bug Fixes -* add logging for when doing file (or other) operations. ([0407a3d](https://github.com/nrkno/tv-automation-package-manager/commit/0407a3dce15691d1d0424f730689f0230cc6736e)) -* add logging when removing dir ([1a6a102](https://github.com/nrkno/tv-automation-package-manager/commit/1a6a102cf26bfaa443d6d6002f913c87a49152fe)) -* add truePeak reporting ([51b78dd](https://github.com/nrkno/tv-automation-package-manager/commit/51b78ddc1fe2b76bea28bba6f1998ee431bf1830)) - - - - +- add logging for when doing file (or other) operations. ([0407a3d](https://github.com/nrkno/tv-automation-package-manager/commit/0407a3dce15691d1d0424f730689f0230cc6736e)) +- add logging when removing dir ([1a6a102](https://github.com/nrkno/tv-automation-package-manager/commit/1a6a102cf26bfaa443d6d6002f913c87a49152fe)) +- add truePeak reporting ([51b78dd](https://github.com/nrkno/tv-automation-package-manager/commit/51b78ddc1fe2b76bea28bba6f1998ee431bf1830)) # [1.42.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.0...v1.42.0-alpha.1) (2023-04-26) - ### Bug Fixes -* Old files where cleaned up from temporary-store prematurely. ([7025367](https://github.com/nrkno/tv-automation-package-manager/commit/70253672842ca208e6d046551886d328844b49cb)) - - - - +- Old files where cleaned up from temporary-store prematurely. ([7025367](https://github.com/nrkno/tv-automation-package-manager/commit/70253672842ca208e6d046551886d328844b49cb)) # [1.42.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-0...v1.42.0-alpha.0) (2023-04-26) - ### Bug Fixes -* **Loudness:** match only last scan result output ([c678c0b](https://github.com/nrkno/tv-automation-package-manager/commit/c678c0bce0dd75c7674502369730011d8cf480f0)) -* don't double-escape URLs ([a1a4089](https://github.com/nrkno/tv-automation-package-manager/commit/a1a40895a8efa8e04d8896264e80770395e132eb)) -* handle # in filenames and urls (%23, when URI encoded) ([c9ad9c8](https://github.com/nrkno/tv-automation-package-manager/commit/c9ad9c8d42d6ab865f3ac0b81891e1a02cbe985f)) - +- **Loudness:** match only last scan result output ([c678c0b](https://github.com/nrkno/tv-automation-package-manager/commit/c678c0bce0dd75c7674502369730011d8cf480f0)) +- don't double-escape URLs ([a1a4089](https://github.com/nrkno/tv-automation-package-manager/commit/a1a40895a8efa8e04d8896264e80770395e132eb)) +- handle # in filenames and urls (%23, when URI encoded) ([c9ad9c8](https://github.com/nrkno/tv-automation-package-manager/commit/c9ad9c8d42d6ab865f3ac0b81891e1a02cbe985f)) ### Features -* implement test ([afcd0b5](https://github.com/nrkno/tv-automation-package-manager/commit/afcd0b552f6bb66079c64162fc6f40c7f702b139)) -* support failure in ffmpeg due to referencing a non-existant channel ([bf4888d](https://github.com/nrkno/tv-automation-package-manager/commit/bf4888d1d5525b3a4ee28f8b7e60e54c16c439a7)) -* **Loudness:** Generate loduness scan of packages ([6e990d7](https://github.com/nrkno/tv-automation-package-manager/commit/6e990d7d8910cfd887317d69feb48a3a7e151589)) - +- implement test ([afcd0b5](https://github.com/nrkno/tv-automation-package-manager/commit/afcd0b552f6bb66079c64162fc6f40c7f702b139)) +- support failure in ffmpeg due to referencing a non-existant channel ([bf4888d](https://github.com/nrkno/tv-automation-package-manager/commit/bf4888d1d5525b3a4ee28f8b7e60e54c16c439a7)) +- **Loudness:** Generate loduness scan of packages ([6e990d7](https://github.com/nrkno/tv-automation-package-manager/commit/6e990d7d8910cfd887317d69feb48a3a7e151589)) ### Reverts -* Revert "chore: split out "@sofie-package-manager/input-api" to a separate package" ([8df7c18](https://github.com/nrkno/tv-automation-package-manager/commit/8df7c183d86436540b4e4b5489446d6340188b24)) - - - - +- Revert "chore: split out "@sofie-package-manager/input-api" to a separate package" ([8df7c18](https://github.com/nrkno/tv-automation-package-manager/commit/8df7c183d86436540b4e4b5489446d6340188b24)) # [1.42.0-0](https://github.com/nrkno/sofie-package-manager/compare/v1.41.1...v1.42.0-0) (2023-03-22) - ### Bug Fixes -* ensure that target file paths exists before writing to file ([2d5381d](https://github.com/nrkno/sofie-package-manager/commit/2d5381db576de694b14a3a94c26f525f75ddfd9b)) - +- ensure that target file paths exists before writing to file ([2d5381d](https://github.com/nrkno/sofie-package-manager/commit/2d5381db576de694b14a3a94c26f525f75ddfd9b)) ### Features -* Package manager placeholder ([47d2e1f](https://github.com/nrkno/sofie-package-manager/commit/47d2e1f64ffe90fe7a5fe967e83bca0befb66471)) - - - - +- Package manager placeholder ([47d2e1f](https://github.com/nrkno/sofie-package-manager/commit/47d2e1f64ffe90fe7a5fe967e83bca0befb66471)) ## [1.41.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.41.0...v1.41.1) (2023-02-22) - ### Bug Fixes -* add packageExists property to tryPackageRead() method, in order to return better sourceExists from isFileReadyToStartWorkingOn() ([ddccbbe](https://github.com/nrkno/tv-automation-package-manager/commit/ddccbbef9d7c00340cb746ad8e2645e143ea6de9)) -* adjust MESSAGE_TIMEOUT during unit tests ([2411472](https://github.com/nrkno/tv-automation-package-manager/commit/2411472811f39835985d3d86c7950d12be077b5c)) -* bug in joinUrls where it incorrectly joined the paths ("asdf/package", "//nas/folder/path") ([72b837a](https://github.com/nrkno/tv-automation-package-manager/commit/72b837acebae1eb3140400226fdcc58d91169d15)) -* packageExists value ([fc7e5c6](https://github.com/nrkno/tv-automation-package-manager/commit/fc7e5c6275eefcca86c9c4c124d9fc5bd7b809fa)) - - - - +- add packageExists property to tryPackageRead() method, in order to return better sourceExists from isFileReadyToStartWorkingOn() ([ddccbbe](https://github.com/nrkno/tv-automation-package-manager/commit/ddccbbef9d7c00340cb746ad8e2645e143ea6de9)) +- adjust MESSAGE_TIMEOUT during unit tests ([2411472](https://github.com/nrkno/tv-automation-package-manager/commit/2411472811f39835985d3d86c7950d12be077b5c)) +- bug in joinUrls where it incorrectly joined the paths ("asdf/package", "//nas/folder/path") ([72b837a](https://github.com/nrkno/tv-automation-package-manager/commit/72b837acebae1eb3140400226fdcc58d91169d15)) +- packageExists value ([fc7e5c6](https://github.com/nrkno/tv-automation-package-manager/commit/fc7e5c6275eefcca86c9c4c124d9fc5bd7b809fa)) # [1.41.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.41.0-alpha.1...v1.41.0) (2023-02-03) **Note:** Version bump only for package @sofie-package-manager/worker - - - - # [1.41.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.41.0-alpha.0...v1.41.0-alpha.1) (2023-02-03) **Note:** Version bump only for package @sofie-package-manager/worker - - - - # [1.41.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.40.2...v1.41.0-alpha.0) (2023-01-27) - ### Bug Fixes -* CachedQuantelGateway: ([6597efe](https://github.com/nrkno/tv-automation-package-manager/commit/6597efe7b990b8152b3468a1842deadc168e621f)) -* rework CachedQuantelGateway ([216ac06](https://github.com/nrkno/tv-automation-package-manager/commit/216ac062114d464e89270e5ce0ead6e9bddeb367)) - - - - +- CachedQuantelGateway: ([6597efe](https://github.com/nrkno/tv-automation-package-manager/commit/6597efe7b990b8152b3468a1842deadc168e621f)) +- rework CachedQuantelGateway ([216ac06](https://github.com/nrkno/tv-automation-package-manager/commit/216ac062114d464e89270e5ce0ead6e9bddeb367)) ## [1.40.1](https://github.com/nrkno/sofie-package-manager/compare/v1.40.0...v1.40.1) (2023-01-26) **Note:** Version bump only for package @sofie-package-manager/worker - - - - # [1.40.0](https://github.com/nrkno/sofie-package-manager/compare/v1.39.8-alpha.4...v1.40.0) (2023-01-23) - ### Bug Fixes -* don't respect timeSinceLastError if state is RESTARTED ([c94de26](https://github.com/nrkno/sofie-package-manager/commit/c94de268c27669be90b58c5a3d6fcc7321d23c4b)) -* remove dependency on blueprints-integration ([e545992](https://github.com/nrkno/sofie-package-manager/commit/e545992e5204ff836e86011edeee7c08fdcaeaff)) - +- don't respect timeSinceLastError if state is RESTARTED ([c94de26](https://github.com/nrkno/sofie-package-manager/commit/c94de268c27669be90b58c5a3d6fcc7321d23c4b)) +- remove dependency on blueprints-integration ([e545992](https://github.com/nrkno/sofie-package-manager/commit/e545992e5204ff836e86011edeee7c08fdcaeaff)) ### Features -* CachedQuantelGateway to buffer requests ([33a2477](https://github.com/nrkno/sofie-package-manager/commit/33a2477d8b6ce495f6d2694e431f14a2fa90eeec)) - - - - +- CachedQuantelGateway to buffer requests ([33a2477](https://github.com/nrkno/sofie-package-manager/commit/33a2477d8b6ce495f6d2694e431f14a2fa90eeec)) ## [1.39.8-alpha.4](https://github.com/nrkno/sofie-package-manager/compare/v1.39.8-alpha.3...v1.39.8-alpha.4) (2023-01-17) **Note:** Version bump only for package @sofie-package-manager/worker - - - - ## [1.39.8-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.39.8-alpha.2...v1.39.8-alpha.3) (2023-01-13) **Note:** Version bump only for package @sofie-package-manager/worker - - - - ## [1.39.8-alpha.2](https://github.com/nrkno/sofie-package-manager/compare/v1.39.8-alpha.1...v1.39.8-alpha.2) (2023-01-12) - ### Bug Fixes -* **Quantel:** shorten QUANTEL_TIMEOUT to be lower than INNER_ACTION_TIMEOUT ([0758974](https://github.com/nrkno/sofie-package-manager/commit/075897441dd64cba0cb8d0723483e052c08cfecb)) - - - - +- **Quantel:** shorten QUANTEL_TIMEOUT to be lower than INNER_ACTION_TIMEOUT ([0758974](https://github.com/nrkno/sofie-package-manager/commit/075897441dd64cba0cb8d0723483e052c08cfecb)) ## [1.39.8-alpha.1](https://github.com/nrkno/sofie-package-manager/compare/v1.39.8-alpha.0...v1.39.8-alpha.1) (2023-01-12) - ### Bug Fixes -* add packageHandle.packageIsInPlace() method, used to signal that a package is in place (or is about to be), so that any scheduled delayRemoval are cleared. ([1a71bc5](https://github.com/nrkno/sofie-package-manager/commit/1a71bc5aca80013915a0932f7f2cff9e48e01c12)) -* potential issue when using temporaryFilePaths and renaming a file to an already existing file ([17caa32](https://github.com/nrkno/sofie-package-manager/commit/17caa32fd1670ca92c06c0657540c5bfbfc6a4a9)) - - - - +- add packageHandle.packageIsInPlace() method, used to signal that a package is in place (or is about to be), so that any scheduled delayRemoval are cleared. ([1a71bc5](https://github.com/nrkno/sofie-package-manager/commit/1a71bc5aca80013915a0932f7f2cff9e48e01c12)) +- potential issue when using temporaryFilePaths and renaming a file to an already existing file ([17caa32](https://github.com/nrkno/sofie-package-manager/commit/17caa32fd1670ca92c06c0657540c5bfbfc6a4a9)) ## [1.39.8-alpha.0](https://github.com/nrkno/sofie-package-manager/compare/v1.39.7...v1.39.8-alpha.0) (2023-01-12) - ### Bug Fixes -* increase timeout on quantel ([d0e0379](https://github.com/nrkno/sofie-package-manager/commit/d0e03799e7d3fd7218c87c8a505d010be6080ab1)) - - - - +- increase timeout on quantel ([d0e0379](https://github.com/nrkno/sofie-package-manager/commit/d0e03799e7d3fd7218c87c8a505d010be6080ab1)) ## [1.39.7](https://github.com/nrkno/sofie-package-manager/compare/v1.39.6...v1.39.7) (2023-01-11) - ### Bug Fixes -* update quantel-gateway-client ([0f75c1e](https://github.com/nrkno/sofie-package-manager/commit/0f75c1e330daee7dec31cc6499213309f3f6708e)) - - - - +- update quantel-gateway-client ([0f75c1e](https://github.com/nrkno/sofie-package-manager/commit/0f75c1e330daee7dec31cc6499213309f3f6708e)) ## [1.39.6](https://github.com/nrkno/sofie-package-manager/compare/v1.39.5...v1.39.6) (2023-01-09) **Note:** Version bump only for package @sofie-package-manager/worker - - - - ## [1.39.5](https://github.com/nrkno/sofie-package-manager/compare/v1.39.4...v1.39.5) (2023-01-09) **Note:** Version bump only for package @sofie-package-manager/worker - - - - ## [1.39.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.39.4-alpha.0...v1.39.4) (2023-01-04) - ### Bug Fixes -* a recursive function needs to be called recursively ([8e06bbf](https://github.com/nrkno/tv-automation-package-manager/commit/8e06bbf097ab9c691b9415571116f5dd618d7881)) -* replace dots with underscore in keys in scan results. ([e05f8ef](https://github.com/nrkno/tv-automation-package-manager/commit/e05f8ef05c934453a71e59458392497401a55b9c)) - - - - +- a recursive function needs to be called recursively ([8e06bbf](https://github.com/nrkno/tv-automation-package-manager/commit/8e06bbf097ab9c691b9415571116f5dd618d7881)) +- replace dots with underscore in keys in scan results. ([e05f8ef](https://github.com/nrkno/tv-automation-package-manager/commit/e05f8ef05c934453a71e59458392497401a55b9c)) ## [1.39.4-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.39.3...v1.39.4-alpha.0) (2022-12-05) - ### Bug Fixes -* blackDetectRegex expects black_duration to be a number with a decimal point ([#19](https://github.com/nrkno/tv-automation-package-manager/issues/19)) ([bb23fba](https://github.com/nrkno/tv-automation-package-manager/commit/bb23fba5dd9ffb97ee8791bd3342bbf0e482aa73)) - - - - +- blackDetectRegex expects black_duration to be a number with a decimal point ([#19](https://github.com/nrkno/tv-automation-package-manager/issues/19)) ([bb23fba](https://github.com/nrkno/tv-automation-package-manager/commit/bb23fba5dd9ffb97ee8791bd3342bbf0e482aa73)) ## [1.39.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.39.2...v1.39.3) (2022-11-30) - ### Bug Fixes -* Update default values to generate larger media preview thumbnails ([f3d0bd7](https://github.com/nrkno/tv-automation-package-manager/commit/f3d0bd764b20753f751e53c49f27abb86f739f07)) - - - - +- Update default values to generate larger media preview thumbnails ([f3d0bd7](https://github.com/nrkno/tv-automation-package-manager/commit/f3d0bd764b20753f751e53c49f27abb86f739f07)) ## [1.39.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.39.0...v1.39.1) (2022-09-16) - ### Bug Fixes -* a case where multiple QuantelGateway clients where spawned by mistake ([bfb42a5](https://github.com/nrkno/tv-automation-package-manager/commit/bfb42a53e50a0de48cecab3c2275dc3f766c097c)) -* minor improvements to the rateLimiter of the file-watcher ([7741626](https://github.com/nrkno/tv-automation-package-manager/commit/77416267c48a1ff528b6d04c6bcb3db756e54cf0)) - - - - +- a case where multiple QuantelGateway clients where spawned by mistake ([bfb42a5](https://github.com/nrkno/tv-automation-package-manager/commit/bfb42a53e50a0de48cecab3c2275dc3f766c097c)) +- minor improvements to the rateLimiter of the file-watcher ([7741626](https://github.com/nrkno/tv-automation-package-manager/commit/77416267c48a1ff528b6d04c6bcb3db756e54cf0)) # [1.39.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.39.0-in-development.1...v1.39.0) (2022-09-07) - ### Bug Fixes -* add WorkerStorage to AppContainer, to be used for storing data from workers ([19a1516](https://github.com/nrkno/tv-automation-package-manager/commit/19a15166c9fece12d8474227c4ac0833c115632d)) -* allow empty baseUrl for http accessor ([68af3d4](https://github.com/nrkno/tv-automation-package-manager/commit/68af3d436efe02bd4b2d446ffc23a234a6ad2c23)) -* better handling (or hack) of the "connect EADDRINUSE" issue, by swallowing the error and try again once ([3cd4dcc](https://github.com/nrkno/tv-automation-package-manager/commit/3cd4dccc381279afe09f9ed4129e67dc427b9da2)) -* bug fix: invert logic ([2f2db03](https://github.com/nrkno/tv-automation-package-manager/commit/2f2db0389bb7268c9eba4b136bcc469f407ca8fc)) -* bug fix: use startRequirement for source, for CopyProxy ([d7cdfee](https://github.com/nrkno/tv-automation-package-manager/commit/d7cdfeebad6d0dc824fb676673bb935acc69d332)) -* bug in workerAgent, where the job wasn't cancelled upon timeout in workerAgent ([8cf0020](https://github.com/nrkno/tv-automation-package-manager/commit/8cf002023b366b0b1d711ceff7aac885a0a000ed)) -* DataStorage: add custom timeout duration for write locks ([32d993d](https://github.com/nrkno/tv-automation-package-manager/commit/32d993d8025c4b2b300f35fd437e1339bc0d497f)) -* ffmpeg-issues on Windows ([3a523df](https://github.com/nrkno/tv-automation-package-manager/commit/3a523df3061680afcabb83315bbf9bfc0d4c221a)) -* FileShare: fast-path to avoid a timeout issue when many read/write-calls are queued at the same time ([cfe389c](https://github.com/nrkno/tv-automation-package-manager/commit/cfe389c09e31c50c982e590c20741d986b0cd09f)) -* graceful process handling ([#9](https://github.com/nrkno/tv-automation-package-manager/issues/9)) ([47ac8e1](https://github.com/nrkno/tv-automation-package-manager/commit/47ac8e16f13803c8273b0768d0bb48e560fbedc2)) -* handle errors in killFFMpeg by ignoring them ([43ff037](https://github.com/nrkno/tv-automation-package-manager/commit/43ff037e4e1d4e0f10192c1351164578cfceee26)) -* hide ffmpeg banner to decrease log size ([e3a24c2](https://github.com/nrkno/tv-automation-package-manager/commit/e3a24c2c4e11b5e4ea21a9af013dde10ec0e8860)) -* improve logging, adding categories for logger to make it easier to know where a lig line comes from ([db18a35](https://github.com/nrkno/tv-automation-package-manager/commit/db18a35e841169f0ace1b3d42db2b9932c15f88d)) -* improve performance for preview generation ([c761c8b](https://github.com/nrkno/tv-automation-package-manager/commit/c761c8bc6646e67a2fcdaf6ea096db389007a327)) -* improve proxy-copy when copying from quantel http-transformer ([8385e3a](https://github.com/nrkno/tv-automation-package-manager/commit/8385e3ad540cac5c31c0d5c8fe1f56496a4d40e3)) -* increase HTTP_TIMEOUT to reduce Socket turnover ([d26ea5d](https://github.com/nrkno/tv-automation-package-manager/commit/d26ea5d1d883794a7fff7e6d818fff0878d0021c)) -* issues with black&freeze detection ([be1adf8](https://github.com/nrkno/tv-automation-package-manager/commit/be1adf84437158295b9c0734265ab2097a09b16e)) -* only do a single job per worker ([fc94d3c](https://github.com/nrkno/tv-automation-package-manager/commit/fc94d3c64b468475625adb510290321b52fddf3d)) -* refactor FFMpeg execution for previews ([2e7e9ea](https://github.com/nrkno/tv-automation-package-manager/commit/2e7e9ea6286192e76e7bbadc58457dcfa8b16f06)) -* replace execFile with spawn and use maxBuffer in other places ([3816100](https://github.com/nrkno/tv-automation-package-manager/commit/38161003542d6c4c6c63a67b5bb59439df00de9b)) -* report progress 0 only after FFMpeg detects duration ([7809d73](https://github.com/nrkno/tv-automation-package-manager/commit/7809d730040259d0687cd413dc2c60dc74a9b815)) -* use HTTP agents for fetch ([bf3cecc](https://github.com/nrkno/tv-automation-package-manager/commit/bf3cecc0533c89867cf80b808a7f944edb174cd2)) -* workaround for windows-network-drive not returning all devices. ([46bc210](https://github.com/nrkno/tv-automation-package-manager/commit/46bc2104b0dacb8c0944790f7b631df16b0523e1)) -* worker child processes exit with null code ([#11](https://github.com/nrkno/tv-automation-package-manager/issues/11)) ([19ebe9c](https://github.com/nrkno/tv-automation-package-manager/commit/19ebe9c543453b9f3d65abeb071a69010ceca92f)) -* Worker: use AppContainer datastore in order to ensure that only one worker is accessing windows drive letters at the same time. ([6c3b58b](https://github.com/nrkno/tv-automation-package-manager/commit/6c3b58b192a5558b6ab7f12178a10625e0af3585)) - +- add WorkerStorage to AppContainer, to be used for storing data from workers ([19a1516](https://github.com/nrkno/tv-automation-package-manager/commit/19a15166c9fece12d8474227c4ac0833c115632d)) +- allow empty baseUrl for http accessor ([68af3d4](https://github.com/nrkno/tv-automation-package-manager/commit/68af3d436efe02bd4b2d446ffc23a234a6ad2c23)) +- better handling (or hack) of the "connect EADDRINUSE" issue, by swallowing the error and try again once ([3cd4dcc](https://github.com/nrkno/tv-automation-package-manager/commit/3cd4dccc381279afe09f9ed4129e67dc427b9da2)) +- bug fix: invert logic ([2f2db03](https://github.com/nrkno/tv-automation-package-manager/commit/2f2db0389bb7268c9eba4b136bcc469f407ca8fc)) +- bug fix: use startRequirement for source, for CopyProxy ([d7cdfee](https://github.com/nrkno/tv-automation-package-manager/commit/d7cdfeebad6d0dc824fb676673bb935acc69d332)) +- bug in workerAgent, where the job wasn't cancelled upon timeout in workerAgent ([8cf0020](https://github.com/nrkno/tv-automation-package-manager/commit/8cf002023b366b0b1d711ceff7aac885a0a000ed)) +- DataStorage: add custom timeout duration for write locks ([32d993d](https://github.com/nrkno/tv-automation-package-manager/commit/32d993d8025c4b2b300f35fd437e1339bc0d497f)) +- ffmpeg-issues on Windows ([3a523df](https://github.com/nrkno/tv-automation-package-manager/commit/3a523df3061680afcabb83315bbf9bfc0d4c221a)) +- FileShare: fast-path to avoid a timeout issue when many read/write-calls are queued at the same time ([cfe389c](https://github.com/nrkno/tv-automation-package-manager/commit/cfe389c09e31c50c982e590c20741d986b0cd09f)) +- graceful process handling ([#9](https://github.com/nrkno/tv-automation-package-manager/issues/9)) ([47ac8e1](https://github.com/nrkno/tv-automation-package-manager/commit/47ac8e16f13803c8273b0768d0bb48e560fbedc2)) +- handle errors in killFFMpeg by ignoring them ([43ff037](https://github.com/nrkno/tv-automation-package-manager/commit/43ff037e4e1d4e0f10192c1351164578cfceee26)) +- hide ffmpeg banner to decrease log size ([e3a24c2](https://github.com/nrkno/tv-automation-package-manager/commit/e3a24c2c4e11b5e4ea21a9af013dde10ec0e8860)) +- improve logging, adding categories for logger to make it easier to know where a lig line comes from ([db18a35](https://github.com/nrkno/tv-automation-package-manager/commit/db18a35e841169f0ace1b3d42db2b9932c15f88d)) +- improve performance for preview generation ([c761c8b](https://github.com/nrkno/tv-automation-package-manager/commit/c761c8bc6646e67a2fcdaf6ea096db389007a327)) +- improve proxy-copy when copying from quantel http-transformer ([8385e3a](https://github.com/nrkno/tv-automation-package-manager/commit/8385e3ad540cac5c31c0d5c8fe1f56496a4d40e3)) +- increase HTTP_TIMEOUT to reduce Socket turnover ([d26ea5d](https://github.com/nrkno/tv-automation-package-manager/commit/d26ea5d1d883794a7fff7e6d818fff0878d0021c)) +- issues with black&freeze detection ([be1adf8](https://github.com/nrkno/tv-automation-package-manager/commit/be1adf84437158295b9c0734265ab2097a09b16e)) +- only do a single job per worker ([fc94d3c](https://github.com/nrkno/tv-automation-package-manager/commit/fc94d3c64b468475625adb510290321b52fddf3d)) +- refactor FFMpeg execution for previews ([2e7e9ea](https://github.com/nrkno/tv-automation-package-manager/commit/2e7e9ea6286192e76e7bbadc58457dcfa8b16f06)) +- replace execFile with spawn and use maxBuffer in other places ([3816100](https://github.com/nrkno/tv-automation-package-manager/commit/38161003542d6c4c6c63a67b5bb59439df00de9b)) +- report progress 0 only after FFMpeg detects duration ([7809d73](https://github.com/nrkno/tv-automation-package-manager/commit/7809d730040259d0687cd413dc2c60dc74a9b815)) +- use HTTP agents for fetch ([bf3cecc](https://github.com/nrkno/tv-automation-package-manager/commit/bf3cecc0533c89867cf80b808a7f944edb174cd2)) +- workaround for windows-network-drive not returning all devices. ([46bc210](https://github.com/nrkno/tv-automation-package-manager/commit/46bc2104b0dacb8c0944790f7b631df16b0523e1)) +- worker child processes exit with null code ([#11](https://github.com/nrkno/tv-automation-package-manager/issues/11)) ([19ebe9c](https://github.com/nrkno/tv-automation-package-manager/commit/19ebe9c543453b9f3d65abeb071a69010ceca92f)) +- Worker: use AppContainer datastore in order to ensure that only one worker is accessing windows drive letters at the same time. ([6c3b58b](https://github.com/nrkno/tv-automation-package-manager/commit/6c3b58b192a5558b6ab7f12178a10625e0af3585)) ### Features -* add CLI option: considerCPULoad ([6da6ab0](https://github.com/nrkno/tv-automation-package-manager/commit/6da6ab0beab48fb59d29b3fcbfc6a3d0e4aa5de4)) -* support for "temporary-storage"; by copying packages to a local PackageContainer, scanning, preview-generation etc can be done quicker. ([31513f3](https://github.com/nrkno/tv-automation-package-manager/commit/31513f3b2b46054c57c8ff6110abd7285d8983c6)) -* **worker/accessorHandlers/http(Proxy):** rethrow last timeout error ([9599603](https://github.com/nrkno/tv-automation-package-manager/commit/9599603c8356e2ee20dad770c9d828b4b39f1999)) -* use HEAD requests for querying http-servers ([a077126](https://github.com/nrkno/tv-automation-package-manager/commit/a07712643af9c35b8b61de8b4e2113553fc3a259)) - +- add CLI option: considerCPULoad ([6da6ab0](https://github.com/nrkno/tv-automation-package-manager/commit/6da6ab0beab48fb59d29b3fcbfc6a3d0e4aa5de4)) +- support for "temporary-storage"; by copying packages to a local PackageContainer, scanning, preview-generation etc can be done quicker. ([31513f3](https://github.com/nrkno/tv-automation-package-manager/commit/31513f3b2b46054c57c8ff6110abd7285d8983c6)) +- **worker/accessorHandlers/http(Proxy):** rethrow last timeout error ([9599603](https://github.com/nrkno/tv-automation-package-manager/commit/9599603c8356e2ee20dad770c9d828b4b39f1999)) +- use HEAD requests for querying http-servers ([a077126](https://github.com/nrkno/tv-automation-package-manager/commit/a07712643af9c35b8b61de8b4e2113553fc3a259)) ### Reverts -* Revert "feat(worker/accessorHandlers/http(Proxy)): add retries to getPackagesToRemove for resiliance" ([f278d2f](https://github.com/nrkno/tv-automation-package-manager/commit/f278d2fad29474bc5e04393d7c6e4e981031e5b5)) - - - - +- Revert "feat(worker/accessorHandlers/http(Proxy)): add retries to getPackagesToRemove for resiliance" ([f278d2f](https://github.com/nrkno/tv-automation-package-manager/commit/f278d2fad29474bc5e04393d7c6e4e981031e5b5)) # [1.39.0-in-development.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.39.0-in-development.0...v1.39.0-in-development.1) (2022-02-15) @@ -402,7 +251,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline - add "HelpfulEventEmitter" to be used instead ot EventEmitter,, because it'll give the developer a warning if they've forgotten to listen to error events. ([fc1b1db](https://github.com/nrkno/tv-automation-package-manager/commit/fc1b1db8f99abbc35bbd39ba87cee870c3df1885)) - allow deep scanning of audio-only files ([27ebd36](https://github.com/nrkno/tv-automation-package-manager/commit/27ebd3654f1cff3ee97ade486eaae74ca9ef876e)) - better handling of FFScan errors ([dd2d643](https://github.com/nrkno/tv-automation-package-manager/commit/dd2d6439eedfde8d391c092edb4cedd9403549ca)) -- bug: Quantel clips with no frames showed up as fullfilled ([d986e09](https://github.com/nrkno/tv-automation-package-manager/commit/d986e09fea6a5f30b509df7b0db1af40c047160a)) +- bug: Quantel clips with no frames showed up as fulfilled ([d986e09](https://github.com/nrkno/tv-automation-package-manager/commit/d986e09fea6a5f30b509df7b0db1af40c047160a)) - create folder if it doesn't exist ([daec566](https://github.com/nrkno/tv-automation-package-manager/commit/daec566c9fcb1f62a69101dab305e7f34dcb0502)) - file access errors doesn't need to include stack ([eed5507](https://github.com/nrkno/tv-automation-package-manager/commit/eed5507d909796634905b90720395b629bc58b5a)) - fine-grained priority of accessors ([87f26c0](https://github.com/nrkno/tv-automation-package-manager/commit/87f26c09cb069422d691c509aa8001a6872c7639)) @@ -436,7 +285,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline - A pretty large rehaul of connection logic. ([4b20139](https://github.com/nrkno/tv-automation-package-manager/commit/4b201394c3074b5601ae6c4452129dde2d7318eb)) - add "HelpfulEventEmitter" to be used instead ot EventEmitter,, because it'll give the developer a warning if they've forgotten to listen to error events. ([fc1b1db](https://github.com/nrkno/tv-automation-package-manager/commit/fc1b1db8f99abbc35bbd39ba87cee870c3df1885)) -- bug: Quantel clips with no frames showed up as fullfilled ([d986e09](https://github.com/nrkno/tv-automation-package-manager/commit/d986e09fea6a5f30b509df7b0db1af40c047160a)) +- bug: Quantel clips with no frames showed up as fulfilled ([d986e09](https://github.com/nrkno/tv-automation-package-manager/commit/d986e09fea6a5f30b509df7b0db1af40c047160a)) - file access errors doesn't need to include stack ([eed5507](https://github.com/nrkno/tv-automation-package-manager/commit/eed5507d909796634905b90720395b629bc58b5a)) - fine-grained priority of accessors ([87f26c0](https://github.com/nrkno/tv-automation-package-manager/commit/87f26c09cb069422d691c509aa8001a6872c7639)) - handle unhandled promises ([13a6f5a](https://github.com/nrkno/tv-automation-package-manager/commit/13a6f5a2a7afde41b06538414d517b132e630edb)) diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index 3e003c01..86ab1249 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -12,6 +12,9 @@ "engines": { "node": ">=14.18.0" }, + "peerDependencies": { + "@sofie-automation/shared-lib": "*" + }, "devDependencies": { "@types/deep-diff": "^1.0.0", "@types/node-fetch": "^2.5.8", diff --git a/shared/packages/worker/src/appContainerApi.ts b/shared/packages/worker/src/appContainerApi.ts index afe52048..e12dd780 100644 --- a/shared/packages/worker/src/appContainerApi.ts +++ b/shared/packages/worker/src/appContainerApi.ts @@ -1,4 +1,11 @@ -import { AdapterClient, LoggerInstance, AppContainerWorkerAgent } from '@sofie-package-manager/api' +import { + AdapterClient, + LoggerInstance, + AppContainerWorkerAgent, + WorkerAgentId, + DataId, + LockId, +} from '@sofie-package-manager/api' /** * Exposes the API-methods of a Workforce, to be called from the WorkerAgent @@ -9,8 +16,8 @@ export class AppContainerAPI extends AdapterClient implements AppContainerWorkerAgent.AppContainer { - constructor(logger: LoggerInstance) { - super(logger.category('AppContainerAPI'), 'workerAgent') + constructor(public id: WorkerAgentId, logger: LoggerInstance) { + super(logger.category('AppContainerAPI'), id, 'workerAgent') } // Note: These calls are ultimately received at apps/appcontainer-node/packages/generic/src/appContainer.ts async ping(): Promise { @@ -20,18 +27,18 @@ export class AppContainerAPI return this._sendMessage('requestSpinDown') } async workerStorageWriteLock( - dataId: string, + dataId: DataId, customTimeout?: number - ): Promise<{ lockId: string; current: any | undefined }> { + ): Promise<{ lockId: LockId; current: any | undefined }> { return this._sendMessage('workerStorageWriteLock', dataId, customTimeout) } - async workerStorageReleaseLock(dataId: string, lockId: string): Promise { + async workerStorageReleaseLock(dataId: DataId, lockId: LockId): Promise { return this._sendMessage('workerStorageReleaseLock', dataId, lockId) } - async workerStorageWrite(dataId: string, lockId: string, data: string): Promise { + async workerStorageWrite(dataId: DataId, lockId: LockId, data: string): Promise { return this._sendMessage('workerStorageWrite', dataId, lockId, data) } - async workerStorageRead(dataId: string): Promise { + async workerStorageRead(dataId: DataId): Promise { return this._sendMessage('workerStorageRead', dataId) } } diff --git a/shared/packages/worker/src/expectationManagerApi.ts b/shared/packages/worker/src/expectationManagerApi.ts index 90c740b3..389a7538 100644 --- a/shared/packages/worker/src/expectationManagerApi.ts +++ b/shared/packages/worker/src/expectationManagerApi.ts @@ -1,3 +1,4 @@ +import { PackageContainerId, MonitorId, WorkerAgentId, WorkInProgressLocalId } from '@sofie-package-manager/api' import { StatusCode, ExpectationManagerWorkerAgent, @@ -15,29 +16,38 @@ export class ExpectationManagerAPI extends AdapterClient implements ExpectationManagerWorkerAgent.ExpectationManager { - constructor(logger: LoggerInstance) { - super(logger.category('ExpectationManagerAPI'), 'workerAgent') + constructor(public id: WorkerAgentId, logger: LoggerInstance) { + super(logger.category('ExpectationManagerAPI'), id, 'workerAgent') } async messageFromWorker(message: ExpectationManagerWorkerAgent.MessageFromWorkerPayload.Any): Promise { // This call is ultimately received at shared/packages/expectationManager/src/workerAgentApi.ts return this._sendMessage('messageFromWorker', message) } - async wipEventProgress(wipId: number, actualVersionHash: string | null, progress: number): Promise { + async wipEventProgress( + wipId: WorkInProgressLocalId, + actualVersionHash: string | null, + progress: number + ): Promise { // This call is ultimately received at shared/packages/expectationManager/src/workerAgentApi.ts return this._sendMessage('wipEventProgress', wipId, actualVersionHash, progress) } - async wipEventDone(wipId: number, actualVersionHash: string, reason: Reason, result: unknown): Promise { + async wipEventDone( + wipId: WorkInProgressLocalId, + actualVersionHash: string, + reason: Reason, + result: unknown + ): Promise { // This call is ultimately received at shared/packages/expectationManager/src/workerAgentApi.ts return this._sendMessage('wipEventDone', wipId, actualVersionHash, reason, result) } - async wipEventError(wipId: number, reason: Reason): Promise { + async wipEventError(wipId: WorkInProgressLocalId, reason: Reason): Promise { // This call is ultimately received at shared/packages/expectationManager/src/workerAgentApi.ts return this._sendMessage('wipEventError', wipId, reason) } async monitorStatus( - packageContainerId: string, - monitorId: string, + packageContainerId: PackageContainerId, + monitorId: MonitorId, status: StatusCode, reason: Reason ): Promise { diff --git a/shared/packages/worker/src/worker/accessorHandlers/accessor.ts b/shared/packages/worker/src/worker/accessorHandlers/accessor.ts index 3ae7a31e..447606f1 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/accessor.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/accessor.ts @@ -1,4 +1,4 @@ -import { assertNever, Accessor, AccessorOnPackage } from '@sofie-package-manager/api' +import { assertNever, Accessor, AccessorOnPackage, AccessorId } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { CorePackageInfoAccessorHandle } from './corePackageInfo' import { FileShareAccessorHandle } from './fileShare' @@ -11,7 +11,7 @@ import { ATEMAccessorHandle } from './atem' export function getAccessorHandle( worker: GenericWorker, - accessorId: string, + accessorId: AccessorId, accessor: AccessorOnPackage.Any, content: unknown, workOptions: unknown diff --git a/shared/packages/worker/src/worker/accessorHandlers/atem.ts b/shared/packages/worker/src/worker/accessorHandlers/atem.ts index 660b08d6..76629d19 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/atem.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/atem.ts @@ -12,7 +12,7 @@ import { AccessorHandlerRunCronJobResult, PackageOperation, } from './genericHandle' -import { Expectation, Accessor, AccessorOnPackage } from '@sofie-package-manager/api' +import { Expectation, Accessor, AccessorOnPackage, AccessorId } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { Atem, AtemConnectionStatus, Util as AtemUtil } from 'atem-connection' import { ClipBank } from 'atem-connection/dist/state/media' @@ -39,7 +39,7 @@ export class ATEMAccessorHandle extends GenericAccessorHandle extends GenericAccessorHand private workOptions: Expectation.WorkOptions.RemoveDelay constructor( worker: GenericWorker, - accessorId: string, + accessorId: AccessorId, private accessor: AccessorOnPackage.CorePackageCollection, content: any, // eslint-disable-line @typescript-eslint/explicit-module-boundary-types workOptions: any // eslint-disable-line @typescript-eslint/explicit-module-boundary-types @@ -150,17 +159,19 @@ export class CorePackageInfoAccessorHandle extends GenericAccessorHand expectTargetVersion ) const packageInfos: { - packageId: string + packageId: ExpectedPackageId expectedContentVersionHash: string actualContentVersionHash: string }[] = (await this.worker.sendMessageToManager(exp.managerId, { type: 'fetchPackageInfoMetadata', - arguments: [infoType, exp.fromPackages.map((p) => p.id)], + arguments: [infoType, exp.fromPackages.map((p) => protectString(p.id))], })) || [] for (const fromPackage of exp.fromPackages) { - const packageInfo = packageInfos.find((p) => p.packageId === fromPackage.id) + const packageInfo = packageInfos.find( + (p) => p.packageId === protectString(fromPackage.id) + ) if (!packageInfo) { return { diff --git a/shared/packages/worker/src/worker/accessorHandlers/fileShare.ts b/shared/packages/worker/src/worker/accessorHandlers/fileShare.ts index 8d46350b..4e7dc43e 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/fileShare.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/fileShare.ts @@ -23,6 +23,10 @@ import { stringifyError, promiseTimeout, INNER_ACTION_TIMEOUT, + protectString, + DataId, + AccessorId, + MonitorId, } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { WindowsWorker } from '../workers/windowsWorker/windowsWorker' @@ -64,7 +68,7 @@ export class FileShareAccessorHandle extends GenericFileAccessorHandle constructor( worker: GenericWorker, - accessorId: string, + accessorId: AccessorId, private accessor: AccessorOnPackage.FileShare, content: any, // eslint-disable-line @typescript-eslint/explicit-module-boundary-types workOptions: any // eslint-disable-line @typescript-eslint/explicit-module-boundary-types @@ -351,17 +355,18 @@ export class FileShareAccessorHandle extends GenericFileAccessorHandle async setupPackageContainerMonitors( packageContainerExp: PackageContainerExpectation ): Promise { - const resultingMonitors: { [monitorId: string]: MonitorInProgress } = {} + const resultingMonitors: Record = {} const monitorIds = Object.keys( packageContainerExp.monitors ) as (keyof PackageContainerExpectation['monitors'])[] - for (const monitorId of monitorIds) { - if (monitorId === 'packages') { + for (const monitorIdStr of monitorIds) { + if (monitorIdStr === 'packages') { // setup file monitor: - resultingMonitors[monitorId] = this.setupPackagesMonitor(packageContainerExp) + resultingMonitors[protectString(monitorIdStr)] = + this.setupPackagesMonitor(packageContainerExp) } else { // Assert that cronjob is of type "never", to ensure that all types of monitors are handled: - assertNever(monitorId) + assertNever(monitorIdStr) } } @@ -405,7 +410,9 @@ export class FileShareAccessorHandle extends GenericFileAccessorHandle // On windows, we can assign the share to a drive letter, as that increases performance quite a lot: const windowsWorker = this.worker as WindowsWorker - const STORE_DRIVELETTERS = `fileShare_driveLetters_${this.worker.agentAPI.location.localComputerId}` + const STORE_DRIVELETTERS = protectString( + `fileShare_driveLetters_${this.worker.agentAPI.location.localComputerId}` + ) // Note: Use the mappedDriveLetters as a WorkerStorage, to avoid a potential issue where other workers // mess with the drive letter at the same time that we do, and we all end up to be unsynced with reality. @@ -419,7 +426,7 @@ export class FileShareAccessorHandle extends GenericFileAccessorHandle // Check if the drive letter has already been assigned in our cache: let foundMappedDriveLetter: string | null = null - for (const [driveLetter, mountedPath] of Object.entries(mappedDriveLetters)) { + for (const [driveLetter, mountedPath] of Object.entries(mappedDriveLetters)) { if (mountedPath === folderPath) { foundMappedDriveLetter = driveLetter } @@ -439,7 +446,7 @@ export class FileShareAccessorHandle extends GenericFileAccessorHandle const mappedDriveLetters: MappedDriveLetters = mappedDriveLetters0 ?? {} // First we check if the drive letter has already been assigned in our cache: let foundMappedDriveLetter: string | null = null - for (const [driveLetter, mountedPath] of Object.entries(mappedDriveLetters)) { + for (const [driveLetter, mountedPath] of Object.entries(mappedDriveLetters)) { if (mountedPath === folderPath) { foundMappedDriveLetter = driveLetter } @@ -465,7 +472,7 @@ export class FileShareAccessorHandle extends GenericFileAccessorHandle } if (!handlingDone) { // Update our cache of mounted drive letters: - for (const [driveLetter, mount] of Object.entries( + for (const [driveLetter, mount] of Object.entries( await this.getMountedDriveLetters(`new network path: "${folderPath}")`) )) { mappedDriveLetters[driveLetter] = mount.path diff --git a/shared/packages/worker/src/worker/accessorHandlers/genericHandle.ts b/shared/packages/worker/src/worker/accessorHandlers/genericHandle.ts index bce97caf..4626aaa1 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/genericHandle.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/genericHandle.ts @@ -4,6 +4,8 @@ import { PackageContainerExpectation, Reason, HelpfulEventEmitter, + AccessorId, + MonitorId, } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { MonitorInProgress } from '../lib/monitorInProgress' @@ -14,7 +16,7 @@ import { MonitorInProgress } from '../lib/monitorInProgress' export abstract class GenericAccessorHandle { constructor( protected worker: GenericWorker, - public readonly accessorId: string, + public readonly accessorId: AccessorId, protected _accessor: AccessorOnPackage.Any, protected _content: unknown, public readonly type: string @@ -184,7 +186,7 @@ export type AccessorHandlerCheckPackageContainerWriteAccessResult = AccessorHand export type AccessorHandlerRunCronJobResult = Promise export type SetupPackageContainerMonitorsResult = | (AccessorHandlerResultSuccess & { - monitors: { [monitorId: string]: MonitorInProgress } + monitors: Record }) | AccessorHandlerResultBad /** diff --git a/shared/packages/worker/src/worker/accessorHandlers/http.ts b/shared/packages/worker/src/worker/accessorHandlers/http.ts index 1d712f2b..cdc1d005 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/http.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/http.ts @@ -19,6 +19,8 @@ import { PackageContainerExpectation, assertNever, Reason, + AccessorId, + MonitorId, } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { fetchWithController, fetchWithTimeout } from './lib/fetch' @@ -38,7 +40,7 @@ export class HTTPAccessorHandle extends GenericAccessorHandle extends GenericAccessorHandle { - const resultingMonitors: { [monitorId: string]: MonitorInProgress } = {} + const resultingMonitors: Record = {} const monitorIds = Object.keys( packageContainerExp.monitors ) as (keyof PackageContainerExpectation['monitors'])[] - for (const monitorId of monitorIds) { - if (monitorId === 'packages') { + for (const monitorIdStr of monitorIds) { + if (monitorIdStr === 'packages') { // todo: implement monitors throw new Error('Not implemented yet') } else { // Assert that cronjob is of type "never", to ensure that all types of monitors are handled: - assertNever(monitorId) + assertNever(monitorIdStr) } } diff --git a/shared/packages/worker/src/worker/accessorHandlers/httpProxy.ts b/shared/packages/worker/src/worker/accessorHandlers/httpProxy.ts index a1d89d01..7fdaf774 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/httpProxy.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/httpProxy.ts @@ -19,6 +19,8 @@ import { PackageContainerExpectation, assertNever, Reason, + AccessorId, + MonitorId, } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import FormData from 'form-data' @@ -38,7 +40,7 @@ export class HTTPProxyAccessorHandle extends GenericAccessorHandle extends GenericAccessorHandle { - const resultingMonitors: { [monitorId: string]: MonitorInProgress } = {} + const resultingMonitors: Record = {} const monitorIds = Object.keys( packageContainerExp.monitors ) as (keyof PackageContainerExpectation['monitors'])[] - for (const monitorId of monitorIds) { - if (monitorId === 'packages') { + for (const monitorIdStr of monitorIds) { + if (monitorIdStr === 'packages') { // todo: implement monitors throw new Error('Not implemented yet') } else { // Assert that cronjob is of type "never", to ensure that all types of monitors are handled: - assertNever(monitorId) + assertNever(monitorIdStr) } } diff --git a/shared/packages/worker/src/worker/accessorHandlers/lib/CachedQuantelGateway.ts b/shared/packages/worker/src/worker/accessorHandlers/lib/CachedQuantelGateway.ts index c69ac6f4..aa64c73b 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/lib/CachedQuantelGateway.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/lib/CachedQuantelGateway.ts @@ -1,13 +1,15 @@ +import { ProtectedString, protectString } from '@sofie-package-manager/api' import { ClipSearchQuery, QuantelGateway } from 'tv-automation-quantel-gateway-client' import { ClipDataSummary, ServerInfo, ZoneInfo } from 'tv-automation-quantel-gateway-client/dist/quantelTypes' const DEFAULT_CACHE_EXPIRE = 3000 +export type CacheKey = ProtectedString<'CacheKey', string> /** * This is a wrapper for the QuantelGateway class, adding a caching-layer to */ export class CachedQuantelGateway extends QuantelGateway { - private readonly _cache: Map = new Map() + private readonly _cache: Map = new Map() private cacheExpire: number private purgeExpiredCacheTimeout: NodeJS.Timeout | null = null @@ -37,8 +39,8 @@ export class CachedQuantelGateway extends QuantelGateway { async getServer(disableCache?: boolean): Promise { return this.ensureInCache('getServer', [disableCache], async () => super.getServer(disableCache)) } - private getCacheKey(method: string, args: any[]) { - return `${method}_${JSON.stringify(args)}` + private getCacheKey(method: string, args: any[]): CacheKey { + return protectString(`${method}_${JSON.stringify(args)}`) } private async clearCache(method: string, args: any[]): Promise { const cacheKey = this.getCacheKey(method, args) @@ -77,7 +79,7 @@ export class CachedQuantelGateway extends QuantelGateway { } } private purgeExpiredFromCache() { - const expiredKeys: string[] = [] + const expiredKeys: CacheKey[] = [] this._cache.forEach((value, key) => { if (value.timestamp >= Date.now() - this.cacheExpire) return expiredKeys.push(key) diff --git a/shared/packages/worker/src/worker/accessorHandlers/lib/FileHandler.ts b/shared/packages/worker/src/worker/accessorHandlers/lib/FileHandler.ts index b2ed75d9..fa3dadda 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/lib/FileHandler.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/lib/FileHandler.ts @@ -13,6 +13,10 @@ import { assertNever, Reason, stringifyError, + ExpectedPackageId, + protectString, + MonitorId, + AccessorId, } from '@sofie-package-manager/api' import chokidar from 'chokidar' import { GenericWorker } from '../../worker' @@ -39,7 +43,7 @@ const fsLstat = promisify(fs.lstat) export abstract class GenericFileAccessorHandle extends GenericAccessorHandle { constructor( worker: GenericWorker, - accessorId: string, + accessorId: AccessorId, accessor: AccessorOnPackage.Any, content: any, // eslint-disable-line @typescript-eslint/explicit-module-boundary-types private _type: typeof LocalFolderAccessorHandleType | typeof FileShareAccessorHandleType @@ -186,7 +190,9 @@ export abstract class GenericFileAccessorHandle extends GenericAccesso } const watcher = chokidar.watch(this.folderPath, chokidarOptions) - const monitorId = `${this.worker.agentAPI.config.workerId}_${this.worker.uniqueId}_${Date.now()}` + const monitorId = protectString( + `${this.worker.agentAPI.config.workerId}_${this.worker.uniqueId}_${Date.now()}` + ) const seenFiles = new Map() let triggerSendUpdateTimeout: NodeJS.Timeout | null = null @@ -236,7 +242,7 @@ export abstract class GenericFileAccessorHandle extends GenericAccesso if (version) { const expPackage: ExpectedPackage.ExpectedPackageMediaFile = { - _id: `${monitorId}_${filePath}`, + _id: protectString(`${monitorId}_${filePath}`), layers: options.targetLayers, contentVersionHash: hashObj(version), type: ExpectedPackage.PackageType.MEDIA_FILE, diff --git a/shared/packages/worker/src/worker/accessorHandlers/localFolder.ts b/shared/packages/worker/src/worker/accessorHandlers/localFolder.ts index 14dbf7d8..b5c5bcd2 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/localFolder.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/localFolder.ts @@ -22,6 +22,9 @@ import { assertNever, Reason, stringifyError, + AccessorId, + MonitorId, + protectString, } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { GenericFileAccessorHandle, LocalFolderAccessorHandleType } from './lib/FileHandler' @@ -51,7 +54,7 @@ export class LocalFolderAccessorHandle extends GenericFileAccessorHand constructor( worker: GenericWorker, - accessorId: string, + accessorId: AccessorId, private accessor: AccessorOnPackage.LocalFolder, content: any, // eslint-disable-line @typescript-eslint/explicit-module-boundary-types workOptions: any // eslint-disable-line @typescript-eslint/explicit-module-boundary-types @@ -298,17 +301,18 @@ export class LocalFolderAccessorHandle extends GenericFileAccessorHand async setupPackageContainerMonitors( packageContainerExp: PackageContainerExpectation ): Promise { - const resultingMonitors: { [monitorId: string]: MonitorInProgress } = {} + const resultingMonitors: Record = {} const monitorIds = Object.keys( packageContainerExp.monitors ) as (keyof PackageContainerExpectation['monitors'])[] - for (const monitorId of monitorIds) { - if (monitorId === 'packages') { + for (const monitorIdStr of monitorIds) { + if (monitorIdStr === 'packages') { // setup file monitor: - resultingMonitors[monitorId] = this.setupPackagesMonitor(packageContainerExp) + resultingMonitors[protectString(monitorIdStr)] = + this.setupPackagesMonitor(packageContainerExp) } else { // Assert that cronjob is of type "never", to ensure that all types of monitors are handled: - assertNever(monitorId) + assertNever(monitorIdStr) } } diff --git a/shared/packages/worker/src/worker/accessorHandlers/quantel.ts b/shared/packages/worker/src/worker/accessorHandlers/quantel.ts index 56ebbd95..1058440f 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/quantel.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/quantel.ts @@ -1,3 +1,4 @@ +import { Socket } from 'node:net' import { CachedQuantelGateway } from './lib/CachedQuantelGateway' import { GenericAccessorHandle, @@ -21,6 +22,7 @@ import { literal, Reason, INNER_ACTION_TIMEOUT, + AccessorId, } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { ClipData, ClipDataSummary, ServerInfo, ZoneInfo } from 'tv-automation-quantel-gateway-client/dist/quantelTypes' @@ -46,7 +48,7 @@ export class QuantelAccessorHandle extends GenericAccessorHandle extends GenericAccessorHandle { - const sockets = Object.values(httpAgent.sockets) + const sockets = Object.values(httpAgent.sockets) this.worker.logger.silly( `Quantel.QuantelGateway: Currently possessing ${sockets.reduce( (mem, sockets) => mem + (sockets?.length ?? 0), diff --git a/shared/packages/worker/src/worker/lib/expectationHandler.ts b/shared/packages/worker/src/worker/lib/expectationHandler.ts index 539c6861..1e3b4c87 100644 --- a/shared/packages/worker/src/worker/lib/expectationHandler.ts +++ b/shared/packages/worker/src/worker/lib/expectationHandler.ts @@ -2,7 +2,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, } from '@sofie-package-manager/api' @@ -41,15 +41,15 @@ export interface ExpectationHandler { ) => Promise /** * Check if the expectation is fulfilled or not. - * (If the exopectation is already fullfilled, theres no need to workOnExpectation().) + * (If the exopectation is already fulfilled, theres no need to workOnExpectation().) */ - isExpectationFullfilled: ( + isExpectationFulfilled: ( exp: Expectation.Any, - /** If the caller believes that the expectation was fullfilled before */ - wasFullfilled: boolean, + /** If the caller believes that the expectation was fulfilled before */ + wasFulfilled: boolean, genericWorker: GenericWorker, specificWorker: any - ) => Promise + ) => Promise /** * Start working on fullfilling an expectation. * @returns a WorkInProgress, upon beginning of the work. WorkInProgress then handles signalling of the work progress. @@ -60,7 +60,7 @@ export interface ExpectationHandler { specificWorker: any ) => Promise /** - * "Make an expectation un-fullfilled" + * "Make an expectation un-fulfilled" * This is called when an expectation has been removed. */ removeExpectation: ( diff --git a/shared/packages/worker/src/worker/lib/lib.ts b/shared/packages/worker/src/worker/lib/lib.ts index 38884f82..0393d682 100644 --- a/shared/packages/worker/src/worker/lib/lib.ts +++ b/shared/packages/worker/src/worker/lib/lib.ts @@ -1,4 +1,11 @@ -import { Accessor, AccessorOnPackage, PackageContainerOnPackage, assertNever } from '@sofie-package-manager/api' +import { + Accessor, + AccessorId, + AccessorOnPackage, + PackageContainerOnPackage, + assertNever, + objectEntries, +} from '@sofie-package-manager/api' // TODO: This should be changed at some point, // as the "cost" isn't really for a source or a target, but rather for the combination of the two as a pair. @@ -37,7 +44,9 @@ export function prioritizeAccessors( ): AccessorWithPackageContainer[] { const accessors: AccessorWithPackageContainer[] = [] for (const packageContainer of packageContainers) { - for (const [accessorId, accessor] of Object.entries(packageContainer.accessors)) { + for (const [accessorId, accessor] of objectEntries( + packageContainer.accessors + )) { accessors.push({ packageContainer, accessor, @@ -66,7 +75,7 @@ export function prioritizeAccessors( export interface AccessorWithPackageContainer { packageContainer: T accessor: AccessorOnPackage.Any - accessorId: string + accessorId: AccessorId prio: number } diff --git a/shared/packages/worker/src/worker/worker.ts b/shared/packages/worker/src/worker/worker.ts index d8b14316..47f4655c 100644 --- a/shared/packages/worker/src/worker/worker.ts +++ b/shared/packages/worker/src/worker/worker.ts @@ -1,4 +1,5 @@ import { + DataId, Expectation, ExpectationManagerWorkerAgent, LoggerInstance, @@ -6,7 +7,7 @@ import { ReturnTypeDoYouSupportExpectation, ReturnTypeDoYouSupportPackageContainer, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, ReturnTypeRunPackageContainerCronJob, @@ -23,11 +24,11 @@ export interface GenericWorkerAgentAPI { * This is used to prevent multiple workers from working on the same data point at the same time. */ workerStorageWrite: ( - dataId: string, + dataId: DataId, customTimeout: number | undefined, cb: (current: T | undefined) => Promise | T ) => Promise - workerStorageRead: (dataId: string) => Promise + workerStorageRead: (dataId: DataId) => Promise } /** @@ -75,19 +76,19 @@ export abstract class GenericWorker { ): Promise /** * Check if the expectation is fulfilled or not. - * (If the exopectation is already fullfilled, theres no need to workOnExpectation().) + * (If the exopectation is already fulfilled, theres no need to workOnExpectation().) */ - abstract isExpectationFullfilled( + abstract isExpectationFulfilled( exp: Expectation.Any, - wasFullfilled: boolean - ): Promise + wasFulfilled: boolean + ): Promise /** * Start working on fullfilling an expectation. * @returns a WorkInProgress, upon beginning of the work. WorkInProgress then handles signalling of the work progress. */ abstract workOnExpectation(exp: Expectation.Any): Promise /** - * "Make an expectation un-fullfilled" + * "Make an expectation un-fulfilled" * This is called when an expectation has been removed. */ abstract removeExpectation(exp: Expectation.Any): Promise diff --git a/shared/packages/worker/src/worker/workers/linuxWorker/linuxWorker.ts b/shared/packages/worker/src/worker/workers/linuxWorker/linuxWorker.ts index 691028dc..24fb5457 100644 --- a/shared/packages/worker/src/worker/workers/linuxWorker/linuxWorker.ts +++ b/shared/packages/worker/src/worker/workers/linuxWorker/linuxWorker.ts @@ -7,7 +7,7 @@ import { ReturnTypeDoYouSupportExpectation, ReturnTypeDoYouSupportPackageContainer, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, ReturnTypeRunPackageContainerCronJob, @@ -46,10 +46,10 @@ export class LinuxWorker extends GenericWorker { ): Promise { throw new Error(`Not implemented yet`) } - async isExpectationFullfilled( + async isExpectationFulfilled( _exp: Expectation.Any, - _wasFullfilled: boolean - ): Promise { + _wasFulfilled: boolean + ): Promise { throw new Error(`Not implemented yet`) } async workOnExpectation(_exp: Expectation.Any): Promise { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/expectationWindowsHandler.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/expectationWindowsHandler.ts index 67b47084..f5fb0353 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/expectationWindowsHandler.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/expectationWindowsHandler.ts @@ -3,7 +3,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, } from '@sofie-package-manager/api' @@ -27,12 +27,12 @@ export interface ExpectationWindowsHandler extends ExpectationHandler { genericWorker: GenericWorker, windowsWorker: WindowsWorker ) => Promise - isExpectationFullfilled: ( + isExpectationFulfilled: ( exp: Expectation.Any, - wasFullfilled: boolean, + wasFulfilled: boolean, genericWorker: GenericWorker, windowsWorker: WindowsWorker - ) => Promise + ) => Promise workOnExpectation: ( exp: Expectation.Any, genericWorker: GenericWorker, diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopy.ts index 0caee316..c6b9987e 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopy.ts @@ -8,11 +8,12 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, Reason, stringifyError, + AccessorId, } from '@sofie-package-manager/api' import { IWorkInProgress } from '../../../lib/workInProgress' import { checkWorkerHasAccessToPackageContainersOnPackage, lookupAccessorHandles, LookupPackageContainer } from './lib' @@ -46,11 +47,11 @@ export const FileCopy: ExpectationWindowsHandler = { return isFileReadyToStartWorkingOn(worker, lookupSource, lookupTarget) }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isFileCopy(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupTarget = await lookupCopyTargets(worker, exp) @@ -150,7 +151,7 @@ async function lookupCopyTargets( function checkAccessorForQuantelFileflow( _packageContainer: PackageContainerOnPackage, - accessorId: string, + accessorId: AccessorId, accessor: AccessorOnPackage.Any ): { success: true } | { success: false; reason: Reason } { if (accessor.type === Accessor.AccessType.QUANTEL) { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts index d6abbdd3..3fc6c93e 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts @@ -9,11 +9,12 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, Reason, stringifyError, + AccessorId, } from '@sofie-package-manager/api' import { isFileShareAccessorHandle, @@ -61,11 +62,11 @@ export const FileCopyProxy: ExpectationWindowsHandler = { return isFileReadyToStartWorkingOn(worker, lookupSource, lookupTarget) }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isFileCopyProxy(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupTarget = await lookupCopyTargets(worker, exp) @@ -253,7 +254,7 @@ async function lookupCopyTargets( function checkAccessorForQuantelFiles( _packageContainer: PackageContainerOnPackage, - accessorId: string, + accessorId: AccessorId, accessor: AccessorOnPackage.Any ): { success: true } | { success: false; reason: Reason } { if (accessor.type === Accessor.AccessType.QUANTEL) { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileVerify.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileVerify.ts index b28c3cbc..3f524446 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileVerify.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileVerify.ts @@ -7,7 +7,7 @@ import { hashObj, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, } from '@sofie-package-manager/api' @@ -49,11 +49,11 @@ export const FileVerify: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isFileVerify(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupTarget = await lookupTargets(worker, exp) @@ -98,7 +98,7 @@ export const FileVerify: ExpectationWindowsHandler = { workOnExpectation: async (exp: Expectation.Any, worker: GenericWorker): Promise => { if (!isFileVerify(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) - // Since we only verify the existence of the file (in isExpectationFullfilled), we don't need to do anything here. + // Since we only verify the existence of the file (in isExpectationFulfilled), we don't need to do anything here. const lookupTarget = await lookupTargets(worker, exp) if (!lookupTarget.ready) throw new Error(`Can't start working due to target: ${lookupTarget.reason.tech}`) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts index 274c33f3..986a9597 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts @@ -7,7 +7,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, stringifyError, @@ -60,11 +60,11 @@ export const JsonDataCopy: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isJsonDataCopy(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupTarget = await lookupCopyTargets(worker, exp) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts index cf8e9ae0..99d3d6e2 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts @@ -16,6 +16,7 @@ import { Reason, ReturnTypeDoYouSupportExpectation, assertNever, + AccessorId, } from '@sofie-package-manager/api' import { LocalFolderAccessorHandle } from '../../../accessorHandlers/localFolder' import { FileShareAccessorHandle } from '../../../accessorHandlers/fileShare' @@ -126,7 +127,7 @@ export interface LookupChecks { customCheck?: ( packageContainer: PackageContainerOnPackage, - accessorId: string, + accessorId: AccessorId, accessor: AccessorOnPackage.Any ) => { success: true } | { success: false; reason: Reason } } diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts index 6b412e9f..e869c233 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts @@ -6,7 +6,7 @@ import { hashObj, waitTime, Expectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, } from '@sofie-package-manager/api' import { @@ -88,7 +88,7 @@ export async function isFileFulfilled( _worker: GenericWorker, lookupSource: LookupPackageContainer, lookupTarget: LookupPackageContainer -): Promise { +): Promise { if (!lookupTarget.ready) return { fulfilled: false, diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/quantel.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/quantel.ts index 528c8530..0f9020d1 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/quantel.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/quantel.ts @@ -1,6 +1,6 @@ // eslint-disable-next-line node/no-extraneous-import import { AccessorOnPackage, Accessor } from '@sofie-automation/shared-lib/dist/package-manager/package' -import { Expectation, literal } from '@sofie-package-manager/api' +import { AccessorId, Expectation, literal, protectString } from '@sofie-package-manager/api' import { getAccessorHandle, isHTTPProxyAccessorHandle } from '../../../../accessorHandlers/accessor' import { GenericAccessorHandle } from '../../../../accessorHandlers/genericHandle' import { HTTPProxyAccessorHandle } from '../../../../accessorHandlers/httpProxy' @@ -16,7 +16,7 @@ export function getSourceHTTPHandle( const handle = getAccessorHandle( worker, - sourceHandle.accessorId + '__http', + protectString(sourceHandle.accessorId + '__http'), literal({ type: Accessor.AccessType.HTTP_PROXY, baseUrl: thumbnailURL.baseURL, diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index a7b27c84..e4f39c0e 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -7,7 +7,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, assertNever, @@ -77,11 +77,11 @@ export const MediaFilePreview: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isMediaFilePreview(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupSource = await lookupPreviewSources(worker, exp) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts index ea6f9344..56d758e8 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts @@ -4,7 +4,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, assertNever, @@ -77,11 +77,11 @@ export const MediaFileThumbnail: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isMediaFileThumbnail(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupSource = await lookupThumbnailSources(worker, exp) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts index ac04f44f..818fe4ed 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts @@ -7,7 +7,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, stringifyError, @@ -76,11 +76,11 @@ export const PackageDeepScan: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - wasFullfilled: boolean, + wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isPackageDeepScan(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupSource = await lookupDeepScanSources(worker, exp) @@ -114,7 +114,7 @@ export const PackageDeepScan: ExpectationWindowsHandler = { exp.endRequirement.version ) if (packageInfoSynced.needsUpdate) { - if (wasFullfilled) { + if (wasFulfilled) { // Remove the outdated scan result: await lookupTarget.handle.removePackageInfo(PackageInfoType.DeepScan, exp) } diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts index bbe0ca2b..63662598 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts @@ -7,7 +7,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, stringifyError, @@ -75,11 +75,11 @@ export const PackageLoudnessScan: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - wasFullfilled: boolean, + wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isPackageLoudnessScan(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupSource = await lookupLoudnessSources(worker, exp) @@ -113,7 +113,7 @@ export const PackageLoudnessScan: ExpectationWindowsHandler = { exp.endRequirement.version ) if (packageInfoSynced.needsUpdate) { - if (wasFullfilled) { + if (wasFulfilled) { // Remove the outdated scan result: await lookupTarget.handle.removePackageInfo(PackageInfoType.Loudness, exp) } diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts index 3bc3a60d..5c76ac81 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts @@ -7,7 +7,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, stringifyError, @@ -68,11 +68,11 @@ export const PackageScan: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - wasFullfilled: boolean, + wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isPackageScan(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupSource = await lookupScanSources(worker, exp) @@ -106,7 +106,7 @@ export const PackageScan: ExpectationWindowsHandler = { exp.endRequirement.version ) if (packageInfoSynced.needsUpdate) { - if (wasFullfilled) { + if (wasFulfilled) { // Remove the outdated scan result: await lookupTarget.handle.removePackageInfo(PackageInfoType.Scan, exp) } diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts index d97d8121..0ca3f601 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts @@ -7,7 +7,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, stringifyError, @@ -72,11 +72,11 @@ export const QuantelClipCopy: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isQuantelClipCopy(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupTarget = await lookupCopyTargets(worker, exp) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts index e70fe4e6..821edc17 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts @@ -7,7 +7,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, stringifyError, @@ -89,11 +89,11 @@ export const QuantelClipPreview: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isQuantelClipPreview(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupSource = await lookupPreviewSources(worker, exp) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts index 7b06763c..8efeacae 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts @@ -4,7 +4,7 @@ import { Expectation, ReturnTypeDoYouSupportExpectation, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, literal, @@ -86,11 +86,11 @@ export const QuantelThumbnail: ExpectationWindowsHandler = { ready: true, } }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - _wasFullfilled: boolean, + _wasFulfilled: boolean, worker: GenericWorker - ): Promise => { + ): Promise => { if (!isQuantelClipThumbnail(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) const lookupSource = await lookupThumbnailSources(worker, exp) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/lib/lib.ts b/shared/packages/worker/src/worker/workers/windowsWorker/lib/lib.ts index b993a4a6..3789df30 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/lib/lib.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/lib/lib.ts @@ -6,6 +6,8 @@ import { PackageContainerOnPackage, Expectation, ReturnTypeGetCostFortExpectation, + PackageContainerId, + AccessorId, } from '@sofie-package-manager/api' import { prioritizeAccessors } from '../../../lib/lib' import { AccessorHandlerResultGeneric } from '../../../accessorHandlers/genericHandle' @@ -122,7 +124,9 @@ export type VersionProperty = { name: string; value: string | number | undefined export function findBestPackageContainerWithAccessToPackage( worker: GenericWorker, packageContainers: PackageContainerOnPackage[] -): { packageContainer: PackageContainerOnPackage; accessor: AccessorOnPackage.Any; accessorId: string } | undefined { +): + | { packageContainer: PackageContainerOnPackage; accessor: AccessorOnPackage.Any; accessorId: AccessorId } + | undefined { for (const { packageContainer, accessorId, accessor } of prioritizeAccessors(packageContainers)) { if (getAccessorStaticHandle(accessor).doYouSupportAccess(worker, accessor)) { return { packageContainer, accessor, accessorId } @@ -134,9 +138,9 @@ export function findBestPackageContainerWithAccessToPackage( /** Returns the best accessor for a packageContainer */ export function findBestAccessorOnPackageContainer( worker: GenericWorker, - containerId: string, + containerId: PackageContainerId, packageContainer: PackageContainer -): { packageContainer: PackageContainer; accessor: AccessorOnPackage.Any; accessorId: string } | undefined { +): { packageContainer: PackageContainer; accessor: AccessorOnPackage.Any; accessorId: AccessorId } | undefined { // Construct a fake PackageContainerOnPackage from the PackageContainer, so that we can use prioritizeAccessors() later: const packageContainers: PackageContainerOnPackage[] = [ { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/packageContainerExpectationHandler.ts b/shared/packages/worker/src/worker/workers/windowsWorker/packageContainerExpectationHandler.ts index 9ddc9c69..3e43bc32 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/packageContainerExpectationHandler.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/packageContainerExpectationHandler.ts @@ -7,6 +7,7 @@ import { ReturnTypeRunPackageContainerCronJob, Reason, assertNever, + PackageContainerId, } from '@sofie-package-manager/api' import { GenericAccessorHandle, SetupPackageContainerMonitorsResult } from '../../accessorHandlers/genericHandle' @@ -51,7 +52,7 @@ export async function setupPackageContainerMonitors( function checkWorkerHasAccessToPackageContainer( genericWorker: GenericWorker, - containerId: string, + containerId: PackageContainerId, packageContainer: PackageContainer ): ReturnTypeDoYouSupportPackageContainer { // Check that we have access to the packageContainers diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts b/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts index 61e510f1..eb5f8ea0 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts @@ -6,7 +6,7 @@ import { ReturnTypeDoYouSupportExpectation, ReturnTypeDoYouSupportPackageContainer, ReturnTypeGetCostFortExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, ReturnTypeRunPackageContainerCronJob, @@ -85,11 +85,11 @@ export class WindowsWorker extends GenericWorker { ): Promise { return this.getExpectationHandler(exp).isExpectationReadyToStartWorkingOn(exp, this, this) } - async isExpectationFullfilled( + async isExpectationFulfilled( exp: Expectation.Any, - wasFullfilled: boolean - ): Promise { - return this.getExpectationHandler(exp).isExpectationFullfilled(exp, wasFullfilled, this, this) + wasFulfilled: boolean + ): Promise { + return this.getExpectationHandler(exp).isExpectationFulfilled(exp, wasFulfilled, this, this) } async workOnExpectation(exp: Expectation.Any): Promise { return this.getExpectationHandler(exp).workOnExpectation(exp, this, this) diff --git a/shared/packages/worker/src/workerAgent.ts b/shared/packages/worker/src/workerAgent.ts index 5fd46ab8..2d1da1b1 100644 --- a/shared/packages/worker/src/workerAgent.ts +++ b/shared/packages/worker/src/workerAgent.ts @@ -4,7 +4,7 @@ import { Expectation, ExpectationManagerWorkerAgent, ReturnTypeDoYouSupportExpectation, - ReturnTypeIsExpectationFullfilled, + ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, WorkForceWorkerAgent, @@ -28,6 +28,15 @@ import { deferGets, promiseTimeout, INNER_ACTION_TIMEOUT, + protectString, + ExpectationManagerId, + MonitorId, + PackageContainerId, + WorkerAgentId, + DataId, + isProtectedString, + WorkInProgressLocalId, + objectEntries, } from '@sofie-package-manager/api' import { AppContainerAPI } from './appContainerApi' @@ -48,41 +57,42 @@ export class WorkerAgent { // private _busyMethodCount = 0 private workforceAPI: WorkforceAPI private appContainerAPI: AppContainerAPI - private wipI = 0 + private _wipI = 0 private currentJobs: CurrentJob[] = [] - public readonly id: string + public readonly id: WorkerAgentId private workForceConnectionOptions: ClientConnectionOptions private appContainerConnectionOptions: ClientConnectionOptions - private expectationManagers: { - [id: string]: { + private expectationManagers: Map< + ExpectationManagerId, + { url: string api: ExpectationManagerAPI } - } = {} - private expectationManagerHooks: { - [managerId: string]: Hook< - ExpectationManagerWorkerAgent.ExpectationManager, - ExpectationManagerWorkerAgent.WorkerAgent - > - } = {} + > = new Map() + private expectationManagerHooks: Map< + ExpectationManagerId, + Hook + > = new Map() private terminated = false private spinDownTime = 0 private intervalCheckTimer: NodeJS.Timer | null = null private lastWorkTime = 0 - private activeMonitors: { [containerId: string]: { [monitorId: string]: MonitorInProgress } } = {} + private activeMonitors: Map> = new Map() private initWorkForceAPIPromise?: { resolve: () => void; reject: (reason?: any) => void } private initAppContainerAPIPromise?: { resolve: () => void; reject: (reason?: any) => void } private cpuTracker = new CPUTracker() private logger: LoggerInstance - private workerStorageDeferRead = deferGets(async (dataId: string) => { + private workerStorageDeferRead = deferGets(async (dataId: DataId) => { return this.appContainerAPI.workerStorageRead(dataId) }) constructor(logger: LoggerInstance, private config: WorkerConfig) { this.logger = logger.category('WorkerAgent') - this.workforceAPI = new WorkforceAPI(this.logger) + this.id = config.worker.workerId + + this.workforceAPI = new WorkforceAPI(this.id, this.logger) this.workforceAPI.on('disconnected', () => { this.logger.warn('Worker: Workforce disconnected') }) @@ -109,7 +119,7 @@ export class WorkerAgent { this.logger.error(`WorkerAgent: WorkforceAPI error event: ${stringifyError(err)}`) }) - this.appContainerAPI = new AppContainerAPI(this.logger) + this.appContainerAPI = new AppContainerAPI(this.id, this.logger) this.appContainerAPI.on('disconnected', () => { this.logger.warn('Worker: AppContainer disconnected') }) @@ -121,7 +131,6 @@ export class WorkerAgent { this.logger.error(`WorkerAgent: AppContainerAPI error event: ${stringifyError(err)}`) }) - this.id = config.worker.workerId this.workForceConnectionOptions = this.config.worker.workforceURL ? { type: 'websocket', @@ -148,13 +157,13 @@ export class WorkerAgent { localNetworkIds: this.config.worker.networkIds, }, config: this.config.worker, - workerStorageRead: async (dataId: string) => { + workerStorageRead: async (dataId: DataId) => { // return this.appContainerAPI.workerStorageRead(dataId) return this.workerStorageDeferRead(dataId, dataId) }, workerStorageWrite: async ( - dataId: string, + dataId: DataId, customTimeout: number | undefined, cb: (current: any | undefined) => Promise | any ) => { @@ -183,10 +192,13 @@ export class WorkerAgent { }, }, - async (managerId: string, message: ExpectationManagerWorkerAgent.MessageFromWorkerPayload.Any) => { + async ( + managerId: ExpectationManagerId, + message: ExpectationManagerWorkerAgent.MessageFromWorkerPayload.Any + ) => { // Forward the message to the expectationManager: - const manager = this.expectationManagers[managerId] + const manager = this.expectationManagers.get(managerId) if (!manager) throw new Error(`ExpectationManager "${managerId}" not found`) return manager.api.messageFromWorker(message) @@ -205,7 +217,15 @@ export class WorkerAgent { const pAppContainer = new Promise((resolve, reject) => { this.initAppContainerAPIPromise = { resolve, reject } }) - await this.appContainerAPI.init(this.id, this.appContainerConnectionOptions, this) + await this.appContainerAPI.init(this.appContainerConnectionOptions, { + setLogLevel: async (logLevel: LogLevel) => this.setLogLevel(logLevel), + _debugKill: async () => this._debugKill(), + + doYouSupportExpectation: async (exp: Expectation.Any) => this.doYouSupportExpectation(exp), + doYouSupportPackageContainer: async (packageContainer: PackageContainerExpectation) => + this.doYouSupportPackageContainer(packageContainer), + setSpinDownTime: async (spinDownTime: number) => this.setSpinDownTime(spinDownTime), + }) // Wait for this.appContainerAPI to be ready before continuing: await pAppContainer @@ -216,7 +236,16 @@ export class WorkerAgent { const pWorkForce = new Promise((resolve, reject) => { this.initWorkForceAPIPromise = { resolve, reject } }) - await this.workforceAPI.init(this.id, this.workForceConnectionOptions, this) + await this.workforceAPI.init(this.workForceConnectionOptions, { + setLogLevel: async (logLevel: LogLevel) => this.setLogLevel(logLevel), + _debugKill: async () => this._debugKill(), + _debugSendKillConnections: async () => this._debugSendKillConnections(), + getStatusReport: async () => this.getStatusReport(), + + expectationManagerAvailable: async (id: ExpectationManagerId, url: string) => + this.expectationManagerAvailable(id, url), + expectationManagerGone: async (id: ExpectationManagerId) => this.expectationManagerGone(id), + }) // Wait for this.workforceAPI to be ready before continuing: await pWorkForce @@ -228,7 +257,7 @@ export class WorkerAgent { this.terminated = true this.workforceAPI.terminate() - for (const expectationManager of Object.values(this.expectationManagers)) { + for (const expectationManager of this.expectationManagers.values()) { expectationManager.api.terminate() } for (const currentJob of this.currentJobs) { @@ -247,10 +276,10 @@ export class WorkerAgent { this.workforceAPI.hook(hook) } hookToExpectationManager( - managerId: string, + managerId: ExpectationManagerId, hook: Hook ): void { - this.expectationManagerHooks[managerId] = hook + this.expectationManagerHooks.set(managerId, hook) } hookToAppContainer(hook: Hook): void { this.appContainerAPI.hook(hook) @@ -281,16 +310,16 @@ export class WorkerAgent { this.IDidSomeWork() return this._worker.doYouSupportPackageContainer(packageContainer) } - async expectationManagerAvailable(id: string, url: string): Promise { - const existing = this.expectationManagers[id] + async expectationManagerAvailable(managerId: ExpectationManagerId, url: string): Promise { + const existing = this.expectationManagers.get(managerId) if (existing) { existing.api.terminate() } - await this.connectToExpectationManager(id, url) + await this.connectToExpectationManager(managerId, url) } - async expectationManagerGone(id: string): Promise { - delete this.expectationManagers[id] + async expectationManagerGone(managerId: ExpectationManagerId): Promise { + this.expectationManagers.delete(managerId) } public async setLogLevel(logLevel: LogLevel): Promise { setLogLevel(logLevel) @@ -311,11 +340,11 @@ export class WorkerAgent { async getStatusReport(): Promise { const activeMonitors: WorkerStatusReport['activeMonitors'] = [] - for (const [containerId, monitors] of Object.entries(this.activeMonitors)) { - for (const [monitorId, monitor] of Object.entries(monitors)) { + for (const [containerId, monitors] of this.activeMonitors.entries()) { + for (const [monitorId, monitor] of monitors.entries()) { activeMonitors.push({ - containerId, - monitorId, + containerId: containerId, + monitorId: monitorId, label: monitor.properties.label, }) } @@ -361,22 +390,24 @@ export class WorkerAgent { } } - private async connectToExpectationManager(id: string, url: string): Promise { - this.logger.info(`Worker: Connecting to Expectation Manager "${id}" at url "${url}"`) - const expectedManager = (this.expectationManagers[id] = { + private async connectToExpectationManager(managerId: ExpectationManagerId, url: string): Promise { + this.logger.info(`Worker: Connecting to Expectation Manager "${managerId}" at url "${url}"`) + const expectationManager = { url: url, - api: new ExpectationManagerAPI(this.logger), - }) - expectedManager.api.on('disconnected', () => { + api: new ExpectationManagerAPI(this.id, this.logger), + } + expectationManager.api.on('disconnected', () => { this.logger.warn('Worker: ExpectationManager disconnected') }) - expectedManager.api.on('connected', () => { + expectationManager.api.on('connected', () => { this.logger.info('Worker: ExpectationManager connected') }) - expectedManager.api.on('error', (err) => { + expectationManager.api.on('error', (err) => { this.logger.error(`WorkerAgent: ExpectationManagerAPI error event: ${stringifyError(err)}`) }) - const methods: ExpectationManagerWorkerAgent.WorkerAgent = literal({ + this.expectationManagers.set(managerId, expectationManager) + + const methods = literal>({ doYouSupportExpectation: async (exp: Expectation.Any): Promise => { return this._worker.doYouSupportExpectation(exp) }, @@ -408,12 +439,12 @@ export class WorkerAgent { ): Promise => { return this._worker.isExpectationReadyToStartWorkingOn(exp) }, - isExpectationFullfilled: async ( + isExpectationFulfilled: async ( exp: Expectation.Any, - wasFullfilled: boolean - ): Promise => { + wasFulfilled: boolean + ): Promise => { this.IDidSomeWork() - return this._worker.isExpectationFullfilled(exp, wasFullfilled) + return this._worker.isExpectationFulfilled(exp, wasFulfilled) }, workOnExpectation: async ( exp: Expectation.Any, @@ -439,7 +470,7 @@ export class WorkerAgent { cancelled: false, lastUpdated: Date.now(), progress: 0, - wipId: this.wipI++, + wipId: this.getNextWipId(), workInProgress: null, timeoutInterval: setInterval(() => { if (currentJob.cancelled && currentJob.timeoutInterval) { @@ -500,7 +531,7 @@ export class WorkerAgent { if (currentJob.cancelled) return // Don't send updates on cancelled work currentJob.lastUpdated = Date.now() currentJob.progress = progress - expectedManager.api + expectationManager.api .wipEventProgress(currentJob.wipId, actualVersionHash, progress) .catch((err) => { if (!this.terminated) { @@ -519,7 +550,7 @@ export class WorkerAgent { }): ${stringifyError(error)}` ) - expectedManager.api + expectationManager.api .wipEventError(currentJob.wipId, { user: 'Work aborted due to an error', tech: error, @@ -541,7 +572,7 @@ export class WorkerAgent { `Worker "${this.id}" stopped job ${currentJob.wipId}, (${exp.id}), done. (${this.currentJobs.length})` ) - expectedManager.api + expectationManager.api .wipEventDone(currentJob.wipId, actualVersionHash, reason, result) .catch((err) => { if (!this.terminated) { @@ -570,7 +601,7 @@ export class WorkerAgent { this.IDidSomeWork() return this._worker.removeExpectation(exp) }, - cancelWorkInProgress: async (wipId: number): Promise => { + cancelWorkInProgress: async (wipId: WorkInProgressLocalId): Promise => { this.IDidSomeWork() return this.cancelJob(wipId) }, @@ -590,23 +621,26 @@ export class WorkerAgent { packageContainer: PackageContainerExpectation ): Promise => { this.IDidSomeWork() - if (!this.activeMonitors[packageContainer.id]) { - this.activeMonitors[packageContainer.id] = {} + + let activeMonitor = this.activeMonitors.get(packageContainer.id) + if (activeMonitor === undefined) { + activeMonitor = new Map() + this.activeMonitors.set(packageContainer.id, activeMonitor) } const result = await this._worker.setupPackageContainerMonitors(packageContainer) if (result.success) { - const returnMonitors: { [monitorId: string]: MonitorProperties } = {} + const returnMonitors: Record = {} - for (const [monitorId, monitorInProgress] of Object.entries(result.monitors)) { - this.activeMonitors[packageContainer.id][monitorId] = monitorInProgress + for (const [monitorId, monitorInProgress] of objectEntries(result.monitors)) { + activeMonitor.set(monitorId, monitorInProgress) returnMonitors[monitorId] = monitorInProgress.properties monitorInProgress.on('error', (internalError: unknown) => { this.logger.error( `WorkerAgent.methods.setupPackageContainerMonitors: ${JSON.stringify(internalError)}` ) - expectedManager.api + expectationManager.api .monitorStatus(packageContainer.id, monitorId, StatusCode.FATAL, { user: 'Internal Error', tech: stringifyError(internalError), @@ -622,7 +656,7 @@ export class WorkerAgent { }) }) monitorInProgress.on('status', (status: StatusCode, reason: Reason) => { - expectedManager.api + expectationManager.api .monitorStatus(packageContainer.id, monitorId, status, reason) .catch((err) => { if (!this.terminated) { @@ -645,17 +679,18 @@ export class WorkerAgent { } }, disposePackageContainerMonitors: async ( - packageContainerId: string + packageContainerId: PackageContainerId ): Promise => { this.IDidSomeWork() let errorReason: Reason | null = null - const activeMonitors = this.activeMonitors[packageContainerId] || {} + const activeMonitors = this.activeMonitors.get(packageContainerId) + if (!activeMonitors) return { success: true } // nothing to dispose of - for (const [monitorId, monitor] of Object.entries(activeMonitors)) { + for (const [monitorId, monitor] of activeMonitors.entries()) { try { await monitor.stop() - delete this.activeMonitors[monitorId] + activeMonitors.delete(monitorId) } catch (err) { errorReason = { user: 'Unable to stop monitor', @@ -668,7 +703,7 @@ export class WorkerAgent { }, }) // Wrap the methods, so that we can cut off communication upon termination: (this is used in tests) - for (const key of Object.keys(methods) as Array) { + for (const key of Object.keys(methods) as Array>) { const fcn = methods[key] as any methods[key] = ((...args: any[]) => { if (this.terminated) @@ -684,44 +719,44 @@ export class WorkerAgent { // Connect to the ExpectationManager: if (url === '__internal') { // This is used for an internal connection: - const managerHookHook = this.expectationManagerHooks[id] + const managerHookHook = this.expectationManagerHooks.get(managerId) if (!managerHookHook) throw new Error( - `WorkerAgent.connectToExpectationManager: manager hook not found for manager "${id}", call hookToExpectationManager() first!` + `WorkerAgent.connectToExpectationManager: manager hook not found for manager "${managerId}", call hookToExpectationManager() first!` ) - expectedManager.api.hook(managerHookHook) + expectationManager.api.hook(managerHookHook) } const connectionOptions: ClientConnectionOptions = - url === '__internal' ? { type: 'internal' } : { type: 'websocket', url: expectedManager.url } + url === '__internal' ? { type: 'internal' } : { type: 'websocket', url: expectationManager.url } - await expectedManager.api.init(this.id, connectionOptions, methods) + await expectationManager.api.init(connectionOptions, methods) } - private async updateListOfExpectationManagers(newExpectationManagers: { id: string; url: string }[]) { - const ids: { [id: string]: true } = {} + private async updateListOfExpectationManagers(newExpectationManagers: { id: ExpectationManagerId; url: string }[]) { + const ids = new Set() for (const newEm of newExpectationManagers) { - ids[newEm.id] = true + ids.add(newEm.id) - const em = this.expectationManagers[newEm.id] + const em = this.expectationManagers.get(newEm.id) if (!em || em.url !== newEm.url) { // added or changed await this.expectationManagerAvailable(newEm.id, newEm.url) } } // Removed - for (const id of Object.keys(this.expectationManagers)) { - if (!ids[id]) { + for (const id of this.expectationManagers.keys()) { + if (!ids.has(id)) { // removed await this.expectationManagerGone(id) } } } - private async cancelJob(currentJobOrId: CurrentJob | number): Promise { - let wipId: number + private async cancelJob(currentJobOrId: CurrentJob | WorkInProgressLocalId): Promise { + let wipId: WorkInProgressLocalId let currentJob: CurrentJob | undefined - if (typeof currentJobOrId === 'number') { + if (isProtectedString(currentJobOrId)) { wipId = currentJobOrId currentJob = this.currentJobs.find((job) => job.wipId === wipId) } else { @@ -755,7 +790,7 @@ export class WorkerAgent { this.IDidSomeWork() // so that we won't ask again until later // Don's spin down if a monitor is active - if (!Object.keys(this.activeMonitors).length) { + if (!this.activeMonitors.size) { this.logger.debug(`Worker: is idle, requesting spinning down`) if (this.appContainerAPI.connected) { @@ -782,6 +817,9 @@ export class WorkerAgent { private IDidSomeWork() { this.lastWorkTime = Date.now() } + private getNextWipId(): WorkInProgressLocalId { + return protectString(`${this._wipI++}`) + } } interface CurrentJob { cost: ExpectationManagerWorkerAgent.ExpectationCost @@ -789,6 +827,6 @@ interface CurrentJob { lastUpdated: number progress: number timeoutInterval: NodeJS.Timeout | null - wipId: number + wipId: WorkInProgressLocalId workInProgress: IWorkInProgress | null } diff --git a/shared/packages/worker/src/workforceApi.ts b/shared/packages/worker/src/workforceApi.ts index 361b3a48..1c0e103a 100644 --- a/shared/packages/worker/src/workforceApi.ts +++ b/shared/packages/worker/src/workforceApi.ts @@ -1,4 +1,10 @@ -import { AdapterClient, LoggerInstance, WorkForceWorkerAgent } from '@sofie-package-manager/api' +import { + AdapterClient, + ExpectationManagerId, + LoggerInstance, + WorkForceWorkerAgent, + WorkerAgentId, +} from '@sofie-package-manager/api' /** * Exposes the API-methods of a Workforce, to be called from the WorkerAgent @@ -9,10 +15,10 @@ export class WorkforceAPI extends AdapterClient implements WorkForceWorkerAgent.WorkForce { - constructor(logger: LoggerInstance) { - super(logger.category('WorkforceAPI'), 'workerAgent') + constructor(public id: WorkerAgentId, logger: LoggerInstance) { + super(logger.category('WorkforceAPI'), id, 'workerAgent') } - async getExpectationManagerList(): Promise<{ id: string; url: string }[]> { + async getExpectationManagerList(): Promise<{ id: ExpectationManagerId; url: string }[]> { return this._sendMessage('getExpectationManagerList', undefined) } } diff --git a/shared/packages/workforce/src/appContainerApi.ts b/shared/packages/workforce/src/appContainerApi.ts index 835c4590..a7537c73 100644 --- a/shared/packages/workforce/src/appContainerApi.ts +++ b/shared/packages/workforce/src/appContainerApi.ts @@ -6,6 +6,9 @@ import { Expectation, PackageContainerExpectation, Reason, + WorkforceId, + AppType, + AppId, } from '@sofie-package-manager/api' /** @@ -18,6 +21,7 @@ export class AppContainerAPI implements WorkForceAppContainer.AppContainer { constructor( + public id: WorkforceId, methods: WorkForceAppContainer.WorkForce, options: AdapterServerOptions ) { @@ -36,21 +40,21 @@ export class AppContainerAPI async requestAppTypeForExpectation( exp: Expectation.Any - ): Promise<{ success: true; appType: string; cost: number } | { success: false; reason: Reason }> { + ): Promise<{ success: true; appType: AppType; cost: number } | { success: false; reason: Reason }> { return this._sendMessage('requestAppTypeForExpectation', exp) } async requestAppTypeForPackageContainer( packageContainer: PackageContainerExpectation - ): Promise<{ success: true; appType: string; cost: number } | { success: false; reason: Reason }> { + ): Promise<{ success: true; appType: AppType; cost: number } | { success: false; reason: Reason }> { return this._sendMessage('requestAppTypeForPackageContainer', packageContainer) } - async spinUp(appType: string): Promise { + async spinUp(appType: AppType): Promise { return this._sendMessage('spinUp', appType) } - async spinDown(appId: string, reason: string): Promise { + async spinDown(appId: AppId, reason: string): Promise { return this._sendMessage('spinDown', appId, reason) } - async getRunningApps(): Promise<{ appId: string; appType: string }[]> { + async getRunningApps(): Promise<{ appId: AppId; appType: AppType }[]> { return this._sendMessage('getRunningApps') } } diff --git a/shared/packages/workforce/src/expectationManagerApi.ts b/shared/packages/workforce/src/expectationManagerApi.ts index ad0036c7..5cd3418f 100644 --- a/shared/packages/workforce/src/expectationManagerApi.ts +++ b/shared/packages/workforce/src/expectationManagerApi.ts @@ -4,6 +4,7 @@ import { AdapterServerOptions, LogLevel, Statuses, + WorkforceId, } from '@sofie-package-manager/api' /** @@ -16,6 +17,7 @@ export class ExpectationManagerAPI implements WorkForceExpectationManager.ExpectationManager { constructor( + public id: WorkforceId, methods: WorkForceExpectationManager.WorkForce, options: AdapterServerOptions ) { diff --git a/shared/packages/workforce/src/workerAgentApi.ts b/shared/packages/workforce/src/workerAgentApi.ts index 4c9d5ba5..149dc00b 100644 --- a/shared/packages/workforce/src/workerAgentApi.ts +++ b/shared/packages/workforce/src/workerAgentApi.ts @@ -4,6 +4,8 @@ import { AdapterServerOptions, LogLevel, WorkerStatusReport, + ExpectationManagerId, + WorkforceId, } from '@sofie-package-manager/api' /** @@ -16,6 +18,7 @@ export class WorkerAgentAPI implements WorkForceWorkerAgent.WorkerAgent { constructor( + public id: WorkforceId, methods: WorkForceWorkerAgent.WorkForce, options: AdapterServerOptions ) { @@ -35,10 +38,10 @@ export class WorkerAgentAPI return this._sendMessage('getStatusReport') } - async expectationManagerAvailable(id: string, url: string): Promise { + async expectationManagerAvailable(id: ExpectationManagerId, url: string): Promise { return this._sendMessage('expectationManagerAvailable', id, url) } - async expectationManagerGone(id: string): Promise { + async expectationManagerGone(id: ExpectationManagerId): Promise { return this._sendMessage('expectationManagerGone', id) } } diff --git a/shared/packages/workforce/src/workerHandler.ts b/shared/packages/workforce/src/workerHandler.ts index 83d1cb0c..ccaab9b8 100644 --- a/shared/packages/workforce/src/workerHandler.ts +++ b/shared/packages/workforce/src/workerHandler.ts @@ -1,4 +1,10 @@ -import { Expectation, LoggerInstance, PackageContainerExpectation } from '@sofie-package-manager/api' +import { + Expectation, + LoggerInstance, + PackageContainerExpectation, + AppContainerId, + AppType, +} from '@sofie-package-manager/api' import { Workforce } from './workforce' /** The WorkerHandler is in charge of spinning up/down Workers */ @@ -15,8 +21,8 @@ export class WorkerHandler { this.logger.debug(`Workforce: Got request for resources for exp "${exp.id}"`) let errorReason = `No AppContainers registered` - let best: { appContainerId: string; appType: string; cost: number } | null = null - for (const [appContainerId, appContainer] of Object.entries(this.workForce.appContainers)) { + let best: { appContainerId: AppContainerId; appType: AppType; cost: number } | null = null + for (const [appContainerId, appContainer] of this.workForce.appContainers.entries()) { this.logger.debug(`Workforce: Asking appContainer "${appContainerId}"`) const proposal = await appContainer.api.requestAppTypeForExpectation(exp) if (proposal.success) { @@ -35,7 +41,7 @@ export class WorkerHandler { if (best) { this.logger.debug(`Workforce: Selecting appContainer "${best.appContainerId}"`) - const appContainer = this.workForce.appContainers[best.appContainerId] + const appContainer = this.workForce.appContainers.get(best.appContainerId) if (!appContainer) throw new Error(`WorkerHandler: AppContainer "${best.appContainerId}" not found`) this.logger.debug(`Workforce: Spinning up another worker (${best.appType}) on "${best.appContainerId}"`) @@ -51,8 +57,8 @@ export class WorkerHandler { this.logger.debug(`Workforce: Got request for resources for packageContainer "${packageContainer.id}"`) let errorReason = `No AppContainers registered` - let best: { appContainerId: string; appType: string; cost: number } | null = null - for (const [appContainerId, appContainer] of Object.entries(this.workForce.appContainers)) { + let best: { appContainerId: AppContainerId; appType: AppType; cost: number } | null = null + for (const [appContainerId, appContainer] of this.workForce.appContainers.entries()) { this.logger.debug(`Workforce: Asking appContainer "${appContainerId}"`) const proposal = await appContainer.api.requestAppTypeForPackageContainer(packageContainer) if (proposal.success) { @@ -70,8 +76,11 @@ export class WorkerHandler { if (best) { this.logger.debug(`Workforce: Selecting appContainer "${best.appContainerId}"`) - const appContainer = this.workForce.appContainers[best.appContainerId] - if (!appContainer) throw new Error(`WorkerHandler: AppContainer "${best.appContainerId}" not found`) + const appContainer = this.workForce.appContainers.get(best.appContainerId) + if (!appContainer) + throw new Error( + `WorkerHandler: (requestResourcesForPackageContainer) AppContainer "${best.appContainerId}" not found` + ) this.logger.debug(`Workforce: Spinning up another worker (${best.appType}) on "${best.appContainerId}"`) diff --git a/shared/packages/workforce/src/workforce.ts b/shared/packages/workforce/src/workforce.ts index 5265803a..eee0d644 100644 --- a/shared/packages/workforce/src/workforce.ts +++ b/shared/packages/workforce/src/workforce.ts @@ -17,6 +17,14 @@ import { Statuses, StatusCode, setLogLevel, + mapEntries, + ExpectationManagerId, + AppContainerId, + WorkerAgentId, + WORKFORCE_ID, + AppType, + AppId, + AnyProtectedString, } from '@sofie-package-manager/api' import { AppContainerAPI } from './appContainerApi' import { ExpectationManagerAPI } from './expectationManagerApi' @@ -28,40 +36,44 @@ import { WorkerHandler } from './workerHandler' * and mediates connections between the two. */ export class Workforce { - public workerAgents: { - [workerId: string]: { + public workerAgents: Map< + WorkerAgentId, + { api: WorkerAgentAPI } - } = {} + > = new Map() - private expectationManagers: { - [id: string]: { + private expectationManagers: Map< + ExpectationManagerId, + { api: ExpectationManagerAPI url?: string } - } = {} - public appContainers: { - [id: string]: { + > = new Map() + public appContainers: Map< + AppContainerId, + { api: AppContainerAPI initialized: boolean runningApps: { - appId: string - appType: string + appId: AppId + appType: AppType }[] availableApps: { - appType: string + appType: AppType }[] } - } = {} + > = new Map() private websocketServer?: WebsocketServer private workerHandler: WorkerHandler - private _reportedStatuses: { - [expectationManagerId: string]: string // hash of status - } = {} + private _reportedStatuses: Map = new Map() // contains hash of status + private evaluateStatusTimeout: NodeJS.Timeout | null = null private logger: LoggerInstance + private id = WORKFORCE_ID // Since there only ever is one workforce, this is hardcoded + constructor(logger: LoggerInstance, config: WorkforceConfig) { this.logger = logger.category('Workforce') if (config.workforce.port !== null) { @@ -75,59 +87,58 @@ export class Workforce { switch (client.clientType) { case 'workerAgent': { - const workForceMethods = this.getWorkerAgentAPI() - const api = new WorkerAgentAPI(workForceMethods, { + const clientId = client.clientId as WorkerAgentId + const workForceMethods = this.getWorkerAgentAPI(clientId) + const api = new WorkerAgentAPI(this.id, workForceMethods, { type: 'websocket', clientConnection: client, }) - this.workerAgents[client.clientId] = { api } + this.workerAgents.set(clientId, { api }) client.once('close', () => { - this.logger.warn(`Workforce: Connection to Worker "${client.clientId}" closed`) - delete this.workerAgents[client.clientId] + this.logger.warn(`Workforce: Connection to Worker "${clientId}" closed`) + this.workerAgents.delete(clientId) this.triggerEvaluateStatus() }) - this.logger.info(`Workforce: Connection to Worker "${client.clientId}" established`) + this.logger.info(`Workforce: Connection to Worker "${clientId}" established`) this.triggerEvaluateStatus() break } case 'expectationManager': { - const workForceMethods = this.getExpectationManagerAPI() - const api = new ExpectationManagerAPI(workForceMethods, { + const clientId = client.clientId as ExpectationManagerId + const workForceMethods = this.getExpectationManagerAPI(clientId) + const api = new ExpectationManagerAPI(this.id, workForceMethods, { type: 'websocket', clientConnection: client, }) - this.expectationManagers[client.clientId] = { api } + this.expectationManagers.set(clientId, { api }) client.once('close', () => { - this.logger.warn( - `Workforce: Connection to ExpectationManager "${client.clientId}" closed` - ) + this.logger.warn(`Workforce: Connection to ExpectationManager "${clientId}" closed`) this.triggerEvaluateStatus() - delete this.expectationManagers[client.clientId] + this.expectationManagers.delete(clientId) }) - this.logger.info( - `Workforce: Connection to ExpectationManager "${client.clientId}" established` - ) + this.logger.info(`Workforce: Connection to ExpectationManager "${clientId}" established`) this.triggerEvaluateStatus() break } case 'appContainer': { - const workForceMethods = this.getAppContainerAPI(client.clientId) - const api = new AppContainerAPI(workForceMethods, { + const clientId = client.clientId as AppContainerId + const workForceMethods = this.getAppContainerAPI(clientId) + const api = new AppContainerAPI(this.id, workForceMethods, { type: 'websocket', clientConnection: client, }) - this.appContainers[client.clientId] = { + this.appContainers.set(clientId, { api, availableApps: [], runningApps: [], initialized: false, - } + }) client.once('close', () => { - this.logger.warn(`Workforce: Connection to AppContainer "${client.clientId}" closed`) - delete this.appContainers[client.clientId] + this.logger.warn(`Workforce: Connection to AppContainer "${clientId}" closed`) + this.appContainers.delete(clientId) this.triggerEvaluateStatus() }) - this.logger.info(`Workforce: Connection to AppContainer "${client.clientId}" established`) + this.logger.info(`Workforce: Connection to AppContainer "${clientId}" established`) this.triggerEvaluateStatus() break } @@ -158,33 +169,34 @@ export class Workforce { terminate(): void { this.websocketServer?.terminate() } + /** Returns a Hook used to hook up a WorkerAgent to our API-methods. */ getWorkerAgentHook(): Hook { - return (clientId: string, clientMethods: WorkForceWorkerAgent.WorkerAgent) => { + return (clientId: WorkerAgentId, clientMethods) => { // On connection from a workerAgent - const workerAgentMethods = this.getWorkerAgentAPI() - const api = new WorkerAgentAPI(workerAgentMethods, { + const workForceMethods = this.getWorkerAgentAPI(clientId) + const api = new WorkerAgentAPI(this.id, workForceMethods, { type: 'internal', hookMethods: clientMethods, }) - this.workerAgents[clientId] = { api } + this.workerAgents.set(clientId, { api }) - return workerAgentMethods + return workForceMethods } } getExpectationManagerHook(): Hook< WorkForceExpectationManager.WorkForce, WorkForceExpectationManager.ExpectationManager > { - return (clientId: string, clientMethods: WorkForceExpectationManager.ExpectationManager) => { + return (clientId: ExpectationManagerId, clientMethods) => { // On connection from an ExpectationManager - const workForceMethods = this.getExpectationManagerAPI() - const api = new ExpectationManagerAPI(workForceMethods, { + const workForceMethods = this.getExpectationManagerAPI(clientId) + const api = new ExpectationManagerAPI(this.id, workForceMethods, { type: 'internal', hookMethods: clientMethods, }) - this.expectationManagers[clientId] = { api } + this.expectationManagers.set(clientId, { api }) return workForceMethods } @@ -204,7 +216,7 @@ export class Workforce { const statuses: Statuses = {} statuses['any-workers'] = - Object.keys(this.workerAgents).length === 0 + this.workerAgents.size === 0 ? { statusCode: StatusCode.BAD, message: 'No workers connected to workforce', @@ -215,7 +227,7 @@ export class Workforce { } statuses['any-appContainers'] = - Object.keys(this.appContainers).length === 0 + this.appContainers.size === 0 ? { statusCode: StatusCode.BAD, message: 'No appContainers connected to workforce', @@ -228,9 +240,9 @@ export class Workforce { const statusHash = hashObj(statuses) // Report our status to each connected expectationManager: - for (const [id, expectationManager] of Object.entries(this.expectationManagers)) { - if (this._reportedStatuses[id] !== statusHash) { - this._reportedStatuses[id] = statusHash + for (const [id, expectationManager] of this.expectationManagers.entries()) { + if (this._reportedStatuses.get(id) !== statusHash) { + this._reportedStatuses.set(id, statusHash) expectationManager.api .onWorkForceStatus(statuses) @@ -240,12 +252,14 @@ export class Workforce { } /** Return the API-methods that the Workforce exposes to the WorkerAgent */ - private getWorkerAgentAPI(): WorkForceWorkerAgent.WorkForce { + private getWorkerAgentAPI(clientId: WorkerAgentId): WorkForceWorkerAgent.WorkForce { return { - getExpectationManagerList: async (): Promise<{ id: string; url: string }[]> => { - const list: { id: string; url: string }[] = [] + id: clientId, - for (const [id, entry] of Object.entries(this.expectationManagers)) { + getExpectationManagerList: async (): Promise<{ id: ExpectationManagerId; url: string }[]> => { + const list: { id: ExpectationManagerId; url: string }[] = [] + + for (const [id, entry] of this.expectationManagers.entries()) { if (entry.url) { list.push({ id: id, @@ -258,15 +272,17 @@ export class Workforce { } } /** Return the API-methods that the Workforce exposes to the ExpectationManager */ - private getExpectationManagerAPI(): WorkForceExpectationManager.WorkForce { + private getExpectationManagerAPI(clientId: ExpectationManagerId): WorkForceExpectationManager.WorkForce { return { + id: clientId, + setLogLevel: async (logLevel: LogLevel): Promise => { return this.setLogLevel(logLevel) }, - setLogLevelOfApp: async (appId: string, logLevel: LogLevel): Promise => { + setLogLevelOfApp: async (appId: AnyProtectedString, logLevel: LogLevel): Promise => { return this.setLogLevelOfApp(appId, logLevel) }, - registerExpectationManager: async (managerId: string, url: string): Promise => { + registerExpectationManager: async (managerId: ExpectationManagerId, url: string): Promise => { await this.registerExpectationManager(managerId, url) }, requestResourcesForExpectation: async (exp: Expectation.Any): Promise => { @@ -281,7 +297,7 @@ export class Workforce { getStatusReport: async (): Promise => { return this.getStatusReport() }, - _debugKillApp: async (appId: string): Promise => { + _debugKillApp: async (appId: AnyProtectedString): Promise => { return this._debugKillApp(appId) }, _debugSendKillConnections: async (): Promise => { @@ -290,9 +306,10 @@ export class Workforce { } } /** Return the API-methods that the Workforce exposes to the AppContainer */ - private getAppContainerAPI(clientId: string): WorkForceAppContainer.WorkForce { + private getAppContainerAPI(clientId: AppContainerId): WorkForceAppContainer.WorkForce { return { - registerAvailableApps: async (availableApps: { appType: string }[]): Promise => { + id: clientId, + registerAvailableApps: async (availableApps: { appType: AppType }[]): Promise => { await this.registerAvailableApps(clientId, availableApps) }, } @@ -305,19 +322,23 @@ export class Workforce { }, 1) } - public async registerExpectationManager(managerId: string, url: string): Promise { - const em = this.expectationManagers[managerId] + public async registerExpectationManager(managerId: ExpectationManagerId, url: string): Promise { + let em = this.expectationManagers.get(managerId) if (!em || em.url !== url) { // Added/Changed this.logger.info(`Workforce: Register ExpectationManager (${managerId}) at url "${url}"`) // Announce the new expectation manager to the workerAgents: - for (const workerAgent of Object.values(this.workerAgents)) { + for (const workerAgent of this.workerAgents.values()) { await workerAgent.api.expectationManagerAvailable(managerId, url) } + em = this.expectationManagers.get(managerId) } - this.expectationManagers[managerId].url = url + if (!em) { + throw new Error(`Internal Error: (registerExpectationManager) ExpectationManager "${managerId}" not found!`) + } + em.url = url } public async requestResourcesForExpectation(exp: Expectation.Any): Promise { return this.workerHandler.requestResourcesForExpectation(exp) @@ -328,15 +349,15 @@ export class Workforce { public async getStatusReport(): Promise { return { workerAgents: await Promise.all( - Object.values(this.workerAgents).map(async (workerAgent) => workerAgent.api.getStatusReport()) + mapEntries(this.workerAgents, async (_, workerAgent) => workerAgent.api.getStatusReport()) ), - expectationManagers: Object.entries(this.expectationManagers).map(([id, expMan]) => { + expectationManagers: mapEntries(this.expectationManagers, (id, expMan) => { return { id: id, url: expMan.url, } }), - appContainers: Object.entries(this.appContainers).map(([id, appContainer]) => { + appContainers: mapEntries(this.appContainers, (id, appContainer) => { return { id: id, initialized: appContainer.initialized, @@ -353,65 +374,69 @@ export class Workforce { public setLogLevel(logLevel: LogLevel): void { setLogLevel(logLevel) } - public async setLogLevelOfApp(appId: string, logLevel: LogLevel): Promise { - const workerAgent = this.workerAgents[appId] + public async setLogLevelOfApp(appId: AnyProtectedString, logLevel: LogLevel): Promise { + const workerAgent = this.workerAgents.get(appId as WorkerAgentId) if (workerAgent) return workerAgent.api.setLogLevel(logLevel) - const appContainer = this.appContainers[appId] + const appContainer = this.appContainers.get(appId as AppContainerId) if (appContainer) return appContainer.api.setLogLevel(logLevel) - const expectationManager = this.expectationManagers[appId] + const expectationManager = this.expectationManagers.get(appId as ExpectationManagerId) if (expectationManager) return expectationManager.api.setLogLevel(logLevel) - if (appId === 'workforce') return this.setLogLevel(logLevel) + if (appId === this.id) return this.setLogLevel(logLevel) throw new Error(`App with id "${appId}" not found`) } - public async _debugKillApp(appId: string): Promise { - const workerAgent = this.workerAgents[appId] + public async _debugKillApp(appId: AnyProtectedString): Promise { + const workerAgent = this.workerAgents.get(appId as WorkerAgentId) if (workerAgent) return workerAgent.api._debugKill() - const appContainer = this.appContainers[appId] + const appContainer = this.appContainers.get(appId as AppContainerId) if (appContainer) return appContainer.api._debugKill() - const expectationManager = this.expectationManagers[appId] + const expectationManager = this.expectationManagers.get(appId as ExpectationManagerId) if (expectationManager) return expectationManager.api._debugKill() - if (appId === 'workforce') return this._debugKill() + if (appId === this.id) return this._debugKill() throw new Error(`App with id "${appId}" not found`) } public async _debugSendKillConnections(): Promise { - for (const workerAgent of Object.values(this.workerAgents)) { + for (const workerAgent of this.workerAgents.values()) { await workerAgent.api._debugSendKillConnections() } - for (const appContainer of Object.values(this.appContainers)) { + for (const appContainer of this.appContainers.values()) { await appContainer.api._debugSendKillConnections() } - for (const expectationManager of Object.values(this.expectationManagers)) { + for (const expectationManager of this.expectationManagers.values()) { await expectationManager.api._debugSendKillConnections() } } - public async removeExpectationManager(managerId: string): Promise { - const em = this.expectationManagers[managerId] + public async removeExpectationManager(managerId: ExpectationManagerId): Promise { + const em = this.expectationManagers.get(managerId) if (em) { // Removed // Announce the expectation manager removal to the workerAgents: - for (const workerAgent of Object.values(this.workerAgents)) { + for (const workerAgent of this.workerAgents.values()) { await workerAgent.api.expectationManagerGone(managerId) } } } - public async registerAvailableApps(clientId: string, availableApps: { appType: string }[]): Promise { - this.appContainers[clientId].availableApps = availableApps + public async registerAvailableApps(clientId: AppContainerId, availableApps: { appType: AppType }[]): Promise { + const appContainer = this.appContainers.get(clientId) + if (!appContainer) { + throw new Error(`Internal Error: (registerAvailableApps) AppContainer "${clientId}" not found!`) + } + appContainer.availableApps = availableApps // Ask the AppContainer for a list of its running apps: - this.appContainers[clientId].api + appContainer.api .getRunningApps() .then((runningApps) => { - this.appContainers[clientId].runningApps = runningApps - this.appContainers[clientId].initialized = true + appContainer.runningApps = runningApps + appContainer.initialized = true // this.workerHandler.triggerUpdate() }) .catch((error) => { diff --git a/tests/internal-tests/src/__mocks__/child_process.ts b/tests/internal-tests/src/__mocks__/child_process.ts index a2fc5573..af5a0aef 100644 --- a/tests/internal-tests/src/__mocks__/child_process.ts +++ b/tests/internal-tests/src/__mocks__/child_process.ts @@ -198,7 +198,7 @@ async function netUse(commandString: string): Promise<{ stdout: string; stderr: stdout += `Status Local Remote Network\r\n` stdout += `-------------------------------------------------------------------------------\r\n` - for (const [driveLetter, path] of Object.entries(mappedDriveLetters)) { + for (const [driveLetter, path] of Object.entries(mappedDriveLetters)) { stdout += `OK ${driveLetter}: ${path} Microsoft Windows Network \r\n` } stdout += `The command completed successfully.\r\n` diff --git a/tests/internal-tests/src/__mocks__/fs.ts b/tests/internal-tests/src/__mocks__/fs.ts index 51705811..31803571 100644 --- a/tests/internal-tests/src/__mocks__/fs.ts +++ b/tests/internal-tests/src/__mocks__/fs.ts @@ -194,7 +194,7 @@ function deleteMock(path: string, orgPath?: string, dir?: MockDirectory): void { export function __printAllFiles(): string { const getPaths = (dir: MockDirectory, indent: string): string => { const strs: any[] = [] - for (const [name, file] of Object.entries(dir.content)) { + for (const [name, file] of Object.entries(dir.content)) { if (file.isDirectory) { strs.push(`${indent}${name}/`) strs.push(getPaths(file, indent + ' ')) @@ -232,7 +232,7 @@ const errors = { } function fixPath(path: string) { const mountedDrives = wndMock.__mountedDrives - for (const [driveLetter, mountedPath] of Object.entries(mountedDrives)) { + for (const [driveLetter, mountedPath] of Object.entries(mountedDrives)) { path = path.replace(new RegExp(`^${driveLetter}:`), mountedPath.path) } diff --git a/tests/internal-tests/src/__mocks__/tv-automation-quantel-gateway-client.ts b/tests/internal-tests/src/__mocks__/tv-automation-quantel-gateway-client.ts index c6ac5db8..b9bf122b 100644 --- a/tests/internal-tests/src/__mocks__/tv-automation-quantel-gateway-client.ts +++ b/tests/internal-tests/src/__mocks__/tv-automation-quantel-gateway-client.ts @@ -312,7 +312,7 @@ class QuantelGateway extends EventEmitter { if (DEBUG_LOG) console.log('searchClip', JSON.stringify(searchQuery)) return searchClip((clip) => { - for (const [key, value] of Object.entries(searchQuery)) { + for (const [key, value] of Object.entries(searchQuery)) { if ( // @ts-expect-error no index clip[key] === value || diff --git a/tests/internal-tests/src/__tests__/basic.spec.ts b/tests/internal-tests/src/__tests__/basic.spec.ts index 2a408b76..2ddc60f3 100644 --- a/tests/internal-tests/src/__tests__/basic.spec.ts +++ b/tests/internal-tests/src/__tests__/basic.spec.ts @@ -4,7 +4,15 @@ import WNDOrg from 'windows-network-drive' // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' import * as QGatewayClientOrg from 'tv-automation-quantel-gateway-client' -import { Expectation, literal } from '@sofie-package-manager/api' +import { + Expectation, + ExpectationId, + ExpectationManagerId, + ExpectedPackageId, + PackageContainerId, + literal, + protectString, +} from '@sofie-package-manager/api' import type * as fsMockType from '../__mocks__/fs' import type * as WNDType from '../__mocks__/windows-network-drive' import type * as QGatewayClientType from '../__mocks__/tv-automation-quantel-gateway-client' @@ -29,6 +37,15 @@ const QGatewayClient = QGatewayClientOrg as any as typeof QGatewayClientType const fsStat = promisify(fs.stat) +const MANAGER0 = protectString('manager0') +const EXP_copy0 = protectString('copy0') +const PACKAGE0 = protectString('package0') + +const SOURCE0 = protectString('source0') +const SOURCE1 = protectString('source1') +const TARGET0 = protectString('target0') +const TARGET1 = protectString('target1') + describe('Basic', () => { let env: TestEnviromnent @@ -52,11 +69,11 @@ describe('Basic', () => { // console.log(fs.__printAllFiles()) env.expectationManager.updateExpectations({ - copy0: literal({ - id: 'copy0', + [EXP_copy0]: literal({ + id: EXP_copy0, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.FILE_COPY, statusReport: { label: `Copy file0`, @@ -66,10 +83,10 @@ describe('Basic', () => { sendReport: true, }, startRequirement: { - sources: [getLocalSource('source0', 'file0Source.mp4')], + sources: [getLocalSource(SOURCE0, 'file0Source.mp4')], }, endRequirement: { - targets: [getLocalTarget('target0', 'myFolder/file0Target.mp4')], + targets: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], content: { filePath: 'file0Target.mp4', }, @@ -81,14 +98,14 @@ describe('Basic', () => { // Wait for the job to complete: await waitUntil(() => { - expect(env.containerStatuses['target0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_JOB_TIME) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') expect(await fsStat('/targets/target0/myFolder/file0Target.mp4')).toMatchObject({ size: 1234, @@ -99,11 +116,11 @@ describe('Basic', () => { fs.__mockSetDirectory('/targets/target1') env.expectationManager.updateExpectations({ - copy0: literal({ - id: 'copy0', + [EXP_copy0]: literal({ + id: EXP_copy0, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.FILE_COPY, statusReport: { label: `Copy file0`, @@ -113,10 +130,10 @@ describe('Basic', () => { sendReport: true, }, startRequirement: { - sources: [getFileShareSource('source1', 'file0Source.mp4')], + sources: [getFileShareSource(SOURCE1, 'file0Source.mp4')], }, endRequirement: { - targets: [getLocalTarget('target1', 'subFolder0/file0Target.mp4')], + targets: [getLocalTarget(TARGET1, 'subFolder0/file0Target.mp4')], content: { filePath: 'subFolder0/file0Target.mp4', }, @@ -128,14 +145,14 @@ describe('Basic', () => { // Wait for the job to complete: await waitUntil(() => { - expect(env.containerStatuses['target1']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_JOB_TIME) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') expect(await WND.list()).toEqual({ X: { @@ -154,11 +171,11 @@ describe('Basic', () => { const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] env.expectationManager.updateExpectations({ - copy0: literal({ - id: 'copy0', + [EXP_copy0]: literal({ + id: EXP_copy0, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.QUANTEL_CLIP_COPY, statusReport: { label: `Copy quantel clip0`, @@ -168,10 +185,10 @@ describe('Basic', () => { sendReport: true, }, startRequirement: { - sources: [getQuantelSource('source0')], + sources: [getQuantelSource(SOURCE0)], }, endRequirement: { - targets: [getQuantelTarget('target1', 1001)], + targets: [getQuantelTarget(TARGET1, 1001)], content: { guid: 'abc123', }, @@ -183,14 +200,14 @@ describe('Basic', () => { // Wait for the job to complete: await waitUntil(() => { - expect(env.containerStatuses['target1']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_JOB_TIME) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] expect(newClip).toBeTruthy() diff --git a/tests/internal-tests/src/__tests__/issues.spec.ts b/tests/internal-tests/src/__tests__/issues.spec.ts index f8184c69..598d657d 100644 --- a/tests/internal-tests/src/__tests__/issues.spec.ts +++ b/tests/internal-tests/src/__tests__/issues.spec.ts @@ -2,7 +2,15 @@ import fsOrg from 'fs' import { promisify } from 'util' // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' -import { Expectation, literal } from '@sofie-package-manager/api' +import { + Expectation, + ExpectationId, + ExpectationManagerId, + ExpectedPackageId, + PackageContainerId, + literal, + protectString, +} from '@sofie-package-manager/api' import type * as fsMockType from '../__mocks__/fs' import { prepareTestEnviromnent, TestEnviromnent } from './lib/setupEnv' import { waitUntil, waitTime } from './lib/lib' @@ -37,6 +45,14 @@ const fsExists = async (filePath: string) => { // this test can be a bit slower in CI sometimes jest.setTimeout(30000) +const MANAGER0 = protectString('manager0') +const EXP_copy0 = protectString('copy0') +const PACKAGE0 = protectString('package0') + +const SOURCE0 = protectString('source0') +const TARGET0 = protectString('target0') +const TARGET1 = protectString('target1') + describe('Handle unhappy paths', () => { let env: TestEnviromnent @@ -62,14 +78,14 @@ describe('Handle unhappy paths', () => { fs.__mockSetDirectory('/targets/target0') addCopyFileExpectation( env, - 'copy0', - [getLocalSource('source0', 'file0Source.mp4')], - [getLocalTarget('target0', 'file0Target.mp4')] + EXP_copy0, + [getLocalSource(SOURCE0, 'file0Source.mp4')], + [getLocalTarget(TARGET0, 'file0Target.mp4')] ) await waitUntil(() => { // Expect the Expectation to be waiting: - expect(env.expectationStatuses['copy0']).toMatchObject({ + expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ actualVersionHash: null, statusInfo: { status: /new|waiting/, @@ -80,7 +96,7 @@ describe('Handle unhappy paths', () => { }) }, env.WAIT_JOB_TIME) - expect(env.containerStatuses['target0'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.NOT_FOUND ) @@ -90,14 +106,14 @@ describe('Handle unhappy paths', () => { // Wait for the job to complete: await waitUntil(() => { // Expect the copy to have completed by now: - expect(env.containerStatuses['target0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_SCAN_TIME + env.ERROR_WAIT_TIME + env.WAIT_JOB_TIME) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') expect(await fsStat('/targets/target0/file0Target.mp4')).toMatchObject({ size: 1234, }) @@ -130,14 +146,14 @@ describe('Handle unhappy paths', () => { addCopyFileExpectation( env, - 'copy0', - [getLocalSource('source0', 'file0Source.mp4')], - [getLocalTarget('target0', 'file0Target.mp4')] + EXP_copy0, + [getLocalSource(SOURCE0, 'file0Source.mp4')], + [getLocalTarget(TARGET0, 'file0Target.mp4')] ) await waitUntil(() => { // Expect the Expectation to be waiting: - expect(env.expectationStatuses['copy0']).toMatchObject({ + expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ actualVersionHash: null, statusInfo: { status: /new|waiting/, @@ -153,7 +169,7 @@ describe('Handle unhappy paths', () => { await waitUntil(() => { // Expect the Expectation to be waiting: - expect(env.expectationStatuses['copy0']).toMatchObject({ + expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ actualVersionHash: null, statusInfo: { status: 'new', @@ -172,14 +188,14 @@ describe('Handle unhappy paths', () => { // Wait until the copy has completed: await waitUntil(() => { - expect(env.containerStatuses['target0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_JOB_TIME) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') expect(await fsStat('/targets/target0/file0Target.mp4')).toMatchObject({ size: 1234, }) @@ -191,7 +207,7 @@ describe('Handle unhappy paths', () => { test.skip('Expectation changed', async () => { // Expectation is changed while waiting for a file // Expectation is changed while work-in-progress - // Expectation is changed after fullfilled + // Expectation is changed after fulfilled // To be written expect(1).toEqual(1) @@ -199,7 +215,7 @@ describe('Handle unhappy paths', () => { test.skip('Aborting a job', async () => { // Expectation is aborted while waiting for a file // Expectation is aborted while work-in-progress - // Expectation is aborted after fullfilled + // Expectation is aborted after fulfilled // To be written expect(1).toEqual(1) @@ -207,7 +223,7 @@ describe('Handle unhappy paths', () => { test.skip('Restarting a job', async () => { // Expectation is restarted while waiting for a file // Expectation is restarted while work-in-progress - // Expectation is restarted after fullfilled + // Expectation is restarted after fulfilled // To be written expect(1).toEqual(1) @@ -231,20 +247,20 @@ describe('Handle unhappy paths', () => { addCopyFileExpectation( env, - 'copy0', - [getLocalSource('source0', 'file0Source.mp4')], - [getLocalTarget('target0', 'file0Target.mp4')] + EXP_copy0, + [getLocalSource(SOURCE0, 'file0Source.mp4')], + [getLocalTarget(TARGET0, 'file0Target.mp4')] ) await waitTime(env.WAIT_JOB_TIME) // Expect the Expectation to be still working // (the worker has crashed, but expectationManger hasn't noticed yet) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('working') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('working') expect(listenToCopyFile).toHaveBeenCalledTimes(1) // Wait until the work have been aborted, and restarted: await waitUntil(() => { - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual(expect.stringMatching(/new|waiting/)) + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual(expect.stringMatching(/new|waiting/)) }, env.WORK_TIMEOUT_TIME + env.WAIT_JOB_TIME) // Add another worker: @@ -252,10 +268,10 @@ describe('Handle unhappy paths', () => { // Expect the copy to have completed: await waitUntil(() => { - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') - expect(env.containerStatuses['target0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0'].packageStatus?.status).toEqual( + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_SCAN_TIME) @@ -291,31 +307,31 @@ describe('Handle unhappy paths', () => { addCopyFileExpectation( env, - 'copy0', - [getLocalSource('source0', 'file0Source.mp4')], - [getLocalTarget('target0', 'file0Target.mp4')] + EXP_copy0, + [getLocalSource(SOURCE0, 'file0Source.mp4')], + [getLocalTarget(TARGET0, 'file0Target.mp4')] ) await waitTime(env.WAIT_JOB_TIME) // Expect the Expectation to be still working // (the job is timing out, but expectationManger hasn't noticed yet) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('working') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('working') expect(listenToCopyFile).toHaveBeenCalledTimes(1) expect(hasIntercepted).toBe(1) // Wait for the work to be aborted, and restarted: await waitUntil(() => { - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual( + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual( expect.stringMatching(/new|waiting|ready|fulfilled/) ) }, env.WORK_TIMEOUT_TIME + env.WAIT_JOB_TIME) // Wait for the copy to complete: await waitUntil(() => { - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') - expect(env.containerStatuses['target0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0'].packageStatus?.status).toEqual( + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_SCAN_TIME) @@ -341,12 +357,15 @@ describe('Handle unhappy paths', () => { fs.__mockSetDirectory('/targets/target1') // console.log(fs.__printAllFiles()) + const STEP1 = protectString('step1') + const STEP2 = protectString('step2') + env.expectationManager.updateExpectations({ - step1: literal({ - id: 'step1', + [STEP1]: literal({ + id: STEP1, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.FILE_COPY, statusReport: { label: `Copy file0`, @@ -354,10 +373,10 @@ describe('Handle unhappy paths', () => { sendReport: true, }, startRequirement: { - sources: [getLocalSource('source0', 'file0Source.mp4')], + sources: [getLocalSource(SOURCE0, 'file0Source.mp4')], }, endRequirement: { - targets: [getLocalTarget('target0', 'myFolder/file0Target.mp4')], + targets: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], content: { filePath: 'file0Target.mp4', }, @@ -365,12 +384,12 @@ describe('Handle unhappy paths', () => { }, workOptions: {}, }), - step2: literal({ - id: 'step2', - dependsOnFullfilled: ['step1'], // Depends on step 1 + [STEP2]: literal({ + id: STEP2, + dependsOnFulfilled: [STEP1], // Depends on step 1 priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.FILE_COPY, statusReport: { label: `Copy file0`, @@ -378,10 +397,10 @@ describe('Handle unhappy paths', () => { sendReport: true, }, startRequirement: { - sources: [getLocalTarget('target0', 'myFolder/file0Target.mp4')], + sources: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], }, endRequirement: { - targets: [getLocalTarget('target1', 'myFolder/file0Target.mp4')], + targets: [getLocalTarget(TARGET1, 'myFolder/file0Target.mp4')], content: { filePath: 'file0Target.mp4', }, @@ -395,23 +414,23 @@ describe('Handle unhappy paths', () => { // Wait for the job to complete: await waitUntil(() => { - expect(env.containerStatuses['target0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target0'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_JOB_TIME) await waitUntil(() => { - expect(env.containerStatuses['target1']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_JOB_TIME) // Check that step 1 and 2 fullfills: - expect(env.expectationStatuses['step1'].statusInfo.status).toEqual('fulfilled') - expect(env.expectationStatuses['step2'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[STEP1].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[STEP2].statusInfo.status).toEqual('fulfilled') expect(await fsStat('/targets/target0/myFolder/file0Target.mp4')).toMatchObject({ size: 1234, @@ -420,21 +439,21 @@ describe('Handle unhappy paths', () => { size: 1234, }) - // Now A is removed, so step 1 should be un-fullfilled + // Now A is removed, so step 1 should be un-fulfilled fs.__mockDeleteFile('/sources/source0/file0Source.mp4') // Wait for the step 1 to pick up on the change: await waitUntil(() => { - expect(env.expectationStatuses['step1'].statusInfo.status).toMatch(/waiting|new/) - expect(env.containerStatuses['target0'].packages['package0'].packageStatus?.status).toEqual( + expect(env.expectationStatuses[STEP1].statusInfo.status).toMatch(/waiting|new/) + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.NOT_FOUND ) }, env.WAIT_JOB_TIME) - // Step 2 should be un-fullfilled, since it depends on step 1. + // Step 2 should be un-fulfilled, since it depends on step 1. await waitUntil(() => { - expect(env.expectationStatuses['step1'].statusInfo.status).toMatch(/waiting|new/) - expect(env.expectationStatuses['step2'].statusInfo.status).toMatch(/waiting|new/) + expect(env.expectationStatuses[STEP1].statusInfo.status).toMatch(/waiting|new/) + expect(env.expectationStatuses[STEP2].statusInfo.status).toMatch(/waiting|new/) }, env.WAIT_JOB_TIME) // The step1-copied file should remain, since removePackageOnUnFulfill is not set @@ -447,23 +466,24 @@ describe('Handle unhappy paths', () => { // Now, both steps should fulfill again: await waitUntil(() => { - expect(env.expectationStatuses['step1'].statusInfo.status).toBe('fulfilled') - expect(env.expectationStatuses['step2'].statusInfo.status).toBe('fulfilled') + expect(env.expectationStatuses[STEP1].statusInfo.status).toBe('fulfilled') + expect(env.expectationStatuses[STEP2].statusInfo.status).toBe('fulfilled') }, env.WAIT_JOB_TIME) }) }) function addCopyFileExpectation( env: TestEnviromnent, - expectationId: string, + expectationId: ExpectationId, sources: Expectation.SpecificPackageContainerOnPackage.FileSource[], targets: [Expectation.SpecificPackageContainerOnPackage.FileTarget] ) { + const COPY0 = protectString('copy0') env.expectationManager.updateExpectations({ - copy0: literal({ + [COPY0]: literal({ id: expectationId, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.FILE_COPY, statusReport: { label: `Copy file0`, diff --git a/tests/internal-tests/src/__tests__/lib/containers.ts b/tests/internal-tests/src/__tests__/lib/containers.ts index b380b60c..9956136b 100644 --- a/tests/internal-tests/src/__tests__/lib/containers.ts +++ b/tests/internal-tests/src/__tests__/lib/containers.ts @@ -1,14 +1,26 @@ -import { Accessor, AccessorOnPackage, Expectation, literal } from '@sofie-package-manager/api' +import { + Accessor, + AccessorId, + AccessorOnPackage, + Expectation, + PackageContainerId, + literal, + protectString, +} from '@sofie-package-manager/api' + +export const LOCAL0 = protectString('local0') +export const SHARE0 = protectString('share0') +export const QUANTEL0 = protectString('quantel0') export function getLocalSource( - containerId: string, + containerId: PackageContainerId, filePath: string ): Expectation.SpecificPackageContainerOnPackage.FileSource { return { containerId: containerId, label: `Label ${containerId}`, accessors: { - local0: literal({ + [LOCAL0]: literal({ type: Accessor.AccessType.LOCAL_FOLDER, filePath: filePath, folderPath: `/sources/${containerId}/`, @@ -18,14 +30,14 @@ export function getLocalSource( } } export function getLocalTarget( - containerId: string, + containerId: PackageContainerId, filePath: string ): Expectation.SpecificPackageContainerOnPackage.FileTarget { return { containerId: containerId, label: `Label ${containerId}`, accessors: { - local0: literal({ + [LOCAL0]: literal({ type: Accessor.AccessType.LOCAL_FOLDER, filePath: filePath, folderPath: `/targets/${containerId}/`, @@ -37,14 +49,14 @@ export function getLocalTarget( } export function getFileShareSource( - containerId: string, + containerId: PackageContainerId, filePath: string ): Expectation.SpecificPackageContainerOnPackage.FileSource { return { containerId: containerId, label: `Label ${containerId}`, accessors: { - share0: literal({ + [SHARE0]: literal({ type: Accessor.AccessType.FILE_SHARE, filePath: filePath, folderPath: `\\\\networkShare\\sources\\${containerId}\\`, @@ -54,14 +66,14 @@ export function getFileShareSource( } } export function getFileShareTarget( - containerId: string, + containerId: PackageContainerId, filePath: string ): Expectation.SpecificPackageContainerOnPackage.FileTarget { return { containerId: containerId, label: `Label ${containerId}`, accessors: { - share0: literal({ + [SHARE0]: literal({ type: Accessor.AccessType.FILE_SHARE, filePath: filePath, folderPath: `\\\\networkShare\\${containerId}\\`, @@ -71,12 +83,14 @@ export function getFileShareTarget( }, } } -export function getQuantelSource(containerId: string): Expectation.SpecificPackageContainerOnPackage.QuantelClip { +export function getQuantelSource( + containerId: PackageContainerId +): Expectation.SpecificPackageContainerOnPackage.QuantelClip { return { containerId: containerId, label: `Label ${containerId}`, accessors: { - quantel0: literal({ + [QUANTEL0]: literal({ type: Accessor.AccessType.QUANTEL, quantelGatewayUrl: 'http://192.168.0.1', ISAUrls: ['127.0.0.1'], @@ -89,14 +103,14 @@ export function getQuantelSource(containerId: string): Expectation.SpecificPacka } } export function getQuantelTarget( - containerId: string, + containerId: PackageContainerId, serverId: number ): Expectation.SpecificPackageContainerOnPackage.QuantelClip { return { containerId: containerId, label: `Label ${containerId}`, accessors: { - quantel0: literal({ + [QUANTEL0]: literal({ type: Accessor.AccessType.QUANTEL, quantelGatewayUrl: 'http://192.168.0.1', ISAUrls: ['127.0.0.1'], diff --git a/tests/internal-tests/src/__tests__/lib/coreMockAPI.ts b/tests/internal-tests/src/__tests__/lib/coreMockAPI.ts index 9ef977b2..c64d4dcb 100644 --- a/tests/internal-tests/src/__tests__/lib/coreMockAPI.ts +++ b/tests/internal-tests/src/__tests__/lib/coreMockAPI.ts @@ -1,26 +1,34 @@ -import { ExpectedPackage } from '@sofie-package-manager/api' +import { + ExpectedPackage, + ExpectedPackageId, + MonitorId, + PackageContainerId, + ProtectedString, + protectString, +} from '@sofie-package-manager/api' export class CoreMockAPI { - packageInfos: { - [id: string]: any - } = {} + packageInfos: Map = new Map() reset() { - Object.keys(this.packageInfos).forEach((id) => delete this.packageInfos[id]) + this.packageInfos.clear() } async fetchPackageInfoMetadata( type: string, - packageIds: string[] - ): Promise<{ packageId: string; expectedContentVersionHash: string; actualContentVersionHash: string }[]> { + packageIds: ExpectedPackageId[] + ): Promise< + { packageId: ExpectedPackageId; expectedContentVersionHash: string; actualContentVersionHash: string }[] + > { // This is a mock of the Sofie Core method "fetchPackageInfoMetadata" const ids = packageIds.map((packageId) => this.getPackageInfoId(packageId, type)) - const packageInfos: any[] = [] + const packageInfos: PackageInfo[] = [] ids.forEach((id) => { - if (this.packageInfos[id]) { - packageInfos.push(this.packageInfos[id]) + const o = this.packageInfos.get(id) + if (o) { + packageInfos.push(o) } }) @@ -32,7 +40,7 @@ export class CoreMockAPI { } async updatePackageInfo( type: string, - packageId: string, + packageId: ExpectedPackageId, expectedContentVersionHash: string, actualContentVersionHash: string, payload: any @@ -41,8 +49,9 @@ export class CoreMockAPI { const id = this.getPackageInfoId(packageId, type) // upsert: - this.packageInfos[id] = { - ...(this.packageInfos[id] || {}), + + this.packageInfos.set(id, { + ...(this.packageInfos.get(id) ?? {}), packageId: packageId, expectedContentVersionHash: expectedContentVersionHash, @@ -50,21 +59,30 @@ export class CoreMockAPI { type: type, payload: payload, - } + }) } - async removePackageInfo(type: string, packageId: string, _removeDelay?: number): Promise { + async removePackageInfo(type: string, packageId: ExpectedPackageId, _removeDelay?: number): Promise { // This is a mock of the Sofie Core method "removePackageInfo" const id = this.getPackageInfoId(packageId, type) - delete this.packageInfos[id] + this.packageInfos.delete(id) } async reportFromMonitorPackages( - _containerId: string, - _monitorId: string, + _containerId: PackageContainerId, + _monitorId: MonitorId, _filePaths: ExpectedPackage.Any[] ): Promise { // todo: implement this in the mock? } - private getPackageInfoId(packageId: string, type: string): string { - return `${packageId}_${type}` + private getPackageInfoId(packageId: ExpectedPackageId, type: string): PackageInfoId { + return protectString(`${packageId}_${type}`) } } +type PackageInfoId = ProtectedString<'PackageInfoId', string> +interface PackageInfo { + packageId: ExpectedPackageId + expectedContentVersionHash: string + actualContentVersionHash: string + + type: string + payload: any +} diff --git a/tests/internal-tests/src/__tests__/lib/setupEnv.ts b/tests/internal-tests/src/__tests__/lib/setupEnv.ts index cf7fa205..5b7553ec 100644 --- a/tests/internal-tests/src/__tests__/lib/setupEnv.ts +++ b/tests/internal-tests/src/__tests__/lib/setupEnv.ts @@ -16,6 +16,16 @@ import { DataStore, LoggerInstance, Statuses, + ExpectationId, + PackageContainerId, + ExpectedPackageId, + protectString, + WorkerAgentId, + DataId, + LockId, + objectKeys, + ExpectationManagerId, + AppContainerId, } from '@sofie-package-manager/api' import { ExpectationManager, @@ -61,7 +71,7 @@ const defaultTestConfig: SingleAppConfig = { chaosMonkey: false, }, worker: { - workerId: 'worker', + workerId: protectString('worker'), workforceURL: null, appContainerURL: null, resourceId: '', @@ -76,7 +86,7 @@ const defaultTestConfig: SingleAppConfig = { transformerURL: '', }, appContainer: { - appContainerId: 'appContainer0', + appContainerId: protectString('appContainer0'), workforceURL: null, port: 0, maxRunningApps: 1, @@ -105,7 +115,7 @@ export async function setupExpectationManager( const expectationManager = new ExpectationManager( logger, - 'manager0', + protectString('manager0'), { type: 'internal' }, undefined, { type: 'internal' }, @@ -132,7 +142,7 @@ export async function setupExpectationManager( const workerAgents: Worker.WorkerAgent[] = [] let workerI = 0 const addWorker = async () => { - const workerId = defaultTestConfig.worker.workerId + '_' + workerI++ + const workerId = protectString(defaultTestConfig.worker.workerId + '_' + workerI++) const workerAgent = new Worker.WorkerAgent(logger, { ...defaultTestConfig, worker: { @@ -149,7 +159,7 @@ export async function setupExpectationManager( return workerId } - const removeWorker = async (workerId: string) => { + const removeWorker = async (workerId: WorkerAgentId) => { const index = workerAgents.findIndex((wa) => wa.id === workerId) if (index !== -1) { const workerAgent = workerAgents[index] @@ -208,7 +218,7 @@ export async function prepareTestEnviromnent(debugLogging: boolean): Promise { if (debugLogging) console.log('reportExpectationStatus', expectationId, actualVersionHash, statusInfo) - if (!expectationStatuses[expectationId]) { - expectationStatuses[expectationId] = { + let o = expectationStatuses[expectationId] + if (!o) { + o = { actualVersionHash: null, statusInfo: {}, } + expectationStatuses[expectationId] = o } - const o = expectationStatuses[expectationId] + if (actualVersionHash) o.actualVersionHash = actualVersionHash if (statusInfo.status) o.statusInfo.status = statusInfo.status if (statusInfo.progress) o.statusInfo.progress = statusInfo.progress if (statusInfo.statusReason) o.statusInfo.statusReason = statusInfo.statusReason }, reportPackageContainerPackageStatus: ( - containerId: string, - packageId: string, + containerId: PackageContainerId, + packageId: ExpectedPackageId, packageStatus: Omit | null ) => { if (debugLogging) console.log('reportPackageContainerPackageStatus', containerId, packageId, packageStatus) - if (!containerStatuses[containerId]) { - containerStatuses[containerId] = { + + let container = containerStatuses[containerId] + if (!container) { + container = { packages: {}, } + containerStatuses[containerId] = container } - const container = containerStatuses[containerId] + container.packages[packageId] = { packageStatus: packageStatus, } @@ -294,8 +309,13 @@ export async function prepareTestEnviromnent(debugLogging: boolean): Promise delete expectationStatuses[id]) - Object.keys(containerStatuses).forEach((id) => delete containerStatuses[id]) + objectKeys(expectationStatuses).forEach((key: ExpectationId) => { + delete expectationStatuses[key] + }) + objectKeys(containerStatuses).forEach((key: PackageContainerId) => { + delete containerStatuses[key] + }) + coreApi.reset() }, terminate: () => { @@ -320,12 +340,13 @@ export interface TestEnviromnent { containerStatuses: ContainerStatuses reset: () => void terminate: () => void - addWorker: () => Promise - removeWorker: (id: string) => Promise + addWorker: () => Promise + removeWorker: (id: WorkerAgentId) => Promise } -export interface ExpectationStatuses { - [expectationId: string]: { +export type ExpectationStatuses = Record< + ExpectationId, + { actualVersionHash: string | null statusInfo: { status?: string @@ -333,16 +354,18 @@ export interface ExpectationStatuses { statusReason?: Reason } } -} -export interface ContainerStatuses { - [containerId: string]: { - packages: { - [packageId: string]: { +> +export type ContainerStatuses = Record< + PackageContainerId, + { + packages: Record< + ExpectedPackageId, + { packageStatus: Omit | null } - } + > } -} +> /** This is a mock of the AppContainer, used in unit tests */ class MockAppContainer { @@ -356,10 +379,11 @@ class MockAppContainer { } getWorkerAgentHook(): Hook { - return (_clientId: string, _clientMethods: AppContainerWorkerAgent.WorkerAgent) => { + return (clientId: WorkerAgentId, _clientMethods: Omit) => { // On connection from a workerAgent const workerAgentMethods: AppContainerWorkerAgent.AppContainer = { + id: clientId, ping: async () => { // do nothing }, @@ -368,18 +392,18 @@ class MockAppContainer { }, workerStorageWriteLock: async ( - dataId: string, + dataId: DataId, customTimeout?: number - ): Promise<{ lockId: string; current: any | undefined }> => { + ): Promise<{ lockId: LockId; current: any | undefined }> => { return this.workerStorage.getWriteLock(dataId, customTimeout) }, - workerStorageReleaseLock: async (dataId: string, lockId: string): Promise => { + workerStorageReleaseLock: async (dataId: DataId, lockId: LockId): Promise => { return this.workerStorage.releaseLock(dataId, lockId) }, - workerStorageWrite: async (dataId: string, lockId: string, data: string): Promise => { + workerStorageWrite: async (dataId: DataId, lockId: LockId, data: string): Promise => { return this.workerStorage.write(dataId, lockId, data) }, - workerStorageRead: async (dataId: string): Promise => { + workerStorageRead: async (dataId: DataId): Promise => { return this.workerStorage.read(dataId) }, } diff --git a/tests/internal-tests/src/__tests__/quantel.spec.ts b/tests/internal-tests/src/__tests__/quantel.spec.ts index 479cc750..552496bc 100644 --- a/tests/internal-tests/src/__tests__/quantel.spec.ts +++ b/tests/internal-tests/src/__tests__/quantel.spec.ts @@ -1,7 +1,16 @@ // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' import * as QGatewayClientOrg from 'tv-automation-quantel-gateway-client' -import { Expectation, literal, waitTime } from '@sofie-package-manager/api' +import { + Expectation, + ExpectationId, + ExpectationManagerId, + ExpectedPackageId, + PackageContainerId, + literal, + protectString, + waitTime, +} from '@sofie-package-manager/api' import type * as QGatewayClientType from '../__mocks__/tv-automation-quantel-gateway-client' import { prepareTestEnviromnent, TestEnviromnent } from './lib/setupEnv' import { waitUntil } from './lib/lib' @@ -24,15 +33,22 @@ describe('Quantel', () => { env.reset() QGatewayClient.resetMock() }) + const EXP_copy0 = protectString('copy0') + const MANAGER0 = protectString('manager0') + const PACKAGE0 = protectString('package0') + + const SOURCE0 = protectString('source0') + const TARGET1 = protectString('target1') + test('Clone by guid', async () => { const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] env.expectationManager.updateExpectations({ - copy0: literal({ - id: 'copy0', + [EXP_copy0]: literal({ + id: EXP_copy0, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.QUANTEL_CLIP_COPY, statusReport: { label: `Copy quantel clip0`, @@ -42,10 +58,10 @@ describe('Quantel', () => { sendReport: true, }, startRequirement: { - sources: [getQuantelSource('source0')], + sources: [getQuantelSource(SOURCE0)], }, endRequirement: { - targets: [getQuantelTarget('target1', 1001)], + targets: [getQuantelTarget(TARGET1, 1001)], content: { guid: 'abc123', }, @@ -57,14 +73,14 @@ describe('Quantel', () => { // Wait for the job to complete: await waitUntil(() => { - expect(env.containerStatuses['target1']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_JOB_TIME) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] expect(newClip).toBeTruthy() @@ -83,11 +99,11 @@ describe('Quantel', () => { const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] env.expectationManager.updateExpectations({ - copy0: literal({ - id: 'copy0', + [EXP_copy0]: literal({ + id: EXP_copy0, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.QUANTEL_CLIP_COPY, statusReport: { label: `Copy quantel clip0`, @@ -97,10 +113,10 @@ describe('Quantel', () => { sendReport: true, }, startRequirement: { - sources: [getQuantelSource('source0')], + sources: [getQuantelSource(SOURCE0)], }, endRequirement: { - targets: [getQuantelTarget('target1', 1001)], + targets: [getQuantelTarget(TARGET1, 1001)], content: { title: 'elephants', }, @@ -112,14 +128,14 @@ describe('Quantel', () => { // Wait for the job to complete: await waitUntil(() => { - expect(env.containerStatuses['target1']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, env.WAIT_JOB_TIME) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] expect(newClip).toBeTruthy() @@ -173,11 +189,11 @@ describe('Quantel', () => { const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] env.expectationManager.updateExpectations({ - copy0: literal({ - id: 'copy0', + [EXP_copy0]: literal({ + id: EXP_copy0, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.QUANTEL_CLIP_COPY, statusReport: { label: `Copy quantel clip0`, @@ -187,10 +203,10 @@ describe('Quantel', () => { sendReport: true, }, startRequirement: { - sources: [getQuantelSource('source0')], + sources: [getQuantelSource(SOURCE0)], }, endRequirement: { - targets: [getQuantelTarget('target1', 1001)], + targets: [getQuantelTarget(TARGET1, 1001)], content: { title: 'New elephants', }, @@ -209,13 +225,13 @@ describe('Quantel', () => { expect(instance.mockCopyCount).toBe(0) } - expect(env.containerStatuses['target1']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] expect(newClip).toBeTruthy() @@ -234,11 +250,11 @@ describe('Quantel', () => { // const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123-reserved-clip')[0] env.expectationManager.updateExpectations({ - copy0: literal({ - id: 'copy0', + [EXP_copy0]: literal({ + id: EXP_copy0, priority: 0, - managerId: 'manager0', - fromPackages: [{ id: 'package0', expectedContentVersionHash: 'abcd1234' }], + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], type: Expectation.Type.QUANTEL_CLIP_COPY, statusReport: { label: `Copy quantel clip0`, @@ -248,10 +264,10 @@ describe('Quantel', () => { sendReport: true, }, startRequirement: { - sources: [getQuantelSource('source0')], + sources: [getQuantelSource(SOURCE0)], }, endRequirement: { - targets: [getQuantelTarget('target1', 1001)], + targets: [getQuantelTarget(TARGET1, 1001)], content: { guid: 'abc123-reserved-clip', }, @@ -263,12 +279,12 @@ describe('Quantel', () => { // Wait for the job to get the correct status: await waitUntil(() => { - expect(env.containerStatuses['target1']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.statusReason.user).toEqual( + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.statusReason.user).toEqual( `Reserved clip, not yet ready for playout` ) - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.PLACEHOLDER ) }, env.WAIT_JOB_TIME) @@ -286,15 +302,15 @@ describe('Quantel', () => { // Wait for the job to finish: await waitUntil(() => { - expect(env.containerStatuses['target1']).toBeTruthy() - expect(env.containerStatuses['target1'].packages['package0']).toBeTruthy() - // expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.statusReason.user).toEqual('') - expect(env.containerStatuses['target1'].packages['package0'].packageStatus?.status).toEqual( + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + // expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.statusReason.user).toEqual('') + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) }, 500 + env.WAIT_JOB_TIME) - expect(env.expectationStatuses['copy0'].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') }) }) diff --git a/yarn.lock b/yarn.lock index 3c70b941..3d982e59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + "@ampproject/remapping@^2.1.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" @@ -142,12 +147,17 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-string-parser@^7.18.10": + version "7.21.5" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd" + integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w== + "@babel/helper-string-parser@^7.19.4": version "7.19.4" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== -"@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": +"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== @@ -283,6 +293,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.19.0" +"@babel/runtime@^7.21.0": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682" + integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.3.3": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" @@ -308,12 +325,13 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@7.18.4": - version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" - integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== +"@babel/types@7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" + integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA== dependencies: - "@babel/helper-validator-identifier" "^7.16.7" + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" "@babel/types@^7.0.0", "@babel/types@^7.18.2", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.20.2", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3": @@ -354,14 +372,31 @@ enabled "2.0.x" kuler "^2.0.0" -"@eslint/eslintrc@^1.4.1": - version "1.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884" + integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ== + +"@eslint-community/regexpp@^4.6.1": + version "4.7.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.7.0.tgz#96e7c05e738327602ae5942437f9c6b177ec279a" + integrity sha512-+HencqxU7CFJnQb7IKtuNBqS6Yx3Tz4kOL8BJXo+JyeiBm5MEX6pO8onXDkjrkCRlfYXS1Axro15ZjVFe9YgsA== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.4.0" + espree "^9.6.0" globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -369,15 +404,20 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@eslint/js@^8.47.0": + version "8.47.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.47.0.tgz#5478fdf443ff8158f9de171c704ae45308696c7d" + integrity sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og== + "@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== +"@humanwhocodes/config-array@^0.11.10": + version "0.11.10" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" + integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" @@ -436,109 +476,109 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.3.1.tgz#3e3f876e4e47616ea3b1464b9fbda981872e9583" - integrity sha512-IRE6GD47KwcqA09RIWrabKdHPiKDGgtAL31xDxbi/RjQMsr+lY+ppxmHwY0dUEV3qvvxZzoe5Hl0RXZJOjQNUg== +"@jest/console@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.5.0.tgz#593a6c5c0d3f75689835f1b3b4688c4f8544cb57" + integrity sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.5.0" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^29.3.1" - jest-util "^29.3.1" + jest-message-util "^29.5.0" + jest-util "^29.5.0" slash "^3.0.0" -"@jest/core@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.3.1.tgz#bff00f413ff0128f4debec1099ba7dcd649774a1" - integrity sha512-0ohVjjRex985w5MmO5L3u5GR1O30DexhBSpuwx2P+9ftyqHdJXnk7IUWiP80oHMvt7ubHCJHxV0a0vlKVuZirw== +"@jest/core@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.5.0.tgz#76674b96904484e8214614d17261cc491e5f1f03" + integrity sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ== dependencies: - "@jest/console" "^29.3.1" - "@jest/reporters" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/console" "^29.5.0" + "@jest/reporters" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^29.2.0" - jest-config "^29.3.1" - jest-haste-map "^29.3.1" - jest-message-util "^29.3.1" - jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-resolve-dependencies "^29.3.1" - jest-runner "^29.3.1" - jest-runtime "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" - jest-watcher "^29.3.1" + jest-changed-files "^29.5.0" + jest-config "^29.5.0" + jest-haste-map "^29.5.0" + jest-message-util "^29.5.0" + jest-regex-util "^29.4.3" + jest-resolve "^29.5.0" + jest-resolve-dependencies "^29.5.0" + jest-runner "^29.5.0" + jest-runtime "^29.5.0" + jest-snapshot "^29.5.0" + jest-util "^29.5.0" + jest-validate "^29.5.0" + jest-watcher "^29.5.0" micromatch "^4.0.4" - pretty-format "^29.3.1" + pretty-format "^29.5.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.3.1.tgz#eb039f726d5fcd14698acd072ac6576d41cfcaa6" - integrity sha512-pMmvfOPmoa1c1QpfFW0nXYtNLpofqo4BrCIk6f2kW4JFeNlHV2t3vd+3iDLf31e2ot2Mec0uqZfmI+U0K2CFag== +"@jest/environment@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.5.0.tgz#9152d56317c1fdb1af389c46640ba74ef0bb4c65" + integrity sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ== dependencies: - "@jest/fake-timers" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/fake-timers" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" - jest-mock "^29.3.1" + jest-mock "^29.5.0" -"@jest/expect-utils@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.3.1.tgz#531f737039e9b9e27c42449798acb5bba01935b6" - integrity sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g== +"@jest/expect-utils@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.5.0.tgz#f74fad6b6e20f924582dc8ecbf2cb800fe43a036" + integrity sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg== dependencies: - jest-get-type "^29.2.0" + jest-get-type "^29.4.3" -"@jest/expect@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.3.1.tgz#456385b62894349c1d196f2d183e3716d4c6a6cd" - integrity sha512-QivM7GlSHSsIAWzgfyP8dgeExPRZ9BIe2LsdPyEhCGkZkoyA+kGsoIzbKAfZCvvRzfZioKwPtCZIt5SaoxYCvg== +"@jest/expect@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.5.0.tgz#80952f5316b23c483fbca4363ce822af79c38fba" + integrity sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g== dependencies: - expect "^29.3.1" - jest-snapshot "^29.3.1" + expect "^29.5.0" + jest-snapshot "^29.5.0" -"@jest/fake-timers@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.3.1.tgz#b140625095b60a44de820876d4c14da1aa963f67" - integrity sha512-iHTL/XpnDlFki9Tq0Q1GGuVeQ8BHZGIYsvCO5eN/O/oJaRzofG9Xndd9HuSDBI/0ZS79pg0iwn07OMTQ7ngF2A== +"@jest/fake-timers@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.5.0.tgz#d4d09ec3286b3d90c60bdcd66ed28d35f1b4dc2c" + integrity sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg== dependencies: - "@jest/types" "^29.3.1" - "@sinonjs/fake-timers" "^9.1.2" + "@jest/types" "^29.5.0" + "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^29.3.1" - jest-mock "^29.3.1" - jest-util "^29.3.1" + jest-message-util "^29.5.0" + jest-mock "^29.5.0" + jest-util "^29.5.0" -"@jest/globals@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.3.1.tgz#92be078228e82d629df40c3656d45328f134a0c6" - integrity sha512-cTicd134vOcwO59OPaB6AmdHQMCtWOe+/DitpTZVxWgMJ+YvXL1HNAmPyiGbSHmF/mXVBkvlm8YYtQhyHPnV6Q== +"@jest/globals@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.5.0.tgz#6166c0bfc374c58268677539d0c181f9c1833298" + integrity sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ== dependencies: - "@jest/environment" "^29.3.1" - "@jest/expect" "^29.3.1" - "@jest/types" "^29.3.1" - jest-mock "^29.3.1" + "@jest/environment" "^29.5.0" + "@jest/expect" "^29.5.0" + "@jest/types" "^29.5.0" + jest-mock "^29.5.0" -"@jest/reporters@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.3.1.tgz#9a6d78c109608e677c25ddb34f907b90e07b4310" - integrity sha512-GhBu3YFuDrcAYW/UESz1JphEAbvUjaY2vShRZRoRY1mxpCMB3yGSJ4j9n0GxVlEOdCf7qjvUfBCrTUUqhVfbRA== +"@jest/reporters@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.5.0.tgz#985dfd91290cd78ddae4914ba7921bcbabe8ac9b" + integrity sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/console" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@jridgewell/trace-mapping" "^0.3.15" "@types/node" "*" chalk "^4.0.0" @@ -551,21 +591,14 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-message-util "^29.3.1" - jest-util "^29.3.1" - jest-worker "^29.3.1" + jest-message-util "^29.5.0" + jest-util "^29.5.0" + jest-worker "^29.5.0" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" v8-to-istanbul "^9.0.1" -"@jest/schemas@^29.0.0": - version "29.0.0" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a" - integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA== - dependencies: - "@sinclair/typebox" "^0.24.1" - "@jest/schemas@^29.4.3": version "29.4.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.4.3.tgz#39cf1b8469afc40b6f5a2baaa146e332c4151788" @@ -573,62 +606,62 @@ dependencies: "@sinclair/typebox" "^0.25.16" -"@jest/source-map@^29.2.0": - version "29.2.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.2.0.tgz#ab3420c46d42508dcc3dc1c6deee0b613c235744" - integrity sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ== +"@jest/source-map@^29.4.3": + version "29.4.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.4.3.tgz#ff8d05cbfff875d4a791ab679b4333df47951d20" + integrity sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w== dependencies: "@jridgewell/trace-mapping" "^0.3.15" callsites "^3.0.0" graceful-fs "^4.2.9" -"@jest/test-result@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.3.1.tgz#92cd5099aa94be947560a24610aa76606de78f50" - integrity sha512-qeLa6qc0ddB0kuOZyZIhfN5q0e2htngokyTWsGriedsDhItisW7SDYZ7ceOe57Ii03sL988/03wAcBh3TChMGw== +"@jest/test-result@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.5.0.tgz#7c856a6ca84f45cc36926a4e9c6b57f1973f1408" + integrity sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ== dependencies: - "@jest/console" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/console" "^29.5.0" + "@jest/types" "^29.5.0" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.3.1.tgz#fa24b3b050f7a59d48f7ef9e0b782ab65123090d" - integrity sha512-IqYvLbieTv20ArgKoAMyhLHNrVHJfzO6ARZAbQRlY4UGWfdDnLlZEF0BvKOMd77uIiIjSZRwq3Jb3Fa3I8+2UA== +"@jest/test-sequencer@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz#34d7d82d3081abd523dbddc038a3ddcb9f6d3cc4" + integrity sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ== dependencies: - "@jest/test-result" "^29.3.1" + "@jest/test-result" "^29.5.0" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" + jest-haste-map "^29.5.0" slash "^3.0.0" -"@jest/transform@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.3.1.tgz#1e6bd3da4af50b5c82a539b7b1f3770568d6e36d" - integrity sha512-8wmCFBTVGYqFNLWfcOWoVuMuKYPUBTnTMDkdvFtAYELwDOl9RGwOsvQWGPFxDJ8AWY9xM/8xCXdqmPK3+Q5Lug== +"@jest/transform@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.5.0.tgz#cf9c872d0965f0cbd32f1458aa44a2b1988b00f9" + integrity sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^29.3.1" + "@jest/types" "^29.5.0" "@jridgewell/trace-mapping" "^0.3.15" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^2.0.0" fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" - jest-regex-util "^29.2.0" - jest-util "^29.3.1" + jest-haste-map "^29.5.0" + jest-regex-util "^29.4.3" + jest-util "^29.5.0" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" - write-file-atomic "^4.0.1" + write-file-atomic "^4.0.2" -"@jest/types@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.3.1.tgz#7c5a80777cb13e703aeec6788d044150341147e3" - integrity sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA== +"@jest/types@^29.3.1", "@jest/types@^29.5.0": + version "29.5.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.5.0.tgz#f59ef9b031ced83047c67032700d8c807d6e1593" + integrity sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog== dependencies: - "@jest/schemas" "^29.0.0" + "@jest/schemas" "^29.4.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" @@ -1222,11 +1255,6 @@ resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.1.0.tgz#957cb64ea2f5ce527cc9cf02a096baeb0d2b99b4" integrity sha512-a31EnjuIDSX8IXBUib3cYLDRlPMU36AWX4xS8ysLaNu4ZzUesDiPt83pgrW2X1YLMe5L2HbDyaKK5BrL4cNKaQ== -"@sinclair/typebox@^0.24.1": - version "0.24.51" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" - integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== - "@sinclair/typebox@^0.25.16": version "0.25.24" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.24.tgz#8c7688559979f7079aacaf31aa881c3aa410b718" @@ -1247,41 +1275,47 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== -"@sinonjs/commons@^1.7.0": - version "1.8.3" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" - integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== +"@sinonjs/commons@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" + integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" - integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== +"@sinonjs/fake-timers@^10.0.2": + version "10.1.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.1.0.tgz#3595e42b3f0a7df80a9681cf58d8cb418eac1e99" + integrity sha512-w1qd368vtrwttm1PRJWPW1QHlbmHrVDGs1eBH/jZvRPUFS4MNXV9Q33EQdjOdeAxZ7O8+3wM7zxztm2nfUSyKw== dependencies: - "@sinonjs/commons" "^1.7.0" + "@sinonjs/commons" "^3.0.0" -"@sofie-automation/code-standard-preset@~2.3": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@sofie-automation/code-standard-preset/-/code-standard-preset-2.3.1.tgz#d77113a0012353a1e956d65d8b7f37ee2f5f13ee" - integrity sha512-ZODBsjNKxuzytp+0BqX0LTufjdc5pV6/FV+H9KURW3tbAAgkD7TChMzip86wrzB14hIaOh3exe32a/JXMYFlwg== - dependencies: - "@typescript-eslint/eslint-plugin" "^5.48.1" - "@typescript-eslint/parser" "^5.48.1" - date-fns "^2.29.3" - eslint "^8.31.0" - eslint-config-prettier "^8.6.0" +"@sofie-automation/code-standard-preset@^2.5.1": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@sofie-automation/code-standard-preset/-/code-standard-preset-2.5.1.tgz#3bf11898f37131c25c4a4142d7fd37a991593b9d" + integrity sha512-jthD352evFs0EMPGjB35ftPipSKxUEZFcYNhfFMLw4NcsZKIPLwh+yavIjpIVBYslmJh/QHz+LrZbtib1+m41Q== + dependencies: + "@sofie-automation/eslint-plugin" "^0.1.1" + "@typescript-eslint/eslint-plugin" "^5.59.11" + "@typescript-eslint/parser" "^5.59.11" + "@typescript-eslint/utils" "^5.59.11" + date-fns "^2.30.0" + eslint "^8.42.0" + eslint-config-prettier "^8.8.0" eslint-plugin-jest "^27.2.1" eslint-plugin-node "^11.1.0" eslint-plugin-prettier "^4.2.1" husky "^8.0.3" license-checker "^25.0.1" - lint-staged "^13.1.0" + lint-staged "^13.2.2" meow "^11.0.0" - prettier "^2.8.2" + prettier "^2.8.8" read-pkg-up "^9.1.0" - semver "^7.3.8" - shelljs "^0.8.5" + semver "^7.5.2" + +"@sofie-automation/eslint-plugin@^0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@sofie-automation/eslint-plugin/-/eslint-plugin-0.1.1.tgz#32cbb94fc3dd35e2dbcb95239512d2ec65133c54" + integrity sha512-Abl0/5KDQrktJ0YoA8ULXygi2s5Q7tADsrhDnighzdR745eeYuP8MlW17NCVxzGbwkm+UKNPtGA+TRixTKJCFw== "@sofie-automation/server-core-integration@1.50.0-nightly-release50-20230627-124025-83abcdc.0": version "1.50.0-nightly-release50-20230627-124025-83abcdc.0" @@ -1517,9 +1551,9 @@ "@types/istanbul-lib-report" "*" "@types/jest@^29.2.5": - version "29.2.5" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.2.5.tgz#c27f41a9d6253f288d1910d3c5f09484a56b73c0" - integrity sha512-H2cSxkKgVmqNHXP7TC2L/WUorrZu8ZigyRywfVzv6EyBlxj39n4C00hjXYQWsbwqgElaj/CiAeSRmk5GoaKTgw== + version "29.5.1" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.1.tgz#83c818aa9a87da27d6da85d3378e5a34d2f31a47" + integrity sha512-tEuVcHrpaixS36w7hpsfLBLpjtMRJUE09/MHXn923LOVojDwyC14cWcfc0rDs0VEfUyYmt/+iX1kxxp+gZMcaQ== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -1758,87 +1792,136 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.48.1": - version "5.48.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.1.tgz#deee67e399f2cb6b4608c935777110e509d8018c" - integrity sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ== +"@typescript-eslint/eslint-plugin@^5.59.11": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== dependencies: - "@typescript-eslint/scope-manager" "5.48.1" - "@typescript-eslint/type-utils" "5.48.1" - "@typescript-eslint/utils" "5.48.1" + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" + graphemer "^1.4.0" ignore "^5.2.0" natural-compare-lite "^1.4.0" - regexpp "^3.2.0" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.48.1": - version "5.48.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.48.1.tgz#d0125792dab7e232035434ab8ef0658154db2f10" - integrity sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA== +"@typescript-eslint/parser@^5.59.11": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: - "@typescript-eslint/scope-manager" "5.48.1" - "@typescript-eslint/types" "5.48.1" - "@typescript-eslint/typescript-estree" "5.48.1" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.48.1": - version "5.48.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.48.1.tgz#39c71e4de639f5fe08b988005beaaf6d79f9d64d" - integrity sha512-S035ueRrbxRMKvSTv9vJKIWgr86BD8s3RqoRZmsSh/s8HhIs90g6UlK8ZabUSjUZQkhVxt7nmZ63VJ9dcZhtDQ== +"@typescript-eslint/scope-manager@5.59.5": + version "5.59.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz#33ffc7e8663f42cfaac873de65ebf65d2bce674d" + integrity sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A== + dependencies: + "@typescript-eslint/types" "5.59.5" + "@typescript-eslint/visitor-keys" "5.59.5" + +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== dependencies: - "@typescript-eslint/types" "5.48.1" - "@typescript-eslint/visitor-keys" "5.48.1" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/type-utils@5.48.1": - version "5.48.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.48.1.tgz#5d94ac0c269a81a91ad77c03407cea2caf481412" - integrity sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ== +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: - "@typescript-eslint/typescript-estree" "5.48.1" - "@typescript-eslint/utils" "5.48.1" + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.48.1": - version "5.48.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.48.1.tgz#efd1913a9aaf67caf8a6e6779fd53e14e8587e14" - integrity sha512-xHyDLU6MSuEEdIlzrrAerCGS3T7AA/L8Hggd0RCYBi0w3JMvGYxlLlXHeg50JI9Tfg5MrtsfuNxbS/3zF1/ATg== +"@typescript-eslint/types@5.59.5": + version "5.59.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.5.tgz#e63c5952532306d97c6ea432cee0981f6d2258c7" + integrity sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w== -"@typescript-eslint/typescript-estree@5.48.1": - version "5.48.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.1.tgz#9efa8ee2aa471c6ab62e649f6e64d8d121bc2056" - integrity sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== + +"@typescript-eslint/typescript-estree@5.59.5": + version "5.59.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz#9b252ce55dd765e972a7a2f99233c439c5101e42" + integrity sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg== + dependencies: + "@typescript-eslint/types" "5.59.5" + "@typescript-eslint/visitor-keys" "5.59.5" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: - "@typescript-eslint/types" "5.48.1" - "@typescript-eslint/visitor-keys" "5.48.1" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.48.1", "@typescript-eslint/utils@^5.10.0": - version "5.48.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.48.1.tgz#20f2f4e88e9e2a0961cbebcb47a1f0f7da7ba7f9" - integrity sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA== +"@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.59.11": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + eslint-scope "^5.1.1" + semver "^7.3.7" + +"@typescript-eslint/utils@^5.10.0": + version "5.59.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.5.tgz#15b3eb619bb223302e60413adb0accd29c32bcae" + integrity sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA== dependencies: + "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.48.1" - "@typescript-eslint/types" "5.48.1" - "@typescript-eslint/typescript-estree" "5.48.1" + "@typescript-eslint/scope-manager" "5.59.5" + "@typescript-eslint/types" "5.59.5" + "@typescript-eslint/typescript-estree" "5.59.5" eslint-scope "^5.1.1" - eslint-utils "^3.0.0" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.48.1": - version "5.48.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.1.tgz#79fd4fb9996023ef86849bf6f904f33eb6c8fccb" - integrity sha512-Ns0XBwmfuX7ZknznfXozgnydyR8F6ev/KEGePP4i74uL3ArsKbEhJ7raeKr1JSa997DBDwol/4a0Y+At82c9dA== +"@typescript-eslint/visitor-keys@5.59.5": + version "5.59.5" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz#ba5b8d6791a13cf9fea6716af1e7626434b29b9b" + integrity sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA== dependencies: - "@typescript-eslint/types" "5.48.1" + "@typescript-eslint/types" "5.59.5" + eslint-visitor-keys "^3.3.0" + +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== + dependencies: + "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" "@yarnpkg/lockfile@^1.1.0": @@ -1899,10 +1982,10 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.8.0: - version "8.8.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== +acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== add-stream@^1.0.0: version "1.0.0" @@ -1933,7 +2016,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1960,11 +2043,6 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: dependencies: type-fest "^0.21.3" -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== - ansi-regex@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" @@ -2032,11 +2110,6 @@ append-field@^1.0.0: resolved "https://registry.yarnpkg.com/append-field/-/append-field-1.0.0.tgz#1e3440e915f0b1203d23748e78edd7b9b5b43e56" integrity sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw== -aproba@^1.0.3: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - "aproba@^1.0.3 || ^2.0.0", aproba@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" @@ -2065,14 +2138,6 @@ are-we-there-yet@^4.0.0: delegates "^1.0.0" readable-stream "^4.1.0" -are-we-there-yet@~1.1.2: - version "1.1.7" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" - integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -2212,15 +2277,15 @@ axios@^1.0.0: form-data "^4.0.0" proxy-from-env "^1.1.0" -babel-jest@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.3.1.tgz#05c83e0d128cd48c453eea851482a38782249f44" - integrity sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA== +babel-jest@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.5.0.tgz#3fe3ddb109198e78b1c88f9ebdecd5e4fc2f50a5" + integrity sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q== dependencies: - "@jest/transform" "^29.3.1" + "@jest/transform" "^29.5.0" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.2.0" + babel-preset-jest "^29.5.0" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -2236,10 +2301,10 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.2.0.tgz#23ee99c37390a98cfddf3ef4a78674180d823094" - integrity sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA== +babel-plugin-jest-hoist@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz#a97db437936f441ec196990c9738d4b88538618a" + integrity sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -2264,12 +2329,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.2.0.tgz#3048bea3a1af222e3505e4a767a974c95a7620dc" - integrity sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA== +babel-preset-jest@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz#57bc8cc88097af7ff6a5ab59d1cd29d52a5916e2" + integrity sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg== dependencies: - babel-plugin-jest-hoist "^29.2.0" + babel-plugin-jest-hoist "^29.5.0" babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: @@ -2686,6 +2751,11 @@ chalk@4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" + integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== + chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2905,11 +2975,6 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== - collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -2996,16 +3061,16 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + commander@^2.8.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^9.4.1: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - common-ancestor-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7" @@ -3063,7 +3128,7 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" -console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: +console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== @@ -3248,10 +3313,12 @@ data-store@^4.0.3: get-value "^3.0.1" set-value "^3.0.1" -date-fns@^2.29.3: - version "2.29.3" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" - integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== +date-fns@^2.30.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" dateformat@^3.0.0: version "3.0.3" @@ -3314,13 +3381,6 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - dependencies: - mimic-response "^2.0.0" - decompress-response@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" @@ -3509,10 +3569,10 @@ detect-indent@^5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== -detect-libc@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== +detect-libc@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.1.tgz#e1897aa88fa6ad197862937fbc0441ef352ee0cd" + integrity sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w== detect-newline@^3.0.0: version "3.1.0" @@ -3534,10 +3594,10 @@ dicer@0.3.0: dependencies: streamsearch "0.1.2" -diff-sequences@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.3.1.tgz#104b5b95fe725932421a9c6e5b4bef84c3f2249e" - integrity sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ== +diff-sequences@^29.4.3: + version "29.4.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.4.3.tgz#9314bc1fabe09267ffeca9cbafc457d8499a13f2" + integrity sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA== dir-glob@^2.2.2: version "2.2.2" @@ -3789,10 +3849,10 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-config-prettier@^8.6.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" - integrity sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA== +eslint-config-prettier@^8.8.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz#bfda738d412adc917fd7b038857110efe98c9348" + integrity sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA== eslint-plugin-es@^3.0.0: version "3.0.1" @@ -3836,10 +3896,10 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -3851,91 +3911,87 @@ eslint-utils@^2.0.0: dependencies: eslint-visitor-keys "^1.1.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.31.0: - version "8.31.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.31.0.tgz#75028e77cbcff102a9feae1d718135931532d524" - integrity sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA== - dependencies: - "@eslint/eslintrc" "^1.4.1" - "@humanwhocodes/config-array" "^0.11.8" +eslint-visitor-keys@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" + integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== + +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.42.0: + version "8.47.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.47.0.tgz#c95f9b935463fb4fad7005e626c7621052e90806" + integrity sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "^8.47.0" + "@humanwhocodes/config-array" "^0.11.10" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" glob-parent "^6.0.2" globals "^13.19.0" - grapheme-splitter "^1.0.4" + graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.4.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" - integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^8.8.0" + acorn "^8.9.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.1" esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" @@ -4014,14 +4070,14 @@ execa@^5.0.0: signal-exit "^3.0.3" strip-final-newline "^2.0.0" -execa@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" - integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== +execa@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" + integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.1" - human-signals "^3.0.1" + human-signals "^4.3.0" is-stream "^3.0.0" merge-stream "^2.0.0" npm-run-path "^5.1.0" @@ -4057,16 +4113,16 @@ expand-template@^2.0.3: resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== -expect@^29.0.0, expect@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-29.3.1.tgz#92877aad3f7deefc2e3f6430dd195b92295554a6" - integrity sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA== +expect@^29.0.0, expect@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.5.0.tgz#68c0509156cb2a0adb8865d413b137eeaae682f7" + integrity sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg== dependencies: - "@jest/expect-utils" "^29.3.1" - jest-get-type "^29.2.0" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-util "^29.3.1" + "@jest/expect-utils" "^29.5.0" + jest-get-type "^29.4.3" + jest-matcher-utils "^29.5.0" + jest-message-util "^29.5.0" + jest-util "^29.5.0" ext-list@^2.0.0: version "2.2.2" @@ -4519,20 +4575,6 @@ gauge@^5.0.0: strip-ansi "^6.0.1" wide-align "^1.1.5" -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg== - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -4744,7 +4786,7 @@ glob@^10.2.2: minipass "^5.0.0" path-scurry "^1.7.0" -glob@^7.0.0, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -4882,10 +4924,10 @@ graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1. resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== handlebars@^4.7.7: version "4.7.7" @@ -4943,7 +4985,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-unicode@2.0.1, has-unicode@^2.0.0, has-unicode@^2.0.1: +has-unicode@2.0.1, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== @@ -5104,10 +5146,10 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== -human-signals@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" - integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== +human-signals@^4.3.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" + integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== humanize-ms@^1.2.1: version "1.2.1" @@ -5179,7 +5221,7 @@ imaadpcm@^4.1.2: resolved "https://registry.yarnpkg.com/imaadpcm/-/imaadpcm-4.1.2.tgz#8757742610004bc2aba1181919f899abd6a9b413" integrity sha512-7gwxe6lKCGitmkMtGbm1ecnt0Q59KcWwo7AVi2RAd3lQ9VghVN5zX5x3oK6xNhfD9KUMbaYzku43UBn3Ix3RIA== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -5298,11 +5340,6 @@ inquirer@^8.2.4: through "^2.3.6" wrap-ansi "^7.0.0" -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - into-stream@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" @@ -5450,13 +5487,6 @@ is-extglob@^2.1.0, is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" @@ -5724,283 +5754,284 @@ jake@^10.8.5: filelist "^1.0.1" minimatch "^3.0.4" -jest-changed-files@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.2.0.tgz#b6598daa9803ea6a4dce7968e20ab380ddbee289" - integrity sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA== +jest-changed-files@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.5.0.tgz#e88786dca8bf2aa899ec4af7644e16d9dcf9b23e" + integrity sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag== dependencies: execa "^5.0.0" p-limit "^3.1.0" -jest-circus@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.3.1.tgz#177d07c5c0beae8ef2937a67de68f1e17bbf1b4a" - integrity sha512-wpr26sEvwb3qQQbdlmei+gzp6yoSSoSL6GsLPxnuayZSMrSd5Ka7IjAvatpIernBvT2+Ic6RLTg+jSebScmasg== +jest-circus@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.5.0.tgz#b5926989449e75bff0d59944bae083c9d7fb7317" + integrity sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA== dependencies: - "@jest/environment" "^29.3.1" - "@jest/expect" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/environment" "^29.5.0" + "@jest/expect" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" is-generator-fn "^2.0.0" - jest-each "^29.3.1" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-runtime "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" + jest-each "^29.5.0" + jest-matcher-utils "^29.5.0" + jest-message-util "^29.5.0" + jest-runtime "^29.5.0" + jest-snapshot "^29.5.0" + jest-util "^29.5.0" p-limit "^3.1.0" - pretty-format "^29.3.1" + pretty-format "^29.5.0" + pure-rand "^6.0.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-cli@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.3.1.tgz#e89dff427db3b1df50cea9a393ebd8640790416d" - integrity sha512-TO/ewvwyvPOiBBuWZ0gm04z3WWP8TIK8acgPzE4IxgsLKQgb377NYGrQLc3Wl/7ndWzIH2CDNNsUjGxwLL43VQ== +jest-cli@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.5.0.tgz#b34c20a6d35968f3ee47a7437ff8e53e086b4a67" + integrity sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw== dependencies: - "@jest/core" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/core" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/types" "^29.5.0" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" + jest-config "^29.5.0" + jest-util "^29.5.0" + jest-validate "^29.5.0" prompts "^2.0.1" yargs "^17.3.1" -jest-config@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.3.1.tgz#0bc3dcb0959ff8662957f1259947aedaefb7f3c6" - integrity sha512-y0tFHdj2WnTEhxmGUK1T7fgLen7YK4RtfvpLFBXfQkh2eMJAQq24Vx9472lvn5wg0MAO6B+iPfJfzdR9hJYalg== +jest-config@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.5.0.tgz#3cc972faec8c8aaea9ae158c694541b79f3748da" + integrity sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^29.3.1" - "@jest/types" "^29.3.1" - babel-jest "^29.3.1" + "@jest/test-sequencer" "^29.5.0" + "@jest/types" "^29.5.0" + babel-jest "^29.5.0" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^29.3.1" - jest-environment-node "^29.3.1" - jest-get-type "^29.2.0" - jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-runner "^29.3.1" - jest-util "^29.3.1" - jest-validate "^29.3.1" + jest-circus "^29.5.0" + jest-environment-node "^29.5.0" + jest-get-type "^29.4.3" + jest-regex-util "^29.4.3" + jest-resolve "^29.5.0" + jest-runner "^29.5.0" + jest-util "^29.5.0" + jest-validate "^29.5.0" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^29.3.1" + pretty-format "^29.5.0" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.3.1.tgz#d8215b72fed8f1e647aed2cae6c752a89e757527" - integrity sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw== +jest-diff@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.5.0.tgz#e0d83a58eb5451dcc1fa61b1c3ee4e8f5a290d63" + integrity sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw== dependencies: chalk "^4.0.0" - diff-sequences "^29.3.1" - jest-get-type "^29.2.0" - pretty-format "^29.3.1" + diff-sequences "^29.4.3" + jest-get-type "^29.4.3" + pretty-format "^29.5.0" -jest-docblock@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.2.0.tgz#307203e20b637d97cee04809efc1d43afc641e82" - integrity sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A== +jest-docblock@^29.4.3: + version "29.4.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.4.3.tgz#90505aa89514a1c7dceeac1123df79e414636ea8" + integrity sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg== dependencies: detect-newline "^3.0.0" -jest-each@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.3.1.tgz#bc375c8734f1bb96625d83d1ca03ef508379e132" - integrity sha512-qrZH7PmFB9rEzCSl00BWjZYuS1BSOH8lLuC0azQE9lQrAx3PWGKHTDudQiOSwIy5dGAJh7KA0ScYlCP7JxvFYA== +jest-each@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.5.0.tgz#fc6e7014f83eac68e22b7195598de8554c2e5c06" + integrity sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.5.0" chalk "^4.0.0" - jest-get-type "^29.2.0" - jest-util "^29.3.1" - pretty-format "^29.3.1" - -jest-environment-node@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.3.1.tgz#5023b32472b3fba91db5c799a0d5624ad4803e74" - integrity sha512-xm2THL18Xf5sIHoU7OThBPtuH6Lerd+Y1NLYiZJlkE3hbE+7N7r8uvHIl/FkZ5ymKXJe/11SQuf3fv4v6rUMag== - dependencies: - "@jest/environment" "^29.3.1" - "@jest/fake-timers" "^29.3.1" - "@jest/types" "^29.3.1" + jest-get-type "^29.4.3" + jest-util "^29.5.0" + pretty-format "^29.5.0" + +jest-environment-node@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.5.0.tgz#f17219d0f0cc0e68e0727c58b792c040e332c967" + integrity sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw== + dependencies: + "@jest/environment" "^29.5.0" + "@jest/fake-timers" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" - jest-mock "^29.3.1" - jest-util "^29.3.1" + jest-mock "^29.5.0" + jest-util "^29.5.0" -jest-get-type@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.2.0.tgz#726646f927ef61d583a3b3adb1ab13f3a5036408" - integrity sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA== +jest-get-type@^29.4.3: + version "29.4.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.4.3.tgz#1ab7a5207c995161100b5187159ca82dd48b3dd5" + integrity sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg== -jest-haste-map@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.3.1.tgz#af83b4347f1dae5ee8c2fb57368dc0bb3e5af843" - integrity sha512-/FFtvoG1xjbbPXQLFef+WSU4yrc0fc0Dds6aRPBojUid7qlPqZvxdUBA03HW0fnVHXVCnCdkuoghYItKNzc/0A== +jest-haste-map@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.5.0.tgz#69bd67dc9012d6e2723f20a945099e972b2e94de" + integrity sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.5.0" "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^29.2.0" - jest-util "^29.3.1" - jest-worker "^29.3.1" + jest-regex-util "^29.4.3" + jest-util "^29.5.0" + jest-worker "^29.5.0" micromatch "^4.0.4" walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-leak-detector@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.3.1.tgz#95336d020170671db0ee166b75cd8ef647265518" - integrity sha512-3DA/VVXj4zFOPagGkuqHnSQf1GZBmmlagpguxEERO6Pla2g84Q1MaVIB3YMxgUaFIaYag8ZnTyQgiZ35YEqAQA== +jest-leak-detector@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz#cf4bdea9615c72bac4a3a7ba7e7930f9c0610c8c" + integrity sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow== dependencies: - jest-get-type "^29.2.0" - pretty-format "^29.3.1" + jest-get-type "^29.4.3" + pretty-format "^29.5.0" -jest-matcher-utils@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.3.1.tgz#6e7f53512f80e817dfa148672bd2d5d04914a572" - integrity sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ== +jest-matcher-utils@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz#d957af7f8c0692c5453666705621ad4abc2c59c5" + integrity sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw== dependencies: chalk "^4.0.0" - jest-diff "^29.3.1" - jest-get-type "^29.2.0" - pretty-format "^29.3.1" + jest-diff "^29.5.0" + jest-get-type "^29.4.3" + pretty-format "^29.5.0" -jest-message-util@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.3.1.tgz#37bc5c468dfe5120712053dd03faf0f053bd6adb" - integrity sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA== +jest-message-util@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.5.0.tgz#1f776cac3aca332ab8dd2e3b41625435085c900e" + integrity sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^29.3.1" + "@jest/types" "^29.5.0" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^29.3.1" + pretty-format "^29.5.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.3.1.tgz#60287d92e5010979d01f218c6b215b688e0f313e" - integrity sha512-H8/qFDtDVMFvFP4X8NuOT3XRDzOUTz+FeACjufHzsOIBAxivLqkB1PoLCaJx9iPPQ8dZThHPp/G3WRWyMgA3JA== +jest-mock@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.5.0.tgz#26e2172bcc71d8b0195081ff1f146ac7e1518aed" + integrity sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.5.0" "@types/node" "*" - jest-util "^29.3.1" + jest-util "^29.5.0" jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== -jest-regex-util@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.2.0.tgz#82ef3b587e8c303357728d0322d48bbfd2971f7b" - integrity sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA== +jest-regex-util@^29.4.3: + version "29.4.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.4.3.tgz#a42616141e0cae052cfa32c169945d00c0aa0bb8" + integrity sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg== -jest-resolve-dependencies@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.3.1.tgz#a6a329708a128e68d67c49f38678a4a4a914c3bf" - integrity sha512-Vk0cYq0byRw2WluNmNWGqPeRnZ3p3hHmjJMp2dyyZeYIfiBskwq4rpiuGFR6QGAdbj58WC7HN4hQHjf2mpvrLA== +jest-resolve-dependencies@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz#f0ea29955996f49788bf70996052aa98e7befee4" + integrity sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg== dependencies: - jest-regex-util "^29.2.0" - jest-snapshot "^29.3.1" + jest-regex-util "^29.4.3" + jest-snapshot "^29.5.0" -jest-resolve@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.3.1.tgz#9a4b6b65387a3141e4a40815535c7f196f1a68a7" - integrity sha512-amXJgH/Ng712w3Uz5gqzFBBjxV8WFLSmNjoreBGMqxgCz5cH7swmBZzgBaCIOsvb0NbpJ0vgaSFdJqMdT+rADw== +jest-resolve@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.5.0.tgz#b053cc95ad1d5f6327f0ac8aae9f98795475ecdc" + integrity sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" + jest-haste-map "^29.5.0" jest-pnp-resolver "^1.2.2" - jest-util "^29.3.1" - jest-validate "^29.3.1" + jest-util "^29.5.0" + jest-validate "^29.5.0" resolve "^1.20.0" - resolve.exports "^1.1.0" + resolve.exports "^2.0.0" slash "^3.0.0" -jest-runner@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.3.1.tgz#a92a879a47dd096fea46bb1517b0a99418ee9e2d" - integrity sha512-oFvcwRNrKMtE6u9+AQPMATxFcTySyKfLhvso7Sdk/rNpbhg4g2GAGCopiInk1OP4q6gz3n6MajW4+fnHWlU3bA== +jest-runner@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.5.0.tgz#6a57c282eb0ef749778d444c1d758c6a7693b6f8" + integrity sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ== dependencies: - "@jest/console" "^29.3.1" - "@jest/environment" "^29.3.1" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/console" "^29.5.0" + "@jest/environment" "^29.5.0" + "@jest/test-result" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" chalk "^4.0.0" emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^29.2.0" - jest-environment-node "^29.3.1" - jest-haste-map "^29.3.1" - jest-leak-detector "^29.3.1" - jest-message-util "^29.3.1" - jest-resolve "^29.3.1" - jest-runtime "^29.3.1" - jest-util "^29.3.1" - jest-watcher "^29.3.1" - jest-worker "^29.3.1" + jest-docblock "^29.4.3" + jest-environment-node "^29.5.0" + jest-haste-map "^29.5.0" + jest-leak-detector "^29.5.0" + jest-message-util "^29.5.0" + jest-resolve "^29.5.0" + jest-runtime "^29.5.0" + jest-util "^29.5.0" + jest-watcher "^29.5.0" + jest-worker "^29.5.0" p-limit "^3.1.0" source-map-support "0.5.13" -jest-runtime@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.3.1.tgz#21efccb1a66911d6d8591276a6182f520b86737a" - integrity sha512-jLzkIxIqXwBEOZx7wx9OO9sxoZmgT2NhmQKzHQm1xwR1kNW/dn0OjxR424VwHHf1SPN6Qwlb5pp1oGCeFTQ62A== - dependencies: - "@jest/environment" "^29.3.1" - "@jest/fake-timers" "^29.3.1" - "@jest/globals" "^29.3.1" - "@jest/source-map" "^29.2.0" - "@jest/test-result" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" +jest-runtime@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.5.0.tgz#c83f943ee0c1da7eb91fa181b0811ebd59b03420" + integrity sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw== + dependencies: + "@jest/environment" "^29.5.0" + "@jest/fake-timers" "^29.5.0" + "@jest/globals" "^29.5.0" + "@jest/source-map" "^29.4.3" + "@jest/test-result" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" - jest-message-util "^29.3.1" - jest-mock "^29.3.1" - jest-regex-util "^29.2.0" - jest-resolve "^29.3.1" - jest-snapshot "^29.3.1" - jest-util "^29.3.1" + jest-haste-map "^29.5.0" + jest-message-util "^29.5.0" + jest-mock "^29.5.0" + jest-regex-util "^29.4.3" + jest-resolve "^29.5.0" + jest-snapshot "^29.5.0" + jest-util "^29.5.0" slash "^3.0.0" strip-bom "^4.0.0" -jest-snapshot@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.3.1.tgz#17bcef71a453adc059a18a32ccbd594b8cc4e45e" - integrity sha512-+3JOc+s28upYLI2OJM4PWRGK9AgpsMs/ekNryUV0yMBClT9B1DF2u2qay8YxcQd338PPYSFNb0lsar1B49sLDA== +jest-snapshot@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.5.0.tgz#c9c1ce0331e5b63cd444e2f95a55a73b84b1e8ce" + integrity sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g== dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" @@ -6008,26 +6039,25 @@ jest-snapshot@^29.3.1: "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.3.3" - "@jest/expect-utils" "^29.3.1" - "@jest/transform" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/expect-utils" "^29.5.0" + "@jest/transform" "^29.5.0" + "@jest/types" "^29.5.0" "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^29.3.1" + expect "^29.5.0" graceful-fs "^4.2.9" - jest-diff "^29.3.1" - jest-get-type "^29.2.0" - jest-haste-map "^29.3.1" - jest-matcher-utils "^29.3.1" - jest-message-util "^29.3.1" - jest-util "^29.3.1" + jest-diff "^29.5.0" + jest-get-type "^29.4.3" + jest-matcher-utils "^29.5.0" + jest-message-util "^29.5.0" + jest-util "^29.5.0" natural-compare "^1.4.0" - pretty-format "^29.3.1" + pretty-format "^29.5.0" semver "^7.3.5" -jest-util@^29.0.0, jest-util@^29.3.1: +jest-util@^29.0.0: version "29.3.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.3.1.tgz#1dda51e378bbcb7e3bc9d8ab651445591ed373e1" integrity sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ== @@ -6039,56 +6069,63 @@ jest-util@^29.0.0, jest-util@^29.3.1: graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.3.1.tgz#d56fefaa2e7d1fde3ecdc973c7f7f8f25eea704a" - integrity sha512-N9Lr3oYR2Mpzuelp1F8negJR3YE+L1ebk1rYA5qYo9TTY3f9OWdptLoNSPP9itOCBIRBqjt/S5XHlzYglLN67g== +jest-util@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.5.0.tgz#24a4d3d92fc39ce90425311b23c27a6e0ef16b8f" + integrity sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.5.0" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + +jest-validate@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.5.0.tgz#8e5a8f36178d40e47138dc00866a5f3bd9916ffc" + integrity sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ== + dependencies: + "@jest/types" "^29.5.0" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^29.2.0" + jest-get-type "^29.4.3" leven "^3.1.0" - pretty-format "^29.3.1" + pretty-format "^29.5.0" -jest-watcher@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.3.1.tgz#3341547e14fe3c0f79f9c3a4c62dbc3fc977fd4a" - integrity sha512-RspXG2BQFDsZSRKGCT/NiNa8RkQ1iKAjrO0//soTMWx/QUt+OcxMqMSBxz23PYGqUuWm2+m2mNNsmj0eIoOaFg== +jest-watcher@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.5.0.tgz#cf7f0f949828ba65ddbbb45c743a382a4d911363" + integrity sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA== dependencies: - "@jest/test-result" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/test-result" "^29.5.0" + "@jest/types" "^29.5.0" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" emittery "^0.13.1" - jest-util "^29.3.1" + jest-util "^29.5.0" string-length "^4.0.1" -jest-worker@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.3.1.tgz#e9462161017a9bb176380d721cab022661da3d6b" - integrity sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw== +jest-worker@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.5.0.tgz#bdaefb06811bd3384d93f009755014d8acb4615d" + integrity sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA== dependencies: "@types/node" "*" - jest-util "^29.3.1" + jest-util "^29.5.0" merge-stream "^2.0.0" supports-color "^8.0.0" jest@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-29.3.1.tgz#c130c0d551ae6b5459b8963747fed392ddbde122" - integrity sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA== + version "29.5.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.5.0.tgz#f75157622f5ce7ad53028f2f8888ab53e1f1f24e" + integrity sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ== dependencies: - "@jest/core" "^29.3.1" - "@jest/types" "^29.3.1" + "@jest/core" "^29.5.0" + "@jest/types" "^29.5.0" import-local "^3.0.2" - jest-cli "^29.3.1" - -js-sdsl@^4.1.4: - version "4.2.0" - resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.2.0.tgz#278e98b7bea589b8baaf048c20aeb19eb7ad09d0" - integrity sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== + jest-cli "^29.5.0" js-tokens@^4.0.0: version "4.0.0" @@ -6508,10 +6545,10 @@ license-checker@^25.0.1: spdx-satisfies "^4.0.0" treeify "^1.1.0" -lilconfig@2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" - integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg== +lilconfig@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" + integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== lines-and-columns@^1.1.6: version "1.2.4" @@ -6523,36 +6560,36 @@ lines-and-columns@~2.0.3: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== -lint-staged@^13.1.0: - version "13.1.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.1.0.tgz#d4c61aec939e789e489fa51987ec5207b50fd37e" - integrity sha512-pn/sR8IrcF/T0vpWLilih8jmVouMlxqXxKuAojmbiGX5n/gDnz+abdPptlj0vYnbfE0SQNl3CY/HwtM0+yfOVQ== +lint-staged@^13.2.2: + version "13.2.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.2.2.tgz#5e711d3139c234f73402177be2f8dd312e6508ca" + integrity sha512-71gSwXKy649VrSU09s10uAT0rWCcY3aewhMaHyl2N84oBk4Xs9HgxvUp3AYu+bNsK4NrOYYxvSgg7FyGJ+jGcA== dependencies: + chalk "5.2.0" cli-truncate "^3.1.0" - colorette "^2.0.19" - commander "^9.4.1" + commander "^10.0.0" debug "^4.3.4" - execa "^6.1.0" - lilconfig "2.0.6" - listr2 "^5.0.5" + execa "^7.0.0" + lilconfig "2.1.0" + listr2 "^5.0.7" micromatch "^4.0.5" normalize-path "^3.0.0" - object-inspect "^1.12.2" + object-inspect "^1.12.3" pidtree "^0.6.0" string-argv "^0.3.1" - yaml "^2.1.3" + yaml "^2.2.2" -listr2@^5.0.5: - version "5.0.6" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.6.tgz#3c61153383869ffaad08a8908d63edfde481dff8" - integrity sha512-u60KxKBy1BR2uLJNTWNptzWQ1ob/gjMzIJPZffAENzpZqbMZ/5PrXXOomDcevIS/+IB7s1mmCEtSlT2qHWMqag== +listr2@^5.0.7: + version "5.0.8" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.8.tgz#a9379ffeb4bd83a68931a65fb223a11510d6ba23" + integrity sha512-mC73LitKHj9w6v30nLNGPetZIlfpUniNSsxxrbaPcWOjDb92SHPzJPi/t+v1YC/lxKz/AJ9egOjww0qUuFxBpA== dependencies: cli-truncate "^2.1.0" colorette "^2.0.19" log-update "^4.0.0" p-map "^4.0.0" rfdc "^1.3.0" - rxjs "^7.5.7" + rxjs "^7.8.0" through "^2.3.8" wrap-ansi "^7.0.0" @@ -6962,11 +6999,6 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== -mimic-response@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" - integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== - mimic-response@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" @@ -7035,12 +7067,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -minimist@^1.2.3: +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== @@ -7331,12 +7358,12 @@ next-tick@1, next-tick@^1.1.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== -node-abi@^2.21.0: - version "2.30.1" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" - integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== +node-abi@^3.3.0: + version "3.47.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.47.0.tgz#6cbfa2916805ae25c2b7156ca640131632eb05e8" + integrity sha512-2s6B2CWZM//kPgwnuI0KrYwNjfdByE25zvAaEpq9IH4zcNsarH8Ihu/UuX6XMPEogDAxkuUFeZn60pXNHAqn3A== dependencies: - semver "^5.4.1" + semver "^7.3.5" node-addon-api@^3.2.1: version "3.2.1" @@ -7642,16 +7669,6 @@ npmlog@6.0.2, npmlog@^6.0.0, npmlog@^6.0.2: gauge "^4.0.3" set-blocking "^2.0.0" -npmlog@^4.0.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - npmlog@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-7.0.1.tgz#7372151a01ccb095c47d8bf1d0771a4ff1f53ac8" @@ -7662,11 +7679,6 @@ npmlog@^7.0.1: gauge "^5.0.0" set-blocking "^2.0.0" -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== - nx@15.9.3, "nx@>=15.5.2 < 16": version "15.9.3" resolved "https://registry.yarnpkg.com/nx/-/nx-15.9.3.tgz#72f4186ea41ccf0e2713ce248848a22464c8949e" @@ -7732,7 +7744,12 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.12.2, object-inspect@^1.9.0: +object-inspect@^1.12.3: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== @@ -7807,17 +7824,17 @@ open@^8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" ora@^3.4.0: version "3.4.0" @@ -8294,13 +8311,13 @@ pkg-prebuilds@^0.2.1: yargs "^17.5.1" pkg@^5.8.0: - version "5.8.0" - resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.8.0.tgz#a77644aeff0b94a1656d7f76558837f7c754a4c0" - integrity sha512-8h9PUDYFi+LOMLbIyGRdP21g08mAtHidSpofSrf8LWhxUWGHymaRzcopEGiynB5EhQmZUKM6PQ9kCImV2TpdjQ== + version "5.8.1" + resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.8.1.tgz#862020f3c0575638ef7d1146f951a54d65ddc984" + integrity sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA== dependencies: "@babel/generator" "7.18.2" "@babel/parser" "7.18.4" - "@babel/types" "7.18.4" + "@babel/types" "7.19.0" chalk "^4.1.2" fs-extra "^9.1.0" globby "^11.1.0" @@ -8309,7 +8326,7 @@ pkg@^5.8.0: minimist "^1.2.6" multistream "^4.1.0" pkg-fetch "3.4.2" - prebuild-install "6.1.4" + prebuild-install "7.1.1" resolve "^1.22.0" stream-meter "^1.0.4" @@ -8326,22 +8343,21 @@ postcss-selector-parser@^6.0.10: cssesc "^3.0.0" util-deprecate "^1.0.2" -prebuild-install@6.1.4: - version "6.1.4" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" - integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== +prebuild-install@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== dependencies: - detect-libc "^1.0.3" + detect-libc "^2.0.0" expand-template "^2.0.3" github-from-package "0.0.0" minimist "^1.2.3" mkdirp-classic "^0.5.3" napi-build-utils "^1.0.1" - node-abi "^2.21.0" - npmlog "^4.0.1" + node-abi "^3.3.0" pump "^3.0.0" rc "^1.2.7" - simple-get "^3.0.3" + simple-get "^4.0.0" tar-fs "^2.0.0" tunnel-agent "^0.6.0" @@ -8362,16 +8378,11 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.2.0: +prettier@^2.2.0, prettier@^2.8.8: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -prettier@^2.8.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160" - integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw== - pretty-bytes@^5.5.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" @@ -8386,12 +8397,12 @@ pretty-format@29.4.3: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-format@^29.0.0, pretty-format@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.3.1.tgz#1841cac822b02b4da8971dacb03e8a871b4722da" - integrity sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg== +pretty-format@^29.0.0, pretty-format@^29.5.0: + version "29.5.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.5.0.tgz#283134e74f70e2e3e7229336de0e4fce94ccde5a" + integrity sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw== dependencies: - "@jest/schemas" "^29.0.0" + "@jest/schemas" "^29.4.3" ansi-styles "^5.0.0" react-is "^18.0.0" @@ -8491,6 +8502,11 @@ punycode@^2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +pure-rand@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.2.tgz#a9c2ddcae9b68d736a8163036f088a2781c8b306" + integrity sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ== + q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -8716,7 +8732,7 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -8756,13 +8772,6 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== - dependencies: - resolve "^1.1.6" - redent@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-3.0.0.tgz#e557b7998316bb53c9f1f56fa626352c6963059f" @@ -8791,6 +8800,11 @@ redis-parser@^3.0.0: dependencies: redis-errors "^1.0.0" +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" @@ -8799,7 +8813,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^3.0.0, regexpp@^3.2.0: +regexpp@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -8856,12 +8870,12 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== -resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0, resolve@^1.22.0: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0, resolve@^1.22.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -8953,20 +8967,13 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -rxjs@^7.5.5: +rxjs@^7.5.5, rxjs@^7.8.0: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" -rxjs@^7.5.7: - version "7.8.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" - integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== - dependencies: - tslib "^2.1.0" - safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -9006,7 +9013,7 @@ seek-bzip@^1.0.5: dependencies: commander "^2.8.1" -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -9026,9 +9033,9 @@ semver@7.3.8: lru-cache "^6.0.0" semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: - version "7.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.0.tgz#ed8c5dc8efb6c629c88b23d41dc9bf40c1d96cd0" - integrity sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA== + version "7.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" + integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== dependencies: lru-cache "^6.0.0" @@ -9037,7 +9044,14 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -set-blocking@^2.0.0, set-blocking@~2.0.0: +semver@^7.5.2: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== @@ -9084,15 +9098,6 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shelljs@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -9102,7 +9107,7 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@3.0.7, signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@3.0.7, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -9126,12 +9131,12 @@ simple-concat@^1.0.0: resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== -simple-get@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" - integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== +simple-get@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== dependencies: - decompress-response "^4.2.0" + decompress-response "^6.0.0" once "^1.3.1" simple-concat "^1.0.0" @@ -9476,15 +9481,6 @@ string-length@^4.0.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -9515,13 +9511,6 @@ string_decoder@~1.1.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== - dependencies: - ansi-regex "^2.0.0" - strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -9577,7 +9566,7 @@ strip-indent@^4.0.0: dependencies: min-indent "^1.0.1" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -10365,7 +10354,7 @@ which@^3.0.0: dependencies: isexe "^2.0.0" -wide-align@^1.1.0, wide-align@^1.1.5: +wide-align@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== @@ -10412,11 +10401,6 @@ winston@*, winston@^3.5.1: triple-beam "^1.3.0" winston-transport "^4.5.0" -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" @@ -10471,7 +10455,7 @@ write-file-atomic@^2.4.2: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^4.0.1: +write-file-atomic@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== @@ -10558,10 +10542,10 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yaml@^2.1.3: - version "2.2.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.1.tgz#3014bf0482dcd15147aa8e56109ce8632cd60ce4" - integrity sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw== +yaml@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.2.tgz#ec551ef37326e6d42872dad1970300f8eb83a073" + integrity sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA== yargs-parser@20.2.4: version "20.2.4" From a51b8b4c8e684581c79393aaf0b40a6c8dd0305e Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 08:05:48 +0200 Subject: [PATCH 24/54] chore: lerna useWorkspaces --- lerna.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index e64aa925..cb611b96 100644 --- a/lerna.json +++ b/lerna.json @@ -5,5 +5,6 @@ "tests/**" ], "version": "1.50.0-alpha.3", - "npmClient": "yarn" + "npmClient": "yarn", + "useWorkspaces": true } From 59100e37d2f13e77574fb92f067870a60d4af321 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 08:09:25 +0200 Subject: [PATCH 25/54] v1.50.0-alpha.4 --- CHANGELOG.md | 25 +++++++++++++++++++ apps/appcontainer-node/app/CHANGELOG.md | 8 ++++++ apps/appcontainer-node/app/package.json | 4 +-- .../packages/generic/CHANGELOG.md | 11 ++++++++ .../packages/generic/package.json | 6 ++--- apps/http-server/app/CHANGELOG.md | 13 ++++++++++ apps/http-server/app/package.json | 4 +-- .../http-server/packages/generic/CHANGELOG.md | 11 ++++++++ .../http-server/packages/generic/package.json | 4 +-- apps/package-manager/app/CHANGELOG.md | 8 ++++++ apps/package-manager/app/package.json | 4 +-- .../packages/generic/CHANGELOG.md | 19 ++++++++++++++ .../packages/generic/package.json | 8 +++--- .../app/CHANGELOG.md | 8 ++++++ .../app/package.json | 4 +-- .../packages/generic/CHANGELOG.md | 8 ++++++ .../packages/generic/package.json | 4 +-- apps/single-app/app/CHANGELOG.md | 18 +++++++++++++ apps/single-app/app/package.json | 16 ++++++------ apps/worker/app/CHANGELOG.md | 8 ++++++ apps/worker/app/package.json | 4 +-- apps/worker/packages/generic/CHANGELOG.md | 8 ++++++ apps/worker/packages/generic/package.json | 6 ++--- apps/workforce/app/CHANGELOG.md | 8 ++++++ apps/workforce/app/package.json | 4 +-- apps/workforce/packages/generic/CHANGELOG.md | 8 ++++++ apps/workforce/packages/generic/package.json | 6 ++--- lerna.json | 2 +- shared/packages/api/CHANGELOG.md | 18 +++++++++++++ shared/packages/api/package.json | 2 +- .../packages/expectationManager/CHANGELOG.md | 12 +++++++++ .../packages/expectationManager/package.json | 6 ++--- shared/packages/worker/CHANGELOG.md | 18 +++++++++++++ shared/packages/worker/package.json | 4 +-- shared/packages/workforce/CHANGELOG.md | 11 ++++++++ shared/packages/workforce/package.json | 4 +-- tests/internal-tests/CHANGELOG.md | 11 ++++++++ tests/internal-tests/package.json | 14 +++++------ 38 files changed, 284 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9985aa2..d7e4eb26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,31 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't manually restart subscriptions when reconnecting to core SOFIE-2442 ([8d64216](https://github.com/nrkno/tv-automation-package-manager/commit/8d64216d452e92d8fb36152c0011149781822ea5)) +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) +* package.json asset build in pkg ([c546b5f](https://github.com/nrkno/tv-automation-package-manager/commit/c546b5fd6457e7b30381f28e4f802b4f385a3348)) +* remove version reporting ([ac0cd46](https://github.com/nrkno/tv-automation-package-manager/commit/ac0cd4684a5709dfbb6e1eda268d42e446d67967)) +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) +* URL handling was broken, because it treated URLs as file paths ([827a939](https://github.com/nrkno/tv-automation-package-manager/commit/827a93961e9647927aef7970af8babbab028a29e)) +* version printout on start ([c4b11bd](https://github.com/nrkno/tv-automation-package-manager/commit/c4b11bd454442504442ec679c9fc709faa16b263)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) diff --git a/apps/appcontainer-node/app/CHANGELOG.md b/apps/appcontainer-node/app/CHANGELOG.md index 884b172b..9e865fe7 100644 --- a/apps/appcontainer-node/app/CHANGELOG.md +++ b/apps/appcontainer-node/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + +**Note:** Version bump only for package @appcontainer-node/app + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @appcontainer-node/app diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index cce5b59b..d35b38f9 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.3" + "@appcontainer-node/generic": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/appcontainer-node/packages/generic/CHANGELOG.md b/apps/appcontainer-node/packages/generic/CHANGELOG.md index c8544ad3..957d170b 100644 --- a/apps/appcontainer-node/packages/generic/CHANGELOG.md +++ b/apps/appcontainer-node/packages/generic/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @appcontainer-node/generic diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index 78ffd7dd..4486b442 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,8 +13,8 @@ "@sofie-automation/shared-lib": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.3", - "@sofie-package-manager/worker": "1.50.0-alpha.3", + "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/worker": "1.50.0-alpha.4", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/apps/http-server/app/CHANGELOG.md b/apps/http-server/app/CHANGELOG.md index e8e699e7..32a5ca03 100644 --- a/apps/http-server/app/CHANGELOG.md +++ b/apps/http-server/app/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* package.json asset build in pkg ([c546b5f](https://github.com/nrkno/tv-automation-package-manager/commit/c546b5fd6457e7b30381f28e4f802b4f385a3348)) +* remove version reporting ([ac0cd46](https://github.com/nrkno/tv-automation-package-manager/commit/ac0cd4684a5709dfbb6e1eda268d42e446d67967)) +* version printout on start ([c4b11bd](https://github.com/nrkno/tv-automation-package-manager/commit/c4b11bd454442504442ec679c9fc709faa16b263)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @http-server/app diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index a74187aa..e69dba55 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.3" + "@http-server/generic": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/http-server/packages/generic/CHANGELOG.md b/apps/http-server/packages/generic/CHANGELOG.md index 0caa1aeb..0c2600d8 100644 --- a/apps/http-server/packages/generic/CHANGELOG.md +++ b/apps/http-server/packages/generic/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* version printout on start ([c4b11bd](https://github.com/nrkno/tv-automation-package-manager/commit/c4b11bd454442504442ec679c9fc709faa16b263)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @http-server/generic diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index 3a145ce3..77618148 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/api": "1.50.0-alpha.4", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", diff --git a/apps/package-manager/app/CHANGELOG.md b/apps/package-manager/app/CHANGELOG.md index c481e213..c02891a4 100644 --- a/apps/package-manager/app/CHANGELOG.md +++ b/apps/package-manager/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + +**Note:** Version bump only for package @package-manager/app + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @package-manager/app diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index 8680450e..f644561c 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@package-manager/generic": "1.50.0-alpha.3" + "@package-manager/generic": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/package-manager/packages/generic/CHANGELOG.md b/apps/package-manager/packages/generic/CHANGELOG.md index 76aa3f24..93474cf0 100644 --- a/apps/package-manager/packages/generic/CHANGELOG.md +++ b/apps/package-manager/packages/generic/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't manually restart subscriptions when reconnecting to core SOFIE-2442 ([8d64216](https://github.com/nrkno/tv-automation-package-manager/commit/8d64216d452e92d8fb36152c0011149781822ea5)) +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index 59b8c25d..7f844f31 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -14,9 +14,9 @@ "@sofie-automation/shared-lib": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.3", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.3", - "@sofie-package-manager/worker": "1.50.0-alpha.3", + "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.4", + "@sofie-package-manager/worker": "1.50.0-alpha.4", "chokidar": "^3.5.1", "data-store": "^4.0.3", "deep-extend": "^0.6.0", diff --git a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md index 666fbba9..bea28bfc 100644 --- a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/app + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @quantel-http-transformer-proxy/app diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index bb301b01..76c82e81 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.3" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md index 882dea8c..8043bc35 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/generic + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @quantel-http-transformer-proxy/generic diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index 8ccf2f7c..21e130e1 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,7 +12,7 @@ "dependencies": { "@koa/cors": "^4.0.0", "@koa/multer": "3.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/api": "1.50.0-alpha.4", "got": "^11.8.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index 1784dd8a..adb1709d 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* package.json asset build in pkg ([c546b5f](https://github.com/nrkno/tv-automation-package-manager/commit/c546b5fd6457e7b30381f28e4f802b4f385a3348)) +* remove version reporting ([ac0cd46](https://github.com/nrkno/tv-automation-package-manager/commit/ac0cd4684a5709dfbb6e1eda268d42e446d67967)) +* version printout on start ([c4b11bd](https://github.com/nrkno/tv-automation-package-manager/commit/c4b11bd454442504442ec679c9fc709faa16b263)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @single-app/app diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index 97716eca..ea825d76 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -14,13 +14,13 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.3", - "@http-server/generic": "1.50.0-alpha.3", - "@package-manager/generic": "1.50.0-alpha.3", - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.3", - "@sofie-package-manager/api": "1.50.0-alpha.3", - "@sofie-package-manager/worker": "1.50.0-alpha.3", - "@sofie-package-manager/workforce": "1.50.0-alpha.3", + "@appcontainer-node/generic": "1.50.0-alpha.4", + "@http-server/generic": "1.50.0-alpha.4", + "@package-manager/generic": "1.50.0-alpha.4", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.4", + "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/worker": "1.50.0-alpha.4", + "@sofie-package-manager/workforce": "1.50.0-alpha.4", "underscore": "^1.12.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", diff --git a/apps/worker/app/CHANGELOG.md b/apps/worker/app/CHANGELOG.md index 1294481a..2d0d68de 100644 --- a/apps/worker/app/CHANGELOG.md +++ b/apps/worker/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + +**Note:** Version bump only for package @worker/app + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @worker/app diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 0c9310ee..17f61c9b 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "description": "Boilerplace", "private": true, "scripts": { @@ -15,7 +15,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@worker/generic": "1.50.0-alpha.3" + "@worker/generic": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/worker/packages/generic/CHANGELOG.md b/apps/worker/packages/generic/CHANGELOG.md index 87a208da..0472b021 100644 --- a/apps/worker/packages/generic/CHANGELOG.md +++ b/apps/worker/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + +**Note:** Version bump only for package @worker/generic + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @worker/generic diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index b597b169..827b2ad3 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.3", - "@sofie-package-manager/worker": "1.50.0-alpha.3" + "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/worker": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/app/CHANGELOG.md b/apps/workforce/app/CHANGELOG.md index 7e687591..f04a1bff 100644 --- a/apps/workforce/app/CHANGELOG.md +++ b/apps/workforce/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + +**Note:** Version bump only for package @workforce/app + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @workforce/app diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index ec9bcfad..56df94cd 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/app", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@workforce/generic": "1.50.0-alpha.3" + "@workforce/generic": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/packages/generic/CHANGELOG.md b/apps/workforce/packages/generic/CHANGELOG.md index 47e1a570..062c9624 100644 --- a/apps/workforce/packages/generic/CHANGELOG.md +++ b/apps/workforce/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + +**Note:** Version bump only for package @workforce/generic + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @workforce/generic diff --git a/apps/workforce/packages/generic/package.json b/apps/workforce/packages/generic/package.json index 4f285f9f..237cb8bc 100644 --- a/apps/workforce/packages/generic/package.json +++ b/apps/workforce/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/generic", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.3", - "@sofie-package-manager/workforce": "1.50.0-alpha.3" + "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/workforce": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/lerna.json b/lerna.json index cb611b96..030c809b 100644 --- a/lerna.json +++ b/lerna.json @@ -4,7 +4,7 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "npmClient": "yarn", "useWorkspaces": true } diff --git a/shared/packages/api/CHANGELOG.md b/shared/packages/api/CHANGELOG.md index db098271..94c29b4c 100644 --- a/shared/packages/api/CHANGELOG.md +++ b/shared/packages/api/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) +* URL handling was broken, because it treated URLs as file paths ([827a939](https://github.com/nrkno/tv-automation-package-manager/commit/827a93961e9647927aef7970af8babbab028a29e)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index eb7871db..44b124ed 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/api", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "main": "dist/index", "types": "dist/index", "files": [ diff --git a/shared/packages/expectationManager/CHANGELOG.md b/shared/packages/expectationManager/CHANGELOG.md index 301562f5..63296c23 100644 --- a/shared/packages/expectationManager/CHANGELOG.md +++ b/shared/packages/expectationManager/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @sofie-package-manager/expectation-manager diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index c2100c4b..72b64292 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -13,8 +13,8 @@ "node": ">=14.18.0" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.3", - "@sofie-package-manager/worker": "1.50.0-alpha.3", + "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/worker": "1.50.0-alpha.4", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index 1ecf1f18..4785f9f3 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) +* URL handling was broken, because it treated URLs as file paths ([827a939](https://github.com/nrkno/tv-automation-package-manager/commit/827a93961e9647927aef7970af8babbab028a29e)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @sofie-package-manager/worker diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index 86ab1249..a21e3868 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -21,7 +21,7 @@ "@types/tmp": "~0.2.2" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.3", + "@sofie-package-manager/api": "1.50.0-alpha.4", "abort-controller": "^3.0.0", "atem-connection": "^3.2.0", "chokidar": "^3.5.1", diff --git a/shared/packages/workforce/CHANGELOG.md b/shared/packages/workforce/CHANGELOG.md index b96c0684..c94af995 100644 --- a/shared/packages/workforce/CHANGELOG.md +++ b/shared/packages/workforce/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @sofie-package-manager/workforce diff --git a/shared/packages/workforce/package.json b/shared/packages/workforce/package.json index 210401e8..ff350575 100644 --- a/shared/packages/workforce/package.json +++ b/shared/packages/workforce/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/workforce", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "main": "dist/index", "types": "dist/index", "files": [ @@ -13,7 +13,7 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.3" + "@sofie-package-manager/api": "1.50.0-alpha.4" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index 0c3dc6fb..7bb2c340 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + + + # [1.50.0-alpha.3](https://github.com/nrkno/sofie-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) **Note:** Version bump only for package @tests/internal-tests diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index 4060b605..81c1c0dc 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.3", + "version": "1.50.0-alpha.4", "description": "Internal tests", "private": true, "scripts": { @@ -14,12 +14,12 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.3", - "@package-manager/generic": "1.50.0-alpha.3", - "@sofie-package-manager/api": "1.50.0-alpha.3", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.3", - "@sofie-package-manager/worker": "1.50.0-alpha.3", - "@sofie-package-manager/workforce": "1.50.0-alpha.3", + "@http-server/generic": "1.50.0-alpha.4", + "@package-manager/generic": "1.50.0-alpha.4", + "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.4", + "@sofie-package-manager/worker": "1.50.0-alpha.4", + "@sofie-package-manager/workforce": "1.50.0-alpha.4", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" }, From 4722418b05f22ddb40593c1ef3a7b2cd8d5f95c9 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 10:36:23 +0200 Subject: [PATCH 26/54] chore: fix some issues in tests where fs mocks didn't handle accessWrite properly --- tests/internal-tests/src/__mocks__/fs.ts | 22 ++++++++++++++++---- tests/internal-tests/src/__mocks__/mkdirp.ts | 12 ++++++++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/tests/internal-tests/src/__mocks__/fs.ts b/tests/internal-tests/src/__mocks__/fs.ts index 31803571..2159a06b 100644 --- a/tests/internal-tests/src/__mocks__/fs.ts +++ b/tests/internal-tests/src/__mocks__/fs.ts @@ -12,8 +12,10 @@ const wndMock = wndMock0 as any as WNDMockType const DEBUG_LOG = false enum fsConstants { - R_OK = 2, - W_OK = 4, + F_OK = 0, + X_OK = 1, + W_OK = 2, + R_OK = 4, } const fs: any = jest.createMockFromModule('fs') @@ -471,7 +473,9 @@ fs.close = close export function copyFile(source: string, destination: string, callback: (error: any, result?: any) => void): void { source = fixPath(source) destination = fixPath(destination) + const destinationFolder = destination.replace(/[^\\/]+$/, '') if (DEBUG_LOG) console.log('fs.copyFile', source, destination) + fsMockEmitter.emit('copyFile', source, destination) fs.__cb('copyFile', () => { try { @@ -479,6 +483,10 @@ export function copyFile(source: string, destination: string, callback: (error: if (DEBUG_LOG) console.log('source', source) if (DEBUG_LOG) console.log('mockFile', mockFile) if (DEBUG_LOG) console.log('destination', destination) + + const destinationFolderMock = getMock(destinationFolder) + if (!destinationFolderMock.accessWrite) throw new Error(`Not allowed to write to "${destinationFolder}"`) + setMock(destination, mockFile, false) callback(undefined, null) @@ -518,7 +526,7 @@ export function createWriteStream(path: string, _options?: BufferEncoding | unde } fs.createWriteStream = createWriteStream -const DEBUG_STREAMS = true +const DEBUG_STREAMS = false class FSReadStream extends Readable { constructor(public path: string) { if (DEBUG_STREAMS) console.log('READ created') @@ -544,6 +552,9 @@ class FSReadStream extends Readable { if (DEBUG_STREAMS) console.log('READ pipe') return super.pipe(destination, options) } + close() { + // nothing? + } } class FSWriteStream extends Writable { constructor(public path: string) { @@ -562,7 +573,7 @@ class FSWriteStream extends Writable { const obj = JSON.parse(chunkStr) if (obj.sourcePath) { - console.log('COPY', obj.sourcePath, this.path) + if (DEBUG_STREAMS) console.log('COPY', obj.sourcePath, this.path) copyFile(obj.sourcePath, this.path, (error, _result) => { if (error) { // this.emit('error', error) @@ -580,6 +591,9 @@ class FSWriteStream extends Writable { if (DEBUG_STREAMS) console.log('WRITE final') callback() } + close() { + // nothing? + } } interface FileAccess { diff --git a/tests/internal-tests/src/__mocks__/mkdirp.ts b/tests/internal-tests/src/__mocks__/mkdirp.ts index 7f627767..9cc6c39b 100644 --- a/tests/internal-tests/src/__mocks__/mkdirp.ts +++ b/tests/internal-tests/src/__mocks__/mkdirp.ts @@ -1,11 +1,21 @@ const mod: any = jest.createMockFromModule('mkdirp') import fsOrg from 'fs' +import { promisify } from 'util' import type * as fsMockType from '../__mocks__/fs' const fs = fsOrg as any as typeof fsMockType +const fsStat = promisify(fs.stat) + export async function mkdirp(path: string): Promise { - fs.__mockSetDirectory(path) + try { + // check if the folder already exists before creating a new one: + await fsStat(path) + } catch (err: any) { + if (err.code !== 'ENOENT') throw err + + fs.__mockSetDirectory(path) + } } mod.mkdirp = mkdirp From e2c4f4ab551491a02fa63780dc6918e7a33f9ab9 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 10:36:46 +0200 Subject: [PATCH 27/54] chore: mock tests for various platforms --- .../src/__tests__/basic.spec.ts | 370 ++++----- .../src/__tests__/issues.spec.ts | 773 +++++++++--------- tests/internal-tests/src/__tests__/lib/lib.ts | 30 +- .../src/__tests__/quantel.spec.ts | 542 ++++++------ 4 files changed, 880 insertions(+), 835 deletions(-) diff --git a/tests/internal-tests/src/__tests__/basic.spec.ts b/tests/internal-tests/src/__tests__/basic.spec.ts index 2ddc60f3..dcc17eb3 100644 --- a/tests/internal-tests/src/__tests__/basic.spec.ts +++ b/tests/internal-tests/src/__tests__/basic.spec.ts @@ -17,7 +17,7 @@ import type * as fsMockType from '../__mocks__/fs' import type * as WNDType from '../__mocks__/windows-network-drive' import type * as QGatewayClientType from '../__mocks__/tv-automation-quantel-gateway-client' import { prepareTestEnviromnent, TestEnviromnent } from './lib/setupEnv' -import { waitUntil } from './lib/lib' +import { describeForAllPlatforms, waitUntil } from './lib/lib' import { getFileShareSource, getLocalSource, @@ -46,198 +46,202 @@ const SOURCE1 = protectString('source1') const TARGET0 = protectString('target0') const TARGET1 = protectString('target1') -describe('Basic', () => { - let env: TestEnviromnent - - beforeAll(async () => { - env = await prepareTestEnviromnent(false) // set to true to enable debug-logging - // Verify that the fs mock works: - expect(fs.lstat).toBeTruthy() - expect(fs.__mockReset).toBeTruthy() - }) - afterAll(() => { - env.terminate() - }) - beforeEach(() => { - fs.__mockReset() - env.reset() - QGatewayClient.resetMock() - }) - test('Be able to copy local file', async () => { - fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) - fs.__mockSetDirectory('/targets/target0') - // console.log(fs.__printAllFiles()) - - env.expectationManager.updateExpectations({ - [EXP_copy0]: literal({ - id: EXP_copy0, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.FILE_COPY, - statusReport: { - label: `Copy file0`, - description: `Copy file0 because test`, - requiredForPlayout: true, - displayRank: 0, - sendReport: true, - }, - startRequirement: { - sources: [getLocalSource(SOURCE0, 'file0Source.mp4')], - }, - endRequirement: { - targets: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], - content: { - filePath: 'file0Target.mp4', +let env: TestEnviromnent +describeForAllPlatforms( + 'Basic', + () => { + beforeAll(async () => { + env = await prepareTestEnviromnent(false) // set to true to enable debug-logging + // Verify that the fs mock works: + expect(fs.lstat).toBeTruthy() + expect(fs.__mockReset).toBeTruthy() + }) + afterAll(() => { + env.terminate() + }) + beforeEach(() => { + fs.__mockReset() + env.reset() + QGatewayClient.resetMock() + }) + }, + () => { + test('Be able to copy local file', async () => { + fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) + fs.__mockSetDirectory('/targets/target0') + // console.log(fs.__printAllFiles()) + + env.expectationManager.updateExpectations({ + [EXP_copy0]: literal({ + id: EXP_copy0, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.FILE_COPY, + statusReport: { + label: `Copy file0`, + description: `Copy file0 because test`, + requiredForPlayout: true, + displayRank: 0, + sendReport: true, }, - version: { type: Expectation.Version.Type.FILE_ON_DISK }, - }, - workOptions: {}, - }), + startRequirement: { + sources: [getLocalSource(SOURCE0, 'file0Source.mp4')], + }, + endRequirement: { + targets: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], + content: { + filePath: 'file0Target.mp4', + }, + version: { type: Expectation.Version.Type.FILE_ON_DISK }, + }, + workOptions: {}, + }), + }) + + // Wait for the job to complete: + await waitUntil(() => { + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) + + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + + expect(await fsStat('/targets/target0/myFolder/file0Target.mp4')).toMatchObject({ + size: 1234, + }) }) + test('Be able to copy Networked file to local', async () => { + fs.__mockSetFile('\\\\networkShare/sources/source1/file0Source.mp4', 1234) + fs.__mockSetDirectory('/targets/target1') + + env.expectationManager.updateExpectations({ + [EXP_copy0]: literal({ + id: EXP_copy0, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.FILE_COPY, + statusReport: { + label: `Copy file0`, + description: `Copy file0 because test`, + requiredForPlayout: true, + displayRank: 0, + sendReport: true, + }, + startRequirement: { + sources: [getFileShareSource(SOURCE1, 'file0Source.mp4')], + }, + endRequirement: { + targets: [getLocalTarget(TARGET1, 'subFolder0/file0Target.mp4')], + content: { + filePath: 'subFolder0/file0Target.mp4', + }, + version: { type: Expectation.Version.Type.FILE_ON_DISK }, + }, + workOptions: {}, + }), + }) + + // Wait for the job to complete: + await waitUntil(() => { + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) + + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + + expect(await WND.list()).toEqual({ + X: { + driveLetter: 'X', + path: '\\\\networkShare\\sources\\source1\\', + status: true, + statusMessage: 'Mock', + }, + }) - // Wait for the job to complete: - await waitUntil(() => { - expect(env.containerStatuses[TARGET0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - }, env.WAIT_JOB_TIME) - - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - - expect(await fsStat('/targets/target0/myFolder/file0Target.mp4')).toMatchObject({ - size: 1234, + expect(await fsStat('/targets/target1/subFolder0/file0Target.mp4')).toMatchObject({ + size: 1234, + }) }) - }) - test('Be able to copy Networked file to local', async () => { - fs.__mockSetFile('\\\\networkShare/sources/source1/file0Source.mp4', 1234) - fs.__mockSetDirectory('/targets/target1') - - env.expectationManager.updateExpectations({ - [EXP_copy0]: literal({ - id: EXP_copy0, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.FILE_COPY, - statusReport: { - label: `Copy file0`, - description: `Copy file0 because test`, - requiredForPlayout: true, - displayRank: 0, - sendReport: true, - }, - startRequirement: { - sources: [getFileShareSource(SOURCE1, 'file0Source.mp4')], - }, - endRequirement: { - targets: [getLocalTarget(TARGET1, 'subFolder0/file0Target.mp4')], - content: { - filePath: 'subFolder0/file0Target.mp4', + test('Be able to copy Quantel clips', async () => { + const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] + + env.expectationManager.updateExpectations({ + [EXP_copy0]: literal({ + id: EXP_copy0, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.QUANTEL_CLIP_COPY, + statusReport: { + label: `Copy quantel clip0`, + description: `Copy clip0 because test`, + requiredForPlayout: true, + displayRank: 0, + sendReport: true, + }, + startRequirement: { + sources: [getQuantelSource(SOURCE0)], }, - version: { type: Expectation.Version.Type.FILE_ON_DISK }, + endRequirement: { + targets: [getQuantelTarget(TARGET1, 1001)], + content: { + guid: 'abc123', + }, + version: { type: Expectation.Version.Type.QUANTEL_CLIP }, + }, + workOptions: {}, + }), + }) + + // Wait for the job to complete: + await waitUntil(() => { + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) + + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + + const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] + expect(newClip).toBeTruthy() + + expect(newClip).toMatchObject({ + server: { + ident: 1001, + }, + clip: { + ClipGUID: 'abc123', + CloneId: orgClip.clip.ClipID, }, - workOptions: {}, - }), + }) }) - - // Wait for the job to complete: - await waitUntil(() => { - expect(env.containerStatuses[TARGET1]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - }, env.WAIT_JOB_TIME) - - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - - expect(await WND.list()).toEqual({ - X: { - driveLetter: 'X', - path: '\\\\networkShare\\sources\\source1\\', - status: true, - statusMessage: 'Mock', - }, + test.skip('Be able to copy local file to http', async () => { + // To be written + expect(1).toEqual(1) }) - - expect(await fsStat('/targets/target1/subFolder0/file0Target.mp4')).toMatchObject({ - size: 1234, + test.skip('Be able to handle 1000 expectations', async () => { + // To be written + expect(1).toEqual(1) }) - }) - test('Be able to copy Quantel clips', async () => { - const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] - - env.expectationManager.updateExpectations({ - [EXP_copy0]: literal({ - id: EXP_copy0, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.QUANTEL_CLIP_COPY, - statusReport: { - label: `Copy quantel clip0`, - description: `Copy clip0 because test`, - requiredForPlayout: true, - displayRank: 0, - sendReport: true, - }, - startRequirement: { - sources: [getQuantelSource(SOURCE0)], - }, - endRequirement: { - targets: [getQuantelTarget(TARGET1, 1001)], - content: { - guid: 'abc123', - }, - version: { type: Expectation.Version.Type.QUANTEL_CLIP }, - }, - workOptions: {}, - }), + test.skip('Media file preview from local to file share', async () => { + // To be written + expect(1).toEqual(1) }) - - // Wait for the job to complete: - await waitUntil(() => { - expect(env.containerStatuses[TARGET1]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - }, env.WAIT_JOB_TIME) - - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - - const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] - expect(newClip).toBeTruthy() - - expect(newClip).toMatchObject({ - server: { - ident: 1001, - }, - clip: { - ClipGUID: 'abc123', - CloneId: orgClip.clip.ClipID, - }, + test.skip('Media file preview from local to file share', async () => { + // To be written + expect(1).toEqual(1) }) - }) - test.skip('Be able to copy local file to http', async () => { - // To be written - expect(1).toEqual(1) - }) - test.skip('Be able to handle 1000 expectations', async () => { - // To be written - expect(1).toEqual(1) - }) - test.skip('Media file preview from local to file share', async () => { - // To be written - expect(1).toEqual(1) - }) - test.skip('Media file preview from local to file share', async () => { - // To be written - expect(1).toEqual(1) - }) -}) + } +) export {} // Just to get rid of a "not a module" warning diff --git a/tests/internal-tests/src/__tests__/issues.spec.ts b/tests/internal-tests/src/__tests__/issues.spec.ts index 598d657d..e41e1f23 100644 --- a/tests/internal-tests/src/__tests__/issues.spec.ts +++ b/tests/internal-tests/src/__tests__/issues.spec.ts @@ -13,7 +13,7 @@ import { } from '@sofie-package-manager/api' import type * as fsMockType from '../__mocks__/fs' import { prepareTestEnviromnent, TestEnviromnent } from './lib/setupEnv' -import { waitUntil, waitTime } from './lib/lib' +import { waitUntil, waitTime, describeForAllPlatforms } from './lib/lib' import { getLocalSource, getLocalTarget } from './lib/containers' import { WorkerAgent } from '@sofie-package-manager/worker' jest.mock('fs') @@ -53,424 +53,433 @@ const SOURCE0 = protectString('source0') const TARGET0 = protectString('target0') const TARGET1 = protectString('target1') -describe('Handle unhappy paths', () => { - let env: TestEnviromnent - - beforeAll(async () => { - env = await prepareTestEnviromnent(false) // set to true to enable debug-logging - // Verify that the fs mock works: - expect(fs.lstat).toBeTruthy() - expect(fs.__mockReset).toBeTruthy() - - jest.setTimeout(env.WAIT_JOB_TIME * 10 + env.WAIT_SCAN_TIME * 2) - }) - afterAll(() => { - env.terminate() - }) - - beforeEach(() => { - fs.__mockReset() - env.reset() - }) +let env: TestEnviromnent +describeForAllPlatforms( + 'Handle unhappy paths', + () => { + beforeAll(async () => { + env = await prepareTestEnviromnent(false) // set to true to enable debug-logging + // Verify that the fs mock works: + expect(fs.lstat).toBeTruthy() + expect(fs.__mockReset).toBeTruthy() + + jest.setTimeout(env.WAIT_JOB_TIME * 10 + env.WAIT_SCAN_TIME * 2) + }) + afterAll(() => { + env.terminate() + }) + beforeEach(() => { + fs.__mockReset() + env.reset() + }) + }, + (_platform: string) => { + test('Wait for non-existing local file', async () => { + fs.__mockSetDirectory('/sources/source0/') + fs.__mockSetDirectory('/targets/target0') + addCopyFileExpectation( + env, + EXP_copy0, + [getLocalSource(SOURCE0, 'file0Source.mp4')], + [getLocalTarget(TARGET0, 'file0Target.mp4')] + ) - test('Wait for non-existing local file', async () => { - fs.__mockSetDirectory('/sources/source0/') - fs.__mockSetDirectory('/targets/target0') - addCopyFileExpectation( - env, - EXP_copy0, - [getLocalSource(SOURCE0, 'file0Source.mp4')], - [getLocalTarget(TARGET0, 'file0Target.mp4')] - ) - - await waitUntil(() => { - // Expect the Expectation to be waiting: - expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ - actualVersionHash: null, - statusInfo: { - status: /new|waiting/, - statusReason: { - tech: /not able to access file/i, + await waitUntil(() => { + // Expect the Expectation to be waiting: + expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ + actualVersionHash: null, + statusInfo: { + status: /new|waiting/, + statusReason: { + tech: /not able to access file/i, + }, }, - }, - }) - }, env.WAIT_JOB_TIME) + }) + }, env.WAIT_JOB_TIME) - expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.NOT_FOUND - ) - - // Now the file suddenly pops up: - fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) - - // Wait for the job to complete: - await waitUntil(() => { - // Expect the copy to have completed by now: - expect(env.containerStatuses[TARGET0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.NOT_FOUND ) - }, env.WAIT_SCAN_TIME + env.ERROR_WAIT_TIME + env.WAIT_JOB_TIME) - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - expect(await fsStat('/targets/target0/file0Target.mp4')).toMatchObject({ - size: 1234, + // Now the file suddenly pops up: + fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) + + // Wait for the job to complete: + await waitUntil(() => { + // Expect the copy to have completed by now: + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_SCAN_TIME + env.ERROR_WAIT_TIME + env.WAIT_JOB_TIME) + + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + expect(await fsStat('/targets/target0/file0Target.mp4')).toMatchObject({ + size: 1234, + }) }) - }) - test.skip('Wait for non-existing network-shared, file', async () => { - // To be written + test.skip('Wait for non-existing network-shared, file', async () => { + // To be written - // Handle Drive-letters: Issue when when files aren't found? (Johan knows) + // Handle Drive-letters: Issue when when files aren't found? (Johan knows) - expect(1).toEqual(1) - }) - test.skip('Wait for growing file', async () => { - // To be written - expect(1).toEqual(1) - }) - test.skip('Wait for non-existing file', async () => { - // To be written - expect(1).toEqual(1) - }) - test('Wait for read access on source', async () => { - fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234, { - accessRead: false, - accessWrite: false, + expect(1).toEqual(1) }) - fs.__mockSetDirectory('/targets/target0', { - accessRead: true, - accessWrite: false, + test.skip('Wait for growing file', async () => { + // To be written + expect(1).toEqual(1) }) - // fs.__printAllFiles() - - addCopyFileExpectation( - env, - EXP_copy0, - [getLocalSource(SOURCE0, 'file0Source.mp4')], - [getLocalTarget(TARGET0, 'file0Target.mp4')] - ) - - await waitUntil(() => { - // Expect the Expectation to be waiting: - expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ - actualVersionHash: null, - statusInfo: { - status: /new|waiting/, - statusReason: { - tech: /not able to access file/i, - }, - }, - }) - }, env.WAIT_JOB_TIME) - - // Now the file can be read from: - fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) - - await waitUntil(() => { - // Expect the Expectation to be waiting: - expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ - actualVersionHash: null, - statusInfo: { - status: 'new', - statusReason: { - tech: /not able to access target/i, - }, - }, + test.skip('Wait for non-existing file', async () => { + // To be written + expect(1).toEqual(1) + }) + test('Wait for read access on source', async () => { + // No read access on source: + fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234, { + accessRead: false, + accessWrite: false, }) - }, env.ERROR_WAIT_TIME + env.WAIT_SCAN_TIME) - // Now the target can be written to: - fs.__mockSetDirectory('/targets/target0', { - accessRead: true, - accessWrite: true, - }) + // No write access on target: + fs.__mockSetDirectory('/targets/target0', { + accessRead: true, + accessWrite: false, + }) + // fs.__printAllFiles() - // Wait until the copy has completed: - await waitUntil(() => { - expect(env.containerStatuses[TARGET0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + addCopyFileExpectation( + env, + EXP_copy0, + [getLocalSource(SOURCE0, 'file0Source.mp4')], + [getLocalTarget(TARGET0, 'file0Target.mp4')] ) - }, env.WAIT_JOB_TIME) - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - expect(await fsStat('/targets/target0/file0Target.mp4')).toMatchObject({ - size: 1234, - }) - }) - test.skip('Wait for write access on target', async () => { - // To be written - expect(1).toEqual(1) - }) - test.skip('Expectation changed', async () => { - // Expectation is changed while waiting for a file - // Expectation is changed while work-in-progress - // Expectation is changed after fulfilled + await waitUntil(() => { + // Expect the Expectation to be waiting: + expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ + actualVersionHash: null, + statusInfo: { + status: /new|waiting/, + statusReason: { + tech: /not able to access file/i, + }, + }, + }) + }, env.WAIT_JOB_TIME) + + // Now the file can be read from: + fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) + + await waitTime(env.WAIT_SCAN_TIME) + + await waitUntil(() => { + // Expect the Expectation to be waiting: + expect(env.expectationStatuses[EXP_copy0]).toMatchObject({ + actualVersionHash: null, + statusInfo: { + status: 'new', + statusReason: { + tech: /not able to access target/i, + }, + }, + }) + }, env.ERROR_WAIT_TIME + env.WAIT_SCAN_TIME) - // To be written - expect(1).toEqual(1) - }) - test.skip('Aborting a job', async () => { - // Expectation is aborted while waiting for a file - // Expectation is aborted while work-in-progress - // Expectation is aborted after fulfilled + // Now the target can be written to: + fs.__mockSetDirectory('/targets/target0', { + accessRead: true, + accessWrite: true, + }) - // To be written - expect(1).toEqual(1) - }) - test.skip('Restarting a job', async () => { - // Expectation is restarted while waiting for a file - // Expectation is restarted while work-in-progress - // Expectation is restarted after fulfilled + // Wait until the copy has completed: + await waitUntil(() => { + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) - // To be written - expect(1).toEqual(1) - }) - test('A worker crashes', async () => { - // A worker crashes while expectation waiting for a file - // A worker crashes while expectation work-in-progress - - expect(env.workerAgents).toHaveLength(1) - fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) - fs.__mockSetDirectory('/targets/target0') - let killedWorker: WorkerAgent | undefined - const listenToCopyFile = jest.fn(() => { - // While the copy is underway, kill off the worker: - // This simulates that the worker crashes, without telling anyone. - killedWorker = env.workerAgents[0] - killedWorker.terminate() + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + expect(await fsStat('/targets/target0/file0Target.mp4')).toMatchObject({ + size: 1234, + }) }) + test.skip('Wait for write access on target', async () => { + // To be written + expect(1).toEqual(1) + }) + test.skip('Expectation changed', async () => { + // Expectation is changed while waiting for a file + // Expectation is changed while work-in-progress + // Expectation is changed after fulfilled - fs.__emitter().once('copyFile', listenToCopyFile) - - addCopyFileExpectation( - env, - EXP_copy0, - [getLocalSource(SOURCE0, 'file0Source.mp4')], - [getLocalTarget(TARGET0, 'file0Target.mp4')] - ) + // To be written + expect(1).toEqual(1) + }) + test.skip('Aborting a job', async () => { + // Expectation is aborted while waiting for a file + // Expectation is aborted while work-in-progress + // Expectation is aborted after fulfilled - await waitTime(env.WAIT_JOB_TIME) - // Expect the Expectation to be still working - // (the worker has crashed, but expectationManger hasn't noticed yet) - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('working') - expect(listenToCopyFile).toHaveBeenCalledTimes(1) + // To be written + expect(1).toEqual(1) + }) + test.skip('Restarting a job', async () => { + // Expectation is restarted while waiting for a file + // Expectation is restarted while work-in-progress + // Expectation is restarted after fulfilled - // Wait until the work have been aborted, and restarted: - await waitUntil(() => { - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual(expect.stringMatching(/new|waiting/)) - }, env.WORK_TIMEOUT_TIME + env.WAIT_JOB_TIME) + // To be written + expect(1).toEqual(1) + }) + test('A worker crashes', async () => { + // A worker crashes while expectation waiting for a file + // A worker crashes while expectation work-in-progress + + expect(env.workerAgents).toHaveLength(1) + fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) + fs.__mockSetDirectory('/targets/target0') + let killedWorker: WorkerAgent | undefined + const listenToCopyFile = jest.fn(() => { + // While the copy is underway, kill off the worker: + // This simulates that the worker crashes, without telling anyone. + killedWorker = env.workerAgents[0] + killedWorker.terminate() + }) - // Add another worker: - env.addWorker() + fs.__emitter().once('copyFile', listenToCopyFile) - // Expect the copy to have completed: - await waitUntil(() => { - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - expect(env.containerStatuses[TARGET0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + addCopyFileExpectation( + env, + EXP_copy0, + [getLocalSource(SOURCE0, 'file0Source.mp4')], + [getLocalTarget(TARGET0, 'file0Target.mp4')] ) - }, env.WAIT_SCAN_TIME) - // Clean up: - if (killedWorker) env.removeWorker(killedWorker.id) - }) - test('A job times out', async () => { - // A worker crashes while expectation waiting for a file - // A worker crashes while expectation work-in-progress - - expect(env.workerAgents).toHaveLength(1) - fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) - fs.__mockSetDirectory('/targets/target0') - let hasIntercepted = 0 - let deferredCallbacks: Function[] = [] - const listenToCopyFile = jest.fn(() => { - fs.__setCallbackInterceptor((type, cb) => { - if (type === 'copyFile') { - hasIntercepted++ - // We will NOT call the callback cb(), this simulates that something gets stuck - - // Restore this interceptor, so that it is only runned once - fs.__restoreCallbackInterceptor() - // to be cleaned up later: - deferredCallbacks.push(cb) - } else { - return cb() - } - }) + await waitTime(env.WAIT_JOB_TIME) + // Expect the Expectation to be still working + // (the worker has crashed, but expectationManger hasn't noticed yet) + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('working') + expect(listenToCopyFile).toHaveBeenCalledTimes(1) + + // Wait until the work have been aborted, and restarted: + await waitUntil(() => { + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual( + expect.stringMatching(/new|waiting/) + ) + }, env.WORK_TIMEOUT_TIME + env.WAIT_JOB_TIME) + + // Add another worker: + env.addWorker() + + // Expect the copy to have completed: + await waitUntil(() => { + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_SCAN_TIME) + + // Clean up: + if (killedWorker) env.removeWorker(killedWorker.id) }) - fs.__emitter().once('copyFile', listenToCopyFile) - - addCopyFileExpectation( - env, - EXP_copy0, - [getLocalSource(SOURCE0, 'file0Source.mp4')], - [getLocalTarget(TARGET0, 'file0Target.mp4')] - ) - - await waitTime(env.WAIT_JOB_TIME) - // Expect the Expectation to be still working - // (the job is timing out, but expectationManger hasn't noticed yet) - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('working') - expect(listenToCopyFile).toHaveBeenCalledTimes(1) - expect(hasIntercepted).toBe(1) - - // Wait for the work to be aborted, and restarted: - await waitUntil(() => { - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual( - expect.stringMatching(/new|waiting|ready|fulfilled/) - ) - }, env.WORK_TIMEOUT_TIME + env.WAIT_JOB_TIME) + test('A job times out', async () => { + // A worker crashes while expectation waiting for a file + // A worker crashes while expectation work-in-progress + + expect(env.workerAgents).toHaveLength(1) + fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) + fs.__mockSetDirectory('/targets/target0') + let hasIntercepted = 0 + let deferredCallbacks: Function[] = [] + const listenToCopyFile = jest.fn(() => { + fs.__setCallbackInterceptor((type, cb) => { + if (type === 'copyFile') { + hasIntercepted++ + // We will NOT call the callback cb(), this simulates that something gets stuck + + // Restore this interceptor, so that it is only runned once + fs.__restoreCallbackInterceptor() + // to be cleaned up later: + deferredCallbacks.push(cb) + } else { + return cb() + } + }) + }) + fs.__emitter().once('copyFile', listenToCopyFile) - // Wait for the copy to complete: - await waitUntil(() => { - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - expect(env.containerStatuses[TARGET0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + addCopyFileExpectation( + env, + EXP_copy0, + [getLocalSource(SOURCE0, 'file0Source.mp4')], + [getLocalTarget(TARGET0, 'file0Target.mp4')] ) - }, env.WAIT_SCAN_TIME) - expect(listenToCopyFile).toHaveBeenCalledTimes(1) - expect(hasIntercepted).toBe(1) - - // clean up: - deferredCallbacks.forEach((cb) => cb()) - }) - test.skip('One of the workers reply very slowly', async () => { - // The expectation should be picked up by one of the faster workers + await waitTime(env.WAIT_JOB_TIME) + // Expect the Expectation to be still working + // (the job is timing out, but expectationManger hasn't noticed yet) + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('working') + expect(listenToCopyFile).toHaveBeenCalledTimes(1) + expect(hasIntercepted).toBe(1) + + // Wait for the work to be aborted, and restarted: + await waitUntil(() => { + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual( + expect.stringMatching(/new|waiting|ready|fulfilled/) + ) + }, env.WORK_TIMEOUT_TIME + env.WAIT_JOB_TIME) + + // Wait for the copy to complete: + await waitUntil(() => { + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_SCAN_TIME) + + expect(listenToCopyFile).toHaveBeenCalledTimes(1) + expect(hasIntercepted).toBe(1) + + // clean up: + deferredCallbacks.forEach((cb) => cb()) + }) + test.skip('One of the workers reply very slowly', async () => { + // The expectation should be picked up by one of the faster workers - // To be written - expect(1).toEqual(1) - }) - test('When original work step fails, subsequent steps should do so too', async () => { - // Step 1: Copy from A to B - // Step 2: Copy from B to C - - fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) - fs.__mockSetDirectory('/targets/target0') - fs.__mockSetDirectory('/targets/target1') - // console.log(fs.__printAllFiles()) - - const STEP1 = protectString('step1') - const STEP2 = protectString('step2') - - env.expectationManager.updateExpectations({ - [STEP1]: literal({ - id: STEP1, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.FILE_COPY, - statusReport: { - label: `Copy file0`, - description: '', - sendReport: true, - }, - startRequirement: { - sources: [getLocalSource(SOURCE0, 'file0Source.mp4')], - }, - endRequirement: { - targets: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], - content: { - filePath: 'file0Target.mp4', + // To be written + expect(1).toEqual(1) + }) + test('When original work step fails, subsequent steps should do so too', async () => { + // Step 1: Copy from A to B + // Step 2: Copy from B to C + + fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) + fs.__mockSetDirectory('/targets/target0') + fs.__mockSetDirectory('/targets/target1') + // console.log(fs.__printAllFiles()) + + const STEP1 = protectString('step1') + const STEP2 = protectString('step2') + + env.expectationManager.updateExpectations({ + [STEP1]: literal({ + id: STEP1, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.FILE_COPY, + statusReport: { + label: `Copy file0`, + description: '', + sendReport: true, }, - version: { type: Expectation.Version.Type.FILE_ON_DISK }, - }, - workOptions: {}, - }), - [STEP2]: literal({ - id: STEP2, - dependsOnFulfilled: [STEP1], // Depends on step 1 - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.FILE_COPY, - statusReport: { - label: `Copy file0`, - description: '', - sendReport: true, - }, - startRequirement: { - sources: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], - }, - endRequirement: { - targets: [getLocalTarget(TARGET1, 'myFolder/file0Target.mp4')], - content: { - filePath: 'file0Target.mp4', + startRequirement: { + sources: [getLocalSource(SOURCE0, 'file0Source.mp4')], }, - version: { type: Expectation.Version.Type.FILE_ON_DISK }, - }, - workOptions: { - removePackageOnUnFulfill: true, - }, - }), - }) - - // Wait for the job to complete: - await waitUntil(() => { - expect(env.containerStatuses[TARGET0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - }, env.WAIT_JOB_TIME) - await waitUntil(() => { - expect(env.containerStatuses[TARGET1]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - }, env.WAIT_JOB_TIME) + endRequirement: { + targets: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], + content: { + filePath: 'file0Target.mp4', + }, + version: { type: Expectation.Version.Type.FILE_ON_DISK }, + }, + workOptions: {}, + }), + [STEP2]: literal({ + id: STEP2, + dependsOnFulfilled: [STEP1], // Depends on step 1 + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.FILE_COPY, + statusReport: { + label: `Copy file0`, + description: '', + sendReport: true, + }, + startRequirement: { + sources: [getLocalTarget(TARGET0, 'myFolder/file0Target.mp4')], + }, + endRequirement: { + targets: [getLocalTarget(TARGET1, 'myFolder/file0Target.mp4')], + content: { + filePath: 'file0Target.mp4', + }, + version: { type: Expectation.Version.Type.FILE_ON_DISK }, + }, + workOptions: { + removePackageOnUnFulfill: true, + }, + }), + }) - // Check that step 1 and 2 fullfills: - expect(env.expectationStatuses[STEP1].statusInfo.status).toEqual('fulfilled') - expect(env.expectationStatuses[STEP2].statusInfo.status).toEqual('fulfilled') + // Wait for the job to complete: + await waitUntil(() => { + expect(env.containerStatuses[TARGET0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) + await waitUntil(() => { + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) + + // Check that step 1 and 2 fullfills: + expect(env.expectationStatuses[STEP1].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[STEP2].statusInfo.status).toEqual('fulfilled') + + expect(await fsStat('/targets/target0/myFolder/file0Target.mp4')).toMatchObject({ + size: 1234, + }) + expect(await fsStat('/targets/target1/myFolder/file0Target.mp4')).toMatchObject({ + size: 1234, + }) - expect(await fsStat('/targets/target0/myFolder/file0Target.mp4')).toMatchObject({ - size: 1234, + // Now A is removed, so step 1 should be un-fulfilled + fs.__mockDeleteFile('/sources/source0/file0Source.mp4') + + // Wait for the step 1 to pick up on the change: + await waitUntil(() => { + expect(env.expectationStatuses[STEP1].statusInfo.status).toMatch(/waiting|new/) + expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.NOT_FOUND + ) + }, env.WAIT_JOB_TIME) + + // Step 2 should be un-fulfilled, since it depends on step 1. + await waitUntil(() => { + expect(env.expectationStatuses[STEP1].statusInfo.status).toMatch(/waiting|new/) + expect(env.expectationStatuses[STEP2].statusInfo.status).toMatch(/waiting|new/) + }, env.WAIT_JOB_TIME) + + // The step1-copied file should remain, since removePackageOnUnFulfill is not set + expect(await fsExists('/targets/target0/myFolder/file0Target.mp4')).toBe(true) + // The step2-copied file should be removed, since removePackageOnUnFulfill is true + expect(await fsExists('/targets/target1/myFolder/file0Target.mp4')).toBe(false) + + // Source file shows up again: + fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) + + // Now, both steps should fulfill again: + await waitUntil(() => { + expect(env.expectationStatuses[STEP1].statusInfo.status).toBe('fulfilled') + expect(env.expectationStatuses[STEP2].statusInfo.status).toBe('fulfilled') + }, env.WAIT_JOB_TIME) }) - expect(await fsStat('/targets/target1/myFolder/file0Target.mp4')).toMatchObject({ - size: 1234, - }) - - // Now A is removed, so step 1 should be un-fulfilled - fs.__mockDeleteFile('/sources/source0/file0Source.mp4') - - // Wait for the step 1 to pick up on the change: - await waitUntil(() => { - expect(env.expectationStatuses[STEP1].statusInfo.status).toMatch(/waiting|new/) - expect(env.containerStatuses[TARGET0].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.NOT_FOUND - ) - }, env.WAIT_JOB_TIME) - - // Step 2 should be un-fulfilled, since it depends on step 1. - await waitUntil(() => { - expect(env.expectationStatuses[STEP1].statusInfo.status).toMatch(/waiting|new/) - expect(env.expectationStatuses[STEP2].statusInfo.status).toMatch(/waiting|new/) - }, env.WAIT_JOB_TIME) - - // The step1-copied file should remain, since removePackageOnUnFulfill is not set - expect(await fsExists('/targets/target0/myFolder/file0Target.mp4')).toBe(true) - // The step2-copied file should be removed, since removePackageOnUnFulfill is true - expect(await fsExists('/targets/target1/myFolder/file0Target.mp4')).toBe(false) - - // Source file shows up again: - fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) - - // Now, both steps should fulfill again: - await waitUntil(() => { - expect(env.expectationStatuses[STEP1].statusInfo.status).toBe('fulfilled') - expect(env.expectationStatuses[STEP2].statusInfo.status).toBe('fulfilled') - }, env.WAIT_JOB_TIME) - }) -}) + } +) function addCopyFileExpectation( env: TestEnviromnent, expectationId: ExpectationId, diff --git a/tests/internal-tests/src/__tests__/lib/lib.ts b/tests/internal-tests/src/__tests__/lib/lib.ts index 8baf41fe..08dcfd7e 100644 --- a/tests/internal-tests/src/__tests__/lib/lib.ts +++ b/tests/internal-tests/src/__tests__/lib/lib.ts @@ -15,8 +15,36 @@ export async function waitUntil(expectFcn: () => void, maxWaitTime: number): Pro return } catch (err) { let waitedTime = Date.now() - startTime - if (waitedTime > maxWaitTime) throw err + if (waitedTime > maxWaitTime) { + console.log(`waitUntil: waited for ${waitedTime} ms, giving up (maxWaitTime: ${maxWaitTime}).`) + throw err + } // else ignore error and try again later } } } + +export function describeForAllPlatforms(name: string, cbOnce: () => void, cbPerPlatform: (platform: string) => void) { + describe(name, () => { + cbOnce() + let orgProcessPlatform: any + const platforms = ['win32', 'darwin', 'linux'] + + for (const platform of platforms) { + describe(platform, () => { + beforeAll(async () => { + orgProcessPlatform = process.platform + Object.defineProperty(process, 'platform', { + value: 'darwin', + }) + }) + afterAll(() => { + Object.defineProperty(process, 'platform', { + value: orgProcessPlatform, + }) + }) + cbPerPlatform(platform) + }) + } + }) +} diff --git a/tests/internal-tests/src/__tests__/quantel.spec.ts b/tests/internal-tests/src/__tests__/quantel.spec.ts index 552496bc..ad40aefb 100644 --- a/tests/internal-tests/src/__tests__/quantel.spec.ts +++ b/tests/internal-tests/src/__tests__/quantel.spec.ts @@ -13,305 +13,309 @@ import { } from '@sofie-package-manager/api' import type * as QGatewayClientType from '../__mocks__/tv-automation-quantel-gateway-client' import { prepareTestEnviromnent, TestEnviromnent } from './lib/setupEnv' -import { waitUntil } from './lib/lib' +import { describeForAllPlatforms, waitUntil } from './lib/lib' import { getQuantelSource, getQuantelTarget } from './lib/containers' jest.mock('child_process') jest.mock('tv-automation-quantel-gateway-client') const QGatewayClient = QGatewayClientOrg as any as typeof QGatewayClientType -describe('Quantel', () => { - let env: TestEnviromnent - - beforeAll(async () => { - env = await prepareTestEnviromnent(false) // set to true to enable debug-logging - }) - afterAll(() => { - env.terminate() - }) - beforeEach(() => { - env.reset() - QGatewayClient.resetMock() - }) - const EXP_copy0 = protectString('copy0') - const MANAGER0 = protectString('manager0') - const PACKAGE0 = protectString('package0') - - const SOURCE0 = protectString('source0') - const TARGET1 = protectString('target1') - - test('Clone by guid', async () => { - const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] - - env.expectationManager.updateExpectations({ - [EXP_copy0]: literal({ - id: EXP_copy0, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.QUANTEL_CLIP_COPY, - statusReport: { - label: `Copy quantel clip0`, - description: `Copy clip0 because test`, - requiredForPlayout: true, - displayRank: 0, - sendReport: true, - }, - startRequirement: { - sources: [getQuantelSource(SOURCE0)], - }, - endRequirement: { - targets: [getQuantelTarget(TARGET1, 1001)], - content: { - guid: 'abc123', - }, - version: { type: Expectation.Version.Type.QUANTEL_CLIP }, - }, - workOptions: {}, - }), +let env: TestEnviromnent +describeForAllPlatforms( + 'Quantel', + () => { + beforeAll(async () => { + env = await prepareTestEnviromnent(false) // set to true to enable debug-logging }) - - // Wait for the job to complete: - await waitUntil(() => { - expect(env.containerStatuses[TARGET1]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - }, env.WAIT_JOB_TIME) - - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - - const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] - expect(newClip).toBeTruthy() - - expect(newClip).toMatchObject({ - server: { - ident: 1001, - }, - clip: { - ClipGUID: 'abc123', - CloneId: orgClip.clip.ClipID, - }, + afterAll(() => { + env.terminate() }) - }) - test('Clone by title', async () => { - const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] - - env.expectationManager.updateExpectations({ - [EXP_copy0]: literal({ - id: EXP_copy0, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.QUANTEL_CLIP_COPY, - statusReport: { - label: `Copy quantel clip0`, - description: `Copy clip0 because test`, - requiredForPlayout: true, - displayRank: 0, - sendReport: true, + beforeEach(() => { + env.reset() + QGatewayClient.resetMock() + }) + }, + () => { + const EXP_copy0 = protectString('copy0') + const MANAGER0 = protectString('manager0') + const PACKAGE0 = protectString('package0') + + const SOURCE0 = protectString('source0') + const TARGET1 = protectString('target1') + + test('Clone by guid', async () => { + const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] + + env.expectationManager.updateExpectations({ + [EXP_copy0]: literal({ + id: EXP_copy0, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.QUANTEL_CLIP_COPY, + statusReport: { + label: `Copy quantel clip0`, + description: `Copy clip0 because test`, + requiredForPlayout: true, + displayRank: 0, + sendReport: true, + }, + startRequirement: { + sources: [getQuantelSource(SOURCE0)], + }, + endRequirement: { + targets: [getQuantelTarget(TARGET1, 1001)], + content: { + guid: 'abc123', + }, + version: { type: Expectation.Version.Type.QUANTEL_CLIP }, + }, + workOptions: {}, + }), + }) + + // Wait for the job to complete: + await waitUntil(() => { + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) + + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + + const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] + expect(newClip).toBeTruthy() + + expect(newClip).toMatchObject({ + server: { + ident: 1001, }, - startRequirement: { - sources: [getQuantelSource(SOURCE0)], + clip: { + ClipGUID: 'abc123', + CloneId: orgClip.clip.ClipID, }, - endRequirement: { - targets: [getQuantelTarget(TARGET1, 1001)], - content: { - title: 'elephants', + }) + }) + test('Clone by title', async () => { + const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] + + env.expectationManager.updateExpectations({ + [EXP_copy0]: literal({ + id: EXP_copy0, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.QUANTEL_CLIP_COPY, + statusReport: { + label: `Copy quantel clip0`, + description: `Copy clip0 because test`, + requiredForPlayout: true, + displayRank: 0, + sendReport: true, }, - version: { type: Expectation.Version.Type.QUANTEL_CLIP }, + startRequirement: { + sources: [getQuantelSource(SOURCE0)], + }, + endRequirement: { + targets: [getQuantelTarget(TARGET1, 1001)], + content: { + title: 'elephants', + }, + version: { type: Expectation.Version.Type.QUANTEL_CLIP }, + }, + workOptions: {}, + }), + }) + + // Wait for the job to complete: + await waitUntil(() => { + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) + + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + + const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] + expect(newClip).toBeTruthy() + + expect(newClip).toMatchObject({ + server: { + ident: 1001, }, - workOptions: {}, - }), - }) - - // Wait for the job to complete: - await waitUntil(() => { - expect(env.containerStatuses[TARGET1]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - }, env.WAIT_JOB_TIME) - - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - - const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] - expect(newClip).toBeTruthy() - - expect(newClip).toMatchObject({ - server: { - ident: 1001, - }, - clip: { - ClipGUID: 'abc123', - CloneId: orgClip.clip.ClipID, - }, + clip: { + ClipGUID: 'abc123', + CloneId: orgClip.clip.ClipID, + }, + }) }) - }) - test('Edge case: A clip has changed title', async () => { - /* + test('Edge case: A clip has changed title', async () => { + /* This is an edge case where the title is changed for a clip on the ISA, after it has been copied to the server. */ - // Set up the clips on the servers: - const mock = QGatewayClient.getMock() - expect(mock.servers).toHaveLength(2) - - expect(mock.servers[0].pools).toHaveLength(1) - expect(mock.servers[1].pools).toHaveLength(1) - - // Source server: - mock.servers[0].pools[0].clips = [ - { - ClipID: 10, - ClipGUID: 'abc123', - Title: 'New elephants', // The title was changed after the clip was cloned - CloneId: null, - Completed: '2020-01-01', - Frames: '1337', - }, - ] - // Target server: - mock.servers[1].pools[0].clips = [ - { - ClipID: 11, - CloneId: 10, // the clip was cloned from 10 - ClipGUID: 'abc123', - Title: 'OG elephants', // original title - Completed: '2020-01-01', - Frames: '1337', - }, - ] - - const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] - - env.expectationManager.updateExpectations({ - [EXP_copy0]: literal({ - id: EXP_copy0, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.QUANTEL_CLIP_COPY, - statusReport: { - label: `Copy quantel clip0`, - description: `Copy clip0 because test`, - requiredForPlayout: true, - displayRank: 0, - sendReport: true, + // Set up the clips on the servers: + const mock = QGatewayClient.getMock() + expect(mock.servers).toHaveLength(2) + + expect(mock.servers[0].pools).toHaveLength(1) + expect(mock.servers[1].pools).toHaveLength(1) + + // Source server: + mock.servers[0].pools[0].clips = [ + { + ClipID: 10, + ClipGUID: 'abc123', + Title: 'New elephants', // The title was changed after the clip was cloned + CloneId: null, + Completed: '2020-01-01', + Frames: '1337', }, - startRequirement: { - sources: [getQuantelSource(SOURCE0)], + ] + // Target server: + mock.servers[1].pools[0].clips = [ + { + ClipID: 11, + CloneId: 10, // the clip was cloned from 10 + ClipGUID: 'abc123', + Title: 'OG elephants', // original title + Completed: '2020-01-01', + Frames: '1337', }, - endRequirement: { - targets: [getQuantelTarget(TARGET1, 1001)], - content: { - title: 'New elephants', + ] + + const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] + + env.expectationManager.updateExpectations({ + [EXP_copy0]: literal({ + id: EXP_copy0, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.QUANTEL_CLIP_COPY, + statusReport: { + label: `Copy quantel clip0`, + description: `Copy clip0 because test`, + requiredForPlayout: true, + displayRank: 0, + sendReport: true, }, - version: { type: Expectation.Version.Type.QUANTEL_CLIP }, - }, - workOptions: {}, - }), - }) - - // Wait a little while, to ensure that an evaulation has passed: - await waitTime(env.WAIT_JOB_TIME) - - expect(QGatewayClient.QuantelGatewayInstances.length).toBeGreaterThanOrEqual(1) - for (const instance of QGatewayClient.QuantelGatewayInstances) { - // No actual copying should have been done, since the clip was actually already there (only with the wrong title): - expect(instance.mockCopyCount).toBe(0) - } - - expect(env.containerStatuses[TARGET1]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - - const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] - expect(newClip).toBeTruthy() - - expect(newClip).toMatchObject({ - server: { - ident: 1001, - }, - clip: { - ClipGUID: 'abc123', - CloneId: orgClip.clip.ClipID, - }, - }) - }) - test('Reserved clip', async () => { - // const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123-reserved-clip')[0] - - env.expectationManager.updateExpectations({ - [EXP_copy0]: literal({ - id: EXP_copy0, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.QUANTEL_CLIP_COPY, - statusReport: { - label: `Copy quantel clip0`, - description: `Copy clip0 because test`, - requiredForPlayout: true, - displayRank: 0, - sendReport: true, - }, - startRequirement: { - sources: [getQuantelSource(SOURCE0)], - }, - endRequirement: { - targets: [getQuantelTarget(TARGET1, 1001)], - content: { - guid: 'abc123-reserved-clip', + startRequirement: { + sources: [getQuantelSource(SOURCE0)], }, - version: { type: Expectation.Version.Type.QUANTEL_CLIP }, - }, - workOptions: {}, - }), - }) + endRequirement: { + targets: [getQuantelTarget(TARGET1, 1001)], + content: { + title: 'New elephants', + }, + version: { type: Expectation.Version.Type.QUANTEL_CLIP }, + }, + workOptions: {}, + }), + }) - // Wait for the job to get the correct status: - await waitUntil(() => { - expect(env.containerStatuses[TARGET1]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.statusReason.user).toEqual( - `Reserved clip, not yet ready for playout` - ) - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.PLACEHOLDER - ) - }, env.WAIT_JOB_TIME) + // Wait a little while, to ensure that an evaulation has passed: + await waitTime(env.WAIT_JOB_TIME) - // Now, set the clip to have frames: - QGatewayClient.updateClip((clip) => { - if (clip.ClipGUID === 'abc123-reserved-clip') { - return { - ...clip, - Frames: '1234', - } + expect(QGatewayClient.QuantelGatewayInstances.length).toBeGreaterThanOrEqual(1) + for (const instance of QGatewayClient.QuantelGatewayInstances) { + // No actual copying should have been done, since the clip was actually already there (only with the wrong title): + expect(instance.mockCopyCount).toBe(0) } - return undefined - }) - // Wait for the job to finish: - await waitUntil(() => { expect(env.containerStatuses[TARGET1]).toBeTruthy() expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - // expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.statusReason.user).toEqual('') expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY ) - }, 500 + env.WAIT_JOB_TIME) - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - }) -}) + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + + const newClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123' && clip !== orgClip.clip)[0] + expect(newClip).toBeTruthy() + + expect(newClip).toMatchObject({ + server: { + ident: 1001, + }, + clip: { + ClipGUID: 'abc123', + CloneId: orgClip.clip.ClipID, + }, + }) + }) + test('Reserved clip', async () => { + // const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123-reserved-clip')[0] + + env.expectationManager.updateExpectations({ + [EXP_copy0]: literal({ + id: EXP_copy0, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.QUANTEL_CLIP_COPY, + statusReport: { + label: `Copy quantel clip0`, + description: `Copy clip0 because test`, + requiredForPlayout: true, + displayRank: 0, + sendReport: true, + }, + startRequirement: { + sources: [getQuantelSource(SOURCE0)], + }, + endRequirement: { + targets: [getQuantelTarget(TARGET1, 1001)], + content: { + guid: 'abc123-reserved-clip', + }, + version: { type: Expectation.Version.Type.QUANTEL_CLIP }, + }, + workOptions: {}, + }), + }) + + // Wait for the job to get the correct status: + await waitUntil(() => { + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.statusReason.user).toEqual( + `Reserved clip, not yet ready for playout` + ) + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.PLACEHOLDER + ) + }, env.WAIT_JOB_TIME) + + // Now, set the clip to have frames: + QGatewayClient.updateClip((clip) => { + if (clip.ClipGUID === 'abc123-reserved-clip') { + return { + ...clip, + Frames: '1234', + } + } + return undefined + }) + + // Wait for the job to finish: + await waitUntil(() => { + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + // expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.statusReason.user).toEqual('') + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, 500 + env.WAIT_JOB_TIME) + + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + }) + } +) export {} // Just to get rid of a "not a module" warning From c2f6432eeae6c366a80ed7a412750a97374a321f Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 10:54:26 +0200 Subject: [PATCH 28/54] revert: chore: lerna useWorkspaces Error in CI: lerna ERR! ECONFIGWORKSPACES The "useWorkspaces" option has been removed. By default lerna will resolve your packages using your package manager's workspaces configuration. Alternatively, you can manually provide a list of package globs to be used instead via the "packages" option in lerna.json. --- lerna.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lerna.json b/lerna.json index 030c809b..4a2f32a6 100644 --- a/lerna.json +++ b/lerna.json @@ -5,6 +5,5 @@ "tests/**" ], "version": "1.50.0-alpha.4", - "npmClient": "yarn", - "useWorkspaces": true + "npmClient": "yarn" } From 2c04806e5634b996aed23d5132f0fc24e1882128 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 11:34:40 +0200 Subject: [PATCH 29/54] chore: CI: If signing of executables fail, they should be uploaded, but the gh-action should be marked as failed. --- .github/workflows/build-windows.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yaml b/.github/workflows/build-windows.yaml index 88c48fe2..b6945936 100644 --- a/.github/workflows/build-windows.yaml +++ b/.github/workflows/build-windows.yaml @@ -35,7 +35,6 @@ jobs: - name: Sign executables shell: bash - continue-on-error: true env: WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} run: | @@ -54,11 +53,13 @@ jobs: fi - name: Verify build + if: '!cancelled()' run: yarn verify:build-win32 env: CI: true - name: Upload artifacts + if: '!cancelled()' uses: actions/upload-artifact@v3 with: name: Windows From 7569c7e62afff17a02521a70cb2479e1a2a7557d Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 11:35:34 +0200 Subject: [PATCH 30/54] v1.50.0-alpha.5 --- CHANGELOG.md | 11 +++++++++++ lerna.json | 2 +- tests/internal-tests/CHANGELOG.md | 8 ++++++++ tests/internal-tests/package.json | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7e4eb26..6aa89319 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) + + +### Reverts + +* chore: lerna useWorkspaces ([c2f6432](https://github.com/nrkno/tv-automation-package-manager/commit/c2f6432eeae6c366a80ed7a412750a97374a321f)) + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/lerna.json b/lerna.json index 4a2f32a6..7d80d742 100644 --- a/lerna.json +++ b/lerna.json @@ -4,6 +4,6 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.5", "npmClient": "yarn" } diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index 7bb2c340..26bdb2e7 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) + +**Note:** Version bump only for package @tests/internal-tests + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index 81c1c0dc..57833585 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.5", "description": "Internal tests", "private": true, "scripts": { From 44f344ad7303512e79bfec5dca67bb3f12e6a76a Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 12:23:45 +0200 Subject: [PATCH 31/54] fix: CI signtool.exe /debug --- .github/workflows/build-windows.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows.yaml b/.github/workflows/build-windows.yaml index b6945936..6c32159d 100644 --- a/.github/workflows/build-windows.yaml +++ b/.github/workflows/build-windows.yaml @@ -43,9 +43,9 @@ jobs: echo "$WINDOWS_CERTIFICATE" | base64 -d > certificate.pfx for FILE in deploy/*; do - # This path is a bit fragile, but necessary as no signtool is on the path. + # This path is a bit fragile, but necessary as no signtool is on the path. # If this path breaks, then find what versions of windows kits are installed in the updated runner image https://github.com/actions/runner-images#available-images - 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign //fd SHA256 //f certificate.pfx //p "${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}" $FILE + 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign //debug //fd SHA256 //f certificate.pfx //p "${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}" $FILE echo $FILE done else From 145740ed357e07602935d078c7c1ad1fd77aa46e Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 4 Sep 2023 12:25:44 +0200 Subject: [PATCH 32/54] v1.50.0-alpha.6 --- CHANGELOG.md | 11 +++++++++++ apps/_boilerplate/app/CHANGELOG.md | 8 ++++++++ apps/_boilerplate/app/package.json | 4 ++-- apps/_boilerplate/packages/generic/CHANGELOG.md | 8 ++++++++ apps/_boilerplate/packages/generic/package.json | 2 +- apps/appcontainer-node/app/CHANGELOG.md | 8 ++++++++ apps/appcontainer-node/app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 6 +++--- apps/http-server/app/CHANGELOG.md | 8 ++++++++ apps/http-server/app/package.json | 4 ++-- apps/http-server/packages/generic/CHANGELOG.md | 8 ++++++++ apps/http-server/packages/generic/package.json | 4 ++-- apps/package-manager/app/CHANGELOG.md | 8 ++++++++ apps/package-manager/app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 8 ++++---- .../app/CHANGELOG.md | 8 ++++++++ .../app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 4 ++-- apps/single-app/app/CHANGELOG.md | 8 ++++++++ apps/single-app/app/package.json | 16 ++++++++-------- apps/worker/app/CHANGELOG.md | 8 ++++++++ apps/worker/app/package.json | 4 ++-- apps/worker/packages/generic/CHANGELOG.md | 8 ++++++++ apps/worker/packages/generic/package.json | 6 +++--- apps/workforce/app/CHANGELOG.md | 8 ++++++++ apps/workforce/app/package.json | 4 ++-- apps/workforce/packages/generic/CHANGELOG.md | 8 ++++++++ apps/workforce/packages/generic/package.json | 6 +++--- lerna.json | 2 +- shared/packages/api/CHANGELOG.md | 8 ++++++++ shared/packages/api/package.json | 2 +- shared/packages/expectationManager/CHANGELOG.md | 8 ++++++++ shared/packages/expectationManager/package.json | 6 +++--- shared/packages/worker/CHANGELOG.md | 8 ++++++++ shared/packages/worker/package.json | 4 ++-- shared/packages/workforce/CHANGELOG.md | 8 ++++++++ shared/packages/workforce/package.json | 4 ++-- tests/internal-tests/CHANGELOG.md | 8 ++++++++ tests/internal-tests/package.json | 14 +++++++------- 42 files changed, 227 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aa89319..f45de551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + +### Bug Fixes + +* CI signtool.exe /debug ([44f344a](https://github.com/nrkno/tv-automation-package-manager/commit/44f344ad7303512e79bfec5dca67bb3f12e6a76a)) + + + + + # [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) diff --git a/apps/_boilerplate/app/CHANGELOG.md b/apps/_boilerplate/app/CHANGELOG.md index 7dfb3002..0f99d8f5 100644 --- a/apps/_boilerplate/app/CHANGELOG.md +++ b/apps/_boilerplate/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @boilerplate/app + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @boilerplate/app diff --git a/apps/_boilerplate/app/package.json b/apps/_boilerplate/app/package.json index 35a9ab64..9485a758 100644 --- a/apps/_boilerplate/app/package.json +++ b/apps/_boilerplate/app/package.json @@ -1,6 +1,6 @@ { "name": "@boilerplate/app", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.6", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@boilerplate/generic": "1.50.0-alpha.0" + "@boilerplate/generic": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/_boilerplate/packages/generic/CHANGELOG.md b/apps/_boilerplate/packages/generic/CHANGELOG.md index 4dada833..7fe8ffd3 100644 --- a/apps/_boilerplate/packages/generic/CHANGELOG.md +++ b/apps/_boilerplate/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @boilerplate/generic + + + + + # [1.42.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0-alpha.5...v1.42.0) (2023-05-10) **Note:** Version bump only for package @boilerplate/generic diff --git a/apps/_boilerplate/packages/generic/package.json b/apps/_boilerplate/packages/generic/package.json index 32adc543..98ce4ed2 100644 --- a/apps/_boilerplate/packages/generic/package.json +++ b/apps/_boilerplate/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@boilerplate/generic", - "version": "1.50.0-alpha.0", + "version": "1.50.0-alpha.6", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/apps/appcontainer-node/app/CHANGELOG.md b/apps/appcontainer-node/app/CHANGELOG.md index 9e865fe7..78ed6ed6 100644 --- a/apps/appcontainer-node/app/CHANGELOG.md +++ b/apps/appcontainer-node/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @appcontainer-node/app + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) **Note:** Version bump only for package @appcontainer-node/app diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index d35b38f9..d52a9fce 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.4" + "@appcontainer-node/generic": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/appcontainer-node/packages/generic/CHANGELOG.md b/apps/appcontainer-node/packages/generic/CHANGELOG.md index 957d170b..cea37f29 100644 --- a/apps/appcontainer-node/packages/generic/CHANGELOG.md +++ b/apps/appcontainer-node/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @appcontainer-node/generic + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index 4486b442..a2b9ece0 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,8 +13,8 @@ "@sofie-automation/shared-lib": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.4", - "@sofie-package-manager/worker": "1.50.0-alpha.4", + "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/worker": "1.50.0-alpha.6", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/apps/http-server/app/CHANGELOG.md b/apps/http-server/app/CHANGELOG.md index 32a5ca03..e601bac3 100644 --- a/apps/http-server/app/CHANGELOG.md +++ b/apps/http-server/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @http-server/app + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index e69dba55..793f2d53 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.4" + "@http-server/generic": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/http-server/packages/generic/CHANGELOG.md b/apps/http-server/packages/generic/CHANGELOG.md index 0c2600d8..0640481e 100644 --- a/apps/http-server/packages/generic/CHANGELOG.md +++ b/apps/http-server/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @http-server/generic + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index 77618148..a04fe7aa 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/api": "1.50.0-alpha.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", diff --git a/apps/package-manager/app/CHANGELOG.md b/apps/package-manager/app/CHANGELOG.md index c02891a4..7f50976f 100644 --- a/apps/package-manager/app/CHANGELOG.md +++ b/apps/package-manager/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @package-manager/app + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) **Note:** Version bump only for package @package-manager/app diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index f644561c..375bd18f 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@package-manager/generic": "1.50.0-alpha.4" + "@package-manager/generic": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/package-manager/packages/generic/CHANGELOG.md b/apps/package-manager/packages/generic/CHANGELOG.md index 93474cf0..a1f0fb42 100644 --- a/apps/package-manager/packages/generic/CHANGELOG.md +++ b/apps/package-manager/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @package-manager/generic + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index 7f844f31..acab7e77 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -14,9 +14,9 @@ "@sofie-automation/shared-lib": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.4", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.4", - "@sofie-package-manager/worker": "1.50.0-alpha.4", + "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.6", + "@sofie-package-manager/worker": "1.50.0-alpha.6", "chokidar": "^3.5.1", "data-store": "^4.0.3", "deep-extend": "^0.6.0", diff --git a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md index bea28bfc..f8411fa7 100644 --- a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/app + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) **Note:** Version bump only for package @quantel-http-transformer-proxy/app diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index 76c82e81..b94b109f 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.4" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md index 8043bc35..99ebdc5a 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/generic + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) **Note:** Version bump only for package @quantel-http-transformer-proxy/generic diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index 21e130e1..f2450f67 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,7 +12,7 @@ "dependencies": { "@koa/cors": "^4.0.0", "@koa/multer": "3.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/api": "1.50.0-alpha.6", "got": "^11.8.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index adb1709d..2d1bd7d8 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @single-app/app + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index ea825d76..e2e99e60 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -14,13 +14,13 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.4", - "@http-server/generic": "1.50.0-alpha.4", - "@package-manager/generic": "1.50.0-alpha.4", - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.4", - "@sofie-package-manager/api": "1.50.0-alpha.4", - "@sofie-package-manager/worker": "1.50.0-alpha.4", - "@sofie-package-manager/workforce": "1.50.0-alpha.4", + "@appcontainer-node/generic": "1.50.0-alpha.6", + "@http-server/generic": "1.50.0-alpha.6", + "@package-manager/generic": "1.50.0-alpha.6", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.6", + "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/worker": "1.50.0-alpha.6", + "@sofie-package-manager/workforce": "1.50.0-alpha.6", "underscore": "^1.12.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", diff --git a/apps/worker/app/CHANGELOG.md b/apps/worker/app/CHANGELOG.md index 2d0d68de..dcfdc293 100644 --- a/apps/worker/app/CHANGELOG.md +++ b/apps/worker/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @worker/app + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) **Note:** Version bump only for package @worker/app diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 17f61c9b..0509dfb2 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "description": "Boilerplace", "private": true, "scripts": { @@ -15,7 +15,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@worker/generic": "1.50.0-alpha.4" + "@worker/generic": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/worker/packages/generic/CHANGELOG.md b/apps/worker/packages/generic/CHANGELOG.md index 0472b021..1899e230 100644 --- a/apps/worker/packages/generic/CHANGELOG.md +++ b/apps/worker/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @worker/generic + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) **Note:** Version bump only for package @worker/generic diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index 827b2ad3..29ad73c8 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.4", - "@sofie-package-manager/worker": "1.50.0-alpha.4" + "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/worker": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/app/CHANGELOG.md b/apps/workforce/app/CHANGELOG.md index f04a1bff..204fa717 100644 --- a/apps/workforce/app/CHANGELOG.md +++ b/apps/workforce/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @workforce/app + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) **Note:** Version bump only for package @workforce/app diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index 56df94cd..3a175c89 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/app", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@workforce/generic": "1.50.0-alpha.4" + "@workforce/generic": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/packages/generic/CHANGELOG.md b/apps/workforce/packages/generic/CHANGELOG.md index 062c9624..b446c411 100644 --- a/apps/workforce/packages/generic/CHANGELOG.md +++ b/apps/workforce/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @workforce/generic + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) **Note:** Version bump only for package @workforce/generic diff --git a/apps/workforce/packages/generic/package.json b/apps/workforce/packages/generic/package.json index 237cb8bc..9ba9b67a 100644 --- a/apps/workforce/packages/generic/package.json +++ b/apps/workforce/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/generic", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.4", - "@sofie-package-manager/workforce": "1.50.0-alpha.4" + "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/workforce": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/lerna.json b/lerna.json index 7d80d742..8d602b21 100644 --- a/lerna.json +++ b/lerna.json @@ -4,6 +4,6 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.5", + "version": "1.50.0-alpha.6", "npmClient": "yarn" } diff --git a/shared/packages/api/CHANGELOG.md b/shared/packages/api/CHANGELOG.md index 94c29b4c..4a386d22 100644 --- a/shared/packages/api/CHANGELOG.md +++ b/shared/packages/api/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @sofie-package-manager/api + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index 44b124ed..51cb2c23 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/api", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "main": "dist/index", "types": "dist/index", "files": [ diff --git a/shared/packages/expectationManager/CHANGELOG.md b/shared/packages/expectationManager/CHANGELOG.md index 63296c23..b57c3fee 100644 --- a/shared/packages/expectationManager/CHANGELOG.md +++ b/shared/packages/expectationManager/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @sofie-package-manager/expectation-manager + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index 72b64292..0e92b282 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -13,8 +13,8 @@ "node": ">=14.18.0" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.4", - "@sofie-package-manager/worker": "1.50.0-alpha.4", + "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/worker": "1.50.0-alpha.6", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index 4785f9f3..e6af2132 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @sofie-package-manager/worker + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index a21e3868..38569082 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -21,7 +21,7 @@ "@types/tmp": "~0.2.2" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.4", + "@sofie-package-manager/api": "1.50.0-alpha.6", "abort-controller": "^3.0.0", "atem-connection": "^3.2.0", "chokidar": "^3.5.1", diff --git a/shared/packages/workforce/CHANGELOG.md b/shared/packages/workforce/CHANGELOG.md index c94af995..3e150cdd 100644 --- a/shared/packages/workforce/CHANGELOG.md +++ b/shared/packages/workforce/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @sofie-package-manager/workforce + + + + + # [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.1...v1.50.0-alpha.4) (2023-09-04) diff --git a/shared/packages/workforce/package.json b/shared/packages/workforce/package.json index ff350575..9829a56e 100644 --- a/shared/packages/workforce/package.json +++ b/shared/packages/workforce/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/workforce", - "version": "1.50.0-alpha.4", + "version": "1.50.0-alpha.6", "main": "dist/index", "types": "dist/index", "files": [ @@ -13,7 +13,7 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.4" + "@sofie-package-manager/api": "1.50.0-alpha.6" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index 26bdb2e7..b62d2483 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + +**Note:** Version bump only for package @tests/internal-tests + + + + + # [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) **Note:** Version bump only for package @tests/internal-tests diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index 57833585..d91a2689 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.5", + "version": "1.50.0-alpha.6", "description": "Internal tests", "private": true, "scripts": { @@ -14,12 +14,12 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.4", - "@package-manager/generic": "1.50.0-alpha.4", - "@sofie-package-manager/api": "1.50.0-alpha.4", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.4", - "@sofie-package-manager/worker": "1.50.0-alpha.4", - "@sofie-package-manager/workforce": "1.50.0-alpha.4", + "@http-server/generic": "1.50.0-alpha.6", + "@package-manager/generic": "1.50.0-alpha.6", + "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.6", + "@sofie-package-manager/worker": "1.50.0-alpha.6", + "@sofie-package-manager/workforce": "1.50.0-alpha.6", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" }, From e6c7127d5c5bfedd322fa34ae2e544d8d245321d Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Thu, 7 Sep 2023 13:42:03 +0200 Subject: [PATCH 33/54] chore: improve logging --- .../evaluationRunner/evaluateExpectationStates/fulfilled.ts | 2 +- .../src/evaluationRunner/evaluateExpectationStates/ready.ts | 2 +- .../src/evaluationRunner/evaluateExpectationStates/waiting.ts | 2 +- .../worker/workers/windowsWorker/expectationHandlers/lib.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts index 0b1baf99..98da7944 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/fulfilled.ts @@ -71,7 +71,7 @@ export async function evaluateExpectationStateFulfilled({ // this.updateTrackedExp(trackedExp, WorkStatusState.FULFILLED, fulfilled.reason) } } catch (error) { - runner.logger.warn(`Error in FULFILLED: ${stringifyError(error)}`) + runner.logger.warn(`Error in FULFILLED: exp "${trackedExp.id}": ${stringifyError(error)}`) // Do nothing, hopefully some will be available at a later iteration // todo: Is this the right thing to do? tracker.trackedExpectationAPI.updateTrackedExpectationStatus(trackedExp, { diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/ready.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/ready.ts index bffcbb8d..2c37d647 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/ready.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/ready.ts @@ -70,7 +70,7 @@ export async function evaluateExpectationStateReady({ status: wipInfo.properties, }) } catch (error) { - runner.logger.warn(`Error in READY: ${stringifyError(error)}`) + runner.logger.warn(`Error in READY: exp "${trackedExp.id}": ${stringifyError(error)}`) // There was an error tracker.trackedExpectationAPI.updateTrackedExpectationStatus(trackedExp, { state: ExpectedPackageStatusAPI.WorkStatusState.NEW, diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts index e236376b..e0fc3d2d 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluateExpectationStates/waiting.ts @@ -84,7 +84,7 @@ export async function evaluateExpectationStateWaiting({ } } catch (error) { // There was an error, clearly it's not ready to start - runner.logger.warn(`Error in WAITING: ${stringifyError(error)}`) + runner.logger.warn(`Error in WAITING: exp "${trackedExp.id}": ${stringifyError(error)}`) tracker.trackedExpectationAPI.updateTrackedExpectationStatus(trackedExp, { state: ExpectedPackageStatusAPI.WorkStatusState.NEW, diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts index 99d3d6e2..44e77e6c 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts @@ -49,7 +49,7 @@ export function checkWorkerHasAccessToPackageContainersOnPackage( reason: { user: `There is an issue with the configuration of the Worker, it doesn't have access to any of the source PackageContainers`, tech: `Worker doesn't have access to any of the source packageContainers (${checks.sources - .map((o) => `${o.containerId} "${o.label}"`) + .map((o) => `"${o.containerId}": "${o.label}"`) .join(', ')})`, }, } @@ -74,7 +74,7 @@ export function checkWorkerHasAccessToPackageContainersOnPackage( reason: { user: `There is an issue with the configuration of the Worker, it doesn't have access to any of the target PackageContainers`, tech: `Worker doesn't have access to any of the target packageContainers (${checks.targets - .map((o) => o.containerId) + .map((o) => `"${o.containerId}": "${o.label}"`) .join(', ')})`, }, } From f25d5989db7012eea4e3f8822a467badd543f5fd Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Fri, 8 Sep 2023 11:14:46 +0200 Subject: [PATCH 34/54] v1.50.0-alpha.7 --- CHANGELOG.md | 11 +++++++++++ apps/_boilerplate/app/CHANGELOG.md | 8 ++++++++ apps/_boilerplate/app/package.json | 4 ++-- apps/_boilerplate/packages/generic/CHANGELOG.md | 8 ++++++++ apps/_boilerplate/packages/generic/package.json | 2 +- apps/appcontainer-node/app/CHANGELOG.md | 8 ++++++++ apps/appcontainer-node/app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 6 +++--- apps/http-server/app/CHANGELOG.md | 8 ++++++++ apps/http-server/app/package.json | 4 ++-- apps/http-server/packages/generic/CHANGELOG.md | 8 ++++++++ apps/http-server/packages/generic/package.json | 4 ++-- apps/package-manager/app/CHANGELOG.md | 8 ++++++++ apps/package-manager/app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 8 ++++---- .../app/CHANGELOG.md | 8 ++++++++ .../app/package.json | 4 ++-- .../packages/generic/CHANGELOG.md | 8 ++++++++ .../packages/generic/package.json | 4 ++-- apps/single-app/app/CHANGELOG.md | 8 ++++++++ apps/single-app/app/package.json | 16 ++++++++-------- apps/worker/app/CHANGELOG.md | 8 ++++++++ apps/worker/app/package.json | 4 ++-- apps/worker/packages/generic/CHANGELOG.md | 8 ++++++++ apps/worker/packages/generic/package.json | 6 +++--- apps/workforce/app/CHANGELOG.md | 8 ++++++++ apps/workforce/app/package.json | 4 ++-- apps/workforce/packages/generic/CHANGELOG.md | 8 ++++++++ apps/workforce/packages/generic/package.json | 6 +++--- lerna.json | 2 +- shared/packages/api/CHANGELOG.md | 8 ++++++++ shared/packages/api/package.json | 2 +- shared/packages/expectationManager/CHANGELOG.md | 8 ++++++++ shared/packages/expectationManager/package.json | 6 +++--- shared/packages/worker/CHANGELOG.md | 8 ++++++++ shared/packages/worker/package.json | 4 ++-- shared/packages/workforce/CHANGELOG.md | 8 ++++++++ shared/packages/workforce/package.json | 4 ++-- tests/internal-tests/CHANGELOG.md | 8 ++++++++ tests/internal-tests/package.json | 14 +++++++------- 42 files changed, 227 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f45de551..d16c2e25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + +### Reverts + +* chore: lerna useWorkspaces ([e1e5d27](https://github.com/nrkno/tv-automation-package-manager/commit/e1e5d2767c83e0230d6aab56705e021b67f38178)) + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) diff --git a/apps/_boilerplate/app/CHANGELOG.md b/apps/_boilerplate/app/CHANGELOG.md index 0f99d8f5..daeead75 100644 --- a/apps/_boilerplate/app/CHANGELOG.md +++ b/apps/_boilerplate/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @boilerplate/app + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @boilerplate/app diff --git a/apps/_boilerplate/app/package.json b/apps/_boilerplate/app/package.json index 9485a758..55c1fc0e 100644 --- a/apps/_boilerplate/app/package.json +++ b/apps/_boilerplate/app/package.json @@ -1,6 +1,6 @@ { "name": "@boilerplate/app", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@boilerplate/generic": "1.50.0-alpha.6" + "@boilerplate/generic": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/_boilerplate/packages/generic/CHANGELOG.md b/apps/_boilerplate/packages/generic/CHANGELOG.md index 7fe8ffd3..e58a298f 100644 --- a/apps/_boilerplate/packages/generic/CHANGELOG.md +++ b/apps/_boilerplate/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @boilerplate/generic + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @boilerplate/generic diff --git a/apps/_boilerplate/packages/generic/package.json b/apps/_boilerplate/packages/generic/package.json index 98ce4ed2..08d24402 100644 --- a/apps/_boilerplate/packages/generic/package.json +++ b/apps/_boilerplate/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@boilerplate/generic", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/apps/appcontainer-node/app/CHANGELOG.md b/apps/appcontainer-node/app/CHANGELOG.md index 78ed6ed6..7c99a45c 100644 --- a/apps/appcontainer-node/app/CHANGELOG.md +++ b/apps/appcontainer-node/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @appcontainer-node/app + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @appcontainer-node/app diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index d52a9fce..9df0946e 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.6" + "@appcontainer-node/generic": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/appcontainer-node/packages/generic/CHANGELOG.md b/apps/appcontainer-node/packages/generic/CHANGELOG.md index cea37f29..422170e4 100644 --- a/apps/appcontainer-node/packages/generic/CHANGELOG.md +++ b/apps/appcontainer-node/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @appcontainer-node/generic + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @appcontainer-node/generic diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index a2b9ece0..50952727 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,8 +13,8 @@ "@sofie-automation/shared-lib": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.6", - "@sofie-package-manager/worker": "1.50.0-alpha.6", + "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/worker": "1.50.0-alpha.7", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/apps/http-server/app/CHANGELOG.md b/apps/http-server/app/CHANGELOG.md index e601bac3..e2c689a8 100644 --- a/apps/http-server/app/CHANGELOG.md +++ b/apps/http-server/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @http-server/app + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @http-server/app diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index 793f2d53..4cb27498 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.6" + "@http-server/generic": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/http-server/packages/generic/CHANGELOG.md b/apps/http-server/packages/generic/CHANGELOG.md index 0640481e..04ff9800 100644 --- a/apps/http-server/packages/generic/CHANGELOG.md +++ b/apps/http-server/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @http-server/generic + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @http-server/generic diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index a04fe7aa..8377bca1 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/api": "1.50.0-alpha.7", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", diff --git a/apps/package-manager/app/CHANGELOG.md b/apps/package-manager/app/CHANGELOG.md index 7f50976f..9678d6cb 100644 --- a/apps/package-manager/app/CHANGELOG.md +++ b/apps/package-manager/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @package-manager/app + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @package-manager/app diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index 375bd18f..e126227b 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@package-manager/generic": "1.50.0-alpha.6" + "@package-manager/generic": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/package-manager/packages/generic/CHANGELOG.md b/apps/package-manager/packages/generic/CHANGELOG.md index a1f0fb42..21acc3c3 100644 --- a/apps/package-manager/packages/generic/CHANGELOG.md +++ b/apps/package-manager/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @package-manager/generic + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @package-manager/generic diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index acab7e77..0027e295 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -14,9 +14,9 @@ "@sofie-automation/shared-lib": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.6", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.6", - "@sofie-package-manager/worker": "1.50.0-alpha.6", + "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.7", + "@sofie-package-manager/worker": "1.50.0-alpha.7", "chokidar": "^3.5.1", "data-store": "^4.0.3", "deep-extend": "^0.6.0", diff --git a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md index f8411fa7..3d592ecd 100644 --- a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/app + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @quantel-http-transformer-proxy/app diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index b94b109f..f46883ef 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.6" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md index 99ebdc5a..42d207e1 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/generic + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @quantel-http-transformer-proxy/generic diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index f2450f67..7b8e4d9f 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,7 +12,7 @@ "dependencies": { "@koa/cors": "^4.0.0", "@koa/multer": "3.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/api": "1.50.0-alpha.7", "got": "^11.8.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index 2d1bd7d8..9eeeb6c8 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @single-app/app + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @single-app/app diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index e2e99e60..905513cb 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -14,13 +14,13 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.6", - "@http-server/generic": "1.50.0-alpha.6", - "@package-manager/generic": "1.50.0-alpha.6", - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.6", - "@sofie-package-manager/api": "1.50.0-alpha.6", - "@sofie-package-manager/worker": "1.50.0-alpha.6", - "@sofie-package-manager/workforce": "1.50.0-alpha.6", + "@appcontainer-node/generic": "1.50.0-alpha.7", + "@http-server/generic": "1.50.0-alpha.7", + "@package-manager/generic": "1.50.0-alpha.7", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.7", + "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/worker": "1.50.0-alpha.7", + "@sofie-package-manager/workforce": "1.50.0-alpha.7", "underscore": "^1.12.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", diff --git a/apps/worker/app/CHANGELOG.md b/apps/worker/app/CHANGELOG.md index dcfdc293..08d1647d 100644 --- a/apps/worker/app/CHANGELOG.md +++ b/apps/worker/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @worker/app + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @worker/app diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 0509dfb2..0c9c83bb 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "description": "Boilerplace", "private": true, "scripts": { @@ -15,7 +15,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@worker/generic": "1.50.0-alpha.6" + "@worker/generic": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/worker/packages/generic/CHANGELOG.md b/apps/worker/packages/generic/CHANGELOG.md index 1899e230..37ffae30 100644 --- a/apps/worker/packages/generic/CHANGELOG.md +++ b/apps/worker/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @worker/generic + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @worker/generic diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index 29ad73c8..933b67cf 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.6", - "@sofie-package-manager/worker": "1.50.0-alpha.6" + "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/worker": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/app/CHANGELOG.md b/apps/workforce/app/CHANGELOG.md index 204fa717..844f10a6 100644 --- a/apps/workforce/app/CHANGELOG.md +++ b/apps/workforce/app/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @workforce/app + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @workforce/app diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index 3a175c89..6a04ddf2 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/app", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@workforce/generic": "1.50.0-alpha.6" + "@workforce/generic": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/packages/generic/CHANGELOG.md b/apps/workforce/packages/generic/CHANGELOG.md index b446c411..971c69ea 100644 --- a/apps/workforce/packages/generic/CHANGELOG.md +++ b/apps/workforce/packages/generic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @workforce/generic + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @workforce/generic diff --git a/apps/workforce/packages/generic/package.json b/apps/workforce/packages/generic/package.json index 9ba9b67a..325c2e81 100644 --- a/apps/workforce/packages/generic/package.json +++ b/apps/workforce/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/generic", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.6", - "@sofie-package-manager/workforce": "1.50.0-alpha.6" + "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/workforce": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/lerna.json b/lerna.json index 8d602b21..6e12dc87 100644 --- a/lerna.json +++ b/lerna.json @@ -4,6 +4,6 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "npmClient": "yarn" } diff --git a/shared/packages/api/CHANGELOG.md b/shared/packages/api/CHANGELOG.md index 4a386d22..9be4fed8 100644 --- a/shared/packages/api/CHANGELOG.md +++ b/shared/packages/api/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @sofie-package-manager/api + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @sofie-package-manager/api diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index 51cb2c23..0bfb29a5 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/api", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "main": "dist/index", "types": "dist/index", "files": [ diff --git a/shared/packages/expectationManager/CHANGELOG.md b/shared/packages/expectationManager/CHANGELOG.md index b57c3fee..50e20adf 100644 --- a/shared/packages/expectationManager/CHANGELOG.md +++ b/shared/packages/expectationManager/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @sofie-package-manager/expectation-manager + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @sofie-package-manager/expectation-manager diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index 0e92b282..516dffe1 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -13,8 +13,8 @@ "node": ">=14.18.0" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.6", - "@sofie-package-manager/worker": "1.50.0-alpha.6", + "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/worker": "1.50.0-alpha.7", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index e6af2132..63081d98 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @sofie-package-manager/worker + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @sofie-package-manager/worker diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index 38569082..882184e2 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -21,7 +21,7 @@ "@types/tmp": "~0.2.2" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.6", + "@sofie-package-manager/api": "1.50.0-alpha.7", "abort-controller": "^3.0.0", "atem-connection": "^3.2.0", "chokidar": "^3.5.1", diff --git a/shared/packages/workforce/CHANGELOG.md b/shared/packages/workforce/CHANGELOG.md index 3e150cdd..3d113c8d 100644 --- a/shared/packages/workforce/CHANGELOG.md +++ b/shared/packages/workforce/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @sofie-package-manager/workforce + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @sofie-package-manager/workforce diff --git a/shared/packages/workforce/package.json b/shared/packages/workforce/package.json index 9829a56e..5d0ecff6 100644 --- a/shared/packages/workforce/package.json +++ b/shared/packages/workforce/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/workforce", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "main": "dist/index", "types": "dist/index", "files": [ @@ -13,7 +13,7 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.6" + "@sofie-package-manager/api": "1.50.0-alpha.7" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index b62d2483..e33f6bad 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + +**Note:** Version bump only for package @tests/internal-tests + + + + + # [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) **Note:** Version bump only for package @tests/internal-tests diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index d91a2689..5ba7c338 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.6", + "version": "1.50.0-alpha.7", "description": "Internal tests", "private": true, "scripts": { @@ -14,12 +14,12 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.6", - "@package-manager/generic": "1.50.0-alpha.6", - "@sofie-package-manager/api": "1.50.0-alpha.6", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.6", - "@sofie-package-manager/worker": "1.50.0-alpha.6", - "@sofie-package-manager/workforce": "1.50.0-alpha.6", + "@http-server/generic": "1.50.0-alpha.7", + "@package-manager/generic": "1.50.0-alpha.7", + "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.7", + "@sofie-package-manager/worker": "1.50.0-alpha.7", + "@sofie-package-manager/workforce": "1.50.0-alpha.7", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" }, From fa744ec84dd5767442194481d3b26f8d475edf71 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Tue, 19 Sep 2023 10:37:21 +0200 Subject: [PATCH 35/54] chore: refactor: replace calls to Date.now() -> startTime() --- shared/packages/api/src/lib.ts | 22 ++++++- .../src/evaluationRunner/evaluationRunner.ts | 61 +++++++++++-------- .../expectationHandlers/fileCopyProxy.ts | 5 +- .../expectationHandlers/jsonDataCopy.ts | 5 +- .../expectationHandlers/lib/file.ts | 9 +-- .../expectationHandlers/mediaFilePreview.ts | 5 +- .../expectationHandlers/mediaFileThumbnail.ts | 5 +- .../expectationHandlers/packageDeepScan.ts | 5 +- .../packageLoudnessScan.ts | 5 +- .../expectationHandlers/packageScan.ts | 5 +- .../expectationHandlers/quantelClipCopy.ts | 5 +- .../expectationHandlers/quantelClipPreview.ts | 5 +- .../quantelClipThumbnail.ts | 5 +- tests/internal-tests/src/__tests__/lib/lib.ts | 6 +- 14 files changed, 95 insertions(+), 53 deletions(-) diff --git a/shared/packages/api/src/lib.ts b/shared/packages/api/src/lib.ts index db50e241..47bccfa7 100644 --- a/shared/packages/api/src/lib.ts +++ b/shared/packages/api/src/lib.ts @@ -57,10 +57,10 @@ export async function promiseTimeout( timeoutTime: number, timeoutMessage?: string | ((timeoutDuration: number) => string) ): Promise { - const startTime = Date.now() + const timer = startTimer() return new Promise((resolve, reject) => { const timeout = setTimeout(() => { - const duration = Date.now() - startTime + const duration = timer.get() const msg = typeof timeoutMessage === 'function' ? timeoutMessage(duration) : timeoutMessage reject(msg || 'Timeout') }, timeoutTime) @@ -343,3 +343,21 @@ export function findValue(map: Map, cb: (key: K, value: V) => boolea if (found === undefined) return undefined return found[1] } +/** + * Usage: + * const timer = startTimer() + * // do stuff + * const duration = timer.get() + */ +export function startTimer(): { + /** Returns the duration since the timer started, in milliseconds */ + get: () => number +} { + const startTime = Date.now() + + return { + get: () => { + return Date.now() - startTime + }, + } +} diff --git a/shared/packages/expectationManager/src/evaluationRunner/evaluationRunner.ts b/shared/packages/expectationManager/src/evaluationRunner/evaluationRunner.ts index d6054c3b..04c1ed77 100644 --- a/shared/packages/expectationManager/src/evaluationRunner/evaluationRunner.ts +++ b/shared/packages/expectationManager/src/evaluationRunner/evaluationRunner.ts @@ -10,6 +10,7 @@ import { Reason, StatusCode, stringifyError, + startTimer, } from '@sofie-package-manager/api' import { PromisePool } from '@supercharge/promise-pool' import _ from 'underscore' @@ -38,29 +39,41 @@ export class EvaluationRunner { public async run(): Promise { this.logger.debug(Date.now() / 1000 + ' _evaluateExpectations ----------') - let startTime = Date.now() const times: { [key: string]: number } = {} - // First we're going to see if there is any new incoming data which needs to be pulled in. - if (this.tracker.receivedUpdates.expectationsHasBeenUpdated) { - await this.updateReceivedData_Expectations().promise + { + const timer = startTimer() + + // First we're going to see if there is any new incoming data which needs to be pulled in. + if (this.tracker.receivedUpdates.expectationsHasBeenUpdated) { + await this.updateReceivedData_Expectations().promise + } + times['timeUpdateReceivedExpectations'] = timer.get() } - times['timeUpdateReceivedExpectations'] = Date.now() - startTime - startTime = Date.now() - if (this.tracker.receivedUpdates.packageContainersHasBeenUpdated) { - await this._updateReceivedData_TrackedPackageContainers() + { + const timer = startTimer() + + if (this.tracker.receivedUpdates.packageContainersHasBeenUpdated) { + await this._updateReceivedData_TrackedPackageContainers() + } + times['timeUpdateReceivedPackageContainerExpectations'] = timer.get() } - times['timeUpdateReceivedPackageContainerExpectations'] = Date.now() - startTime - startTime = Date.now() - // Iterate through the PackageContainerExpectations: - await this._evaluateAllTrackedPackageContainers() - times['timeEvaluateAllTrackedPackageContainers'] = Date.now() - startTime - startTime = Date.now() + { + const timer = startTimer() - this.tracker.worksInProgress.checkWorksInProgress() - times['timeMonitorWorksInProgress'] = Date.now() - startTime + // Iterate through the PackageContainerExpectations: + await this._evaluateAllTrackedPackageContainers() + times['timeEvaluateAllTrackedPackageContainers'] = timer.get() + } + + { + const timer = startTimer() + + this.tracker.worksInProgress.checkWorksInProgress() + times['timeMonitorWorksInProgress'] = timer.get() + } // Iterate through all Expectations: const { runAgainASAP, times: evaluateTimes } = await this._evaluateAllExpectations() @@ -298,7 +311,7 @@ export class EvaluationRunner { // Step 1: Evaluate the Expectations which are in the states that can be handled in parallel: for (const handleState of handleStatesParallel) { - const startTime = Date.now() + const timer = startTimer() // Filter out the ones that are in the state we're about to handle: const trackedWithState = tracked.filter((trackedExp) => trackedExp.state === handleState) @@ -324,7 +337,7 @@ export class EvaluationRunner { postProcessSession(trackedExp) }) } - times[`time_${handleState}`] = Date.now() - startTime + times[`time_${handleState}`] = timer.get() } // Step 1.5: Reset the session: @@ -340,7 +353,7 @@ export class EvaluationRunner { }) this.logger.debug(`Worker count: ${this.manager.workerAgents.list().length}`) - const startTime = Date.now() + const timer = startTimer() // Step 2: Evaluate the expectations, now one by one: for (const trackedExp of tracked) { // Only handle the states that @@ -350,7 +363,7 @@ export class EvaluationRunner { postProcessSession(trackedExp) } - if (runAgainASAP && Date.now() - startTime > this.tracker.constants.ALLOW_SKIPPING_QUEUE_TIME) { + if (runAgainASAP && timer.get() > this.tracker.constants.ALLOW_SKIPPING_QUEUE_TIME) { // Skip the rest of the queue, so that we don't get stuck on evaluating low-prio expectations. this.logger.debug( `Skipping the rest of the queue (after ${this.tracker.constants.ALLOW_SKIPPING_QUEUE_TIME})` @@ -365,7 +378,7 @@ export class EvaluationRunner { break } } - times[`time_restTrackedExp`] = Date.now() - startTime + times[`time_restTrackedExp`] = timer.get() for (const id of removeIds) { this.tracker.trackedExpectations.remove(id) } @@ -495,7 +508,7 @@ export class EvaluationRunner { } private async _evaluateAllTrackedPackageContainers(): Promise { for (const trackedPackageContainer of this.tracker.trackedPackageContainers.list()) { - const startTime = Date.now() + const timer = startTimer() try { let badStatus = false @@ -708,9 +721,7 @@ export class EvaluationRunner { } ) } - this.logger.debug( - `trackedPackageContainer ${trackedPackageContainer.id}, took ${Date.now() - startTime} ms` - ) + this.logger.debug(`trackedPackageContainer ${trackedPackageContainer.id}, took ${timer.get()} ms`) } } } diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts index 3fc6c93e..e414f936 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts @@ -32,6 +32,7 @@ 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. @@ -90,7 +91,7 @@ export const FileCopyProxy: ExpectationWindowsHandler = { const sourceHandle = lookupSource.handle const targetHandle = lookupTarget.handle - const startTime = Date.now() + const timer = startTimer() if ( lookupSource.accessor.type === Accessor.AccessType.QUANTEL && @@ -142,7 +143,7 @@ export const FileCopyProxy: ExpectationWindowsHandler = { await targetHandle.finalizePackage(fileOperation) await targetHandle.updateMetadata(actualSourceUVersion) - const duration = Date.now() - startTime + const duration = timer.get() wip._reportComplete( actualSourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts index 986a9597..c42e0681 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts @@ -21,6 +21,7 @@ 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 @@ -111,7 +112,7 @@ export const JsonDataCopy: ExpectationWindowsHandler = { if (!isJsonDataCopy(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Copies the file from Source to Target - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupCopySources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -180,7 +181,7 @@ export const JsonDataCopy: ExpectationWindowsHandler = { await targetHandle.finalizePackage(fileOperation) // await targetHandle.updateMetadata() - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( actualSourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts index e869c233..32c128b6 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts @@ -24,6 +24,7 @@ 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, @@ -136,7 +137,7 @@ export async function doFileCopyExpectation( if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) if (!lookupTarget.ready) throw new Error(`Can't start working due to target: ${lookupTarget.reason.tech}`) - const startTime = Date.now() + const timer = startTimer() const actualSourceVersion = await lookupSource.handle.getPackageActualVersion() const actualSourceVersionHash = hashObj(actualSourceVersion) @@ -197,7 +198,7 @@ export async function doFileCopyExpectation( await targetHandle.finalizePackage(fileOperation) await targetHandle.updateMetadata(actualSourceUVersion) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( actualSourceVersionHash, { @@ -295,7 +296,7 @@ export async function doFileCopyExpectation( await targetHandle.finalizePackage(fileOperation) await targetHandle.updateMetadata(actualSourceUVersion) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( actualSourceVersionHash, { @@ -390,7 +391,7 @@ export async function doFileCopyExpectation( await targetHandle.finalizePackage(fileOperation) await targetHandle.updateMetadata(actualSourceUVersion) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( actualSourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index e4f39c0e..c93921ef 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -28,6 +28,7 @@ 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 @@ -142,7 +143,7 @@ export const MediaFilePreview: ExpectationWindowsHandler = { if (!isMediaFilePreview(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Copies the file from Source to Target - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupPreviewSources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -235,7 +236,7 @@ export const MediaFilePreview: ExpectationWindowsHandler = { await targetHandle.finalizePackage(fileOperation) await targetHandle.updateMetadata(metadata) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( actualSourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts index 56d758e8..bc784928 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts @@ -29,6 +29,7 @@ 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 @@ -139,7 +140,7 @@ export const MediaFileThumbnail: ExpectationWindowsHandler = { if (!isMediaFileThumbnail(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Create a thumbnail from the source media file - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupThumbnailSources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -236,7 +237,7 @@ export const MediaFileThumbnail: ExpectationWindowsHandler = { await targetHandle.finalizePackage(fileOperation) await targetHandle.updateMetadata(metadata) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( sourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts index 818fe4ed..8623b1e7 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts @@ -26,6 +26,7 @@ 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) @@ -126,7 +127,7 @@ export const PackageDeepScan: ExpectationWindowsHandler = { workOnExpectation: async (exp: Expectation.Any, worker: GenericWorker): Promise => { if (!isPackageDeepScan(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Scan the source media file and upload the results to Core - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupDeepScanSources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -215,7 +216,7 @@ export const PackageDeepScan: ExpectationWindowsHandler = { await targetHandle.finalizePackage(scanOperation) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( sourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts index 63662598..90e5962c 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts @@ -25,6 +25,7 @@ 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) @@ -125,7 +126,7 @@ export const PackageLoudnessScan: ExpectationWindowsHandler = { workOnExpectation: async (exp: Expectation.Any, worker: GenericWorker): Promise => { if (!isPackageLoudnessScan(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Scan the source media file and upload the results to Core - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupLoudnessSources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -190,7 +191,7 @@ export const PackageLoudnessScan: ExpectationWindowsHandler = { ) await targetHandle.finalizePackage(scanOperation) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( sourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts index 5c76ac81..b6fffc98 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts @@ -19,6 +19,7 @@ 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) @@ -118,7 +119,7 @@ export const PackageScan: ExpectationWindowsHandler = { workOnExpectation: async (exp: Expectation.Any, worker: GenericWorker): Promise => { if (!isPackageScan(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Scan the source package and upload the results to Core - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupScanSources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -174,7 +175,7 @@ export const PackageScan: ExpectationWindowsHandler = { await targetHandle.finalizePackage(scanOperation) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( sourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts index 0ca3f601..60888569 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts @@ -15,6 +15,7 @@ import { 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 { @@ -134,7 +135,7 @@ export const QuantelClipCopy: ExpectationWindowsHandler = { if (!isQuantelClipCopy(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Copies the clip from Source to Target - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupCopySources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -236,7 +237,7 @@ export const QuantelClipCopy: ExpectationWindowsHandler = { await targetHandle.finalizePackage(quantelOperation) await targetHandle.updateMetadata(actualSourceUVersion) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( actualSourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts index 821edc17..dd6221e0 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts @@ -28,6 +28,7 @@ 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( @@ -151,7 +152,7 @@ export const QuantelClipPreview: ExpectationWindowsHandler = { if (!isQuantelClipPreview(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Copies the file from Source to Target - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupPreviewSources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -222,7 +223,7 @@ export const QuantelClipPreview: ExpectationWindowsHandler = { await targetHandle.finalizePackage(quantelOperation) await targetHandle.updateMetadata(metadata) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( actualSourceVersionHash, { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts index 8efeacae..df9f1434 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts @@ -25,6 +25,7 @@ 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 @@ -148,7 +149,7 @@ export const QuantelThumbnail: ExpectationWindowsHandler = { if (!isQuantelClipThumbnail(exp)) throw new Error(`Wrong exp.type: "${exp.type}"`) // Fetch the Thumbnail from the Quantel HTTP-transformer and put it on the target - const startTime = Date.now() + const timer = startTimer() const lookupSource = await lookupThumbnailSources(worker, exp) if (!lookupSource.ready) throw new Error(`Can't start working due to source: ${lookupSource.reason.tech}`) @@ -222,7 +223,7 @@ export const QuantelThumbnail: ExpectationWindowsHandler = { await lookupTarget.handle.finalizePackage(quantelOperation) await lookupTarget.handle.updateMetadata(targetMetadata) - const duration = Date.now() - startTime + const duration = timer.get() workInProgress._reportComplete( targetMetadata.sourceVersionHash, { diff --git a/tests/internal-tests/src/__tests__/lib/lib.ts b/tests/internal-tests/src/__tests__/lib/lib.ts index 08dcfd7e..da347abc 100644 --- a/tests/internal-tests/src/__tests__/lib/lib.ts +++ b/tests/internal-tests/src/__tests__/lib/lib.ts @@ -1,3 +1,5 @@ +import { startTimer } from '@sofie-package-manager/api' + export function waitTime(ms: number): Promise { return new Promise((resolve) => setTimeout(resolve, ms)) } @@ -7,14 +9,14 @@ export function waitTime(ms: number): Promise { * Useful in unit-tests as a way to wait until a predicate is fulfilled. */ export async function waitUntil(expectFcn: () => void, maxWaitTime: number): Promise { - const startTime = Date.now() + const timer = startTimer() while (true) { await waitTime(100) try { expectFcn() return } catch (err) { - let waitedTime = Date.now() - startTime + let waitedTime = timer.get() if (waitedTime > maxWaitTime) { console.log(`waitUntil: waited for ${waitedTime} ms, giving up (maxWaitTime: ${maxWaitTime}).`) throw err From e2130686720da782a4b90cee9b56fd21c0a1c199 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Wed, 27 Sep 2023 15:51:26 +0200 Subject: [PATCH 36/54] chore: lint --- apps/package-manager/packages/generic/src/connector.ts | 2 +- shared/packages/api/src/websocketConnection.ts | 9 +-------- shared/packages/expectationManager/src/workerAgentApi.ts | 3 ++- shared/packages/worker/src/expectationManagerApi.ts | 5 ++++- .../windowsWorker/expectationHandlers/fileCopyProxy.ts | 2 +- .../windowsWorker/expectationHandlers/jsonDataCopy.ts | 2 +- .../windowsWorker/expectationHandlers/lib/file.ts | 2 +- .../expectationHandlers/mediaFilePreview.ts | 2 +- .../expectationHandlers/mediaFileThumbnail.ts | 2 +- .../windowsWorker/expectationHandlers/packageDeepScan.ts | 2 +- .../expectationHandlers/packageLoudnessScan.ts | 2 +- .../windowsWorker/expectationHandlers/packageScan.ts | 2 +- .../windowsWorker/expectationHandlers/quantelClipCopy.ts | 2 +- .../expectationHandlers/quantelClipPreview.ts | 2 +- .../expectationHandlers/quantelClipThumbnail.ts | 2 +- 15 files changed, 19 insertions(+), 22 deletions(-) diff --git a/apps/package-manager/packages/generic/src/connector.ts b/apps/package-manager/packages/generic/src/connector.ts index 51c8e930..934d5bce 100644 --- a/apps/package-manager/packages/generic/src/connector.ts +++ b/apps/package-manager/packages/generic/src/connector.ts @@ -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' @@ -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) diff --git a/shared/packages/api/src/websocketConnection.ts b/shared/packages/api/src/websocketConnection.ts index 56fa901f..460fceeb 100644 --- a/shared/packages/api/src/websocketConnection.ts +++ b/shared/packages/api/src/websocketConnection.ts @@ -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 = ( diff --git a/shared/packages/expectationManager/src/workerAgentApi.ts b/shared/packages/expectationManager/src/workerAgentApi.ts index 49c88d1f..93b4b599 100644 --- a/shared/packages/expectationManager/src/workerAgentApi.ts +++ b/shared/packages/expectationManager/src/workerAgentApi.ts @@ -1,5 +1,6 @@ -import { ExpectationManagerId, PackageContainerId } from '@sofie-package-manager/api' import { + ExpectationManagerId, + PackageContainerId, ExpectationManagerWorkerAgent, AdapterServer, Expectation, diff --git a/shared/packages/worker/src/expectationManagerApi.ts b/shared/packages/worker/src/expectationManagerApi.ts index 389a7538..86719a3e 100644 --- a/shared/packages/worker/src/expectationManagerApi.ts +++ b/shared/packages/worker/src/expectationManagerApi.ts @@ -1,5 +1,8 @@ -import { PackageContainerId, MonitorId, WorkerAgentId, WorkInProgressLocalId } from '@sofie-package-manager/api' import { + PackageContainerId, + MonitorId, + WorkerAgentId, + WorkInProgressLocalId, StatusCode, ExpectationManagerWorkerAgent, AdapterClient, diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts index e414f936..1eabe554 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/fileCopyProxy.ts @@ -15,6 +15,7 @@ import { Reason, stringifyError, AccessorId, + startTimer, } from '@sofie-package-manager/api' import { isFileShareAccessorHandle, @@ -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. diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts index c42e0681..97b74636 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/jsonDataCopy.ts @@ -11,6 +11,7 @@ import { ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, stringifyError, + startTimer, } from '@sofie-package-manager/api' import { isCorePackageInfoAccessorHandle, @@ -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 diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts index 32c128b6..0acc5231 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/file.ts @@ -8,6 +8,7 @@ import { Expectation, ReturnTypeIsExpectationFulfilled, ReturnTypeIsExpectationReadyToStartWorkingOn, + startTimer, } from '@sofie-package-manager/api' import { isATEMAccessorHandle, @@ -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, diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index c93921ef..f1196b85 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -12,6 +12,7 @@ import { ReturnTypeRemoveExpectation, assertNever, stringifyError, + startTimer, } from '@sofie-package-manager/api' import { isFileShareAccessorHandle, @@ -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 diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts index bc784928..b871cd38 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts @@ -9,6 +9,7 @@ import { ReturnTypeRemoveExpectation, assertNever, stringifyError, + startTimer, } from '@sofie-package-manager/api' import { getStandardCost } from '../lib/lib' import { GenericWorker } from '../../../worker' @@ -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 diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts index 33d6a1a6..e539d02e 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts @@ -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' @@ -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) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts index 2aa926be..1b8bc231 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts @@ -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' @@ -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) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts index b6fffc98..3675e744 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts @@ -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' @@ -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) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts index 60888569..db68a77a 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipCopy.ts @@ -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 { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts index dd6221e0..617c9c36 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipPreview.ts @@ -11,6 +11,7 @@ import { ReturnTypeIsExpectationReadyToStartWorkingOn, ReturnTypeRemoveExpectation, stringifyError, + startTimer, } from '@sofie-package-manager/api' import { isFileShareAccessorHandle, @@ -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( diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts index df9f1434..3c169e7e 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/quantelClipThumbnail.ts @@ -10,6 +10,7 @@ import { literal, Reason, stringifyError, + startTimer, } from '@sofie-package-manager/api' import { getStandardCost } from '../lib/lib' import { GenericWorker } from '../../../worker' @@ -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 From 62eefdb8151629ace3bdc50af0ddb55f072445b2 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Thu, 19 Oct 2023 10:32:41 +0200 Subject: [PATCH 37/54] chore: improve labels (There was a problem where the label got cut off badly in logs) --- shared/packages/api/src/__tests__/lib.spec.ts | 10 +++++++++- shared/packages/api/src/lib.ts | 14 ++++++++++++++ .../src/lib/trackedExpectation.ts | 9 ++------- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/shared/packages/api/src/__tests__/lib.spec.ts b/shared/packages/api/src/__tests__/lib.spec.ts index 00c944f8..edcad342 100644 --- a/shared/packages/api/src/__tests__/lib.spec.ts +++ b/shared/packages/api/src/__tests__/lib.spec.ts @@ -1,4 +1,4 @@ -import { deferGets, diff, promiseTimeout, stringifyError, waitTime } from '../lib' +import { deferGets, diff, promiseTimeout, stringMaxLength, stringifyError, waitTime } from '../lib' describe('lib', () => { test('diff', () => { @@ -218,5 +218,13 @@ describe('lib', () => { ]) expect(i).toBe(5) }) + test('stringMaxLength', () => { + expect(stringMaxLength('abc', 10)).toBe('abc') + expect(stringMaxLength('0123456789abcdefg', 17)).toBe('0123456789abcdefg') + expect(stringMaxLength('0123456789abcdefg', 15)).toBe('012345...bcdefg') + expect(stringMaxLength('0123456789abcdefg', 10)).toBe('012...defg') + expect(stringMaxLength('0123456789abcdefg', 9)).toBe('012...efg') + expect(stringMaxLength('0123456789abcdefg', 8)).toBe('01...efg') + }) }) export {} diff --git a/shared/packages/api/src/lib.ts b/shared/packages/api/src/lib.ts index 47bccfa7..f2cfa83d 100644 --- a/shared/packages/api/src/lib.ts +++ b/shared/packages/api/src/lib.ts @@ -361,3 +361,17 @@ export function startTimer(): { }, } } +/** + * If the string is longer than maxLength, it will be shortened to maxLength, with '...' in the middle + */ +export function stringMaxLength(str: string, maxLength: number): string { + str = `${str}` + if (str.length > maxLength) { + maxLength = maxLength - 3 // make space for '...' + const length0 = Math.floor(maxLength / 2) + const length1 = maxLength - length0 + + return str.slice(0, length0) + '...' + str.slice(-length1) + } + return str +} diff --git a/shared/packages/expectationManager/src/lib/trackedExpectation.ts b/shared/packages/expectationManager/src/lib/trackedExpectation.ts index 91b614c5..8ee2ce44 100644 --- a/shared/packages/expectationManager/src/lib/trackedExpectation.ts +++ b/shared/packages/expectationManager/src/lib/trackedExpectation.ts @@ -1,6 +1,6 @@ // eslint-disable-next-line node/no-extraneous-import import { ExpectedPackageStatusAPI } from '@sofie-automation/shared-lib/dist/package-manager/package' -import { Expectation, ExpectationId, Reason, WorkerAgentId } from '@sofie-package-manager/api' +import { Expectation, ExpectationId, Reason, WorkerAgentId, stringMaxLength } from '@sofie-package-manager/api' import { ExpectationStateHandlerSession } from '../lib/types' import { ExpectationTrackerConstants } from './constants' @@ -59,12 +59,7 @@ export interface TrackedExpectation { } export function expLabel(exp: TrackedExpectation): string { - let id = `${exp.id}` - if (id.length > 16) { - id = id.slice(0, 8) + '...' + id.slice(-8) - } - - return `${id} ${exp.exp.statusReport.label.slice(0, 50)}` + return stringMaxLength(exp.id, 16) + ' ' + stringMaxLength(exp.exp.statusReport.label, 80) } export function sortTrackedExpectations( From 9df2bc858c2b18cb7f905404b4b4f65b5f131e37 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Thu, 19 Oct 2023 10:53:27 +0200 Subject: [PATCH 38/54] chore: revert nanoid dep update (commonjs problem) --- apps/package-manager/packages/generic/package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index c7c6b32d..a1582e81 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -21,7 +21,7 @@ "data-store": "^4.0.3", "deep-extend": "^0.6.0", "fast-clone": "^1.5.13", - "nanoid": "^4.0.2", + "nanoid": "^3.3.4", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 79f45f4b..995f77fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7374,10 +7374,10 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" -nanoid@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-4.0.2.tgz#140b3c5003959adbebf521c170f282c5e7f9fb9e" - integrity sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw== +nanoid@^3.3.4: + version "3.3.6" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" + integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== nanomatch@^1.2.9: version "1.2.13" From f1084e84bb17968d39faf746ab841113137aeb14 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Thu, 19 Oct 2023 11:32:41 +0200 Subject: [PATCH 39/54] fix: add checks for FFPrope executable --- .../windowsWorker/expectationHandlers/mediaFilePreview.ts | 8 ++++++++ .../expectationHandlers/mediaFileThumbnail.ts | 8 ++++++++ .../windowsWorker/expectationHandlers/packageDeepScan.ts | 8 ++++++++ .../expectationHandlers/packageLoudnessScan.ts | 8 ++++++++ .../windowsWorker/expectationHandlers/packageScan.ts | 8 ++++++++ .../src/worker/workers/windowsWorker/windowsWorker.ts | 4 ++-- 6 files changed, 42 insertions(+), 2 deletions(-) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index d6fb537b..17ebdfe8 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -49,6 +49,14 @@ export const MediaFilePreview: ExpectationWindowsHandler = { tech: `Cannot access FFMpeg executable: ${windowsWorker.testFFMpeg}`, }, } + if (windowsWorker.testFFProbe) + return { + support: false, + reason: { + user: 'There is an issue with the Worker (FFProbe)', + tech: `Cannot access FFProbe executable: ${windowsWorker.testFFProbe}`, + }, + } return checkWorkerHasAccessToPackageContainersOnPackage(genericWorker, { sources: exp.startRequirement.sources, targets: exp.endRequirement.targets, diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts index 2a196e80..27796663 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts @@ -50,6 +50,14 @@ export const MediaFileThumbnail: ExpectationWindowsHandler = { tech: `Cannot access FFMpeg executable: ${windowsWorker.testFFMpeg}`, }, } + if (windowsWorker.testFFProbe) + return { + support: false, + reason: { + user: 'There is an issue with the Worker (FFProbe)', + tech: `Cannot access FFProbe executable: ${windowsWorker.testFFProbe}`, + }, + } return checkWorkerHasAccessToPackageContainersOnPackage(genericWorker, { sources: exp.startRequirement.sources, }) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts index 86968bc6..31a79098 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageDeepScan.ts @@ -46,6 +46,14 @@ export const PackageDeepScan: ExpectationWindowsHandler = { tech: `Cannot access FFMpeg executable: ${windowsWorker.testFFMpeg}`, }, } + if (windowsWorker.testFFProbe) + return { + support: false, + reason: { + user: 'There is an issue with the Worker (FFProbe)', + tech: `Cannot access FFProbe executable: ${windowsWorker.testFFProbe}`, + }, + } return checkWorkerHasAccessToPackageContainersOnPackage(genericWorker, { sources: exp.startRequirement.sources, }) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts index 1b8bc231..49538516 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageLoudnessScan.ts @@ -45,6 +45,14 @@ export const PackageLoudnessScan: ExpectationWindowsHandler = { tech: `Cannot access FFMpeg executable: ${windowsWorker.testFFMpeg}`, }, } + if (windowsWorker.testFFProbe) + return { + support: false, + reason: { + user: 'There is an issue with the Worker (FFProbe)', + tech: `Cannot access FFProbe executable: ${windowsWorker.testFFProbe}`, + }, + } return checkWorkerHasAccessToPackageContainersOnPackage(genericWorker, { sources: exp.startRequirement.sources, }) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts index 3675e744..da75051e 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/packageScan.ts @@ -38,6 +38,14 @@ export const PackageScan: ExpectationWindowsHandler = { tech: `Cannot access FFMpeg executable: ${windowsWorker.testFFMpeg}`, }, } + if (windowsWorker.testFFProbe) + return { + support: false, + reason: { + user: 'There is an issue with the Worker (FFProbe)', + tech: `Cannot access FFProbe executable: ${windowsWorker.testFFProbe}`, + }, + } return checkWorkerHasAccessToPackageContainersOnPackage(genericWorker, { sources: exp.startRequirement.sources, }) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts b/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts index 5c8669ae..fdf4ff16 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts @@ -36,9 +36,9 @@ import { FileVerify } from './expectationHandlers/fileVerify' export class WindowsWorker extends GenericWorker { static readonly type = 'windowsWorker' - /** null = all is well */ + /** Contains the result of testing the FFMpeg executable. null = all is well, otherwise contains error message */ public testFFMpeg: null | string = 'Not initialized' - /** null = all is well */ + /** Contains the result of testing the FFProbe executable. null = all is well, otherwise contains error message */ public testFFProbe: null | string = 'Not initialized' private monitor: NodeJS.Timer | undefined From 029b6fb048225ba5ad24501ea05c0703647a6543 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Wed, 14 Jun 2023 12:51:25 +0100 Subject: [PATCH 40/54] wip: linux support --- .../src/worker/accessorHandlers/accessor.ts | 1 + .../windowsWorker/expectationHandlers/lib.ts | 70 +++++++++++++------ .../expectationHandlers/lib/scan.ts | 26 +++---- .../workers/windowsWorker/windowsWorker.ts | 3 - 4 files changed, 62 insertions(+), 38 deletions(-) diff --git a/shared/packages/worker/src/worker/accessorHandlers/accessor.ts b/shared/packages/worker/src/worker/accessorHandlers/accessor.ts index 447606f1..9460883d 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/accessor.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/accessor.ts @@ -35,6 +35,7 @@ export function getAccessorStaticHandle(accessor: AccessorOnPackage.Any) { } else if (accessor.type === Accessor.AccessType.HTTP_PROXY) { return HTTPProxyAccessorHandle } else if (accessor.type === Accessor.AccessType.FILE_SHARE) { + if (process.platform !== 'win32') throw new Error(`FileShareAccessor: not supported on ${process.platform}`) return FileShareAccessorHandle } else if (accessor.type === Accessor.AccessType.QUANTEL) { return QuantelAccessorHandle diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts index 9c424493..36dd628c 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts @@ -367,18 +367,28 @@ export function previewFFMpegArguments(input: string, seekableSource: boolean, m return [ '-hide_banner', '-y', // Overwrite output files without asking. - seekableSource ? undefined : '-seekable 0', - `-i "${input}"`, // Input file path - '-f webm', // format: webm + seekableSource ? undefined : '-seekable', + seekableSource ? undefined : '0', + `-i`, + input, // Input file path + '-f', + 'webm', // format: webm '-an', // blocks all audio streams - '-c:v libvpx-vp9', // encoder for video (use VP9) - `-b:v ${metadata.version.bitrate || '40k'}`, - '-auto-alt-ref 1', - `-vf scale=${metadata.version.width || 320}:${metadata.version.height || -1}`, // Scale to resolution - - '-threads 1', // Number of threads to use - '-cpu-used 5', // Sacrifice quality for speed, used in combination with -deadline realtime - '-deadline realtime', // Encoder speed/quality and cpu use (best, good, realtime) + '-c:v', + 'libvpx-vp9', // encoder for video (use VP9) + `-b:v`, + `${metadata.version.bitrate || '40k'}`, + '-auto-alt-ref', + '1', + `-vf`, + `scale=${metadata.version.width || 320}:${metadata.version.height || -1}`, // Scale to resolution + + '-threads', + '1', // Number of threads to use + '-cpu-used', + '5', // Sacrifice quality for speed, used in combination with -deadline realtime + '-deadline', + 'realtime', // Encoder speed/quality and cpu use (best, good, realtime) ].filter(Boolean) as string[] // remove undefined values } @@ -397,15 +407,26 @@ export function thumbnailFFMpegArguments( ): string[] { return [ '-hide_banner', - hasVideoStream && seekTimeCode ? `-ss ${seekTimeCode}` : undefined, - `-i "${input}"`, - `-f image2`, - '-frames:v 1', - hasVideoStream - ? `-vf ${!seekTimeCode ? 'thumbnail,' : ''}scale=${metadata.version.width}:${metadata.version.height}` // Creates a thumbnail of the video. - : '-filter_complex "showwavespic=s=640x240:split_channels=1:colors=white"', // Creates an image of the audio waveform. - '-threads 1', - ].filter(Boolean) as string[] // remove undefined values + ...(hasVideoStream && seekTimeCode ? [`-ss`, `${seekTimeCode}`] : []), + `-i`, + input, + `-f`, + `image2`, + '-frames:v', + '1', + ...(hasVideoStream + ? [ + `-vf`, + `${!seekTimeCode ? 'thumbnail,' : ''}scale=${metadata.version.width}:${metadata.version.height}`, // Creates a thumbnail of the video. + ] + : [ + '-filter_complex', + 'showwavespic=s=640x240:split_channels=1:colors=white', // Creates an image of the audio waveform. + ]), + + '-threads', + '1', + ] } /** Returns arguments for FFMpeg to generate a proxy video file */ @@ -418,10 +439,13 @@ export function proxyFFMpegArguments( '-hide_banner', '-y', // Overwrite output files without asking. seekableSource ? undefined : '-seekable 0', - `-i "${input}"`, // Input file path + `-i`, + input, // Input file path - '-c copy', // Stream copy, no transcoding - '-threads 1', // Number of threads to use + '-c', + 'copy', // Stream copy, no transcoding + '-threads', + '1', // Number of threads to use ] // Check target to see if we should tell ffmpeg which format to use: diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts index 6f91c64f..6b0fabe7 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts @@ -68,7 +68,7 @@ export function scanWithFFProbe( } const file = process.platform === 'win32' ? 'ffprobe.exe' : 'ffprobe' // Use FFProbe to scan the file: - const args = ['-hide_banner', `-i "${inputPath}"`, '-show_streams', '-show_format', '-print_format', 'json'] + const args = ['-hide_banner', `-i`, inputPath, '-show_streams', '-show_format', '-print_format', 'json'] let ffProbeProcess: ChildProcess | undefined = undefined onCancel(() => { ffProbeProcess?.stdin?.write('q') // send "q" to quit, because .kill() doesn't quite do it. @@ -164,8 +164,10 @@ export function scanFieldOrder( const file = getFFMpegExecutable() const args = [ '-hide_banner', - '-filter:v idet', - `-frames:v ${targetVersion.fieldOrderScanDuration || 200}`, + '-filter:v', + 'idet', + `-frames:v`, + `${targetVersion.fieldOrderScanDuration || 200}`, '-an', '-f', 'rawvideo', @@ -263,7 +265,7 @@ export function scanMoreInfo( if (filterString) { filterString += ',' } - filterString += `"select='gt(scene,${targetVersion.sceneThreshold || 0.4})',showinfo"` + filterString += `select='gt(scene,${targetVersion.sceneThreshold || 0.4})',showinfo` } const args = ['-hide_banner'] @@ -272,8 +274,8 @@ export function scanMoreInfo( args.push('-filter:v', filterString) args.push('-an') - args.push('-f null') - args.push('-threads 1') + args.push('-f', 'null') + args.push('-threads', '1') args.push('-') let ffMpegProcess: ChildProcess | undefined = undefined @@ -660,21 +662,21 @@ async function getFFMpegInputArgsFromAccessorHandle( ): Promise { const args: string[] = [] if (isLocalFolderAccessorHandle(sourceHandle)) { - args.push(`-i "${sourceHandle.fullPath}"`) + args.push(`-i`, sourceHandle.fullPath) } else if (isFileShareAccessorHandle(sourceHandle)) { await sourceHandle.prepareFileAccess() - args.push(`-i "${sourceHandle.fullPath}"`) + args.push(`-i`, sourceHandle.fullPath) } else if (isHTTPAccessorHandle(sourceHandle)) { - args.push(`-i "${sourceHandle.fullUrl}"`) + args.push(`-i`, sourceHandle.fullUrl) } else if (isHTTPProxyAccessorHandle(sourceHandle)) { - args.push(`-i "${sourceHandle.fullUrl}"`) + args.push(`-i`, sourceHandle.fullUrl) } else if (isQuantelClipAccessorHandle(sourceHandle)) { const httpStreamURL = await sourceHandle.getTransformerStreamURL() if (!httpStreamURL.success) throw new Error(`Source Clip not found (${httpStreamURL.reason.tech})`) - args.push('-seekable 0') - args.push(`-i "${httpStreamURL.fullURL}"`) + args.push('-seekable', '0') + args.push(`-i`, httpStreamURL.fullURL) } else { assertNever(sourceHandle) } diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts b/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts index fdf4ff16..41dc92ba 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/windowsWorker.ts @@ -49,9 +49,6 @@ export class WindowsWorker extends GenericWorker { sendMessageToManager: ExpectationManagerWorkerAgent.MessageFromWorker ) { super(logger.category('WindowsWorker'), agentAPI, sendMessageToManager, WindowsWorker.type) - if (process.platform !== 'win32' && process.env.JEST_WORKER_ID === undefined) { - throw new Error('The Worker is a Windows-only application') - } this.logger.debug(`Worker started`) } async doYouSupportExpectation(exp: Expectation.Any): Promise { From dca37639a2a12ce93c029acc5fdebba88e2c2187 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Wed, 10 Jan 2024 16:39:49 +0000 Subject: [PATCH 41/54] fix: bad merge --- .../packages/generic/src/appContainer.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/appcontainer-node/packages/generic/src/appContainer.ts b/apps/appcontainer-node/packages/generic/src/appContainer.ts index 85be1981..86120e2d 100644 --- a/apps/appcontainer-node/packages/generic/src/appContainer.ts +++ b/apps/appcontainer-node/packages/generic/src/appContainer.ts @@ -194,7 +194,7 @@ export class AppContainer { await this.setupAvailableApps() // Note: if we later change this.setupAvailableApps to run on an interval // don't throw here: - if (Object.keys(this.availableApps).length === 0) { + if (this.availableApps.size === 0) { throw new Error(`AppContainer found no apps upon init. (Check if there are any Worker executables?)`) } @@ -385,11 +385,10 @@ export class AppContainer { } } - const availableAppNames = Array.from(this.availableApps.keys()) - if (availableAppNames.length === 0) { + if (this.availableApps.size === 0) { this.logger.error('No apps available') } else { - this.logger.debug(`Available apps: ${availableAppNames.join(', ')}`) + this.logger.debug(`Available apps: ${Array.from(this.availableApps.keys()).join(', ')}`) } for (const [appType, availableApp] of this.availableApps.entries()) { @@ -452,11 +451,10 @@ export class AppContainer { } } - const availableAppNames = Array.from(this.availableApps.keys()) - if (availableAppNames.length === 0) { + if (this.availableApps.size === 0) { this.logger.error('No apps available') } else { - this.logger.debug(`Available apps: ${availableAppNames.join(', ')}`) + this.logger.debug(`Available apps: ${Array.from(this.availableApps.keys()).join(', ')}`) } for (const [appType, availableApp] of this.availableApps.entries()) { From 7e3f462265412ad1602f0f6d81aa2c8b1fb9b0d0 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Wed, 10 Jan 2024 18:08:55 +0000 Subject: [PATCH 42/54] fix: ignoring expectedPackages from core --- apps/package-manager/packages/generic/src/packageManager.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/package-manager/packages/generic/src/packageManager.ts b/apps/package-manager/packages/generic/src/packageManager.ts index 10a412f0..5a2aa1bf 100644 --- a/apps/package-manager/packages/generic/src/packageManager.ts +++ b/apps/package-manager/packages/generic/src/packageManager.ts @@ -285,6 +285,12 @@ export class PackageManagerHandler { for (const expectedPackagesObj of expectedPackagesObjs) { expectedPackagesCore.push(expectedPackagesObj as any as ExpectedPackageWrap) } + if (expectedPackagesCore.length > 0) { + expectedPackageSources.push({ + sourceName: 'core', + expectedPackages: expectedPackagesCore, + }) + } } // Add from Monitors: From 47ae56cff3d27bef0d9cb908fadfaef9319ff200 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Thu, 11 Jan 2024 14:04:55 +0100 Subject: [PATCH 43/54] v1.50.0-alpha.8 --- CHANGELOG.md | 92 +++++++++++++++++++ apps/appcontainer-node/app/CHANGELOG.md | 32 +++++++ apps/appcontainer-node/app/package.json | 4 +- .../packages/generic/CHANGELOG.md | 40 ++++++++ .../packages/generic/package.json | 6 +- apps/http-server/app/CHANGELOG.md | 36 ++++++++ apps/http-server/app/package.json | 4 +- .../http-server/packages/generic/CHANGELOG.md | 36 ++++++++ .../http-server/packages/generic/package.json | 4 +- apps/package-manager/app/CHANGELOG.md | 32 +++++++ apps/package-manager/app/package.json | 4 +- .../packages/generic/CHANGELOG.md | 56 +++++++++++ .../packages/generic/package.json | 8 +- .../app/CHANGELOG.md | 36 ++++++++ .../app/package.json | 4 +- .../packages/generic/CHANGELOG.md | 36 ++++++++ .../packages/generic/package.json | 4 +- apps/single-app/app/CHANGELOG.md | 39 ++++++++ apps/single-app/app/package.json | 16 ++-- apps/worker/app/CHANGELOG.md | 32 +++++++ apps/worker/app/package.json | 4 +- apps/worker/packages/generic/CHANGELOG.md | 32 +++++++ apps/worker/packages/generic/package.json | 6 +- apps/workforce/app/CHANGELOG.md | 32 +++++++ apps/workforce/app/package.json | 4 +- apps/workforce/packages/generic/CHANGELOG.md | 32 +++++++ apps/workforce/packages/generic/package.json | 6 +- lerna.json | 2 +- shared/packages/api/CHANGELOG.md | 46 ++++++++++ shared/packages/api/package.json | 2 +- .../packages/expectationManager/CHANGELOG.md | 40 ++++++++ .../packages/expectationManager/package.json | 6 +- shared/packages/worker/CHANGELOG.md | 56 +++++++++++ shared/packages/worker/package.json | 4 +- shared/packages/workforce/CHANGELOG.md | 35 +++++++ shared/packages/workforce/package.json | 4 +- tests/internal-tests/CHANGELOG.md | 43 +++++++++ tests/internal-tests/package.json | 14 +-- 38 files changed, 836 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e33c1977..5a3573e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,98 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* add checks for FFPrope executable ([f1084e8](https://github.com/nrkno/tv-automation-package-manager/commit/f1084e84bb17968d39faf746ab841113137aeb14)) +* bad merge ([dca3763](https://github.com/nrkno/tv-automation-package-manager/commit/dca37639a2a12ce93c029acc5fdebba88e2c2187)) +* ignoring expectedPackages from core ([7e3f462](https://github.com/nrkno/tv-automation-package-manager/commit/7e3f462265412ad1602f0f6d81aa2c8b1fb9b0d0)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + +### Bug Fixes + +* CI signtool.exe /debug ([44f344a](https://github.com/nrkno/tv-automation-package-manager/commit/44f344ad7303512e79bfec5dca67bb3f12e6a76a)) + + + +# [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) + + +### Reverts + +* chore: lerna useWorkspaces ([c2f6432](https://github.com/nrkno/tv-automation-package-manager/commit/c2f6432eeae6c366a80ed7a412750a97374a321f)) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't error when trying to generate a preview for an audio-only file ([f7a9dc5](https://github.com/nrkno/tv-automation-package-manager/commit/f7a9dc5255049271b5e4b1c58bc901300867708b)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + +### Features + +* generate audio waveform images for audio-only files (and don't try to generate previews for them) ([10e5747](https://github.com/nrkno/tv-automation-package-manager/commit/10e574757bcdd86a2a5aa9dade2ed34b5d0984f9)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Bug Fixes + +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) + + +### Features + +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) ### Reverts diff --git a/apps/appcontainer-node/app/CHANGELOG.md b/apps/appcontainer-node/app/CHANGELOG.md index 2e782b83..396ab93e 100644 --- a/apps/appcontainer-node/app/CHANGELOG.md +++ b/apps/appcontainer-node/app/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @appcontainer-node/app + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @appcontainer-node/app diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index 9df0946e..853393b1 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.7" + "@appcontainer-node/generic": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/appcontainer-node/packages/generic/CHANGELOG.md b/apps/appcontainer-node/packages/generic/CHANGELOG.md index f76d0f57..38b78e03 100644 --- a/apps/appcontainer-node/packages/generic/CHANGELOG.md +++ b/apps/appcontainer-node/packages/generic/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* bad merge ([dca3763](https://github.com/nrkno/tv-automation-package-manager/commit/dca37639a2a12ce93c029acc5fdebba88e2c2187)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @appcontainer-node/generic diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index 50952727..33816076 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,8 +13,8 @@ "@sofie-automation/shared-lib": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.7", - "@sofie-package-manager/worker": "1.50.0-alpha.7", + "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.8", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/apps/http-server/app/CHANGELOG.md b/apps/http-server/app/CHANGELOG.md index 80037285..1334f33f 100644 --- a/apps/http-server/app/CHANGELOG.md +++ b/apps/http-server/app/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @http-server/app + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index 4cb27498..e43636b8 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.7" + "@http-server/generic": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/http-server/packages/generic/CHANGELOG.md b/apps/http-server/packages/generic/CHANGELOG.md index 32375cb0..e8d13eab 100644 --- a/apps/http-server/packages/generic/CHANGELOG.md +++ b/apps/http-server/packages/generic/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @http-server/generic + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index 10756210..ff4434c3 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/api": "1.50.0-alpha.8", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", diff --git a/apps/package-manager/app/CHANGELOG.md b/apps/package-manager/app/CHANGELOG.md index 7b3bed59..5d48cbe3 100644 --- a/apps/package-manager/app/CHANGELOG.md +++ b/apps/package-manager/app/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @package-manager/app + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @package-manager/app diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index e126227b..b3ae327f 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@package-manager/generic": "1.50.0-alpha.7" + "@package-manager/generic": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/package-manager/packages/generic/CHANGELOG.md b/apps/package-manager/packages/generic/CHANGELOG.md index 5a7f5de4..3a32486b 100644 --- a/apps/package-manager/packages/generic/CHANGELOG.md +++ b/apps/package-manager/packages/generic/CHANGELOG.md @@ -3,6 +3,62 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* ignoring expectedPackages from core ([7e3f462](https://github.com/nrkno/tv-automation-package-manager/commit/7e3f462265412ad1602f0f6d81aa2c8b1fb9b0d0)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Bug Fixes + +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @package-manager/generic diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index a1582e81..7ac5ecd8 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -15,9 +15,9 @@ }, "dependencies": { "@parcel/watcher": "^2.3.0", - "@sofie-package-manager/api": "1.50.0-alpha.7", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.7", - "@sofie-package-manager/worker": "1.50.0-alpha.7", + "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.8", "data-store": "^4.0.3", "deep-extend": "^0.6.0", "fast-clone": "^1.5.13", diff --git a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md index 02d08317..d3a278a9 100644 --- a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/app + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index f46883ef..8ae4ea74 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.7" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md index f4e04391..afbfaa68 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/generic + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index ed756349..5d37b7ab 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -12,7 +12,7 @@ "dependencies": { "@koa/cors": "^4.0.0", "@koa/multer": "3.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/api": "1.50.0-alpha.8", "got": "^11.8.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index e7fea908..da50ac31 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,45 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @single-app/app diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index 905513cb..323a9733 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -14,13 +14,13 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.7", - "@http-server/generic": "1.50.0-alpha.7", - "@package-manager/generic": "1.50.0-alpha.7", - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.7", - "@sofie-package-manager/api": "1.50.0-alpha.7", - "@sofie-package-manager/worker": "1.50.0-alpha.7", - "@sofie-package-manager/workforce": "1.50.0-alpha.7", + "@appcontainer-node/generic": "1.50.0-alpha.8", + "@http-server/generic": "1.50.0-alpha.8", + "@package-manager/generic": "1.50.0-alpha.8", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.8", + "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.8", + "@sofie-package-manager/workforce": "1.50.0-alpha.8", "underscore": "^1.12.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", diff --git a/apps/worker/app/CHANGELOG.md b/apps/worker/app/CHANGELOG.md index 4022f1ad..275262ae 100644 --- a/apps/worker/app/CHANGELOG.md +++ b/apps/worker/app/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @worker/app + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @worker/app diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 0c9c83bb..62b0563c 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "description": "Boilerplace", "private": true, "scripts": { @@ -15,7 +15,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@worker/generic": "1.50.0-alpha.7" + "@worker/generic": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/worker/packages/generic/CHANGELOG.md b/apps/worker/packages/generic/CHANGELOG.md index 6489f9c0..917b5d3b 100644 --- a/apps/worker/packages/generic/CHANGELOG.md +++ b/apps/worker/packages/generic/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @worker/generic + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @worker/generic diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index 933b67cf..d3706266 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.7", - "@sofie-package-manager/worker": "1.50.0-alpha.7" + "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/app/CHANGELOG.md b/apps/workforce/app/CHANGELOG.md index dc659dfb..58bd0558 100644 --- a/apps/workforce/app/CHANGELOG.md +++ b/apps/workforce/app/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @workforce/app + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @workforce/app diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index 6a04ddf2..37026e23 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/app", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "description": "Boilerplace", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@workforce/generic": "1.50.0-alpha.7" + "@workforce/generic": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/packages/generic/CHANGELOG.md b/apps/workforce/packages/generic/CHANGELOG.md index 00e4d9e6..c67d381b 100644 --- a/apps/workforce/packages/generic/CHANGELOG.md +++ b/apps/workforce/packages/generic/CHANGELOG.md @@ -3,6 +3,38 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @workforce/generic + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @workforce/generic diff --git a/apps/workforce/packages/generic/package.json b/apps/workforce/packages/generic/package.json index 325c2e81..fe7fef16 100644 --- a/apps/workforce/packages/generic/package.json +++ b/apps/workforce/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/generic", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.7", - "@sofie-package-manager/workforce": "1.50.0-alpha.7" + "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/workforce": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/lerna.json b/lerna.json index 6e12dc87..f77758d5 100644 --- a/lerna.json +++ b/lerna.json @@ -4,6 +4,6 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "npmClient": "yarn" } diff --git a/shared/packages/api/CHANGELOG.md b/shared/packages/api/CHANGELOG.md index 0a767385..0e16514d 100644 --- a/shared/packages/api/CHANGELOG.md +++ b/shared/packages/api/CHANGELOG.md @@ -3,6 +3,52 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @sofie-package-manager/api diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index 0bfb29a5..89fb086d 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/api", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "main": "dist/index", "types": "dist/index", "files": [ diff --git a/shared/packages/expectationManager/CHANGELOG.md b/shared/packages/expectationManager/CHANGELOG.md index 64371dff..8b007618 100644 --- a/shared/packages/expectationManager/CHANGELOG.md +++ b/shared/packages/expectationManager/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @sofie-package-manager/expectation-manager diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index 516dffe1..460a3c42 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -13,8 +13,8 @@ "node": ">=14.18.0" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.7", - "@sofie-package-manager/worker": "1.50.0-alpha.7", + "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.8", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index 74986fd5..d5d02fa0 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -3,6 +3,62 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* add checks for FFPrope executable ([f1084e8](https://github.com/nrkno/tv-automation-package-manager/commit/f1084e84bb17968d39faf746ab841113137aeb14)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't error when trying to generate a preview for an audio-only file ([f7a9dc5](https://github.com/nrkno/tv-automation-package-manager/commit/f7a9dc5255049271b5e4b1c58bc901300867708b)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + +### Features + +* generate audio waveform images for audio-only files (and don't try to generate previews for them) ([10e5747](https://github.com/nrkno/tv-automation-package-manager/commit/10e574757bcdd86a2a5aa9dade2ed34b5d0984f9)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Features + +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index 02c0d553..e542f2fc 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -22,7 +22,7 @@ }, "dependencies": { "@parcel/watcher": "^2.3.0", - "@sofie-package-manager/api": "1.50.0-alpha.7", + "@sofie-package-manager/api": "1.50.0-alpha.8", "abort-controller": "^3.0.0", "atem-connection": "^3.2.0", "deep-diff": "^1.0.2", diff --git a/shared/packages/workforce/CHANGELOG.md b/shared/packages/workforce/CHANGELOG.md index 0eaef75a..a7d70d7e 100644 --- a/shared/packages/workforce/CHANGELOG.md +++ b/shared/packages/workforce/CHANGELOG.md @@ -3,6 +3,41 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @sofie-package-manager/workforce diff --git a/shared/packages/workforce/package.json b/shared/packages/workforce/package.json index 5d0ecff6..a3c7cc0d 100644 --- a/shared/packages/workforce/package.json +++ b/shared/packages/workforce/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/workforce", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "main": "dist/index", "types": "dist/index", "files": [ @@ -13,7 +13,7 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.7" + "@sofie-package-manager/api": "1.50.0-alpha.8" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index f5f1d045..8698d57e 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,49 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @tests/internal-tests diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index 5ba7c338..a051ec4a 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.8", "description": "Internal tests", "private": true, "scripts": { @@ -14,12 +14,12 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.7", - "@package-manager/generic": "1.50.0-alpha.7", - "@sofie-package-manager/api": "1.50.0-alpha.7", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.7", - "@sofie-package-manager/worker": "1.50.0-alpha.7", - "@sofie-package-manager/workforce": "1.50.0-alpha.7", + "@http-server/generic": "1.50.0-alpha.8", + "@package-manager/generic": "1.50.0-alpha.8", + "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.8", + "@sofie-package-manager/workforce": "1.50.0-alpha.8", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" }, From ee20db9d12177757d4c82c3e89a3f3cf632dc5ff Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 22 Jan 2024 12:54:25 +0100 Subject: [PATCH 44/54] chore: fix multi-platform tests --- .../src/__tests__/basic.spec.ts | 103 +++++++++--------- tests/internal-tests/src/__tests__/lib/lib.ts | 2 +- 2 files changed, 54 insertions(+), 51 deletions(-) diff --git a/tests/internal-tests/src/__tests__/basic.spec.ts b/tests/internal-tests/src/__tests__/basic.spec.ts index 04c737a7..fde37985 100644 --- a/tests/internal-tests/src/__tests__/basic.spec.ts +++ b/tests/internal-tests/src/__tests__/basic.spec.ts @@ -67,7 +67,7 @@ describeForAllPlatforms( QGatewayClient.resetMock() }) }, - () => { + (platform) => { test('Be able to copy local file', async () => { fs.__mockSetFile('/sources/source0/file0Source.mp4', 1234) fs.__mockSetDirectory('/targets/target0') @@ -116,62 +116,65 @@ describeForAllPlatforms( size: 1234, }) }) - test('Be able to copy Networked file to local', async () => { - fs.__mockSetFile('\\\\networkShare/sources/source1/file0Source.mp4', 1234) - fs.__mockSetDirectory('/targets/target1') - env.expectationManager.updateExpectations({ - [EXP_copy0]: literal({ - id: EXP_copy0, - priority: 0, - managerId: MANAGER0, - fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], - type: Expectation.Type.FILE_COPY, - statusReport: { - label: `Copy file0`, - description: `Copy file0 because test`, - requiredForPlayout: true, - displayRank: 0, - sendReport: true, - }, - startRequirement: { - sources: [getFileShareSource(SOURCE1, 'file0Source.mp4')], - }, - endRequirement: { - targets: [getLocalTarget(TARGET1, 'subFolder0/file0Target.mp4')], - content: { - filePath: 'subFolder0/file0Target.mp4', + if (platform === 'win32') { + test('Be able to copy Networked file to local', async () => { + fs.__mockSetFile('\\\\networkShare/sources/source1/file0Source.mp4', 1234) + fs.__mockSetDirectory('/targets/target1') + + env.expectationManager.updateExpectations({ + [EXP_copy0]: literal({ + id: EXP_copy0, + priority: 0, + managerId: MANAGER0, + fromPackages: [{ id: PACKAGE0, expectedContentVersionHash: 'abcd1234' }], + type: Expectation.Type.FILE_COPY, + statusReport: { + label: `Copy file0`, + description: `Copy file0 because test`, + requiredForPlayout: true, + displayRank: 0, + sendReport: true, }, - version: { type: Expectation.Version.Type.FILE_ON_DISK }, - }, - workOptions: {}, - }), - }) + startRequirement: { + sources: [getFileShareSource(SOURCE1, 'file0Source.mp4')], + }, + endRequirement: { + targets: [getLocalTarget(TARGET1, 'subFolder0/file0Target.mp4')], + content: { + filePath: 'subFolder0/file0Target.mp4', + }, + version: { type: Expectation.Version.Type.FILE_ON_DISK }, + }, + workOptions: {}, + }), + }) - // Wait for the job to complete: - await waitUntil(() => { - expect(env.containerStatuses[TARGET1]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() - expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( - ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY - ) - }, env.WAIT_JOB_TIME) + // Wait for the job to complete: + await waitUntil(() => { + expect(env.containerStatuses[TARGET1]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0]).toBeTruthy() + expect(env.containerStatuses[TARGET1].packages[PACKAGE0].packageStatus?.status).toEqual( + ExpectedPackageStatusAPI.PackageContainerPackageStatusStatus.READY + ) + }, env.WAIT_JOB_TIME) - expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') + expect(env.expectationStatuses[EXP_copy0].statusInfo.status).toEqual('fulfilled') - expect(await WND.list()).toEqual({ - X: { - driveLetter: 'X', - path: '\\\\networkShare\\sources\\source1\\', - status: true, - statusMessage: 'Mock', - }, - }) + expect(await WND.list()).toEqual({ + X: { + driveLetter: 'X', + path: '\\\\networkShare\\sources\\source1\\', + status: true, + statusMessage: 'Mock', + }, + }) - expect(await fsStat('/targets/target1/subFolder0/file0Target.mp4')).toMatchObject({ - size: 1234, + expect(await fsStat('/targets/target1/subFolder0/file0Target.mp4')).toMatchObject({ + size: 1234, + }) }) - }) + } test('Be able to copy Quantel clips', async () => { const orgClip = QGatewayClient.searchClip((clip) => clip.ClipGUID === 'abc123')[0] diff --git a/tests/internal-tests/src/__tests__/lib/lib.ts b/tests/internal-tests/src/__tests__/lib/lib.ts index f9493b23..fa727a24 100644 --- a/tests/internal-tests/src/__tests__/lib/lib.ts +++ b/tests/internal-tests/src/__tests__/lib/lib.ts @@ -51,7 +51,7 @@ export function describeForAllPlatforms(name: string, cbOnce: () => void, cbPerP beforeAll(async () => { orgProcessPlatform = process.platform Object.defineProperty(process, 'platform', { - value: 'darwin', + value: platform, }) }) afterAll(() => { From 30f3901c06e2f0c4fb4b5e79ada2e85f652616fb Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Mon, 22 Jan 2024 12:03:19 +0000 Subject: [PATCH 45/54] chore: disable fail-fast in ci --- .github/workflows/lint-and-test.yaml | 1 + .github/workflows/publish-prerelease.yaml | 31 +++++++++++++---------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index 22882b74..c01cae9c 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -46,6 +46,7 @@ jobs: name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: node_version: ['16'] os: [ubuntu-latest, windows-latest] # [windows-latest, macOS-latest] diff --git a/.github/workflows/publish-prerelease.yaml b/.github/workflows/publish-prerelease.yaml index 41e6afb2..c8a2e3f7 100644 --- a/.github/workflows/publish-prerelease.yaml +++ b/.github/workflows/publish-prerelease.yaml @@ -6,26 +6,31 @@ on: jobs: test: - name: Test - runs-on: ubuntu-latest - timeout-minutes: 15 - + name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + node_version: ['16'] + os: [ubuntu-latest, windows-latest] # [windows-latest, macOS-latest] + timeout-minutes: 10 steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - - name: Use Node.js + - name: Use Node.js ${{ matrix.node_version }} uses: actions/setup-node@v4 with: - node-version: 16 + node-version: ${{ matrix.node_version }} + - name: Prepare Environment - run: yarn - env: - CI: true - - name: Build - run: yarn build + run: | + yarn + yarn build env: CI: true - - name: Run tests - run: yarn test:ci + - name: Run unit tests + run: | + yarn test:ci env: CI: true From e150adc1a677ffc8df6b2f011c1ac3eb3bd0d475 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Mon, 22 Jan 2024 12:15:16 +0000 Subject: [PATCH 46/54] chore: increase network timeout --- .github/workflows/lint-and-test.yaml | 5 ++++- .github/workflows/publish-prerelease.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index c01cae9c..71caf23f 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -29,7 +29,9 @@ jobs: key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Prepare Environment - run: yarn + run: | + yarn config set network-timeout 100000 -g + yarn env: CI: true - name: Type check @@ -66,6 +68,7 @@ jobs: - name: Prepare Environment run: | + yarn config set network-timeout 100000 -g yarn yarn build env: diff --git a/.github/workflows/publish-prerelease.yaml b/.github/workflows/publish-prerelease.yaml index c8a2e3f7..c51177e3 100644 --- a/.github/workflows/publish-prerelease.yaml +++ b/.github/workflows/publish-prerelease.yaml @@ -24,6 +24,7 @@ jobs: - name: Prepare Environment run: | + yarn config set network-timeout 100000 -g yarn yarn build env: @@ -64,7 +65,9 @@ jobs: fi - name: Prepare Environment if: ${{ steps.do-publish.outputs.publish }} - run: yarn + run: | + yarn config set network-timeout 100000 -g + yarn env: CI: true - name: Build From 5e4ee3430bc27928e7f582dcaff73f7c1c5454a3 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 22 Jan 2024 13:16:10 +0100 Subject: [PATCH 47/54] chore: fix failing unit test in CI --- .../src/__mocks__/child_process.ts | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/tests/internal-tests/src/__mocks__/child_process.ts b/tests/internal-tests/src/__mocks__/child_process.ts index af5a0aef..721fe02e 100644 --- a/tests/internal-tests/src/__mocks__/child_process.ts +++ b/tests/internal-tests/src/__mocks__/child_process.ts @@ -89,7 +89,7 @@ async function robocopy(spawned: SpawnedProcess, args: string[]) { let destinationFolder const files = [] for (const arg of args) { - const options = [ + const options: (string | RegExp)[] = [ '/s', '/e', '/lev:', @@ -131,9 +131,16 @@ async function robocopy(spawned: SpawnedProcess, args: string[]) { let isOption = false for (const option of options) { - if (arg.match(new RegExp(option))) { - isOption = true - break + if (typeof option === 'string') { + if (arg === option) { + isOption = true + break + } + } else { + if (arg.match(new RegExp(option))) { + isOption = true + break + } } } if (!isOption) { @@ -143,9 +150,22 @@ async function robocopy(spawned: SpawnedProcess, args: string[]) { } } - if (!sourceFolder) throw new Error(`Mock child_process.spawn: sourceFolder not set: "${args}"`) - if (!destinationFolder) throw new Error(`Mock child_process.spawn: destinationFolder not set: "${args}"`) - if (!files.length) throw new Error(`Mock child_process.spawn: files not set: "${args}"`) + if (!sourceFolder) + throw new Error( + `Mock child_process.spawn: sourceFolder not set: "${args}" (destinationFolder: "${destinationFolder}", files: ${files.join( + ',' + )})` + ) + if (!destinationFolder) + throw new Error( + `Mock child_process.spawn: destinationFolder not set: "${args}" (sourceFolder: "${sourceFolder}", files: ${files.join( + ',' + )}) ` + ) + if (!files.length) + throw new Error( + `Mock child_process.spawn: files not set: "${args}" (sourceFolder: "${sourceFolder}", destinationFolder: "${destinationFolder}")` + ) // Just do a simple copy, expand this if needed later... try { From 87a5f35a1aadbcb224e7ff3d3137a1155e450bc9 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Fri, 26 Jan 2024 14:11:09 +0000 Subject: [PATCH 48/54] fix: atem and ffmpeg linux --- .../src/worker/accessorHandlers/atem.ts | 81 +++++++++++++------ .../expectationHandlers/lib/ffmpeg.ts | 4 +- 2 files changed, 58 insertions(+), 27 deletions(-) diff --git a/shared/packages/worker/src/worker/accessorHandlers/atem.ts b/shared/packages/worker/src/worker/accessorHandlers/atem.ts index d0d32f92..4bbd5f7e 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/atem.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/atem.ts @@ -155,12 +155,11 @@ export class ATEMAccessorHandle extends GenericAccessorHandle { - atem.off('stateChanged', successHandler) + atem.off('connected', successHandler) atem.off('error', errorHandler) } - atem.once('stateChanged', successHandler) - + atem.once('connected', successHandler) atem.once('error', errorHandler) }) } @@ -226,9 +225,11 @@ export class ATEMAccessorHandle extends GenericAccessorHandle { // can't really abort the write stream + aborted = true }) streamWrapper.usingCustomProgressEvent = true @@ -251,10 +252,12 @@ export class ATEMAccessorHandle extends GenericAccessorHandle extends GenericAccessorHandle extends GenericAccessorHandle maxDuration) { throw new Error(`File is too long in duration (${duration} frames, max ${maxDuration})`) @@ -292,6 +298,7 @@ export class ATEMAccessorHandle extends GenericAccessorHandle extends GenericAccessorHandle extends GenericAccessorHandle { for (let i = 0; i < allRGBAs.length; i++) { + if (aborted) throw new Error('Aborted') + + streamWrapper.emit('progress', 0.61 + 0.29 * ((i - 0.5) / allRGBAs.length)) yield await fsReadFile(allRGBAs[i]) - streamWrapper.emit('progress', 0.6 + 0.3 * (i / allRGBAs.length)) + streamWrapper.emit('progress', 0.61 + 0.29 * (i / allRGBAs.length)) } } - await atem.uploadClip(bankIndex, provideFrame(), this.getAtemClipName()) + try { + await atem.uploadClip(bankIndex, provideFrame(), this.getAtemClipName()) + } catch (e) { + if (`${e}`.match(/Aborted/)) { + return + } else throw e + } + if (aborted) return const audioStreamIndicies = await getStreamIndicies(inputFile, 'audio') if (audioStreamIndicies.length > 0) { await convertAudio(inputFile) await sleep(1000) // Helps avoid a lock-related "Code 5" error from the ATEM. + + if (aborted) return const audioBuffer = await fsReadFile(replaceFileExtension(inputFile, '.wav')) await atem.uploadAudio(bankIndex, audioBuffer, `audio${this.accessor.bankIndex}`) } @@ -484,30 +504,31 @@ async function stream2Disk(sourceStream: NodeJS.ReadableStream, outputFile: stri async function createTGASequence(inputFile: string, opts?: { width: number; height: number }): Promise { const outputFile = replaceFileExtension(inputFile, '_%04d.tga') - const args = [`-i "${inputFile}"`] + const args = ['-i', inputFile] if (opts) { - args.push(`-vf scale=${opts.width}:${opts.height}`) + args.push('-vf', `scale=${opts.width}:${opts.height}`) } - args.push(`"${outputFile}"`) + args.push(outputFile) return ffmpeg(args) } async function convertFrameToRGBA(inputFile: string): Promise { const outputFile = replaceFileExtension(inputFile, '.rgba') - const args = [`-i "${inputFile}"`, '-pix_fmt rgba', '-f rawvideo', `"${outputFile}"`] + const args = [`-i`, inputFile, '-pix_fmt', 'rgba', '-f', 'rawvideo', outputFile] return ffmpeg(args) } async function convertAudio(inputFile: string): Promise { const outputFile = replaceFileExtension(inputFile, '.wav') const args = [ - `-i "${inputFile}"`, + `-i`, + inputFile, '-vn', // no video - '-ar 48000', // 48kHz sample rate - '-ac 2', // stereo audio - '-c:a pcm_s24le', - `"${outputFile}"`, + '-ar`,`48000', // 48kHz sample rate + '-ac`,`2', // stereo audio + '-c:a`,`pcm_s24le', + outputFile, ] return ffmpeg(args) @@ -516,12 +537,17 @@ async function convertAudio(inputFile: string): Promise { async function countFrames(inputFile: string): Promise { return new Promise((resolve, reject) => { const args = [ - `-i "${inputFile}"`, - '-v error', - '-select_streams v:0', + '-i', + inputFile, + '-v', + 'error', + '-select_streams', + 'v:0', '-count_frames', - '-show_entries stream=nb_read_frames', - '-print_format csv', + '-show_entries', + 'stream=nb_read_frames', + '-print_format', + 'csv', ] ffprobe(args) @@ -537,11 +563,16 @@ async function countFrames(inputFile: string): Promise { async function getStreamIndicies(inputFile: string, type: 'video' | 'audio'): Promise { return new Promise((resolve, reject) => { const args = [ - `-i "${inputFile}"`, - '-v error', - `-select_streams ${type === 'video' ? 'v' : 'a'}`, - '-show_entries stream=index', - '-of csv=p=0', + '-i', + inputFile, + '-v', + 'error', + '-select_streams', + type === 'video' ? 'v' : 'a', + '-show_entries', + 'stream=index', + '-of', + 'csv=p=0', ] ffprobe(args) @@ -582,7 +613,7 @@ async function ffmpeg(args: string[]): Promise { const file = getFFMpegExecutable() execFile( file, - ['-v error', ...args], + ['-v', 'error', ...args], { maxBuffer: MAX_EXEC_BUFFER, windowsVerbatimArguments: true, // To fix an issue with ffmpeg.exe on Windows diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts index 3810da00..c1bcbf99 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts @@ -88,11 +88,11 @@ export async function spawnFFMpeg( let pipeStdOut = false if (isLocalFolderAccessorHandle(targetHandle)) { await mkdirp(path.dirname(targetHandle.fullPath)) // Create folder if it doesn't exist - args.push(`"${targetHandle.fullPath}"`) + args.push(targetHandle.fullPath) } else if (isFileShareAccessorHandle(targetHandle)) { await targetHandle.prepareFileAccess() await mkdirp(path.dirname(targetHandle.fullPath)) // Create folder if it doesn't exist - args.push(`"${targetHandle.fullPath}"`) + args.push(targetHandle.fullPath) } else if (isHTTPProxyAccessorHandle(targetHandle)) { pipeStdOut = true args.push('pipe:1') // pipe output to stdout From 3b760cc90ee0f9d82d80975beb3f11cb4ba59a49 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Tue, 30 Jan 2024 11:19:02 +0100 Subject: [PATCH 49/54] v1.50.0-alpha.9 --- CHANGELOG.md | 101 ++++++++++++++++++ apps/appcontainer-node/app/CHANGELOG.md | 36 +++++++ apps/appcontainer-node/app/package.json | 4 +- .../packages/generic/CHANGELOG.md | 44 ++++++++ .../packages/generic/package.json | 4 +- apps/package-manager/app/CHANGELOG.md | 36 +++++++ apps/package-manager/app/package.json | 4 +- .../packages/generic/CHANGELOG.md | 60 +++++++++++ .../packages/generic/package.json | 6 +- apps/single-app/app/CHANGELOG.md | 43 ++++++++ apps/single-app/app/package.json | 8 +- apps/worker/app/CHANGELOG.md | 36 +++++++ apps/worker/app/package.json | 4 +- apps/worker/packages/generic/CHANGELOG.md | 36 +++++++ apps/worker/packages/generic/package.json | 4 +- lerna.json | 2 +- .../packages/expectationManager/CHANGELOG.md | 44 ++++++++ .../packages/expectationManager/package.json | 4 +- shared/packages/worker/CHANGELOG.md | 65 +++++++++++ shared/packages/worker/package.json | 2 +- tests/internal-tests/CHANGELOG.md | 47 ++++++++ tests/internal-tests/package.json | 8 +- 22 files changed, 573 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a3573e1..e565adc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,107 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + +### Bug Fixes + +* atem and ffmpeg linux ([87a5f35](https://github.com/nrkno/tv-automation-package-manager/commit/87a5f35a1aadbcb224e7ff3d3137a1155e450bc9)) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* add checks for FFPrope executable ([f1084e8](https://github.com/nrkno/tv-automation-package-manager/commit/f1084e84bb17968d39faf746ab841113137aeb14)) +* bad merge ([dca3763](https://github.com/nrkno/tv-automation-package-manager/commit/dca37639a2a12ce93c029acc5fdebba88e2c2187)) +* ignoring expectedPackages from core ([7e3f462](https://github.com/nrkno/tv-automation-package-manager/commit/7e3f462265412ad1602f0f6d81aa2c8b1fb9b0d0)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + +### Bug Fixes + +* CI signtool.exe /debug ([44f344a](https://github.com/nrkno/tv-automation-package-manager/commit/44f344ad7303512e79bfec5dca67bb3f12e6a76a)) + + + +# [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) + + +### Reverts + +* chore: lerna useWorkspaces ([c2f6432](https://github.com/nrkno/tv-automation-package-manager/commit/c2f6432eeae6c366a80ed7a412750a97374a321f)) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't error when trying to generate a preview for an audio-only file ([f7a9dc5](https://github.com/nrkno/tv-automation-package-manager/commit/f7a9dc5255049271b5e4b1c58bc901300867708b)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + +### Features + +* generate audio waveform images for audio-only files (and don't try to generate previews for them) ([10e5747](https://github.com/nrkno/tv-automation-package-manager/commit/10e574757bcdd86a2a5aa9dade2ed34b5d0984f9)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Bug Fixes + +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) + + +### Features + +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/appcontainer-node/app/CHANGELOG.md b/apps/appcontainer-node/app/CHANGELOG.md index 396ab93e..a114e08f 100644 --- a/apps/appcontainer-node/app/CHANGELOG.md +++ b/apps/appcontainer-node/app/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @appcontainer-node/app + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index 853393b1..b230f0c9 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -14,7 +14,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.8" + "@appcontainer-node/generic": "1.50.0-alpha.9" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/appcontainer-node/packages/generic/CHANGELOG.md b/apps/appcontainer-node/packages/generic/CHANGELOG.md index 38b78e03..9315e73f 100644 --- a/apps/appcontainer-node/packages/generic/CHANGELOG.md +++ b/apps/appcontainer-node/packages/generic/CHANGELOG.md @@ -3,6 +3,50 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* bad merge ([dca3763](https://github.com/nrkno/tv-automation-package-manager/commit/dca37639a2a12ce93c029acc5fdebba88e2c2187)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index 33816076..10b61ae5 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -14,7 +14,7 @@ }, "dependencies": { "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.9", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/apps/package-manager/app/CHANGELOG.md b/apps/package-manager/app/CHANGELOG.md index 5d48cbe3..da265186 100644 --- a/apps/package-manager/app/CHANGELOG.md +++ b/apps/package-manager/app/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @package-manager/app + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index b3ae327f..020cc056 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -13,7 +13,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@package-manager/generic": "1.50.0-alpha.8" + "@package-manager/generic": "1.50.0-alpha.9" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/package-manager/packages/generic/CHANGELOG.md b/apps/package-manager/packages/generic/CHANGELOG.md index 3a32486b..2e57f261 100644 --- a/apps/package-manager/packages/generic/CHANGELOG.md +++ b/apps/package-manager/packages/generic/CHANGELOG.md @@ -3,6 +3,66 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* ignoring expectedPackages from core ([7e3f462](https://github.com/nrkno/tv-automation-package-manager/commit/7e3f462265412ad1602f0f6d81aa2c8b1fb9b0d0)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Bug Fixes + +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index 7ac5ecd8..5b0fab92 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -16,8 +16,8 @@ "dependencies": { "@parcel/watcher": "^2.3.0", "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.8", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.9", + "@sofie-package-manager/worker": "1.50.0-alpha.9", "data-store": "^4.0.3", "deep-extend": "^0.6.0", "fast-clone": "^1.5.13", diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index da50ac31..635d01bb 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,49 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index 323a9733..6be83d3b 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -14,12 +14,12 @@ "nexe": "^3.3.7" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.8", + "@appcontainer-node/generic": "1.50.0-alpha.9", "@http-server/generic": "1.50.0-alpha.8", - "@package-manager/generic": "1.50.0-alpha.8", + "@package-manager/generic": "1.50.0-alpha.9", "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.8", "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.9", "@sofie-package-manager/workforce": "1.50.0-alpha.8", "underscore": "^1.12.0" }, diff --git a/apps/worker/app/CHANGELOG.md b/apps/worker/app/CHANGELOG.md index 275262ae..415ddc4d 100644 --- a/apps/worker/app/CHANGELOG.md +++ b/apps/worker/app/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @worker/app + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 62b0563c..7b7d8121 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "description": "Boilerplace", "private": true, "scripts": { @@ -15,7 +15,7 @@ "nexe": "^3.3.7" }, "dependencies": { - "@worker/generic": "1.50.0-alpha.8" + "@worker/generic": "1.50.0-alpha.9" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/worker/packages/generic/CHANGELOG.md b/apps/worker/packages/generic/CHANGELOG.md index 917b5d3b..85ad14f0 100644 --- a/apps/worker/packages/generic/CHANGELOG.md +++ b/apps/worker/packages/generic/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @worker/generic + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index d3706266..9c3e6b7c 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.8" + "@sofie-package-manager/worker": "1.50.0-alpha.9" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/lerna.json b/lerna.json index f77758d5..92f3fb59 100644 --- a/lerna.json +++ b/lerna.json @@ -4,6 +4,6 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "npmClient": "yarn" } diff --git a/shared/packages/expectationManager/CHANGELOG.md b/shared/packages/expectationManager/CHANGELOG.md index 8b007618..d8738da4 100644 --- a/shared/packages/expectationManager/CHANGELOG.md +++ b/shared/packages/expectationManager/CHANGELOG.md @@ -3,6 +3,50 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index 460a3c42..5df8f6a6 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -14,7 +14,7 @@ }, "dependencies": { "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.8", + "@sofie-package-manager/worker": "1.50.0-alpha.9", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index d5d02fa0..63190c03 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -3,6 +3,71 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + +### Bug Fixes + +* atem and ffmpeg linux ([87a5f35](https://github.com/nrkno/tv-automation-package-manager/commit/87a5f35a1aadbcb224e7ff3d3137a1155e450bc9)) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* add checks for FFPrope executable ([f1084e8](https://github.com/nrkno/tv-automation-package-manager/commit/f1084e84bb17968d39faf746ab841113137aeb14)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't error when trying to generate a preview for an audio-only file ([f7a9dc5](https://github.com/nrkno/tv-automation-package-manager/commit/f7a9dc5255049271b5e4b1c58bc901300867708b)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + +### Features + +* generate audio waveform images for audio-only files (and don't try to generate previews for them) ([10e5747](https://github.com/nrkno/tv-automation-package-manager/commit/10e574757bcdd86a2a5aa9dade2ed34b5d0984f9)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Features + +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index e542f2fc..f8f13ef6 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index 8698d57e..ea72ce7c 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,53 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index a051ec4a..b4bc7dab 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.9", "description": "Internal tests", "private": true, "scripts": { @@ -15,10 +15,10 @@ }, "dependencies": { "@http-server/generic": "1.50.0-alpha.8", - "@package-manager/generic": "1.50.0-alpha.8", + "@package-manager/generic": "1.50.0-alpha.9", "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.8", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.9", + "@sofie-package-manager/worker": "1.50.0-alpha.9", "@sofie-package-manager/workforce": "1.50.0-alpha.8", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" From fb29ef9a34bf3ff25147f6be9701044a77500691 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Fri, 2 Feb 2024 15:43:08 +0100 Subject: [PATCH 50/54] chore: DRY --- .../workers/windowsWorker/expectationHandlers/lib/scan.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts index 6b0fabe7..724a0e02 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts @@ -16,7 +16,7 @@ import { FileShareAccessorHandle } from '../../../../accessorHandlers/fileShare' import { HTTPProxyAccessorHandle } from '../../../../accessorHandlers/httpProxy' import { HTTPAccessorHandle } from '../../../../accessorHandlers/http' import { MAX_EXEC_BUFFER } from '../../../../lib/lib' -import { getFFMpegExecutable } from './ffmpeg' +import { getFFMpegExecutable, getFFProbeExecutable } from './ffmpeg' import { GenericAccessorHandle } from '../../../../accessorHandlers/genericHandle' export interface FFProbeScanResultStream { @@ -66,7 +66,6 @@ export function scanWithFFProbe( assertNever(sourceHandle) throw new Error('Unknown handle') } - const file = process.platform === 'win32' ? 'ffprobe.exe' : 'ffprobe' // Use FFProbe to scan the file: const args = ['-hide_banner', `-i`, inputPath, '-show_streams', '-show_format', '-print_format', 'json'] let ffProbeProcess: ChildProcess | undefined = undefined @@ -77,7 +76,7 @@ export function scanWithFFProbe( }) ffProbeProcess = execFile( - file, + getFFProbeExecutable(), args, { maxBuffer: MAX_EXEC_BUFFER, From 101669a42f863779f1b9442d31bd9bc94eb3c99f Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Mon, 12 Feb 2024 10:30:58 +0000 Subject: [PATCH 51/54] chore: unit tests to verify execution across multiple versions of ffmpeg (#133) --------- Co-authored-by: Johan Nyman --- .gitignore | 1 + package.json | 15 +- scripts/prepare-for-tests.mjs | 83 ++++++++ shared/packages/worker/package.json | 6 +- .../worker/src/__tests__/ffmpegHelper.ts | 51 +++++ .../{fileShare.spec.ts => fileShare.spec.ts_} | 0 .../accessorHandlers/__tests__/atem.spec.ts | 67 +++++++ .../src/worker/accessorHandlers/atem.ts | 105 +++++----- .../__tests__/ffmpeg.spec.ts | 189 ++++++++++++++++++ .../expectationHandlers/lib/ffmpeg.ts | 16 ++ .../expectationHandlers/lib/scan.ts | 37 ++-- tests/ffmpegReleases.json | 38 ++++ tests/samples/name with spaces.mov | Bin 0 -> 40226 bytes yarn.lock | 32 +++ 14 files changed, 553 insertions(+), 87 deletions(-) create mode 100644 scripts/prepare-for-tests.mjs create mode 100644 shared/packages/worker/src/__tests__/ffmpegHelper.ts rename shared/packages/worker/src/__tests__/{fileShare.spec.ts => fileShare.spec.ts_} (100%) create mode 100644 shared/packages/worker/src/worker/accessorHandlers/__tests__/atem.spec.ts create mode 100644 shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/__tests__/ffmpeg.spec.ts create mode 100644 tests/ffmpegReleases.json create mode 100644 tests/samples/name with spaces.mov diff --git a/.gitignore b/.gitignore index 07a5e5c1..11e6a6f9 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ tmp_packages_for_build/ ffmpeg.exe ffprobe.exe apps/single-app/app/expectedPackages.json_smartbull +.ffmpeg/ diff --git a/package.json b/package.json index 0263283c..59bf700c 100644 --- a/package.json +++ b/package.json @@ -21,11 +21,12 @@ "lint": "lerna exec --parallel --no-bail -- eslint . --ext .ts,.tsx", "lintfix": "yarn lint --fix", "lint:changed": "lerna exec --since origin/master --include-dependents -- eslint . --ext .js,.jsx,.ts,.tsx", - "test": "lerna run test --stream", - "test:ci": "lerna run test --stream", - "test:changed": "lerna run --since origin/master --include-dependents test", - "test:update": "lerna run test -- -u", - "test:update:changed": "lerna run --since origin/master --include-dependents test -- -u", + "test": "yarn test:prepare && lerna run test --stream", + "test:ci": "yarn test:prepare && lerna run test --stream", + "test:changed": "yarn test:prepare && lerna run --since origin/master --include-dependents test", + "test:update": "yarn test:prepare && lerna run test -- -u", + "test:update:changed": "yarn test:prepare && lerna run --since origin/master --include-dependents test -- -u", + "test:prepare": "node scripts/prepare-for-tests.mjs", "typecheck": "lerna exec -- tsc --noEmit", "typecheck:changed": "lerna exec --since origin/master --include-dependents -- tsc --noEmit", "build-win32": "node scripts/prepare-for-build32.js && lerna run build-win32 --stream && node scripts/cleanup-after-build32.mjs", @@ -47,14 +48,16 @@ "devDependencies": { "@sofie-automation/code-standard-preset": "^2.5.1", "@types/jest": "^29.2.5", + "@types/rimraf": "^3.0.0", "deep-extend": "^0.6.0", "find": "^0.3.0", "fs-extra": "^11.1.0", "glob": "^8.1.0", "jest": "^29.3.1", - "lerna": "^6.6.1", "json-schema-to-typescript": "^10.1.5", + "lerna": "^6.6.1", "mkdirp": "^2.1.3", + "node-fetch": "^2.6.9", "pkg": "^5.8.0", "rimraf": "^3.0.2", "ts-jest": "^29.0.3", diff --git a/scripts/prepare-for-tests.mjs b/scripts/prepare-for-tests.mjs new file mode 100644 index 00000000..c93ea593 --- /dev/null +++ b/scripts/prepare-for-tests.mjs @@ -0,0 +1,83 @@ +/** + * This is a small helper to download and extract a set of ffmpeg binaries, so that we can + * test package-manager with multiple versions of ffmpeg. + * It reads the file `./tests/ffmpegReleases.json` to see what versions should be downloaded, + * and puts them into `.ffmpeg/` at the root of the repository. + */ + +import fs from 'fs/promises' +import { pipeline } from 'node:stream' +import { promisify } from 'node:util' +import { createWriteStream } from 'node:fs' +import path from 'path' +import cp from 'child_process' +import fetch from 'node-fetch' + +const targetVersions = JSON.parse(await fs.readFile('./tests/ffmpegReleases.json')) + +const toPosix = (str) => str.split(path.sep).join(path.posix.sep) + +const streamPipeline = promisify(pipeline) + +const ffmpegRootDir = './.ffmpeg' +await fs.mkdir(ffmpegRootDir).catch(() => null) + +async function pathExists(path) { + try { + await fs.stat(path) + return true + } catch (e) { + return false + } +} + +const platformInfo = `${process.platform}-${process.arch}` +const platformVersions = targetVersions[platformInfo] + +if (platformVersions) { + for (const version of platformVersions) { + const versionPath = path.join(ffmpegRootDir, version.id) + const dirStat = await pathExists(versionPath) + if (!dirStat) { + console.log(`Fetching ${version.url}`) + // Download it + + const fileExtension = version.url.endsWith('.tar.xz') ? '.tar.xz' : version.url.endsWith('.zip') ? '.zip' : '' + const tmpPath = path.resolve(path.join(ffmpegRootDir, 'tmp' + fileExtension)) + + // eslint-disable-next-line no-undef + const response = await fetch(version.url) + if (!response.ok) throw new Error(`unexpected response ${response.statusText}`) + await streamPipeline(response.body, createWriteStream(tmpPath)) + + // Extract it + if (fileExtension === '.tar.xz') { + await fs.mkdir(versionPath).catch(() => null) + cp.execSync(`tar -xJf ${toPosix(tmpPath)} --strip-components=1 -C ${toPosix(versionPath)}`) + } else if (fileExtension === '.zip') { + if (process.platform === 'win32') { + cp.execSync(`tar -xf ${toPosix(tmpPath)}`, { + cwd: ffmpegRootDir, + }) + + const list = cp.execSync(`tar -tf ${toPosix(tmpPath)}`).toString() + const mainFolder = list + .split('\n')[0] + .trim() // "ffmpeg-4.3.1-win64-static/" + .replace(/[\/\\]*$/, '') // remove trailing slash + await fs.rename(path.join(ffmpegRootDir, mainFolder), versionPath) + } else { + cp.execSync(`unzip ${toPosix(tmpPath)} -d ${toPosix(ffmpegRootDir)}`) + const dirname = path.parse(version.url).name + await fs.rename(path.join(ffmpegRootDir, dirname), versionPath) + } + + await fs.rm(tmpPath) + } else { + throw new Error(`Unhandled file extension: ${version.url}`) + } + } + } +} else { + throw new Error(`No FFMpeg binaries have been defined for "${platformInfo}" yet`) +} diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index f8f13ef6..fc39e1db 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "yarn rimraf dist && yarn build:main", "build:main": "tsc -p tsconfig.json", - "__test": "jest" + "test": "jest" }, "engines": { "node": ">=14.18.0" @@ -18,7 +18,8 @@ "devDependencies": { "@types/deep-diff": "^1.0.0", "@types/node-fetch": "^2.5.8", - "@types/tmp": "~0.2.2" + "@types/tmp": "~0.2.2", + "jest-mock-extended": "^3.0.5" }, "dependencies": { "@parcel/watcher": "^2.3.0", @@ -31,6 +32,7 @@ "node-fetch": "^2.6.1", "tmp": "~0.2.1", "tv-automation-quantel-gateway-client": "3.1.7", + "type-fest": "3.13.1", "windows-network-drive": "^4.0.1", "xml-js": "^1.6.11" }, diff --git a/shared/packages/worker/src/__tests__/ffmpegHelper.ts b/shared/packages/worker/src/__tests__/ffmpegHelper.ts new file mode 100644 index 00000000..9c0e4521 --- /dev/null +++ b/shared/packages/worker/src/__tests__/ffmpegHelper.ts @@ -0,0 +1,51 @@ +import path from 'path' +import { LocalFolderAccessorHandle } from '../worker/accessorHandlers/localFolder' +import { overrideFFMpegExecutables, spawnFFMpeg } from '../worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg' + +export const SamplesDir = path.join(__dirname, '../../../../../tests/samples') + +export async function callSpawnFFmpeg(args: string[], targetHandle: LocalFolderAccessorHandle): Promise { + let resolve = () => {} + let reject = (_err: Error) => {} + const result = new Promise((resolve2, reject2) => { + resolve = resolve2 + reject = reject2 + }) + + const ffmpegProcess = await spawnFFMpeg( + args, + targetHandle, + async () => resolve(), + async (err) => reject(err) + ) + expect(ffmpegProcess).toBeTruthy() + + // Wait for process to complete + await result +} + +export function runForEachFFMpegRelease(runForFFmpegRelease: () => void) { + const ffprobeFilename = process.platform === 'win32' ? 'bin/ffprobe.exe' : 'ffprobe' + const ffmpegFilename = process.platform === 'win32' ? 'bin/ffmpeg.exe' : 'ffmpeg' + + const ffmpegRootPath = path.join(__dirname, '../../../../../.ffmpeg') + + // eslint-disable-next-line @typescript-eslint/no-var-requires + const targetVersions = require('../../../../../tests/ffmpegReleases.json') + + for (const version of targetVersions[`${process.platform}-${process.arch}`]) { + describe(`FFmpeg ${version.id}`, () => { + beforeEach(() => { + overrideFFMpegExecutables({ + ffmpeg: path.join(ffmpegRootPath, version.id, ffmpegFilename), + ffprobe: path.join(ffmpegRootPath, version.id, ffprobeFilename), + }) + }) + afterAll(() => { + overrideFFMpegExecutables(null) + }) + + runForFFmpegRelease() + }) + } +} diff --git a/shared/packages/worker/src/__tests__/fileShare.spec.ts b/shared/packages/worker/src/__tests__/fileShare.spec.ts_ similarity index 100% rename from shared/packages/worker/src/__tests__/fileShare.spec.ts rename to shared/packages/worker/src/__tests__/fileShare.spec.ts_ diff --git a/shared/packages/worker/src/worker/accessorHandlers/__tests__/atem.spec.ts b/shared/packages/worker/src/worker/accessorHandlers/__tests__/atem.spec.ts new file mode 100644 index 00000000..45f9b277 --- /dev/null +++ b/shared/packages/worker/src/worker/accessorHandlers/__tests__/atem.spec.ts @@ -0,0 +1,67 @@ +import path from 'path' +import { copyFile, mkdtemp, readdir } from 'fs/promises' +import { runForEachFFMpegRelease, SamplesDir } from '../../../__tests__/ffmpegHelper' +import rimraf from 'rimraf' +import { convertAudio, countFrames, createTGASequence, getStreamIndicies } from '../atem' +import { tmpdir } from 'os' + +async function copyToTmpDir(inputFile: string): Promise<{ tmpDir: string; copiedFile: string }> { + const tmpDir = await mkdtemp(path.join(tmpdir(), 'package-manager-atem-')) + const copiedFile = path.join(tmpDir, 'input_file') + await copyFile(inputFile, copiedFile) + + return { tmpDir, copiedFile } +} + +runForEachFFMpegRelease(() => { + describe('name with spaces.mov', () => { + const clipPath = path.join(SamplesDir, 'name with spaces.mov') + + let tmpDir: string + let copiedFile: string + + beforeEach(async () => { + const res = await copyToTmpDir(clipPath) + tmpDir = res.tmpDir + copiedFile = res.copiedFile + + const dirListBefore = await readdir(tmpDir) + expect(dirListBefore).toHaveLength(1) + }) + + afterEach(async () => { + rimraf.sync(tmpDir) + }) + + it('createTGASequence', async () => { + const result = await createTGASequence(copiedFile) + expect(result).toBe('') + + const dirListAfter = await readdir(tmpDir) + expect(dirListAfter).toHaveLength(51) + }) + + // TODO: convertFrameToRGBA + + it('convertAudio', async () => { + const result = await convertAudio(copiedFile) + expect(result).toBe('') + + const dirListAfter = await readdir(tmpDir) + expect(dirListAfter).toHaveLength(2) + }) + + it('countFrames', async () => { + const result = await countFrames(copiedFile) + expect(result).toBe(50) + }) + + it('getStreamIndicies', async () => { + const videoResult = await getStreamIndicies(copiedFile, 'video') + expect(videoResult).toEqual([0]) + + const audioResult = await getStreamIndicies(copiedFile, 'audio') + expect(audioResult).toEqual([1]) + }) + }) +}) diff --git a/shared/packages/worker/src/worker/accessorHandlers/atem.ts b/shared/packages/worker/src/worker/accessorHandlers/atem.ts index 4bbd5f7e..31497af7 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/atem.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/atem.ts @@ -502,7 +502,7 @@ async function stream2Disk(sourceStream: NodeJS.ReadableStream, outputFile: stri }) } -async function createTGASequence(inputFile: string, opts?: { width: number; height: number }): Promise { +export async function createTGASequence(inputFile: string, opts?: { width: number; height: number }): Promise { const outputFile = replaceFileExtension(inputFile, '_%04d.tga') const args = ['-i', inputFile] if (opts) { @@ -513,78 +513,73 @@ async function createTGASequence(inputFile: string, opts?: { width: number; heig return ffmpeg(args) } -async function convertFrameToRGBA(inputFile: string): Promise { +export async function convertFrameToRGBA(inputFile: string): Promise { const outputFile = replaceFileExtension(inputFile, '.rgba') const args = [`-i`, inputFile, '-pix_fmt', 'rgba', '-f', 'rawvideo', outputFile] return ffmpeg(args) } -async function convertAudio(inputFile: string): Promise { +export async function convertAudio(inputFile: string): Promise { const outputFile = replaceFileExtension(inputFile, '.wav') const args = [ `-i`, inputFile, '-vn', // no video - '-ar`,`48000', // 48kHz sample rate - '-ac`,`2', // stereo audio - '-c:a`,`pcm_s24le', + '-ar', + '48000', // 48kHz sample rate + '-ac', + '2', // stereo audio + '-c:a', + 'pcm_s24le', outputFile, ] return ffmpeg(args) } -async function countFrames(inputFile: string): Promise { - return new Promise((resolve, reject) => { - const args = [ - '-i', - inputFile, - '-v', - 'error', - '-select_streams', - 'v:0', - '-count_frames', - '-show_entries', - 'stream=nb_read_frames', - '-print_format', - 'csv', - ] - - ffprobe(args) - .then((result) => { - const resultParts = result.split(',') - const durationFrames = parseInt(resultParts[1], 10) - resolve(durationFrames) - }) - .catch((error) => reject(error)) - }) +export async function countFrames(inputFile: string): Promise { + const args = [ + '-i', + inputFile, + '-v', + 'error', + '-select_streams', + 'v:0', + '-count_frames', + '-show_entries', + 'stream=nb_read_frames', + '-print_format', + 'csv', + ] + + const result = await ffprobe(args) + + const resultParts = result.split(',') + return parseInt(resultParts[1], 10) } -async function getStreamIndicies(inputFile: string, type: 'video' | 'audio'): Promise { - return new Promise((resolve, reject) => { - const args = [ - '-i', - inputFile, - '-v', - 'error', - '-select_streams', - type === 'video' ? 'v' : 'a', - '-show_entries', - 'stream=index', - '-of', - 'csv=p=0', - ] - - ffprobe(args) - .then((result) => { - const resultParts = result - .split('\n') - .map((str) => parseInt(str, 10)) - .filter((num) => !isNaN(num)) - resolve(resultParts) - }) - .catch((error) => reject(error)) - }) +export async function getStreamIndicies(inputFile: string, type: 'video' | 'audio'): Promise { + const args = [ + '-i', + inputFile, + '-v', + 'error', + '-select_streams', + type === 'video' ? 'v' : 'a', + '-show_entries', + 'stream=index', + '-of', + 'csv=p=0', + ] + + const result = await ffprobe(args) + + const resultParts = result + .split('\n') + .map((str) => parseInt(str, 10)) + .filter((num) => !isNaN(num)) + + return resultParts } async function ffprobe(args: string[]): Promise { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/__tests__/ffmpeg.spec.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/__tests__/ffmpeg.spec.ts new file mode 100644 index 00000000..7196c7d0 --- /dev/null +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/__tests__/ffmpeg.spec.ts @@ -0,0 +1,189 @@ +import { tmpdir } from 'os' +import path from 'path' +import { stat as fsStat, unlink as fsUnlink } from 'fs/promises' +import { LocalFolderAccessorHandle } from '../../../../accessorHandlers/localFolder' +import { + FFProbeScanResult, + scanFieldOrder, + scanLoudness, + scanMoreInfo, + ScanMoreInfoResult, + scanWithFFProbe, +} from '../lib/scan' +import { mock } from 'jest-mock-extended' +import { Expectation, literal, LoggerInstance } from '@sofie-package-manager/api' +import { LoudnessScanResult } from '../lib/coreApi' +import { previewFFMpegArguments, thumbnailFFMpegArguments } from '../lib' +import { callSpawnFFmpeg, runForEachFFMpegRelease, SamplesDir } from '../../../../../__tests__/ffmpegHelper' + +function createLocalFolderAccessorHandleMock(fullPath: string): LocalFolderAccessorHandle { + return mock>( + { + type: LocalFolderAccessorHandle.type, + fullPath: fullPath, + filePath: path.basename(fullPath), + }, + { + fallbackMockImplementation: () => { + throw new Error('Not mocked') + }, + } + ) +} + +runForEachFFMpegRelease(() => { + describe('name with spaces.mov', () => { + const clipPath = path.join(SamplesDir, 'name with spaces.mov') + const fileHandleMock = createLocalFolderAccessorHandleMock(clipPath) + + it('ffprobe scan', async () => { + const probeResult = await scanWithFFProbe(fileHandleMock) + expect(probeResult).toMatchObject( + literal({ + filePath: expect.anything(), + format: { + duration: '2.000000', + }, + streams: [ + { + index: 0, + codec_type: 'video', + }, + { + index: 1, + codec_type: 'audio', + }, + { + index: 2, + codec_type: 'data', + }, + ], + }) + ) + }) + + it('field order', async () => { + const targetVersion: Expectation.PackageDeepScan['endRequirement']['version'] = { + fieldOrder: true, + } + + const fieldOrder = await scanFieldOrder(fileHandleMock, targetVersion) + expect(fieldOrder).toBe('progressive') + }) + + it('field order: disabled', async () => { + const targetVersion: Expectation.PackageDeepScan['endRequirement']['version'] = { + fieldOrder: false, + } + + const fieldOrder = await scanFieldOrder(fileHandleMock, targetVersion) + expect(fieldOrder).toBe('unknown') + }) + + it('loudness', async () => { + const targetVersion: Expectation.PackageLoudnessScan['endRequirement']['version'] = { + channels: ['0'], + inPhaseDifference: true, + balanceDifference: true, + } + + const fakeFFProbeScanResult = null as any as FFProbeScanResult // This is not used + const onProgress = jest.fn() + + const loudness = await scanLoudness(fileHandleMock, fakeFFProbeScanResult, targetVersion, onProgress) + expect(loudness).toEqual( + literal({ + channels: { + '0': { + success: true, + balanceDifference: -0.6999999999999993, + inPhaseDifference: -0.8000000000000007, + integrated: -15, + integratedThreshold: -25, + layout: 'stereo', + range: 0, + rangeHigh: 0, + rangeLow: 0, + rangeThreshold: 0, + truePeak: -13.6, + }, + }, + }) + ) + + expect(onProgress).toHaveBeenCalled() + }) + + it('scan more', async () => { + const onProgress = jest.fn() + + const targetVersion: Expectation.PackageDeepScan['endRequirement']['version'] = { + scenes: true, + freezeDetection: true, + blackDetection: true, + } + + const logger = mock() + + const probeResult = await scanWithFFProbe(fileHandleMock) + const scanInfo = await scanMoreInfo(fileHandleMock, probeResult, targetVersion, onProgress, logger) + + expect(scanInfo).toEqual( + literal({ + scenes: [], + freezes: [], + blacks: [], + }) + ) + + // expect(onProgress).toHaveBeenCalled() + }) + + it('generate thumbnail', async () => { + const outputPath = path.join(tmpdir(), Date.now() + '.jpg') + + try { + const metadata = { + version: { + width: 160, + height: 90, + }, + } + const args = thumbnailFFMpegArguments(clipPath, metadata, undefined, true) + + const targetHandle = createLocalFolderAccessorHandleMock(outputPath) + + await callSpawnFFmpeg(args, targetHandle) + + const fileStat = await fsStat(outputPath) + expect(fileStat.isFile()).toBeTruthy() + } finally { + await fsUnlink(outputPath).catch(() => null) + } + }) + + it('generate preview', async () => { + const outputPath = path.join(tmpdir(), Date.now() + '.jpg') + + try { + const metadata = { + version: { + bitrate: '50k', + height: 160, + width: 90, + }, + } + const args = previewFFMpegArguments(clipPath, false, metadata) + + const targetHandle = createLocalFolderAccessorHandleMock(outputPath) + + await callSpawnFFmpeg(args, targetHandle) + + const fileStat = await fsStat(outputPath) + expect(fileStat.isFile()).toBeTruthy() + } finally { + await fsUnlink(outputPath).catch(() => null) + } + }) + }) +}) diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts index c1bcbf99..51eacbe2 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts @@ -11,14 +11,30 @@ import { HTTPProxyAccessorHandle } from '../../../../accessorHandlers/httpProxy' import { LocalFolderAccessorHandle } from '../../../../accessorHandlers/localFolder' import { assertNever, stringifyError } from '@sofie-package-manager/api' +export interface OverriddenFFMpegExecutables { + ffmpeg: string + ffprobe: string +} + +let overriddenFFMpegPaths: OverriddenFFMpegExecutables | null = null +/** + * Override the paths of the ffmpeg executables, intended for unit testing purposes + * @param paths Paths to executables + */ +export function overrideFFMpegExecutables(paths: OverriddenFFMpegExecutables | null): void { + overriddenFFMpegPaths = paths +} + export interface FFMpegProcess { pid: number cancel: () => void } export function getFFMpegExecutable(): string { + if (overriddenFFMpegPaths) return overriddenFFMpegPaths.ffmpeg return process.platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg' } export function getFFProbeExecutable(): string { + if (overriddenFFMpegPaths) return overriddenFFMpegPaths.ffprobe return process.platform === 'win32' ? 'ffprobe.exe' : 'ffprobe' } /** Check if FFMpeg is available, returns null if no error found */ diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts index 724a0e02..bccbf0e4 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts @@ -29,7 +29,7 @@ export interface FFProbeScanResult { // to be defined... streams?: FFProbeScanResultStream[] format?: { - duration: number + duration: string } } export function scanWithFFProbe( @@ -215,6 +215,12 @@ export function scanFieldOrder( }) } +export interface ScanMoreInfoResult { + scenes: number[] + freezes: ScanAnomaly[] + blacks: ScanAnomaly[] +} + export function scanMoreInfo( sourceHandle: | LocalFolderAccessorHandle @@ -230,16 +236,8 @@ export function scanMoreInfo( progress: number ) => void, logger: LoggerInstance -): CancelablePromise<{ - scenes: number[] - freezes: ScanAnomaly[] - blacks: ScanAnomaly[] -}> { - return new CancelablePromise<{ - scenes: number[] - freezes: ScanAnomaly[] - blacks: ScanAnomaly[] - }>(async (resolve, reject, onCancel) => { +): CancelablePromise { + return new CancelablePromise(async (resolve, reject, onCancel) => { let cancelled = false let filterString = '' if (targetVersion.blackDetection) { @@ -307,7 +305,7 @@ export function scanMoreInfo( // ffProbeProcess.stdout.on('data', () => { lastProgressReportTimestamp = new Date() }) if (!ffMpegProcess.stderr) { - throw new Error('spawned ffprobe-process stdin is null!') + throw new Error('spawned ffmpeg-process stdin is null!') } let previousStringData = '' let fileDuration: number | undefined = undefined @@ -409,7 +407,7 @@ export function scanMoreInfo( killFFMpeg() reject( - `Error parsing FFProbe data. Error: "${err} ${ + `Error parsing FFMpeg data. Error: "${err} ${ err && typeof err === 'object' ? (err as Error).stack : '' }", context: "${context}" ` ) @@ -436,7 +434,7 @@ export function scanMoreInfo( blacks, }) } else { - reject(`FFProbe exited with code ${code} (${previousStringData})`) + reject(`FFMpeg exited with code ${code} (${previousStringData.trim()})`) } } } @@ -483,16 +481,7 @@ function scanLoudnessStream( filterString += 'ebur128=peak=true[out]' const file = getFFMpegExecutable() - const args = [ - '-nostats', - '-filter_complex', - JSON.stringify(filterString), - '-map', - JSON.stringify('[out]'), - '-f', - 'null', - '-', - ] + const args = ['-nostats', '-filter_complex', filterString, '-map', '[out]', '-f', 'null', '-'] args.push(...(await getFFMpegInputArgsFromAccessorHandle(sourceHandle))) diff --git a/tests/ffmpegReleases.json b/tests/ffmpegReleases.json new file mode 100644 index 00000000..1e6dd117 --- /dev/null +++ b/tests/ffmpegReleases.json @@ -0,0 +1,38 @@ +{ + "linux-x64": [ + { + "id": "4.2.2", + "url": "https://github.com/CasparCG/dependencies/releases/download/ffmpeg-binaries/ffmpeg-4.2.2-amd64-static.tar.xz" + }, + { + "id": "4.4.1", + "url": "https://github.com/CasparCG/dependencies/releases/download/ffmpeg-binaries/ffmpeg-4.4.1-amd64-static.tar.xz" + }, + { + "id": "5.1.1", + "url": "https://github.com/CasparCG/dependencies/releases/download/ffmpeg-binaries/ffmpeg-5.1.1-amd64-static.tar.xz" + }, + { + "id": "6.1", + "url": "https://github.com/CasparCG/dependencies/releases/download/ffmpeg-binaries/ffmpeg-6.1-amd64-static.tar.xz" + } + ], + "win32-x64": [ + { + "id": "4.2.2", + "url": "https://github.com/CasparCG/dependencies/releases/download/ffmpeg-binaries/ffmpeg-4.2.2-win64-static.zip" + }, + { + "id": "4.3.1", + "url": "https://github.com/CasparCG/dependencies/releases/download/ffmpeg-binaries/ffmpeg-4.3.1-win64-static.zip" + }, + { + "id": "5.1.2", + "url": "https://github.com/CasparCG/dependencies/releases/download/ffmpeg-binaries/ffmpeg-5.1.2-essentials_build.zip" + }, + { + "id": "6.1", + "url": "https://github.com/CasparCG/dependencies/releases/download/ffmpeg-binaries/ffmpeg-6.1-essentials_build.zip" + } + ] +} diff --git a/tests/samples/name with spaces.mov b/tests/samples/name with spaces.mov new file mode 100644 index 0000000000000000000000000000000000000000..b650da93f872d3a7104831549032fc85f08b2751 GIT binary patch literal 40226 zcmeFZ1yfvG*EQO>1$TFMcPF^Jy99R&?(P~0lHl$V+zA%kg1ZHG?c1Dlp0~bxZ$0Px z1207tO|kdv&6;zLHRc+l8UO%bSh{&TIlGaN007{CzkdQ?J*~|x0D$;%dvg;vQW6M} zPXqt}-~%)OCb%1P9Rxrm5cE4HG!!aC#Es$vyxi)yRKEVXY;0lx=nr6el&vHrTBSjZ z0_~-p2e0d7&o$GDoGR=L>w%KpFrp7|y~eA4J!b~eC5<}JKr^HygbygZD`%Jm#5LUn5i!%Tcey^E7jP49adH)17PceI@1eXe$;IoU;u1=_Vp-sD_AO53KaH@KgI7CZJF% zHgjr>f8mePrKs!VXTqDMc|~>C(aO^4Ef;p-w>nkKCLTx5?utQ=D&=;ffn1x3bdARy z680)x@3hSh<|@RxAFSQILH2$WVR3tP4AnCI)x26vX!gyAjY$9EMGq(_Uwd}K=g}L{Dfg-k z`PCANqH=NYVJ-GCw$CS5x}LOR!+(a;OW1e;0FY;t$e{IA%Ks!J^<(J)?RaN`kg_@F zS7cDcMPHaP?rlRot2S|CTuBI*M?<;Kvmj<+K&$8I@ccRE3x_dATQU5cj zwZEhdSl(|H!UAVnGMsQ)m2eF3qPs|4jwC+AnH~3d`k2-mB&%elw0WET(=rzIKctB` zS@EG)%#kDTbX9p(hoAP1F;|xXp?b6N%1(Ki-7bavq+8MVQjjKU`yuoa5^sUb#FtBr z?BW-N&mzH=nr6g@;NHQR^b~DQOL86yx6SLnI(`@DdWvCK?|%3QtIg6Uro_CD+YDY8 zm^As;iZms2%00>;#U)&d+K(Wj8X=7ir$a_aFtzioiXmAUMYx2jEG#y=0Z#clP_FR! z{B@#W%zEG#VOpk3FHoKDqjN}L?_h=zy}!Cm%perYc;}z(ZdvtAZc?yANFx&Vr>8~{ z>({ylp7oH5GZ~_yq)Smq=|5YM24+K^&op7lFnN@k2gg~0c}RMOIyu2gijdYS+&#+~ za)y)2_Sb}>ah>8OOhezqMoQ4N_DB9az8SY3q7BLUpr(HIin|4WmeW9|In7Ka^0nQj zyttutFF$ali@3ZTe*L5kcPMRFL_xOfp&y&Da?d?Yup~d~e3{0yyah80_rOax@SG;l z8yA1#LJ;-2M>eGYF~7}c8jK#x05e_?JPN&9ei0X05`RtIA^ZbFUj4|Q>iL?+BH?R? zM?2V?`*U|E^O6O>g|YktB@Gt;eA}O}EAXaIb!Ug15IwT`j1C{Ci!d@YP(x1aRV}qB z9k*urdD-oSJ6_63?fX|OsJd|EbPFeLN*i*;Z>RdQC(Lz(Y0cdPER4T#0uB4alp*jf z?M)h7%xw?*jP3FVy%lLKhKv?*I=2}X-P@_xw@q8^b(?-`Ay}^lSCrj1q{+uWFzoPt ziDsm|XH$*6>N)Vvx}ZH~FLB&5B6Pf=ETVs}g~ z#l`^895W^SZL8T@rfo+_GFfksq#!9+^1QQ!`;fwofXrs-E_x4ib>$fyK!=T*-~pS! zxAL04XmCb#E$9nGw2x%61Zy=$!bz@bjQ2c|VmP#kt|zpyNg@v0pRFS%-_oK|rTK<; zAMrAza75aWsvy#vWt&wx3t7{7dlPaR?}UoAk`y;xYQbgDq&C)RE=0&s_qe`uIxmGx zqTk_wIqCW<2kD`%cDkq;Pqbdpb&Cp0x~o%4iS}RyJpC3OMO5O4?b^@s+({MHIh|zq z=cGG!`|~LmZ7FHN`I3-Uyb2y^69VnZ624G^LxOPOv_aj~>!48OZ})$W#JMXOUwLnw z-un7k$(X2f*`gjd!2&NkOLT8O0dnQ`c=I?`j-fI?#Dy9AxZS5YQd`|~A;?SE60hAa z7p-5}r{)1qWSW8JKUf2V6VRE*lG0+@{fCmU$@gE32tF`5 zQ$gT+y1<2_fA;rlrjTudfD0Gx_(~XSOQCb%!De>7Sdrk?{RN&cSL<7XH?Fp-A48_8 z5}&^{n2OWKbBc9Wo~2@AGe2g5)=r>j`7p+I1txSdYUQ+>ZWE9#<0!OuHbyT-Yl@%J z)J#1}tswF+>{pimOS(bJc}Gc+A888wi}k38qHj-3kom#WAYtcVQ*k z2#mPex*h2Y?DPj}oerezC!UDplfHVPghD(`(ZB}iLIN)J49Q~1vL!Lj&swm>@K4Bm z*k0RN$vAnU!(M7MXh|i5R01mR>Do*4241swgqo`24Bg$)(Qh{ze64nL%+k5FR9J;^ zZ_mkh>)YB5;I4$^s!rP0+p53kH>Fa)zXW#e&sPEvb(;X3HUMw}A(#sm(uE)q@uv%# z#DH6tp`*U=O;X!b4YDCPGBC)V;Zg2M{uSV22m?0VJ_#c#G8o^lI4-;82IIk``eoN_ zCRfF6uE}ndG}i!M{B#s8GA4ID4;Xs z(p*unA|nC=r%8lYdEb0_bcOwRH)<_6|79-*D3fl%q2yhY9*w#L9w`x~Ct9(%R+5uY zS4JV!zPKmBs9rP$F6YTX-3Fu>^&T*B4V5Rp1~N*J5U(2VUb<-~eP$$FZWw-OgVOBI zWErwtennC!s9V`cFqz%I z&E_ZKc{hEu&j%p3=aV9&Vo(iWqCz0;J6@lk1-vA=R6`+y0RT74^PSJrC+w%}r<|J% z{VW$F8qr~?kbrLVRUw!@GH6C*|F*1*V5LE(=vW(BU?`A6V4M?Sn55Q` z&VtQnr)>_NyHd>T!M5ifr((A8x(z8x7obQUV94)xOb}8aPHin6mi#ok^4`k?9AQ&>La$zdn?f65E{PA5`|r4OpKj zUWfKqw5eW$LDZy4`^E0V8SR53a=>C?@Y!-#1?iKK|04C5g!%~xNYFAUFffrqm9Wzb z1=yVcH-G4WCx9LY5Ql3%V4_ATpT_Y4^W)qcA@C$XJ{naSV$&C##aO>MNIXz{gd;MS zEWdgf6hoeB00T7yt$hfns056YOH-zC0sy>=trT)NzROaS7JcN6SEQsL^J8MDhAIxp z&j}>+Lxuy34jV1SegFUj)B)fa*ii4K^WQilfS+_56{Y)0`&B=-8wQ+3lZupt{>}02 z>tmqQE*!&jiCQF}S6c~YgI93?sZi*?4}))(MJ4jq{6GOc5EQqR6d81XjjIn4ska+= zZeNe9sEAU^wvBzE>B@3gu1OTl7gtUoTs#UJp97%LJFsiwg4xJ*xsg@sX4lKTyogP$qdG_e%H@Ag3^rJ4zbQI4BTnP0 zf}4sG7q|6JI9iJh5$GO$P)+xnqBb?Y#$So{%VbBej=s69ot!np-$AwNAx!KP)MLB2IH8Z2YJG&%3mPZbLQiqK(9qU@Ta!Z49b6Qtw_Ge}^N+g9<)U2jN|#Vaud#Ql zS4%?9o?^w5`qj+hk%@2IJ8nC$WQfzbjj!Y%5jG*sJKFSnoZUF?-EnKeViD)9_{JIL zDtPCp^LpsRcH&?>07)W&^$*-iv0edu`XnYzhKoQ zne-U=`T2ios*WHT3F-+{xSSxF&hn?a5&ml2Ql~7W`4d8Bzy5J4HeAuIlXk9!ZJD68 zTIu`kBtap0e|~Aq0sb&Ie@z-)r=n}X;9_Oog{_;(S)56+8U3@U_b`(&(y4fO=-gzeI&R(}wEk{oodJvkH2 z?I*yxNre5aR#BL>mSq_>_sa@ZcmQx*EBeWYIx@Vfh4>HIjgrY zhyJuhu>FDq6RnRr6Bn2w<0^R(iRqH)L{DK1E&{rs@DhXt3xuly-v! z;=*Xd95vcSu$Du{Px}>=dj%l8uzM$@x}X*bG+Fea0MD7mT(th_m`X|YDwz4JqgYE!24`^f(P{Zo!OmxQ)KF#L;QHeo+2t)5n|AX7`2ZynV)0E>2o+E>y|+IY zHn_ln&9`?X0zn!&YKX2^4es^163}0Fj{=^6En6vY;$Er^{tY#|f6d7QqC@F~5>~Me zhLzIt;R5idPEPcX5Eu?i5eWZy--_F0R)ys(4UISdt?}r<%Aibf;eFfe%ERli=_jSc zrJdakwzwg5EGnuXsh6Zpd~sH}8^}potUzJ1!H_|hV^6h8bNuLzm_#T;^fK#_fR_M_ zeLP>7(PLr4>*G{jHe7Xm&11V?bi3{JjU!sGyhgfUVI$4aR|$v9ME2Z$HX1pQK_ccZ zby+6`ukssk*QL)p70=}oa)DPDDe1sot9>G+j|4qo0Pv!@M-=4)1vDr9?C@o3z~iyJ z*q#9eq}dzT`R(iZn{SPsaTtj!ia5~vNol|m78$>;cmFlPx{s8j8#nqRAp#sEngl|1 z8!bhmf%~*fB1#{ji8B^E6$3*PUndYCAqvX?N)$~vlg5mQr0^yY1P8Spx{RUKpA2J@ z@0b2y$=qn|Dv3Q8@uUjtl>{)?Sl_B(tWj7=BtkfcA67e^Yx4RV7J_&LKHo7X0&aJV zkck1yWY&T|yIdrG$^?mNrK{n^DfISrwFq#?;Kja;dilB~ln}iIuE(!>e&Q}@TFd7y z_myez?K-;>XIv%XjtZ|=7oc6-fN}0t)>HK`5fBMRZoPtL z!U!hKfPdY6aQ|ctEa_g{IKH*20!NOxb(wnogdq`71D=QsRE0u4=?U6~SO|gye7>NG zgvotX-Ve|n6!}2!m;;E}Jxu=7>ZvVNZjIk3lk5Ga;>WEa{IkUtMqp1ZK+2$Vbw5Y! z{y2jDX@O3DM>7v8G;%cgm#agdk2&6%%Q&LPO@psCzIy1j?Z#fl9w|vrFPWoZx^hY$ z6mK>T{qdHKW}+-VilHlZGCj<{m8=u#E-8xATUiFr3cOt*=5O9d7D1|j@Rc;7n7hG5 z&H}O7?NKPY!Jp>(rjh+iDyCarM}Z^XJ_Wn3xEY&DfY`8Fa&et*-n-}m*u6Et<3zjqiL z3-MZW`AsD4$wi8Ii-!(AJ2Ck!z6|}&nLovVIYmmN$)dgS>mTK@P|6<6kDOjs?p#F9 zHbKZcsN-PtV|STY3$?y`({~!_tV5X|VO~BuC1(7R!Y#8Zjrmcfx)koK6czojvbm2n zWZICwZGLvflF~QzWi&}#l5|5qjlgQLO(XOYp)O{R;K>KPBAw4)Q);a0$jIA^Os72W z!&M^yK1S0-UHwQXw&+rM3skZcJcrSFp*Ee`&?73nCbmj8%vVY(S2Ew?&;vxb5GGyl zj=r2?q1Bx@^f;~CkAt~!#;62Pqcx(+9g4F`^laz1oV z;Zlr$AseEPneP}f?Kk5|8D+Zj1CcJJ)3|}GpY;)g*l$bFILPB847ZsNT^bcVc0+;! z<&nLa(VkoBh0Y zW0f14mz^sPv85Du+k_~m|ywai>Sb}XHDUv!17)LF@bNZrhDq}Lf`5tjWX^x_Gk)2Er0ehEAjIPcT5oSiQT;+XUiU(o$dyF1mT}E-rPd@&0 zE58$fA!k$hDbBrAW(eiwI9JsdCfTcWPivY+gEPimR?8CE2R`K_p7_2Hb<5S#+)yIq zj;O+yHn1<)ER6&GDU{CjS@<@I*)CG8oJtM6eIo|Rx#KU z{TWVzz<^}maw3dl-R+rRvKWQNkBcNf5gRxjNDRbndf(-QD^p4N1_;K?7;1QSJ(<2I za!c#;{7>kgdMxtNA9QjjC*5e&?i8f>4#}js|UzSV@4?_Sxv_cS2%n!{r9=D;Xg~_=> zldV~M1nkjg_6f`|pf+Rprw3U+HrMEZ*!|3(-4~W2>@U^7XA>!5-?n%C_zd0 z*B|#Cltv!JOub;4vhV_F=i`egnH6ZvhDUTeUeJ(A?>7;B_A}Bz{F^JIAY=9C^P$m; zwFR`NDw%ISAs7hF25Ovl>3`;}c*9&X`#Ba%iYui1(Mx+gRwK*^fe=$S=xX`dgRO+x>S(#=nqEb%19a`=b zj+fD<1I~9>%zotp&D#`GaX?F>g{yHysatUk9nc5P`x*Ey-?Z&q}Ij(NX zBz%0Fx;K!TP>kJUdw#LTx`wV8uP#j>6l@eUln=DJpt5qTppZZDL(!Xh2se~Qe3&L$ zeYC)`K|Dx?-qp+pECTVh2CJHj8%=n}d0}0WKhm^L?}UjKpXaeRC8Rv9S*y(E|4%uJ zPzgrTkVA7gULOku(lT8AIl4T$)LCS9tNb(+G0H4DiqV*>zo2285##n=>6wYRz@<_c zV7H=lzNky_#QS2eoC)ml>f|UavXIMo`0)6Ik2)QQ&=G6IoxcvTvbvwx|4_M z$945-3Rd?u=6>fW6kl&%*e(MNq{VO|u~lpqr-o82#cjw6J}icL4(ajl&WR?l6S{{b zPxbT%&!xIozI0(pBcCgosujGwTdNBBai*@T)d`TpWf!?UChUJ!#|nUF7R=%rOiWL=od8o>kUr>p0jXmq zEIB-ljL)Tqu}I`)9TF44Nke>Ezi_NolWI5I8>y&AKaYMyHBKSl;yAo!$)mM2TE;s^ z$Xi`l@XF3l9vQepm7CG7&2ohZSZXSJ<)qcXdJMc#3Q$1}y_M6v2({N9rOmZfj>JT{ zxegvkxN{jV=8Hai8%F8Cc1%-mPKyt`3r_!OLXBw~a&6YogDb>Gof`xB$tTkmjU##0p`dXlTK}XG|~w;A0CyY9jMh zoBM*2d$FXXUQPT|#U7K5=0Xoxc=LzgG*Qq%0ouBN|7=}iXef!HB28=4*Gr3tQy6~m z6yME0R)e-L&F=NGtEZ^?j;cUL(UM0(s;eNEnXTqnz>9QhkknxvPcWIX70?)>1{mOL z;!+Mx3;-Zwd7`E5-LFtl!Fq;ri8r$#T8? zFrkXU95>-TtOt|saVB90)5aCnJ4`R8A<~slQ78mMZIt!oG(<-7C)$7!KgPz}T{tws#Vd|y3bsT_lhEi$dcGjE51Y4*HA|Ha752zt zINwRp#gMFZRnGGA*CEO3;KGrw!%V+y*Ew3Ug_gq_C2?6OL?I>dfwh;wa^T`q_saRa zb$o&@6e{wG$anHrX_Sa6a9Ehzd=UUqB|MqnKSBuLX&{FvC3G0`8=OQ8QQa2BWH@Jw zf!m^csNJ8lUvurexcGehwGI5dxZp$Lka~ZblIHg%1W>;V<76fbQC*)4^CU+_GndSe zJ^7JIEHE?f)3#g4}@>-_X>+$A(HRv*6#xvz`MO0tPc9)C|Fy zDql$|j`rFj>|L%m$7xC&@8aVNNe_dx*B4t#%O#SI4V<=HzDtecPSQz&g&phI=@g+^ zV?j=sDK`bY6Ci zO$4b0BP{#SkNr{ENF})Ga;p)huiz;{S-hW%gBNP2zgYP;gnvF*?Cin?8@Gm|h>O-5 z6f)*oQMCKIH;ik3RDtv>@r*x#gI{{!b%czWV0NCR~0l@j^N{UzWaOS?w!QmDe_Ioy~h~YX!NyH8b)1w z9R^Bndcjau45DahjM^Ui9?cG7y3jp$TP>Nu(Z}Yol8D}hct=raMcQK=bXFOxDlZ{m z>TBNer}?D^OFp*|%t?r_pxd_4`0Bl6y!&4zW1l*}puM|N1C%PFVwl(&>)9$#(mXzE zFf*SX4*73}M;9%f|9P>ayhfK&^y}UP0HAmNav4xBFN33v&2NE{>S2bS)bl4klTs8y@fE5g zoOMCP{#N8+5AvDUaqpzMYWtydTKe;3L(bo-*Q`ZN09f<{4w-Ttl5Pi=)cM#rnmjRp z3b=Yh@PC$Gp*mNd{{Bo1&@D6HWz!=Whx>`rw2+sZQRX0sHDA4&vTpZO{M2iCNLo`tFdhreZeZ9SFA0|#!Cxl}$)x5!KS2B6QyJKI zAEv=%z`nTfQh*v|RKvm>YI2(Ci^O zN>HVo83UvL)FtCw&D_De4GTlcyude6X#2A;Zoah)F~avxIoXV2RanZrlvDWqW{BF}nl!x_PWjsMg9p2QIft7E z);7+qfLaZe{cb!5(}Yg}9aL!(_E1P7ceEC42QK|S^ZRhByyV^_R}~w(B<*FfohhHc zhek2$9|$QNm16yv8||0GL;uK9E%PAWG_pk$)jtJirQ|lFMv!b&a9^!7 zBhPUYo)We}p7eUVOg9o!Xp3KXf(Db^x6;&wcz~%B>^+vHg4R}3A^wFzm zW&9pkO+t6mv&EFkeSpaq!;NMka4nvfOW5)(Bwg@=M`OOs%$0rWan=$+h^$`i(>kPz zlD<=EH`-p^m@*dGM}6EfkVJn4ow?N_g_|B_M?iohgd{p9RSk#COqKKry)^(}K-A!B z^xaQw8n7Rt^5S_h9_r4~lY3U-3w$- z4*MQ8x;JXmZjpOflEGjBLw3Vsm}g9bBfsS`6k@w{I#BT5))z>I@6L~U_H9PI|K!67 zwR2^h(NX(@QIKlM2t)cCI*(%J^nJaMuoMom;N5CwO3QAepLBqn<$bQ;9mCI0n_cD> zc)f{JcVtp?+e!3>#j6{&Q`iUQGm$ps?zv{SG<6@V#CvGwC%C8+P>_yNdXrMkdqk!S zw$B@si(l;XLE8FMd<_d?q5J8VnDi4HTZ6}Wa;0+-%#C@9efkqW!*xfBr}wd4!L{KX zvRLKy*Th`8iKo}T{fIBWt)Aiv!0$s|cC2j8je4U%32oTSC|2`OnF){iq?=NYF1Tcq z*>HzfDkWL=rnj!7yVR-?8A*u4k}RTV7BDu|l2`@*^VTr1k(2qLsbx?#`Xk+#7&^tC zb4HTS zhXFSn^;nt#S&>;6@q1>m_zV{}Qqen#>e*%pEh@tID<)1Mse( z^vuq1ix)FR{biRjr3~+xMrqlfDkzbYN^b$`Ps9liQ7IYa7CQz#G6Y664c$H2UvL8O zk9gs`?6Og!^V=$%W8taOt$S`YHOsW72Iuh+?dcl1v-@$-2b zB%T=P;LTqr%k)*uyKJFhUePsKw2wB(jEW_Iw?%pSkNvGT9&>J|vs}Ee*<^zvNi(Y! z^lV?F#yKZ9N*gWEWfrk1;cn8)_@orbRlF`N`{vJ){mrWR1AwoKC} z1omyuKlu*vkwHu_c;Jrspu!*4VT)te63y+g7T}p^lLtM-!nm(k7M2hc$U@9QL24x+LI4Vj{pRq2>`s-t?j6Z)%OWe7 zaY7(G=7CW$1&V+BUefUl2^=ax4Aw`+{VcZ~b%grDLmVXPi{=S-sOZMZn3-sJcs}^~ z3N<=Wk@;-8LG5fN93%pyDm)C&4U~ts(=r*+mh1TCgXuq25B^`uu0MBd!Y9GxU!ve3 z_H$UX`pYE(ijpjUw9bsaypCD5Hfv#F zHSR}ztPzVF)QDoD9?QYt@kt6Ph{cDVek^|ELtLQUu2F4#wBtaX$gfY}`i!6b-h9QZ zb6aJe5sA9M)!{DpewL|zqdBrn%~9&Uum-0J-e*gOQqj(yKZEJW<*;AnrQxmMA0g-N z8`M<3D+jxcsmI-2n~0#)qn{j(5n6Zt!@g8inTz4?1pQW;K(cv7QcsRY+x52Az;N5r z`eUiSzW5PMeWGNf zwcg!U?dW zih;y!JS)e5uWQ0DV`(fjpp+z+nVClmJrrI1{2FC)7$G2v50NLJ>nfw;&XwrQ1P>tb zM}`#H~Fou zs%B_g9yMB9BIpo7q}4pFTKo^$xnS;Kz&g!k51+X%gAXE(#ia9~4dw%77QvSF>&slc z=zULFN)pXoi%HlWm(zNh7Jez-(;2Q*Sgavpf>$fFdkt;?C(LmPO*HNSc3;O2ryJ;v zfO}vRa#OhuJ!jlF-g9l~NuO|N@Y;V<$vy4Vw@hnJP%M;>y>7V&j-w!=EX(34Tun z;yc;}OOTMlvQ`^(`RfV4dKZmGVt7G9DXDc>%y41h=Qi27ORnk;cEXw8!ykN+9bp~% z>(q&N-3w|Z$ZGQFNWexLgkeIBXBO#5KsAGc2KXp52dcII-g8{CiMu^*Pg&SHb+be88YsV9 zTia}vPa~tJ5rL$Ox7d=J&dxFeHI0YgUVbYf`-LK~^{XLr^fSxtI^{JR4&(9SZWdUu zQsv~3%kk|)ndpU1M_l@Tx(<;>bTTv#b3iWkX|Id~o9x+-dTjNMFH2oLSW{3AGkd|q zP&q%yVz6TDo9Uqu|N5!fZS!vsLqq!?5NlBXAp;IX`&SHuQx$G7z_nD3lVbB+SFlG5UDw_H^ z(OY?v4k8dCTVuA^J1Qu@<0J^xh{?4t4TS<&K$(e1EpL3dkL}hzyvg7X?|RfD)rNix zE~>yIruh;0yhxjGw2A$1YbEk-z5vxW-(FH*^&gqgj7_+C7BhyoCJjs5jU1HLui%8Z zT~~bdaLu^cC_e1^nS;v=VWiExkoj{0mgp6UOQ7H}e_1kMfmr4)x2_auFZ^Sg85i>s zwOCwbHAdb;?bk>|pSMiXhS7dvZrsMGgC!{v&^lD{Wz}Y}fm|MHVgcrh1CT$BUN!eg z=WN3eXLfcA9`RcHn9iE41uGB-xDIz}>CTq5ATngp9NpIskYQp1CC>Gt+m6_mq&0#@ z$-PSM7LMnu6~e91LjT4ZbW{l4y_JK#2H+IP8yNw5MnKuIXKb5fU%%@@Reb46jCRX6 zhTJXvYg!#Do;jBoazl$~9#!SYce^MlG-x+b-b4XhT~!DD2WsG9gZ`lm2k(?&69whJ zQ-)p^G(x-Mr+2ELyQlsEMAC@LNq-|idAkMixBgo)Z2qwoq!Tvhycw!J_eJ#Lc1XeJ zhnkYQ%Fh(WVz;_|+1b&?9%rVvJv!i(&?vV2uZ)lG+G7iJr_)P8@NI?Uy zVHe08VAKh;`=Hq~LOb-E5U^RHWa*-JP}1y80_|q;atg) z?|Mk6S5i9ThOS^u<5o2(y*f-8ACl3CH(N5VDl&gE?jER`d7Pb^3eL+rkE5j#P)YmH z#5!FI;(j}vz%1h|5Pg>U2X z>MJu`$rr~l=)kefWjAa(XK?Aq2DDOAy^%rDGw+osOp*z4nJoQGa;0vM%;ParRB1>e zl}fOQ9cj0J9O^Cx%v)JS(mz+PZ>DL&a_NS?f@q&V-!uBFM9+^@_z?OslVj>cWG`%Z=9s;c8T!|wRev(HUZvu z@gw4E)GrPl8Sj*`G{gVGs$#C@Pirmbpq)(2nIA`FdI{f^F{wXN%g+=cV=Hi}2A3 zL=i&R5K(yEQIC_gZ3kvhS@z(wNzy2liqx5^Oyk6nO} zPjO52R+QQDX?b>gCLGqy!1oYF`a?PifV0!hdpUh2la z_$B*g%c3xnfO5eJqMfi&U{yrK4nS(7H(4ePk=`Bv>HdVB_NqsFjU)41a}{J!5u?CY zS*?r>yUa|Ad?vT1o)4QE7ec5gEdNm0K8Zj11fXdD?|Cui|BfFgGH&p@P{iVWA|@cg zmBxt7!e~7GF=Yu1Z zL^d3dG99U}y?(o*-qq(4AMwut%>yWK-aooKj{c^@3s!aYws4%qGXQ@Uadwz3YSb7o z^Fkec#Uj*O_%vIsCnVb(oQx_(aknWI5035E3oEL`j)X?0D}hQr6|{GbIDOLZ1OIir ziW*luu~PHT+h{l<`P;nP6AVE!JVGOjvwd>4z>$icc_{a^k3?~@31Y#6UgkCoSZT>1 z%K(QzRJkweublqkrf6S)YZF^M8FzL$Xe9+JsmP)K!!sN8OM^lJ0Sb%;DXRt*C%RH` zC0RbGGm1+iVXOTnnl&I@9^OP!>I}T%V zX-R22019W6-vJuLy3kQVe*ZH|y1WzI|2|3fI^PJ8!63Y+6V?IH`LAS^=06&AstZ+{ zp^m_xA9XiOP!iS}@dfH0hz6_Fgd8mHvKt%k6aDwU#pbuKE}%ZVx)rhC_G~qf@E2Qj z9XNmR1Lr7ZC7Q@z%!N8sKJdKd^~iKfb=EgCKZ>V=w)LDF?3d+$11#1oscHvO*%0|% zRo)yW$`a^^CJ+>iNPhi|%iSTf$=hzicQ70OO-WRnUMdXrJag;eSFKP>~mlEZUF?lArv9KIke@gh`zU)sSFGy3tZxiuhcx;0G^g{pY zGFKrYSQzDILNH5MxS#5<+-ZS!?lbgJsW0IYraDamRdf@>O?_*#@+r*mJ8Qv-+j4x< zPHc@qy)ZH)cO+MX4h6#ctELbti6O_B9Ux7#4Mc>X=l@sw{9ozwf2Gg=l|KJZ>GOoY z z%1T}cm)j?95yU;T@uhgpmQm$SvHG7knHT80ftpb{64P?WaYo(AZg5=`zWGR&6ae|r z_7G$THtdCl!uBmFzO**Nan%AXyyE_fAHQ3#IK|?a2{w?ML)Ufl=ICOJ)>spKmwrEU z0@QhBoEcwjRyIg>ES9(YL>+$%B=WekOg<#f!4fe(rgTTPLwo%i=&Hv%9!i`Dq=A_4 zZ_6Ls4JAdzN$dPRLXtnFrH!RN)vZg($%LmwaCFtooj zb5ho^S{IaTk|Z*HM!A>gG#07JKTUq%obIL%viTxYA7FodlkVXr!@lO~7Q^c8bJ-kQ z7-Qt;rj}ku6szb!#dk=k;oEZ15GMD6IR>9H<5e1UnNPp-!D9%v6_s&!u;^8px{A*k z;{@q#!d%rz{m*107eFS~U0Qk!Ny3$n97m$$)Vccm6~z$L=@LEXaXhk}M~X&hnS}UrinUmD92P(`OVsi9N;EU9(&f~Z&UC|oxJBXfkEI&|r zv5hznb+_uETO&}do)81y)U(AsjmeXKiZ}tF-jBOLGsOFJ_>blkHu?!e05VMupF-t+ zkU3mpR}NW%cN=zz;Bk94OLnZRF(k@KouY<(0D+N>`12kIECKi?DSawqEs`WyR8X93 z)x&Ft7V_Iz`ZBj|np+}j#sf_E;(hnyRcBo=M$ot@GRa<|+U1s?Y1#{c66?e>(QK%g zwG+hC{&+K492{i(Jw-CvNp-Xg1-5~wTe37$D;&6N-&TD4iGWvhppEo^U_@wOKf-(D zga?>JmIdywKZY0p^|;_>f&W6u0AK$jUb23v0b_9savW@{MOS`mRus;C1u7jL=2RC@ z2COnqQ*v?}?srNC)^4JjqZI78(^M%i8NB9+9a_k)^AWv<$+^{O;<3%>qdgmrA9~k5 z5I__jXLVBGu9x}75fKl61bl3@JT)Eol`iDLmSCP9HYC?HYJq@GcozUeydQcB^%Gi_ z^_R1fQsumbTAX~xwl6}A5J)=!=le$&&9g*J+YW?kE0fS9itysVEoQmIe=NqJ=2;A$ z-WXvY3V>RpA4DT5B>kfamX;;ax??;{soe_~+Ww*T52=TilYV=*Mi>2pJxo5f{ujfT zs{vY(W*XZ$E|MCo^|50f`7s$K*pFkRdJ9!OIoEu;{Q^ub|?~GsDlw{Qz7NXF$xB6pO8uP{y0xrMhh*<|g{w~7hoZR+th zI)jidya2hCViO%Wd1yAr21FP*(}9AB-t{WvTuL9?+=82OKCBNW%}zqY{j zg#?T+uV~F(Pmp1B{V&LHMdTpD8KJNbyCASdIu;1`JHWh?oWH?|(iMFE!C5xe`668X z*%_WM4Kt74NK1R}TjJNaZp$)WM|2ZpV(22f)lP1lf@oWQ{J~+_f%qC`ONfnQF!tOM zfFZ&KKl7bPFA9}ugTgdsk-#qbdC8vsrtdAXC0eMlG%u^oY>*h7&(;*OT`%~yS8q56 ze}j{(m8JN#j)Pk`=EXEv9V9&IYb$Bw=#RJQo8d772nNl`5&-3`YS_c9*~91jl8@`< zQeEO9Z@BU1t`h6IX%I z6WIWKE<0DnZ$7u;UtVo78%b%B%ogC}5zas^)Ct&`3wMf11y8234vIws&NUOFDl~8lIq@;E}_J(mRX-IMo5lH(lT*dG(*0703PkumRPrbbZhTD8408t@4`FxN>L=}Wr z1gP5~o^<9#0`4Cvwz-g-v zzM@R$KqQweNVddEaj^cdY7eLK!Bn+66cra?7!Vjl$x1mRopTlGCULN1*KBUY1ZN?` ztB8GhKUiJ+M_p%;o0kEeP8X1`)-}u1%jnHy{C17G*dpy}>t#*8Etev3fj&z8g%}pg zuQwR>(XPkmMJglFlJJ}>M|1&Nj$F=YO$z|$SBv`Hj@t~mYODCQ(DdxZa`WZ56(%|L z3k%`52pgCSLY9KpK+$cRE(VVn$UvrrtG=Y!R&4wKr@gNZtE&0_-G?q|0SW1n5Rek- zZUJeKMg$231VrK>DWOOTN_TfRf`}+3A)o@HbfYw!I|tFP@B90`-rw`w``r7_yLlEf zd-lwl*%NEene~}9jPr!J=xfIEISK_BRgT*SBgbfJaCg>bql)_yXthOgXD`o$9t#O6 z>T-uv)dMm4d~9scCp)-)EL&LOts8Y2f4JP87TvlWC84;KbG?$`i~UndIoG!f(2`F! z!vTEwx^C+^I0gr&gWFm zBI>}#xP#hU(_bDEd4aRt5t=p*gw5y47 z@V5qV4NG0kf_2gA5=LlV>d z4wD{dD~vvY$%iuRe3an;f1)Y`*3*7$j$0pkh8x1fgu(CO-Ef%Xdx!^A!!pQjp_cf* ztaioS>k@ib-C}&BnyWz=#pz=66s?9_$o|=b$F~j8%!kV`F`}wI91=uo zujBY0&)wIFc+SjlDAQ(F0l)NYIP`}pT~m^E+;$+2bWOd3%2 z-UKNYX`)!8Ul?GbUVUSyVC>%n4Piji<#TH+;^WGVgnf_7=;CWJx1W^R;!KhJcVw4Nm!7OJ#c~9q#F@#Gc@#4O^G8+ygVYqhag9?J7?;noE? zw%HKAlHe|)p@Kf24bkZNoaDX7QmrX;xWuvAWq} zL(VCRfR)c?2O!k1@K^)2#9y#4%DM|O*TnFl3rbN|k(qL9fYH>2H95>BVEc4|8% zS4vg3XqQ$;625ek7jSs`2#QUT27>qb zy5NvS>y{Gd)Q(}ub(4|lqMO9a*)F%}hw3?g-^z4Lw0r~X#W`f^reP$XK8amaaE1Es zV0u?4PBp)?L83B1E&BqYq5X_dQ5E;rd5*5WS&3t$F#z(zES;RLM(h19h0MAS0z0qA za9V}Fo#oQ+-;=AX!|T=3;{DwIh)=redETQqx%&eu3{v}?=Jafr5aW&-w4|j(67{ENzR5qJAnmV)KTPIN2YDJ5hrobMv|--7am1 z&O)R9xU08|@5K~GQ`=pZdr~4w;_q}`(Rl!+Ros))iVhx01%wWMT>{#S@@su9nLP5#KGZAT2%^J)yMWI-Ga$*uY*vug%@+%R%n!^m>xwM z+!nM5IPR9~V{LX(=jueC7x)!48;_g->*uGqgJg^cB-dl52rU)gwbLqww0dkAmDN~9 zzoFz}6uq#+<4%F8BHq6!)wIAzx%~cFjyv-{`IWM(Uoa7|yx-*4-&8E%wdoWDWiQ=| z5@fw3a0Smc51J@PbVX_NI+}WR;K+Mhg`m?ZiCw{Y8iMnVSVx6odWpi_; z45G=nYpp2x`O|)LTCu_`kZ&Fl*wR_)^!a7am8v{92Ae;15ZP0hh3JMqYjf&5MBkM9 z0giA^a};jDEJr$w2McR)@`VTG&Aq|eRPFOSBKNQY?Cb0V-&#iXIYw(MwA}77VugbY z+E1Yt6wj(`?WPWrGnYM|x5`I6pCH2#d8LZI)b2C?Kw?z(YO>2hAiBDKa{_KU)=W>Z zyjB3#$42BQC4R(gSAo~f*+_xlqTs?7cTN;1^fh-EpeAeYz(*TjJR_BDdBz4^ z+5HZNxwIgLvi9sb7W^JjDfX|W@Any>f5C@yA31$-+S67Y#-dl-hx{ZOeAzz`hVcYmD@j`{6)O$!|bgh`6sB$X6Ryzrv& zX+3j_H1^f((D%_9gSVf4{>wCVpmY9ny3Lb350NOF0Tzm-;wApRbfrw2wxqnGf+>U?l#{;nXRQmUqo(7 zGZxKFQZ$JY6nO9foO`yc%CFIm^&)vIIT7@bSQzu{93hH;u`;%&UF>|rNJSc2h~$2X z&isAH(dsOgD<a`%5FPzG zOuBLDTgL-}QLl0_Ls=LD;}eTlS&i@1pWFGlX(yq=I*!T4vdzkLW1o0xN=Ye58CKa@ zE3#2mSnC&%SieAD*!PKP3G4LK3S7JE^jgGi)g_qrV}qlWEn+515}Waud(6FcJs^Mq zy(qA`E(90L3zAYKZy9$gV@Hcy|Ng|Z(v^WbI)Gv7Peb6!PjCzQ+>i^ZHmsON-dRn8 zBUp1|CU$T0gXI&O-f*g$o=!AYMd33z3r!lD7*~c0Z*Z%KSR+9*>8EHFq=1az_l=eH z%y~YH*p=YU)4yKc=!}`i^X%S3xiIOrST@olLh2Fubv*plt~)o|G!Zs%lC7vSFpUfp z!J>(dk6AC|6ZcKH7qyf;i^NG?Qa~VB`})E6@2Bp|tZL;1 zeKd-+QFRPT54$$B+B{kP&oIaH_ofA~{1{rj2?AvC$S(lFN=U5EsY{FnK5@VjPy6S; z1CaiRSw;!ETLx5VAyVMeOCjoTBi#5;EhF>;3W6erI@DC`Ua&(rV8D)+nUcXY#g^+y zGCWH;UNhY{uaV#u>T+rG^#RNCpxlea=jECK&!$u82gS3woQ}BmOFLoZwUZ9jL@-iPPd*ac!hmasXL?7MKoS+-T*LTWz=&5?0ZLR%M{LTw&JeiA+%591}MDVRH z6eM^bPH_+HS&WVJjOsN{D%I)G}etSFA=Z1J*C^Yq+W|1ZQ z>X`cw?z?LgMqWIQXrCoNJ3jOyBXc4GKIzgIqgkwHDuBQmIf zU5H9B&Ci`pp^<7!YE3SBWVHdEF5i_2C7IBL-xFBcQ0NGVo@rI6hI!5vT}xd>HF|6( zREGOLFu}!>(Vw&IppsxvOMz3%uWo|0l}WP^S1{k47S4R-s#3%`ly6f(8w~3q`FDx4 zw7bjsw67UDD=N?kwo$M-Ti$+k*eh{^hkbQexVtv@36|aX!}w@yimicXR18(u^tqzv zuC>XX@wBb-CB@r)gZexnZREP)^(7Nb|Df2X+hW}oyRrq}zd|KTQS=;DAEF8gR@tN; z@5|%|`IzGi7+AA*S#-sI?AcE;`UXu=p(s~iSrPgOC1yY1yV!xE5O-O7d2Dv`@hb!6 zvHUEOvDXK?=M&cpzG!t$@y=AMaJGip(|)Bq5rhEcIVKIMgQl;_=QZYGbZS! zf~=+^=S=EY3(oJpX=fP`AnIh{zS5GpQ0Nqes06b$@|2&K!tmz&#+n~!;#D4 zQ$YFsK$kaJR!?U%Uvoy>dn~#^js3W714}9pX&jRC1pfmBJ3+Xp_{U@Qcn%~Q9sI`l zFO%tCJ5hFNNKjt=%8yK22&H&sG_!$;s(`8>EP%20k2n+8Q=ADfZ)nv{sB}D6lgLmo zk+ouytaxtZ&I2A^%~tfn;PJ@;;>#%4EMGj%EEw^ zm-Oeg%_q$Ss4b1m-xgi{TJd(7upISD$Oy9o*JjV_@3`7pQ(;B;Msq+e#Qeal zggZaJs85NJ_x)*40#m>Ng+=(f3C!Sw;Df=w&tH2Y<|>SvKC|~uw+wdaEPs=EtGRvI>z%u_ z9kJ`^0Rw$Tn0MHt2Dc&Ba{gx1b~P_dww5$?Hu_zHMQc6Vfm}g?{epA$nqqfU}F% zIzt$q;3NNYc)JXWvyLWCie@HP`yXn5c+?%XKtJ8tohkc^jiDb>`4f*OIRjA|>e6UTOWH&hV!j;nyw{V2C_@ewVFIW>lLbEx-a4-HZgp_$D!Cnbe{k& zj|bE~Aw(fiaKat-FiV}B3v%BgF5+lU(W^DD;bCsXg$&6O50F_sXxc+age}n?_aah8 z)z4SrFwhSBc}WzZgkXN3k|aPZw5E*u$;u#rxwsHt6LdP-Z$`_R($WfPaN`1{)+^f~ zrg3X}F&oHiK0xaUBK{y%10|&oC~T} z3G3O_+10)|qFbHh?-n-q?lo?8p~sud+Y!i55=Nj@hMXfTx$Yx=bgN@6rA3q%EYve1 zkhY~;Azu}dTqr>)?U};83*FG3N&X2zWpcYt=wH%XQ5TwNMnx6niI3LYlim`lmz5;F z9k}UgNQ7uWxF1hfRaJ&18!W*XFZFBJ*^-M6VN1&fDcOkC$V%BqE1k_pORG1^Tl6db zvS?VYc=*3vmJP!m7|GX{hlL#KkAY=wN>dVY@X3FEG~V2FcJ4f^Z1)~?*}*8KBgZoliJm9 zaiWSP*gwir@x9ZCLqx_x$6pit#FO7O{t(6=lW_E6qTB~9(BfSLoj5Lmeu*nB6u;?|S8rQ;2W}j>d)P`UUbvIPk&`#!= zJ6Xwm6hqHa(c~`+eb^bI#l(R+eAg6SJR!bWLr(@@- zdPC^Wlz|^cQ;@)g8+l~GUDxL5=vPycC&kY0=obna#>KQc3w!D2f9J{1vlrzTy&=H7 zqvlFuu}jk8vTsc`&2_=M(vF;_XQi%?Y^#?}S>C(HcDny)5nJp$Q^E*M6K1(>UMX?9 zf=#Yfy1JrSHXpCZn|D6f2@vn!^56Dk^Iw)~)P7>h2NPbHSdNGD@i}&UeQKg17GV z_)iksa2@TpCGbScK?V3tLl=&x*Xdl^qj2^T@{Lw0YH*wu8eN|cOT<=x=+ z^rrshTj9N7xm^P+Y4@JGT<+UxHRG^GlXT%f%aCy<2$nu0;VL_uaj<~$*ZP+J;K8E@Rdz$KBQ*qWye`va=?TK(y?3F_A3_VFmSVsgym8=Q8F)XM>5LYg zu9Dg4j)^JmQ6 zw0l2S;H9b9>^Zyt(b4NfC*lJX6hQMNtBPy#5$tLMt`89c-Tgok!NG2>lzjKwN2|AU$sXumqoV%! zBTw=tOp4+SqI&JEKiItEd>}YQd}H>NYdOoC{8?QJbV~T-LRrxfxA_XAN0tXO`C>J3 z%gDDbv2)yF2soH1mi#jDkhuHhvG&MPrgCoD-G(o8WN`dd_bUDFy5T}&3aeX|&+uhO z9qud#GfHD}tI`+;@#fP}Q!8ns6ri_jVv!fO4sX#XeHmiRy@+ne(kYo>wIj)!ehhvL>6@s96g?Eelnx2~FtkWv zIh~1>JV~(}=UEzPliync9e>jKS!(08es=VslZHU}B7oYT2#tXSy%MPX*B>M3i;A_8 zTXR_czB7k?XK^@L<-VX^tW=-}3o&P{8n0spSzq_CM+~!gV(v>R1Eg5F)XnQ>Kxa!sXHfxTA8^ zf0)HXOsB{eQ9YWKJHDi8L!aCQy3eWba;M6h2er9B>(G02Vy`gsr%{NjEa_(q+Mmfr zNIoCXjdAPX8}d0gulexy`$~Gb^B1FYR*B8)aC2O^EgQLC?^wN7A-xw%O}eCedrae< zu_-5g_k&xq8;eqP*sO{u)|-1@yx!}e&l?&_XV_!g_@LuIdRyOaSnZ*u+pm<*?Ejh2 z<~5TC#WjXW2Em)FiQ{uR5h8{KB;8cotzE)b%ejnt@K{B#M)d4Ame{m0GXA2j*O0~Y z5}Ft-IeQhMkKDikLBWZJ4Xm{ddLxyOsjl*GGiD~0MFU-Z`!8KRK!nYVzMwef|A>kJ z=m4yTQYi>RbYX6kUn+X4FOrgw;ksVCIJa^YYzr|+&K zTpZ5e`@^y-XS2u{)<^a8GHML9V1oW9P4Z8h5k(FwN5F8~{%w|9XAb0(o253Z<@IXis%_o) zy1vhghUc3LjM@*n3yG{}1s|?HuHeVqH=&Oy@A9_2SDW=xEUw6r^b)6QM=vQsZ(ZZz zqFv53PWirBDKYcbQR;$_=XLSmX3EsmUt*{ydM6jy$7)xwbu^@tT$0*Q(F)rs5DYot)U*p5ggNpCcwmW)0Zk-hj|vN= zmF=5zrgIL|mb&-rjm`e71&}@klZZ?=^qy<~j*)Wgi|ae>t;WM#pz3oavYL6`sAo=j z)6r7NsailT0q>^IV_G%>vxJty{-8-2V>m@8a+MaSmrqPxoT!(b)2gJ%9hTrXk5C62 zpHJgj63?G;%k?zP)3q&5aBLea@22^rPOYR8 z(Yzm!(j?y9zw!bdH|fSlej-Vs>(+M!T^@OgY(HI@lpXny$cZO?Wv>l#u^&Z^Ci#va zy4)){kJ9?xha3?r`&I)E;FNHL=bh>&m(JXbkiOv8Y-&0ad?aeKw>x800Tz;43WC5| z%!Bh_QAtq&=w=ZJ6Lg~W<6;U#0g8ubT#QjfE@|Gja82wdE(1-i@DL0A;s39 zd1l2Y2=a`uou<774qkflosV@qc^&$5Z#*2_sh?^FsxwwHU%ovTI9fFk*&cvfNhI|m z9`i75OLeQ`@%MwK=02zLQmu|`Y;(VBS~t;xTLir^b&bap=gAQr5;ZHw#r0;Y&dUl^qlDu zx9Jq`XNIN|JrNBxmPflfIH%!we!92xmA-#`URK77Pok8 z853HmPpEa9o6NLDc^II@UC!QW1T7A*DRLC;xU1m|j_ln|uK*?N;h!q$ciKhsi zyr>*o?d2h+Pq{F66&(b%-=ZqZCyN_5P}*$Z?E7?=3nQk;b=|JS`N!AXXL95rVZeLS zElgD9IF)y?Rqf+`_!&(D`wu3D`piQEBVOmr-L-_)zux{LhdEk{9#BfDN|AqY*pVxXA_B<)=Bh_B^~bU!pc;9NAy zQ;m-w^1L&49ovnyb3SDQ3*7E!yf>?*OV1pktLXBJYnuD8Ide$vpC?8oL;|JYX=p5| zRJm+&N`C}737=wEPSnJGYze!Ug^s^|xy4A6R(@#Hsei%IPOE2$ z3D_~5ck~{x?!#%7WWE=Z3W+*ga`Yt_l|JAUA6|5sI=AP3-puPJ)AH-$DVl2zM01|H z4?UWW_Dsd&7Bq}l%>sr_!jD>`N!8aW9#*iT zl6rJ(CtnC62zf@eOTdUVys{sIfS$YxNouhF&Y~L-^4>yGl9m#DxK6b`0cI~xwLUJ$ z-Pg{^IUYTk_MAducJCJ>YOBILiMvaDH-!#OxwYMKrX*V)&wzqDo5bsXAOn@v+jPcoS)nBFnEb1f#^T8b#j+!=LO_`hPnjjjGz&(|`D~ zbY^DN!;nfx3vX7mNKOZ(Tm*$tN~6;A@cvSstEVgable=fINLD!EnE9lhK;&U=eI7d z!0|X~IO8Aey^+clpKPQ;o118SJ&X^RE}0ryq;2lBvs*JKRU*&a$)0ZC$lv&EQeT4O zGn!Y$>G)1thq~|aaGb~t!Cs{MJb!c=dYEZ+>2Q^{0YZtJJTN#m-Yuv%wn6D-n}H_3 z`PBZ~5+&vD9w~@8cR0PsVCGxQ8?JBeIkZf=Rc2{(B70q-G#TN8@gIAJj>y^RG(PLF zsXkGdByB!N@`O{2a4v+=%w;Z2-Ijwpdk~*_7}}*J44?o<2>Qb1(!u-_4e~l;VM+UNMm?~Y>W5~t?e1HS<3e-ja|!^KOa?oSKJTC>dt+1`5;y@ z6HAXmFLiI5CCM)OZK!Kx!G{{d>95a|J=x6Vm;?G>@Hay?6wctc2~wl~n|%MdL;mYu zewQ@szS4!Yq~_Uyqa3&yy!Re}v$%)|dBG_q5&yI$(h-QnyP!eP z|JDi{3LPXXd54CZu5uC;*q->A4lO~;l?Wn)wf?Eyvi}26!J}x_JU&|HG2T#+|F&7` zu@ddmTcqN64xSc#_sBK^b%cdA9+A$4ON7`StngS(T+ScWNF;sfH+gxvc~R-eAhb-F zd^z9?!>x)lu9uv6RmD8QWS>0p$58TW%SN%uuMXifD3W=8$&!12S4yT4K;=gwOH~%* z=bas>#IICv^WKe1#Ovt3xx8>?bkqQoF_|-t?dp|RG=8!l*PSZz=!(i$0;#d*>Rm&aYf}^@XWp9%=2R%OxzVKb-njdqGWX0g~0H)#41_V@BVSqf3pJ)IHj$Aza?o!d!lr zg-txIlFReCZJu1Q!>!IimYlc>?L>4)|Owz$K&6- z*3y&IlJAsSIR0!ugZfM_+h8S;I?fxOnNQJ)M14@l6TWw=M4wDv#?@(}-H<2TUJMnZ z4tBpCmf+WivQK<1=kG^H0T>G6H*!)+1}6T`S8_I>q9D5J*C7i_$iFX#GP z)`JpScUV++&wW~dsa{`0gL|ppE#KR^{%Xb^`%_-&xcZ&0v68IPg+*zXGBv!Oz4o_n zQ<)6wt)NH6Ll{+e6J8@F9{9pA{Ickh^*R>-^B~bbe_t$O<5u1|bLo8YpQcA81*=8A zV6`Z6^ond8Fyu)db_lovISLL({5emCBh4(4{-XuG@`^|(GX%4A7tO2{858rK*(S%$ z%XAm7h6RAq{PU+u>ZehcFNuAd3Ql~-&kCv(dgp_~BFXGnn+8Im%qcDed~YfFyygDf z2*O7UBl`*Vpbfr;R6=(jx_R^D6yP3zYV9S%D1~le-TNp@FEVl${xIM4ZqB1a?Adkl z1(y`ocKow-uQ6e6x%MccxzYWegpWER?%f%6a>muW^CE8oy=Nvc)|28qIcOf;UfcsQ9{99nEx zHn;Cxr&1Z!Dh1Tkl3n%?_*0xW$#Aqn3$cp->83U~QUueVsLufFdZuIOq z{>3!>f5bEpk#W#Rl^d$HU?iCMdW9P`6*{qE3AXs3`XC@`YO$srH6VvHWi~ooF>K$zaJ4n+DaqBwcY(DBYC>D>CKi`0L2M zCl^P>X7;bLJN{vI1a0$xZ1RcJ^C7Ph~BrlJ)hvP#r4>vQ<}JoV$Y4s7`GCpkrx>^`74J z7d$ahqvOj)%_{^^=-z9GJeN=dEk2-x!IJ#aw`@kyASN9$tJ`yn`n7SM(mAi`1sBuv zdIyD{DwY}>YgCVZd$x<;#i401+qQ#$(KSirA<-SFT;(S5VONg?#d3I*=7FJ#OG=`EZ44?8oxeYww|(n41*ES$-i<~_cGxg zCBG$3VYXyADo73Mu0CqHp#+7KRTbOww2f5vQoiw99h@j?33#*f(#zm_@P}owrael6 zwl;b^GQ;gUFe=9#K$KU%f@!j<+058ySclUJ)}QCcvAe$^lFm|hBuAE z@+T9oE;a^&rtvw$#=S?HNZ(e4stdK0W>LYdbU(y3M8hyNK0Xe|ViP6^E&+AntBX#5 zz7h}ZJnTqj9cUu(jUAkv+(7@ZcW}Fj)WH09q0WP|Qu-knShV>q^shJI!CxMN`u{!d zfAu35!alh=o8JPDj9qV?7)5_i% z>2tVg@9bu4WqlHQ`j1e?$=RAt%^I+x(*@7K=5w?K2U|yEW~6QoCyal89nPQ3tN^pS z&h~V_GsBfNcQscuceJv%MrO!l^@9(!)sMm>qau0Xou&hRG;bGI3wsb&;o|D@vr&<8 zGR)m9d4Y?(PV$$RSJMENmB1~aR8Vz_z>6g01w&Wl<`d-qar58)r$8Vpg9C7tfmuOk z5YrGTD{u?7crtuc(R10bcmr>J+QouFXl%#WVIV58rIWq0qoutigboUT0YV6Go4ecw zF0wdCqHu9NX*b|Kx#t5;B=9qVS3$NX@eyA9@O-|d_g^e(RNY~)SzW8Pipq0Zckbk z*}6#j0G@fCK0`X7H(-E!7$NX?02fFTCzpfCRxk`27nlf%sh@J$Me210)2(RsbCUKPzy-He=XX@Er7y z6PF#tj|YBac@_X6(;<5!_zwMijw}O8IJl<=;d>x{HSi;Q?t2$kOQcl_hE5Oh%h zf_T0HRzwhVDH(zUaUe*T34$(f18hMQ*gy-)C0`3c%3#Qhxr6ugY=j^$AX$AgAjr=K zf*yc+4_5_)GwKi09rS(V^%v<5gCT=X{vkc5*Wd0Xe}?~X{~+D5B!BQi$N6VT-T;SS z?!b!53A4XQau=t&pzi;3{VvI+?poO*C3)GYBqwzFA<2Kn{=Y57l}@F2&EKSWj>Bz! z^V3XWzbXy|B1C}h30@6c$Z_%OLRPwwySbY+aPe+9JD8uQ$NP=XC2JQe7i0=lI2_IZ zz6NN(C6xqy0$kakn`G;ugAf#=NDSb>kSvko2zgOh-ZcMFXVxcQk{_XfgEgIu6LRtmb3T>I4{Ux& zWeOV*aFR+A4k7sxQN3$vYh_NS z;0)&INE!Qo`8xnTJ^c>w|Lr@#^jp>ZUjB2)_d)&x*Wahp$as8!{xs<#{Y|K$fw;&t rAnezm0{2)WAdLR5m8&^$&*izeJ40u5I#kWwZU_i-3kh=b^6>mG$WX&j literal 0 HcmV?d00001 diff --git a/yarn.lock b/yarn.lock index 6828244f..ecdab835 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1841,6 +1841,14 @@ dependencies: "@types/node" "*" +"@types/rimraf@^3.0.0": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-3.0.2.tgz#a63d175b331748e5220ad48c901d7bbf1f44eef8" + integrity sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ== + dependencies: + "@types/glob" "*" + "@types/node" "*" + "@types/semver@^7.3.12": version "7.3.13" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" @@ -6055,6 +6063,13 @@ jest-message-util@^29.7.0: slash "^3.0.0" stack-utils "^2.0.3" +jest-mock-extended@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/jest-mock-extended/-/jest-mock-extended-3.0.5.tgz#ebf208e363f4f1db603b81fb005c4055b7c1c8b7" + integrity sha512-/eHdaNPUAXe7f65gHH5urc8SbRVWjYxBqmCgax2uqOBJy8UUcCBMN1upj1eZ8y/i+IqpyEm4Kq0VKss/GCCTdw== + dependencies: + ts-essentials "^7.0.3" + jest-mock@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" @@ -7515,6 +7530,13 @@ node-fetch@^2.6.1, node-fetch@^2.6.6, node-fetch@^2.6.7: dependencies: whatwg-url "^5.0.0" +node-fetch@^2.6.9: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + node-gyp-build@^4.3.0: version "4.6.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" @@ -10027,6 +10049,11 @@ triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== +ts-essentials@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + ts-jest@^29.0.3: version "29.1.0" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.0.tgz#4a9db4104a49b76d2b368ea775b6c9535c603891" @@ -10118,6 +10145,11 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.13.1.tgz#bb744c1f0678bea7543a2d1ec24e83e68e8c8706" + integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== + type-fest@^0.16.0: version "0.16.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" From 6625790206d9f48d859da35087c158a40ed213ce Mon Sep 17 00:00:00 2001 From: Peter C <12292660+PeterC89@users.noreply.github.com> Date: Fri, 2 Feb 2024 11:18:08 +0000 Subject: [PATCH 52/54] fix: Quote file paths in calls to ffmpeg on Windows #132 --- .../api/src/__tests__/filePath.spec.ts | 8 +++++++ shared/packages/api/src/filePath.ts | 10 +++++++++ shared/packages/api/src/index.ts | 1 + .../src/worker/accessorHandlers/atem.ts | 14 ++++++------- .../windowsWorker/expectationHandlers/lib.ts | 11 +++++----- .../expectationHandlers/lib/ffmpeg.ts | 6 +++--- .../expectationHandlers/lib/scan.ts | 21 ++++++++++++------- .../expectationHandlers/mediaFilePreview.ts | 5 +++-- .../expectationHandlers/mediaFileThumbnail.ts | 5 +++-- 9 files changed, 55 insertions(+), 26 deletions(-) create mode 100644 shared/packages/api/src/__tests__/filePath.spec.ts create mode 100644 shared/packages/api/src/filePath.ts diff --git a/shared/packages/api/src/__tests__/filePath.spec.ts b/shared/packages/api/src/__tests__/filePath.spec.ts new file mode 100644 index 00000000..e1bdec08 --- /dev/null +++ b/shared/packages/api/src/__tests__/filePath.spec.ts @@ -0,0 +1,8 @@ +import { escapeFilePath } from '../filePath' + +describe('filePath', () => { + test('checkPath', () => { + expect(escapeFilePath('test/path')).toBe(process.platform === 'win32' ? '"test/path"' : 'test/path') + expect(escapeFilePath('C:\\test\\path')).toBe(process.platform === 'win32' ? '"C:\\test\\path"' : 'C:\\test\\path') + }) +}) diff --git a/shared/packages/api/src/filePath.ts b/shared/packages/api/src/filePath.ts new file mode 100644 index 00000000..6557f2d0 --- /dev/null +++ b/shared/packages/api/src/filePath.ts @@ -0,0 +1,10 @@ +/** + * Escape spaces in file path with double quotes on windows. + * + * @param {string} path File path to be escaped. + * @returns {string} Escaped file path. + * @see {@link https://ffmpeg.org/ffmpeg-utils.html#Quoting-and-escaping} + */ +export function escapeFilePath(path: string): string { + return process.platform === 'win32' ? `"${path}"` : path +} diff --git a/shared/packages/api/src/index.ts b/shared/packages/api/src/index.ts index d0d593b3..b0ebe221 100644 --- a/shared/packages/api/src/index.ts +++ b/shared/packages/api/src/index.ts @@ -2,6 +2,7 @@ export * from './adapterClient' export * from './adapterServer' export * from './appContainer' export * from './config' +export * from './filePath' export * from './expectationApi' export * from './inputApi' export * from './HelpfulEventEmitter' diff --git a/shared/packages/worker/src/worker/accessorHandlers/atem.ts b/shared/packages/worker/src/worker/accessorHandlers/atem.ts index 31497af7..8885a8fa 100644 --- a/shared/packages/worker/src/worker/accessorHandlers/atem.ts +++ b/shared/packages/worker/src/worker/accessorHandlers/atem.ts @@ -12,7 +12,7 @@ import { AccessorHandlerRunCronJobResult, PackageOperation, } from './genericHandle' -import { Expectation, Accessor, AccessorOnPackage, AccessorId } from '@sofie-package-manager/api' +import { Expectation, Accessor, AccessorOnPackage, AccessorId, escapeFilePath } from '@sofie-package-manager/api' import { GenericWorker } from '../worker' import { Atem, AtemConnectionStatus, Util as AtemUtil } from 'atem-connection' import { ClipBank } from 'atem-connection/dist/state/media' @@ -504,7 +504,7 @@ async function stream2Disk(sourceStream: NodeJS.ReadableStream, outputFile: stri export async function createTGASequence(inputFile: string, opts?: { width: number; height: number }): Promise { const outputFile = replaceFileExtension(inputFile, '_%04d.tga') - const args = ['-i', inputFile] + const args = ['-i', escapeFilePath(inputFile)] if (opts) { args.push('-vf', `scale=${opts.width}:${opts.height}`) } @@ -515,7 +515,7 @@ export async function createTGASequence(inputFile: string, opts?: { width: numbe export async function convertFrameToRGBA(inputFile: string): Promise { const outputFile = replaceFileExtension(inputFile, '.rgba') - const args = [`-i`, inputFile, '-pix_fmt', 'rgba', '-f', 'rawvideo', outputFile] + const args = [`-i`, escapeFilePath(inputFile), '-pix_fmt', 'rgba', '-f', 'rawvideo', outputFile] return ffmpeg(args) } @@ -523,7 +523,7 @@ export async function convertAudio(inputFile: string): Promise { const outputFile = replaceFileExtension(inputFile, '.wav') const args = [ `-i`, - inputFile, + escapeFilePath(inputFile), '-vn', // no video '-ar', '48000', // 48kHz sample rate @@ -531,7 +531,7 @@ export async function convertAudio(inputFile: string): Promise { '2', // stereo audio '-c:a', 'pcm_s24le', - outputFile, + escapeFilePath(outputFile), ] return ffmpeg(args) @@ -540,7 +540,7 @@ export async function convertAudio(inputFile: string): Promise { export async function countFrames(inputFile: string): Promise { const args = [ '-i', - inputFile, + escapeFilePath(inputFile), '-v', 'error', '-select_streams', @@ -561,7 +561,7 @@ export async function countFrames(inputFile: string): Promise { export async function getStreamIndicies(inputFile: string, type: 'video' | 'audio'): Promise { const args = [ '-i', - inputFile, + escapeFilePath(inputFile), '-v', 'error', '-select_streams', diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts index 36dd628c..76d03a37 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts @@ -19,6 +19,7 @@ import { AccessorId, promiseTimeout, INNER_ACTION_TIMEOUT, + escapeFilePath, } from '@sofie-package-manager/api' import { LocalFolderAccessorHandle } from '../../../accessorHandlers/localFolder' import { FileShareAccessorHandle } from '../../../accessorHandlers/fileShare' @@ -370,7 +371,7 @@ export function previewFFMpegArguments(input: string, seekableSource: boolean, m seekableSource ? undefined : '-seekable', seekableSource ? undefined : '0', `-i`, - input, // Input file path + escapeFilePath(input), // Input file path '-f', 'webm', // format: webm '-an', // blocks all audio streams @@ -409,7 +410,7 @@ export function thumbnailFFMpegArguments( '-hide_banner', ...(hasVideoStream && seekTimeCode ? [`-ss`, `${seekTimeCode}`] : []), `-i`, - input, + escapeFilePath(input), `-f`, `image2`, '-frames:v', @@ -440,7 +441,7 @@ export function proxyFFMpegArguments( '-y', // Overwrite output files without asking. seekableSource ? undefined : '-seekable 0', `-i`, - input, // Input file path + escapeFilePath(input), // Input file path '-c', 'copy', // Stream copy, no transcoding @@ -451,9 +452,9 @@ export function proxyFFMpegArguments( // Check target to see if we should tell ffmpeg which format to use: let targetPath = '' if (isLocalFolderAccessorHandle(targetHandle)) { - targetPath = targetHandle.fullPath + targetPath = escapeFilePath(targetHandle.fullPath) } else if (isFileShareAccessorHandle(targetHandle)) { - targetPath = targetHandle.fullPath + targetPath = escapeFilePath(targetHandle.fullPath) } else if (isHTTPProxyAccessorHandle(targetHandle)) { targetPath = '' } else { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts index 51eacbe2..81358dcf 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/ffmpeg.ts @@ -9,7 +9,7 @@ import { import { FileShareAccessorHandle } from '../../../../accessorHandlers/fileShare' import { HTTPProxyAccessorHandle } from '../../../../accessorHandlers/httpProxy' import { LocalFolderAccessorHandle } from '../../../../accessorHandlers/localFolder' -import { assertNever, stringifyError } from '@sofie-package-manager/api' +import { assertNever, escapeFilePath, stringifyError } from '@sofie-package-manager/api' export interface OverriddenFFMpegExecutables { ffmpeg: string @@ -104,11 +104,11 @@ export async function spawnFFMpeg( let pipeStdOut = false if (isLocalFolderAccessorHandle(targetHandle)) { await mkdirp(path.dirname(targetHandle.fullPath)) // Create folder if it doesn't exist - args.push(targetHandle.fullPath) + args.push(escapeFilePath(targetHandle.fullPath)) } else if (isFileShareAccessorHandle(targetHandle)) { await targetHandle.prepareFileAccess() await mkdirp(path.dirname(targetHandle.fullPath)) // Create folder if it doesn't exist - args.push(targetHandle.fullPath) + args.push(escapeFilePath(targetHandle.fullPath)) } else if (isHTTPProxyAccessorHandle(targetHandle)) { pipeStdOut = true args.push('pipe:1') // pipe output to stdout diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts index bccbf0e4..aee3a37d 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts @@ -1,5 +1,12 @@ import { execFile, ChildProcess, spawn } from 'child_process' -import { Expectation, assertNever, Accessor, AccessorOnPackage, LoggerInstance } from '@sofie-package-manager/api' +import { + Expectation, + assertNever, + Accessor, + AccessorOnPackage, + LoggerInstance, + escapeFilePath, +} from '@sofie-package-manager/api' import { isQuantelClipAccessorHandle, isLocalFolderAccessorHandle, @@ -50,12 +57,12 @@ export function scanWithFFProbe( let inputPath: string let filePath: string if (isLocalFolderAccessorHandle(sourceHandle)) { - inputPath = sourceHandle.fullPath - filePath = sourceHandle.filePath + inputPath = escapeFilePath(sourceHandle.fullPath) + filePath = escapeFilePath(sourceHandle.filePath) } else if (isFileShareAccessorHandle(sourceHandle)) { await sourceHandle.prepareFileAccess() - inputPath = sourceHandle.fullPath - filePath = sourceHandle.filePath + inputPath = escapeFilePath(sourceHandle.fullPath) + filePath = escapeFilePath(sourceHandle.filePath) } else if (isHTTPAccessorHandle(sourceHandle)) { inputPath = sourceHandle.fullUrl filePath = sourceHandle.path @@ -650,10 +657,10 @@ async function getFFMpegInputArgsFromAccessorHandle( ): Promise { const args: string[] = [] if (isLocalFolderAccessorHandle(sourceHandle)) { - args.push(`-i`, sourceHandle.fullPath) + args.push(`-i`, escapeFilePath(sourceHandle.fullPath)) } else if (isFileShareAccessorHandle(sourceHandle)) { await sourceHandle.prepareFileAccess() - args.push(`-i`, sourceHandle.fullPath) + args.push(`-i`, escapeFilePath(sourceHandle.fullPath)) } else if (isHTTPAccessorHandle(sourceHandle)) { args.push(`-i`, sourceHandle.fullUrl) } else if (isHTTPProxyAccessorHandle(sourceHandle)) { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index 17ebdfe8..adc653c6 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -13,6 +13,7 @@ import { assertNever, stringifyError, startTimer, + escapeFilePath, } from '@sofie-package-manager/api' import { isFileShareAccessorHandle, @@ -220,10 +221,10 @@ export const MediaFilePreview: ExpectationWindowsHandler = { let inputPath: string if (isLocalFolderAccessorHandle(sourceHandle)) { - inputPath = sourceHandle.fullPath + inputPath = escapeFilePath(sourceHandle.fullPath) } else if (isFileShareAccessorHandle(sourceHandle)) { await sourceHandle.prepareFileAccess() - inputPath = sourceHandle.fullPath + inputPath = escapeFilePath(sourceHandle.fullPath) } else if (isHTTPAccessorHandle(sourceHandle)) { inputPath = sourceHandle.fullUrl } else if (isHTTPProxyAccessorHandle(sourceHandle)) { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts index 27796663..e0db385e 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts @@ -10,6 +10,7 @@ import { assertNever, stringifyError, startTimer, + escapeFilePath, } from '@sofie-package-manager/api' import { getStandardCost } from '../lib/lib' import { GenericWorker } from '../../../worker' @@ -220,10 +221,10 @@ export const MediaFileThumbnail: ExpectationWindowsHandler = { let inputPath: string if (isLocalFolderAccessorHandle(sourceHandle)) { - inputPath = sourceHandle.fullPath + inputPath = escapeFilePath(sourceHandle.fullPath) } else if (isFileShareAccessorHandle(sourceHandle)) { await sourceHandle.prepareFileAccess() - inputPath = sourceHandle.fullPath + inputPath = escapeFilePath(sourceHandle.fullPath) } else if (isHTTPAccessorHandle(sourceHandle)) { inputPath = sourceHandle.fullUrl } else if (isHTTPProxyAccessorHandle(sourceHandle)) { From 2f63f60759edf0c06819f2a8802c78f2b3d383c0 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Wed, 14 Feb 2024 13:40:12 +0100 Subject: [PATCH 53/54] fix: remove double escaped file paths --- shared/packages/api/src/filePath.ts | 3 ++- .../windowsWorker/expectationHandlers/lib.ts | 4 ++-- .../expectationHandlers/lib/scan.ts | 18 +++++++++++++----- .../expectationHandlers/mediaFilePreview.ts | 5 ++--- .../expectationHandlers/mediaFileThumbnail.ts | 5 ++--- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/shared/packages/api/src/filePath.ts b/shared/packages/api/src/filePath.ts index 6557f2d0..7f5421f9 100644 --- a/shared/packages/api/src/filePath.ts +++ b/shared/packages/api/src/filePath.ts @@ -1,5 +1,6 @@ /** - * Escape spaces in file path with double quotes on windows. + * Escape file path with double quotes on Windows. + * This is to be used when creating process arguments, to avoid issues with spaces in file paths. * * @param {string} path File path to be escaped. * @returns {string} Escaped file path. diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts index 76d03a37..a5b24d50 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib.ts @@ -452,9 +452,9 @@ export function proxyFFMpegArguments( // Check target to see if we should tell ffmpeg which format to use: let targetPath = '' if (isLocalFolderAccessorHandle(targetHandle)) { - targetPath = escapeFilePath(targetHandle.fullPath) + targetPath = targetHandle.fullPath } else if (isFileShareAccessorHandle(targetHandle)) { - targetPath = escapeFilePath(targetHandle.fullPath) + targetPath = targetHandle.fullPath } else if (isHTTPProxyAccessorHandle(targetHandle)) { targetPath = '' } else { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts index aee3a37d..ff2695e5 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/lib/scan.ts @@ -57,12 +57,12 @@ export function scanWithFFProbe( let inputPath: string let filePath: string if (isLocalFolderAccessorHandle(sourceHandle)) { - inputPath = escapeFilePath(sourceHandle.fullPath) - filePath = escapeFilePath(sourceHandle.filePath) + inputPath = sourceHandle.fullPath + filePath = sourceHandle.filePath } else if (isFileShareAccessorHandle(sourceHandle)) { await sourceHandle.prepareFileAccess() - inputPath = escapeFilePath(sourceHandle.fullPath) - filePath = escapeFilePath(sourceHandle.filePath) + inputPath = sourceHandle.fullPath + filePath = sourceHandle.filePath } else if (isHTTPAccessorHandle(sourceHandle)) { inputPath = sourceHandle.fullUrl filePath = sourceHandle.path @@ -74,7 +74,15 @@ export function scanWithFFProbe( throw new Error('Unknown handle') } // Use FFProbe to scan the file: - const args = ['-hide_banner', `-i`, inputPath, '-show_streams', '-show_format', '-print_format', 'json'] + const args = [ + '-hide_banner', + `-i`, + escapeFilePath(inputPath), + '-show_streams', + '-show_format', + '-print_format', + 'json', + ] let ffProbeProcess: ChildProcess | undefined = undefined onCancel(() => { ffProbeProcess?.stdin?.write('q') // send "q" to quit, because .kill() doesn't quite do it. diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts index adc653c6..17ebdfe8 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFilePreview.ts @@ -13,7 +13,6 @@ import { assertNever, stringifyError, startTimer, - escapeFilePath, } from '@sofie-package-manager/api' import { isFileShareAccessorHandle, @@ -221,10 +220,10 @@ export const MediaFilePreview: ExpectationWindowsHandler = { let inputPath: string if (isLocalFolderAccessorHandle(sourceHandle)) { - inputPath = escapeFilePath(sourceHandle.fullPath) + inputPath = sourceHandle.fullPath } else if (isFileShareAccessorHandle(sourceHandle)) { await sourceHandle.prepareFileAccess() - inputPath = escapeFilePath(sourceHandle.fullPath) + inputPath = sourceHandle.fullPath } else if (isHTTPAccessorHandle(sourceHandle)) { inputPath = sourceHandle.fullUrl } else if (isHTTPProxyAccessorHandle(sourceHandle)) { diff --git a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts index e0db385e..27796663 100644 --- a/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts +++ b/shared/packages/worker/src/worker/workers/windowsWorker/expectationHandlers/mediaFileThumbnail.ts @@ -10,7 +10,6 @@ import { assertNever, stringifyError, startTimer, - escapeFilePath, } from '@sofie-package-manager/api' import { getStandardCost } from '../lib/lib' import { GenericWorker } from '../../../worker' @@ -221,10 +220,10 @@ export const MediaFileThumbnail: ExpectationWindowsHandler = { let inputPath: string if (isLocalFolderAccessorHandle(sourceHandle)) { - inputPath = escapeFilePath(sourceHandle.fullPath) + inputPath = sourceHandle.fullPath } else if (isFileShareAccessorHandle(sourceHandle)) { await sourceHandle.prepareFileAccess() - inputPath = escapeFilePath(sourceHandle.fullPath) + inputPath = sourceHandle.fullPath } else if (isHTTPAccessorHandle(sourceHandle)) { inputPath = sourceHandle.fullUrl } else if (isHTTPProxyAccessorHandle(sourceHandle)) { From cb20950eba2db474e53d4679ba120d84d1d7c767 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 19 Feb 2024 09:42:04 +0100 Subject: [PATCH 54/54] v1.50.0-alpha.10 --- CHANGELOG.md | 111 ++++++++++++++++++ apps/_boilerplate/app/CHANGELOG.md | 20 ++++ apps/_boilerplate/app/package.json | 2 +- apps/appcontainer-node/app/CHANGELOG.md | 40 +++++++ apps/appcontainer-node/app/package.json | 4 +- .../packages/generic/CHANGELOG.md | 48 ++++++++ .../packages/generic/package.json | 6 +- apps/http-server/app/CHANGELOG.md | 40 +++++++ apps/http-server/app/package.json | 4 +- .../http-server/packages/generic/CHANGELOG.md | 40 +++++++ .../http-server/packages/generic/package.json | 4 +- apps/package-manager/app/CHANGELOG.md | 40 +++++++ apps/package-manager/app/package.json | 4 +- .../packages/generic/CHANGELOG.md | 64 ++++++++++ .../packages/generic/package.json | 8 +- .../app/CHANGELOG.md | 40 +++++++ .../app/package.json | 4 +- .../packages/generic/CHANGELOG.md | 40 +++++++ .../packages/generic/package.json | 4 +- apps/single-app/app/CHANGELOG.md | 47 ++++++++ apps/single-app/app/package.json | 16 +-- apps/worker/app/CHANGELOG.md | 40 +++++++ apps/worker/app/package.json | 4 +- apps/worker/packages/generic/CHANGELOG.md | 40 +++++++ apps/worker/packages/generic/package.json | 6 +- apps/workforce/app/CHANGELOG.md | 36 ++++++ apps/workforce/app/package.json | 4 +- apps/workforce/packages/generic/CHANGELOG.md | 36 ++++++ apps/workforce/packages/generic/package.json | 6 +- lerna.json | 2 +- shared/packages/api/CHANGELOG.md | 56 +++++++++ shared/packages/api/package.json | 2 +- .../packages/expectationManager/CHANGELOG.md | 48 ++++++++ .../packages/expectationManager/package.json | 6 +- shared/packages/worker/CHANGELOG.md | 75 ++++++++++++ shared/packages/worker/package.json | 4 +- shared/packages/workforce/CHANGELOG.md | 39 ++++++ shared/packages/workforce/package.json | 4 +- tests/internal-tests/CHANGELOG.md | 51 ++++++++ tests/internal-tests/package.json | 14 +-- 40 files changed, 1005 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72c3ca43..25878e10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,117 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + +### Bug Fixes + +* Quote file paths in calls to ffmpeg on Windows [#132](https://github.com/nrkno/tv-automation-package-manager/issues/132) ([6625790](https://github.com/nrkno/tv-automation-package-manager/commit/6625790206d9f48d859da35087c158a40ed213ce)) +* remove double escaped file paths ([2f63f60](https://github.com/nrkno/tv-automation-package-manager/commit/2f63f60759edf0c06819f2a8802c78f2b3d383c0)) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + +### Bug Fixes + +* atem and ffmpeg linux ([87a5f35](https://github.com/nrkno/tv-automation-package-manager/commit/87a5f35a1aadbcb224e7ff3d3137a1155e450bc9)) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* add checks for FFPrope executable ([f1084e8](https://github.com/nrkno/tv-automation-package-manager/commit/f1084e84bb17968d39faf746ab841113137aeb14)) +* bad merge ([dca3763](https://github.com/nrkno/tv-automation-package-manager/commit/dca37639a2a12ce93c029acc5fdebba88e2c2187)) +* ignoring expectedPackages from core ([7e3f462](https://github.com/nrkno/tv-automation-package-manager/commit/7e3f462265412ad1602f0f6d81aa2c8b1fb9b0d0)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + +### Bug Fixes + +* CI signtool.exe /debug ([44f344a](https://github.com/nrkno/tv-automation-package-manager/commit/44f344ad7303512e79bfec5dca67bb3f12e6a76a)) + + + +# [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) + + +### Reverts + +* chore: lerna useWorkspaces ([c2f6432](https://github.com/nrkno/tv-automation-package-manager/commit/c2f6432eeae6c366a80ed7a412750a97374a321f)) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't error when trying to generate a preview for an audio-only file ([f7a9dc5](https://github.com/nrkno/tv-automation-package-manager/commit/f7a9dc5255049271b5e4b1c58bc901300867708b)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + +### Features + +* generate audio waveform images for audio-only files (and don't try to generate previews for them) ([10e5747](https://github.com/nrkno/tv-automation-package-manager/commit/10e574757bcdd86a2a5aa9dade2ed34b5d0984f9)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Bug Fixes + +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) + + +### Features + +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/apps/_boilerplate/app/CHANGELOG.md b/apps/_boilerplate/app/CHANGELOG.md index ede3eb5f..090c2b4e 100644 --- a/apps/_boilerplate/app/CHANGELOG.md +++ b/apps/_boilerplate/app/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @boilerplate/app + + + + + # [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) **Note:** Version bump only for package @boilerplate/app diff --git a/apps/_boilerplate/app/package.json b/apps/_boilerplate/app/package.json index d2c756db..defe2823 100644 --- a/apps/_boilerplate/app/package.json +++ b/apps/_boilerplate/app/package.json @@ -1,6 +1,6 @@ { "name": "@boilerplate/app", - "version": "1.50.0-alpha.7", + "version": "1.50.0-alpha.10", "description": "Boilerplace", "private": true, "scripts": { diff --git a/apps/appcontainer-node/app/CHANGELOG.md b/apps/appcontainer-node/app/CHANGELOG.md index a3f3f936..418350aa 100644 --- a/apps/appcontainer-node/app/CHANGELOG.md +++ b/apps/appcontainer-node/app/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @appcontainer-node/app + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/apps/appcontainer-node/app/package.json b/apps/appcontainer-node/app/package.json index 9b5cb0a3..0a33eb46 100644 --- a/apps/appcontainer-node/app/package.json +++ b/apps/appcontainer-node/app/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/app", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "description": "AppContainer-Node.js", "private": true, "scripts": { @@ -11,7 +11,7 @@ "start": "node dist/index.js" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.9" + "@appcontainer-node/generic": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/appcontainer-node/packages/generic/CHANGELOG.md b/apps/appcontainer-node/packages/generic/CHANGELOG.md index bdf52024..1aaab07e 100644 --- a/apps/appcontainer-node/packages/generic/CHANGELOG.md +++ b/apps/appcontainer-node/packages/generic/CHANGELOG.md @@ -3,6 +3,54 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* bad merge ([dca3763](https://github.com/nrkno/tv-automation-package-manager/commit/dca37639a2a12ce93c029acc5fdebba88e2c2187)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) ## [1.43.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.43.2) (2024-02-19) diff --git a/apps/appcontainer-node/packages/generic/package.json b/apps/appcontainer-node/packages/generic/package.json index 10b61ae5..2eaf2afd 100644 --- a/apps/appcontainer-node/packages/generic/package.json +++ b/apps/appcontainer-node/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@appcontainer-node/generic", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,8 +13,8 @@ "@sofie-automation/shared-lib": "*" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.9", + "@sofie-package-manager/api": "1.50.0-alpha.10", + "@sofie-package-manager/worker": "1.50.0-alpha.10", "underscore": "^1.12.0" }, "devDependencies": { diff --git a/apps/http-server/app/CHANGELOG.md b/apps/http-server/app/CHANGELOG.md index 871a59f9..bbc73100 100644 --- a/apps/http-server/app/CHANGELOG.md +++ b/apps/http-server/app/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @http-server/app + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/http-server/app/package.json b/apps/http-server/app/package.json index 9e6b6487..91e71148 100644 --- a/apps/http-server/app/package.json +++ b/apps/http-server/app/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/app", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.10", "description": "Upload to and serve proxies of packages", "private": true, "scripts": { @@ -11,7 +11,7 @@ "start": "node dist/index.js" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.8" + "@http-server/generic": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/http-server/packages/generic/CHANGELOG.md b/apps/http-server/packages/generic/CHANGELOG.md index fdedd721..bbc12cb0 100644 --- a/apps/http-server/packages/generic/CHANGELOG.md +++ b/apps/http-server/packages/generic/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @http-server/generic + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/http-server/packages/generic/package.json b/apps/http-server/packages/generic/package.json index 4a0073d6..45821c01 100644 --- a/apps/http-server/packages/generic/package.json +++ b/apps/http-server/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@http-server/generic", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.10", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/api": "1.50.0-alpha.10", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", "koa-range": "^0.3.0", diff --git a/apps/package-manager/app/CHANGELOG.md b/apps/package-manager/app/CHANGELOG.md index 17a26ea9..b02cc405 100644 --- a/apps/package-manager/app/CHANGELOG.md +++ b/apps/package-manager/app/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @package-manager/app + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/apps/package-manager/app/package.json b/apps/package-manager/app/package.json index f41eb628..0f662ed8 100644 --- a/apps/package-manager/app/package.json +++ b/apps/package-manager/app/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/app", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "private": true, "scripts": { "build": "yarn rimraf dist && yarn build:main", @@ -10,7 +10,7 @@ "start": "node dist/index.js" }, "dependencies": { - "@package-manager/generic": "1.50.0-alpha.9" + "@package-manager/generic": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/package-manager/packages/generic/CHANGELOG.md b/apps/package-manager/packages/generic/CHANGELOG.md index 0defeb02..31be2709 100644 --- a/apps/package-manager/packages/generic/CHANGELOG.md +++ b/apps/package-manager/packages/generic/CHANGELOG.md @@ -3,6 +3,70 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* ignoring expectedPackages from core ([7e3f462](https://github.com/nrkno/tv-automation-package-manager/commit/7e3f462265412ad1602f0f6d81aa2c8b1fb9b0d0)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Bug Fixes + +* type error ([98efd29](https://github.com/nrkno/tv-automation-package-manager/commit/98efd29adedfc3e3a93a1dcb6a322b08dc7f9027)) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/apps/package-manager/packages/generic/package.json b/apps/package-manager/packages/generic/package.json index 5b0fab92..77b67d2d 100644 --- a/apps/package-manager/packages/generic/package.json +++ b/apps/package-manager/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@package-manager/generic", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -15,9 +15,9 @@ }, "dependencies": { "@parcel/watcher": "^2.3.0", - "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.9", - "@sofie-package-manager/worker": "1.50.0-alpha.9", + "@sofie-package-manager/api": "1.50.0-alpha.10", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.10", + "@sofie-package-manager/worker": "1.50.0-alpha.10", "data-store": "^4.0.3", "deep-extend": "^0.6.0", "fast-clone": "^1.5.13", diff --git a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md index f58fc832..639cd37e 100644 --- a/apps/quantel-http-transformer-proxy/app/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/app/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/app + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/quantel-http-transformer-proxy/app/package.json b/apps/quantel-http-transformer-proxy/app/package.json index 4ca4b9cd..a6187561 100644 --- a/apps/quantel-http-transformer-proxy/app/package.json +++ b/apps/quantel-http-transformer-proxy/app/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/app", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.10", "description": "Proxy for a Quantel HTTP Transformer", "private": true, "scripts": { @@ -10,7 +10,7 @@ "start": "node dist/index.js" }, "dependencies": { - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.8" + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md index 05b3e5ab..bd183694 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md +++ b/apps/quantel-http-transformer-proxy/packages/generic/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @quantel-http-transformer-proxy/generic + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/quantel-http-transformer-proxy/packages/generic/package.json b/apps/quantel-http-transformer-proxy/packages/generic/package.json index 9fcd80a1..1e37789e 100644 --- a/apps/quantel-http-transformer-proxy/packages/generic/package.json +++ b/apps/quantel-http-transformer-proxy/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@quantel-http-transformer-proxy/generic", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.10", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -11,7 +11,7 @@ }, "dependencies": { "@koa/cors": "^4.0.0", - "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/api": "1.50.0-alpha.10", "got": "^11.8.6", "koa": "^2.14.1", "koa-bodyparser": "^4.3.0", diff --git a/apps/single-app/app/CHANGELOG.md b/apps/single-app/app/CHANGELOG.md index e8aa8717..ba159cd5 100644 --- a/apps/single-app/app/CHANGELOG.md +++ b/apps/single-app/app/CHANGELOG.md @@ -3,6 +3,53 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/apps/single-app/app/package.json b/apps/single-app/app/package.json index 8be0fd27..089e26a7 100644 --- a/apps/single-app/app/package.json +++ b/apps/single-app/app/package.json @@ -1,6 +1,6 @@ { "name": "@single-app/app", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "description": "Package Manager, http-proxy etc.. all in one application", "private": true, "scripts": { @@ -11,13 +11,13 @@ "start": "node --inspect dist/index.js" }, "dependencies": { - "@appcontainer-node/generic": "1.50.0-alpha.9", - "@http-server/generic": "1.50.0-alpha.8", - "@package-manager/generic": "1.50.0-alpha.9", - "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.8", - "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.9", - "@sofie-package-manager/workforce": "1.50.0-alpha.8", + "@appcontainer-node/generic": "1.50.0-alpha.10", + "@http-server/generic": "1.50.0-alpha.10", + "@package-manager/generic": "1.50.0-alpha.10", + "@quantel-http-transformer-proxy/generic": "1.50.0-alpha.10", + "@sofie-package-manager/api": "1.50.0-alpha.10", + "@sofie-package-manager/worker": "1.50.0-alpha.10", + "@sofie-package-manager/workforce": "1.50.0-alpha.10", "underscore": "^1.12.0" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", diff --git a/apps/worker/app/CHANGELOG.md b/apps/worker/app/CHANGELOG.md index b17493a4..258f2c2e 100644 --- a/apps/worker/app/CHANGELOG.md +++ b/apps/worker/app/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @worker/app + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/apps/worker/app/package.json b/apps/worker/app/package.json index 08ffc1c8..d87801f6 100644 --- a/apps/worker/app/package.json +++ b/apps/worker/app/package.json @@ -1,6 +1,6 @@ { "name": "@worker/app", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "description": "Boilerplace", "private": true, "scripts": { @@ -12,7 +12,7 @@ "start": "node dist/index.js" }, "dependencies": { - "@worker/generic": "1.50.0-alpha.9" + "@worker/generic": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/worker/packages/generic/CHANGELOG.md b/apps/worker/packages/generic/CHANGELOG.md index 1d97cdb9..60b10802 100644 --- a/apps/worker/packages/generic/CHANGELOG.md +++ b/apps/worker/packages/generic/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @worker/generic + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/apps/worker/packages/generic/package.json b/apps/worker/packages/generic/package.json index 9c3e6b7c..29e9bef1 100644 --- a/apps/worker/packages/generic/package.json +++ b/apps/worker/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@worker/generic", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.9" + "@sofie-package-manager/api": "1.50.0-alpha.10", + "@sofie-package-manager/worker": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/app/CHANGELOG.md b/apps/workforce/app/CHANGELOG.md index 33a84675..39166655 100644 --- a/apps/workforce/app/CHANGELOG.md +++ b/apps/workforce/app/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @workforce/app + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/workforce/app/package.json b/apps/workforce/app/package.json index 0629ccfa..3ebe289f 100644 --- a/apps/workforce/app/package.json +++ b/apps/workforce/app/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/app", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.10", "description": "Boilerplace", "private": true, "scripts": { @@ -11,7 +11,7 @@ "start": "node dist/index.js" }, "dependencies": { - "@workforce/generic": "1.50.0-alpha.8" + "@workforce/generic": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/apps/workforce/packages/generic/CHANGELOG.md b/apps/workforce/packages/generic/CHANGELOG.md index a6855519..131a78b3 100644 --- a/apps/workforce/packages/generic/CHANGELOG.md +++ b/apps/workforce/packages/generic/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + +**Note:** Version bump only for package @workforce/generic + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/apps/workforce/packages/generic/package.json b/apps/workforce/packages/generic/package.json index fe7fef16..54270c4c 100644 --- a/apps/workforce/packages/generic/package.json +++ b/apps/workforce/packages/generic/package.json @@ -1,6 +1,6 @@ { "name": "@workforce/generic", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.10", "private": true, "main": "dist/index.js", "types": "dist/index.d.ts", @@ -10,8 +10,8 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/workforce": "1.50.0-alpha.8" + "@sofie-package-manager/api": "1.50.0-alpha.10", + "@sofie-package-manager/workforce": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/lerna.json b/lerna.json index 92f3fb59..850f9a9b 100644 --- a/lerna.json +++ b/lerna.json @@ -4,6 +4,6 @@ "apps/**", "tests/**" ], - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "npmClient": "yarn" } diff --git a/shared/packages/api/CHANGELOG.md b/shared/packages/api/CHANGELOG.md index 947325d6..7db8e46a 100644 --- a/shared/packages/api/CHANGELOG.md +++ b/shared/packages/api/CHANGELOG.md @@ -3,6 +3,62 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + +### Bug Fixes + +* Quote file paths in calls to ffmpeg on Windows [#132](https://github.com/nrkno/tv-automation-package-manager/issues/132) ([6625790](https://github.com/nrkno/tv-automation-package-manager/commit/6625790206d9f48d859da35087c158a40ed213ce)) +* remove double escaped file paths ([2f63f60](https://github.com/nrkno/tv-automation-package-manager/commit/2f63f60759edf0c06819f2a8802c78f2b3d383c0)) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + +### Features + +* subscribe to separated core collections SOFIE-1926 ([281e579](https://github.com/nrkno/tv-automation-package-manager/commit/281e5796a5356061d2cbdd08a0a88de757a4fbdd)) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) +* r50 json config schema ([1a0d477](https://github.com/nrkno/tv-automation-package-manager/commit/1a0d47761746a25692862afa7c351147db29a790)) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/shared/packages/api/package.json b/shared/packages/api/package.json index 89fb086d..f14513fa 100644 --- a/shared/packages/api/package.json +++ b/shared/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/api", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.10", "main": "dist/index", "types": "dist/index", "files": [ diff --git a/shared/packages/expectationManager/CHANGELOG.md b/shared/packages/expectationManager/CHANGELOG.md index f25568cc..69045b81 100644 --- a/shared/packages/expectationManager/CHANGELOG.md +++ b/shared/packages/expectationManager/CHANGELOG.md @@ -3,6 +3,54 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Bug Fixes + +* don't update the package status if a fulfilled status check fails with an error ([a362fec](https://github.com/nrkno/tv-automation-package-manager/commit/a362fec55b9fea6db18c15a1759cf142f2441573)) + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/shared/packages/expectationManager/package.json b/shared/packages/expectationManager/package.json index 5df8f6a6..ab63ebc4 100644 --- a/shared/packages/expectationManager/package.json +++ b/shared/packages/expectationManager/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/expectation-manager", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -13,8 +13,8 @@ "node": ">=14.18.0" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/worker": "1.50.0-alpha.9", + "@sofie-package-manager/api": "1.50.0-alpha.10", + "@sofie-package-manager/worker": "1.50.0-alpha.10", "@supercharge/promise-pool": "^2.4.0", "underscore": "^1.12.0" }, diff --git a/shared/packages/worker/CHANGELOG.md b/shared/packages/worker/CHANGELOG.md index cef34e8b..57286689 100644 --- a/shared/packages/worker/CHANGELOG.md +++ b/shared/packages/worker/CHANGELOG.md @@ -3,6 +3,81 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + +### Bug Fixes + +* Quote file paths in calls to ffmpeg on Windows [#132](https://github.com/nrkno/tv-automation-package-manager/issues/132) ([6625790](https://github.com/nrkno/tv-automation-package-manager/commit/6625790206d9f48d859da35087c158a40ed213ce)) +* remove double escaped file paths ([2f63f60](https://github.com/nrkno/tv-automation-package-manager/commit/2f63f60759edf0c06819f2a8802c78f2b3d383c0)) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + +### Bug Fixes + +* atem and ffmpeg linux ([87a5f35](https://github.com/nrkno/tv-automation-package-manager/commit/87a5f35a1aadbcb224e7ff3d3137a1155e450bc9)) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + +### Bug Fixes + +* add checks for FFPrope executable ([f1084e8](https://github.com/nrkno/tv-automation-package-manager/commit/f1084e84bb17968d39faf746ab841113137aeb14)) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* don't error when trying to generate a preview for an audio-only file ([f7a9dc5](https://github.com/nrkno/tv-automation-package-manager/commit/f7a9dc5255049271b5e4b1c58bc901300867708b)) +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + +### Features + +* generate audio waveform images for audio-only files (and don't try to generate previews for them) ([10e5747](https://github.com/nrkno/tv-automation-package-manager/commit/10e574757bcdd86a2a5aa9dade2ed34b5d0984f9)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + +### Features + +* make PREPARE_FILE_ACCESS_TIMEOUT longer ([252d270](https://github.com/nrkno/tv-automation-package-manager/commit/252d2707c72b29bee214759cf83c54f5a6f3e9c9)) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + +### Features + +* implement phase and balance measurements ([c1b7077](https://github.com/nrkno/tv-automation-package-manager/commit/c1b7077c548b12f45f6854cdf507f9b9cd94b009)) + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) ## [1.43.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.43.2) (2024-02-19) diff --git a/shared/packages/worker/package.json b/shared/packages/worker/package.json index 0a414c54..c92cedae 100644 --- a/shared/packages/worker/package.json +++ b/shared/packages/worker/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/worker", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -24,7 +24,7 @@ }, "dependencies": { "@parcel/watcher": "^2.3.0", - "@sofie-package-manager/api": "1.50.0-alpha.8", + "@sofie-package-manager/api": "1.50.0-alpha.10", "abort-controller": "^3.0.0", "atem-connection": "^3.2.0", "deep-diff": "^1.0.2", diff --git a/shared/packages/workforce/CHANGELOG.md b/shared/packages/workforce/CHANGELOG.md index 2f967f9d..d3a65cd8 100644 --- a/shared/packages/workforce/CHANGELOG.md +++ b/shared/packages/workforce/CHANGELOG.md @@ -3,6 +3,45 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + + + + # [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) diff --git a/shared/packages/workforce/package.json b/shared/packages/workforce/package.json index a3c7cc0d..263cf681 100644 --- a/shared/packages/workforce/package.json +++ b/shared/packages/workforce/package.json @@ -1,6 +1,6 @@ { "name": "@sofie-package-manager/workforce", - "version": "1.50.0-alpha.8", + "version": "1.50.0-alpha.10", "main": "dist/index", "types": "dist/index", "files": [ @@ -13,7 +13,7 @@ "__test": "jest" }, "dependencies": { - "@sofie-package-manager/api": "1.50.0-alpha.8" + "@sofie-package-manager/api": "1.50.0-alpha.10" }, "prettier": "@sofie-automation/code-standard-preset/.prettierrc.json", "engines": { diff --git a/tests/internal-tests/CHANGELOG.md b/tests/internal-tests/CHANGELOG.md index b95d30e0..6cbad889 100644 --- a/tests/internal-tests/CHANGELOG.md +++ b/tests/internal-tests/CHANGELOG.md @@ -3,6 +3,57 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [1.50.0-alpha.10](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.2...v1.50.0-alpha.10) (2024-02-19) + + + +# [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) + + + +# [1.50.0-alpha.8](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.0...v1.50.0-alpha.8) (2024-01-11) + + + +# [1.50.0-alpha.7](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.6...v1.50.0-alpha.7) (2023-09-08) + + + +# [1.50.0-alpha.6](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.5...v1.50.0-alpha.6) (2023-09-04) + + + +# [1.50.0-alpha.5](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.4...v1.50.0-alpha.5) (2023-09-04) + + + +# [1.50.0-alpha.4](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.3...v1.50.0-alpha.4) (2023-09-04) + + +### Bug Fixes + +* update dependency @sofie-automation/code-standard-preset to latest version, introduce ProtectedString & refactor ([db245bf](https://github.com/nrkno/tv-automation-package-manager/commit/db245bfca059bb33622512c8b4a6d828c80b9f7e)) + + + +# [1.50.0-alpha.3](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.2...v1.50.0-alpha.3) (2023-06-28) + + + +# [1.50.0-alpha.2](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.1...v1.50.0-alpha.2) (2023-06-22) + + + +# [1.50.0-alpha.1](https://github.com/nrkno/tv-automation-package-manager/compare/v1.50.0-alpha.0...v1.50.0-alpha.1) (2023-05-10) + + + +# [1.50.0-alpha.0](https://github.com/nrkno/tv-automation-package-manager/compare/v1.42.0...v1.50.0-alpha.0) (2023-05-10) + + + + + # [1.50.0-alpha.9](https://github.com/nrkno/tv-automation-package-manager/compare/v1.43.1...v1.50.0-alpha.9) (2024-01-30) diff --git a/tests/internal-tests/package.json b/tests/internal-tests/package.json index 3bdf6a35..0d8a7c9b 100644 --- a/tests/internal-tests/package.json +++ b/tests/internal-tests/package.json @@ -1,6 +1,6 @@ { "name": "@tests/internal-tests", - "version": "1.50.0-alpha.9", + "version": "1.50.0-alpha.10", "description": "Internal tests", "private": true, "scripts": { @@ -13,12 +13,12 @@ "tv-automation-quantel-gateway-client": "^3.1.7" }, "dependencies": { - "@http-server/generic": "1.50.0-alpha.8", - "@package-manager/generic": "1.50.0-alpha.9", - "@sofie-package-manager/api": "1.50.0-alpha.8", - "@sofie-package-manager/expectation-manager": "1.50.0-alpha.9", - "@sofie-package-manager/worker": "1.50.0-alpha.9", - "@sofie-package-manager/workforce": "1.50.0-alpha.8", + "@http-server/generic": "1.50.0-alpha.10", + "@package-manager/generic": "1.50.0-alpha.10", + "@sofie-package-manager/api": "1.50.0-alpha.10", + "@sofie-package-manager/expectation-manager": "1.50.0-alpha.10", + "@sofie-package-manager/worker": "1.50.0-alpha.10", + "@sofie-package-manager/workforce": "1.50.0-alpha.10", "underscore": "^1.12.0", "windows-network-drive": "^4.0.1" },