@abaplint/core 2.115.27 → 2.115.28
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.
|
@@ -7,10 +7,13 @@ const cds_integer_1 = require("./cds_integer");
|
|
|
7
7
|
class CDSCondition extends combi_1.Expression {
|
|
8
8
|
getRunnable() {
|
|
9
9
|
const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, _1.CDSAggregate, _1.CDSPrefixedName);
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const nonLikeOperators = (0, combi_1.altPrio)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "<", ">");
|
|
11
|
+
const likeOperators = (0, combi_1.altPrio)("LIKE", "NOT LIKE");
|
|
12
|
+
// Right side of comparison: simple values first, then parenthesized, then full arithmetic last.
|
|
13
|
+
// CDSArithmetics is last to avoid triggering CDSPrefixedName→CDSCondition→CDSArithmetics cycle.
|
|
14
|
+
const right = (0, combi_1.altPrio)(_1.CDSArithParen, left, cds_integer_1.CDSInteger, _1.CDSArithmetics);
|
|
15
|
+
// ESCAPE is only valid with LIKE/NOT LIKE, not with other comparison operators.
|
|
16
|
+
const compare = (0, combi_1.altPrio)((0, combi_1.seq)(likeOperators, right, (0, combi_1.opt)((0, combi_1.seq)("ESCAPE", _1.CDSString))), (0, combi_1.seq)(nonLikeOperators, right));
|
|
14
17
|
const is = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
|
|
15
18
|
const between = (0, combi_1.seq)("BETWEEN", left, "AND", left);
|
|
16
19
|
const condition = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), left, (0, combi_1.altPrio)(compare, is, between));
|
|
@@ -25,7 +25,7 @@ class CDSPrefixedName extends combi_1.Expression {
|
|
|
25
25
|
// The final segment may also be a string literal: #enum.'value'
|
|
26
26
|
// A segment may have a parameterized call: _Assoc( P_Key : value ) or _Assoc[filter]
|
|
27
27
|
const segment = (0, combi_1.seq)(".", (0, combi_1.altPrio)(cds_string_1.CDSString, cds_name_1.CDSName), (0, combi_1.opt)((0, combi_1.altPrio)(cds_parameters_select_1.CDSParametersSelect, cds_parameters_1.CDSParameters)), (0, combi_1.opt)(pathFilter));
|
|
28
|
-
return (0, combi_1.seq)(cds_name_1.CDSName, (0, combi_1.opt)((0, combi_1.altPrio)(cds_parameters_1.CDSParameters, cds_parameters_select_1.CDSParametersSelect)), (0, combi_1.opt)(pathFilter), (0, combi_1.
|
|
28
|
+
return (0, combi_1.seq)(cds_name_1.CDSName, (0, combi_1.opt)((0, combi_1.altPrio)(cds_parameters_1.CDSParameters, cds_parameters_select_1.CDSParametersSelect)), (0, combi_1.opt)(pathFilter), (0, combi_1.starPrio)(segment));
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
exports.CDSPrefixedName = CDSPrefixedName;
|
|
@@ -11,7 +11,7 @@ class CDSSelect extends combi_1.Expression {
|
|
|
11
11
|
const distinct = (0, combi_1.str)("DISTINCT");
|
|
12
12
|
const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSElement)));
|
|
13
13
|
const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
|
|
14
|
-
return (0, combi_1.seq)("SELECT", (0, combi_1.optPrio)(distinct), (0, combi_1.opt)((0, combi_1.
|
|
14
|
+
return (0, combi_1.seq)("SELECT", (0, combi_1.optPrio)(distinct), (0, combi_1.opt)((0, combi_1.altPrio)("*", fields)), "FROM", _1.CDSSource, (0, combi_1.star)(cds_join_1.CDSJoin), (0, combi_1.star)((0, combi_1.altPrio)(_1.CDSComposition, cds_association_1.CDSAssociation)), (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)));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
exports.CDSSelect = CDSSelect;
|
package/build/src/registry.js
CHANGED
|
@@ -26,6 +26,8 @@ class ModifyOnlyOwnDBTables {
|
|
|
26
26
|
key: "modify_only_own_db_tables",
|
|
27
27
|
title: "Modify only own DB tables",
|
|
28
28
|
shortDescription: `Modify only own DB tables`,
|
|
29
|
+
badExample: `DELETE FROM mara WHERE matnr = '123456'.`,
|
|
30
|
+
goodExample: `DELETE FROM yflight WHERE carrid = 'LH'.`,
|
|
29
31
|
extendedInformation: `https://docs.abapopenchecks.org/checks/26/`,
|
|
30
32
|
tags: [_irule_1.RuleTag.Security],
|
|
31
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.115.
|
|
3
|
+
"version": "2.115.28",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://abaplint.org",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@microsoft/api-extractor": "^7.57.
|
|
53
|
+
"@microsoft/api-extractor": "^7.57.6",
|
|
54
54
|
"@types/chai": "^4.3.20",
|
|
55
55
|
"@types/mocha": "^10.0.10",
|
|
56
|
-
"@types/node": "^24.
|
|
56
|
+
"@types/node": "^24.11.0",
|
|
57
57
|
"chai": "^4.5.0",
|
|
58
58
|
"eslint": "^9.39.2",
|
|
59
59
|
"mocha": "^11.7.5",
|
|
60
|
-
"c8": "^
|
|
60
|
+
"c8": "^11.0.0",
|
|
61
61
|
"source-map-support": "^0.5.21",
|
|
62
62
|
"ts-json-schema-generator": "=2.4.0",
|
|
63
63
|
"typescript": "^5.9.3"
|