@abaplint/core 2.115.4 → 2.115.6
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.
|
@@ -52,7 +52,7 @@ class ProxyObject extends _abstract_object_1.AbstractObject {
|
|
|
52
52
|
return result;
|
|
53
53
|
}
|
|
54
54
|
generateABAPObjects() {
|
|
55
|
-
var _a, _b, _c;
|
|
55
|
+
var _a, _b, _c, _d, _e;
|
|
56
56
|
this.parse();
|
|
57
57
|
const result = [];
|
|
58
58
|
if (!this.parsedXML) {
|
|
@@ -74,15 +74,26 @@ class ProxyObject extends _abstract_object_1.AbstractObject {
|
|
|
74
74
|
continue;
|
|
75
75
|
}
|
|
76
76
|
// Find parameters for this method
|
|
77
|
-
const
|
|
77
|
+
const importingParameters = this.parsedXML.proxyData.filter(i => i.R3_TYPE === "PAIM" && i.OBJ_NAME1 === method.OBJ_NAME1);
|
|
78
|
+
const exportingParameters = this.parsedXML.proxyData.filter(i => i.R3_TYPE === "PAEX" && i.OBJ_NAME1 === method.OBJ_NAME1);
|
|
78
79
|
code += ` METHODS ${methodName}\n`;
|
|
79
|
-
if (
|
|
80
|
+
if (importingParameters.length > 0) {
|
|
80
81
|
code += ` IMPORTING\n`;
|
|
81
|
-
for (let i = 0; i <
|
|
82
|
-
const param =
|
|
82
|
+
for (let i = 0; i < importingParameters.length; i++) {
|
|
83
|
+
const param = importingParameters[i];
|
|
83
84
|
const paramName = (_b = param.OBJ_NAME2) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
84
85
|
const paramType = (_c = param.OBJ_NAME_R) === null || _c === void 0 ? void 0 : _c.toLowerCase();
|
|
85
|
-
const isLast = i ===
|
|
86
|
+
const isLast = i === importingParameters.length - 1 && exportingParameters.length === 0;
|
|
87
|
+
code += ` ${paramName} TYPE ${paramType}${isLast ? "." : ""}\n`;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (exportingParameters.length > 0) {
|
|
91
|
+
code += ` EXPORTING\n`;
|
|
92
|
+
for (let i = 0; i < exportingParameters.length; i++) {
|
|
93
|
+
const param = exportingParameters[i];
|
|
94
|
+
const paramName = (_d = param.OBJ_NAME2) === null || _d === void 0 ? void 0 : _d.toLowerCase();
|
|
95
|
+
const paramType = (_e = param.OBJ_NAME_R) === null || _e === void 0 ? void 0 : _e.toLowerCase();
|
|
96
|
+
const isLast = i === exportingParameters.length - 1;
|
|
86
97
|
code += ` ${paramName} TYPE ${paramType}${isLast ? "." : ""}\n`;
|
|
87
98
|
}
|
|
88
99
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -71,7 +71,14 @@ class DoubleSpace extends _abap_rule_1.ABAPRule {
|
|
|
71
71
|
issues = issues.concat(this.checkParen(s, file));
|
|
72
72
|
}
|
|
73
73
|
issues = issues.concat(this.checkAfterColon(file));
|
|
74
|
-
|
|
74
|
+
// remove issues with the same starting position
|
|
75
|
+
const uniqueIssues = [];
|
|
76
|
+
for (const issue of issues) {
|
|
77
|
+
if (uniqueIssues.findIndex(i => i.getStart().equals(issue.getStart())) === -1) {
|
|
78
|
+
uniqueIssues.push(issue);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return uniqueIssues;
|
|
75
82
|
}
|
|
76
83
|
checkAfterColon(file) {
|
|
77
84
|
const issues = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.115.
|
|
3
|
+
"version": "2.115.6",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@microsoft/api-extractor": "^7.55.2",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
|
-
"@types/node": "^24.10.
|
|
56
|
+
"@types/node": "^24.10.4",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.39.2",
|
|
59
59
|
"mocha": "^11.7.5",
|