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

@spotify-confidence/openfeature-web-provider

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spotify-confidence/openfeature-web-provider - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

11

build/cjs/ConfidenceWebProvider.js

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

getFlag(flagKey, defaultValue, context, logger) {
var _a;
var _a, _b;
if (!this.configuration) {

@@ -115,2 +115,9 @@ logger.warn('Provider not ready');

}
if (client_http_1.Configuration.ResolveReason.NoSegmentMatch === flag.reason) {
(_a = this.applyManager) === null || _a === void 0 ? void 0 : _a.apply(this.configuration.resolveToken, flagName);
return {
value: defaultValue,
reason: 'DEFAULT',
};
}
let flagValue;

@@ -142,3 +149,3 @@ try {

}
(_a = this.applyManager) === null || _a === void 0 ? void 0 : _a.apply(this.configuration.resolveToken, flagName);
(_b = this.applyManager) === null || _b === void 0 ? void 0 : _b.apply(this.configuration.resolveToken, flagName);
logger.info('Value for "%s" successfully evaluated', flagKey);

@@ -145,0 +152,0 @@ return {

5

build/cjs/factory.js

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

function createConfidenceWebProvider(options) {
const confidenceClient = new client_http_1.ConfidenceClient(Object.assign(Object.assign({}, options), { apply: options.apply === 'backend' }));
const confidenceClient = new client_http_1.ConfidenceClient(Object.assign(Object.assign({}, options), { apply: options.apply === 'backend', sdk: {
id: 'SDK_ID_JS_WEB_PROVIDER',
version: '0.1.2',
} }));
return new ConfidenceWebProvider_1.ConfidenceWebProvider(confidenceClient, {

@@ -10,0 +13,0 @@ apply: options.apply || 'access',

@@ -82,3 +82,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

getFlag(flagKey, defaultValue, context, logger) {
var _a;
var _a, _b;
if (!this.configuration) {

@@ -109,2 +109,9 @@ logger.warn('Provider not ready');

}
if (Configuration.ResolveReason.NoSegmentMatch === flag.reason) {
(_a = this.applyManager) === null || _a === void 0 ? void 0 : _a.apply(this.configuration.resolveToken, flagName);
return {
value: defaultValue,
reason: 'DEFAULT',
};
}
let flagValue;

@@ -136,3 +143,3 @@ try {

}
(_a = this.applyManager) === null || _a === void 0 ? void 0 : _a.apply(this.configuration.resolveToken, flagName);
(_b = this.applyManager) === null || _b === void 0 ? void 0 : _b.apply(this.configuration.resolveToken, flagName);
logger.info('Value for "%s" successfully evaluated', flagKey);

@@ -139,0 +146,0 @@ return {

import { ConfidenceWebProvider } from './ConfidenceWebProvider';
import { ConfidenceClient } from '@spotify-confidence/client-http';
export function createConfidenceWebProvider(options) {
const confidenceClient = new ConfidenceClient(Object.assign(Object.assign({}, options), { apply: options.apply === 'backend' }));
const confidenceClient = new ConfidenceClient(Object.assign(Object.assign({}, options), { apply: options.apply === 'backend', sdk: {
id: 'SDK_ID_JS_WEB_PROVIDER',
version: '0.1.2',
} }));
return new ConfidenceWebProvider(confidenceClient, {

@@ -6,0 +9,0 @@ apply: options.apply || 'access',

@@ -82,3 +82,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

getFlag(flagKey, defaultValue, context, logger) {
var _a;
var _a, _b;
if (!this.configuration) {

@@ -109,2 +109,9 @@ logger.warn('Provider not ready');

}
if (Configuration.ResolveReason.NoSegmentMatch === flag.reason) {
(_a = this.applyManager) === null || _a === void 0 ? void 0 : _a.apply(this.configuration.resolveToken, flagName);
return {
value: defaultValue,
reason: 'DEFAULT',
};
}
let flagValue;

@@ -136,3 +143,3 @@ try {

}
(_a = this.applyManager) === null || _a === void 0 ? void 0 : _a.apply(this.configuration.resolveToken, flagName);
(_b = this.applyManager) === null || _b === void 0 ? void 0 : _b.apply(this.configuration.resolveToken, flagName);
logger.info('Value for "%s" successfully evaluated', flagKey);

@@ -139,0 +146,0 @@ return {

import { ConfidenceWebProvider } from './ConfidenceWebProvider';
import { ConfidenceClient } from '@spotify-confidence/client-http';
export function createConfidenceWebProvider(options) {
const confidenceClient = new ConfidenceClient(Object.assign(Object.assign({}, options), { apply: options.apply === 'backend' }));
const confidenceClient = new ConfidenceClient(Object.assign(Object.assign({}, options), { apply: options.apply === 'backend', sdk: {
id: 'SDK_ID_JS_WEB_PROVIDER',
version: '0.1.2',
} }));
return new ConfidenceWebProvider(confidenceClient, {

@@ -6,0 +9,0 @@ apply: options.apply || 'access',

# Changelog
## [0.1.2](https://github.com/spotify/confidence-openfeature-provider-js/compare/openfeature-web-provider-v0.1.1...openfeature-web-provider-v0.1.2) (2023-11-16)
### 🐛 Bug Fixes
* **web,server,client-http:** send apply for flags with NO_SEGMENT_MATCH ([30b0956](https://github.com/spotify/confidence-openfeature-provider-js/commit/30b0956ae9f505552fae3b6cf19f670cd0c650f9))
### ✨ New Features
* **client-http,web,server:** send sdk version ([23245ac](https://github.com/spotify/confidence-openfeature-provider-js/commit/23245acc3200eb9b0315e0d8374d226f442c6607))
### Dependencies
* The following workspace dependencies were updated
* dependencies
* @spotify-confidence/client-http bumped from ^0.1.0 to ^0.1.1
## [0.1.1](https://github.com/spotify/confidence-openfeature-provider-js/compare/openfeature-web-provider-v0.1.0...openfeature-web-provider-v0.1.1) (2023-11-16)

@@ -4,0 +23,0 @@

{
"name": "@spotify-confidence/openfeature-web-provider",
"license": "Apache-2.0",
"version": "0.1.1",
"version": "0.1.2",
"module": "build/esm/index.js",

@@ -9,3 +9,3 @@ "main": "build/cjs/index.js",

"dependencies": {
"@spotify-confidence/client-http": "^0.1.0",
"@spotify-confidence/client-http": "^0.1.1",
"fast-deep-equal": "^3.1.3"

@@ -25,3 +25,3 @@ },

},
"gitHead": "a50774bd7b6cf2e139da5ea79341d825872b5b69"
"gitHead": "1e3bab432bdf07def4fa17995e9705af19eb5c64"
}

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

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