trm-client 4.6.0 → 4.7.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.
package/README.md CHANGED
@@ -5,6 +5,11 @@
5
5
  [![trm-client Latest version](https://img.shields.io/npm/v/trm-client)](https://www.npmjs.com/package/trm-client)
6
6
  [![trm-client Installs](https://img.shields.io/npm/dt/trm-client)](https://www.npmjs.com/package/trm-client)
7
7
 
8
+ | 🚀 This project is funded and maintained by 🏦 | 🔗 |
9
+ |-------------------------------------------------|----------------------------------------------------------------|
10
+ | Regesta S.p.A. | [https://www.regestaitalia.eu/](https://www.regestaitalia.eu/) |
11
+ | Clarex S.r.l. | [https://www.clarex.it/](https://www.clarex.it/) |
12
+
8
13
  This is the official CLI implementation of the core functionalities of TRM.
9
14
 
10
15
  TRM is a software designed to make transports between SAP ECC/S4 systems easy.
package/changelog.txt CHANGED
@@ -8,6 +8,18 @@ Legend
8
8
  + : added
9
9
  - : removed
10
10
 
11
+ 2025-06-03 v4.7.0
12
+ -------------------
13
+
14
+ ! trm-core ^7.0.0
15
+
16
+ 2025-05-29 v4.6.1
17
+ -------------------
18
+
19
+ ! logging error changes
20
+ ! trm-core ^6.9.0
21
+ + landscape transport to list and view command
22
+
11
23
  2025-05-08 v4.6.0
12
24
  -------------------
13
25
 
@@ -27,7 +27,7 @@ function list(commandArgs) {
27
27
  aPackages = aPackages.filter(o => o.registry.getRegistryType() !== trm_core_1.RegistryType.LOCAL);
28
28
  }
29
29
  if (aPackages.length > 0) {
30
- const tableHead = [`Name`, `Version`, `Registry`, `Devclass`, `Import transport`];
30
+ const tableHead = [`Name`, `Version`, `Registry`, `Devclass`, `TRM transport`, `Landscape transport`];
31
31
  var tableData = [];
32
32
  for (const oPackage of aPackages) {
33
33
  try {
@@ -36,6 +36,7 @@ function list(commandArgs) {
36
36
  const registry = oPackage.registry.getRegistryType() === trm_core_1.RegistryType.LOCAL ? chalk_1.default.bold(oPackage.registry.name) : oPackage.registry.name;
37
37
  const devclass = oPackage.getDevclass() || '';
38
38
  const linkedTransport = oPackage.manifest.getLinkedTransport();
39
+ const landscapeTransport = yield oPackage.getWbTransport();
39
40
  var importTransport = '';
40
41
  if (linkedTransport && (yield linkedTransport.isImported())) {
41
42
  importTransport = linkedTransport.trkorr;
@@ -45,7 +46,8 @@ function list(commandArgs) {
45
46
  version,
46
47
  registry,
47
48
  devclass,
48
- importTransport
49
+ importTransport,
50
+ landscapeTransport ? landscapeTransport.trkorr : ''
49
51
  ]);
50
52
  }
51
53
  catch (e) {
@@ -58,10 +58,10 @@ const _printManifestSection = (manifest) => {
58
58
  console.log(`SAP Package: ${manifest.devclass}`);
59
59
  }
60
60
  if (manifest.importTransport !== undefined) {
61
- console.log(`Import transport: ${manifest.importTransport}`);
61
+ console.log(`TRM transport: ${manifest.importTransport}`);
62
62
  }
63
63
  if (manifest.workbenchTransport !== undefined) {
64
- console.log(`Workbench transport: ${manifest.workbenchTransport}`);
64
+ console.log(`Landscape transport (Use this to transport in landscape): ${manifest.workbenchTransport}`);
65
65
  }
66
66
  if (manifest.private !== undefined) {
67
67
  if (manifest.private) {
@@ -174,10 +174,15 @@ function view(commandArgs) {
174
174
  keywords = oSystemManifest.keywords;
175
175
  }
176
176
  var importTransport;
177
+ var workbenchTransport;
177
178
  try {
178
179
  importTransport = oSystemView.manifest.getLinkedTransport().trkorr;
179
180
  }
180
181
  catch (e) { }
182
+ try {
183
+ workbenchTransport = (yield oSystemView.getWbTransport()).trkorr;
184
+ }
185
+ catch (e) { }
181
186
  dependencies = oSystemManifest.dependencies || [];
182
187
  printManifest = {
183
188
  devclass: oSystemView.getDevclass(),
@@ -189,7 +194,8 @@ function view(commandArgs) {
189
194
  license: oSystemManifest.license,
190
195
  authors,
191
196
  keywords,
192
- importTransport
197
+ importTransport,
198
+ workbenchTransport
193
199
  };
194
200
  }
195
201
  else if (oRegistryView) {
@@ -72,5 +72,6 @@ export declare class NoConnection implements ISystemConnector {
72
72
  getAbapgitSource: () => Promise<any>;
73
73
  executePostActivity: () => Promise<any>;
74
74
  readClassDescriptions: () => Promise<any>;
75
- regenProg: () => Promise<any>;
75
+ isServerApisAllowed: () => Promise<any>;
76
+ changeTrOwner: () => Promise<any>;
76
77
  }
@@ -97,7 +97,8 @@ class NoConnection {
97
97
  this.getAbapgitSource = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
98
98
  this.executePostActivity = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
99
99
  this.readClassDescriptions = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
100
- this.regenProg = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
100
+ this.isServerApisAllowed = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
101
+ this.changeTrOwner = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
101
102
  }
102
103
  _throw() {
103
104
  throw new Error(`No connection to SAP server.`);
@@ -47,25 +47,25 @@ function logError(err) {
47
47
  }
48
48
  else if (originalException.name === 'TrmRFCClient') {
49
49
  const rfcClientError = originalException;
50
- if (rfcClientError.rfcError && rfcClientError.rfcError.key) {
51
- if (rfcClientError.rfcError.key[0] === 'Z') {
52
- trm_commons_1.Logger.error(`${rfcClientError.rfcError.key} ${sError}`, true);
50
+ if (rfcClientError.exceptionType) {
51
+ if (rfcClientError.exceptionType[0] === 'Z') {
52
+ trm_commons_1.Logger.error(`${rfcClientError.exceptionType} ${sError}`, true);
53
53
  }
54
54
  else {
55
- sError = `${chalk_1.default.black.bgRed(rfcClientError.rfcError.key)} ${sError}`;
56
- if (rfcClientError.rfcError.key === "TRM_RFC_UNAUTHORIZED") {
57
- sError = chalk_1.default.black.bgRed(`${chalk_1.default.black.bgRed(rfcClientError.rfcError.key)} ${_getUnauthorizedError()}`);
55
+ sError = `${chalk_1.default.black.bgRed(rfcClientError.exceptionType)} ${sError}`;
56
+ if (rfcClientError.exceptionType === "TRM_RFC_UNAUTHORIZED") {
57
+ sError = chalk_1.default.black.bgRed(`${chalk_1.default.black.bgRed(rfcClientError.exceptionType)} ${_getUnauthorizedError()}`);
58
58
  }
59
59
  }
60
60
  }
61
61
  }
62
62
  else if (originalException.name === 'TrmRESTClient') {
63
63
  const restClientError = originalException;
64
+ if (restClientError.exceptionType == "TRM_RFC_UNAUTHORIZED") {
65
+ aError.push(chalk_1.default.black.bgRed(`${chalk_1.default.black.bgRed(restClientError.restError.status)} ${_getUnauthorizedError()}`));
66
+ }
64
67
  if (restClientError.restError) {
65
- if (restClientError.restError.status === 401) {
66
- aError.push(chalk_1.default.black.bgRed(`${chalk_1.default.black.bgRed(restClientError.restError.status)} ${_getUnauthorizedError()}`));
67
- }
68
- else if (restClientError.restError.status === 404) {
68
+ if (restClientError.restError.status === 404) {
69
69
  aError.push(`${chalk_1.default.black.bgRed(restClientError.restError.status)} Service cannot be reached (Check if trm-rest is installed and activated correctly).`);
70
70
  }
71
71
  sError = `${chalk_1.default.black.bgRed(restClientError.restError.status)} ${sError}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trm-client",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
4
4
  "description": "TRM (Transport Request Manager) Client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -45,7 +45,7 @@
45
45
  "ini": "^4.1.1",
46
46
  "semver": "^7.5.4",
47
47
  "trm-commons": "^1.0.0",
48
- "trm-core": "^6.8.0",
48
+ "trm-core": "^7.0.0",
49
49
  "trm-registry-types": "^1.2.0",
50
50
  "xml2js": "^0.6.2"
51
51
  },