@abaplint/transpiler-cli 2.7.139 → 2.7.141
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 +67 -4
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -21240,6 +21240,9 @@ class TypeUtils {
|
|
|
21240
21240
|
}
|
|
21241
21241
|
return true;
|
|
21242
21242
|
}
|
|
21243
|
+
else if (type instanceof basic_1.TableType && type.isWithHeader()) {
|
|
21244
|
+
return this.isCharLikeStrict(type.getRowType());
|
|
21245
|
+
}
|
|
21243
21246
|
else if (type instanceof basic_1.StringType
|
|
21244
21247
|
|| type instanceof basic_1.AnyType
|
|
21245
21248
|
|| type instanceof basic_1.CharacterType
|
|
@@ -21309,6 +21312,9 @@ class TypeUtils {
|
|
|
21309
21312
|
}
|
|
21310
21313
|
return true;
|
|
21311
21314
|
}
|
|
21315
|
+
else if (type instanceof basic_1.TableType && type.isWithHeader()) {
|
|
21316
|
+
return this.isHexLike(type.getRowType());
|
|
21317
|
+
}
|
|
21312
21318
|
else if (type instanceof basic_1.XStringType
|
|
21313
21319
|
|| type instanceof basic_1.HexType
|
|
21314
21320
|
|| type instanceof basic_1.VoidType
|
|
@@ -27952,7 +27958,7 @@ class Concatenate {
|
|
|
27952
27958
|
}
|
|
27953
27959
|
else if (target) {
|
|
27954
27960
|
const type = new target_1.Target().runSyntax(target, scope, filename);
|
|
27955
|
-
const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).
|
|
27961
|
+
const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
|
|
27956
27962
|
if (compatible === false) {
|
|
27957
27963
|
throw new Error("Target type not compatible");
|
|
27958
27964
|
}
|
|
@@ -27966,7 +27972,7 @@ class Concatenate {
|
|
|
27966
27972
|
linesMode = false;
|
|
27967
27973
|
continue;
|
|
27968
27974
|
}
|
|
27969
|
-
const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).
|
|
27975
|
+
const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
|
|
27970
27976
|
if (compatible === false) {
|
|
27971
27977
|
throw new Error("Source type not compatible");
|
|
27972
27978
|
}
|
|
@@ -28313,11 +28319,14 @@ class CreateObject {
|
|
|
28313
28319
|
}
|
|
28314
28320
|
const source = p.findDirectExpression(Expressions.Source);
|
|
28315
28321
|
const sourceType = new source_1.Source().runSyntax(source, scope, filename);
|
|
28322
|
+
const calculated = (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.MethodCallChain)) !== undefined
|
|
28323
|
+
|| (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.StringTemplate)) !== undefined
|
|
28324
|
+
|| (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.ArithOperator)) !== undefined;
|
|
28316
28325
|
const found = allImporting === null || allImporting === void 0 ? void 0 : allImporting.find(p => p.getName().toUpperCase() === name);
|
|
28317
28326
|
if (found === undefined) {
|
|
28318
28327
|
throw new Error(`constructor parameter "${name}" does not exist`);
|
|
28319
28328
|
}
|
|
28320
|
-
else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, found.getType()) === false) {
|
|
28329
|
+
else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, found.getType(), calculated) === false) {
|
|
28321
28330
|
throw new Error(`constructor parameter "${name}" type not compatible`);
|
|
28322
28331
|
}
|
|
28323
28332
|
requiredImporting.delete(name);
|
|
@@ -47049,6 +47058,7 @@ exports.NumberRange = NumberRange;
|
|
|
47049
47058
|
|
|
47050
47059
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
47051
47060
|
exports.Oauth2Profile = void 0;
|
|
47061
|
+
const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
|
|
47052
47062
|
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
47053
47063
|
class Oauth2Profile extends _abstract_object_1.AbstractObject {
|
|
47054
47064
|
getType() {
|
|
@@ -47064,6 +47074,15 @@ class Oauth2Profile extends _abstract_object_1.AbstractObject {
|
|
|
47064
47074
|
// todo
|
|
47065
47075
|
return undefined;
|
|
47066
47076
|
}
|
|
47077
|
+
listScopes() {
|
|
47078
|
+
var _a, _b, _c;
|
|
47079
|
+
const ret = [];
|
|
47080
|
+
const parsed = super.parseRaw2();
|
|
47081
|
+
for (const t of (0, xml_utils_1.xmlToArray)((_c = (_b = (_a = parsed.abapGit["asx:abap"]["asx:values"]) === null || _a === void 0 ? void 0 : _a.PROFILE) === null || _b === void 0 ? void 0 : _b.T_SCOPES) === null || _c === void 0 ? void 0 : _c.OA2P_SCOPES)) {
|
|
47082
|
+
ret.push(t.SCOPE);
|
|
47083
|
+
}
|
|
47084
|
+
return ret;
|
|
47085
|
+
}
|
|
47067
47086
|
}
|
|
47068
47087
|
exports.Oauth2Profile = Oauth2Profile;
|
|
47069
47088
|
//# sourceMappingURL=oauth2_profile.js.map
|
|
@@ -50055,7 +50074,7 @@ class Registry {
|
|
|
50055
50074
|
}
|
|
50056
50075
|
static abaplintVersion() {
|
|
50057
50076
|
// magic, see build script "version.sh"
|
|
50058
|
-
return "2.105.
|
|
50077
|
+
return "2.105.9";
|
|
50059
50078
|
}
|
|
50060
50079
|
getDDICReferences() {
|
|
50061
50080
|
return this.ddicReferences;
|
|
@@ -76037,6 +76056,45 @@ exports.HandleMSAG = HandleMSAG;
|
|
|
76037
76056
|
|
|
76038
76057
|
/***/ }),
|
|
76039
76058
|
|
|
76059
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_oa2p.js":
|
|
76060
|
+
/*!*****************************************************************************!*\
|
|
76061
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_oa2p.js ***!
|
|
76062
|
+
\*****************************************************************************/
|
|
76063
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
76064
|
+
|
|
76065
|
+
"use strict";
|
|
76066
|
+
|
|
76067
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
76068
|
+
exports.HandleOA2P = void 0;
|
|
76069
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
76070
|
+
class HandleOA2P {
|
|
76071
|
+
runObject(obj, _reg) {
|
|
76072
|
+
var _a;
|
|
76073
|
+
const filename = (_a = obj.getXMLFile()) === null || _a === void 0 ? void 0 : _a.getFilename().replace(".xml", ".mjs").toLowerCase();
|
|
76074
|
+
if (filename === undefined) {
|
|
76075
|
+
return [];
|
|
76076
|
+
}
|
|
76077
|
+
const chunk = new chunk_1.Chunk().appendString(`abap.OA2P["${obj.getName().toUpperCase()}"] = {\n`);
|
|
76078
|
+
chunk.appendString(` "scopes": ${JSON.stringify(obj.listScopes())},\n`);
|
|
76079
|
+
chunk.appendString(`};`);
|
|
76080
|
+
const output = {
|
|
76081
|
+
object: {
|
|
76082
|
+
name: obj.getName(),
|
|
76083
|
+
type: obj.getType(),
|
|
76084
|
+
},
|
|
76085
|
+
filename: filename,
|
|
76086
|
+
chunk: chunk,
|
|
76087
|
+
requires: [],
|
|
76088
|
+
exports: [],
|
|
76089
|
+
};
|
|
76090
|
+
return [output];
|
|
76091
|
+
}
|
|
76092
|
+
}
|
|
76093
|
+
exports.HandleOA2P = HandleOA2P;
|
|
76094
|
+
//# sourceMappingURL=handle_oa2p.js.map
|
|
76095
|
+
|
|
76096
|
+
/***/ }),
|
|
76097
|
+
|
|
76040
76098
|
/***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js":
|
|
76041
76099
|
/*!*****************************************************************************!*\
|
|
76042
76100
|
!*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js ***!
|
|
@@ -76358,6 +76416,7 @@ const handle_type_pool_1 = __webpack_require__(/*! ./handlers/handle_type_pool *
|
|
|
76358
76416
|
const handle_w3mi_1 = __webpack_require__(/*! ./handlers/handle_w3mi */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_w3mi.js");
|
|
76359
76417
|
const handle_smim_1 = __webpack_require__(/*! ./handlers/handle_smim */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js");
|
|
76360
76418
|
const handle_msag_1 = __webpack_require__(/*! ./handlers/handle_msag */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_msag.js");
|
|
76419
|
+
const handle_oa2p_1 = __webpack_require__(/*! ./handlers/handle_oa2p */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_oa2p.js");
|
|
76361
76420
|
class Transpiler {
|
|
76362
76421
|
constructor(options) {
|
|
76363
76422
|
this.options = options;
|
|
@@ -76398,6 +76457,9 @@ class Transpiler {
|
|
|
76398
76457
|
else if (obj instanceof abaplint.Objects.TypePool) {
|
|
76399
76458
|
output.objects.push(...new handle_type_pool_1.HandleTypePool().runObject(obj, reg));
|
|
76400
76459
|
}
|
|
76460
|
+
else if (obj instanceof abaplint.Objects.Oauth2Profile) {
|
|
76461
|
+
output.objects.push(...new handle_oa2p_1.HandleOA2P().runObject(obj, reg));
|
|
76462
|
+
}
|
|
76401
76463
|
else if (obj instanceof abaplint.Objects.Table) {
|
|
76402
76464
|
output.objects.push(...new handle_table_1.HandleTable().runObject(obj, reg));
|
|
76403
76465
|
}
|
|
@@ -84926,6 +84988,7 @@ exports.config = {
|
|
|
84926
84988
|
"MSAG",
|
|
84927
84989
|
"NROB",
|
|
84928
84990
|
"NSPC",
|
|
84991
|
+
"OA2P",
|
|
84929
84992
|
"PARA",
|
|
84930
84993
|
"PROG",
|
|
84931
84994
|
"SHLP",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.141",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.141",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.7",
|
|
33
|
-
"@types/node": "^20.10.
|
|
34
|
-
"@abaplint/core": "^2.105.
|
|
33
|
+
"@types/node": "^20.10.8",
|
|
34
|
+
"@abaplint/core": "^2.105.9",
|
|
35
35
|
"progress": "^2.0.3",
|
|
36
36
|
"webpack": "^5.89.0",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|