@abaplint/cli 2.113.95 → 2.113.97
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 +29 -26
- package/package.json +4 -4
package/build/cli.js
CHANGED
|
@@ -40737,7 +40737,8 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
|
|
|
40737
40737
|
const cds_annotation_array_1 = __webpack_require__(/*! ./cds_annotation_array */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_annotation_array.js");
|
|
40738
40738
|
class CDSAnnotation extends combi_1.Expression {
|
|
40739
40739
|
getRunnable() {
|
|
40740
|
-
|
|
40740
|
+
const nameWithSlash = (0, combi_1.seq)((0, combi_1.regex)(/^\w+$/), (0, combi_1.star)((0, combi_1.seq)("/", (0, combi_1.regex)(/^\w+$/))));
|
|
40741
|
+
return (0, combi_1.seq)((0, combi_1.regex)(/^@\w+$/), (0, combi_1.star)((0, combi_1.seq)(".", nameWithSlash)), (0, combi_1.opt)(":"), (0, combi_1.opt)((0, combi_1.alt)(cds_annotation_array_1.CDSAnnotationArray, _1.CDSAnnotationObject, _1.CDSAnnotationSimple)));
|
|
40741
40742
|
}
|
|
40742
40743
|
}
|
|
40743
40744
|
exports.CDSAnnotation = CDSAnnotation;
|
|
@@ -40841,7 +40842,7 @@ class CDSArithmetics extends combi_1.Expression {
|
|
|
40841
40842
|
const paren = (0, combi_1.seq)("(", val, (0, combi_1.plusPrio)(operatorValue), ")");
|
|
40842
40843
|
const noParen = (0, combi_1.seq)(val, (0, combi_1.plusPrio)(operatorValue));
|
|
40843
40844
|
// todo: this is pretty bad, it needs a rewrite
|
|
40844
|
-
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);
|
|
40845
40846
|
}
|
|
40846
40847
|
}
|
|
40847
40848
|
exports.CDSArithmetics = CDSArithmetics;
|
|
@@ -40907,7 +40908,7 @@ exports.CDSCardinality = void 0;
|
|
|
40907
40908
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
40908
40909
|
class CDSCardinality extends combi_1.Expression {
|
|
40909
40910
|
getRunnable() {
|
|
40910
|
-
const cardinality = (0, combi_1.seq)("[", (0, combi_1.alt)("0", "1"), (0, combi_1.opt)((0, combi_1.seq)(".", ".", (0, combi_1.alt)("0", "1", "*"))), "]");
|
|
40911
|
+
const cardinality = (0, combi_1.seq)("[", (0, combi_1.alt)("0", "1", "*"), (0, combi_1.opt)((0, combi_1.seq)(".", ".", (0, combi_1.alt)("0", "1", "*"))), "]");
|
|
40911
40912
|
return cardinality;
|
|
40912
40913
|
}
|
|
40913
40914
|
}
|
|
@@ -40932,9 +40933,10 @@ class CDSCase extends combi_1.Expression {
|
|
|
40932
40933
|
getRunnable() {
|
|
40933
40934
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
|
|
40934
40935
|
const value = (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSString, CDSCase, _1.CDSCast, _1.CDSArithmetics, name);
|
|
40935
|
-
const
|
|
40936
|
-
const
|
|
40937
|
-
|
|
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");
|
|
40938
40940
|
}
|
|
40939
40941
|
}
|
|
40940
40942
|
exports.CDSCase = CDSCase;
|
|
@@ -41006,9 +41008,10 @@ class CDSCondition extends combi_1.Expression {
|
|
|
41006
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))));
|
|
41007
41009
|
const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, name);
|
|
41008
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");
|
|
41009
|
-
const compare = (0, combi_1.seq)(
|
|
41010
|
-
const is = (0, combi_1.seq)(
|
|
41011
|
-
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));
|
|
41012
41015
|
const paren = (0, combi_1.seq)("(", CDSCondition, ")");
|
|
41013
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))));
|
|
41014
41017
|
}
|
|
@@ -41106,7 +41109,7 @@ const cds_name_1 = __webpack_require__(/*! ./cds_name */ "./node_modules/@abapli
|
|
|
41106
41109
|
class CDSDefineTableFunction extends combi_1.Expression {
|
|
41107
41110
|
getRunnable() {
|
|
41108
41111
|
const methodName = (0, combi_1.seq)(cds_name_1.CDSName, "=", ">", cds_name_1.CDSName);
|
|
41109
|
-
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE TABLE FUNCTION"), cds_name_1.CDSName, _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)(";"));
|
|
41110
41113
|
}
|
|
41111
41114
|
}
|
|
41112
41115
|
exports.CDSDefineTableFunction = CDSDefineTableFunction;
|
|
@@ -41156,7 +41159,7 @@ const cds_as_1 = __webpack_require__(/*! ./cds_as */ "./node_modules/@abaplint/c
|
|
|
41156
41159
|
const cds_cast_1 = __webpack_require__(/*! ./cds_cast */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_cast.js");
|
|
41157
41160
|
class CDSElement extends combi_1.Expression {
|
|
41158
41161
|
getRunnable() {
|
|
41159
|
-
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));
|
|
41160
41163
|
}
|
|
41161
41164
|
}
|
|
41162
41165
|
exports.CDSElement = CDSElement;
|
|
@@ -41516,8 +41519,9 @@ class CDSSelect extends combi_1.Expression {
|
|
|
41516
41519
|
getRunnable() {
|
|
41517
41520
|
const fields = (0, combi_1.seq)((0, combi_1.star)((0, combi_1.seq)(_1.CDSElement, ",")), _1.CDSElement);
|
|
41518
41521
|
const distinct = (0, combi_1.str)("DISTINCT");
|
|
41519
|
-
const
|
|
41520
|
-
|
|
41522
|
+
const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSElement)));
|
|
41523
|
+
const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
|
|
41524
|
+
return (0, combi_1.seq)("SELECT", (0, combi_1.optPrio)(distinct), (0, combi_1.opt)((0, combi_1.alt)("*", fields)), "FROM", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.star)(cds_association_1.CDSAssociation), (0, combi_1.star)(_1.CDSComposition), (0, combi_1.opt)(elements), (0, combi_1.optPrio)(_1.CDSWhere), (0, combi_1.optPrio)(_1.CDSGroupBy), (0, combi_1.optPrio)(_1.CDSHaving), (0, combi_1.optPrio)((0, combi_1.seq)("UNION", (0, combi_1.optPrio)("ALL"), CDSSelect)));
|
|
41521
41525
|
}
|
|
41522
41526
|
}
|
|
41523
41527
|
exports.CDSSelect = CDSSelect;
|
|
@@ -41628,7 +41632,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
|
|
|
41628
41632
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
41629
41633
|
class CDSWithParameters extends combi_1.Expression {
|
|
41630
41634
|
getRunnable() {
|
|
41631
|
-
const param = (0, combi_1.seq)(_1.CDSName, ":", _1.CDSType);
|
|
41635
|
+
const param = (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), _1.CDSName, ":", _1.CDSType);
|
|
41632
41636
|
return (0, combi_1.seq)("WITH PARAMETERS", param, (0, combi_1.star)((0, combi_1.seq)(",", param)));
|
|
41633
41637
|
}
|
|
41634
41638
|
}
|
|
@@ -53811,7 +53815,7 @@ class Registry {
|
|
|
53811
53815
|
}
|
|
53812
53816
|
static abaplintVersion() {
|
|
53813
53817
|
// magic, see build script "version.sh"
|
|
53814
|
-
return "2.113.
|
|
53818
|
+
return "2.113.97";
|
|
53815
53819
|
}
|
|
53816
53820
|
getDDICReferences() {
|
|
53817
53821
|
return this.ddicReferences;
|
|
@@ -55953,6 +55957,7 @@ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/c
|
|
|
55953
55957
|
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
55954
55958
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
55955
55959
|
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
55960
|
+
const expressions_1 = __webpack_require__(/*! ../cds/expressions */ "./node_modules/@abaplint/core/build/src/cds/expressions/index.js");
|
|
55956
55961
|
class CDSLegacyViewConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
55957
55962
|
}
|
|
55958
55963
|
exports.CDSLegacyViewConf = CDSLegacyViewConf;
|
|
@@ -55989,19 +55994,17 @@ v755 and up`,
|
|
|
55989
55994
|
&& this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {
|
|
55990
55995
|
return [];
|
|
55991
55996
|
}
|
|
55992
|
-
if (o.getType() !== "DDLS") {
|
|
55997
|
+
if (o.getType() !== "DDLS" || !(o instanceof objects_1.DataDefinition)) {
|
|
55993
55998
|
return [];
|
|
55994
55999
|
}
|
|
55995
|
-
|
|
55996
|
-
|
|
55997
|
-
|
|
55998
|
-
|
|
55999
|
-
|
|
56000
|
-
|
|
56001
|
-
|
|
56002
|
-
|
|
56003
|
-
issues.push(issue_1.Issue.atRow(file, 1, "CDS Legacy View", this.getMetadata().key, this.getConfig().severity));
|
|
56004
|
-
}
|
|
56000
|
+
const tree = o.getTree();
|
|
56001
|
+
if (tree === undefined) {
|
|
56002
|
+
return []; // parser error
|
|
56003
|
+
}
|
|
56004
|
+
if (tree.get() instanceof expressions_1.CDSDefineView && tree.findDirectTokenByText("ENTITY") === undefined) {
|
|
56005
|
+
const file = o.findSourceFile();
|
|
56006
|
+
if (file) {
|
|
56007
|
+
issues.push(issue_1.Issue.atRow(file, 1, "CDS Legacy View", this.getMetadata().key, this.getConfig().severity));
|
|
56005
56008
|
}
|
|
56006
56009
|
}
|
|
56007
56010
|
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.97",
|
|
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.97",
|
|
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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"json5": "^2.2.3",
|
|
53
53
|
"memfs": "^4.17.0",
|
|
54
54
|
"minimist": "^1.2.8",
|
|
55
|
-
"mocha": "^11.0
|
|
55
|
+
"mocha": "^11.1.0",
|
|
56
56
|
"progress": "^2.0.3",
|
|
57
57
|
"typescript": "^5.7.3",
|
|
58
58
|
"webpack": "^5.97.1",
|