@abaplint/cli 2.115.26 → 2.115.27

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 +31 -3
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -28359,7 +28359,7 @@ class Select {
28359
28359
  }
28360
28360
  }
28361
28361
  static buildStructureType(fields, dbSources, scope) {
28362
- var _a, _b, _c;
28362
+ var _a, _b, _c, _d, _e, _f;
28363
28363
  if (fields.length === 1 && dbSources.length === 1) {
28364
28364
  const dbType = (_a = dbSources[0]) === null || _a === void 0 ? void 0 : _a.parseType(scope.getRegistry());
28365
28365
  if (dbType === undefined) {
@@ -28400,8 +28400,36 @@ class Select {
28400
28400
  }
28401
28401
  }
28402
28402
  }
28403
+ else if (dbSources.length === 1) {
28404
+ const dbType = (_d = dbSources[0]) === null || _d === void 0 ? void 0 : _d.parseType(scope.getRegistry());
28405
+ if (dbType === undefined) {
28406
+ const name = ((_e = dbSources[0]) === null || _e === void 0 ? void 0 : _e.getName()) || "buildStructureTypeError";
28407
+ if (scope.getRegistry().inErrorNamespace(name) === true) {
28408
+ return new basic_1.UnknownType("Select, " + name + " not found");
28409
+ }
28410
+ else {
28411
+ return basic_1.VoidType.get((_f = dbSources[0]) === null || _f === void 0 ? void 0 : _f.getName());
28412
+ }
28413
+ }
28414
+ if (!(dbType instanceof basic_1.StructureType)) {
28415
+ return basic_1.VoidType.get("SELECT_todo14");
28416
+ }
28417
+ const allFieldsSimple = fields.every(f => isSimple.test(f.code));
28418
+ if (allFieldsSimple === true) {
28419
+ const components = [];
28420
+ for (const field of fields) {
28421
+ const type = dbType.getComponentByName(field.code);
28422
+ if (type === undefined) {
28423
+ return basic_1.VoidType.get("SELECT_todo9");
28424
+ }
28425
+ components.push({ name: field.as || field.code, type });
28426
+ }
28427
+ return new basic_1.StructureType(components);
28428
+ }
28429
+ return basic_1.VoidType.get("SELECT_todo12");
28430
+ }
28403
28431
  else {
28404
- return basic_1.VoidType.get("SELECT_todo9");
28432
+ return basic_1.VoidType.get("SELECT_todo13");
28405
28433
  }
28406
28434
  }
28407
28435
  static buildTableType(fields, dbSources, scope) {
@@ -55645,7 +55673,7 @@ class Registry {
55645
55673
  }
55646
55674
  static abaplintVersion() {
55647
55675
  // magic, see build script "version.sh"
55648
- return "2.115.26";
55676
+ return "2.115.27";
55649
55677
  }
55650
55678
  getDDICReferences() {
55651
55679
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.115.26",
3
+ "version": "2.115.27",
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.115.26",
41
+ "@abaplint/core": "^2.115.27",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",