@abaplint/core 2.94.2 → 2.94.3

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.
@@ -3684,11 +3684,18 @@ declare class Local implements IStatement {
3684
3684
  }
3685
3685
 
3686
3686
  declare class LockObject extends AbstractObject {
3687
+ private parsedXML;
3687
3688
  getType(): string;
3688
3689
  getAllowedNaming(): {
3689
3690
  maxLength: number;
3690
3691
  allowNamespace: boolean;
3691
3692
  };
3693
+ getPrimaryTable(): string | undefined;
3694
+ parseType(reg: IRegistry): void;
3695
+ parse(): {
3696
+ updated: boolean;
3697
+ runtime: number;
3698
+ };
3692
3699
  getDescription(): string | undefined;
3693
3700
  }
3694
3701
 
@@ -27,6 +27,7 @@ class FindGlobalDefinitions {
27
27
  else if (o instanceof objects_1.DataElement
28
28
  || o instanceof objects_1.View
29
29
  || o instanceof objects_1.TableType
30
+ || o instanceof objects_1.LockObject
30
31
  || o instanceof objects_1.Table) {
31
32
  o.parseType(this.reg); // make sure the references are set after parsing finishes
32
33
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LockObject = void 0;
4
+ const ddic_1 = require("../ddic");
4
5
  const _abstract_object_1 = require("./_abstract_object");
5
6
  class LockObject extends _abstract_object_1.AbstractObject {
6
7
  getType() {
@@ -12,9 +13,46 @@ class LockObject extends _abstract_object_1.AbstractObject {
12
13
  allowNamespace: true,
13
14
  };
14
15
  }
16
+ getPrimaryTable() {
17
+ var _a;
18
+ this.parse();
19
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.primaryTable;
20
+ }
21
+ parseType(reg) {
22
+ var _a, _b;
23
+ this.parse();
24
+ const references = [];
25
+ const ddic = new ddic_1.DDIC(reg);
26
+ if ((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.primaryTable) {
27
+ const found = ddic.lookupTableOrView2((_b = this.parsedXML) === null || _b === void 0 ? void 0 : _b.primaryTable);
28
+ if (found) {
29
+ references.push({ object: found });
30
+ }
31
+ }
32
+ reg.getDDICReferences().setUsing(this, references);
33
+ }
34
+ parse() {
35
+ var _a, _b;
36
+ if (this.parsedXML) {
37
+ return { updated: false, runtime: 0 };
38
+ }
39
+ const start = Date.now();
40
+ this.parsedXML = {};
41
+ const parsed = super.parseRaw2();
42
+ if (parsed === undefined
43
+ || parsed.abapGit === undefined
44
+ || parsed.abapGit["asx:abap"]["asx:values"] === undefined) {
45
+ return { updated: false, runtime: 0 };
46
+ }
47
+ this.parsedXML.primaryTable = (_a = parsed.abapGit["asx:abap"]["asx:values"].DD25V) === null || _a === void 0 ? void 0 : _a.ROOTTAB;
48
+ this.parsedXML.description = (_b = parsed.abapGit["asx:abap"]["asx:values"].DD25V) === null || _b === void 0 ? void 0 : _b.DDTEXT;
49
+ const end = Date.now();
50
+ return { updated: true, runtime: end - start };
51
+ }
15
52
  getDescription() {
16
- // todo
17
- return undefined;
53
+ var _a;
54
+ this.parse();
55
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
18
56
  }
19
57
  }
20
58
  exports.LockObject = LockObject;
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.94.2";
66
+ return "2.94.3";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.94.2",
3
+ "version": "2.94.3",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -46,17 +46,17 @@
46
46
  },
47
47
  "homepage": "https://abaplint.org",
48
48
  "devDependencies": {
49
- "@microsoft/api-extractor": "^7.33.6",
49
+ "@microsoft/api-extractor": "^7.33.7",
50
50
  "@types/chai": "^4.3.4",
51
51
  "@types/mocha": "^10.0.1",
52
- "@types/node": "^18.11.9",
52
+ "@types/node": "^18.11.13",
53
53
  "chai": "^4.3.7",
54
- "eslint": "^8.28.0",
55
- "mocha": "^10.1.0",
54
+ "eslint": "^8.29.0",
55
+ "mocha": "^10.2.0",
56
56
  "c8": "^7.12.0",
57
57
  "source-map-support": "^0.5.21",
58
58
  "ts-json-schema-generator": "^1.1.2",
59
- "typescript": "^4.9.3"
59
+ "typescript": "^4.9.4"
60
60
  },
61
61
  "dependencies": {
62
62
  "fast-xml-parser": "^4.0.12",