@abaplint/transpiler-cli 2.5.48 → 2.5.50
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 +108 -10
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -68272,6 +68272,7 @@ __exportStar(__webpack_require__(/*! ./source_field */ "./node_modules/@abaplint
|
|
|
68272
68272
|
__exportStar(__webpack_require__(/*! ./source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js"), exports);
|
|
68273
68273
|
__exportStar(__webpack_require__(/*! ./sql_cond */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_cond.js"), exports);
|
|
68274
68274
|
__exportStar(__webpack_require__(/*! ./sql_field */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field.js"), exports);
|
|
68275
|
+
__exportStar(__webpack_require__(/*! ./sql_from_source */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from_source.js"), exports);
|
|
68275
68276
|
__exportStar(__webpack_require__(/*! ./sql_from */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from.js"), exports);
|
|
68276
68277
|
__exportStar(__webpack_require__(/*! ./sql_join */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js"), exports);
|
|
68277
68278
|
__exportStar(__webpack_require__(/*! ./sql_source_simple */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_source_simple.js"), exports);
|
|
@@ -69083,6 +69084,7 @@ const traversal_1 = __webpack_require__(/*! ../traversal */ "./node_modules/@aba
|
|
|
69083
69084
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69084
69085
|
const simple_source3_1 = __webpack_require__(/*! ./simple_source3 */ "./node_modules/@abaplint/transpiler/build/src/expressions/simple_source3.js");
|
|
69085
69086
|
const field_chain_1 = __webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js");
|
|
69087
|
+
const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js");
|
|
69086
69088
|
class SQLCondTranspiler {
|
|
69087
69089
|
transpile(node, traversal) {
|
|
69088
69090
|
var _a;
|
|
@@ -69135,11 +69137,15 @@ class SQLCondTranspiler {
|
|
|
69135
69137
|
if (c.getChildren().length !== 3) {
|
|
69136
69138
|
return this.basicConditionNew(c, traversal, filename);
|
|
69137
69139
|
}
|
|
69138
|
-
|
|
69140
|
+
let fieldName = undefined;
|
|
69141
|
+
const fieldNameExpression = c.findDirectExpression(abaplint.Expressions.SQLFieldName);
|
|
69142
|
+
if (fieldNameExpression) {
|
|
69143
|
+
fieldName = new sql_field_name_1.SQLFieldNameTranspiler().transpile(fieldNameExpression, traversal).getCode();
|
|
69144
|
+
}
|
|
69139
69145
|
const operator = c.findDirectExpression(abaplint.Expressions.SQLCompareOperator);
|
|
69140
69146
|
const source = c.findDirectExpression(abaplint.Expressions.SQLSource);
|
|
69141
69147
|
if (fieldName && source && operator === undefined && c.findDirectTokenByText("LIKE")) {
|
|
69142
|
-
ret += fieldName
|
|
69148
|
+
ret += fieldName + " LIKE ";
|
|
69143
69149
|
ret += this.sqlSource(source, traversal, filename);
|
|
69144
69150
|
return ret;
|
|
69145
69151
|
}
|
|
@@ -69153,7 +69159,7 @@ class SQLCondTranspiler {
|
|
|
69153
69159
|
else if (op.toUpperCase() === "NE") {
|
|
69154
69160
|
op = "<>";
|
|
69155
69161
|
}
|
|
69156
|
-
ret += fieldName
|
|
69162
|
+
ret += fieldName + " " + op + " ";
|
|
69157
69163
|
ret += this.sqlSource(source, traversal, filename);
|
|
69158
69164
|
return ret;
|
|
69159
69165
|
}
|
|
@@ -69194,8 +69200,9 @@ class SQLCondTranspiler {
|
|
|
69194
69200
|
if (ret !== "") {
|
|
69195
69201
|
ret += " ";
|
|
69196
69202
|
}
|
|
69197
|
-
if (child.get() instanceof abaplint.Expressions.SQLFieldName
|
|
69198
|
-
|
|
69203
|
+
if (child.get() instanceof abaplint.Expressions.SQLFieldName
|
|
69204
|
+
&& child instanceof abaplint.Nodes.ExpressionNode) {
|
|
69205
|
+
ret += new sql_field_name_1.SQLFieldNameTranspiler().transpile(child, traversal).getCode();
|
|
69199
69206
|
}
|
|
69200
69207
|
else if (child.get() instanceof abaplint.Expressions.SQLSource
|
|
69201
69208
|
&& child instanceof abaplint.Nodes.ExpressionNode) {
|
|
@@ -69222,9 +69229,45 @@ exports.SQLCondTranspiler = SQLCondTranspiler;
|
|
|
69222
69229
|
"use strict";
|
|
69223
69230
|
|
|
69224
69231
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
69225
|
-
exports.
|
|
69232
|
+
exports.SQLFieldTranspiler = void 0;
|
|
69233
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
69234
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69235
|
+
const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js");
|
|
69236
|
+
class SQLFieldTranspiler {
|
|
69237
|
+
transpile(node, traversal) {
|
|
69238
|
+
const chunk = new chunk_1.Chunk();
|
|
69239
|
+
for (const c of node.getChildren()) {
|
|
69240
|
+
if (c instanceof abaplint.Nodes.TokenNode) {
|
|
69241
|
+
// keywords
|
|
69242
|
+
chunk.appendString(c.concatTokens() + " ");
|
|
69243
|
+
}
|
|
69244
|
+
else if (c.get() instanceof abaplint.Expressions.SQLFieldName) {
|
|
69245
|
+
chunk.appendChunk(new sql_field_name_1.SQLFieldNameTranspiler().transpile(c, traversal));
|
|
69246
|
+
}
|
|
69247
|
+
else {
|
|
69248
|
+
chunk.appendString(c.concatTokens() + " ");
|
|
69249
|
+
}
|
|
69250
|
+
}
|
|
69251
|
+
return chunk;
|
|
69252
|
+
}
|
|
69253
|
+
}
|
|
69254
|
+
exports.SQLFieldTranspiler = SQLFieldTranspiler;
|
|
69255
|
+
//# sourceMappingURL=sql_field.js.map
|
|
69256
|
+
|
|
69257
|
+
/***/ }),
|
|
69258
|
+
|
|
69259
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js":
|
|
69260
|
+
/*!***********************************************************************************!*\
|
|
69261
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js ***!
|
|
69262
|
+
\***********************************************************************************/
|
|
69263
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
69264
|
+
|
|
69265
|
+
"use strict";
|
|
69266
|
+
|
|
69267
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
69268
|
+
exports.SQLFieldNameTranspiler = void 0;
|
|
69226
69269
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69227
|
-
class
|
|
69270
|
+
class SQLFieldNameTranspiler {
|
|
69228
69271
|
transpile(node, _traversal) {
|
|
69229
69272
|
const chunk = new chunk_1.Chunk();
|
|
69230
69273
|
let concat = node.concatTokens();
|
|
@@ -69235,8 +69278,8 @@ class SQLField {
|
|
|
69235
69278
|
return chunk;
|
|
69236
69279
|
}
|
|
69237
69280
|
}
|
|
69238
|
-
exports.
|
|
69239
|
-
//# sourceMappingURL=
|
|
69281
|
+
exports.SQLFieldNameTranspiler = SQLFieldNameTranspiler;
|
|
69282
|
+
//# sourceMappingURL=sql_field_name.js.map
|
|
69240
69283
|
|
|
69241
69284
|
/***/ }),
|
|
69242
69285
|
|
|
@@ -69253,6 +69296,7 @@ exports.SQLFromTranspiler = void 0;
|
|
|
69253
69296
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
69254
69297
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69255
69298
|
const sql_join_1 = __webpack_require__(/*! ./sql_join */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js");
|
|
69299
|
+
const sql_from_source_1 = __webpack_require__(/*! ./sql_from_source */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from_source.js");
|
|
69256
69300
|
class SQLFromTranspiler {
|
|
69257
69301
|
transpile(node, traversal) {
|
|
69258
69302
|
const chunk = new chunk_1.Chunk();
|
|
@@ -69265,6 +69309,9 @@ class SQLFromTranspiler {
|
|
|
69265
69309
|
chunk.appendChunk(new sql_join_1.SQLJoinTranspiler().transpile(c, traversal));
|
|
69266
69310
|
chunk.appendString(" ");
|
|
69267
69311
|
}
|
|
69312
|
+
else if (c.get() instanceof abaplint.Expressions.SQLFromSource) {
|
|
69313
|
+
chunk.appendChunk(new sql_from_source_1.SQLFromSourceTranspiler().transpile(c, traversal));
|
|
69314
|
+
}
|
|
69268
69315
|
else {
|
|
69269
69316
|
if (c.findFirstExpression(abaplint.Expressions.Dynamic)) {
|
|
69270
69317
|
chunk.appendString(c.concatTokens() + " ");
|
|
@@ -69285,6 +69332,41 @@ exports.SQLFromTranspiler = SQLFromTranspiler;
|
|
|
69285
69332
|
|
|
69286
69333
|
/***/ }),
|
|
69287
69334
|
|
|
69335
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from_source.js":
|
|
69336
|
+
/*!************************************************************************************!*\
|
|
69337
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_from_source.js ***!
|
|
69338
|
+
\************************************************************************************/
|
|
69339
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
69340
|
+
|
|
69341
|
+
"use strict";
|
|
69342
|
+
|
|
69343
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
69344
|
+
exports.SQLFromSourceTranspiler = void 0;
|
|
69345
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
69346
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69347
|
+
class SQLFromSourceTranspiler {
|
|
69348
|
+
transpile(node, _traversal) {
|
|
69349
|
+
const chunk = new chunk_1.Chunk();
|
|
69350
|
+
for (const c of node.getChildren()) {
|
|
69351
|
+
if (c instanceof abaplint.Nodes.TokenNode) {
|
|
69352
|
+
// keywords
|
|
69353
|
+
chunk.appendString(c.concatTokens() + " ");
|
|
69354
|
+
}
|
|
69355
|
+
else if (c.get() instanceof abaplint.Expressions.DatabaseTable && c.concatTokens().includes("/")) {
|
|
69356
|
+
chunk.appendString("'" + c.concatTokens() + "' ");
|
|
69357
|
+
}
|
|
69358
|
+
else {
|
|
69359
|
+
chunk.appendString(c.concatTokens() + " ");
|
|
69360
|
+
}
|
|
69361
|
+
}
|
|
69362
|
+
return chunk;
|
|
69363
|
+
}
|
|
69364
|
+
}
|
|
69365
|
+
exports.SQLFromSourceTranspiler = SQLFromSourceTranspiler;
|
|
69366
|
+
//# sourceMappingURL=sql_from_source.js.map
|
|
69367
|
+
|
|
69368
|
+
/***/ }),
|
|
69369
|
+
|
|
69288
69370
|
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js":
|
|
69289
69371
|
/*!*****************************************************************************!*\
|
|
69290
69372
|
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/sql_join.js ***!
|
|
@@ -69298,16 +69380,21 @@ exports.SQLJoinTranspiler = void 0;
|
|
|
69298
69380
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
69299
69381
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69300
69382
|
const sql_cond_1 = __webpack_require__(/*! ./sql_cond */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_cond.js");
|
|
69383
|
+
const sql_from_source_1 = __webpack_require__(/*! ./sql_from_source */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_from_source.js");
|
|
69301
69384
|
class SQLJoinTranspiler {
|
|
69302
69385
|
transpile(node, traversal) {
|
|
69303
69386
|
const chunk = new chunk_1.Chunk();
|
|
69304
69387
|
for (const c of node.getChildren()) {
|
|
69305
69388
|
if (c instanceof abaplint.Nodes.TokenNode) {
|
|
69389
|
+
// keywords
|
|
69306
69390
|
chunk.appendString(c.concatTokens() + " ");
|
|
69307
69391
|
}
|
|
69308
69392
|
else if (c.get() instanceof abaplint.Expressions.SQLCond) {
|
|
69309
69393
|
chunk.appendChunk(new sql_cond_1.SQLCondTranspiler().transpile(c, traversal));
|
|
69310
69394
|
}
|
|
69395
|
+
else if (c.get() instanceof abaplint.Expressions.SQLFromSource) {
|
|
69396
|
+
chunk.appendChunk(new sql_from_source_1.SQLFromSourceTranspiler().transpile(c, traversal));
|
|
69397
|
+
}
|
|
69311
69398
|
else {
|
|
69312
69399
|
chunk.appendString(c.concatTokens() + " ");
|
|
69313
69400
|
}
|
|
@@ -69331,9 +69418,20 @@ exports.SQLJoinTranspiler = SQLJoinTranspiler;
|
|
|
69331
69418
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
69332
69419
|
exports.SQLSourceTranspiler = void 0;
|
|
69333
69420
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
69421
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69334
69422
|
class SQLSourceTranspiler {
|
|
69335
69423
|
transpile(node, traversal) {
|
|
69336
69424
|
let s = node.findDirectExpression(abaplint.Expressions.Source);
|
|
69425
|
+
if ((s === null || s === void 0 ? void 0 : s.getChildren().length) === 1 && s.getChildren()[0].get() instanceof abaplint.Expressions.SQLAliasField) {
|
|
69426
|
+
const chunk = new chunk_1.Chunk();
|
|
69427
|
+
let concat = s.concatTokens();
|
|
69428
|
+
if (concat.includes("~") && concat.split("~")[0].includes("/")) {
|
|
69429
|
+
concat = "'" + concat.replace("~", "'~");
|
|
69430
|
+
}
|
|
69431
|
+
concat = concat.replace("~", ".");
|
|
69432
|
+
chunk.appendString(concat);
|
|
69433
|
+
return chunk;
|
|
69434
|
+
}
|
|
69337
69435
|
if (s === undefined) {
|
|
69338
69436
|
s = node.findDirectExpression(abaplint.Expressions.SimpleSource3);
|
|
69339
69437
|
}
|
|
@@ -74677,7 +74775,7 @@ class SelectTranspiler {
|
|
|
74677
74775
|
const fields = [];
|
|
74678
74776
|
for (const f of (fieldList === null || fieldList === void 0 ? void 0 : fieldList.getChildren()) || []) {
|
|
74679
74777
|
if (f instanceof abaplint.Nodes.ExpressionNode && f.get() instanceof abaplint.Expressions.SQLField) {
|
|
74680
|
-
const code = new expressions_1.
|
|
74778
|
+
const code = new expressions_1.SQLFieldTranspiler().transpile(f, traversal).getCode();
|
|
74681
74779
|
fields.push(code);
|
|
74682
74780
|
}
|
|
74683
74781
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.50",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.5.
|
|
28
|
+
"@abaplint/transpiler": "^2.5.50",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|