@abaplint/cli 2.120.42 → 2.120.43

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 -17
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -20314,7 +20314,7 @@ class Write {
20314
20314
  const to = (0, combi_1.seq)("TO", expressions_1.Target);
20315
20315
  const options = (0, combi_1.per)(mask, to, (0, combi_1.seq)("EXPONENT", expressions_1.Source), "NO-GROUPING", "NO-ZERO", "CENTERED", (0, combi_1.seq)("INPUT", (0, combi_1.opt)(onOff)), "NO-GAP", "LEFT-JUSTIFIED", as, (0, combi_1.seq)("FRAMES", onOff), (0, combi_1.seq)("HOTSPOT", (0, combi_1.opt)(onOff)), "RIGHT-JUSTIFIED", (0, combi_1.seq)("TIME ZONE", expressions_1.Source), (0, combi_1.seq)("UNDER", expressions_1.Source), (0, combi_1.seq)("STYLE", expressions_1.Source), (0, combi_1.seq)("ROUND", expressions_1.Source), (0, combi_1.seq)("QUICKINFO", expressions_1.Source), "ENVIRONMENT TIME FORMAT", dateFormat, (0, combi_1.seq)("UNIT", expressions_1.Source), (0, combi_1.seq)("INTENSIFIED", (0, combi_1.opt)(onOff)), (0, combi_1.seq)("INDEX", expressions_1.Source), (0, combi_1.seq)("DECIMALS", expressions_1.Source), (0, combi_1.seq)("INVERSE", (0, combi_1.opt)(onOff)), expressions_1.Color, (0, combi_1.seq)("CURRENCY", expressions_1.Source), "RESET", "NO-SIGN");
20316
20316
  // Need to refactor all this sometime,
20317
- const ret = (0, combi_1.seq)("WRITE", (0, combi_1.alt)((0, combi_1.seq)("AT /", (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)("NO-GAP")), (0, combi_1.seq)((0, combi_1.opt)(expressions_1.WriteOffsetLength), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic, "/"), (0, combi_1.opt)(options))));
20317
+ const ret = (0, combi_1.seq)("WRITE", (0, combi_1.alt)((0, combi_1.seq)("AT /", (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(options)), (0, combi_1.seq)((0, combi_1.opt)(expressions_1.WriteOffsetLength), (0, combi_1.alt)(expressions_1.Source, expressions_1.Dynamic, "/"), (0, combi_1.opt)(options))));
20318
20318
  return (0, combi_1.verNotLang)(version_1.LanguageVersion.Cloud, ret);
20319
20319
  }
20320
20320
  }
@@ -53903,6 +53903,7 @@ const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "../core/build/sr
53903
53903
  const ddic_1 = __webpack_require__(/*! ../ddic */ "../core/build/src/ddic.js");
