Code coverage report for lib/config.js

Statements: 76.27% (45 / 59)      Branches: 44.44% (4 / 9)      Functions: 60% (6 / 10)      Lines: 76.79% (43 / 56)      Ignored: none     

All files » lib/ » config.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89    1 2 2 2 2   1 1 1 1 1 1 9 9 9 9 9 9 9 9   1   1 1 1 1 1 66 66 66 66 66 66 66 66 66 66 66   1                                         1             1             1             1   1 1  
///<reference path=".d.ts"/>
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) Iif (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var path = require("path");
var staticConfigBaseLibPath = require("./common/static-config-base");
var configBaseLib = require("./common/config-base");
var Configuration = (function (_super) {
    __extends(Configuration, _super);
    function Configuration($fs) {
        _super.call(this, $fs);
        this.$fs = $fs;
        this.CI_LOGGER = false;
        this.DEBUG = false;
        this.TYPESCRIPT_COMPILER_OPTIONS = {};
        this.USE_PROXY = false;
        this.ANDROID_DEBUG_UI = null;
        _.extend(this, this.loadConfig("config").wait());
    }
    return Configuration;
})(configBaseLib.ConfigBase);
exports.Configuration = Configuration;
$injector.register("config", Configuration);
var StaticConfig = (function (_super) {
    __extends(StaticConfig, _super);
    function StaticConfig($injector) {
        _super.call(this, $injector);
        this.PROJECT_FILE_NAME = "package.json";
        this.CLIENT_NAME_KEY_IN_PROJECT_FILE = "nativescript";
        this.CLIENT_NAME = "tns";
        this.CLIENT_NAME_ALIAS = "NativeScript";
        this.ANALYTICS_API_KEY = "5752dabccfc54c4ab82aea9626b7338e";
        this.TRACK_FEATURE_USAGE_SETTING_NAME = "TrackFeatureUsage";
        this.ERROR_REPORT_SETTING_NAME = "TrackExceptions";
        this.ANALYTICS_INSTALLATION_ID_SETTING_NAME = "AnalyticsInstallationID";
        this.START_PACKAGE_ACTIVITY_NAME = "com.tns.NativeScriptActivity";
        this.version = require("../package.json").version;
    }
    Object.defineProperty(StaticConfig.prototype, "SYS_REQUIREMENTS_LINK", {
        get: function () {
            var linkToSysRequirements;
            switch (process.platform) {
                case "linux":
                    linkToSysRequirements = "http://docs.nativescript.org/setup/ns-cli-setup/ns-setup-linux.html#system-requirements";
                    break;
                case "win32":
                    linkToSysRequirements = "http://docs.nativescript.org/setup/ns-cli-setup/ns-setup-win.html#system-requirements";
                    break;
                case "darwin":
                    linkToSysRequirements = "http://docs.nativescript.org/setup/ns-cli-setup/ns-setup-os-x.html#system-requirements";
                    break;
                default:
                    linkToSysRequirements = "";
            }
            return linkToSysRequirements;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StaticConfig.prototype, "helpTextPath", {
        get: function () {
            return path.join(__dirname, "../resources/help.txt");
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StaticConfig.prototype, "HTML_CLI_HELPERS_DIR", {
        get: function () {
            return path.join(__dirname, "../docs/helpers");
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StaticConfig.prototype, "pathToPackageJson", {
        get: function () {
            return path.join(__dirname, "..", "package.json");
        },
        enumerable: true,
        configurable: true
    });
    return StaticConfig;
})(staticConfigBaseLibPath.StaticConfigBase);
exports.StaticConfig = StaticConfig;
$injector.register("staticConfig", StaticConfig);