@abaplint/core 2.101.22 → 2.101.23
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/src/registry.js
CHANGED
|
@@ -4,7 +4,6 @@ exports.ObjectNaming = exports.ObjectNamingConf = void 0;
|
|
|
4
4
|
const issue_1 = require("../issue");
|
|
5
5
|
const _naming_rule_config_1 = require("./_naming_rule_config");
|
|
6
6
|
const _irule_1 = require("./_irule");
|
|
7
|
-
const Objects = require("../objects");
|
|
8
7
|
const name_validator_1 = require("../utils/name_validator");
|
|
9
8
|
class ObjectNamingConf extends _naming_rule_config_1.NamingRuleConfig {
|
|
10
9
|
constructor() {
|
|
@@ -45,6 +44,34 @@ class ObjectNamingConf extends _naming_rule_config_1.NamingRuleConfig {
|
|
|
45
44
|
this.ssst = "^Z";
|
|
46
45
|
/** The regex pattern for search helps */
|
|
47
46
|
this.shlp = "^Z";
|
|
47
|
+
/** The regex pattern for BADI Implementation */
|
|
48
|
+
this.sxci = "^Z";
|
|
49
|
+
/** The regex pattern for Enhancement Spot */
|
|
50
|
+
this.enhs = "^Z";
|
|
51
|
+
/** The regex pattern for Enhancement Implementation */
|
|
52
|
+
this.enho = "^Z";
|
|
53
|
+
/** The regex pattern for Customer enhancement projects */
|
|
54
|
+
this.cmod = "^Z";
|
|
55
|
+
/** The regex pattern for SAPscript form */
|
|
56
|
+
this.form = "^Z";
|
|
57
|
+
/** The regex pattern for Adobe Form Definition */
|
|
58
|
+
this.sfpf = "^Z";
|
|
59
|
+
/** The regex pattern for Adobe Interface Definition */
|
|
60
|
+
this.sfpi = "^Z";
|
|
61
|
+
/** The regex pattern for ABAP Query: Query */
|
|
62
|
+
this.aqqu = "^Z";
|
|
63
|
+
/** The regex pattern for ABAP Query: Functional area */
|
|
64
|
+
this.aqsg = "^Z";
|
|
65
|
+
/** The regex pattern for ABAP Query: User group */
|
|
66
|
+
this.aqbg = "^Z";
|
|
67
|
+
/** The regex pattern for Authorization Object */
|
|
68
|
+
this.suso = "^Z";
|
|
69
|
+
/** The regex pattern for Authorization Group */
|
|
70
|
+
this.sucu = "^Z";
|
|
71
|
+
/** The regex pattern for Web Dynpro Application */
|
|
72
|
+
this.wdya = "^Z";
|
|
73
|
+
/** The regex pattern for Web Dynpro Component */
|
|
74
|
+
this.wdyn = "^Z";
|
|
48
75
|
}
|
|
49
76
|
}
|
|
50
77
|
exports.ObjectNamingConf = ObjectNamingConf;
|
|
@@ -66,6 +93,9 @@ class ObjectNaming {
|
|
|
66
93
|
"Object name must not match pattern " + expected + ": " + actual;
|
|
67
94
|
}
|
|
68
95
|
getConfig() {
|
|
96
|
+
if (typeof this.conf === "boolean" && this.conf === true) {
|
|
97
|
+
return new ObjectNamingConf();
|
|
98
|
+
}
|
|
69
99
|
return this.conf;
|
|
70
100
|
}
|
|
71
101
|
setConfig(conf) {
|
|
@@ -76,66 +106,14 @@ class ObjectNaming {
|
|
|
76
106
|
}
|
|
77
107
|
run(obj) {
|
|
78
108
|
let message = undefined;
|
|
79
|
-
let pattern = "";
|
|
80
109
|
if (this.conf.patternKind === undefined) {
|
|
81
110
|
this.conf.patternKind = "required";
|
|
82
111
|
}
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
pattern = this.getConfig().intf || defaults.intf;
|
|
89
|
-
}
|
|
90
|
-
else if (obj instanceof Objects.Program) {
|
|
91
|
-
pattern = this.getConfig().prog || defaults.prog;
|
|
92
|
-
}
|
|
93
|
-
else if (obj instanceof Objects.FunctionGroup) {
|
|
94
|
-
pattern = this.getConfig().fugr || defaults.fugr;
|
|
95
|
-
}
|
|
96
|
-
else if (obj instanceof Objects.Table) {
|
|
97
|
-
pattern = this.getConfig().tabl || defaults.tabl;
|
|
98
|
-
}
|
|
99
|
-
else if (obj instanceof Objects.TableType) {
|
|
100
|
-
pattern = this.getConfig().ttyp || defaults.ttyp;
|
|
101
|
-
}
|
|
102
|
-
else if (obj instanceof Objects.DataElement) {
|
|
103
|
-
pattern = this.getConfig().dtel || defaults.dtel;
|
|
104
|
-
}
|
|
105
|
-
else if (obj instanceof Objects.Domain) {
|
|
106
|
-
pattern = this.getConfig().doma || defaults.doma;
|
|
107
|
-
}
|
|
108
|
-
else if (obj instanceof Objects.Transaction) {
|
|
109
|
-
pattern = this.getConfig().tran || defaults.tran;
|
|
110
|
-
}
|
|
111
|
-
else if (obj instanceof Objects.LockObject) {
|
|
112
|
-
pattern = this.getConfig().enqu || defaults.enqu;
|
|
113
|
-
}
|
|
114
|
-
else if (obj instanceof Objects.AuthorizationObject) {
|
|
115
|
-
pattern = this.getConfig().auth || defaults.auth;
|
|
116
|
-
}
|
|
117
|
-
else if (obj instanceof Objects.PackageInterface) {
|
|
118
|
-
pattern = this.getConfig().pinf || defaults.pinf;
|
|
119
|
-
}
|
|
120
|
-
else if (obj instanceof Objects.MessageClass) {
|
|
121
|
-
pattern = this.getConfig().msag || defaults.msag;
|
|
122
|
-
}
|
|
123
|
-
else if (obj instanceof Objects.Idoc) {
|
|
124
|
-
pattern = this.getConfig().idoc || defaults.idoc;
|
|
125
|
-
}
|
|
126
|
-
else if (obj instanceof Objects.Transformation) {
|
|
127
|
-
pattern = this.getConfig().xslt || defaults.xslt;
|
|
128
|
-
}
|
|
129
|
-
else if (obj instanceof Objects.SmartForm) {
|
|
130
|
-
pattern = this.getConfig().ssfo || defaults.ssfo;
|
|
131
|
-
}
|
|
132
|
-
else if (obj instanceof Objects.SmartStyle) {
|
|
133
|
-
pattern = this.getConfig().ssst || defaults.ssst;
|
|
134
|
-
}
|
|
135
|
-
else if (obj instanceof Objects.SearchHelp) {
|
|
136
|
-
pattern = this.getConfig().shlp || defaults.shlp;
|
|
137
|
-
}
|
|
138
|
-
if (pattern === "") {
|
|
112
|
+
const abapType = obj.getType().toLowerCase();
|
|
113
|
+
const config = this.getConfig();
|
|
114
|
+
// @ts-ignore
|
|
115
|
+
const pattern = config[abapType];
|
|
116
|
+
if (pattern === undefined) {
|
|
139
117
|
return [];
|
|
140
118
|
}
|
|
141
119
|
const regex = new RegExp(pattern, "i");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.101.
|
|
3
|
+
"version": "2.101.23",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.
|
|
53
|
+
"@microsoft/api-extractor": "^7.36.0",
|
|
54
54
|
"@types/chai": "^4.3.5",
|
|
55
55
|
"@types/mocha": "^10.0.1",
|
|
56
56
|
"@types/node": "^20.3.1",
|