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

@unrevealed/node

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unrevealed/node - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

3

lib/types/UnrevealedClient.d.ts

@@ -26,3 +26,3 @@ import { UnrevealedLogger } from './Logger';

team?: Team;
}): Promise<boolean>;
}): boolean;
getEnabledFeatures({ user, team, }?: {

@@ -43,3 +43,2 @@ user?: User;

private _connect;
private _isFeatureEnabledSync;
private _closeExistingEventSource;

@@ -46,0 +45,0 @@ private _createEventSource;

@@ -60,6 +60,17 @@ "use strict";

isFeatureEnabled(featureKey, { user, team } = {}) {
return __awaiter(this, void 0, void 0, function* () {
yield this._connectionPromise;
return this._isFeatureEnabledSync(featureKey, { user, team });
});
var _a;
const featureAccess = this._featureAccesses.get(featureKey);
if (!featureAccess) {
return (_a = this._defaults.get(featureKey)) !== null && _a !== void 0 ? _a : false;
}
if (featureAccess.fullAccess) {
return true;
}
if (user && featureAccess.userAccess.indexOf(user.id) !== -1) {
return true;
}
if (team && featureAccess.teamAccess.indexOf(team.id) !== -1) {
return true;
}
return false;
}

@@ -69,3 +80,3 @@ getEnabledFeatures({ user, team, } = {}) {

yield this._connectionPromise;
return this._featureKeys.filter((featureKey) => this._isFeatureEnabledSync(featureKey, { user, team }));
return this._featureKeys.filter((featureKey) => this.isFeatureEnabled(featureKey, { user, team }));
});

@@ -178,19 +189,2 @@ }

}
_isFeatureEnabledSync(featureKey, { user, team } = {}) {
var _a;
const featureAccess = this._featureAccesses.get(featureKey);
if (!featureAccess) {
return (_a = this._defaults.get(featureKey)) !== null && _a !== void 0 ? _a : false;
}
if (featureAccess.fullAccess) {
return true;
}
if (user && featureAccess.userAccess.indexOf(user.id) !== -1) {
return true;
}
if (team && featureAccess.teamAccess.indexOf(team.id) !== -1) {
return true;
}
return false;
}
_closeExistingEventSource() {

@@ -197,0 +191,0 @@ var _a;

{
"name": "@unrevealed/node",
"version": "0.0.6",
"version": "0.0.7",
"description": "Unrevealed SDK for Node",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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