@abaplint/cli 2.113.206 → 2.113.208

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.
Files changed (2) hide show
  1. package/build/cli.js +35 -18
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -5133,7 +5133,7 @@ exports.EntityAssociation = void 0;
5133
5133
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
5134
5134
  class EntityAssociation extends combi_1.Expression {
5135
5135
  getRunnable() {
5136
- return (0, combi_1.regex)(/^[\/\w]+(\\_|\\\\)[\_\w\\~]+$/);
5136
+ return (0, combi_1.regex)(/^[\/\w]+(\\_|\\\\)[\/\_\w\\~]+$/);
5137
5137
  }
5138
5138
  }
5139
5139
  exports.EntityAssociation = EntityAssociation;
@@ -15120,7 +15120,7 @@ class MethodDef {
15120
15120
  const forfunction = (0, combi_1.seq)("FOR FUNCTION", expressions_1.TypeName, result);
15121
15121
  const behavior = (0, combi_1.altPrio)("DDL OBJECT OPTIONS CDS SESSION CLIENT REQUIRED", // todo, this is only from version something
15122
15122
  (0, combi_1.seq)("TABLE FUNCTION", expressions_1.NamespaceSimpleName), // todo, this is only from version something
15123
- (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)("DETERMINATION", expressions_1.TypeName, "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("VALIDATION", expressions_1.TypeName, "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (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)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName), (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)((0, combi_1.seq)((0, combi_1.opt)("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));
15123
+ (0, combi_1.seq)("VALIDATE ON SAVE IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("MODIFY", (0, combi_1.opt)("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)("DETERMINATION", expressions_1.TypeName, "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("VALIDATION", expressions_1.TypeName, "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (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)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName), (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)((0, combi_1.seq)((0, combi_1.opt)("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));
15124
15124
  // todo, this is only from version something
15125
15125
  const amdp = (0, combi_1.seq)("AMDP OPTIONS", (0, combi_1.optPrio)("READ-ONLY"), "CDS SESSION CLIENT", (0, combi_1.alt)("CURRENT", "DEPENDENT"), (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));
15126
15126
  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)));
@@ -15206,14 +15206,16 @@ class ModifyEntities {
15206
15206
  const create = (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), "FROM", expressions_1.Source, (0, combi_1.opt)(relating));
15207
15207
  const updateFrom = (0, combi_1.seq)("UPDATE FROM", expressions_1.Source, (0, combi_1.opt)(relating));
15208
15208
  const deleteFrom = (0, combi_1.seq)("DELETE FROM", expressions_1.Source);
15209
- 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), deleteFrom, updateFrom, create, execute, (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), (0, combi_1.optPrio)("AUTO FILL CID"), (0, combi_1.altPrio)(withh, fieldsWith)));
15209
+ const updateFields = (0, combi_1.seq)("UPDATE", fieldsWith);
15210
+ 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), updateFields, deleteFrom, updateFrom, create, execute, (0, combi_1.seq)("CREATE", (0, combi_1.opt)(by), (0, combi_1.optPrio)("AUTO FILL CID"), (0, combi_1.altPrio)(withh, fieldsWith)));
15210
15211
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
15211
15212
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
15212
15213
  const mapped = (0, combi_1.seq)("MAPPED", expressions_1.Target);
15213
15214
  const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
15214
15215
  const end = (0, combi_1.optPrio)((0, combi_1.per)(failed, result, mapped, reported));
15215
- 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))));
15216
- const entity = (0, combi_1.seq)("ENTITY", (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.alt)(expressions_1.NamespaceSimpleName, expressions_1.EntityAssociation), (0, combi_1.alt)(execute, create, deleteFrom, updateFrom));
15216
+ 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.NamespaceSimpleName, (0, combi_1.plus)(operation))));
15217
+ const create2 = (0, combi_1.seq)("CREATE", fieldsWith, "CREATE BY", expressions_1.AssociationName, fieldsWith);
15218
+ const entity = (0, combi_1.seq)("ENTITY", (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.alt)(expressions_1.NamespaceSimpleName, expressions_1.EntityAssociation), (0, combi_1.alt)(execute, create, updateFields, deleteFrom, updateFrom, create2));
15217
15219
  return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("MODIFY", (0, combi_1.alt)(entities, entity), end));
