@abaplint/transpiler-cli 2.7.140 → 2.7.142

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 +64 -8
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -7433,7 +7433,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
7433
7433
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
7434
7434
  class SQLJoin extends combi_1.Expression {
7435
7435
  getRunnable() {
7436
- const joinType = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("INNER", "LEFT OUTER", "LEFT")), "JOIN");
7436
+ const joinType = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("INNER", "LEFT OUTER", "LEFT", "RIGHT OUTER", "RIGHT")), "JOIN");
7437
7437
  const join = (0, combi_1.seq)(joinType, _1.SQLFromSource, "ON", _1.SQLCond);
7438
7438
  return join;
7439
7439
  }
@@ -47058,6 +47058,7 @@ exports.NumberRange = NumberRange;
47058
47058
 
47059
47059
  Object.defineProperty(exports, "__esModule", ({ value: true }));
47060
47060
  exports.Oauth2Profile = void 0;
47061
+ const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
47061
47062
  const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
47062
47063
  class Oauth2Profile extends _abstract_object_1.AbstractObject {
47063
47064
  getType() {
@@ -47073,6 +47074,15 @@ class Oauth2Profile extends _abstract_object_1.AbstractObject {
47073
47074
  // todo
47074
47075
  return undefined;
47075
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
+ }
47076
47086
  }
47077
47087
  exports.Oauth2Profile = Oauth2Profile;
47078
47088
  //# sourceMappingURL=oauth2_profile.js.map
@@ -50064,7 +50074,7 @@ class Registry {
50064
50074
  }
50065
50075
  static abaplintVersion() {
50066
50076
  // magic, see build script "version.sh"
50067
- return "2.105.8";
50077
+ return "2.105.10";
50068
50078
  }
50069
50079
  getDDICReferences() {
50070
50080
  return this.ddicReferences;
@@ -74955,6 +74965,7 @@ const simple_source3_1 = __webpack_require__(/*! ./simple_source3 */ "./node_mod
74955
74965
  const field_chain_1 = __webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js");
74956
74966
  const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js");
74957
74967
  const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
74968
+ const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js");
74958
74969
  class SQLCondTranspiler {
74959
74970
  transpile(node, traversal, table) {
74960
74971
  var _a;
@@ -75004,7 +75015,8 @@ class SQLCondTranspiler {
75004
75015
  pre = "NOT ";
75005
75016
  }
75006
75017
  if (sqlin.getChildren().length === 2) {
75007
- return `${pre}" + abap.expandIN("${fieldName.concatTokens()}", ${source.concatTokens()}) + "`;
75018
+ const s = new source_1.SourceTranspiler().transpile(source, traversal).getCode();
75019
+ return `${pre}" + abap.expandIN("${fieldName.concatTokens()}", ${s}) + "`;
75008
75020
  }
75009
75021
  else {
75010
75022
  const cond = [];
@@ -76046,6 +76058,45 @@ exports.HandleMSAG = HandleMSAG;
76046
76058
 
76047
76059
  /***/ }),
76048
76060
 
76061
+ /***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_oa2p.js":
76062
+ /*!*****************************************************************************!*\
76063
+ !*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_oa2p.js ***!
76064
+ \*****************************************************************************/
76065
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
76066
+
76067
+ "use strict";
76068
+
76069
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
76070
+ exports.HandleOA2P = void 0;
76071
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
76072
+ class HandleOA2P {
76073
+ runObject(obj, _reg) {
76074
+ var _a;
76075
+ const filename = (_a = obj.getXMLFile()) === null || _a === void 0 ? void 0 : _a.getFilename().replace(".xml", ".mjs").toLowerCase();
76076
+ if (filename === undefined) {
76077
+ return [];
76078
+ }
76079
+ const chunk = new chunk_1.Chunk().appendString(`abap.OA2P["${obj.getName().toUpperCase()}"] = {\n`);
76080
+ chunk.appendString(` "scopes": ${JSON.stringify(obj.listScopes())},\n`);
76081
+ chunk.appendString(`};`);
76082
+ const output = {
76083
+ object: {
76084
+ name: obj.getName(),
76085
+ type: obj.getType(),
76086
+ },
76087
+ filename: filename,
76088
+ chunk: chunk,
76089
+ requires: [],
76090
+ exports: [],
76091
+ };
76092
+ return [output];
76093
+ }
76094
+ }
76095
+ exports.HandleOA2P = HandleOA2P;
76096
+ //# sourceMappingURL=handle_oa2p.js.map
76097
+
76098
+ /***/ }),
76099
+
76049
76100
  /***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js":
76050
76101
  /*!*****************************************************************************!*\
76051
76102
  !*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js ***!
@@ -76367,6 +76418,7 @@ const handle_type_pool_1 = __webpack_require__(/*! ./handlers/handle_type_pool *
76367
76418
  const handle_w3mi_1 = __webpack_require__(/*! ./handlers/handle_w3mi */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_w3mi.js");
76368
76419
  const handle_smim_1 = __webpack_require__(/*! ./handlers/handle_smim */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js");
76369
76420
  const handle_msag_1 = __webpack_require__(/*! ./handlers/handle_msag */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_msag.js");
76421
+ const handle_oa2p_1 = __webpack_require__(/*! ./handlers/handle_oa2p */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_oa2p.js");
76370
76422
  class Transpiler {
76371
76423
  constructor(options) {
76372
76424
  this.options = options;
@@ -76407,6 +76459,9 @@ class Transpiler {
76407
76459
  else if (obj instanceof abaplint.Objects.TypePool) {
76408
76460
  output.objects.push(...new handle_type_pool_1.HandleTypePool().runObject(obj, reg));
76409
76461
  }
76462
+ else if (obj instanceof abaplint.Objects.Oauth2Profile) {
76463
+ output.objects.push(...new handle_oa2p_1.HandleOA2P().runObject(obj, reg));
76464
+ }
76410
76465
  else if (obj instanceof abaplint.Objects.Table) {
76411
76466
  output.objects.push(...new handle_table_1.HandleTable().runObject(obj, reg));
76412
76467
  }
@@ -84935,6 +84990,7 @@ exports.config = {
84935
84990
  "MSAG",
84936
84991
  "NROB",
84937
84992
  "NSPC",
84993
+ "OA2P",
84938
84994
  "PARA",
84939
84995
  "PROG",
84940
84996
  "SHLP",
@@ -86539,9 +86595,9 @@ const xmlNode = __webpack_require__(/*! ./xmlNode */ "./node_modules/fast-xml-pa
86539
86595
  const readDocType = __webpack_require__(/*! ./DocTypeReader */ "./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js");
86540
86596
  const toNumber = __webpack_require__(/*! strnum */ "./node_modules/strnum/strnum.js");
86541
86597
 
86542
- const regx =
86543
- '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
86544
- .replace(/NAME/g, util.nameRegexp);
86598
+ // const regx =
86599
+ // '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
86600
+ // .replace(/NAME/g, util.nameRegexp);
86545
86601
 
86546
86602
  //const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g");
86547
86603
  //const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g");
@@ -87034,8 +87090,8 @@ function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){
87034
87090
  let tagName = tagExp;
87035
87091
  let attrExpPresent = true;
87036
87092
  if(separatorIndex !== -1){//separate tag name and attributes expression
87037
- tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, '');
87038
- tagExp = tagExp.substr(separatorIndex + 1);
87093
+ tagName = tagExp.substring(0, separatorIndex);
87094
+ tagExp = tagExp.substring(separatorIndex + 1).trimStart();
87039
87095
  }
87040
87096
 
87041
87097
  const rawTagName = tagName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.140",
3
+ "version": "2.7.142",
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.140",
29
+ "@abaplint/transpiler": "^2.7.142",
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.6",
34
- "@abaplint/core": "^2.105.8",
33
+ "@types/node": "^20.11.0",
34
+ "@abaplint/core": "^2.105.10",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.89.0",
37
37
  "webpack-cli": "^5.1.4",