@organizaone/o1-code 0.9.0 → 0.10.4

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 (354) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +34 -7
  2. package/bundled/qc-helper/docs/features/commands.md +4 -4
  3. package/chunks/{MaxSizedBox-YRO4IP7D.js → MaxSizedBox-VHZXGVLW.js} +46 -45
  4. package/chunks/{StandaloneSessionPicker-HM6FRRNB.js → StandaloneSessionPicker-3EROWATU.js} +62 -61
  5. package/chunks/{acp-subagent-executor-GKUWPZ3X.js → acp-subagent-executor-GWQKAEPB.js} +47 -46
  6. package/chunks/{acpAgent-NM2GJZPA.js → acpAgent-AL6KTCSY.js} +94 -93
  7. package/chunks/{agent-VI6IBJKP.js → agent-RU7E6G34.js} +32 -31
  8. package/chunks/{agent-headless-RG2RANBY.js → agent-headless-M4PN25BD.js} +32 -31
  9. package/chunks/{anthropicContentGenerator-OUXKGYR3.js → anthropicContentGenerator-6TKL2GXG.js} +8 -8
  10. package/chunks/{bridge-ASDRIBGU.js → bridge-SEYIHH6G.js} +47 -46
  11. package/chunks/{build-HLEIVF4Y.js → build-QRER4J4E.js} +2 -1
  12. package/chunks/{bwrap-execution-QFG5RQSP.js → bwrap-execution-UZAMPG6F.js} +3 -3
  13. package/chunks/{chunk-KAW6TQNC.js → chunk-2VE7AXYY.js} +11 -11
  14. package/chunks/{chunk-CMZHL55Y.js → chunk-3KUQCZUE.js} +2 -2
  15. package/chunks/{chunk-LBT6PT4Z.js → chunk-3PVG3FQN.js} +7 -7
  16. package/chunks/{chunk-3T5ZVERP.js → chunk-43427ZT3.js} +1 -1
  17. package/chunks/{chunk-OBPGYMIV.js → chunk-4ESI3MQ5.js} +43 -22
  18. package/chunks/{chunk-PCCUFQHX.js → chunk-4EYPKVHD.js} +5 -5
  19. package/chunks/{chunk-ZFZB6WC5.js → chunk-4LCUE7BN.js} +3 -198
  20. package/chunks/{chunk-XJPQ7YBB.js → chunk-4XS46ASJ.js} +2 -2
  21. package/chunks/{chunk-CVAGYXMP.js → chunk-545ROI6V.js} +1 -1
  22. package/chunks/{chunk-UKUAUI76.js → chunk-5CB4U6DS.js} +2 -2
  23. package/chunks/{chunk-JVFO6PPS.js → chunk-5E373J3N.js} +1 -1
  24. package/chunks/{chunk-Q7ZF32SN.js → chunk-5Y44KHOU.js} +1 -1
  25. package/chunks/{chunk-GLKPKVRO.js → chunk-67LZSGOU.js} +1 -1
  26. package/chunks/{chunk-YBIK7JBH.js → chunk-6NXC4BI5.js} +3 -3
  27. package/chunks/{chunk-K5SPVYI4.js → chunk-7DQWDZUQ.js} +1 -1
  28. package/chunks/{chunk-LU2Z7WRX.js → chunk-7GSPYBET.js} +1 -1
  29. package/chunks/{chunk-GNUA6XPQ.js → chunk-7H3GWNGJ.js} +1 -1
  30. package/chunks/{chunk-YB735VNN.js → chunk-7JG3HELJ.js} +4 -4
  31. package/chunks/{chunk-TCME6IG6.js → chunk-7LFCBMVX.js} +1 -1
  32. package/chunks/{chunk-ZQPD7WDS.js → chunk-7M4NSLWM.js} +2 -2
  33. package/chunks/{chunk-2TURUYOS.js → chunk-7ODOX4UM.js} +2 -1
  34. package/chunks/{chunk-BMWNSOKM.js → chunk-7PYXIRCE.js} +2 -2
  35. package/chunks/{chunk-WUKHAI4J.js → chunk-7USF7X6U.js} +1 -1
  36. package/chunks/{chunk-L6HTWOTF.js → chunk-ADBL3IRA.js} +5 -5
  37. package/chunks/{chunk-CPQGFFDW.js → chunk-AGMYBSIU.js} +8 -5
  38. package/chunks/{chunk-U2A23HJU.js → chunk-AIGLVHBV.js} +3 -3
  39. package/chunks/{chunk-ZHTRFFVQ.js → chunk-ALIO4STD.js} +1 -1
  40. package/chunks/{chunk-ZXMW3YT5.js → chunk-BAGPD67C.js} +1 -1
  41. package/chunks/{chunk-RZQASTZP.js → chunk-BEI5P3M7.js} +7 -7
  42. package/chunks/{chunk-7QFVAEBE.js → chunk-BKKZR7X4.js} +2 -2
  43. package/chunks/{chunk-CS7C2L7J.js → chunk-CF5SF4G5.js} +6 -6
  44. package/chunks/{chunk-SYR2YWGQ.js → chunk-CKKPLKIP.js} +1 -1
  45. package/chunks/{chunk-ZT4BSBY4.js → chunk-CNOWGY7D.js} +6 -6
  46. package/chunks/{chunk-6CNTKWVU.js → chunk-CPWPD6SR.js} +5 -5
  47. package/chunks/{chunk-JVJT5UI7.js → chunk-CS4CELQI.js} +2 -2
  48. package/chunks/{chunk-WWRYYBOB.js → chunk-DHPOSTBT.js} +24 -5
  49. package/chunks/{chunk-PL7VG3H5.js → chunk-DVJZ2C55.js} +2 -2
  50. package/chunks/{chunk-6TWJYLJE.js → chunk-DVRWYOU6.js} +1 -1
  51. package/chunks/{chunk-FIIOIJX6.js → chunk-EHYUNTVE.js} +7 -7
  52. package/chunks/{chunk-TQI6ULGQ.js → chunk-ER3EHNTV.js} +1 -1
  53. package/chunks/{chunk-GTNYSOQ2.js → chunk-EZCJ26MU.js} +4 -4
  54. package/chunks/{chunk-Z32ZO4N2.js → chunk-FHXZKNON.js} +2 -2
  55. package/chunks/{chunk-SB7HLYND.js → chunk-FII3ST7W.js} +3 -3
  56. package/chunks/{chunk-QDZTSZTF.js → chunk-FJHDFJVI.js} +1 -1
  57. package/chunks/{chunk-R4FAETL7.js → chunk-GGUL6GZ5.js} +1 -1
  58. package/chunks/{chunk-JGEPZYTM.js → chunk-H2DCMLIK.js} +4 -4
  59. package/chunks/{chunk-CLYICZHJ.js → chunk-H75LW27M.js} +4 -4
  60. package/chunks/{chunk-QP3UCTAH.js → chunk-H7LYSOSQ.js} +1 -1
  61. package/chunks/{chunk-POHJY7RJ.js → chunk-HCE5HUQG.js} +1 -1
  62. package/chunks/{chunk-CK53F45C.js → chunk-HD3KYIZP.js} +3 -3
  63. package/chunks/{chunk-PLWOHBC7.js → chunk-HDGYCLNB.js} +1 -1
  64. package/chunks/{chunk-ZEVIKHNQ.js → chunk-HDVJIXPT.js} +3 -3
  65. package/chunks/{chunk-SRJTWTB2.js → chunk-HFXEXI4S.js} +49 -40
  66. package/chunks/{chunk-LTQLCF23.js → chunk-HOLP2BCW.js} +1 -1
  67. package/chunks/{chunk-DEULKIEJ.js → chunk-HWIVKRK4.js} +1 -1
  68. package/chunks/{chunk-YLMKYLNH.js → chunk-IK7Y64IL.js} +2 -2
  69. package/chunks/{chunk-V23Q4GBY.js → chunk-J5UW3SF4.js} +1 -1
  70. package/chunks/{chunk-DZPGLX7M.js → chunk-JQPMOOCH.js} +1 -1
  71. package/chunks/{chunk-LIM5RBA5.js → chunk-KGDJZNQC.js} +3 -3
  72. package/chunks/{chunk-656G544G.js → chunk-KMTAGPIN.js} +2 -2
  73. package/chunks/{chunk-IPTVBAQ5.js → chunk-KPRPJMSP.js} +1 -1
  74. package/chunks/{chunk-J2OKRT7N.js → chunk-L4XP2BXW.js} +13 -13
  75. package/chunks/{chunk-RCVRWBNS.js → chunk-LIAMHIGS.js} +2 -2
  76. package/chunks/{chunk-VCKGH2UF.js → chunk-ME5CDTOQ.js} +3 -3
  77. package/chunks/{chunk-NGE3GHMN.js → chunk-MWFHMYVA.js} +1 -1
  78. package/chunks/{chunk-SVMEPMAZ.js → chunk-N5MLNIET.js} +44 -44
  79. package/chunks/{chunk-XKOGHPWS.js → chunk-N7NBYHMJ.js} +1 -1
  80. package/chunks/{chunk-HFW4YMBT.js → chunk-NAKKROMI.js} +2 -2
  81. package/chunks/{chunk-3HBUBIMD.js → chunk-NDK2PD5Y.js} +1 -1
  82. package/chunks/{chunk-2R42INUX.js → chunk-NHRB3THC.js} +2 -2
  83. package/chunks/{chunk-L66MHJW7.js → chunk-NKHM3QSK.js} +5 -5
  84. package/chunks/{chunk-CWSGGQLH.js → chunk-NSH5JHZH.js} +1 -1
  85. package/chunks/{chunk-D4GF3Z3J.js → chunk-OCTSNICG.js} +2 -2
  86. package/chunks/{chunk-4FEIAOCC.js → chunk-ODYKSVON.js} +1 -1
  87. package/chunks/{chunk-NGPEFWU4.js → chunk-OJSW65PQ.js} +1 -1
  88. package/chunks/{chunk-IUHFMWMV.js → chunk-OVTUMTW6.js} +4 -4
  89. package/chunks/{chunk-LQELD265.js → chunk-P35MCCDH.js} +2 -2
  90. package/chunks/{chunk-QBCC6DDB.js → chunk-PF7G5TYG.js} +17 -17
  91. package/chunks/{chunk-QG6AA2EE.js → chunk-PYIWZPBY.js} +6 -6
  92. package/chunks/{chunk-YQP3ETMA.js → chunk-QATTWMLJ.js} +8 -8
  93. package/chunks/{chunk-FZUEC7ES.js → chunk-QCONHGJR.js} +1 -1
  94. package/chunks/{chunk-UUPZUWG5.js → chunk-QFPNGX7U.js} +1 -1
  95. package/chunks/{chunk-KM2K4ERE.js → chunk-QLP5B3HQ.js} +1 -1
  96. package/chunks/{chunk-G2I75T4C.js → chunk-QYUMJTBP.js} +2 -2
  97. package/chunks/{chunk-DVDWT5I5.js → chunk-R7SPXY4A.js} +1 -1
  98. package/chunks/{chunk-KDS2IANW.js → chunk-RCBGIDZU.js} +1 -1
  99. package/chunks/chunk-RIN7SNJN.js +212 -0
  100. package/chunks/{chunk-KAF4RHGK.js → chunk-RJUVWCC5.js} +1 -1
  101. package/chunks/{chunk-OZ2OT5BC.js → chunk-RMWEXCAN.js} +3 -3
  102. package/chunks/{chunk-SX5AXFZV.js → chunk-RUPTHAC7.js} +3 -3
  103. package/chunks/{chunk-EIPBVTYB.js → chunk-RX5J7HHZ.js} +2 -2
  104. package/chunks/{chunk-QLXCD56R.js → chunk-SKU7JRIS.js} +2 -2
  105. package/chunks/{chunk-GKCZEQC7.js → chunk-SOWXEFJH.js} +489 -240
  106. package/chunks/{chunk-7QM44EGU.js → chunk-SPLQKNEP.js} +1 -1
  107. package/chunks/{chunk-2S3QOYP4.js → chunk-SWJZH7BK.js} +6 -6
  108. package/chunks/{chunk-W3T7KUBS.js → chunk-T7M2HD7D.js} +1 -1
  109. package/chunks/{chunk-R5ILEKY4.js → chunk-TAFMMFLK.js} +3 -3
  110. package/chunks/{chunk-OU5QAYET.js → chunk-TBSUV4QV.js} +2 -2
  111. package/chunks/{chunk-3LIB2FAU.js → chunk-TI76PXY3.js} +3 -3
  112. package/chunks/{chunk-F477I5JN.js → chunk-TUTCCLI7.js} +3 -3
  113. package/chunks/{chunk-IBPY5AJI.js → chunk-U5KZBWKF.js} +4 -397
  114. package/chunks/{chunk-7UK4SIHI.js → chunk-UFXAWOXR.js} +1 -1
  115. package/chunks/{chunk-OOLEXGWB.js → chunk-UX6ZDNDO.js} +2 -2
  116. package/chunks/{chunk-XLMO7VIH.js → chunk-V7NIAOMT.js} +5 -5
  117. package/chunks/{chunk-MFSMNYXY.js → chunk-VCNQFVKJ.js} +9 -9
  118. package/chunks/{chunk-MUX4EKXE.js → chunk-VHIYZGUD.js} +2 -2
  119. package/chunks/{chunk-SQX3PXHY.js → chunk-VIAJ74X3.js} +2 -2
  120. package/chunks/{chunk-33RS64W5.js → chunk-VLALIFPR.js} +13 -13
  121. package/chunks/{chunk-N335XRGH.js → chunk-VOETOZWN.js} +1 -1
  122. package/chunks/{chunk-ELVKWFRK.js → chunk-VVF2QVSN.js} +2 -2
  123. package/chunks/{chunk-XAVVXBNC.js → chunk-VVRQLG57.js} +1 -1
  124. package/chunks/{chunk-UFUFCLDL.js → chunk-W2SFVYBK.js} +7 -7
  125. package/chunks/{chunk-AC75ZC3R.js → chunk-WCWPITU4.js} +2 -2
  126. package/chunks/{chunk-YNFJLMGL.js → chunk-WQBWL6YE.js} +10 -10
  127. package/chunks/{chunk-LQWYK66V.js → chunk-WS3L2RKL.js} +5 -5
  128. package/chunks/{chunk-FRRKENS6.js → chunk-WUP5273H.js} +3 -3
  129. package/chunks/{chunk-4IDJJ4KI.js → chunk-WWNTQFH7.js} +2 -2
  130. package/chunks/{chunk-HLWXBJCH.js → chunk-WZCKDUBO.js} +131 -15
  131. package/chunks/{chunk-Y37FNMS7.js → chunk-X427DWFD.js} +1 -1
  132. package/chunks/{chunk-35RKSP4A.js → chunk-XHYWPHWN.js} +1 -1
  133. package/chunks/{chunk-OMJU4YIQ.js → chunk-XOVXSDNN.js} +1 -1
  134. package/chunks/{chunk-W5NM2DOQ.js → chunk-XRY6XLJD.js} +16 -0
  135. package/chunks/{chunk-Q2SEZDMU.js → chunk-Y6AFQKTE.js} +3 -3
  136. package/chunks/{chunk-HQ5DN5W7.js → chunk-Y75AMWDB.js} +1 -1
  137. package/chunks/{chunk-RQ2LQ5RB.js → chunk-YHWOPL2T.js} +100 -29
  138. package/chunks/{chunk-3ODGANQH.js → chunk-YXR7EEJO.js} +2 -2
  139. package/chunks/{chunk-XCO4NKA5.js → chunk-ZDBDDHSP.js} +1 -1
  140. package/chunks/{chunk-5W2RZUTF.js → chunk-ZHMOCPV6.js} +3 -3
  141. package/chunks/{chunk-EQQUC6HX.js → chunk-ZSP6FDZ2.js} +5 -5
  142. package/chunks/{codex-subagent-executor-RHTAEFXD.js → codex-subagent-executor-UGS4BKXM.js} +47 -46
  143. package/chunks/{container-execution-environment-PO7I26HR.js → container-execution-environment-INYC74GN.js} +1 -1
  144. package/chunks/{contextCommand-CQFH75BZ.js → contextCommand-ADTFEKEK.js} +46 -45
  145. package/chunks/{core-runtime-5SGS3SVD.js → core-runtime-QIWPENIC.js} +44 -43
  146. package/chunks/{create-sub-session-G7VWSOXC.js → create-sub-session-IU3OMOYV.js} +45 -44
  147. package/chunks/{daemon-git-worktree-guard-IUFLX2O4.js → daemon-git-worktree-guard-BLBIBY4P.js} +44 -43
  148. package/chunks/{daemon-status-provider-6ZTLYNNK.js → daemon-status-provider-QQYQA54F.js} +53 -52
  149. package/chunks/{daemon-trust-policy-254OGOCS.js → daemon-trust-policy-RL42K32W.js} +50 -49
  150. package/chunks/{daemon-trust-policy-monitor-LGXXCQEP.js → daemon-trust-policy-monitor-W6A2KI3R.js} +50 -49
  151. package/chunks/{deferred-core-runtime-7OORZHNH.js → deferred-core-runtime-7IMZJYKO.js} +44 -43
  152. package/chunks/dist-ID6B4BSH.js +3901 -0
  153. package/chunks/{edit-V46XHSY7.js → edit-XEHFRLTK.js} +34 -33
  154. package/chunks/{en-VJBVNTY4.js → en-2EMGSVEU.js} +100 -0
  155. package/chunks/{enter-worktree-53CUMISV.js → enter-worktree-A2WD27HQ.js} +4 -4
  156. package/chunks/{enterPlanMode-ZPTXYQMB.js → enterPlanMode-TJNAVH6W.js} +32 -31
  157. package/chunks/{environment-4JNOLQYX.js → environment-EINU6SZC.js} +46 -45
  158. package/chunks/{errors-XFCASXKU.js → errors-2IFCUYY5.js} +46 -45
  159. package/chunks/{execution-sandbox-config-7UDTKDKF.js → execution-sandbox-config-YE2XOT56.js} +4 -4
  160. package/chunks/{execution-tool-45FRLDNU.js → execution-tool-SZ4AURPN.js} +34 -33
  161. package/chunks/{execution-worker-YUQGSB2E.js → execution-worker-WHSC3ZGX.js} +39 -38
  162. package/chunks/{exit-worktree-CZUYCPZ3.js → exit-worktree-S7KUQ4HO.js} +4 -4
  163. package/chunks/{exitPlanMode-IVJH3OXX.js → exitPlanMode-PAZMVUS6.js} +32 -31
  164. package/chunks/{fast-path-XN7NK4CH.js → fast-path-W6DEVJVB.js} +2 -2
  165. package/chunks/{glob-NHZYR52J.js → glob-WJQOKIRP.js} +33 -32
  166. package/chunks/{goal-tools-GKFYH6GK.js → goal-tools-CDMDPDOI.js} +32 -31
  167. package/chunks/{grep-ENZEP6KL.js → grep-VO76ZOXG.js} +4 -4
  168. package/chunks/{handleAutoUpdate-SLCHZHWT.js → handleAutoUpdate-JRPITHAS.js} +48 -47
  169. package/chunks/{i18n-4AFHUMG2.js → i18n-4PMXKRMM.js} +45 -44
  170. package/chunks/{image-gen-72F4XQEU.js → image-gen-GRJ73O3N.js} +6 -6
  171. package/chunks/{initializer-CDFNNZPN.js → initializer-NHTBAZUN.js} +50 -49
  172. package/chunks/{installationInfo-WUQTTZHB.js → installationInfo-OTUBAVXR.js} +44 -43
  173. package/chunks/{list-K2EIWBPE.js → list-OIRYDK5J.js} +52 -51
  174. package/chunks/{llm-TLNZYLXJ.js → llm-CWNQ7Z4U.js} +81 -80
  175. package/chunks/{llm-content-generator-OXL4S7KY.js → llm-content-generator-5662XHRK.js} +4 -4
  176. package/chunks/{loadedSettingsAdapter-AUILEI5N.js → loadedSettingsAdapter-E7AA2YEL.js} +50 -49
  177. package/chunks/{local-execution-environment-OSK4IEYP.js → local-execution-environment-HRGLGYYE.js} +39 -38
  178. package/chunks/{loggingContentGenerator-FINQP2Y4.js → loggingContentGenerator-S434PEH5.js} +33 -32
  179. package/chunks/{managed-npm-update-5DFVQ475.js → managed-npm-update-OLKKN32W.js} +44 -43
  180. package/chunks/{mcp-ZFQGAZRK.js → mcp-HHJNHR4Y.js} +50 -49
  181. package/chunks/{model-call-collection-3WVMJQ5M.js → model-call-collection-CQDJ77VA.js} +1 -1
  182. package/chunks/{model-configuration-TCLVVCJS.js → model-configuration-K26C67NU.js} +51 -50
  183. package/chunks/{modelConfigUtils-LNDNXLJV.js → modelConfigUtils-OME5BXU4.js} +46 -45
  184. package/chunks/{monitor-DVKR4R64.js → monitor-YAWMJU7P.js} +32 -31
  185. package/chunks/{nonInteractiveCli-JNH7PLWY.js → nonInteractiveCli-MPZIO64Q.js} +84 -83
  186. package/chunks/{nonInteractiveToolExecutor-L2K4LU2P.js → nonInteractiveToolExecutor-AIM44M2P.js} +33 -32
  187. package/chunks/{notebook-edit-LLJZI52V.js → notebook-edit-FTYD3OR2.js} +33 -32
  188. package/chunks/{omni-4T23JD65.js → omni-RULYOVJP.js} +14 -14
  189. package/chunks/{openaiContentGenerator-Y5AW2S3K.js → openaiContentGenerator-HYNXDAHQ.js} +11 -11
  190. package/chunks/{openaiResponsesContentGenerator-VHLQZH36.js → openaiResponsesContentGenerator-TK2Y64AP.js} +5 -5
  191. package/chunks/{processUtils-OGQTTYVO.js → processUtils-VKDQXNAC.js} +2 -2
  192. package/chunks/{prompt-terminal-ledger-M23SMYZS.js → prompt-terminal-ledger-BAOIS32T.js} +45 -44
  193. package/chunks/{proper-lockfile-YMJYGVGR.js → proper-lockfile-IRPL2CNM.js} +2 -1
  194. package/chunks/{pt-7ZZUXID3.js → pt-BM6ETOUU.js} +281 -4
  195. package/chunks/{reactive-degrade-CQ7ALF7Z.js → reactive-degrade-L6W5KNGV.js} +9 -9
  196. package/chunks/{read-file-TGXV7LRJ.js → read-file-G4G5LOGO.js} +4 -4
  197. package/chunks/{read-package-up-BNFTU7FA.js → read-package-up-MAONTKXW.js} +1 -1
  198. package/chunks/{record-source-PHBQTGL4.js → record-source-ANENC5K7.js} +3 -3
  199. package/chunks/{request-shutdown-OMWHNC3R.js → request-shutdown-LRWCJOEG.js} +2 -2
  200. package/chunks/{resumeHistoryUtils-5UTZ2RZE.js → resumeHistoryUtils-ECDR2CS2.js} +49 -48
  201. package/chunks/{ripGrep-MJXCIT62.js → ripGrep-2MEBBDSU.js} +8 -8
  202. package/chunks/{run-o1-code-serve-NFPIVOYJ.js → run-o1-code-serve-PH2GYSP2.js} +37 -36
  203. package/chunks/{runtime-shell-policy-QXWSET5W.js → runtime-shell-policy-Y3TGAQLT.js} +1 -1
  204. package/chunks/{sandboxConfig-UOAIYSNY.js → sandboxConfig-ZA5EE5YP.js} +46 -45
  205. package/chunks/{scheduled-tasks-4MX5JTOU.js → scheduled-tasks-MU2VVZZA.js} +50 -49
  206. package/chunks/{scheduler-ZZCLKFWM.js → scheduler-3GBVAF3D.js} +46 -45
  207. package/chunks/{sdk-exporters-grpc-Q2GND2QR.js → sdk-exporters-grpc-J2ILXEUS.js} +377 -127
  208. package/chunks/{sdk-exporters-http-ALEY7IPF.js → sdk-exporters-http-HGBOA62S.js} +1 -1
  209. package/chunks/{sdk-impl-CFBASVEM.js → sdk-impl-G2NWB5MF.js} +4 -4
  210. package/chunks/{send-message-NATKTKQZ.js → send-message-QOWWQKZJ.js} +2 -2
  211. package/chunks/{serve-DGO6JMBA.js → serve-2AICGZTS.js} +50 -49
  212. package/chunks/{server-N6BPWDPD.js → server-2TVKATWR.js} +92 -84
  213. package/chunks/{session-4YPHCRFC.js → session-NQKO6WQB.js} +85 -84
  214. package/chunks/{session-attachments-root-RSL2YSFZ.js → session-attachments-root-SSB5ARJJ.js} +44 -43
  215. package/chunks/{session-pr-refresh-RPM3VLUQ.js → session-pr-refresh-YMET6WC7.js} +49 -48
  216. package/chunks/{settings-GSPRMMOT.js → settings-L3QP6XRJ.js} +49 -48
  217. package/chunks/{shell-HWIE3YJY.js → shell-BUXOKE4X.js} +32 -31
  218. package/chunks/{skill-PAU4TRSD.js → skill-Y4TKTJS7.js} +8 -7
  219. package/chunks/{skill-settings-UFOTSN37.js → skill-settings-MRFNTHGU.js} +50 -49
  220. package/chunks/{spawnChannel-7IQPYOPP.js → spawnChannel-6YZABREF.js} +46 -45
  221. package/chunks/{standalone-update-U7HGJB2O.js → standalone-update-NPL3226O.js} +47 -46
  222. package/chunks/{startInteractiveUI-N7XQZNFX.js → startInteractiveUI-SK5FABV5.js} +4059 -3183
  223. package/chunks/{task-create-A3FAT34J.js → task-create-2BHPJUF3.js} +6 -5
  224. package/chunks/{task-list-FGRDSMJZ.js → task-list-6LPOL5UB.js} +3 -2
  225. package/chunks/{task-update-BE27HYCU.js → task-update-NGKKBFU5.js} +6 -5
  226. package/chunks/{team-create-4QRHJTSV.js → team-create-2M2ZEJK3.js} +32 -31
  227. package/chunks/{team-delete-6T2NMHDV.js → team-delete-WBSKRFVF.js} +3 -2
  228. package/chunks/{team-plan-approval-U6QCZ3I7.js → team-plan-approval-AHSBAARB.js} +32 -31
  229. package/chunks/{terminal-image-renderer-QRYTSBBI.js → terminal-image-renderer-6DD2LV7J.js} +44 -43
  230. package/chunks/{theme-manager-VFNWDS5X.js → theme-manager-IDMOY52V.js} +44 -43
  231. package/chunks/{tool-call-7HZFNB7J.js → tool-call-GVZHLCX6.js} +3 -3
  232. package/chunks/{tool-result-media-NLHN7JZU.js → tool-result-media-5BM7EQS2.js} +14 -14
  233. package/chunks/{tool-search-QGTV2ON5.js → tool-search-MCB74V2Z.js} +6 -6
  234. package/chunks/{total-session-admission-PUJHR6FR.js → total-session-admission-65EGYQPO.js} +47 -46
  235. package/chunks/{trustedFolders-CLVE6DRI.js → trustedFolders-B2SE4YQI.js} +45 -44
  236. package/chunks/{undici-5EUQ6VID.js → undici-I7LHD7IT.js} +457 -166
  237. package/chunks/{update-relaunch-IPSN33OR.js → update-relaunch-BI3KOPOU.js} +5 -5
  238. package/chunks/{updateCheck-REWSU2AC.js → updateCheck-KVUQB3UY.js} +47 -46
  239. package/chunks/{upload-config-W3AEV3WP.js → upload-config-EALPYJRO.js} +7 -7
  240. package/chunks/{useAutoAcceptIndicator-2JODXT2R.js → useAutoAcceptIndicator-Z2DHJUGG.js} +53 -52
  241. package/chunks/{validateNonInterActiveAuth-P5P5SI6T.js → validateNonInterActiveAuth-6TSH6F5D.js} +81 -80
  242. package/chunks/{version-KCTVVQ6T.js → version-T3ODOQJ3.js} +2 -2
  243. package/chunks/{web-fetch-3Z32TKL7.js → web-fetch-B4MFZK5W.js} +8 -8
  244. package/chunks/{web-search-T7R5BOOJ.js → web-search-R3JBN6A5.js} +11 -11
  245. package/chunks/{web-shell-static-3BG3MTI5.js → web-shell-static-OOIIII74.js} +2 -2
  246. package/chunks/{workflow-XFMT6MFA.js → workflow-WUNSCM5D.js} +33 -32
  247. package/chunks/{workspace-providers-status-E2DKABEG.js → workspace-providers-status-LSYGM3QX.js} +56 -55
  248. package/chunks/{workspace-registration-store-FWU3W65M.js → workspace-registration-store-XF5KJWQP.js} +3 -2
  249. package/chunks/{workspace-registry-EX6Q35BY.js → workspace-registry-JPCXXXJR.js} +47 -46
  250. package/chunks/{workspace-runtime-coordinator-RIA3VIAY.js → workspace-runtime-coordinator-VEVP44OL.js} +48 -47
  251. package/chunks/{workspace-service-DDCBDEWZ.js → workspace-service-VCWHIBVD.js} +55 -54
  252. package/chunks/{workspace-skills-status-B4J7CHRJ.js → workspace-skills-status-TVSCRWXV.js} +53 -52
  253. package/chunks/{workspace-trust-reconciler-HMJYGYMS.js → workspace-trust-reconciler-FP7NYY7Z.js} +53 -52
  254. package/chunks/{write-file-HVNSGPXF.js → write-file-6FNRAYPO.js} +34 -33
  255. package/chunks/{zoom-image-WLBUTVWK.js → zoom-image-UOWJTYWI.js} +4 -4
  256. package/cli.js +12 -12
  257. package/execution-worker.js +1 -1
  258. package/export-transcript-document.css +1 -1
  259. package/export-transcript-document.js +3 -3
  260. package/locales/en.js +108 -0
  261. package/locales/pt.js +378 -4
  262. package/package.json +3 -3
  263. package/release-notes.json +21 -0
  264. package/web-shell/assets/{abnfDiagram-VCTEODGH-x0S71JE3.js → abnfDiagram-VCTEODGH-hPR_hq_-.js} +1 -1
  265. package/web-shell/assets/{arc-Cz75q_IV.js → arc-DBIKDXMV.js} +1 -1
  266. package/web-shell/assets/architectureDiagram-5GKGNRK7-DF6ToCyK.js +36 -0
  267. package/web-shell/assets/{blockDiagram-NRAW4CY4-Vs4QVgsM.js → blockDiagram-NRAW4CY4-D-3ZOodq.js} +3 -3
  268. package/web-shell/assets/c4Diagram-UCG6FXSJ-Dlgo5UYL.js +38 -0
  269. package/web-shell/assets/channel-aWi28RPH.js +1 -0
  270. package/web-shell/assets/{chunk-2Q5K7J3B-6wq4aY1J.js → chunk-2Q5K7J3B-BupVKi2M.js} +1 -1
  271. package/web-shell/assets/{chunk-5VM5RSS4-Bo9m0SiQ.js → chunk-5VM5RSS4-I7UXEM7J.js} +1 -1
  272. package/web-shell/assets/chunk-F27PBJKO-HQNLQQK-.js +1 -0
  273. package/web-shell/assets/chunk-G27WJ6UU-1o4xDSX9.js +231 -0
  274. package/web-shell/assets/{chunk-JWPE2WC7-DT5_JHb_.js → chunk-JWPE2WC7-AkJIcBLE.js} +1 -1
  275. package/web-shell/assets/chunk-LCL6LL3I-nfbDS7iE.js +206 -0
  276. package/web-shell/assets/{chunk-POPQ4Y6H-CryAaWS9.js → chunk-POPQ4Y6H-DtEE_OdH.js} +1 -1
  277. package/web-shell/assets/{chunk-SVP7TREG-D0mJDzI7.js → chunk-SVP7TREG-Cj9Lw3Gx.js} +1 -1
  278. package/web-shell/assets/{chunk-XXDRQBXY-C5ffwsCM.js → chunk-XXDRQBXY-CUDuWpdQ.js} +1 -1
  279. package/web-shell/assets/classDiagram-DTDB5LWJ-fHMqSd3A.js +1 -0
  280. package/web-shell/assets/classDiagram-v2-JRS7N3AN-fHMqSd3A.js +1 -0
  281. package/web-shell/assets/cose-bilkent-JH36ORCC-DQx9CBLc.js +1 -0
  282. package/web-shell/assets/{cynefin-OW5HDTMX-BnL4xySG.js → cynefin-OW5HDTMX-B3kEpThT.js} +8 -8
  283. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-C_Vfdoz6.js → cynefinDiagram-5FMLGOSQ-Sv-FRvME.js} +1 -1
  284. package/web-shell/assets/cytoscape.esm-OyMbaexL.js +331 -0
  285. package/web-shell/assets/{dagre-3AP2YEHR-DYpnUd3X.js → dagre-3AP2YEHR-CH_Z8-Kk.js} +1 -1
  286. package/web-shell/assets/{diagram-S7CK7UJ4-Oar04chd.js → diagram-S7CK7UJ4-C0oToNP-.js} +1 -1
  287. package/web-shell/assets/{diagram-UQ7AKVKN-CdWEMvLi.js → diagram-UQ7AKVKN-BrSK_nkR.js} +1 -1
  288. package/web-shell/assets/{diagram-VSXAHHWV-Bir5CZNv.js → diagram-VSXAHHWV-Dqa3JxKx.js} +1 -1
  289. package/web-shell/assets/diagram-VX7I27RA-CMxI_svo.js +24 -0
  290. package/web-shell/assets/{diagram-Z3DM3KII-r1AOVQ0e.js → diagram-Z3DM3KII-ms16iRjT.js} +1 -1
  291. package/web-shell/assets/{ebnfDiagram-PWID7BFC-DevtH3i5.js → ebnfDiagram-PWID7BFC-DlnqAdIV.js} +1 -1
  292. package/web-shell/assets/erDiagram-SSCWMZ5O-DLsbP_rs.js +99 -0
  293. package/web-shell/assets/{flowDiagram-A5DVABFB-DgJ1KxI-.js → flowDiagram-A5DVABFB-CUi1Sjog.js} +4 -4
  294. package/web-shell/assets/ganttDiagram-EL5Y4UJY-CE_JUTUJ.js +292 -0
  295. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-vCX1mSs_.js → gitGraphDiagram-WWUBYQGX-B5AAvDsM.js} +1 -1
  296. package/web-shell/assets/index-70D1m6Hg.js +2276 -0
  297. package/web-shell/assets/{index-BEFE9XEw.js → index-BHiSoADm.js} +1 -1
  298. package/web-shell/assets/index-CL4z8Fsq.js +74 -0
  299. package/web-shell/assets/index-CNsJ4Mpd.css +36 -0
  300. package/web-shell/assets/{infoDiagram-RXCK75RN-_NepfAGI.js → infoDiagram-RXCK75RN-pBmlQkcV.js} +1 -1
  301. package/web-shell/assets/ishikawaDiagram-5VMMS53U-BauoqPoz.js +70 -0
  302. package/web-shell/assets/journeyDiagram-EYS64GPL-2bt-6t-1.js +139 -0
  303. package/web-shell/assets/{kanban-definition-3QL26DDD-BYaNwMqV.js → kanban-definition-3QL26DDD-BxxoBXaj.js} +3 -3
  304. package/web-shell/assets/layout-CHPDwyF0.js +1 -0
  305. package/web-shell/assets/{linear-BEpGEQC7.js → linear-DNvAHeqC.js} +1 -1
  306. package/web-shell/assets/mermaid.core-fypPA9cT.js +312 -0
  307. package/web-shell/assets/{mindmap-definition-FBJOCRG2-Ci7nWQV9.js → mindmap-definition-FBJOCRG2-6QjAwCGs.js} +3 -3
  308. package/web-shell/assets/{pegDiagram-XKGWAZYB-CgNvWMe-.js → pegDiagram-XKGWAZYB-CVntv99C.js} +1 -1
  309. package/web-shell/assets/{pieDiagram-E7YTZNPT-4V5XLQqW.js → pieDiagram-E7YTZNPT-BfhvtHAE.js} +1 -1
  310. package/web-shell/assets/quadrantDiagram-AXDQQJYC-MiVxa2Zt.js +7 -0
  311. package/web-shell/assets/{railroadDiagram-O6MQD6OU-BjXTf6pU.js → railroadDiagram-O6MQD6OU-BwHFJs0H.js} +1 -1
  312. package/web-shell/assets/requirementDiagram-EFPCY7ZU-CEJ6r2cM.js +84 -0
  313. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-D75QSw7n.js → sankeyDiagram-P5KCCOFB-D7uTdG-j.js} +3 -3
  314. package/web-shell/assets/sequenceDiagram-WJ2MYXX4-CyW16H7w.js +162 -0
  315. package/web-shell/assets/{sizeCapture-X5ZJPWSS-fFMG4DvB.js → sizeCapture-X5ZJPWSS-zoBxvlxI.js} +1 -1
  316. package/web-shell/assets/{stateDiagram-HBIQ2CUA-B1p5bjb3.js → stateDiagram-HBIQ2CUA-BceIC-cJ.js} +1 -1
  317. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BsJAvg6i.js +1 -0
  318. package/web-shell/assets/swimlanes-XN3QIQJK-QgaLP8Xo.js +1 -0
  319. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DdMnIIJX.js +8 -0
  320. package/web-shell/assets/timeline-definition-24CTP7MA-pz8DGpLO.js +120 -0
  321. package/web-shell/assets/{vennDiagram-4TSXK5OY-CFmjd4GT.js → vennDiagram-4TSXK5OY-BoMnG3o9.js} +4 -4
  322. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-DXyVTjgN.js → wardleyDiagram-VM6X3IG4-Bkr9hvxi.js} +2 -2
  323. package/web-shell/assets/xychartDiagram-S5SC5T6Z-Ca7YvQrU.js +7 -0
  324. package/web-shell/index.html +2 -2
  325. package/web-shell/sw.js +1 -1
  326. package/chunks/esm-QGHTLT3P.js +0 -5549
  327. package/web-shell/assets/architectureDiagram-5GKGNRK7-C_dL06R0.js +0 -36
  328. package/web-shell/assets/c4Diagram-UCG6FXSJ-CgRK6Jz0.js +0 -38
  329. package/web-shell/assets/channel-pE79vspw.js +0 -1
  330. package/web-shell/assets/chunk-F27PBJKO-C4L0MjFe.js +0 -1
  331. package/web-shell/assets/chunk-G27WJ6UU-BDQDTWF7.js +0 -231
  332. package/web-shell/assets/chunk-LCL6LL3I-1yVri9gU.js +0 -206
  333. package/web-shell/assets/classDiagram-DTDB5LWJ-0QITOU6l.js +0 -1
  334. package/web-shell/assets/classDiagram-v2-JRS7N3AN-0QITOU6l.js +0 -1
  335. package/web-shell/assets/cose-bilkent-JH36ORCC-DHE8Zr-F.js +0 -1
  336. package/web-shell/assets/cytoscape.esm-DJK6lGiH.js +0 -331
  337. package/web-shell/assets/diagram-VX7I27RA-Bm1O69Id.js +0 -24
  338. package/web-shell/assets/erDiagram-SSCWMZ5O-SFNjhQIj.js +0 -99
  339. package/web-shell/assets/ganttDiagram-EL5Y4UJY-oAT0EGwX.js +0 -292
  340. package/web-shell/assets/index-Cqj9WNLr.js +0 -2276
  341. package/web-shell/assets/index-DfyXIq26.css +0 -36
  342. package/web-shell/assets/index-DohPy72Z.js +0 -74
  343. package/web-shell/assets/ishikawaDiagram-5VMMS53U-Bk3wYLfy.js +0 -70
  344. package/web-shell/assets/journeyDiagram-EYS64GPL-DUUHuAKD.js +0 -139
  345. package/web-shell/assets/layout-CH_OWxT7.js +0 -1
  346. package/web-shell/assets/mermaid.core-DhaXOJnx.js +0 -312
  347. package/web-shell/assets/quadrantDiagram-AXDQQJYC-DPdypjO1.js +0 -7
  348. package/web-shell/assets/requirementDiagram-EFPCY7ZU-DJss5V5T.js +0 -84
  349. package/web-shell/assets/sequenceDiagram-WJ2MYXX4-BDhXaEt_.js +0 -162
  350. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-CSbHD2Wn.js +0 -1
  351. package/web-shell/assets/swimlanes-XN3QIQJK-bPx7cEqz.js +0 -1
  352. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DTnMbaNo.js +0 -8
  353. package/web-shell/assets/timeline-definition-24CTP7MA-B3LCneiU.js +0 -120
  354. package/web-shell/assets/xychartDiagram-S5SC5T6Z-y2w_UoEl.js +0 -7
