mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Merge remote-tracking branch 'nfarina/master'
# Conflicts: # lib/plugin.js
This commit is contained in:
@@ -166,10 +166,12 @@ Plugin.installed = function() {
|
|||||||
|
|
||||||
// reconstruct full path
|
// reconstruct full path
|
||||||
var pluginPath = path.join(requirePath, name);
|
var pluginPath = path.join(requirePath, name);
|
||||||
|
try {
|
||||||
// we only care about directories
|
// we only care about directories
|
||||||
if (!fs.statSync(pluginPath).isDirectory()) continue;
|
if (!fs.statSync(pluginPath).isDirectory()) continue;
|
||||||
|
} catch (e) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// does this module contain a package.json?
|
// does this module contain a package.json?
|
||||||
var pjson;
|
var pjson;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ module.exports = {
|
|||||||
Server: Server
|
Server: Server
|
||||||
}
|
}
|
||||||
|
|
||||||
function Server(insecureAccess) {
|
function Server(insecureAccess, opts) {
|
||||||
|
opts = opts || {};
|
||||||
|
|
||||||
// Setup Accessory Cache Storage
|
// Setup Accessory Cache Storage
|
||||||
accessoryStorage.initSync({ dir: User.cachedAccessoryPath() });
|
accessoryStorage.initSync({ dir: User.cachedAccessoryPath() });
|
||||||
|
|
||||||
@@ -46,7 +48,7 @@ function Server(insecureAccess) {
|
|||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
this._plugins = this._loadPlugins(); // plugins[name] = Plugin instance
|
this._plugins = this._loadPlugins(); // plugins[name] = Plugin instance
|
||||||
this._config = this._loadConfig();
|
this._config = opts.config || this._loadConfig();
|
||||||
this._cachedPlatformAccessories = this._loadCachedPlatformAccessories();
|
this._cachedPlatformAccessories = this._loadCachedPlatformAccessories();
|
||||||
this._bridge = this._createBridge();
|
this._bridge = this._createBridge();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "homebridge",
|
"name": "homebridge",
|
||||||
"description": "HomeKit support for the impatient",
|
"description": "HomeKit support for the impatient",
|
||||||
"version": "0.4.9",
|
"version": "0.4.10",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "DEBUG=* ./bin/homebridge -D -P example-plugins/ || true"
|
"dev": "DEBUG=* ./bin/homebridge -D -P example-plugins/ || true"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user