New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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

to
0.8.6

8

CHANGELOG.md

@@ -5,2 +5,10 @@ # Changelog

### [0.8.6](https://github.com/nrkno/tv-automation-mos-connection/compare/0.8.5...0.8.6) (2020-01-08)
### Features
* add dontUseQueryPort option, to suppress some logging output ([41ca963](https://github.com/nrkno/tv-automation-mos-connection/commit/41ca9633a976de4199e0556ec0b6d2d977408ab1))
* update ci to run for node 8,10,12 ([858ee35](https://github.com/nrkno/tv-automation-mos-connection/commit/858ee356d474b488c7c9d5f0ab5a64ec548cc80c))
### [0.8.5](https://github.com/nrkno/tv-automation-mos-connection/compare/0.8.4...0.8.5) (2019-10-25)

@@ -7,0 +15,0 @@

@@ -199,2 +199,6 @@ import { IProfiles } from './config/connectionConfig';

timeout?: number;
/** (Optional) Some server doesn't expose the Query port, which can cause connection-errors.
* Set this to true to not use that port (will cause some methods to stop working)
*/
dontUseQueryPort?: boolean;
};

@@ -215,2 +219,6 @@ /** Connection options for the Secondary (Buddy) NCS-server */

timeout?: number;
/** (Optional) Some server doesn't expose the Query port, which can cause connection-errors.
* Set this to true to not use that port (will cause some methods to stop working)
*/
dontUseQueryPort?: boolean;
};

@@ -217,0 +225,0 @@ }

1

dist/connection/NCSServerConnection.d.ts

@@ -43,2 +43,3 @@ /// <reference types="node" />

readonly connected: boolean;
private _getClients;
/** */

@@ -45,0 +46,0 @@ readonly lowerPortClients: MosSocketClient[];

27

dist/connection/NCSServerConnection.js

@@ -79,3 +79,3 @@ "use strict";

else {
throw Error('Unknown port name: "' + message.port + '"');
throw Error(`No "${message.port}" ports found`);
}

@@ -122,7 +122,6 @@ return new Promise((resolve, reject) => {

}
/** */
get lowerPortClients() {
_getClients(clientDescription) {
let clients = [];
for (let i in this._clients) {
if (this._clients[i].clientDescription === 'lower') {
if (this._clients[i].clientDescription === clientDescription) {
clients.push(this._clients[i].client);

@@ -134,20 +133,12 @@ }

/** */
get lowerPortClients() {
return this._getClients('lower');
}
/** */
get upperPortClients() {
let clients = [];
for (let i in this._clients) {
if (this._clients[i].clientDescription === 'upper') {
clients.push(this._clients[i].client);
}
}
return clients;
return this._getClients('upper');
}
/** */
get queryPortClients() {
let clients = [];
for (let i in this._clients) {
if (this._clients[i].clientDescription === 'query') {
clients.push(this._clients[i].client);
}
}
return clients;
return this._getClients('query');
}

@@ -154,0 +145,0 @@ get host() {

@@ -11,2 +11,3 @@ /// <reference types="node" />

removeSocket(socketID: number): void;
private _getSockets;
/** */

@@ -13,0 +14,0 @@ readonly lowerPortSockets: Socket[];

@@ -22,7 +22,6 @@ "use strict";

}
/** */
get lowerPortSockets() {
_getSockets(portDescription) {
let sockets = [];
for (let i in this._sockets) {
if (this._sockets[i].portDescription === 'lower') {
if (this._sockets[i].portDescription === portDescription) {
sockets.push(this._sockets[i].socket);

@@ -34,20 +33,12 @@ }

/** */
get lowerPortSockets() {
return this._getSockets('lower');
}
/** */
get upperPortSockets() {
let sockets = [];
for (let i in this._sockets) {
if (this._sockets[i].portDescription === 'upper') {
sockets.push(this._sockets[i].socket);
}
}
return sockets;
return this._getSockets('upper');
}
/** */
get queryPortSockets() {
let sockets = [];
for (let i in this._sockets) {
if (this._sockets[i].portDescription === 'query') {
sockets.push(this._sockets[i].socket);
}
}
return sockets;
return this._getSockets('query');
}

@@ -54,0 +45,0 @@ }

@@ -140,4 +140,4 @@ "use strict";

}
exports.MosTime = MosTime;
MosTime._defaultTimezone = 'Z';
exports.MosTime = MosTime;
//# sourceMappingURL=mosTime.js.map

@@ -74,3 +74,4 @@ "use strict";

primary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_UPPER, 'upper', true);
primary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_QUERY, 'query', false);
if (!connectionOptions.primary.dontUseQueryPort)
primary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_QUERY, 'query', false);
if (connectionOptions.secondary) {

@@ -90,3 +91,4 @@ secondary = new NCSServerConnection_1.NCSServerConnection(connectionOptions.secondary.id, connectionOptions.secondary.host, this._conf.mosID, connectionOptions.secondary.timeout, this._debug);

secondary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_UPPER, 'upper', true);
secondary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_QUERY, 'query', false);
if (!connectionOptions.primary.dontUseQueryPort)
secondary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_QUERY, 'query', false);
}

@@ -431,2 +433,3 @@ // Initialize mosDevice:

}
exports.MosConnection = MosConnection;
MosConnection.CONNECTION_PORT_LOWER = 10540;

@@ -436,3 +439,2 @@ MosConnection.CONNECTION_PORT_UPPER = 10541;

MosConnection._nextSocketID = 0;
exports.MosConnection = MosConnection;
//# sourceMappingURL=MosConnection.js.map

@@ -37,5 +37,5 @@ "use strict";

}
exports.MosMessage = MosMessage;
MosMessage.MAX_MESSAGE_ID = Math.pow(2, 31) - 2;
MosMessage._messageID = 1;
exports.MosMessage = MosMessage;
//# sourceMappingURL=MosMessage.js.map
{
"name": "mos-connection",
"version": "0.8.5",
"version": "0.8.6",
"description": "MOS compliant TCP/IP Socket connection.",

@@ -35,4 +35,4 @@ "main": "dist/index.js",

"build": "trash dist && yarn build:main",
"build:main": "tsc -p tsconfig.json",
"lint": "tslint --project tsconfig.jest.json --config tslint.json",
"build:main": "tsc -p tsconfig.build.json",
"lint": "tslint --project tsconfig.json --config tslint.json",
"unit": "jest --forceExit",

@@ -42,6 +42,6 @@ "test": "yarn lint && yarn unit",

"watch": "jest --watch",
"cov": "jest --coverage; opn coverage/lcov-report/index.html",
"cov-open": "opn coverage/lcov-report/index.html",
"send-coverage": "jest && codecov",
"docs": "yarn docs:html && opn docs/index.html",
"cov": "jest --coverage; open-cli coverage/lcov-report/index.html",
"cov-open": "open-cli coverage/lcov-report/index.html",
"send-coverage": "codecov",
"docs": "yarn docs:html && open-cli docs/index.html",
"docs:test": "yarn docs:html",

@@ -54,3 +54,2 @@ "docs:html": "typedoc src/index.ts --excludePrivate --mode file --theme minimal --out docs",

"reset": "git clean -dfx && git reset --hard && yarn",
"ci": "yarn test && yarn docs:test",
"validate:dependencies": "yarn audit && yarn license-validate",

@@ -79,3 +78,2 @@ "license-validate": "node-license-validator -p -d --allow-licenses MIT BSD BSD-3-Clause ISC Apache"

"reset": "Delete all untracked files and reset the repo to the last commit",
"ci": "Test script for running by the CI (CircleCI)",
"validate:dependencies": "Scan dependencies for vulnerabilities and check licenses",

@@ -87,5 +85,12 @@ "license-validate": "Validate licenses for dependencies."

},
"files": [
"/dist",
"/CHANGELOG.md",
"/README.md",
"/LICENSE"
],
"devDependencies": {
"@types/jest": "^24.0.16",
"@types/node": "^8.0.4",
"@types/node": "^12.12.3",
"@types/xmlbuilder": "^0.0.34",
"codecov": "^3.6.1",

@@ -97,3 +102,2 @@ "gh-pages": "^2.0.1",

"npm-scripts-info": "^0.3.9",
"nyc": "^14.1.1",
"open-cli": "^5.0.0",

@@ -124,3 +128,2 @@ "sleep-ms": "^2.0.1",

"dependencies": {
"@types/xmlbuilder": "^0.0.34",
"iconv-lite": "^0.5.0",

@@ -135,3 +138,6 @@ "moment": "^2.24.0",

"tagPrefix": ""
},
"resolutions": {
"**/**/handlebars": "^4.5.3"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet