@abaplint/cli 2.119.22 → 2.119.24

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/cli.js +61 -18
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -32011,7 +32011,7 @@ class Data {
32011
32011
  const dd = node.findFirstExpression(Expressions.DataDefinition);
32012
32012
  if (dd) {
32013
32013
  const id = data_definition_1.DataDefinition.runSyntax(dd, input);
32014
- if (id && this.isOnlyDigits(id.getName())) {
32014
+ if (id && this.isOnlyDigits(id.getName()) && this.allowOnlyDigitsName(node, input) === false) {
32015
32015
  const message = "not possible to have a name with only digits";
32016
32016
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, id.getToken(), message));
32017
32017
  return new _typed_identifier_1.TypedIdentifier(id.getToken(), input.filename, basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey));
@@ -32025,7 +32025,7 @@ class Data {
32025
32025
  return id;
32026
32026
  }
32027
32027
  if (name) {
32028
- if (this.isOnlyDigits(name.concatTokens())) {
32028
+ if (this.isOnlyDigits(name.concatTokens()) && this.allowOnlyDigitsName(node, input) === false) {
32029
32029
  const message = "not possible to have a name with only digits";
32030
32030
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, name.getFirstToken(), message));
32031
32031
  }
@@ -32036,6 +32036,9 @@ class Data {
32036
32036
  isOnlyDigits(name) {
32037
32037
  return /^[0-9]+$/.test(name);
32038
32038
  }
32039
+ allowOnlyDigitsName(node, input) {
32040
+ return input.scope.isAnyOO() === false && node.getColon() !== undefined;
32041
+ }
32039
32042
  }
32040
32043
  exports.Data = Data;
32041
32044
  //# sourceMappingURL=data.js.map
@@ -47422,9 +47425,11 @@ class ABAPObject extends _abstract_object_1.AbstractObject {
47422
47425
  }
47423
47426
  for (const t of (0, xml_utils_1.xmlToArray)(parsed.abapGit["asx:abap"]["asx:values"].TPOOL.item)) {
47424
47427
  const id = (_e = t.ID) === null || _e === void 0 ? void 0 : _e.toUpperCase();
47425
- if (id === undefined
47426
- || (id !== "R" && t.KEY === undefined)) {
47427
- throw new Error("findTexts, undefined");
47428
+ if (id === undefined) {
47429
+ continue;
47430
+ }
47431
+ if (id !== "R" && t.KEY === undefined) {
47432
+ continue;
47428
47433
  }
47429
47434
  const key = (_g = ((_f = t.KEY) !== null && _f !== void 0 ? _f : t.ID)) === null || _g === void 0 ? void 0 : _g.toUpperCase();
47430
47435
  if (key === undefined) {
@@ -47437,16 +47442,16 @@ class ABAPObject extends _abstract_object_1.AbstractObject {
47437
47442
  }
47438
47443
  }
47439
47444
  findTextsTranslations(parsed) {
47440
- var _a, _b, _c, _d, _e, _f;
47445
+ var _a, _b, _c, _d, _e, _f, _g;
47441
47446
  this.textsTranslations = [];
47442
- const values = (_c = (_b = (_a = parsed === null || parsed === void 0 ? void 0 : parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"].I18N_TPOOL) === null || _c === void 0 ? void 0 : _c.item;
47447
+ const values = (_d = (_c = (_b = (_a = parsed === null || parsed === void 0 ? void 0 : parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"]) === null || _c === void 0 ? void 0 : _c.I18N_TPOOL) === null || _d === void 0 ? void 0 : _d.item;
47443
47448
  if (values === undefined) {
47444
47449
  return;
47445
47450
  }
47446
47451
  for (const langItem of (0, xml_utils_1.xmlToArray)(values)) {
47447
47452
  const textElements = {};
47448
- for (const item of (0, xml_utils_1.xmlToArray)((_d = langItem.TEXTPOOL) === null || _d === void 0 ? void 0 : _d.item)) {
47449
- const key = (_f = ((_e = item.KEY) !== null && _e !== void 0 ? _e : item.ID)) === null || _f === void 0 ? void 0 : _f.toUpperCase();
47453
+ for (const item of (0, xml_utils_1.xmlToArray)((_e = langItem.TEXTPOOL) === null || _e === void 0 ? void 0 : _e.item)) {
47454
+ const key = (_g = ((_f = item.KEY) !== null && _f !== void 0 ? _f : item.ID)) === null || _g === void 0 ? void 0 : _g.toUpperCase();
47450
47455
  if (key !== undefined) {
47451
47456
  textElements[key] = { entry: (0, xml_utils_1.unescape)(item.ENTRY), maxLength: parseInt(item.LENGTH, 10) };
47452
47457
  }
@@ -55378,23 +55383,22 @@ class Transaction extends _abstract_object_1.AbstractObject {
55378
55383
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.textsTranslations;
55379
55384
  }
55380
55385
  parse() {
55381
- var _a, _b, _c, _d;
55386
+ var _a, _b, _c, _d, _e, _f;
55382
55387
  if (this.parsedXML) {
55383
55388
  return { updated: false, runtime: 0 };
55384
55389
  }
55385
55390
  const start = Date.now();
55386
55391
  this.parsedXML = {};
55387
55392
  const parsed = super.parseRaw2();
55388
- if (parsed === undefined
55389
- || parsed.abapGit === undefined
55390
- || parsed.abapGit["asx:abap"]["asx:values"] === undefined) {
55393
+ const values = (_b = (_a = parsed === null || parsed === void 0 ? void 0 : parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"];
55394
+ if (values === undefined) {
55391
55395
  return { updated: false, runtime: 0 };
55392
55396
  }
55393
- this.parsedXML.description = (_a = parsed.abapGit["asx:abap"]["asx:values"].TSTCT) === null || _a === void 0 ? void 0 : _a.TTEXT;
55394
- this.parsedXML.programName = (_b = parsed.abapGit["asx:abap"]["asx:values"].TSTC) === null || _b === void 0 ? void 0 : _b.PGMNA;
55395
- this.parsedXML.cinfo = (_c = parsed.abapGit["asx:abap"]["asx:values"].TSTC) === null || _c === void 0 ? void 0 : _c.CINFO;
55397
+ this.parsedXML.description = (_c = values.TSTCT) === null || _c === void 0 ? void 0 : _c.TTEXT;
55398
+ this.parsedXML.programName = (_d = values.TSTC) === null || _d === void 0 ? void 0 : _d.PGMNA;
55399
+ this.parsedXML.cinfo = (_e = values.TSTC) === null || _e === void 0 ? void 0 : _e.CINFO;
55396
55400
  this.parsedXML.textsTranslations = [];
55397
- for (const item of (0, xml_utils_1.xmlToArray)((_d = parsed.abapGit["asx:abap"]["asx:values"].I18N_TPOOL) === null || _d === void 0 ? void 0 : _d.TSTCT)) {
55401
+ for (const item of (0, xml_utils_1.xmlToArray)((_f = values.I18N_TPOOL) === null || _f === void 0 ? void 0 : _f.TSTCT)) {
55398
55402
  this.parsedXML.textsTranslations.push({ language: item.SPRSL, description: item.TTEXT });
55399
55403
  }
55400
55404
  const end = Date.now();
@@ -56457,7 +56461,7 @@ class Registry {
56457
56461
  }
56458
56462
  static abaplintVersion() {
56459
56463
  // magic, see build script "version.sh"
56460
- return "2.119.22";
56464
+ return "2.119.24";
56461
56465
  }
56462
56466
  getDDICReferences() {
56463
56467
  return this.ddicReferences;
@@ -66741,25 +66745,54 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
66741
66745
  * @uniqueItems true
66742
66746
  */
66743
66747
  this.recommendations = [
66748
+ { name: "CALCULATE_HASH_FOR_CHAR", replace: "use CL_ABAP_MESSAGE_DIGEST" },
66744
66749
  { name: "CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_HMAC or CL_ABAP_MESSAGE_DIGEST" },
66745
66750
  { name: "CCU_TIMESTAMP_DIFFERENCE", replace: "use CL_ABAP_TSTMP" },
66751
+ { name: "CLPB_EXPORT", replace: "use CL_GUI_FRONTEND_SERVICES" },
66752
+ { name: "CLPB_IMPORT", replace: "use CL_GUI_FRONTEND_SERVICES" },
66746
66753
  { name: "CONVERT_DATE_TO_EXTERNAL", replace: "use CL_ABAP_DATFM" },
66747
66754
  { name: "CONVERT_TIME_INPUT", replace: "use CL_ABAP_TIMEFM" },
66755
+ { name: "DOWNLOAD", replace: "use CL_GUI_FRONTEND_SERVICES" },
66748
66756
  { name: "ECATT_CONV_XSTRING_TO_STRING", replace: "use CL_BINARY_CONVERT" },
66749
66757
  { name: "F4_FILENAME", replace: "use CL_GUI_FRONTEND_SERVICES" },
66750
66758
  { name: "FUNCTION_EXISTS", replace: "surround with try-catch CX_SY_DYN_CALL_ILLEGAL_METHOD instead" },
66759
+ { name: "GUI_CREATE_DIRECTORY", replace: "use CL_GUI_FRONTEND_SERVICES" },
66760
+ { name: "GUI_DELETE_FILE", replace: "use CL_GUI_FRONTEND_SERVICES" },
66751
66761
  { name: "GUI_DOWNLOAD", replace: "use CL_GUI_FRONTEND_SERVICES" },
66762
+ { name: "GUI_EXEC", replace: "use CL_GUI_FRONTEND_SERVICES" },
66763
+ { name: "GUI_FB_USAGE", replace: "use CL_GUI_FRONTEND_SERVICES" },
66764
+ { name: "GUI_FILE_LOAD_DIALOG", replace: "use CL_GUI_FRONTEND_SERVICES" },
66765
+ { name: "GUI_FILE_SAVE_DIALOG", replace: "use CL_GUI_FRONTEND_SERVICES" },
66766
+ { name: "GUI_GET_DESKTOP_INFO", replace: "use CL_GUI_FRONTEND_SERVICES" },
66767
+ { name: "GUI_GET_FILE_INFO", replace: "use CL_GUI_FRONTEND_SERVICES" },
66768
+ { name: "GUI_GET_REGVALUE", replace: "use CL_GUI_FRONTEND_SERVICES" },
66769
+ { name: "GUI_MULTIPLE_FILE_LOAD_DIALOG", replace: "use CL_GUI_FRONTEND_SERVICES" },
66770
+ { name: "GUI_REMOVE_DIRECTORY", replace: "use CL_GUI_FRONTEND_SERVICES" },
66771
+ { name: "GUI_RUN", replace: "use CL_GUI_FRONTEND_SERVICES" },
66772
+ { name: "GUI_SET_REGVALUE", replace: "use CL_GUI_FRONTEND_SERVICES" },
66752
66773
  { name: "GUI_UPLOAD", replace: "use CL_GUI_FRONTEND_SERVICES" },
66774
+ { name: "GUI_VSS_DOWNLOAD", replace: "use CL_GUI_FRONTEND_SERVICES" },
66775
+ { name: "GUI_VSS_UPLOAD", replace: "use CL_GUI_FRONTEND_SERVICES" },
66753
66776
  { name: "GUID_CREATE", replace: "use CL_SYSTEM_UUID" },
66754
66777
  { name: "IGN_TIMESTAMP_DIFFERENCE", replace: "use CL_ABAP_TSTMP" },
66755
66778
  { name: "IGN_TIMESTAMP_PLUSMINUS", replace: "use CL_ABAP_TSTMP" },
66756
66779
  { name: "ISM_SD_GET_PRICING_CONDITIONS", replace: "use CL_PRC_RESULT_FACTORY as per note 2220005" },
66757
66780
  { name: "JOB_CREATE", replace: "use CL_BP_ABAP_JOB" },
66758
66781
  { name: "JOB_SUBMIT", replace: "use CL_BP_ABAP_JOB" },
66782
+ { name: "MD5_CALCULATE_HASH_FOR_CHAR", replace: "use CL_ABAP_MESSAGE_DIGEST" },
66783
+ { name: "MD5_CALCULATE_HASH_FOR_RAW", replace: "use CL_ABAP_MESSAGE_DIGEST" },
66784
+ { name: "POPUP_TO_CONFIRM_LOSS_OF_DATA", replace: "use POPUP_TO_CONFIRM" },
66759
66785
  { name: "POPUP_TO_CONFIRM_STEP", replace: "use POPUP_TO_CONFIRM" },
66786
+ { name: "POPUP_TO_CONFIRM_WITH_MESSAGE", replace: "use POPUP_TO_CONFIRM" },
66787
+ { name: "POPUP_TO_CONFIRM_WITH_VALUE", replace: "use POPUP_TO_CONFIRM" },
66788
+ { name: "POPUP_TO_CONFIRM_WITH_VALUE_2", replace: "use POPUP_TO_CONFIRM" },
66760
66789
  { name: "POPUP_TO_DECIDE", replace: "use POPUP_TO_CONFIRM" },
66790
+ { name: "POPUP_TO_DECIDE_INFO", replace: "use POPUP_TO_CONFIRM" },
66791
+ { name: "POPUP_TO_DECIDE_WITH_MESSAGE", replace: "use POPUP_TO_CONFIRM" },
66761
66792
  { name: "POPUP_TO_GET_VALUE", replace: "use POPUP_GET_VALUES" },
66762
66793
  { name: "QF05_RANDOM_INTEGER", replace: "use CL_ABAP_RANDOM_INT" },
66794
+ { name: "REGISTRY_GET", replace: "use CL_GUI_FRONTEND_SERVICES" },
66795
+ { name: "REGISTRY_SET", replace: "use CL_GUI_FRONTEND_SERVICES" },
66763
66796
  { name: "REUSE_ALV_GRID_DISPLAY", replace: "use CL_SALV_TABLE=>FACTORY or CL_GUI_ALV_GRID" },
66764
66797
  { name: "ROUND", replace: "use built in function: round()" },
66765
66798
  { name: "SAPGUI_PROGRESS_INDICATOR", replace: "use CL_PROGRESS_INDICATOR" },
@@ -66769,7 +66802,17 @@ class FunctionModuleRecommendationsConf extends _basic_rule_config_1.BasicRuleCo
66769
66802
  { name: "SSFC_BASE64_DECODE", replace: "use class CL_HTTP_UTILITY methods" },
66770
66803
  { name: "SSFC_BASE64_ENCODE", replace: "use class CL_HTTP_UTILITY methods" },
66771
66804
  { name: "SUBST_GET_FILE_LIST", replace: "see note 1686357" },
66805
+ { name: "SYSTEM_GET_UNIQUE_ID", replace: "use CL_SYSTEM_UUID" },
66806
+ { name: "SYSTEM_UUID_C_CREATE", replace: "use CL_SYSTEM_UUID" },
66807
+ { name: "UPLOAD", replace: "use CL_GUI_FRONTEND_SERVICES" },
66808
+ { name: "WS_DOWNLOAD", replace: "use CL_GUI_FRONTEND_SERVICES" },
66809
+ { name: "WS_EXECUTE", replace: "use CL_GUI_FRONTEND_SERVICES" },
66772
66810
  { name: "WS_FILENAME_GET", replace: "use CL_GUI_FRONTEND_SERVICES" },
66811
+ { name: "WS_FILE_ATTRIB", replace: "use CL_GUI_FRONTEND_SERVICES" },
66812
+ { name: "WS_FILE_COPY", replace: "use CL_GUI_FRONTEND_SERVICES" },
66813
+ { name: "WS_FILE_DELETE", replace: "use CL_GUI_FRONTEND_SERVICES" },
66814
+ { name: "WS_QUERY", replace: "use CL_GUI_FRONTEND_SERVICES" },
66815
+ { name: "WS_UPLOAD", replace: "use CL_GUI_FRONTEND_SERVICES" },
66773
66816
  ];
66774
66817
  }
66775
66818
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.22",
3
+ "version": "2.119.24",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.119.22",
41
+ "@abaplint/core": "^2.119.24",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",