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 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | const {cx_root} = await import("./cx_root.clas.mjs"); // zcl_abapgit_background_push_fi.clas.abap class zcl_abapgit_background_push_fi { static INTERNAL_TYPE = 'CLAS'; static INTERNAL_NAME = 'ZCL_ABAPGIT_BACKGROUND_PUSH_FI'; static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_BACKGROUND"]; static ATTRIBUTES = {"MI_LOG": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"});}, "visibility": "O", "is_constant": " ", "is_class": " "}, "C_SETTINGS": {"type": () => {return new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "STRING"}), "email": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "O", "is_constant": "X", "is_class": "X"}}; static METHODS = {"BUILD_COMMENT": {"visibility": "O", "parameters": {"RV_COMMENT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IS_FILES": {"type": () => {return new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "item": new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {});}, "is_optional": " "}}}, "PUSH_FIXED": {"visibility": "O", "parameters": {"II_REPO_ONLINE": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO_ONLINE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO_ONLINE"});}, "is_optional": " "}, "IV_NAME": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IV_EMAIL": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}}}; constructor() { this.me = new abap.types.ABAPObject(); this.me.set(this); this.INTERNAL_ID = abap.internalIdCounter++; this.FRIENDS_ACCESS_INSTANCE = { "build_comment": this.build_comment.bind(this), "push_fixed": this.push_fixed.bind(this), }; this.mi_log = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"}); this.c_settings = zcl_abapgit_background_push_fi.c_settings; } async constructor_(INPUT) { if (super.constructor_) { await super.constructor_(INPUT); } return this; } async build_comment(INPUT) { let rv_comment = new abap.types.String({qualifiedName: "STRING"}); let is_files = INPUT?.is_files; if (is_files?.getQualifiedName === undefined || is_files.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_STAGE_FILES") { is_files = undefined; } if (is_files === undefined) { is_files = new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "item": new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {}).set(INPUT.is_files); } let lt_objects = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, ""); let lv_str = new abap.types.String({qualifiedName: "STRING"}); let fs_ls_local_ = new abap.types.FieldSymbol(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "item": new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {})); for await (const unique26 of abap.statements.loop(is_files.get().local)) { fs_ls_local_.assign(unique26); lv_str.set(new abap.types.String().set(`${abap.templateFormatting(fs_ls_local_.get().item.get().obj_type)} ${abap.templateFormatting(fs_ls_local_.get().item.get().obj_name)}`)); abap.statements.append({source: lv_str, target: lt_objects}); } abap.statements.sort(lt_objects,{}); await abap.statements.deleteInternal(lt_objects,{adjacent: true}); if (abap.compare.eq(abap.builtin.lines({val: lt_objects}), abap.IntegerFactory.get(1))) { rv_comment.set(new abap.types.String().set(`BG: ${abap.templateFormatting(lv_str)}`)); } else { rv_comment.set(abap.CharacterFactory.get(20, 'BG: Multiple objects')); for await (const unique27 of abap.statements.loop(lt_objects)) { lv_str.set(unique27); abap.statements.concatenate({source: [rv_comment, abap.Classes['CL_ABAP_CHAR_UTILITIES'].newline, lv_str], target: rv_comment}); } } return rv_comment; } async push_fixed(INPUT) { let ii_repo_online = INPUT?.ii_repo_online; if (ii_repo_online?.getQualifiedName === undefined || ii_repo_online.getQualifiedName() !== "ZIF_ABAPGIT_REPO_ONLINE") { ii_repo_online = undefined; } if (ii_repo_online === undefined) { ii_repo_online = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO_ONLINE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO_ONLINE"}).set(INPUT.ii_repo_online); } let iv_name = INPUT?.iv_name; if (iv_name?.getQualifiedName === undefined || iv_name.getQualifiedName() !== "STRING") { iv_name = undefined; } if (iv_name === undefined) { iv_name = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_name); } let iv_email = INPUT?.iv_email; if (iv_email?.getQualifiedName === undefined || iv_email.getQualifiedName() !== "STRING") { iv_email = undefined; } if (iv_email === undefined) { iv_email = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_email); } let ls_comment = new abap.types.Structure({ "committer": new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-NAME"}), "email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-EMAIL"})}, "zif_abapgit_git_definitions=>ty_git_user", undefined, {}, {}), "author": new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-NAME"}), "email": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_GIT_USER-EMAIL"})}, "zif_abapgit_git_definitions=>ty_git_user", undefined, {}, {}), "comment": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_COMMENT-COMMENT"})}, "zif_abapgit_git_definitions=>ty_comment", undefined, {}, {}); let ls_files = new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "item": new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {}); let lo_stage = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_STAGE", RTTIName: "\\CLASS=ZCL_ABAPGIT_STAGE"}); let fs_ls_local_ = new abap.types.FieldSymbol(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "item": new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {})); let fs_ls_remote_ = new abap.types.FieldSymbol(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {})); ls_files.set((await (await abap.Classes['ZCL_ABAPGIT_STAGE_LOGIC'].get_stage_logic()).get().zif_abapgit_stage_logic$get({ii_repo_online: ii_repo_online}))); abap.statements.assert(abap.compare.gt(abap.builtin.lines({val: ls_files.get().local}), abap.IntegerFactory.get(0)) || abap.compare.gt(abap.builtin.lines({val: ls_files.get().remote}), abap.IntegerFactory.get(0))); lo_stage.set(await (new abap.Classes['ZCL_ABAPGIT_STAGE']()).constructor_()); for await (const unique28 of abap.statements.loop(ls_files.get().local)) { fs_ls_local_.assign(unique28); await this.mi_log.get().zif_abapgit_log$add_info({iv_msg: new abap.types.String().set(`stage: ${abap.templateFormatting(fs_ls_local_.get().file.get().path)} ${abap.templateFormatting(fs_ls_local_.get().file.get().filename)}`)}); await lo_stage.get().add({iv_path: fs_ls_local_.get().file.get().path, iv_filename: fs_ls_local_.get().file.get().filename, iv_data: fs_ls_local_.get().file.get().data}); } for await (const unique29 of abap.statements.loop(ls_files.get().remote)) { fs_ls_remote_.assign(unique29); await this.mi_log.get().zif_abapgit_log$add_info({iv_msg: new abap.types.String().set(`removed: ${abap.templateFormatting(fs_ls_remote_.get().path)} ${abap.templateFormatting(fs_ls_remote_.get().filename)}`)}); await lo_stage.get().rm({iv_path: fs_ls_remote_.get().path, iv_filename: fs_ls_remote_.get().filename}); } ls_comment.get().committer.get().name.set(iv_name); ls_comment.get().committer.get().email.set(iv_email); ls_comment.get().comment.set((await this.build_comment({is_files: ls_files}))); await ii_repo_online.get().zif_abapgit_repo_online$push({is_comment: ls_comment, io_stage: lo_stage}); } async zif_abapgit_background$get_description() { return zcl_abapgit_background_push_fi.zif_abapgit_background$get_description(); } static async zif_abapgit_background$get_description() { let rv_description = new abap.types.String({qualifiedName: "STRING"}); rv_description.set(abap.CharacterFactory.get(28, 'Automatic push, fixed author')); return rv_description; } async zif_abapgit_background$get_settings(INPUT) { return zcl_abapgit_background_push_fi.zif_abapgit_background$get_settings(INPUT); } static async zif_abapgit_background$get_settings(INPUT) { let ct_settings = abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt"); if (INPUT && INPUT.ct_settings) {ct_settings = INPUT.ct_settings;} let ls_setting = new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}); abap.statements.readTable(ct_settings,{into: ls_setting, withKey: (i) => {return abap.compare.eq(i.key, zcl_abapgit_background_push_fi.c_settings.get().name);}, withKeyValue: [{key: (i) => {return i.key}, value: zcl_abapgit_background_push_fi.c_settings.get().name}], usesTableLine: false, withKeySimple: {"key": zcl_abapgit_background_push_fi.c_settings.get().name}}); if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { ls_setting.get().key.set(zcl_abapgit_background_push_fi.c_settings.get().name); ls_setting.get().value.set(abap.CharacterFactory.get(6, 'foobar')); abap.statements.append({source: ls_setting, target: ct_settings}); } abap.statements.readTable(ct_settings,{into: ls_setting, withKey: (i) => {return abap.compare.eq(i.key, zcl_abapgit_background_push_fi.c_settings.get().email);}, withKeyValue: [{key: (i) => {return i.key}, value: zcl_abapgit_background_push_fi.c_settings.get().email}], usesTableLine: false, withKeySimple: {"key": zcl_abapgit_background_push_fi.c_settings.get().email}}); if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { ls_setting.get().key.set(zcl_abapgit_background_push_fi.c_settings.get().email); ls_setting.get().value.set(abap.CharacterFactory.get(16, 'foobar@localhost')); abap.statements.append({source: ls_setting, target: ct_settings}); } } async zif_abapgit_background$run(INPUT) { let ii_repo_online = INPUT?.ii_repo_online; if (ii_repo_online?.getQualifiedName === undefined || ii_repo_online.getQualifiedName() !== "ZIF_ABAPGIT_REPO_ONLINE") { ii_repo_online = undefined; } if (ii_repo_online === undefined) { ii_repo_online = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO_ONLINE", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO_ONLINE"}).set(INPUT.ii_repo_online); } let ii_log = INPUT?.ii_log; if (ii_log?.getQualifiedName === undefined || ii_log.getQualifiedName() !== "ZIF_ABAPGIT_LOG") { ii_log = undefined; } if (ii_log === undefined) { ii_log = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_LOG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_LOG"}).set(INPUT.ii_log); } let it_settings = abap.types.TableFactory.construct(new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_background=>ty_settings_tt"); if (INPUT && INPUT.it_settings) {it_settings.set(INPUT.it_settings);} let ls_files = new abap.types.Structure({ "local": abap.types.TableFactory.construct(new abap.types.Structure({ "file": new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), "item": new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {})}, "zif_abapgit_definitions=>ty_file_item", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_definitions=>ty_files_item_tt"), "remote": abap.types.TableFactory.construct(new abap.types.Structure({ "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}), "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}), "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt"), "status": abap.types.TableFactory.construct(new abap.types.Structure({ "obj_type": new abap.types.Character(4, {}), "obj_name": new abap.types.Character(40, {}), "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-PATH"}), "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_RESULT-FILENAME"}), "package": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}), "match": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "lstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "rstate": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_git_definitions=>ty_item_state"}), "packmove": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}), "srcsystem": new abap.types.Character(5, {}), "origlang": new abap.types.Character(1, {})}, "zif_abapgit_definitions=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["PATH","FILENAME"]},"secondary":[]}, "zif_abapgit_definitions=>ty_results_ts_path")}, "zif_abapgit_definitions=>ty_stage_files", undefined, {}, {}); let ls_setting = new abap.types.Structure({ "key": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-KEY"}), "value": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_BACKGROUND=>TY_SETTINGS-VALUE"})}, "zif_abapgit_background=>ty_settings", undefined, {}, {}); let lv_name = new abap.types.String({qualifiedName: "STRING"}); let lv_email = new abap.types.String({qualifiedName: "STRING"}); this.mi_log.set(ii_log); ls_files.set((await (await abap.Classes['ZCL_ABAPGIT_STAGE_LOGIC'].get_stage_logic()).get().zif_abapgit_stage_logic$get({ii_repo_online: ii_repo_online}))); if (abap.compare.eq(abap.builtin.lines({val: ls_files.get().local}), abap.IntegerFactory.get(0)) && abap.compare.eq(abap.builtin.lines({val: ls_files.get().remote}), abap.IntegerFactory.get(0))) { await ii_log.get().zif_abapgit_log$add_info({iv_msg: abap.CharacterFactory.get(16, 'Nothing to stage')}); return; } abap.statements.readTable(it_settings,{into: ls_setting, withKey: (i) => {return abap.compare.eq(i.key, zcl_abapgit_background_push_fi.c_settings.get().name);}, withKeyValue: [{key: (i) => {return i.key}, value: zcl_abapgit_background_push_fi.c_settings.get().name}], usesTableLine: false, withKeySimple: {"key": zcl_abapgit_background_push_fi.c_settings.get().name}}); lv_name.set(ls_setting.get().value); abap.statements.readTable(it_settings,{into: ls_setting, withKey: (i) => {return abap.compare.eq(i.key, zcl_abapgit_background_push_fi.c_settings.get().email);}, withKeyValue: [{key: (i) => {return i.key}, value: zcl_abapgit_background_push_fi.c_settings.get().email}], usesTableLine: false, withKeySimple: {"key": zcl_abapgit_background_push_fi.c_settings.get().email}}); lv_email.set(ls_setting.get().value); await this.push_fixed({ii_repo_online: ii_repo_online, iv_name: lv_name, iv_email: lv_email}); } } abap.Classes['ZCL_ABAPGIT_BACKGROUND_PUSH_FI'] = zcl_abapgit_background_push_fi; zcl_abapgit_background_push_fi.c_settings = new abap.types.Structure({ "name": new abap.types.String({qualifiedName: "STRING"}), "email": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {}); zcl_abapgit_background_push_fi.c_settings.get().name.set('NAME'); zcl_abapgit_background_push_fi.c_settings.get().email.set('EMAIL'); export {zcl_abapgit_background_push_fi}; |