trm-core 9.5.1 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/changelog.txt +5 -0
- package/dist/actions/install/readTadir.js +8 -3
- package/dist/actions/install/setInstallDevclass.js +1 -2
- package/dist/commons/adjustTrmServerRestDevclass.d.ts +1 -0
- package/dist/commons/adjustTrmServerRestDevclass.js +6 -0
- package/dist/commons/index.d.ts +1 -0
- package/dist/commons/index.js +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -29,6 +29,20 @@ TRM introduces **package-based software delivery** to the SAP ecosystem, bringin
|
|
|
29
29
|
|
|
30
30
|
Full documentation can be seen at [https://docs.trmregistry.com/](https://docs.trmregistry.com).
|
|
31
31
|
|
|
32
|
+
# Usage
|
|
33
|
+
|
|
34
|
+
`trm-core` is a low-level library and is **not intended to be used directly** by end users.
|
|
35
|
+
|
|
36
|
+
In order to interact with SAP systems, `trm-core` must be consumed by a compatible client implementation.
|
|
37
|
+
|
|
38
|
+
## CLI Client
|
|
39
|
+
|
|
40
|
+
Install the official CLI client via npm:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install trm-client -g
|
|
44
|
+
```
|
|
45
|
+
|
|
32
46
|
# Contributing
|
|
33
47
|
Like every other TRM open-source projects, contributions are always welcomed ❤️.
|
|
34
48
|
|
package/changelog.txt
CHANGED
|
@@ -23,11 +23,16 @@ exports.readTadir = {
|
|
|
23
23
|
}
|
|
24
24
|
trm_commons_1.Logger.log(`TADIR TADIR: ${JSON.stringify(context.runtime.packageTransportsData.tadir)}`, true);
|
|
25
25
|
var existingObjects = [];
|
|
26
|
+
const checkTadir = context.runtime.packageTransportsData.tadir.map(o => {
|
|
27
|
+
return Object.assign(Object.assign({}, o), {
|
|
28
|
+
devclass: context.runtime.isTrmServerRest ? (0, commons_1.adjustTrmServerRestDevclass)(o.devclass) : o.devclass
|
|
29
|
+
});
|
|
30
|
+
});
|
|
26
31
|
if (!systemConnector_1.SystemConnector.getSupportedBulk().getTransportObjects) {
|
|
27
|
-
existingObjects = yield systemConnector_1.SystemConnector.getExistingObjects(
|
|
32
|
+
existingObjects = yield systemConnector_1.SystemConnector.getExistingObjects(checkTadir);
|
|
28
33
|
}
|
|
29
34
|
else {
|
|
30
|
-
existingObjects = yield systemConnector_1.SystemConnector.getExistingObjectsBulk(
|
|
35
|
+
existingObjects = yield systemConnector_1.SystemConnector.getExistingObjectsBulk(checkTadir);
|
|
31
36
|
}
|
|
32
37
|
trm_commons_1.Logger.log(`TADIR object that already exist in system: ${JSON.stringify(existingObjects)}`, true);
|
|
33
38
|
var throwExistingObjectsError = false;
|
|
@@ -39,7 +44,7 @@ exports.readTadir = {
|
|
|
39
44
|
const rootDevclass = rootPackage.getDevclass();
|
|
40
45
|
if (rootDevclass) {
|
|
41
46
|
const subpackages = (yield systemConnector_1.SystemConnector.getSubpackages(rootDevclass)).map(o => o.devclass);
|
|
42
|
-
existingObjects.
|
|
47
|
+
existingObjects.forEach(o => {
|
|
43
48
|
if (subpackages.includes(o.devclass) || rootDevclass === o.devclass) {
|
|
44
49
|
trm_commons_1.Logger.log(`${o.pgmid} ${o.object} ${o.objName} already in system but devclass ${o.devclass} is part of the same trm package in update`, true);
|
|
45
50
|
}
|
|
@@ -60,8 +60,7 @@ exports.setInstallDevclass = {
|
|
|
60
60
|
const replacement = context.rawInput.installData.installDevclass.replacements.find(o => o.originalDevclass === t.devclass);
|
|
61
61
|
if (updateNamespace) {
|
|
62
62
|
if (!replacement && updateNamespace === '$' && context.runtime.isTrmServerRest) {
|
|
63
|
-
adaptDevclassName =
|
|
64
|
-
adaptDevclassName = adaptDevclassName.replace(new RegExp(`^/ATRM/REST`, 'gmi'), '$TRM_REST');
|
|
63
|
+
adaptDevclassName = (0, commons_1.adjustTrmServerRestDevclass)(adaptDevclassName);
|
|
65
64
|
}
|
|
66
65
|
else {
|
|
67
66
|
adaptDevclassName = adaptDevclassName.replace(new RegExp(`^${originalNamespace}`, 'gmi'), updateNamespace);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function adjustTrmServerRestDevclass(devclass: string): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adjustTrmServerRestDevclass = adjustTrmServerRestDevclass;
|
|
4
|
+
function adjustTrmServerRestDevclass(devclass) {
|
|
5
|
+
return devclass.replace(new RegExp(`^/ATRM/SERVER`, 'gmi'), '$TRM').replace(new RegExp(`^/ATRM/REST`, 'gmi'), '$TRM_REST');
|
|
6
|
+
}
|
package/dist/commons/index.d.ts
CHANGED
package/dist/commons/index.js
CHANGED
|
@@ -30,3 +30,4 @@ __exportStar(require("./getNodePackage"), exports);
|
|
|
30
30
|
__exportStar(require("./getCoreTrmDependencies"), exports);
|
|
31
31
|
__exportStar(require("./checkCoreTrmDependencies"), exports);
|
|
32
32
|
__exportStar(require("./jsonStringifyWithKeyOrder"), exports);
|
|
33
|
+
__exportStar(require("./adjustTrmServerRestDevclass"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trm-core",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.0",
|
|
4
4
|
"description": "TRM (Transport Request Manager) Core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"xml-js": "^1.6.11"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"trm-commons": "^
|
|
71
|
+
"trm-commons": "^5.0.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/adm-zip": "^0.5.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@types/stack-trace": "^0.0.33",
|
|
85
85
|
"@types/uuid": "^9.0.8",
|
|
86
86
|
"rimraf": "^6.0.1",
|
|
87
|
-
"trm-commons": "^
|
|
87
|
+
"trm-commons": "^5.0.0",
|
|
88
88
|
"ts-node": "^10.9.2",
|
|
89
89
|
"typescript": "^5.8.2"
|
|
90
90
|
},
|