@abaplint/core 2.114.9 → 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
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(): {
|
|
@@ -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);
|