trm-client 7.3.4 → 7.3.5

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,18 @@ Legend
8
8
  + : added
9
9
  - : removed
10
10
 
11
+ 2026-02-23 v7.3.5
12
+ -------------------
13
+ * info command
14
+
15
+ 2026-02-18 v7.3.4
16
+ -------------------
17
+ ! npm latest version
18
+
19
+ 2026-02-18 v7.3.3
20
+ -------------------
21
+ ! update packages
22
+
11
23
  2026-02-17 v7.3.2
12
24
  -------------------
13
25
  ! upgrade trm dependencies
@@ -4,7 +4,6 @@ export declare class Info extends AbstractCommand {
4
4
  protected init(): void;
5
5
  protected onTrmDepMissing(dependency: string): boolean;
6
6
  protected onTrmDepVersionNotSatisfied(trmPackage: TrmPackage): boolean;
7
- private getDependencyVersion;
8
7
  private getNodeRfcVersion;
9
8
  private getNpmLatestForText;
10
9
  protected handler(): Promise<void>;
@@ -21,7 +21,6 @@ const semver_1 = require("semver");
21
21
  const chalk_1 = __importDefault(require("chalk"));
22
22
  const fs_1 = require("fs");
23
23
  const path_1 = require("path");
24
- const get_root_path_1 = require("get-root-path");
25
24
  class Info extends AbstractCommand_1.AbstractCommand {
26
25
  init() {
27
26
  this.registerOpts.requiresConnection = true;
@@ -35,21 +34,6 @@ class Info extends AbstractCommand_1.AbstractCommand {
35
34
  onTrmDepVersionNotSatisfied(trmPackage) {
36
35
  return false;
37
36
  }
38
- getDependencyVersion(moduleName, rootModule = 'trm-client') {
39
- var file;
40
- try {
41
- file = (0, fs_1.readFileSync)((0, path_1.join)(get_root_path_1.rootPath, `/node_modules/${rootModule}/node_modules/${moduleName}/package.json`));
42
- }
43
- catch (e) {
44
- file = (0, fs_1.readFileSync)((0, path_1.join)(get_root_path_1.rootPath, `/node_modules/${moduleName}/package.json`));
45
- }
46
- if (!file) {
47
- trm_commons_1.Logger.warning(`Library ${moduleName} (root ${rootModule}) was not found!`, true);
48
- }
49
- else {
50
- return JSON.parse(file.toString()).version;
51
- }
52
- }
53
37
  getNodeRfcVersion(npmGlobal) {
54
38
  var file;
55
39
  try {
@@ -83,6 +67,7 @@ class Info extends AbstractCommand_1.AbstractCommand {
83
67
  }
84
68
  handler() {
85
69
  return __awaiter(this, void 0, void 0, function* () {
70
+ var _a, _b;
86
71
  trm_commons_1.Logger.loading(`Reading data...`);
87
72
  const npmGlobal = utils_1.GlobalContext.getInstance().getSettings().globalNodeModules;
88
73
  const clientLatest = yield this.getCliVersionStatus();
@@ -94,21 +79,12 @@ class Info extends AbstractCommand_1.AbstractCommand {
94
79
  const nodeRfcVersion = this.getNodeRfcVersion(npmGlobal);
95
80
  const packages = yield this.getSystemPackages();
96
81
  const trmRest = packages.find(o => o.compareName("trm-rest") && o.compareRegistry(trm_core_1.RegistryProvider.getRegistry()));
97
- var nodeR3transVersion;
98
- try {
99
- nodeR3transVersion = this.getDependencyVersion("node-r3trans", "trm-core");
100
- if (!nodeR3transVersion) {
101
- throw new Error();
102
- }
103
- }
104
- catch (e) {
105
- nodeR3transVersion = this.getDependencyVersion("node-r3trans");
106
- }
82
+ const nodeR3transVersion = (_a = (0, trm_core_1.getNodePackage)("node-r3trans")) === null || _a === void 0 ? void 0 : _a.version;
107
83
  var clientDependenciesTree = [];
108
84
  if (clientDependencies) {
109
85
  for (const d of Object.keys(clientDependencies).filter(k => k.startsWith('trm'))) {
110
86
  var dText = ``;
111
- var dInstalledVersion = this.getDependencyVersion(d);
87
+ var dInstalledVersion = (_b = (0, trm_core_1.getNodePackage)(d)) === null || _b === void 0 ? void 0 : _b.version;
112
88
  if (dInstalledVersion) {
113
89
  dText = ` -> ${dInstalledVersion}`;
114
90
  dText = yield this.getNpmLatestForText(d, dInstalledVersion, dText);
@@ -225,7 +201,7 @@ class Info extends AbstractCommand_1.AbstractCommand {
225
201
  children: []
226
202
  });
227
203
  }
228
- catch (_a) {
204
+ catch (_c) {
229
205
  pluginsTree.children.push({
230
206
  text: plugin.name,
231
207
  children: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trm-client",
3
- "version": "7.3.4",
3
+ "version": "7.3.5",
4
4
  "description": "TRM (Transport Request Manager) Client",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -42,7 +42,6 @@
42
42
  "commander": "^11.0.0",
43
43
  "dotenv": "^17.2.2",
44
44
  "execa": "^9.6.0",
45
- "get-root-path": "^2.0.2",
46
45
  "i": "^0.3.7",
47
46
  "ini": "^4.1.1",
48
47
  "lodash": "^4.17.21",