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

@ndustrial/contxt-sdk

Package Overview
Dependencies
Maintainers
16
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndustrial/contxt-sdk - npm Package Compare versions

Comparing version 2.13.0 to 2.13.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## [v2.13.1](http://github.com/ndustrialio/contxt-sdk-js/tree/v2.13.1) (2020-04-16)
**Fixed**
- Fixed `Coordinator.organizations#getAll` to work with the access endpoints when an organizationId has been selected
## [v2.12.0](http://github.com/ndustrialio/contxt-sdk-js/tree/v2.12.0) (2020-03-13)

@@ -2,0 +8,0 @@

11

esm/coordinator/index.js

@@ -34,2 +34,3 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

this._accessBaseUrl = null;
this._accessTenantBaseUrl = null;
this._deployBaseUrl = null;

@@ -63,4 +64,6 @@ this._organizationId = null;

this._accessBaseUrl = this._organizationId ? this._sdk.config.audiences.coordinator.host + '/access/v1/' + this._organizationId : null;
this._accessBaseUrl = this._organizationId ? this._sdk.config.audiences.coordinator.host + '/access/v1' : null;
this._accessTenantBaseUrl = this._organizationId ? this._sdk.config.audiences.coordinator.host + '/access/v1/' + this._organizationId : null;
this._deployBaseUrl = this._organizationId ? this._sdk.config.audiences.coordinator.host + '/deploy/v1/' + this._organizationId : null;

@@ -72,5 +75,5 @@

this.organizations = new Organizations(this._sdk, this._request, this._accessBaseUrl || this._baseUrl, this._organizationId);
this.permissions = new Permissions(this._sdk, this._request, this._accessBaseUrl || this._baseUrl, this._organizationId);
this.roles = new Roles(this._sdk, this._request, this._accessBaseUrl || this._baseUrl, this._organizationId);
this.users = new Users(this._sdk, this._request, this._accessBaseUrl || this._baseUrl, this._organizationId);
this.permissions = new Permissions(this._sdk, this._request, this._accessTenantBaseUrl || this._baseUrl, this._organizationId);
this.roles = new Roles(this._sdk, this._request, this._accessTenantBaseUrl || this._baseUrl, this._organizationId);
this.users = new Users(this._sdk, this._request, this._accessTenantBaseUrl || this._baseUrl, this._organizationId);
}

@@ -77,0 +80,0 @@ }]);

@@ -65,3 +65,3 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

if (this._organizationId) {
return this._request.get('' + this._baseUrl).then(function (org) {
return this._request.get(this._baseUrl + '/' + this._organizationId).then(function (org) {
return toCamelCase(org);

@@ -68,0 +68,0 @@ });

@@ -61,2 +61,3 @@ 'use strict';

this._accessBaseUrl = null;
this._accessTenantBaseUrl = null;
this._deployBaseUrl = null;

@@ -90,4 +91,6 @@ this._organizationId = null;

this._accessBaseUrl = this._organizationId ? this._sdk.config.audiences.coordinator.host + '/access/v1/' + this._organizationId : null;
this._accessBaseUrl = this._organizationId ? this._sdk.config.audiences.coordinator.host + '/access/v1' : null;
this._accessTenantBaseUrl = this._organizationId ? this._sdk.config.audiences.coordinator.host + '/access/v1/' + this._organizationId : null;
this._deployBaseUrl = this._organizationId ? this._sdk.config.audiences.coordinator.host + '/deploy/v1/' + this._organizationId : null;

@@ -99,5 +102,5 @@

this.organizations = new _organizations2.default(this._sdk, this._request, this._accessBaseUrl || this._baseUrl, this._organizationId);
this.permissions = new _permissions2.default(this._sdk, this._request, this._accessBaseUrl || this._baseUrl, this._organizationId);
this.roles = new _roles2.default(this._sdk, this._request, this._accessBaseUrl || this._baseUrl, this._organizationId);
this.users = new _users2.default(this._sdk, this._request, this._accessBaseUrl || this._baseUrl, this._organizationId);
this.permissions = new _permissions2.default(this._sdk, this._request, this._accessTenantBaseUrl || this._baseUrl, this._organizationId);
this.roles = new _roles2.default(this._sdk, this._request, this._accessTenantBaseUrl || this._baseUrl, this._organizationId);
this.users = new _users2.default(this._sdk, this._request, this._accessTenantBaseUrl || this._baseUrl, this._organizationId);
}

@@ -104,0 +107,0 @@ }]);

