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

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.2 to 8.1.0

2

lib/AutoPollConfigService.d.ts

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

import { ConfigServiceBase } from "./ConfigServiceBase";
import { ClientReadyState } from "./Hooks";
import type { ProjectConfig } from "./ProjectConfig";

@@ -24,3 +25,4 @@ export declare class AutoPollConfigService extends ConfigServiceBase<AutoPollOptions> implements IConfigService {

private refreshWorkerLogic;
protected getReadyState(cachedConfig: ProjectConfig): ClientReadyState;
}
//# sourceMappingURL=AutoPollConfigService.d.ts.map

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

var ConfigServiceBase_1 = require("./ConfigServiceBase");
var Hooks_1 = require("./Hooks");
var Utils_1 = require("./Utils");

@@ -24,3 +25,3 @@ var AutoPollConfigService = /** @class */ (function (_super) {

}; });
_this.initialization.then(function () { return !_this.disposed && options.hooks.emit("clientReady"); });
_this.initialization.then(function () { return options.hooks.emit("clientReady", _this.getReadyState(options.cache.getInMemory())); });
if (options.maxInitWaitTimeSeconds > 0) {

@@ -33,3 +34,3 @@ setTimeout(function () { return _this.signalInitialization(); }, options.maxInitWaitTimeSeconds * 1000);

_this.initialization = Promise.resolve();
options.hooks.emit("clientReady");
options.hooks.emit("clientReady", _this.getReadyState(options.cache.getInMemory()));
}

@@ -192,4 +193,13 @@ if (!options.offline) {

};
AutoPollConfigService.prototype.getReadyState = function (cachedConfig) {
if (cachedConfig.isEmpty) {
return Hooks_1.ClientReadyState.NoFlagData;
}
if (cachedConfig.isExpired(this.pollIntervalMs)) {
return Hooks_1.ClientReadyState.HasCachedFlagDataOnly;
}
return Hooks_1.ClientReadyState.HasUpToDateFlagData;
};
return AutoPollConfigService;
}(ConfigServiceBase_1.ConfigServiceBase));
exports.AutoPollConfigService = AutoPollConfigService;

@@ -21,2 +21,3 @@ import type { LoggerWrapper } from "./ConfigCatLogger";

get(key: string): Promise<ProjectConfig> | ProjectConfig;
getInMemory(): ProjectConfig;
}

@@ -27,2 +28,3 @@ export declare class InMemoryConfigCache implements IConfigCache {

get(_key: string): ProjectConfig;
getInMemory(): ProjectConfig;
}

@@ -37,3 +39,4 @@ export declare class ExternalConfigCache implements IConfigCache {

get(key: string): Promise<ProjectConfig>;
getInMemory(): ProjectConfig;
}
//# sourceMappingURL=ConfigCatCache.d.ts.map

@@ -16,2 +16,5 @@ "use strict";

};
InMemoryConfigCache.prototype.getInMemory = function () {
return this.cachedConfig;
};
return InMemoryConfigCache;

@@ -82,4 +85,7 @@ }());

};
ExternalConfigCache.prototype.getInMemory = function () {
return this.cachedConfig;
};
return ExternalConfigCache;
}());
exports.ExternalConfigCache = ExternalConfigCache;

@@ -9,3 +9,4 @@ import type { IConfigCache } from "./ConfigCatCache";

import type { HookEvents, IProvidesHooks } from "./Hooks";
import type { SettingValue } from "./ProjectConfig";
import { ClientReadyState } from "./Hooks";
import type { IConfig, SettingValue } from "./ProjectConfig";
import type { IEvaluationDetails, IRolloutEvaluator, SettingTypeOf, User } from "./RolloutEvaluator";

@@ -70,2 +71,12 @@ /** ConfigCat SDK client. */

