@abaplint/cli 2.113.141 → 2.113.143

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 +28 -12
  2. package/package.json +5 -5
package/build/cli.js CHANGED
@@ -102,7 +102,7 @@ class FileOperations {
102
102
  static loadFileNames(arg, error = true) {
103
103
  const files = glob.sync(arg, { nodir: true, absolute: true, posix: true });
104
104
  if (files.length === 0 && error) {
105
- throw "Error: No files found";
105
+ throw "Error: No files found, " + arg;
106
106
  }
107
107
  return files;
108
108
  }
@@ -8791,10 +8791,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
8791
8791
  exports.SQLPath = void 0;
8792
8792
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
8793
8793
  const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
8794
+ const association_name_1 = __webpack_require__(/*! ./association_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/association_name.js");
8795
+ const sql_cond_1 = __webpack_require__(/*! ./sql_cond */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cond.js");
8794
8796
  class SQLPath extends combi_1.Expression {
8795
8797
  getRunnable() {
8796
8798
  // todo, only from version?
8797
- const ret = (0, combi_1.seq)((0, combi_1.regex)(/\\_\w+/), (0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/\w+/));
8799
+ const condition = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.BracketLeftW), "ONE TO ONE WHERE", sql_cond_1.SQLCond, (0, combi_1.tok)(tokens_1.WBracketRight));
8800
+ const ret = (0, combi_1.seq)(association_name_1.AssociationName, (0, combi_1.optPrio)(condition), (0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/\w+/));
8798
8801
  return ret;
8799
8802
  }
8800
8803
  }
