trm-client 8.1.1 → 9.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/changelog.txt
CHANGED
|
@@ -155,7 +155,7 @@ class AbstractCommand {
|
|
|
155
155
|
}
|
|
156
156
|
else {
|
|
157
157
|
Commons.Logger.loading(`Reading "${Core.SystemConnector.getDest()}" packages...`);
|
|
158
|
-
this.systemPackages = yield Core.SystemConnector.getInstalledPackages(true, true
|
|
158
|
+
this.systemPackages = yield Core.SystemConnector.getInstalledPackages(true, true);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
return this.systemPackages;
|
|
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.Dirty = void 0;
|
|
16
16
|
const trm_commons_1 = require("trm-commons");
|
|
17
|
+
const trm_core_1 = require("trm-core");
|
|
17
18
|
const AbstractCommand_1 = require("../AbstractCommand");
|
|
18
19
|
const chalk_1 = __importDefault(require("chalk"));
|
|
19
20
|
class Dirty extends AbstractCommand_1.AbstractCommand {
|
|
@@ -23,7 +24,7 @@ class Dirty extends AbstractCommand_1.AbstractCommand {
|
|
|
23
24
|
this.registerOpts.ignoreRegistryUnreachable = true;
|
|
24
25
|
this.command.description(`Show local objetcs that flagged a package as dirty.`);
|
|
25
26
|
this.command.argument(`<package>`, `Name of the dirty package to check.`);
|
|
26
|
-
this.command.option(`--latest-only`, `Show only the latest transports with changes`,
|
|
27
|
+
this.command.option(`--latest-only`, `Show only the latest transports with changes`, false);
|
|
27
28
|
}
|
|
28
29
|
keepFirstByKey(entries) {
|
|
29
30
|
const seen = new Set();
|
|
@@ -47,17 +48,32 @@ class Dirty extends AbstractCommand_1.AbstractCommand {
|
|
|
47
48
|
throw new Error(`Package "${this.args.package}" is not flagged as dirty!`);
|
|
48
49
|
}
|
|
49
50
|
trm_commons_1.Logger.warning(`Package "${this.args.package}" is flagged as dirty!`);
|
|
50
|
-
trm_commons_1.Logger.info(`This means that one (or more) of its objects were added/removed/changed and
|
|
51
|
-
trm_commons_1.Logger.info(`Here's a list
|
|
51
|
+
trm_commons_1.Logger.info(`This means that one (or more) of its objects were added/removed/changed and its TRM manifest is ${chalk_1.default.bold('INVALID')}.`);
|
|
52
|
+
trm_commons_1.Logger.info(`Here's a list of all entries that flagged the package.`);
|
|
52
53
|
var dirtyEntries = dirtyPackage.getDirtyEntries();
|
|
54
|
+
const iDirtyEntries = dirtyEntries.length;
|
|
53
55
|
if (this.args.latestOnly) {
|
|
54
|
-
trm_commons_1.Logger.info(`Showing only the latest transports
|
|
56
|
+
trm_commons_1.Logger.info(`Showing only the latest transports.`);
|
|
55
57
|
dirtyEntries = this.keepFirstByKey(dirtyEntries);
|
|
56
58
|
}
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const grouped = Array.from(dirtyEntries.reduce((map, item) => {
|
|
60
|
+
if (!map.has(item.trkorr)) {
|
|
61
|
+
map.set(item.trkorr, {
|
|
62
|
+
text: `${trm_core_1.Transport.getTransportIcon()} ${item.trkorr}${item.as4Text ? ': ' + item.as4Text : ''}`.trim(),
|
|
63
|
+
children: [],
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
map.get(item.trkorr).children.push({
|
|
67
|
+
text: `${item.pgmid} ${item.object} ${item.objName}`,
|
|
68
|
+
children: [],
|
|
69
|
+
});
|
|
70
|
+
return map;
|
|
71
|
+
}, new Map())
|
|
72
|
+
.values());
|
|
73
|
+
trm_commons_1.Logger.tree({
|
|
74
|
+
text: `${iDirtyEntries} (total) dirty entr${iDirtyEntries > 1 ? 'ies' : 'y'}`,
|
|
75
|
+
children: grouped
|
|
76
|
+
});
|
|
61
77
|
});
|
|
62
78
|
}
|
|
63
79
|
}
|
|
@@ -24,10 +24,11 @@ class FindDependencies extends AbstractCommand_1.AbstractCommand {
|
|
|
24
24
|
this.command.argument(`<sap package>`, `Name of the SAP package to check.`);
|
|
25
25
|
this.command.option(`--sap-entries`, `Show list of required SAP entries/objects.`, false);
|
|
26
26
|
this.command.option(`--no-prompts`, `No prompts (will force some decisions).`);
|
|
27
|
+
this.command.option(`--trm-found-in`, `Expand TRM dependencies with "Found in" objects.`, false);
|
|
27
28
|
}
|
|
28
29
|
handler() {
|
|
29
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
const dependencies = yield trm_core_1.SystemConnector.getPackageDependencies(this.args.sapPackage.toUpperCase(), true
|
|
31
|
+
const dependencies = yield trm_core_1.SystemConnector.getPackageDependencies(this.args.sapPackage.toUpperCase(), true);
|
|
31
32
|
const trmPackageDependencies = dependencies.trmPackageDependencies;
|
|
32
33
|
const sapPackageDependencies = dependencies.abapPackageDependencies.filter(o => !o.isCustomerPackage);
|
|
33
34
|
const custPackageDependencies = dependencies.abapPackageDependencies.filter(o => o.isCustomerPackage);
|
|
@@ -36,7 +37,7 @@ class FindDependencies extends AbstractCommand_1.AbstractCommand {
|
|
|
36
37
|
children: [{
|
|
37
38
|
text: `TRM Packages (${trmPackageDependencies.length})`,
|
|
38
39
|
children: trmPackageDependencies.map(o => {
|
|
39
|
-
|
|
40
|
+
var packageLog = {
|
|
40
41
|
text: `${o.trmPackage.packageName}`,
|
|
41
42
|
children: [{
|
|
42
43
|
text: `Registry: ${o.trmPackage.registry.getRegistryType() === trm_core_1.RegistryType.PUBLIC ? 'public' : o.trmPackage.registry.endpoint}`,
|
|
@@ -46,6 +47,18 @@ class FindDependencies extends AbstractCommand_1.AbstractCommand {
|
|
|
46
47
|
children: []
|
|
47
48
|
}]
|
|
48
49
|
};
|
|
50
|
+
if (this.args.trmFoundIn) {
|
|
51
|
+
packageLog.children.push({
|
|
52
|
+
text: `Found in ${o.foundIn.length} object${o.foundIn.length > 1 ? 's' : ''}`,
|
|
53
|
+
children: o.foundIn.map(f => {
|
|
54
|
+
return {
|
|
55
|
+
text: `${f.object} ${f.objName}`,
|
|
56
|
+
children: []
|
|
57
|
+
};
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return packageLog;
|
|
49
62
|
})
|
|
50
63
|
}, {
|
|
51
64
|
text: `Customer packages (${custPackageDependencies.length})`,
|
|
@@ -116,6 +129,9 @@ class FindDependencies extends AbstractCommand_1.AbstractCommand {
|
|
|
116
129
|
}
|
|
117
130
|
}
|
|
118
131
|
trm_commons_1.Logger.tree(tree);
|
|
132
|
+
if (trmPackageDependencies.length > 0 && !this.args.trmFoundIn) {
|
|
133
|
+
trm_commons_1.Logger.warning(`To expand and see where TRM dependencies were found, execute with option --trm-found-in`);
|
|
134
|
+
}
|
|
119
135
|
});
|
|
120
136
|
}
|
|
121
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trm-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "TRM (Transport Request Manager) Client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"sanitize-filename": "^1.6.3",
|
|
49
49
|
"semver": "^7.7.4",
|
|
50
|
-
"trm-commons": "^
|
|
51
|
-
"trm-core": "^9.
|
|
50
|
+
"trm-commons": "^4.0.0",
|
|
51
|
+
"trm-core": "^9.3.0",
|
|
52
52
|
"trm-registry-types": "^2.1.0",
|
|
53
53
|
"xml2js": "^0.6.2"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"trm-commons": "^
|
|
56
|
+
"trm-commons": "^4.0.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/ini": "^1.3.31",
|