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.4.8 to 2.4.9

36

lib/tests/User.unit.spec.js

@@ -38,2 +38,4 @@ 'use strict';

teams: ['fake-team-id-2', 'fake-team-id-1'],
trial: 'fake-trial',
segment: 'fake-segment'
},

@@ -48,3 +50,5 @@ {

type: 'enterprise',
teams: ['fake-team-id-3', 'fake-team-id-4']
teams: ['fake-team-id-3', 'fake-team-id-4'],
trial: 'fake-trial',
segment: 'fake-segment'
}

@@ -54,4 +58,4 @@ ]

}
const encodedFakeUser = 'eyJ0eXBlIjoidXNlciIsIm5hbWUiOiJmYWtlLXVzZXJOYW1lIiwiX2lkIjoiZmFrZS11c2VyLWlkLTEiLCJhY2NvdW50cyI6W3sibmFtZSI6ImZha2UtYWNjb3VudC1uYW1lLTEiLCJfaWQiOiJmYWtlLWFjY291bnRJZC0xIiwiaXNBZG1pbiI6dHJ1ZSwiYWRtaW5UZWFtIjoiMTIzNCIsInRlYW1zIjpbImZha2UtdGVhbS1pZC0yIiwiZmFrZS10ZWFtLWlkLTEiXSwicGF5bWVudFBsYW4iOiJmYWtlLWFjY291bnQtcGxhbi0xIiwic3VwcG9ydFBsYW4iOiJmYWtlLXN1cHBvcnQtcGxhbi0xIiwidHlwZSI6ImVudGVycHJpc2UifSx7Im5hbWUiOiJmYWtlLWFjY291bnQtbmFtZS0yIiwiX2lkIjoiZmFrZS1hY2NvdW50SWQtMiIsImlzQWRtaW4iOmZhbHNlLCJhZG1pblRlYW0iOiIxMjM0NSIsInRlYW1zIjpbImZha2UtdGVhbS1pZC0zIiwiZmFrZS10ZWFtLWlkLTQiXSwicGF5bWVudFBsYW4iOiJmYWtlLWFjY291bnQtcGxhbi0yIiwic3VwcG9ydFBsYW4iOiJmYWtlLXN1cHBvcnQtcGxhbi0yIiwidHlwZSI6ImVudGVycHJpc2UifV19';
const generatedHasFakeUser = 'fef08eec5630c79970e886542aae9aa95c6de624c372e72f25cc6737623e04f5';
const encodedFakeUser = 'eyJ0eXBlIjoidXNlciIsIm5hbWUiOiJmYWtlLXVzZXJOYW1lIiwiX2lkIjoiZmFrZS11c2VyLWlkLTEiLCJhY2NvdW50cyI6W3sibmFtZSI6ImZha2UtYWNjb3VudC1uYW1lLTEiLCJfaWQiOiJmYWtlLWFjY291bnRJZC0xIiwiaXNBZG1pbiI6dHJ1ZSwiYWRtaW5UZWFtIjoiMTIzNCIsInRlYW1zIjpbImZha2UtdGVhbS1pZC0yIiwiZmFrZS10ZWFtLWlkLTEiXSwicGF5bWVudFBsYW4iOiJmYWtlLWFjY291bnQtcGxhbi0xIiwic3VwcG9ydFBsYW4iOiJmYWtlLXN1cHBvcnQtcGxhbi0xIiwidHlwZSI6ImVudGVycHJpc2UiLCJ0cmlhbCI6ImZha2UtdHJpYWwiLCJzZWdtZW50IjoiZmFrZS1zZWdtZW50In0seyJuYW1lIjoiZmFrZS1hY2NvdW50LW5hbWUtMiIsIl9pZCI6ImZha2UtYWNjb3VudElkLTIiLCJpc0FkbWluIjpmYWxzZSwiYWRtaW5UZWFtIjoiMTIzNDUiLCJ0ZWFtcyI6WyJmYWtlLXRlYW0taWQtMyIsImZha2UtdGVhbS1pZC00Il0sInBheW1lbnRQbGFuIjoiZmFrZS1hY2NvdW50LXBsYW4tMiIsInN1cHBvcnRQbGFuIjoiZmFrZS1zdXBwb3J0LXBsYW4tMiIsInR5cGUiOiJlbnRlcnByaXNlIiwidHJpYWwiOiJmYWtlLXRyaWFsIiwic2VnbWVudCI6ImZha2Utc2VnbWVudCJ9XX0=';
const generatedHasFakeUser = '5eef6d67580e49106f6805395ee7a5831b4c83d745901642a0be97d86e3e78c2';

