t-configurator
Advanced tools
Comparing version 0.0.4 to 0.0.5
var Container_1 = require("typedi/Container"); | ||
var Configurator_1 = require("./Configurator"); | ||
function Config(name, searchFlattened) { | ||
if (searchFlattened === void 0) { searchFlattened = false; } | ||
if (searchFlattened === void 0) { searchFlattened = true; } | ||
return function (target, key, index) { | ||
@@ -15,3 +15,3 @@ Container_1.Container.registerCustomParamHandler({ | ||
function InjectConfig(name, searchFlattened) { | ||
if (searchFlattened === void 0) { searchFlattened = false; } | ||
if (searchFlattened === void 0) { searchFlattened = true; } | ||
return function (target, key) { | ||
@@ -18,0 +18,0 @@ Object.defineProperty(target, key, { |
@@ -17,3 +17,3 @@ var ConfiguratorUtils_1 = require("./ConfiguratorUtils"); | ||
Configurator.prototype.get = function (key, searchFlattened) { | ||
if (searchFlattened === void 0) { searchFlattened = false; } | ||
if (searchFlattened === void 0) { searchFlattened = true; } | ||
var config = searchFlattened ? ConfiguratorUtils_1.ConfiguratorUtils.flatten(this.configuration) : this.configuration; | ||
@@ -20,0 +20,0 @@ var value = Object.keys(config).reduce(function (found, configKey) { return key === configKey ? config[key] : found; }, undefined); |
@@ -25,2 +25,3 @@ var ConfiguratorUtils = (function () { | ||
else if (Array.isArray(cur)) { | ||
result[prop] = cur; | ||
for (var i = 0, l = cur.length; i < l; i++) | ||
@@ -33,2 +34,3 @@ recurse(cur[i], prop + "[" + i + "]"); | ||
var isEmpty = true; | ||
result[prop] = cur; | ||
for (var p in cur) { | ||
@@ -35,0 +37,0 @@ isEmpty = false; |
{ | ||
"name": "t-configurator", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Allows to manage configuration files in your project", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -50,8 +50,8 @@ # T-Configurator | ||
{ | ||
"factoryName": "%%factoryName%%", | ||
"showEngineInfo": "%%showEngineInfo%%", | ||
"factoryName": "%factoryName%", | ||
"showEngineInfo": "%showEngineInfo%", | ||
"engine": { | ||
"version": "%%engine|version%%", | ||
"version": "%engine::version%", | ||
"name": "Reactive", | ||
"description": "%%engine|description%%" | ||
"description": "%engine::description%" | ||
} | ||
@@ -58,0 +58,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11663
170