@abaplint/cli 2.120.41 → 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.
- package/build/cli.js +26 -22
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -8991,21 +8991,21 @@ class SQLFunction extends combi_1.Expression {
|
|
|
8991
8991
|
const fn = (name, params, v) => {
|
|
8992
8992
|
const nameReg = (0, combi_1.regex)(new RegExp("^" + name + "$", "i"));
|
|
8993
8993
|
if (params === 0) {
|
|
8994
|
-
return (0, combi_1.ver)(v, (0, combi_1.seq)(nameReg, (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
8994
|
+
return (0, combi_1.ver)(v, (0, combi_1.seq)(nameReg, (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)), { also: combi_1.AlsoIn.OpenABAP });
|
|
8995
8995
|
}
|
|
8996
8996
|
else if (params === VARIADIC) {
|
|
8997
|
-
return (0, combi_1.ver)(v, (0, combi_1.seq)(nameReg, (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.starPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
8997
|
+
return (0, combi_1.ver)(v, (0, combi_1.seq)(nameReg, (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.starPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)), { also: combi_1.AlsoIn.OpenABAP });
|
|
8998
8998
|
}
|
|
8999
8999
|
else {
|
|
9000
9000
|
const extra = [];
|
|
9001
9001
|
for (let i = 1; i < params; i++) {
|
|
9002
9002
|
extra.push(commaParam);
|
|
9003
9003
|
}
|
|
9004
|
-
return (0, combi_1.ver)(v, (0, combi_1.seq)(nameReg, (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, ...extra, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
9004
|
+
return (0, combi_1.ver)(v, (0, combi_1.seq)(nameReg, (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, ...extra, (0, combi_1.tok)(tokens_1.WParenRightW)), { also: combi_1.AlsoIn.OpenABAP });
|
|
9005
9005
|
}
|
|
9006
9006
|
};
|
|
9007
9007
|
const castInput = (0, combi_1.altPrio)(sql_case_1.SQLCase, sql_function_input_1.SQLFunctionInput);
|
|
9008
|
-
const cast = (0, combi_1.ver)(version_1.Release.v750, (0, combi_1.seq)((0, combi_1.regex)(/^cast$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), castInput, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
9008
|
+
const cast = (0, combi_1.ver)(version_1.Release.v750, (0, combi_1.seq)((0, combi_1.regex)(/^cast$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), castInput, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)), { also: combi_1.AlsoIn.OpenABAP });
|
|
9009
9009
|
const hostParen = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
9010
9010
|
const hostVar = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), (0, combi_1.altPrio)(simple_source3_1.SimpleSource3, hostParen));
|
|
9011
9011
|
const abapOnly = (0, combi_1.altPrio)(constant_1.Constant, hostVar);
|
|
@@ -9015,7 +9015,7 @@ class SQLFunction extends combi_1.Expression {
|
|
|
9015
9015
|
const kvs = params.map(p => (0, combi_1.seq)((0, combi_1.regex)(new RegExp("^" + p.name + "$", "i")), "=", valueFor(p)));
|
|
9016
9016
|
const anyKv = kvs.length === 1 ? kvs[0] : (0, combi_1.altPrio)(kvs[0], kvs[1], ...kvs.slice(2));
|
|
9017
9017
|
const body = (0, combi_1.optPrio)((0, combi_1.seq)(anyKv, (0, combi_1.starPrio)((0, combi_1.seq)(",", anyKv))));
|
|
9018
|
-
return (0, combi_1.ver)(v, (0, combi_1.seq)(nameReg, (0, combi_1.tok)(tokens_1.ParenLeftW), body, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
9018
|
+
return (0, combi_1.ver)(v, (0, combi_1.seq)(nameReg, (0, combi_1.tok)(tokens_1.ParenLeftW), body, (0, combi_1.tok)(tokens_1.WParenRightW)), { also: combi_1.AlsoIn.OpenABAP });
|
|
9019
9019
|
};
|
|
9020
9020
|
return (0, combi_1.altPrio)(cast, sql_replace_regexpr_1.SQLReplaceRegexpr, sql_occurrences_regexpr_1.SQLOccurrencesRegexpr, sql_substring_regexpr_1.SQLSubstringRegexpr, sql_locate_regexpr_1.SQLLocateRegexpr, ...exports.sqlFunctionDefs.map(([name, params, v]) => fn(name, params, v)), ...exports.sqlNamedFunctionDefs.map(([name, v, params]) => namedFn(name, v, params)), ...exports.sqlSpatialFunctionDefs.map(([name, params, v]) => fn(name, params, v)), ...exports.sqlSpatialAggregateDefs.map(([name, params, v]) => fn(name, params, v)));
|
|
9021
9021
|
}
|
|
@@ -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)(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
62780
|
-
|
|
62781
|
-
|
|
62782
|
-
|
|
62783
|
-
|
|
62784
|
-
|
|
62785
|
-
|
|
62786
|
-
|
|
62787
|
-
|
|
62788
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
+
"@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",
|