@abaplint/cli 2.113.32 → 2.113.34
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.
- package/build/cli.js +68 -11
- package/package.json +4 -4
package/build/cli.js
CHANGED
|
@@ -39722,20 +39722,71 @@ exports.ArtifactsRules = ArtifactsRules;
|
|
|
39722
39722
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
39723
39723
|
exports.CDSDetermineTypes = void 0;
|
|
39724
39724
|
const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
39725
|
+
const ddic_1 = __webpack_require__(/*! ../ddic */ "./node_modules/@abaplint/core/build/src/ddic.js");
|
|
39725
39726
|
class CDSDetermineTypes {
|
|
39726
|
-
parseType(
|
|
39727
|
+
parseType(reg, parsedData) {
|
|
39728
|
+
const ddic = new ddic_1.DDIC(reg);
|
|
39727
39729
|
if ((parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields.length) === 0) {
|
|
39728
39730
|
return new basic_1.VoidType("DDLS:todo");
|
|
39729
39731
|
}
|
|
39730
39732
|
else {
|
|
39731
39733
|
const components = [];
|
|
39732
39734
|
for (const f of (parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields) || []) {
|
|
39733
|
-
|
|
39734
|
-
|
|
39735
|
-
|
|
39736
|
-
|
|
39735
|
+
if (f.prefix !== "") {
|
|
39736
|
+
const source = parsedData.sources.find((s) => { var _a; return ((_a = s.as) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === f.prefix.toUpperCase(); });
|
|
39737
|
+
if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
|
|
39738
|
+
components.push({
|
|
39739
|
+
name: f.name,
|
|
39740
|
+
type: new basic_1.UnknownType("CDS parser error, unknown source"),
|
|
39741
|
+
});
|
|
39742
|
+
continue;
|
|
39743
|
+
}
|
|
39744
|
+
const lookup = ddic.lookupTableOrView(source.name);
|
|
39745
|
+
if (lookup.type) {
|
|
39746
|
+
if (lookup.type instanceof basic_1.StructureType) {
|
|
39747
|
+
const type = lookup.type.getComponentByName(f.name);
|
|
39748
|
+
if (type) {
|
|
39749
|
+
components.push({
|
|
39750
|
+
name: f.name,
|
|
39751
|
+
type: type,
|
|
39752
|
+
});
|
|
39753
|
+
}
|
|
39754
|
+
else {
|
|
39755
|
+
components.push({
|
|
39756
|
+
name: f.name,
|
|
39757
|
+
type: new basic_1.UnknownType(f.name + " not found in " + source.name + ", CDSDetermineTypes"),
|
|
39758
|
+
});
|
|
39759
|
+
}
|
|
39760
|
+
}
|
|
39761
|
+
else {
|
|
39762
|
+
// its void or unknown
|
|
39763
|
+
components.push({
|
|
39764
|
+
name: f.name,
|
|
39765
|
+
type: lookup.type,
|
|
39766
|
+
});
|
|
39767
|
+
}
|
|
39768
|
+
}
|
|
39769
|
+
else if (reg.inErrorNamespace(source.name)) {
|
|
39770
|
+
components.push({
|
|
39771
|
+
name: f.name,
|
|
39772
|
+
type: new basic_1.UnknownType(source.name + " not found, CDSDetermineTypes"),
|
|
39773
|
+
});
|
|
39774
|
+
}
|
|
39775
|
+
else {
|
|
39776
|
+
components.push({
|
|
39777
|
+
name: f.name,
|
|
39778
|
+
type: new basic_1.VoidType(source.name),
|
|
39779
|
+
});
|
|
39780
|
+
}
|
|
39781
|
+
}
|
|
39782
|
+
else {
|
|
39783
|
+
components.push({
|
|
39784
|
+
name: f.name,
|
|
39785
|
+
type: new basic_1.VoidType("DDLS:fieldname"),
|
|
39786
|
+
});
|
|
39787
|
+
}
|
|
39737
39788
|
}
|
|
39738
|
-
return new basic_1.StructureType(components);
|
|
39789
|
+
return new basic_1.StructureType(components, parsedData.definitionName, parsedData.definitionName, parsedData.description);
|
|
39739
39790
|
}
|
|
39740
39791
|
}
|
|
39741
39792
|
}
|
|
@@ -41282,10 +41333,10 @@ class DDIC {
|
|
|
41282
41333
|
return { type: new Types.VoidType(name) };
|
|
41283
41334
|
}
|
|
41284
41335
|
}
|
|
41285
|
-
lookupDomain(name, dataElement) {
|
|
41336
|
+
lookupDomain(name, dataElement, description) {
|
|
41286
41337
|
const found = this.reg.getObject("DOMA", name);
|
|
41287
41338
|
if (found) {
|
|
41288
|
-
return { type: found.parseType(this.reg, dataElement), object: found };
|
|
41339
|
+
return { type: found.parseType(this.reg, dataElement, description), object: found };
|
|
41289
41340
|
}
|
|
41290
41341
|
else if (this.reg.inErrorNamespace(name)) {
|
|
41291
41342
|
return { type: new Types.UnknownType(name + ", lookupDomain"), object: undefined };
|
|
@@ -46696,6 +46747,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
46696
46747
|
expr = tree.findFirstExpression(expressions_1.CDSDefineProjection);
|
|
46697
46748
|
}
|
|
46698
46749
|
for (const e of (expr === null || expr === void 0 ? void 0 : expr.findDirectExpressions(expressions_1.CDSElement)) || []) {
|
|
46750
|
+
let prefix = "";
|
|
46699
46751
|
let found = (_a = e.findDirectExpression(expressions_1.CDSAs)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.CDSName);
|
|
46700
46752
|
if (found === undefined) {
|
|
46701
46753
|
const list = e.findAllExpressions(expressions_1.CDSName);
|
|
@@ -46704,6 +46756,9 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
46704
46756
|
}
|
|
46705
46757
|
else {
|
|
46706
46758
|
found = list[list.length - 1];
|
|
46759
|
+
if (list.length > 1) {
|
|
46760
|
+
prefix = list[0].concatTokens();
|
|
46761
|
+
}
|
|
46707
46762
|
}
|
|
46708
46763
|
}
|
|
46709
46764
|
if (found === undefined) {
|
|
@@ -46720,6 +46775,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
46720
46775
|
this.parsedData.fields.push({
|
|
46721
46776
|
name: name,
|
|
46722
46777
|
annotations: annotations,
|
|
46778
|
+
prefix: prefix,
|
|
46723
46779
|
key: e.findDirectTokenByText("KEY") !== undefined,
|
|
46724
46780
|
});
|
|
46725
46781
|
}
|
|
@@ -46815,7 +46871,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
|
|
|
46815
46871
|
lookup = { type: new Types.UnknownType("DOMNAME unexpectely empty in " + this.getName()) };
|
|
46816
46872
|
}
|
|
46817
46873
|
else {
|
|
46818
|
-
lookup = ddic.lookupDomain(this.parsedXML.domname, this.getName());
|
|
46874
|
+
lookup = ddic.lookupDomain(this.parsedXML.domname, this.getName(), this.getDescription());
|
|
46819
46875
|
}
|
|
46820
46876
|
}
|
|
46821
46877
|
else if (this.parsedXML.refkind === "R") {
|
|
@@ -46983,7 +47039,7 @@ class Domain extends _abstract_object_1.AbstractObject {
|
|
|
46983
47039
|
this.parsedXML = undefined;
|
|
46984
47040
|
super.setDirty();
|
|
46985
47041
|
}
|
|
46986
|
-
parseType(reg, dataElement) {
|
|
47042
|
+
parseType(reg, dataElement, description) {
|
|
46987
47043
|
// dont cache the DOMA parsed type, they are cached on DTEL level
|
|
46988
47044
|
// also note that the type carries the name of the DTEL
|
|
46989
47045
|
if (this.parsedXML === undefined) {
|
|
@@ -47001,6 +47057,7 @@ class Domain extends _abstract_object_1.AbstractObject {
|
|
|
47001
47057
|
qualifiedName: dataElement,
|
|
47002
47058
|
conversionExit: this.parsedXML.conversionExit,
|
|
47003
47059
|
ddicName: dataElement,
|
|
47060
|
+
description: description,
|
|
47004
47061
|
});
|
|
47005
47062
|
}
|
|
47006
47063
|
parse() {
|
|
@@ -52893,7 +52950,7 @@ class Registry {
|
|
|
52893
52950
|
}
|
|
52894
52951
|
static abaplintVersion() {
|
|
52895
52952
|
// magic, see build script "version.sh"
|
|
52896
|
-
return "2.113.
|
|
52953
|
+
return "2.113.34";
|
|
52897
52954
|
}
|
|
52898
52955
|
getDDICReferences() {
|
|
52899
52956
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.34",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.113.
|
|
41
|
+
"@abaplint/core": "^2.113.34",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.9",
|
|
46
|
-
"@types/node": "^22.8.
|
|
46
|
+
"@types/node": "^22.8.4",
|
|
47
47
|
"@types/progress": "^2.0.7",
|
|
48
48
|
"chai": "^4.5.0",
|
|
49
49
|
"chalk": "^5.3.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"json5": "^2.2.3",
|
|
53
53
|
"memfs": "^4.14.0",
|
|
54
54
|
"minimist": "^1.2.8",
|
|
55
|
-
"mocha": "^10.
|
|
55
|
+
"mocha": "^10.8.1",
|
|
56
56
|
"progress": "^2.0.3",
|
|
57
57
|
"typescript": "^5.6.3",
|
|
58
58
|
"webpack": "^5.95.0",
|