atem-connection
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -5,2 +5,17 @@ # Changelog | ||
## [1.1.0](https://github.com/nrkno/tv-automation-atem-connection/compare/1.0.2...1.1.0) (2019-10-24) | ||
### Features | ||
* refactor circleci config ([a7b0ca2](https://github.com/nrkno/tv-automation-atem-connection/commit/a7b0ca249b9e104833e8abde6d97e82934c8a14d)) | ||
* update ci to run for node 8,10,12 ([25f1fb1](https://github.com/nrkno/tv-automation-atem-connection/commit/25f1fb13d6c3d551ecc5f35ad05375858d18dcc7)) | ||
### Bug Fixes | ||
* incorrect order in ci release step ([ca0d207](https://github.com/nrkno/tv-automation-atem-connection/commit/ca0d207a04d8a19cd53308d83e05e12c2808f852)) | ||
* parse productIdentifierCommand successfully even for unknown models ([d991fdd](https://github.com/nrkno/tv-automation-atem-connection/commit/d991fddabf84e977c7a53197a4208e717d68e782)) | ||
* SuperSourceConfigCommand broken ([ccc7d33](https://github.com/nrkno/tv-automation-atem-connection/commit/ccc7d333e226ec0e7f9c09f640789d5520d7061a)) | ||
### [1.0.2](https://github.com/nrkno/tv-automation-atem-connection/compare/1.0.1...1.0.2) (2019-10-09) | ||
@@ -7,0 +22,0 @@ |
@@ -12,3 +12,2 @@ "use strict"; | ||
const exitHook = require("exit-hook"); | ||
const util_1 = require("util"); | ||
class Atem extends events_1.EventEmitter { | ||
@@ -420,3 +419,3 @@ constructor(options) { | ||
let changePaths = command.applyToState(this.state); | ||
if (!util_1.isArray(changePaths)) { | ||
if (!Array.isArray(changePaths)) { | ||
changePaths = [changePaths]; | ||
@@ -423,0 +422,0 @@ } |
export * from './versionCommand'; | ||
export * from './topologyCommand'; | ||
export * from './productIdentifierCommand'; | ||
export * from './superSourceConfigCommand'; |
@@ -7,2 +7,3 @@ "use strict"; | ||
tslib_1.__exportStar(require("./productIdentifierCommand"), exports); | ||
tslib_1.__exportStar(require("./superSourceConfigCommand"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -14,3 +14,3 @@ "use strict"; | ||
deviceName: atemUtil_1.Util.bufToNullTerminatedString(rawCommand, 0, 40), | ||
model: atemUtil_1.Util.parseEnum(rawCommand[40], __1.Enums.Model) | ||
model: rawCommand[40] | ||
}; | ||
@@ -17,0 +17,0 @@ } |
/// <reference types="node" /> | ||
import AbstractCommand from '../AbstractCommand'; | ||
import { AtemState } from '../../state'; | ||
import { ProtocolVersion } from '../../enums'; | ||
import { SuperSourceInfo } from '../../state/info'; | ||
export declare class SuperSourceConfigCommand extends AbstractCommand { | ||
rawName: string; | ||
properties: { | ||
superSourceBoxes: number; | ||
}; | ||
deserialize(rawCommand: Buffer): void; | ||
ssrcId: number; | ||
properties: SuperSourceInfo; | ||
deserialize(rawCommand: Buffer, version: ProtocolVersion): void; | ||
applyToState(state: AtemState): string; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const AbstractCommand_1 = require("../AbstractCommand"); | ||
const __1 = require("../.."); | ||
const enums_1 = require("../../enums"); | ||
class SuperSourceConfigCommand extends AbstractCommand_1.default { | ||
@@ -10,10 +10,19 @@ constructor() { | ||
} | ||
deserialize(rawCommand) { | ||
this.properties = { | ||
superSourceBoxes: __1.Util.parseNumberBetween(rawCommand[0], 0, 4) | ||
}; | ||
deserialize(rawCommand, version) { | ||
if (version >= enums_1.ProtocolVersion.V8_0) { | ||
this.ssrcId = rawCommand[0]; | ||
this.properties = { | ||
boxCount: rawCommand[2] | ||
}; | ||
} | ||
else { | ||
this.ssrcId = 0; | ||
this.properties = { | ||
boxCount: rawCommand[0] | ||
}; | ||
} | ||
} | ||
applyToState(state) { | ||
state.info = Object.assign(Object.assign({}, state.info), this.properties); | ||
return `info`; | ||
state.info.superSources[this.ssrcId] = this.properties; | ||
return `info.superSources`; | ||
} | ||
@@ -20,0 +29,0 @@ } |
@@ -21,2 +21,5 @@ import { Model, ProtocolVersion } from '../enums'; | ||
} | ||
export interface SuperSourceInfo { | ||
boxCount: number; | ||
} | ||
export declare class DeviceInfo { | ||
@@ -27,4 +30,4 @@ apiVersion: ProtocolVersion; | ||
productIdentifier: string; | ||
superSourceBoxes: number; | ||
superSources: SuperSourceInfo[]; | ||
power: boolean[]; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
class DeviceInfo { | ||
constructor() { | ||
this.superSources = []; | ||
} | ||
} | ||
exports.DeviceInfo = DeviceInfo; | ||
//# sourceMappingURL=info.js.map |
{ | ||
"name": "atem-connection", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Typescript Node.js library for connecting with an ATEM switcher.", | ||
@@ -23,4 +23,4 @@ "main": "dist/index.js", | ||
{ | ||
"name": "Stephan Nordnes Eriksen", | ||
"email": "Stephanruler@gmail.com" | ||
"name": "Julian Waller", | ||
"email": "git@julusian.co.uk" | ||
} | ||
@@ -31,4 +31,4 @@ ], | ||
"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", | ||
@@ -39,3 +39,3 @@ "test": "yarn lint && yarn unit", | ||
"cov-open": "open-cli coverage/lcov-report/index.html", | ||
"send-coverage": "jest && codecov", | ||
"send-coverage": "codecov", | ||
"docs": "yarn docs:html && open-cli docs/index.html", | ||
@@ -49,3 +49,2 @@ "docs:test": "yarn docs:html", | ||
"reset": "git clean -dfx && git reset --hard && yarn", | ||
"ci": "yarn test && yarn docs:test", | ||
"validate:dependencies": "yarn audit && yarn license-validate", | ||
@@ -73,3 +72,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", | ||
@@ -79,7 +77,7 @@ "license-validate": "Validate licenses for dependencies." | ||
"engines": { | ||
"node": ">=4.5" | ||
"node": ">=8.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^24.0.11", | ||
"@types/node": "^8.0.4", | ||
"@types/node": "^12.7.12", | ||
"codecov": "^3.2.0", | ||
@@ -86,0 +84,0 @@ "gh-pages": "^2.0.1", |
# Sofie: The Modern TV News Studio Automation System (ATEM connection library) | ||
[](https://circleci.com/gh/nrkno/tv-automation-atem-connection) | ||
[](https://codecov.io/gh/nrkno/tv-automation-atem-connection) | ||
@@ -4,0 +5,0 @@ This library is used in the [**Sofie** TV News Studio Automation System](https://github.com/nrkno/Sofie-TV-automation/) for connecting to Blackmagic Design ATEM devices. |
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
487560
344
7235
95