53904
53904
  class CDSDetermineTypes {
53905
53905
  parseType(reg, parsedData, ddlsName) {
53906
+ var _a;
53906
53907
  const ddic = new ddic_1.DDIC(reg);
53907
53908
  if ((parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields.length) === 0) {
53908
53909
  return basic_1.VoidType.get("DDLS:todo");
@@ -53939,10 +53940,11 @@ class CDSDetermineTypes {
53939
53940
  });
53940
53941
  continue;
53941
53942
  }
53943
+ const nameInSource = (_a = f.nameInSource) !== null && _a !== void 0 ? _a : f.name;
53942
53944
  const lookup = ddic.lookupTableOrView(source.name);
53943
53945
  if (lookup.type) {
53944
53946
  if (lookup.type instanceof basic_1.StructureType) {
53945
- const type = lookup.type.getComponentByName(f.name);
53947
+ const type = lookup.type.getComponentByName(nameInSource);
53946
53948
  if (type) {
53947
53949
  components.push({
53948
53950
  name: f.name,
@@ -53952,7 +53954,7 @@ class CDSDetermineTypes {
53952
53954
  else {
53953
53955
  components.push({
53954
53956
  name: f.name,
53955
- type: new basic_1.UnknownType(f.name + " not found in " + source.name + ", CDSDetermineTypes"),
53957
+ type: new basic_1.UnknownType(nameInSource + " not found in " + source.name + ", CDSDetermineTypes"),
53956
53958
  });
53957
53959
  }
53958
53960
  }
@@ -62775,19 +62777,18 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
62775
62777
  }
62776
62778
  for (const e of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressions(expressions_1.CDSElement)) || []) {
62777
62779
  let prefix = "";
62780
+ let nameInSource = undefined;
62778
62781
  let found = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName);
62779
- if (found === undefined) {
62780
- const list = (_b = e.findDirectExpression(expressions_1.CDSPrefixedName)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(expressions_1.CDSName);
62781
- if (list) {
62782
- if (e.concatTokens().toUpperCase().includes(" REDIRECTED TO ")) {
62783
- found = list[0];
62784
- }
62785
- else {
62786
- found = list[list.length - 1];
62787
- if (list.length > 1) {
62788
- prefix = list[0].concatTokens();
62789
- }
62790
- }
62782
+ const list = (_b = e.findDirectExpression(expressions_1.CDSPrefixedName)) === null || _b === void 0 ? void 0 : _b.findAllExpressions(expressions_1.CDSName);
62783
+ if (list !== undefined) {
62784
+ const redirected = list.length > 1 && e.concatTokens().toUpperCase().includes(" REDIRECTED TO ");
62785
+ if (list.length > 1 && redirected === false) {
62786
+ // "prefix.field" is looked up as "field" in "prefix", also when aliased via "as"
62787
+ prefix = list[0].concatTokens();
62788
+ nameInSource = list[list.length - 1].concatTokens();
62789
+ }
62790
+ if (found === undefined) {
62791
+ found = redirected === true ? list[0] : list[list.length - 1];
62791
62792
  }
62792
62793
  }
62793
62794
  if (found === undefined) {
@@ -62809,6 +62810,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
62809
62810
  }
62810
62811
  this.parsedData.fields.push({
62811
62812
  name: name,
62813
+ nameInSource: nameInSource,
62812
62814
  annotations: annotations,
62813
62815
  prefix: prefix,
62814
62816
  key: e.findDirectTokenByText("KEY") !== undefined,
@@ -70174,7 +70176,7 @@ class Registry {
70174
70176
  }
70175
70177
  static abaplintVersion() {
70176
70178
  // magic, see build script "version.js"
70177
- return "2.120.42";
70179
+ return "2.120.43";
70178
70180
  }
70179
70181
  getDDICReferences() {
70180
70182
  return this.ddicReferences;
@@ -100084,6 +100086,8 @@ class XMLConsistencyConf extends _basic_rule_config_1.BasicRuleConfig {
100084
100086
  super(...arguments);
100085
100087
  /** Problem severity for text and translation length checks */
100086
100088
  this.textAndTranslationLengthSeverity = severity_1.Severity.Error;
100089
+ /** Problem severity for data element(DTEL) field checks */
100090
+ this.dataElementSeverity = severity_1.Severity.Error;
100087
100091
  }
100088
100092
  }
100089
100093
  exports.XMLConsistencyConf = XMLConsistencyConf;
@@ -100292,7 +100296,7 @@ class XMLConsistency {
100292
100296
  }
100293
100297
  checkRequiredField(file, fieldName, value) {
100294
100298
  if (value === undefined || value === "") {
100295
- return issue_1.Issue.atRow(file, 1, `Missing required field ${fieldName} in DD04V`, this.getMetadata().key, this.conf.severity);
100299
+ return issue_1.Issue.atRow(file, 1, `Missing required field ${fieldName} in DD04V`, this.getMetadata().key, this.conf.dataElementSeverity);
100296
100300
  }
100297
100301
  return undefined;
100298
100302
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.42",
3
+ "version": "2.120.43",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.120.42",
42
+ "@abaplint/core": "^2.120.43",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",