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

@brightsign/bsc

Package Overview
Dependencies
Maintainers
11
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightsign/bsc - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

35

bin/handlerFunctions.js

@@ -1287,2 +1287,34 @@ const fs = require('fs');

async function sendCec(argv) {
// get player data from argv
let playerData;
try {
playerData = await pullData(argv);
// playerData[0] = playerUser, [1] = playerIP, [2] = playerPW
} catch (err) {
errorHandler(err);
return;
}
logIfOption('Sending CEC command to ' + argv.playerName, argv.verbose);
logIfOption(' IP address: ' + playerData[1] + ', username: ' + playerData[0] + ', password: ' + playerData[2], argv.verbose);
let requestOptions = {
method: 'POST',
url: 'http://' + playerData[1] + '/api/v1/sendCecX',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({hexCommand: argv.command})
};
logIfOption('Sending ' + requestOptions.method + ' request to ' + requestOptions.url, argv.verbose);
try {
let response = await requestFetch(requestOptions, playerData[0], playerData[2]);
logIfOption('Response received! => ', argv.verbose);
if (!argv.rawdata) {
console.log('CEC command sent: ' + response.data.result.success);
} else if (argv.rawdata) {
console.log(response.data.result);
}
} catch (err) {
errorHandler(err);
}
}
// General functions

@@ -1687,3 +1719,4 @@ // confirm dangerous command

checkConfigExists,
helpChecker
helpChecker,
sendCec
};

@@ -87,2 +87,5 @@ #!/usr/bin/env node

// Send CEC command
yargs.command('sendcec <playerName> <command>', 'Send CEC command. Note that this command will only work on players running the newest version of supervisor', (yargs) => {positionals.sendCecPositional(yargs)}, (argv) => {handlers.sendCec(argv)});
// define yargs options

@@ -89,0 +92,0 @@ yargs.option('verbose', {

@@ -299,2 +299,15 @@ function getDiPositional(yargs) {

function sendCecPositional(yargs) {
yargs.positional('playerName', {
type: 'string',
default: 'player1',
describe: 'player name'
});
yargs.positional('command', {
type: 'string',
default: '',
describe: 'CEC command, direct passthrough'
});
}
module.exports = {

@@ -322,3 +335,4 @@ getDiPositional,

getPowerSavePositional,
facResetPositional
facResetPositional,
sendCecPositional
}

2

package.json
{
"name": "@brightsign/bsc",
"version": "1.0.7",
"version": "1.0.8",
"description": "Simple Node CLI App to communicate with a BrightSign player over the LAN using the Local DWS REST HTTP APIs.",

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

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