configcat-common
Advanced tools
Comparing version 1.1.0 to 1.1.3
@@ -8,2 +8,3 @@ import { IConfigCatLogger, IAutoPollOptions, ILazyLoadingOptions, IManualPollOptions } from "."; | ||
apiKey: string; | ||
clientVersion: string; | ||
constructor(apiKey: string, clientVersion: string, options: IOptions); | ||
@@ -10,0 +11,0 @@ getUrl(): string; |
@@ -22,2 +22,3 @@ "use strict"; | ||
this.apiKey = apiKey; | ||
this.clientVersion = clientVersion; | ||
if (options && options.logger) { | ||
@@ -24,0 +25,0 @@ this.logger = options.logger; |
import { IConfigCatClient } from "./ConfigCatClient"; | ||
import { IOptions } from "./ConfigCatClientOptions"; | ||
import { IOptions, OptionsBase } from "./ConfigCatClientOptions"; | ||
import { ProjectConfig } from "./ProjectConfigService"; | ||
@@ -41,3 +41,3 @@ /** | ||
export interface IConfigFetcher { | ||
fetchLogic(lastProjectConfig: ProjectConfig, callback: (newProjectConfig: ProjectConfig) => void): void; | ||
fetchLogic(options: OptionsBase, lastProjectConfig: ProjectConfig, callback: (newProjectConfig: ProjectConfig) => void): void; | ||
} | ||
@@ -44,0 +44,0 @@ export interface ICache { |
@@ -1,2 +0,2 @@ | ||
import { IConfigFetcher, IConfigCatLogger, ICache } from "."; | ||
import { IConfigFetcher, ICache } from "."; | ||
import { OptionsBase } from "./ConfigCatClientOptions"; | ||
@@ -19,5 +19,5 @@ export declare class ProjectConfig { | ||
protected cache: ICache; | ||
protected logger: IConfigCatLogger; | ||
protected baseConfig: OptionsBase; | ||
constructor(configFetcher: IConfigFetcher, cache: ICache, baseConfig: OptionsBase); | ||
protected refreshLogicBase(lastProjectConfig: ProjectConfig, callback: (value: ProjectConfig) => void): void; | ||
} |
@@ -25,7 +25,7 @@ "use strict"; | ||
this.cache = cache; | ||
this.logger = baseConfig.logger; | ||
this.baseConfig = baseConfig; | ||
} | ||
ConfigServiceBase.prototype.refreshLogicBase = function (lastProjectConfig, callback) { | ||
var _this = this; | ||
this.configFetcher.fetchLogic(lastProjectConfig, function (newConfig) { | ||
this.configFetcher.fetchLogic(this.baseConfig, lastProjectConfig, function (newConfig) { | ||
if (newConfig) { | ||
@@ -32,0 +32,0 @@ _this.cache.Set(newConfig); |
{ | ||
"name": "configcat-common", | ||
"version": "1.1.0", | ||
"version": "1.1.3", | ||
"description": "ConfigCat is a configuration as a service that lets you manage your features and configurations without actually deploying new code.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
37196
658