@abaplint/cli 2.120.49 → 2.120.50

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 +63 -5
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -63509,16 +63509,21 @@ const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "../cor
63509
63509
  const Types = __importStar(__webpack_require__(/*! ../abap/types/basic */ "../core/build/src/abap/types/basic/index.js"));
63510
63510
  const ddic_1 = __webpack_require__(/*! ../ddic */ "../core/build/src/ddic.js");
63511
63511
  const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "../core/build/src/xml_utils.js");
63512
+ const _identifier_1 = __webpack_require__(/*! ../abap/4_file_information/_identifier */ "../core/build/src/abap/4_file_information/_identifier.js");
63513
+ const identifier_1 = __webpack_require__(/*! ../abap/1_lexer/tokens/identifier */ "../core/build/src/abap/1_lexer/tokens/identifier.js");
63514
+ const position_1 = __webpack_require__(/*! ../position */ "../core/build/src/position.js");
63512
63515
  class Domain extends _abstract_object_1.AbstractObject {
63513
63516
  getType() {
63514
63517
  return "DOMA";
63515
63518
  }
63516
63519
  getDescription() {
63517
63520
  var _a;
63521
+ this.parse();
63518
63522
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
63519
63523
  }
63520
63524
  getConversionExit() {
63521
63525
  var _a;
63526
+ this.parse();
63522
63527
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.conversionExit;
63523
63528
  }
63524
63529
  getDataType() {
@@ -63532,6 +63537,17 @@ class Domain extends _abstract_object_1.AbstractObject {
63532
63537
  allowNamespace: true,
63533
63538
  };
63534
63539
  }
63540
+ getIdentifier() {
63541
+ const xmlIdentifier = super.getIdentifier();
63542
+ if (xmlIdentifier) {
63543
+ return xmlIdentifier;
63544
+ }
63545
+ const file = this.getAFFFile();
63546
+ if (file === undefined) {
63547
+ return undefined;
63548
+ }
63549
+ return new _identifier_1.Identifier(new identifier_1.Identifier(new position_1.Position(1, 1), this.getName()), file.getFilename());
63550
+ }
63535
63551
  setDirty() {
63536
63552
  this.parsedXML = undefined;
63537
63553
  super.setDirty();
@@ -63558,18 +63574,57 @@ class Domain extends _abstract_object_1.AbstractObject {
63558
63574
  });
63559
63575
  }
