@abaplint/core 2.114.8 → 2.114.10
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/abaplint.d.ts +4 -0
- package/build/src/objects/rename/rename_global_class.js +1 -0
- package/build/src/objects/rename/rename_icf_service.js +25 -0
- package/build/src/objects/rename/renamer.js +3 -0
- package/build/src/objects/rename/renamer_helper.js +13 -0
- package/build/src/objects/web_mime.js +16 -1
- package/build/src/registry.js +1 -1
- package/build/src/rules/uncaught_exception.js +8 -7
- package/package.json +4 -4
package/build/abaplint.d.ts
CHANGED
|
@@ -7642,6 +7642,10 @@ declare class WebMIME extends AbstractObject {
|
|
|
7642
7642
|
getType(): string;
|
|
7643
7643
|
getAllowedNaming(): IAllowedNaming;
|
|
7644
7644
|
getDescription(): string | undefined;
|
|
7645
|
+
getParameter(name: string): string | undefined;
|
|
7646
|
+
getParameters(): {
|
|
7647
|
+
[key: string]: string;
|
|
7648
|
+
};
|
|
7645
7649
|
setDirty(): void;
|
|
7646
7650
|
getDataFile(): IFile | undefined;
|
|
7647
7651
|
parse(): {
|
|
@@ -46,6 +46,7 @@ class RenameGlobalClass {
|
|
|
46
46
|
changes = changes.concat(helper.renameFiles(obj, oldName, newName));
|
|
47
47
|
changes = changes.concat(helper.renameReferences(obj.getIdentifier(), oldName, newName));
|
|
48
48
|
changes = changes.concat(helper.renameDDICTABLReferences(obj, oldName, newName));
|
|
49
|
+
changes = changes.concat(helper.renameICFServiceHandlerReferences(oldName, newName));
|
|
49
50
|
return {
|
|
50
51
|
documentChanges: changes,
|
|
51
52
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RenameICFService = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const renamer_helper_1 = require("./renamer_helper");
|
|
6
|
+
class RenameICFService {
|
|
7
|
+
constructor(reg) {
|
|
8
|
+
this.reg = reg;
|
|
9
|
+
}
|
|
10
|
+
buildEdits(obj, oldName, newName) {
|
|
11
|
+
if (!(obj instanceof __1.ICFService)) {
|
|
12
|
+
throw new Error("RenameICFService, not a ICF Service");
|
|
13
|
+
}
|
|
14
|
+
let changes = [];
|
|
15
|
+
const helper = new renamer_helper_1.RenamerHelper(this.reg);
|
|
16
|
+
changes = changes.concat(helper.buildXMLFileEdits(obj, "ICF_NAME", oldName, newName));
|
|
17
|
+
changes = changes.concat(helper.buildXMLFileEdits(obj, "ORIG_NAME", oldName, newName));
|
|
18
|
+
changes = changes.concat(helper.renameFiles(obj, oldName, newName));
|
|
19
|
+
return {
|
|
20
|
+
documentChanges: changes,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.RenameICFService = RenameICFService;
|
|
25
|
+
//# sourceMappingURL=rename_icf_service.js.map
|
|
@@ -10,6 +10,7 @@ const rename_global_interface_1 = require("./rename_global_interface");
|
|
|
10
10
|
const rename_table_1 = require("./rename_table");
|
|
11
11
|
const rename_table_type_1 = require("./rename_table_type");
|
|
12
12
|
const rename_message_class_1 = require("./rename_message_class");
|
|
13
|
+
const rename_icf_service_1 = require("./rename_icf_service");
|
|
13
14
|
class Renamer {
|
|
14
15
|
constructor(reg) {
|
|
15
16
|
this.reg = reg;
|
|
@@ -59,6 +60,8 @@ class Renamer {
|
|
|
59
60
|
return new rename_global_interface_1.RenameGlobalInterface(this.reg);
|
|
60
61
|
case "MSAG":
|
|
61
62
|
return new rename_message_class_1.RenameMessageClass(this.reg);
|
|
63
|
+
case "SICF":
|
|
64
|
+
return new rename_icf_service_1.RenameICFService(this.reg);
|
|
62
65
|
default:
|
|
63
66
|
throw new Error("Renaming of " + type + " not yet supported");
|
|
64
67
|
}
|
|
@@ -162,6 +162,19 @@ class RenamerHelper {
|
|
|
162
162
|
}
|
|
163
163
|
return ret;
|
|
164
164
|
}
|
|
165
|
+
renameICFServiceHandlerReferences(oldName, newName) {
|
|
166
|
+
const changes = [];
|
|
167
|
+
const icfServices = this.reg.getObjectsByType("SICF");
|
|
168
|
+
for (const service of icfServices) {
|
|
169
|
+
const ICFService = service;
|
|
170
|
+
const xmlFile = service.getXMLFile();
|
|
171
|
+
if (xmlFile === undefined) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
changes.push(...this.buildXMLFileEdits(ICFService, "ICFHANDLER", oldName, newName));
|
|
175
|
+
}
|
|
176
|
+
return changes;
|
|
177
|
+
}
|
|
165
178
|
}
|
|
166
179
|
exports.RenamerHelper = RenamerHelper;
|
|
167
180
|
//# sourceMappingURL=renamer_helper.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WebMIME = void 0;
|
|
4
|
+
const xml_utils_1 = require("../xml_utils");
|
|
4
5
|
const _abstract_object_1 = require("./_abstract_object");
|
|
5
6
|
class WebMIME extends _abstract_object_1.AbstractObject {
|
|
6
7
|
getType() {
|
|
@@ -18,6 +19,16 @@ class WebMIME extends _abstract_object_1.AbstractObject {
|
|
|
18
19
|
this.parse();
|
|
19
20
|
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
|
|
20
21
|
}
|
|
22
|
+
getParameter(name) {
|
|
23
|
+
var _a;
|
|
24
|
+
this.parse();
|
|
25
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.params[name.toLowerCase()];
|
|
26
|
+
}
|
|
27
|
+
getParameters() {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
this.parse();
|
|
30
|
+
return (_b = (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.params) !== null && _b !== void 0 ? _b : {};
|
|
31
|
+
}
|
|
21
32
|
setDirty() {
|
|
22
33
|
this.parsedXML = undefined;
|
|
23
34
|
super.setDirty();
|
|
@@ -31,11 +42,12 @@ class WebMIME extends _abstract_object_1.AbstractObject {
|
|
|
31
42
|
return undefined;
|
|
32
43
|
}
|
|
33
44
|
parse() {
|
|
45
|
+
var _a;
|
|
34
46
|
if (this.parsedXML) {
|
|
35
47
|
return { updated: false, runtime: 0 };
|
|
36
48
|
}
|
|
37
49
|
const start = Date.now();
|
|
38
|
-
this.parsedXML = {};
|
|
50
|
+
this.parsedXML = { params: {} };
|
|
39
51
|
const parsed = super.parseRaw2();
|
|
40
52
|
if (parsed === undefined
|
|
41
53
|
|| parsed.abapGit === undefined
|
|
@@ -43,6 +55,9 @@ class WebMIME extends _abstract_object_1.AbstractObject {
|
|
|
43
55
|
return { updated: false, runtime: 0 };
|
|
44
56
|
}
|
|
45
57
|
this.parsedXML.description = parsed.abapGit["asx:abap"]["asx:values"].TEXT;
|
|
58
|
+
for (const param of (0, xml_utils_1.xmlToArray)((_a = parsed.abapGit["asx:abap"]["asx:values"].PARAMS) === null || _a === void 0 ? void 0 : _a.WWWPARAMS)) {
|
|
59
|
+
this.parsedXML.params[param.NAME.toLowerCase()] = param.VALUE;
|
|
60
|
+
}
|
|
46
61
|
const end = Date.now();
|
|
47
62
|
return { updated: true, runtime: end - start };
|
|
48
63
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -72,7 +72,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
72
72
|
return this.issues;
|
|
73
73
|
}
|
|
74
74
|
traverse(n, file) {
|
|
75
|
-
var _a, _b, _c, _d, _e
|
|
75
|
+
var _a, _b, _c, _d, _e;
|
|
76
76
|
const get = n.get();
|
|
77
77
|
if (get instanceof Structures.ClassDefinition
|
|
78
78
|
|| get instanceof Structures.Interface) {
|
|
@@ -87,13 +87,14 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
87
87
|
this.traverse(c, file);
|
|
88
88
|
}
|
|
89
89
|
this.sinked = previous;
|
|
90
|
-
for (const
|
|
91
|
-
|
|
90
|
+
for (const catchStructure of n.findDirectStructures(Structures.Catch)) {
|
|
91
|
+
for (const c of catchStructure.getChildren()) {
|
|
92
|
+
this.traverse(c, file);
|
|
93
|
+
}
|
|
92
94
|
}
|
|
93
|
-
for (const c of ((
|
|
95
|
+
for (const c of ((_b = n.findDirectStructure(Structures.Cleanup)) === null || _b === void 0 ? void 0 : _b.getChildren()) || []) {
|
|
94
96
|
this.traverse(c, file);
|
|
95
97
|
}
|
|
96
|
-
return;
|
|
97
98
|
}
|
|
98
99
|
else {
|
|
99
100
|
for (const c of n.getChildren()) {
|
|
@@ -122,10 +123,10 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
122
123
|
let name = undefined;
|
|
123
124
|
const concat = n.concatTokens().toUpperCase();
|
|
124
125
|
if (concat.startsWith("RAISE EXCEPTION TYPE ")) {
|
|
125
|
-
name = (
|
|
126
|
+
name = (_c = n.findFirstExpression(Expressions.ClassName)) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStr().toUpperCase();
|
|
126
127
|
}
|
|
127
128
|
else if (concat.startsWith("RAISE EXCEPTION NEW ")) {
|
|
128
|
-
name = (
|
|
129
|
+
name = (_e = (_d = n.findFirstExpression(Expressions.NewObject)) === null || _d === void 0 ? void 0 : _d.findFirstExpression(Expressions.TypeNameOrInfer)) === null || _e === void 0 ? void 0 : _e.getFirstToken().getStr().toUpperCase();
|
|
129
130
|
// todo: else its a normal Source, infer the type from it
|
|
130
131
|
}
|
|
131
132
|
this.check(name, n, file);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.114.
|
|
3
|
+
"version": "2.114.10",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.55.
|
|
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.3",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.39.1",
|
|
59
59
|
"mocha": "^11.7.5",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"fast-xml-parser": "^5.3.
|
|
66
|
+
"fast-xml-parser": "^5.3.3",
|
|
67
67
|
"json5": "^2.2.3",
|
|
68
68
|
"vscode-languageserver-types": "^3.17.5"
|
|
69
69
|
}
|