/**
* Waits for the client initialization.
* @returns A promise that fulfills with the client's initialization state.
*/
waitForReady(): Promise<ClientReadyState>;
/**
* Captures the current state of the client.
* The resulting snapshot can be used to synchronously evaluate feature flags and settings based on the captured state.
*/
snapshot(): IConfigCatClientSnapshot;
/**
* Sets the default user.

@@ -96,2 +107,38 @@ * @param defaultUser The default User Object to use for evaluating targeting rules and percentage options.

}
/** Represents the state of `IConfigCatClient` captured at a specific point in time. */
export interface IConfigCatClientSnapshot {
/** The latest config which has been fetched from the remote server. */
readonly fetchedConfig: IConfig | null;
/**
* Returns the available setting keys.
* (In case the client is configured to use flag override, this will also include the keys provided by the flag override).
*/
getAllKeys(): ReadonlyArray<string>;
/**
* Returns the value of a feature flag or setting identified by `key` synchronously, based on the snapshot.
* @remarks
* It is important to provide an argument for the `defaultValue` parameter that matches the type of the feature flag or setting you are evaluating.
* Please refer to {@link https://configcat.com/docs/sdk-reference/js/#setting-type-mapping | this table} for the corresponding types.
* @param key Key of the feature flag or setting.
* @param defaultValue In case of failure, this value will be returned. Only the following types are allowed: `string`, `boolean`, `number`, `null` and `undefined`.
* @param user The User Object to use for evaluating targeting rules and percentage options.
* @returns The cached value of the feature flag or setting.
* @throws {Error} `key` is empty.
* @throws {TypeError} `defaultValue` is not of an allowed type.
*/
getValue<T extends SettingValue>(key: string, defaultValue: T, user?: User): SettingTypeOf<T>;
/**
* Returns the value along with evaluation details of a feature flag or setting identified by `key` synchronously, based on the snapshot.
* @remarks
* It is important to provide an argument for the `defaultValue` parameter that matches the type of the feature flag or setting you are evaluating.
* Please refer to {@link https://configcat.com/docs/sdk-reference/js/#setting-type-mapping | this table} for the corresponding types.
* @param key Key of the feature flag or setting.
* @param defaultValue In case of failure, this value will be returned. Only the following types are allowed: `string`, `boolean`, `number`, `null` and `undefined`.
* @param user The User Object to use for evaluating targeting rules and percentage options.
* @returns The cached value along with the details of evaluation of the feature flag or setting.
* @throws {Error} `key` is empty.
* @throws {TypeError} `defaultValue` is not of an allowed type.
*/
getValueDetails<T extends SettingValue>(key: string, defaultValue: T, user?: User): IEvaluationDetails<SettingTypeOf<T>>;
}
export interface IConfigCatKernel {

@@ -136,2 +183,4 @@ configFetcher: IConfigFetcher;

setOffline(): void;
waitForReady(): Promise<ClientReadyState>;
snapshot(): IConfigCatClientSnapshot;
private getSettingsAsync;

@@ -138,0 +187,0 @@ /** @inheritdoc */

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

var FlagOverrides_1 = require("./FlagOverrides");
var Hooks_1 = require("./Hooks");
var LazyLoadConfigService_1 = require("./LazyLoadConfigService");

@@ -87,10 +88,10 @@ var ManualPollConfigService_1 = require("./ManualPollConfigService");

if (((_a = options.flagOverrides) === null || _a === void 0 ? void 0 : _a.behaviour) !== FlagOverrides_1.OverrideBehaviour.LocalOnly) {
var configServiceClass = options instanceof ConfigCatClientOptions_1.AutoPollOptions ? AutoPollConfigService_1.AutoPollConfigService :
options instanceof ConfigCatClientOptions_1.ManualPollOptions ? ManualPollConfigService_1.ManualPollConfigService :
options instanceof ConfigCatClientOptions_1.LazyLoadOptions ? LazyLoadConfigService_1.LazyLoadConfigService :
(function () { throw new Error("Invalid 'options' value"); })();
this.configService = new configServiceClass(configCatKernel.configFetcher, options);
this.configService =
options instanceof ConfigCatClientOptions_1.AutoPollOptions ? new AutoPollConfigService_1.AutoPollConfigService(configCatKernel.configFetcher, options) :
options instanceof ConfigCatClientOptions_1.ManualPollOptions ? new ManualPollConfigService_1.ManualPollConfigService(configCatKernel.configFetcher, options) :
options instanceof ConfigCatClientOptions_1.LazyLoadOptions ? new LazyLoadConfigService_1.LazyLoadConfigService(configCatKernel.configFetcher, options) :
(function () { throw new Error("Invalid 'options' value"); })();
}
else {
this.options.hooks.emit("clientReady");
this.options.hooks.emit("clientReady", Hooks_1.ClientReadyState.HasLocalOverrideFlagDataOnly);
}

@@ -257,3 +258,3 @@ this.suppressFinalize = registerForFinalization(this, { sdkKey: options.apiKey, cacheToken: cacheToken, configService: this.configService, logger: options.logger });

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

@@ -272,7 +273,4 @@ return tslib_1.__generator(this, function (_c) {

_a = _c.sent(), settings = _a[0], remoteConfig = _a[1];
errors = void 0;
_b = (0, RolloutEvaluator_1.evaluateAll)(this.evaluator, settings, user, remoteConfig, this.options.logger, defaultReturnValue), evaluationDetailsArray = _b[0], errors = _b[1];
if (errors === null || errors === void 0 ? void 0 : errors.length) {
throw typeof AggregateError !== "undefined" ? new AggregateError(errors) : errors.pop();
}
_b = (0, RolloutEvaluator_1.evaluateAll)(this.evaluator, settings, user, remoteConfig, this.options.logger, defaultReturnValue), evaluationDetailsArray = _b[0], evaluationErrors = _b[1];
result = evaluationDetailsArray.map(function (details) { return new SettingKeyValue(details.key, details.value); });
return [3 /*break*/, 4];

@@ -282,6 +280,7 @@ case 3:

this.options.logger.settingEvaluationError("getAllValuesAsync", defaultReturnValue, err_4);
evaluationDetailsArray !== null && evaluationDetailsArray !== void 0 ? evaluationDetailsArray : (evaluationDetailsArray = []);
return [3 /*break*/, 4];
return [2 /*return*/, []];
case 4:
result = evaluationDetailsArray.map(function (details) { return new SettingKeyValue(details.key, details.value); });
if (evaluationErrors === null || evaluationErrors === void 0 ? void 0 : evaluationErrors.length) {
this.options.logger.settingEvaluationError("getAllValuesAsync", "evaluation result", typeof AggregateError !== "undefined" ? new AggregateError(evaluationErrors) : evaluationErrors.pop());
}
for (_i = 0, evaluationDetailsArray_1 = evaluationDetailsArray; _i < evaluationDetailsArray_1.length; _i++) {

@@ -298,3 +297,3 @@ evaluationDetail = evaluationDetailsArray_1[_i];

return tslib_1.__awaiter(this, void 0, void 0, function () {
var defaultReturnValue, evaluationDetailsArray, _a, settings, remoteConfig, errors, err_5, _i, evaluationDetailsArray_2, evaluationDetail;
var defaultReturnValue, evaluationDetailsArray, evaluationErrors, _a, settings, remoteConfig, err_5, _i, evaluationDetailsArray_2, evaluationDetail;
var _b;

@@ -313,7 +312,3 @@ return tslib_1.__generator(this, function (_c) {

_a = _c.sent(), settings = _a[0], remoteConfig = _a[1];
errors = void 0;
_b = (0, RolloutEvaluator_1.evaluateAll)(this.evaluator, settings, user, remoteConfig, this.options.logger, defaultReturnValue), evaluationDetailsArray = _b[0], errors = _b[1];
if (errors === null || errors === void 0 ? void 0 : errors.length) {
throw typeof AggregateError !== "undefined" ? new AggregateError(errors) : errors.pop();
}
_b = (0, RolloutEvaluator_1.evaluateAll)(this.evaluator, settings, user, remoteConfig, this.options.logger, defaultReturnValue), evaluationDetailsArray = _b[0], evaluationErrors = _b[1];
return [3 /*break*/, 4];

@@ -323,5 +318,7 @@ case 3:

this.options.logger.settingEvaluationError("getAllValueDetailsAsync", defaultReturnValue, err_5);
evaluationDetailsArray !== null && evaluationDetailsArray !== void 0 ? evaluationDetailsArray : (evaluationDetailsArray = []);
return [3 /*break*/, 4];
return [2 /*return*/, []];
case 4:
if (evaluationErrors === null || evaluationErrors === void 0 ? void 0 : evaluationErrors.length) {
this.options.logger.settingEvaluationError("getAllValueDetailsAsync", "evaluation result", typeof AggregateError !== "undefined" ? new AggregateError(evaluationErrors) : evaluationErrors.pop());
}
for (_i = 0, evaluationDetailsArray_2 = evaluationDetailsArray; _i < evaluationDetailsArray_2.length; _i++) {

@@ -440,2 +437,33 @@ evaluationDetail = evaluationDetailsArray_2[_i];

};
ConfigCatClient.prototype.waitForReady = function () {
return this.options.readyPromise;
};
ConfigCatClient.prototype.snapshot = function () {
var _a, _b, _c;
var _this = this;
var _d;
var getRemoteConfig = function () {
var config = _this.options.cache.getInMemory();
var settings = !config.isEmpty ? config.config.settings : null;
return [settings, config];
};
var remoteSettings;
var remoteConfig;
var flagOverrides = (_d = this.options) === null || _d === void 0 ? void 0 : _d.flagOverrides;
if (flagOverrides) {
var localSettings = flagOverrides.dataSource.getOverridesSync();
switch (flagOverrides.behaviour) {
case FlagOverrides_1.OverrideBehaviour.LocalOnly:
return new Snapshot(localSettings, null, this);
case FlagOverrides_1.OverrideBehaviour.LocalOverRemote:
_a = getRemoteConfig(), remoteSettings = _a[0], remoteConfig = _a[1];
return new Snapshot(tslib_1.__assign(tslib_1.__assign({}, (remoteSettings !== null && remoteSettings !== void 0 ? remoteSettings : {})), localSettings), remoteConfig, this);
case FlagOverrides_1.OverrideBehaviour.RemoteOverLocal:
_b = getRemoteConfig(), remoteSettings = _b[0], remoteConfig = _b[1];
return new Snapshot(tslib_1.__assign(tslib_1.__assign({}, localSettings), (remoteSettings !== null && remoteSettings !== void 0 ? remoteSettings : {})), remoteConfig, this);
}
}
_c = getRemoteConfig(), remoteSettings = _c[0], remoteConfig = _c[1];
return new Snapshot(remoteSettings, remoteConfig, this);
};
ConfigCatClient.prototype.getSettingsAsync = function () {

@@ -527,2 +555,55 @@ var _a;

exports.ConfigCatClient = ConfigCatClient;
var Snapshot = /** @class */ (function () {
function Snapshot(mergedSettings, remoteConfig, client) {
this.mergedSettings = mergedSettings;
this.remoteConfig = remoteConfig;
this.defaultUser = client["defaultUser"];
this.evaluator = client["evaluator"];
this.options = client["options"];
}
Object.defineProperty(Snapshot.prototype, "fetchedConfig", {
get: function () {
var config = this.remoteConfig;
return config && !config.isEmpty ? config.config : null;
},
enumerable: false,
configurable: true
});
Snapshot.prototype.getAllKeys = function () { return this.mergedSettings ? Object.keys(this.mergedSettings) : []; };
Snapshot.prototype.getValue = function (key, defaultValue, user) {
this.options.logger.debug("Snapshot.getValue() called.");
validateKey(key);
ensureAllowedDefaultValue(defaultValue);
var value, evaluationDetails;
user !== null && user !== void 0 ? user : (user = this.defaultUser);
try {
evaluationDetails = (0, RolloutEvaluator_1.evaluate)(this.evaluator, this.mergedSettings, key, defaultValue, user, this.remoteConfig, this.options.logger);
value = evaluationDetails.value;
}
catch (err) {
this.options.logger.settingEvaluationErrorSingle("Snapshot.getValue", key, "defaultValue", defaultValue, err);
evaluationDetails = (0, RolloutEvaluator_1.evaluationDetailsFromDefaultValue)(key, defaultValue, (0, RolloutEvaluator_1.getTimestampAsDate)(this.remoteConfig), user, (0, Utils_1.errorToString)(err), err);
value = defaultValue;
}
this.options.hooks.emit("flagEvaluated", evaluationDetails);
return value;
};
Snapshot.prototype.getValueDetails = function (key, defaultValue, user) {
this.options.logger.debug("Snapshot.getValueDetails() called.");
validateKey(key);
ensureAllowedDefaultValue(defaultValue);
var evaluationDetails;
user !== null && user !== void 0 ? user : (user = this.defaultUser);
try {
evaluationDetails = (0, RolloutEvaluator_1.evaluate)(this.evaluator, this.mergedSettings, key, defaultValue, user, this.remoteConfig, this.options.logger);
}
catch (err) {
this.options.logger.settingEvaluationErrorSingle("Snapshot.getValueDetails", key, "defaultValue", defaultValue, err);
evaluationDetails = (0, RolloutEvaluator_1.evaluationDetailsFromDefaultValue)(key, defaultValue, (0, RolloutEvaluator_1.getTimestampAsDate)(this.remoteConfig), user, (0, Utils_1.errorToString)(err), err);
}
this.options.hooks.emit("flagEvaluated", evaluationDetails);
return evaluationDetails;
};
return Snapshot;
}());
/** Setting key-value pair. */

@@ -529,0 +610,0 @@ var SettingKeyValue = /** @class */ (function () {

3

lib/ConfigCatClientOptions.d.ts

@@ -6,3 +6,3 @@ import type { IConfigCache, IConfigCatCache } from "./ConfigCatCache";

import type { FlagOverrides } from "./FlagOverrides";
import type { IProvidesHooks } from "./Hooks";
import type { ClientReadyState, IProvidesHooks } from "./Hooks";
import { Hooks } from "./Hooks";

@@ -117,2 +117,3 @@ import type { User } from "./RolloutEvaluator";

hooks: Hooks;
readyPromise: Promise<ClientReadyState>;
constructor(apiKey: string, clientVersion: string, options?: IOptions | null, defaultCacheFactory?: ((options: OptionsBase) => IConfigCache) | null, eventEmitterFactory?: (() => IEventEmitter) | null);

@@ -119,0 +120,0 @@ getUrl(): string;

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

function OptionsBase(apiKey, clientVersion, options, defaultCacheFactory, eventEmitterFactory) {
var _this = this;
var _a, _b, _c;

@@ -54,2 +55,3 @@ this.requestTimeoutMs = 30000;

this.hooks = new Hooks_1.Hooks(eventEmitter);
this.readyPromise = new Promise(function (resolve) { return _this.hooks.once("clientReady", resolve); });
var logger;

@@ -56,0 +58,0 @@ var cache;

import type { OptionsBase } from "./ConfigCatClientOptions";
import type { IConfigFetcher } from "./ConfigFetcher";
import { FetchResult } from "./ConfigFetcher";
import type { ClientReadyState } from "./Hooks";
import { ProjectConfig } from "./ProjectConfig";

@@ -55,3 +56,5 @@ /** Contains the result of an `IConfigCatClient.forceRefresh` or `IConfigCatClient.forceRefreshAsync` operation. */

setOffline(): void;
protected abstract getReadyState(cachedConfig: ProjectConfig): ClientReadyState;
protected syncUpWithCache(): Promise<void>;
}
//# sourceMappingURL=ConfigServiceBase.d.ts.map

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

this.onConfigUpdated(fetchResult.config);
if (success && (fetchResult.config.httpETag != latestConfig.httpETag || fetchResult.config.configJson != latestConfig.configJson)) {
if (success && !ProjectConfig_1.ProjectConfig.equals(fetchResult.config, latestConfig)) {
this.onConfigChanged(fetchResult.config);

@@ -295,4 +295,18 @@ }

};
ConfigServiceBase.prototype.syncUpWithCache = function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var cachedConfig;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.options.cache.get(this.cacheKey)];
case 1:
cachedConfig = _a.sent();
this.options.hooks.emit("clientReady", this.getReadyState(cachedConfig));
return [2 /*return*/];
}
});
});
};
return ConfigServiceBase;
}());
exports.ConfigServiceBase = ConfigServiceBase;
import { __awaiter, __extends, __generator } from "tslib";
import { ConfigServiceBase } from "./ConfigServiceBase";
import { ClientReadyState } from "./Hooks";
import { delay } from "./Utils";

@@ -20,3 +21,3 @@ var AutoPollConfigService = /** @class */ (function (_super) {

}; });
_this.initialization.then(function () { return !_this.disposed && options.hooks.emit("clientReady"); });
_this.initialization.then(function () { return options.hooks.emit("clientReady", _this.getReadyState(options.cache.getInMemory())); });
if (options.maxInitWaitTimeSeconds > 0) {

@@ -29,3 +30,3 @@ setTimeout(function () { return _this.signalInitialization(); }, options.maxInitWaitTimeSeconds * 1000);

_this.initialization = Promise.resolve();
options.hooks.emit("clientReady");
options.hooks.emit("clientReady", _this.getReadyState(options.cache.getInMemory()));
}

@@ -188,4 +189,13 @@ if (!options.offline) {

};
AutoPollConfigService.prototype.getReadyState = function (cachedConfig) {
if (cachedConfig.isEmpty) {
return ClientReadyState.NoFlagData;
}
if (cachedConfig.isExpired(this.pollIntervalMs)) {
return ClientReadyState.HasCachedFlagDataOnly;
}
return ClientReadyState.HasUpToDateFlagData;
};
return AutoPollConfigService;
}(ConfigServiceBase));
export { AutoPollConfigService };

