homey-lib
Advanced tools
Comparing version 1.0.37 to 1.0.39
@@ -37,2 +37,10 @@ "use strict"; | ||
*/ | ||
App.prototype.getAllowedLocales = function(){ | ||
return allowedLocales; | ||
} | ||
App.prototype.getAllowedCategories = function(){ | ||
return allowedCategories; | ||
} | ||
@@ -56,5 +64,2 @@ App.prototype.validate = function( lvl_publish ){ | ||
if( !fileExistsSyncCaseSensitive( path.join(this.app_path, 'app.js') ) ) | ||
error("app.js does not exist"); | ||
if( !fileExistsSyncCaseSensitive( path.join(this.app_path, 'app.json') ) ) | ||
@@ -85,2 +90,10 @@ error("app.json does not exist"); | ||
let sdk = parseInt(json.sdk); | ||
if( isNaN(sdk) ) sdk = 1; | ||
if( sdk < 2 ) { | ||
if( !fileExistsSyncCaseSensitive( path.join(this.app_path, 'app.js') ) ) | ||
error("app.js does not exist"); | ||
} | ||
// check if required json entries exist | ||
@@ -300,6 +313,6 @@ if( typeof json.id == 'undefined' ) | ||
if( setting.type === 'group' ) { | ||
if( typeof setting.children == 'undefined' ) | ||
return error("missing `driver[" + i + "].settings" + path + "[" + j + "].children` in app.json"); | ||
if( !Array.isArray(setting.children) ) | ||
@@ -306,0 +319,0 @@ return error("`driver[" + i + "].settings" + path + "[" + j + "].children` in app.json is not an Array."); |
{ | ||
"name": "homey-lib", | ||
"version": "1.0.37", | ||
"version": "1.0.39", | ||
"description": "Library for Homey", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
147347
1965