chromecast-discover
Advanced tools
Comparing version 1.0.5 to 1.0.6
module.exports = { | ||
extends: 'airbnb', | ||
extends: 'airbnb-base', | ||
rules: { | ||
'no-console': ['error', { allow: ['error'] }], | ||
'max-len': ['error', 180], | ||
}, | ||
}; |
@@ -1,2 +0,2 @@ | ||
# Changelog | ||
# Change Log | ||
@@ -3,0 +3,0 @@ ## 1.0.3 - 2017-07-05 |
@@ -1,2 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("mdns-js"),require("events"),require("debug")):"function"==typeof define&&define.amd?define(["mdns-js","events","debug"],t):"object"==typeof exports?exports["chromecast-discover"]=t(require("mdns-js"),require("events"),require("debug")):e["chromecast-discover"]=t(e["mdns-js"],e.events,e.debug)}(this,function(e,t,r){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(1),a=n(c),f=r(2),d=n(f),p=r(3),l=n(p),b=(0,l.default)("chromecast-discover"),v={id:"id",ve:"version",md:"model",ic:"iconPath",fn:"friendlyName",st:"streaming",rs:"appName"},y=function(e){function t(){o(this,t);var e=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));e.ready=!1;var r=a.default.tcp("googlecast"),n=new a.default.createBrowser(r);return e.browser=n,n.on("ready",function(){b("ready"),e.ready=!0}),n.on("update",function(t){b("update",t);var r=t.type[0];if("googlecast"!==r.name||"tcp"!==r.protocol)return void b("skipped: not a chromecast");if(!t.txt)return void b("skipped: no txt record");var n={host:t.host,addresses:t.addresses,port:t.port,fullname:t.fullname};t.txt.forEach(function(e){var t=e.match(/^([^=]+)=(.*)$/),r=t[1],o=t[2],u=v[r];u&&(n[u]=o)}),b(n),e.emit("online",n)}),e}return i(t,e),s(t,[{key:"start",value:function(){var e=this;if(!this.ready)return b("not ready"),void setTimeout(function(){return e.start()},250);b("send discover"),this.browser.discover()}}]),t}(d.default),m=new y;t.default=m,e.exports=t.default},function(e,t){e.exports=require("mdns-js")},function(e,t){e.exports=require("events")},function(e,t){e.exports=require("debug")}])}); | ||
//# sourceMappingURL=index.js.map | ||
module.exports=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='',b(b.s=0)}([function(a,b,c){'use strict';function d(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(b,'__esModule',{value:!0});var e=c(1),f=d(e),g=c(2),h=d(g),i=c(3),j=d(i);const k=(0,j.default)('chromecast-discover'),l={id:'id',ve:'version',md:'model',ic:'iconPath',fn:'friendlyName',st:'streaming',rs:'appName',ca:'certificateAuthority'};class m extends h.default{constructor(){super(),this.ready=!1;const a=f.default.tcp('googlecast'),b=new f.default.createBrowser(a);this.browser=b,b.on('ready',()=>{k('ready'),this.ready=!0}),b.on('update',(a)=>{k('update',a);const b=a.type[0];if('googlecast'!==b.name||'tcp'!==b.protocol)return void k('skipped: not a chromecast');if(!a.txt)return void k('skipped: no txt record');const c={host:a.host,addresses:a.addresses,port:a.port,fullname:a.fullname},d=a.txt;d.forEach((a)=>{const b=a.match(/^([^=]+)=(.*)$/),d=b[1],e=b[2],f=l[d];f&&(c[f]=e)}),k(c),this.emit('online',c)})}start(){const a=this;return this.ready?void(k('send discover'),this.browser.discover()):(k('not ready'),void setTimeout(()=>a.start(),250))}}const n=new m;b.default=n},function(a){a.exports=require('mdns-js')},function(a){a.exports=require('events')},function(a){a.exports=require('debug')}]); |
@@ -7,19 +7,19 @@ { | ||
"dependencies": { | ||
"debug": "^2.6.8", | ||
"eslint-loader": "^1.8.0", | ||
"mdns-js": "^0.5.3" | ||
"debug": "^3.1.0", | ||
"eslint-loader": "^1.9.0", | ||
"mdns-js": "0.5.3" | ||
}, | ||
"description": "Discover Chromecasts via mdns", | ||
"devDependencies": { | ||
"babel-core": "^6.25.0", | ||
"babel-eslint": "^7.1.1", | ||
"babel-loader": "^7.1.1", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-preset-latest": "^6.22.0", | ||
"eslint": "^3.19.0", | ||
"eslint-config-airbnb": "^15.0.2", | ||
"eslint-plugin-import": "^2.6.1", | ||
"eslint-plugin-jsx-a11y": "^5.1.1", | ||
"eslint-plugin-react": "^7.1.0", | ||
"webpack": "^3.0.0", | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-minify-webpack-plugin": "^0.2.0", | ||
"babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-preset-env": "^1.6.1", | ||
"eslint": "^4.14.0", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-plugin-import": "^2.8.0", | ||
"webpack": "^3.10.0", | ||
"webpack-monitor": "^1.0.14", | ||
"webpack-node-externals": "^1.6.0" | ||
@@ -33,2 +33,3 @@ }, | ||
"main": "dist/index.js", | ||
"module": "src/index.js", | ||
"name": "chromecast-discover", | ||
@@ -40,3 +41,3 @@ "repository": { | ||
"scripts": { | ||
"build": "webpack -p", | ||
"build": "webpack", | ||
"lint": "eslint .", | ||
@@ -48,3 +49,3 @@ "postversion": "git push", | ||
}, | ||
"version": "1.0.5" | ||
"version": "1.0.6" | ||
} |
@@ -34,3 +34,2 @@ # Chromecast Discover | ||
* yarn test | ||
* yarn version | ||
* yarn publish | ||
@@ -37,0 +36,0 @@ |
@@ -1,14 +0,14 @@ | ||
var path = require('path'); // eslint-disable-line no-var | ||
var nodeExternals = require('webpack-node-externals'); // eslint-disable-line no-var | ||
const path = require('path'); | ||
const nodeExternals = require('webpack-node-externals'); | ||
const MinifyPlugin = require('babel-minify-webpack-plugin'); | ||
const WebpackMonitor = require('webpack-monitor'); | ||
module.exports = { | ||
devtool: 'source-map', | ||
entry: './src/index.js', | ||
target: 'node', | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
library: 'chromecast-discover', | ||
libraryTarget: 'umd', | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: 'index.js', | ||
libraryTarget: 'commonjs2', | ||
}, | ||
target: 'node', | ||
externals: [nodeExternals()], | ||
@@ -30,2 +30,8 @@ module: { | ||
}, | ||
plugins: [ | ||
new MinifyPlugin(), | ||
new WebpackMonitor({ | ||
target: '../.monitor.json', | ||
}), | ||
], | ||
}; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
117
39723
45
Updateddebug@^3.1.0
Updatedeslint-loader@^1.9.0
Updatedmdns-js@0.5.3