@abaplint/transpiler-cli 2.13.2 → 2.13.3

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 +36 -5
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -80369,9 +80369,11 @@ class PopulateTables {
80369
80369
  else if (parameter.getMeta().includes("exporting" /* abaplint.IdentifierMeta.MethodExporting */)) {
80370
80370
  pardecltyp = "1";
80371
80371
  }
80372
- const paroptionl = optionalParameters.includes(parameter.getName()) ? "X" : " ";
80372
+ const name = parameter.getName().toUpperCase();
80373
+ const paroptionl = (optionalParameters.some(o => o.toUpperCase() === name) || method.getParameters().getParameterDefault(name) !== undefined) ? "X" : " ";
80373
80374
  const type = parameter.getType().getQualifiedName()?.toUpperCase() || "";
80374
- ret.push(`INSERT INTO "seosubcodf" ("clsname", "cmpname", "sconame", "version", "editorder", "pardecltyp", "type", "paroptionl") VALUES ('${obj.getName()}', '${method.getName().toUpperCase()}', '${parameter.getName().toUpperCase()}', '1', ${editorder}, '${pardecltyp}', '${type}', '${paroptionl}');`);
80375
+ const parvalue = method.getParameters().getParameterDefault(name)?.concatTokens() || "";
80376
+ ret.push(`INSERT INTO "seosubcodf" ("clsname", "cmpname", "sconame", "version", "editorder", "pardecltyp", "type", "paroptionl", "parvalue") VALUES ('${obj.getName()}', '${method.getName().toUpperCase()}', '${name}', '1', ${editorder}, '${pardecltyp}', '${type}', '${paroptionl}', '${this.escape(parvalue)}');`);
80375
80377
  }
80376
80378
  }
80377
80379
  return ret;
@@ -80382,9 +80384,32 @@ class PopulateTables {
80382
80384
  if (def === undefined || !this.hasSEOSUBCOTX) {
80383
80385
  return [];
80384
80386
  }
80387
+ const descriptions = [];
80388
+ const xml = obj.getXML();
80389
+ if (xml) {
80390
+ const parsed = obj.parseRaw2();
80391
+ const sub = parsed?.abapGit["asx:abap"]["asx:values"]?.DESCRIPTIONS?.SEOSUBCOTX;
80392
+ if (sub) {
80393
+ if (Array.isArray(sub)) {
80394
+ descriptions.push(...sub);
80395
+ }
80396
+ else {
80397
+ descriptions.push(sub);
80398
+ }
80399
+ }
80400
+ }
80385
80401
  for (const method of def.getMethodDefinitions().getAll()) {
80386
80402
  for (const parameter of method.getParameters().getAll()) {
80387
- ret.push(`INSERT INTO "seosubcotx" ("clsname", "cmpname", "sconame", "langu", "descript") VALUES ('${obj.getName()}', '${method.getName().toUpperCase()}', '${parameter.getName().toUpperCase()}', 'E', 'todo');`);
80403
+ const mName = method.getName().toUpperCase();
80404
+ const pName = parameter.getName().toUpperCase();
80405
+ let descript = "";
80406
+ for (const d of descriptions) {
80407
+ if (d.CMPNAME?.toUpperCase() === mName && d.SCONAME?.toUpperCase() === pName) {
80408
+ descript = d.DESCRIPT || "";
80409
+ break;
80410
+ }
80411
+ }
80412
+ ret.push(`INSERT INTO "seosubcotx" ("clsname", "cmpname", "sconame", "langu", "descript") VALUES ('${obj.getName()}', '${mName}', '${pName}', 'E', '${this.escape(descript)}');`);
80388
80413
  }
80389
80414
  }
80390
80415
  return ret;
@@ -94023,7 +94048,7 @@ class TypeEnumTranspiler {
94023
94048
  }
94024
94049
  }
94025
94050
  const fields = values.map(v => `"${v}": new abap.types.String()`).join(",\n");
94026
- let ret = `let ${traversal_1.Traversal.prefixVariable(structureName)} = new abap.types.Structure({
94051
+ let ret = `let ${traversal_1.Traversal.prefixVariable(structureName)} = new abap.types.Structure({
94027
94052
  ${fields}});\n`;
94028
94053
  for (const v of values) {
94029
94054
  ret += `${traversal_1.Traversal.prefixVariable(structureName)}.get().${v}.set("${v.toUpperCase()}");\n`;
@@ -94306,9 +94331,15 @@ class TranspileTypes {
94306
94331
  }
94307
94332
  else if (type instanceof abaplint.BasicTypes.HexType) {
94308
94333
  resolved = featureHexUInt8 ? "HexUInt8" : "Hex";
94309
- if (type.getLength() !== 1) {
94334
+ if (type.getLength() !== 1 && type.getQualifiedName() !== undefined) {
94335
+ extra = "{length: " + type.getLength() + ", qualifiedName: \"" + type.getQualifiedName()?.toUpperCase() + "\"}";
94336
+ }
94337
+ else if (type.getLength() !== 1) {
94310
94338
  extra = "{length: " + type.getLength() + "}";
94311
94339
  }
94340
+ else if (type.getQualifiedName() !== undefined) {
94341
+ extra = "{qualifiedName: \"" + type.getQualifiedName()?.toUpperCase() + "\"}";
94342
+ }
94312
94343
  }
94313
94344
  else if (type instanceof abaplint.BasicTypes.FloatType) {
94314
94345
  resolved = "Float";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.13.2",
3
+ "version": "2.13.3",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
30
  "@abaplint/core": "^2.118.7",
31
- "@abaplint/transpiler": "^2.13.2",
31
+ "@abaplint/transpiler": "^2.13.3",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.12.0",
34
34
  "@types/progress": "^2.0.7",