@@ -13,2 +13,5 @@ import { __awaiter, __generator } from "tslib";

};
InMemoryConfigCache.prototype.getInMemory = function () {
return this.cachedConfig;
};
return InMemoryConfigCache;

@@ -79,4 +82,7 @@ }());

};
ExternalConfigCache.prototype.getInMemory = function () {
return this.cachedConfig;
};
return ExternalConfigCache;
}());
export { ExternalConfigCache };

@@ -6,2 +6,3 @@ import { __assign, __awaiter, __generator } from "tslib";

import { OverrideBehaviour } from "./FlagOverrides";
import { ClientReadyState } from "./Hooks";
import { LazyLoadConfigService } from "./LazyLoadConfigService";

@@ -84,10 +85,10 @@ import { ManualPollConfigService } from "./ManualPollConfigService";

if (((_a = options.flagOverrides) === null || _a === void 0 ? void 0 : _a.behaviour) !== OverrideBehaviour.LocalOnly) {
var configServiceClass = options instanceof AutoPollOptions ? AutoPollConfigService :
options instanceof ManualPollOptions ? ManualPollConfigService :
options instanceof LazyLoadOptions ? LazyLoadConfigService :
(function () { throw new Error("Invalid 'options' value"); })();
this.configService = new configServiceClass(configCatKernel.configFetcher, options);
this.configService =
options instanceof AutoPollOptions ? new AutoPollConfigService(configCatKernel.configFetcher, options) :
options instanceof ManualPollOptions ? new ManualPollConfigService(configCatKernel.configFetcher, options) :
options instanceof LazyLoadOptions ? new LazyLoadConfigService(configCatKernel.configFetcher, options) :
(function () { throw new Error("Invalid 'options' value"); })();
}
else {
this.options.hooks.emit("clientReady");
this.options.hooks.emit("clientReady", ClientReadyState.HasLocalOverrideFlagDataOnly);
}

