@abaplint/cli 2.101.24 → 2.101.26
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/build/cli.js +51 -15
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -48453,7 +48453,7 @@ class Registry {
|
|
|
48453
48453
|
}
|
|
48454
48454
|
static abaplintVersion() {
|
|
48455
48455
|
// magic, see build script "version.sh"
|
|
48456
|
-
return "2.101.
|
|
48456
|
+
return "2.101.26";
|
|
48457
48457
|
}
|
|
48458
48458
|
getDDICReferences() {
|
|
48459
48459
|
return this.ddicReferences;
|
|
@@ -53487,6 +53487,10 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
53487
53487
|
return found;
|
|
53488
53488
|
}
|
|
53489
53489
|
}
|
|
53490
|
+
found = this.outlineCorresponding(low, high, lowFile, highSyntax);
|
|
53491
|
+
if (found) {
|
|
53492
|
+
return found;
|
|
53493
|
+
}
|
|
53490
53494
|
found = this.downportSelectFields(low, high, lowFile, highSyntax);
|
|
53491
53495
|
if (found) {
|
|
53492
53496
|
return found;
|
|
@@ -54655,15 +54659,12 @@ ${indentation}${uniqueName}`;
|
|
|
54655
54659
|
if (!(low.get() instanceof _statement_1.Unknown)) {
|
|
54656
54660
|
return undefined;
|
|
54657
54661
|
}
|
|
54658
|
-
else if (!(high.get() instanceof Statements.Move)) {
|
|
54659
|
-
return undefined;
|
|
54660
|
-
}
|
|
54661
54662
|
for (const child of high.findAllExpressionsRecursive(Expressions.StringTemplate)) {
|
|
54662
54663
|
const templateTokens = child.getChildren();
|
|
54663
54664
|
if (templateTokens.length !== 3
|
|
54664
54665
|
|| templateTokens[0].getFirstToken().getStr() !== "|{"
|
|
54665
54666
|
|| templateTokens[2].getFirstToken().getStr() !== "}|") {
|
|
54666
|
-
|
|
54667
|
+
continue;
|
|
54667
54668
|
}
|
|
54668
54669
|
const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);
|
|
54669
54670
|
const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();
|
|
@@ -55080,6 +55081,43 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
55080
55081
|
}
|
|
55081
55082
|
return undefined;
|
|
55082
55083
|
}
|
|
55084
|
+
outlineCorresponding(low, high, lowFile, highSyntax) {
|
|
55085
|
+
var _a;
|
|
55086
|
+
if (!(low.get() instanceof _statement_1.Unknown)) {
|
|
55087
|
+
return undefined;
|
|
55088
|
+
}
|
|
55089
|
+
const allSources = high.findAllExpressionsRecursive(Expressions.Source);
|
|
55090
|
+
for (const s of allSources) {
|
|
55091
|
+
const firstToken = s.getFirstToken();
|
|
55092
|
+
if (firstToken.getStr().toUpperCase() !== "CORRESPONDING") {
|
|
55093
|
+
continue;
|
|
55094
|
+
}
|
|
55095
|
+
const correspondingBody = s.findDirectExpression(Expressions.CorrespondingBody);
|
|
55096
|
+
const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
|
|
55097
|
+
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
55098
|
+
let type = this.findType(s, lowFile, highSyntax);
|
|
55099
|
+
if (type === undefined) {
|
|
55100
|
+
if (high.get() instanceof Statements.Move && high.findDirectExpression(Expressions.Source) === s) {
|
|
55101
|
+
type = "LIKE " + ((_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens());
|
|
55102
|
+
}
|
|
55103
|
+
if (type === undefined) {
|
|
55104
|
+
continue;
|
|
55105
|
+
}
|
|
55106
|
+
}
|
|
55107
|
+
else {
|
|
55108
|
+
type = "TYPE " + type;
|
|
55109
|
+
}
|
|
55110
|
+
const abap = `DATA ${uniqueName} ${type}.\n` +
|
|
55111
|
+
indentation + `CLEAR ${uniqueName}.\n` + // might be called inside a loop
|
|
55112
|
+
indentation + `MOVE-CORRESPONDING ${correspondingBody === null || correspondingBody === void 0 ? void 0 : correspondingBody.concatTokens()} TO ${uniqueName}.\n` +
|
|
55113
|
+
indentation;
|
|
55114
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);
|
|
55115
|
+
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), s.getLastToken().getEnd(), uniqueName);
|
|
55116
|
+
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
55117
|
+
return issue_1.Issue.atToken(lowFile, firstToken, "Downport CORRESPONDING", this.getMetadata().key, this.conf.severity, fix);
|
|
55118
|
+
}
|
|
55119
|
+
return undefined;
|
|
55120
|
+
}
|
|
55083
55121
|
outlineValue(low, high, lowFile, highSyntax) {
|
|
55084
55122
|
var _a, _b, _c;
|
|
55085
55123
|
if (!(low.get() instanceof _statement_1.Unknown)) {
|
|
@@ -70972,7 +71010,9 @@ module.exports = toXml;
|
|
|
70972
71010
|
/*!*********************************************************************!*\
|
|
70973
71011
|
!*** ./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js ***!
|
|
70974
71012
|
\*********************************************************************/
|
|
70975
|
-
/***/ ((module) => {
|
|
71013
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
71014
|
+
|
|
71015
|
+
const util = __webpack_require__(/*! ../util */ "./node_modules/fast-xml-parser/src/util.js");
|
|
70976
71016
|
|
|
70977
71017
|
//TODO: handle comments
|
|
70978
71018
|
function readDocType(xmlData, i){
|
|
@@ -71116,20 +71156,16 @@ function isNotation(xmlData, i){
|
|
|
71116
71156
|
return false
|
|
71117
71157
|
}
|
|
71118
71158
|
|
|
71119
|
-
//an entity name should not contains special characters that may be used in regex
|
|
71120
|
-
//Eg !?\\\/[]$%{}^&*()<>
|
|
71121
|
-
const specialChar = "!?\\\/[]$%{}^&*()<>|+";
|
|
71122
|
-
|
|
71123
71159
|
function validateEntityName(name){
|
|
71124
|
-
|
|
71125
|
-
|
|
71126
|
-
|
|
71127
|
-
|
|
71128
|
-
return name;
|
|
71160
|
+
if (util.isName(name))
|
|
71161
|
+
return name;
|
|
71162
|
+
else
|
|
71163
|
+
throw new Error(`Invalid entity name ${name}`);
|
|
71129
71164
|
}
|
|
71130
71165
|
|
|
71131
71166
|
module.exports = readDocType;
|
|
71132
71167
|
|
|
71168
|
+
|
|
71133
71169
|
/***/ }),
|
|
71134
71170
|
|
|
71135
71171
|
/***/ "./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.101.
|
|
3
|
+
"version": "2.101.26",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.101.
|
|
41
|
+
"@abaplint/core": "^2.101.26",
|
|
42
42
|
"@types/chai": "^4.3.5",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.2",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"eslint": "^8.43.0",
|
|
51
51
|
"glob": "^7.2.3",
|
|
52
52
|
"json5": "^2.2.3",
|
|
53
|
-
"memfs": "^
|
|
53
|
+
"memfs": "^4.2.0",
|
|
54
54
|
"minimist": "^1.2.8",
|
|
55
55
|
"mocha": "^10.2.0",
|
|
56
56
|
"progress": "^2.0.3",
|