trm-core 7.5.4 → 8.0.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.
Files changed (63) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +35 -35
  3. package/changelog.txt +186 -171
  4. package/dist/actions/checkPackageDependencies/analyze.js +5 -51
  5. package/dist/actions/checkPackageDependencies/index.d.ts +2 -5
  6. package/dist/actions/checkPackageDependencies/init.js +5 -7
  7. package/dist/actions/checkSapEntries/analyze.js +2 -2
  8. package/dist/actions/checkSapEntries/index.d.ts +2 -2
  9. package/dist/actions/checkSapEntries/init.js +1 -4
  10. package/dist/actions/findDependencies/index.d.ts +0 -2
  11. package/dist/actions/findDependencies/setTrmDependencies.js +11 -55
  12. package/dist/actions/install/addNamespace.js +14 -9
  13. package/dist/actions/install/checkAlreadyInstalled.js +2 -2
  14. package/dist/actions/install/checkDependencies.js +2 -16
  15. package/dist/actions/install/checkSapEntries.js +1 -1
  16. package/dist/actions/install/checkTransports.js +2 -2
  17. package/dist/actions/install/executePostActivities.js +3 -3
  18. package/dist/actions/install/generateInstallTransport.js +40 -5
  19. package/dist/actions/install/index.d.ts +6 -10
  20. package/dist/actions/install/index.js +2 -4
  21. package/dist/actions/install/init.js +37 -45
  22. package/dist/actions/install/installDependencies.js +0 -1
  23. package/dist/actions/install/setPackageIntegrity.js +1 -1
  24. package/dist/actions/install/setTrmServerUpgradeService.js +1 -1
  25. package/dist/actions/installDependency/findInstallRelease.js +18 -18
  26. package/dist/actions/installDependency/index.d.ts +0 -1
  27. package/dist/actions/installDependency/init.js +0 -7
  28. package/dist/actions/installDependency/installRelease.js +0 -1
  29. package/dist/actions/publish/findDependencies.js +0 -12
  30. package/dist/actions/publish/generateCustTransport.js +0 -3
  31. package/dist/actions/publish/generateDevcTransport.js +0 -4
  32. package/dist/actions/publish/generateLangTransport.js +0 -3
  33. package/dist/actions/publish/getSourceCode.js +1 -1
  34. package/dist/actions/publish/index.d.ts +1 -1
  35. package/dist/actions/publish/init.js +71 -95
  36. package/dist/actions/publish/setManifestValues.js +4 -13
  37. package/dist/commons/getAxiosInstance.d.ts +1 -1
  38. package/dist/manifest/Manifest.d.ts +2 -0
  39. package/dist/manifest/Manifest.js +47 -17
  40. package/dist/manifest/TrmManifestDependency.d.ts +0 -1
  41. package/dist/registry/AbstractRegistry.d.ts +7 -7
  42. package/dist/registry/FileSystem.d.ts +7 -6
  43. package/dist/registry/FileSystem.js +35 -34
  44. package/dist/registry/RegistryProvider.js +4 -4
  45. package/dist/registry/{Registry.d.ts → RegistryV2.d.ts} +11 -10
  46. package/dist/registry/{Registry.js → RegistryV2.js} +146 -74
  47. package/dist/registry/index.d.ts +1 -1
  48. package/dist/registry/index.js +1 -1
  49. package/dist/systemConnector/ISystemConnectorBase.d.ts +1 -1
  50. package/dist/systemConnector/SystemConnector.d.ts +1 -1
  51. package/dist/systemConnector/SystemConnector.js +3 -3
  52. package/dist/systemConnector/SystemConnectorBase.d.ts +1 -1
  53. package/dist/systemConnector/SystemConnectorBase.js +33 -11
  54. package/dist/transport/Transport.d.ts +4 -1
  55. package/dist/transport/Transport.js +53 -30
  56. package/dist/trmPackage/TrmArtifact.js +3 -5
  57. package/dist/trmPackage/TrmPackage.d.ts +0 -16
  58. package/dist/trmPackage/TrmPackage.js +10 -133
  59. package/dist/validators/validatePackageVisibility.d.ts +1 -1
  60. package/dist/validators/validatePackageVisibility.js +2 -16
  61. package/package.json +98 -97
  62. package/dist/actions/install/checkIntegrity.d.ts +0 -3
  63. package/dist/actions/install/checkIntegrity.js +0 -42
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 RegestaItalia
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2023 RegestaItalia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,35 +1,35 @@
1
- # <a href="https://docs.trmregistry.com/"><img src="https://docs.trmregistry.com/_media/logo.png" height="40" alt="TRM"></a>
2
-
3
- [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-1.3.0-4baaaa.svg)](https://github.com/RegestaItalia/trm-docs/blob/main/CODE_OF_CONDUCT.md)
4
- [![Core License](https://img.shields.io/github/license/RegestaItalia/trm-core)](https://github.com/RegestaItalia/trm-core)
5
- [![Core Latest version](https://img.shields.io/npm/v/trm-core)](https://www.npmjs.com/package/trm-core)
6
- [![Core Installs](https://img.shields.io/npm/dt/trm-core)](https://www.npmjs.com/package/trm-core)
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
-
13
- This module contains the core functionalities of [TRM (Transport Request Manager)](https://trmregistry.com/).
14
-
15
- TRM is a software designed to make transports between SAP ECC/S4 systems easy.
16
-
17
- # Requirements
18
-
19
- - [Node >=22.12.0](https://github.com/nodejs/node/releases/tag/v22.12.0)
20
-
21
- # Documentation <!-- {docsify-remove} -->
22
-
23
- Full documentation can be seen at [https://docs.trmregistry.com/](https://docs.trmregistry.com).
24
-
25
- # Contributing <!-- {docsify-remove} -->
26
-
27
- Like every other TRM open-source projects, contributions are always welcomed ❤️.
28
-
29
- Make sure to open an issue first.
30
-
31
- Contributions will be merged upon approval.
32
-
33
- [Click here](https://docs.trmregistry.com/#/CONTRIBUTING) for the full list of TRM contribution guidelines.
34
-
35
- [<img src="https://trmregistry.com/public/contributors?image=true">](https://docs.trmregistry.com/#/?id=contributors)
1
+ # <a href="https://docs.trmregistry.com/"><img src="https://docs.trmregistry.com/_media/logo.png" height="40" alt="TRM"></a>
2
+
3
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-1.3.0-4baaaa.svg)](https://github.com/RegestaItalia/trm-docs/blob/main/CODE_OF_CONDUCT.md)
4
+ [![Core License](https://img.shields.io/github/license/RegestaItalia/trm-core)](https://github.com/RegestaItalia/trm-core)
5
+ [![Core Latest version](https://img.shields.io/npm/v/trm-core)](https://www.npmjs.com/package/trm-core)
6
+ [![Core Installs](https://img.shields.io/npm/dt/trm-core)](https://www.npmjs.com/package/trm-core)
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
+
13
+ This module contains the core functionalities of [TRM (Transport Request Manager)](https://trmregistry.com/).
14
+
15
+ TRM is a software designed to make transports between SAP ECC/S4 systems easy.
16
+
17
+ # Requirements
18
+
19
+ - [Node >=22.12.0](https://github.com/nodejs/node/releases/tag/v22.12.0)
20
+
21
+ # Documentation <!-- {docsify-remove} -->
22
+
23
+ Full documentation can be seen at [https://docs.trmregistry.com/](https://docs.trmregistry.com).
24
+
25
+ # Contributing <!-- {docsify-remove} -->
26
+
27
+ Like every other TRM open-source projects, contributions are always welcomed ❤️.
28
+
29
+ Make sure to open an issue first.
30
+
31
+ Contributions will be merged upon approval.
32
+
33
+ [Click here](https://docs.trmregistry.com/#/CONTRIBUTING) for the full list of TRM contribution guidelines.
34
+
35
+ [<img src="https://trmregistry.com/public/contributors?image=true">](https://docs.trmregistry.com/#/?id=contributors)
package/changelog.txt CHANGED
@@ -1,172 +1,187 @@
1
- trm-core changelog
2
- =================
3
-
4
- Legend
5
- ------
6
- * : fixed
7
- ! : changed
8
- + : added
9
- - : removed
10
-
11
- 2025-10-01 v7.5.4
12
- -------------------
13
- ! trm-commons ^3.4.0
14
-
15
- 2025-09-24 v7.5.3
16
- -------------------
17
- ! trm-commons ^3.3.2
18
-
19
- 2025-09-16 v7.5.2
20
- -------------------
21
- + DOMA senvi parser
22
-
23
- 2025-09-03 v7.5.1
24
- -------------------
25
- ! trm-commons ^3.2.0
26
-
27
- 2025-09-03 v7.5.0
28
- -------------------
29
- ! trm-commons ^3.1.0
30
- * npm global path
31
- + rfc closeConnection method
32
- ! private/protected methods/attributes
33
-
34
- 2025-08-27 v7.4.6
35
- -------------------
36
- * template manifest values
37
-
38
- 2025-08-17 v7.4.5
39
- -------------------
40
- ! node-r3trans ^2.0.1
41
- * r3trans options in getContent method
42
-
43
- 2025-07-30 v7.4.4
44
- -------------------
45
- ! node-r3trans ^2.0.0
46
-
47
- 2025-07-30 v7.4.3
48
- -------------------
49
- ! trm-commons ^2.0.0 as peer dependency
50
-
51
- 2025-07-29 v7.4.2
52
- -------------------
53
- ! enforce node engine >=22.12.0 with post install script
54
- ! protocol-registry ^2.0.0
55
-
56
- 2025-07-29 7.4.1
57
- -------------------
58
- ! trm-commons ^2.0.0
59
-
60
- 2025-07-29 7.4.0
61
- -------------------
62
- - dependency install doesn't ask for cust/lang/package replacements anymore if not needed
63
- ! install asks for cust/lang/package replacements when not provided by default parameter
64
- ! import logger shows package name
65
- ! trm-commons ^1.1.0
66
- ! trm-server ^5.0.0
67
- ! set/overwrite dependencies with or without automatic detection
68
- + manifest template for post activities, trm dependency and sap entries
69
- * local package install
70
-
71
- 2025-07-08 v7.3.0
72
- -------------------
73
- + enforce node engine ^22.12.0 with post install script
74
- * install package hierarchy
75
-
76
- 2025-06-04 v7.2.1
77
- -------------------
78
- * inquirer/logger prefix on install dependency
79
- + removed useless wb transport find on package first install
80
-
81
- 2025-06-03 v7.2.0
82
- -------------------
83
- * find dependency with custom object not found without devc reference
84
-
85
- 2025-06-03 v7.1.0
86
- -------------------
87
- * change tr owner on install tr update
88
-
89
- 2025-06-03 v7.0.0
90
- -------------------
91
- ! trm-server ^4.0.0
92
- + change tr owner on install tr update
93
-
94
- 2025-05-29 v6.9.1
95
- -------------------
96
- * remote function for updating server
97
- + confirm if objects exists but no root sap package found
98
-
99
- 2025-05-29 v6.9.0
100
- -------------------
101
- ! check server api auth before install and publish
102
- ! trm-server ^3.1.0
103
- ! read wb transport from package
104
-
105
- 2025-05-27 v6.8.0
106
- -------------------
107
- ! on install transport update, check tasks before add object attempt
108
- * commit before post activity run on RFC
109
- * post activity error log
110
- + node-rfc #327 -> device or resource busy, added workaround
111
-
112
- 2025-05-20 v6.7.1
113
- -------------------
114
- ! get installed packages from backend with trm-server version check
115
-
116
- 2025-05-14 v6.7.0
117
- -------------------
118
- ! trm-server ^3.0.0
119
- * abapgit ignored objects
120
- + post activity pre check
121
- + get installed packages from backend where possible
122
- + regen SAPLZTRM before post activity
123
- * rest sap-client
124
- + keep track of post activities based on latest release
125
-
126
- 2025-05-08 v6.6.0
127
- -------------------
128
- * no integrity with trm-server/trm-rest dependency allowed
129
- ! REST Client and RFC Client error generic -> specific
130
- ! REST Client error xml body parsing with title as message
131
- ! trm-server ^2.2.2
132
-
133
- 2025-05-08 v6.5.1
134
- -------------------
135
- ! rest error handling
136
-
137
- 2025-05-05 v6.5.0
138
- -------------------
139
- ! trm-commons ^1.0.0
140
- * upgrade trm-server fixes
141
- * core package.json location find
142
-
143
- 2025-04-28 v6.4.1
144
- -------------------
145
-
146
- ! node-r3trans ^1.5.0
147
-
148
- 2025-04-28 v6.4.0
149
- -------------------
150
-
151
- + post activities in abap manifest
152
- * return exception type for REST client
153
-
154
- 2025-02-06 v6.3.0
155
- -------------------
156
-
157
- * upgrading package remove previous ZTRM comments in workbench (import) transport
158
- + fetch package remote content
159
- * fix translation transport generation
160
- + move trm package dependencies to core
161
- + transport migration on overwrite
162
- ! DEVC, CUST and LANG are now TRM relevant
163
- * root superpackage on devc tr import blank
164
- + clear state on package install (remove from skipped transports)
165
- + add abapgit source code to TRM artifact
166
- + skip ignored objects listed in .abapgit.xml
167
- + add namespace in manifest
168
- ! abstract registry for custom implementation
169
- + add file system registry for local publish and install
170
- + add post activities
171
- ! cache transports in dependency detection for performance issues on big packages
1
+ trm-core changelog
2
+ =================
3
+
4
+ Legend
5
+ ------
6
+ * : fixed
7
+ ! : changed
8
+ + : added
9
+ - : removed
10
+
11
+ 2025-10-21 v8.0.0
12
+ -------------------
13
+ ! implement registry v2
14
+ - misuse of integrity
15
+ * error messages on publish rollback
16
+ ! trm-registry-types ^2.0.0
17
+ ! transport rc read
18
+ ! get workbench method
19
+ + handle install transport for same package local/remote
20
+ ! manifest.json keys order
21
+
22
+ 2025-10-01 v7.5.5
23
+ -------------------
24
+ ! trm-commons ^3.4.2
25
+
26
+ 2025-10-01 v7.5.4
27
+ -------------------
28
+ ! trm-commons ^3.4.0
29
+
30
+ 2025-09-24 v7.5.3
31
+ -------------------
32
+ ! trm-commons ^3.3.2
33
+
34
+ 2025-09-16 v7.5.2
35
+ -------------------
36
+ + DOMA senvi parser
37
+
38
+ 2025-09-03 v7.5.1
39
+ -------------------
40
+ ! trm-commons ^3.2.0
41
+
42
+ 2025-09-03 v7.5.0
43
+ -------------------
44
+ ! trm-commons ^3.1.0
45
+ * npm global path
46
+ + rfc closeConnection method
47
+ ! private/protected methods/attributes
48
+
49
+ 2025-08-27 v7.4.6
50
+ -------------------
51
+ * template manifest values
52
+
53
+ 2025-08-17 v7.4.5
54
+ -------------------
55
+ ! node-r3trans ^2.0.1
56
+ * r3trans options in getContent method
57
+
58
+ 2025-07-30 v7.4.4
59
+ -------------------
60
+ ! node-r3trans ^2.0.0
61
+
62
+ 2025-07-30 v7.4.3
63
+ -------------------
64
+ ! trm-commons ^2.0.0 as peer dependency
65
+
66
+ 2025-07-29 v7.4.2
67
+ -------------------
68
+ ! enforce node engine >=22.12.0 with post install script
69
+ ! protocol-registry ^2.0.0
70
+
71
+ 2025-07-29 7.4.1
72
+ -------------------
73
+ ! trm-commons ^2.0.0
74
+
75
+ 2025-07-29 7.4.0
76
+ -------------------
77
+ - dependency install doesn't ask for cust/lang/package replacements anymore if not needed
78
+ ! install asks for cust/lang/package replacements when not provided by default parameter
79
+ ! import logger shows package name
80
+ ! trm-commons ^1.1.0
81
+ ! trm-server ^5.0.0
82
+ ! set/overwrite dependencies with or without automatic detection
83
+ + manifest template for post activities, trm dependency and sap entries
84
+ * local package install
85
+
86
+ 2025-07-08 v7.3.0
87
+ -------------------
88
+ + enforce node engine ^22.12.0 with post install script
89
+ * install package hierarchy
90
+
91
+ 2025-06-04 v7.2.1
92
+ -------------------
93
+ * inquirer/logger prefix on install dependency
94
+ + removed useless wb transport find on package first install
95
+
96
+ 2025-06-03 v7.2.0
97
+ -------------------
98
+ * find dependency with custom object not found without devc reference
99
+
100
+ 2025-06-03 v7.1.0
101
+ -------------------
102
+ * change tr owner on install tr update
103
+
104
+ 2025-06-03 v7.0.0
105
+ -------------------
106
+ ! trm-server ^4.0.0
107
+ + change tr owner on install tr update
108
+
109
+ 2025-05-29 v6.9.1
110
+ -------------------
111
+ * remote function for updating server
112
+ + confirm if objects exists but no root sap package found
113
+
114
+ 2025-05-29 v6.9.0
115
+ -------------------
116
+ ! check server api auth before install and publish
117
+ ! trm-server ^3.1.0
118
+ ! read wb transport from package
119
+
120
+ 2025-05-27 v6.8.0
121
+ -------------------
122
+ ! on install transport update, check tasks before add object attempt
123
+ * commit before post activity run on RFC
124
+ * post activity error log
125
+ + node-rfc #327 -> device or resource busy, added workaround
126
+
127
+ 2025-05-20 v6.7.1
128
+ -------------------
129
+ ! get installed packages from backend with trm-server version check
130
+
131
+ 2025-05-14 v6.7.0
132
+ -------------------
133
+ ! trm-server ^3.0.0
134
+ * abapgit ignored objects
135
+ + post activity pre check
136
+ + get installed packages from backend where possible
137
+ + regen SAPLZTRM before post activity
138
+ * rest sap-client
139
+ + keep track of post activities based on latest release
140
+
141
+ 2025-05-08 v6.6.0
142
+ -------------------
143
+ * no integrity with trm-server/trm-rest dependency allowed
144
+ ! REST Client and RFC Client error generic -> specific
145
+ ! REST Client error xml body parsing with title as message
146
+ ! trm-server ^2.2.2
147
+
148
+ 2025-05-08 v6.5.1
149
+ -------------------
150
+ ! rest error handling
151
+
152
+ 2025-05-05 v6.5.0
153
+ -------------------
154
+ ! trm-commons ^1.0.0
155
+ * upgrade trm-server fixes
156
+ * core package.json location find
157
+
158
+ 2025-04-28 v6.4.1
159
+ -------------------
160
+
161
+ ! node-r3trans ^1.5.0
162
+
163
+ 2025-04-28 v6.4.0
164
+ -------------------
165
+
166
+ + post activities in abap manifest
167
+ * return exception type for REST client
168
+
169
+ 2025-02-06 v6.3.0
170
+ -------------------
171
+
172
+ * upgrading package remove previous ZTRM comments in workbench (import) transport
173
+ + fetch package remote content
174
+ * fix translation transport generation
175
+ + move trm package dependencies to core
176
+ + transport migration on overwrite
177
+ ! DEVC, CUST and LANG are now TRM relevant
178
+ * root superpackage on devc tr import blank
179
+ + clear state on package install (remove from skipped transports)
180
+ + add abapgit source code to TRM artifact
181
+ + skip ignored objects listed in .abapgit.xml
182
+ + add namespace in manifest
183
+ ! abstract registry for custom implementation
184
+ + add file system registry for local publish and install
185
+ + add post activities
186
+ ! cache transports in dependency detection for performance issues on big packages
172
187
  * check object existance before install
@@ -14,7 +14,6 @@ const trm_commons_1 = require("trm-commons");
14
14
  const trmPackage_1 = require("../../trmPackage");
15
15
  const registry_1 = require("../../registry");
16
16
  const semver_1 = require("semver");
17
- const systemConnector_1 = require("../../systemConnector");
18
17
  exports.analyze = {
19
18
  name: 'analyze',
20
19
  filter: (context) => __awaiter(void 0, void 0, void 0, function* () {
@@ -22,15 +21,15 @@ exports.analyze = {
22
21
  return true;
23
22
  }
24
23
  else {
25
- trm_commons_1.Logger.info(`Package ${context.rawInput.packageData.package.packageName} has no TRM package dependencies`, !context.rawInput.printOptions.information);
24
+ trm_commons_1.Logger.info(`Package ${context.rawInput.packageData.manifest.name} has no TRM package dependencies`, !context.rawInput.printOptions.information);
26
25
  return false;
27
26
  }
28
27
  }),
29
28
  run: (context) => __awaiter(void 0, void 0, void 0, function* () {
30
29
  trm_commons_1.Logger.log('Analyze step', true);
31
- trm_commons_1.Logger.info(`Package ${context.rawInput.packageData.package.packageName} has ${context.output.dependencies.length} TRM package dependencies`, !context.rawInput.printOptions.information);
30
+ trm_commons_1.Logger.info(`Package ${context.rawInput.packageData.manifest.name} has ${context.output.dependencies.length} TRM package dependencies`, !context.rawInput.printOptions.information);
32
31
  var table = {
33
- header: ['Dependency', 'Registry', 'Dependency range', 'Version on system', 'Version status', 'Integrity status'],
32
+ header: ['Dependency', 'Registry', 'Dependency range', 'Version on system', 'Version status'],
34
33
  data: []
35
34
  };
36
35
  var tableData;
@@ -55,23 +54,6 @@ exports.analyze = {
55
54
  tableData.push('ERR!');
56
55
  context.runtime.dependenciesStatus.badVersion.push(dependency);
57
56
  }
58
- try {
59
- const installedPackageIntegrity = yield systemConnector_1.SystemConnector.getPackageIntegrity(systemInstalledPackage);
60
- if (installedPackageIntegrity === dependency.integrity) {
61
- tableData.push('Safe');
62
- context.runtime.dependenciesStatus.goodIntegrity.push(dependency);
63
- }
64
- else {
65
- tableData.push('Unsafe');
66
- context.runtime.dependenciesStatus.badIntegrity.push(dependency);
67
- }
68
- }
69
- catch (e) {
70
- tableData.push('Unknown');
71
- context.runtime.dependenciesStatus.badIntegrity.push(dependency);
72
- trm_commons_1.Logger.error(e.toString(), true);
73
- trm_commons_1.Logger.error(`Couldn't retrieve package integrity`, true);
74
- }
75
57
  table.data.push(tableData);
76
58
  }
77
59
  trm_commons_1.Logger.table(table.header, table.data, !context.rawInput.printOptions.dependencyStatus);
@@ -83,8 +65,7 @@ exports.analyze = {
83
65
  else {
84
66
  context.output.dependencyStatus.push({
85
67
  dependency: o,
86
- match: true,
87
- safe: null
68
+ match: true
88
69
  });
89
70
  }
90
71
  });
@@ -96,34 +77,7 @@ exports.analyze = {
96
77
  else {
97
78
  context.output.dependencyStatus.push({
98
79
  dependency: o,
99
- match: false,
100
- safe: null
101
- });
102
- }
103
- });
104
- context.runtime.dependenciesStatus.goodIntegrity.forEach(o => {
105
- const i = context.output.dependencyStatus.findIndex(k => k.dependency.name === o.name && k.dependency.registry === o.registry);
106
- if (i >= 0) {
107
- context.output.dependencyStatus[i].safe = true;
108
- }
109
- else {
110
- context.output.dependencyStatus.push({
111
- dependency: o,
112
- match: null,
113
- safe: true
114
- });
115
- }
116
- });
117
- context.runtime.dependenciesStatus.badIntegrity.forEach(o => {
118
- const i = context.output.dependencyStatus.findIndex(k => k.dependency.name === o.name && k.dependency.registry === o.registry);
119
- if (i >= 0) {
120
- context.output.dependencyStatus[i].safe = false;
121
- }
122
- else {
123
- context.output.dependencyStatus.push({
124
- dependency: o,
125
- match: null,
126
- safe: false
80
+ match: false
127
81
  });
128
82
  }
129
83
  });
@@ -1,12 +1,12 @@
1
1
  import { TrmPackage } from "../../trmPackage";
2
2
  import { IActionContext } from "../commons";
3
- import { TrmManifestDependency } from "../../manifest";
3
+ import { TrmManifest, TrmManifestDependency } from "../../manifest";
4
4
  export interface CheckPackageDependenciesActionInput {
5
5
  contextData?: {
6
6
  systemPackages?: TrmPackage[];
7
7
  };
8
8
  packageData: {
9
- package: TrmPackage;
9
+ manifest: TrmManifest;
10
10
  };
11
11
  printOptions?: {
12
12
  dependencyStatus?: boolean;
@@ -17,8 +17,6 @@ type WorkflowRuntime = {
17
17
  dependenciesStatus: {
18
18
  goodVersion: TrmManifestDependency[];
19
19
  badVersion: TrmManifestDependency[];
20
- goodIntegrity: TrmManifestDependency[];
21
- badIntegrity: TrmManifestDependency[];
22
20
  };
23
21
  };
24
22
  export type CheckPackageDependenciesActionOutput = {
@@ -26,7 +24,6 @@ export type CheckPackageDependenciesActionOutput = {
26
24
  dependencyStatus: {
27
25
  dependency: TrmManifestDependency;
28
26
  match: boolean;
29
- safe: boolean;
30
27
  }[];
31
28
  };
32
29
  export interface CheckPackageDependenciesWorkflowContext extends IActionContext {
@@ -22,17 +22,15 @@ exports.init = {
22
22
  context.runtime = {
23
23
  dependenciesStatus: {
24
24
  goodVersion: [],
25
- badVersion: [],
26
- goodIntegrity: [],
27
- badIntegrity: []
25
+ badVersion: []
28
26
  }
29
27
  };
30
- if (context.rawInput.packageData.package.manifest) {
31
- const manifest = context.rawInput.packageData.package.manifest.get();
32
- context.output.dependencies = manifest.dependencies || [];
33
- }
28
+ context.output.dependencies = context.rawInput.packageData.manifest.dependencies || [];
34
29
  if (!context.rawInput.printOptions) {
35
30
  context.rawInput.printOptions = {};
36
31
  }
32
+ if (!context.rawInput.contextData) {
33
+ context.rawInput.contextData = {};
34
+ }
37
35
  })
38
36
  };
@@ -19,7 +19,7 @@ exports.analyze = {
19
19
  return true;
20
20
  }
21
21
  else {
22
- trm_commons_1.Logger.info(`Package ${context.rawInput.packageData.package.packageName} has no SAP entries`, !context.rawInput.printOptions.information);
22
+ trm_commons_1.Logger.info(`Package ${context.rawInput.packageData.manifest.name} has no SAP entries`, !context.rawInput.printOptions.information);
23
23
  return false;
24
24
  }
25
25
  }),
@@ -43,7 +43,7 @@ exports.analyze = {
43
43
  fields: aFields
44
44
  });
45
45
  });
46
- trm_commons_1.Logger.info(`Package ${context.rawInput.packageData.package.packageName} has ${entriesCount} SAP entries`, !context.rawInput.printOptions.information);
46
+ trm_commons_1.Logger.info(`Package ${context.rawInput.packageData.manifest.name} has ${entriesCount} SAP entries`, !context.rawInput.printOptions.information);
47
47
  if (entriesCount === 0) {
48
48
  return;
49
49
  }
@@ -1,7 +1,7 @@
1
- import { TrmPackage } from "../../trmPackage";
1
+ import { TrmManifest } from "../../manifest";
2
2
  export interface CheckSapEntriesActionInput {
3
3
  packageData: {
4
- package: TrmPackage;
4
+ manifest: TrmManifest;
5
5
  };
6
6
  printOptions?: {
7
7
  entriesStatus?: boolean;