@abaplint/transpiler-cli 2.7.49 → 2.7.51

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/bundle.js +32 -29
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -26186,7 +26186,7 @@ class Assign {
26186
26186
  const theSource = sources[sources.length - 1];
26187
26187
  let sourceType = new source_1.Source().runSyntax(theSource, scope, filename);
26188
26188
  if (sourceType === undefined || ((_b = node.findDirectExpression(Expressions.AssignSource)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Dynamic))) {
26189
- sourceType = new basic_1.VoidType("DynamicAssign");
26189
+ sourceType = new basic_1.AnyType();
26190
26190
  }
26191
26191
  for (const d of ((_c = node.findDirectExpression(Expressions.AssignSource)) === null || _c === void 0 ? void 0 : _c.findAllExpressions(Expressions.Dynamic)) || []) {
26192
26192
  new dynamic_1.Dynamic().runSyntax(d, scope, filename);
@@ -27234,16 +27234,16 @@ const data_definition_1 = __webpack_require__(/*! ../expressions/data_definition
27234
27234
  const unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js");
27235
27235
  class Data {
27236
27236
  runSyntax(node, scope, filename) {
27237
+ const name = node.findFirstExpression(Expressions.DefinitionName);
27237
27238
  const dd = node.findFirstExpression(Expressions.DataDefinition);
27238
27239
  if (dd) {
27239
27240
  const id = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
27240
27241
  if ((id === null || id === void 0 ? void 0 : id.getType().isGeneric()) === true
27241
27242
  && (id === null || id === void 0 ? void 0 : id.getType().containsVoid()) === false) {
27242
- throw new Error("DATA definition cannot be generic");
27243
+ throw new Error("DATA definition cannot be generic, " + name);
27243
27244
  }
27244
27245
  return id;
27245
27246
  }
27246
- const name = node.findFirstExpression(Expressions.DefinitionName);
27247
27247
  if (name) {
27248
27248
  return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new unknown_type_1.UnknownType("data, fallback"));
27249
27249
  }
@@ -46406,42 +46406,45 @@ class TableType extends _abstract_object_1.AbstractObject {
46406
46406
  this.parsedXML = undefined;
46407
46407
  super.setDirty();
46408
46408
  }
46409
- buildTableOptions() {
46410
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
46411
- let primaryKey = undefined;
46412
- if (((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.accessmode) === "S") {
46413
- primaryKey = {
46414
- isUnique: ((_b = this.parsedXML) === null || _b === void 0 ? void 0 : _b.keykind) === "U",
46415
- type: basic_1.TableAccessType.sorted,
46416
- keyFields: [],
46417
- name: "primary_key",
46418
- };
46409
+ buildPrimaryKey() {
46410
+ var _a, _b, _c, _d, _e;
46411
+ const primaryKey = {
46412
+ isUnique: ((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.keykind) === "U",
46413
+ type: basic_1.TableAccessType.standard,
46414
+ keyFields: [],
46415
+ name: "primary_key",
46416
+ };
46417
+ if (((_b = this.parsedXML) === null || _b === void 0 ? void 0 : _b.accessmode) === "S") {
46418
+ primaryKey.type = basic_1.TableAccessType.sorted;
46419
46419
  }
46420
46420
  else if (((_c = this.parsedXML) === null || _c === void 0 ? void 0 : _c.accessmode) === "H") {
46421
- primaryKey = {
46422
- isUnique: ((_d = this.parsedXML) === null || _d === void 0 ? void 0 : _d.keykind) === "U",
46423
- type: basic_1.TableAccessType.hashed,
46424
- keyFields: [],
46425
- name: "primary_key",
46426
- };
46421
+ primaryKey.type = basic_1.TableAccessType.hashed;
46427
46422
  }
46428
- for (const f of ((_e = this.parsedXML) === null || _e === void 0 ? void 0 : _e.dd42v) || []) {
46423
+ for (const f of ((_d = this.parsedXML) === null || _d === void 0 ? void 0 : _d.dd42v) || []) {
46429
46424
  if (f.keyname === "") {
46430
- primaryKey === null || primaryKey === void 0 ? void 0 : primaryKey.keyFields.push(f.keyfield);
46425
+ primaryKey.keyFields.push(f.keyfield);
46431
46426
  }
46432
46427
  }
46433
- if (((_f = this.parsedXML) === null || _f === void 0 ? void 0 : _f.keydef) === "T" && (primaryKey === null || primaryKey === void 0 ? void 0 : primaryKey.keyFields.length) === 0) {
46434
- primaryKey === null || primaryKey === void 0 ? void 0 : primaryKey.keyFields.push("table_line");
46428
+ if (((_e = this.parsedXML) === null || _e === void 0 ? void 0 : _e.keydef) === "T" && primaryKey.keyFields.length === 0) {
46429
+ primaryKey.keyFields.push("table_line");
46430
+ }
46431
+ return primaryKey;
46432
+ }
46433
+ buildTableOptions() {
46434
+ var _a, _b, _c, _d;
46435
+ let keyType = Types.TableKeyType.user;
46436
+ if (((_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.keydef) === "D") {
46437
+ keyType = Types.TableKeyType.default;
46435
46438
  }
46436
46439
  const tableOptions = {
46437
46440
  withHeader: false,
46438
- keyType: Types.TableKeyType.user,
46439
- primaryKey: primaryKey,
46441
+ keyType: keyType,
46442
+ primaryKey: this.buildPrimaryKey(),
46440
46443
  secondary: [],
46441
46444
  };
46442
- for (const k of ((_g = this.parsedXML) === null || _g === void 0 ? void 0 : _g.dd43v) || []) {
46445
+ for (const k of ((_b = this.parsedXML) === null || _b === void 0 ? void 0 : _b.dd43v) || []) {
46443
46446
  const fields = [];
46444
- for (const f of ((_h = this.parsedXML) === null || _h === void 0 ? void 0 : _h.dd42v) || []) {
46447
+ for (const f of ((_c = this.parsedXML) === null || _c === void 0 ? void 0 : _c.dd42v) || []) {
46445
46448
  if (f.keyname === k.keyname) {
46446
46449
  fields.push(f.keyfield);
46447
46450
  }
@@ -46457,7 +46460,7 @@ class TableType extends _abstract_object_1.AbstractObject {
46457
46460
  default:
46458
46461
  break;
46459
46462
  }
46460
- (_j = tableOptions.secondary) === null || _j === void 0 ? void 0 : _j.push({
46463
+ (_d = tableOptions.secondary) === null || _d === void 0 ? void 0 : _d.push({
46461
46464
  name: k.keyname,
46462
46465
  type: accessType,
46463
46466
  keyFields: fields,
@@ -47588,7 +47591,7 @@ class Registry {
47588
47591
  }
47589
47592
  static abaplintVersion() {
47590
47593
  // magic, see build script "version.sh"
47591
- return "2.102.5";
47594
+ return "2.102.7";
47592
47595
  }
47593
47596
  getDDICReferences() {
47594
47597
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.49",
3
+ "version": "2.7.51",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,12 +26,12 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.7.49",
29
+ "@abaplint/transpiler": "^2.7.51",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.5",
33
- "@types/node": "^20.4.4",
34
- "@abaplint/core": "^2.102.5",
33
+ "@types/node": "^20.4.5",
34
+ "@abaplint/core": "^2.102.7",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.88.2",
37
37
  "webpack-cli": "^5.1.4",