@abaplint/cli 2.113.35 → 2.113.37

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 +21 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -9364,7 +9364,8 @@ class TypeTable extends combi_1.Expression {
9364
9364
  const derived = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("TABLE FOR", (0, combi_1.altPrio)("ACTION IMPORT", "ACTION RESULT", "CREATE", "EVENT", "FAILED", "LOCK", "READ RESULT", "UPDATE"), _1.TypeName));
9365
9365
  const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
9366
9366
  const oldLike = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), field_chain_1.FieldChain, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
9367
- const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)("LIKE", (0, combi_1.alt)(oldLike, likeType, rangeLike)), (0, combi_1.seq)("TYPE", (0, combi_1.alt)(oldType, typetable, rangeType, derived)));
9367
+ const typeLine = (0, combi_1.seq)("LINE OF", _1.TypeName, occurs, header);
9368
+ const ret = (0, combi_1.altPrio)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), (0, combi_1.seq)("LIKE", (0, combi_1.alt)(oldLike, likeType, rangeLike)), (0, combi_1.seq)("TYPE", (0, combi_1.alt)(oldType, typetable, rangeType, typeLine, derived)));
9368
9369
  return ret;
9369
9370
  }
9370
9371
  }
@@ -39740,7 +39741,10 @@ class CDSDetermineTypes {
39740
39741
  const components = [];
39741
39742
  for (const f of (parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields) || []) {
39742
39743
  if (f.prefix !== "") {
39743
- const source = parsedData.sources.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === f.prefix.toUpperCase(); });
39744
+ let source = parsedData.sources.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === f.prefix.toUpperCase(); });
39745
+ if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
39746
+ source = parsedData.sources.find((s) => s.name.toUpperCase() === f.prefix.toUpperCase());
39747
+ }
39744
39748
  if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
39745
39749
  components.push({
39746
39750
  name: f.name,
@@ -40343,7 +40347,7 @@ const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@
40343
40347
  class CDSCondition extends combi_1.Expression {
40344
40348
  getRunnable() {
40345
40349
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", (0, combi_1.alt)(_1.CDSName, _1.CDSString))));
40346
- const left = (0, combi_1.alt)(name, _1.CDSFunction);
40350
+ const left = (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSString);
40347
40351
  const compare = (0, combi_1.seq)(left, (0, combi_1.alt)("=", (0, combi_1.seq)("!", "="), (0, combi_1.seq)("<", ">"), "<", ">", (0, combi_1.seq)(">", "="), (0, combi_1.seq)("<", "="), "LIKE", "NOT LIKE"), (0, combi_1.alt)(left, cds_integer_1.CDSInteger, _1.CDSFunction, _1.CDSString));
40348
40352
  const is = (0, combi_1.seq)(left, "IS", (0, combi_1.optPrio)("NOT"), (0, combi_1.altPrio)("INITIAL", "NULL"));
40349
40353
  const condition = (0, combi_1.alt)(compare, is);
@@ -40529,6 +40533,14 @@ class CDSFunction extends combi_1.Expression {
40529
40533
  const substring = (0, combi_1.seq)("SUBSTRING", "(", input, ",", input, ",", input, ")");
40530
40534
  const bintohex = (0, combi_1.seq)("BINTOHEX", "(", input, ")");
40531
40535
  const hextobin = (0, combi_1.seq)("HEXTOBIN", "(", input, ")");
40536
+ const upper = (0, combi_1.seq)("UPPER", "(", input, ")");
40537
+ const lower = (0, combi_1.seq)("LOWER", "(", input, ")");
40538
+ const abs = (0, combi_1.seq)("ABS", "(", input, ")");
40539
+ const ceil = (0, combi_1.seq)("CEIL", "(", input, ")");
40540
+ const floor = (0, combi_1.seq)("FLOOR", "(", input, ")");
40541
+ const round = (0, combi_1.seq)("ROUND", "(", input, ",", input, ")");
40542
+ const div = (0, combi_1.seq)("DIV", "(", input, ",", input, ")");
40543
+ const division = (0, combi_1.seq)("DIVISION", "(", input, ",", input, ")");
40532
40544
  const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", input, ",", input, ",", input, ",", input, ")");
40533
40545
  const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", input, ",", input, ",", input, ",", input, ")");
40534
40546
  const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", input, ",", input, ",", input, ",", input, ")");
@@ -40540,7 +40552,9 @@ class CDSFunction extends combi_1.Expression {
40540
40552
  const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", input, ",", input, ")");
40541
40553
  const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", input, ",", input, ",", input, ")");
40542
40554
  const mod = (0, combi_1.seq)("MOD", "(", input, ",", input, ")");
40543
- return (0, combi_1.altPrio)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, 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);
40555
+ const left = (0, combi_1.seq)("LEFT", "(", input, ",", input, ")");
40556
+ const right = (0, combi_1.seq)("RIGHT", "(", input, ",", input, ")");
40557
+ 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);
40544
40558
  }
40545
40559
  }
40546
40560
  exports.CDSFunction = CDSFunction;
@@ -40837,7 +40851,8 @@ exports.CDSString = void 0;
40837
40851
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
40838
40852
  class CDSString extends combi_1.Expression {
40839
40853
  getRunnable() {
40840
- return (0, combi_1.regex)(/^'[\w: -_]*'$/);
40854
+ // https://stackoverflow.com/a/57754227
40855
+ return (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF: -_]*'$/);
40841
40856
  }
40842
40857
  }
40843
40858
  exports.CDSString = CDSString;
@@ -52957,7 +52972,7 @@ class Registry {
52957
52972
  }
52958
52973
  static abaplintVersion() {
52959
52974
  // magic, see build script "version.sh"
52960
- return "2.113.35";
52975
+ return "2.113.37";
52961
52976
  }
52962
52977
  getDDICReferences() {
52963
52978
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.35",
3
+ "version": "2.113.37",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.35",
41
+ "@abaplint/core": "^2.113.37",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",