@abaplint/cli 2.115.26 → 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.
Files changed (2) hide show
  1. package/build/cli.js +48 -15
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -28359,7 +28359,7 @@ class Select {
28359
28359
  }
28360
28360
  }
28361
28361
  static buildStructureType(fields, dbSources, scope) {
28362
- var _a, _b, _c;
28362
+ var _a, _b, _c, _d, _e, _f;
28363
28363
  if (fields.length === 1 && dbSources.length === 1) {
28364
28364
  const dbType = (_a = dbSources[0]) === null || _a === void 0 ? void 0 : _a.parseType(scope.getRegistry());
28365
28365
  if (dbType === undefined) {
@@ -28400,8 +28400,36 @@ class Select {
28400
28400
  }
28401
28401
  }
28402
28402
  }
28403
+ else if (dbSources.length === 1) {
28404
+ const dbType = (_d = dbSources[0]) === null || _d === void 0 ? void 0 : _d.parseType(scope.getRegistry());
28405
+ if (dbType === undefined) {
28406
+ const name = ((_e = dbSources[0]) === null || _e === void 0 ? void 0 : _e.getName()) || "buildStructureTypeError";
28407
+ if (scope.getRegistry().inErrorNamespace(name) === true) {
28408
+ return new basic_1.UnknownType("Select, " + name + " not found");
28409
+ }
28410
+ else {
28411
+ return basic_1.VoidType.get((_f = dbSources[0]) === null || _f === void 0 ? void 0 : _f.getName());
28412
+ }
28413
+ }
28414
+ if (!(dbType instanceof basic_1.StructureType)) {
28415
+ return basic_1.VoidType.get("SELECT_todo14");
28416
+ }
28417
+ const allFieldsSimple = fields.every(f => isSimple.test(f.code));
28418
+ if (allFieldsSimple === true) {
28419
+ const components = [];
28420
+ for (const field of fields) {
28421
+ const type = dbType.getComponentByName(field.code);
28422
+ if (type === undefined) {
28423
+ return basic_1.VoidType.get("SELECT_todo9");
28424
+ }
28425
+ components.push({ name: field.as || field.code, type });
28426
+ }
28427
+ return new basic_1.StructureType(components);
28428
+ }
28429
+ return basic_1.VoidType.get("SELECT_todo12");
28430
+ }
28403
28431
  else {
28404
- return basic_1.VoidType.get("SELECT_todo9");
28432
+ return basic_1.VoidType.get("SELECT_todo13");
28405
28433
  }
28406
28434
  }
28407
28435
  static buildTableType(fields, dbSources, scope) {
@@ -41957,10 +41985,13 @@ const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@
41957
41985
  class CDSCondition extends combi_1.Expression {
41958
41986
  getRunnable() {
41959
41987
  const left = (0, combi_1.altPrio)(_1.CDSString, _1.CDSFunction, _1.CDSAggregate, _1.CDSPrefixedName);
41960
- 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");
41961
- // Right side of comparison: arithmetic expressions, parenthesized sub-expressions, or simple values
41962
- const right = (0, combi_1.altPrio)(_1.CDSArithmetics, _1.CDSArithParen, left, cds_integer_1.CDSInteger);
41963
- const compare = (0, combi_1.seq)(operators, right);
41988
+ const nonLikeOperators = (0, combi_1.altPrio)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "<", ">");
41989
+ const likeOperators = (0, combi_1.altPrio)("LIKE", "NOT LIKE");
41990
+ // Right side of comparison: simple values first, then parenthesized, then full arithmetic last.
41991
+ // CDSArithmetics is last to avoid triggering CDSPrefixedName→CDSCondition→CDSArithmetics cycle.
41992
+ const right = (0, combi_1.altPrio)(_1.CDSArithParen, left, cds_integer_1.CDSInteger, _1.CDSArithmetics);
41993
+ // ESCAPE is only valid with LIKE/NOT LIKE, not with other comparison operators.
41994
+ 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));
41964
41995
  const is = (0, combi_1.seq)("IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
41965
41996
  const between = (0, combi_1.seq)("BETWEEN", left, "AND", left);
41966
41997
  const condition = (0, combi_1.seq)((0, combi_1.optPrio)("NOT"), left, (0, combi_1.altPrio)(compare, is, between));
@@ -42471,7 +42502,7 @@ class CDSPrefixedName extends combi_1.Expression {
42471
42502
  // The final segment may also be a string literal: #enum.'value'
42472
42503
  // A segment may have a parameterized call: _Assoc( P_Key : value ) or _Assoc[filter]
42473
42504
  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));
