@nmshd/connector-tui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
export function AddConnectorInfo(Base) {
|
|
3
|
+
return class ConnectorInfo extends Base {
|
|
4
|
+
constructor(...args) {
|
|
5
|
+
super(...args);
|
|
6
|
+
this.choices.push({ title: "Connector Info", value: this.connectorInfo });
|
|
7
|
+
}
|
|
8
|
+
async connectorInfo() {
|
|
9
|
+
const connectorInfo = await this.connectorClient.monitoring.getSupport();
|
|
10
|
+
const transportLibrary = connectorInfo.configuration["transportLibrary"];
|
|
11
|
+
const moduleConfig = connectorInfo.configuration.modules;
|
|
12
|
+
const enabledModules = Object.values(moduleConfig)
|
|
13
|
+
.filter((module) => module.enabled)
|
|
14
|
+
.map((module) => module.displayName)
|
|
15
|
+
.sort()
|
|
16
|
+
.join(", ");
|
|
17
|
+
console.log(`Health: ${connectorInfo.health.isHealthy ? chalk.green("Healthy") : chalk.red("Unhealthy")}
|
|
18
|
+
Backbone
|
|
19
|
+
BaseUrl: ${chalk.yellow(transportLibrary.baseUrl)}
|
|
20
|
+
ClientId: ${chalk.yellow(transportLibrary.platformClientId)}
|
|
21
|
+
Identity Info
|
|
22
|
+
Address: ${chalk.yellow(connectorInfo.identityInfo.address)}
|
|
23
|
+
Public Key: ${chalk.yellow(connectorInfo.identityInfo.publicKey)}
|
|
24
|
+
Enabled Modules: ${chalk.yellow(enabledModules)}
|
|
25
|
+
`);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ConnectorTUIBase } from "../ConnectorTUIBase.js";
|
|
2
|
-
import { AddAcceptPendingRelationships, AddAcceptPendingRequests, AddCreateAndShowTemplate, AddExit, AddGetAttributesOfRelationship, AddSendMail, AddSendRequestByMessage, AddShareRequestByTemplate, AddSync, AddUploadFile, } from "./index.js";
|
|
2
|
+
import { AddAcceptPendingRelationships, AddAcceptPendingRequests, AddConnectorInfo, AddCreateAndShowTemplate, AddExit, AddGetAttributesOfRelationship, AddSendMail, AddSendRequestByMessage, AddShareRequestByTemplate, AddSync, AddUploadFile, } from "./index.js";
|
|
3
3
|
export class ConnectorTUIBaseWithMixins
|
|
4
4
|
//
|
|
5
|
-
extends AddExit(AddCreateAndShowTemplate(AddAcceptPendingRelationships(AddAcceptPendingRequests(AddGetAttributesOfRelationship(AddSendMail(AddSendRequestByMessage(AddShareRequestByTemplate(AddSync(AddUploadFile(
|
|
5
|
+
extends AddExit(AddConnectorInfo(AddCreateAndShowTemplate(AddAcceptPendingRelationships(AddAcceptPendingRequests(AddGetAttributesOfRelationship(AddSendMail(AddSendRequestByMessage(AddShareRequestByTemplate(AddSync(AddUploadFile(
|
|
6
6
|
//
|
|
7
|
-
ConnectorTUIBase)))))))))) {
|
|
7
|
+
ConnectorTUIBase))))))))))) {
|
|
8
8
|
}
|
package/dist/mixins/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./AddAcceptPendingRelationships.js";
|
|
2
2
|
export * from "./AddAcceptPendingRequests.js";
|
|
3
|
+
export * from "./AddConnectorInfo.js";
|
|
3
4
|
export * from "./AddCreateAndShowTemplate.js";
|
|
4
5
|
export * from "./AddExit.js";
|
|
5
6
|
export * from "./AddGetAttributesOfRelationship.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmshd/connector-tui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"repository": "github:nmshd/connector-tui",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "j&s-soft GmbH",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"lint:eslint": "eslint --ext .ts ./src",
|
|
22
22
|
"lint:prettier": "prettier --check ./src",
|
|
23
23
|
"start": "node --loader ts-node/esm src/index.ts",
|
|
24
|
+
"watch": "node --watch --loader ts-node/esm src/index.ts",
|
|
24
25
|
"test": "echo 'no test specified'"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|