trm-client 5.2.0 → 6.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.
- package/LICENSE +20 -20
- package/README.md +65 -65
- package/changelog.txt +153 -142
- package/dist/commands/addRegistry.js +3 -1
- package/dist/commands/check.js +2 -2
- package/dist/commands/commons/viewRegistryPackage.d.ts +2 -2
- package/dist/commands/commons/viewRegistryPackage.js +8 -3
- package/dist/commands/compare.js +1 -1
- package/dist/commands/content.js +8 -9
- package/dist/commands/import.js +1 -3
- package/dist/commands/info.js +2 -2
- package/dist/commands/install.js +1 -3
- package/dist/commands/login.js +1 -1
- package/dist/commands/prompts/pickRegistry.js +0 -1
- package/dist/commands/view.js +8 -8
- package/dist/commands/whoami.js +9 -9
- package/dist/index.js +21 -16
- package/dist/registryAlias/RegistryAlias.d.ts +1 -2
- package/dist/registryAlias/RegistryAlias.js +11 -12
- package/dist/systemAlias/SystemAlias.js +1 -1
- package/dist/utils/DummyConnector.d.ts +1 -0
- package/dist/utils/DummyConnector.js +1 -0
- package/dist/utils/checkCliUpdate.js +1 -1
- package/dist/utils/executeCommand.js +15 -15
- package/dist/utils/logError.js +1 -6
- package/package.json +65 -65
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,65 +1,65 @@
|
|
|
1
|
-
# <a href="https://docs.trmregistry.com/#/server/README"><img src="https://docs.trmregistry.com/_media/logo.png" height="40" alt="TRM"></a>
|
|
2
|
-
|
|
3
|
-
[](https://github.com/RegestaItalia/trm-docs/blob/main/CODE_OF_CONDUCT.md)
|
|
4
|
-
[](https://github.com/RegestaItalia/trm-client)
|
|
5
|
-
[](https://www.npmjs.com/package/trm-client)
|
|
6
|
-
[](https://www.npmjs.com/package/trm-client)
|
|
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 is the official CLI implementation of the core functionalities of TRM.
|
|
14
|
-
|
|
15
|
-
TRM is a software designed to make transports between SAP ECC/S4 systems easy.
|
|
16
|
-
|
|
17
|
-
To find out more about TRM, visit its full [documentation](https://docs.trmregistry.com).
|
|
18
|
-
|
|
19
|
-
# Documentation <!-- {docsify-remove} -->
|
|
20
|
-
|
|
21
|
-
Full documentation can be seen at [https://docs.trmregistry.com](https://docs.trmregistry.com).
|
|
22
|
-
|
|
23
|
-
<!-- START TABLE_OF_CONTENTS.md -->
|
|
24
|
-
- [Setup](/docs/setup.md)
|
|
25
|
-
- [Commands](/docs/commands.md)
|
|
26
|
-
- [Installing your first package](/docs/examples/install.md)
|
|
27
|
-
- [Publishing your first package](/docs/examples/publish.md)
|
|
28
|
-
- [Integrate with abapGit & Github Actions](/docs/examples/githubActions.md)
|
|
29
|
-
<!-- END TABLE_OF_CONTENTS.md -->
|
|
30
|
-
|
|
31
|
-
## Install <!-- {docsify-remove} -->
|
|
32
|
-
|
|
33
|
-
First, make sure you have all the [requirements installed](/docs/setup.md#trm-client-requirements).
|
|
34
|
-
|
|
35
|
-
You can then install the CLI via npm:
|
|
36
|
-
|
|
37
|
-
`npm install trm-client -g`
|
|
38
|
-
|
|
39
|
-
## Commands <!-- {docsify-remove} -->
|
|
40
|
-
|
|
41
|
-
List of all commands is available [here](/docs/commands.md).
|
|
42
|
-
|
|
43
|
-
### Demo publish <!-- {docsify-remove} -->
|
|
44
|
-
|
|
45
|
-
<p align="center">
|
|
46
|
-
<img src="https://docs.trmregistry.com/_media/publish.gif" />
|
|
47
|
-
</p>
|
|
48
|
-
|
|
49
|
-
### Demo install <!-- {docsify-remove} -->
|
|
50
|
-
|
|
51
|
-
<p align="center">
|
|
52
|
-
<img src="https://docs.trmregistry.com/_media/install.gif" />
|
|
53
|
-
</p>
|
|
54
|
-
|
|
55
|
-
# Contributing <!-- {docsify-remove} -->
|
|
56
|
-
|
|
57
|
-
Like every other TRM open-source projects, contributions are always welcomed ❤️.
|
|
58
|
-
|
|
59
|
-
Make sure to open an issue first.
|
|
60
|
-
|
|
61
|
-
Contributions will be merged upon approval.
|
|
62
|
-
|
|
63
|
-
[Click here](https://docs.trmregistry.com/#/CONTRIBUTING) for the full list of TRM contribution guidelines.
|
|
64
|
-
|
|
65
|
-
[<img src="https://trmregistry.com/public/contributors?image=true">](https://docs.trmregistry.com/#/?id=contributors)
|
|
1
|
+
# <a href="https://docs.trmregistry.com/#/server/README"><img src="https://docs.trmregistry.com/_media/logo.png" height="40" alt="TRM"></a>
|
|
2
|
+
|
|
3
|
+
[](https://github.com/RegestaItalia/trm-docs/blob/main/CODE_OF_CONDUCT.md)
|
|
4
|
+
[](https://github.com/RegestaItalia/trm-client)
|
|
5
|
+
[](https://www.npmjs.com/package/trm-client)
|
|
6
|
+
[](https://www.npmjs.com/package/trm-client)
|
|
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 is the official CLI implementation of the core functionalities of TRM.
|
|
14
|
+
|
|
15
|
+
TRM is a software designed to make transports between SAP ECC/S4 systems easy.
|
|
16
|
+
|
|
17
|
+
To find out more about TRM, visit its full [documentation](https://docs.trmregistry.com).
|
|
18
|
+
|
|
19
|
+
# Documentation <!-- {docsify-remove} -->
|
|
20
|
+
|
|
21
|
+
Full documentation can be seen at [https://docs.trmregistry.com](https://docs.trmregistry.com).
|
|
22
|
+
|
|
23
|
+
<!-- START TABLE_OF_CONTENTS.md -->
|
|
24
|
+
- [Setup](/docs/setup.md)
|
|
25
|
+
- [Commands](/docs/commands.md)
|
|
26
|
+
- [Installing your first package](/docs/examples/install.md)
|
|
27
|
+
- [Publishing your first package](/docs/examples/publish.md)
|
|
28
|
+
- [Integrate with abapGit & Github Actions](/docs/examples/githubActions.md)
|
|
29
|
+
<!-- END TABLE_OF_CONTENTS.md -->
|
|
30
|
+
|
|
31
|
+
## Install <!-- {docsify-remove} -->
|
|
32
|
+
|
|
33
|
+
First, make sure you have all the [requirements installed](/docs/setup.md#trm-client-requirements).
|
|
34
|
+
|
|
35
|
+
You can then install the CLI via npm:
|
|
36
|
+
|
|
37
|
+
`npm install trm-client -g`
|
|
38
|
+
|
|
39
|
+
## Commands <!-- {docsify-remove} -->
|
|
40
|
+
|
|
41
|
+
List of all commands is available [here](/docs/commands.md).
|
|
42
|
+
|
|
43
|
+
### Demo publish <!-- {docsify-remove} -->
|
|
44
|
+
|
|
45
|
+
<p align="center">
|
|
46
|
+
<img src="https://docs.trmregistry.com/_media/publish.gif" />
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
### Demo install <!-- {docsify-remove} -->
|
|
50
|
+
|
|
51
|
+
<p align="center">
|
|
52
|
+
<img src="https://docs.trmregistry.com/_media/install.gif" />
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
# Contributing <!-- {docsify-remove} -->
|
|
56
|
+
|
|
57
|
+
Like every other TRM open-source projects, contributions are always welcomed ❤️.
|
|
58
|
+
|
|
59
|
+
Make sure to open an issue first.
|
|
60
|
+
|
|
61
|
+
Contributions will be merged upon approval.
|
|
62
|
+
|
|
63
|
+
[Click here](https://docs.trmregistry.com/#/CONTRIBUTING) for the full list of TRM contribution guidelines.
|
|
64
|
+
|
|
65
|
+
[<img src="https://trmregistry.com/public/contributors?image=true">](https://docs.trmregistry.com/#/?id=contributors)
|
package/changelog.txt
CHANGED
|
@@ -1,143 +1,154 @@
|
|
|
1
|
-
trm-client changelog
|
|
2
|
-
=================
|
|
3
|
-
|
|
4
|
-
Legend
|
|
5
|
-
------
|
|
6
|
-
* : fixed
|
|
7
|
-
! : changed
|
|
8
|
-
+ : added
|
|
9
|
-
- : removed
|
|
10
|
-
|
|
11
|
-
2025-10-
|
|
12
|
-
-------------------
|
|
13
|
-
|
|
14
|
-
! trm-
|
|
15
|
-
! trm-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
2025-09-
|
|
38
|
-
-------------------
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
2025-07-
|
|
78
|
-
-------------------
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
! trm-
|
|
94
|
-
|
|
95
|
-
2025-
|
|
96
|
-
-------------------
|
|
97
|
-
|
|
98
|
-
!
|
|
99
|
-
!
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
2025-04-28 v4.
|
|
128
|
-
-------------------
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
2025-04-
|
|
133
|
-
-------------------
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
trm-client changelog
|
|
2
|
+
=================
|
|
3
|
+
|
|
4
|
+
Legend
|
|
5
|
+
------
|
|
6
|
+
* : fixed
|
|
7
|
+
! : changed
|
|
8
|
+
+ : added
|
|
9
|
+
- : removed
|
|
10
|
+
|
|
11
|
+
2025-10-21 v6.0.0
|
|
12
|
+
-------------------
|
|
13
|
+
! migrate to registry v2
|
|
14
|
+
! trm-registry-types ^2.0.0
|
|
15
|
+
! trm-core ^8.0.1
|
|
16
|
+
|
|
17
|
+
2025-10-15 v5.2.1
|
|
18
|
+
-------------------
|
|
19
|
+
* system alias connection data
|
|
20
|
+
* typo in update message
|
|
21
|
+
|
|
22
|
+
2025-10-01 v5.2.0
|
|
23
|
+
-------------------
|
|
24
|
+
|
|
25
|
+
! trm-core ^7.5.5
|
|
26
|
+
! trm-commons ^3.4.2
|
|
27
|
+
* connection data problems
|
|
28
|
+
+ cache time consuming data
|
|
29
|
+
+ on after login update alias on changes
|
|
30
|
+
|
|
31
|
+
2025-09-25 v5.1.1
|
|
32
|
+
-------------------
|
|
33
|
+
|
|
34
|
+
* create alias command
|
|
35
|
+
* keep original abap packages name selection
|
|
36
|
+
|
|
37
|
+
2025-09-24 v5.1.0
|
|
38
|
+
-------------------
|
|
39
|
+
|
|
40
|
+
* alias command view/edit
|
|
41
|
+
! npm global path in settings
|
|
42
|
+
! sap landscape in settings
|
|
43
|
+
* sap landscape for mac
|
|
44
|
+
+ add plugins in info command
|
|
45
|
+
! trm-commons ^3.3.2
|
|
46
|
+
! trm-core ^7.5.3
|
|
47
|
+
|
|
48
|
+
2025-09-09 v5.0.2
|
|
49
|
+
-------------------
|
|
50
|
+
|
|
51
|
+
* fix no connection
|
|
52
|
+
+ fallback text for node-rfc and node-r3trans not found in info command
|
|
53
|
+
+ update command now self updates the client if ran without arguments
|
|
54
|
+
|
|
55
|
+
2025-09-03 v5.0.1
|
|
56
|
+
-------------------
|
|
57
|
+
|
|
58
|
+
+ plugin loadCommons
|
|
59
|
+
|
|
60
|
+
2025-09-03 v5.0.0
|
|
61
|
+
-------------------
|
|
62
|
+
|
|
63
|
+
! trm-core ^7.5.1
|
|
64
|
+
! trm-commons ^3.2.0
|
|
65
|
+
! moved settings to context
|
|
66
|
+
+ plugin calls
|
|
67
|
+
+ gracefully close connection
|
|
68
|
+
! moved connection prompts to commons
|
|
69
|
+
|
|
70
|
+
2025-08-13 v4.10.0
|
|
71
|
+
-------------------
|
|
72
|
+
|
|
73
|
+
! trm-core ^7.4.5
|
|
74
|
+
+ support for darwin os
|
|
75
|
+
+ support for r3trans dockerized
|
|
76
|
+
|
|
77
|
+
2025-07-30 v4.9.2
|
|
78
|
+
-------------------
|
|
79
|
+
|
|
80
|
+
! trm-commons ^2.0.0 as peer dependency and dependency
|
|
81
|
+
|
|
82
|
+
2025-07-29 v4.9.1
|
|
83
|
+
-------------------
|
|
84
|
+
|
|
85
|
+
! trm-core ^7.4.1
|
|
86
|
+
! trm-commons ^2.0.0
|
|
87
|
+
|
|
88
|
+
2025-07-29 v4.9.0
|
|
89
|
+
-------------------
|
|
90
|
+
|
|
91
|
+
+ handle registry unauthorized error
|
|
92
|
+
! trm-core ^7.4.0
|
|
93
|
+
! trm-commons ^1.1.0
|
|
94
|
+
|
|
95
|
+
2025-06-04 v4.8.0
|
|
96
|
+
-------------------
|
|
97
|
+
|
|
98
|
+
! trm-core ^7.2.1
|
|
99
|
+
! overwrite flag in install/update ignores existing objects replace
|
|
100
|
+
|
|
101
|
+
2025-06-03 v4.7.0
|
|
102
|
+
-------------------
|
|
103
|
+
|
|
104
|
+
! trm-core ^7.0.0
|
|
105
|
+
|
|
106
|
+
2025-05-29 v4.6.1
|
|
107
|
+
-------------------
|
|
108
|
+
|
|
109
|
+
! logging error changes
|
|
110
|
+
! trm-core ^6.9.0
|
|
111
|
+
+ landscape transport to list and view command
|
|
112
|
+
|
|
113
|
+
2025-05-08 v4.6.0
|
|
114
|
+
-------------------
|
|
115
|
+
|
|
116
|
+
! trm-core ^6.8.0
|
|
117
|
+
* saprouter in alias
|
|
118
|
+
|
|
119
|
+
2025-05-08 v4.5.0
|
|
120
|
+
-------------------
|
|
121
|
+
|
|
122
|
+
! trm-core ^6.7.0
|
|
123
|
+
! error handling
|
|
124
|
+
* alias command/saprouter alias save
|
|
125
|
+
* fix connection validators
|
|
126
|
+
|
|
127
|
+
2025-04-28 v4.4.1
|
|
128
|
+
-------------------
|
|
129
|
+
|
|
130
|
+
* node-r3trans version read
|
|
131
|
+
|
|
132
|
+
2025-04-28 v4.4.0
|
|
133
|
+
-------------------
|
|
134
|
+
|
|
135
|
+
! trm-core ^6.5.0
|
|
136
|
+
! trm-commons ^1.0.0
|
|
137
|
+
|
|
138
|
+
2025-04-28 v4.3.0
|
|
139
|
+
-------------------
|
|
140
|
+
|
|
141
|
+
! trm-core ^6.4.1
|
|
142
|
+
|
|
143
|
+
2025-04-23 v4.2.1
|
|
144
|
+
-------------------
|
|
145
|
+
|
|
146
|
+
* node-r3trans version read
|
|
147
|
+
|
|
148
|
+
2025-02-26 v4.2.0
|
|
149
|
+
-------------------
|
|
150
|
+
|
|
151
|
+
! connect to registry via option
|
|
152
|
+
- trm dependencies on client
|
|
153
|
+
+ content command
|
|
143
154
|
+ pack/import command
|
|
@@ -45,7 +45,9 @@ function addRegistry(commandArgs) {
|
|
|
45
45
|
var pingSuccess = true;
|
|
46
46
|
try {
|
|
47
47
|
const ping = yield registry.getRegistry().ping();
|
|
48
|
-
|
|
48
|
+
if (ping.messages) {
|
|
49
|
+
ping.messages.forEach(m => trm_commons_1.Logger.registryResponse(m));
|
|
50
|
+
}
|
|
49
51
|
}
|
|
50
52
|
catch (e) {
|
|
51
53
|
trm_commons_1.Logger.error(`Ping to registry "${registryName}" (${endpoint}) failed.`);
|
package/dist/commands/check.js
CHANGED
|
@@ -22,7 +22,7 @@ const _dependencies = (oPackage) => __awaiter(void 0, void 0, void 0, function*
|
|
|
22
22
|
systemPackages: packages
|
|
23
23
|
},
|
|
24
24
|
packageData: {
|
|
25
|
-
|
|
25
|
+
manifest: oPackage.manifest.get()
|
|
26
26
|
},
|
|
27
27
|
printOptions: {
|
|
28
28
|
dependencyStatus: true,
|
|
@@ -34,7 +34,7 @@ const _sapEntries = (oPackage) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
34
34
|
trm_commons_1.Logger.loading(`Analyzing package SAP Entries...`);
|
|
35
35
|
yield (0, trm_core_1.checkSapEntries)({
|
|
36
36
|
packageData: {
|
|
37
|
-
|
|
37
|
+
manifest: oPackage.manifest.get()
|
|
38
38
|
},
|
|
39
39
|
printOptions: {
|
|
40
40
|
entriesStatus: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function viewRegistryPackage(packageName: string, print?: boolean): Promise<
|
|
1
|
+
import { Package } from "trm-registry-types";
|
|
2
|
+
export declare function viewRegistryPackage(packageName: string, print?: boolean): Promise<Package>;
|
|
@@ -21,7 +21,7 @@ function viewRegistryPackage(packageName_1) {
|
|
|
21
21
|
trm_commons_1.Logger.loading(`Reading registry data...`);
|
|
22
22
|
var oRegistryView;
|
|
23
23
|
try {
|
|
24
|
-
oRegistryView = yield CommandContext_1.CommandContext.getRegistry().
|
|
24
|
+
oRegistryView = yield CommandContext_1.CommandContext.getRegistry().getPackage(packageName, 'latest');
|
|
25
25
|
}
|
|
26
26
|
catch (e) {
|
|
27
27
|
trm_commons_1.Logger.error(e, true);
|
|
@@ -33,8 +33,13 @@ function viewRegistryPackage(packageName_1) {
|
|
|
33
33
|
trm_commons_1.Logger.warning(`${chalk_1.default.bold('WARNING')}: This package may have been deleted!`);
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
if (oRegistryView.
|
|
37
|
-
|
|
36
|
+
if (oRegistryView.deprecated) {
|
|
37
|
+
if (oRegistryView.deprecated_message) {
|
|
38
|
+
trm_commons_1.Logger.warning(`${chalk_1.default.bold('WARNING deprecate')}: ${oRegistryView.deprecated_message}`);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
trm_commons_1.Logger.warning(`${chalk_1.default.bold('WARNING deprecate')}: v${oRegistryView.manifest.version} is deprecated`);
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
}
|
package/dist/commands/compare.js
CHANGED
|
@@ -156,7 +156,7 @@ function compare(commandArgs) {
|
|
|
156
156
|
trm_commons_1.Logger.info(`Package name: ${packageName}`);
|
|
157
157
|
trm_commons_1.Logger.info(`Registry: ${registry.name}`);
|
|
158
158
|
try {
|
|
159
|
-
trm_commons_1.Logger.info(`Latest version: ${oRegistryView.
|
|
159
|
+
trm_commons_1.Logger.info(`Latest version: ${oRegistryView.latest}`);
|
|
160
160
|
}
|
|
161
161
|
catch (e) {
|
|
162
162
|
trm_commons_1.Logger.warning(`Latest version: Unknown`);
|
package/dist/commands/content.js
CHANGED
|
@@ -13,21 +13,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.content = content;
|
|
16
|
-
const trm_core_1 = require("trm-core");
|
|
17
16
|
const commons_1 = require("./commons");
|
|
18
17
|
const utils_1 = require("../utils");
|
|
19
18
|
const chalk_1 = __importDefault(require("chalk"));
|
|
20
19
|
const trm_commons_1 = require("trm-commons");
|
|
21
20
|
function content(commandArgs) {
|
|
22
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
trm_commons_1.Logger.loading(`Searching package "${commandArgs.package}"...`);
|
|
24
|
-
const remotePackage = new trm_core_1.TrmPackage(commandArgs.package, commons_1.CommandContext.getRegistry());
|
|
25
|
-
const remoteManifest = yield remotePackage.fetchRemoteManifest(commandArgs.version);
|
|
26
|
-
trm_commons_1.Logger.loading(`Reading content...`);
|
|
27
22
|
var transports = {};
|
|
28
23
|
var aNodes = [];
|
|
29
24
|
var iOtherEntries = 0;
|
|
30
|
-
|
|
25
|
+
trm_commons_1.Logger.loading(`Searching package "${commandArgs.package}"...`);
|
|
26
|
+
const data = yield commons_1.CommandContext.getRegistry().getPackage(commandArgs.package, commandArgs.version);
|
|
27
|
+
const artifact = yield commons_1.CommandContext.getRegistry().downloadArtifact(commandArgs.package, commandArgs.version);
|
|
28
|
+
trm_commons_1.Logger.loading(`Reading content...`);
|
|
29
|
+
const packageContent = yield artifact.getContent({
|
|
31
30
|
tempDirPath: (0, utils_1.getTempFolder)(),
|
|
32
31
|
r3transDirPath: commandArgs.r3transPath,
|
|
33
32
|
useDocker: utils_1.Context.getInstance().getSettings().r3transDocker,
|
|
@@ -71,7 +70,7 @@ function content(commandArgs) {
|
|
|
71
70
|
});
|
|
72
71
|
}
|
|
73
72
|
var tree = {
|
|
74
|
-
text: `${chalk_1.default.bold(commandArgs.package)} v${
|
|
73
|
+
text: `${chalk_1.default.bold(commandArgs.package)} v${data.manifest.version} content`,
|
|
75
74
|
children: []
|
|
76
75
|
};
|
|
77
76
|
aNodes.forEach(node => {
|
|
@@ -130,9 +129,9 @@ function content(commandArgs) {
|
|
|
130
129
|
var header = ['Namespace', 'ABAP Package', 'TRM Transport', 'Customizing', 'Translations'];
|
|
131
130
|
var row1 = [];
|
|
132
131
|
var row2 = [];
|
|
133
|
-
if (
|
|
132
|
+
if (data.manifest.namespace) {
|
|
134
133
|
row1.push(`\u2714`);
|
|
135
|
-
row2.push(
|
|
134
|
+
row2.push(data.manifest.namespace.replicense);
|
|
136
135
|
}
|
|
137
136
|
else {
|
|
138
137
|
row1.push(`\u274C`);
|
package/dist/commands/import.js
CHANGED
|
@@ -51,12 +51,10 @@ function _import(commandArgs) {
|
|
|
51
51
|
packageData: {
|
|
52
52
|
name: 'dummy',
|
|
53
53
|
overwrite: commandArgs.overwrite,
|
|
54
|
-
integrity: commandArgs.integrity,
|
|
55
54
|
registry
|
|
56
55
|
},
|
|
57
56
|
installData: {
|
|
58
57
|
checks: {
|
|
59
|
-
safe: commandArgs.safe,
|
|
60
58
|
noDependencies: commandArgs.noDependencies,
|
|
61
59
|
noObjectTypes: commandArgs.noObjectTypes,
|
|
62
60
|
noSapEntries: commandArgs.noSapEntries
|
|
@@ -77,7 +75,7 @@ function _import(commandArgs) {
|
|
|
77
75
|
}
|
|
78
76
|
}
|
|
79
77
|
});
|
|
80
|
-
var sOutput = `${result.
|
|
78
|
+
var sOutput = `${result.manifest.name} v${result.manifest.version} installed`;
|
|
81
79
|
if (result.installTransport) {
|
|
82
80
|
sOutput += `, use ${result.installTransport.trkorr} transport in landscape`;
|
|
83
81
|
}
|
package/dist/commands/info.js
CHANGED
|
@@ -78,7 +78,7 @@ function info(commandArgs) {
|
|
|
78
78
|
const trmMissingDependencies = commons_1.CommandContext.missingTrmDependencies;
|
|
79
79
|
const nodeRfcVersion = _getNodeRfcVersion(npmGlobal);
|
|
80
80
|
const packages = yield commons_1.CommandContext.getSystemPackages();
|
|
81
|
-
const trmRest = packages.find(o => o.compareName("trm-rest") && o.compareRegistry(
|
|
81
|
+
const trmRest = packages.find(o => o.compareName("trm-rest") && o.compareRegistry(trm_core_1.RegistryProvider.getRegistry()));
|
|
82
82
|
var nodeR3transVersion;
|
|
83
83
|
try {
|
|
84
84
|
nodeR3transVersion = _getDependencyVersion("node-r3trans", "trm-core");
|
|
@@ -120,7 +120,7 @@ function info(commandArgs) {
|
|
|
120
120
|
if (dInstalledVersion) {
|
|
121
121
|
dText = ` -> ${dInstalledVersion}`;
|
|
122
122
|
try {
|
|
123
|
-
const dLatestVersion = (yield oTrmPackage.
|
|
123
|
+
const dLatestVersion = (yield oTrmPackage.registry.getPackage(oTrmPackage.packageName, 'latest')).manifest.version;
|
|
124
124
|
if ((0, semver_1.gte)(dInstalledVersion, dLatestVersion)) {
|
|
125
125
|
dText += ` ${chalk_1.default.bgGreen('LATEST')}`;
|
|
126
126
|
}
|
package/dist/commands/install.js
CHANGED
|
@@ -51,12 +51,10 @@ function install(commandArgs) {
|
|
|
51
51
|
name: commandArgs.package,
|
|
52
52
|
version: commandArgs.version,
|
|
53
53
|
overwrite: commandArgs.overwrite,
|
|
54
|
-
integrity: commandArgs.integrity,
|
|
55
54
|
registry: commons_1.CommandContext.getRegistry()
|
|
56
55
|
},
|
|
57
56
|
installData: {
|
|
58
57
|
checks: {
|
|
59
|
-
safe: commandArgs.safe,
|
|
60
58
|
noDependencies: commandArgs.noDependencies,
|
|
61
59
|
noObjectTypes: commandArgs.noObjectTypes,
|
|
62
60
|
noSapEntries: commandArgs.noSapEntries,
|
|
@@ -78,7 +76,7 @@ function install(commandArgs) {
|
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
78
|
});
|
|
81
|
-
var sOutput = `${result.
|
|
79
|
+
var sOutput = `${result.manifest.name} v${result.manifest.version} installed`;
|
|
82
80
|
if (result.installTransport) {
|
|
83
81
|
sOutput += `, use ${result.installTransport.trkorr} transport in landscape`;
|
|
84
82
|
}
|
package/dist/commands/login.js
CHANGED
|
@@ -23,7 +23,7 @@ function login(commandArgs) {
|
|
|
23
23
|
const inq1 = yield trm_commons_1.Inquirer.prompt({
|
|
24
24
|
type: "confirm",
|
|
25
25
|
name: "continue",
|
|
26
|
-
message: `Already logged in as "${whoami.
|
|
26
|
+
message: `Already logged in as "${whoami.user}". Do you want to logout?`,
|
|
27
27
|
default: false
|
|
28
28
|
});
|
|
29
29
|
continueLogin = inq1.continue;
|
|
@@ -15,7 +15,6 @@ const registryAlias_1 = require("../../registryAlias");
|
|
|
15
15
|
function pickRegistry() {
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
var registryAlias;
|
|
18
|
-
registryAlias_1.RegistryAlias.generatePublicRegistryAlias();
|
|
19
18
|
const allAliases = registryAlias_1.RegistryAlias.getAll();
|
|
20
19
|
if (allAliases.length === 1) {
|
|
21
20
|
registryAlias = registryAlias_1.RegistryAlias.get(allAliases[0].alias);
|
package/dist/commands/view.js
CHANGED
|
@@ -40,10 +40,10 @@ const _printVersionSection = (systemPackage, registryView) => {
|
|
|
40
40
|
trm_commons_1.Logger.error(`Installed on ${trm_core_1.SystemConnector.getDest()}: No`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
if (registryView
|
|
44
|
-
console.log(`Latest version available: ${registryView.
|
|
43
|
+
if (registryView) {
|
|
44
|
+
console.log(`Latest version available: ${registryView.latest}`);
|
|
45
45
|
if (oSystemManifest) {
|
|
46
|
-
if ((0, semver_1.eq)(oSystemManifest.version, registryView.
|
|
46
|
+
if ((0, semver_1.eq)(oSystemManifest.version, registryView.latest)) {
|
|
47
47
|
trm_commons_1.Logger.success(`Latest version installed: Yes`);
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
@@ -201,11 +201,11 @@ function view(commandArgs) {
|
|
|
201
201
|
else if (oRegistryView) {
|
|
202
202
|
dependencies = [];
|
|
203
203
|
printManifest = {
|
|
204
|
-
private: oRegistryView.private,
|
|
205
|
-
description: oRegistryView.shortDescription,
|
|
206
|
-
git: oRegistryView.git,
|
|
207
|
-
website: oRegistryView.website,
|
|
208
|
-
license: oRegistryView.license
|
|
204
|
+
private: oRegistryView.manifest.private,
|
|
205
|
+
description: oRegistryView.manifest.shortDescription,
|
|
206
|
+
git: oRegistryView.manifest.git,
|
|
207
|
+
website: oRegistryView.manifest.website,
|
|
208
|
+
license: oRegistryView.manifest.license
|
|
209
209
|
};
|
|
210
210
|
}
|
|
211
211
|
else {
|
package/dist/commands/whoami.js
CHANGED
|
@@ -16,19 +16,19 @@ function whoami(commandArgs) {
|
|
|
16
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
try {
|
|
18
18
|
const whoAmI = yield commons_1.CommandContext.getRegistry().whoAmI();
|
|
19
|
-
trm_commons_1.Logger.info(`Username: ${whoAmI.
|
|
20
|
-
if (whoAmI.
|
|
21
|
-
trm_commons_1.Logger.registryResponse(
|
|
19
|
+
trm_commons_1.Logger.info(`Username: ${whoAmI.user}`);
|
|
20
|
+
if (whoAmI.messages) {
|
|
21
|
+
whoAmI.messages.forEach(m => trm_commons_1.Logger.registryResponse(m));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
catch (e) {
|
|
25
|
-
if (e.status ===
|
|
26
|
-
trm_commons_1.Logger.error(`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
throw e;
|
|
25
|
+
if (e.status === 401) {
|
|
26
|
+
trm_commons_1.Logger.error(`You are not logged in`);
|
|
27
|
+
if (!commons_1.CommandContext.hasRegistryAuthData) {
|
|
28
|
+
trm_commons_1.Logger.error(`Run command "trm login" and follow instructions.`);
|
|
29
|
+
}
|
|
31
30
|
}
|
|
31
|
+
throw e;
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
3
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
4
8
|
const commander_1 = require("commander");
|
|
5
9
|
const utils_1 = require("./utils");
|
|
6
10
|
const trm_registry_types_1 = require("trm-registry-types");
|
|
11
|
+
dotenv_1.default.config();
|
|
7
12
|
const program = new commander_1.Command();
|
|
8
13
|
program
|
|
9
14
|
.name(`trm`)
|
|
10
|
-
.description(`TRM - Transport Request Manager CLI
|
|
11
|
-
|
|
12
|
-
Full documentation available at https://docs.trmregistry.com/
|
|
13
|
-
|
|
15
|
+
.description(`TRM - Transport Request Manager CLI
|
|
16
|
+
|
|
17
|
+
Full documentation available at https://docs.trmregistry.com/
|
|
18
|
+
|
|
14
19
|
© 2025 RegestaItalia https://www.regestaitalia.eu/`)
|
|
15
20
|
.version((0, utils_1.getClientVersion)());
|
|
16
21
|
const createAlias = program.command(`createAlias`)
|
|
@@ -69,13 +74,13 @@ const publish = program.command(`publish`)
|
|
|
69
74
|
.argument(`<package>`, `Name of the package to publish.`)
|
|
70
75
|
.argument(`[version]`, `Optional: Version of the package to publish. If not specified, check help text for details.`)
|
|
71
76
|
.description(`Publish package to registry.`)
|
|
72
|
-
.addHelpText(`before`, `When no version argument is defined, it will automatically set to:
|
|
73
|
-
- When it's the first publish: 1.0.0
|
|
74
|
-
- When it's already published: the latest available release with patch increased by 1
|
|
75
|
-
When it's the first publish, full manifest definition is asked.
|
|
76
|
-
When a release is already published, the latest available manifest is used but can be overwritten.
|
|
77
|
-
Translation transport is only generated for packages that contain one or more objects with translations (unless skipped by flag).
|
|
78
|
-
Customizing transport is only generated if a valid list of customizing transports is provided (unless skipped by flag).
|
|
77
|
+
.addHelpText(`before`, `When no version argument is defined, it will automatically set to:
|
|
78
|
+
- When it's the first publish: 1.0.0
|
|
79
|
+
- When it's already published: the latest available release with patch increased by 1
|
|
80
|
+
When it's the first publish, full manifest definition is asked.
|
|
81
|
+
When a release is already published, the latest available manifest is used but can be overwritten.
|
|
82
|
+
Translation transport is only generated for packages that contain one or more objects with translations (unless skipped by flag).
|
|
83
|
+
Customizing transport is only generated if a valid list of customizing transports is provided (unless skipped by flag).
|
|
79
84
|
If a default manifest with dependencies is provided in conjunction with the automatic dependency generation, results will be merged.`)
|
|
80
85
|
.option(`-p, --private`, `Publish package with private visibility.`)
|
|
81
86
|
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false)
|
|
@@ -106,9 +111,9 @@ const pack = program.command(`pack`)
|
|
|
106
111
|
.argument(`<package>`, `Name of the package to generate.`)
|
|
107
112
|
.argument(`[version]`, `Optional: Version of the package to generate. If not specified, check help text for details.`)
|
|
108
113
|
.description(`Save package locally.`)
|
|
109
|
-
.addHelpText(`before`, `When no version is defined, it will automatically set to 1.0.0.
|
|
110
|
-
Translation transport is only generated for packages that contain one or more objects with translations (unless skipped by flag).
|
|
111
|
-
Customizing transport is only generated if a valid list of customizing transports is provided (unless skipped by flag).
|
|
114
|
+
.addHelpText(`before`, `When no version is defined, it will automatically set to 1.0.0.
|
|
115
|
+
Translation transport is only generated for packages that contain one or more objects with translations (unless skipped by flag).
|
|
116
|
+
Customizing transport is only generated if a valid list of customizing transports is provided (unless skipped by flag).
|
|
112
117
|
If a default manifest with dependencies is provided in conjunction with the automatic dependency generation, results will be merged.`)
|
|
113
118
|
.option(`-o, --output <<outputPath>>`, `Output path.`)
|
|
114
119
|
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false)
|
|
@@ -169,7 +174,7 @@ const update = program.command(`update`)
|
|
|
169
174
|
.argument(`[package]`, `Name of the package to update.`)
|
|
170
175
|
.argument(`[version]`, `Optional: Target package version to update.`)
|
|
171
176
|
.description(`Update trm-client / Update package from registry into system.`)
|
|
172
|
-
.addHelpText(`before`, `When no package name is specified, trm-client will self-update. All options are invalid, in this case.
|
|
177
|
+
.addHelpText(`before`, `When no package name is specified, trm-client will self-update. All options are invalid, in this case.
|
|
173
178
|
When no version is specified, the latest will be installed.`)
|
|
174
179
|
.option(`-np, --noPrompts`, `No prompts (will force some decisions).`, false)
|
|
175
180
|
.option(`-sf, --safe`, `Safe install (needs package integrity).`, false)
|
|
@@ -217,7 +222,7 @@ const _import = program.command(`import <file>`)
|
|
|
217
222
|
const view = program.command(`view`)
|
|
218
223
|
.argument(`<package>`, `Name of the package to view.`)
|
|
219
224
|
.description(`View package.`)
|
|
220
|
-
.addHelpText(`before`, `Shows package details.
|
|
225
|
+
.addHelpText(`before`, `Shows package details.
|
|
221
226
|
If the package is not found on the system, it will automatically fall back to the data provided by the registry, granted it exists.`);
|
|
222
227
|
(0, utils_1.registerCommand)(view, {
|
|
223
228
|
requiresConnection: true,
|
|
@@ -11,9 +11,8 @@ export declare class RegistryAlias {
|
|
|
11
11
|
private static getSystemAliasFilePath;
|
|
12
12
|
static getAll(): RegistryAliasData[];
|
|
13
13
|
static get(name: string): RegistryAlias;
|
|
14
|
-
static create(name: string, endpointUrl: string, auth?: any): RegistryAlias;
|
|
14
|
+
static create(name: string, endpointUrl: string, auth?: any, data?: RegistryAliasData[]): RegistryAlias;
|
|
15
15
|
static delete(name: string): void;
|
|
16
16
|
static update(name: string, auth?: any): void;
|
|
17
|
-
static generatePublicRegistryAlias(): void;
|
|
18
17
|
static getTemporaryInstance(endpoint: string, auth?: any): RegistryAlias;
|
|
19
18
|
}
|
|
@@ -58,7 +58,7 @@ class RegistryAlias {
|
|
|
58
58
|
return this;
|
|
59
59
|
}
|
|
60
60
|
getRegistry() {
|
|
61
|
-
return new trm_core_1.
|
|
61
|
+
return new trm_core_1.RegistryV2(this._endpoint, this._name);
|
|
62
62
|
}
|
|
63
63
|
static generateFile(content, filePath) {
|
|
64
64
|
if (!filePath) {
|
|
@@ -105,6 +105,9 @@ class RegistryAlias {
|
|
|
105
105
|
auth: JSON.parse(oIni[sAlias].auth)
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
|
+
if (!aAlias.find(o => o.alias.trim().toLowerCase() === trm_core_1.PUBLIC_RESERVED_KEYWORD)) {
|
|
109
|
+
RegistryAlias.create(trm_core_1.PUBLIC_RESERVED_KEYWORD, trm_core_1.PUBLIC_RESERVED_KEYWORD, null, aAlias);
|
|
110
|
+
}
|
|
108
111
|
return aAlias;
|
|
109
112
|
}
|
|
110
113
|
static get(name) {
|
|
@@ -121,19 +124,21 @@ class RegistryAlias {
|
|
|
121
124
|
throw new Error(`Registry "${name}" not found.`);
|
|
122
125
|
}
|
|
123
126
|
}
|
|
124
|
-
static create(name, endpointUrl, auth = {}) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
static create(name, endpointUrl, auth = {}, data) {
|
|
128
|
+
if (!data) {
|
|
129
|
+
data = this.getAll();
|
|
130
|
+
}
|
|
131
|
+
const alreadyExists = data.find(o => o.alias.trim().toUpperCase() === name.trim().toUpperCase()) ? true : false;
|
|
127
132
|
if (alreadyExists) {
|
|
128
133
|
throw new Error(`Alias already exists. Choose an unique name.`);
|
|
129
134
|
}
|
|
130
135
|
else {
|
|
131
|
-
|
|
136
|
+
data.push({
|
|
132
137
|
alias: name,
|
|
133
138
|
endpointUrl: endpointUrl.trim().toLowerCase() === trm_core_1.PUBLIC_RESERVED_KEYWORD ? null : endpointUrl,
|
|
134
139
|
auth
|
|
135
140
|
});
|
|
136
|
-
this.generateFile(
|
|
141
|
+
this.generateFile(data);
|
|
137
142
|
}
|
|
138
143
|
return new RegistryAlias(endpointUrl, name).setAuthData(auth);
|
|
139
144
|
}
|
|
@@ -153,12 +158,6 @@ class RegistryAlias {
|
|
|
153
158
|
this.generateFile(aAlias);
|
|
154
159
|
}
|
|
155
160
|
}
|
|
156
|
-
static generatePublicRegistryAlias() {
|
|
157
|
-
const allRegistries = this.getAll();
|
|
158
|
-
if (!allRegistries.find(o => o.alias.trim().toLowerCase() === trm_core_1.PUBLIC_RESERVED_KEYWORD)) {
|
|
159
|
-
RegistryAlias.create(trm_core_1.PUBLIC_RESERVED_KEYWORD, trm_core_1.PUBLIC_RESERVED_KEYWORD, null);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
161
|
static getTemporaryInstance(endpoint, auth) {
|
|
163
162
|
return new RegistryAlias(endpoint, endpoint).setAuthData(auth);
|
|
164
163
|
}
|
|
@@ -62,7 +62,7 @@ class SystemAlias {
|
|
|
62
62
|
if (!connection) {
|
|
63
63
|
throw new Error(`Unknown connection type "${this.type}". Possible values are ${utils_1.Context.getInstance().getConnections().map(k => k.name).join(', ')}.`);
|
|
64
64
|
}
|
|
65
|
-
connection.setData(this._data);
|
|
65
|
+
connection.setData(this._data.data);
|
|
66
66
|
return connection.getSystemConnector();
|
|
67
67
|
}
|
|
68
68
|
static generateFile(content, filePath) {
|
|
@@ -100,6 +100,7 @@ class DummyConnector {
|
|
|
100
100
|
this.readClassDescriptions = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
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
|
+
this.getWbTransports = () => __awaiter(this, void 0, void 0, function* () { return this._throw(); });
|
|
103
104
|
}
|
|
104
105
|
_throw() {
|
|
105
106
|
throw new Error(`No connection to SAP server.`);
|
|
@@ -38,7 +38,7 @@ function checkCliUpdate(print) {
|
|
|
38
38
|
trm_commons_1.Logger.warning(`A newer release of trm-client (v${chalk_1.default.bold(latestVersion)}) is available.`);
|
|
39
39
|
trm_commons_1.Logger.warning(`New releases can introduce features and bug fixes.`);
|
|
40
40
|
trm_commons_1.Logger.warning(`It is recommended to update your client by running the command`);
|
|
41
|
-
trm_commons_1.Logger.warning(` ${chalk_1.default.bold('trm update')}
|
|
41
|
+
trm_commons_1.Logger.warning(` ${chalk_1.default.bold('trm update')}`);
|
|
42
42
|
trm_commons_1.Logger.warning(` `);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -122,11 +122,11 @@ function executeCommand(args) {
|
|
|
122
122
|
registry = registryAlias.getRegistry();
|
|
123
123
|
try {
|
|
124
124
|
const registryPing = yield registry.ping();
|
|
125
|
-
if (registryPing.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
trm_commons_1.Logger.registryResponse(
|
|
125
|
+
if (registryAuthBlacklist.includes(registryPing.authentication_type)) {
|
|
126
|
+
throw new Error(`This command is not supported by registry "${registry.name}".`);
|
|
127
|
+
}
|
|
128
|
+
if (registryPing.messages) {
|
|
129
|
+
registryPing.messages.forEach(m => trm_commons_1.Logger.registryResponse(m));
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
catch (e) {
|
|
@@ -147,19 +147,19 @@ function executeCommand(args) {
|
|
|
147
147
|
commons_1.CommandContext.registry = registry;
|
|
148
148
|
commons_1.CommandContext.hasRegistryAuthData = !!registryAlias.authData;
|
|
149
149
|
trm_core_1.RegistryProvider.registry.push(registry);
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
append = !k.compare(aliasRegistry);
|
|
156
|
-
}
|
|
157
|
-
});
|
|
150
|
+
}
|
|
151
|
+
registryAlias_1.RegistryAlias.getAll().forEach(o => {
|
|
152
|
+
var append = true;
|
|
153
|
+
var aliasRegistry = registryAlias_1.RegistryAlias.get(o.alias).getRegistry();
|
|
154
|
+
trm_core_1.RegistryProvider.registry.forEach(k => {
|
|
158
155
|
if (append) {
|
|
159
|
-
|
|
156
|
+
append = !k.compare(aliasRegistry);
|
|
160
157
|
}
|
|
161
158
|
});
|
|
162
|
-
|
|
159
|
+
if (append) {
|
|
160
|
+
trm_core_1.RegistryProvider.registry.push(aliasRegistry);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
163
|
if (requiresConnection) {
|
|
164
164
|
var system;
|
|
165
165
|
if (args.systemAlias) {
|
package/dist/utils/logError.js
CHANGED
|
@@ -17,7 +17,6 @@ const trm_core_1 = require("trm-core");
|
|
|
17
17
|
const util_1 = require("util");
|
|
18
18
|
const chalk_1 = __importDefault(require("chalk"));
|
|
19
19
|
const trm_commons_1 = require("trm-commons");
|
|
20
|
-
const commons_1 = require("../commands/commons");
|
|
21
20
|
const _getUnauthorizedError = () => {
|
|
22
21
|
return `User "${trm_core_1.SystemConnector.getLogonUser()}" is not authorized to execute TRM RFC functions. Follow this guide https://docs.trmregistry.com/#/server/docs/setup?id=user-authorization-maintenance.`;
|
|
23
22
|
};
|
|
@@ -41,13 +40,9 @@ function logError(err) {
|
|
|
41
40
|
trm_commons_1.Logger.log(`User exited prompt: ${originalException.message}`, true);
|
|
42
41
|
return;
|
|
43
42
|
}
|
|
44
|
-
else if (originalException.name === '
|
|
43
|
+
else if (originalException.name === 'TrmRegistryV2Error') {
|
|
45
44
|
if (originalException.status) {
|
|
46
45
|
sError = `${chalk_1.default.black.bgRed(originalException.status)} ${sError}`;
|
|
47
|
-
if ((originalException.status === 401 || /whoami$/.test(originalException.axiosError.request.path)) && !commons_1.CommandContext.hasRegistryAuthData) {
|
|
48
|
-
aError.push(`${chalk_1.default.black.bgRed(originalException.status)} You are not logged in!`);
|
|
49
|
-
aError.push(`${chalk_1.default.black.bgRed(originalException.status)} Run command "trm login" and follow instructions.`);
|
|
50
|
-
}
|
|
51
46
|
}
|
|
52
47
|
}
|
|
53
48
|
else if (originalException.name === 'TrmRFCClient') {
|
package/package.json
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "trm-client",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "TRM (Transport Request Manager) Client",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"changelog.txt",
|
|
9
|
-
"dist",
|
|
10
|
-
"!dist/test.js",
|
|
11
|
-
"!dist/test.js.map",
|
|
12
|
-
"!dist/test.d.ts",
|
|
13
|
-
"!dist/.env",
|
|
14
|
-
"!dist/dev_rfc.log"
|
|
15
|
-
],
|
|
16
|
-
"bin": {
|
|
17
|
-
"trm": "dist/index.js"
|
|
18
|
-
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"cleanBuild": "rimraf dist/",
|
|
21
|
-
"build": "npm run cleanBuild && tsc --sourceMap false",
|
|
22
|
-
"prepublishOnly": "npm run build"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"trm",
|
|
26
|
-
"abap"
|
|
27
|
-
],
|
|
28
|
-
"homepage": "https://www.trmregistry.com",
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "git+https://github.com/RegestaItalia/trm-client.git"
|
|
32
|
-
},
|
|
33
|
-
"author": {
|
|
34
|
-
"name": "Simone Gaffurini",
|
|
35
|
-
"email": "simone.gaffurini@regestaitalia.it"
|
|
36
|
-
},
|
|
37
|
-
"license": "MIT",
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"@esm2cjs/normalize-url": "^8.0.0",
|
|
40
|
-
"chalk": "^4.1.2",
|
|
41
|
-
"commander": "^11.0.0",
|
|
42
|
-
"dotenv": "^
|
|
43
|
-
"execa": "^9.6.0",
|
|
44
|
-
"get-latest-version": "^5.1.0",
|
|
45
|
-
"get-root-path": "^2.0.2",
|
|
46
|
-
"ini": "^4.1.1",
|
|
47
|
-
"lodash": "^4.17.21",
|
|
48
|
-
"semver": "^7.5.4",
|
|
49
|
-
"trm-commons": "^3.4.2",
|
|
50
|
-
"trm-core": "^
|
|
51
|
-
"trm-registry-types": "^
|
|
52
|
-
"xml2js": "^0.6.2"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"trm-commons": "^3.4.2"
|
|
56
|
-
},
|
|
57
|
-
"devDependencies": {
|
|
58
|
-
"@types/ini": "^1.3.31",
|
|
59
|
-
"@types/lodash": "^4.17.20",
|
|
60
|
-
"@types/node": "^20.4.8",
|
|
61
|
-
"@types/semver": "^7.5.3",
|
|
62
|
-
"@types/xml2js": "^0.4.11",
|
|
63
|
-
"rimraf": "^6.0.1"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "trm-client",
|
|
3
|
+
"version": "6.0.0",
|
|
4
|
+
"description": "TRM (Transport Request Manager) Client",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"changelog.txt",
|
|
9
|
+
"dist",
|
|
10
|
+
"!dist/test.js",
|
|
11
|
+
"!dist/test.js.map",
|
|
12
|
+
"!dist/test.d.ts",
|
|
13
|
+
"!dist/.env",
|
|
14
|
+
"!dist/dev_rfc.log"
|
|
15
|
+
],
|
|
16
|
+
"bin": {
|
|
17
|
+
"trm": "dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"cleanBuild": "rimraf dist/",
|
|
21
|
+
"build": "npm run cleanBuild && tsc --sourceMap false",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"trm",
|
|
26
|
+
"abap"
|
|
27
|
+
],
|
|
28
|
+
"homepage": "https://www.trmregistry.com",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/RegestaItalia/trm-client.git"
|
|
32
|
+
},
|
|
33
|
+
"author": {
|
|
34
|
+
"name": "Simone Gaffurini",
|
|
35
|
+
"email": "simone.gaffurini@regestaitalia.it"
|
|
36
|
+
},
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@esm2cjs/normalize-url": "^8.0.0",
|
|
40
|
+
"chalk": "^4.1.2",
|
|
41
|
+
"commander": "^11.0.0",
|
|
42
|
+
"dotenv": "^17.2.2",
|
|
43
|
+
"execa": "^9.6.0",
|
|
44
|
+
"get-latest-version": "^5.1.0",
|
|
45
|
+
"get-root-path": "^2.0.2",
|
|
46
|
+
"ini": "^4.1.1",
|
|
47
|
+
"lodash": "^4.17.21",
|
|
48
|
+
"semver": "^7.5.4",
|
|
49
|
+
"trm-commons": "^3.4.2",
|
|
50
|
+
"trm-core": "^8.0.1",
|
|
51
|
+
"trm-registry-types": "^2.0.0",
|
|
52
|
+
"xml2js": "^0.6.2"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"trm-commons": "^3.4.2"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@types/ini": "^1.3.31",
|
|
59
|
+
"@types/lodash": "^4.17.20",
|
|
60
|
+
"@types/node": "^20.4.8",
|
|
61
|
+
"@types/semver": "^7.5.3",
|
|
62
|
+
"@types/xml2js": "^0.4.11",
|
|
63
|
+
"rimraf": "^6.0.1"
|
|
64
|
+
}
|
|
65
|
+
}
|