@abaplint/cli 2.102.5 → 2.102.6

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 +12 -8
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -28181,16 +28181,16 @@ const data_definition_1 = __webpack_require__(/*! ../expressions/data_definition
28181
28181
  const unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js");
28182
28182
  class Data {
28183
28183
  runSyntax(node, scope, filename) {
28184
+ const name = node.findFirstExpression(Expressions.DefinitionName);
28184
28185
  const dd = node.findFirstExpression(Expressions.DataDefinition);
28185
28186
  if (dd) {
28186
28187
  const id = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
28187
28188
  if ((id === null || id === void 0 ? void 0 : id.getType().isGeneric()) === true
28188
28189
  && (id === null || id === void 0 ? void 0 : id.getType().containsVoid()) === false) {
28189
- throw new Error("DATA definition cannot be generic");
28190
+ throw new Error("DATA definition cannot be generic, " + name);
28190
28191
  }
28191
28192
  return id;
28192
28193
  }
28193
- const name = node.findFirstExpression(Expressions.DefinitionName);
28194
28194
  if (name) {
28195
28195
  return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new unknown_type_1.UnknownType("data, fallback"));
28196
28196
  }
@@ -47354,7 +47354,7 @@ class TableType extends _abstract_object_1.AbstractObject {
47354
47354
  super.setDirty();
47355
47355
  }
47356
47356
  buildTableOptions() {
47357
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
47357
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
47358
47358
  let primaryKey = undefined;
47359
47359
  if (((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.accessmode) === "S") {
47360
47360
  primaryKey = {
@@ -47380,15 +47380,19 @@ class TableType extends _abstract_object_1.AbstractObject {
47380
47380
  if (((_f = this.parsedXML) === null || _f === void 0 ? void 0 : _f.keydef) === "T" && (primaryKey === null || primaryKey === void 0 ? void 0 : primaryKey.keyFields.length) === 0) {
47381
47381
  primaryKey === null || primaryKey === void 0 ? void 0 : primaryKey.keyFields.push("table_line");
47382
47382
  }
47383
+ let keyType = Types.TableKeyType.user;
47384
+ if (((_g = this.parsedXML) === null || _g === void 0 ? void 0 : _g.keydef) === "D") {
47385
+ keyType = Types.TableKeyType.default;
47386
+ }
47383
47387
  const tableOptions = {
47384
47388
  withHeader: false,
47385
- keyType: Types.TableKeyType.user,
47389
+ keyType: keyType,
47386
47390
  primaryKey: primaryKey,
47387
47391
  secondary: [],
47388
47392
  };
47389
- for (const k of ((_g = this.parsedXML) === null || _g === void 0 ? void 0 : _g.dd43v) || []) {
47393
+ for (const k of ((_h = this.parsedXML) === null || _h === void 0 ? void 0 : _h.dd43v) || []) {
47390
47394
  const fields = [];
47391
- for (const f of ((_h = this.parsedXML) === null || _h === void 0 ? void 0 : _h.dd42v) || []) {
47395
+ for (const f of ((_j = this.parsedXML) === null || _j === void 0 ? void 0 : _j.dd42v) || []) {
47392
47396
  if (f.keyname === k.keyname) {
47393
47397
  fields.push(f.keyfield);
47394
47398
  }
@@ -47404,7 +47408,7 @@ class TableType extends _abstract_object_1.AbstractObject {
47404
47408
  default:
47405
47409
  break;
47406
47410
  }
47407
- (_j = tableOptions.secondary) === null || _j === void 0 ? void 0 : _j.push({
47411
+ (_k = tableOptions.secondary) === null || _k === void 0 ? void 0 : _k.push({
47408
47412
  name: k.keyname,
47409
47413
  type: accessType,
47410
47414
  keyFields: fields,
@@ -48535,7 +48539,7 @@ class Registry {
48535
48539
  }
48536
48540
  static abaplintVersion() {
48537
48541
  // magic, see build script "version.sh"
48538
- return "2.102.5";
48542
+ return "2.102.6";
48539
48543
  }
48540
48544
  getDDICReferences() {
48541
48545
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.5",
3
+ "version": "2.102.6",
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.102.5",
41
+ "@abaplint/core": "^2.102.6",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",