nrkno / sofie-mos-connection

Sofie MOS Connection: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
22 stars 14 forks source link

fix: NRCS returns empty objects #97

Closed olzzon closed 6 months ago

olzzon commented 6 months ago

About the Contributor

This pull request is posted on behalf of BBC

Type of Contribution

This is a:

Bug fix

Current Behavior

If the NRCS has empty or missing objects in the MachineInfo, the mos-connection will return an error, also in non strict mode.

New Behavior

When in non strict mode, mos-connection will fill out empty empty objects, and handle xmlSupportedProfiles as optional if it's undefined.

Testing Instructions

Run the MOS gateway with OpenMedia, and it will crash with the old version of mos-connection.

Other Information

Status

codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 77.43%. Comparing base (f996003) to head (9bb6825).

Files Patch % Lines
...ages/helper/src/mosModel/profile0/xmlConversion.ts 0.00% 0 Missing and 1 partial :warning:
packages/model/src/mosTypes/mosTime.ts 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #97 +/- ## ========================================== + Coverage 77.39% 77.43% +0.04% ========================================== Files 65 65 Lines 3570 3572 +2 Branches 804 823 +19 ========================================== + Hits 2763 2766 +3 + Misses 783 747 -36 - Partials 24 59 +35 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.