@abaplint/cli 2.113.96 → 2.113.98
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 +34 -24
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -40842,7 +40842,7 @@ class CDSArithmetics extends combi_1.Expression {
|
|
|
40842
40842
|
const paren = (0, combi_1.seq)("(", val, (0, combi_1.plusPrio)(operatorValue), ")");
|
|
40843
40843
|
const noParen = (0, combi_1.seq)(val, (0, combi_1.plusPrio)(operatorValue));
|
|
40844
40844
|
// todo: this is pretty bad, it needs a rewrite
|
|
40845
|
-
return (0, combi_1.altPrio)((0, combi_1.seq)(paren, (0, combi_1.
|
|
40845
|
+
return (0, combi_1.altPrio)((0, combi_1.seq)(paren, (0, combi_1.starPrio)(operatorValue)), noParen);
|
|
40846
40846
|
}
|
|
40847
40847
|
}
|
|
40848
40848
|
exports.CDSArithmetics = CDSArithmetics;
|
|
@@ -40933,9 +40933,10 @@ class CDSCase extends combi_1.Expression {
|
|
|
40933
40933
|
getRunnable() {
|
|
40934
40934
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
|
|
40935
40935
|
const value = (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSString, CDSCase, _1.CDSCast, _1.CDSArithmetics, name);
|
|
40936
|
-
const
|
|
40937
|
-
const
|
|
40938
|
-
|
|
40936
|
+
const thenValue = (0, combi_1.altPrio)((0, combi_1.seq)("(", value, ")"), value);
|
|
40937
|
+
const simple = (0, combi_1.seq)((0, combi_1.altPrio)(_1.CDSFunction, name), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", thenValue)));
|
|
40938
|
+
const complex = (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", thenValue));
|
|
40939
|
+
return (0, combi_1.seq)("CASE", (0, combi_1.altPrio)(complex, simple), (0, combi_1.optPrio)((0, combi_1.seq)("ELSE", value)), "END");
|
|
40939
40940
|
}
|
|
40940
40941
|
}
|
|
40941
40942
|
exports.CDSCase = CDSCase;
|
|
@@ -41005,11 +41006,12 @@ const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@
|
|
|
41005
41006
|
class CDSCondition extends combi_1.Expression {
|
|
41006
41007
|
getRunnable() {
|
|
41007
41008
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", (0, combi_1.altPrio)(_1.CDSString, _1.CDSName))));
|
|
41008
|
-
const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, name);
|
|
41009
|
+
const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, _1.CDSAggregate, name);
|
|
41009
41010
|
const operators = (0, combi_1.altPrio)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "<", ">", "LIKE", "NOT LIKE");
|
|
41010
|
-
const compare = (0, combi_1.seq)(
|
|
41011
|
-
const is = (0, combi_1.seq)(
|
|
41012
|
-
const
|
|
41011
|
+
const compare = (0, combi_1.seq)(operators, (0, combi_1.altPrio)(left, cds_integer_1.CDSInteger));
|
|
41012
|
+
const is = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
|
|
41013
|
+
const between = (0, combi_1.seq)("BETWEEN", left, "AND", left);
|
|
41014
|
+
const condition = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), left, (0, combi_1.altPrio)(compare, is, between));
|
|
41013
41015
|
const paren = (0, combi_1.seq)("(", CDSCondition, ")");
|
|
41014
41016
|
return (0, combi_1.seq)((0, combi_1.altPrio)(condition, paren), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.altPrio)("AND", "OR"), (0, combi_1.altPrio)(condition, paren))));
|
|
41015
41017
|
}
|
|
@@ -41107,7 +41109,7 @@ const cds_name_1 = __webpack_require__(/*! ./cds_name */ "./node_modules/@abapli
|
|
|
41107
41109
|
class CDSDefineTableFunction extends combi_1.Expression {
|
|
41108
41110
|
getRunnable() {
|
|
41109
41111
|
const methodName = (0, combi_1.seq)(cds_name_1.CDSName, "=", ">", cds_name_1.CDSName);
|
|
41110
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE TABLE FUNCTION"), cds_name_1.CDSName, (0, combi_1.optPrio)(_1.CDSWithParameters), (0, combi_1.str)("RETURNS {"), (0, combi_1.plus)((0, combi_1.seq)(cds_name_1.CDSName, ":", _1.CDSType, ";")), (0, combi_1.str)("} IMPLEMENTED BY METHOD"), methodName, (0, combi_1.opt)(";"));
|
|
41112
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE TABLE FUNCTION"), cds_name_1.CDSName, (0, combi_1.optPrio)(_1.CDSWithParameters), (0, combi_1.str)("RETURNS {"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.optPrio)("KEY"), cds_name_1.CDSName, ":", _1.CDSType, ";")), (0, combi_1.str)("} IMPLEMENTED BY METHOD"), methodName, (0, combi_1.opt)(";"));
|
|
41111
41113
|
}
|
|
41112
41114
|
}
|
|
41113
41115
|
exports.CDSDefineTableFunction = CDSDefineTableFunction;
|
|
@@ -41157,7 +41159,7 @@ const cds_as_1 = __webpack_require__(/*! ./cds_as */ "./node_modules/@abaplint/c
|
|
|
41157
41159
|
const cds_cast_1 = __webpack_require__(/*! ./cds_cast */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js");
|
|
41158
41160
|
class CDSElement extends combi_1.Expression {
|
|
41159
41161
|
getRunnable() {
|
|
41160
|
-
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
|
|
41162
|
+
return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)("(", _1.CDSCase, ")"), (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
|
|
41161
41163
|
}
|
|
41162
41164
|
}
|
|
41163
41165
|
exports.CDSElement = CDSElement;
|
|
@@ -41233,6 +41235,13 @@ class CDSFunction extends combi_1.Expression {
|
|
|
41233
41235
|
const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41234
41236
|
const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41235
41237
|
const mod = (0, combi_1.seq)("MOD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41238
|
+
const replace = (0, combi_1.seq)("REPLACE", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41239
|
+
const lpad = (0, combi_1.seq)("LPAD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41240
|
+
const rpad = (0, combi_1.seq)("RPAD", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41241
|
+
const instr = (0, combi_1.seq)("INSTR", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41242
|
+
const length = (0, combi_1.seq)("LENGTH", "(", _1.CDSFunctionInput, ")");
|
|
41243
|
+
const ltrim = (0, combi_1.seq)("LTRIM", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41244
|
+
const rtrim = (0, combi_1.seq)("RTRIM", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41236
41245
|
const left = (0, combi_1.seq)("LEFT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41237
41246
|
const right = (0, combi_1.seq)("RIGHT", "(", _1.CDSFunctionInput, ",", _1.CDSFunctionInput, ")");
|
|
41238
41247
|
const conversionInput = (0, combi_1.seq)(_1.CDSName, "=", ">", _1.CDSFunctionInput);
|
|
@@ -41240,7 +41249,7 @@ class CDSFunction extends combi_1.Expression {
|
|
|
41240
41249
|
const unitConversion = (0, combi_1.seq)("UNIT_CONVERSION", "(", conversionInputs, ")");
|
|
41241
41250
|
const currencyConversion = (0, combi_1.seq)("CURRENCY_CONVERSION", "(", conversionInputs, ")");
|
|
41242
41251
|
const decimalShift = (0, combi_1.seq)("DECIMAL_SHIFT", "(", conversionInputs, ")");
|
|
41243
|
-
return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, upper, lower, abs, ceil, floor, round, div, division, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right, unitConversion, currencyConversion, decimalShift);
|
|
41252
|
+
return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, upper, lower, abs, ceil, floor, round, div, division, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, bintohex, hextobin, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp, mod, left, right, lpad, rpad, instr, length, ltrim, rtrim, replace, unitConversion, currencyConversion, decimalShift);
|
|
41244
41253
|
}
|
|
41245
41254
|
}
|
|
41246
41255
|
exports.CDSFunction = CDSFunction;
|
|
@@ -53813,7 +53822,7 @@ class Registry {
|
|
|
53813
53822
|
}
|
|
53814
53823
|
static abaplintVersion() {
|
|
53815
53824
|
// magic, see build script "version.sh"
|
|
53816
|
-
return "2.113.
|
|
53825
|
+
return "2.113.98";
|
|
53817
53826
|
}
|
|
53818
53827
|
getDDICReferences() {
|
|
53819
53828
|
return this.ddicReferences;
|
|
@@ -55955,6 +55964,7 @@ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/c
|
|
|
55955
55964
|
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
55956
55965
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
55957
55966
|
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
55967
|
+
const expressions_1 = __webpack_require__(/*! ../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
|
|
55958
55968
|
class CDSLegacyViewConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
55959
55969
|
}
|
|
55960
55970
|
exports.CDSLegacyViewConf = CDSLegacyViewConf;
|
|
@@ -55991,19 +56001,17 @@ v755 and up`,
|
|
|
55991
56001
|
&& this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {
|
|
55992
56002
|
return [];
|
|
55993
56003
|
}
|
|
55994
|
-
if (o.getType() !== "DDLS") {
|
|
56004
|
+
if (o.getType() !== "DDLS" || !(o instanceof objects_1.DataDefinition)) {
|
|
55995
56005
|
return [];
|
|
55996
56006
|
}
|
|
55997
|
-
|
|
55998
|
-
|
|
55999
|
-
|
|
56000
|
-
|
|
56001
|
-
|
|
56002
|
-
|
|
56003
|
-
|
|
56004
|
-
|
|
56005
|
-
issues.push(issue_1.Issue.atRow(file, 1, "CDS Legacy View", this.getMetadata().key, this.getConfig().severity));
|
|
56006
|
-
}
|
|
56007
|
+
const tree = o.getTree();
|
|
56008
|
+
if (tree === undefined) {
|
|
56009
|
+
return []; // parser error
|
|
56010
|
+
}
|
|
56011
|
+
if (tree.get() instanceof expressions_1.CDSDefineView && tree.findDirectTokenByText("ENTITY") === undefined) {
|
|
56012
|
+
const file = o.findSourceFile();
|
|
56013
|
+
if (file) {
|
|
56014
|
+
issues.push(issue_1.Issue.atRow(file, 1, "CDS Legacy View", this.getMetadata().key, this.getConfig().severity));
|
|
56007
56015
|
}
|
|
56008
56016
|
}
|
|
56009
56017
|
return issues;
|
|
@@ -56060,7 +56068,9 @@ class CDSParserError {
|
|
|
56060
56068
|
const hasError = object.hasParserError();
|
|
56061
56069
|
const file = object.findSourceFile();
|
|
56062
56070
|
if (hasError === true && file) {
|
|
56063
|
-
|
|
56071
|
+
const empty = file.getRaw().length === 0 ? ", empty file" : "";
|
|
56072
|
+
const message = "CDS Parser error" + empty;
|
|
56073
|
+
issues.push(issue_1.Issue.atRow(file, 1, message, this.getMetadata().key, this.getConfig().severity));
|
|
56064
56074
|
}
|
|
56065
56075
|
}
|
|
56066
56076
|
return issues;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.98",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.113.
|
|
41
|
+
"@abaplint/core": "^2.113.98",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.10",
|
|
46
|
-
"@types/node": "^22.10.
|
|
46
|
+
"@types/node": "^22.10.9",
|
|
47
47
|
"@types/progress": "^2.0.7",
|
|
48
48
|
"chai": "^4.5.0",
|
|
49
49
|
"chalk": "^5.4.1",
|