trm-core 6.1.15 → 6.1.17
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.
|
@@ -50,7 +50,7 @@ exports.findDependencies = {
|
|
|
50
50
|
if (aUnknownDependencyDevclass.length > 0) {
|
|
51
51
|
logger_1.Logger.error(`Package "${context.rawInput.packageData.devclass}" has ${aUnknownDependencyDevclass.length} missing ${aUnknownDependencyDevclass.length === 1 ? 'dependency' : 'dependencies'}:`);
|
|
52
52
|
aUnknownDependencyDevclass.forEach((d, i) => {
|
|
53
|
-
logger_1.Logger.error(` (${i + 1}
|
|
53
|
+
logger_1.Logger.error(` (${i + 1}/${aUnknownDependencyDevclass.length}) ${d}`);
|
|
54
54
|
});
|
|
55
55
|
throw new Error(`Resolve missing dependencies by publishing them as TRM packages.`);
|
|
56
56
|
}
|
|
@@ -136,6 +136,35 @@ class Manifest {
|
|
|
136
136
|
oAbapXml['asx:abap']['asx:values']['TRM_MANIFEST']['REPLICENSE'] = {
|
|
137
137
|
"_text": manifest.namespace.replicense
|
|
138
138
|
};
|
|
139
|
+
if (Array.isArray(manifest.namespace.texts)) {
|
|
140
|
+
var texts = [];
|
|
141
|
+
manifest.namespace.texts.forEach(o => {
|
|
142
|
+
var obj = {};
|
|
143
|
+
if (o.description) {
|
|
144
|
+
obj['DESCRIPTION'] = {
|
|
145
|
+
"_text": o.description
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
if (o.language) {
|
|
149
|
+
obj['LANGUAGE'] = {
|
|
150
|
+
"_text": o.language
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
if (o.owner) {
|
|
154
|
+
obj['OWNER'] = {
|
|
155
|
+
"_text": o.owner
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
if (Object.keys(obj).length > 0) {
|
|
159
|
+
texts.push(obj);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
if (texts.length > 0) {
|
|
163
|
+
oAbapXml['asx:abap']['asx:values']['TRM_MANIFEST']['REPLICENSE_T'] = {
|
|
164
|
+
"item": texts
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
139
168
|
}
|
|
140
169
|
if (manifest.authors) {
|
|
141
170
|
var authors = [];
|
|
@@ -470,7 +499,7 @@ class Manifest {
|
|
|
470
499
|
return manifestClone;
|
|
471
500
|
}
|
|
472
501
|
static fromAbapXml(sXml) {
|
|
473
|
-
var _a, _b, _c, _d, _e, _f;
|
|
502
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
474
503
|
var manifest;
|
|
475
504
|
const oAbapXml = xml.xml2js(sXml, { compact: true });
|
|
476
505
|
var oAbapManifest;
|
|
@@ -516,11 +545,30 @@ class Manifest {
|
|
|
516
545
|
if (oAbapManifest.license && oAbapManifest.license.text) {
|
|
517
546
|
manifest.license = oAbapManifest.license.text;
|
|
518
547
|
}
|
|
519
|
-
if (oAbapManifest.replicense
|
|
548
|
+
if (oAbapManifest.replicense) {
|
|
520
549
|
manifest.namespace = {
|
|
521
550
|
replicense: oAbapManifest.replicense.text,
|
|
522
551
|
texts: []
|
|
523
552
|
};
|
|
553
|
+
if (oAbapManifest.replicenseT && oAbapManifest.replicenseT.item) {
|
|
554
|
+
if (Array.isArray(oAbapManifest.replicenseT.item)) {
|
|
555
|
+
manifest.namespace.texts = oAbapManifest.replicenseT.item.map(o => {
|
|
556
|
+
var _a, _b, _c;
|
|
557
|
+
return {
|
|
558
|
+
description: (_a = o.description) === null || _a === void 0 ? void 0 : _a.text,
|
|
559
|
+
language: (_b = o.language) === null || _b === void 0 ? void 0 : _b.text,
|
|
560
|
+
owner: (_c = o.owner) === null || _c === void 0 ? void 0 : _c.text
|
|
561
|
+
};
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
else {
|
|
565
|
+
manifest.namespace.texts = [{
|
|
566
|
+
description: (_a = oAbapManifest.replicenseT.item.description) === null || _a === void 0 ? void 0 : _a.text,
|
|
567
|
+
language: (_b = oAbapManifest.replicenseT.item.language) === null || _b === void 0 ? void 0 : _b.text,
|
|
568
|
+
owner: (_c = oAbapManifest.replicenseT.item.owner) === null || _c === void 0 ? void 0 : _c.text
|
|
569
|
+
}];
|
|
570
|
+
}
|
|
571
|
+
}
|
|
524
572
|
}
|
|
525
573
|
if (oAbapManifest.keywords && oAbapManifest.keywords.item) {
|
|
526
574
|
if (Array.isArray(oAbapManifest.keywords.item)) {
|
|
@@ -542,8 +590,8 @@ class Manifest {
|
|
|
542
590
|
}
|
|
543
591
|
else {
|
|
544
592
|
manifest.authors = [{
|
|
545
|
-
name: (
|
|
546
|
-
email: (
|
|
593
|
+
name: (_d = oAbapManifest.authors.item.name) === null || _d === void 0 ? void 0 : _d.text,
|
|
594
|
+
email: (_e = oAbapManifest.authors.item.email) === null || _e === void 0 ? void 0 : _e.text
|
|
547
595
|
}];
|
|
548
596
|
}
|
|
549
597
|
}
|
|
@@ -561,10 +609,10 @@ class Manifest {
|
|
|
561
609
|
}
|
|
562
610
|
else {
|
|
563
611
|
manifest.dependencies = [{
|
|
564
|
-
name: (
|
|
565
|
-
integrity: (
|
|
566
|
-
version: (
|
|
567
|
-
registry: (
|
|
612
|
+
name: (_f = oAbapManifest.dependencies.item.name) === null || _f === void 0 ? void 0 : _f.text,
|
|
613
|
+
integrity: (_g = oAbapManifest.dependencies.item.integrity) === null || _g === void 0 ? void 0 : _g.text,
|
|
614
|
+
version: (_h = oAbapManifest.dependencies.item.version) === null || _h === void 0 ? void 0 : _h.text,
|
|
615
|
+
registry: (_j = oAbapManifest.dependencies.item.registry) === null || _j === void 0 ? void 0 : _j.text
|
|
568
616
|
}];
|
|
569
617
|
}
|
|
570
618
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trm-core",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.17",
|
|
4
4
|
"description": "TRM (Transport Request Manager) Core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"!dist/test.*"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"
|
|
12
|
+
"cleanBuild": "rimraf dist/",
|
|
13
|
+
"build": "npm run cleanBuild && tsc --sourceMap false",
|
|
13
14
|
"test": "jest",
|
|
14
15
|
"prepublishOnly": "npm run build"
|
|
15
16
|
},
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
"@types/xmldom": "^0.1.32",
|
|
74
75
|
"jest": "^29.7.0",
|
|
75
76
|
"ts-jest": "^29.1.2",
|
|
76
|
-
"ts-node": "^10.9.2"
|
|
77
|
+
"ts-node": "^10.9.2",
|
|
78
|
+
"rimraf": "^6.0.1"
|
|
77
79
|
}
|
|
78
80
|
}
|