@abaplint/transpiler-cli 2.13.2 → 2.13.4

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.
package/build/bundle.js CHANGED
@@ -23385,7 +23385,7 @@ class BasicTypes {
23385
23385
  }
23386
23386
  }
23387
23387
  this.input.scope.addReference(token, typ, _reference_1.ReferenceType.TypeReference, this.input.filename);
23388
- return typ.getType();
23388
+ return this.cloneType(typ.getType(), qualifiedName);
23389
23389
  }
23390
23390
  const type = (_a = this.input.scope.findTypePoolType(chainText)) === null || _a === void 0 ? void 0 : _a.getType();
23391
23391
  if (type) {
@@ -54949,7 +54949,7 @@ class Registry {
54949
54949
  }
54950
54950
  static abaplintVersion() {
54951
54951
  // magic, see build script "version.sh"
54952
- return "2.118.7";
54952
+ return "2.118.8";
54953
54953
  }
54954
54954
  getDDICReferences() {
54955
54955
  return this.ddicReferences;
@@ -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;
@@ -86281,7 +86306,7 @@ class Rearranger {
86281
86306
  return;
86282
86307
  }
86283
86308
  let splitAt;
86284
- // multiplication/division and left to right
86309
+ // lowest precedence: +, - (skip **, *, /, MOD, DIV)
86285
86310
  for (let i = arith.length - 1; i >= 0; i--) {
86286
86311
  const a = arith[i];
86287
86312
  const concat = a.concatTokens().toUpperCase();
@@ -86295,7 +86320,19 @@ class Rearranger {
86295
86320
  splitAt = a;
86296
86321
  break;
86297
86322
  }
86298
- // fallback
86323
+ // medium precedence: *, /, MOD, DIV (skip only **)
86324
+ if (splitAt === undefined) {
86325
+ for (let i = arith.length - 1; i >= 0; i--) {
86326
+ const a = arith[i];
86327
+ const concat = a.concatTokens().toUpperCase();
86328
+ if (concat === "**") {
86329
+ continue;
86330
+ }
86331
+ splitAt = a;
86332
+ break;
86333
+ }
86334
+ }
86335
+ // fallback: all ** operators
86299
86336
  if (splitAt === undefined) {
86300
86337
  splitAt = arith[arith.length - 1];
86301
86338
  }
@@ -94023,7 +94060,7 @@ class TypeEnumTranspiler {
94023
94060
  }
94024
94061
  }
94025
94062
  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({
94063
+ let ret = `let ${traversal_1.Traversal.prefixVariable(structureName)} = new abap.types.Structure({
94027
94064
  ${fields}});\n`;
94028
94065
  for (const v of values) {
94029
94066
  ret += `${traversal_1.Traversal.prefixVariable(structureName)}.get().${v}.set("${v.toUpperCase()}");\n`;
@@ -94306,9 +94343,15 @@ class TranspileTypes {
94306
94343
  }
94307
94344
  else if (type instanceof abaplint.BasicTypes.HexType) {
94308
94345
  resolved = featureHexUInt8 ? "HexUInt8" : "Hex";
94309
- if (type.getLength() !== 1) {
94346
+ if (type.getLength() !== 1 && type.getQualifiedName() !== undefined) {
94347
+ extra = "{length: " + type.getLength() + ", qualifiedName: \"" + type.getQualifiedName()?.toUpperCase() + "\"}";
94348
+ }
94349
+ else if (type.getLength() !== 1) {
94310
94350
  extra = "{length: " + type.getLength() + "}";
94311
94351
  }
94352
+ else if (type.getQualifiedName() !== undefined) {
94353
+ extra = "{qualifiedName: \"" + type.getQualifiedName()?.toUpperCase() + "\"}";
94354
+ }
94312
94355
  }
94313
94356
  else if (type instanceof abaplint.BasicTypes.FloatType) {
94314
94357
  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.4",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -27,8 +27,8 @@
27
27
  "author": "abaplint",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@abaplint/core": "^2.118.7",
31
- "@abaplint/transpiler": "^2.13.2",
30
+ "@abaplint/core": "^2.118.8",
31
+ "@abaplint/transpiler": "^2.13.4",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.12.0",
34
34
  "@types/progress": "^2.0.7",
package/schema.json DELETED
@@ -1,219 +0,0 @@
1
- {
2
- "$ref": "#/definitions/ITranspilerConfig",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "definitions": {
5
- "ITranspilerConfig": {
6
- "additionalProperties": false,
7
- "properties": {
8
- "exclude_filter": {
9
- "description": "list of regex, case insensitive",
10
- "items": {
11
- "type": "string"
12
- },
13
- "type": "array",
14
- "uniqueItems": true
15
- },
16
- "input_filter": {
17
- "description": "list of regex, case insensitive, empty gives all files, positive list",
18
- "items": {
19
- "type": "string"
20
- },
21
- "type": "array",
22
- "uniqueItems": true
23
- },
24
- "input_folder": {
25
- "anyOf": [
26
- {
27
- "type": "string"
28
- },
29
- {
30
- "items": {
31
- "type": "string"
32
- },
33
- "type": "array"
34
- }
35
- ]
36
- },
37
- "libs": {
38
- "items": {
39
- "additionalProperties": false,
40
- "properties": {
41
- "exclude_filter": {
42
- "description": "list of regex, case insensitive",
43
- "items": {
44
- "type": "string"
45
- },
46
- "type": "array",
47
- "uniqueItems": true
48
- },
49
- "files": {
50
- "anyOf": [
51
- {
52
- "type": "string"
53
- },
54
- {
55
- "items": {
56
- "type": "string"
57
- },
58
- "type": "array"
59
- }
60
- ]
61
- },
62
- "folder": {
63
- "type": "string"
64
- },
65
- "url": {
66
- "type": "string"
67
- }
68
- },
69
- "type": "object"
70
- },
71
- "type": "array"
72
- },
73
- "options": {
74
- "$ref": "#/definitions/ITranspilerOptions"
75
- },
76
- "output_folder": {
77
- "type": "string"
78
- },
79
- "write_source_map": {
80
- "type": "boolean"
81
- },
82
- "write_unit_tests": {
83
- "type": "boolean"
84
- }
85
- },
86
- "required": [
87
- "input_folder",
88
- "output_folder",
89
- "options"
90
- ],
91
- "type": "object"
92
- },
93
- "ITranspilerOptions": {
94
- "additionalProperties": false,
95
- "properties": {
96
- "addCommonJS": {
97
- "description": "adds common js modules",
98
- "type": "boolean"
99
- },
100
- "addFilenames": {
101
- "description": "adds filenames as comments in the output js",
102
- "type": "boolean"
103
- },
104
- "ignoreSourceMap": {
105
- "description": "ignore source map",
106
- "type": "boolean"
107
- },
108
- "ignoreSyntaxCheck": {
109
- "description": "ignore syntax check, used for internal testing",
110
- "type": "boolean"
111
- },
112
- "importProg": {
113
- "description": "import programs",
114
- "type": "boolean"
115
- },
116
- "keywords": {
117
- "description": "list of keywords to rename, if not supplied default will be used",
118
- "items": {
119
- "type": "string"
120
- },
121
- "type": "array"
122
- },
123
- "populateTables": {
124
- "additionalProperties": false,
125
- "description": "populate tables, all tables are populated if undefined and they exist",
126
- "properties": {
127
- "reposrc": {
128
- "description": "insert into REPOSRC, skips if equals false",
129
- "type": "boolean"
130
- },
131
- "seosubco": {
132
- "description": "insert into SEOSUBCO, skips if equals false",
133
- "type": "boolean"
134
- },
135
- "seosubcodf": {
136
- "description": "insert into SEOSUBCODF, skips if equals false",
137
- "type": "boolean"
138
- },
139
- "seosubcotx": {
140
- "description": "insert into SEOSUBCOTX, skips if equals false",
141
- "type": "boolean"
142
- }
143
- },
144
- "type": "object"
145
- },
146
- "setup": {
147
- "additionalProperties": false,
148
- "description": "extra setup script to be executed during initialization",
149
- "properties": {
150
- "filename": {
151
- "type": "string"
152
- },
153
- "postFunction": {
154
- "type": "string"
155
- },
156
- "preFunction": {
157
- "type": "string"
158
- }
159
- },
160
- "required": [
161
- "filename"
162
- ],
163
- "type": "object"
164
- },
165
- "skip": {
166
- "$ref": "#/definitions/TestMethodList",
167
- "description": "list of unit tests to skip"
168
- },
169
- "skipVersionCheck": {
170
- "description": "skips version check, not recommended",
171
- "type": "boolean"
172
- },
173
- "unknownTypes": {
174
- "$ref": "#/definitions/UnknownTypesEnum",
175
- "description": "sets behavior for unknown types, either fail at compile- or run-time"
176
- }
177
- },
178
- "type": "object"
179
- },
180
- "TestMethodList": {
181
- "items": {
182
- "additionalProperties": false,
183
- "properties": {
184
- "class": {
185
- "pattern": "^[a-zA-Z0-9_\\/]+$",
186
- "type": "string"
187
- },
188
- "method": {
189
- "pattern": "^[a-zA-Z0-9_\\/]+$",
190
- "type": "string"
191
- },
192
- "note": {
193
- "type": "string"
194
- },
195
- "object": {
196
- "pattern": "^[a-zA-Z0-9_\\/]+$",
197
- "type": "string"
198
- }
199
- },
200
- "required": [
201
- "object",
202
- "class",
203
- "method"
204
- ],
205
- "type": "object"
206
- },
207
- "type": "array",
208
- "uniqueItems": true
209
- },
210
- "UnknownTypesEnum": {
211
- "enum": [
212
- "compileError",
213
- "runtimeError"
214
- ],
215
- "type": "string"
216
- }
217
- }
218
- }
219
-