@abaplint/cli 2.113.133 → 2.113.135
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 +32 -10
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -4850,7 +4850,7 @@ class CorrespondingBody extends combi_1.Expression {
|
|
|
4850
4850
|
const mapping = (0, combi_1.seq)("MAPPING", (0, combi_1.plus)((0, combi_1.seq)(_1.ComponentName, "=", component_chain_1.ComponentChain)));
|
|
4851
4851
|
const baseParen = (0, combi_1.seq)("BASE", (0, combi_1.tok)(tokens_1.WParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
4852
4852
|
const discarding = (0, combi_1.ver)(version_1.Version.v751, "DISCARDING DUPLICATES");
|
|
4853
|
-
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)("CHANGING CONTROL"), (0, combi_1.optPrio)("MAPPING FROM ENTITY USING CONTROL"), // todo, version something?
|
|
4853
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)("CHANGING CONTROL"), (0, combi_1.optPrio)((0, combi_1.seq)("MAPPING FROM ENTITY", (0, combi_1.optPrio)("USING CONTROL"))), // todo, version something?
|
|
4854
4854
|
(0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
@@ -9459,13 +9459,14 @@ class TypeStructure extends combi_1.Expression {
|
|
|
9459
9459
|
const create = (0, combi_1.seq)("CREATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
|
|
9460
9460
|
const update = (0, combi_1.seq)("UPDATE", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
|
|
9461
9461
|
const readResult = (0, combi_1.seq)("READ RESULT", (0, combi_1.alt)(_1.NamespaceSimpleName, _1.EntityAssociation));
|
|
9462
|
+
const readLink = (0, combi_1.seq)("READ LINK", _1.EntityAssociation);
|
|
9462
9463
|
const action = (0, combi_1.seq)("ACTION IMPORT", _1.Source);
|
|
9463
9464
|
const permissionsRequest = (0, combi_1.seq)("PERMISSIONS REQUEST", _1.NamespaceSimpleName);
|
|
9464
9465
|
const evt = (0, combi_1.seq)("EVENT", _1.EventName);
|
|
9465
9466
|
const failedEarly = (0, combi_1.seq)("FAILED EARLY", _1.NamespaceSimpleName);
|
|
9466
9467
|
const mappedEarly = (0, combi_1.seq)("MAPPED EARLY", _1.NamespaceSimpleName);
|
|
9467
9468
|
const reportedEarly = (0, combi_1.seq)("REPORTED EARLY", _1.NamespaceSimpleName);
|
|
9468
|
-
const structure = (0, combi_1.seq)("STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action, permissionsRequest, readResult));
|
|
9469
|
+
const structure = (0, combi_1.seq)("STRUCTURE FOR", (0, combi_1.altPrio)(hier, evt, create, update, action, permissionsRequest, readLink, readResult));
|
|
9469
9470
|
const response = (0, combi_1.seq)("RESPONSE FOR", (0, combi_1.altPrio)(failedEarly, mappedEarly, reportedEarly));
|
|
9470
9471
|
const request = (0, combi_1.seq)("REQUEST FOR CHANGE", _1.NamespaceSimpleName);
|
|
9471
9472
|
return (0, combi_1.seq)("TYPE", (0, combi_1.altPrio)(structure, response, request));
|
|
@@ -14988,7 +14989,7 @@ class MethodDef {
|
|
|
14988
14989
|
const forfunction = (0, combi_1.seq)("FOR FUNCTION", expressions_1.TypeName, result);
|
|
14989
14990
|
const behavior = (0, combi_1.altPrio)("DDL OBJECT OPTIONS CDS SESSION CLIENT REQUIRED", // todo, this is only from version something
|
|
14990
14991
|
(0, combi_1.seq)("TABLE FUNCTION", expressions_1.NamespaceSimpleName), // todo, this is only from version something
|
|
14991
|
-
(0, combi_1.seq)("VALIDATE ON SAVE IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("MODIFY IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("PRECHECK IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("READ IMPORTING", expressions_1.MethodParamName, (0, combi_1.altPrio)(forRead, forfunction)), (0, combi_1.seq)("FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.NamespaceSimpleName, "FOR", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR CREATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR READ", expressions_1.TypeName, result), (0, combi_1.seq)((0, combi_1.alt)("BEHAVIOR", "LOCK"), "IMPORTING", expressions_1.MethodParamName, "FOR LOCK", expressions_1.TypeName), (0, combi_1.seq)("DETERMINE", (0, combi_1.alt)("ON MODIFY", "ON SAVE"), "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("GLOBAL AUTHORIZATION IMPORTING REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE AUTHORIZATION IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result));
|
|
14992
|
+
(0, combi_1.seq)("VALIDATE ON SAVE IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("MODIFY IMPORTING", (0, combi_1.plus)((0, combi_1.seq)(expressions_1.MethodParamName, modify))), (0, combi_1.seq)("PRECHECK IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("NUMBERING IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("READ IMPORTING", expressions_1.MethodParamName, (0, combi_1.altPrio)(forRead, forfunction)), (0, combi_1.seq)("FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.NamespaceSimpleName, "FOR", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR CREATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR READ", expressions_1.TypeName, result), (0, combi_1.seq)((0, combi_1.alt)("BEHAVIOR", "LOCK"), "IMPORTING", expressions_1.MethodParamName, "FOR LOCK", expressions_1.TypeName), (0, combi_1.seq)("DETERMINE", (0, combi_1.alt)("ON MODIFY", "ON SAVE"), "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("GLOBAL AUTHORIZATION IMPORTING REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("GLOBAL FEATURES IMPORTING REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE AUTHORIZATION IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result));
|
|
14992
14993
|
// todo, this is only from version something
|
|
14993
14994
|
const amdp = (0, combi_1.seq)("AMDP OPTIONS", (0, combi_1.optPrio)("READ-ONLY"), "CDS SESSION CLIENT CURRENT", (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));
|
|
14994
14995
|
const ret = (0, combi_1.seq)((0, combi_1.altPrio)("CLASS-METHODS", "METHODS"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), (0, combi_1.optPrio)(def), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)("FOR", behavior), amdp, "NOT AT END OF MODE", (0, combi_1.optPrio)(expressions_1.Redefinition)));
|
|
@@ -15069,14 +15070,15 @@ class ModifyEntities {
|
|
|
15069
15070
|
const withh = (0, combi_1.seq)("WITH", expressions_1.Source);
|
|
15070
15071
|
const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ")", withh);
|
|
15071
15072
|
const by = (0, combi_1.seq)("BY", expressions_1.AssociationName);
|
|
15072
|
-
const
|
|
15073
|
+
const relating = (0, combi_1.seq)("RELATING TO", expressions_1.NamespaceSimpleName, "BY", expressions_1.NamespaceSimpleName);
|
|
15074
|
+
const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("CREATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("UPDATE FROM", expressions_1.Source, relating), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), "FROM", expressions_1.Source, (0, combi_1.opt)(relating)), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), (0, combi_1.optPrio)("AUTO FILL CID"), (0, combi_1.altPrio)(withh, fieldsWith)));
|
|
15073
15075
|
const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
|
|
15074
15076
|
const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
|
|
15075
15077
|
const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
|
|
15076
15078
|
const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
|
|
15077
15079
|
const from = (0, combi_1.seq)("FROM", expressions_1.Source);
|
|
15078
15080
|
const execute = (0, combi_1.seq)("EXECUTE", expressions_1.NamespaceSimpleName);
|
|
15079
|
-
const entities = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.plus)(operation))), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
|
|
15081
|
+
const entities = (0, combi_1.seq)((0, combi_1.optPrio)("AUGMENTING"), "ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plusPrio)((0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.plus)(operation))), (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported)));
|
|
15080
15082
|
const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, execute, from, mapped, failed, reported);
|
|
15081
15083
|
return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity)));
|
|
15082
15084
|
}
|
|
@@ -39523,6 +39525,7 @@ class ClassDefinition extends _identifier_1.Identifier {
|
|
|
39523
39525
|
this.abstract = (def === null || def === void 0 ? void 0 : def.findDirectTokenByText("ABSTRACT")) !== undefined;
|
|
39524
39526
|
// perform checks after everything has been initialized
|
|
39525
39527
|
this.checkMethodsFromSuperClasses(input.scope);
|
|
39528
|
+
this.checkMethodNameLength();
|
|
39526
39529
|
}
|
|
39527
39530
|
getFriends() {
|
|
39528
39531
|
return this.friends;
|
|
@@ -39575,6 +39578,14 @@ class ClassDefinition extends _identifier_1.Identifier {
|
|
|
39575
39578
|
const name = token === null || token === void 0 ? void 0 : token.getStr();
|
|
39576
39579
|
return name;
|
|
39577
39580
|
}
|
|
39581
|
+
checkMethodNameLength() {
|
|
39582
|
+
for (const m of this.methodDefs.getAll()) {
|
|
39583
|
+
if (m.getName().length > 30 && m.getName().includes("~") === false) {
|
|
39584
|
+
const message = `Method name "${m.getName()}" is too long, maximum length is 30 characters`;
|
|
39585
|
+
throw new Error(message);
|
|
39586
|
+
}
|
|
39587
|
+
}
|
|
39588
|
+
}
|
|
39578
39589
|
checkMethodsFromSuperClasses(scope) {
|
|
39579
39590
|
var _a;
|
|
39580
39591
|
let sup = this.getSuperClass();
|
|
@@ -40014,6 +40025,8 @@ class InterfaceDefinition extends _identifier_1.Identifier {
|
|
|
40014
40025
|
input.scope.push(_scope_type_1.ScopeType.Interface, name.getStr(), node.getFirstToken().getStart(), input.filename);
|
|
40015
40026
|
this.parse(input, node);
|
|
40016
40027
|
input.scope.pop(node.getLastToken().getEnd());
|
|
40028
|
+
// perform checks after everything has been initialized
|
|
40029
|
+
this.checkMethodNameLength();
|
|
40017
40030
|
}
|
|
40018
40031
|
getSuperClass() {
|
|
40019
40032
|
return undefined;
|
|
@@ -40043,6 +40056,14 @@ class InterfaceDefinition extends _identifier_1.Identifier {
|
|
|
40043
40056
|
return this.methodDefinitions;
|
|
40044
40057
|
}
|
|
40045
40058
|
/////////////////
|
|
40059
|
+
checkMethodNameLength() {
|
|
40060
|
+
for (const m of this.methodDefinitions.getAll()) {
|
|
40061
|
+
if (m.getName().length > 30) {
|
|
40062
|
+
const message = `Method name "${m.getName()}" is too long, maximum length is 30 characters`;
|
|
40063
|
+
throw new Error(message);
|
|
40064
|
+
}
|
|
40065
|
+
}
|
|
40066
|
+
}
|
|
40046
40067
|
checkInterfacesExists(input, node) {
|
|
40047
40068
|
var _a;
|
|
40048
40069
|
for (const i of node.findAllStatements(Statements.InterfaceDef)) {
|
|
@@ -40851,7 +40872,7 @@ class Result {
|
|
|
40851
40872
|
add(text, row, col, mode) {
|
|
40852
40873
|
if (text.length > 0) {
|
|
40853
40874
|
if (mode === Mode.SingleLineComment) {
|
|
40854
|
-
this.result.push(new tokens_1.Comment(new position_1.Position(row, col), text));
|
|
40875
|
+
this.result.push(new tokens_1.Comment(new position_1.Position(row, col - text.length), text));
|
|
40855
40876
|
}
|
|
40856
40877
|
else {
|
|
40857
40878
|
this.result.push(new tokens_1.Identifier(new position_1.Position(row, col), text));
|
|
@@ -41161,7 +41182,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
|
|
|
41161
41182
|
const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
41162
41183
|
class CDSAnnotationSimple extends combi_1.Expression {
|
|
41163
41184
|
getRunnable() {
|
|
41164
|
-
const value = (0, combi_1.alt)(_1.CDSString, "true", "false", (0, combi_1.regex)(/^\d+$/), (0, combi_1.seq)((0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.regex)(/^#[\w_]+$/));
|
|
41185
|
+
const value = (0, combi_1.alt)(_1.CDSString, "true", "false", (0, combi_1.regex)(/^\d+$/), (0, combi_1.seq)((0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.seq)("#", "(", (0, combi_1.regex)(/^[\w_]+$/), ")"), (0, combi_1.regex)(/^#[\w_]+$/));
|
|
41165
41186
|
return value;
|
|
41166
41187
|
}
|
|
41167
41188
|
}
|
|
@@ -41412,7 +41433,8 @@ const cds_type_1 = __webpack_require__(/*! ./cds_type */ "./node_modules/@abapli
|
|
|
41412
41433
|
class CDSDefineCustom extends combi_1.Expression {
|
|
41413
41434
|
getRunnable() {
|
|
41414
41435
|
const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.opt)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", cds_type_1.CDSType, ";");
|
|
41415
|
-
|
|
41436
|
+
const composition = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), cds_name_1.CDSName, ":", _1.CDSComposition, ";");
|
|
41437
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE"), (0, combi_1.opt)((0, combi_1.str)("ROOT")), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.alt)(field, composition)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
|
|
41416
41438
|
}
|
|
41417
41439
|
}
|
|
41418
41440
|
exports.CDSDefineCustom = CDSDefineCustom;
|
|
@@ -41924,7 +41946,7 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
|
|
|
41924
41946
|
class CDSString extends combi_1.Expression {
|
|
41925
41947
|
getRunnable() {
|
|
41926
41948
|
// https://stackoverflow.com/a/57754227
|
|
41927
|
-
return (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF
|
|
41949
|
+
return (0, combi_1.regex)(/^'[A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF:\| -_]*'$/);
|
|
41928
41950
|
}
|
|
41929
41951
|
}
|
|
41930
41952
|
exports.CDSString = CDSString;
|
|
@@ -54544,7 +54566,7 @@ class Registry {
|
|
|
54544
54566
|
}
|
|
54545
54567
|
static abaplintVersion() {
|
|
54546
54568
|
// magic, see build script "version.sh"
|
|
54547
|
-
return "2.113.
|
|
54569
|
+
return "2.113.135";
|
|
54548
54570
|
}
|
|
54549
54571
|
getDDICReferences() {
|
|
54550
54572
|
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.135",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.113.
|
|
41
|
+
"@abaplint/core": "^2.113.135",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/minimist": "^1.2.5",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|
|
45
|
-
"@types/node": "^24.0.
|
|
45
|
+
"@types/node": "^24.0.10",
|
|
46
46
|
"@types/progress": "^2.0.7",
|
|
47
47
|
"chai": "^4.5.0",
|
|
48
48
|
"p-limit": "^3.1.0",
|