New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

obs-websocket-js

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obs-websocket-js - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

dist/obs-websocket.js.map

24

CHANGELOG.md
# Change Log
## [vv0.7.0](https://github.com/haganbmj/obs-websocket-js/tree/vv0.7.0) (2017-07-18)
[Full Changelog](https://github.com/haganbmj/obs-websocket-js/compare/v0.6.1...vv0.7.0)
**Fixed bugs:**
- Fix onAuthenticationFailed emitter [\#49](https://github.com/haganbmj/obs-websocket-js/issues/49)
**Closed issues:**
- Add Get/Set/SaveStreamSettings [\#59](https://github.com/haganbmj/obs-websocket-js/issues/59)
- \[API\] Add TextSource and BrowserSource modification methods [\#56](https://github.com/haganbmj/obs-websocket-js/issues/56)
- \[Build\] Remove Grunt, update Webpack config [\#54](https://github.com/haganbmj/obs-websocket-js/issues/54)
- \[API\] add Get/SetRecordingFolder [\#52](https://github.com/haganbmj/obs-websocket-js/issues/52)
**Merged pull requests:**
- Update ava to the latest version 🚀 [\#60](https://github.com/haganbmj/obs-websocket-js/pull/60) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
- Update ava to the latest version 🚀 [\#58](https://github.com/haganbmj/obs-websocket-js/pull/58) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
- Update eslint to the latest version 🚀 [\#57](https://github.com/haganbmj/obs-websocket-js/pull/57) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
- Update webpack to the latest version 🚀 [\#55](https://github.com/haganbmj/obs-websocket-js/pull/55) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
- Update dependencies to enable Greenkeeper 🌴 [\#50](https://github.com/haganbmj/obs-websocket-js/pull/50) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
## [v0.6.1](https://github.com/haganbmj/obs-websocket-js/tree/v0.6.1) (2017-06-04)

@@ -8,3 +30,3 @@ [Full Changelog](https://github.com/haganbmj/obs-websocket-js/compare/v0.6.0...v0.6.1)

- \[API\] Expose addEvent and addRequest methods [\#47](https://github.com/haganbmj/obs-websocket-js/issues/47)
- \[API\] Expose registerEvent and registerRequest methods [\#47](https://github.com/haganbmj/obs-websocket-js/issues/47)
- \[API\] Strengthen Address Parsing [\#21](https://github.com/haganbmj/obs-websocket-js/issues/21)

@@ -11,0 +33,0 @@

6

lib/API.js

@@ -1,2 +0,2 @@

// Last Updated: May 05, 2017
// Last Updated: July 06, 2017

@@ -14,3 +14,5 @@ const API = {

'GetStudioModeStatus', 'GetPreviewScene', 'SetPreviewScene', 'TransitionToProgram', 'EnableStudioMode', 'DisableStudioMode', 'ToggleStudioMode',
'GetCurrentRTMPSettings'
'GetCurrentRTMPSettings', 'GetRecordingFolder', 'SetRecordingFolder',
'GetTextGDIPlusProperties', 'SetTextGDIPlusProperties', 'GetBrowserSourceProperties', 'SetBrowserSourceProperties',
'GetStreamSettings', 'SetStreamSettings', 'SaveStreamSettings'
],

@@ -17,0 +19,0 @@ availableEvents: [

@@ -7,21 +7,6 @@ const WebSocket = require('ws');

const logAmbiguousError = require('./util/logAmbiguousError');
const camelCaseKeys = require('./util/camelCaseKeys');
const NOP = function () {};
function camelCaseKeys(obj) {
obj = obj || {};
for (const key in obj) {
if (!{}.hasOwnProperty.call(obj, key)) {
continue;
}
const camelCasedKey = key.replace(/-([a-z])/gi, ($0, $1) => {
return $1.toUpperCase();
});
obj[camelCasedKey] = obj[key];
}
return obj;
}
class Socket extends EventEmitter {

@@ -68,3 +53,3 @@ constructor() {

// eslint-disable-next-line capitalized-comments
// debug('[OnMessage]: %o', msg);
debug('[OnMessage]: %o', msg);
const message = camelCaseKeys(JSON.parse(msg.data));

@@ -92,2 +77,4 @@ let err;

// Looks like this should be bound. We don't technically cancel the connection when the authentication fails.
// This whole method really needs a rewrite.
this._socket.onclose = () => {

@@ -113,3 +100,4 @@ this._connected = false;

* Opens a WebSocket connection to an obs-websocket server, but does not attempt any authentication.
* @param address {String}
*
* @param {String} address
* @returns {Promise}

@@ -149,3 +137,4 @@ * @private

* Authenticates to an obs-websocket server. Must already have an active connection before calling this method.
* @param [password=''] {String}
*
* @param {String} [password='']
* @returns {Promise}

@@ -165,2 +154,3 @@ * @private

this.emit('AuthenticationSuccess');
return Promise.resolve(Status.AUTH_NOT_REQUIRED);

@@ -175,2 +165,8 @@ }

});
})
.catch(err => {
debug('Authentication Failure. %o', err);
this.emit('AuthenticationFailure', err);
throw err;
});

@@ -177,0 +173,0 @@ }

@@ -5,5 +5,6 @@ const SHA256 = require('sha.js/sha256');

* SHA256 Hashing.
*
* @param {String} [salt='']
* @param {String} [challenge='']
* @param {String} msg
* @param {String} msg Message to encode.
* @return {String}

@@ -10,0 +11,0 @@ */

{
"name": "obs-websocket-js",
"version": "0.6.1",
"version": "0.7.0",
"description": "OBS Websocket API in Javascript, consume @Palakis/obs-websocket",

@@ -9,5 +9,4 @@ "main": "index.js",

"scripts": {
"grunt": "grunt",
"build": "grunt",
"watch": "grunt watch",
"build": "webpack",
"watch": "webpack --watch",
"test": "npm run static && nyc ava",

@@ -29,19 +28,15 @@ "ava": "nyc ava",

"dependencies": {
"debug": "^2.6.6",
"debug": "^2.6.8",
"sha.js": "^2.4.8",
"ws": "^2.3.1"
"ws": "^3.0.0"
},
"devDependencies": {
"ava": "^0.19.1",
"ava": "^0.21.0",
"babili-webpack-plugin": "^0.1.1",
"coveralls": "^2.13.1",
"eslint": "^3.19.0",
"eslint": "^4.1.0",
"eslint-config-xo-space": "^0.16.0",
"eslint-plugin-ava": "^4.2.0",
"grunt": "^1.0.1",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-webpack": "^2.0.1",
"load-grunt-tasks": "^3.5.2",
"nyc": "^10.3.0",
"webpack": "^2.2.1"
"nyc": "^11.0.2",
"webpack": "^3.0.0"
},

@@ -52,4 +47,2 @@ "bugs": {

"homepage": "https://github.com/haganbmj/obs-websocket-js#readme",
"sha": "dfccd1ebb5ed9f35c56e2d11602209997af0da9a",
"timestamp": "2017-06-04 02:15:14+00:00",
"eslintConfig": {

@@ -63,3 +56,5 @@ "extends": "xo-space/esnext"

]
}
},
"sha": "08414eef37ef5cef7becc843b6aec8870a9fb62e",
"timestamp": "2017-07-18 04:45:52+00:00"
}

@@ -12,3 +12,4 @@ # obs-websocket-js

<a href="https://github.com/haganbmj/obs-websocket-js/releases"><img src="https://img.shields.io/github/release/haganbmj/obs-websocket-js.svg?style=flat"></a>
<img src="https://img.shields.io/badge/license-MIT-blue.svg">
<a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/haganbmj/obs-websocket-js.svg"></a>
<img src="https://img.shields.io/npm/l/obs-websocket-js.svg">
<img src="https://img.shields.io/npm/dt/obs-websocket-js.svg">

@@ -15,0 +16,0 @@ </p>

const path = require('path');
const webpack = require('webpack');
const BabiliPlugin = require('babili-webpack-plugin');
const pkg = require('./package.json');
let banner =
`OBS WebSocket Javascript API (${pkg.name}) v${pkg.version}\n` +
`Author: ${pkg.author}\n` +
`License: ${pkg.license}\n` +
`Repository: ${pkg.repoUrl}\n` +
`Build Timestamp: ${pkg.timestamp || new Date().toISOString()}`;
banner += pkg.sha ? `\nBuilt from Commit: ${pkg.repoUrl}/commit/${pkg.sha}` : ``;
module.exports = {
target: 'web',
entry: {
'obs-websocket': './index.js'
'obs-websocket': './index.js',
'obs-websocket.min': './index.js'
},

@@ -16,3 +29,10 @@ output: {

},
devtool: false
devtool: 'source-map',
plugins: [
new BabiliPlugin({}, {
test: /\.min\.js($|\?)/i,
comments: false
}),
new webpack.BannerPlugin({banner})
]
};

Sorry, the diff of this file is too big to display

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