15218
15220
  }
15219
15221
  }
@@ -16154,9 +16156,11 @@ class ReadEntities {
16154
16156
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
16155
16157
  const result = (0, combi_1.seq)("RESULT", expressions_1.Target);
16156
16158
  const failed = (0, combi_1.seq)("FAILED", expressions_1.Target);
16159
+ const reported = (0, combi_1.seq)("REPORTED", expressions_1.Target);
16157
16160
  const entity = (0, combi_1.seq)("ENTITY", expressions_1.NamespaceSimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)(result));
16158
- const s = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plus)(entity), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)(failed), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
16159
- const single = (0, combi_1.seq)("ENTITY", (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.alt)(expressions_1.NamespaceSimpleName, expressions_1.EntityAssociation), (0, combi_1.alt)(all, fields, from), result, (0, combi_1.optPrio)(failed));
16161
+ const s = (0, combi_1.seq)("ENTITIES OF", expressions_1.NamespaceSimpleName, (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.plus)(entity), (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.per)(failed, reported)));
16162
+ const by = (0, combi_1.seq)("BY", expressions_1.AssociationName, fields);
16163
+ const single = (0, combi_1.seq)("ENTITY", (0, combi_1.opt)("IN LOCAL MODE"), (0, combi_1.alt)(expressions_1.NamespaceSimpleName, expressions_1.EntityAssociation), (0, combi_1.alt)(all, fields, from, by), result, (0, combi_1.optPrio)(failed), (0, combi_1.optPrio)(reported));
16160
16164
  return (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("READ", (0, combi_1.alt)(s, single)));
16161
16165
  }
16162
16166
  }
@@ -40413,6 +40417,8 @@ class MethodParameters {
40413
40417
  || concat.includes(" FOR FEATURES ")
40414
40418
  || concat.includes(" FOR INSTANCE FEATURES ")
40415
40419
  || concat.includes(" FOR READ ")
40420
+ || concat.includes(" FOR VALIDATION ")
40421
+ || concat.includes(" FOR DETERMINE ")
40416
40422
  || concat.includes(" FOR LOCK ")
40417
40423
  || concat.includes(" FOR MODIFY ")) {
40418
40424
  const token = isRap.getFirstToken();
@@ -40928,7 +40934,7 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
40928
40934
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
40929
40935
  class CDSAggregate extends combi_1.Expression {
40930
40936
  getRunnable() {
40931
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
40937
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName)));
40932
40938
  const value = (0, combi_1.alt)(name, "*", _1.CDSCast, _1.CDSCase, _1.CDSFunction);
40933
40939
  return (0, combi_1.seq)((0, combi_1.alt)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.opt)("DISTINCT"), value, ")");
40934
40940
  }
@@ -41146,8 +41152,10 @@ exports.CDSCardinality = void 0;
41146
41152
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
41147
41153
  class CDSCardinality extends combi_1.Expression {
41148
41154
  getRunnable() {
41149
- const cardinality = (0, combi_1.seq)("[", (0, combi_1.alt)("0", "1", "*"), (0, combi_1.opt)((0, combi_1.seq)(".", ".", (0, combi_1.alt)("0", "1", "*"))), "]");
41150
- return cardinality;
41155
+ const numeric = (0, combi_1.seq)("[", (0, combi_1.alt)("0", "1", "*"), (0, combi_1.opt)((0, combi_1.seq)(".", ".", (0, combi_1.alt)("0", "1", "*"))), "]");
41156
+ const num = (0, combi_1.alt)("ONE", "MANY");
41157
+ const text = (0, combi_1.seq)("OF", num, "TO", num);
41158
+ return (0, combi_1.alt)(numeric, text);
41151
41159
  }
41152
41160
  }
41153
41161
  exports.CDSCardinality = CDSCardinality;
