trm-client 7.2.2 → 7.3.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/changelog.txt CHANGED
@@ -8,6 +8,10 @@ Legend
8
8
  + : added
9
9
  - : removed
10
10
 
11
+ 2026-02-16 v7.3.0
12
+ -------------------
13
+ ! trm-core ^8.2.3
14
+
11
15
  2025-11-16 v7.2.1
12
16
  -------------------
13
17
  * install transport generation default
@@ -398,7 +398,7 @@ class AbstractCommand {
398
398
  else {
399
399
  system = (yield (0, prompts_1.connect)(this.args, true, this.registerOpts.addNoConnection)).getSystemConnector();
400
400
  }
401
- yield system.connect();
401
+ yield system.connect(false);
402
402
  Core.SystemConnector.systemConnector = system;
403
403
  yield Commons.Plugin.call("client", "onInitializeSystemConnector", Core.SystemConnector.systemConnector);
404
404
  if (this.registerOpts.requiresTrmDependencies) {
@@ -47,7 +47,7 @@ class Alias extends AbstractCommand_1.AbstractCommand {
47
47
  trm_commons_1.Logger.loading(`Checking connection with alias "${alias.alias}"...`);
48
48
  const oSystemAlias = new systemAlias_1.SystemAlias(alias.type, alias.data);
49
49
  try {
50
- yield oSystemAlias.getConnection().connect();
50
+ yield oSystemAlias.getConnection().connect(false);
51
51
  trm_commons_1.Logger.success(`Connection to alias "${alias.alias}" OK.`);
52
52
  }
53
53
  catch (e) {
@@ -67,7 +67,7 @@ class Alias extends AbstractCommand_1.AbstractCommand {
67
67
  const newData = connectionArgs.getData();
68
68
  try {
69
69
  systemAlias_1.SystemAlias.delete(alias.alias);
70
- yield systemAlias_1.SystemAlias.create(alias.alias, connectionArgs.name, newData).getConnection().connect();
70
+ yield systemAlias_1.SystemAlias.create(alias.alias, connectionArgs.name, newData).getConnection().connect(false);
71
71
  }
72
72
  catch (e) {
73
73
  connectionSuccess = false;
@@ -44,7 +44,7 @@ class Compare extends AbstractCommand_1.AbstractCommand {
44
44
  if (askConnection) {
45
45
  const connectArgs = yield (0, prompts_1.connect)({}, false, false);
46
46
  const systemConnector = connectArgs.getSystemConnector();
47
- yield systemConnector.connect();
47
+ yield systemConnector.connect(false);
48
48
  this.connections.push(systemConnector);
49
49
  return true;
50
50
  }
@@ -8,11 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.FindDependencies = void 0;
13
16
  const trm_commons_1 = require("trm-commons");
14
- const trm_core_1 = require("trm-core");
15
17
  const AbstractCommand_1 = require("../AbstractCommand");
18
+ const trm_core_1 = require("trm-core");
19
+ const chalk_1 = __importDefault(require("chalk"));
16
20
  class FindDependencies extends AbstractCommand_1.AbstractCommand {
17
21
  init() {
18
22
  this.registerOpts.requiresConnection = true;
@@ -23,19 +27,96 @@ class FindDependencies extends AbstractCommand_1.AbstractCommand {
23
27
  }
24
28
  handler() {
25
29
  return __awaiter(this, void 0, void 0, function* () {
26
- trm_commons_1.Logger.loading(`Searching for dependencies in package "${this.args.sapPackage}"...`);
27
- yield (0, trm_core_1.findDependencies)({
28
- contextData: {
29
- noInquirer: !this.args.prompts
30
- },
31
- packageData: {
32
- package: this.args.sapPackage
33
- },
34
- printOptions: {
35
- trmDependencies: true,
36
- sapObjectDependencies: this.args.sapEntries
30
+ trm_commons_1.Logger.loading(`Searching for dependencies in package "${this.args.sapPackage.toUpperCase()}"...`);
31
+ const dependencies = yield trm_core_1.SystemConnector.getPackageDependencies(this.args.sapPackage.toUpperCase(), true, true);
32
+ const trmPackageDependencies = dependencies.trmPackageDependencies;
33
+ const sapPackageDependencies = dependencies.abapPackageDependencies.filter(o => !o.isCustomerPackage);
34
+ const custPackageDependencies = dependencies.abapPackageDependencies.filter(o => o.isCustomerPackage);
35
+ var tree = {
36
+ text: `${chalk_1.default.bold(this.args.sapPackage.toUpperCase())} dependencies`,
37
+ children: [{
38
+ text: `TRM Packages (${trmPackageDependencies.length})`,
39
+ children: trmPackageDependencies.map(o => {
40
+ return {
41
+ text: `${o.trmPackage.packageName}`,
42
+ children: [{
43
+ text: `Registry: ${o.trmPackage.registry.getRegistryType() === trm_core_1.RegistryType.PUBLIC ? 'public' : o.trmPackage.registry.endpoint}`,
44
+ children: []
45
+ }, {
46
+ text: `Version: ^${o.trmPackage.manifest.get().version}`,
47
+ children: []
48
+ }]
49
+ };
50
+ })
51
+ }, {
52
+ text: `Customer packages (${custPackageDependencies.length})`,
53
+ children: custPackageDependencies.map(o => {
54
+ return {
55
+ text: `${o.abapPackage}`,
56
+ children: o.entries.map(t => {
57
+ return {
58
+ text: t.tableName,
59
+ children: t.dependency.map(k => {
60
+ return {
61
+ text: Object.entries(k.tableKey).map(([key, value]) => `${chalk_1.default.bold(key)}: ${value}`).join(', '),
62
+ children: [{
63
+ text: `Dependency found in ${k.foundIn.length} object${k.foundIn.length > 1 ? 's' : ''}`,
64
+ children: k.foundIn.map(f => {
65
+ return {
66
+ text: `${chalk_1.default.bold(f.object)} ${f.objName}`,
67
+ children: []
68
+ };
69
+ })
70
+ }]
71
+ };
72
+ })
73
+ };
74
+ })
75
+ };
76
+ })
77
+ }]
78
+ };
79
+ if (this.args.sapEntries) {
80
+ tree.children.push({
81
+ text: `SAP packages (${sapPackageDependencies.length})`,
82
+ children: sapPackageDependencies.map(o => {
83
+ return {
84
+ text: `${o.abapPackage}`,
85
+ children: o.entries.map(t => {
86
+ return {
87
+ text: chalk_1.default.underline(t.tableName),
88
+ children: t.dependency.map(k => {
89
+ return {
90
+ text: Object.entries(k.tableKey).map(([key, value]) => `${chalk_1.default.bold(key)}: ${value}`).join(', '),
91
+ children: [{
92
+ text: `Dependency found in ${k.foundIn.length} object${k.foundIn.length > 1 ? 's' : ''}`,
93
+ children: k.foundIn.map(f => {
94
+ return {
95
+ text: `${chalk_1.default.bold(f.object)} ${f.objName}`,
96
+ children: []
97
+ };
98
+ })
99
+ }]
100
+ };
101
+ })
102
+ };
103
+ })
104
+ };
105
+ })
106
+ });
107
+ }
108
+ else {
109
+ if (sapPackageDependencies.length > 0) {
110
+ tree.children.push({
111
+ text: `SAP packages (${sapPackageDependencies.length})`,
112
+ children: [{
113
+ text: `Run with flag --sap-entries to view dependencies`,
114
+ children: []
115
+ }]
116
+ });
37
117
  }
38
- });
118
+ }
119
+ trm_commons_1.Logger.tree(tree);
39
120
  });
40
121
  }
41
122
  }
@@ -23,7 +23,7 @@ function createAlias(alias) {
23
23
  trm_commons_1.Logger.loading(`Connecting to "${alias}"...`);
24
24
  var connectionSuccess = true;
25
25
  try {
26
- yield connection.getSystemConnector().connect();
26
+ yield connection.getSystemConnector().connect(true);
27
27
  }
28
28
  catch (e) {
29
29
  connectionSuccess = false;
@@ -76,4 +76,16 @@ export declare class DummyConnector implements ISystemConnector {
76
76
  isServerApisAllowed: () => Promise<any>;
77
77
  changeTrOwner: () => Promise<any>;
78
78
  getWbTransports: () => Promise<any>;
79
+ getNewConnection: () => DummyConnector;
80
+ createLogPolling: () => Promise<any>;
81
+ deleteLogPolling: () => Promise<any>;
82
+ readLogPolling: () => Promise<any>;
83
+ getLogPollingStatus: () => Promise<any>;
84
+ getLogPollingList: () => Promise<any>;
85
+ getLogPollingResult: () => Promise<any>;
86
+ getLogPollingError: () => Promise<any>;
87
+ getPackageDependencies: () => Promise<any>;
88
+ getObjectDependencies: () => Promise<any>;
89
+ getTableKeys: () => Promise<any>;
90
+ getRootDevclass: () => Promise<any>;
79
91
  }
@@ -101,6 +101,20 @@ class DummyConnector {
101
101
  this.isServerApisAllowed = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
102
102
  this.changeTrOwner = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
103
103
  this.getWbTransports = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
104
+ this.getNewConnection = () => {
105
+ return new DummyConnector();
106
+ };
107
+ this.createLogPolling = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
108
+ this.deleteLogPolling = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
109
+ this.readLogPolling = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
110
+ this.getLogPollingStatus = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
111
+ this.getLogPollingList = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
112
+ this.getLogPollingResult = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
113
+ this.getLogPollingError = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
114
+ this.getPackageDependencies = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
115
+ this.getObjectDependencies = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
116
+ this.getTableKeys = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
117
+ this.getRootDevclass = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
104
118
  }
105
119
  _throw() {
106
120
  throw new Error(`No connection to SAP server.`);
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getClientNodeDependencies = getClientNodeDependencies;
4
- const getNodePackage_1 = require("./getNodePackage");
4
+ const trm_core_1 = require("trm-core");
5
5
  function getClientNodeDependencies() {
6
- const trmClientPackage = (0, getNodePackage_1.getNodePackage)();
6
+ const trmClientPackage = (0, trm_core_1.getNodePackage)("trm-client");
7
7
  return trmClientPackage.dependencies || {};
8
8
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getClientVersion = getClientVersion;
4
- const getNodePackage_1 = require("./getNodePackage");
4
+ const trm_core_1 = require("trm-core");
5
5
  function getClientVersion() {
6
- const trmClientPackage = (0, getNodePackage_1.getNodePackage)();
6
+ const trmClientPackage = (0, trm_core_1.getNodePackage)("trm-client");
7
7
  return trmClientPackage.version;
8
8
  }
@@ -4,7 +4,6 @@ export * from "./xml2js";
4
4
  export * from "./getSapLogonConnections";
5
5
  export * from "./logError";
6
6
  export * from "./checkCliUpdate";
7
- export * from "./getNodePackage";
8
7
  export * from "./getClientVersion";
9
8
  export * from "./getTempFolder";
10
9
  export * from "./getLogFolder";
@@ -20,7 +20,6 @@ __exportStar(require("./xml2js"), exports);
20
20
  __exportStar(require("./getSapLogonConnections"), exports);
21
21
  __exportStar(require("./logError"), exports);
22
22
  __exportStar(require("./checkCliUpdate"), exports);
23
- __exportStar(require("./getNodePackage"), exports);
24
23
  __exportStar(require("./getClientVersion"), exports);
25
24
  __exportStar(require("./getTempFolder"), exports);
26
25
  __exportStar(require("./getLogFolder"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trm-client",
3
- "version": "7.2.2",
3
+ "version": "7.3.0",
4
4
  "description": "TRM (Transport Request Manager) Client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -48,13 +48,13 @@
48
48
  "lodash": "^4.17.21",
49
49
  "npm": "^11.6.0",
50
50
  "semver": "^7.5.4",
51
- "trm-commons": "^3.4.2",
52
- "trm-core": "^8.1.3",
51
+ "trm-commons": "^3.4.3",
52
+ "trm-core": "^8.2.3",
53
53
  "trm-registry-types": "^2.1.0",
54
54
  "xml2js": "^0.6.2"
55
55
  },
56
56
  "peerDependencies": {
57
- "trm-commons": "^3.4.2"
57
+ "trm-commons": "^3.4.3"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/ini": "^1.3.31",
@@ -1 +0,0 @@
1
- export declare function getNodePackage(): any;
@@ -1,56 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.getNodePackage = getNodePackage;
40
- const fs = __importStar(require("fs"));
41
- const path_1 = __importDefault(require("path"));
42
- const get_root_path_1 = require("get-root-path");
43
- function getNodePackage() {
44
- var file;
45
- try {
46
- file = fs.readFileSync(path_1.default.join(get_root_path_1.rootPath, "/node_modules/trm-client/package.json"));
47
- }
48
- catch (e) {
49
- file = fs.readFileSync(path_1.default.join(get_root_path_1.rootPath, "package.json"));
50
- }
51
- const packageData = JSON.parse(file.toString());
52
- if (packageData.name !== 'trm-client') {
53
- throw new Error(`package.json not found! -> root path: ${get_root_path_1.rootPath}`);
54
- }
55
- return packageData;
56
- }