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

@featurevisor/sdk

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@featurevisor/sdk - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

lib/createInstance.spec.d.ts

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [0.10.0](https://github.com/fahad19/featurevisor/compare/v0.9.0...v0.10.0) (2023-04-15)
### Features
* intercept attributes ([#48](https://github.com/fahad19/featurevisor/issues/48)) ([4e08784](https://github.com/fahad19/featurevisor/commit/4e0878422f6d23e850c708eaa4deadf1e8f0d04c))
# [0.9.0](https://github.com/fahad19/featurevisor/compare/v0.8.1...v0.9.0) (2023-04-15)

@@ -8,0 +19,0 @@

2

dist/index.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FeaturevisorSDK=t():e.FeaturevisorSDK=t()}(this,(()=>{return e={77:e=>{!function(){const t=e=>(new TextEncoder).encode(e);function r(e,r){let i,n,a,o,s,u,l,c;for("string"==typeof e&&(e=t(e)),i=3&e.length,n=e.length-i,a=r,s=3432918353,u=461845907,c=0;c<n;)l=255&e[c]|(255&e[++c])<<8|(255&e[++c])<<16|(255&e[++c])<<24,++c,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*u+(((l>>>16)*u&65535)<<16)&4294967295,a^=l,a=a<<13|a>>>19,o=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&o)+((58964+(o>>>16)&65535)<<16);switch(l=0,i){case 3:l^=(255&e[c+2])<<16;case 2:l^=(255&e[c+1])<<8;case 1:l^=255&e[c],l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*u+(((l>>>16)*u&65535)<<16)&4294967295,a^=l}return a^=e.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}const i=r;i.v2=function(e,r){"string"==typeof e&&(e=t(e));let i,n=e.length,a=r^n,o=0;for(;n>=4;)i=255&e[o]|(255&e[++o])<<8|(255&e[++o])<<16|(255&e[++o])<<24,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),i^=i>>>24,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^i,n-=4,++o;switch(n){case 3:a^=(255&e[o+2])<<16;case 2:a^=(255&e[o+1])<<8;case 1:a^=255&e[o],a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)}return a^=a>>>13,a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16),a^=a>>>15,a>>>0},i.v3=r,e.exports=i}()},725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBucketedNumber=t.MAX_BUCKETED_NUMBER=void 0;var i=r(77),n=Math.pow(2,32);t.MAX_BUCKETED_NUMBER=1e5,t.getBucketedNumber=function(e){var r=i.v3(e,1)/n;return Math.floor(r*t.MAX_BUCKETED_NUMBER)}},352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeaturevisorSDK=t.getValueByType=void 0;var i=r(913),n=r(522),a=r(725),o=r(687);function s(e,t){if(void 0!==e)switch(t){case"string":return"string"==typeof e?e:void 0;case"integer":return parseInt(e,10);case"double":return parseFloat(e);case"boolean":return!0===e;case"array":return Array.isArray(e)?e:void 0;case"object":return"object"==typeof e?e:void 0;default:return e}}t.getValueByType=s;var u=function(){function e(e){e.onActivation&&(this.onActivation=e.onActivation),e.configureBucketValue&&(this.configureBucketValue=e.configureBucketValue),this.logger=e.logger||(0,o.createLogger)(),this.setDatafile(e.datafile)}return e.prototype.setDatafile=function(e){try{this.datafileReader=new i.DatafileReader("string"==typeof e?JSON.parse(e):e)}catch(e){this.logger.error("could not parse datafile",{error:e})}},e.prototype.getFeature=function(e){return"string"==typeof e?this.datafileReader.getFeature(e):e},e.prototype.getBucketKey=function(e,t){var r=e.key,i="string"==typeof e.bucketBy?e.bucketBy:e.bucketBy.join("_");return"".concat(i,"_").concat(r)},e.prototype.getBucketValue=function(e,t){var r=this.getBucketKey(e,t),i=(0,a.getBucketedNumber)(r);return this.configureBucketValue?this.configureBucketValue(e,t,i):i},e.prototype.getVariation=function(e,t){void 0===t&&(t={});try{var r=this.getFeature(e);if(!r)return void this.logger.warn("feature not found in datafile",{featureKey:e});var i=(0,n.getForcedVariation)(r,t,this.datafileReader);if(i)return this.logger.debug("forced variation found",{featureKey:e,variation:i.value}),i.value;var a=this.getBucketValue(r,t),o=(0,n.getBucketedVariation)(r,t,a,this.datafileReader,this.logger);return o?o.value:(this.logger.debug("using default variation",{featureKey:e,bucketValue:a,variation:r.defaultVariation}),r.defaultVariation)}catch(t){return void this.logger.error("getVariation",{featureKey:e,error:t})}},e.prototype.getVariationBoolean=function(e,t){return void 0===t&&(t={}),s(this.getVariation(e,t),"boolean")},e.prototype.getVariationString=function(e,t){return void 0===t&&(t={}),s(this.getVariation(e,t),"string")},e.prototype.getVariationInteger=function(e,t){return void 0===t&&(t={}),s(this.getVariation(e,t),"integer")},e.prototype.getVariationDouble=function(e,t){return void 0===t&&(t={}),s(this.getVariation(e,t),"double")},e.prototype.activate=function(e,t){void 0===t&&(t={});try{var r=this.getVariation(e,t);if(void 0===r)return;if(this.onActivation){var i={};this.datafileReader.getAllAttributes().filter((function(e){return!0===e.capture})).forEach((function(e){void 0!==t[e.key]&&(i[e.key]=t[e.key])})),this.onActivation(e,r,t,i)}return r}catch(t){return void this.logger.error("activate",{featureKey:e,error:t})}},e.prototype.activateBoolean=function(e,t){return void 0===t&&(t={}),s(this.activate(e,t),"boolean")},e.prototype.activateString=function(e,t){return void 0===t&&(t={}),s(this.activate(e,t),"string")},e.prototype.activateInteger=function(e,t){return void 0===t&&(t={}),s(this.activate(e,t),"integer")},e.prototype.activateDouble=function(e,t){return void 0===t&&(t={}),s(this.activate(e,t),"double")},e.prototype.getVariable=function(e,t,r){void 0===r&&(r={});try{var i=this.getFeature(e);if(!i)return void this.logger.warn("feature not found in datafile",{featureKey:e,variableKey:t});var a=Array.isArray(i.variablesSchema)?i.variablesSchema.find((function(e){return e.key===t})):void 0;if(!a)return void this.logger.warn("variable schema not found",{featureKey:e,variableKey:t});var o=(0,n.getForcedVariableValue)(i,a,r,this.datafileReader);if(void 0!==o)return this.logger.debug("forced variable value found",{featureKey:e,variableKey:t}),o;var s=this.getBucketValue(i,r);return(0,n.getBucketedVariableValue)(i,a,r,s,this.datafileReader,this.logger)}catch(r){return void this.logger.error("getVariable",{featureKey:e,variableKey:t,error:r})}},e.prototype.getVariableBoolean=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"boolean")},e.prototype.getVariableString=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"string")},e.prototype.getVariableInteger=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"integer")},e.prototype.getVariableDouble=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"double")},e.prototype.getVariableArray=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"array")},e.prototype.getVariableObject=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"object")},e.prototype.getVariableJSON=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"json")},e}();t.FeaturevisorSDK=u},243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allConditionsAreMatched=t.conditionIsMatched=void 0;var i=r(312),n=r(544),a=r(718),o=r(194),s=r(903),u=r(56);function l(e,t){var r=e.attribute,l=e.operator,c=e.value;if("equals"===l)return t[r]===c;if("notEquals"===l)return t[r]!==c;if("string"==typeof t[r]&&Array.isArray(c)){var f=t[r];if("in"===l)return-1!==c.indexOf(f);if("notIn"===l)return-1===c.indexOf(f)}else if("string"==typeof t[r]&&"string"==typeof c){if(f=t[r],"contains"===l)return-1!==f.indexOf(c);if("notContains"===l)return-1===f.indexOf(c);if("startsWith"===l)return f.startsWith(c);if("endsWith"===l)return f.endsWith(c);if("semverEquals"===l)return a(f,c);if("semverNotEquals"===l)return o(f,c);if("semverGreaterThan"===l)return i(f,c);if("semverGreaterThanOrEquals"===l)return s(f,c);if("semverLessThan"===l)return n(f,c);if("semverLessThanOrEquals"===l)return u(f,c)}else if("number"==typeof t[r]&&"number"==typeof c){if(f=t[r],"greaterThan"===l)return f>c;if("greaterThanOrEquals"===l)return f>=c;if("lessThan"===l)return f<c;if("lessThanOrEquals"===l)return f<=c}return!1}t.conditionIsMatched=l,t.allConditionsAreMatched=function e(t,r){return"attribute"in t?l(t,r):"and"in t&&Array.isArray(t.and)?t.and.every((function(t){return e(t,r)})):"or"in t&&Array.isArray(t.or)?t.or.some((function(t){return e(t,r)})):"not"in t&&Array.isArray(t.not)?t.not.every((function(i){return!1===e({and:t.not},r)})):!!Array.isArray(t)&&t.every((function(t){return e(t,r)}))}},292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInstance=void 0;var i=r(352),n=r(687);function a(e,t){return{getVariation:e.getVariation.bind(e),getVariationBoolean:e.getVariationBoolean.bind(e),getVariationInteger:e.getVariationInteger.bind(e),getVariationDouble:e.getVariationDouble.bind(e),getVariationString:e.getVariationString.bind(e),activate:e.activate,activateBoolean:e.activateBoolean.bind(e),activateInteger:e.activateInteger.bind(e),activateDouble:e.activateDouble.bind(e),activateString:e.activateString.bind(e),getVariable:e.getVariable.bind(e),getVariableBoolean:e.getVariableBoolean.bind(e),getVariableInteger:e.getVariableInteger.bind(e),getVariableDouble:e.getVariableDouble.bind(e),getVariableString:e.getVariableString.bind(e),getVariableArray:e.getVariableArray.bind(e),getVariableObject:e.getVariableObject.bind(e)}}var o={schemaVersion:"1",revision:"unknown",attributes:[],segments:[],features:[]};t.createInstance=function(e){if(!e.datafile&&!e.datafileUrl)throw new Error("Featurevisor SDK instance cannot be created without both `datafile` and `datafileUrl` options");var t=e.logger||(0,n.createLogger)();if(e.datafile){var r=new i.FeaturevisorSDK({datafile:e.datafile,onActivation:e.onActivation,configureBucketValue:e.configureBucketValue,logger:t});if("function"==typeof e.onReady){var s=e.onReady;setTimeout((function(){s()}),0)}return a(r)}var u=new i.FeaturevisorSDK({datafile:o,onActivation:e.onActivation,configureBucketValue:e.configureBucketValue,logger:t});return e.datafileUrl&&function(e,t){return t.handleDatafileFetch?t.handleDatafileFetch(e):fetch(e).then((function(e){return e.json()}))}(e.datafileUrl,e).then((function(t){u.setDatafile(t),"function"==typeof e.onReady&&e.onReady()})).catch((function(e){console.error("Featurevisor failed to fetch datafile:"),console.error(e)})),a(u)}},913:(e,t)=>{"use strict";function r(e,t){if("string"==typeof e[t]&&"*"!==e[t])try{e[t]=JSON.parse(e[t])}catch(e){console.error("Error parsing JSON",e)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.DatafileReader=t.parseJsonConditionsIfStringified=void 0,t.parseJsonConditionsIfStringified=r;var i=function(){function e(e){this.schemaVersion=e.schemaVersion,this.revision=e.revision,this.segments=e.segments,this.attributes=e.attributes,this.features=e.features}return e.prototype.getRevision=function(){return this.revision},e.prototype.getSchemaVersion=function(){return this.schemaVersion},e.prototype.getAllAttributes=function(){return this.attributes},e.prototype.getAttribute=function(e){return this.attributes.find((function(t){return t.key===e}))},e.prototype.getSegment=function(e){var t=this.segments.find((function(t){return t.key===e}));if(t)return r(t,"conditions")},e.prototype.getFeature=function(e){var t=this.features.find((function(t){return t.key===e}));if(t)return t},e}();t.DatafileReader=i},522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBucketedVariableValue=t.getForcedVariableValue=t.getBucketedVariation=t.getForcedVariation=t.getMatchedAllocation=t.getMatchedTraffic=void 0;var i=r(590),n=r(243);function a(e,t,r,n,a){return e.find((function(e){return!(r>e.percentage||!(0,i.allGroupSegmentsAreMatched)("string"==typeof e.segments&&"*"!==e.segments?JSON.parse(e.segments):e.segments,t,n)||(a.debug("matched rule",{ruleKey:e.key}),0))}))}function o(e,t){for(var r=0,i=0,n=e.allocation;i<n.length;i++){var a=n[i];if(t<=(r+=a.percentage))return a}}function s(e,t,r){if(e.force)return e.force.find((function(e){return e.conditions?(0,n.allConditionsAreMatched)(e.conditions,t):!!e.segments&&(0,i.allGroupSegmentsAreMatched)(e.segments,t,r)}))}t.getMatchedTraffic=a,t.getMatchedAllocation=o,t.getForcedVariation=function(e,t,r){var i=s(e,t,r);if(i&&i.variation)return e.variations.find((function(e){return e.value===i.variation}))},t.getBucketedVariation=function(e,t,r,i,n){var s=a(e.traffic,t,r,i,n);if(s){var u=o(s,r);if(u){var l=u.variation,c=e.variations.find((function(e){return e.value===l}));if(c)return n.debug("matched variation",{featureKey:e.key,variation:c.value,bucketValue:r}),c;n.debug("no matched variation found",{featureKey:e.key,variation:l,bucketValue:r})}else n.debug("no matched allocation found",{featureKey:e.key,bucketValue:r})}else n.debug("no matched rule found",{featureKey:e.key,bucketValue:r})},t.getForcedVariableValue=function(e,t,r,i){var n=s(e,r,i);if(n&&n.variables){var a=n.variables[t.key];return"string"==typeof a&&"json"===t.type?JSON.parse(a):a}},t.getBucketedVariableValue=function(e,t,r,s,u,l){var c,f=a(e.traffic,r,s,u,l);if(f){var d=t.key;if(f.variables&&void 0!==f.variables[d])return l.debug("using variable from rule",{featureKey:e.key,variableKey:d,bucketValue:s}),f.variables[d];var g=o(f,s);if(g){var h=g.variation,v=e.variations.find((function(e){return e.value===h}));if(v){var E=null===(c=v.variables)||void 0===c?void 0:c.find((function(e){return e.key===d}));if(!E)return l.debug("using default value as variation has no variable",{featureKey:e.key,variableKey:d,variation:h,bucketValue:s}),"json"===t.type?JSON.parse(t.defaultValue):t.defaultValue;if(E.overrides){var p=E.overrides.find((function(e){return e.conditions?(0,n.allConditionsAreMatched)("string"==typeof e.conditions?JSON.parse(e.conditions):e.conditions,r):!!e.segments&&(0,i.allGroupSegmentsAreMatched)("string"==typeof e.segments&&"*"!==e.segments?JSON.parse(e.segments):e.segments,r,u)}));if(p)return l.debug("using override value from variation",{feature:e.key,variableKey:d,variation:h,bucketValue:s}),"json"===t.type?JSON.parse(p.value):p.value}return l.debug("using value from variation",{feature:e.key,variableKey:d,variation:h,bucketValue:s}),"json"===t.type?JSON.parse(E.value):E.value}l.debug("no matched variation found",{feature:e.key,variableKey:d,variation:h,bucketValue:s})}else l.debug("no matched allocation found",{featureKey:e.key,variableKey:d,bucketValue:s})}else l.debug("no matched rule found",{featureKey:e.key,variableKey:t.key,bucketValue:s})}},97:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(725),t),n(r(352),t),n(r(292),t),n(r(687),t)},687:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=t.Logger=t.defaultLogHandler=t.defaultLogLevels=t.loggerPrefix=void 0,t.loggerPrefix="[Featurevisor]",t.defaultLogLevels=["warn","error"],t.defaultLogHandler=function(e,r,i){switch(void 0===i&&(i={}),e){case"debug":console.log(t.loggerPrefix,r,i);case"info":console.info(t.loggerPrefix,r,i);case"warn":console.warn(t.loggerPrefix,r,i);case"error":console.error(t.loggerPrefix,r,i)}};var r=function(){function e(e){this.levels=e.levels,this.handle=e.handler}return e.prototype.setLevels=function(e){this.levels=e},e.prototype.log=function(e,t,r){-1!==this.levels.indexOf(e)&&this.handle(e,t,r)},e.prototype.debug=function(e,t){this.log("debug",e,t)},e.prototype.info=function(e,t){this.log("info",e,t)},e.prototype.warn=function(e,t){this.log("warn",e,t)},e.prototype.error=function(e,t){this.log("error",e,t)},e}();t.Logger=r,t.createLogger=function(e){void 0===e&&(e={});var i=e.levels||t.defaultLogLevels,n=e.handler||t.defaultLogHandler;return new r({levels:i,handler:n})}},590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allGroupSegmentsAreMatched=t.segmentIsMatched=void 0;var i=r(243);function n(e,t){return(0,i.allConditionsAreMatched)(e.conditions,t)}t.segmentIsMatched=n,t.allGroupSegmentsAreMatched=function e(t,r,i){if("*"===t)return!0;if("string"==typeof t){var a=i.getSegment(t);return!!a&&n(a,r)}if("object"==typeof t){if("and"in t&&Array.isArray(t.and))return t.and.every((function(t){return e(t,r,i)}));if("or"in t&&Array.isArray(t.or))return t.or.some((function(t){return e(t,r,i)}));if("not"in t&&Array.isArray(t.not))return t.not.every((function(t){return!1===e(t,r,i)}))}return!!Array.isArray(t)&&t.every((function(t){return e(t,r,i)}))}},376:(e,t,r)=>{const i=r(225),{MAX_LENGTH:n,MAX_SAFE_INTEGER:a}=r(295),{re:o,t:s}=r(765),u=r(893),{compareIdentifiers:l}=r(742);class c{constructor(e,t){if(t=u(t),e instanceof c){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>n)throw new TypeError(`version is longer than ${n} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[s.LOOSE]:o[s.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<a)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],n=e.prerelease[t];if(i("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return l(r,n)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{const r=this.build[t],n=e.build[t];if(i("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return l(r,n)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=c},269:(e,t,r)=>{const i=r(376);e.exports=(e,t,r)=>new i(e,r).compare(new i(t,r))},718:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>0===i(e,t,r)},312:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>i(e,t,r)>0},903:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>i(e,t,r)>=0},544:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>i(e,t,r)<0},56:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>i(e,t,r)<=0},194:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>0!==i(e,t,r)},295:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},225:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},742:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const i=t.test(e),n=t.test(r);return i&&n&&(e=+e,r=+r),e===r?0:i&&!n?-1:n&&!i?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},893:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},765:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:i}=r(295),n=r(225),a=(t=e.exports={}).re=[],o=t.src=[],s=t.t={};let u=0;const l=(e,t,r)=>{const i=u++;n(e,i,t),s[e]=i,o[i]=t,a[i]=new RegExp(t,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[s.NUMERICIDENTIFIER]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[s.NUMERICIDENTIFIERLOOSE]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[s.PRERELEASEIDENTIFIER]}(?:\\.${o[s.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[s.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[s.BUILDIDENTIFIER]}(?:\\.${o[s.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[s.MAINVERSION]}${o[s.PRERELEASE]}?${o[s.BUILD]}?`),l("FULL",`^${o[s.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[s.MAINVERSIONLOOSE]}${o[s.PRERELEASELOOSE]}?${o[s.BUILD]}?`),l("LOOSE",`^${o[s.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${o[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${o[s.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:${o[s.PRERELEASE]})?${o[s.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:${o[s.PRERELEASELOOSE]})?${o[s.BUILD]}?)?)?`),l("XRANGE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?(?:$|[^\\d])`),l("COERCERTL",o[s.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[s.LONECARET]}${o[s.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[s.LONECARET]}${o[s.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[s.GTLT]}\\s*(${o[s.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]}|${o[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[s.XRANGEPLAIN]})\\s+-\\s+(${o[s.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[s.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}},t={},function r(i){var n=t[i];if(void 0!==n)return n.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.exports}(97);var e,t}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FeaturevisorSDK=t():e.FeaturevisorSDK=t()}(this,(()=>{return e={77:e=>{!function(){const t=e=>(new TextEncoder).encode(e);function r(e,r){let i,n,a,o,s,u,c,l;for("string"==typeof e&&(e=t(e)),i=3&e.length,n=e.length-i,a=r,s=3432918353,u=461845907,l=0;l<n;)c=255&e[l]|(255&e[++l])<<8|(255&e[++l])<<16|(255&e[++l])<<24,++l,c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*u+(((c>>>16)*u&65535)<<16)&4294967295,a^=c,a=a<<13|a>>>19,o=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&o)+((58964+(o>>>16)&65535)<<16);switch(c=0,i){case 3:c^=(255&e[l+2])<<16;case 2:c^=(255&e[l+1])<<8;case 1:c^=255&e[l],c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*u+(((c>>>16)*u&65535)<<16)&4294967295,a^=c}return a^=e.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}const i=r;i.v2=function(e,r){"string"==typeof e&&(e=t(e));let i,n=e.length,a=r^n,o=0;for(;n>=4;)i=255&e[o]|(255&e[++o])<<8|(255&e[++o])<<16|(255&e[++o])<<24,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),i^=i>>>24,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^i,n-=4,++o;switch(n){case 3:a^=(255&e[o+2])<<16;case 2:a^=(255&e[o+1])<<8;case 1:a^=255&e[o],a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)}return a^=a>>>13,a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16),a^=a>>>15,a>>>0},i.v3=r,e.exports=i}()},725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBucketedNumber=t.MAX_BUCKETED_NUMBER=void 0;var i=r(77),n=Math.pow(2,32);t.MAX_BUCKETED_NUMBER=1e5,t.getBucketedNumber=function(e){var r=i.v3(e,1)/n;return Math.floor(r*t.MAX_BUCKETED_NUMBER)}},352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeaturevisorSDK=t.getValueByType=void 0;var i=r(913),n=r(522),a=r(725),o=r(687);function s(e,t){if(void 0!==e)switch(t){case"string":return"string"==typeof e?e:void 0;case"integer":return parseInt(e,10);case"double":return parseFloat(e);case"boolean":return!0===e;case"array":return Array.isArray(e)?e:void 0;case"object":return"object"==typeof e?e:void 0;default:return e}}t.getValueByType=s;var u=function(){function e(e){e.onActivation&&(this.onActivation=e.onActivation),e.configureBucketValue&&(this.configureBucketValue=e.configureBucketValue),this.logger=e.logger||(0,o.createLogger)(),e.interceptAttributes&&(this.interceptAttributes=e.interceptAttributes),this.setDatafile(e.datafile)}return e.prototype.setDatafile=function(e){try{this.datafileReader=new i.DatafileReader("string"==typeof e?JSON.parse(e):e)}catch(e){this.logger.error("could not parse datafile",{error:e})}},e.prototype.getFeature=function(e){return"string"==typeof e?this.datafileReader.getFeature(e):e},e.prototype.getBucketKey=function(e,t){var r=e.key,i="string"==typeof e.bucketBy?e.bucketBy:e.bucketBy.join("_");return"".concat(i,"_").concat(r)},e.prototype.getBucketValue=function(e,t){var r=this.getBucketKey(e,t),i=(0,a.getBucketedNumber)(r);return this.configureBucketValue?this.configureBucketValue(e,t,i):i},e.prototype.getVariation=function(e,t){void 0===t&&(t={});try{var r=this.getFeature(e);if(!r)return void this.logger.warn("feature not found in datafile",{featureKey:e});var i=this.interceptAttributes?this.interceptAttributes(t):t,a=(0,n.getForcedVariation)(r,i,this.datafileReader);if(a)return this.logger.debug("forced variation found",{featureKey:e,variation:a.value}),a.value;var o=this.getBucketValue(r,i),s=(0,n.getBucketedVariation)(r,i,o,this.datafileReader,this.logger);return s?s.value:(this.logger.debug("using default variation",{featureKey:e,bucketValue:o,variation:r.defaultVariation}),r.defaultVariation)}catch(t){return void this.logger.error("getVariation",{featureKey:e,error:t})}},e.prototype.getVariationBoolean=function(e,t){return void 0===t&&(t={}),s(this.getVariation(e,t),"boolean")},e.prototype.getVariationString=function(e,t){return void 0===t&&(t={}),s(this.getVariation(e,t),"string")},e.prototype.getVariationInteger=function(e,t){return void 0===t&&(t={}),s(this.getVariation(e,t),"integer")},e.prototype.getVariationDouble=function(e,t){return void 0===t&&(t={}),s(this.getVariation(e,t),"double")},e.prototype.activate=function(e,t){void 0===t&&(t={});try{var r=this.getVariation(e,t);if(void 0===r)return;if(this.onActivation){var i=this.interceptAttributes?this.interceptAttributes(t):t,n={};this.datafileReader.getAllAttributes().filter((function(e){return!0===e.capture})).forEach((function(e){void 0!==i[e.key]&&(n[e.key]=t[e.key])})),this.onActivation(e,r,i,n)}return r}catch(t){return void this.logger.error("activate",{featureKey:e,error:t})}},e.prototype.activateBoolean=function(e,t){return void 0===t&&(t={}),s(this.activate(e,t),"boolean")},e.prototype.activateString=function(e,t){return void 0===t&&(t={}),s(this.activate(e,t),"string")},e.prototype.activateInteger=function(e,t){return void 0===t&&(t={}),s(this.activate(e,t),"integer")},e.prototype.activateDouble=function(e,t){return void 0===t&&(t={}),s(this.activate(e,t),"double")},e.prototype.getVariable=function(e,t,r){void 0===r&&(r={});try{var i=this.getFeature(e);if(!i)return void this.logger.warn("feature not found in datafile",{featureKey:e,variableKey:t});var a=Array.isArray(i.variablesSchema)?i.variablesSchema.find((function(e){return e.key===t})):void 0;if(!a)return void this.logger.warn("variable schema not found",{featureKey:e,variableKey:t});var o=this.interceptAttributes?this.interceptAttributes(r):r,s=(0,n.getForcedVariableValue)(i,a,o,this.datafileReader);if(void 0!==s)return this.logger.debug("forced variable value found",{featureKey:e,variableKey:t}),s;var u=this.getBucketValue(i,o);return(0,n.getBucketedVariableValue)(i,a,o,u,this.datafileReader,this.logger)}catch(r){return void this.logger.error("getVariable",{featureKey:e,variableKey:t,error:r})}},e.prototype.getVariableBoolean=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"boolean")},e.prototype.getVariableString=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"string")},e.prototype.getVariableInteger=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"integer")},e.prototype.getVariableDouble=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"double")},e.prototype.getVariableArray=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"array")},e.prototype.getVariableObject=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"object")},e.prototype.getVariableJSON=function(e,t,r){return void 0===r&&(r={}),s(this.getVariable(e,t,r),"json")},e}();t.FeaturevisorSDK=u},243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allConditionsAreMatched=t.conditionIsMatched=void 0;var i=r(312),n=r(544),a=r(718),o=r(194),s=r(903),u=r(56);function c(e,t){var r=e.attribute,c=e.operator,l=e.value;if("equals"===c)return t[r]===l;if("notEquals"===c)return t[r]!==l;if("string"==typeof t[r]&&Array.isArray(l)){var f=t[r];if("in"===c)return-1!==l.indexOf(f);if("notIn"===c)return-1===l.indexOf(f)}else if("string"==typeof t[r]&&"string"==typeof l){if(f=t[r],"contains"===c)return-1!==f.indexOf(l);if("notContains"===c)return-1===f.indexOf(l);if("startsWith"===c)return f.startsWith(l);if("endsWith"===c)return f.endsWith(l);if("semverEquals"===c)return a(f,l);if("semverNotEquals"===c)return o(f,l);if("semverGreaterThan"===c)return i(f,l);if("semverGreaterThanOrEquals"===c)return s(f,l);if("semverLessThan"===c)return n(f,l);if("semverLessThanOrEquals"===c)return u(f,l)}else if("number"==typeof t[r]&&"number"==typeof l){if(f=t[r],"greaterThan"===c)return f>l;if("greaterThanOrEquals"===c)return f>=l;if("lessThan"===c)return f<l;if("lessThanOrEquals"===c)return f<=l}return!1}t.conditionIsMatched=c,t.allConditionsAreMatched=function e(t,r){return"attribute"in t?c(t,r):"and"in t&&Array.isArray(t.and)?t.and.every((function(t){return e(t,r)})):"or"in t&&Array.isArray(t.or)?t.or.some((function(t){return e(t,r)})):"not"in t&&Array.isArray(t.not)?t.not.every((function(i){return!1===e({and:t.not},r)})):!!Array.isArray(t)&&t.every((function(t){return e(t,r)}))}},292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInstance=void 0;var i=r(352),n=r(687);function a(e,t){return{getVariation:e.getVariation.bind(e),getVariationBoolean:e.getVariationBoolean.bind(e),getVariationInteger:e.getVariationInteger.bind(e),getVariationDouble:e.getVariationDouble.bind(e),getVariationString:e.getVariationString.bind(e),activate:e.activate,activateBoolean:e.activateBoolean.bind(e),activateInteger:e.activateInteger.bind(e),activateDouble:e.activateDouble.bind(e),activateString:e.activateString.bind(e),getVariable:e.getVariable.bind(e),getVariableBoolean:e.getVariableBoolean.bind(e),getVariableInteger:e.getVariableInteger.bind(e),getVariableDouble:e.getVariableDouble.bind(e),getVariableString:e.getVariableString.bind(e),getVariableArray:e.getVariableArray.bind(e),getVariableObject:e.getVariableObject.bind(e)}}var o={schemaVersion:"1",revision:"unknown",attributes:[],segments:[],features:[]};t.createInstance=function(e){if(!e.datafile&&!e.datafileUrl)throw new Error("Featurevisor SDK instance cannot be created without both `datafile` and `datafileUrl` options");var t=e.logger||(0,n.createLogger)();if(e.datafile){var r=new i.FeaturevisorSDK({datafile:e.datafile,onActivation:e.onActivation,configureBucketValue:e.configureBucketValue,logger:t,interceptAttributes:e.interceptAttributes});if("function"==typeof e.onReady){var s=e.onReady;setTimeout((function(){s()}),0)}return a(r)}var u=new i.FeaturevisorSDK({datafile:o,onActivation:e.onActivation,configureBucketValue:e.configureBucketValue,logger:t,interceptAttributes:e.interceptAttributes});return e.datafileUrl&&function(e,t){return t.handleDatafileFetch?t.handleDatafileFetch(e):fetch(e).then((function(e){return e.json()}))}(e.datafileUrl,e).then((function(t){u.setDatafile(t),"function"==typeof e.onReady&&e.onReady()})).catch((function(e){console.error("Featurevisor failed to fetch datafile:"),console.error(e)})),a(u)}},913:(e,t)=>{"use strict";function r(e,t){if("string"==typeof e[t]&&"*"!==e[t])try{e[t]=JSON.parse(e[t])}catch(e){console.error("Error parsing JSON",e)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.DatafileReader=t.parseJsonConditionsIfStringified=void 0,t.parseJsonConditionsIfStringified=r;var i=function(){function e(e){this.schemaVersion=e.schemaVersion,this.revision=e.revision,this.segments=e.segments,this.attributes=e.attributes,this.features=e.features}return e.prototype.getRevision=function(){return this.revision},e.prototype.getSchemaVersion=function(){return this.schemaVersion},e.prototype.getAllAttributes=function(){return this.attributes},e.prototype.getAttribute=function(e){return this.attributes.find((function(t){return t.key===e}))},e.prototype.getSegment=function(e){var t=this.segments.find((function(t){return t.key===e}));if(t)return r(t,"conditions")},e.prototype.getFeature=function(e){var t=this.features.find((function(t){return t.key===e}));if(t)return t},e}();t.DatafileReader=i},522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBucketedVariableValue=t.getForcedVariableValue=t.getBucketedVariation=t.getForcedVariation=t.getMatchedAllocation=t.getMatchedTraffic=void 0;var i=r(590),n=r(243);function a(e,t,r,n,a){return e.find((function(e){return!(r>e.percentage||!(0,i.allGroupSegmentsAreMatched)("string"==typeof e.segments&&"*"!==e.segments?JSON.parse(e.segments):e.segments,t,n)||(a.debug("matched rule",{ruleKey:e.key}),0))}))}function o(e,t){for(var r=0,i=0,n=e.allocation;i<n.length;i++){var a=n[i];if(t<=(r+=a.percentage))return a}}function s(e,t,r){if(e.force)return e.force.find((function(e){return e.conditions?(0,n.allConditionsAreMatched)(e.conditions,t):!!e.segments&&(0,i.allGroupSegmentsAreMatched)(e.segments,t,r)}))}t.getMatchedTraffic=a,t.getMatchedAllocation=o,t.getForcedVariation=function(e,t,r){var i=s(e,t,r);if(i&&i.variation)return e.variations.find((function(e){return e.value===i.variation}))},t.getBucketedVariation=function(e,t,r,i,n){var s=a(e.traffic,t,r,i,n);if(s){var u=o(s,r);if(u){var c=u.variation,l=e.variations.find((function(e){return e.value===c}));if(l)return n.debug("matched variation",{featureKey:e.key,variation:l.value,bucketValue:r}),l;n.debug("no matched variation found",{featureKey:e.key,variation:c,bucketValue:r})}else n.debug("no matched allocation found",{featureKey:e.key,bucketValue:r})}else n.debug("no matched rule found",{featureKey:e.key,bucketValue:r})},t.getForcedVariableValue=function(e,t,r,i){var n=s(e,r,i);if(n&&n.variables){var a=n.variables[t.key];return"string"==typeof a&&"json"===t.type?JSON.parse(a):a}},t.getBucketedVariableValue=function(e,t,r,s,u,c){var l,f=a(e.traffic,r,s,u,c);if(f){var d=t.key;if(f.variables&&void 0!==f.variables[d])return c.debug("using variable from rule",{featureKey:e.key,variableKey:d,bucketValue:s}),f.variables[d];var h=o(f,s);if(h){var g=h.variation,p=e.variations.find((function(e){return e.value===g}));if(p){var v=null===(l=p.variables)||void 0===l?void 0:l.find((function(e){return e.key===d}));if(!v)return c.debug("using default value as variation has no variable",{featureKey:e.key,variableKey:d,variation:g,bucketValue:s}),"json"===t.type?JSON.parse(t.defaultValue):t.defaultValue;if(v.overrides){var E=v.overrides.find((function(e){return e.conditions?(0,n.allConditionsAreMatched)("string"==typeof e.conditions?JSON.parse(e.conditions):e.conditions,r):!!e.segments&&(0,i.allGroupSegmentsAreMatched)("string"==typeof e.segments&&"*"!==e.segments?JSON.parse(e.segments):e.segments,r,u)}));if(E)return c.debug("using override value from variation",{feature:e.key,variableKey:d,variation:g,bucketValue:s}),"json"===t.type?JSON.parse(E.value):E.value}return c.debug("using value from variation",{feature:e.key,variableKey:d,variation:g,bucketValue:s}),"json"===t.type?JSON.parse(v.value):v.value}c.debug("no matched variation found",{feature:e.key,variableKey:d,variation:g,bucketValue:s})}else c.debug("no matched allocation found",{featureKey:e.key,variableKey:d,bucketValue:s})}else c.debug("no matched rule found",{featureKey:e.key,variableKey:t.key,bucketValue:s})}},97:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(r(725),t),n(r(352),t),n(r(292),t),n(r(687),t)},687:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=t.Logger=t.defaultLogHandler=t.defaultLogLevels=t.loggerPrefix=void 0,t.loggerPrefix="[Featurevisor]",t.defaultLogLevels=["warn","error"],t.defaultLogHandler=function(e,r,i){switch(void 0===i&&(i={}),e){case"debug":console.log(t.loggerPrefix,r,i);case"info":console.info(t.loggerPrefix,r,i);case"warn":console.warn(t.loggerPrefix,r,i);case"error":console.error(t.loggerPrefix,r,i)}};var r=function(){function e(e){this.levels=e.levels,this.handle=e.handler}return e.prototype.setLevels=function(e){this.levels=e},e.prototype.log=function(e,t,r){-1!==this.levels.indexOf(e)&&this.handle(e,t,r)},e.prototype.debug=function(e,t){this.log("debug",e,t)},e.prototype.info=function(e,t){this.log("info",e,t)},e.prototype.warn=function(e,t){this.log("warn",e,t)},e.prototype.error=function(e,t){this.log("error",e,t)},e}();t.Logger=r,t.createLogger=function(e){void 0===e&&(e={});var i=e.levels||t.defaultLogLevels,n=e.handler||t.defaultLogHandler;return new r({levels:i,handler:n})}},590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allGroupSegmentsAreMatched=t.segmentIsMatched=void 0;var i=r(243);function n(e,t){return(0,i.allConditionsAreMatched)(e.conditions,t)}t.segmentIsMatched=n,t.allGroupSegmentsAreMatched=function e(t,r,i){if("*"===t)return!0;if("string"==typeof t){var a=i.getSegment(t);return!!a&&n(a,r)}if("object"==typeof t){if("and"in t&&Array.isArray(t.and))return t.and.every((function(t){return e(t,r,i)}));if("or"in t&&Array.isArray(t.or))return t.or.some((function(t){return e(t,r,i)}));if("not"in t&&Array.isArray(t.not))return t.not.every((function(t){return!1===e(t,r,i)}))}return!!Array.isArray(t)&&t.every((function(t){return e(t,r,i)}))}},376:(e,t,r)=>{const i=r(225),{MAX_LENGTH:n,MAX_SAFE_INTEGER:a}=r(295),{re:o,t:s}=r(765),u=r(893),{compareIdentifiers:c}=r(742);class l{constructor(e,t){if(t=u(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>n)throw new TypeError(`version is longer than ${n} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[s.LOOSE]:o[s.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<a)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],n=e.prerelease[t];if(i("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return c(r,n)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],n=e.build[t];if(i("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return c(r,n)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=l},269:(e,t,r)=>{const i=r(376);e.exports=(e,t,r)=>new i(e,r).compare(new i(t,r))},718:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>0===i(e,t,r)},312:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>i(e,t,r)>0},903:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>i(e,t,r)>=0},544:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>i(e,t,r)<0},56:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>i(e,t,r)<=0},194:(e,t,r)=>{const i=r(269);e.exports=(e,t,r)=>0!==i(e,t,r)},295:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},225:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},742:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const i=t.test(e),n=t.test(r);return i&&n&&(e=+e,r=+r),e===r?0:i&&!n?-1:n&&!i?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},893:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},765:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:i}=r(295),n=r(225),a=(t=e.exports={}).re=[],o=t.src=[],s=t.t={};let u=0;const c=(e,t,r)=>{const i=u++;n(e,i,t),s[e]=i,o[i]=t,a[i]=new RegExp(t,r?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${o[s.NUMERICIDENTIFIER]}|${o[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[s.NUMERICIDENTIFIERLOOSE]}|${o[s.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${o[s.PRERELEASEIDENTIFIER]}(?:\\.${o[s.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${o[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[s.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${o[s.BUILDIDENTIFIER]}(?:\\.${o[s.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${o[s.MAINVERSION]}${o[s.PRERELEASE]}?${o[s.BUILD]}?`),c("FULL",`^${o[s.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${o[s.MAINVERSIONLOOSE]}${o[s.PRERELEASELOOSE]}?${o[s.BUILD]}?`),c("LOOSE",`^${o[s.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${o[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${o[s.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:${o[s.PRERELEASE]})?${o[s.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:${o[s.PRERELEASELOOSE]})?${o[s.BUILD]}?)?)?`),c("XRANGE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?(?:$|[^\\d])`),c("COERCERTL",o[s.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${o[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${o[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${o[s.LONECARET]}${o[s.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${o[s.LONECARET]}${o[s.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${o[s.GTLT]}\\s*(${o[s.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]}|${o[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${o[s.XRANGEPLAIN]})\\s+-\\s+(${o[s.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${o[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[s.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}},t={},function r(i){var n=t[i];if(void 0!==n)return n.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.exports}(97);var e,t}));
//# sourceMappingURL=index.js.map

@@ -10,2 +10,3 @@ import { Attributes, VariationValue, VariableValue, Feature, DatafileContent, BucketValue, FeatureKey, VariationType, VariableType } from "@featurevisor/types";

logger?: Logger;
interceptAttributes?: (attributes: Attributes) => Attributes;
}

@@ -20,2 +21,3 @@ type FieldType = VariationType | VariableType;

private logger;
private interceptAttributes?;
constructor(options: SdkOptions);

@@ -22,0 +24,0 @@ setDatafile(datafile: DatafileContent | string): void;

@@ -38,2 +38,5 @@ import { DatafileReader } from "./datafileReader";

this.logger = options.logger || createLogger();
if (options.interceptAttributes) {
this.interceptAttributes = options.interceptAttributes;
}
this.setDatafile(options.datafile);

@@ -81,3 +84,6 @@ }

}
var forcedVariation = getForcedVariation(feature, attributes, this.datafileReader);
var finalAttributes = this.interceptAttributes
? this.interceptAttributes(attributes)
: attributes;
var forcedVariation = getForcedVariation(feature, finalAttributes, this.datafileReader);
if (forcedVariation) {

@@ -90,4 +96,4 @@ this.logger.debug("forced variation found", {

}
var bucketValue = this.getBucketValue(feature, attributes);
var variation = getBucketedVariation(feature, attributes, bucketValue, this.datafileReader, this.logger);
var bucketValue = this.getBucketValue(feature, finalAttributes);
var variation = getBucketedVariation(feature, finalAttributes, bucketValue, this.datafileReader, this.logger);
if (!variation) {

@@ -139,2 +145,5 @@ this.logger.debug("using default variation", {

if (this.onActivation) {
var finalAttributes_1 = this.interceptAttributes
? this.interceptAttributes(attributes)
: attributes;
var captureAttributes_1 = {};

@@ -145,7 +154,7 @@ var attributesForCapturing = this.datafileReader

attributesForCapturing.forEach(function (a) {
if (typeof attributes[a.key] !== "undefined") {
if (typeof finalAttributes_1[a.key] !== "undefined") {
captureAttributes_1[a.key] = attributes[a.key];
}
});
this.onActivation(featureKey, variationValue, attributes, captureAttributes_1);
this.onActivation(featureKey, variationValue, finalAttributes_1, captureAttributes_1);
}

@@ -197,3 +206,6 @@ return variationValue;

}
var forcedVariableValue = getForcedVariableValue(feature, variableSchema, attributes, this.datafileReader);
var finalAttributes = this.interceptAttributes
? this.interceptAttributes(attributes)
: attributes;
var forcedVariableValue = getForcedVariableValue(feature, variableSchema, finalAttributes, this.datafileReader);
if (typeof forcedVariableValue !== "undefined") {

@@ -203,4 +215,4 @@ this.logger.debug("forced variable value found", { featureKey: featureKey, variableKey: variableKey });

}
var bucketValue = this.getBucketValue(feature, attributes);
return getBucketedVariableValue(feature, variableSchema, attributes, bucketValue, this.datafileReader, this.logger);
var bucketValue = this.getBucketValue(feature, finalAttributes);
return getBucketedVariableValue(feature, variableSchema, finalAttributes, bucketValue, this.datafileReader, this.logger);
}

@@ -207,0 +219,0 @@ catch (e) {

@@ -1,2 +0,2 @@

import { DatafileContent } from "@featurevisor/types";
import { DatafileContent, Attributes } from "@featurevisor/types";
import { FeaturevisorSDK, ConfigureBucketValue, ActivationCallback } from "./client";

@@ -13,2 +13,3 @@ import { Logger } from "./logger";

logger?: Logger;
interceptAttributes?: (attributes: Attributes) => Attributes;
}

@@ -15,0 +16,0 @@ export interface FeaturevisorInstance {

@@ -57,2 +57,3 @@ import { FeaturevisorSDK } from "./client";

logger: logger,
interceptAttributes: options.interceptAttributes,
});

@@ -73,2 +74,3 @@ if (typeof options.onReady === "function") {

logger: logger,
interceptAttributes: options.interceptAttributes,
});

@@ -75,0 +77,0 @@ if (options.datafileUrl) {

{
"name": "@featurevisor/sdk",
"version": "0.9.0",
"version": "0.10.0",
"description": "Featurevisor SDK for Node.js and the browser",

@@ -45,7 +45,7 @@ "main": "dist/index.js",

"dependencies": {
"@featurevisor/types": "^0.9.0",
"@featurevisor/types": "^0.10.0",
"murmurhash": "^2.0.1",
"semver": "^7.3.8"
},
"gitHead": "e0341e52a5d9e7e2e59a75621dd6cbf5c0740612"
"gitHead": "17973c9d208ff9462ed0f429f06a278ed40aa8d7"
}

@@ -36,3 +36,4 @@ import {

configureBucketValue?: ConfigureBucketValue;
logger?: Logger; // TODO: keep it in FeaturevisorInstance only in next breaking semver
logger?: Logger; // @TODO: keep it in FeaturevisorInstance only in next breaking semver
interceptAttributes?: (attributes: Attributes) => Attributes; // @TODO: move it to FeaturevisorInstance in next breaking semver
}

@@ -74,2 +75,3 @@

private logger: Logger;
private interceptAttributes?: (attributes: Attributes) => Attributes;

@@ -87,2 +89,6 @@ constructor(options: SdkOptions) {

if (options.interceptAttributes) {
this.interceptAttributes = options.interceptAttributes;
}
this.setDatafile(options.datafile);

@@ -149,4 +155,8 @@ }

const forcedVariation = getForcedVariation(feature, attributes, this.datafileReader);
const finalAttributes = this.interceptAttributes
? this.interceptAttributes(attributes)
: attributes;
const forcedVariation = getForcedVariation(feature, finalAttributes, this.datafileReader);
if (forcedVariation) {

@@ -161,7 +171,7 @@ this.logger.debug("forced variation found", {

const bucketValue = this.getBucketValue(feature, attributes);
const bucketValue = this.getBucketValue(feature, finalAttributes);
const variation = getBucketedVariation(
feature,
attributes,
finalAttributes,
bucketValue,

@@ -238,2 +248,6 @@ this.datafileReader,

if (this.onActivation) {
const finalAttributes = this.interceptAttributes
? this.interceptAttributes(attributes)
: attributes;
const captureAttributes: Attributes = {};

@@ -246,3 +260,3 @@

attributesForCapturing.forEach((a) => {
if (typeof attributes[a.key] !== "undefined") {
if (typeof finalAttributes[a.key] !== "undefined") {
captureAttributes[a.key] = attributes[a.key];

@@ -252,3 +266,3 @@ }

this.onActivation(featureKey, variationValue, attributes, captureAttributes);
this.onActivation(featureKey, variationValue, finalAttributes, captureAttributes);
}

@@ -316,6 +330,10 @@

const finalAttributes = this.interceptAttributes
? this.interceptAttributes(attributes)
: attributes;
const forcedVariableValue = getForcedVariableValue(
feature,
variableSchema,
attributes,
finalAttributes,
this.datafileReader,

@@ -330,3 +348,3 @@ );

const bucketValue = this.getBucketValue(feature, attributes);
const bucketValue = this.getBucketValue(feature, finalAttributes);

@@ -336,3 +354,3 @@ return getBucketedVariableValue(

variableSchema,
attributes,
finalAttributes,
bucketValue,

@@ -339,0 +357,0 @@ this.datafileReader,

@@ -1,2 +0,2 @@

import { DatafileContent } from "@featurevisor/types";
import { DatafileContent, Attributes } from "@featurevisor/types";
import { FeaturevisorSDK, ConfigureBucketValue, ActivationCallback } from "./client";

@@ -18,2 +18,3 @@ import { createLogger, Logger } from "./logger";

logger?: Logger;
interceptAttributes?: (attributes: Attributes) => Attributes;
}

@@ -125,2 +126,3 @@

logger,
interceptAttributes: options.interceptAttributes,
});

@@ -145,2 +147,3 @@

logger,
interceptAttributes: options.interceptAttributes,
});

@@ -147,0 +150,0 @@

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