@@ -41301,7 +41309,7 @@ class CDSDefineCustom extends combi_1.Expression {
41301
41309
  getRunnable() {
41302
41310
  const field = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", cds_type_1.CDSType, ";");
41303
41311
  const compsiOrAssoci = (0, combi_1.seq)(cds_name_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";");
41304
- 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.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
41312
+ 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"), (0, combi_1.opt)(_1.CDSWithParameters), cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
41305
41313
  }
41306
41314
  }
41307
41315
  exports.CDSDefineCustom = CDSDefineCustom;
@@ -54473,7 +54481,7 @@ class Registry {
54473
54481
  }
54474
54482
  static abaplintVersion() {
54475
54483
  // magic, see build script "version.sh"
54476
- return "2.113.206";
54484
+ return "2.113.208";
54477
54485
  }
54478
54486
  getDDICReferences() {
54479
54487
  return this.ddicReferences;
@@ -58134,10 +58142,13 @@ class CloudTypes {
58134
58142
  || obj instanceof Objects.BusinessCatalogAppAssignment
58135
58143
  || obj instanceof Objects.CDSMetadataExtension
58136
58144
  || obj instanceof Objects.Class
58145
+ || obj instanceof Objects.CDSType
58146
+ || obj instanceof Objects.ChangeDocument
58137
58147
  || obj instanceof Objects.CDSEntityBuffer
58138
58148
  || obj instanceof Objects.ApplicationLogObject
58139
58149
  || obj instanceof Objects.CommunicationScenario
58140
58150
  || obj instanceof Objects.DataControl
58151
+ || obj instanceof Objects.KnowledgeTransferDocument
58141
58152
  || obj instanceof Objects.DataDefinition
58142
58153
  || obj instanceof Objects.DataElement
58143
58154
  || obj instanceof Objects.Domain
@@ -73782,16 +73793,22 @@ class SQLEscapeHostVariables extends _abap_rule_1.ABAPRule {
73782
73793
  return [];
73783
73794
  }
73784
73795
  for (const s of file.getStatements()) {
73785
- if (s.get() instanceof Statements.UpdateDatabase
73786
- || s.get() instanceof Statements.ModifyDatabase
73787
- || s.get() instanceof Statements.Select
73788
- || s.get() instanceof Statements.SelectLoop
73789
- || s.get() instanceof Statements.InsertDatabase
73790
- || s.get() instanceof Statements.DeleteDatabase) {
73796
+ const get = s.get();
73797
+ if (get instanceof Statements.UpdateDatabase
73798
+ || get instanceof Statements.ModifyDatabase
73799
+ || get instanceof Statements.Select
73800
+ || get instanceof Statements.SelectLoop
73801
+ || get instanceof Statements.InsertDatabase
73802
+ || get instanceof Statements.DeleteDatabase) {
73791
73803
  for (const o of s.findAllExpressionsMulti([Expressions.SQLSource, Expressions.SQLSourceSimple])) {
73792
73804
  const first = o.getFirstChild();
73793
73805
  if (((first === null || first === void 0 ? void 0 : first.get()) instanceof Expressions.Source && first.getChildren()[0].get() instanceof Expressions.FieldChain)
73794
73806
  || ((first === null || first === void 0 ? void 0 : first.get()) instanceof Expressions.SimpleSource3 && first.getChildren()[0].get() instanceof Expressions.FieldChain)) {
73807
+ if (get instanceof Statements.ModifyDatabase
73808
+ && first.getFirstToken().getStr().toUpperCase().startsWith("LS_")) {
73809
+ // heuristic, might not be correct in all cases
73810
+ continue;
73811
+ }
73795
73812
  const message = "Escape SQL host variables";
73796
73813
  const firstToken = o.getFirstChild().getFirstToken();
73797
73814
  const fix = edit_helper_1.EditHelper.replaceToken(file, firstToken, "@" + (firstToken === null || firstToken === void 0 ? void 0 : firstToken.getStr()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.206",
3
+ "version": "2.113.208",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.206",
41
+ "@abaplint/core": "^2.113.208",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",