@@ -70,3 +70,3 @@ 'use strict';

if (this._organizationId) {
return this._request.get('' + this._baseUrl).then(function (org) {
return this._request.get(this._baseUrl + '/' + this._organizationId).then(function (org) {
return (0, _objects.toCamelCase)(org);

@@ -73,0 +73,0 @@ });

{
"name": "@ndustrial/contxt-sdk",
"version": "2.13.0",
"version": "2.13.1",
"description": "",

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

@@ -27,2 +27,3 @@ import Applications from './applications';

this._accessBaseUrl = null;
this._accessTenantBaseUrl = null;
this._deployBaseUrl = null;

@@ -53,2 +54,6 @@ this._organizationId = null;

this._accessBaseUrl = this._organizationId
? `${this._sdk.config.audiences.coordinator.host}/access/v1`
: null;
this._accessTenantBaseUrl = this._organizationId
? `${this._sdk.config.audiences.coordinator.host}/access/v1/${

@@ -92,3 +97,3 @@ this._organizationId

this._request,
this._accessBaseUrl || this._baseUrl,
this._accessTenantBaseUrl || this._baseUrl,
this._organizationId

@@ -99,3 +104,3 @@ );

this._request,
this._accessBaseUrl || this._baseUrl,
this._accessTenantBaseUrl || this._baseUrl,
this._organizationId

@@ -106,3 +111,3 @@ );

this._request,
this._accessBaseUrl || this._baseUrl,
this._accessTenantBaseUrl || this._baseUrl,
this._organizationId

@@ -109,0 +114,0 @@ );

@@ -55,2 +55,6 @@ import Applications from './applications';

it('sets the access tenant base url to null', function() {
expect(coordinator._accessTenantBaseUrl).to.equal(null);
});
it('sets the deploy base url to null', function() {

@@ -138,2 +142,5 @@ expect(coordinator._deployBaseUrl).to.equal(null);

expect(coordinator._accessBaseUrl).to.equal(
`${baseSdk.config.audiences.coordinator.host}/access/v1`
);
expect(coordinator._accessTenantBaseUrl).to.equal(
`${baseSdk.config.audiences.coordinator.host}/access/v1/${

@@ -185,5 +192,3 @@ organization.id

expect(coordinator.organizations._baseUrl).to.equal(
`${baseSdk.config.audiences.coordinator.host}/access/v1/${
organization.id
}`
`${baseSdk.config.audiences.coordinator.host}/access/v1`
);

@@ -239,2 +244,3 @@ expect(coordinator.organizations._organizationId).to.equal(

expect(coordinator._accessBaseUrl).to.equal(null);
expect(coordinator._accessTenantBaseUrl).to.equal(null);
expect(coordinator._deployBaseUrl).to.equal(null);

@@ -241,0 +247,0 @@ });

@@ -53,3 +53,3 @@ import { toCamelCase } from '../utils/objects';

return this._request
.get(`${this._baseUrl}`)
.get(`${this._baseUrl}/${this._organizationId}`)
.then((org) => toCamelCase(org));

@@ -56,0 +56,0 @@ }

@@ -210,3 +210,5 @@ import Organizations from './organizations';

it('gets the organization from the server and does not use the organization ID provided', function() {
expect(request.get).to.be.calledWith(`${expectedHost}`);
expect(request.get).to.be.calledWith(
`${expectedHost}/${expectedOrganizationId}`
);
});

@@ -235,3 +237,5 @@

it('gets the organization from the server', function() {
expect(request.get).to.be.calledWith(`${expectedHost}`);
expect(request.get).to.be.calledWith(
`${expectedHost}/${expectedOrganizationId}`
);
});

@@ -238,0 +242,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