expose meta containing watch and account info in ClayConfig

This commit is contained in:
Keegan
2016-02-19 19:31:17 -08:00
parent 94428b1826
commit 2169d5334f
6 changed files with 48 additions and 9 deletions
+25 -1
View File
@@ -10,6 +10,29 @@ var components = require('../src/scripts/components');
var componentRegistry = require('../src/scripts/lib/component-registry');
var idCounter = 0;
/**
* @returns {{accountToken: string, watchToken: string, activeWatchInfo: {platform:
* string, model: string, language: string, firmware: {major: number, minor:
* number, patch: number, suffix: string}}}}
*/
module.exports.meta = function() {
return {
accountToken: '0123456789abcdef0123456789abcdef',
watchToken: '0123456789abcdef0123456789abcdef',
activeWatchInfo: {
platform: 'chalk',
model: 'qemu_platform_chalk',
language: 'en_US',
firmware: {
major: 3,
minor: 3,
patch: 2,
suffix: ''
}
}
};
};
/**
* @param {string|Object} config
* @param {boolean} [autoRegister=true]
@@ -70,7 +93,8 @@ module.exports.clayConfig = function(types, build, autoRegister, settings) {
var clayConfig = new ClayConfig(
settings || {},
module.exports.config(types, autoRegister),
$(HTML('<div>'))
$(HTML('<div>')),
module.exports.meta()
);
return build === false ? clayConfig : clayConfig.build();
};