@@ -70,3 +74,5 @@ const jsonValidUser = {

'type': 'enterprise',
'teams': ['fake-team-id-2', 'fake-team-id-1']
'teams': ['fake-team-id-2', 'fake-team-id-1'],
'trial': 'fake-trial',
'segment': 'fake-segment'
},

@@ -81,3 +87,5 @@ {

'type': 'enterprise',
'teams': ['fake-team-id-3', 'fake-team-id-4']
'teams': ['fake-team-id-3', 'fake-team-id-4'],
'trial': 'fake-trial',
'segment': 'fake-segment'
}

@@ -150,2 +158,4 @@ ],

id: 'fake-accountId-1',
trial: 'fake-trial',
segment: 'fake-segment'
}

@@ -172,3 +182,5 @@ });

'type': 'enterprise',
'teams': ['fake-team-id-2', 'fake-team-id-1']
'teams': ['fake-team-id-2', 'fake-team-id-1'],
'trial': 'fake-trial',
'segment': 'fake-segment'
});

@@ -193,3 +205,5 @@ });

'type': 'enterprise',
'teams': ['fake-team-id-2', 'fake-team-id-1']
'teams': ['fake-team-id-2', 'fake-team-id-1'],
'trial': 'fake-trial',
'segment': 'fake-segment'
});

@@ -240,3 +254,3 @@ });

expect((User.constructFromUserEntity(fakeUserData())).toString())
.to.be.equal(`{"type":"user","name":"fake-userName","_id":"fake-user-id-1","accounts":[{"name":"fake-account-name-1","_id":"fake-accountId-1","isAdmin":true,"adminTeam":"1234","teams":["fake-team-id-2","fake-team-id-1"],"paymentPlan":"fake-account-plan-1","supportPlan":"fake-support-plan-1","type":"enterprise"},{"name":"fake-account-name-2","_id":"fake-accountId-2","isAdmin":false,"adminTeam":"12345","teams":["fake-team-id-3","fake-team-id-4"],"paymentPlan":"fake-account-plan-2","supportPlan":"fake-support-plan-2","type":"enterprise"}]}`);
.to.be.equal(`{"type":"user","name":"fake-userName","_id":"fake-user-id-1","accounts":[{"name":"fake-account-name-1","_id":"fake-accountId-1","isAdmin":true,"adminTeam":"1234","teams":["fake-team-id-2","fake-team-id-1"],"paymentPlan":"fake-account-plan-1","supportPlan":"fake-support-plan-1","type":"enterprise","trial":"fake-trial","segment":"fake-segment"},{"name":"fake-account-name-2","_id":"fake-accountId-2","isAdmin":false,"adminTeam":"12345","teams":["fake-team-id-3","fake-team-id-4"],"paymentPlan":"fake-account-plan-2","supportPlan":"fake-support-plan-2","type":"enterprise","trial":"fake-trial","segment":"fake-segment"}]}`);
});

@@ -294,2 +308,4 @@

type: 'enterprise',
trial: 'fake-trial',
segment: 'fake-segment'
});

@@ -312,2 +328,4 @@ });

type: 'enterprise',
trial: 'fake-trial',
segment: 'fake-segment'
});

@@ -338,2 +356,4 @@ });

},
trial: 'fake-trial',
segment: 'fake-segment'
});

@@ -340,0 +360,0 @@ });

@@ -50,3 +50,5 @@ const _ = require('lodash');

supportPlan: account.supportPlan,
...(account.type && { type: account.type })
...(account.type && { type: account.type }),
...(account.trial && { trial: account.trial }),
...(account.segment && { segment: account.segment })
};

@@ -68,2 +70,4 @@ })

const type = account.type;
const trial = account.trial;
const segment = account.segment;
const activeAccount = {

@@ -75,2 +79,4 @@ name,

...(type && { type }),
...(trial && { trial }),
...(segment && { segment }),
...(features && { features })

@@ -77,0 +83,0 @@ };

{
"name": "@codefresh-io/authenticated-entity",
"version": "2.4.8",
"version": "2.4.9",
"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