@openfeature/js-sdk
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -75,2 +75,3 @@ "use strict"; | ||
InvalidContextError: () => InvalidContextError, | ||
LOG_LEVELS: () => LOG_LEVELS, | ||
NOOP_PROVIDER: () => NOOP_PROVIDER, | ||
@@ -90,7 +91,20 @@ NOOP_TRANSACTION_CONTEXT_PROPAGATOR: () => NOOP_TRANSACTION_CONTEXT_PROPAGATOR, | ||
TargetingKeyMissingError: () => TargetingKeyMissingError, | ||
TypeMismatchError: () => TypeMismatchError | ||
TypeMismatchError: () => TypeMismatchError, | ||
isObject: () => isObject, | ||
isString: () => isString, | ||
objectOrUndefined: () => objectOrUndefined, | ||
stringOrUndefined: () => stringOrUndefined | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
// ../shared/src/types.ts | ||
// ../shared/src/errors/open-feature-error-abstract.ts | ||
var OpenFeatureError = class extends Error { | ||
constructor(message) { | ||
super(message); | ||
Object.setPrototypeOf(this, OpenFeatureError.prototype); | ||
this.name = "OpenFeatureError"; | ||
} | ||
}; | ||
// ../shared/src/evaluation/evaluation.ts | ||
var StandardResolutionReasons = { | ||
@@ -142,18 +156,3 @@ /** | ||
})(ErrorCode || {}); | ||
var ProviderStatus = /* @__PURE__ */ ((ProviderStatus2) => { | ||
ProviderStatus2["NOT_READY"] = "NOT_READY"; | ||
ProviderStatus2["READY"] = "READY"; | ||
ProviderStatus2["ERROR"] = "ERROR"; | ||
return ProviderStatus2; | ||
})(ProviderStatus || {}); | ||
// ../shared/src/errors/open-feature-error-abstract.ts | ||
var OpenFeatureError = class extends Error { | ||
constructor(message) { | ||
super(message); | ||
Object.setPrototypeOf(this, OpenFeatureError.prototype); | ||
this.name = "OpenFeatureError"; | ||
} | ||
}; | ||
// ../shared/src/errors/general-error.ts | ||
@@ -219,4 +218,12 @@ var GeneralError = class extends OpenFeatureError { | ||
// ../shared/src/logger.ts | ||
var LOG_LEVELS = ["error", "warn", "info", "debug"]; | ||
// ../shared/src/events/events.ts | ||
var ProviderEvents = /* @__PURE__ */ ((ProviderEvents2) => { | ||
ProviderEvents2["Ready"] = "PROVIDER_READY"; | ||
ProviderEvents2["Error"] = "PROVIDER_ERROR"; | ||
ProviderEvents2["ConfigurationChanged"] = "PROVIDER_CONFIGURATION_CHANGED"; | ||
ProviderEvents2["Stale"] = "PROVIDER_STALE"; | ||
return ProviderEvents2; | ||
})(ProviderEvents || {}); | ||
// ../shared/src/logger/default-logger.ts | ||
var DefaultLogger = class { | ||
@@ -234,2 +241,5 @@ error(...args) { | ||
}; | ||
// ../shared/src/logger/safe-logger.ts | ||
var LOG_LEVELS = ["error", "warn", "info", "debug"]; | ||
var SafeLogger = class { | ||
@@ -272,22 +282,4 @@ constructor(logger) { | ||
// ../shared/src/no-op-transaction-context-propagator.ts | ||
var NoopTransactionContextPropagator = class { | ||
getTransactionContext() { | ||
return {}; | ||
} | ||
setTransactionContext(_, callback) { | ||
callback(); | ||
} | ||
}; | ||
var NOOP_TRANSACTION_CONTEXT_PROPAGATOR = new NoopTransactionContextPropagator(); | ||
// ../shared/src/events.ts | ||
// ../shared/src/events/open-feature-event-emitter.ts | ||
var import_events = __toESM(require("events")); | ||
var ProviderEvents = /* @__PURE__ */ ((ProviderEvents2) => { | ||
ProviderEvents2["Ready"] = "PROVIDER_READY"; | ||
ProviderEvents2["Error"] = "PROVIDER_ERROR"; | ||
ProviderEvents2["ConfigurationChanged"] = "PROVIDER_CONFIGURATION_CHANGED"; | ||
ProviderEvents2["Stale"] = "PROVIDER_STALE"; | ||
return ProviderEvents2; | ||
})(ProviderEvents || {}); | ||
var OpenFeatureEventEmitter = class { | ||
@@ -340,2 +332,21 @@ constructor(globalLogger) { | ||
// ../shared/src/provider/provider.ts | ||
var ProviderStatus = /* @__PURE__ */ ((ProviderStatus2) => { | ||
ProviderStatus2["NOT_READY"] = "NOT_READY"; | ||
ProviderStatus2["READY"] = "READY"; | ||
ProviderStatus2["ERROR"] = "ERROR"; | ||
return ProviderStatus2; | ||
})(ProviderStatus || {}); | ||
// ../shared/src/transaction-context/no-op-transaction-context-propagator.ts | ||
var NoopTransactionContextPropagator = class { | ||
getTransactionContext() { | ||
return {}; | ||
} | ||
setTransactionContext(_, callback) { | ||
callback(); | ||
} | ||
}; | ||
var NOOP_TRANSACTION_CONTEXT_PROPAGATOR = new NoopTransactionContextPropagator(); | ||
// ../shared/src/type-guards.ts | ||
@@ -363,2 +374,3 @@ function isString(value) { | ||
constructor() { | ||
this._hooks = []; | ||
this._transactionContextPropagator = NOOP_TRANSACTION_CONTEXT_PROPAGATOR; | ||
@@ -372,2 +384,13 @@ this._context = {}; | ||
} | ||
addHooks(...hooks) { | ||
this._hooks = [...this._hooks, ...hooks]; | ||
return this; | ||
} | ||
getHooks() { | ||
return this._hooks; | ||
} | ||
clearHooks() { | ||
this._hooks = []; | ||
return this; | ||
} | ||
setLogger(logger) { | ||
@@ -384,5 +407,2 @@ this._logger = new SafeLogger(logger); | ||
} | ||
getContext() { | ||
return this._context; | ||
} | ||
/** | ||
@@ -486,3 +506,8 @@ * Adds a handler for the given provider event type. | ||
const unboundEmitterNames = eventEmitterNames.filter((name) => !namedProviders.includes(name)); | ||
return unboundEmitterNames.map((name) => this._clientEvents.get(name)).filter(isDefined); | ||
return [ | ||
// all unbound, named emitters | ||
...unboundEmitterNames.map((name) => this._clientEvents.get(name)), | ||
// the default emitter | ||
this._clientEvents.get(void 0) | ||
].filter(isDefined); | ||
} | ||
@@ -563,3 +588,3 @@ transferListeners(oldProvider, newProvider, clientName, emitters) { | ||
// src/no-op-provider.ts | ||
// src/provider/no-op-provider.ts | ||
var REASON_NO_OP = "No-op"; | ||
@@ -603,3 +628,2 @@ var NoopFeatureProvider = class { | ||
super(); | ||
this._hooks = []; | ||
this._defaultProvider = NOOP_PROVIDER; | ||
@@ -621,13 +645,2 @@ } | ||
} | ||
addHooks(...hooks) { | ||
this._hooks = [...this._hooks, ...hooks]; | ||
return this; | ||
} | ||
getHooks() { | ||
return this._hooks; | ||
} | ||
clearHooks() { | ||
this._hooks = []; | ||
return this; | ||
} | ||
setContext(context) { | ||
@@ -637,2 +650,5 @@ this._context = context; | ||
} | ||
getContext() { | ||
return this._context; | ||
} | ||
getClient(nameOrContext, versionOrContext, contextOrUndefined) { | ||
@@ -654,3 +670,3 @@ var _a, _b; | ||
// src/client.ts | ||
// src/client/open-feature-client.ts | ||
var OpenFeatureClient = class { | ||
@@ -877,2 +893,3 @@ constructor(providerAccessor, emitterAccessor, globalLogger, options, context = {}) { | ||
InvalidContextError, | ||
LOG_LEVELS, | ||
NOOP_PROVIDER, | ||
@@ -892,4 +909,8 @@ NOOP_TRANSACTION_CONTEXT_PROPAGATOR, | ||
TargetingKeyMissingError, | ||
TypeMismatchError | ||
TypeMismatchError, | ||
isObject, | ||
isString, | ||
objectOrUndefined, | ||
stringOrUndefined | ||
}); | ||
//# sourceMappingURL=index.js.map |
@@ -41,3 +41,12 @@ var __defProp = Object.defineProperty; | ||
// ../shared/src/types.ts | ||
// ../shared/src/errors/open-feature-error-abstract.ts | ||
var OpenFeatureError = class extends Error { | ||
constructor(message) { | ||
super(message); | ||
Object.setPrototypeOf(this, OpenFeatureError.prototype); | ||
this.name = "OpenFeatureError"; | ||
} | ||
}; | ||
// ../shared/src/evaluation/evaluation.ts | ||
var StandardResolutionReasons = { | ||
@@ -89,18 +98,3 @@ /** | ||
})(ErrorCode || {}); | ||
var ProviderStatus = /* @__PURE__ */ ((ProviderStatus2) => { | ||
ProviderStatus2["NOT_READY"] = "NOT_READY"; | ||
ProviderStatus2["READY"] = "READY"; | ||
ProviderStatus2["ERROR"] = "ERROR"; | ||
return ProviderStatus2; | ||
})(ProviderStatus || {}); | ||
// ../shared/src/errors/open-feature-error-abstract.ts | ||
var OpenFeatureError = class extends Error { | ||
constructor(message) { | ||
super(message); | ||
Object.setPrototypeOf(this, OpenFeatureError.prototype); | ||
this.name = "OpenFeatureError"; | ||
} | ||
}; | ||
// ../shared/src/errors/general-error.ts | ||
@@ -166,4 +160,12 @@ var GeneralError = class extends OpenFeatureError { | ||
// ../shared/src/logger.ts | ||
var LOG_LEVELS = ["error", "warn", "info", "debug"]; | ||
// ../shared/src/events/events.ts | ||
var ProviderEvents = /* @__PURE__ */ ((ProviderEvents2) => { | ||
ProviderEvents2["Ready"] = "PROVIDER_READY"; | ||
ProviderEvents2["Error"] = "PROVIDER_ERROR"; | ||
ProviderEvents2["ConfigurationChanged"] = "PROVIDER_CONFIGURATION_CHANGED"; | ||
ProviderEvents2["Stale"] = "PROVIDER_STALE"; | ||
return ProviderEvents2; | ||
})(ProviderEvents || {}); | ||
// ../shared/src/logger/default-logger.ts | ||
var DefaultLogger = class { | ||
@@ -181,2 +183,5 @@ error(...args) { | ||
}; | ||
// ../shared/src/logger/safe-logger.ts | ||
var LOG_LEVELS = ["error", "warn", "info", "debug"]; | ||
var SafeLogger = class { | ||
@@ -219,22 +224,4 @@ constructor(logger) { | ||
// ../shared/src/no-op-transaction-context-propagator.ts | ||
var NoopTransactionContextPropagator = class { | ||
getTransactionContext() { | ||
return {}; | ||
} | ||
setTransactionContext(_, callback) { | ||
callback(); | ||
} | ||
}; | ||
var NOOP_TRANSACTION_CONTEXT_PROPAGATOR = new NoopTransactionContextPropagator(); | ||
// ../shared/src/events.ts | ||
// ../shared/src/events/open-feature-event-emitter.ts | ||
import EventEmitter from "events"; | ||
var ProviderEvents = /* @__PURE__ */ ((ProviderEvents2) => { | ||
ProviderEvents2["Ready"] = "PROVIDER_READY"; | ||
ProviderEvents2["Error"] = "PROVIDER_ERROR"; | ||
ProviderEvents2["ConfigurationChanged"] = "PROVIDER_CONFIGURATION_CHANGED"; | ||
ProviderEvents2["Stale"] = "PROVIDER_STALE"; | ||
return ProviderEvents2; | ||
})(ProviderEvents || {}); | ||
var OpenFeatureEventEmitter = class { | ||
@@ -287,2 +274,21 @@ constructor(globalLogger) { | ||
// ../shared/src/provider/provider.ts | ||
var ProviderStatus = /* @__PURE__ */ ((ProviderStatus2) => { | ||
ProviderStatus2["NOT_READY"] = "NOT_READY"; | ||
ProviderStatus2["READY"] = "READY"; | ||
ProviderStatus2["ERROR"] = "ERROR"; | ||
return ProviderStatus2; | ||
})(ProviderStatus || {}); | ||
// ../shared/src/transaction-context/no-op-transaction-context-propagator.ts | ||
var NoopTransactionContextPropagator = class { | ||
getTransactionContext() { | ||
return {}; | ||
} | ||
setTransactionContext(_, callback) { | ||
callback(); | ||
} | ||
}; | ||
var NOOP_TRANSACTION_CONTEXT_PROPAGATOR = new NoopTransactionContextPropagator(); | ||
// ../shared/src/type-guards.ts | ||
@@ -310,2 +316,3 @@ function isString(value) { | ||
constructor() { | ||
this._hooks = []; | ||
this._transactionContextPropagator = NOOP_TRANSACTION_CONTEXT_PROPAGATOR; | ||
@@ -319,2 +326,13 @@ this._context = {}; | ||
} | ||
addHooks(...hooks) { | ||
this._hooks = [...this._hooks, ...hooks]; | ||
return this; | ||
} | ||
getHooks() { | ||
return this._hooks; | ||
} | ||
clearHooks() { | ||
this._hooks = []; | ||
return this; | ||
} | ||
setLogger(logger) { | ||
@@ -331,5 +349,2 @@ this._logger = new SafeLogger(logger); | ||
} | ||
getContext() { | ||
return this._context; | ||
} | ||
/** | ||
@@ -433,3 +448,8 @@ * Adds a handler for the given provider event type. | ||
const unboundEmitterNames = eventEmitterNames.filter((name) => !namedProviders.includes(name)); | ||
return unboundEmitterNames.map((name) => this._clientEvents.get(name)).filter(isDefined); | ||
return [ | ||
// all unbound, named emitters | ||
...unboundEmitterNames.map((name) => this._clientEvents.get(name)), | ||
// the default emitter | ||
this._clientEvents.get(void 0) | ||
].filter(isDefined); | ||
} | ||
@@ -510,3 +530,3 @@ transferListeners(oldProvider, newProvider, clientName, emitters) { | ||
// src/no-op-provider.ts | ||
// src/provider/no-op-provider.ts | ||
var REASON_NO_OP = "No-op"; | ||
@@ -550,3 +570,2 @@ var NoopFeatureProvider = class { | ||
super(); | ||
this._hooks = []; | ||
this._defaultProvider = NOOP_PROVIDER; | ||
@@ -568,13 +587,2 @@ } | ||
} | ||
addHooks(...hooks) { | ||
this._hooks = [...this._hooks, ...hooks]; | ||
return this; | ||
} | ||
getHooks() { | ||
return this._hooks; | ||
} | ||
clearHooks() { | ||
this._hooks = []; | ||
return this; | ||
} | ||
setContext(context) { | ||
@@ -584,2 +592,5 @@ this._context = context; | ||
} | ||
getContext() { | ||
return this._context; | ||
} | ||
getClient(nameOrContext, versionOrContext, contextOrUndefined) { | ||
@@ -601,3 +612,3 @@ var _a, _b; | ||
// src/client.ts | ||
// src/client/open-feature-client.ts | ||
var OpenFeatureClient = class { | ||
@@ -823,2 +834,3 @@ constructor(providerAccessor, emitterAccessor, globalLogger, options, context = {}) { | ||
InvalidContextError, | ||
LOG_LEVELS, | ||
NOOP_PROVIDER, | ||
@@ -838,4 +850,8 @@ NOOP_TRANSACTION_CONTEXT_PROPAGATOR, | ||
TargetingKeyMissingError, | ||
TypeMismatchError | ||
TypeMismatchError, | ||
isObject, | ||
isString, | ||
objectOrUndefined, | ||
stringOrUndefined | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,20 @@ | ||
declare enum ProviderEvents { | ||
/** | ||
* The provider is ready to evaluate flags. | ||
*/ | ||
Ready = "PROVIDER_READY", | ||
/** | ||
* The provider is in an error state. | ||
*/ | ||
Error = "PROVIDER_ERROR", | ||
/** | ||
* The flag configuration in the source-of-truth has changed. | ||
*/ | ||
ConfigurationChanged = "PROVIDER_CONFIGURATION_CHANGED", | ||
/** | ||
* The provider's cached state is no longer valid and may not be up-to-date with the source of truth. | ||
*/ | ||
Stale = "PROVIDER_STALE" | ||
} | ||
type EventMetadata = { | ||
@@ -32,20 +51,41 @@ [key: string]: string | boolean | number; | ||
} | ||
declare enum ProviderEvents { | ||
interface Logger { | ||
error(...args: unknown[]): void; | ||
warn(...args: unknown[]): void; | ||
info(...args: unknown[]): void; | ||
debug(...args: unknown[]): void; | ||
} | ||
interface ManageLogger<T> { | ||
/** | ||
* The provider is ready to evaluate flags. | ||
* Sets a logger on this receiver. This logger supersedes to the global logger | ||
* and is passed to various components in the SDK. | ||
* The logger configured on the global API object will be used for all evaluations, | ||
* unless overridden in a particular client. | ||
* @template T The type of the receiver | ||
* @param {Logger} logger The logger to be used | ||
* @returns {T} The receiver (this object) | ||
*/ | ||
Ready = "PROVIDER_READY", | ||
/** | ||
* The provider is in an error state. | ||
*/ | ||
Error = "PROVIDER_ERROR", | ||
/** | ||
* The flag configuration in the source-of-truth has changed. | ||
*/ | ||
ConfigurationChanged = "PROVIDER_CONFIGURATION_CHANGED", | ||
/** | ||
* The provider's cached state is no longer valid and may not be up-to-date with the source of truth. | ||
*/ | ||
Stale = "PROVIDER_STALE" | ||
setLogger(logger: Logger): T; | ||
} | ||
declare class DefaultLogger implements Logger { | ||
error(...args: unknown[]): void; | ||
warn(...args: unknown[]): void; | ||
info(): void; | ||
debug(): void; | ||
} | ||
declare const LOG_LEVELS: Array<keyof Logger>; | ||
declare class SafeLogger implements Logger { | ||
private readonly logger; | ||
private readonly fallbackLogger; | ||
constructor(logger: Logger); | ||
error(...args: unknown[]): void; | ||
warn(...args: unknown[]): void; | ||
info(...args: unknown[]): void; | ||
debug(...args: unknown[]): void; | ||
private log; | ||
} | ||
declare class OpenFeatureEventEmitter implements ManageLogger<OpenFeatureEventEmitter> { | ||
@@ -66,2 +106,6 @@ private readonly globalLogger?; | ||
interface Metadata { | ||
} | ||
type FlagValueType = 'boolean' | 'string' | 'number' | 'object'; | ||
type PrimitiveValue = null | boolean | string | number; | ||
@@ -79,24 +123,22 @@ type JsonObject = { | ||
*/ | ||
type EvaluationContextValue = PrimitiveValue | Date | { | ||
[key: string]: EvaluationContextValue; | ||
} | EvaluationContextValue[]; | ||
type FlagValue = boolean | string | number | JsonValue; | ||
type ResolutionReason = keyof typeof StandardResolutionReasons | (string & Record<never, never>); | ||
/** | ||
* A container for arbitrary contextual data that can be used as a basis for dynamic evaluation | ||
* A structure which supports definition of arbitrary properties, with keys of type string, and values of type boolean, string, or number. | ||
* | ||
* This structure is populated by a provider for use by an Application Author (via the Evaluation API) or an Application Integrator (via hooks). | ||
*/ | ||
type EvaluationContext = { | ||
/** | ||
* A string uniquely identifying the subject (end-user, or client service) of a flag evaluation. | ||
* Providers may require this field for fractional flag evaluation, rules, or overrides targeting specific users. | ||
* Such providers may behave unpredictably if a targeting key is not specified at flag resolution. | ||
*/ | ||
targetingKey?: string; | ||
} & Record<string, EvaluationContextValue>; | ||
type FlagValue = boolean | string | number | JsonValue; | ||
type FlagValueType = 'boolean' | 'string' | 'number' | 'object'; | ||
interface Logger { | ||
error(...args: unknown[]): void; | ||
warn(...args: unknown[]): void; | ||
info(...args: unknown[]): void; | ||
debug(...args: unknown[]): void; | ||
} | ||
type FlagMetadata = Record<string, string | number | boolean>; | ||
type ResolutionDetails<U> = { | ||
value: U; | ||
variant?: string; | ||
flagMetadata?: FlagMetadata; | ||
reason?: ResolutionReason; | ||
errorCode?: ErrorCode; | ||
errorMessage?: string; | ||
}; | ||
type EvaluationDetails<T extends FlagValue> = { | ||
flagKey: string; | ||
flagMetadata: Readonly<FlagMetadata>; | ||
} & ResolutionDetails<T>; | ||
declare const StandardResolutionReasons: { | ||
@@ -168,21 +210,17 @@ /** | ||
} | ||
type ResolutionReason = keyof typeof StandardResolutionReasons | (string & Record<never, never>); | ||
type EvaluationContextValue = PrimitiveValue | Date | { | ||
[key: string]: EvaluationContextValue; | ||
} | EvaluationContextValue[]; | ||
/** | ||
* A structure which supports definition of arbitrary properties, with keys of type string, and values of type boolean, string, or number. | ||
* | ||
* This structure is populated by a provider for use by an Application Author (via the Evaluation API) or an Application Integrator (via hooks). | ||
* A container for arbitrary contextual data that can be used as a basis for dynamic evaluation | ||
*/ | ||
type FlagMetadata = Record<string, string | number | boolean>; | ||
type ResolutionDetails<U> = { | ||
value: U; | ||
variant?: string; | ||
flagMetadata?: FlagMetadata; | ||
reason?: ResolutionReason; | ||
errorCode?: ErrorCode; | ||
errorMessage?: string; | ||
}; | ||
type EvaluationDetails<T extends FlagValue> = { | ||
flagKey: string; | ||
flagMetadata: Readonly<FlagMetadata>; | ||
} & ResolutionDetails<T>; | ||
type EvaluationContext = { | ||
/** | ||
* A string uniquely identifying the subject (end-user, or client service) of a flag evaluation. | ||
* Providers may require this field for fractional flag evaluation, rules, or overrides targeting specific users. | ||
* Such providers may behave unpredictably if a targeting key is not specified at flag resolution. | ||
*/ | ||
targetingKey?: string; | ||
} & Record<string, EvaluationContextValue>; | ||
interface ManageContext<T> { | ||
@@ -203,17 +241,31 @@ /** | ||
} | ||
interface ManageLogger<T> { | ||
declare enum ProviderStatus { | ||
NOT_READY = "NOT_READY", | ||
READY = "READY", | ||
ERROR = "ERROR" | ||
} | ||
interface ProviderMetadata extends Metadata { | ||
readonly name: string; | ||
} | ||
interface CommonProvider { | ||
readonly metadata: ProviderMetadata; | ||
readonly status?: ProviderStatus; | ||
/** | ||
* Sets a logger on this receiver. This logger supersedes to the global logger | ||
* and is passed to various components in the SDK. | ||
* The logger configured on the global API object will be used for all evaluations, | ||
* unless overridden in a particular client. | ||
* @template T The type of the receiver | ||
* @param {Logger} logger The logger to be used | ||
* @returns {T} The receiver (this object) | ||
* An event emitter for ProviderEvents. | ||
* @see ProviderEvents | ||
*/ | ||
setLogger(logger: Logger): T; | ||
events?: OpenFeatureEventEmitter; | ||
onClose?(): Promise<void>; | ||
/** | ||
* A handler function used to setup the provider. | ||
* Called by the SDK after the provider is set. | ||
* When the returned promise resolves, the SDK fires the ProviderEvents.Ready event. | ||
* If the returned promise rejects, the SDK fires the ProviderEvents.Error event. | ||
* Use this function to perform any context-dependent setup within the provider. | ||
* @param context | ||
*/ | ||
initialize?(context?: EvaluationContext): Promise<void>; | ||
} | ||
type HookHints = Readonly<Record<string, unknown>>; | ||
interface Metadata { | ||
} | ||
interface ClientMetadata extends Metadata { | ||
@@ -224,5 +276,4 @@ readonly version?: string; | ||
} | ||
interface ProviderMetadata extends Metadata { | ||
readonly name: string; | ||
} | ||
type HookHints = Readonly<Record<string, unknown>>; | ||
interface HookContext<T extends FlagValue = FlagValue> { | ||
@@ -240,70 +291,57 @@ readonly flagKey: string; | ||
} | ||
/** | ||
* Transaction context is a mechanism for adding transaction specific context that | ||
* is merged with evaluation context prior to flag evaluation. Examples of potential | ||
* transaction specific context include: a user id, user agent, or request path. | ||
*/ | ||
type TransactionContext = EvaluationContext; | ||
interface ManageTransactionContextPropagator<T> extends TransactionContextPropagator { | ||
interface Hook<T extends FlagValue = FlagValue> { | ||
/** | ||
* EXPERIMENTAL: Transaction context propagation is experimental and subject to change. | ||
* The OpenFeature Enhancement Proposal regarding transaction context can be found [here](https://github.com/open-feature/ofep/pull/32). | ||
* | ||
* Sets a transaction context propagator on this receiver. The transaction context | ||
* propagator is responsible for persisting context for the duration of a single | ||
* transaction. | ||
* @experimental | ||
* @template T The type of the receiver | ||
* @param {TransactionContextPropagator} transactionContextPropagator The context propagator to be used | ||
* @returns {T} The receiver (this object) | ||
* Runs before flag values are resolved from the provider. | ||
* If an EvaluationContext is returned, it will be merged with the pre-existing EvaluationContext. | ||
* @param hookContext | ||
* @param hookHints | ||
*/ | ||
setTransactionContextPropagator(transactionContextPropagator: TransactionContextPropagator): T; | ||
} | ||
interface TransactionContextPropagator { | ||
before?(hookContext: BeforeHookContext, hookHints?: HookHints): Promise<EvaluationContext | void> | EvaluationContext | void; | ||
/** | ||
* EXPERIMENTAL: Transaction context propagation is experimental and subject to change. | ||
* The OpenFeature Enhancement Proposal regarding transaction context can be found [here](https://github.com/open-feature/ofep/pull/32). | ||
* | ||
* Returns the currently defined transaction context using the registered transaction | ||
* context propagator. | ||
* @experimental | ||
* @returns {TransactionContext} The current transaction context | ||
* Runs after flag values are successfully resolved from the provider. | ||
* @param hookContext | ||
* @param evaluationDetails | ||
* @param hookHints | ||
*/ | ||
getTransactionContext(): TransactionContext; | ||
after?(hookContext: Readonly<HookContext<T>>, evaluationDetails: EvaluationDetails<T>, hookHints?: HookHints): Promise<void> | void; | ||
/** | ||
* EXPERIMENTAL: Transaction context propagation is experimental and subject to change. | ||
* The OpenFeature Enhancement Proposal regarding transaction context can be found [here](https://github.com/open-feature/ofep/pull/32). | ||
* | ||
* Sets the transaction context using the registered transaction context propagator. | ||
* @experimental | ||
* @template R The return value of the callback | ||
* @param {TransactionContext} transactionContext The transaction specific context | ||
* @param {(...args: unknown[]) => R} callback Callback function used to set the transaction context on the stack | ||
* @param {...unknown[]} args Optional arguments that are passed to the callback function | ||
* Runs in the event of an unhandled error or promise rejection during flag resolution, or any attached hooks. | ||
* @param hookContext | ||
* @param error | ||
* @param hookHints | ||
*/ | ||
setTransactionContext<R>(transactionContext: TransactionContext, callback: (...args: unknown[]) => R, ...args: unknown[]): void; | ||
error?(hookContext: Readonly<HookContext<T>>, error: unknown, hookHints?: HookHints): Promise<void> | void; | ||
/** | ||
* Runs after all other hook stages, regardless of success or error. | ||
* Errors thrown here are unhandled by the client and will surface in application code. | ||
* @param hookContext | ||
* @param hookHints | ||
*/ | ||
finally?(hookContext: Readonly<HookContext<T>>, hookHints?: HookHints): Promise<void> | void; | ||
} | ||
declare enum ProviderStatus { | ||
NOT_READY = "NOT_READY", | ||
READY = "READY", | ||
ERROR = "ERROR" | ||
} | ||
interface CommonProvider { | ||
readonly metadata: ProviderMetadata; | ||
readonly status?: ProviderStatus; | ||
interface EvaluationLifeCycle<T> { | ||
/** | ||
* An event emitter for ProviderEvents. | ||
* @see ProviderEvents | ||
* Adds hooks that will run during flag evaluations on this receiver. | ||
* Hooks are executed in the order they were registered. Adding additional hooks | ||
* will not remove existing hooks. | ||
* Hooks registered on the global API object run with all evaluations. | ||
* Hooks registered on the client run with all evaluations on that client. | ||
* @template T The type of the receiver | ||
* @param {Hook<FlagValue>[]} hooks A list of hooks that should always run | ||
* @returns {T} The receiver (this object) | ||
*/ | ||
events?: OpenFeatureEventEmitter; | ||
onClose?(): Promise<void>; | ||
addHooks(...hooks: Hook<FlagValue>[]): T; | ||
/** | ||
* A handler function used to setup the provider. | ||
* Called by the SDK after the provider is set. | ||
* When the returned promise resolves, the SDK fires the ProviderEvents.Ready event. | ||
* If the returned promise rejects, the SDK fires the ProviderEvents.Error event. | ||
* Use this function to perform any context-dependent setup within the provider. | ||
* @param context | ||
* Access all the hooks that are registered on this receiver. | ||
* @returns {Hook<FlagValue>[]} A list of the client hooks | ||
*/ | ||
initialize?(context?: EvaluationContext): Promise<void>; | ||
getHooks(): Hook<FlagValue>[]; | ||
/** | ||
* Clears all the hooks that are registered on this receiver. | ||
* @template T The type of the receiver | ||
* @returns {T} The receiver (this object) | ||
*/ | ||
clearHooks(): T; | ||
} | ||
@@ -346,17 +384,46 @@ | ||
declare class DefaultLogger implements Logger { | ||
error(...args: unknown[]): void; | ||
warn(...args: unknown[]): void; | ||
info(): void; | ||
debug(): void; | ||
/** | ||
* Transaction context is a mechanism for adding transaction specific context that | ||
* is merged with evaluation context prior to flag evaluation. Examples of potential | ||
* transaction specific context include: a user id, user agent, or request path. | ||
*/ | ||
type TransactionContext = EvaluationContext; | ||
interface ManageTransactionContextPropagator<T> extends TransactionContextPropagator { | ||
/** | ||
* EXPERIMENTAL: Transaction context propagation is experimental and subject to change. | ||
* The OpenFeature Enhancement Proposal regarding transaction context can be found [here](https://github.com/open-feature/ofep/pull/32). | ||
* | ||
* Sets a transaction context propagator on this receiver. The transaction context | ||
* propagator is responsible for persisting context for the duration of a single | ||
* transaction. | ||
* @experimental | ||
* @template T The type of the receiver | ||
* @param {TransactionContextPropagator} transactionContextPropagator The context propagator to be used | ||
* @returns {T} The receiver (this object) | ||
*/ | ||
setTransactionContextPropagator(transactionContextPropagator: TransactionContextPropagator): T; | ||
} | ||
declare class SafeLogger implements Logger { | ||
private readonly logger; | ||
private readonly fallbackLogger; | ||
constructor(logger: Logger); | ||
error(...args: unknown[]): void; | ||
warn(...args: unknown[]): void; | ||
info(...args: unknown[]): void; | ||
debug(...args: unknown[]): void; | ||
private log; | ||
interface TransactionContextPropagator { | ||
/** | ||
* EXPERIMENTAL: Transaction context propagation is experimental and subject to change. | ||
* The OpenFeature Enhancement Proposal regarding transaction context can be found [here](https://github.com/open-feature/ofep/pull/32). | ||
* | ||
* Returns the currently defined transaction context using the registered transaction | ||
* context propagator. | ||
* @experimental | ||
* @returns {TransactionContext} The current transaction context | ||
*/ | ||
getTransactionContext(): TransactionContext; | ||
/** | ||
* EXPERIMENTAL: Transaction context propagation is experimental and subject to change. | ||
* The OpenFeature Enhancement Proposal regarding transaction context can be found [here](https://github.com/open-feature/ofep/pull/32). | ||
* | ||
* Sets the transaction context using the registered transaction context propagator. | ||
* @experimental | ||
* @template R The return value of the callback | ||
* @param {TransactionContext} transactionContext The transaction specific context | ||
* @param {(...args: unknown[]) => R} callback Callback function used to set the transaction context on the stack | ||
* @param {...unknown[]} args Optional arguments that are passed to the callback function | ||
*/ | ||
setTransactionContext<R>(transactionContext: TransactionContext, callback: (...args: unknown[]) => R, ...args: unknown[]): void; | ||
} | ||
@@ -370,3 +437,29 @@ | ||
declare abstract class OpenFeatureCommonAPI<P extends CommonProvider = CommonProvider> implements Eventing { | ||
/** | ||
* Checks whether the parameter is a string. | ||
* @param {unknown} value The value to check | ||
* @returns {value is string} True if the value is a string | ||
*/ | ||
declare function isString(value: unknown): value is string; | ||
/** | ||
* Returns the parameter if it is a string, otherwise returns undefined. | ||
* @param {unknown} value The value to check | ||
* @returns {string|undefined} The parameter if it is a string, otherwise undefined | ||
*/ | ||
declare function stringOrUndefined(value: unknown): string | undefined; | ||
/** | ||
* Checks whether the parameter is an object. | ||
* @param {unknown} value The value to check | ||
* @returns {value is string} True if the value is an object | ||
*/ | ||
declare function isObject<T extends object>(value: unknown): value is T; | ||
/** | ||
* Returns the parameter if it is an object, otherwise returns undefined. | ||
* @param {unknown} value The value to check | ||
* @returns {object|undefined} The parameter if it is an object, otherwise undefined | ||
*/ | ||
declare function objectOrUndefined<T extends object>(value: unknown): T | undefined; | ||
declare abstract class OpenFeatureCommonAPI<P extends CommonProvider = CommonProvider> implements Eventing, EvaluationLifeCycle<OpenFeatureCommonAPI<P>>, ManageLogger<OpenFeatureCommonAPI<P>>, ManageTransactionContextPropagator<OpenFeatureCommonAPI<P>> { | ||
protected _hooks: Hook[]; | ||
protected _transactionContextPropagator: TransactionContextPropagator; | ||
@@ -380,3 +473,5 @@ protected _context: EvaluationContext; | ||
protected _clientEvents: Map<string | undefined, OpenFeatureEventEmitter>; | ||
abstract clearHooks(): this; | ||
addHooks(...hooks: Hook<FlagValue>[]): this; | ||
getHooks(): Hook<FlagValue>[]; | ||
clearHooks(): this; | ||
setLogger(logger: Logger): this; | ||
@@ -388,3 +483,2 @@ /** | ||
get providerMetadata(): ProviderMetadata; | ||
getContext(): EvaluationContext; | ||
/** | ||
@@ -439,87 +533,2 @@ * Adds a handler for the given provider event type. | ||
/** | ||
* Interface that providers must implement to resolve flag values for their particular | ||
* backend or vendor. | ||
* | ||
* Implementation for resolving all the required flag types must be defined. | ||
*/ | ||
interface Provider extends CommonProvider { | ||
/** | ||
* A provider hook exposes a mechanism for provider authors to register hooks | ||
* to tap into various stages of the flag evaluation lifecycle. These hooks can | ||
* be used to perform side effects and mutate the context for purposes of the | ||
* provider. Provider hooks are not configured or controlled by the application author. | ||
*/ | ||
readonly hooks?: Hook[]; | ||
/** | ||
* Resolve a boolean flag and its evaluation details. | ||
*/ | ||
resolveBooleanEvaluation(flagKey: string, defaultValue: boolean, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<boolean>>; | ||
/** | ||
* Resolve a string flag and its evaluation details. | ||
*/ | ||
resolveStringEvaluation(flagKey: string, defaultValue: string, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<string>>; | ||
/** | ||
* Resolve a numeric flag and its evaluation details. | ||
*/ | ||
resolveNumberEvaluation(flagKey: string, defaultValue: number, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<number>>; | ||
/** | ||
* Resolve and parse an object flag and its evaluation details. | ||
*/ | ||
resolveObjectEvaluation<T extends JsonValue>(flagKey: string, defaultValue: T, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<T>>; | ||
} | ||
interface Hook<T extends FlagValue = FlagValue> { | ||
/** | ||
* Runs before flag values are resolved from the provider. | ||
* If an EvaluationContext is returned, it will be merged with the pre-existing EvaluationContext. | ||
* @param hookContext | ||
* @param hookHints | ||
*/ | ||
before?(hookContext: BeforeHookContext, hookHints?: HookHints): Promise<EvaluationContext | void> | EvaluationContext | void; | ||
/** | ||
* Runs after flag values are successfully resolved from the provider. | ||
* @param hookContext | ||
* @param evaluationDetails | ||
* @param hookHints | ||
*/ | ||
after?(hookContext: Readonly<HookContext<T>>, evaluationDetails: EvaluationDetails<T>, hookHints?: HookHints): Promise<void> | void; | ||
/** | ||
* Runs in the event of an unhandled error or promise rejection during flag resolution, or any attached hooks. | ||
* @param hookContext | ||
* @param error | ||
* @param hookHints | ||
*/ | ||
error?(hookContext: Readonly<HookContext<T>>, error: unknown, hookHints?: HookHints): Promise<void> | void; | ||
/** | ||
* Runs after all other hook stages, regardless of success or error. | ||
* Errors thrown here are unhandled by the client and will surface in application code. | ||
* @param hookContext | ||
* @param hookHints | ||
*/ | ||
finally?(hookContext: Readonly<HookContext<T>>, hookHints?: HookHints): Promise<void> | void; | ||
} | ||
interface EvaluationLifeCycle<T> { | ||
/** | ||
* Adds hooks that will run during flag evaluations on this receiver. | ||
* Hooks are executed in the order they were registered. Adding additional hooks | ||
* will not remove existing hooks. | ||
* Hooks registered on the global API object run with all evaluations. | ||
* Hooks registered on the client run with all evaluations on that client. | ||
* @template T The type of the receiver | ||
* @param {Hook<FlagValue>[]} hooks A list of hooks that should always run | ||
* @returns {T} The receiver (this object) | ||
*/ | ||
addHooks(...hooks: Hook[]): T; | ||
/** | ||
* Access all the hooks that are registered on this receiver. | ||
* @returns {Hook<FlagValue>[]} A list of the client hooks | ||
*/ | ||
getHooks(): Hook[]; | ||
/** | ||
* Clears all the hooks that are registered on this receiver. | ||
* @template T The type of the receiver | ||
* @returns {T} The receiver (this object) | ||
*/ | ||
clearHooks(): T; | ||
} | ||
interface FlagEvaluationOptions { | ||
@@ -615,65 +624,55 @@ hooks?: Hook[]; | ||
} | ||
interface Client extends EvaluationLifeCycle<Client>, Features, ManageContext<Client>, ManageLogger<Client>, Eventing { | ||
readonly metadata: ClientMetadata; | ||
} | ||
interface GlobalApi extends EvaluationLifeCycle<GlobalApi>, ManageContext<GlobalApi>, ManageLogger<GlobalApi>, ManageTransactionContextPropagator<GlobalApi> { | ||
readonly providerMetadata: ProviderMetadata; | ||
/** | ||
* Interface that providers must implement to resolve flag values for their particular | ||
* backend or vendor. | ||
* | ||
* Implementation for resolving all the required flag types must be defined. | ||
*/ | ||
interface Provider extends CommonProvider { | ||
/** | ||
* A factory function for creating new unnamed OpenFeature clients. Clients can contain | ||
* their own state (e.g. logger, hook, context). Multiple clients can be used | ||
* to segment feature flag configuration. | ||
* | ||
* All unnamed clients use the same provider set via {@link this.setProvider setProvider}. | ||
* @param {string} name The name of the client | ||
* @param {string} version The version of the client (only used for metadata) | ||
* @param {EvaluationContext} context Evaluation context that should be set on the client to used during flag evaluations | ||
* @returns {Client} OpenFeature Client | ||
* A provider hook exposes a mechanism for provider authors to register hooks | ||
* to tap into various stages of the flag evaluation lifecycle. These hooks can | ||
* be used to perform side effects and mutate the context for purposes of the | ||
* provider. Provider hooks are not configured or controlled by the application author. | ||
*/ | ||
getClient(context?: EvaluationContext): Client; | ||
readonly hooks?: Hook[]; | ||
/** | ||
* A factory function for creating new named OpenFeature clients. Clients can contain | ||
* their own state (e.g. logger, hook, context). Multiple clients can be used | ||
* to segment feature flag configuration. | ||
* | ||
* If there is already a provider bound to this name via {@link this.setProvider setProvider}, this provider will be used. | ||
* Otherwise, the default provider is used until a provider is assigned to that name. | ||
* @param {string} name The name of the client | ||
* @param {EvaluationContext} context Evaluation context that should be set on the client to used during flag evaluations | ||
* @returns {Client} OpenFeature Client | ||
* Resolve a boolean flag and its evaluation details. | ||
*/ | ||
getClient(name: string, context?: EvaluationContext): Client; | ||
resolveBooleanEvaluation(flagKey: string, defaultValue: boolean, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<boolean>>; | ||
/** | ||
* A factory function for creating new named OpenFeature clients. Clients can contain | ||
* their own state (e.g. logger, hook, context). Multiple clients can be used | ||
* to segment feature flag configuration. | ||
* | ||
* If there is already a provider bound to this name via {@link this.setProvider setProvider}, this provider will be used. | ||
* Otherwise, the default provider is used until a provider is assigned to that name. | ||
* @param {string} name The name of the client | ||
* @param {string} version The version of the client (only used for metadata) | ||
* @param {EvaluationContext} context Evaluation context that should be set on the client to used during flag evaluations | ||
* @returns {Client} OpenFeature Client | ||
* Resolve a string flag and its evaluation details. | ||
*/ | ||
getClient(name: string, version: string, context?: EvaluationContext): Client; | ||
getClient(nameOrContext?: string | EvaluationContext, versionOrContext?: string | EvaluationContext, contextOrUndefined?: EvaluationContext): Client; | ||
getClient(name?: string, version?: string, context?: EvaluationContext): Client; | ||
resolveStringEvaluation(flagKey: string, defaultValue: string, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<string>>; | ||
/** | ||
* Sets the default provider for flag evaluations. | ||
* This provider will be used by unnamed clients and named clients to which no provider is bound. | ||
* Setting a provider supersedes the current provider used in new and existing clients without a name. | ||
* @param {Provider} provider The provider responsible for flag evaluations. | ||
* @returns {GlobalApi} OpenFeature API | ||
* Resolve a numeric flag and its evaluation details. | ||
*/ | ||
setProvider(provider: Provider): GlobalApi; | ||
resolveNumberEvaluation(flagKey: string, defaultValue: number, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<number>>; | ||
/** | ||
* Sets the provider that OpenFeature will use for flag evaluations of clients with the given name. | ||
* Setting a provider supersedes the current provider used in new and existing clients with that name. | ||
* @param {string} clientName The name to identify the client | ||
* @param {Provider} provider The provider responsible for flag evaluations. | ||
* @returns {GlobalApi} OpenFeature API | ||
* Resolve and parse an object flag and its evaluation details. | ||
*/ | ||
setProvider(clientName: string, provider: Provider): GlobalApi; | ||
setProvider(clientOrProvider?: string | Provider, providerOrUndefined?: Provider): GlobalApi; | ||
resolveObjectEvaluation<T extends JsonValue>(flagKey: string, defaultValue: T, context: EvaluationContext, logger: Logger): Promise<ResolutionDetails<T>>; | ||
} | ||
/** | ||
* The No-op provider is set by default, and simply always returns the default value. | ||
*/ | ||
declare class NoopFeatureProvider implements Provider { | ||
readonly metadata: { | ||
readonly name: "No-op Provider"; | ||
}; | ||
get status(): ProviderStatus; | ||
resolveBooleanEvaluation(_: string, defaultValue: boolean): Promise<ResolutionDetails<boolean>>; | ||
resolveStringEvaluation(_: string, defaultValue: string): Promise<ResolutionDetails<string>>; | ||
resolveNumberEvaluation(_: string, defaultValue: number): Promise<ResolutionDetails<number>>; | ||
resolveObjectEvaluation<T extends JsonValue>(_: string, defaultValue: T): Promise<ResolutionDetails<T>>; | ||
private noOp; | ||
} | ||
declare const NOOP_PROVIDER: NoopFeatureProvider; | ||
type OpenFeatureClientOptions = { | ||
@@ -683,3 +682,3 @@ name?: string; | ||
}; | ||
declare class OpenFeatureClient implements Client { | ||
declare class OpenFeatureClient implements Client, ManageContext<OpenFeatureClient> { | ||
private readonly providerAccessor; | ||
@@ -720,20 +719,3 @@ private readonly emitterAccessor; | ||
/** | ||
* The No-op provider is set by default, and simply always returns the default value. | ||
*/ | ||
declare class NoopFeatureProvider implements Provider { | ||
readonly metadata: { | ||
readonly name: "No-op Provider"; | ||
}; | ||
get status(): ProviderStatus; | ||
resolveBooleanEvaluation(_: string, defaultValue: boolean): Promise<ResolutionDetails<boolean>>; | ||
resolveStringEvaluation(_: string, defaultValue: string): Promise<ResolutionDetails<string>>; | ||
resolveNumberEvaluation(_: string, defaultValue: number): Promise<ResolutionDetails<number>>; | ||
resolveObjectEvaluation<T extends JsonValue>(_: string, defaultValue: T): Promise<ResolutionDetails<T>>; | ||
private noOp; | ||
} | ||
declare const NOOP_PROVIDER: NoopFeatureProvider; | ||
declare class OpenFeatureAPI extends OpenFeatureCommonAPI<Provider> { | ||
protected _hooks: Hook[]; | ||
declare class OpenFeatureAPI extends OpenFeatureCommonAPI<Provider> implements ManageContext<OpenFeatureAPI> { | ||
protected _defaultProvider: Provider; | ||
@@ -747,6 +729,4 @@ private constructor(); | ||
static getInstance(): OpenFeatureAPI; | ||
addHooks(...hooks: Hook<FlagValue>[]): this; | ||
getHooks(): Hook<FlagValue>[]; | ||
clearHooks(): this; | ||
setContext(context: EvaluationContext): this; | ||
getContext(): EvaluationContext; | ||
/** | ||
@@ -794,2 +774,2 @@ * A factory function for creating new unnamed OpenFeature clients. Clients can contain | ||
export { BeforeHookContext, Client, ClientMetadata, CommonProvider, DefaultLogger, ErrorCode, EvaluationContext, EvaluationContextValue, EvaluationDetails, EventDetails, EventHandler, EventMetadata, Eventing, Features, FlagEvaluationOptions, FlagMetadata, FlagNotFoundError, FlagValue, FlagValueType, GeneralError, GlobalApi, Hook, HookContext, HookHints, InvalidContextError, JsonArray, JsonObject, JsonValue, Logger, ManageContext, ManageLogger, ManageTransactionContextPropagator, NOOP_PROVIDER, NOOP_TRANSACTION_CONTEXT_PROPAGATOR, OpenFeature, OpenFeatureAPI, OpenFeatureClient, OpenFeatureCommonAPI, OpenFeatureError, OpenFeatureEventEmitter, ParseError, PrimitiveValue, Provider, ProviderEvents, ProviderMetadata, ProviderStatus, ResolutionDetails, ResolutionReason, SafeLogger, StandardResolutionReasons, TargetingKeyMissingError, TransactionContext, TransactionContextPropagator, TypeMismatchError }; | ||
export { BeforeHookContext, Client, ClientMetadata, CommonProvider, DefaultLogger, ErrorCode, EvaluationContext, EvaluationContextValue, EvaluationDetails, EvaluationLifeCycle, EventDetails, EventHandler, EventMetadata, Eventing, Features, FlagEvaluationOptions, FlagMetadata, FlagNotFoundError, FlagValue, FlagValueType, GeneralError, Hook, HookContext, HookHints, InvalidContextError, JsonArray, JsonObject, JsonValue, LOG_LEVELS, Logger, ManageContext, ManageLogger, ManageTransactionContextPropagator, Metadata, NOOP_PROVIDER, NOOP_TRANSACTION_CONTEXT_PROPAGATOR, OpenFeature, OpenFeatureAPI, OpenFeatureClient, OpenFeatureCommonAPI, OpenFeatureError, OpenFeatureEventEmitter, ParseError, PrimitiveValue, Provider, ProviderEvents, ProviderMetadata, ProviderStatus, ResolutionDetails, ResolutionReason, SafeLogger, StandardResolutionReasons, TargetingKeyMissingError, TransactionContext, TransactionContextPropagator, TypeMismatchError, isObject, isString, objectOrUndefined, stringOrUndefined }; |
{ | ||
"name": "@openfeature/js-sdk", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "OpenFeature SDK for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
229157
2427