@@ -254,3 +255,3 @@ this.suppressFinalize = registerForFinalization(this, { sdkKey: options.apiKey, cacheToken: cacheToken, configService: this.configService, logger: options.logger });

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

@@ -269,7 +270,4 @@ return __generator(this, function (_c) {

_a = _c.sent(), settings = _a[0], remoteConfig = _a[1];
errors = void 0;
_b = evaluateAll(this.evaluator, settings, user, remoteConfig, this.options.logger, defaultReturnValue), evaluationDetailsArray = _b[0], errors = _b[1];
if (errors === null || errors === void 0 ? void 0 : errors.length) {
throw typeof AggregateError !== "undefined" ? new AggregateError(errors) : errors.pop();
}
_b = evaluateAll(this.evaluator, settings, user, remoteConfig, this.options.logger, defaultReturnValue), evaluationDetailsArray = _b[0], evaluationErrors = _b[1];
result = evaluationDetailsArray.map(function (details) { return new SettingKeyValue(details.key, details.value); });
return [3 /*break*/, 4];

@@ -279,6 +277,7 @@ case 3:

this.options.logger.settingEvaluationError("getAllValuesAsync", defaultReturnValue, err_4);
evaluationDetailsArray !== null && evaluationDetailsArray !== void 0 ? evaluationDetailsArray : (evaluationDetailsArray = []);
return [3 /*break*/, 4];
return [2 /*return*/, []];
case 4:
result = evaluationDetailsArray.map(function (details) { return new SettingKeyValue(details.key, details.value); });
if (evaluationErrors === null || evaluationErrors === void 0 ? void 0 : evaluationErrors.length) {
this.options.logger.settingEvaluationError("getAllValuesAsync", "evaluation result", typeof AggregateError !== "undefined" ? new AggregateError(evaluationErrors) : evaluationErrors.pop());
}
for (_i = 0, evaluationDetailsArray_1 = evaluationDetailsArray; _i < evaluationDetailsArray_1.length; _i++) {

@@ -295,3 +294,3 @@ evaluationDetail = evaluationDetailsArray_1[_i];

return __awaiter(this, void 0, void 0, function () {
var defaultReturnValue, evaluationDetailsArray, _a, settings, remoteConfig, errors, err_5, _i, evaluationDetailsArray_2, evaluationDetail;
var defaultReturnValue, evaluationDetailsArray, evaluationErrors, _a, settings, remoteConfig, err_5, _i, evaluationDetailsArray_2, evaluationDetail;
var _b;

@@ -310,7 +309,3 @@ return __generator(this, function (_c) {

_a = _c.sent(), settings = _a[0], remoteConfig = _a[1];
errors = void 0;
_b = evaluateAll(this.evaluator, settings, user, remoteConfig, this.options.logger, defaultReturnValue), evaluationDetailsArray = _b[0], errors = _b[1];
if (errors === null || errors === void 0 ? void 0 : errors.length) {
throw typeof AggregateError !== "undefined" ? new AggregateError(errors) : errors.pop();
}
_b = evaluateAll(this.evaluator, settings, user, remoteConfig, this.options.logger, defaultReturnValue), evaluationDetailsArray = _b[0], evaluationErrors = _b[1];
return [3 /*break*/, 4];

@@ -320,5 +315,7 @@ case 3:

this.options.logger.settingEvaluationError("getAllValueDetailsAsync", defaultReturnValue, err_5);
evaluationDetailsArray !== null && evaluationDetailsArray !== void 0 ? evaluationDetailsArray : (evaluationDetailsArray = []);
return [3 /*break*/, 4];
return [2 /*return*/, []];
case 4:
if (evaluationErrors === null || evaluationErrors === void 0 ? void 0 : evaluationErrors.length) {
this.options.logger.settingEvaluationError("getAllValueDetailsAsync", "evaluation result", typeof AggregateError !== "undefined" ? new AggregateError(evaluationErrors) : evaluationErrors.pop());
}
for (_i = 0, evaluationDetailsArray_2 = evaluationDetailsArray; _i < evaluationDetailsArray_2.length; _i++) {

@@ -437,2 +434,33 @@ evaluationDetail = evaluationDetailsArray_2[_i];

};
ConfigCatClient.prototype.waitForReady = function () {
return this.options.readyPromise;
};
ConfigCatClient.prototype.snapshot = function () {
var _a, _b, _c;
var _this = this;
var _d;
var getRemoteConfig = function () {
var config = _this.options.cache.getInMemory();
var settings = !config.isEmpty ? config.config.settings : null;
return [settings, config];
};
var remoteSettings;
var remoteConfig;
var flagOverrides = (_d = this.options) === null || _d === void 0 ? void 0 : _d.flagOverrides;
if (flagOverrides) {
var localSettings = flagOverrides.dataSource.getOverridesSync();
switch (flagOverrides.behaviour) {
case OverrideBehaviour.LocalOnly:
return new Snapshot(localSettings, null, this);
case OverrideBehaviour.LocalOverRemote:
_a = getRemoteConfig(), remoteSettings = _a[0], remoteConfig = _a[1];
return new Snapshot(__assign(__assign({}, (remoteSettings !== null && remoteSettings !== void 0 ? remoteSettings : {})), localSettings), remoteConfig, this);
case OverrideBehaviour.RemoteOverLocal:
_b = getRemoteConfig(), remoteSettings = _b[0], remoteConfig = _b[1];
return new Snapshot(__assign(__assign({}, localSettings), (remoteSettings !== null && remoteSettings !== void 0 ? remoteSettings : {})), remoteConfig, this);
}
}
_c = getRemoteConfig(), remoteSettings = _c[0], remoteConfig = _c[1];
return new Snapshot(remoteSettings, remoteConfig, this);
};
ConfigCatClient.prototype.getSettingsAsync = function () {

@@ -524,2 +552,55 @@ var _a;

export { ConfigCatClient };
var Snapshot = /** @class */ (function () {
function Snapshot(mergedSettings, remoteConfig, client) {
this.mergedSettings = mergedSettings;
this.remoteConfig = remoteConfig;
this.defaultUser = client["defaultUser"];
this.evaluator = client["evaluator"];
this.options = client["options"];
}
Object.defineProperty(Snapshot.prototype, "fetchedConfig", {
get: function () {
var config = this.remoteConfig;
return config && !config.isEmpty ? config.config : null;
},
enumerable: false,
configurable: true
});
Snapshot.prototype.getAllKeys = function () { return this.mergedSettings ? Object.keys(this.mergedSettings) : []; };
Snapshot.prototype.getValue = function (key, defaultValue, user) {
this.options.logger.debug("Snapshot.getValue() called.");
validateKey(key);
ensureAllowedDefaultValue(defaultValue);
var value, evaluationDetails;
user !== null && user !== void 0 ? user : (user = this.defaultUser);
try {
evaluationDetails = evaluate(this.evaluator, this.mergedSettings, key, defaultValue, user, this.remoteConfig, this.options.logger);
value = evaluationDetails.value;
}
catch (err) {
this.options.logger.settingEvaluationErrorSingle("Snapshot.getValue", key, "defaultValue", defaultValue, err);
evaluationDetails = evaluationDetailsFromDefaultValue(key, defaultValue, getTimestampAsDate(this.remoteConfig), user, errorToString(err), err);
value = defaultValue;
}
this.options.hooks.emit("flagEvaluated", evaluationDetails);
return value;
};
Snapshot.prototype.getValueDetails = function (key, defaultValue, user) {
this.options.logger.debug("Snapshot.getValueDetails() called.");
validateKey(key);
ensureAllowedDefaultValue(defaultValue);
var evaluationDetails;
user !== null && user !== void 0 ? user : (user = this.defaultUser);
try {
evaluationDetails = evaluate(this.evaluator, this.mergedSettings, key, defaultValue, user, this.remoteConfig, this.options.logger);
}
catch (err) {
this.options.logger.settingEvaluationErrorSingle("Snapshot.getValueDetails", key, "defaultValue", defaultValue, err);
evaluationDetails = evaluationDetailsFromDefaultValue(key, defaultValue, getTimestampAsDate(this.remoteConfig), user, errorToString(err), err);
}
this.options.hooks.emit("flagEvaluated", evaluationDetails);
return evaluationDetails;
};
return Snapshot;
}());
/** Setting key-value pair. */

@@ -526,0 +607,0 @@ var SettingKeyValue = /** @class */ (function () {

@@ -29,2 +29,3 @@ import { __extends } from "tslib";

function OptionsBase(apiKey, clientVersion, options, defaultCacheFactory, eventEmitterFactory) {
var _this = this;
var _a, _b, _c;

@@ -51,2 +52,3 @@ this.requestTimeoutMs = 30000;

this.hooks = new Hooks(eventEmitter);
this.readyPromise = new Promise(function (resolve) { return _this.hooks.once("clientReady", resolve); });
var logger;

@@ -53,0 +55,0 @@ var cache;

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

this.onConfigUpdated(fetchResult.config);
if (success && (fetchResult.config.httpETag != latestConfig.httpETag || fetchResult.config.configJson != latestConfig.configJson)) {
if (success && !ProjectConfig.equals(fetchResult.config, latestConfig)) {
this.onConfigChanged(fetchResult.config);

@@ -292,4 +292,18 @@ }

};
ConfigServiceBase.prototype.syncUpWithCache = function () {
return __awaiter(this, void 0, void 0, function () {
var cachedConfig;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.options.cache.get(this.cacheKey)];
case 1:
cachedConfig = _a.sent();
this.options.hooks.emit("clientReady", this.getReadyState(cachedConfig));
return [2 /*return*/];
}
});
});
};
return ConfigServiceBase;
}());
export { ConfigServiceBase };

@@ -36,2 +36,5 @@ import { Setting } from "./ProjectConfig";

};
MapOverrideDataSource.prototype.getOverridesSync = function () {
return this.map;
};
return MapOverrideDataSource;

@@ -38,0 +41,0 @@ }());

import { __spreadArray } from "tslib";
import { NullEventEmitter } from "./EventEmitter";
/** Contains the initialization state of `ConfigCatClient`. */
export var ClientReadyState;
(function (ClientReadyState) {
ClientReadyState[ClientReadyState["NoFlagData"] = 0] = "NoFlagData";
ClientReadyState[ClientReadyState["HasLocalOverrideFlagDataOnly"] = 1] = "HasLocalOverrideFlagDataOnly";
ClientReadyState[ClientReadyState["HasCachedFlagDataOnly"] = 2] = "HasCachedFlagDataOnly";
ClientReadyState[ClientReadyState["HasUpToDateFlagData"] = 3] = "HasUpToDateFlagData";
})(ClientReadyState || (ClientReadyState = {}));
var disconnectedEventEmitter = new NullEventEmitter();

@@ -4,0 +12,0 @@ var Hooks = /** @class */ (function () {

@@ -47,1 +47,2 @@ import { ConfigCatClient } from "./ConfigCatClient";

export { RefreshResult } from "./ConfigServiceBase";
export { ClientReadyState } from "./Hooks";
import { __awaiter, __extends, __generator } from "tslib";
import { ConfigServiceBase } from "./ConfigServiceBase";
import { ClientReadyState } from "./Hooks";
var LazyLoadConfigService = /** @class */ (function (_super) {

@@ -8,3 +9,3 @@ __extends(LazyLoadConfigService, _super);

_this.cacheTimeToLiveMs = options.cacheTimeToLiveSeconds * 1000;
options.hooks.emit("clientReady");
_super.prototype.syncUpWithCache.call(_this);
return _this;

@@ -49,4 +50,13 @@ }

};
LazyLoadConfigService.prototype.getReadyState = function (cachedConfig) {
if (cachedConfig.isEmpty) {
return ClientReadyState.NoFlagData;
}
if (cachedConfig.isExpired(this.cacheTimeToLiveMs)) {
return ClientReadyState.HasCachedFlagDataOnly;
}
return ClientReadyState.HasUpToDateFlagData;
};
return LazyLoadConfigService;
}(ConfigServiceBase));
export { LazyLoadConfigService };
import { __awaiter, __extends, __generator } from "tslib";
import { ConfigServiceBase } from "./ConfigServiceBase";
import { ClientReadyState } from "./Hooks";
var ManualPollConfigService = /** @class */ (function (_super) {

@@ -7,5 +8,11 @@ __extends(ManualPollConfigService, _super);

var _this = _super.call(this, configFetcher, options) || this;
options.hooks.emit("clientReady");
_super.prototype.syncUpWithCache.call(_this);
return _this;
}
ManualPollConfigService.prototype.getReadyState = function (cachedConfig) {
if (cachedConfig.isEmpty) {
return ClientReadyState.NoFlagData;
}
return ClientReadyState.HasCachedFlagDataOnly;
};
ManualPollConfigService.prototype.getConfig = function () {

@@ -12,0 +19,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -8,2 +8,8 @@ var ProjectConfig = /** @class */ (function () {

}
ProjectConfig.equals = function (projectConfig1, projectConfig2) {
// When both ETags are available, we don't need to check the JSON content.
return projectConfig1.httpETag && projectConfig2.httpETag
? projectConfig1.httpETag === projectConfig2.httpETag
: projectConfig1.configJson === projectConfig2.configJson;
};
ProjectConfig.prototype.with = function (timestamp) { return new ProjectConfig(this.configJson, this.config, timestamp, this.httpETag); };

@@ -131,5 +137,5 @@ Object.defineProperty(ProjectConfig.prototype, "isEmpty", {

Comparator[Comparator["NotIn"] = 1] = "NotIn";
/** Does the comparison value contain the comparison attribute as a substring? */
/** Is the comparison value contained by the comparison attribute as a substring? */
Comparator[Comparator["Contains"] = 2] = "Contains";
/** Does the comparison value not contain the comparison attribute as a substring? */
/** Is the comparison value not contained by the comparison attribute as a substring? */
Comparator[Comparator["NotContains"] = 3] = "NotContains";

@@ -136,0 +142,0 @@ /** Does the comparison value interpreted as a comma-separated list of semantic versions contain the comparison attribute? */

@@ -29,2 +29,5 @@ import type { SettingValue } from "./ProjectConfig";

}>;
getOverridesSync(): {
[name: string]: Setting;
};
}

@@ -39,2 +42,5 @@ export declare class MapOverrideDataSource implements IOverrideDataSource {

}>;
getOverridesSync(): {
[name: string]: Setting;
};
}

@@ -41,0 +47,0 @@ export declare class FlagOverrides {

@@ -39,2 +39,5 @@ "use strict";

};
MapOverrideDataSource.prototype.getOverridesSync = function () {
return this.map;
};
return MapOverrideDataSource;

@@ -41,0 +44,0 @@ }());

import type { IEventEmitter, IEventProvider } from "./EventEmitter";
import type { IConfig } from "./ProjectConfig";
import type { IEvaluationDetails } from "./RolloutEvaluator";
/** Contains the initialization state of `ConfigCatClient`. */
export declare enum ClientReadyState {
NoFlagData = 0,
HasLocalOverrideFlagDataOnly = 1,
HasCachedFlagDataOnly = 2,
HasUpToDateFlagData = 3
}
/** Hooks (events) that can be emitted by `ConfigCatClient`. */
export type HookEvents = {
/** Occurs when the client is ready to provide the actual value of feature flags or settings. */
clientReady: [];
clientReady: [state: ClientReadyState];
/** Occurs after the value of a feature flag of setting has been evaluated. */

@@ -9,0 +16,0 @@ flagEvaluated: [evaluationDetails: IEvaluationDetails];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Hooks = void 0;
exports.Hooks = exports.ClientReadyState = void 0;
var tslib_1 = require("tslib");
var EventEmitter_1 = require("./EventEmitter");
/** Contains the initialization state of `ConfigCatClient`. */
var ClientReadyState;
(function (ClientReadyState) {
ClientReadyState[ClientReadyState["NoFlagData"] = 0] = "NoFlagData";
ClientReadyState[ClientReadyState["HasLocalOverrideFlagDataOnly"] = 1] = "HasLocalOverrideFlagDataOnly";
ClientReadyState[ClientReadyState["HasCachedFlagDataOnly"] = 2] = "HasCachedFlagDataOnly";
ClientReadyState[ClientReadyState["HasUpToDateFlagData"] = 3] = "HasUpToDateFlagData";
})(ClientReadyState = exports.ClientReadyState || (exports.ClientReadyState = {}));
var disconnectedEventEmitter = new EventEmitter_1.NullEventEmitter();

@@ -7,0 +15,0 @@ var Hooks = /** @class */ (function () {

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

export type { IConfigCatClient };
export type { IConfigCatClientSnapshot } from "./ConfigCatClient";
export { SettingKeyValue } from "./ConfigCatClient";

@@ -54,2 +55,3 @@ export type { IEvaluationDetails, SettingTypeOf } from "./RolloutEvaluator";

export type { IProvidesHooks, HookEvents } from "./Hooks";
export { ClientReadyState } from "./Hooks";
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RefreshResult = exports.OverrideBehaviour = exports.User = exports.SettingKeyValue = exports.Comparator = exports.SettingType = exports.FormattableLogMessage = exports.LogLevel = exports.DataGovernance = exports.PollingMode = exports.MapOverrideDataSource = exports.FlagOverrides = exports.ExternalConfigCache = exports.FetchError = exports.FetchResult = exports.FetchStatus = exports.createConsoleLogger = exports.disposeAllClients = exports.getClient = void 0;
exports.ClientReadyState = exports.RefreshResult = exports.OverrideBehaviour = exports.User = exports.SettingKeyValue = exports.Comparator = exports.SettingType = exports.FormattableLogMessage = exports.LogLevel = exports.DataGovernance = exports.PollingMode = exports.MapOverrideDataSource = exports.FlagOverrides = exports.ExternalConfigCache = exports.FetchError = exports.FetchResult = exports.FetchStatus = exports.createConsoleLogger = exports.disposeAllClients = exports.getClient = void 0;
var ConfigCatClient_1 = require("./ConfigCatClient");

@@ -64,1 +64,3 @@ var ConfigCatClientOptions_1 = require("./ConfigCatClientOptions");

Object.defineProperty(exports, "RefreshResult", { enumerable: true, get: function () { return ConfigServiceBase_1.RefreshResult; } });
var Hooks_1 = require("./Hooks");
Object.defineProperty(exports, "ClientReadyState", { enumerable: true, get: function () { return Hooks_1.ClientReadyState; } });

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

import { ConfigServiceBase } from "./ConfigServiceBase";
import { ClientReadyState } from "./Hooks";
import type { ProjectConfig } from "./ProjectConfig";

@@ -12,3 +13,4 @@ export declare class LazyLoadConfigService extends ConfigServiceBase<LazyLoadOptions> implements IConfigService {

refreshConfigAsync(): Promise<[RefreshResult, ProjectConfig]>;
protected getReadyState(cachedConfig: ProjectConfig): ClientReadyState;
}
//# sourceMappingURL=LazyLoadConfigService.d.ts.map

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

var ConfigServiceBase_1 = require("./ConfigServiceBase");
var Hooks_1 = require("./Hooks");
var LazyLoadConfigService = /** @class */ (function (_super) {

@@ -12,3 +13,3 @@ tslib_1.__extends(LazyLoadConfigService, _super);

_this.cacheTimeToLiveMs = options.cacheTimeToLiveSeconds * 1000;
options.hooks.emit("clientReady");
_super.prototype.syncUpWithCache.call(_this);
return _this;

@@ -53,4 +54,13 @@ }

};
LazyLoadConfigService.prototype.getReadyState = function (cachedConfig) {
if (cachedConfig.isEmpty) {
return Hooks_1.ClientReadyState.NoFlagData;
}
if (cachedConfig.isExpired(this.cacheTimeToLiveMs)) {
return Hooks_1.ClientReadyState.HasCachedFlagDataOnly;
}
return Hooks_1.ClientReadyState.HasUpToDateFlagData;
};
return LazyLoadConfigService;
}(ConfigServiceBase_1.ConfigServiceBase));
exports.LazyLoadConfigService = LazyLoadConfigService;

@@ -5,5 +5,7 @@ import type { ManualPollOptions } from "./ConfigCatClientOptions";

import { ConfigServiceBase } from "./ConfigServiceBase";
import { ClientReadyState } from "./Hooks";
import type { ProjectConfig } from "./ProjectConfig";
export declare class ManualPollConfigService extends ConfigServiceBase<ManualPollOptions> implements IConfigService {
constructor(configFetcher: IConfigFetcher, options: ManualPollOptions);
protected getReadyState(cachedConfig: ProjectConfig): ClientReadyState;
getConfig(): Promise<ProjectConfig>;

@@ -10,0 +12,0 @@ refreshConfigAsync(): Promise<[RefreshResult, ProjectConfig]>;

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

var ConfigServiceBase_1 = require("./ConfigServiceBase");
var Hooks_1 = require("./Hooks");
var ManualPollConfigService = /** @class */ (function (_super) {

@@ -11,5 +12,11 @@ tslib_1.__extends(ManualPollConfigService, _super);

var _this = _super.call(this, configFetcher, options) || this;
options.hooks.emit("clientReady");
_super.prototype.syncUpWithCache.call(_this);
return _this;
}
ManualPollConfigService.prototype.getReadyState = function (cachedConfig) {
if (cachedConfig.isEmpty) {
return Hooks_1.ClientReadyState.NoFlagData;
}
return Hooks_1.ClientReadyState.HasCachedFlagDataOnly;
};
ManualPollConfigService.prototype.getConfig = function () {

@@ -16,0 +23,0 @@ return tslib_1.__awaiter(this, void 0, void 0, function () {

@@ -8,2 +8,3 @@ export declare class ProjectConfig {

static readonly empty: ProjectConfig;
static equals(projectConfig1: ProjectConfig, projectConfig2: ProjectConfig): boolean;
constructor(configJson: string | undefined, config: Config | undefined, timestamp: number, httpETag: string | undefined);

@@ -82,5 +83,5 @@ with(timestamp: number): ProjectConfig;

NotIn = 1,
/** Does the comparison value contain the comparison attribute as a substring? */
/** Is the comparison value contained by the comparison attribute as a substring? */
Contains = 2,
/** Does the comparison value not contain the comparison attribute as a substring? */
/** Is the comparison value not contained by the comparison attribute as a substring? */
NotContains = 3,

@@ -87,0 +88,0 @@ /** Does the comparison value interpreted as a comma-separated list of semantic versions contain the comparison attribute? */

@@ -11,2 +11,8 @@ "use strict";

}
ProjectConfig.equals = function (projectConfig1, projectConfig2) {
// When both ETags are available, we don't need to check the JSON content.
return projectConfig1.httpETag && projectConfig2.httpETag
? projectConfig1.httpETag === projectConfig2.httpETag
: projectConfig1.configJson === projectConfig2.configJson;
};
ProjectConfig.prototype.with = function (timestamp) { return new ProjectConfig(this.configJson, this.config, timestamp, this.httpETag); };

@@ -134,5 +140,5 @@ Object.defineProperty(ProjectConfig.prototype, "isEmpty", {

Comparator[Comparator["NotIn"] = 1] = "NotIn";
/** Does the comparison value contain the comparison attribute as a substring? */
/** Is the comparison value contained by the comparison attribute as a substring? */
Comparator[Comparator["Contains"] = 2] = "Contains";
/** Does the comparison value not contain the comparison attribute as a substring? */
/** Is the comparison value not contained by the comparison attribute as a substring? */
Comparator[Comparator["NotContains"] = 3] = "NotContains";

@@ -139,0 +145,0 @@ /** Does the comparison value interpreted as a comma-separated list of semantic versions contain the comparison attribute? */

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

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

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