@@ -0,0 +1,3901 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ require_src
5
+ } from "./chunk-XYMF3VVC.js";
6
+ import "./chunk-WPZM4XOT.js";
7
+ import "./chunk-HXBE3LWB.js";
8
+ import {
9
+ init_esbuild_shims
10
+ } from "./chunk-S2467S6L.js";
11
+ import {
12
+ __commonJS,
13
+ __name,
14
+ __require,
15
+ __toESM
16
+ } from "./chunk-J2S4EL5Y.js";
17
+
18
+ // node_modules/@kwsites/file-exists/dist/src/index.js
19
+ var require_src2 = __commonJS({
20
+ "node_modules/@kwsites/file-exists/dist/src/index.js"(exports) {
21
+ "use strict";
22
+ init_esbuild_shims();
23
+ var __importDefault = exports && exports.__importDefault || function(mod) {
24
+ return mod && mod.__esModule ? mod : { "default": mod };
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ var fs_1 = __require("fs");
28
+ var debug_1 = __importDefault(require_src());
29
+ var log = debug_1.default("@kwsites/file-exists");
30
+ function check(path, isFile, isDirectory) {
31
+ log(`checking %s`, path);
32
+ try {
33
+ const stat = fs_1.statSync(path);
34
+ if (stat.isFile() && isFile) {
35
+ log(`[OK] path represents a file`);
36
+ return true;
37
+ }
38
+ if (stat.isDirectory() && isDirectory) {
39
+ log(`[OK] path represents a directory`);
40
+ return true;
41
+ }
42
+ log(`[FAIL] path represents something other than a file or directory`);
43
+ return false;
44
+ } catch (e) {
45
+ if (e.code === "ENOENT") {
46
+ log(`[FAIL] path is not accessible: %o`, e);
47
+ return false;
48
+ }
49
+ log(`[FATAL] %o`, e);
50
+ throw e;
51
+ }
52
+ }
53
+ __name(check, "check");
54
+ function exists(path, type = exports.READABLE) {
55
+ return check(path, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0);
56
+ }
57
+ __name(exists, "exists");
58
+ exports.exists = exists;
59
+ exports.FILE = 1;
60
+ exports.FOLDER = 2;
61
+ exports.READABLE = exports.FILE + exports.FOLDER;
62
+ }
63
+ });
64
+
65
+ // node_modules/@kwsites/file-exists/dist/index.js
66
+ var require_dist = __commonJS({
67
+ "node_modules/@kwsites/file-exists/dist/index.js"(exports) {
68
+ "use strict";
69
+ init_esbuild_shims();
70
+ function __export(m2) {
71
+ for (var p2 in m2) if (!exports.hasOwnProperty(p2)) exports[p2] = m2[p2];
72
+ }
73
+ __name(__export, "__export");
74
+ Object.defineProperty(exports, "__esModule", { value: true });
75
+ __export(require_src2());
76
+ }
77
+ });
78
+
79
+ // node_modules/@kwsites/promise-deferred/dist/index.js
80
+ var require_dist2 = __commonJS({
81
+ "node_modules/@kwsites/promise-deferred/dist/index.js"(exports) {
82
+ "use strict";
83
+ init_esbuild_shims();
84
+ Object.defineProperty(exports, "__esModule", { value: true });
85
+ exports.createDeferred = exports.deferred = void 0;
86
+ function deferred() {
87
+ let done;
88
+ let fail;
89
+ let status = "pending";
90
+ const promise = new Promise((_done, _fail) => {
91
+ done = _done;
92
+ fail = _fail;
93
+ });
94
+ return {
95
+ promise,
96
+ done(result) {
97
+ if (status === "pending") {
98
+ status = "resolved";
99
+ done(result);
100
+ }
101
+ },
102
+ fail(error) {
103
+ if (status === "pending") {
104
+ status = "rejected";
105
+ fail(error);
106
+ }
107
+ },
108
+ get fulfilled() {
109
+ return status !== "pending";
110
+ },
111
+ get status() {
112
+ return status;
113
+ }
114
+ };
115
+ }
116
+ __name(deferred, "deferred");
117
+ exports.deferred = deferred;
118
+ exports.createDeferred = deferred;
119
+ exports.default = deferred;
120
+ }
121
+ });
122
+
123
+ // node_modules/simple-git/dist/index.mjs
124
+ init_esbuild_shims();
125
+
126
+ // node_modules/@simple-git/args-pathspec/dist/index.mjs
127
+ init_esbuild_shims();
128
+ var t = /* @__PURE__ */ new WeakMap();
129
+ function c(...n) {
130
+ const e = new String(n);
131
+ return t.set(e, n), e;
132
+ }
133
+ __name(c, "c");
134
+ function r(n) {
135
+ return n instanceof String && t.has(n);
136
+ }
137
+ __name(r, "r");
138
+ function o(n) {
139
+ return t.get(n) ?? [];
140
+ }
141
+ __name(o, "o");
142
+
143
+ // node_modules/simple-git/dist/index.mjs
144
+ var import_file_exists = __toESM(require_dist(), 1);
145
+ var import_debug = __toESM(require_src(), 1);
146
+ var import_promise_deferred = __toESM(require_dist2(), 1);
147
+ import { spawn as ve } from "node:child_process";
148
+ import { normalize as Se } from "node:path";
149
+
150
+ // node_modules/@simple-git/argv-parser/dist/index.mjs
151
+ init_esbuild_shims();
152
+ function* x(e, n) {
153
+ const t2 = n === "global";
154
+ for (const o2 of e)
155
+ o2.isGlobal === t2 && (yield o2);
156
+ }
157
+ __name(x, "x");
158
+ var P = /* @__PURE__ */ new Set([
159
+ "--add",
160
+ "--edit",
161
+ "--remove-section",
162
+ "--rename-section",
163
+ "--replace-all",
164
+ "--unset",
165
+ "--unset-all",
166
+ "-e"
167
+ ]);
168
+ var S = /* @__PURE__ */ new Set([
169
+ "--get",
170
+ "--get-all",
171
+ "--get-color",
172
+ "--get-colorbool",
173
+ "--get-regexp",
174
+ "--get-urlmatch",
175
+ "--list",
176
+ "-l"
177
+ ]);
178
+ var E = /* @__PURE__ */ new Set([
179
+ "edit",
180
+ "remove-section",
181
+ "rename-section",
182
+ "set",
183
+ "unset"
184
+ ]);
185
+ var F = /* @__PURE__ */ new Set(["get", "get-color", "get-colorbool", "list"]);
186
+ function A(e, n) {
187
+ for (const { name: o2 } of x(e, "task")) {
188
+ if (P.has(o2))
189
+ return w(true, n);
190
+ if (S.has(o2))
191
+ return w(false, n);
192
+ }
193
+ const t2 = n.at(0)?.toLowerCase();
194
+ return t2 === void 0 ? null : E.has(t2) ? w(true, n.slice(1)) : F.has(t2) ? w(false, n.slice(1)) : n.length === 1 ? w(false, n) : w(true, n);
195
+ }
196
+ __name(A, "A");
197
+ function w(e = false, n = []) {
198
+ const t2 = n.at(0)?.toLowerCase();
199
+ return t2 === void 0 ? null : {
200
+ isWrite: e,
201
+ isRead: !e,
202
+ key: t2,
203
+ value: n.at(1)
204
+ };
205
+ }
206
+ __name(w, "w");
207
+ function O(e, n) {
208
+ return n.isWrite && n.value !== void 0 ? { key: n.key, value: n.value, scope: e } : { key: n.key, scope: e };
209
+ }
210
+ __name(O, "O");
211
+ function G(e) {
212
+ const n = e?.indexOf("=") || -1;
213
+ return !e || n < 0 ? null : {
214
+ key: e.slice(0, n).trim().toLowerCase(),
215
+ value: e.slice(n + 1)
216
+ };
217
+ }
218
+ __name(G, "G");
219
+ function M(e) {
220
+ for (const { name: n } of x(e, "task"))
221
+ switch (n) {
222
+ case "--global":
223
+ return "global";
224
+ case "--system":
225
+ return "system";
226
+ case "--worktree":
227
+ return "worktree";
228
+ case "--local":
229
+ return "local";
230
+ case "--file":
231
+ case "-f":
232
+ return "file";
233
+ }
234
+ return "local";
235
+ }
236
+ __name(M, "M");
237
+ function N({ name: e }) {
238
+ if (e === "-c" || e === "--config")
239
+ return "inline";
240
+ if (e === "--config-env")
241
+ return "env";
242
+ }
243
+ __name(N, "N");
244
+ function* $(e) {
245
+ for (const n of e) {
246
+ const t2 = N(n), o2 = t2 && G(n.value);
247
+ o2 && (yield {
248
+ ...o2,
249
+ scope: t2
250
+ });
251
+ }
252
+ }
253
+ __name($, "$");
254
+ function D(e, n, t2) {
255
+ const o2 = {
256
+ read: [],
257
+ write: [...$(n)]
258
+ };
259
+ return e === "config" && L(
260
+ o2,
261
+ M(n),
262
+ A(n, t2)
263
+ ), o2;
264
+ }
265
+ __name(D, "D");
266
+ function L(e, n, t2) {
267
+ if (t2 === null)
268
+ return;
269
+ const o2 = O(n, t2);
270
+ t2.isWrite ? e.write.push(o2) : e.read.push(o2);
271
+ }
272
+ __name(L, "L");
273
+ var C = {
274
+ short: /* @__PURE__ */ new Map([
275
+ ["c", true]
276
+ // -c <k=v> set config key for this invocation
277
+ ])
278
+ };
279
+ var I = {
280
+ short: new Map([
281
+ ["C", true],
282
+ // -C <path> change working directory
283
+ ["P", false],
284
+ // -P no pager (alias for --no-pager)
285
+ ["h", false],
286
+ // -h help
287
+ ["p", false],
288
+ // -p paginate
289
+ ["v", false],
290
+ // -v version
291
+ ...C.short.entries()
292
+ ]),
293
+ long: /* @__PURE__ */ new Set([
294
+ "attr-source",
295
+ "config-env",
296
+ "exec-path",
297
+ "git-dir",
298
+ "list-cmds",
299
+ "namespace",
300
+ "super-prefix",
301
+ "work-tree"
302
+ ])
303
+ };
304
+ var R = {
305
+ clone: {
306
+ short: /* @__PURE__ */ new Map([
307
+ ["b", true],
308
+ // -b <branch>
309
+ ["j", true],
310
+ // -j <n> parallel jobs
311
+ ["l", false],
312
+ // -l local
313
+ ["n", false],
314
+ // -n no-checkout
315
+ ["o", true],
316
+ // -o <name> remote name
317
+ ["q", false],
318
+ // -q quiet
319
+ ["s", false],
320
+ // -s shared
321
+ ["u", true]
322
+ // -u <upload-pack>
323
+ ]),
324
+ long: /* @__PURE__ */ new Set(["branch", "config", "jobs", "origin", "upload-pack", "u", "template"])
325
+ },
326
+ commit: {
327
+ short: /* @__PURE__ */ new Map([
328
+ ["C", true],
329
+ // -C <commit> reuse message
330
+ ["F", true],
331
+ // -F <file> read message from file
332
+ ["c", true],
333
+ // -c <commit> reedit message
334
+ ["m", true],
335
+ // -m <msg>
336
+ ["t", true]
337
+ // -t <template>
338
+ ]),
339
+ long: /* @__PURE__ */ new Set(["file", "message", "reedit-message", "reuse-message", "template"])
340
+ },
341
+ config: {
342
+ short: /* @__PURE__ */ new Map([
343
+ ["e", false],
344
+ // -e open editor
345
+ ["f", true],
346
+ // -f <file>
347
+ ["l", false]
348
+ // -l list
349
+ ]),
350
+ long: /* @__PURE__ */ new Set(["blob", "comment", "default", "file", "type", "value"])
351
+ },
352
+ fetch: {
353
+ short: /* @__PURE__ */ new Map(),
354
+ long: /* @__PURE__ */ new Set(["upload-pack"])
355
+ },
356
+ init: {
357
+ short: /* @__PURE__ */ new Map(),
358
+ long: /* @__PURE__ */ new Set(["template"])
359
+ },
360
+ pull: {
361
+ short: /* @__PURE__ */ new Map(),
362
+ long: /* @__PURE__ */ new Set(["upload-pack"])
363
+ },
364
+ push: {
365
+ short: /* @__PURE__ */ new Map(),
366
+ long: /* @__PURE__ */ new Set(["exec", "receive-pack"])
367
+ },
368
+ rebase: {
369
+ short: /* @__PURE__ */ new Map([
370
+ ["X", true],
371
+ // -X <option> strategy option
372
+ ["f", false],
373
+ // -f force-rebase
374
+ ["i", false],
375
+ // -i interactive
376
+ ["k", false],
377
+ // -k keep-base
378
+ ["m", false],
379
+ // -m merge
380
+ ["n", false],
381
+ // -n no-stat
382
+ ["q", false],
383
+ // -q quiet
384
+ ["r", false],
385
+ // -r rebase-merges
386
+ ["s", true],
387
+ // -s <strategy>
388
+ ["v", false],
389
+ // -v verbose
390
+ ["x", true]
391
+ // -x <cmd> exec
392
+ ]),
393
+ long: /* @__PURE__ */ new Set(["exec", "onto", "strategy", "strategy-option"])
394
+ }
395
+ };
396
+ var T = { short: /* @__PURE__ */ new Map(), long: /* @__PURE__ */ new Set() };
397
+ function B(e) {
398
+ const n = R[e ?? ""] ?? T;
399
+ return {
400
+ short: new Map([...C.short.entries(), ...n.short.entries()]),
401
+ long: n.long
402
+ };
403
+ }
404
+ __name(B, "B");
405
+ function b(e, n = I) {
406
+ if (e.startsWith("--")) {
407
+ const t2 = e.indexOf("=");
408
+ if (t2 > 2)
409
+ return [{ name: e.slice(0, t2), value: e.slice(t2 + 1), needsNext: false }];
410
+ const o2 = e.slice(2);
411
+ return [{ name: e, needsNext: n.long.has(o2) }];
412
+ }
413
+ if (e.length === 2) {
414
+ const t2 = e.charAt(1), o2 = n.short.get(t2);
415
+ return [{ name: e, needsNext: o2 === true }];
416
+ }
417
+ return j(e, n.short);
418
+ }
419
+ __name(b, "b");
420
+ function j(e, n) {
421
+ const t2 = e.slice(1).split(""), o2 = [];
422
+ for (let a = 0; a < t2.length; a++) {
423
+ const s = t2[a], r2 = n.get(s);
424
+ if (r2 === void 0)
425
+ return [{ name: e, needsNext: false }];
426
+ if (r2) {
427
+ const i = t2.slice(a + 1).join("");
428
+ if (i && ![...i].every((m2) => n.has(m2)))
429
+ return o2.push({ name: `-${s}`, value: i, needsNext: false }), o2;
430
+ }
431
+ o2.push({ name: `-${s}`, needsNext: r2 });
432
+ }
433
+ return o2;
434
+ }
435
+ __name(j, "j");
436
+ function W(e, n = []) {
437
+ let t2 = 0;
438
+ for (; t2 < e.length; ) {
439
+ const o2 = String(e[t2]);
440
+ if (!o2.startsWith("-") || o2.length < 2) break;
441
+ const a = b(o2);
442
+ let s = t2 + 1;
443
+ for (const r2 of a) {
444
+ const i = {
445
+ name: r2.name,
446
+ value: r2.value,
447
+ absorbedNext: false,
448
+ isGlobal: true
449
+ };
450
+ r2.needsNext && i.value === void 0 && s < e.length && (i.value = String(e[s]), i.absorbedNext = true, s++), n.push(i);
451
+ }
452
+ t2 = s;
453
+ }
454
+ return { flags: n, taskIndex: t2 };
455
+ }
456
+ __name(W, "W");
457
+ function V(e, n, t2 = []) {
458
+ const o2 = B(n), a = [], s = [];
459
+ let r2 = 0;
460
+ for (; r2 < e.length; ) {
461
+ const i = e[r2];
462
+ if (r(i)) {
463
+ s.push(...o(i)), r2++;
464
+ continue;
465
+ }
466
+ const p2 = String(i);
467
+ if (p2 === "--") {
468
+ for (let d2 = r2 + 1; d2 < e.length; d2++) {
469
+ const g2 = e[d2];
470
+ r(g2) ? s.push(...o(g2)) : s.push(String(g2));
471
+ }
472
+ break;
473
+ }
474
+ if (!p2.startsWith("-") || p2.length < 2) {
475
+ a.push(p2), r2++;
476
+ continue;
477
+ }
478
+ const m2 = b(p2, o2);
479
+ let u2 = r2 + 1;
480
+ for (const d2 of m2) {
481
+ const g2 = {
482
+ name: d2.name,
483
+ value: d2.value,
484
+ absorbedNext: false,
485
+ isGlobal: false
486
+ };
487
+ d2.needsNext && g2.value === void 0 && u2 < e.length && !r(e[u2]) && (g2.value = String(e[u2]), g2.absorbedNext = true, u2++), t2.push(g2);
488
+ }
489
+ r2 = u2;
490
+ }
491
+ return { flags: t2, positionals: a, pathspecs: s };
492
+ }
493
+ __name(V, "V");
494
+ function* q({
495
+ write: e
496
+ }) {
497
+ for (const n of e)
498
+ for (const t2 of K) {
499
+ const o2 = t2(n.key);
500
+ o2 && (yield o2);
501
+ }
502
+ }
503
+ __name(q, "q");
504
+ function f(e, n, t2 = String(e)) {
505
+ const o2 = typeof e == "string" ? new RegExp(`\\s*${e.toLowerCase()}`) : e;
506
+ return function(s) {
507
+ if (o2.test(s))
508
+ return {
509
+ category: n,
510
+ message: `Configuring ${t2} is not permitted without enabling ${n}`
511
+ };
512
+ };
513
+ }
514
+ __name(f, "f");
515
+ function l(e, n) {
516
+ const t2 = new RegExp(`\\s*${e.toLowerCase().replace(/\./g, "(..+)?.")}`);
517
+ return f(t2, n, e);
518
+ }
519
+ __name(l, "l");
520
+ var K = [
521
+ f("alias", "allowUnsafeAlias"),
522
+ f("core.askPass", "allowUnsafeAskPass"),
523
+ f("core.editor", "allowUnsafeEditor"),
524
+ f("core.fsmonitor", "allowUnsafeFsMonitor"),
525
+ f("core.gitProxy", "allowUnsafeGitProxy"),
526
+ f("core.hooksPath", "allowUnsafeHooksPath"),
527
+ f("core.pager", "allowUnsafePager"),
528
+ f("core.sshCommand", "allowUnsafeSshCommand"),
529
+ l("credential.helper", "allowUnsafeCredentialHelper"),
530
+ l("diff.command", "allowUnsafeDiffExternal"),
531
+ f("diff.external", "allowUnsafeDiffExternal"),
532
+ l("difftool.cmd", "allowUnsafeDiffExternal"),
533
+ l("diff.textconv", "allowUnsafeDiffTextConv"),
534
+ l("filter.clean", "allowUnsafeFilter"),
535
+ l("filter.process", "allowUnsafeFilter"),
536
+ l("filter.smudge", "allowUnsafeFilter"),
537
+ l("gpg.program", "allowUnsafeGpgProgram"),
538
+ f("include.path", "allowUnsafeInclude"),
539
+ l("includeIf", "allowUnsafeInclude"),
540
+ f("init.templateDir", "allowUnsafeTemplateDir"),
541
+ l("pager.", "allowUnsafePager"),
542
+ l("merge.driver", "allowUnsafeMergeDriver"),
543
+ l("mergetool.path", "allowUnsafeMergeDriver"),
544
+ l("mergetool.cmd", "allowUnsafeMergeDriver"),
545
+ l("protocol.allow", "allowUnsafeProtocolOverride"),
546
+ l("remote.receivepack", "allowUnsafePack"),
547
+ l("remote.uploadpack", "allowUnsafePack"),
548
+ f("uploadpack.packObjectsHook", "allowUnsafePack"),
549
+ f("sequence.editor", "allowUnsafeEditor"),
550
+ l("submodule.update", "allowUnsafeSubmodule"),
551
+ l("tar.command", "allowUnsafeCommandBinaries"),
552
+ l("trailer.cmd", "allowUnsafeCommandBinaries"),
553
+ l("trailer.command", "allowUnsafeCommandBinaries"),
554
+ l("url.insteadOf", "allowUnsafeUrlRewrite")
555
+ ];
556
+ function* H(e, n) {
557
+ for (const t2 of n)
558
+ for (const o2 of X) {
559
+ const a = o2(e, t2);
560
+ a && (yield a);
561
+ }
562
+ }
563
+ __name(H, "H");
564
+ function c2(e, n, t2, { name: o2 = String(n), globalOnly: a = false, withValue: s = false } = {}) {
565
+ const r2 = typeof n == "string" ? new RegExp(`\\s*${n.toLowerCase()}`) : n, i = `Use of ${e ? `${e} with option ` : ""}${o2} is not permitted without enabling ${t2}`;
566
+ return function(m2, u2) {
567
+ if (!(e && m2 !== e) && !(a && !u2.isGlobal) && !(s && u2.value === void 0) && r2.test(u2.name))
568
+ return {
569
+ category: t2,
570
+ message: i
571
+ };
572
+ };
573
+ }
574
+ __name(c2, "c");
575
+ var h = { globalOnly: true, withValue: true };
576
+ var X = [
577
+ c2(null, /--(upload|receive)-pack/, "allowUnsafePack", {
578
+ name: "--upload-pack or --receive-pack"
579
+ }),
580
+ c2("clone", /^-\w*u/, "allowUnsafePack"),
581
+ c2("clone", "--u", "allowUnsafePack"),
582
+ c2("push", /^--exec$/, "allowUnsafePack", { name: "--exec" }),
583
+ // `git` accepts unambiguous abbreviations of long options, so `--ex` and `--exe` are `--exec`
584
+ c2("rebase", /^(-x|--ex(ec?)?)$/, "allowUnsafeExec", { name: "-x or --exec" }),
585
+ c2(null, "--template", "allowUnsafeTemplateDir"),
586
+ c2(null, "--exec-path", "allowUnsafeExec", h),
587
+ // `git` reads the configuration of whichever repository these name, so the
588
+ // directory alone is enough to deliver config the argv guards never see
589
+ c2(null, "--git-dir", "allowUnsafeConfigPaths", h),
590
+ c2(null, "--work-tree", "allowUnsafeConfigPaths", h),
591
+ c2(null, /^-C$/, "allowUnsafeConfigPaths", { ...h, name: "-C" })
592
+ ];
593
+ function k(e, n, t2) {
594
+ return [...H(e, n), ...q(t2)];
595
+ }
596
+ __name(k, "k");
597
+ function Y(...e) {
598
+ const { flags: n, taskIndex: t2 } = W(e), o2 = t2 < e.length ? String(e[t2]).toLowerCase() : null, a = o2 !== null ? e.slice(t2 + 1) : [], { positionals: s, pathspecs: r2 } = V(a, o2, n), i = D(o2, n, s);
599
+ return {
600
+ task: o2,
601
+ flags: n.map(J),
602
+ paths: r2,
603
+ config: i,
604
+ vulnerabilities: z(k(o2, n, i))
605
+ };
606
+ }
607
+ __name(Y, "Y");
608
+ function z(e) {
609
+ return Object.defineProperty(e, "vulnerabilities", {
610
+ value: e
611
+ });
612
+ }
613
+ __name(z, "z");
614
+ function J({ value: e, name: n }) {
615
+ return e !== void 0 ? { name: n, value: e } : { name: n };
616
+ }
617
+ __name(J, "J");
618
+ var y = {
619
+ editor: "allowUnsafeEditor",
620
+ git_askpass: "allowUnsafeAskPass",
621
+ git_config_global: "allowUnsafeConfigPaths",
622
+ git_config_system: "allowUnsafeConfigPaths",
623
+ git_config_count: "allowUnsafeConfigEnvCount",
624
+ git_config_parameters: "allowUnsafeConfigEnvCount",
625
+ git_config: "allowUnsafeConfigPaths",
626
+ git_editor: "allowUnsafeEditor",
627
+ git_exec_path: "allowUnsafeExec",
628
+ git_external_diff: "allowUnsafeDiffExternal",
629
+ git_pager: "allowUnsafePager",
630
+ git_proxy_command: "allowUnsafeGitProxy",
631
+ git_template_dir: "allowUnsafeTemplateDir",
632
+ git_sequence_editor: "allowUnsafeEditor",
633
+ git_ssh: "allowUnsafeSshCommand",
634
+ git_ssh_command: "allowUnsafeSshCommand",
635
+ pager: "allowUnsafePager",
636
+ prefix: "allowUnsafeConfigPaths",
637
+ ssh_askpass: "allowUnsafeAskPass",
638
+ visual: "allowUnsafeEditor"
639
+ };
640
+ function* Q(e) {
641
+ const n = parseInt(e.git_config_count ?? "0", 10);
642
+ for (let t2 = 0; t2 < n; t2++) {
643
+ const o2 = e[`git_config_key_${t2}`], a = e[`git_config_value_${t2}`];
644
+ o2 !== void 0 && (yield { key: o2.toLowerCase().trim(), value: a, scope: "env" });
645
+ }
646
+ }
647
+ __name(Q, "Q");
648
+ function* Z(e) {
649
+ for (const n of Object.keys(e))
650
+ if (_(n)) {
651
+ const t2 = y[n];
652
+ yield {
653
+ category: t2,
654
+ message: `Use of "${n.toUpperCase()}" is not permitted without enabling ${t2}`
655
+ };
656
+ }
657
+ }
658
+ __name(Z, "Z");
659
+ function _(e) {
660
+ return Object.hasOwn(y, e);
661
+ }
662
+ __name(_, "_");
663
+ function ee(e) {
664
+ const n = {};
665
+ for (const [t2, o2] of Object.entries(e)) {
666
+ const a = t2.toLowerCase().trim();
667
+ (_(a) || a.startsWith("git")) && (n[a] = String(o2));
668
+ }
669
+ return n;
670
+ }
671
+ __name(ee, "ee");
672
+ function ne(e) {
673
+ const n = ee(e), t2 = {
674
+ read: [],
675
+ write: [...Q(n)]
676
+ }, o2 = [
677
+ ...Z(n),
678
+ ...k(null, [], t2)
679
+ ];
680
+ return {
681
+ config: t2,
682
+ vulnerabilities: o2
683
+ };
684
+ }
685
+ __name(ne, "ne");
686
+ function oe(e, n) {
687
+ return [...Y(...e).vulnerabilities, ...ne(n).vulnerabilities];
688
+ }
689
+ __name(oe, "oe");
690
+
691
+ // node_modules/simple-git/dist/index.mjs
692
+ import { EventEmitter as Ce } from "node:events";
693
+ var O2 = class extends Error {
694
+ static {
695
+ __name(this, "O");
696
+ }
697
+ constructor(e, n) {
698
+ super(n), this.task = e, Object.setPrototypeOf(this, new.target.prototype);
699
+ }
700
+ };
701
+ var Ae = class extends O2 {
702
+ static {
703
+ __name(this, "Ae");
704
+ }
705
+ constructor(e, n) {
706
+ super(void 0, n), this.config = e;
707
+ }
708
+ };
709
+ var A2 = class extends O2 {
710
+ static {
711
+ __name(this, "A");
712
+ }
713
+ constructor(e, n, r2) {
714
+ super(e, r2), this.task = e, this.plugin = n, Object.setPrototypeOf(this, new.target.prototype);
715
+ }
716
+ };
717
+ var at = class extends O2 {
718
+ static {
719
+ __name(this, "at");
720
+ }
721
+ constructor(e, n) {
722
+ super(void 0, n || String(e)), this.git = e;
723
+ }
724
+ };
725
+ var xe = class extends O2 {
726
+ static {
727
+ __name(this, "xe");
728
+ }
729
+ constructor(e) {
730
+ super(void 0, e);
731
+ }
732
+ };
733
+ var I2 = "\0";
734
+ var W2 = /* @__PURE__ */ __name(() => {
735
+ }, "W");
736
+ function Ne(t2) {
737
+ return typeof t2 != "function" ? W2 : t2;
738
+ }
739
+ __name(Ne, "Ne");
740
+ function $e(t2) {
741
+ return typeof t2 == "function" && t2 !== W2;
742
+ }
743
+ __name($e, "$e");
744
+ function Pe(t2, e) {
745
+ const n = t2.indexOf(e);
746
+ return n <= 0 ? [t2, ""] : [t2.substr(0, n), t2.substr(n + 1)];
747
+ }
748
+ __name(Pe, "Pe");
749
+ function Me(t2, e = 0) {
750
+ return Dt(t2) && t2.length > e ? t2[e] : void 0;
751
+ }
752
+ __name(Me, "Me");
753
+ function N2(t2, e = 0) {
754
+ if (Dt(t2) && t2.length > e)
755
+ return t2[t2.length - 1 - e];
756
+ }
757
+ __name(N2, "N");
758
+ function Dt(t2) {
759
+ return Bt(t2);
760
+ }
761
+ __name(Dt, "Dt");
762
+ function H2(t2 = "", e = true, n = `
763
+ `) {
764
+ return t2.split(n).reduce((r2, s) => {
765
+ const o2 = e ? s.trim() : s;
766
+ return o2 && r2.push(o2), r2;
767
+ }, []);
768
+ }
769
+ __name(H2, "H");
770
+ function ut(t2, e) {
771
+ return H2(t2, true).map((n) => e(n));
772
+ }
773
+ __name(ut, "ut");
774
+ function Lt(t2) {
775
+ return (0, import_file_exists.exists)(t2, import_file_exists.FOLDER);
776
+ }
777
+ __name(Lt, "Lt");
778
+ function S2(t2, e) {
779
+ return Array.isArray(t2) ? t2.includes(e) || t2.push(e) : t2.add(e), e;
780
+ }
781
+ __name(S2, "S");
782
+ function De(t2, e) {
783
+ return Array.isArray(t2) && !t2.includes(e) && t2.push(e), t2;
784
+ }
785
+ __name(De, "De");
786
+ function ct(t2, e) {
787
+ if (Array.isArray(t2)) {
788
+ const n = t2.indexOf(e);
789
+ n >= 0 && t2.splice(n, 1);
790
+ } else
791
+ t2.delete(e);
792
+ return e;
793
+ }
794
+ __name(ct, "ct");
795
+ var ft = Object.prototype.toString.call.bind(Object.prototype.toString);
796
+ function v(t2) {
797
+ return Array.isArray(t2) ? t2 : [t2];
798
+ }
799
+ __name(v, "v");
800
+ function jt(t2) {
801
+ return t2.replace(/[\s-]+(.)/g, (e, n) => n.toUpperCase());
802
+ }
803
+ __name(jt, "jt");
804
+ function L2(t2) {
805
+ return v(t2).map((e) => e instanceof String ? e : String(e));
806
+ }
807
+ __name(L2, "L");
808
+ function p(t2, e = 0) {
809
+ if (t2 == null)
810
+ return e;
811
+ const n = parseInt(t2, 10);
812
+ return Number.isNaN(n) ? e : n;
813
+ }
814
+ __name(p, "p");
815
+ function U(t2, e) {
816
+ const n = [];
817
+ for (let r2 = 0, s = t2.length; r2 < s; r2++)
818
+ n.push(e, t2[r2]);
819
+ return n;
820
+ }
821
+ __name(U, "U");
822
+ function F2(t2) {
823
+ return (Array.isArray(t2) ? Buffer.concat(t2) : t2).toString("utf-8");
824
+ }
825
+ __name(F2, "F");
826
+ function Le(t2) {
827
+ return t2 ? Buffer.isBuffer(t2) ? t2.length : Buffer.byteLength(t2) : 0;
828
+ }
829
+ __name(Le, "Le");
830
+ function je(t2, e) {
831
+ const n = {};
832
+ return e.forEach((r2) => {
833
+ t2[r2] !== void 0 && (n[r2] = t2[r2]);
834
+ }), n;
835
+ }
836
+ __name(je, "je");
837
+ function wt(t2 = 0) {
838
+ return new Promise((e) => setTimeout(e, t2));
839
+ }
840
+ __name(wt, "wt");
841
+ function bt(t2) {
842
+ if (t2 !== false)
843
+ return t2;
844
+ }
845
+ __name(bt, "bt");
846
+ function d(t2, e, n) {
847
+ return e(t2) ? t2 : arguments.length > 2 ? n : void 0;
848
+ }
849
+ __name(d, "d");
850
+ var K2 = /* @__PURE__ */ __name((t2) => Array.isArray(t2), "K");
851
+ function st(t2, e) {
852
+ const n = r(t2) ? "string" : typeof t2;
853
+ return /number|string|boolean/.test(n) && (!e || !e.includes(n));
854
+ }
855
+ __name(st, "st");
856
+ var m = /* @__PURE__ */ __name((t2) => typeof t2 == "string" || r(t2), "m");
857
+ var Be = /* @__PURE__ */ __name((t2) => m(t2) || Buffer.isBuffer(t2), "Be");
858
+ var G2 = /* @__PURE__ */ __name((t2) => m(t2) || Array.isArray(t2) && t2.every(m), "G");
859
+ function lt(t2) {
860
+ return !!t2 && ft(t2) === "[object Object]";
861
+ }
862
+ __name(lt, "lt");
863
+ function Ie(t2) {
864
+ return typeof t2 == "function";
865
+ }
866
+ __name(Ie, "Ie");
867
+ var Bt = /* @__PURE__ */ __name((t2) => t2 == null || "number|boolean|function".includes(typeof t2) ? false : typeof t2.length == "number", "Bt");
868
+ var V2 = /* @__PURE__ */ ((t2) => (t2[t2.SUCCESS = 0] = "SUCCESS", t2[t2.ERROR = 1] = "ERROR", t2[t2.NOT_FOUND = -2] = "NOT_FOUND", t2[t2.UNCLEAN = 128] = "UNCLEAN", t2))(V2 || {});
869
+ var z2 = class _z {
870
+ static {
871
+ __name(this, "z");
872
+ }
873
+ constructor(e, n) {
874
+ this.stdOut = e, this.stdErr = n;
875
+ }
876
+ asStrings() {
877
+ return new _z(this.stdOut.toString("utf8"), this.stdErr.toString("utf8"));
878
+ }
879
+ };
880
+ function Ue() {
881
+ throw new Error("LineParser:useMatches not implemented");
882
+ }
883
+ __name(Ue, "Ue");
884
+ var l2 = class {
885
+ static {
886
+ __name(this, "l");
887
+ }
888
+ constructor(e, n) {
889
+ this.matches = [], this.useMatches = Ue, this.parse = (r2, s) => (this.resetMatches(), this._regExp.every((o2, i) => this.addMatch(o2, i, r2(i))) ? this.useMatches(s, this.prepareMatches()) !== false : false), this._regExp = Array.isArray(e) ? e : [e], n && (this.useMatches = n);
890
+ }
891
+ resetMatches() {
892
+ this.matches.length = 0;
893
+ }
894
+ prepareMatches() {
895
+ return this.matches;
896
+ }
897
+ addMatch(e, n, r2) {
898
+ const s = r2 && e.exec(r2);
899
+ return s && this.pushMatch(n, s), !!s;
900
+ }
901
+ pushMatch(e, n) {
902
+ this.matches.push(...n.slice(1));
903
+ }
904
+ };
905
+ var x2 = class extends l2 {
906
+ static {
907
+ __name(this, "x");
908
+ }
909
+ addMatch(e, n, r2) {
910
+ return /^remote:\s/.test(String(r2)) && super.addMatch(e, n, r2);
911
+ }
912
+ pushMatch(e, n) {
913
+ (e > 0 || n.length > 1) && super.pushMatch(e, n);
914
+ }
915
+ };
916
+ var Fe = {
917
+ binary: "git",
918
+ maxConcurrentProcesses: 5,
919
+ config: [],
920
+ trimmed: false
921
+ };
922
+ function Ge(...t2) {
923
+ const e = process.cwd(), n = Object.assign(
924
+ { baseDir: e, ...Fe },
925
+ ...t2.filter((r2) => typeof r2 == "object" && r2)
926
+ );
927
+ return n.baseDir = n.baseDir || e, n.trimmed = n.trimmed === true, n;
928
+ }
929
+ __name(Ge, "Ge");
930
+ function It(t2, e = []) {
931
+ return lt(t2) ? Object.keys(t2).reduce((n, r2) => {
932
+ const s = t2[r2];
933
+ if (r(s))
934
+ n.push(s);
935
+ else if (st(s, ["boolean"]))
936
+ n.push(r2 + "=" + s);
937
+ else if (Array.isArray(s))
938
+ for (const o2 of s)
939
+ st(o2, ["string", "number"]) || n.push(r2 + "=" + o2);
940
+ else
941
+ n.push(r2);
942
+ return n;
943
+ }, e) : e;
944
+ }
945
+ __name(It, "It");
946
+ function h2(t2, e = 0, n = false) {
947
+ const r2 = [];
948
+ for (let s = 0, o2 = e < 0 ? t2.length : e; s < o2; s++)
949
+ "string|number".includes(typeof t2[s]) && r2.push(String(t2[s]));
950
+ return It(ht(t2), r2), n || r2.push(...ze(t2)), r2;
951
+ }
952
+ __name(h2, "h");
953
+ function ze(t2) {
954
+ const e = typeof N2(t2) == "function";
955
+ return L2(d(N2(t2, e ? 1 : 0), K2, []));
956
+ }
957
+ __name(ze, "ze");
958
+ function ht(t2) {
959
+ const e = Ie(N2(t2));
960
+ return d(N2(t2, e ? 1 : 0), lt);
961
+ }
962
+ __name(ht, "ht");
963
+ function u(t2, e = true) {
964
+ const n = Ne(N2(t2));
965
+ return e || $e(n) ? n : void 0;
966
+ }
967
+ __name(u, "u");
968
+ function Tt(t2, e) {
969
+ return t2(e.stdOut, e.stdErr);
970
+ }
971
+ __name(Tt, "Tt");
972
+ function E2(t2, e, n, r2 = true) {
973
+ return v(n).forEach((s) => {
974
+ for (let o2 = H2(s, r2), i = 0, a = o2.length; i < a; i++) {
975
+ const c3 = /* @__PURE__ */ __name((y2 = 0) => {
976
+ if (!(i + y2 >= a))
977
+ return o2[i + y2];
978
+ }, "c");
979
+ e.some(({ parse: y2 }) => y2(c3, t2));
980
+ }
981
+ }), t2;
982
+ }
983
+ __name(E2, "E");
984
+ var qe = /* @__PURE__ */ ((t2) => (t2.BARE = "bare", t2.IN_TREE = "tree", t2.IS_REPO_ROOT = "root", t2))(qe || {});
985
+ var mt = /* @__PURE__ */ __name(({ exitCode: t2 }, e, n, r2) => {
986
+ if (t2 === V2.UNCLEAN && Ve(e))
987
+ return n(Buffer.from("false"));
988
+ r2(e);
989
+ }, "mt");
990
+ var Ut = /* @__PURE__ */ __name((t2) => t2.trim() === "true", "Ut");
991
+ function We(t2) {
992
+ switch (t2) {
993
+ case "bare":
994
+ return Ke();
995
+ case "root":
996
+ return He();
997
+ }
998
+ return {
999
+ commands: ["rev-parse", "--is-inside-work-tree"],
1000
+ format: "utf-8",
1001
+ onError: mt,
1002
+ parser: Ut
1003
+ };
1004
+ }
1005
+ __name(We, "We");
1006
+ function He() {
1007
+ return {
1008
+ commands: ["rev-parse", "--git-dir"],
1009
+ format: "utf-8",
1010
+ onError: mt,
1011
+ parser(e) {
1012
+ return /^\.(git)?$/.test(e.trim());
1013
+ }
1014
+ };
1015
+ }
1016
+ __name(He, "He");
1017
+ function Ke() {
1018
+ return {
1019
+ commands: ["rev-parse", "--is-bare-repository"],
1020
+ format: "utf-8",
1021
+ onError: mt,
1022
+ parser: Ut
1023
+ };
1024
+ }
1025
+ __name(Ke, "Ke");
1026
+ function Ve(t2) {
1027
+ return /(Not a git repository|Kein Git-Repository)/i.test(String(t2));
1028
+ }
1029
+ __name(Ve, "Ve");
1030
+ var Xe = class {
1031
+ static {
1032
+ __name(this, "Xe");
1033
+ }
1034
+ constructor(e) {
1035
+ this.paths = [], this.files = [], this.folders = [], this.dryRun = e;
1036
+ }
1037
+ };
1038
+ var Ye = /^[a-z]+\s*/i;
1039
+ var Qe = /^[a-z]+\s+[a-z]+\s*/i;
1040
+ var Je = /\/$/;
1041
+ function Ze(t2, e) {
1042
+ const n = new Xe(t2), r2 = t2 ? Qe : Ye;
1043
+ return H2(e).forEach((s) => {
1044
+ const o2 = s.replace(r2, "");
1045
+ n.paths.push(o2), (Je.test(o2) ? n.folders : n.files).push(o2);
1046
+ }), n;
1047
+ }
1048
+ __name(Ze, "Ze");
1049
+ var Ft = [];
1050
+ function tn(t2) {
1051
+ return {
1052
+ commands: Ft,
1053
+ format: "empty",
1054
+ parser: t2
1055
+ };
1056
+ }
1057
+ __name(tn, "tn");
1058
+ function b2(t2) {
1059
+ return {
1060
+ commands: Ft,
1061
+ format: "empty",
1062
+ parser() {
1063
+ throw typeof t2 == "string" ? new xe(t2) : t2;
1064
+ }
1065
+ };
1066
+ }
1067
+ __name(b2, "b");
1068
+ function g(t2, e = false) {
1069
+ return {
1070
+ commands: t2,
1071
+ format: "utf-8",
1072
+ parser(n) {
1073
+ return e ? String(n).trim() : n;
1074
+ }
1075
+ };
1076
+ }
1077
+ __name(g, "g");
1078
+ function Gt(t2) {
1079
+ return {
1080
+ commands: t2,
1081
+ format: "buffer",
1082
+ parser(e) {
1083
+ return e;
1084
+ }
1085
+ };
1086
+ }
1087
+ __name(Gt, "Gt");
1088
+ function en(t2) {
1089
+ return t2.format === "buffer";
1090
+ }
1091
+ __name(en, "en");
1092
+ function kt(t2) {
1093
+ return t2.format === "empty" || !t2.commands.length;
1094
+ }
1095
+ __name(kt, "kt");
1096
+ var nn = "Git clean interactive mode is not supported";
1097
+ var rn = 'Git clean mode parameter ("n" or "f") is required';
1098
+ var sn = "Git clean unknown option found in: ";
1099
+ var zt = /* @__PURE__ */ ((t2) => (t2.DRY_RUN = "n", t2.FORCE = "f", t2.IGNORED_INCLUDED = "x", t2.IGNORED_ONLY = "X", t2.EXCLUDING = "e", t2.QUIET = "q", t2.RECURSIVE = "d", t2))(zt || {});
1100
+ var qt = /* @__PURE__ */ new Set([
1101
+ "i",
1102
+ ...L2(Object.values(zt))
1103
+ ]);
1104
+ function on(t2, e) {
1105
+ const { cleanMode: n, options: r2, valid: s } = cn(t2);
1106
+ return n ? s.options ? (r2.push(...e), r2.some(hn) ? b2(nn) : an(n, r2)) : b2(sn + JSON.stringify(t2)) : b2(rn);
1107
+ }
1108
+ __name(on, "on");
1109
+ function an(t2, e) {
1110
+ return {
1111
+ commands: ["clean", `-${t2}`, ...e],
1112
+ format: "utf-8",
1113
+ parser(r2) {
1114
+ return Ze(t2 === "n", r2);
1115
+ }
1116
+ };
1117
+ }
1118
+ __name(an, "an");
1119
+ function un(t2) {
1120
+ return Array.isArray(t2) && t2.every((e) => qt.has(e));
1121
+ }
1122
+ __name(un, "un");
1123
+ function cn(t2) {
1124
+ let e, n = [], r2 = { cleanMode: false, options: true };
1125
+ return t2.replace(/[^a-z]i/g, "").split("").forEach((s) => {
1126
+ fn(s) ? (e = s, r2.cleanMode = true) : r2.options = r2.options && ln(n[n.length] = `-${s}`);
1127
+ }), {
1128
+ cleanMode: e,
1129
+ options: n,
1130
+ valid: r2
1131
+ };
1132
+ }
1133
+ __name(cn, "cn");
1134
+ function fn(t2) {
1135
+ return t2 === "f" || t2 === "n";
1136
+ }
1137
+ __name(fn, "fn");
1138
+ function ln(t2) {
1139
+ return /^-[a-z]$/i.test(t2) && qt.has(t2.charAt(1));
1140
+ }
1141
+ __name(ln, "ln");
1142
+ function hn(t2) {
1143
+ return /^-[^\-]/.test(t2) ? t2.indexOf("i") > 0 : t2 === "--interactive";
1144
+ }
1145
+ __name(hn, "hn");
1146
+ var mn = class {
1147
+ static {
1148
+ __name(this, "mn");
1149
+ }
1150
+ constructor() {
1151
+ this.files = [], this.values = /* @__PURE__ */ Object.create(null);
1152
+ }
1153
+ get all() {
1154
+ return this._all || (this._all = this.files.reduce((e, n) => Object.assign(e, this.values[n]), {})), this._all;
1155
+ }
1156
+ addFile(e) {
1157
+ if (!(e in this.values)) {
1158
+ const n = N2(this.files);
1159
+ this.values[e] = n ? Object.create(this.values[n]) : {}, this.files.push(e);
1160
+ }
1161
+ return this.values[e];
1162
+ }
1163
+ addValue(e, n, r2) {
1164
+ const s = this.addFile(e);
1165
+ Object.hasOwn(s, n) ? Array.isArray(s[n]) ? s[n].push(r2) : s[n] = [s[n], r2] : s[n] = r2, this._all = void 0;
1166
+ }
1167
+ };
1168
+ function pn(t2) {
1169
+ const e = new mn();
1170
+ for (const n of Wt(t2))
1171
+ e.addValue(n.file, String(n.key), n.value);
1172
+ return e;
1173
+ }
1174
+ __name(pn, "pn");
1175
+ function dn(t2, e) {
1176
+ let n = null;
1177
+ const r2 = [], s = /* @__PURE__ */ new Map();
1178
+ for (const o2 of Wt(t2, e))
1179
+ o2.key === e && (r2.push(n = o2.value), s.has(o2.file) || s.set(o2.file, []), s.get(o2.file).push(n));
1180
+ return {
1181
+ key: e,
1182
+ paths: Array.from(s.keys()),
1183
+ scopes: s,
1184
+ value: n,
1185
+ values: r2
1186
+ };
1187
+ }
1188
+ __name(dn, "dn");
1189
+ function gn(t2) {
1190
+ return t2.replace(/^(file):/, "");
1191
+ }
1192
+ __name(gn, "gn");
1193
+ function* Wt(t2, e = null) {
1194
+ const n = t2.split("\0");
1195
+ for (let r2 = 0, s = n.length - 1; r2 < s; ) {
1196
+ const o2 = gn(n[r2++]);
1197
+ let i = n[r2++], a = e;
1198
+ if (i.includes(`
1199
+ `)) {
1200
+ const c3 = Pe(i, `
1201
+ `);
1202
+ a = c3[0], i = c3[1];
1203
+ }
1204
+ yield { file: o2, key: a, value: i };
1205
+ }
1206
+ }
1207
+ __name(Wt, "Wt");
1208
+ var Ht = /* @__PURE__ */ ((t2) => (t2.system = "system", t2.global = "global", t2.local = "local", t2.worktree = "worktree", t2))(Ht || {});
1209
+ function Y2(t2, e) {
1210
+ return typeof t2 == "string" && Object.hasOwn(Ht, t2) ? t2 : e;
1211
+ }
1212
+ __name(Y2, "Y");
1213
+ function yn(t2, e, n, r2) {
1214
+ const s = ["config", `--${r2}`];
1215
+ return n && s.push("--add"), s.push(t2, e), {
1216
+ commands: s,
1217
+ format: "utf-8",
1218
+ parser(o2) {
1219
+ return o2;
1220
+ }
1221
+ };
1222
+ }
1223
+ __name(yn, "yn");
1224
+ function wn(t2, e) {
1225
+ const n = ["config", "--null", "--show-origin", "--get-all", t2];
1226
+ return e && n.splice(1, 0, `--${e}`), {
1227
+ commands: n,
1228
+ format: "utf-8",
1229
+ parser(r2) {
1230
+ return dn(r2, t2);
1231
+ }
1232
+ };
1233
+ }
1234
+ __name(wn, "wn");
1235
+ function bn(t2) {
1236
+ const e = ["config", "--list", "--show-origin", "--null"];
1237
+ return t2 && e.push(`--${t2}`), {
1238
+ commands: e,
1239
+ format: "utf-8",
1240
+ parser(n) {
1241
+ return pn(n);
1242
+ }
1243
+ };
1244
+ }
1245
+ __name(bn, "bn");
1246
+ function Tn() {
1247
+ return {
1248
+ addConfig(t2, e, ...n) {
1249
+ return this._runTask(
1250
+ yn(
1251
+ t2,
1252
+ e,
1253
+ n[0] === true,
1254
+ Y2(
1255
+ n[1],
1256
+ "local"
1257
+ /* local */
1258
+ )
1259
+ ),
1260
+ u(arguments)
1261
+ );
1262
+ },
1263
+ getConfig(t2, e) {
1264
+ return this._runTask(
1265
+ wn(t2, Y2(e, void 0)),
1266
+ u(arguments)
1267
+ );
1268
+ },
1269
+ listConfig(...t2) {
1270
+ return this._runTask(
1271
+ bn(Y2(t2[0], void 0)),
1272
+ u(arguments)
1273
+ );
1274
+ }
1275
+ };
1276
+ }
1277
+ __name(Tn, "Tn");
1278
+ var Kt = /* @__PURE__ */ ((t2) => (t2.ADDED = "A", t2.COPIED = "C", t2.DELETED = "D", t2.MODIFIED = "M", t2.RENAMED = "R", t2.CHANGED = "T", t2.UNMERGED = "U", t2.UNKNOWN = "X", t2.BROKEN = "B", t2))(Kt || {});
1279
+ var kn = new Set(Object.values(Kt));
1280
+ function _n(t2) {
1281
+ return kn.has(t2);
1282
+ }
1283
+ __name(_n, "_n");
1284
+ var _t;
1285
+ var vn = ["-h"];
1286
+ var j2 = /* @__PURE__ */ Symbol("grepQuery");
1287
+ var En = class {
1288
+ static {
1289
+ __name(this, "En");
1290
+ }
1291
+ constructor() {
1292
+ this[_t] = [];
1293
+ }
1294
+ *[(_t = j2, Symbol.iterator)]() {
1295
+ for (const e of this[j2])
1296
+ yield e;
1297
+ }
1298
+ and(...e) {
1299
+ return e.length && this[j2].push("--and", "(", ...U(e, "-e"), ")"), this;
1300
+ }
1301
+ param(...e) {
1302
+ return this[j2].push(...U(e, "-e")), this;
1303
+ }
1304
+ };
1305
+ function Sn(...t2) {
1306
+ return new En().param(...t2);
1307
+ }
1308
+ __name(Sn, "Sn");
1309
+ function Rn(t2) {
1310
+ const e = /* @__PURE__ */ new Set(), n = {};
1311
+ return ut(t2, (r2) => {
1312
+ const [s, o2, i] = r2.split(I2);
1313
+ e.add(s), (n[s] = n[s] || []).push({
1314
+ line: p(o2),
1315
+ path: s,
1316
+ preview: i
1317
+ });
1318
+ }), {
1319
+ paths: e,
1320
+ results: n
1321
+ };
1322
+ }
1323
+ __name(Rn, "Rn");
1324
+ function On() {
1325
+ return {
1326
+ grep(t2) {
1327
+ const e = u(arguments), n = h2(arguments);
1328
+ for (const s of vn)
1329
+ if (n.includes(s))
1330
+ return this._runTask(
1331
+ b2(`git.grep: use of "${s}" is not supported.`),
1332
+ e
1333
+ );
1334
+ typeof t2 == "string" && (t2 = Sn().param(t2));
1335
+ const r2 = ["grep", "--null", "-n", "--full-name", ...n, ...t2];
1336
+ return this._runTask(
1337
+ {
1338
+ commands: r2,
1339
+ format: "utf-8",
1340
+ parser(s) {
1341
+ return Rn(s);
1342
+ }
1343
+ },
1344
+ e
1345
+ );
1346
+ }
1347
+ };
1348
+ }
1349
+ __name(On, "On");
1350
+ var Vt = /* @__PURE__ */ ((t2) => (t2.MIXED = "mixed", t2.SOFT = "soft", t2.HARD = "hard", t2.MERGE = "merge", t2.KEEP = "keep", t2))(Vt || {});
1351
+ var Cn = L2(Object.values(Vt));
1352
+ function An(t2, e) {
1353
+ const n = ["reset"];
1354
+ return Xt(t2) && n.push(`--${t2}`), n.push(...e), g(n);
1355
+ }
1356
+ __name(An, "An");
1357
+ function xn(t2) {
1358
+ if (Xt(t2))
1359
+ return t2;
1360
+ switch (typeof t2) {
1361
+ case "string":
1362
+ case "undefined":
1363
+ return "soft";
1364
+ }
1365
+ }
1366
+ __name(xn, "xn");
1367
+ function Xt(t2) {
1368
+ return typeof t2 == "string" && Cn.includes(t2);
1369
+ }
1370
+ __name(Xt, "Xt");
1371
+ import_debug.default.formatters.L = (t2) => String(Bt(t2) ? t2.length : "-");
1372
+ import_debug.default.formatters.B = (t2) => Buffer.isBuffer(t2) ? t2.toString("utf8") : ft(t2);
1373
+ function Nn() {
1374
+ return (0, import_debug.default)("simple-git");
1375
+ }
1376
+ __name(Nn, "Nn");
1377
+ function vt(t2, e, n) {
1378
+ return !e || !String(e).replace(/\s*/, "") ? n ? (r2, ...s) => {
1379
+ t2(r2, ...s), n(r2, ...s);
1380
+ } : t2 : (r2, ...s) => {
1381
+ t2(`%s ${r2}`, e, ...s), n && n(r2, ...s);
1382
+ };
1383
+ }
1384
+ __name(vt, "vt");
1385
+ function $n(t2, e, { namespace: n }) {
1386
+ if (typeof t2 == "string")
1387
+ return t2;
1388
+ const r2 = e && e.namespace || "";
1389
+ return r2.startsWith(n) ? r2.substr(n.length + 1) : r2 || n;
1390
+ }
1391
+ __name($n, "$n");
1392
+ function $2(t2, e, n, r2 = Nn()) {
1393
+ const s = t2 && `[${t2}]` || "", o2 = [], i = typeof e == "string" ? r2.extend(e) : e, a = $n(d(e, m), i, r2);
1394
+ return y2(n);
1395
+ function c3(w2, T2) {
1396
+ return S2(
1397
+ o2,
1398
+ $2(t2, a.replace(/^[^:]+/, w2), T2, r2)
1399
+ );
1400
+ }
1401
+ __name(c3, "c");
1402
+ function y2(w2) {
1403
+ const T2 = w2 && `[${w2}]` || "", k2 = i && vt(i, T2) || W2, C2 = vt(r2, `${s} ${T2}`, k2);
1404
+ return Object.assign(i ? k2 : C2, {
1405
+ label: t2,
1406
+ sibling: c3,
1407
+ info: C2,
1408
+ step: y2
1409
+ });
1410
+ }
1411
+ __name(y2, "y");
1412
+ }
1413
+ __name($2, "$");
1414
+ var M2 = class M3 {
1415
+ static {
1416
+ __name(this, "M");
1417
+ }
1418
+ constructor(e = "GitExecutor") {
1419
+ this.logLabel = e, this._queue = /* @__PURE__ */ new Map();
1420
+ }
1421
+ withProgress(e) {
1422
+ return this._queue.get(e);
1423
+ }
1424
+ createProgress(e) {
1425
+ const n = M3.getName(e.commands[0]), r2 = $2(this.logLabel, n);
1426
+ return {
1427
+ task: e,
1428
+ logger: r2,
1429
+ name: n
1430
+ };
1431
+ }
1432
+ push(e) {
1433
+ const n = this.createProgress(e);
1434
+ return n.logger("Adding task to the queue, commands = %o", e.commands), this._queue.set(e, n), n;
1435
+ }
1436
+ fatal(e) {
1437
+ for (const [n, { logger: r2 }] of Array.from(this._queue.entries()))
1438
+ n === e.task ? (r2.info("Failed %o", e), r2(
1439
+ "Fatal exception, any as-yet un-started tasks run through this executor will not be attempted"
1440
+ )) : r2.info(
1441
+ "A fatal exception occurred in a previous task, the queue has been purged: %o",
1442
+ e.message
1443
+ ), this.complete(n);
1444
+ if (this._queue.size !== 0)
1445
+ throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`);
1446
+ }
1447
+ complete(e) {
1448
+ this.withProgress(e) && this._queue.delete(e);
1449
+ }
1450
+ attempt(e) {
1451
+ const n = this.withProgress(e);
1452
+ if (!n)
1453
+ throw new O2(void 0, "TasksPendingQueue: attempt called for an unknown task");
1454
+ return n.logger("Starting task"), n;
1455
+ }
1456
+ static getName(e = "empty") {
1457
+ return `task:${e}:${++M3.counter}`;
1458
+ }
1459
+ };
1460
+ M2.counter = 0;
1461
+ var ot = M2;
1462
+ var Pn = class {
1463
+ static {
1464
+ __name(this, "Pn");
1465
+ }
1466
+ constructor(e, n, r2) {
1467
+ this._executor = e, this._scheduler = n, this._plugins = r2, this._chain = Promise.resolve(), this._queue = new ot();
1468
+ }
1469
+ get cwd() {
1470
+ return this._cwd || this._executor.cwd;
1471
+ }
1472
+ set cwd(e) {
1473
+ this._cwd = e;
1474
+ }
1475
+ get env() {
1476
+ return this._executor.env;
1477
+ }
1478
+ get outputHandler() {
1479
+ return this._executor.outputHandler;
1480
+ }
1481
+ chain() {
1482
+ return this;
1483
+ }
1484
+ push(e) {
1485
+ return this._queue.push(e), this._chain = this._chain.then(() => this.attemptTask(e));
1486
+ }
1487
+ async attemptTask(e) {
1488
+ const n = await this._scheduler.next(), r2 = /* @__PURE__ */ __name(() => this._queue.complete(e), "r");
1489
+ try {
1490
+ const { logger: s } = this._queue.attempt(e);
1491
+ return await (kt(e) ? this.attemptEmptyTask(e, s) : this.attemptRemoteTask(e, s));
1492
+ } catch (s) {
1493
+ throw this.onFatalException(e, s);
1494
+ } finally {
1495
+ r2(), n();
1496
+ }
1497
+ }
1498
+ onFatalException(e, n) {
1499
+ const r2 = n instanceof O2 ? Object.assign(n, { task: e }) : new O2(e, n && String(n));
1500
+ return this._chain = Promise.resolve(), this._queue.fatal(r2), r2;
1501
+ }
1502
+ async attemptRemoteTask(e, n) {
1503
+ const r2 = this._plugins.exec("spawn.binary", "", this.taskContext(e, e.commands)), s = this._plugins.exec(
1504
+ "spawn.args",
1505
+ [...e.commands],
1506
+ this.taskContext(e, e.commands)
1507
+ ), o2 = await this.gitResponse(
1508
+ e,
1509
+ r2,
1510
+ s,
1511
+ this.outputHandler,
1512
+ n.step("SPAWN")
1513
+ ), i = await this.handleTaskData(e, s, o2, n.step("HANDLE"));
1514
+ return n("passing response to task's parser as a %s", e.format), en(e) ? Tt(e.parser, i) : Tt(e.parser, i.asStrings());
1515
+ }
1516
+ async attemptEmptyTask(e, n) {
1517
+ return n("empty task bypassing child process to call to task's parser"), e.parser(this);
1518
+ }
1519
+ handleTaskData(e, n, r2, s) {
1520
+ const { exitCode: o2, rejection: i, stdOut: a, stdErr: c3 } = r2;
1521
+ return new Promise((y2, w2) => {
1522
+ s("Preparing to handle process response exitCode=%d stdOut=", o2);
1523
+ const { error: T2 } = this._plugins.exec(
1524
+ "task.error",
1525
+ { error: i },
1526
+ {
1527
+ ...this.taskContext(e, n),
1528
+ ...r2
1529
+ }
1530
+ );
1531
+ if (T2 && e.onError)
1532
+ return s.info("exitCode=%s handling with custom error handler"), e.onError(
1533
+ r2,
1534
+ T2,
1535
+ (k2) => {
1536
+ s.info("custom error handler treated as success"), s("custom error returned a %s", ft(k2)), y2(
1537
+ new z2(
1538
+ Array.isArray(k2) ? Buffer.concat(k2) : k2,
1539
+ Buffer.concat(c3)
1540
+ )
1541
+ );
1542
+ },
1543
+ w2
1544
+ );
1545
+ if (T2)
1546
+ return s.info(
1547
+ "handling as error: exitCode=%s stdErr=%s rejection=%o",
1548
+ o2,
1549
+ c3.length,
1550
+ i
1551
+ ), w2(T2);
1552
+ s.info("retrieving task output complete"), y2(new z2(Buffer.concat(a), Buffer.concat(c3)));
1553
+ });
1554
+ }
1555
+ async gitResponse(e, n, r2, s, o2) {
1556
+ const i = o2.sibling("output"), a = this._plugins.exec(
1557
+ "spawn.options",
1558
+ {
1559
+ cwd: this.cwd,
1560
+ env: this.env,
1561
+ windowsHide: true
1562
+ },
1563
+ this.taskContext(e, e.commands)
1564
+ );
1565
+ return new Promise((c3) => {
1566
+ const y2 = [], w2 = [];
1567
+ o2.info("%s %o", n, r2), o2("%O", a);
1568
+ let T2 = this._beforeSpawn(e, r2);
1569
+ if (T2)
1570
+ return c3({
1571
+ stdOut: y2,
1572
+ stdErr: w2,
1573
+ exitCode: 9901,
1574
+ rejection: T2
1575
+ });
1576
+ this._plugins.exec("spawn.before", void 0, {
1577
+ ...this.taskContext(e, r2),
1578
+ kill(C2) {
1579
+ T2 = C2 || T2;
1580
+ }
1581
+ });
1582
+ const k2 = ve(n, r2, a);
1583
+ k2.stdout.on(
1584
+ "data",
1585
+ Et(y2, "stdOut", o2, i.step("stdOut"))
1586
+ ), k2.stderr.on(
1587
+ "data",
1588
+ Et(w2, "stdErr", o2, i.step("stdErr"))
1589
+ ), k2.on("error", Mn(w2, o2)), s && (o2("Passing child process stdOut/stdErr to custom outputHandler"), s(n, k2.stdout, k2.stderr, [...r2])), this._plugins.exec("spawn.after", void 0, {
1590
+ ...this.taskContext(e, r2),
1591
+ spawned: k2,
1592
+ close(C2, Te) {
1593
+ c3({
1594
+ stdOut: y2,
1595
+ stdErr: w2,
1596
+ exitCode: C2,
1597
+ rejection: T2 || Te
1598
+ });
1599
+ },
1600
+ kill(C2) {
1601
+ k2.killed || (T2 = C2, k2.kill("SIGINT"));
1602
+ }
1603
+ });
1604
+ });
1605
+ }
1606
+ _beforeSpawn(e, n) {
1607
+ let r2;
1608
+ return this._plugins.exec("spawn.before", void 0, {
1609
+ ...this.taskContext(e, n),
1610
+ kill(s) {
1611
+ r2 = s || r2;
1612
+ }
1613
+ }), r2;
1614
+ }
1615
+ taskContext(e, n) {
1616
+ return {
1617
+ method: String(Me(e.commands) || ""),
1618
+ commands: n,
1619
+ env: { ...this.env },
1620
+ input: kt(e) ? void 0 : e.input
1621
+ };
1622
+ }
1623
+ };
1624
+ function Mn(t2, e) {
1625
+ return (n) => {
1626
+ e("[ERROR] child process exception %o", n), t2.push(Buffer.from(String(n.stack), "ascii"));
1627
+ };
1628
+ }
1629
+ __name(Mn, "Mn");
1630
+ function Et(t2, e, n, r2) {
1631
+ return (s) => {
1632
+ n("%s received %L bytes", e, s), r2("%B", s), t2.push(s);
1633
+ };
1634
+ }
1635
+ __name(Et, "Et");
1636
+ var Dn = class {
1637
+ static {
1638
+ __name(this, "Dn");
1639
+ }
1640
+ constructor(e, n, r2) {
1641
+ this.cwd = e, this._scheduler = n, this._plugins = r2, this._chain = this.chain();
1642
+ }
1643
+ chain() {
1644
+ return new Pn(this, this._scheduler, this._plugins);
1645
+ }
1646
+ push(e) {
1647
+ return this._chain.push(e);
1648
+ }
1649
+ };
1650
+ function Ln(t2, e, n = W2) {
1651
+ const r2 = /* @__PURE__ */ __name((o2) => {
1652
+ n(null, o2);
1653
+ }, "r"), s = /* @__PURE__ */ __name((o2) => {
1654
+ o2?.task === t2 && n(o2, void 0);
1655
+ }, "s");
1656
+ e.then(r2, s);
1657
+ }
1658
+ __name(Ln, "Ln");
1659
+ function St(t2, e) {
1660
+ return tn((n) => {
1661
+ if (!Lt(t2))
1662
+ throw new Error(`Git.cwd: cannot change to non-directory "${t2}"`);
1663
+ return (e || n).cwd = t2;
1664
+ });
1665
+ }
1666
+ __name(St, "St");
1667
+ function Q2(t2) {
1668
+ const e = ["checkout", ...t2];
1669
+ return e[1] === "-b" && e.includes("-B") && (e[1] = ct(e, "-B")), g(e);
1670
+ }
1671
+ __name(Q2, "Q");
1672
+ function jn() {
1673
+ return {
1674
+ checkout() {
1675
+ return this._runTask(
1676
+ Q2(h2(arguments, 1)),
1677
+ u(arguments)
1678
+ );
1679
+ },
1680
+ checkoutBranch(t2, e) {
1681
+ return this._runTask(
1682
+ Q2(["-b", t2, e, ...h2(arguments)]),
1683
+ u(arguments)
1684
+ );
1685
+ },
1686
+ checkoutLocalBranch(t2) {
1687
+ return this._runTask(
1688
+ Q2(["-b", t2, ...h2(arguments)]),
1689
+ u(arguments)
1690
+ );
1691
+ }
1692
+ };
1693
+ }
1694
+ __name(jn, "jn");
1695
+ var Yt = /* @__PURE__ */ __name((t2, e, n) => {
1696
+ const r2 = ["clone", ...n];
1697
+ return m(t2) && r2.push(c(t2)), m(e) && r2.push(c(e)), g(r2);
1698
+ }, "Yt");
1699
+ var Bn = /* @__PURE__ */ __name((t2, e, n) => (S2(n, "--mirror"), Yt(t2, e, n)), "Bn");
1700
+ function Rt(t2, e, n, ...r2) {
1701
+ return m(n) ? e(n, d(r2[0], m), h2(arguments)) : b2(`git.${t2}() requires a string 'repoPath'`);
1702
+ }
1703
+ __name(Rt, "Rt");
1704
+ function In() {
1705
+ return {
1706
+ clone(t2, ...e) {
1707
+ return this._runTask(
1708
+ Rt("clone", Yt, d(t2, m), ...e),
1709
+ u(arguments)
1710
+ );
1711
+ },
1712
+ mirror(t2, ...e) {
1713
+ return this._runTask(
1714
+ Rt("mirror", Bn, d(t2, m), ...e),
1715
+ u(arguments)
1716
+ );
1717
+ }
1718
+ };
1719
+ }
1720
+ __name(In, "In");
1721
+ var Un = [
1722
+ new l2(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/, (t2, [e, n, r2]) => {
1723
+ t2.branch = e, t2.commit = r2, t2.root = !!n;
1724
+ }),
1725
+ new l2(/\s*Author:\s(.+)/i, (t2, [e]) => {
1726
+ const n = e.split("<"), r2 = n.pop();
1727
+ !r2 || !r2.includes("@") || (t2.author = {
1728
+ email: r2.substr(0, r2.length - 1),
1729
+ name: n.join("<").trim()
1730
+ });
1731
+ }),
1732
+ new l2(
1733
+ /(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,
1734
+ (t2, [e, n, r2]) => {
1735
+ t2.summary.changes = parseInt(e, 10) || 0, t2.summary.insertions = parseInt(n, 10) || 0, t2.summary.deletions = parseInt(r2, 10) || 0;
1736
+ }
1737
+ ),
1738
+ new l2(
1739
+ /^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,
1740
+ (t2, [e, n, r2]) => {
1741
+ t2.summary.changes = parseInt(e, 10) || 0;
1742
+ const s = parseInt(n, 10) || 0;
1743
+ r2 === "-" ? t2.summary.deletions = s : r2 === "+" && (t2.summary.insertions = s);
1744
+ }
1745
+ )
1746
+ ];
1747
+ function Fn(t2) {
1748
+ return E2({
1749
+ author: null,
1750
+ branch: "",
1751
+ commit: "",
1752
+ root: false,
1753
+ summary: {
1754
+ changes: 0,
1755
+ insertions: 0,
1756
+ deletions: 0
1757
+ }
1758
+ }, Un, t2);
1759
+ }
1760
+ __name(Fn, "Fn");
1761
+ function Gn(t2, e, n) {
1762
+ return {
1763
+ commands: [
1764
+ "-c",
1765
+ "core.abbrev=40",
1766
+ "commit",
1767
+ ...U(t2, "-m"),
1768
+ ...e,
1769
+ ...n
1770
+ ],
1771
+ format: "utf-8",
1772
+ parser: Fn
1773
+ };
1774
+ }
1775
+ __name(Gn, "Gn");
1776
+ function zn() {
1777
+ return {
1778
+ commit(e, ...n) {
1779
+ const r2 = u(arguments), s = t2(e) || Gn(
1780
+ v(e),
1781
+ v(d(n[0], G2, [])),
1782
+ [
1783
+ ...L2(d(n[1], K2, [])),
1784
+ ...h2(arguments, 0, true)
1785
+ ]
1786
+ );
1787
+ return this._runTask(s, r2);
1788
+ }
1789
+ };
1790
+ function t2(e) {
1791
+ return !G2(e) && b2(
1792
+ "git.commit: requires the commit message to be supplied as a string/string[]"
1793
+ );
1794
+ }
1795
+ __name(t2, "t");
1796
+ }
1797
+ __name(zn, "zn");
1798
+ function qn() {
1799
+ return {
1800
+ count: 0,
1801
+ garbage: 0,
1802
+ inPack: 0,
1803
+ packs: 0,
1804
+ prunePackable: 0,
1805
+ size: 0,
1806
+ sizeGarbage: 0,
1807
+ sizePack: 0
1808
+ };
1809
+ }
1810
+ __name(qn, "qn");
1811
+ var Wn = new l2(
1812
+ /([a-z-]+): (\d+)$/,
1813
+ (t2, [e, n]) => {
1814
+ const r2 = jt(e);
1815
+ Object.hasOwn(t2, r2) && (t2[r2] = p(n));
1816
+ }
1817
+ );
1818
+ function Hn() {
1819
+ return {
1820
+ countObjects() {
1821
+ return this._runTask({
1822
+ commands: ["count-objects", "--verbose"],
1823
+ format: "utf-8",
1824
+ parser(t2) {
1825
+ return E2(qn(), [Wn], t2);
1826
+ }
1827
+ });
1828
+ }
1829
+ };
1830
+ }
1831
+ __name(Hn, "Hn");
1832
+ function Kn() {
1833
+ return {
1834
+ firstCommit() {
1835
+ return this._runTask(
1836
+ g(["rev-list", "--max-parents=0", "HEAD"], true),
1837
+ u(arguments)
1838
+ );
1839
+ }
1840
+ };
1841
+ }
1842
+ __name(Kn, "Kn");
1843
+ function Vn(t2, e) {
1844
+ const n = ["hash-object", t2];
1845
+ return e && n.push("-w"), g(n, true);
1846
+ }
1847
+ __name(Vn, "Vn");
1848
+ var J2 = class {
1849
+ static {
1850
+ __name(this, "J");
1851
+ }
1852
+ constructor(e, n, r2, s) {
1853
+ this.bare = e, this.path = n, this.existing = r2, this.gitDir = s;
1854
+ }
1855
+ };
1856
+ var Xn = /^Init.+ repository in (.+)$/;
1857
+ var Yn = /^Rein.+ in (.+)$/;
1858
+ function Qn(t2, e, n) {
1859
+ const r2 = String(n).trim();
1860
+ let s;
1861
+ if (s = Xn.exec(r2))
1862
+ return new J2(t2, e, false, s[1]);
1863
+ if (s = Yn.exec(r2))
1864
+ return new J2(t2, e, true, s[1]);
1865
+ let o2 = "";
1866
+ const i = r2.split(" ");
1867
+ for (; i.length; )
1868
+ if (i.shift() === "in") {
1869
+ o2 = i.join(" ");
1870
+ break;
1871
+ }
1872
+ return new J2(t2, e, /^re/i.test(r2), o2);
1873
+ }
1874
+ __name(Qn, "Qn");
1875
+ var Qt = "--bare";
1876
+ function Jn(t2) {
1877
+ return t2.includes(Qt);
1878
+ }
1879
+ __name(Jn, "Jn");
1880
+ function Zn(t2 = false, e, n) {
1881
+ const r2 = ["init", ...n];
1882
+ return t2 && !Jn(r2) && r2.splice(1, 0, Qt), {
1883
+ commands: r2,
1884
+ format: "utf-8",
1885
+ parser(s) {
1886
+ return Qn(r2.includes("--bare"), e, s);
1887
+ }
1888
+ };
1889
+ }
1890
+ __name(Zn, "Zn");
1891
+ function tr(t2) {
1892
+ return t2 === void 0 ? b2("interpretTrailers called without input content") : {
1893
+ format: "utf-8",
1894
+ parser(e) {
1895
+ return Object.fromEntries(
1896
+ ut(e, (n) => {
1897
+ const r2 = n.indexOf(":");
1898
+ return [
1899
+ jt(n.substring(0, r2).toLowerCase()),
1900
+ n.substring(r2 + 2).trim()
1901
+ ];
1902
+ })
1903
+ );
1904
+ },
1905
+ commands: ["interpret-trailers", "--parse"],
1906
+ input: t2
1907
+ };
1908
+ }
1909
+ __name(tr, "tr");
1910
+ function er() {
1911
+ return {
1912
+ interpretTrailers(t2) {
1913
+ return this._runTask(
1914
+ tr(d(t2, Be)),
1915
+ u(arguments)
1916
+ );
1917
+ }
1918
+ };
1919
+ }
1920
+ __name(er, "er");
1921
+ var R2 = /* @__PURE__ */ ((t2) => (t2.NONE = "", t2.STAT = "--stat", t2.NUM_STAT = "--numstat", t2.NAME_ONLY = "--name-only", t2.NAME_STATUS = "--name-status", t2))(R2 || {});
1922
+ var Jt = /^--(stat|numstat|name-only|name-status)(=|$)/;
1923
+ function pt(t2) {
1924
+ for (let e = 0; e < t2.length; e++) {
1925
+ const n = Jt.exec(t2[e]);
1926
+ if (n)
1927
+ return `--${n[1]}`;
1928
+ }
1929
+ return "";
1930
+ }
1931
+ __name(pt, "pt");
1932
+ function nr(t2) {
1933
+ return Jt.test(t2);
1934
+ }
1935
+ __name(nr, "nr");
1936
+ var rr = class {
1937
+ static {
1938
+ __name(this, "rr");
1939
+ }
1940
+ constructor() {
1941
+ this.changed = 0, this.deletions = 0, this.insertions = 0, this.files = [];
1942
+ }
1943
+ };
1944
+ var Ot = [
1945
+ new l2(
1946
+ /^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,
1947
+ (t2, [e, n, r2 = ""]) => {
1948
+ t2.files.push({
1949
+ file: e.trim(),
1950
+ changes: p(n),
1951
+ insertions: r2.replace(/[^+]/g, "").length,
1952
+ deletions: r2.replace(/[^-]/g, "").length,
1953
+ binary: false
1954
+ });
1955
+ }
1956
+ ),
1957
+ new l2(
1958
+ /^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,
1959
+ (t2, [e, n, r2]) => {
1960
+ t2.files.push({
1961
+ file: e.trim(),
1962
+ before: p(n),
1963
+ after: p(r2),
1964
+ binary: true
1965
+ });
1966
+ }
1967
+ ),
1968
+ new l2(/^(.+)\s+\|\s+Bin\s*$/, (t2, [e]) => {
1969
+ t2.files.push({
1970
+ file: e.trim(),
1971
+ before: 0,
1972
+ after: 0,
1973
+ binary: true
1974
+ });
1975
+ }),
1976
+ new l2(
1977
+ /(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,
1978
+ (t2, [e, n]) => {
1979
+ const r2 = /(\d+) i/.exec(n), s = /(\d+) d/.exec(n);
1980
+ t2.changed = p(e), t2.insertions = p(r2?.[1]), t2.deletions = p(s?.[1]);
1981
+ }
1982
+ )
1983
+ ];
1984
+ var sr = [
1985
+ new l2(
1986
+ /(\d+)\t(\d+)\t(.+)$/,
1987
+ (t2, [e, n, r2]) => {
1988
+ const s = p(e), o2 = p(n);
1989
+ t2.changed++, t2.insertions += s, t2.deletions += o2, t2.files.push({
1990
+ file: r2,
1991
+ changes: s + o2,
1992
+ insertions: s,
1993
+ deletions: o2,
1994
+ binary: false
1995
+ });
1996
+ }
1997
+ ),
1998
+ new l2(/-\t-\t(.+)$/, (t2, [e]) => {
1999
+ t2.changed++, t2.files.push({
2000
+ file: e,
2001
+ after: 0,
2002
+ before: 0,
2003
+ binary: true
2004
+ });
2005
+ })
2006
+ ];
2007
+ var or = [
2008
+ new l2(/(.+)$/, (t2, [e]) => {
2009
+ t2.changed++, t2.files.push({
2010
+ file: e,
2011
+ changes: 0,
2012
+ insertions: 0,
2013
+ deletions: 0,
2014
+ binary: false
2015
+ });
2016
+ })
2017
+ ];
2018
+ var ir = [
2019
+ new l2(
2020
+ /([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,
2021
+ (t2, [e, n, r2, s, o2]) => {
2022
+ t2.changed++, t2.files.push({
2023
+ file: o2 ?? r2,
2024
+ changes: 0,
2025
+ insertions: 0,
2026
+ deletions: 0,
2027
+ binary: false,
2028
+ status: bt(_n(e) && e),
2029
+ from: bt(!!o2 && r2 !== o2 && r2),
2030
+ similarity: p(n)
2031
+ });
2032
+ }
2033
+ )
2034
+ ];
2035
+ var ar = {
2036
+ [R2.NONE]: Ot,
2037
+ [R2.STAT]: Ot,
2038
+ [R2.NUM_STAT]: sr,
2039
+ [R2.NAME_STATUS]: ir,
2040
+ [R2.NAME_ONLY]: or
2041
+ };
2042
+ function Zt(t2 = R2.NONE) {
2043
+ const e = ar[t2];
2044
+ return (n) => E2(new rr(), e, n, false);
2045
+ }
2046
+ __name(Zt, "Zt");
2047
+ var te = "\xF2\xF2\xF2\xF2\xF2\xF2 ";
2048
+ var ee2 = " \xF2\xF2";
2049
+ var ne2 = " \xF2 ";
2050
+ var ur = ["hash", "date", "message", "refs", "author_name", "author_email"];
2051
+ function cr(t2, e) {
2052
+ return e.reduce(
2053
+ (n, r2, s) => (n[r2] = t2[s] || "", n),
2054
+ /* @__PURE__ */ Object.create({ diff: null })
2055
+ );
2056
+ }
2057
+ __name(cr, "cr");
2058
+ function re(t2 = ne2, e = ur, n = R2.NONE) {
2059
+ const r2 = Zt(n);
2060
+ return function(s) {
2061
+ const o2 = H2(
2062
+ s.trim(),
2063
+ false,
2064
+ te
2065
+ ).map(function(i) {
2066
+ const a = i.split(ee2), c3 = cr(a[0].split(t2), e);
2067
+ return a.length > 1 && a[1].trim() && (c3.diff = r2(a[1])), c3;
2068
+ });
2069
+ return {
2070
+ all: o2,
2071
+ latest: o2.length && o2[0] || null,
2072
+ total: o2.length
2073
+ };
2074
+ };
2075
+ }
2076
+ __name(re, "re");
2077
+ function fr(t2) {
2078
+ let e = pt(t2);
2079
+ const n = ["diff"];
2080
+ return e === R2.NONE && (e = R2.STAT, n.push("--stat=4096")), n.push(...t2), dt(n) || {
2081
+ commands: n,
2082
+ format: "utf-8",
2083
+ parser: Zt(e)
2084
+ };
2085
+ }
2086
+ __name(fr, "fr");
2087
+ function dt(t2) {
2088
+ const e = t2.filter(nr);
2089
+ if (e.length > 1)
2090
+ return b2(
2091
+ `Summary flags are mutually exclusive - pick one of ${e.join(",")}`
2092
+ );
2093
+ if (e.length && t2.includes("-z"))
2094
+ return b2(
2095
+ `Summary flag ${e} parsing is not compatible with null termination option '-z'`
2096
+ );
2097
+ }
2098
+ __name(dt, "dt");
2099
+ var se = /* @__PURE__ */ ((t2) => (t2[t2["--pretty"] = 0] = "--pretty", t2[t2["max-count"] = 1] = "max-count", t2[t2.maxCount = 2] = "maxCount", t2[t2.n = 3] = "n", t2[t2.file = 4] = "file", t2[t2.format = 5] = "format", t2[t2.from = 6] = "from", t2[t2.to = 7] = "to", t2[t2.splitter = 8] = "splitter", t2[t2.symmetric = 9] = "symmetric", t2[t2.mailMap = 10] = "mailMap", t2[t2.multiLine = 11] = "multiLine", t2[t2.strictDate = 12] = "strictDate", t2))(se || {});
2100
+ function lr(t2, e) {
2101
+ const n = [], r2 = [];
2102
+ return Object.keys(t2).forEach((s) => {
2103
+ n.push(s), r2.push(String(t2[s]));
2104
+ }), [n, r2.join(e)];
2105
+ }
2106
+ __name(lr, "lr");
2107
+ function hr(t2) {
2108
+ return Object.keys(t2).reduce((e, n) => (n in se || (e[n] = t2[n]), e), {});
2109
+ }
2110
+ __name(hr, "hr");
2111
+ function oe2(t2 = {}, e = []) {
2112
+ const n = d(t2.splitter, m, ne2), r2 = lt(t2.format) ? t2.format : {
2113
+ hash: "%H",
2114
+ date: t2.strictDate === false ? "%ai" : "%aI",
2115
+ message: "%s",
2116
+ refs: "%D",
2117
+ body: t2.multiLine ? "%B" : "%b",
2118
+ author_name: t2.mailMap !== false ? "%aN" : "%an",
2119
+ author_email: t2.mailMap !== false ? "%aE" : "%ae"
2120
+ }, [s, o2] = lr(r2, n), i = [], a = [
2121
+ `--pretty=format:${te}${o2}${ee2}`,
2122
+ ...e
2123
+ ], c3 = t2.n || t2["max-count"] || t2.maxCount;
2124
+ if (c3 && a.push(`--max-count=${c3}`), t2.from || t2.to) {
2125
+ const y2 = t2.symmetric !== false ? "..." : "..";
2126
+ i.push(`${t2.from || ""}${y2}${t2.to || ""}`);
2127
+ }
2128
+ return m(t2.file) && a.push("--follow", c(t2.file)), It(hr(t2), a), {
2129
+ fields: s,
2130
+ splitter: n,
2131
+ commands: [...a, ...i]
2132
+ };
2133
+ }
2134
+ __name(oe2, "oe");
2135
+ function mr(t2, e, n) {
2136
+ const r2 = re(t2, e, pt(n));
2137
+ return {
2138
+ commands: ["log", ...n],
2139
+ format: "utf-8",
2140
+ parser: r2
2141
+ };
2142
+ }
2143
+ __name(mr, "mr");
2144
+ function pr() {
2145
+ return {
2146
+ log(...n) {
2147
+ const r2 = u(arguments), s = oe2(
2148
+ ht(arguments),
2149
+ L2(d(arguments[0], K2, []))
2150
+ ), o2 = e(...n) || dt(s.commands) || t2(s);
2151
+ return this._runTask(o2, r2);
2152
+ }
2153
+ };
2154
+ function t2(n) {
2155
+ return mr(n.splitter, n.fields, n.commands);
2156
+ }
2157
+ __name(t2, "t");
2158
+ function e(n, r2) {
2159
+ return m(n) && m(r2) && b2(
2160
+ "git.log(string, string) should be replaced with git.log({ from: string, to: string })"
2161
+ );
2162
+ }
2163
+ __name(e, "e");
2164
+ }
2165
+ __name(pr, "pr");
2166
+ var Z2 = class {
2167
+ static {
2168
+ __name(this, "Z");
2169
+ }
2170
+ constructor(e, n = null, r2) {
2171
+ this.reason = e, this.file = n, this.meta = r2;
2172
+ }
2173
+ toString() {
2174
+ return `${this.file}:${this.reason}`;
2175
+ }
2176
+ };
2177
+ var dr = class {
2178
+ static {
2179
+ __name(this, "dr");
2180
+ }
2181
+ constructor() {
2182
+ this.conflicts = [], this.merges = [], this.result = "success";
2183
+ }
2184
+ get failed() {
2185
+ return this.conflicts.length > 0;
2186
+ }
2187
+ get reason() {
2188
+ return this.result;
2189
+ }
2190
+ toString() {
2191
+ return this.conflicts.length ? `CONFLICTS: ${this.conflicts.join(", ")}` : "OK";
2192
+ }
2193
+ };
2194
+ var ie = class {
2195
+ static {
2196
+ __name(this, "ie");
2197
+ }
2198
+ constructor() {
2199
+ this.remoteMessages = {
2200
+ all: []
2201
+ }, this.created = [], this.deleted = [], this.files = [], this.deletions = {}, this.insertions = {}, this.summary = {
2202
+ changes: 0,
2203
+ deletions: 0,
2204
+ insertions: 0
2205
+ };
2206
+ }
2207
+ };
2208
+ var gr = class {
2209
+ static {
2210
+ __name(this, "gr");
2211
+ }
2212
+ constructor() {
2213
+ this.remote = "", this.hash = {
2214
+ local: "",
2215
+ remote: ""
2216
+ }, this.branch = {
2217
+ local: "",
2218
+ remote: ""
2219
+ }, this.message = "";
2220
+ }
2221
+ toString() {
2222
+ return this.message;
2223
+ }
2224
+ };
2225
+ function tt(t2) {
2226
+ return t2.objects = t2.objects || {
2227
+ compressing: 0,
2228
+ counting: 0,
2229
+ enumerating: 0,
2230
+ packReused: 0,
2231
+ reused: { count: 0, delta: 0 },
2232
+ total: { count: 0, delta: 0 }
2233
+ };
2234
+ }
2235
+ __name(tt, "tt");
2236
+ function Ct(t2) {
2237
+ const e = /^\s*(\d+)/.exec(t2), n = /delta (\d+)/i.exec(t2);
2238
+ return {
2239
+ count: p(e && e[1] || "0"),
2240
+ delta: p(n && n[1] || "0")
2241
+ };
2242
+ }
2243
+ __name(Ct, "Ct");
2244
+ var yr = [
2245
+ new x2(
2246
+ /^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,
2247
+ (t2, [e, n]) => {
2248
+ const r2 = e.toLowerCase(), s = tt(t2.remoteMessages);
2249
+ Object.assign(s, { [r2]: p(n) });
2250
+ }
2251
+ ),
2252
+ new x2(
2253
+ /^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,
2254
+ (t2, [e, n]) => {
2255
+ const r2 = e.toLowerCase(), s = tt(t2.remoteMessages);
2256
+ Object.assign(s, { [r2]: p(n) });
2257
+ }
2258
+ ),
2259
+ new x2(
2260
+ /total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,
2261
+ (t2, [e, n, r2]) => {
2262
+ const s = tt(t2.remoteMessages);
2263
+ s.total = Ct(e), s.reused = Ct(n), s.packReused = p(r2);
2264
+ }
2265
+ )
2266
+ ];
2267
+ var wr = [
2268
+ new x2(/^remote:\s*(.+)$/, (t2, [e]) => (t2.remoteMessages.all.push(e.trim()), false)),
2269
+ ...yr,
2270
+ new x2(
2271
+ [/create a (?:pull|merge) request/i, /\s(https?:\/\/\S+)$/],
2272
+ (t2, [e]) => {
2273
+ t2.remoteMessages.pullRequestUrl = e;
2274
+ }
2275
+ ),
2276
+ new x2(
2277
+ [/found (\d+) vulnerabilities.+\(([^)]+)\)/i, /\s(https?:\/\/\S+)$/],
2278
+ (t2, [e, n, r2]) => {
2279
+ t2.remoteMessages.vulnerabilities = {
2280
+ count: p(e),
2281
+ summary: n,
2282
+ url: r2
2283
+ };
2284
+ }
2285
+ )
2286
+ ];
2287
+ function ae(t2, e) {
2288
+ return E2({ remoteMessages: new br() }, wr, e);
2289
+ }
2290
+ __name(ae, "ae");
2291
+ var br = class {
2292
+ static {
2293
+ __name(this, "br");
2294
+ }
2295
+ constructor() {
2296
+ this.all = [];
2297
+ }
2298
+ };
2299
+ var Tr = /^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/;
2300
+ var kr = /(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/;
2301
+ var _r = /^(create|delete) mode \d+ (.+)/;
2302
+ var vr = [
2303
+ new l2(Tr, (t2, [e, n, r2]) => {
2304
+ t2.files.push(e), n && (t2.insertions[e] = n.length), r2 && (t2.deletions[e] = r2.length);
2305
+ }),
2306
+ new l2(kr, (t2, [e, , n, , r2]) => n !== void 0 || r2 !== void 0 ? (t2.summary.changes = +e || 0, t2.summary.insertions = +n || 0, t2.summary.deletions = +r2 || 0, true) : false),
2307
+ new l2(_r, (t2, [e, n]) => {
2308
+ S2(t2.files, n), S2(e === "create" ? t2.created : t2.deleted, n);
2309
+ })
2310
+ ];
2311
+ var Er = [
2312
+ new l2(/^from\s(.+)$/i, (t2, [e]) => {
2313
+ t2.remote = e;
2314
+ }),
2315
+ new l2(/^fatal:\s(.+)$/, (t2, [e]) => {
2316
+ t2.message = e;
2317
+ }),
2318
+ new l2(
2319
+ /([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,
2320
+ (t2, [e, n, r2, s]) => {
2321
+ t2.branch.local = r2, t2.hash.local = e, t2.branch.remote = s, t2.hash.remote = n;
2322
+ }
2323
+ )
2324
+ ];
2325
+ var Sr = /* @__PURE__ */ __name((t2, e) => E2(new ie(), vr, [t2, e]), "Sr");
2326
+ var ue = /* @__PURE__ */ __name((t2, e) => Object.assign(
2327
+ new ie(),
2328
+ Sr(t2, e),
2329
+ ae(t2, e)
2330
+ ), "ue");
2331
+ function Rr(t2, e) {
2332
+ const n = E2(new gr(), Er, [t2, e]);
2333
+ return n.message && n;
2334
+ }
2335
+ __name(Rr, "Rr");
2336
+ var Or = [
2337
+ new l2(/^Auto-merging\s+(.+)$/, (t2, [e]) => {
2338
+ t2.merges.push(e);
2339
+ }),
2340
+ new l2(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/, (t2, [e, n]) => {
2341
+ t2.conflicts.push(new Z2(e, n));
2342
+ }),
2343
+ new l2(
2344
+ /^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,
2345
+ (t2, [e, n, r2]) => {
2346
+ t2.conflicts.push(new Z2(e, n, { deleteRef: r2 }));
2347
+ }
2348
+ ),
2349
+ new l2(/^CONFLICT\s+\((.+)\):/, (t2, [e]) => {
2350
+ t2.conflicts.push(new Z2(e, null));
2351
+ }),
2352
+ new l2(/^Automatic merge failed;\s+(.+)$/, (t2, [e]) => {
2353
+ t2.result = e;
2354
+ })
2355
+ ];
2356
+ var Cr = /* @__PURE__ */ __name((t2, e) => Object.assign(Ar(t2), ue(t2, e)), "Cr");
2357
+ var Ar = /* @__PURE__ */ __name((t2) => E2(new dr(), Or, t2), "Ar");
2358
+ function At(t2) {
2359
+ return t2.length ? {
2360
+ commands: ["merge", ...t2],
2361
+ format: "utf-8",
2362
+ parser(e, n) {
2363
+ const r2 = Cr(e, n);
2364
+ if (r2.failed)
2365
+ throw new at(r2);
2366
+ return r2;
2367
+ }
2368
+ } : b2("Git.merge requires at least one option");
2369
+ }
2370
+ __name(At, "At");
2371
+ function xr(t2, e, n) {
2372
+ const r2 = n.includes("deleted"), s = n.includes("tag") || /^refs\/tags/.test(t2), o2 = !n.includes("new");
2373
+ return {
2374
+ deleted: r2,
2375
+ tag: s,
2376
+ branch: !s,
2377
+ new: !o2,
2378
+ alreadyUpdated: o2,
2379
+ local: t2,
2380
+ remote: e
2381
+ };
2382
+ }
2383
+ __name(xr, "xr");
2384
+ var Nr = [
2385
+ new l2(/^Pushing to (.+)$/, (t2, [e]) => {
2386
+ t2.repo = e;
2387
+ }),
2388
+ new l2(/^updating local tracking ref '(.+)'/, (t2, [e]) => {
2389
+ t2.ref = {
2390
+ ...t2.ref || {},
2391
+ local: e
2392
+ };
2393
+ }),
2394
+ new l2(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/, (t2, [e, n, r2]) => {
2395
+ t2.pushed.push(xr(e, n, r2));
2396
+ }),
2397
+ new l2(
2398
+ /^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,
2399
+ (t2, [e, n, r2]) => {
2400
+ t2.branch = {
2401
+ ...t2.branch || {},
2402
+ local: e,
2403
+ remote: n,
2404
+ remoteName: r2
2405
+ };
2406
+ }
2407
+ ),
2408
+ new l2(
2409
+ /^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,
2410
+ (t2, [e, n, r2, s]) => {
2411
+ t2.update = {
2412
+ head: {
2413
+ local: e,
2414
+ remote: n
2415
+ },
2416
+ hash: {
2417
+ from: r2,
2418
+ to: s
2419
+ }
2420
+ };
2421
+ }
2422
+ )
2423
+ ];
2424
+ var $r = /* @__PURE__ */ __name((t2, e) => {
2425
+ const n = Pr(t2, e), r2 = ae(t2, e);
2426
+ return {
2427
+ ...n,
2428
+ ...r2
2429
+ };
2430
+ }, "$r");
2431
+ var Pr = /* @__PURE__ */ __name((t2, e) => E2({ pushed: [] }, Nr, [t2, e]), "Pr");
2432
+ function Mr(t2 = {}, e) {
2433
+ return S2(e, "--tags"), ce(t2, e);
2434
+ }
2435
+ __name(Mr, "Mr");
2436
+ function ce(t2 = {}, e) {
2437
+ const n = ["push", ...e];
2438
+ return t2.branch && n.splice(1, 0, t2.branch), t2.remote && n.splice(1, 0, t2.remote), ct(n, "-v"), S2(n, "--verbose"), S2(n, "--porcelain"), {
2439
+ commands: n,
2440
+ format: "utf-8",
2441
+ parser: $r
2442
+ };
2443
+ }
2444
+ __name(ce, "ce");
2445
+ function Dr() {
2446
+ return {
2447
+ showBuffer() {
2448
+ const t2 = ["show", ...h2(arguments, 1)];
2449
+ return t2.includes("--binary") || t2.splice(1, 0, "--binary"), this._runTask(
2450
+ Gt(t2),
2451
+ u(arguments)
2452
+ );
2453
+ },
2454
+ show() {
2455
+ const t2 = ["show", ...h2(arguments, 1)];
2456
+ return this._runTask(
2457
+ g(t2),
2458
+ u(arguments)
2459
+ );
2460
+ }
2461
+ };
2462
+ }
2463
+ __name(Dr, "Dr");
2464
+ var Lr = /^(.+)\0(.+)$/;
2465
+ var jr = class {
2466
+ static {
2467
+ __name(this, "jr");
2468
+ }
2469
+ constructor(e, n, r2) {
2470
+ if (this.path = e, this.index = n, this.working_dir = r2, n === "R" || r2 === "R") {
2471
+ const s = Lr.exec(e) || [null, e, e];
2472
+ this.from = s[2] || "", this.path = s[1] || "";
2473
+ }
2474
+ }
2475
+ };
2476
+ var Br = class {
2477
+ static {
2478
+ __name(this, "Br");
2479
+ }
2480
+ constructor() {
2481
+ this.not_added = [], this.conflicted = [], this.created = [], this.deleted = [], this.ignored = void 0, this.modified = [], this.renamed = [], this.files = [], this.staged = [], this.ahead = 0, this.behind = 0, this.current = null, this.tracking = null, this.detached = false, this.isClean = () => !this.files.length;
2482
+ }
2483
+ };
2484
+ function xt(t2) {
2485
+ const [e, n] = t2.split(I2);
2486
+ return {
2487
+ from: n || e,
2488
+ to: e
2489
+ };
2490
+ }
2491
+ __name(xt, "xt");
2492
+ function _2(t2, e, n) {
2493
+ return [`${t2}${e}`, n];
2494
+ }
2495
+ __name(_2, "_");
2496
+ function et(t2, ...e) {
2497
+ return e.map((n) => _2(t2, n, (r2, s) => r2.conflicted.push(s)));
2498
+ }
2499
+ __name(et, "et");
2500
+ var Ir = new Map([
2501
+ _2(
2502
+ " ",
2503
+ "A",
2504
+ (t2, e) => t2.created.push(e)
2505
+ ),
2506
+ _2(
2507
+ " ",
2508
+ "D",
2509
+ (t2, e) => t2.deleted.push(e)
2510
+ ),
2511
+ _2(
2512
+ " ",
2513
+ "M",
2514
+ (t2, e) => t2.modified.push(e)
2515
+ ),
2516
+ _2("A", " ", (t2, e) => {
2517
+ t2.created.push(e), t2.staged.push(e);
2518
+ }),
2519
+ _2("A", "M", (t2, e) => {
2520
+ t2.created.push(e), t2.staged.push(e), t2.modified.push(e);
2521
+ }),
2522
+ _2("D", " ", (t2, e) => {
2523
+ t2.deleted.push(e), t2.staged.push(e);
2524
+ }),
2525
+ _2("M", " ", (t2, e) => {
2526
+ t2.modified.push(e), t2.staged.push(e);
2527
+ }),
2528
+ _2("M", "M", (t2, e) => {
2529
+ t2.modified.push(e), t2.staged.push(e);
2530
+ }),
2531
+ _2("R", " ", (t2, e) => {
2532
+ t2.renamed.push(xt(e));
2533
+ }),
2534
+ _2("R", "M", (t2, e) => {
2535
+ const n = xt(e);
2536
+ t2.renamed.push(n), t2.modified.push(n.to);
2537
+ }),
2538
+ _2("!", "!", (t2, e) => {
2539
+ (t2.ignored = t2.ignored || []).push(e);
2540
+ }),
2541
+ _2(
2542
+ "?",
2543
+ "?",
2544
+ (t2, e) => t2.not_added.push(e)
2545
+ ),
2546
+ ...et(
2547
+ "A",
2548
+ "A",
2549
+ "U"
2550
+ /* UNMERGED */
2551
+ ),
2552
+ ...et(
2553
+ "D",
2554
+ "D",
2555
+ "U"
2556
+ /* UNMERGED */
2557
+ ),
2558
+ ...et(
2559
+ "U",
2560
+ "A",
2561
+ "D",
2562
+ "U"
2563
+ /* UNMERGED */
2564
+ ),
2565
+ [
2566
+ "##",
2567
+ (t2, e) => {
2568
+ const n = /ahead (\d+)/, r2 = /behind (\d+)/, s = /^(.+?(?=(?:\.{3}|\s|$)))/, o2 = /\.{3}(\S*)/, i = /\son\s(\S+?)(?=\.{3}|$)/;
2569
+ let a = n.exec(e);
2570
+ t2.ahead = a && +a[1] || 0, a = r2.exec(e), t2.behind = a && +a[1] || 0, a = s.exec(e), t2.current = d(a?.[1], m, null), a = o2.exec(e), t2.tracking = d(a?.[1], m, null), a = i.exec(e), a && (t2.current = d(a?.[1], m, t2.current)), t2.detached = /\(no branch\)/.test(e);
2571
+ }
2572
+ ]
2573
+ ]);
2574
+ var Ur = /* @__PURE__ */ __name(function(t2) {
2575
+ const e = t2.split(I2), n = new Br();
2576
+ for (let r2 = 0, s = e.length; r2 < s; ) {
2577
+ let o2 = e[r2++].trim();
2578
+ o2 && (o2.charAt(0) === "R" && (o2 += I2 + (e[r2++] || "")), Fr(n, o2));
2579
+ }
2580
+ return n;
2581
+ }, "Ur");
2582
+ function Fr(t2, e) {
2583
+ const n = e.trim();
2584
+ switch (" ") {
2585
+ case n.charAt(2):
2586
+ return r2(n.charAt(0), n.charAt(1), n.slice(3));
2587
+ case n.charAt(1):
2588
+ return r2(" ", n.charAt(0), n.slice(2));
2589
+ default:
2590
+ return;
2591
+ }
2592
+ function r2(s, o2, i) {
2593
+ const a = `${s}${o2}`, c3 = Ir.get(a);
2594
+ c3 && c3(t2, i), a !== "##" && a !== "!!" && t2.files.push(new jr(i, s, o2));
2595
+ }
2596
+ __name(r2, "r");
2597
+ }
2598
+ __name(Fr, "Fr");
2599
+ var Gr = ["--null", "-z"];
2600
+ function zr(t2) {
2601
+ return {
2602
+ format: "utf-8",
2603
+ commands: [
2604
+ "status",
2605
+ "--porcelain",
2606
+ "-b",
2607
+ "-u",
2608
+ "--null",
2609
+ ...t2.filter((n) => !Gr.includes(n))
2610
+ ],
2611
+ parser(n) {
2612
+ return Ur(n);
2613
+ }
2614
+ };
2615
+ }
2616
+ __name(zr, "zr");
2617
+ var fe = "installed=false";
2618
+ function q2(t2 = 0, e = 0, n = 0, r2 = "", s = true) {
2619
+ return Object.defineProperty(
2620
+ {
2621
+ major: t2,
2622
+ minor: e,
2623
+ patch: n,
2624
+ agent: r2,
2625
+ installed: s
2626
+ },
2627
+ "toString",
2628
+ {
2629
+ value() {
2630
+ return `${this.major}.${this.minor}.${this.patch}`;
2631
+ },
2632
+ configurable: false,
2633
+ enumerable: false
2634
+ }
2635
+ );
2636
+ }
2637
+ __name(q2, "q");
2638
+ function qr() {
2639
+ return q2(0, 0, 0, "", false);
2640
+ }
2641
+ __name(qr, "qr");
2642
+ function Wr() {
2643
+ return {
2644
+ version() {
2645
+ return this._runTask({
2646
+ commands: ["--version"],
2647
+ format: "utf-8",
2648
+ parser: Kr,
2649
+ onError(t2, e, n, r2) {
2650
+ if (t2.exitCode === V2.NOT_FOUND)
2651
+ return n(Buffer.from(fe));
2652
+ r2(e);
2653
+ }
2654
+ });
2655
+ }
2656
+ };
2657
+ }
2658
+ __name(Wr, "Wr");
2659
+ var Hr = [
2660
+ new l2(
2661
+ /version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,
2662
+ (t2, [e, n, r2, s = ""]) => {
2663
+ Object.assign(
2664
+ t2,
2665
+ q2(p(e), p(n), p(r2), s)
2666
+ );
2667
+ }
2668
+ ),
2669
+ new l2(
2670
+ /version (\d+)\.(\d+)\.(\D+)(.+)?$/,
2671
+ (t2, [e, n, r2, s = ""]) => {
2672
+ Object.assign(t2, q2(p(e), p(n), r2, s));
2673
+ }
2674
+ )
2675
+ ];
2676
+ function Kr(t2) {
2677
+ return t2 === fe ? qr() : E2(q2(0, 0, 0, t2), Hr, t2);
2678
+ }
2679
+ __name(Kr, "Kr");
2680
+ var le = class {
2681
+ static {
2682
+ __name(this, "le");
2683
+ }
2684
+ constructor(e) {
2685
+ this._executor = e;
2686
+ }
2687
+ _runTask(e, n) {
2688
+ const r2 = this._executor.chain(), s = r2.push(e);
2689
+ return n && Ln(e, s, n), Object.create(this, {
2690
+ then: { value: s.then.bind(s) },
2691
+ catch: { value: s.catch.bind(s) },
2692
+ _executor: { value: r2 }
2693
+ });
2694
+ }
2695
+ add(e) {
2696
+ return this._runTask(
2697
+ g(["add", ...v(e)]),
2698
+ u(arguments)
2699
+ );
2700
+ }
2701
+ cwd(e) {
2702
+ const n = u(arguments);
2703
+ return typeof e == "string" ? this._runTask(St(e, this._executor), n) : typeof e?.path == "string" ? this._runTask(
2704
+ St(
2705
+ e.path,
2706
+ e.root && this._executor || void 0
2707
+ ),
2708
+ n
2709
+ ) : this._runTask(
2710
+ b2("Git.cwd: workingDirectory must be supplied as a string"),
2711
+ n
2712
+ );
2713
+ }
2714
+ hashObject(e, n) {
2715
+ return this._runTask(
2716
+ Vn(e, n === true),
2717
+ u(arguments)
2718
+ );
2719
+ }
2720
+ init(e) {
2721
+ return this._runTask(
2722
+ Zn(e === true, this._executor.cwd, h2(arguments)),
2723
+ u(arguments)
2724
+ );
2725
+ }
2726
+ merge() {
2727
+ return this._runTask(
2728
+ At(h2(arguments)),
2729
+ u(arguments)
2730
+ );
2731
+ }
2732
+ mergeFromTo(e, n) {
2733
+ return m(e) && m(n) ? this._runTask(
2734
+ At([e, n, ...h2(arguments)]),
2735
+ u(arguments, false)
2736
+ ) : this._runTask(
2737
+ b2(
2738
+ "Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"
2739
+ )
2740
+ );
2741
+ }
2742
+ outputHandler(e) {
2743
+ return this._executor.outputHandler = e, this;
2744
+ }
2745
+ push() {
2746
+ const e = ce(
2747
+ {
2748
+ remote: d(arguments[0], m),
2749
+ branch: d(arguments[1], m)
2750
+ },
2751
+ h2(arguments)
2752
+ );
2753
+ return this._runTask(e, u(arguments));
2754
+ }
2755
+ stash() {
2756
+ return this._runTask(
2757
+ g(["stash", ...h2(arguments)]),
2758
+ u(arguments)
2759
+ );
2760
+ }
2761
+ status() {
2762
+ return this._runTask(
2763
+ zr(h2(arguments)),
2764
+ u(arguments)
2765
+ );
2766
+ }
2767
+ };
2768
+ Object.assign(
2769
+ le.prototype,
2770
+ jn(),
2771
+ In(),
2772
+ zn(),
2773
+ Tn(),
2774
+ Hn(),
2775
+ Kn(),
2776
+ On(),
2777
+ er(),
2778
+ pr(),
2779
+ Dr(),
2780
+ Wr()
2781
+ );
2782
+ var Vr = /* @__PURE__ */ (() => {
2783
+ let t2 = 0;
2784
+ return () => {
2785
+ t2++;
2786
+ const { promise: e, done: n } = (0, import_promise_deferred.createDeferred)();
2787
+ return {
2788
+ promise: e,
2789
+ done: n,
2790
+ id: t2
2791
+ };
2792
+ };
2793
+ })();
2794
+ var Xr = class {
2795
+ static {
2796
+ __name(this, "Xr");
2797
+ }
2798
+ constructor(e = 2) {
2799
+ this.concurrency = e, this.logger = $2("", "scheduler"), this.pending = [], this.running = [], this.logger("Constructed, concurrency=%s", e);
2800
+ }
2801
+ schedule() {
2802
+ if (!this.pending.length || this.running.length >= this.concurrency) {
2803
+ this.logger(
2804
+ "Schedule attempt ignored, pending=%s running=%s concurrency=%s",
2805
+ this.pending.length,
2806
+ this.running.length,
2807
+ this.concurrency
2808
+ );
2809
+ return;
2810
+ }
2811
+ const e = S2(this.running, this.pending.shift());
2812
+ this.logger("Attempting id=%s", e.id), e.done(() => {
2813
+ this.logger("Completing id=", e.id), ct(this.running, e), this.schedule();
2814
+ });
2815
+ }
2816
+ next() {
2817
+ const { promise: e, id: n } = S2(this.pending, Vr());
2818
+ return this.logger("Scheduling id=%s", n), this.schedule(), e;
2819
+ }
2820
+ };
2821
+ function Yr(t2, e) {
2822
+ return g(["apply", ...e, ...t2]);
2823
+ }
2824
+ __name(Yr, "Yr");
2825
+ var he = /* @__PURE__ */ ((t2) => (t2.CURRENT = "*", t2.LINKED = "+", t2))(he || {});
2826
+ var Qr = class {
2827
+ static {
2828
+ __name(this, "Qr");
2829
+ }
2830
+ constructor() {
2831
+ this.all = [], this.branches = {}, this.current = "", this.detached = false;
2832
+ }
2833
+ push(e, n, r2, s, o2) {
2834
+ e === "*" && (this.detached = n, this.current = r2), this.all.push(r2), this.branches[r2] = {
2835
+ current: e === "*",
2836
+ linkedWorkTree: e === "+",
2837
+ name: r2,
2838
+ commit: s,
2839
+ label: o2
2840
+ };
2841
+ }
2842
+ };
2843
+ var Jr = [
2844
+ new l2(
2845
+ /^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,
2846
+ (t2, [e, n, r2, s]) => {
2847
+ t2.push(Nt(e), true, n, r2, s);
2848
+ }
2849
+ ),
2850
+ new l2(
2851
+ /^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,
2852
+ (t2, [e, n, r2, s]) => {
2853
+ t2.push(Nt(e), false, n, r2, s);
2854
+ }
2855
+ )
2856
+ ];
2857
+ var Zr = new l2(/^(\S+)$/s, (t2, [e]) => {
2858
+ t2.push(he.CURRENT, false, e, "", "");
2859
+ });
2860
+ function Nt(t2) {
2861
+ return t2 ? t2.charAt(0) : "";
2862
+ }
2863
+ __name(Nt, "Nt");
2864
+ function me(t2, e = false) {
2865
+ return E2(
2866
+ new Qr(),
2867
+ e ? [Zr] : Jr,
2868
+ t2
2869
+ );
2870
+ }
2871
+ __name(me, "me");
2872
+ var ts = class {
2873
+ static {
2874
+ __name(this, "ts");
2875
+ }
2876
+ constructor() {
2877
+ this.all = [], this.branches = {}, this.errors = [];
2878
+ }
2879
+ get success() {
2880
+ return !this.errors.length;
2881
+ }
2882
+ };
2883
+ function es(t2, e) {
2884
+ return {
2885
+ branch: t2,
2886
+ hash: e,
2887
+ success: true
2888
+ };
2889
+ }
2890
+ __name(es, "es");
2891
+ function ns(t2) {
2892
+ return {
2893
+ branch: t2,
2894
+ hash: null,
2895
+ success: false
2896
+ };
2897
+ }
2898
+ __name(ns, "ns");
2899
+ var rs = /(\S+)\s+\(\S+\s([^)]+)\)/;
2900
+ var pe = /^error[^']+'([^']+)'/m;
2901
+ var ss = [
2902
+ new l2(rs, (t2, [e, n]) => {
2903
+ const r2 = es(e, n);
2904
+ t2.all.push(r2), t2.branches[e] = r2;
2905
+ }),
2906
+ new l2(pe, (t2, [e]) => {
2907
+ const n = ns(e);
2908
+ t2.errors.push(n), t2.all.push(n), t2.branches[e] = n;
2909
+ })
2910
+ ];
2911
+ var gt = /* @__PURE__ */ __name((t2, e) => E2(new ts(), ss, [t2, e]), "gt");
2912
+ function de(t2, e) {
2913
+ return e === V2.ERROR && pe.test(t2);
2914
+ }
2915
+ __name(de, "de");
2916
+ function os(t2) {
2917
+ const e = ["-d", "-D", "--delete"];
2918
+ return t2.some((n) => e.includes(n));
2919
+ }
2920
+ __name(os, "os");
2921
+ function is(t2) {
2922
+ const e = os(t2), n = t2.includes("--show-current"), r2 = ["branch", ...t2];
2923
+ return r2.length === 1 && r2.push("-a"), r2.includes("-v") || r2.splice(1, 0, "-v"), {
2924
+ format: "utf-8",
2925
+ commands: r2,
2926
+ parser(s, o2) {
2927
+ return e ? gt(s, o2).all[0] : me(s, n);
2928
+ }
2929
+ };
2930
+ }
2931
+ __name(is, "is");
2932
+ function as() {
2933
+ return {
2934
+ format: "utf-8",
2935
+ commands: ["branch", "-v"],
2936
+ parser(t2) {
2937
+ return me(t2);
2938
+ }
2939
+ };
2940
+ }
2941
+ __name(as, "as");
2942
+ function us(t2, e = false) {
2943
+ return {
2944
+ format: "utf-8",
2945
+ commands: ["branch", "-v", e ? "-D" : "-d", ...t2],
2946
+ parser(n, r2) {
2947
+ return gt(n, r2);
2948
+ },
2949
+ onError({ exitCode: n, stdOut: r2 }, s, o2, i) {
2950
+ if (!de(String(s), n))
2951
+ return i(s);
2952
+ o2(r2);
2953
+ }
2954
+ };
2955
+ }
2956
+ __name(us, "us");
2957
+ function cs(t2, e = false) {
2958
+ const n = {
2959
+ format: "utf-8",
2960
+ commands: ["branch", "-v", e ? "-D" : "-d", t2],
2961
+ parser(r2, s) {
2962
+ return gt(r2, s).branches[t2];
2963
+ },
2964
+ onError({ exitCode: r2, stdErr: s, stdOut: o2 }, i, a, c3) {
2965
+ if (!de(String(i), r2))
2966
+ return c3(i);
2967
+ throw new at(
2968
+ n.parser(F2(o2), F2(s)),
2969
+ String(i)
2970
+ );
2971
+ }
2972
+ };
2973
+ return n;
2974
+ }
2975
+ __name(cs, "cs");
2976
+ function fs(t2) {
2977
+ return {
2978
+ commands: ["check-ignore", ...t2],
2979
+ format: "utf-8",
2980
+ parser: ls
2981
+ };
2982
+ }
2983
+ __name(fs, "fs");
2984
+ function ls(t2) {
2985
+ return t2.split(/\n/g).map(hs).filter(Boolean);
2986
+ }
2987
+ __name(ls, "ls");
2988
+ function hs(t2) {
2989
+ const e = t2.trim().replace(/^["']|["']$/g, "");
2990
+ return e && Se(e);
2991
+ }
2992
+ __name(hs, "hs");
2993
+ var ms = [
2994
+ new l2(/From (.+)$/, (t2, [e]) => {
2995
+ t2.remote = e;
2996
+ }),
2997
+ new l2(/\* \[new branch]\s+(\S+)\s*-> (.+)$/, (t2, [e, n]) => {
2998
+ t2.branches.push({
2999
+ name: e,
3000
+ tracking: n
3001
+ });
3002
+ }),
3003
+ new l2(/\* \[new tag]\s+(\S+)\s*-> (.+)$/, (t2, [e, n]) => {
3004
+ t2.tags.push({
3005
+ name: e,
3006
+ tracking: n
3007
+ });
3008
+ }),
3009
+ new l2(/- \[deleted]\s+\S+\s*-> (.+)$/, (t2, [e]) => {
3010
+ t2.deleted.push({
3011
+ tracking: e
3012
+ });
3013
+ }),
3014
+ new l2(
3015
+ /\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,
3016
+ (t2, [e, n, r2, s]) => {
3017
+ t2.updated.push({
3018
+ name: r2,
3019
+ tracking: s,
3020
+ to: n,
3021
+ from: e
3022
+ });
3023
+ }
3024
+ )
3025
+ ];
3026
+ function ps(t2, e) {
3027
+ return E2({
3028
+ raw: t2,
3029
+ remote: null,
3030
+ branches: [],
3031
+ tags: [],
3032
+ updated: [],
3033
+ deleted: []
3034
+ }, ms, [t2, e]);
3035
+ }
3036
+ __name(ps, "ps");
3037
+ function ds(t2) {
3038
+ return /^--upload-pack(=|$)/.test(t2);
3039
+ }
3040
+ __name(ds, "ds");
3041
+ function gs(t2, e, n) {
3042
+ const r2 = ["fetch", ...n];
3043
+ return t2 && e && r2.push(t2, e), r2.find(ds) ? b2("git.fetch: potential exploit argument blocked.") : {
3044
+ commands: r2,
3045
+ format: "utf-8",
3046
+ parser: ps
3047
+ };
3048
+ }
3049
+ __name(gs, "gs");
3050
+ var ys = [
3051
+ new l2(/^Renaming (.+) to (.+)$/, (t2, [e, n]) => {
3052
+ t2.moves.push({ from: e, to: n });
3053
+ })
3054
+ ];
3055
+ function ws(t2) {
3056
+ return E2({ moves: [] }, ys, t2);
3057
+ }
3058
+ __name(ws, "ws");
3059
+ function bs(t2, e) {
3060
+ return {
3061
+ commands: ["mv", "-v", ...v(t2), e],
3062
+ format: "utf-8",
3063
+ parser: ws
3064
+ };
3065
+ }
3066
+ __name(bs, "bs");
3067
+ function Ts(t2, e, n) {
3068
+ const r2 = ["pull", ...n];
3069
+ return t2 && e && r2.splice(1, 0, t2, e), {
3070
+ commands: r2,
3071
+ format: "utf-8",
3072
+ parser(s, o2) {
3073
+ return ue(s, o2);
3074
+ },
3075
+ onError(s, o2, i, a) {
3076
+ const c3 = Rr(
3077
+ F2(s.stdOut),
3078
+ F2(s.stdErr)
3079
+ );
3080
+ if (c3)
3081
+ return a(new at(c3));
3082
+ a(o2);
3083
+ }
3084
+ };
3085
+ }
3086
+ __name(Ts, "Ts");
3087
+ function ks(t2) {
3088
+ const e = {};
3089
+ return ge(t2, ([n]) => e[n] = { name: n }), Object.values(e);
3090
+ }
3091
+ __name(ks, "ks");
3092
+ function _s(t2) {
3093
+ const e = {};
3094
+ return ge(t2, ([n, r2, s]) => {
3095
+ Object.hasOwn(e, n) || (e[n] = {
3096
+ name: n,
3097
+ refs: { fetch: "", push: "" }
3098
+ }), s && r2 && (e[n].refs[s.replace(/[^a-z]/g, "")] = r2);
3099
+ }), Object.values(e);
3100
+ }
3101
+ __name(_s, "_s");
3102
+ function ge(t2, e) {
3103
+ ut(t2, (n) => e(n.split(/\s+/)));
3104
+ }
3105
+ __name(ge, "ge");
3106
+ function vs(t2, e, n) {
3107
+ return g(["remote", "add", ...n, t2, e]);
3108
+ }
3109
+ __name(vs, "vs");
3110
+ function Es(t2) {
3111
+ const e = ["remote"];
3112
+ return t2 && e.push("-v"), {
3113
+ commands: e,
3114
+ format: "utf-8",
3115
+ parser: t2 ? _s : ks
3116
+ };
3117
+ }
3118
+ __name(Es, "Es");
3119
+ function Ss(t2) {
3120
+ const e = [...t2];
3121
+ return e[0] !== "ls-remote" && e.unshift("ls-remote"), g(e);
3122
+ }
3123
+ __name(Ss, "Ss");
3124
+ function Rs(t2) {
3125
+ const e = [...t2];
3126
+ return e[0] !== "remote" && e.unshift("remote"), g(e);
3127
+ }
3128
+ __name(Rs, "Rs");
3129
+ function Os(t2) {
3130
+ return g(["remote", "remove", t2]);
3131
+ }
3132
+ __name(Os, "Os");
3133
+ function Cs(t2 = {}, e) {
3134
+ const n = oe2(t2), r2 = ["stash", "list", ...n.commands, ...e], s = re(
3135
+ n.splitter,
3136
+ n.fields,
3137
+ pt(r2)
3138
+ );
3139
+ return dt(r2) || {
3140
+ commands: r2,
3141
+ format: "utf-8",
3142
+ parser: s
3143
+ };
3144
+ }
3145
+ __name(Cs, "Cs");
3146
+ function As(t2, e) {
3147
+ return X2(["add", t2, e]);
3148
+ }
3149
+ __name(As, "As");
3150
+ function xs(t2) {
3151
+ return X2(["init", ...t2]);
3152
+ }
3153
+ __name(xs, "xs");
3154
+ function X2(t2) {
3155
+ const e = [...t2];
3156
+ return e[0] !== "submodule" && e.unshift("submodule"), g(e);
3157
+ }
3158
+ __name(X2, "X");
3159
+ function Ns(t2) {
3160
+ return X2(["update", ...t2]);
3161
+ }
3162
+ __name(Ns, "Ns");
3163
+ var $s = class {
3164
+ static {
3165
+ __name(this, "$s");
3166
+ }
3167
+ constructor(e, n) {
3168
+ this.all = e, this.latest = n;
3169
+ }
3170
+ };
3171
+ var Ps = /* @__PURE__ */ __name(function(t2, e = false) {
3172
+ const n = t2.split(`
3173
+ `).map(Ds).filter(Boolean);
3174
+ e || n.sort(function(s, o2) {
3175
+ const i = s.split("."), a = o2.split(".");
3176
+ if (i.length === 1 || a.length === 1)
3177
+ return Ms(B2(i[0]), B2(a[0]));
3178
+ for (let c3 = 0, y2 = Math.max(i.length, a.length); c3 < y2; c3++) {
3179
+ const w2 = ye(B2(i[c3]), B2(a[c3]));
3180
+ if (w2)
3181
+ return w2;
3182
+ }
3183
+ return 0;
3184
+ });
3185
+ const r2 = e ? n[0] : [...n].reverse().find((s) => s.indexOf(".") >= 0);
3186
+ return new $s(n, r2);
3187
+ }, "Ps");
3188
+ function Ms(t2, e) {
3189
+ const n = Number.isNaN(t2), r2 = Number.isNaN(e);
3190
+ return n !== r2 ? n ? 1 : -1 : n ? ye(t2, e) : 0;
3191
+ }
3192
+ __name(Ms, "Ms");
3193
+ function ye(t2, e) {
3194
+ return t2 === e ? 0 : t2 > e ? 1 : -1;
3195
+ }
3196
+ __name(ye, "ye");
3197
+ function Ds(t2) {
3198
+ return t2.trim();
3199
+ }
3200
+ __name(Ds, "Ds");
3201
+ function B2(t2) {
3202
+ return typeof t2 == "string" && parseInt(t2.replace(/^\D+/g, ""), 10) || 0;
3203
+ }
3204
+ __name(B2, "B");
3205
+ function Ls(t2 = []) {
3206
+ const e = t2.some((n) => /^--sort=/.test(n));
3207
+ return {
3208
+ format: "utf-8",
3209
+ commands: ["tag", "-l", ...t2],
3210
+ parser(n) {
3211
+ return Ps(n, e);
3212
+ }
3213
+ };
3214
+ }
3215
+ __name(Ls, "Ls");
3216
+ function js(t2) {
3217
+ return {
3218
+ format: "utf-8",
3219
+ commands: ["tag", t2],
3220
+ parser() {
3221
+ return { name: t2 };
3222
+ }
3223
+ };
3224
+ }
3225
+ __name(js, "js");
3226
+ function Bs(t2, e) {
3227
+ return {
3228
+ format: "utf-8",
3229
+ commands: ["tag", "-a", "-m", e, t2],
3230
+ parser() {
3231
+ return { name: t2 };
3232
+ }
3233
+ };
3234
+ }
3235
+ __name(Bs, "Bs");
3236
+ function f2(t2, e) {
3237
+ this._plugins = e, this._executor = new Dn(
3238
+ t2.baseDir,
3239
+ new Xr(t2.maxConcurrentProcesses),
3240
+ e
3241
+ ), this._trimmed = t2.trimmed;
3242
+ }
3243
+ __name(f2, "f");
3244
+ (f2.prototype = Object.create(le.prototype)).constructor = f2;
3245
+ f2.prototype.customBinary = function(t2) {
3246
+ return this._plugins.reconfigure("binary", t2), this;
3247
+ };
3248
+ f2.prototype.env = function(t2, e) {
3249
+ return arguments.length === 1 && typeof t2 == "object" ? this._executor.env = t2 : (this._executor.env = this._executor.env || {})[t2] = e, this;
3250
+ };
3251
+ f2.prototype.stashList = function(t2) {
3252
+ return this._runTask(
3253
+ Cs(
3254
+ ht(arguments) || {},
3255
+ K2(t2) && t2 || []
3256
+ ),
3257
+ u(arguments)
3258
+ );
3259
+ };
3260
+ f2.prototype.mv = function(t2, e) {
3261
+ return this._runTask(bs(t2, e), u(arguments));
3262
+ };
3263
+ f2.prototype.checkoutLatestTag = function(t2) {
3264
+ var e = this;
3265
+ return this.pull(function() {
3266
+ e.tags(function(n, r2) {
3267
+ e.checkout(r2.latest, t2);
3268
+ });
3269
+ });
3270
+ };
3271
+ f2.prototype.pull = function(t2, e, n, r2) {
3272
+ return this._runTask(
3273
+ Ts(
3274
+ d(t2, m),
3275
+ d(e, m),
3276
+ h2(arguments)
3277
+ ),
3278
+ u(arguments)
3279
+ );
3280
+ };
3281
+ f2.prototype.fetch = function(t2, e) {
3282
+ return this._runTask(
3283
+ gs(
3284
+ d(t2, m),
3285
+ d(e, m),
3286
+ h2(arguments)
3287
+ ),
3288
+ u(arguments)
3289
+ );
3290
+ };
3291
+ f2.prototype.tags = function(t2, e) {
3292
+ return this._runTask(
3293
+ Ls(h2(arguments)),
3294
+ u(arguments)
3295
+ );
3296
+ };
3297
+ f2.prototype.rebase = function() {
3298
+ return this._runTask(
3299
+ g(["rebase", ...h2(arguments)]),
3300
+ u(arguments)
3301
+ );
3302
+ };
3303
+ f2.prototype.reset = function(t2) {
3304
+ return this._runTask(
3305
+ An(xn(t2), h2(arguments)),
3306
+ u(arguments)
3307
+ );
3308
+ };
3309
+ f2.prototype.revert = function(t2) {
3310
+ const e = u(arguments);
3311
+ return typeof t2 != "string" ? this._runTask(b2("Commit must be a string"), e) : this._runTask(
3312
+ g(["revert", ...h2(arguments, 0, true), t2]),
3313
+ e
3314
+ );
3315
+ };
3316
+ f2.prototype.addTag = function(t2) {
3317
+ const e = typeof t2 == "string" ? js(t2) : b2("Git.addTag requires a tag name");
3318
+ return this._runTask(e, u(arguments));
3319
+ };
3320
+ f2.prototype.addAnnotatedTag = function(t2, e) {
3321
+ return this._runTask(
3322
+ Bs(t2, e),
3323
+ u(arguments)
3324
+ );
3325
+ };
3326
+ f2.prototype.deleteLocalBranch = function(t2, e, n) {
3327
+ return this._runTask(
3328
+ cs(t2, typeof e == "boolean" ? e : false),
3329
+ u(arguments)
3330
+ );
3331
+ };
3332
+ f2.prototype.deleteLocalBranches = function(t2, e, n) {
3333
+ return this._runTask(
3334
+ us(t2, typeof e == "boolean" ? e : false),
3335
+ u(arguments)
3336
+ );
3337
+ };
3338
+ f2.prototype.branch = function(t2, e) {
3339
+ return this._runTask(
3340
+ is(h2(arguments)),
3341
+ u(arguments)
3342
+ );
3343
+ };
3344
+ f2.prototype.branchLocal = function(t2) {
3345
+ return this._runTask(as(), u(arguments));
3346
+ };
3347
+ f2.prototype.raw = function(t2) {
3348
+ const e = !Array.isArray(t2), n = [].slice.call(e ? arguments : t2, 0);
3349
+ for (let s = 0; s < n.length && e; s++)
3350
+ if (!st(n[s])) {
3351
+ n.splice(s, n.length - s);
3352
+ break;
3353
+ }
3354
+ n.push(...h2(arguments, 0, true));
3355
+ var r2 = u(arguments);
3356
+ return n.length ? this._runTask(g(n, this._trimmed), r2) : this._runTask(
3357
+ b2("Raw: must supply one or more command to execute"),
3358
+ r2
3359
+ );
3360
+ };
3361
+ f2.prototype.submoduleAdd = function(t2, e, n) {
3362
+ return this._runTask(As(t2, e), u(arguments));
3363
+ };
3364
+ f2.prototype.submoduleUpdate = function(t2, e) {
3365
+ return this._runTask(
3366
+ Ns(h2(arguments, true)),
3367
+ u(arguments)
3368
+ );
3369
+ };
3370
+ f2.prototype.submoduleInit = function(t2, e) {
3371
+ return this._runTask(
3372
+ xs(h2(arguments, true)),
3373
+ u(arguments)
3374
+ );
3375
+ };
3376
+ f2.prototype.subModule = function(t2, e) {
3377
+ return this._runTask(
3378
+ X2(h2(arguments)),
3379
+ u(arguments)
3380
+ );
3381
+ };
3382
+ f2.prototype.listRemote = function() {
3383
+ return this._runTask(
3384
+ Ss(h2(arguments)),
3385
+ u(arguments)
3386
+ );
3387
+ };
3388
+ f2.prototype.addRemote = function(t2, e, n) {
3389
+ return this._runTask(
3390
+ vs(t2, e, h2(arguments)),
3391
+ u(arguments)
3392
+ );
3393
+ };
3394
+ f2.prototype.removeRemote = function(t2, e) {
3395
+ return this._runTask(Os(t2), u(arguments));
3396
+ };
3397
+ f2.prototype.getRemotes = function(t2, e) {
3398
+ return this._runTask(Es(t2 === true), u(arguments));
3399
+ };
3400
+ f2.prototype.remote = function(t2, e) {
3401
+ return this._runTask(
3402
+ Rs(h2(arguments)),
3403
+ u(arguments)
3404
+ );
3405
+ };
3406
+ f2.prototype.tag = function(t2, e) {
3407
+ const n = h2(arguments);
3408
+ return n[0] !== "tag" && n.unshift("tag"), this._runTask(g(n), u(arguments));
3409
+ };
3410
+ f2.prototype.updateServerInfo = function(t2) {
3411
+ return this._runTask(
3412
+ g(["update-server-info"]),
3413
+ u(arguments)
3414
+ );
3415
+ };
3416
+ f2.prototype.pushTags = function(t2, e) {
3417
+ const n = Mr(
3418
+ { remote: d(t2, m) },
3419
+ h2(arguments)
3420
+ );
3421
+ return this._runTask(n, u(arguments));
3422
+ };
3423
+ f2.prototype.rm = function(t2) {
3424
+ return this._runTask(
3425
+ g(["rm", "-f", ...v(t2)]),
3426
+ u(arguments)
3427
+ );
3428
+ };
3429
+ f2.prototype.rmKeepLocal = function(t2) {
3430
+ return this._runTask(
3431
+ g(["rm", "--cached", ...v(t2)]),
3432
+ u(arguments)
3433
+ );
3434
+ };
3435
+ f2.prototype.catFile = function(t2, e) {
3436
+ return this._catFile("utf-8", arguments);
3437
+ };
3438
+ f2.prototype.binaryCatFile = function() {
3439
+ return this._catFile("buffer", arguments);
3440
+ };
3441
+ f2.prototype._catFile = function(t2, e) {
3442
+ var n = u(e), r2 = ["cat-file"], s = e[0];
3443
+ if (typeof s == "string")
3444
+ return this._runTask(
3445
+ b2("Git.catFile: options must be supplied as an array of strings"),
3446
+ n
3447
+ );
3448
+ Array.isArray(s) && r2.push.apply(r2, s);
3449
+ const o2 = t2 === "buffer" ? Gt(r2) : g(r2);
3450
+ return this._runTask(o2, n);
3451
+ };
3452
+ f2.prototype.diff = function(t2, e) {
3453
+ const n = m(t2) ? b2(
3454
+ "git.diff: supplying options as a single string is no longer supported, switch to an array of strings"
3455
+ ) : g(["diff", ...h2(arguments)]);
3456
+ return this._runTask(n, u(arguments));
3457
+ };
3458
+ f2.prototype.diffSummary = function() {
3459
+ return this._runTask(
3460
+ fr(h2(arguments, 1)),
3461
+ u(arguments)
3462
+ );
3463
+ };
3464
+ f2.prototype.applyPatch = function(t2) {
3465
+ const e = G2(t2) ? Yr(v(t2), h2([].slice.call(arguments, 1))) : b2(
3466
+ "git.applyPatch requires one or more string patches as the first argument"
3467
+ );
3468
+ return this._runTask(e, u(arguments));
3469
+ };
3470
+ f2.prototype.revparse = function() {
3471
+ const t2 = ["rev-parse", ...h2(arguments, true)];
3472
+ return this._runTask(
3473
+ g(t2, true),
3474
+ u(arguments)
3475
+ );
3476
+ };
3477
+ f2.prototype.clean = function(t2, e, n) {
3478
+ const r2 = un(t2), s = r2 && t2.join("") || d(t2, m) || "", o2 = h2([].slice.call(arguments, r2 ? 1 : 0));
3479
+ return this._runTask(
3480
+ on(s, o2),
3481
+ u(arguments)
3482
+ );
3483
+ };
3484
+ f2.prototype.exec = function(t2) {
3485
+ const e = {
3486
+ commands: [],
3487
+ format: "utf-8",
3488
+ parser() {
3489
+ typeof t2 == "function" && t2();
3490
+ }
3491
+ };
3492
+ return this._runTask(e);
3493
+ };
3494
+ f2.prototype.checkIgnore = function(t2, e) {
3495
+ return this._runTask(
3496
+ fs(v(d(t2, G2, []))),
3497
+ u(arguments)
3498
+ );
3499
+ };
3500
+ f2.prototype.checkIsRepo = function(t2, e) {
3501
+ return this._runTask(
3502
+ We(d(t2, m)),
3503
+ u(arguments)
3504
+ );
3505
+ };
3506
+ function Is(t2) {
3507
+ return t2 ? [{
3508
+ type: "spawn.before",
3509
+ action(r2, s) {
3510
+ t2.aborted && s.kill(new A2(void 0, "abort", "Abort already signaled"));
3511
+ }
3512
+ }, {
3513
+ type: "spawn.after",
3514
+ action(r2, s) {
3515
+ function o2() {
3516
+ s.kill(new A2(void 0, "abort", "Abort signal received"));
3517
+ }
3518
+ __name(o2, "o");
3519
+ t2.addEventListener("abort", o2), s.spawned.on("close", () => t2.removeEventListener("abort", o2));
3520
+ }
3521
+ }] : void 0;
3522
+ }
3523
+ __name(Is, "Is");
3524
+ var Us = $2("", "plugin:allowEnvironment");
3525
+ function Fs(t2, e = false) {
3526
+ const n = new Set(t2.map((r2) => r2.toLowerCase().trim()));
3527
+ return {
3528
+ type: "spawn.options",
3529
+ action(r2, s) {
3530
+ const o2 = { ...r2.env ?? process.env }, i = new Set(
3531
+ Object.keys(s.env).map((a) => a.toLowerCase().trim())
3532
+ );
3533
+ for (const a of Object.keys(o2)) {
3534
+ const c3 = a.toLowerCase().trim();
3535
+ if (!(!Gs(c3) || n.has(c3))) {
3536
+ if (i.has(c3))
3537
+ throw new A2(
3538
+ void 0,
3539
+ "allowEnvironment",
3540
+ `Use of "${a}" is blocked by the environment guard - add it to the allowEnvironment option to permit it`
3541
+ );
3542
+ Us("removing ambient guarded environment variable %s", a), delete o2[a];
3543
+ }
3544
+ }
3545
+ return {
3546
+ ...r2,
3547
+ env: {
3548
+ ...o2,
3549
+ GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS: String(!e)
3550
+ }
3551
+ };
3552
+ }
3553
+ };
3554
+ }
3555
+ __name(Fs, "Fs");
3556
+ function Gs(t2) {
3557
+ const e = t2.toLowerCase().trim();
3558
+ return e.startsWith("git_") || _(e);
3559
+ }
3560
+ __name(Gs, "Gs");
3561
+ function zs(t2 = {}) {
3562
+ return {
3563
+ type: "spawn.args",
3564
+ action(e, { env: n }) {
3565
+ for (const r2 of oe(e, n))
3566
+ if (t2[r2.category] !== true)
3567
+ throw new A2(void 0, "unsafe", r2.message);
3568
+ return e;
3569
+ }
3570
+ };
3571
+ }
3572
+ __name(zs, "zs");
3573
+ function qs(t2) {
3574
+ const e = U(t2, "-c");
3575
+ return {
3576
+ type: "spawn.args",
3577
+ action(n) {
3578
+ return [...e, ...n];
3579
+ }
3580
+ };
3581
+ }
3582
+ __name(qs, "qs");
3583
+ var $t = (0, import_promise_deferred.deferred)().promise;
3584
+ function Ws({
3585
+ onClose: t2 = true,
3586
+ onExit: e = 50
3587
+ } = {}) {
3588
+ function n() {
3589
+ let s = -1;
3590
+ const o2 = {
3591
+ close: (0, import_promise_deferred.deferred)(),
3592
+ closeTimeout: (0, import_promise_deferred.deferred)(),
3593
+ exit: (0, import_promise_deferred.deferred)(),
3594
+ exitTimeout: (0, import_promise_deferred.deferred)()
3595
+ }, i = Promise.race([
3596
+ t2 === false ? $t : o2.closeTimeout.promise,
3597
+ e === false ? $t : o2.exitTimeout.promise
3598
+ ]);
3599
+ return r2(t2, o2.close, o2.closeTimeout), r2(e, o2.exit, o2.exitTimeout), {
3600
+ close(a) {
3601
+ s = a, o2.close.done();
3602
+ },
3603
+ exit(a) {
3604
+ s = a, o2.exit.done();
3605
+ },
3606
+ get exitCode() {
3607
+ return s;
3608
+ },
3609
+ result: i
3610
+ };
3611
+ }
3612
+ __name(n, "n");
3613
+ function r2(s, o2, i) {
3614
+ s !== false && (s === true ? o2.promise : o2.promise.then(() => wt(s))).then(i.done);
3615
+ }
3616
+ __name(r2, "r");
3617
+ return {
3618
+ type: "spawn.after",
3619
+ async action(s, { spawned: o2, close: i }) {
3620
+ const a = n();
3621
+ let c3 = true, y2 = /* @__PURE__ */ __name(() => {
3622
+ c3 = false;
3623
+ }, "y");
3624
+ o2.stdout?.on("data", y2), o2.stderr?.on("data", y2), o2.on("error", y2), o2.on("close", (w2) => a.close(w2)), o2.on("exit", (w2) => a.exit(w2));
3625
+ try {
3626
+ await a.result, c3 && await wt(50), i(a.exitCode);
3627
+ } catch (w2) {
3628
+ i(a.exitCode, w2);
3629
+ }
3630
+ }
3631
+ };
3632
+ }
3633
+ __name(Ws, "Ws");
3634
+ var we = $2("", "plugin:binary");
3635
+ var Hs = "Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings";
3636
+ var Ks = "Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";
3637
+ function Vs(t2) {
3638
+ return !t2 || !/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(t2);
3639
+ }
3640
+ __name(Vs, "Vs");
3641
+ function Pt(t2, e) {
3642
+ if (t2.length < 1 || t2.length > 2)
3643
+ throw new A2(void 0, "binary", Hs);
3644
+ if (t2.some(Vs))
3645
+ if (e)
3646
+ we("permitted unsafe binary %o", t2);
3647
+ else
3648
+ throw new A2(void 0, "binary", Ks);
3649
+ const [r2, s] = t2;
3650
+ return {
3651
+ binary: r2,
3652
+ prefix: s
3653
+ };
3654
+ }
3655
+ __name(Pt, "Pt");
3656
+ function Xs(t2, e = ["git"], n = false) {
3657
+ let r2 = Pt(v(e), n);
3658
+ t2.on("binary", (s) => {
3659
+ r2 = Pt(v(s), n), we.info("reconfiguring %o", r2);
3660
+ }), t2.append("spawn.binary", () => r2.binary), t2.append("spawn.args", (s) => r2.prefix ? [r2.prefix, ...s] : s);
3661
+ }
3662
+ __name(Xs, "Xs");
3663
+ var be = {
3664
+ DISALLOWED_ABBREVIATED: {
3665
+ text: "disallowed abbreviated or ambiguous option",
3666
+ solution: "Unambiguous abbreviated options blocked with unsafe.allowAbbreviatedOptions setting: {message}"
3667
+ },
3668
+ UNKNOWN: {
3669
+ text: "~ unknown ~",
3670
+ solution: void 0
3671
+ }
3672
+ };
3673
+ function Ys(t2) {
3674
+ if (!t2)
3675
+ return "UNKNOWN";
3676
+ for (const [e, { text: n }] of Object.entries(be))
3677
+ if (t2.startsWith(`fatal: ${n}`))
3678
+ return e;
3679
+ return "UNKNOWN";
3680
+ }
3681
+ __name(Ys, "Ys");
3682
+ var Qs = class extends O2 {
3683
+ static {
3684
+ __name(this, "Qs");
3685
+ }
3686
+ constructor(e = "") {
3687
+ const n = Ys(e);
3688
+ super(void 0, be[n].solution?.replace("{message}", e) ?? e), this.reason = n;
3689
+ }
3690
+ };
3691
+ function Js(t2) {
3692
+ return !!(t2.exitCode && t2.stdErr.length);
3693
+ }
3694
+ __name(Js, "Js");
3695
+ function Zs(t2) {
3696
+ return Buffer.concat([...t2.stdOut, ...t2.stdErr]);
3697
+ }
3698
+ __name(Zs, "Zs");
3699
+ function to(t2 = false, e = Js, n = Zs) {
3700
+ return (r2, s) => !t2 && r2 || !e(s) ? r2 : n(s);
3701
+ }
3702
+ __name(to, "to");
3703
+ function eo(t2, e) {
3704
+ return t2 === 128 && e.startsWith("fatal:") ? new Qs(e) : new O2(void 0, e);
3705
+ }
3706
+ __name(eo, "eo");
3707
+ function Mt(t2) {
3708
+ return {
3709
+ type: "task.error",
3710
+ action(e, n) {
3711
+ const r2 = t2(e.error, {
3712
+ stdErr: n.stdErr,
3713
+ stdOut: n.stdOut,
3714
+ exitCode: n.exitCode
3715
+ });
3716
+ return Buffer.isBuffer(r2) ? {
3717
+ error: eo(n.exitCode, r2.toString("utf-8"))
3718
+ } : {
3719
+ error: r2
3720
+ };
3721
+ }
3722
+ };
3723
+ }
3724
+ __name(Mt, "Mt");
3725
+ var nt = $2("", "plugin:input");
3726
+ function no(t2) {
3727
+ return {
3728
+ type: "spawn.after",
3729
+ action(e, { commands: n, input: r2, spawned: { stdin: s } }) {
3730
+ if (!s)
3731
+ return;
3732
+ const o2 = t2?.([...n]) ?? r2;
3733
+ if (!o2)
3734
+ return nt("generated zero length content, not writing to stdin");
3735
+ nt("writing %s bytes to stdin", Le(o2)), s.on("error", (i) => {
3736
+ i.code !== "EPIPE" && nt("[ERROR] stdin error %o", i);
3737
+ }), s.end(o2);
3738
+ }
3739
+ };
3740
+ }
3741
+ __name(no, "no");
3742
+ var ro = class {
3743
+ static {
3744
+ __name(this, "ro");
3745
+ }
3746
+ constructor() {
3747
+ this.plugins = /* @__PURE__ */ new Set(), this.events = new Ce();
3748
+ }
3749
+ on(e, n) {
3750
+ this.events.on(e, n);
3751
+ }
3752
+ reconfigure(e, n) {
3753
+ this.events.emit(e, n);
3754
+ }
3755
+ append(e, n) {
3756
+ const r2 = S2(this.plugins, { type: e, action: n });
3757
+ return () => this.plugins.delete(r2);
3758
+ }
3759
+ add(e) {
3760
+ const n = [];
3761
+ return v(e).forEach(
3762
+ (r2) => {
3763
+ r2 && this.plugins.add(S2(n, r2));
3764
+ }
3765
+ ), () => {
3766
+ n.forEach((r2) => {
3767
+ this.plugins.delete(r2);
3768
+ });
3769
+ };
3770
+ }
3771
+ exec(e, n, r2) {
3772
+ let s = n;
3773
+ const o2 = Object.freeze(Object.create(r2));
3774
+ for (const i of this.plugins)
3775
+ i.type === e && (s = i.action(s, o2));
3776
+ return s;
3777
+ }
3778
+ };
3779
+ function so(t2) {
3780
+ const e = "--progress", n = ["checkout", "clone", "fetch", "pull", "push"];
3781
+ return [{
3782
+ type: "spawn.args",
3783
+ action(o2, i) {
3784
+ return n.includes(i.method) ? De(o2, e) : o2;
3785
+ }
3786
+ }, {
3787
+ type: "spawn.after",
3788
+ action(o2, i) {
3789
+ i.commands.includes(e) && i.spawned.stderr?.on("data", (a) => {
3790
+ const c3 = /^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(a.toString("utf8"));
3791
+ c3 && t2({
3792
+ method: i.method,
3793
+ stage: oo(c3[1]),
3794
+ progress: p(c3[2]),
3795
+ processed: p(c3[3]),
3796
+ total: p(c3[4])
3797
+ });
3798
+ });
3799
+ }
3800
+ }];
3801
+ }
3802
+ __name(so, "so");
3803
+ function oo(t2) {
3804
+ return String(t2.toLowerCase().split(" ", 1)) || "unknown";
3805
+ }
3806
+ __name(oo, "oo");
3807
+ function io(t2) {
3808
+ const e = je(t2, ["uid", "gid"]);
3809
+ return {
3810
+ type: "spawn.options",
3811
+ action(n) {
3812
+ return { ...e, ...n };
3813
+ }
3814
+ };
3815
+ }
3816
+ __name(io, "io");
3817
+ function ao() {
3818
+ return {
3819
+ type: "spawn.args",
3820
+ action(t2) {
3821
+ const e = [];
3822
+ let n;
3823
+ function r2(s) {
3824
+ (n = n || []).push(...s);
3825
+ }
3826
+ __name(r2, "r");
3827
+ for (let s = 0; s < t2.length; s++) {
3828
+ const o2 = t2[s];
3829
+ if (r(o2)) {
3830
+ r2(o(o2));
3831
+ continue;
3832
+ }
3833
+ if (o2 === "--") {
3834
+ r2(
3835
+ t2.slice(s + 1).flatMap((i) => r(i) && o(i) || i)
3836
+ );
3837
+ break;
3838
+ }
3839
+ e.push(o2);
3840
+ }
3841
+ return n ? [...e, "--", ...n.map(String)] : e;
3842
+ }
3843
+ };
3844
+ }
3845
+ __name(ao, "ao");
3846
+ function uo({
3847
+ block: t2,
3848
+ stdErr: e = true,
3849
+ stdOut: n = true
3850
+ }) {
3851
+ if (t2 > 0)
3852
+ return {
3853
+ type: "spawn.after",
3854
+ action(r2, s) {
3855
+ let o2;
3856
+ function i() {
3857
+ o2 && clearTimeout(o2), o2 = setTimeout(c3, t2);
3858
+ }
3859
+ __name(i, "i");
3860
+ function a() {
3861
+ s.spawned.stdout?.off("data", i), s.spawned.stderr?.off("data", i), s.spawned.off("exit", a), s.spawned.off("close", a), o2 && clearTimeout(o2);
3862
+ }
3863
+ __name(a, "a");
3864
+ function c3() {
3865
+ a(), s.kill(new A2(void 0, "timeout", "block timeout reached"));
3866
+ }
3867
+ __name(c3, "c");
3868
+ n && s.spawned.stdout?.on("data", i), e && s.spawned.stderr?.on("data", i), s.spawned.on("exit", a), s.spawned.on("close", a), i();
3869
+ }
3870
+ };
3871
+ }
3872
+ __name(uo, "uo");
3873
+ var wo = /* @__PURE__ */ __name((t2, e) => {
3874
+ const n = new ro(), r2 = Ge(
3875
+ t2 && (typeof t2 == "string" ? { baseDir: t2 } : t2) || {},
3876
+ e
3877
+ );
3878
+ if (!Lt(r2.baseDir))
3879
+ throw new Ae(
3880
+ r2,
3881
+ "Cannot use simple-git on a directory that does not exist"
3882
+ );
3883
+ return Array.isArray(r2.config) && n.add(qs(r2.config)), n.add(zs(r2.unsafe)), n.add(Ws(r2.completion)), r2.abort && n.add(Is(r2.abort)), r2.progress && n.add(so(r2.progress)), r2.timeout && n.add(uo(r2.timeout)), r2.spawnOptions && n.add(io(r2.spawnOptions)), n.add(ao()), n.add(no(r2.input)), n.add(Mt(to(true))), r2.errors && n.add(Mt(r2.errors)), Xs(n, r2.binary, r2.unsafe?.allowUnsafeCustomBinary), n.add(
3884
+ Fs(r2.allowEnvironment ?? [], r2.unsafe?.allowAbbreviatedOptions)
3885
+ ), new f2(r2, n);
3886
+ }, "wo");
3887
+ export {
3888
+ qe as CheckRepoActions,
3889
+ zt as CleanOptions,
3890
+ Kt as DiffNameStatus,
3891
+ Ht as GitConfigScope,
3892
+ Ae as GitConstructError,
3893
+ O2 as GitError,
3894
+ A2 as GitPluginError,
3895
+ at as GitResponseError,
3896
+ Vt as ResetMode,
3897
+ xe as TaskConfigurationError,
3898
+ Sn as grepQueryBuilder,
3899
+ c as pathspec,
3900
+ wo as simpleGit
3901
+ };