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

rox-node

Package Overview
Dependencies
Maintainers
6
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rox-node - npm Package Compare versions

Comparing version 2.3.7 to 3.0.0

12

package.json
{
"name": "rox-node",
"version": "2.3.7",
"version": "3.0.0",
"description": "Rollout.io ROX JS SDK Node",

@@ -40,8 +40,7 @@ "author": "Rollout.io <support@rollout.io>",

"ROX": {
"api_version": "1.5.0"
"api_version": "1.6.0"
},
"main": "dist/rox-node.js",
"module": "src/index.js",
"dependencies": {
"rox-base": "^2.3.7"
"rox-base": "^3.0.0"
},

@@ -75,4 +74,7 @@ "devDependencies": {

"/node_modules/(?!rox-base).+\\.js$"
]
],
"moduleNameMapper": {
"rox-base": "<rootDir>/../rox-base/src"
}
}
}

@@ -6,7 +6,6 @@ import RoxBase from 'rox-base';

import Flag from './lib/Flag';
import FlagOverriderFacade from './lib/FlagOverriderFacade';
import { startAdminServer } from './lib/httpService';
import * as overrides from './lib/Overrider';
Rox.startAdminServer = startAdminServer;
Rox.overrides = FlagOverriderFacade;
Rox.Configuration = RemoteConfiguration;

@@ -16,3 +15,4 @@ Rox.setContext = RoxBase.Context.Manager.setContext;

Rox.Flag = Flag;
Rox.overrides = overrides;
export default Rox;
import RoxCache from './RoxCache';
import RoxBase from 'rox-base';

@@ -43,1 +44,8 @@ const OVERRIDE_CACHE_KEY = 'roxOverrideValues';

}
export function getOriginalValue(name) {
if (!name) throw new Error('Missing name');
const flag = RoxBase.Repositories.Flags.flagWithName(name);
if (!flag) return null;
return flag._originalValue();
}
import RoxBase from 'rox-base';
const { RoxLogger, Config: configuration } = RoxBase;
const { RoxLogger, Config: configuration, Repositories } = RoxBase;
import client from './RoxClient';

@@ -42,2 +42,11 @@

}
fetch() {
client && client.fetch();
}
get flags() {
return Repositories.Flags.flags;
}
}

@@ -44,0 +53,0 @@

@@ -12,8 +12,9 @@ import RoxBase from 'rox-base';

super(defaultValue, options, name);
this._freezable = false;
}
getActiveValue(context) {
getActiveValue(callContext, context) {
if (this.condition) {
let mergedContext = Context.Actions.getMergedContextWithGlobal(context);
const evaluatedResult = parser.evaluateExpression(this.condition, mergedContext);
const evaluatedResult = parser.evaluateExpression(this.condition, callContext, mergedContext);
if (typeof evaluatedResult !== 'undefined' && this._options.indexOf(evaluatedResult) !== -1) {

@@ -26,3 +27,3 @@ return evaluatedResult;

getValue(context, dontInvokeFlagImpression) {
getInternalValue(callContext, context) {
const overridenValue = this.overridenValue;

@@ -32,9 +33,16 @@ if (overridenValue) {

}
const value = this.getActiveValue(context);
dontInvokeFlagImpression || this._flagImpression(value, context);
const value = this.getActiveValue(callContext, context);
callContext.dontInvokeFlagImpression || this._flagImpression(value, context);
return value;
}
getValue(context, dontInvokeFlagImpression) {
let callContext = { dontInvokeFlagImpression: dontInvokeFlagImpression };
return this.getInternalValue(callContext, context);
}
peek(context) {
return this.getValue(context, true);
let callContext = { dontInvokeFlagImpression: true };
return this.getInternalValue(callContext, context);
}

@@ -41,0 +49,0 @@

Sorry, the diff of this file is too big to display

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