@abaplint/transpiler-cli 2.7.71 → 2.7.72
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/abap_transpile +1 -1
- package/build/bundle.js +30 -6
- package/package.json +2 -2
package/abap_transpile
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
require("./build/bundle");
|
package/build/bundle.js
CHANGED
|
@@ -13,6 +13,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
13
13
|
exports.TranspilerConfig = void 0;
|
|
14
14
|
const path = __webpack_require__(/*! path */ "path");
|
|
15
15
|
const fs = __webpack_require__(/*! fs */ "fs");
|
|
16
|
+
const transpiler_1 = __webpack_require__(/*! @abaplint/transpiler */ "./node_modules/@abaplint/transpiler/build/src/index.js");
|
|
16
17
|
class TranspilerConfig {
|
|
17
18
|
static find(filename) {
|
|
18
19
|
if (filename !== undefined) {
|
|
@@ -47,7 +48,7 @@ class TranspilerConfig {
|
|
|
47
48
|
addFilenames: true,
|
|
48
49
|
addCommonJS: true,
|
|
49
50
|
skipConstants: false,
|
|
50
|
-
unknownTypes:
|
|
51
|
+
unknownTypes: transpiler_1.UnknownTypesEnum.compileError,
|
|
51
52
|
},
|
|
52
53
|
};
|
|
53
54
|
}
|
|
@@ -73157,12 +73158,14 @@ exports.HandleW3MI = HandleW3MI;
|
|
|
73157
73158
|
"use strict";
|
|
73158
73159
|
|
|
73159
73160
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
73160
|
-
exports.Transpiler = exports.config = void 0;
|
|
73161
|
+
exports.Transpiler = exports.UnknownTypesEnum = exports.config = void 0;
|
|
73161
73162
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
73162
73163
|
const validation_1 = __webpack_require__(/*! ./validation */ "./node_modules/@abaplint/transpiler/build/src/validation.js");
|
|
73163
73164
|
Object.defineProperty(exports, "config", ({ enumerable: true, get: function () { return validation_1.config; } }));
|
|
73164
73165
|
const unit_test_1 = __webpack_require__(/*! ./unit_test */ "./node_modules/@abaplint/transpiler/build/src/unit_test.js");
|
|
73165
73166
|
const keywords_1 = __webpack_require__(/*! ./keywords */ "./node_modules/@abaplint/transpiler/build/src/keywords.js");
|
|
73167
|
+
const types_1 = __webpack_require__(/*! ./types */ "./node_modules/@abaplint/transpiler/build/src/types.js");
|
|
73168
|
+
Object.defineProperty(exports, "UnknownTypesEnum", ({ enumerable: true, get: function () { return types_1.UnknownTypesEnum; } }));
|
|
73166
73169
|
const db_1 = __webpack_require__(/*! ./db */ "./node_modules/@abaplint/transpiler/build/src/db/index.js");
|
|
73167
73170
|
const handle_table_1 = __webpack_require__(/*! ./handlers/handle_table */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_table.js");
|
|
73168
73171
|
const handle_abap_1 = __webpack_require__(/*! ./handlers/handle_abap */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_abap.js");
|
|
@@ -73181,7 +73184,7 @@ class Transpiler {
|
|
|
73181
73184
|
this.options = {};
|
|
73182
73185
|
}
|
|
73183
73186
|
if (this.options.unknownTypes === undefined) {
|
|
73184
|
-
this.options.unknownTypes =
|
|
73187
|
+
this.options.unknownTypes = types_1.UnknownTypesEnum.compileError;
|
|
73185
73188
|
}
|
|
73186
73189
|
}
|
|
73187
73190
|
// workaround for web/webpack
|
|
@@ -74809,6 +74812,7 @@ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abap
|
|
|
74809
74812
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
74810
74813
|
const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
74811
74814
|
const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
|
|
74815
|
+
const types_1 = __webpack_require__(/*! ../types */ "./node_modules/@abaplint/transpiler/build/src/types.js");
|
|
74812
74816
|
class CreateObjectTranspiler {
|
|
74813
74817
|
transpile(node, traversal) {
|
|
74814
74818
|
var _a, _b;
|
|
@@ -74870,7 +74874,7 @@ class CreateObjectTranspiler {
|
|
|
74870
74874
|
return "object";
|
|
74871
74875
|
}
|
|
74872
74876
|
else if (!(type instanceof abaplint.BasicTypes.ObjectReferenceType)) {
|
|
74873
|
-
if (((_a = traversal.options) === null || _a === void 0 ? void 0 : _a.unknownTypes) !==
|
|
74877
|
+
if (((_a = traversal.options) === null || _a === void 0 ? void 0 : _a.unknownTypes) !== types_1.UnknownTypesEnum.runtimeError) {
|
|
74874
74878
|
throw new Error(`CreateObjectTranspiler, target variable "${target === null || target === void 0 ? void 0 : target.concatTokens()}" not a object reference`);
|
|
74875
74879
|
}
|
|
74876
74880
|
else {
|
|
@@ -79904,7 +79908,7 @@ class TryTranspiler {
|
|
|
79904
79908
|
const catchNames = catchStatement.findDirectExpressions(abaplint.Expressions.ClassName).map(e => traversal.lookupClassOrInterface(e.concatTokens(), e.getFirstToken()));
|
|
79905
79909
|
ret += first ? "" : " else ";
|
|
79906
79910
|
first = false;
|
|
79907
|
-
ret += "if (" + (catchNames === null || catchNames === void 0 ? void 0 : catchNames.map(n => "e instanceof " + n).join(" || ")) + ") {\n";
|
|
79911
|
+
ret += "if (" + (catchNames === null || catchNames === void 0 ? void 0 : catchNames.map(n => "(" + n + " && e instanceof " + n + ")").join(" || ")) + ") {\n";
|
|
79908
79912
|
const intoNode = catchStatement.findExpressionAfterToken("INTO");
|
|
79909
79913
|
if (intoNode) {
|
|
79910
79914
|
ret += traversal.traverse(intoNode).getCode() + ".set(e);\n";
|
|
@@ -80856,6 +80860,25 @@ exports.Traversal = Traversal;
|
|
|
80856
80860
|
|
|
80857
80861
|
/***/ }),
|
|
80858
80862
|
|
|
80863
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/types.js":
|
|
80864
|
+
/*!**************************************************************!*\
|
|
80865
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/types.js ***!
|
|
80866
|
+
\**************************************************************/
|
|
80867
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
80868
|
+
|
|
80869
|
+
"use strict";
|
|
80870
|
+
|
|
80871
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
80872
|
+
exports.UnknownTypesEnum = void 0;
|
|
80873
|
+
var UnknownTypesEnum;
|
|
80874
|
+
(function (UnknownTypesEnum) {
|
|
80875
|
+
UnknownTypesEnum[UnknownTypesEnum["compileError"] = 0] = "compileError";
|
|
80876
|
+
UnknownTypesEnum[UnknownTypesEnum["runtimeError"] = 1] = "runtimeError";
|
|
80877
|
+
})(UnknownTypesEnum || (exports.UnknownTypesEnum = UnknownTypesEnum = {}));
|
|
80878
|
+
//# sourceMappingURL=types.js.map
|
|
80879
|
+
|
|
80880
|
+
/***/ }),
|
|
80881
|
+
|
|
80859
80882
|
/***/ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js":
|
|
80860
80883
|
/*!**************************************************************************!*\
|
|
80861
80884
|
!*** ./node_modules/@abaplint/transpiler/build/src/unique_identifier.js ***!
|
|
@@ -81282,6 +81305,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
81282
81305
|
exports.Validation = exports.config = void 0;
|
|
81283
81306
|
const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
81284
81307
|
const keywords_1 = __webpack_require__(/*! ./keywords */ "./node_modules/@abaplint/transpiler/build/src/keywords.js");
|
|
81308
|
+
const types_1 = __webpack_require__(/*! ./types */ "./node_modules/@abaplint/transpiler/build/src/types.js");
|
|
81285
81309
|
exports.config = {
|
|
81286
81310
|
"global": {
|
|
81287
81311
|
"files": "/**/*.*",
|
|
@@ -81382,7 +81406,7 @@ class Validation {
|
|
|
81382
81406
|
exports.config.rules["forbidden_identifier"]["check"].push(add);
|
|
81383
81407
|
}
|
|
81384
81408
|
}
|
|
81385
|
-
if (((_c = this.options) === null || _c === void 0 ? void 0 : _c.unknownTypes) ===
|
|
81409
|
+
if (((_c = this.options) === null || _c === void 0 ? void 0 : _c.unknownTypes) === types_1.UnknownTypesEnum.runtimeError) {
|
|
81386
81410
|
// this is not a constant, just a regex that happens to not match anything
|
|
81387
81411
|
exports.config.syntax.errorNamespace = "VOID_EVERYTHING";
|
|
81388
81412
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.72",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.72",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.5",
|