@abaplint/cli 2.102.65 → 2.102.66
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 +28 -11
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -25507,6 +25507,7 @@ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/c
|
|
|
25507
25507
|
const _object_oriented_1 = __webpack_require__(/*! ../_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
|
|
25508
25508
|
const method_parameters_1 = __webpack_require__(/*! ./method_parameters */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/method_parameters.js");
|
|
25509
25509
|
const basic_types_1 = __webpack_require__(/*! ../basic_types */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js");
|
|
25510
|
+
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
|
|
25510
25511
|
class NewObject {
|
|
25511
25512
|
runSyntax(node, scope, targetType, filename) {
|
|
25512
25513
|
let ret = undefined;
|
|
@@ -25588,7 +25589,10 @@ class NewObject {
|
|
|
25588
25589
|
if (type === undefined) {
|
|
25589
25590
|
throw new Error("NewObject, no default importing parameter found for constructor, " + name);
|
|
25590
25591
|
}
|
|
25591
|
-
new source_1.Source().runSyntax(source, scope, filename, type);
|
|
25592
|
+
const sourceType = new source_1.Source().runSyntax(source, scope, filename, type);
|
|
25593
|
+
if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, type) === false) {
|
|
25594
|
+
throw new Error(`NEW parameter type not compatible`);
|
|
25595
|
+
}
|
|
25592
25596
|
}
|
|
25593
25597
|
else if (parameters) {
|
|
25594
25598
|
// parameters with names
|
|
@@ -25773,6 +25777,9 @@ class Select {
|
|
|
25773
25777
|
const token = node.getFirstToken();
|
|
25774
25778
|
const from = node.findDirectExpression(Expressions.SQLFrom);
|
|
25775
25779
|
const dbSources = from ? new sql_from_1.SQLFrom().runSyntax(from, scope, filename) : [];
|
|
25780
|
+
if (dbSources.length === 0) {
|
|
25781
|
+
throw new Error(`Missing FROM`);
|
|
25782
|
+
}
|
|
25776
25783
|
const fields = this.findFields(node);
|
|
25777
25784
|
if (fields.length === 0
|
|
25778
25785
|
&& node.findDirectExpression(Expressions.SQLFieldListLoop) === undefined) {
|
|
@@ -28638,6 +28645,7 @@ const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@a
|
|
|
28638
28645
|
const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
28639
28646
|
const types_1 = __webpack_require__(/*! ../../types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
|
|
28640
28647
|
const _object_oriented_1 = __webpack_require__(/*! ../_object_oriented */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js");
|
|
28648
|
+
const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
|
|
28641
28649
|
class CreateObject {
|
|
28642
28650
|
runSyntax(node, scope, filename) {
|
|
28643
28651
|
let cdef = undefined;
|
|
@@ -28661,7 +28669,7 @@ class CreateObject {
|
|
|
28661
28669
|
}
|
|
28662
28670
|
}
|
|
28663
28671
|
// just recurse
|
|
28664
|
-
for (const s of node.
|
|
28672
|
+
for (const s of node.findDirectExpressions(Expressions.Source)) {
|
|
28665
28673
|
new source_1.Source().runSyntax(s, scope, filename);
|
|
28666
28674
|
}
|
|
28667
28675
|
let first = true;
|
|
@@ -28705,26 +28713,35 @@ class CreateObject {
|
|
|
28705
28713
|
for (const t of node.findDirectExpressions(Expressions.Dynamic)) {
|
|
28706
28714
|
new dynamic_1.Dynamic().runSyntax(t, scope, filename);
|
|
28707
28715
|
}
|
|
28708
|
-
this.validateParameters(cdef, node, scope);
|
|
28716
|
+
this.validateParameters(cdef, node, scope, filename);
|
|
28709
28717
|
}
|
|
28710
|
-
validateParameters(cdef, node, scope) {
|
|
28711
|
-
var _a, _b, _c;
|
|
28718
|
+
validateParameters(cdef, node, scope, filename) {
|
|
28719
|
+
var _a, _b, _c, _d;
|
|
28712
28720
|
if (cdef === undefined) {
|
|
28721
|
+
const sources = (_a = node.findDirectExpression(Expressions.ParameterListS)) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Source);
|
|
28722
|
+
for (const s of sources || []) {
|
|
28723
|
+
new source_1.Source().runSyntax(s, scope, filename);
|
|
28724
|
+
}
|
|
28713
28725
|
return;
|
|
28714
28726
|
}
|
|
28715
28727
|
const methodDef = new _object_oriented_1.ObjectOriented(scope).searchMethodName(cdef, "CONSTRUCTOR");
|
|
28716
|
-
const methodParameters = (
|
|
28728
|
+
const methodParameters = (_b = methodDef.method) === null || _b === void 0 ? void 0 : _b.getParameters();
|
|
28717
28729
|
const allImporting = (methodParameters === null || methodParameters === void 0 ? void 0 : methodParameters.getImporting()) || [];
|
|
28718
28730
|
const requiredImporting = new Set(methodParameters === null || methodParameters === void 0 ? void 0 : methodParameters.getRequiredParameters().map(i => i.getName().toUpperCase()));
|
|
28719
|
-
|
|
28720
|
-
|
|
28721
|
-
const name = (_c = p.findDirectExpression(Expressions.ParameterName)) === null || _c === void 0 ? void 0 : _c.concatTokens().toUpperCase();
|
|
28731
|
+
for (const p of ((_c = node.findDirectExpression(Expressions.ParameterListS)) === null || _c === void 0 ? void 0 : _c.findAllExpressions(Expressions.ParameterS)) || []) {
|
|
28732
|
+
const name = (_d = p.findDirectExpression(Expressions.ParameterName)) === null || _d === void 0 ? void 0 : _d.concatTokens().toUpperCase();
|
|
28722
28733
|
if (name === undefined) {
|
|
28723
28734
|
continue;
|
|
28724
28735
|
}
|
|
28725
|
-
|
|
28736
|
+
const source = p.findDirectExpression(Expressions.Source);
|
|
28737
|
+
const sourceType = new source_1.Source().runSyntax(source, scope, filename);
|
|
28738
|
+
const found = allImporting === null || allImporting === void 0 ? void 0 : allImporting.find(p => p.getName().toUpperCase() === name);
|
|
28739
|
+
if (found === undefined) {
|
|
28726
28740
|
throw new Error(`constructor parameter "${name}" does not exist`);
|
|
28727
28741
|
}
|
|
28742
|
+
else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, found.getType()) === false) {
|
|
28743
|
+
throw new Error(`constructor parameter "${name}" type not compatible`);
|
|
28744
|
+
}
|
|
28728
28745
|
requiredImporting.delete(name);
|
|
28729
28746
|
}
|
|
28730
28747
|
for (const r of requiredImporting.values()) {
|
|
@@ -50139,7 +50156,7 @@ class Registry {
|
|
|
50139
50156
|
}
|
|
50140
50157
|
static abaplintVersion() {
|
|
50141
50158
|
// magic, see build script "version.sh"
|
|
50142
|
-
return "2.102.
|
|
50159
|
+
return "2.102.66";
|
|
50143
50160
|
}
|
|
50144
50161
|
getDDICReferences() {
|
|
50145
50162
|
return this.ddicReferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.66",
|
|
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.102.
|
|
41
|
+
"@abaplint/core": "^2.102.66",
|
|
42
42
|
"@types/chai": "^4.3.9",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.4",
|
|
45
45
|
"@types/mocha": "^10.0.3",
|
|
46
|
-
"@types/node": "^20.8.
|
|
46
|
+
"@types/node": "^20.8.10",
|
|
47
47
|
"@types/progress": "^2.0.6",
|
|
48
48
|
"chai": "^4.3.10",
|
|
49
49
|
"chalk": "^5.3.0",
|