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

@cap-js-community/mtx-tool

Package Overview
Dependencies
Maintainers
7
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cap-js-community/mtx-tool - npm Package Compare versions

Comparing version 0.7.16 to 0.7.17

6

package.json
{
"name": "@cap-js-community/mtx-tool",
"version": "0.7.16",
"version": "0.7.17",
"description": "Multitenancy and Extensibility Tool is a cli to reduce operational overhead for multitenant Cloud Foundry applications",

@@ -47,4 +47,4 @@ "bin": {

"jest": "^29.7.0",
"nock": "^13.4.0",
"prettier": "^3.2.1",
"nock": "^13.5.0",
"prettier": "^3.2.4",
"typescript": "^5.3.3"

@@ -51,0 +51,0 @@ },

@@ -50,12 +50,13 @@ "use strict";

=== cap multitenancy (cds) ===
~ cdsl --cds-list [TENANT] list all cds-mtx tenant names
~ cdsll --cds-long-list [TENANT] long list all cds-mtx tenants
cdsot --cds-onboard-tenant TENANT_ID SUBDOMAIN onboard specific tenant
cdsut --cds-upgrade-tenant TENANT_ID upgrade specific tenant
cdsua --cds-upgrade-all upgrade all tenants
* --cds-offboard-tenant TENANT_ID offboard specific tenant
* --cds-offboard-all offboard all tenants
... [TENANT] filter list for tenant id or subdomain
... --auto-undeploy upgrade with auto undeploy
... --time list includes timestamps
~ cdsl --cds-list [TENANT] list all cds-mtx tenant names
~ cdsll --cds-long-list [TENANT] long list all cds-mtx tenants
cdsot --cds-onboard-tenant TENANT_ID [METADATA] onboard specific tenant
cdsut --cds-upgrade-tenant TENANT_ID upgrade specific tenant
cdsua --cds-upgrade-all upgrade all tenants
* --cds-offboard-tenant TENANT_ID offboard specific tenant
* --cds-offboard-all offboard all tenants
... [METADATA] onboard subscription metadata
... [TENANT] filter list for tenant id or subdomain
... --auto-undeploy upgrade with auto undeploy
... --time list includes timestamps

@@ -62,0 +63,0 @@ === hana management (hdi) ===

@@ -22,2 +22,3 @@ "use strict";

PARAMS: "PARAMS",
METADATA: "METADATA",
});

@@ -151,3 +152,4 @@

commandVariants: ["cdsot", "--cds-onboard-tenant"],
requiredPassArgs: [PASS_ARG.TENANT_ID, PASS_ARG.SUBDOMAIN],
requiredPassArgs: [PASS_ARG.TENANT_ID],
optionalPassArgs: [PASS_ARG.METADATA],
callback: cds.cdsOnboardTenant,

@@ -154,0 +156,0 @@ },

@@ -16,2 +16,3 @@ "use strict";

formatTimestampsWithRelativeDays,
isObject,
} = require("../shared/static");

@@ -103,3 +104,3 @@ const { assert, assertAll } = require("../shared/error");

const _cdsOnboard = async (context, tenantId, subdomain) => {
const _cdsOnboard = async (context, tenantId, metadata = {}) => {
const { cfRouteUrl } = await context.getCdsInfo();

@@ -116,10 +117,15 @@ await request({

},
body: JSON.stringify({ subscribedSubdomain: subdomain, eventType: "CREATE" }),
body: JSON.stringify({ ...metadata, eventType: "CREATE" }),
});
};
const cdsOnboardTenant = async (context, [tenantId, subdomain]) => {
const cdsOnboardTenant = async (context, [tenantId, rawMetadata]) => {
let metadata;
assert(isUUID(tenantId), "TENANT_ID is not a uuid", tenantId);
assert(isDashedWord(subdomain), "SUBDOMAIN is not a valid subdomain", subdomain);
return _cdsOnboard(context, tenantId, subdomain);
if (rawMetadata) {
metadata = tryJsonParse(rawMetadata);
assert(isObject(metadata), "METADATA is not a JSON object");
console.log("using onboarding metadata: %O", metadata);
}
return _cdsOnboard(context, tenantId, metadata);
};

@@ -126,0 +132,0 @@

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