2015-11-26 05:31:31 +00:00
|
|
|
/// <reference path="typings/tsd.d.ts" />
|
2015-11-30 18:58:35 +00:00
|
|
|
/// <reference path="smartenv.classes.ts" />
|
|
|
|
/// <reference path="smartenv.environment.ts" />
|
|
|
|
/// <reference path="smartenv.objectstorage.ts" />
|
|
|
|
var plugins = {
|
|
|
|
beautylog: require("beautylog")("os"),
|
|
|
|
_: require("lodash")
|
|
|
|
}
|
2015-11-26 05:31:31 +00:00
|
|
|
var smartenv:any = {}; //create smartenv object
|
2015-11-30 14:04:04 +00:00
|
|
|
|
2015-11-30 18:58:35 +00:00
|
|
|
smartenv.getEnv = SmartenvEnvironment.init();
|
|
|
|
smartenv.obs = SmartenvObjectStorage.init();
|
2015-11-30 14:04:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------------------------- *
|
2015-11-30 18:58:35 +00:00
|
|
|
* ----- print info ------------------------ *
|
2015-11-30 14:04:04 +00:00
|
|
|
* ----------------------------------------- */
|
|
|
|
smartenv.printEnv = function() {
|
2015-11-30 18:58:35 +00:00
|
|
|
if (smartenv.getEnv().isNode) {
|
2015-11-30 14:04:04 +00:00
|
|
|
var smartenvVersion = require("./package.json").version;
|
2015-11-30 18:58:35 +00:00
|
|
|
plugins.beautylog.log("node version is " + smartenv.getEnv().nodeVersion + " and smartenv version is " + smartenvVersion);
|
2015-11-30 14:04:04 +00:00
|
|
|
} else {
|
2015-11-30 18:58:35 +00:00
|
|
|
plugins.beautylog.log("browser is " + smartenv.getEnv().userAgent)
|
2015-11-30 14:04:04 +00:00
|
|
|
}
|
2015-11-30 18:58:35 +00:00
|
|
|
plugins.beautylog.log("the smartenv registration store currently holds the following properties:");
|
|
|
|
console.log(Object.getOwnPropertyNames(smartenv.obs.getComplete).sort());
|
2015-11-26 05:31:31 +00:00
|
|
|
};
|
|
|
|
|
2015-11-30 18:58:35 +00:00
|
|
|
|
2015-11-28 13:49:44 +00:00
|
|
|
|
2015-11-26 05:31:31 +00:00
|
|
|
module.exports = smartenv;
|