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

@sap/cds-mtx

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/cds-mtx - npm Package Compare versions

Comparing version 2.6.3 to 2.6.4

7

CHANGELOG.md

@@ -9,2 +9,9 @@ # Change Log

## Version 2.6.4 - 2022-11-17
### Fixed
- Full tenant metadata is stored again when running the subscription from CAP java
- APIs can now be run without express app
- Improved filter for technical tenants when getting all tenant ids
## Version 2.6.3 - 2022-10-18

@@ -11,0 +18,0 @@

20

lib/index.js

@@ -104,9 +104,13 @@ const path = require('path');

function _in(service, app) {
return app ? service.in(app) : service;
}
// temporary fix for payload limit problem
app.use('/mtx/*', express.json({ limit: '500mb' }));
if (app) app.use('/mtx/*', express.json({ limit: '500mb' }));
if (cds.env.mtx && cds.env.mtx.api && cds.env.mtx.api.provisioning) {
Index.logger.debug('Provisioning API configured');
await (Index.provisioning(serveOptions)).in(app);
await (Index.internalProvisioning(serveOptions)).in(app);
await _in(Index.provisioning(serveOptions), app)
await _in(Index.internalProvisioning(serveOptions), app);
}

@@ -116,3 +120,3 @@

Index.logger.debug('Metadata API configured');
await (Index.metadata(serveOptions)).in(app);
await _in(Index.metadata(serveOptions), app);
}

@@ -122,3 +126,3 @@

Index.logger.debug('Model API configured');
await (Index.model(serveOptions)).in(app);
await _in(Index.model(serveOptions), app);
}

@@ -128,3 +132,3 @@

Index.logger.debug('Model Provider API configured');
await (Index.modelprovider(serveOptions)).in(app);
await _in(Index.modelprovider(serveOptions), app);
}

@@ -134,3 +138,3 @@

Index.logger.debug('Diagnosis API configured');
await (Index.diagnose(serveOptions)).in(app);
await _in(Index.diagnose(serveOptions), app);
}

@@ -167,3 +171,3 @@

app.get('/mtx/v1/oauth/token', getJwtToken);
if (app) app.get('/mtx/v1/oauth/token', getJwtToken);
},

@@ -170,0 +174,0 @@

23

lib/services/tenant/index.js

@@ -170,9 +170,15 @@ const cds = require('@sap/cds');

static _tenantFilter(tenantId) {
const t0 = (cds.env.requires.multitenancy && cds.env.requires.multitenancy.t0) || 't0'
return tenantId
&& !META_TENANT_REGEX.test(tenantId)
&& !MT_LIB_TENANT_REGEX.test(tenantId)
&& tenantId.toLowerCase() !== GLOBAL_DATA_META_TENANT.toLowerCase()
&& tenantId !== t0
}
static async getAllWithMetadata() {
const tenantsArray = (await GlobalConnections.applicationDataPersistence.getAllTenants())
.filter(({tenant_id}) =>
!META_TENANT_REGEX.test(tenant_id) &&
!MT_LIB_TENANT_REGEX.test(tenant_id) &&
tenant_id.toLowerCase() !== GLOBAL_DATA_META_TENANT.toLowerCase()
);
.filter(({tenant_id}) => this._tenantFilter(tenant_id));
const tenantToDbDescriminator = tenantsArray.reduce((result, current) => {

@@ -207,8 +213,3 @@ result[current.tenant_id] = `${current.credentials.host}:${current.credentials.port}`;

.map(tenant => tenant.tenant_id)
.filter(tenantId =>
tenantId &&
!META_TENANT_REGEX.test(tenantId) &&
!MT_LIB_TENANT_REGEX.test(tenantId) &&
tenantId.toLowerCase() !== GLOBAL_DATA_META_TENANT.toLowerCase()
);
.filter(this._tenantFilter);
}

@@ -215,0 +216,0 @@

{
"name": "@sap/cds-mtx",
"version": "2.6.3",
"version": "2.6.4",
"homepage": "https://cap.cloud.sap/",

@@ -5,0 +5,0 @@ "author": "SAP SE (https://www.sap.com)",

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