@@ -16017,7 +16020,7 @@ class ReadEntities {
16017
16020
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
16018
16021
  const fields = (0, combi_1.seq)("FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source);
16019
16022
  const all = (0, combi_1.seq)("ALL FIELDS WITH", expressions_1.Source);
16020
- const entity = (0, combi_1.seq)("ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), (0, combi_1.alt)(fields, from, all), (0, combi_1.optPrio)((0, combi_1.seq)("RESULT", expressions_1.Target)));
16023
+ 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)((0, combi_1.seq)("RESULT", expressions_1.Target)));
16021
16024
  const s = (0, combi_1.seq)("READ 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.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
16022
16025
  return (0, combi_1.ver)(version_1.Version.v754, s);
16023
16026
  }
@@ -25742,8 +25745,9 @@ const dereference_1 = __webpack_require__(/*! ./dereference */ "./node_modules/@
25742
25745
  const source_field_symbol_1 = __webpack_require__(/*! ./source_field_symbol */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field_symbol.js");
25743
25746
  const source_field_1 = __webpack_require__(/*! ./source_field */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source_field.js");
25744
25747
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_syntax_input.js");
25748
+ const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
25745
25749
  class FieldChain {
25746
- static runSyntax(node, input, refType) {
25750
+ static runSyntax(node, input, refType, allowGenericDeference = false) {
25747
25751
  var _a, _b, _c;
25748
25752
  if (((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SourceField
25749
25753
  && node.findDirectExpression(Expressions.ComponentName)) {
@@ -25801,7 +25805,7 @@ class FieldChain {
25801
25805
  }
25802
25806
  }
25803
25807
  else {
25804
- const message = "Not a structure, FieldChain";
25808
+ const message = "Not a structure, FieldChain, " + (context === null || context === void 0 ? void 0 : context.constructor.name) + ", " + current.concatTokens();
25805
25809
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, current.getFirstToken(), message));
25806
25810
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
25807
25811
  }
@@ -25818,6 +25822,12 @@ class FieldChain {
25818
25822
  }
25819
25823
  else if (current.get() instanceof expressions_1.Dereference) {
25820
25824
  context = dereference_1.Dereference.runSyntax(current, context, input);
25825
+ if (allowGenericDeference === false
25826
+ && (context === null || context === void 0 ? void 0 : context.isGeneric()) === true
25827
+ && input.scope.getVersion() < version_1.Version.v756
25828
+ && input.scope.getVersion() !== version_1.Version.Cloud) {
25829
+ throw new Error("A generic reference cannot be dereferenced");
25830
+ }
25821
25831
  }
25822
25832
  else if (current.get() instanceof Expressions.ComponentName) {
25823
25833
  if (context instanceof basic_1.TableType && context.isWithHeader()) {
@@ -27982,8 +27992,9 @@ const assert_error_1 = __webpack_require__(/*! ../assert_error */ "./node_module
27982
27992
  * VALUE #( ... ). syntax error
27983
27993
  * DATA(bar) = VALUE #( ... ). give error, no type can be derived
27984
27994
  */
27995
+ // TODO: refactor all these method parameters to objects, this is getting messy
27985
27996
  class Source {
27986
- static runSyntax(node, input, targetType, writeReference = false) {
27997
+ static runSyntax(node, input, targetType, writeReference = false, allowGenericDeference = false) {
27987
27998
  if (node === undefined) {
27988
27999
  return undefined;
27989
28000
  }
@@ -28146,7 +28157,7 @@ class Source {
28146
28157
  }
28147
28158
  }
28148
28159
  else if (get instanceof Expressions.FieldChain) {
28149
- context = field_chain_1.FieldChain.runSyntax(first, input, type);
28160
+ context = field_chain_1.FieldChain.runSyntax(first, input, type, allowGenericDeference);
28150
28161
  }
28151
28162
  else if (get instanceof Expressions.StringTemplate) {
28152
28163
  context = string_template_1.StringTemplate.runSyntax(first, input);
@@ -28811,7 +28822,7 @@ class Target {
28811
28822
  && !(context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.StructureType)
28812
28823
  && !(context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.VoidType)
28813
28824
  && !(context instanceof basic_1.VoidType)) {
28814
- const message = "Not a structure, target";
28825
+ const message = "Not a structure, target, " + (context === null || context === void 0 ? void 0 : context.constructor.name) + ", " + current.concatTokens();
28815
28826
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28816
28827
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
28817
28828
  }
@@ -29818,7 +29829,7 @@ class Assign {
29818
29829
  sourceType = basic_1.VoidType.get("Dynamic");
29819
29830
  }
29820
29831
  else {
29821
- sourceType = source_1.Source.runSyntax(theSource, input);
29832
+ sourceType = source_1.Source.runSyntax(theSource, input, undefined, false, true);
29822
29833
  }
29823
29834
  if ((assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren().length) === 5
29824
29835
  && ((_a = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getFirstChild()) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "COMPONENT") {
@@ -32213,7 +32224,12 @@ class InsertInternal {
32213
32224
  inline_data_1.InlineData.runSyntax(afterInto, input, new basic_1.DataReference(sourceType));
32214
32225
  }
32215
32226
  else {
32216
- target_1.Target.runSyntax(afterInto, input);
32227
+ const type = target_1.Target.runSyntax(afterInto, input);
32228
+ if (type instanceof basic_1.TableType && type.getAccessType() === basic_1.TableAccessType.hashed) {
32229
+ const message = "Implicit or explicit index operation on hashed table is not possible";
32230
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
32231
+ return;
32232
+ }
32217
32233
  }
32218
32234
  }
32219
32235
  for (const s of node.findDirectExpressions(Expressions.Source)) {
@@ -41463,7 +41479,7 @@ const __1 = __webpack_require__(/*! ../.. */ "./node_modules/@abaplint/core/buil
41463
41479
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
41464
41480
  class CDSDefineProjection extends combi_1.Expression {
41465
41481
  getRunnable() {
41466
- return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Version.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSAs), (0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
41482
+ return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Version.v755, (0, combi_1.opt)("ENTITY")), _1.CDSName, (0, combi_1.opt)(_1.CDSProviderContract), "AS PROJECTION ON", _1.CDSName, (0, combi_1.opt)(_1.CDSAs), (0, combi_1.str)("{"), (0, combi_1.plus)(_1.CDSElement), (0, combi_1.star)((0, combi_1.seq)(",", _1.CDSElement)), (0, combi_1.str)("}"), (0, combi_1.opt)(_1.CDSWhere), (0, combi_1.opt)(";"));
41467
41483
  }
41468
41484
  }
41469
41485
  exports.CDSDefineProjection = CDSDefineProjection;
@@ -54574,7 +54590,7 @@ class Registry {
54574
54590
  }
54575
54591
  static abaplintVersion() {
54576
54592
  // magic, see build script "version.sh"
54577
- return "2.113.141";
54593
+ return "2.113.143";
54578
54594
  }
54579
54595
  getDDICReferences() {
54580
54596
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.141",
3
+ "version": "2.113.143",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,16 +38,16 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.141",
41
+ "@abaplint/core": "^2.113.143",
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.12",
45
+ "@types/node": "^24.0.14",
46
46
  "@types/progress": "^2.0.7",
47
47
  "chai": "^4.5.0",
48
48
  "p-limit": "^3.1.0",
49
49
  "chalk": "^5.4.1",
50
- "eslint": "^9.30.1",
50
+ "eslint": "^9.31.0",
51
51
  "glob": "^11.0.3",
52
52
  "json5": "^2.2.3",
53
53
  "memfs": "^4.17.2",
@@ -55,7 +55,7 @@
55
55
  "mocha": "^11.7.1",
56
56
  "progress": "^2.0.3",
57
57
  "typescript": "^5.8.3",
58
- "webpack": "^5.99.9",
58
+ "webpack": "^5.100.1",
59
59
  "webpack-cli": "^6.0.1",
60
60
  "xml-js": "^1.6.11"
61
61
  }