Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mos-connection

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mos-connection - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

17

CHANGELOG.md

@@ -5,21 +5,8 @@ # Change Log

# [0.7.0](https://github.com/nrkno/tv-automation-mos-connection/compare/0.6.8...0.7.0) (2019-04-08)
# [0.8.0](https://github.com/nrkno/tv-automation-mos-connection/compare/0.7.0...0.8.0) (2019-04-10)
### Bug Fixes
* _timedOutCommands should be defined ([292afd1](https://github.com/nrkno/tv-automation-mos-connection/commit/292afd1))
* changed API according to mos protocol ([4384338](https://github.com/nrkno/tv-automation-mos-connection/commit/4384338))
* file structure for profiles ([b41ad5e](https://github.com/nrkno/tv-automation-mos-connection/commit/b41ad5e))
* mosAck ([aa2f110](https://github.com/nrkno/tv-automation-mos-connection/commit/aa2f110))
* suppress logging for late replies ([97860c5](https://github.com/nrkno/tv-automation-mos-connection/commit/97860c5))
* Update IMosDevice for profile3 ([b95c6b5](https://github.com/nrkno/tv-automation-mos-connection/commit/b95c6b5))
* username is attribute not option for xml ([b2580f2](https://github.com/nrkno/tv-automation-mos-connection/commit/b2580f2))
### Features
* enable query-port ([7506c3d](https://github.com/nrkno/tv-automation-mos-connection/commit/7506c3d))
* profile 3 ([f4688c7](https://github.com/nrkno/tv-automation-mos-connection/commit/f4688c7))
* profile 3 unit tests for MOS side ([992ec7c](https://github.com/nrkno/tv-automation-mos-connection/commit/992ec7c))
* **mosExternalMetadata:** adds a very specific parser to eliminate known errors [in ENPS?] with some number values coming through as localized strings ([7ec7491](https://github.com/nrkno/tv-automation-mos-connection/commit/7ec7491))

@@ -26,0 +13,0 @@

23

dist/mosModel/Parser.js

@@ -320,2 +320,17 @@ "use strict";

Parser.item2xml = item2xml;
function handlePayloadProperties(prop) {
// prop is string, can be a mis-typing of number - if it contains numbers and comma
// strings with numbers and , grouped will trigger
if (prop && typeof prop === 'string' && prop.match(/[0-9]+[,][0-9]+/)) {
// here is the fix for replacing and casting
let commaCast = prop.replace(/,/, '.');
let floatCast = parseFloat(commaCast);
// ensure that the float hasn't changed value or content by checking it in reverse before returning the altered one
if (floatCast.toString() === commaCast) {
return floatCast;
}
}
// return the original content if we failed to identify and mutate the content
return prop;
}
function fixPayload(obj) {

@@ -333,4 +348,12 @@ if (typeof obj === 'object') {

}
else {
// do property-check on certain props (like MediaTime)
obj[key] = handlePayloadProperties(o);
}
}
}
else {
// do property-check on certain props (like MediaTime)
obj = handlePayloadProperties(obj);
}
return obj;

@@ -337,0 +360,0 @@ }

{
"name": "mos-connection",
"version": "0.7.0",
"version": "0.8.0",
"description": "MOS compliant TCP/IP Socket connection.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# Sofie: The Modern TV News Studio Automation System (MOS Connection library)
[![CircleCI](https://circleci.com/gh/nrkno/tv-automation-mos-connection.svg?style=svg)](https://circleci.com/gh/nrkno/tv-automation-mos-connection)
[![codecov](https://codecov.io/gh/nrkno/tv-automation-mos-connection/branch/master/graph/badge.svg)](https://codecov.io/gh/nrkno/tv-automation-mos-connection)

@@ -9,3 +10,2 @@ Library for connecting to a MOS device using the [MOS Protocol](http://mosprotocol.com/).

## Getting started

@@ -12,0 +12,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc