Socket
Socket
Sign inDemoInstall

configcat-common

Package Overview
Dependencies
Maintainers
4
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

configcat-common - npm Package Compare versions

Comparing version 8.0.0 to 8.0.1

1

lib/AutoPollConfigService.d.ts

@@ -11,2 +11,3 @@ import type { AutoPollOptions } from "./ConfigCatClientOptions";

private timerId?;
private readonly pollIntervalMs;
constructor(configFetcher: IConfigFetcher, options: AutoPollOptions);

@@ -13,0 +14,0 @@ private waitForInitializationAsync;

9

lib/AutoPollConfigService.js

@@ -12,2 +12,3 @@ "use strict";

_this.signalInitialization = function () { };
_this.pollIntervalMs = options.pollIntervalSeconds * 1000;
if (options.maxInitWaitTimeSeconds !== 0) {

@@ -83,3 +84,3 @@ _this.initialized = false;

cachedConfig = _a.sent();
if (!cachedConfig.isExpired(this.options.pollIntervalSeconds * 1000)) {
if (!cachedConfig.isExpired(this.pollIntervalMs)) {
logSuccess(this.options.logger);

@@ -96,3 +97,3 @@ return [2 /*return*/, cachedConfig];

cachedConfig = _a.sent();
if (!cachedConfig.isExpired(this.options.pollIntervalSeconds * 1000)) {
if (!cachedConfig.isExpired(this.pollIntervalMs)) {
logSuccess(this.options.logger);

@@ -137,7 +138,7 @@ }

this.options.logger.debug("AutoPollConfigService.startRefreshWorker() called.");
delayMs = this.options.pollIntervalSeconds * 1000;
delayMs = this.pollIntervalMs;
return [4 /*yield*/, this.options.cache.get(this.cacheKey)];
case 1:
latestConfig = _a.sent();
if (!latestConfig.isExpired(this.options.pollIntervalSeconds * 1000)) return [3 /*break*/, 4];
if (!latestConfig.isExpired(this.pollIntervalMs)) return [3 /*break*/, 4];
if (!!this.isOfflineExactly) return [3 /*break*/, 3];

@@ -144,0 +145,0 @@ return [4 /*yield*/, this.refreshConfigCoreAsync(latestConfig)];

@@ -183,3 +183,3 @@ "use strict";

this.options.logger.settingEvaluationErrorSingle("getValueAsync", key, "defaultValue", defaultValue, err_1);
evaluationDetails = (0, RolloutEvaluator_1.evaluationDetailsFromDefaultValue)(key, defaultValue, (0, Utils_1.getTimestampAsDate)(remoteConfig), user, (0, Utils_1.errorToString)(err_1), err_1);
evaluationDetails = (0, RolloutEvaluator_1.evaluationDetailsFromDefaultValue)(key, defaultValue, (0, RolloutEvaluator_1.getTimestampAsDate)(remoteConfig), user, (0, Utils_1.errorToString)(err_1), err_1);
value = defaultValue;

@@ -218,3 +218,3 @@ return [3 /*break*/, 4];

this.options.logger.settingEvaluationErrorSingle("getValueDetailsAsync", key, "defaultValue", defaultValue, err_2);
evaluationDetails = (0, RolloutEvaluator_1.evaluationDetailsFromDefaultValue)(key, defaultValue, (0, Utils_1.getTimestampAsDate)(remoteConfig), user, (0, Utils_1.errorToString)(err_2), err_2);
evaluationDetails = (0, RolloutEvaluator_1.evaluationDetailsFromDefaultValue)(key, defaultValue, (0, RolloutEvaluator_1.getTimestampAsDate)(remoteConfig), user, (0, Utils_1.errorToString)(err_2), err_2);
return [3 /*break*/, 4];

@@ -257,3 +257,3 @@ case 4:

return tslib_1.__awaiter(this, void 0, void 0, function () {
var defaultReturnValue, result, evaluationDetailsArray, _a, settings, remoteConfig, errors, err_4, _i, evaluationDetailsArray_1, evaluationDetail;
var defaultReturnValue, evaluationDetailsArray, _a, settings, remoteConfig, errors, err_4, result, _i, evaluationDetailsArray_1, evaluationDetail;
var _b;

@@ -277,3 +277,2 @@ return tslib_1.__generator(this, function (_c) {

}
result = evaluationDetailsArray.map(function (details) { return new SettingKeyValue(details.key, details.value); });
return [3 /*break*/, 4];

@@ -284,5 +283,5 @@ case 3:

evaluationDetailsArray !== null && evaluationDetailsArray !== void 0 ? evaluationDetailsArray : (evaluationDetailsArray = []);
result = [];
return [3 /*break*/, 4];
case 4:
result = evaluationDetailsArray.map(function (details) { return new SettingKeyValue(details.key, details.value); });
for (_i = 0, evaluationDetailsArray_1 = evaluationDetailsArray; _i < evaluationDetailsArray_1.length; _i++) {

@@ -289,0 +288,0 @@ evaluationDetail = evaluationDetailsArray_1[_i];

@@ -9,2 +9,3 @@ import { __awaiter, __extends, __generator } from "tslib";

_this.signalInitialization = function () { };
_this.pollIntervalMs = options.pollIntervalSeconds * 1000;
if (options.maxInitWaitTimeSeconds !== 0) {

@@ -80,3 +81,3 @@ _this.initialized = false;

cachedConfig = _a.sent();
if (!cachedConfig.isExpired(this.options.pollIntervalSeconds * 1000)) {
if (!cachedConfig.isExpired(this.pollIntervalMs)) {
logSuccess(this.options.logger);

@@ -93,3 +94,3 @@ return [2 /*return*/, cachedConfig];

cachedConfig = _a.sent();
if (!cachedConfig.isExpired(this.options.pollIntervalSeconds * 1000)) {
if (!cachedConfig.isExpired(this.pollIntervalMs)) {
logSuccess(this.options.logger);

@@ -134,7 +135,7 @@ }

this.options.logger.debug("AutoPollConfigService.startRefreshWorker() called.");
delayMs = this.options.pollIntervalSeconds * 1000;
delayMs = this.pollIntervalMs;
return [4 /*yield*/, this.options.cache.get(this.cacheKey)];
case 1:
latestConfig = _a.sent();
if (!latestConfig.isExpired(this.options.pollIntervalSeconds * 1000)) return [3 /*break*/, 4];
if (!latestConfig.isExpired(this.pollIntervalMs)) return [3 /*break*/, 4];
if (!!this.isOfflineExactly) return [3 /*break*/, 3];

@@ -141,0 +142,0 @@ return [4 /*yield*/, this.refreshConfigCoreAsync(latestConfig)];

@@ -9,4 +9,4 @@ import { __assign, __awaiter, __generator } from "tslib";

import { getWeakRefStub, isWeakRefAvailable } from "./Polyfills";
import { RolloutEvaluator, checkSettingsAvailable, evaluate, evaluateAll, evaluationDetailsFromDefaultValue, isAllowedValue } from "./RolloutEvaluator";
import { errorToString, getTimestampAsDate } from "./Utils";
import { RolloutEvaluator, checkSettingsAvailable, evaluate, evaluateAll, evaluationDetailsFromDefaultValue, getTimestampAsDate, isAllowedValue } from "./RolloutEvaluator";
import { errorToString } from "./Utils";
var ConfigCatClientCache = /** @class */ (function () {

@@ -253,3 +253,3 @@ function ConfigCatClientCache() {

return __awaiter(this, void 0, void 0, function () {
var defaultReturnValue, result, evaluationDetailsArray, _a, settings, remoteConfig, errors, err_4, _i, evaluationDetailsArray_1, evaluationDetail;
var defaultReturnValue, evaluationDetailsArray, _a, settings, remoteConfig, errors, err_4, result, _i, evaluationDetailsArray_1, evaluationDetail;
var _b;

@@ -273,3 +273,2 @@ return __generator(this, function (_c) {

}
result = evaluationDetailsArray.map(function (details) { return new SettingKeyValue(details.key, details.value); });
return [3 /*break*/, 4];

@@ -280,5 +279,5 @@ case 3:

evaluationDetailsArray !== null && evaluationDetailsArray !== void 0 ? evaluationDetailsArray : (evaluationDetailsArray = []);
result = [];
return [3 /*break*/, 4];
case 4:
result = evaluationDetailsArray.map(function (details) { return new SettingKeyValue(details.key, details.value); });
for (_i = 0, evaluationDetailsArray_1 = evaluationDetailsArray; _i < evaluationDetailsArray_1.length; _i++) {

@@ -285,0 +284,0 @@ evaluationDetail = evaluationDetailsArray_1[_i];

@@ -12,3 +12,3 @@ import { ConfigCatClient } from "./ConfigCatClient";

* So, please keep in mind that when you make multiple calls to this method using the same SDK Key, you may end up with multiple references to the same client object.
* @param sdkKey SDK Key (a.k.a ApiKey) to access the ConfigCat config.
* @param sdkKey SDK Key to access the ConfigCat config.
* @param pollingMode The polling mode to use.

@@ -28,3 +28,3 @@ * @param options Options for the specified polling mode.

* Creates an instance of `ConfigCatConsoleLogger`.
* @param logLevel - Log level (the minimum level to use for filtering log events).
* @param logLevel Log level (the minimum level to use for filtering log events).
*/

@@ -31,0 +31,0 @@ export function createConsoleLogger(logLevel) {

@@ -7,3 +7,3 @@ import { __awaiter, __extends, __generator } from "tslib";

var _this = _super.call(this, configFetcher, options) || this;
_this.cacheTimeToLiveSeconds = options.cacheTimeToLiveSeconds;
_this.cacheTimeToLiveMs = options.cacheTimeToLiveSeconds * 1000;
options.hooks.emit("clientReady");

@@ -27,3 +27,3 @@ return _this;

cachedConfig = _b.sent();
if (!cachedConfig.isExpired(this.cacheTimeToLiveSeconds * 1000)) return [3 /*break*/, 5];
if (!cachedConfig.isExpired(this.cacheTimeToLiveMs)) return [3 /*break*/, 5];
if (!!this.isOffline) return [3 /*break*/, 3];

@@ -30,0 +30,0 @@ logExpired(this.options.logger, ", calling refreshConfigCoreAsync()");

@@ -1,5 +0,5 @@

import { Comparator, RolloutPercentageItem, RolloutRule } from "./ProjectConfig";
import { Comparator } from "./ProjectConfig";
import * as semver from "./Semver";
import { sha1 } from "./Sha1";
import { errorToString, getTimestampAsDate } from "./Utils";
import { errorToString } from "./Utils";
/** User Object. Contains user attributes which are used for evaluating targeting rules and percentage options. */

@@ -41,3 +41,3 @@ var User = /** @class */ (function () {

eLog.returnValue = result.value;
return evaluationDetailsFromEvaluateResult(key, result, getTimestampAsDate(remoteConfig), user);
return result;
}

@@ -51,3 +51,3 @@ // evaluate percentage-based rules

eLog.returnValue = result.value;
return evaluationDetailsFromEvaluateResult(key, result, getTimestampAsDate(remoteConfig), user);
return result;
}

@@ -67,3 +67,3 @@ }

eLog.returnValue = result.value;
return evaluationDetailsFromEvaluateResult(key, result, getTimestampAsDate(remoteConfig), user);
return result;
}

@@ -91,3 +91,3 @@ finally {

variationId: rule.variationId,
matchedRule: rule
matchedTargetingRule: rule
};

@@ -217,3 +217,3 @@ switch (comparator) {

variationId: percentageRule.variationId,
matchedRule: percentageRule
matchedPercentageOption: percentageRule
};

@@ -397,4 +397,4 @@ }

isDefaultValue: false,
matchedEvaluationRule: evaluateResult.matchedRule instanceof RolloutRule ? evaluateResult.matchedRule : void 0,
matchedEvaluationPercentageRule: evaluateResult.matchedRule instanceof RolloutPercentageItem ? evaluateResult.matchedRule : void 0,
matchedEvaluationRule: evaluateResult.matchedTargetingRule,
matchedEvaluationPercentageRule: evaluateResult.matchedPercentageOption,
};

@@ -424,7 +424,7 @@ }

}
var evaluationDetails = evaluator.evaluate(setting, key, defaultValue, user, remoteConfig);
if (defaultValue !== null && defaultValue !== void 0 && typeof defaultValue !== typeof evaluationDetails.value) {
throw new TypeError("The type of a setting must match the type of the given default value.\nThe setting's type was ".concat(typeof defaultValue, ", the given default value's type was ").concat(typeof evaluationDetails.value, ".\nPlease pass a corresponding default value type."));
var evaluateResult = evaluator.evaluate(setting, key, defaultValue, user, remoteConfig);
if (defaultValue !== null && defaultValue !== void 0 && typeof defaultValue !== typeof evaluateResult.value) {
throw new TypeError("The type of a setting must match the type of the given default value.\nThe setting's type was ".concat(typeof defaultValue, ", the given default value's type was ").concat(typeof evaluateResult.value, ".\nPlease pass a corresponding default value type."));
}
return evaluationDetails;
return evaluationDetailsFromEvaluateResult(key, evaluateResult, getTimestampAsDate(remoteConfig), user);
}

@@ -441,3 +441,4 @@ export function evaluateAll(evaluator, settings, user, remoteConfig, logger, defaultReturnValue) {

try {
evaluationDetails = evaluator.evaluate(setting, key, null, user, remoteConfig);
var evaluateResult = evaluator.evaluate(setting, key, null, user, remoteConfig);
evaluationDetails = evaluationDetailsFromEvaluateResult(key, evaluateResult, getTimestampAsDate(remoteConfig), user);
}

@@ -467,4 +468,7 @@ catch (err) {

}
export function getTimestampAsDate(projectConfig) {
return projectConfig ? new Date(projectConfig.timestamp) : void 0;
}
function keysToString(settings) {
return Object.keys(settings).map(function (key) { return "'".concat(key, "'"); }).join(", ");
}

@@ -7,5 +7,2 @@ export function delay(delayMs, obtainCancel) {

}
export function getTimestampAsDate(projectConfig) {
return projectConfig ? new Date(projectConfig.timestamp) : void 0;
}
export function errorToString(err, includeStackTrace) {

@@ -12,0 +9,0 @@ if (includeStackTrace === void 0) { includeStackTrace = false; }

@@ -12,3 +12,3 @@ import type { IConfigCatClient, IConfigCatKernel } from "./ConfigCatClient";

* So, please keep in mind that when you make multiple calls to this method using the same SDK Key, you may end up with multiple references to the same client object.
* @param sdkKey SDK Key (a.k.a ApiKey) to access the ConfigCat config.
* @param sdkKey SDK Key to access the ConfigCat config.
* @param pollingMode The polling mode to use.

@@ -24,3 +24,3 @@ * @param options Options for the specified polling mode.

* Creates an instance of `ConfigCatConsoleLogger`.
* @param logLevel - Log level (the minimum level to use for filtering log events).
* @param logLevel Log level (the minimum level to use for filtering log events).
*/

@@ -27,0 +27,0 @@ export declare function createConsoleLogger(logLevel: LogLevel): IConfigCatLogger;

@@ -17,3 +17,3 @@ "use strict";

* So, please keep in mind that when you make multiple calls to this method using the same SDK Key, you may end up with multiple references to the same client object.
* @param sdkKey SDK Key (a.k.a ApiKey) to access the ConfigCat config.
* @param sdkKey SDK Key to access the ConfigCat config.
* @param pollingMode The polling mode to use.

@@ -35,3 +35,3 @@ * @param options Options for the specified polling mode.

* Creates an instance of `ConfigCatConsoleLogger`.
* @param logLevel - Log level (the minimum level to use for filtering log events).
* @param logLevel Log level (the minimum level to use for filtering log events).
*/

@@ -38,0 +38,0 @@ function createConsoleLogger(logLevel) {

@@ -7,3 +7,3 @@ import type { LazyLoadOptions } from "./ConfigCatClientOptions";

export declare class LazyLoadConfigService extends ConfigServiceBase<LazyLoadOptions> implements IConfigService {
private readonly cacheTimeToLiveSeconds;
private readonly cacheTimeToLiveMs;
constructor(configFetcher: IConfigFetcher, options: LazyLoadOptions);

@@ -10,0 +10,0 @@ getConfig(): Promise<ProjectConfig>;

@@ -10,3 +10,3 @@ "use strict";

var _this = _super.call(this, configFetcher, options) || this;
_this.cacheTimeToLiveSeconds = options.cacheTimeToLiveSeconds;
_this.cacheTimeToLiveMs = options.cacheTimeToLiveSeconds * 1000;
options.hooks.emit("clientReady");

@@ -30,3 +30,3 @@ return _this;

cachedConfig = _b.sent();
if (!cachedConfig.isExpired(this.cacheTimeToLiveSeconds * 1000)) return [3 /*break*/, 5];
if (!cachedConfig.isExpired(this.cacheTimeToLiveMs)) return [3 /*break*/, 5];
if (!!this.isOffline) return [3 /*break*/, 3];

@@ -33,0 +33,0 @@ logExpired(this.options.logger, ", calling refreshConfigCoreAsync()");

import type { LoggerWrapper } from "./ConfigCatLogger";
import type { IPercentageOption, ITargetingRule, ProjectConfig, Setting, SettingValue, VariationIdValue } from "./ProjectConfig";
import type { IPercentageOption, ITargetingRule, ProjectConfig, RolloutPercentageItem, RolloutRule, Setting, SettingValue, VariationIdValue } from "./ProjectConfig";
export type SettingTypeOf<T> = T extends boolean ? boolean : T extends number ? number : T extends string ? string : T extends null ? boolean | number | string | null : T extends undefined ? boolean | number | string | undefined : any;
export interface IRolloutEvaluator {
evaluate(setting: Setting, key: string, defaultValue: SettingValue, user: User | undefined, remoteConfig: ProjectConfig | null): IEvaluationDetails;
evaluate(setting: Setting, key: string, defaultValue: SettingValue, user: User | undefined, remoteConfig: ProjectConfig | null): IEvaluateResult;
}

@@ -52,3 +52,3 @@ /** The evaluated value and additional information about the evaluation of a feature flag or setting. */

constructor(logger: LoggerWrapper);
evaluate(setting: Setting, key: string, defaultValue: SettingValue, user: User | undefined, remoteConfig: ProjectConfig | null): IEvaluationDetails;
evaluate(setting: Setting, key: string, defaultValue: SettingValue, user: User | undefined, remoteConfig: ProjectConfig | null): IEvaluateResult;
private evaluateRules;

@@ -61,2 +61,8 @@ private evaluatePercentageRules;

}
export interface IEvaluateResult {
value: SettingValue;
variationId?: string;
matchedTargetingRule?: RolloutRule;
matchedPercentageOption?: RolloutPercentageItem;
}
export declare function evaluationDetailsFromDefaultValue<T extends SettingValue>(key: string, defaultValue: T, fetchTime?: Date, user?: User, errorMessage?: string, errorException?: any): IEvaluationDetails<SettingTypeOf<T>>;

@@ -75,2 +81,3 @@ export declare function evaluate<T extends SettingValue>(evaluator: IRolloutEvaluator, settings: {

export declare function isAllowedValue(value: SettingValue): boolean;
export declare function getTimestampAsDate(projectConfig: ProjectConfig | null): Date | undefined;
//# sourceMappingURL=RolloutEvaluator.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isAllowedValue = exports.checkSettingsAvailable = exports.evaluateAll = exports.evaluate = exports.evaluationDetailsFromDefaultValue = exports.RolloutEvaluator = exports.User = void 0;
exports.getTimestampAsDate = exports.isAllowedValue = exports.checkSettingsAvailable = exports.evaluateAll = exports.evaluate = exports.evaluationDetailsFromDefaultValue = exports.RolloutEvaluator = exports.User = void 0;
var ProjectConfig_1 = require("./ProjectConfig");

@@ -44,3 +44,3 @@ var semver = require("./Semver");

eLog.returnValue = result.value;
return evaluationDetailsFromEvaluateResult(key, result, (0, Utils_1.getTimestampAsDate)(remoteConfig), user);
return result;
}

@@ -54,3 +54,3 @@ // evaluate percentage-based rules

eLog.returnValue = result.value;
return evaluationDetailsFromEvaluateResult(key, result, (0, Utils_1.getTimestampAsDate)(remoteConfig), user);
return result;
}

@@ -70,3 +70,3 @@ }

eLog.returnValue = result.value;
return evaluationDetailsFromEvaluateResult(key, result, (0, Utils_1.getTimestampAsDate)(remoteConfig), user);
return result;
}

@@ -94,3 +94,3 @@ finally {

variationId: rule.variationId,
matchedRule: rule
matchedTargetingRule: rule
};

@@ -220,3 +220,3 @@ switch (comparator) {

variationId: percentageRule.variationId,
matchedRule: percentageRule
matchedPercentageOption: percentageRule
};

@@ -400,4 +400,4 @@ }

isDefaultValue: false,
matchedEvaluationRule: evaluateResult.matchedRule instanceof ProjectConfig_1.RolloutRule ? evaluateResult.matchedRule : void 0,
matchedEvaluationPercentageRule: evaluateResult.matchedRule instanceof ProjectConfig_1.RolloutPercentageItem ? evaluateResult.matchedRule : void 0,
matchedEvaluationRule: evaluateResult.matchedTargetingRule,
matchedEvaluationPercentageRule: evaluateResult.matchedPercentageOption,
};

@@ -421,3 +421,3 @@ }

errorMessage = logger.configJsonIsNotPresentSingle(key, "defaultValue", defaultValue).toString();
return evaluationDetailsFromDefaultValue(key, defaultValue, (0, Utils_1.getTimestampAsDate)(remoteConfig), user, errorMessage);
return evaluationDetailsFromDefaultValue(key, defaultValue, getTimestampAsDate(remoteConfig), user, errorMessage);
}

@@ -427,9 +427,9 @@ var setting = settings[key];

errorMessage = logger.settingEvaluationFailedDueToMissingKey(key, "defaultValue", defaultValue, keysToString(settings)).toString();
return evaluationDetailsFromDefaultValue(key, defaultValue, (0, Utils_1.getTimestampAsDate)(remoteConfig), user, errorMessage);
return evaluationDetailsFromDefaultValue(key, defaultValue, getTimestampAsDate(remoteConfig), user, errorMessage);
}
var evaluationDetails = evaluator.evaluate(setting, key, defaultValue, user, remoteConfig);
if (defaultValue !== null && defaultValue !== void 0 && typeof defaultValue !== typeof evaluationDetails.value) {
throw new TypeError("The type of a setting must match the type of the given default value.\nThe setting's type was ".concat(typeof defaultValue, ", the given default value's type was ").concat(typeof evaluationDetails.value, ".\nPlease pass a corresponding default value type."));
var evaluateResult = evaluator.evaluate(setting, key, defaultValue, user, remoteConfig);
if (defaultValue !== null && defaultValue !== void 0 && typeof defaultValue !== typeof evaluateResult.value) {
throw new TypeError("The type of a setting must match the type of the given default value.\nThe setting's type was ".concat(typeof defaultValue, ", the given default value's type was ").concat(typeof evaluateResult.value, ".\nPlease pass a corresponding default value type."));
}
return evaluationDetails;
return evaluationDetailsFromEvaluateResult(key, evaluateResult, getTimestampAsDate(remoteConfig), user);
}

@@ -447,3 +447,4 @@ exports.evaluate = evaluate;

try {
evaluationDetails = evaluator.evaluate(setting, key, null, user, remoteConfig);
var evaluateResult = evaluator.evaluate(setting, key, null, user, remoteConfig);
evaluationDetails = evaluationDetailsFromEvaluateResult(key, evaluateResult, getTimestampAsDate(remoteConfig), user);
}

@@ -453,3 +454,3 @@ catch (err) {

errors.push(err);
evaluationDetails = evaluationDetailsFromDefaultValue(key, null, (0, Utils_1.getTimestampAsDate)(remoteConfig), user, (0, Utils_1.errorToString)(err), err);
evaluationDetails = evaluationDetailsFromDefaultValue(key, null, getTimestampAsDate(remoteConfig), user, (0, Utils_1.errorToString)(err), err);
}

@@ -477,4 +478,8 @@ evaluationDetailsArray.push(evaluationDetails);

exports.isAllowedValue = isAllowedValue;
function getTimestampAsDate(projectConfig) {
return projectConfig ? new Date(projectConfig.timestamp) : void 0;
}
exports.getTimestampAsDate = getTimestampAsDate;
function keysToString(settings) {
return Object.keys(settings).map(function (key) { return "'".concat(key, "'"); }).join(", ");
}

@@ -1,5 +0,3 @@

import type { ProjectConfig } from "./ProjectConfig";
export declare function delay(delayMs: number, obtainCancel?: (cancel: () => void) => void): Promise<void>;
export declare function getTimestampAsDate(projectConfig: ProjectConfig | null): Date | undefined;
export declare function errorToString(err: any, includeStackTrace?: boolean): string;
//# sourceMappingURL=Utils.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.errorToString = exports.getTimestampAsDate = exports.delay = void 0;
exports.errorToString = exports.delay = void 0;
function delay(delayMs, obtainCancel) {

@@ -11,6 +11,2 @@ var timerId;

exports.delay = delay;
function getTimestampAsDate(projectConfig) {
return projectConfig ? new Date(projectConfig.timestamp) : void 0;
}
exports.getTimestampAsDate = getTimestampAsDate;
function errorToString(err, includeStackTrace) {

@@ -17,0 +13,0 @@ if (includeStackTrace === void 0) { includeStackTrace = false; }

{
"name": "configcat-common",
"version": "8.0.0",
"version": "8.0.1",
"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",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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