42474
- 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.star)(segment));
42505
+ 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));
42475
42506
  }
42476
42507
  }
42477
42508
  exports.CDSPrefixedName = CDSPrefixedName;
@@ -42543,7 +42574,7 @@ class CDSSelect extends combi_1.Expression {
42543
42574
  const distinct = (0, combi_1.str)("DISTINCT");
42544
42575
  const elementList = (0, combi_1.seq)(_1.CDSElement, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.CDSElement)));
42545
42576
  const elements = (0, combi_1.seq)((0, combi_1.str)("{"), (0, combi_1.altPrio)("*", elementList), (0, combi_1.str)("}"));
42546
- 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)((0, combi_1.alt)(_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)));
42577
+ 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)));
42547
42578
  }
42548
42579
  }
42549
42580
  exports.CDSSelect = CDSSelect;
@@ -55645,7 +55676,7 @@ class Registry {
55645
55676
  }
55646
55677
  static abaplintVersion() {
55647
55678
  // magic, see build script "version.sh"
55648
- return "2.115.26";
55679
+ return "2.115.28";
55649
55680
  }
55650
55681
  getDDICReferences() {
55651
55682
  return this.ddicReferences;
@@ -69938,6 +69969,8 @@ class ModifyOnlyOwnDBTables {
69938
69969
  key: "modify_only_own_db_tables",
69939
69970
  title: "Modify only own DB tables",
69940
69971
  shortDescription: `Modify only own DB tables`,
69972
+ badExample: `DELETE FROM mara WHERE matnr = '123456'.`,
69973
+ goodExample: `DELETE FROM yflight WHERE carrid = 'LH'.`,
69941
69974
  extendedInformation: `https://docs.abapopenchecks.org/checks/26/`,
69942
69975
  tags: [_irule_1.RuleTag.Security],
69943
69976
  };
@@ -96148,12 +96181,6 @@ var lib = JSON5;
96148
96181
  /******/ if (cachedModule !== undefined) {
96149
96182
  /******/ return cachedModule.exports;
96150
96183
  /******/ }
96151
- /******/ // Check if module exists (development only)
96152
- /******/ if (__webpack_modules__[moduleId] === undefined) {
96153
- /******/ var e = new Error("Cannot find module '" + moduleId + "'");
96154
- /******/ e.code = 'MODULE_NOT_FOUND';
96155
- /******/ throw e;
96156
- /******/ }
96157
96184
  /******/ // Create a new module (and put it into the cache)
96158
96185
  /******/ var module = __webpack_module_cache__[moduleId] = {
96159
96186
  /******/ // no module.id needed
@@ -96162,6 +96189,12 @@ var lib = JSON5;
96162
96189
  /******/ };
96163
96190
  /******/
96164
96191
  /******/ // Execute the module function
96192
+ /******/ if (!(moduleId in __webpack_modules__)) {
96193
+ /******/ delete __webpack_module_cache__[moduleId];
96194
+ /******/ var e = new Error("Cannot find module '" + moduleId + "'");
96195
+ /******/ e.code = 'MODULE_NOT_FOUND';
96196
+ /******/ throw e;
96197
+ /******/ }
96165
96198
  /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
96166
96199
  /******/
96167
96200
  /******/ // Return the exports of the module
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.115.26",
3
+ "version": "2.115.28",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.115.26",
41
+ "@abaplint/core": "^2.115.28",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",
45
- "@types/node": "^24.10.13",
45
+ "@types/node": "^24.11.0",
46
46
  "@types/progress": "^2.0.7",
47
47
  "chai": "^4.5.0",
48
48
  "p-limit": "^3.1.0",
@@ -55,7 +55,7 @@
55
55
  "mocha": "^11.7.5",
56
56
  "progress": "^2.0.3",
57
57
  "typescript": "^5.9.3",
58
- "webpack": "^5.105.2",
58
+ "webpack": "^5.105.4",
59
59
  "webpack-cli": "^6.0.1",
60
60
  "xml-js": "^1.6.11"
61
61
  }