63560
63576
  parse() {
63561
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
63577
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
63578
+ var _v, _w;
63562
63579
  if (this.parsedXML) {
63563
63580
  return { updated: false, runtime: 0 };
63564
63581
  }
63565
63582
  const start = Date.now();
63566
63583
  this.parsedXML = {};
63584
+ const jsonFile = this.getAFFFile();
63585
+ if (jsonFile) {
63586
+ try {
63587
+ const parsed = JSON.parse(jsonFile.getRaw());
63588
+ const language = (_a = parsed.header) === null || _a === void 0 ? void 0 : _a.originalLanguage;
63589
+ const values = [];
63590
+ for (const fixedValue of (_v = parsed.fixedValues) !== null && _v !== void 0 ? _v : []) {
63591
+ values.push({
63592
+ low: fixedValue === null || fixedValue === void 0 ? void 0 : fixedValue.fixedValue,
63593
+ high: "",
63594
+ description: fixedValue === null || fixedValue === void 0 ? void 0 : fixedValue.description,
63595
+ language: language,
63596
+ });
63597
+ }
63598
+ for (const interval of (_w = parsed.fixedValueIntervals) !== null && _w !== void 0 ? _w : []) {
63599
+ values.push({
63600
+ low: interval === null || interval === void 0 ? void 0 : interval.lowLimit,
63601
+ high: interval === null || interval === void 0 ? void 0 : interval.highLimit,
63602
+ description: interval === null || interval === void 0 ? void 0 : interval.description,
63603
+ language: language,
63604
+ });
63605
+ }
63606
+ this.parsedXML = {
63607
+ description: (_b = parsed.header) === null || _b === void 0 ? void 0 : _b.description,
63608
+ datatype: (_c = parsed.format) === null || _c === void 0 ? void 0 : _c.dataType,
63609
+ length: (_e = (_d = parsed.format) === null || _d === void 0 ? void 0 : _d.length) === null || _e === void 0 ? void 0 : _e.toString(),
63610
+ decimals: (_g = (_f = parsed.format) === null || _f === void 0 ? void 0 : _f.decimals) === null || _g === void 0 ? void 0 : _g.toString(),
63611
+ conversionExit: (_h = parsed.outputCharacteristics) === null || _h === void 0 ? void 0 : _h.conversionRoutine,
63612
+ values: values,
63613
+ valuesTranslations: [],
63614
+ };
63615
+ }
63616
+ catch (_x) {
63617
+ // handled by parseType()
63618
+ }
63619
+ const end = Date.now();
63620
+ return { updated: true, runtime: end - start };
63621
+ }
63567
63622
  const parsed = super.parseRaw2();
63568
63623
  if (parsed === undefined) {
63569
63624
  return { updated: false, runtime: 0 };
63570
63625
  }
63571
- const dd01v = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"]) === null || _c === void 0 ? void 0 : _c.DD01V;
63572
- const dd07v_tab = (0, xml_utils_1.xmlToArray)((_g = (_f = (_e = (_d = parsed.abapGit) === null || _d === void 0 ? void 0 : _d["asx:abap"]) === null || _e === void 0 ? void 0 : _e["asx:values"]) === null || _f === void 0 ? void 0 : _f.DD07V_TAB) === null || _g === void 0 ? void 0 : _g.DD07V);
63626
+ const dd01v = (_l = (_k = (_j = parsed.abapGit) === null || _j === void 0 ? void 0 : _j["asx:abap"]) === null || _k === void 0 ? void 0 : _k["asx:values"]) === null || _l === void 0 ? void 0 : _l.DD01V;
63627
+ const dd07v_tab = (0, xml_utils_1.xmlToArray)((_q = (_p = (_o = (_m = parsed.abapGit) === null || _m === void 0 ? void 0 : _m["asx:abap"]) === null || _o === void 0 ? void 0 : _o["asx:values"]) === null || _p === void 0 ? void 0 : _p.DD07V_TAB) === null || _q === void 0 ? void 0 : _q.DD07V);
63573
63628
  const values = [];
63574
63629
  for (const ddo7v of dd07v_tab) {
63575
63630
  const value = {
@@ -63580,7 +63635,7 @@ class Domain extends _abstract_object_1.AbstractObject {
63580
63635
  };
63581
63636
  values.push(value);
63582
63637
  }
63583
- const dd07v_texts = (0, xml_utils_1.xmlToArray)((_l = (_k = (_j = (_h = parsed.abapGit) === null || _h === void 0 ? void 0 : _h["asx:abap"]) === null || _j === void 0 ? void 0 : _j["asx:values"]) === null || _k === void 0 ? void 0 : _k.DD07_TEXTS) === null || _l === void 0 ? void 0 : _l.item);
63638
+ const dd07v_texts = (0, xml_utils_1.xmlToArray)((_u = (_t = (_s = (_r = parsed.abapGit) === null || _r === void 0 ? void 0 : _r["asx:abap"]) === null || _s === void 0 ? void 0 : _s["asx:values"]) === null || _t === void 0 ? void 0 : _t.DD07_TEXTS) === null || _u === void 0 ? void 0 : _u.item);
63584
63639
  const translationValues = [];
63585
63640
  for (const dd07v of dd07v_texts) {
63586
63641
  const value = {
@@ -63611,6 +63666,9 @@ class Domain extends _abstract_object_1.AbstractObject {
63611
63666
  var _b;
63612
63667
  return (_b = (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.valuesTranslations) !== null && _b !== void 0 ? _b : [];
63613
63668
  }
63669
+ getAFFFile() {
63670
+ return this.getFiles().find(file => file.getFilename().toLowerCase().endsWith(".doma.json"));
63671
+ }
63614
63672
  }
63615
63673
  exports.Domain = Domain;
63616
63674
  //# sourceMappingURL=domain.js.map
@@ -70491,7 +70549,7 @@ class Registry {
70491
70549
  }
70492
70550
  static abaplintVersion() {
70493
70551
  // magic, see build script "version.js"
70494
- return "2.120.49";
70552
+ return "2.120.50";
70495
70553
  }
70496
70554
  getDDICReferences() {
70497
70555
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.49",
3
+ "version": "2.120.50",
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.49",
42
+ "@abaplint/core": "^2.120.50",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",