All files / output zcl_abapgit_environment.clas.mjs

30% Statements 93/310
52.94% Branches 9/17
38.09% Functions 8/21
30% Lines 93/310

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 3101x 1x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x                                                                                           4x                                                                                       4x 1x 1x 1x 1x 4x                       4x             4x                                                                                                                     4x                                                   4x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x     1x 1x 1x 1x 1x 4x               4x 1x 1x 1x 1x   1x 1x 1x 1x     1x 1x 1x 4x 2x 2x 2x 2x   2x 2x 2x 2x     2x 2x 2x 2x 2x 4x                 4x             4x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_environment.clas.abap
class zcl_abapgit_environment {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_ENVIRONMENT';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_ENVIRONMENT"];
  static ATTRIBUTES = {"MV_CLOUD": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MV_IS_MERGED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MV_MODIFIABLE": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "I", "is_constant": " ", "is_class": " "}};
  static METHODS = {"IS_SYSTEM_CHANGES_ALLOWED": {"visibility": "I", "parameters": {"RV_RESULT": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}}}};
  #mv_cloud;
  #mv_is_merged;
  #mv_modifiable;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "is_system_changes_allowed": this.#is_system_changes_allowed.bind(this),
    };
    this.#mv_cloud = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    this.#mv_cloud.set('-');
    this.FRIENDS_ACCESS_INSTANCE["mv_cloud"] = this.#mv_cloud;
    this.#mv_is_merged = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    this.#mv_is_merged.set('-');
    this.FRIENDS_ACCESS_INSTANCE["mv_is_merged"] = this.#mv_is_merged;
    this.#mv_modifiable = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    this.#mv_modifiable.set('-');
    this.FRIENDS_ACCESS_INSTANCE["mv_modifiable"] = this.#mv_modifiable;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async #is_system_changes_allowed() {
    let rv_result = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let lv_systemedit = new abap.types.Character(1, {});
    let lv_sys_cliinddep_edit = new abap.types.Character(1, {});
    let lv_is_shadow = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let ls_upginfo = (() => { throw new Error("Void type: UVERS") })();
    let lv_is_upgrade = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    try {
      if (abap.FunctionModules['TR_SYS_PARAMS'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
      await abap.FunctionModules['TR_SYS_PARAMS']({importing: {systemedit: lv_systemedit, sys_cliinddep_edit: lv_sys_cliinddep_edit}});
      abap.builtin.sy.get().subrc.set(0);
    } catch (e) {
      if (e.classic) {
          switch (e.classic.toUpperCase()) {
          case "NO_SYSTEMNAME": abap.builtin.sy.get().subrc.set(1); break;
          case "NO_SYSTEMTYPE": abap.builtin.sy.get().subrc.set(2); break;
          default: abap.builtin.sy.get().subrc.set(3); break;
            }
        } else {
            throw e;
        }
      }
      if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        return rv_result;
      }
      if (abap.FunctionModules['UPG_IS_SHADOW_SYSTEM'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
      await abap.FunctionModules['UPG_IS_SHADOW_SYSTEM']({importing: {ev_shadow: lv_is_shadow}});
      try {
        if (abap.FunctionModules['UPG_GET_ACTIVE_COMP_UPGRADE'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
        await abap.FunctionModules['UPG_GET_ACTIVE_COMP_UPGRADE']({exporting: {iv_component: abap.CharacterFactory.get(9, 'SAP_BASIS'), iv_upgtype: abap.CharacterFactory.get(1, 'A'), iv_buffered: abap.builtin.abap_false}, importing: {ev_upginfo: ls_upginfo}});
        abap.builtin.sy.get().subrc.set(0);
      } catch (e) {
        if (e.classic) {
            switch (e.classic.toUpperCase()) {
            default: abap.builtin.sy.get().subrc.set(4); break;
              }
          } else {
              throw e;
          }
        }
        if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)) && abap.compare.na(ls_upginfo.get().putstatus, abap.CharacterFactory.get(3, 'ITU'))) {
          lv_is_upgrade.set(abap.builtin.abap_true);
        }
        rv_result.set(abap.builtin.boolc(abap.compare.ne(lv_systemedit, abap.CharacterFactory.get(1, 'N')) && abap.compare.na(lv_sys_cliinddep_edit, abap.CharacterFactory.get(2, '23')) && abap.compare.ne(lv_is_shadow, abap.builtin.abap_true) && abap.compare.ne(lv_is_upgrade, abap.builtin.abap_true)));
        return rv_result;
      }
      async zif_abapgit_environment$check_parallel_processing(INPUT) {
        let rv_checked = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
        let iv_group = INPUT?.iv_group;
        let lt_setup = abap.types.TableFactory.construct((() => { throw new Error("Void type: RZLLITAB") })(), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
        let ls_setup = (() => { throw new Error("Void type: RZLLITAB") })();
        let lt_erfc_setup = abap.types.TableFactory.construct((() => { throw new Error("Void type: RZLLICLASS") })(), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
        let lt_instances = abap.types.TableFactory.construct((() => { throw new Error("Void type: MSXXLIST") })(), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
        try {
          if (abap.FunctionModules['SMLG_GET_SETUP'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
          await abap.FunctionModules['SMLG_GET_SETUP']({exporting: {grouptype: abap.CharacterFactory.get(1, 'S')}, tables: {setup: lt_setup, erfc_setup: lt_erfc_setup}});
          abap.builtin.sy.get().subrc.set(0);
        } catch (e) {
          if (e.classic) {
              switch (e.classic.toUpperCase()) {
              case "FOREIGN_LOCK": abap.builtin.sy.get().subrc.set(1); break;
              case "SYSTEM_FAILURE": abap.builtin.sy.get().subrc.set(2); break;
              case "INVALID_GROUP_TYPE": abap.builtin.sy.get().subrc.set(3); break;
              default: abap.builtin.sy.get().subrc.set(4); break;
                }
            } else {
                throw e;
            }
          }
          if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
            return rv_checked;
          }
          abap.statements.readTable(lt_setup,{into: ls_setup,
            withKey: (i) => {return abap.compare.eq(i.classname, iv_group);},
            withKeyValue: [{key: (i) => {return i.classname}, value: iv_group}],
            usesTableLine: false,
            withKeySimple: {"classname": iv_group}});
          if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)) && abap.compare.initial(ls_setup.get().applserver) === false) {
            if (abap.FunctionModules['TH_SERVER_LIST'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
            await abap.FunctionModules['TH_SERVER_LIST']({tables: {list: lt_instances}});
            abap.statements.readTable(lt_instances,{withKey: (i) => {return abap.compare.eq(i.name, ls_setup.get().applserver);},
              withKeyValue: [{key: (i) => {return i.name}, value: ls_setup.get().applserver}],
              usesTableLine: false,
              withKeySimple: {"name": ls_setup.get().applserver}});
            if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
              rv_checked.set(abap.builtin.abap_true);
            }
          }
          return rv_checked;
        }
        async zif_abapgit_environment$compare_with_inactive() {
          let rv_result = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
          rv_result.set((await this.zif_abapgit_environment$is_sap_cloud_platform()));
          return rv_result;
        }
        async zif_abapgit_environment$get_available_user_sessions() {
          let rv_sessions = new abap.types.Integer({qualifiedName: "I"});
          let lv_act_sessions = new abap.types.Integer({qualifiedName: "I"});
          let lv_max_sessions = new abap.types.Integer({qualifiedName: "I"});
          let lv_subrc = new abap.types.Integer({qualifiedName: "I"});
          if (abap.FunctionModules['TH_USER_INFO'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
          await abap.FunctionModules['TH_USER_INFO']({importing: {act_sessions: lv_act_sessions, max_sessions: lv_max_sessions, rc: lv_subrc}});
          if (abap.compare.eq(lv_subrc, abap.IntegerFactory.get(0))) {
            rv_sessions.set(abap.operators.minus(lv_max_sessions,lv_act_sessions));
          }
          return rv_sessions;
        }
        async zif_abapgit_environment$get_basis_release() {
          let rs_result = new abap.types.Structure({
          "release": new abap.types.Character(10, {"qualifiedName":"zif_abapgit_environment=>ty_release_sp-release"}),
          "sp": new abap.types.Character(10, {"qualifiedName":"zif_abapgit_environment=>ty_release_sp-sp"})}, "zif_abapgit_environment=>ty_release_sp", undefined, {}, {});
          await abap.statements.select([rs_result.get().release,rs_result.get().sp], {select: "SELECT \"release\", \"extrelease\" FROM " + abap.buildDbTableName("cvers") + " WHERE \"component\" = 'SAP_BASIS' UP TO 1 ROWS", primaryKey: ["component"]});
          return rs_result;
        }
        async zif_abapgit_environment$get_system_language_filter() {
          let rt_system_language_filter = abap.types.TableFactory.construct(new abap.types.Structure({
          "sign": new abap.types.Character(1, undefined),
          "option": new abap.types.Character(2, undefined),
          "low": new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"}),
          "high": new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"})}, undefined, undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_environment=>ty_system_language_filter");
          let lv_translation_detective_lang = new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"});
          let lv_pseudo_translation_language = new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"});
          let fs_ls_system_language_filter_ = new abap.types.FieldSymbol(new abap.types.Structure({
          "sign": new abap.types.Character(1, undefined),
          "option": new abap.types.Character(2, undefined),
          "low": new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"}),
          "high": new abap.types.Character(1, {"qualifiedName":"SPRAS","ddicName":"SPRAS","description":"SPRAS"})}, undefined, undefined, {}, {}));
          try {
            if (abap.FunctionModules['CONVERSION_EXIT_ISOLA_INPUT'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
            await abap.FunctionModules['CONVERSION_EXIT_ISOLA_INPUT']({exporting: {input: abap.CharacterFactory.get(2, '1Q')}, importing: {output: lv_translation_detective_lang}});
            abap.builtin.sy.get().subrc.set(0);
          } catch (e) {
            if (e.classic) {
                switch (e.classic.toUpperCase()) {
                case "UNKNOWN_LANGUAGE": abap.builtin.sy.get().subrc.set(1); break;
                default: abap.builtin.sy.get().subrc.set(2); break;
                  }
              } else {
                  throw e;
              }
            }
            if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(1))) {
            }
            if (abap.compare.initial(lv_translation_detective_lang) === false) {
              fs_ls_system_language_filter_.assign(rt_system_language_filter.appendInitial());
              fs_ls_system_language_filter_.get().sign.set(abap.CharacterFactory.get(1, 'E'));
              fs_ls_system_language_filter_.get().option.set(abap.CharacterFactory.get(2, 'EQ'));
              fs_ls_system_language_filter_.get().low.set(lv_translation_detective_lang);
            }
            try {
              if (abap.FunctionModules['CONVERSION_EXIT_ISOLA_INPUT'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
              await abap.FunctionModules['CONVERSION_EXIT_ISOLA_INPUT']({exporting: {input: abap.CharacterFactory.get(2, '2Q')}, importing: {output: lv_pseudo_translation_language}});
              abap.builtin.sy.get().subrc.set(0);
            } catch (e) {
              if (e.classic) {
                  switch (e.classic.toUpperCase()) {
                  case "UNKNOWN_LANGUAGE": abap.builtin.sy.get().subrc.set(1); break;
                  default: abap.builtin.sy.get().subrc.set(2); break;
                    }
                } else {
                    throw e;
                }
              }
              if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(1))) {
              }
              if (abap.compare.initial(lv_pseudo_translation_language) === false) {
                fs_ls_system_language_filter_.assign(rt_system_language_filter.appendInitial());
                fs_ls_system_language_filter_.get().sign.set(abap.CharacterFactory.get(1, 'E'));
                fs_ls_system_language_filter_.get().option.set(abap.CharacterFactory.get(2, 'EQ'));
                fs_ls_system_language_filter_.get().low.set(lv_pseudo_translation_language);
              }
              return rt_system_language_filter;
            }
            async zif_abapgit_environment$init_parallel_processing(INPUT) {
              let rv_free_work_processes = new abap.types.Integer({qualifiedName: "I"});
              let iv_group = INPUT?.iv_group;
              let lv_group = new abap.types.Character(20, {"qualifiedName":"RZLLI_APCL","ddicName":"RZLLI_APCL","description":"RZLLI_APCL"});
              lv_group.set(iv_group);
              try {
                if (abap.FunctionModules['SPBT_INITIALIZE'] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_FUNC not found"; } else { throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_FUNC'.trimEnd()]();} }
                await abap.FunctionModules['SPBT_INITIALIZE']({exporting: {group_name: lv_group}, importing: {free_pbt_wps: rv_free_work_processes}});
                abap.builtin.sy.get().subrc.set(0);
              } catch (e) {
                if (e.classic) {
                    switch (e.classic.toUpperCase()) {
                    case "INVALID_GROUP_NAME": abap.builtin.sy.get().subrc.set(1); break;
                    case "INTERNAL_ERROR": abap.builtin.sy.get().subrc.set(2); break;
                    case "PBT_ENV_ALREADY_INITIALIZED": abap.builtin.sy.get().subrc.set(3); break;
                    case "CURRENTLY_NO_RESOURCES_AVAIL": abap.builtin.sy.get().subrc.set(4); break;
                    case "NO_PBT_RESOURCES_FOUND": abap.builtin.sy.get().subrc.set(5); break;
                    case "CANT_INIT_DIFFERENT_PBT_GROUPS": abap.builtin.sy.get().subrc.set(6); break;
                    default: abap.builtin.sy.get().subrc.set(7); break;
                      }
                  } else {
                      throw e;
                  }
                }
                return rv_free_work_processes;
              }
              async zif_abapgit_environment$is_merged() {
                let rv_result = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
                let lr_marker = new abap.types.DataReference(new abap.types.Character(4));
                if (abap.compare.eq(this.#mv_is_merged, abap.builtin.abap_undefined)) {
                  try {
                    abap.statements.createData(lr_marker,{"name": 'LIF_ABAPMERGE_MARKER',"refTo": true});
                    this.#mv_is_merged.set(abap.builtin.abap_true);
                  } catch (e) {
                    if ((abap.Classes['CX_SY_CREATE_DATA_ERROR'] && e instanceof abap.Classes['CX_SY_CREATE_DATA_ERROR'])) {
                      this.#mv_is_merged.set(abap.builtin.abap_false);
                    } else {
                      throw e;
                    }
                  }
                }
                rv_result.set(this.#mv_is_merged);
                return rv_result;
              }
              async zif_abapgit_environment$is_repo_object_changes_allowed() {
                let rv_result = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
                if (abap.compare.eq(this.#mv_modifiable, abap.builtin.abap_undefined)) {
                  this.#mv_modifiable.set((await this.#is_system_changes_allowed()));
                }
                rv_result.set(this.#mv_modifiable);
                return rv_result;
              }
              async zif_abapgit_environment$is_restart_required() {
                let rv_result = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
                rv_result.set(abap.builtin.abap_false);
                try {
                  if (abap.Classes['CL_APJ_SCP_TOOLS'.trimEnd()] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()](); } }
                  rv_result.set(await abap.dynamicCallLookup(abap.Classes['CL_APJ_SCP_TOOLS'.trimEnd()], "is_restart_required")());
                } catch (e) {
                  if ((abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD'] && e instanceof abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD']) || (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'] && e instanceof abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'])) {
                    rv_result.set(abap.builtin.abap_false);
                  } else {
                    throw e;
                  }
                }
                return rv_result;
              }
              async zif_abapgit_environment$is_sap_cloud_platform() {
                let rv_result = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
                if (abap.compare.eq(this.#mv_cloud, abap.builtin.abap_undefined)) {
                  try {
                    if (abap.Classes['CL_COS_UTILITIES'.trimEnd()] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()](); } }
                    this.#mv_cloud.set(await abap.dynamicCallLookup(abap.Classes['CL_COS_UTILITIES'.trimEnd()], "is_sap_cloud_platform")());
                  } catch (e) {
                    if ((abap.Classes['CX_SY_DYN_CALL_ERROR'] && e instanceof abap.Classes['CX_SY_DYN_CALL_ERROR'])) {
                      this.#mv_cloud.set(abap.builtin.abap_false);
                    } else {
                      throw e;
                    }
                  }
                }
                rv_result.set(this.#mv_cloud);
                return rv_result;
              }
              async zif_abapgit_environment$is_sap_object_allowed() {
                let rv_allowed = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
                rv_allowed.set((await abap.Classes['CL_ENH_BADI_DEF_UTILITY'].is_sap_system()));
                if (abap.compare.eq(rv_allowed, abap.builtin.abap_true)) {
                  return rv_allowed;
                }
                rv_allowed.set((await (await abap.Classes['ZCL_ABAPGIT_EXIT'].get_instance()).get().zif_abapgit_exit$allow_sap_objects()));
                return rv_allowed;
              }
              async zif_abapgit_environment$is_variant_maintenance() {
                let rv_is_variant_maintenance = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
                let lt_variscreens = abap.types.TableFactory.construct((() => { throw new Error("Void type: RSDYNNR") })(), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "");
                throw new Error("Import, transpiler todo");
                rv_is_variant_maintenance.set(abap.builtin.boolc(abap.compare.gt(abap.builtin.lines({val: lt_variscreens}), abap.IntegerFactory.get(0))));
                return rv_is_variant_maintenance;
              }
            }
            abap.Classes['ZCL_ABAPGIT_ENVIRONMENT'] = zcl_abapgit_environment;
export {zcl_abapgit_environment};