New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@openfeature/web-sdk

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openfeature/web-sdk - npm Package Compare versions

Comparing version 0.3.8-experimental to 0.3.9-experimental

31

dist/types.d.ts

@@ -269,7 +269,22 @@ declare enum ProviderEvents {

/**
* The state of the provider.
*/
declare enum ProviderStatus {
/**
* The provider has not been initialized and cannot yet evaluate flags.
*/
NOT_READY = "NOT_READY",
/**
* The provider is ready to resolve flags.
*/
READY = "READY",
/**
* The provider is in an error state and unable to evaluate flags.
*/
ERROR = "ERROR"
}
/**
* Static data about the provider.
*/
interface ProviderMetadata extends Metadata {

@@ -280,2 +295,10 @@ readonly name: string;

readonly metadata: ProviderMetadata;
/**
* Returns a representation of the current readiness of the provider.
* If the provider needs to be initialized, it should return {@link ProviderStatus.READY}.
* If the provider is in an error state, it should return {@link ProviderStatus.ERROR}.
* If the provider is functioning normally, it should return {@link ProviderStatus.NOT_READY}.
*
* _Providers which do not implement this method are assumed to be ready immediately._
*/
readonly status?: ProviderStatus;

@@ -287,6 +310,10 @@ /**

events?: OpenFeatureEventEmitter;
/**
* A function used to shut down the provider.
* Called when this provider is replaced with a new one, or when the OpenFeature is shut down.
*/
onClose?(): Promise<void>;
/**
* A handler function used to setup the provider.
* Called by the SDK after the provider is set.
* A function used to setup the provider.
* Called by the SDK after the provider is set if the provider's status is {@link ProviderStatus.NOT_READY}.
* When the returned promise resolves, the SDK fires the ProviderEvents.Ready event.

@@ -293,0 +320,0 @@ * If the returned promise rejects, the SDK fires the ProviderEvents.Error event.

2

package.json
{
"name": "@openfeature/web-sdk",
"version": "0.3.8-experimental",
"version": "0.3.9-experimental",
"description": "OpenFeature SDK for Web",

@@ -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

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