@openfeature/web-sdk
Advanced tools
Comparing version 0.2.0-experimental to 0.3.0-experimental
@@ -458,2 +458,3 @@ "use strict"; | ||
OpenFeatureError: () => OpenFeatureError, | ||
OpenFeatureEventEmitter: () => import_events.EventEmitter, | ||
ParseError: () => ParseError, | ||
@@ -467,2 +468,3 @@ ProviderEvents: () => ProviderEvents, | ||
module.exports = __toCommonJS(src_exports); | ||
var import_events = __toESM(require_events()); | ||
@@ -695,5 +697,2 @@ // ../shared/src/types.ts | ||
// src/open-feature.ts | ||
var import_events = __toESM(require_events()); | ||
// src/no-op-provider.ts | ||
@@ -700,0 +699,0 @@ var REASON_NO_OP = "No-op"; |
@@ -436,2 +436,5 @@ var __create = Object.create; | ||
// src/index.ts | ||
var import_events = __toESM(require_events()); | ||
// ../shared/src/types.ts | ||
@@ -663,5 +666,2 @@ var ProviderEvents = /* @__PURE__ */ ((ProviderEvents2) => { | ||
// src/open-feature.ts | ||
var import_events = __toESM(require_events()); | ||
// src/no-op-provider.ts | ||
@@ -981,2 +981,3 @@ var REASON_NO_OP = "No-op"; | ||
}; | ||
var export_OpenFeatureEventEmitter = import_events.EventEmitter; | ||
export { | ||
@@ -996,2 +997,3 @@ ApiEvents, | ||
OpenFeatureError, | ||
export_OpenFeatureEventEmitter as OpenFeatureEventEmitter, | ||
ParseError, | ||
@@ -998,0 +1000,0 @@ ProviderEvents, |
@@ -1,3 +0,30 @@ | ||
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events'; | ||
// Type definitions for events 3.0 | ||
// Project: https://github.com/Gozala/events | ||
// Definitions by: Yasunori Ohoka <https://github.com/yasupeke> | ||
// Shenwei Wang <https://github.com/weareoutman> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
type Listener = (...args: any[]) => void; | ||
declare class EventEmitter { | ||
static listenerCount(emitter: EventEmitter, type: string | number): number; | ||
static defaultMaxListeners: number; | ||
eventNames(): Array<string | number>; | ||
setMaxListeners(n: number): this; | ||
getMaxListeners(): number; | ||
emit(type: string | number, ...args: any[]): boolean; | ||
addListener(type: string | number, listener: Listener): this; | ||
on(type: string | number, listener: Listener): this; | ||
once(type: string | number, listener: Listener): this; | ||
prependListener(type: string | number, listener: Listener): this; | ||
prependOnceListener(type: string | number, listener: Listener): this; | ||
removeListener(type: string | number, listener: Listener): this; | ||
off(type: string | number, listener: Listener): this; | ||
removeAllListeners(type?: string | number): this; | ||
listeners(type: string | number): Listener[]; | ||
listenerCount(type: string | number): number; | ||
rawListeners(type: string | number): Listener[]; | ||
} | ||
type PrimitiveValue = null | boolean | string | number; | ||
@@ -340,2 +367,3 @@ declare enum ProviderEvents { | ||
* An event emitter for ProviderEvents. | ||
* | ||
* @see ProviderEvents | ||
@@ -569,3 +597,3 @@ */ | ||
private _handlerWrappers; | ||
constructor(providerAccessor: () => Provider, providerReady: () => boolean, apiEvents: () => EventEmitter$1, globalLogger: () => Logger, options: OpenFeatureClientOptions); | ||
constructor(providerAccessor: () => Provider, providerReady: () => boolean, apiEvents: () => EventEmitter, globalLogger: () => Logger, options: OpenFeatureClientOptions); | ||
addHandler(eventType: ProviderEvents, handler: Handler): void; | ||
@@ -644,2 +672,2 @@ setLogger(logger: Logger): OpenFeatureClient; | ||
export { ApiEvents, BeforeHookContext, Client, ClientMetadata, CommonProvider, DefaultLogger, ErrorCode, EvaluationContext, EvaluationContextValue, EvaluationDetails, EventCallbackMessage, EventContext, EventData, Eventing, Features, FlagEvaluationOptions, FlagNotFoundError, FlagValue, FlagValueType, GeneralError, GlobalApi, Handler, Hook, HookContext, HookHints, InvalidContextError, JsonArray, JsonObject, JsonValue, Logger, ManageContext, ManageLogger, ManageTransactionContextPropagator, NOOP_PROVIDER, NOOP_TRANSACTION_CONTEXT_PROPAGATOR, OpenFeature, OpenFeatureAPI, OpenFeatureClient, OpenFeatureCommonAPI, OpenFeatureError, ParseError, PrimitiveValue, Provider, ProviderEvents, ProviderMetadata, ResolutionDetails, ResolutionReason, SafeLogger, StandardResolutionReasons, TargetingKeyMissingError, TransactionContext, TransactionContextPropagator, TypeMismatchError }; | ||
export { ApiEvents, BeforeHookContext, Client, ClientMetadata, CommonProvider, DefaultLogger, ErrorCode, EvaluationContext, EvaluationContextValue, EvaluationDetails, EventCallbackMessage, EventContext, EventData, Eventing, Features, FlagEvaluationOptions, FlagNotFoundError, FlagValue, FlagValueType, GeneralError, GlobalApi, Handler, Hook, HookContext, HookHints, InvalidContextError, JsonArray, JsonObject, JsonValue, Logger, ManageContext, ManageLogger, ManageTransactionContextPropagator, NOOP_PROVIDER, NOOP_TRANSACTION_CONTEXT_PROPAGATOR, OpenFeature, OpenFeatureAPI, OpenFeatureClient, OpenFeatureCommonAPI, OpenFeatureError, EventEmitter as OpenFeatureEventEmitter, ParseError, PrimitiveValue, Provider, ProviderEvents, ProviderMetadata, ResolutionDetails, ResolutionReason, SafeLogger, StandardResolutionReasons, TargetingKeyMissingError, TransactionContext, TransactionContextPropagator, TypeMismatchError }; |
{ | ||
"name": "@openfeature/web-sdk", | ||
"version": "0.2.0-experimental", | ||
"version": "0.3.0-experimental", | ||
"description": "OpenFeature SDK for Web", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
# @openfeature/web-sdk | ||
Experimental web implementation of intended for use in web-browsers. | ||
Experimental web implementation of OpenFeature intended for use in web-browsers. | ||
@@ -5,0 +5,0 @@ ## Installation |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
238665
2633