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

@codefresh-io/authenticated-entity

Package Overview
Dependencies
Maintainers
25
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codefresh-io/authenticated-entity - npm Package Compare versions

Comparing version 2.9.0 to 2.10.0

10

lib/tests/User.unit.spec.js

@@ -340,12 +340,2 @@ 'use strict';

it('activeAccount should only contain the active account id', () => {
const user = User.constructFromUserEntity(fakeUserData());
const activeAccount = {
name: 'fake-account-name-1',
id: 'fake-accountId-1',
};
user.setActiveAccount(activeAccount.name, activeAccount.id);
expect(user._entity.activeAccount).to.equal(activeAccount.id);
});
it('should set active account when constructing entity from user encoding', () => {

@@ -352,0 +342,0 @@ const user = User.constructFromUserEntity(fakeUserData());

11

lib/User.js

@@ -59,12 +59,7 @@ const _ = require('lodash');

_.set(this, '_entity.activeAccount', id.toString());
_.set(this, '_entity.activeAccount', account);
}
getActiveAccount() {
const activeAccountId = _.get(this, '_entity.activeAccount');
if (!activeAccountId) {
return {};
}
return this.getAccountById(activeAccountId) || {};
return _.get(this, '_entity.activeAccount', {});
}

@@ -77,3 +72,3 @@

getAccountById(id) {
return this._entity.accounts.find(a => a._id === id || a.id === id);
return this._entity.accounts.find(a => a._id === id);
}

@@ -80,0 +75,0 @@

{
"name": "@codefresh-io/authenticated-entity",
"version": "2.9.0",
"version": "2.10.0",
"description": "",

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

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