Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamic-config-store

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamic-config-store - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

24

dist/dynamic-config-store.es5.js

@@ -97,4 +97,4 @@ import immer from 'immer';

}
var ConfigClass = /** @class */ (function () {
function ConfigClass(initialValues, envOverridePrefix, configName) {
var ConfigStore = /** @class */ (function () {
function ConfigStore(initialValues, envOverridePrefix, configName) {
if (envOverridePrefix === void 0) { envOverridePrefix = "CONFIG_OVERRIDE_"; }

@@ -109,3 +109,3 @@ if (configName === void 0) { configName = ""; }

}
ConfigClass.prototype.setEnvOverridePrefix = function (envOverridePrefix) {
ConfigStore.prototype.setEnvOverridePrefix = function (envOverridePrefix) {
this._overridePrefix = envOverridePrefix;

@@ -121,3 +121,3 @@ try {

};
ConfigClass.prototype.setEnvLinks = function (envLinks, ignorePrevious) {
ConfigStore.prototype.setEnvLinks = function (envLinks, ignorePrevious) {
if (ignorePrevious === void 0) { ignorePrevious = false; }

@@ -130,7 +130,7 @@ if (ignorePrevious) {

};
ConfigClass.prototype.addConfigChangeReaction = function (configChangeReaction) {
ConfigStore.prototype.addConfigChangeReaction = function (configChangeReaction) {
this._configChangeReactions.push(configChangeReaction);
this.finalizeValues();
};
ConfigClass.prototype.setConfig = function (config, envOverridePrefix) {
ConfigStore.prototype.setConfig = function (config, envOverridePrefix) {
if (envOverridePrefix === void 0) { envOverridePrefix = this._overridePrefix; }

@@ -141,3 +141,3 @@ this._values = merge({}, this._values, config);

};
ConfigClass.prototype.getConfig = function (_a) {
ConfigStore.prototype.getConfig = function (_a) {
var _b = _a === void 0 ? {} : _a, _c = _b.ignoreOverrides, ignoreOverrides = _c === void 0 ? false : _c, _d = _b.ignoreEnvLinks, ignoreEnvLinks = _d === void 0 ? false : _d, _e = _b.ignoreReactions, ignoreReactions = _e === void 0 ? false : _e;

@@ -162,9 +162,9 @@ if (ignoreOverrides || ignoreEnvLinks || ignoreReactions) {

};
ConfigClass.prototype.getEnvLinks = function () {
ConfigStore.prototype.getEnvLinks = function () {
return this._envLinks;
};
ConfigClass.prototype.getOverrides = function () {
ConfigStore.prototype.getOverrides = function () {
return this._envOverrides;
};
ConfigClass.prototype.finalizeValues = function () {
ConfigStore.prototype.finalizeValues = function () {
this._valuesWithAugmentations = merge({}, this._values, this._envLinks, this._envOverrides);

@@ -176,6 +176,6 @@ for (var _i = 0, _a = this._configChangeReactions; _i < _a.length; _i++) {

};
return ConfigClass;
return ConfigStore;
}());
export { ETypeOfEnvLink, ConfigClass };
export { ETypeOfEnvLink, ConfigStore };
//# sourceMappingURL=dynamic-config-store.es5.js.map

@@ -101,4 +101,4 @@ (function (global, factory) {

}
var ConfigClass = /** @class */ (function () {
function ConfigClass(initialValues, envOverridePrefix, configName) {
var ConfigStore = /** @class */ (function () {
function ConfigStore(initialValues, envOverridePrefix, configName) {
if (envOverridePrefix === void 0) { envOverridePrefix = "CONFIG_OVERRIDE_"; }

@@ -113,3 +113,3 @@ if (configName === void 0) { configName = ""; }

}
ConfigClass.prototype.setEnvOverridePrefix = function (envOverridePrefix) {
ConfigStore.prototype.setEnvOverridePrefix = function (envOverridePrefix) {
this._overridePrefix = envOverridePrefix;

@@ -125,3 +125,3 @@ try {

};
ConfigClass.prototype.setEnvLinks = function (envLinks, ignorePrevious) {
ConfigStore.prototype.setEnvLinks = function (envLinks, ignorePrevious) {
if (ignorePrevious === void 0) { ignorePrevious = false; }

@@ -134,7 +134,7 @@ if (ignorePrevious) {

};
ConfigClass.prototype.addConfigChangeReaction = function (configChangeReaction) {
ConfigStore.prototype.addConfigChangeReaction = function (configChangeReaction) {
this._configChangeReactions.push(configChangeReaction);
this.finalizeValues();
};
ConfigClass.prototype.setConfig = function (config, envOverridePrefix) {
ConfigStore.prototype.setConfig = function (config, envOverridePrefix) {
if (envOverridePrefix === void 0) { envOverridePrefix = this._overridePrefix; }

@@ -145,3 +145,3 @@ this._values = lodash.merge({}, this._values, config);

};
ConfigClass.prototype.getConfig = function (_a) {
ConfigStore.prototype.getConfig = function (_a) {
var _b = _a === void 0 ? {} : _a, _c = _b.ignoreOverrides, ignoreOverrides = _c === void 0 ? false : _c, _d = _b.ignoreEnvLinks, ignoreEnvLinks = _d === void 0 ? false : _d, _e = _b.ignoreReactions, ignoreReactions = _e === void 0 ? false : _e;

@@ -166,9 +166,9 @@ if (ignoreOverrides || ignoreEnvLinks || ignoreReactions) {

};
ConfigClass.prototype.getEnvLinks = function () {
ConfigStore.prototype.getEnvLinks = function () {
return this._envLinks;
};
ConfigClass.prototype.getOverrides = function () {
ConfigStore.prototype.getOverrides = function () {
return this._envOverrides;
};
ConfigClass.prototype.finalizeValues = function () {
ConfigStore.prototype.finalizeValues = function () {
this._valuesWithAugmentations = lodash.merge({}, this._values, this._envLinks, this._envOverrides);

@@ -180,6 +180,6 @@ for (var _i = 0, _a = this._configChangeReactions; _i < _a.length; _i++) {

};
return ConfigClass;
return ConfigStore;
}());
exports.ConfigStore = ConfigClass;
exports.ConfigStore = ConfigStore;

@@ -186,0 +186,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

@@ -99,4 +99,4 @@ "use strict";

}
var ConfigClass = /** @class */ (function () {
function ConfigClass(initialValues, envOverridePrefix, configName) {
var ConfigStore = /** @class */ (function () {
function ConfigStore(initialValues, envOverridePrefix, configName) {
if (envOverridePrefix === void 0) { envOverridePrefix = "CONFIG_OVERRIDE_"; }

@@ -111,3 +111,3 @@ if (configName === void 0) { configName = ""; }

}
ConfigClass.prototype.setEnvOverridePrefix = function (envOverridePrefix) {
ConfigStore.prototype.setEnvOverridePrefix = function (envOverridePrefix) {
this._overridePrefix = envOverridePrefix;

@@ -123,3 +123,3 @@ try {

};
ConfigClass.prototype.setEnvLinks = function (envLinks, ignorePrevious) {
ConfigStore.prototype.setEnvLinks = function (envLinks, ignorePrevious) {
if (ignorePrevious === void 0) { ignorePrevious = false; }

@@ -132,7 +132,7 @@ if (ignorePrevious) {

};
ConfigClass.prototype.addConfigChangeReaction = function (configChangeReaction) {
ConfigStore.prototype.addConfigChangeReaction = function (configChangeReaction) {
this._configChangeReactions.push(configChangeReaction);
this.finalizeValues();
};
ConfigClass.prototype.setConfig = function (config, envOverridePrefix) {
ConfigStore.prototype.setConfig = function (config, envOverridePrefix) {
if (envOverridePrefix === void 0) { envOverridePrefix = this._overridePrefix; }

@@ -143,3 +143,3 @@ this._values = lodash_2.merge({}, this._values, config);

};
ConfigClass.prototype.getConfig = function (_a) {
ConfigStore.prototype.getConfig = function (_a) {
var _b = _a === void 0 ? {} : _a, _c = _b.ignoreOverrides, ignoreOverrides = _c === void 0 ? false : _c, _d = _b.ignoreEnvLinks, ignoreEnvLinks = _d === void 0 ? false : _d, _e = _b.ignoreReactions, ignoreReactions = _e === void 0 ? false : _e;

@@ -164,9 +164,9 @@ if (ignoreOverrides || ignoreEnvLinks || ignoreReactions) {

};
ConfigClass.prototype.getEnvLinks = function () {
ConfigStore.prototype.getEnvLinks = function () {
return this._envLinks;
};
ConfigClass.prototype.getOverrides = function () {
ConfigStore.prototype.getOverrides = function () {
return this._envOverrides;
};
ConfigClass.prototype.finalizeValues = function () {
ConfigStore.prototype.finalizeValues = function () {
this._valuesWithAugmentations = lodash_2.merge({}, this._values, this._envLinks, this._envOverrides);

@@ -178,5 +178,5 @@ for (var _i = 0, _a = this._configChangeReactions; _i < _a.length; _i++) {

};
return ConfigClass;
return ConfigStore;
}());
exports.ConfigClass = ConfigClass;
exports.ConfigStore = ConfigStore;
//# sourceMappingURL=dynamic-config-store.js.map

@@ -11,3 +11,3 @@ export declare enum ETypeOfEnvLink {

export declare type TConfigChangeReaction<T = any> = (config: T) => void;
export declare class ConfigClass<T extends object> {
export declare class ConfigStore<T extends object> {
private _values;

@@ -14,0 +14,0 @@ private _valuesWithAugmentations;

{
"name": "dynamic-config-store",
"version": "1.0.1",
"version": "1.0.2",
"description": "Simple configuration utility for deployments and libraries",

@@ -28,2 +28,3 @@ "keywords": [

"build": "tsc --module commonjs && rollup -c rollup.config.ts && typedoc --out docs --target es6 --theme minimal --mode file src",
"prepublish": "npm run build",
"test": "jest"

@@ -55,2 +56,3 @@ },

"ts-jest": "^23.10.4",
"typedoc": "^0.13.0",
"typescript": "^3.1.6",

@@ -57,0 +59,0 @@ "rollup": "^0.66.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc