sandforge 1.81.0 → 1.83.0

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 (240) hide show
  1. package/README.md +48 -0
  2. package/bin/sandforge-users.mjs +12 -0
  3. package/lib/{chunk-J6G23RUI.mjs → chunk-262TP6UU.mjs} +1 -1
  4. package/lib/{chunk-NWVVCZUK.mjs → chunk-27BBEGUD.mjs} +1 -1
  5. package/lib/{chunk-Y5ZCPY36.mjs → chunk-2ADSD5WK.mjs} +1 -1
  6. package/lib/{chunk-55LQD3Y3.mjs → chunk-2GSMHGIV.mjs} +1 -1
  7. package/lib/chunk-2K5BYZQM.mjs +8 -0
  8. package/lib/{chunk-GK7VEYFM.mjs → chunk-2KTGDYUH.mjs} +1 -1
  9. package/lib/{chunk-T3PLRQ2T.mjs → chunk-2N73W63D.mjs} +1 -1
  10. package/lib/{chunk-7PK5QDQI.mjs → chunk-2R6GFNKF.mjs} +1 -1
  11. package/lib/{chunk-2OIRJEYE.mjs → chunk-2WMKJVD2.mjs} +1 -1
  12. package/lib/{chunk-D62KWDDT.mjs → chunk-36Y225OM.mjs} +1 -1
  13. package/lib/{chunk-HYOOJVR6.mjs → chunk-3CM7LAPE.mjs} +1 -1
  14. package/lib/{chunk-OIIL4NVI.mjs → chunk-3OVTKRS4.mjs} +1 -1
  15. package/lib/{chunk-UT27HXE7.mjs → chunk-3V4YH5KO.mjs} +1 -1
  16. package/lib/{chunk-OZNLOV4U.mjs → chunk-446GBKAC.mjs} +1 -1
  17. package/lib/{chunk-SQGP46QS.mjs → chunk-4GCYGQXD.mjs} +1 -1
  18. package/lib/{chunk-2NAIUKVL.mjs → chunk-4V3QO7HF.mjs} +1 -1
  19. package/lib/{chunk-GWRKS3AL.mjs → chunk-4X5D3MSV.mjs} +1 -1
  20. package/lib/{chunk-KGYXLSQ5.mjs → chunk-5OGNK3JP.mjs} +1 -1
  21. package/lib/{chunk-D7P7DTWL.mjs → chunk-6KOUYHEY.mjs} +1 -1
  22. package/lib/chunk-6QSHWIZI.mjs +48 -0
  23. package/lib/chunk-6VOQFISN.mjs +7 -0
  24. package/lib/{chunk-742SSN7I.mjs → chunk-6YC2ELCU.mjs} +1 -1
  25. package/lib/chunk-77IVKH7R.mjs +7 -0
  26. package/lib/{chunk-KNIRA333.mjs → chunk-77MZRBWX.mjs} +1 -1
  27. package/lib/{chunk-ZUA5BNAO.mjs → chunk-7BQMBXKX.mjs} +1 -1
  28. package/lib/{chunk-OQQHNYR7.mjs → chunk-7DPHZWA4.mjs} +2 -2
  29. package/lib/chunk-7V2UYZ6S.mjs +7 -0
  30. package/lib/chunk-7WSQ65WG.mjs +9 -0
  31. package/lib/{chunk-HVC5CYIB.mjs → chunk-7ZBDACVG.mjs} +1 -1
  32. package/lib/chunk-A32ISQ6M.mjs +28 -0
  33. package/lib/{chunk-XC2QKQT5.mjs → chunk-AG24QMSY.mjs} +1 -1
  34. package/lib/{chunk-K77NR3UK.mjs → chunk-AHUGG3WU.mjs} +1 -1
  35. package/lib/{chunk-K55LH4ZQ.mjs → chunk-ALBY5SOH.mjs} +1 -1
  36. package/lib/chunk-AXFD2OH6.mjs +7 -0
  37. package/lib/{chunk-YCSFP6ER.mjs → chunk-BH76USTQ.mjs} +1 -1
  38. package/lib/chunk-BNKT3R3F.mjs +7 -0
  39. package/lib/{chunk-YIGFYZQY.mjs → chunk-BPHTA6KP.mjs} +1 -1
  40. package/lib/{chunk-MNITSYI2.mjs → chunk-BT43WSOS.mjs} +1 -1
  41. package/lib/{chunk-ZWZXQTAK.mjs → chunk-BVZ5H3N4.mjs} +14 -14
  42. package/lib/{chunk-43K2C6H2.mjs → chunk-C6RKM4BB.mjs} +1 -1
  43. package/lib/{chunk-C4YGSK6W.mjs → chunk-CDWZGQAJ.mjs} +1 -1
  44. package/lib/chunk-CGZGL6VT.mjs +7 -0
  45. package/lib/{chunk-KE2PGD6C.mjs → chunk-CN5HGFG4.mjs} +1 -1
  46. package/lib/chunk-CQAFVEKP.mjs +13 -0
  47. package/lib/{chunk-XIZ5LMQM.mjs → chunk-CTPLYUXA.mjs} +1 -1
  48. package/lib/chunk-CXKZ6TYV.mjs +9 -0
  49. package/lib/{chunk-DHIW4IO5.mjs → chunk-D6JT4PAB.mjs} +1 -1
  50. package/lib/{chunk-AELFEK3G.mjs → chunk-D7XUNWWU.mjs} +1 -1
  51. package/lib/{chunk-GR3NGDVM.mjs → chunk-DB5RVDC5.mjs} +1 -1
  52. package/lib/{chunk-MO3N5XVV.mjs → chunk-DIGUC7S4.mjs} +2 -2
  53. package/lib/{chunk-2OZG6GRW.mjs → chunk-DKDKCGXV.mjs} +1 -1
  54. package/lib/chunk-DMT5SCO3.mjs +7 -0
  55. package/lib/chunk-DNQKVCUV.mjs +475 -0
  56. package/lib/{chunk-MAHZMPMZ.mjs → chunk-DSR2MSBH.mjs} +1 -1
  57. package/lib/{chunk-O6ADMP36.mjs → chunk-E3RQ575Y.mjs} +1 -1
  58. package/lib/{chunk-ETT5GP4P.mjs → chunk-EOQON3E5.mjs} +1 -1
  59. package/lib/{chunk-TKQQVB2D.mjs → chunk-ETNQHIDI.mjs} +1 -1
  60. package/lib/chunk-F5SBGJWW.mjs +7 -0
  61. package/lib/chunk-FBXH4VRQ.mjs +7 -0
  62. package/lib/chunk-FKCIGJOI.mjs +15 -0
  63. package/lib/{chunk-OVOLG3AL.mjs → chunk-FVLFO2S6.mjs} +1 -1
  64. package/lib/{chunk-YOGMP72T.mjs → chunk-FYWNSMOZ.mjs} +1 -1
  65. package/lib/{chunk-DHGPDSXS.mjs → chunk-GEEWPTV5.mjs} +1 -1
  66. package/lib/{chunk-FSDO4DJA.mjs → chunk-GLN4PI5P.mjs} +1 -1
  67. package/lib/{chunk-PYUEHBA6.mjs → chunk-GT5ZKU6V.mjs} +1 -1
  68. package/lib/chunk-GTRU5AV5.mjs +7 -0
  69. package/lib/chunk-H33DVU3D.mjs +7 -0
  70. package/lib/{chunk-5WGA5CZB.mjs → chunk-H4OBZIX3.mjs} +1 -1
  71. package/lib/{chunk-4L7FBOJS.mjs → chunk-HQZUQXDC.mjs} +1 -1
  72. package/lib/{chunk-VSU74RQ3.mjs → chunk-HVX2AFYW.mjs} +1 -1
  73. package/lib/chunk-I3ZO76LL.mjs +21 -0
  74. package/lib/{chunk-V4RKM4QZ.mjs → chunk-I5C4O3VA.mjs} +1 -1
  75. package/lib/{chunk-FSZTXLNW.mjs → chunk-IHGYJZZ2.mjs} +1 -1
  76. package/lib/chunk-ISA2NYJV.mjs +7 -0
  77. package/lib/{chunk-2IB7I3IQ.mjs → chunk-ISAUCWYK.mjs} +1 -1
  78. package/lib/{chunk-3B5H24ZG.mjs → chunk-ISOSTAJR.mjs} +1 -1
  79. package/lib/chunk-IXIY6Q4M.mjs +7 -0
  80. package/lib/{chunk-TPHXRHOA.mjs → chunk-J3TIHLWG.mjs} +1 -1
  81. package/lib/{chunk-TQM2XJ27.mjs → chunk-JAV6F6OA.mjs} +1 -1
  82. package/lib/chunk-JBWJ6UEZ.mjs +7 -0
  83. package/lib/{chunk-WM5JI4JI.mjs → chunk-JH4ZTVQN.mjs} +1 -1
  84. package/lib/{chunk-BZFIOZS3.mjs → chunk-JIPT5FUD.mjs} +1 -1
  85. package/lib/{chunk-6FMLW7PH.mjs → chunk-JPEVIXNH.mjs} +1 -1
  86. package/lib/{chunk-67CC7RAE.mjs → chunk-JREKJO3D.mjs} +1 -1
  87. package/lib/{chunk-3AOKLIVE.mjs → chunk-JUOQUG7U.mjs} +1 -1
  88. package/lib/chunk-JYUMD357.mjs +7 -0
  89. package/lib/{chunk-56MPPWLA.mjs → chunk-K7G3W7XH.mjs} +1 -1
  90. package/lib/{chunk-OU5W7SCB.mjs → chunk-KKS2KFBT.mjs} +1 -1
  91. package/lib/{chunk-RKALOKAU.mjs → chunk-KWAVSZ2B.mjs} +1 -1
  92. package/lib/{chunk-WI4HYWV6.mjs → chunk-KXUOHACP.mjs} +1 -1
  93. package/lib/{chunk-GTIXJCGS.mjs → chunk-L3I6DAHX.mjs} +1 -1
  94. package/lib/{chunk-FLNLG43R.mjs → chunk-L47JCNP3.mjs} +1 -1
  95. package/lib/{chunk-5344TZBT.mjs → chunk-L4MSL4U7.mjs} +1 -1
  96. package/lib/chunk-L4RJX7DG.mjs +7 -0
  97. package/lib/chunk-L6CLN664.mjs +7 -0
  98. package/lib/chunk-LI2XNV7F.mjs +7 -0
  99. package/lib/chunk-LP2D3JJP.mjs +7 -0
  100. package/lib/{chunk-EH5YUA5W.mjs → chunk-LWES2KZE.mjs} +1 -1
  101. package/lib/{chunk-YJEXE6HZ.mjs → chunk-LYOGCIYD.mjs} +2 -2
  102. package/lib/{chunk-BNO5GIJ6.mjs → chunk-MJD6CPZZ.mjs} +1 -1
  103. package/lib/{chunk-33ZX3A56.mjs → chunk-MTM4KG3T.mjs} +1 -1
  104. package/lib/{chunk-E2YJVSX6.mjs → chunk-N2HYG3BL.mjs} +1 -1
  105. package/lib/chunk-N5UIE4IR.mjs +7 -0
  106. package/lib/{chunk-R6TF26V4.mjs → chunk-NDFFIJL5.mjs} +1 -1
  107. package/lib/{chunk-FDGFUEK3.mjs → chunk-NFEBX75O.mjs} +1 -1
  108. package/lib/{chunk-QXLZINZB.mjs → chunk-NNV7IGM7.mjs} +1 -1
  109. package/lib/{chunk-OXKZ4Y3B.mjs → chunk-NS6ONPWL.mjs} +1 -1
  110. package/lib/{chunk-OEHVAJAB.mjs → chunk-O7GCCRPW.mjs} +1 -1
  111. package/lib/chunk-OO24ZYYJ.mjs +7 -0
  112. package/lib/chunk-OOIDCHBQ.mjs +9 -0
  113. package/lib/{chunk-MWLFFVQV.mjs → chunk-OS5GE52G.mjs} +1 -1
  114. package/lib/chunk-OS6HFJ7L.mjs +7 -0
  115. package/lib/{chunk-HYBH5PFM.mjs → chunk-OTJH6AEA.mjs} +1 -1
  116. package/lib/chunk-OUU47Y7A.mjs +7 -0
  117. package/lib/{chunk-FTA5LOVX.mjs → chunk-P6WRYJN3.mjs} +1 -1
  118. package/lib/{chunk-DXOXLUZA.mjs → chunk-PDRXM5WN.mjs} +1 -1
  119. package/lib/chunk-PGRY365W.mjs +7 -0
  120. package/lib/chunk-Q4PPI3KG.mjs +7 -0
  121. package/lib/chunk-QFTF2PGS.mjs +21 -0
  122. package/lib/chunk-QKJXIY6L.mjs +7 -0
  123. package/lib/{chunk-DMBR24CK.mjs → chunk-QLRWU3MB.mjs} +1 -1
  124. package/lib/chunk-QO4MPHZD.mjs +7 -0
  125. package/lib/chunk-QP3JLFIO.mjs +7 -0
  126. package/lib/{chunk-UCHAZ4ZU.mjs → chunk-QQDZQCO2.mjs} +1 -1
  127. package/lib/chunk-QROPNEGY.mjs +14 -0
  128. package/lib/{chunk-6NADW3OI.mjs → chunk-QXB6U3ZP.mjs} +1 -1
  129. package/lib/chunk-R3OM3X4L.mjs +8 -0
  130. package/lib/chunk-R7GKMAT4.mjs +7 -0
  131. package/lib/{chunk-JU2XEKEO.mjs → chunk-RVCPQVKM.mjs} +1 -1
  132. package/lib/{chunk-WEZLXE34.mjs → chunk-RZKJQOOC.mjs} +1 -1
  133. package/lib/chunk-S4PRKKGC.mjs +8 -0
  134. package/lib/{chunk-NJ3EOEHS.mjs → chunk-SX6QWYCQ.mjs} +1 -1
  135. package/lib/{chunk-ONMBSACW.mjs → chunk-T36DZJPH.mjs} +1 -1
  136. package/lib/{chunk-AJPSGVMD.mjs → chunk-T7DDS4UQ.mjs} +1 -1
  137. package/lib/chunk-TCEXCHXR.mjs +7 -0
  138. package/lib/chunk-TMIESDE5.mjs +7 -0
  139. package/lib/chunk-TQJ5NPRC.mjs +7 -0
  140. package/lib/chunk-TUPZY2QJ.mjs +7 -0
  141. package/lib/{chunk-2Z54GB6X.mjs → chunk-U2CTKIPE.mjs} +1 -1
  142. package/lib/{chunk-DQR5NDMI.mjs → chunk-U4YFYSF3.mjs} +1 -1
  143. package/lib/{chunk-EOSEMFPU.mjs → chunk-UIR77ZJD.mjs} +1 -1
  144. package/lib/{chunk-UUSLTW5V.mjs → chunk-UOHZW2L4.mjs} +1 -1
  145. package/lib/chunk-UV74P4H2.mjs +7 -0
  146. package/lib/{chunk-CULAOP3U.mjs → chunk-VXZ5PTOM.mjs} +1 -1
  147. package/lib/{chunk-IBURU7T7.mjs → chunk-VZLJZEV2.mjs} +1 -1
  148. package/lib/chunk-W3BQGMTR.mjs +7 -0
  149. package/lib/{chunk-WWTXRWNZ.mjs → chunk-WABXKL4N.mjs} +1 -1
  150. package/lib/{chunk-E2OBAWSH.mjs → chunk-WAYQLQAD.mjs} +1 -1
  151. package/lib/{chunk-6CDIIFNX.mjs → chunk-WBELLGNE.mjs} +1 -1
  152. package/lib/{chunk-LO527YLT.mjs → chunk-WJAZ5LHL.mjs} +1 -1
  153. package/lib/{chunk-6IGEASOF.mjs → chunk-WXU6ZJIV.mjs} +1 -1
  154. package/lib/{chunk-YHIOS2PU.mjs → chunk-WZN36ACK.mjs} +1 -1
  155. package/lib/{chunk-AITNZWLB.mjs → chunk-X2XZQ434.mjs} +1 -1
  156. package/lib/chunk-X4HZD5U2.mjs +7 -0
  157. package/lib/chunk-X6XNTOGO.mjs +7 -0
  158. package/lib/{chunk-5VQNKDFU.mjs → chunk-XAMMIPZ4.mjs} +1 -1
  159. package/lib/{chunk-MHW6DV6T.mjs → chunk-XAUQXYPW.mjs} +1 -1
  160. package/lib/{chunk-5UT2ZBGF.mjs → chunk-XCJUNX63.mjs} +1 -1
  161. package/lib/chunk-XJICAOAQ.mjs +7 -0
  162. package/lib/{chunk-GYKNCYES.mjs → chunk-XKFHTBAB.mjs} +1 -1
  163. package/lib/{chunk-6SEDOIO3.mjs → chunk-XMQ5R6TC.mjs} +1 -1
  164. package/lib/chunk-XPXEQKLR.mjs +7 -0
  165. package/lib/{chunk-SW2NUKQL.mjs → chunk-Y7YUNRKK.mjs} +1 -1
  166. package/lib/{chunk-UIUPPEFB.mjs → chunk-YBZIDW6W.mjs} +1 -1
  167. package/lib/{chunk-X2ZVSQ54.mjs → chunk-YEVB7LVK.mjs} +1 -1
  168. package/lib/{chunk-EAFLDSQ2.mjs → chunk-Z3MGN42K.mjs} +1 -1
  169. package/lib/{chunk-MKNAZPOT.mjs → chunk-ZB5E7NHU.mjs} +1 -1
  170. package/lib/chunk-ZCOSME6P.mjs +7 -0
  171. package/lib/{chunk-KRNFVAGC.mjs → chunk-ZOSESZ22.mjs} +1 -1
  172. package/lib/chunk-ZTHC42X6.mjs +7 -0
  173. package/lib/{chunk-XEB6HZ34.mjs → chunk-ZXOUWHYE.mjs} +1 -1
  174. package/lib/sandforge-autopilot.mjs +1 -1
  175. package/lib/sandforge-backup.mjs +1 -1
  176. package/lib/sandforge-checkpoint.mjs +1 -1
  177. package/lib/sandforge-cleanup.mjs +1 -1
  178. package/lib/sandforge-clone.mjs +1 -1
  179. package/lib/sandforge-compare.mjs +1 -1
  180. package/lib/sandforge-dataops.mjs +1 -1
  181. package/lib/sandforge-empty.mjs +4 -4
  182. package/lib/sandforge-env.mjs +184 -139
  183. package/lib/sandforge-frozen.mjs +1 -1
  184. package/lib/sandforge-mcp.mjs +14 -14
  185. package/lib/sandforge-monitor.mjs +1 -1
  186. package/lib/sandforge-pipeline.mjs +1 -1
  187. package/lib/sandforge-seed.mjs +1 -1
  188. package/lib/sandforge-sync.mjs +1 -1
  189. package/lib/sandforge-users.mjs +155 -0
  190. package/lib/sandforge.mjs +1 -22
  191. package/lib/sf/sandforge/autopilot.mjs +20 -0
  192. package/lib/sf/sandforge/backup.mjs +20 -0
  193. package/lib/sf/sandforge/checkpoint.mjs +20 -0
  194. package/lib/sf/sandforge/cleanup.mjs +20 -0
  195. package/lib/sf/sandforge/clone.mjs +20 -0
  196. package/lib/sf/sandforge/compare.mjs +20 -0
  197. package/lib/sf/sandforge/dataops.mjs +20 -0
  198. package/lib/sf/sandforge/empty.mjs +20 -0
  199. package/lib/sf/sandforge/env.mjs +20 -0
  200. package/lib/sf/sandforge/frozen.mjs +20 -0
  201. package/lib/sf/sandforge/hardis-commands.mjs +20 -0
  202. package/lib/sf/sandforge/index.mjs +20 -0
  203. package/lib/sf/sandforge/mcp.mjs +20 -0
  204. package/lib/sf/sandforge/monitor.mjs +20 -0
  205. package/lib/sf/sandforge/pipeline.mjs +20 -0
  206. package/lib/sf/sandforge/seed.mjs +20 -0
  207. package/lib/sf/sandforge/sync.mjs +20 -0
  208. package/lib/sf/sandforge/users.mjs +20 -0
  209. package/lib/sfHelpHook.mjs +7 -0
  210. package/lib/sfPlugin.mjs +11 -0
  211. package/oclif.manifest.json +1 -0
  212. package/package.json +17 -3
  213. package/lib/chunk-2ZMGVBLW.mjs +0 -7
  214. package/lib/chunk-5C5XEVZN.mjs +0 -11
  215. package/lib/chunk-5CKWGZX4.mjs +0 -9
  216. package/lib/chunk-5ZKCLBTN.mjs +0 -474
  217. package/lib/chunk-7DALDJMO.mjs +0 -7
  218. package/lib/chunk-CAFUNR6D.mjs +0 -7
  219. package/lib/chunk-DPYTG6DM.mjs +0 -48
  220. package/lib/chunk-G4VXPS3A.mjs +0 -7
  221. package/lib/chunk-GF247DA7.mjs +0 -7
  222. package/lib/chunk-IKGHRYCN.mjs +0 -7
  223. package/lib/chunk-IM2XA6JI.mjs +0 -7
  224. package/lib/chunk-K5HV4YRO.mjs +0 -7
  225. package/lib/chunk-KOQV4WXC.mjs +0 -8
  226. package/lib/chunk-N6HHNR6J.mjs +0 -7
  227. package/lib/chunk-N7J6NJQ6.mjs +0 -7
  228. package/lib/chunk-NWPQF5XR.mjs +0 -7
  229. package/lib/chunk-O7DAFE6M.mjs +0 -14
  230. package/lib/chunk-OMZJ37JI.mjs +0 -15
  231. package/lib/chunk-R2BJWO5N.mjs +0 -20
  232. package/lib/chunk-T26C576X.mjs +0 -9
  233. package/lib/chunk-T5VAULLQ.mjs +0 -7
  234. package/lib/chunk-V2QO6KOE.mjs +0 -19
  235. package/lib/chunk-V473C7LY.mjs +0 -7
  236. package/lib/chunk-W2AAGIZF.mjs +0 -7
  237. package/lib/chunk-WD47PGUS.mjs +0 -10
  238. package/lib/chunk-XC54KKKC.mjs +0 -7
  239. package/lib/chunk-XGKSSCW7.mjs +0 -7
  240. package/lib/chunk-ZWCRWF7E.mjs +0 -7
@@ -4,7 +4,7 @@ import { dirname as __sandforgeDirname } from 'node:path';
4
4
  const require = __sandforgeRequire(import.meta.url);
5
5
  const __filename = __sandforgePath(import.meta.url);
6
6
  const __dirname = __sandforgeDirname(__filename);
7
- import{b as j,q as O}from"./chunk-R2BJWO5N.mjs";import"./chunk-BXZ73A5M.mjs";import"./chunk-ZRUDYB7O.mjs";import"./chunk-YIGFYZQY.mjs";import"./chunk-2Z54GB6X.mjs";import"./chunk-V2QO6KOE.mjs";import"./chunk-5CKWGZX4.mjs";import"./chunk-R6TF26V4.mjs";import"./chunk-WD47PGUS.mjs";import"./chunk-5C5XEVZN.mjs";import"./chunk-DXOXLUZA.mjs";import"./chunk-5344TZBT.mjs";import"./chunk-V4RKM4QZ.mjs";import"./chunk-JU2XEKEO.mjs";import"./chunk-XIZ5LMQM.mjs";import"./chunk-AELFEK3G.mjs";import"./chunk-K77NR3UK.mjs";import"./chunk-OVOLG3AL.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-IM2XA6JI.mjs";import"./chunk-K55LH4ZQ.mjs";import"./chunk-5UT2ZBGF.mjs";import"./chunk-YHIOS2PU.mjs";import"./chunk-DHGPDSXS.mjs";import"./chunk-GMY5427L.mjs";import"./chunk-742SSN7I.mjs";import"./chunk-E2OBAWSH.mjs";import"./chunk-OMZJ37JI.mjs";import"./chunk-43K2C6H2.mjs";import"./chunk-FSZTXLNW.mjs";import"./chunk-XCA5AONB.mjs";import"./chunk-66NMFCWX.mjs";import"./chunk-WB2RIVO3.mjs";import{b as S,c as x}from"./chunk-VSU74RQ3.mjs";import"./chunk-CAFUNR6D.mjs";import"./chunk-AITNZWLB.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-OEHVAJAB.mjs";import"./chunk-GWRKS3AL.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-KGYXLSQ5.mjs";import"./chunk-TEIBWMJM.mjs";import"./chunk-DMBR24CK.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-4L7FBOJS.mjs";import"./chunk-OXKZ4Y3B.mjs";import"./chunk-MAHZMPMZ.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-UIUPPEFB.mjs";import"./chunk-6SEDOIO3.mjs";import"./chunk-ZWCRWF7E.mjs";import"./chunk-T63U4OZJ.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-QIRO4HTE.mjs";import"./chunk-MNITSYI2.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-NJ3EOEHS.mjs";import"./chunk-ETT5GP4P.mjs";import"./chunk-SW2NUKQL.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-E2YJVSX6.mjs";import"./chunk-HVC5CYIB.mjs";import"./chunk-T26C576X.mjs";import"./chunk-BNO5GIJ6.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-SQGP46QS.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-6IGEASOF.mjs";import"./chunk-KOQV4WXC.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-CULAOP3U.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-KRNFVAGC.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-2OIRJEYE.mjs";import{b as w,f as b,h as y}from"./chunk-LCDPCUXS.mjs";import"./chunk-XEB6HZ34.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-ZUA5BNAO.mjs";import"./chunk-RKALOKAU.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-55LQD3Y3.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-3B5H24ZG.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-EAFLDSQ2.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-DPYTG6DM.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";var v=`sandforge monitor \u2014 read an org the way the Monitor page does, without the editor.
7
+ import{b as j,q as O}from"./chunk-QFTF2PGS.mjs";import"./chunk-BXZ73A5M.mjs";import"./chunk-7V2UYZ6S.mjs";import"./chunk-BPHTA6KP.mjs";import"./chunk-U2CTKIPE.mjs";import"./chunk-ZRUDYB7O.mjs";import"./chunk-I3ZO76LL.mjs";import"./chunk-2K5BYZQM.mjs";import"./chunk-CQAFVEKP.mjs";import"./chunk-PDRXM5WN.mjs";import"./chunk-JBWJ6UEZ.mjs";import"./chunk-NDFFIJL5.mjs";import"./chunk-UV74P4H2.mjs";import"./chunk-L4MSL4U7.mjs";import"./chunk-I5C4O3VA.mjs";import"./chunk-RVCPQVKM.mjs";import"./chunk-CTPLYUXA.mjs";import"./chunk-D7XUNWWU.mjs";import"./chunk-AHUGG3WU.mjs";import"./chunk-FVLFO2S6.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-OO24ZYYJ.mjs";import"./chunk-ALBY5SOH.mjs";import"./chunk-6YC2ELCU.mjs";import"./chunk-XCJUNX63.mjs";import"./chunk-WZN36ACK.mjs";import"./chunk-GEEWPTV5.mjs";import"./chunk-GMY5427L.mjs";import"./chunk-WAYQLQAD.mjs";import"./chunk-FKCIGJOI.mjs";import"./chunk-C6RKM4BB.mjs";import"./chunk-IHGYJZZ2.mjs";import"./chunk-XCA5AONB.mjs";import"./chunk-66NMFCWX.mjs";import"./chunk-WB2RIVO3.mjs";import{b as S,c as x}from"./chunk-HVX2AFYW.mjs";import"./chunk-AXFD2OH6.mjs";import"./chunk-X2XZQ434.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-O7GCCRPW.mjs";import"./chunk-4X5D3MSV.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-5OGNK3JP.mjs";import"./chunk-QLRWU3MB.mjs";import"./chunk-XMQ5R6TC.mjs";import"./chunk-IXIY6Q4M.mjs";import"./chunk-TEIBWMJM.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-T63U4OZJ.mjs";import"./chunk-HQZUQXDC.mjs";import"./chunk-NS6ONPWL.mjs";import"./chunk-DSR2MSBH.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-YBZIDW6W.mjs";import"./chunk-QIRO4HTE.mjs";import"./chunk-BT43WSOS.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-SX6QWYCQ.mjs";import"./chunk-EOQON3E5.mjs";import"./chunk-Y7YUNRKK.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-N2HYG3BL.mjs";import"./chunk-7WSQ65WG.mjs";import"./chunk-MJD6CPZZ.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-7ZBDACVG.mjs";import"./chunk-OUU47Y7A.mjs";import"./chunk-4GCYGQXD.mjs";import"./chunk-WXU6ZJIV.mjs";import"./chunk-R3OM3X4L.mjs";import"./chunk-77IVKH7R.mjs";import"./chunk-2WMKJVD2.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-VXZ5PTOM.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-ZXOUWHYE.mjs";import{b as w,f as b,h as y}from"./chunk-LCDPCUXS.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-7BQMBXKX.mjs";import"./chunk-KWAVSZ2B.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";var v=`sandforge monitor \u2014 read an org the way the Monitor page does, without the editor.
8
8
 
9
9
  Usage:
10
10
  npx sandforge monitor --org <alias> [options]
@@ -4,7 +4,7 @@ import { dirname as __sandforgeDirname } from 'node:path';
4
4
  const require = __sandforgeRequire(import.meta.url);
5
5
  const __filename = __sandforgePath(import.meta.url);
6
6
  const __dirname = __sandforgeDirname(__filename);
7
- import{p as De}from"./chunk-5ZKCLBTN.mjs";import"./chunk-Y5ZCPY36.mjs";import"./chunk-OIIL4NVI.mjs";import"./chunk-YCSFP6ER.mjs";import"./chunk-GYKNCYES.mjs";import"./chunk-YOGMP72T.mjs";import"./chunk-6CDIIFNX.mjs";import"./chunk-MWLFFVQV.mjs";import"./chunk-OQQHNYR7.mjs";import"./chunk-MO3N5XVV.mjs";import"./chunk-INIQ23K6.mjs";import"./chunk-TPHXRHOA.mjs";import"./chunk-2NAIUKVL.mjs";import"./chunk-TKQQVB2D.mjs";import{a as W,c as Oe,g as Ie,h as Y,i as Te,j as be,k as q,l as Ee,m as Ne,n as xe,o as Ae,p as _e,q as Ce}from"./chunk-R2BJWO5N.mjs";import"./chunk-BXZ73A5M.mjs";import"./chunk-ZRUDYB7O.mjs";import"./chunk-YIGFYZQY.mjs";import"./chunk-2Z54GB6X.mjs";import"./chunk-V2QO6KOE.mjs";import"./chunk-5CKWGZX4.mjs";import"./chunk-R6TF26V4.mjs";import"./chunk-WD47PGUS.mjs";import"./chunk-5C5XEVZN.mjs";import"./chunk-DXOXLUZA.mjs";import"./chunk-5344TZBT.mjs";import"./chunk-V4RKM4QZ.mjs";import"./chunk-JU2XEKEO.mjs";import"./chunk-XIZ5LMQM.mjs";import"./chunk-AELFEK3G.mjs";import"./chunk-K77NR3UK.mjs";import"./chunk-OVOLG3AL.mjs";import"./chunk-FQGHL7GR.mjs";import{h as Pe}from"./chunk-IM2XA6JI.mjs";import"./chunk-K55LH4ZQ.mjs";import"./chunk-5UT2ZBGF.mjs";import"./chunk-YHIOS2PU.mjs";import"./chunk-DHGPDSXS.mjs";import"./chunk-GMY5427L.mjs";import"./chunk-742SSN7I.mjs";import{a as Fe}from"./chunk-TW3N6W5Z.mjs";import"./chunk-YJEXE6HZ.mjs";import"./chunk-FTA5LOVX.mjs";import{d as ve}from"./chunk-KNIRA333.mjs";import"./chunk-7DALDJMO.mjs";import{a as he,l as we,m as ke}from"./chunk-O7DAFE6M.mjs";import{b as K,e as de}from"./chunk-BZ24IAP5.mjs";import{a as N}from"./chunk-SCKUIE3R.mjs";import"./chunk-6FARZYMJ.mjs";import"./chunk-E2OBAWSH.mjs";import{e as ce}from"./chunk-OMZJ37JI.mjs";import"./chunk-43K2C6H2.mjs";import"./chunk-FSZTXLNW.mjs";import"./chunk-XCA5AONB.mjs";import"./chunk-66NMFCWX.mjs";import"./chunk-WB2RIVO3.mjs";import{a as Re,c as Se}from"./chunk-VSU74RQ3.mjs";import"./chunk-CAFUNR6D.mjs";import{h as ge,i as me}from"./chunk-AITNZWLB.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-OEHVAJAB.mjs";import"./chunk-GWRKS3AL.mjs";import"./chunk-BOGNK4LV.mjs";import{m as ye}from"./chunk-KGYXLSQ5.mjs";import"./chunk-TEIBWMJM.mjs";import"./chunk-DMBR24CK.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-4L7FBOJS.mjs";import"./chunk-OXKZ4Y3B.mjs";import"./chunk-MAHZMPMZ.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-UIUPPEFB.mjs";import{l as fe}from"./chunk-6SEDOIO3.mjs";import"./chunk-ZWCRWF7E.mjs";import{d as le}from"./chunk-T63U4OZJ.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-QIRO4HTE.mjs";import{h as pe,m as ue}from"./chunk-MNITSYI2.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-NJ3EOEHS.mjs";import"./chunk-ETT5GP4P.mjs";import"./chunk-SW2NUKQL.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-E2YJVSX6.mjs";import"./chunk-HVC5CYIB.mjs";import"./chunk-T26C576X.mjs";import"./chunk-BNO5GIJ6.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-SQGP46QS.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-6IGEASOF.mjs";import"./chunk-KOQV4WXC.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-CULAOP3U.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-KRNFVAGC.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-2OIRJEYE.mjs";import{a as oe,c as ae,f as T,h as $e}from"./chunk-LCDPCUXS.mjs";import"./chunk-XEB6HZ34.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-ZUA5BNAO.mjs";import"./chunk-RKALOKAU.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-55LQD3Y3.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-3B5H24ZG.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-EAFLDSQ2.mjs";import"./chunk-CA5NAXSU.mjs";import{he as ie,je as re,le as se,yc as te}from"./chunk-DPYTG6DM.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";import{copyFileSync as fn,existsSync as Je,mkdtempSync as gn,readFileSync as Xe,rmSync as mn,rmdirSync as hn}from"node:fs";import{tmpdir as yn}from"node:os";import{join as j,resolve as wn}from"node:path";import{randomUUID as kn}from"node:crypto";import{mkdirSync as sn}from"node:fs";import{join as on}from"node:path";var an=/^\[(WARN|ERR)\]|^\[INFO\] (?:The run lock|the confirmation)/;function je(e,t){return t==="production"?`${e??"the org"} is taken for a production org, and a pipeline from the command line writes to none`:void 0}function J(e){let t=e.journalDir??he(),n=e.backupDir??Re(),s=Se(n);if(s!==void 0)throw new Error(s);sn(e.storeDir,{recursive:!0,mode:448});let i=new Fe,r,o=Ce({storeDir:e.storeDir,log:a=>{an.test(a.trim())&&e.log(a.trim())},waitMs:0,typeScratchOrgs:!0,...e.onPost?{onPost:e.onPost}:{},services:{getSandforgeSetting:e.setting,showNotification:e.notify,...e.askApproval?{askApproval:e.askApproval}:{}},compose:a=>{let d=u=>a.orgManager.getOrg(u)?.alias,c=new fe({orgNameOf:d,requestConfirmation:(u,y)=>{let w=je(void 0,y);return w===void 0?Promise.resolve(!0):(e.log(`refused: ${w} (${u})`),Promise.resolve(!1))},declinesWithoutAsking:u=>je(void 0,u)});a.handlers.setInfraServices({productionGuard:c,backgroundRegistry:i,piiDetector:new le,checkpointFiles:{sandforgeVersion:e.sandforgeVersion,pickExportFile:()=>Promise.reject(new Error("sandforge checkpoint export saves a checkpoint to a file.")),pickImportFile:()=>Promise.reject(new Error("sandforge checkpoint import reads a checkpoint file."))}}),a.handlers.setBackgroundRegistry(i),a.handlers.setBackupRecordStore(new me(ge(n))),a.handlers.setSyncRunCreations(pe(t)),a.handlers.setSeedRunCreations(ve(t)),r={configStore:a.configStore,orgRegistry:a.orgRegistry}}});if(r===void 0)throw new Error("The host composed no handlers.");return{host:o,configStore:r.configStore,orgRegistry:r.orgRegistry,backupDir:n,dispose:()=>i.dispose()}}function X(e){switch(te(e.orgType,e.metadata?.edition)){case"Sandbox":return"sandbox";case"Scratch":return"scratch";case"Developer":return"developer";default:return"production"}}function Me(e,t){return e.length>=15&&t.length>=15&&e.slice(0,15)===t.slice(0,15)}var Le=new Set(["scratch","developer"]),ze={sandbox:"a sandbox",scratch:"a scratch org",developer:"a Developer Edition org",production:"a production org"};function dn(e,t){return e!==t?`another org, of another kind: ${ze[t]} here, ${ze[e]} in the file`:e==="sandbox"?"a sandbox refreshed since is another org, holding production\u2019s data again":"another org than the one the pipeline was exported for"}function Ge(e,t,n,s,i,r=e){return Me(n.organizationId,s.organizationId)?{ok:!0}:i!==void 0&&Me(i,s.organizationId)?{ok:!0,note:`${t} answers as org ${s.organizationId}, not the ${n.organizationId} the file names: taken, as --accept-org ${r}=${i} says.`}:Le.has(n.kind)&&Le.has(s.kind)?{ok:!0,note:`${t} answers as org ${s.organizationId}, not the ${n.organizationId} the file names: a ${s.kind==="scratch"?"scratch org":"Developer Edition org"} is made again under its alias, and is not pinned to its Id.`}:{ok:!1,code:"ORG_MOVED",message:`${t} answers as org ${s.organizationId}, and the file names ${n.organizationId}: ${dn(n.kind,s.kind)}. Nothing was run.`,wayOut:`check that ${t} is the org the pipeline is for, then run again with --accept-org ${t}=${s.organizationId}; or export the pipeline again from the Automation page.`}}function Be(e,t,n,s){if(!n.staging)return{org:t};let i=X(t);if(i!=="sandbox")return{org:t,note:`${s} is marked Staging in the file, and is a ${i} org here: the mark is read of a sandbox alone, and not set.`};let r={...t,staging:!0};return e.updateOrgMetadata(r),{org:r}}function L(e){return JSON.parse(JSON.stringify(e))}function He(e,t){let n=L(e.pipeline),s=L(e.syncConfigs);for(let i of se(e)){let r=t(i.key);if(r!==void 0){if(i.stepId!==void 0){let o=n.steps.find(a=>a.id===i.stepId);o&&(o.config[i.field]=r)}else if(i.syncConfigId!==void 0){let o=s[i.syncConfigId];o&&(o[i.field]=r)}}}return{pipeline:{...n,variables:n.variables.map(i=>i.required&&i.defaultValue===void 0?{...i,required:!1}:i),version:1,triggers:[],createdAt:e.exportedAt,updatedAt:e.exportedAt},syncConfigs:Object.values(s)}}var pn="prebuilt-",un="tpl-";function Ve(e,t,n){let s=new Pe(e);for(let o of n.syncConfigs)s.save(o);let i=new Oe(e);for(let o of Object.values(t.seedTemplates))o.id.startsWith(pn)||i.save(L(o));let r=new ce(e);for(let o of Object.values(t.maskingTemplates))o.id.startsWith(un)||r.save(L(o))}var Ue="backup:";function Ke(e,t,n,s=()=>{}){let i=e.getKeysByPrefix(Ue).filter(o=>!n.has(o));if(i.length===0)return 0;let r=ye(on(t,"snapshots.json"));for(let o of i)r.set(o,cn(e.get(o),s),"backups");return i.length}function cn(e,t){if(typeof e!="object"||e===null||Array.isArray(e))return e;let n=e;if(typeof n.orgId!="string")return e;let s=t(n.orgId);return s===void 0?e:{...n,orgId:s,organizationId:typeof n.organizationId=="string"?n.organizationId:n.orgId}}function We(e){return new Set(e.getKeysByPrefix(Ue))}var vn=`sandforge pipeline \u2014 run an Automation pipeline exported from VS Code, without the editor.
7
+ import{p as De}from"./chunk-DNQKVCUV.mjs";import"./chunk-2ADSD5WK.mjs";import"./chunk-3OVTKRS4.mjs";import"./chunk-BH76USTQ.mjs";import"./chunk-XKFHTBAB.mjs";import"./chunk-FYWNSMOZ.mjs";import"./chunk-WBELLGNE.mjs";import"./chunk-OS5GE52G.mjs";import"./chunk-W3BQGMTR.mjs";import"./chunk-7DPHZWA4.mjs";import"./chunk-DIGUC7S4.mjs";import"./chunk-INIQ23K6.mjs";import"./chunk-J3TIHLWG.mjs";import"./chunk-4V3QO7HF.mjs";import"./chunk-ETNQHIDI.mjs";import{a as W,c as Oe,g as Ie,h as Y,i as Te,j as be,k as q,l as Ee,m as Ne,n as xe,o as Ae,p as _e,q as Ce}from"./chunk-QFTF2PGS.mjs";import"./chunk-BXZ73A5M.mjs";import"./chunk-7V2UYZ6S.mjs";import"./chunk-BPHTA6KP.mjs";import"./chunk-U2CTKIPE.mjs";import"./chunk-ZRUDYB7O.mjs";import"./chunk-I3ZO76LL.mjs";import"./chunk-2K5BYZQM.mjs";import"./chunk-CQAFVEKP.mjs";import"./chunk-PDRXM5WN.mjs";import"./chunk-JBWJ6UEZ.mjs";import"./chunk-NDFFIJL5.mjs";import"./chunk-UV74P4H2.mjs";import"./chunk-L4MSL4U7.mjs";import"./chunk-I5C4O3VA.mjs";import"./chunk-RVCPQVKM.mjs";import"./chunk-CTPLYUXA.mjs";import"./chunk-D7XUNWWU.mjs";import"./chunk-AHUGG3WU.mjs";import"./chunk-FVLFO2S6.mjs";import"./chunk-FQGHL7GR.mjs";import{h as Pe}from"./chunk-OO24ZYYJ.mjs";import"./chunk-ALBY5SOH.mjs";import"./chunk-6YC2ELCU.mjs";import"./chunk-XCJUNX63.mjs";import"./chunk-WZN36ACK.mjs";import"./chunk-GEEWPTV5.mjs";import"./chunk-GMY5427L.mjs";import{a as Fe}from"./chunk-TW3N6W5Z.mjs";import"./chunk-LYOGCIYD.mjs";import"./chunk-P6WRYJN3.mjs";import{d as ve}from"./chunk-77MZRBWX.mjs";import"./chunk-X4HZD5U2.mjs";import{a as he}from"./chunk-BNKT3R3F.mjs";import{a as we,b as ke}from"./chunk-QROPNEGY.mjs";import{b as K,e as de}from"./chunk-BZ24IAP5.mjs";import{a as N}from"./chunk-SCKUIE3R.mjs";import"./chunk-6FARZYMJ.mjs";import"./chunk-WAYQLQAD.mjs";import{e as ce}from"./chunk-FKCIGJOI.mjs";import"./chunk-C6RKM4BB.mjs";import"./chunk-IHGYJZZ2.mjs";import"./chunk-XCA5AONB.mjs";import"./chunk-66NMFCWX.mjs";import"./chunk-WB2RIVO3.mjs";import{a as Re,c as Se}from"./chunk-HVX2AFYW.mjs";import"./chunk-AXFD2OH6.mjs";import{h as ge,i as me}from"./chunk-X2XZQ434.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-O7GCCRPW.mjs";import"./chunk-4X5D3MSV.mjs";import"./chunk-BOGNK4LV.mjs";import{m as ye}from"./chunk-5OGNK3JP.mjs";import"./chunk-QLRWU3MB.mjs";import{l as fe}from"./chunk-XMQ5R6TC.mjs";import"./chunk-IXIY6Q4M.mjs";import"./chunk-TEIBWMJM.mjs";import"./chunk-BWWQXU2B.mjs";import{d as le}from"./chunk-T63U4OZJ.mjs";import"./chunk-HQZUQXDC.mjs";import"./chunk-NS6ONPWL.mjs";import"./chunk-DSR2MSBH.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-YBZIDW6W.mjs";import"./chunk-QIRO4HTE.mjs";import{h as pe,m as ue}from"./chunk-BT43WSOS.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-SX6QWYCQ.mjs";import"./chunk-EOQON3E5.mjs";import"./chunk-Y7YUNRKK.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-N2HYG3BL.mjs";import"./chunk-7WSQ65WG.mjs";import"./chunk-MJD6CPZZ.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-7ZBDACVG.mjs";import"./chunk-OUU47Y7A.mjs";import"./chunk-4GCYGQXD.mjs";import"./chunk-WXU6ZJIV.mjs";import"./chunk-R3OM3X4L.mjs";import"./chunk-77IVKH7R.mjs";import"./chunk-2WMKJVD2.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-VXZ5PTOM.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-ZXOUWHYE.mjs";import{a as oe,c as ae,f as T,h as $e}from"./chunk-LCDPCUXS.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-7BQMBXKX.mjs";import"./chunk-KWAVSZ2B.mjs";import"./chunk-TUACWKIH.mjs";import{Ge as ie,Ie as re,Ke as se,Xc as te}from"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";import{copyFileSync as fn,existsSync as Je,mkdtempSync as gn,readFileSync as Xe,rmSync as mn,rmdirSync as hn}from"node:fs";import{tmpdir as yn}from"node:os";import{join as j,resolve as wn}from"node:path";import{randomUUID as kn}from"node:crypto";import{mkdirSync as sn}from"node:fs";import{join as on}from"node:path";var an=/^\[(WARN|ERR)\]|^\[INFO\] (?:The run lock|the confirmation)/;function je(e,t){return t==="production"?`${e??"the org"} is taken for a production org, and a pipeline from the command line writes to none`:void 0}function J(e){let t=e.journalDir??he(),n=e.backupDir??Re(),s=Se(n);if(s!==void 0)throw new Error(s);sn(e.storeDir,{recursive:!0,mode:448});let i=new Fe,r,o=Ce({storeDir:e.storeDir,log:a=>{an.test(a.trim())&&e.log(a.trim())},waitMs:0,typeScratchOrgs:!0,...e.onPost?{onPost:e.onPost}:{},services:{getSandforgeSetting:e.setting,showNotification:e.notify,...e.askApproval?{askApproval:e.askApproval}:{}},compose:a=>{let d=u=>a.orgManager.getOrg(u)?.alias,c=new fe({orgNameOf:d,requestConfirmation:(u,y)=>{let w=je(void 0,y);return w===void 0?Promise.resolve(!0):(e.log(`refused: ${w} (${u})`),Promise.resolve(!1))},declinesWithoutAsking:u=>je(void 0,u)});a.handlers.setInfraServices({productionGuard:c,backgroundRegistry:i,piiDetector:new le,checkpointFiles:{sandforgeVersion:e.sandforgeVersion,pickExportFile:()=>Promise.reject(new Error("sandforge checkpoint export saves a checkpoint to a file.")),pickImportFile:()=>Promise.reject(new Error("sandforge checkpoint import reads a checkpoint file."))}}),a.handlers.setBackgroundRegistry(i),a.handlers.setBackupRecordStore(new me(ge(n))),a.handlers.setSyncRunCreations(pe(t)),a.handlers.setSeedRunCreations(ve(t)),r={configStore:a.configStore,orgRegistry:a.orgRegistry}}});if(r===void 0)throw new Error("The host composed no handlers.");return{host:o,configStore:r.configStore,orgRegistry:r.orgRegistry,backupDir:n,dispose:()=>i.dispose()}}function X(e){switch(te(e.orgType,e.metadata?.edition)){case"Sandbox":return"sandbox";case"Scratch":return"scratch";case"Developer":return"developer";default:return"production"}}function Me(e,t){return e.length>=15&&t.length>=15&&e.slice(0,15)===t.slice(0,15)}var Le=new Set(["scratch","developer"]),ze={sandbox:"a sandbox",scratch:"a scratch org",developer:"a Developer Edition org",production:"a production org"};function dn(e,t){return e!==t?`another org, of another kind: ${ze[t]} here, ${ze[e]} in the file`:e==="sandbox"?"a sandbox refreshed since is another org, holding production\u2019s data again":"another org than the one the pipeline was exported for"}function Ge(e,t,n,s,i,r=e){return Me(n.organizationId,s.organizationId)?{ok:!0}:i!==void 0&&Me(i,s.organizationId)?{ok:!0,note:`${t} answers as org ${s.organizationId}, not the ${n.organizationId} the file names: taken, as --accept-org ${r}=${i} says.`}:Le.has(n.kind)&&Le.has(s.kind)?{ok:!0,note:`${t} answers as org ${s.organizationId}, not the ${n.organizationId} the file names: a ${s.kind==="scratch"?"scratch org":"Developer Edition org"} is made again under its alias, and is not pinned to its Id.`}:{ok:!1,code:"ORG_MOVED",message:`${t} answers as org ${s.organizationId}, and the file names ${n.organizationId}: ${dn(n.kind,s.kind)}. Nothing was run.`,wayOut:`check that ${t} is the org the pipeline is for, then run again with --accept-org ${t}=${s.organizationId}; or export the pipeline again from the Automation page.`}}function Be(e,t,n,s){if(!n.staging)return{org:t};let i=X(t);if(i!=="sandbox")return{org:t,note:`${s} is marked Staging in the file, and is a ${i} org here: the mark is read of a sandbox alone, and not set.`};let r={...t,staging:!0};return e.updateOrgMetadata(r),{org:r}}function L(e){return JSON.parse(JSON.stringify(e))}function He(e,t){let n=L(e.pipeline),s=L(e.syncConfigs);for(let i of se(e)){let r=t(i.key);if(r!==void 0){if(i.stepId!==void 0){let o=n.steps.find(a=>a.id===i.stepId);o&&(o.config[i.field]=r)}else if(i.syncConfigId!==void 0){let o=s[i.syncConfigId];o&&(o[i.field]=r)}}}return{pipeline:{...n,variables:n.variables.map(i=>i.required&&i.defaultValue===void 0?{...i,required:!1}:i),version:1,triggers:[],createdAt:e.exportedAt,updatedAt:e.exportedAt},syncConfigs:Object.values(s)}}var pn="prebuilt-",un="tpl-";function Ve(e,t,n){let s=new Pe(e);for(let o of n.syncConfigs)s.save(o);let i=new Oe(e);for(let o of Object.values(t.seedTemplates))o.id.startsWith(pn)||i.save(L(o));let r=new ce(e);for(let o of Object.values(t.maskingTemplates))o.id.startsWith(un)||r.save(L(o))}var Ue="backup:";function Ke(e,t,n,s=()=>{}){let i=e.getKeysByPrefix(Ue).filter(o=>!n.has(o));if(i.length===0)return 0;let r=ye(on(t,"snapshots.json"));for(let o of i)r.set(o,cn(e.get(o),s),"backups");return i.length}function cn(e,t){if(typeof e!="object"||e===null||Array.isArray(e))return e;let n=e;if(typeof n.orgId!="string")return e;let s=t(n.orgId);return s===void 0?e:{...n,orgId:s,organizationId:typeof n.organizationId=="string"?n.organizationId:n.orgId}}function We(e){return new Set(e.getKeysByPrefix(Ue))}var vn=`sandforge pipeline \u2014 run an Automation pipeline exported from VS Code, without the editor.
8
8
 
9
9
  Usage:
10
10
  npx sandforge pipeline plan --file <file> [options]
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
4
4
  const require = __sandforgeRequire(import.meta.url);
5
5
  const __filename = __sandforgePath(import.meta.url);
6
6
  const __dirname = __sandforgeDirname(__filename);
7
- import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-ZWZXQTAK.mjs";import"./chunk-WI4HYWV6.mjs";import"./chunk-WM5JI4JI.mjs";import"./chunk-56MPPWLA.mjs";import"./chunk-67CC7RAE.mjs";import"./chunk-OU5W7SCB.mjs";import"./chunk-T3PLRQ2T.mjs";import"./chunk-5WGA5CZB.mjs";import"./chunk-NWVVCZUK.mjs";import"./chunk-HYBH5PFM.mjs";import"./chunk-FSDO4DJA.mjs";import"./chunk-MHW6DV6T.mjs";import"./chunk-QXLZINZB.mjs";import"./chunk-OZNLOV4U.mjs";import"./chunk-2OZG6GRW.mjs";import"./chunk-MO3N5XVV.mjs";import"./chunk-INIQ23K6.mjs";import"./chunk-TPHXRHOA.mjs";import"./chunk-TKQQVB2D.mjs";import"./chunk-AELFEK3G.mjs";import"./chunk-K77NR3UK.mjs";import"./chunk-OVOLG3AL.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-IM2XA6JI.mjs";import"./chunk-K55LH4ZQ.mjs";import"./chunk-5UT2ZBGF.mjs";import"./chunk-YHIOS2PU.mjs";import"./chunk-DHGPDSXS.mjs";import"./chunk-GMY5427L.mjs";import"./chunk-742SSN7I.mjs";import"./chunk-YJEXE6HZ.mjs";import"./chunk-FTA5LOVX.mjs";import"./chunk-KNIRA333.mjs";import"./chunk-7DALDJMO.mjs";import"./chunk-O7DAFE6M.mjs";import"./chunk-BZ24IAP5.mjs";import"./chunk-SCKUIE3R.mjs";import"./chunk-6FARZYMJ.mjs";import"./chunk-VSU74RQ3.mjs";import"./chunk-CAFUNR6D.mjs";import"./chunk-AITNZWLB.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-KGYXLSQ5.mjs";import"./chunk-TEIBWMJM.mjs";import"./chunk-DMBR24CK.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-4L7FBOJS.mjs";import"./chunk-OXKZ4Y3B.mjs";import"./chunk-MAHZMPMZ.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-UIUPPEFB.mjs";import"./chunk-6SEDOIO3.mjs";import"./chunk-ZWCRWF7E.mjs";import"./chunk-T63U4OZJ.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-QIRO4HTE.mjs";import"./chunk-MNITSYI2.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-NJ3EOEHS.mjs";import"./chunk-ETT5GP4P.mjs";import"./chunk-SW2NUKQL.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-E2YJVSX6.mjs";import"./chunk-HVC5CYIB.mjs";import"./chunk-T26C576X.mjs";import"./chunk-BNO5GIJ6.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-SQGP46QS.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-6IGEASOF.mjs";import"./chunk-KOQV4WXC.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-CULAOP3U.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-KRNFVAGC.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-2OIRJEYE.mjs";import"./chunk-LCDPCUXS.mjs";import"./chunk-XEB6HZ34.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-ZUA5BNAO.mjs";import"./chunk-RKALOKAU.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-55LQD3Y3.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-3B5H24ZG.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-EAFLDSQ2.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-DPYTG6DM.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as ENV_RUN_ID_RE,G as PREVIEW_UNREAD,l as accountKindOfRecordTypes,v as apiRequestsJson,p as describeDistribution,u as dryRunGatesJson,x as fitJson,c as fitOfArgs,y as main,d as parseArgs,C as parseRemoveArgs,m as personAccountLine,k as personRecordTypeNames,i as prebuiltTemplate,D as readRunSummary,f as readTemplateFile,o as recordTypeChoiceLine,n as recordTypeRule,A as refusalLines,H as removalPreviewJson,I as removalPreviewLines,F as removeMain,j as rulesFromDescribe,g as runIdRefusal,E as runOfSummary,z as scenarioKeptLines,t as seedAutomationCheck,w as seedFitLines,B as seedInterruptedLine,q as seedOrchestrator,r as seedWritePathOf,b as seededRandom,s as storageLine,e as templateDisplayName,h as templateRecordTypesRefusal};
7
+ import{A,B,C,D,E,F,G,H,I,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-BVZ5H3N4.mjs";import"./chunk-KKS2KFBT.mjs";import"./chunk-KXUOHACP.mjs";import"./chunk-JH4ZTVQN.mjs";import"./chunk-2N73W63D.mjs";import"./chunk-27BBEGUD.mjs";import"./chunk-XAUQXYPW.mjs";import"./chunk-NNV7IGM7.mjs";import"./chunk-446GBKAC.mjs";import"./chunk-K7G3W7XH.mjs";import"./chunk-JREKJO3D.mjs";import"./chunk-H4OBZIX3.mjs";import"./chunk-OTJH6AEA.mjs";import"./chunk-GLN4PI5P.mjs";import"./chunk-DKDKCGXV.mjs";import"./chunk-DIGUC7S4.mjs";import"./chunk-INIQ23K6.mjs";import"./chunk-J3TIHLWG.mjs";import"./chunk-ETNQHIDI.mjs";import"./chunk-D7XUNWWU.mjs";import"./chunk-AHUGG3WU.mjs";import"./chunk-FVLFO2S6.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-OO24ZYYJ.mjs";import"./chunk-ALBY5SOH.mjs";import"./chunk-6YC2ELCU.mjs";import"./chunk-XCJUNX63.mjs";import"./chunk-WZN36ACK.mjs";import"./chunk-GEEWPTV5.mjs";import"./chunk-GMY5427L.mjs";import"./chunk-LYOGCIYD.mjs";import"./chunk-P6WRYJN3.mjs";import"./chunk-77MZRBWX.mjs";import"./chunk-X4HZD5U2.mjs";import"./chunk-BNKT3R3F.mjs";import"./chunk-QROPNEGY.mjs";import"./chunk-BZ24IAP5.mjs";import"./chunk-SCKUIE3R.mjs";import"./chunk-6FARZYMJ.mjs";import"./chunk-HVX2AFYW.mjs";import"./chunk-AXFD2OH6.mjs";import"./chunk-X2XZQ434.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-5OGNK3JP.mjs";import"./chunk-QLRWU3MB.mjs";import"./chunk-XMQ5R6TC.mjs";import"./chunk-IXIY6Q4M.mjs";import"./chunk-TEIBWMJM.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-T63U4OZJ.mjs";import"./chunk-HQZUQXDC.mjs";import"./chunk-NS6ONPWL.mjs";import"./chunk-DSR2MSBH.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-YBZIDW6W.mjs";import"./chunk-QIRO4HTE.mjs";import"./chunk-BT43WSOS.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-SX6QWYCQ.mjs";import"./chunk-EOQON3E5.mjs";import"./chunk-Y7YUNRKK.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-N2HYG3BL.mjs";import"./chunk-7WSQ65WG.mjs";import"./chunk-MJD6CPZZ.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-7ZBDACVG.mjs";import"./chunk-OUU47Y7A.mjs";import"./chunk-4GCYGQXD.mjs";import"./chunk-WXU6ZJIV.mjs";import"./chunk-R3OM3X4L.mjs";import"./chunk-77IVKH7R.mjs";import"./chunk-2WMKJVD2.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-VXZ5PTOM.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-ZXOUWHYE.mjs";import"./chunk-LCDPCUXS.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-7BQMBXKX.mjs";import"./chunk-KWAVSZ2B.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as ENV_RUN_ID_RE,G as PREVIEW_UNREAD,l as accountKindOfRecordTypes,v as apiRequestsJson,p as describeDistribution,u as dryRunGatesJson,x as fitJson,c as fitOfArgs,y as main,d as parseArgs,C as parseRemoveArgs,m as personAccountLine,k as personRecordTypeNames,i as prebuiltTemplate,D as readRunSummary,f as readTemplateFile,o as recordTypeChoiceLine,n as recordTypeRule,A as refusalLines,H as removalPreviewJson,I as removalPreviewLines,F as removeMain,j as rulesFromDescribe,g as runIdRefusal,E as runOfSummary,z as scenarioKeptLines,t as seedAutomationCheck,w as seedFitLines,B as seedInterruptedLine,q as seedOrchestrator,r as seedWritePathOf,b as seededRandom,s as storageLine,e as templateDisplayName,h as templateRecordTypesRefusal};
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
4
4
  const require = __sandforgeRequire(import.meta.url);
5
5
  const __filename = __sandforgePath(import.meta.url);
6
6
  const __dirname = __sandforgeDirname(__filename);
7
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-MO3N5XVV.mjs";import"./chunk-INIQ23K6.mjs";import"./chunk-TPHXRHOA.mjs";import"./chunk-TKQQVB2D.mjs";import"./chunk-IM2XA6JI.mjs";import"./chunk-K55LH4ZQ.mjs";import"./chunk-5UT2ZBGF.mjs";import"./chunk-YHIOS2PU.mjs";import"./chunk-DHGPDSXS.mjs";import"./chunk-GMY5427L.mjs";import"./chunk-742SSN7I.mjs";import"./chunk-YJEXE6HZ.mjs";import"./chunk-FTA5LOVX.mjs";import"./chunk-KNIRA333.mjs";import"./chunk-7DALDJMO.mjs";import"./chunk-O7DAFE6M.mjs";import"./chunk-BZ24IAP5.mjs";import"./chunk-SCKUIE3R.mjs";import"./chunk-6FARZYMJ.mjs";import"./chunk-VSU74RQ3.mjs";import"./chunk-CAFUNR6D.mjs";import"./chunk-AITNZWLB.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-KGYXLSQ5.mjs";import"./chunk-TEIBWMJM.mjs";import"./chunk-DMBR24CK.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-4L7FBOJS.mjs";import"./chunk-OXKZ4Y3B.mjs";import"./chunk-MAHZMPMZ.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-UIUPPEFB.mjs";import"./chunk-6SEDOIO3.mjs";import"./chunk-ZWCRWF7E.mjs";import"./chunk-T63U4OZJ.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-QIRO4HTE.mjs";import"./chunk-MNITSYI2.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-NJ3EOEHS.mjs";import"./chunk-ETT5GP4P.mjs";import"./chunk-SW2NUKQL.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-E2YJVSX6.mjs";import"./chunk-HVC5CYIB.mjs";import"./chunk-T26C576X.mjs";import"./chunk-BNO5GIJ6.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-SQGP46QS.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-6IGEASOF.mjs";import"./chunk-KOQV4WXC.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-CULAOP3U.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-KRNFVAGC.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-2OIRJEYE.mjs";import"./chunk-LCDPCUXS.mjs";import"./chunk-XEB6HZ34.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-ZUA5BNAO.mjs";import"./chunk-RKALOKAU.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-55LQD3Y3.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-3B5H24ZG.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-EAFLDSQ2.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-DPYTG6DM.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";var export_jsforce=a.default;export{D as LINE_RUN,r as alreadyLinkedWords,C as bothRecorders,c as buildConfig,h as buildQueryFn,g as cliAllowsDeletes,k as cliCountFn,f as cliFileDeps,l as cliPersonAccountsFn,m as cliSourceIdsFn,N as configurationToldLines,x as contactPointLines,A as deltaLine,w as encryptedLeftOutLine,n as inTheCommandsWords,P as jobLines,export_jsforce as jsforce,E as main,B as memoryCreations,u as objectCountsLine,y as objectCurrencyLines,t as objectErrorLines,z as objectPriceLines,v as objectWrittenLines,b as parseArgs,F as parseRemoveArgs,i as readCutLines,G as readRunSummary,d as readSavedConfig,q as recordTypeGivenOfObjectsLines,J as removalRefusal,K as removalSummaryLines,H as removalsPathOf,Q as removeMain,L as restoredLines,O as runFileOf,I as runOfSummary,e as savedConfigStore,s as simulationLines,j as statusWithReadCuts,o as syncApiRequestsJson,M as undeletedLines,p as writeCheckLines};
7
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-DIGUC7S4.mjs";import"./chunk-INIQ23K6.mjs";import"./chunk-J3TIHLWG.mjs";import"./chunk-ETNQHIDI.mjs";import"./chunk-OO24ZYYJ.mjs";import"./chunk-ALBY5SOH.mjs";import"./chunk-6YC2ELCU.mjs";import"./chunk-XCJUNX63.mjs";import"./chunk-WZN36ACK.mjs";import"./chunk-GEEWPTV5.mjs";import"./chunk-GMY5427L.mjs";import"./chunk-LYOGCIYD.mjs";import"./chunk-P6WRYJN3.mjs";import"./chunk-77MZRBWX.mjs";import"./chunk-X4HZD5U2.mjs";import"./chunk-BNKT3R3F.mjs";import"./chunk-QROPNEGY.mjs";import"./chunk-BZ24IAP5.mjs";import"./chunk-SCKUIE3R.mjs";import"./chunk-6FARZYMJ.mjs";import"./chunk-HVX2AFYW.mjs";import"./chunk-AXFD2OH6.mjs";import"./chunk-X2XZQ434.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-5OGNK3JP.mjs";import"./chunk-QLRWU3MB.mjs";import"./chunk-XMQ5R6TC.mjs";import"./chunk-IXIY6Q4M.mjs";import"./chunk-TEIBWMJM.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-T63U4OZJ.mjs";import"./chunk-HQZUQXDC.mjs";import"./chunk-NS6ONPWL.mjs";import"./chunk-DSR2MSBH.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-54HYHHVL.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-YBZIDW6W.mjs";import"./chunk-QIRO4HTE.mjs";import"./chunk-BT43WSOS.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-SX6QWYCQ.mjs";import"./chunk-EOQON3E5.mjs";import"./chunk-Y7YUNRKK.mjs";import"./chunk-4JKR4PTZ.mjs";import"./chunk-N2HYG3BL.mjs";import"./chunk-7WSQ65WG.mjs";import"./chunk-MJD6CPZZ.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-7ZBDACVG.mjs";import"./chunk-OUU47Y7A.mjs";import"./chunk-4GCYGQXD.mjs";import"./chunk-WXU6ZJIV.mjs";import"./chunk-R3OM3X4L.mjs";import"./chunk-77IVKH7R.mjs";import"./chunk-2WMKJVD2.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-VXZ5PTOM.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-ZXOUWHYE.mjs";import"./chunk-LCDPCUXS.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-7BQMBXKX.mjs";import"./chunk-KWAVSZ2B.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";var export_jsforce=a.default;export{D as LINE_RUN,r as alreadyLinkedWords,C as bothRecorders,c as buildConfig,h as buildQueryFn,g as cliAllowsDeletes,k as cliCountFn,f as cliFileDeps,l as cliPersonAccountsFn,m as cliSourceIdsFn,N as configurationToldLines,x as contactPointLines,A as deltaLine,w as encryptedLeftOutLine,n as inTheCommandsWords,P as jobLines,export_jsforce as jsforce,E as main,B as memoryCreations,u as objectCountsLine,y as objectCurrencyLines,t as objectErrorLines,z as objectPriceLines,v as objectWrittenLines,b as parseArgs,F as parseRemoveArgs,i as readCutLines,G as readRunSummary,d as readSavedConfig,q as recordTypeGivenOfObjectsLines,J as removalRefusal,K as removalSummaryLines,H as removalsPathOf,Q as removeMain,L as restoredLines,O as runFileOf,I as runOfSummary,e as savedConfigStore,s as simulationLines,j as statusWithReadCuts,o as syncApiRequestsJson,M as undeletedLines,p as writeCheckLines};
@@ -0,0 +1,155 @@
1
+ import { createRequire as __sandforgeRequire } from 'node:module';
2
+ import { fileURLToPath as __sandforgePath } from 'node:url';
3
+ import { dirname as __sandforgeDirname } from 'node:path';
4
+ const require = __sandforgeRequire(import.meta.url);
5
+ const __filename = __sandforgePath(import.meta.url);
6
+ const __dirname = __sandforgeDirname(__filename);
7
+ import{a as we,d as ye}from"./chunk-CXKZ6TYV.mjs";import{b as Re,d as be,e as $e,f as Ie,g as Ae,i as Ee,j as H,l as ke,n as Oe,o as Ne}from"./chunk-TMIESDE5.mjs";import{b as _e}from"./chunk-L4RJX7DG.mjs";import{a as x,b as q,c as Se,e as G,g as m,h as Ue,j as ve}from"./chunk-TCEXCHXR.mjs";import{a as le}from"./chunk-ETNQHIDI.mjs";import"./chunk-UV74P4H2.mjs";import{a as W}from"./chunk-QROPNEGY.mjs";import{b as pe,e as fe}from"./chunk-BZ24IAP5.mjs";import{a as ee,b as L}from"./chunk-SCKUIE3R.mjs";import{c as P,d as he}from"./chunk-6FARZYMJ.mjs";import"./chunk-N2HYG3BL.mjs";import{b as ue,c as ce}from"./chunk-7ZBDACVG.mjs";import"./chunk-OUU47Y7A.mjs";import"./chunk-4GCYGQXD.mjs";import"./chunk-WXU6ZJIV.mjs";import{oc as ge}from"./chunk-R3OM3X4L.mjs";import"./chunk-77IVKH7R.mjs";import"./chunk-2WMKJVD2.mjs";import"./chunk-PPGDAUEQ.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-VXZ5PTOM.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-SU65Z2BA.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ZOSESZ22.mjs";import"./chunk-MS4FJDFD.mjs";import{a as ie,c as de,f as E,h as me}from"./chunk-LCDPCUXS.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-Z3MGN42K.mjs";import"./chunk-2GSMHGIV.mjs";import"./chunk-TZE3Y7IQ.mjs";import{b as z}from"./chunk-CA5NAXSU.mjs";import"./chunk-ISOSTAJR.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-TUACWKIH.mjs";import{ib as se,jb as re,kb as ne,lb as te,nb as oe,ob as ae}from"./chunk-6QSHWIZI.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";import{readFileSync as Ke}from"node:fs";function Be(e,s,r){let{before:n}=e.applied,{after:a}=e,o=s.standing,u=m(e.applied.userId)===m(r.connected.userId),l=`${r.connected.username} is the user connected: SandForge would lock itself out; connect as another to put it back`,c={leave:e.accesses.filter(d=>d.what==="group"&&s.present.has(m(d.id))),unassign:e.accesses.filter(d=>d.what!=="group"&&s.present.has(m(d.id))),kept:[]};if(a.isFrozen!==n.isFrozen&&o.isFrozen===a.isFrozen){let d={what:"frozen",from:a.isFrozen,to:n.isFrozen};u&&n.isFrozen?c.kept.push({change:d,why:l}):s.loginId===void 0?c.kept.push({change:d,why:"the org keeps no login of this user (UserLogin) to write"}):c.isFrozen={to:n.isFrozen,loginId:s.loginId,change:d}}if(a.isActive!==n.isActive&&o.isActive===a.isActive){let d={what:"active",from:a.isActive,to:n.isActive};u&&!n.isActive?c.kept.push({change:d,why:l}):c.isActive={to:n.isActive,change:d}}if(m(a.profileId)!==m(n.profileId)&&m(o.profileId)!==m(n.profileId)){let d=$=>s.profileNames.get(m($))??$,f={what:"profile",from:d(o.profileId),to:d(n.profileId)},h=m(o.profileId)!==m(a.profileId);u?c.kept.push({change:f,why:l}):h&&!r.includeChanged?c.kept.push({change:f,why:`its profile was changed since the run, to ${d(o.profileId)}: --include-changed puts ${d(n.profileId)} back`}):c.profileId={to:n.profileId,change:f}}return c}function Ce(e){return e.what==="group"?{what:"group",name:e.name,type:e.type??"Regular",to:"removed"}:{what:e.what,name:e.name,to:"removed"}}function V(e,s,r,n){return{org:e.organization,run:e.run,status:"failure",users:[],apiRequests:n,refusals:[{code:s,message:r}]}}async function Pe(e){let{org:s,store:r,run:n}=e,a=e.now??(()=>new Date),o=s.requests(),u=()=>s.requests()-o,l=await s.identity(),c=await r.read(l.organizationId,n);if(!c)return V(e,"USERS_RUN_NOT_FOUND",`run ${n}: this machine keeps no run of that number for this org, whose Organization Id is ${l.organizationId}: a sandbox refreshed since answers another, and its runs went with the copy they set up`,u());let d=(await r.list(l.organizationId)).find(t=>t.replaces===n);if(d)return V(e,"USERS_RUN_REPLACED",`run ${n} was replaced by run ${d.run}, which holds what it set up: remove run ${d.run}`,u());let f=await Ue(s);if(f!==!0){let t=ve(l.username,f);return V(e,t.code,t.message,u())}let h=c.users,$=h.map(t=>t.applied.userId),R=new Map;for(let t of x($,200))for(let i of await s.query(`SELECT Id, IsActive, ProfileId FROM User WHERE Id IN ${q(t)}`))R.set(m(String(i.Id)),{isActive:i.IsActive===!0,isFrozen:!1,profileId:String(i.ProfileId)});let w=new Map,I=h.filter(t=>t.after.isFrozen!==t.applied.before.isFrozen);for(let t of x(I.map(i=>i.applied.userId),200))for(let i of await s.query(`SELECT Id, UserId, IsFrozen FROM UserLogin WHERE UserId IN ${q(t)}`)){let p=m(String(i.UserId));w.set(p,String(i.Id));let U=R.get(p);U&&(U.isFrozen=i.IsFrozen===!0)}let T=new Set,O=t=>h.flatMap(i=>i.accesses.filter(p=>t==="memberships"==(p.what==="group")).map(p=>p.id));for(let[t,i]of[["PermissionSetAssignment",O("assignments")],["GroupMember",O("memberships")]])for(let p of x(i,200))for(let U of await s.query(`SELECT Id FROM ${t} WHERE Id IN ${q(p)}`))T.add(m(String(U.Id)));let N=h.flatMap(t=>m(t.after.profileId)!==m(t.applied.before.profileId)?[t.applied.before.profileId,t.after.profileId,R.get(m(t.applied.userId))?.profileId??""]:[]).filter(t=>t!==""),_=new Map;for(let t of x([...new Set(N)],200))for(let i of await s.query(`SELECT Id, Name FROM Profile WHERE Id IN ${q(t)}`))_.set(m(String(i.Id)),String(i.Name));let g=h.map(t=>t.applied.username),A=h.flatMap(t=>{let i=R.get(m(t.applied.userId));if(!i)return[];let p=w.get(m(t.applied.userId));return[{user:t,undo:Be(t,{standing:i,...p?{loginId:p}:{},profileNames:_,present:T},{includeChanged:e.includeChanged===!0,connected:l}),undone:[],refused:[]}]}),J=(t,i,p)=>{let U=p?.code??"NO_ANSWER";t.refused.push({change:i,code:U,why:`the org refused it: ${U} ${Se(p?.message??"the org answered nothing for it",g)}`})},K=async(t,i)=>{let p=A.flatMap(y=>i(y).map(b=>({one:y,access:b})));if(p.length===0)return;let U=await s.destroy(t,p.map(({access:y})=>y.id));p.forEach(({one:y,access:b},M)=>{let C=U[M];C?.success===!0?y.undone.push(Ce(b)):C?.errors.some(Xe=>Xe.code==="ENTITY_IS_DELETED")||J(y,Ce(b),C?.errors[0])})},j=async(t,i)=>{let p=A.flatMap(y=>{let b=i(y);return b?[{one:y,...b}]:[]});if(p.length===0)return;let U=await s.update(t,p.map(({row:y})=>y));p.forEach(({one:y,change:b},M)=>{let C=U[M];C?.success===!0?y.undone.push(b):J(y,b,C?.errors[0])})},He=[()=>K("GroupMember",t=>t.undo.leave),()=>K("PermissionSetAssignment",t=>t.undo.unassign),()=>j("UserLogin",t=>t.undo.isFrozen?{row:{Id:t.undo.isFrozen.loginId,IsFrozen:t.undo.isFrozen.to},change:t.undo.isFrozen.change}:void 0),async()=>{for(let t of[!1,!0])await j("User",i=>i.undo.isActive?.to===t?{row:{Id:i.user.applied.userId,IsActive:t},change:i.undo.isActive.change}:void 0)},()=>j("User",t=>t.undo.profileId?{row:{Id:t.user.applied.userId,ProfileId:t.undo.profileId.to},change:t.undo.profileId.change}:void 0)],Q=!1;for(let t of He)if(await t(),e.signal?.aborted){Q=!0;break}let D=A.map(t=>{let i=[...t.undo.kept,...t.refused.map(({change:p,why:U})=>({change:p,why:U}))];return{username:t.user.applied.username,userId:t.user.applied.userId,undone:t.undone,...i.length>0?{kept:i}:{}}}),Y=D.reduce((t,i)=>t+(i.kept?.length??0),0),Z=Q?"cancelled":Y>0?"partial":"success",Ve={...c,removals:[...c.removals??[],{at:a().toISOString(),status:Z,undone:D.reduce((t,i)=>t+i.undone.length,0),kept:Y,codes:[...new Set(A.flatMap(t=>t.refused.map(i=>i.code)))].slice(0,50)}]};return await r.write(Ve),{org:e.organization,run:n,status:Z,users:D,apiRequests:u()}}var X="sandforge-users",Qe="USERS_RUN_NOT_FOUND",Ye="USERS_RUN_REPLACED",Ze=`sandforge users \u2014 set up the users of a sandbox handed back to its testers, a scratch org
8
+ or a Developer Edition org: an address the copy put under .invalid asked back, a user activated,
9
+ frozen or unfrozen, a profile, permission sets, permission set groups, groups and queues given;
10
+ and take a run back.
11
+
12
+ It is what sandforge env runs for a users resource of sandforge.yaml, which it applies before
13
+ every other resource and takes back after them all; it runs alone as well.
14
+
15
+ Usage:
16
+ npx sandforge users plan --org <alias> --config <file.json> [options]
17
+ npx sandforge users apply --org <alias> --config <file.json> (--dry-run | --yes) [options]
18
+ npx sandforge users remove --org <alias> --run <n> [--yes] [options]
19
+
20
+ Verbs:
21
+ plan read the org and say, user by user, what a run would change; the
22
+ licenses it takes, the emails Salesforce would send to people, what
23
+ the org runs as users are written, the requests an apply sends, and
24
+ each refusal a run would meet. Nothing is written. Exit 1 when a
25
+ run would be refused
26
+ apply the plan, then, when nothing refuses it, the writes in this order:
27
+ profiles; deactivations, then activations; freezes and unfreezes;
28
+ permission sets and their groups; groups and queues; the addresses
29
+ last, so that a run stopped before has mailed nobody; then a read
30
+ of what it wrote. The run is kept on this machine as run <n> before
31
+ its first write, and again after each step
32
+ remove take run <n> back: the memberships and assignments it created,
33
+ each by its id, then each freeze, activation and profile put back
34
+ as it was before the run, where the org still holds what the run
35
+ left. An assignment or a membership the user held before is never
36
+ touched
37
+
38
+ Required:
39
+ --org <alias> sf CLI alias of the sandbox, scratch org or Developer
40
+ Edition org. A production org is refused before
41
+ anything of it is read, whatever the verb, and nothing
42
+ lifts it
43
+ --config <file.json> (plan, apply) the users to set up, as a users resource
44
+ of sandforge.yaml lists them (below)
45
+ --run <n> (remove) the run to take back, as apply named it
46
+
47
+ Options:
48
+ --dry-run (apply) the plan, nothing written: what the run would
49
+ change and the requests it would send
50
+ --yes (apply, remove) do not ask; without it and with no
51
+ terminal, stop at the question, exit 2
52
+ --replaces <n> (plan, apply) the run this one replaces, which
53
+ sandforge env names: converge from what it held \u2014 add
54
+ what is missing, take back what it added that the
55
+ config no longer names, put a user it no longer lists
56
+ back as it was. Never all taken back then done again
57
+ --accept-user-emails (plan, apply) let Salesforce email the people whose
58
+ address is asked back: the confirmation link, a system
59
+ email, which leaves under System email only too.
60
+ USERS_EMAILS_NOT_ACCEPTED, exit 1, without it, as soon
61
+ as one address is asked
62
+ --accept-emails (plan, apply) ask addresses back in an org that
63
+ delivers all email (Setup > Deliverability, read with
64
+ one line of anonymous Apex that sends nothing), where
65
+ what runs there emails these people from then on.
66
+ USERS_EMAILS_OPEN, exit 1, without it; set the org to
67
+ System email only until the masking is done instead
68
+ --accept-automation (plan, apply, remove) write although the org runs
69
+ flows, Apex triggers, processes or workflow rules as a
70
+ user or a login is written, or could not say what it
71
+ runs: AUTOMATION_NOT_ACCEPTED, exit 1, nothing
72
+ written, without it. sandforge env gives it for a
73
+ resource that says accept: { automation: true }
74
+ --include-changed (remove) put back a profile someone changed since the
75
+ run all the same
76
+ --json print the answer as JSON on stdout, every other line on
77
+ stderr
78
+ -h, --help show this help and exit
79
+
80
+ The config, JSON:
81
+ {"defaults": {"email": "restore", "frozen": false},
82
+ "users": [{"username": "jane.qa@acme.com", "permissionSets": ["QA_Tools"], "groups": ["QA_Team"]},
83
+ {"username": "paul.qa@acme.com", "active": true, "profile": "QA Tester"}]}
84
+
85
+ users 1 to ${se}, each username once, whatever its case
86
+ username production's (jane.qa@acme.com) or the sandbox's whole
87
+ (jane.qa@acme.com.uat): read as given, then as given
88
+ followed by .<sandbox>, which must name exactly one user
89
+ email restore asks back the address the copy put under
90
+ .invalid; keep (the default) leaves it
91
+ active, frozen true or false; absent, left as they are
92
+ profile Profile.Name, exact, in the org's language for a
93
+ standard profile
94
+ permissionSets API names, ${re} at most
95
+ permissionSetGroups API names, ${ne} at most
96
+ groups DeveloperName of a public group or a queue, ${te} at most
97
+ defaults the same keys but username; a key a user gives
98
+ replaces the default's whole, a list included
99
+
100
+ What it never does: take away an assignment, a membership or a permission set
101
+ the config does not name; delete a user, which Salesforce does not do; reset a
102
+ password \u2014 once an address is restored, its owner asks for one with
103
+ "Forgot your password?" on the sandbox's login page; or put an address back
104
+ under .invalid. An address asked back is not restored at once: Salesforce
105
+ mails a link to it and keeps the old one until the link is clicked
106
+ (${G} h). The run says it awaits its owner; a later plan reads it restored.
107
+
108
+ Refused before its first write, exit 1, nothing written: a production org, or
109
+ one that will not say what it is; USERS_NO_USER, a username no user has;
110
+ USERS_TWO_USERS, one two users have; USERS_NO_RIGHT, a connection without
111
+ Manage Users; USERS_SELF, the user connected frozen, deactivated or given
112
+ another profile; USERS_LICENSE, more activations or profiles than the licenses
113
+ have free, counted on the whole plan; USERS_PROFILE_UNKNOWN,
114
+ USERS_PERMISSION_SET_UNKNOWN, USERS_GROUP_UNKNOWN, a name the org does not
115
+ hold, its close names listed; USERS_PERMISSION_SET_LICENSE, a permission set
116
+ whose license the user lacks; USERS_EMAILS_NOT_ACCEPTED, USERS_EMAILS_OPEN and
117
+ AUTOMATION_NOT_ACCEPTED, above; USERS_RUN_NOT_FOUND, a run this machine does
118
+ not keep for the org (a refreshed sandbox answers another Organization Id);
119
+ USERS_RUN_REPLACED, a run to replace that another run replaced already.
120
+
121
+ Each run is kept in <SANDFORGE_JOURNAL_DIR, or ~/.sandforge>/users/<Organization
122
+ Id>/run-<n>.json, its owner's alone and never inside a repository: ids,
123
+ usernames, booleans and the names of profiles, permission sets and groups;
124
+ never an address, never a person's name.
125
+
126
+ Exit codes:
127
+ 0 plan: a run would go; apply: every user set up, an address awaiting its
128
+ owner included, said; remove: everything put back
129
+ 1 refused before its first write, every refusal said (the plan, the dry run
130
+ and the apply alike), or the org could not be reached
131
+ 2 a bad command line or config, or a question with no terminal to answer it
132
+ (give --yes)
133
+ 3 partial: the org refused a write the plan took for possible \u2014 a license
134
+ taken since, a deactivation it will not do \u2014, the user named in the org's
135
+ code and words, the others set up; or a removal kept something, said why
136
+ 130 Ctrl-C (143 SIGTERM, 129 SIGHUP): the run ends after the step under
137
+ way, its file saying what it holds, for remove to take back
138
+ `,es=["plan","apply","remove"],Te={words:1,switches:["--dry-run","--yes","--json","--accept-user-emails","--accept-emails","--accept-automation","--include-changed"],values:["--org","--config","--run","--replaces"]},ze=["--org","--config","--replaces","--accept-user-emails","--accept-emails","--accept-automation","--json"],xe={plan:ze,apply:[...ze,"--dry-run","--yes"],remove:["--org","--run","--include-changed","--accept-automation","--yes","--json"]};function S(e){process.stderr.write(`${e} Nothing was run. Run with --help.
139
+ `),process.exit(2)}function qe(e,s){return/^[1-9]\d{0,5}$/.test(s)||S(`${e} takes a run's number, as apply named it: "${s}" is not one.`),Number(s)}function ss(e){let[s]=e;s===void 0&&S("Name the verb: plan, apply or remove."),es.includes(s)||S(s.startsWith("-")?`"${s}" comes before the verb: name plan, apply or remove first.`:`"${s}" is not a verb of ${L(X)}: plan, apply or remove.`);let r=s,n=ie(e,Te);n!==void 0&&S(n.replace(/ Nothing was run\.$/,""));let a=new Map,o=new Set;for(let f=1;f<e.length;f++){let h=e[f];Te.values.includes(h)?(a.has(h)&&S(`${h} is given twice.`),a.set(h,e[f+1]),f++):o.add(h)}for(let f of[...a.keys(),...o])xe[r].includes(f)||S(`${f} is not read by ${r}: it reads ${xe[r].join(", ")}.`);let u=a.get("--org");u===void 0&&S(`${r} needs --org <alias>.`),de.test(u)||S(`--org takes an sf alias or a username: "${u}" is neither (letters, digits, _ . @ + and -, not first . @ + or -).`);let l=a.get("--config");r!=="remove"&&l===void 0&&S(`${r} needs --config <file.json>.`);let c=a.get("--run");r==="remove"&&c===void 0&&S("remove needs --run <n>.");let d=a.get("--replaces");return r==="apply"&&o.has("--dry-run")&&o.has("--yes")&&S("--dry-run writes nothing and --yes writes: give one of them."),{verb:r,org:u,...l!==void 0?{config:l}:{},...c!==void 0?{run:qe("--run",c)}:{},...d!==void 0?{replaces:qe("--replaces",d)}:{},dryRun:o.has("--dry-run"),yes:o.has("--yes"),json:o.has("--json"),acceptUserEmails:o.has("--accept-user-emails"),acceptEmails:o.has("--accept-emails"),acceptAutomation:o.has("--accept-automation"),includeChanged:o.has("--include-changed")}}function rs(e){let s;try{s=Ke(e,"utf8")}catch(a){S(`--config ${e} could not be read (${z(a)}).`)}let r;try{r=JSON.parse(s)}catch(a){S(`--config ${e} is not JSON (${z(a)}).`)}let n=oe.safeParse(r);if(!n.success){let a=n.error.issues.map(o=>{let u=o.path.map((l,c)=>typeof l=="number"?`[${l}]`:`${c===0?"":"."}${String(l)}`).join("");return u===""?o.message:`${u}: ${o.message}`});S(`--config ${e}: ${a.join("; ")}.`)}return ae(n.data)}var ns={scratch:"scratch org",developer:"Developer Edition org",sandbox:"sandbox"};function F(e){let s=r=>r==="added"?"added":"taken back";switch(e.what){case"email":return"address asked back";case"active":return e.to?"activated":"deactivated";case"frozen":return e.to?"frozen":"unfrozen";case"profile":return`profile ${e.to} in place of ${e.from}`;case"permissionSet":return`permission set ${e.name} ${s(e.to)}`;case"permissionSetGroup":return`permission set group ${e.name} ${s(e.to)}`;case"group":return`${e.type==="Queue"?"queue":"group"} ${e.name} ${s(e.to)}`}}var ts=`address awaiting its owner's confirmation \u2014 Salesforce sent the link to it; until it is clicked (${G} h), the address stays .invalid`;function B(e){return`${e.alias??e.organizationId} (${ns[e.kind]}, ${e.organizationId})`}function os(e){return e.map(s=>he(s,"a run now"))}function as(e,s){let r=s.edition?`IsSandbox false, edition ${s.edition}`:"IsSandbox false, and no edition";return`${e} is a production org (its Organization record says ${r}): ${L(X)} sets up the users of a sandbox, a scratch org or a Developer Edition org, and reads nothing of a production org. Nothing was read or written.`}async function Le(e){let s;try{s=await ue(e)}catch(a){process.stderr.write(`${z(a)}
140
+ `),process.exit(1)}let r=ce(s),n=await Re(r,{alias:e,scratch:s.scratch===!0});return n.kind==="untyped"&&(process.stderr.write(`${le(e,n.err,{tool:L(X),action:"write",readOnly:"plan"})}
141
+ `),process.exit(1)),n.kind==="production"&&(process.stderr.write(`${as(e,n.typed)}
142
+ `),process.exit(1)),n.kind==="otherSession"&&(process.stderr.write(`The session sf gave for ${e} is of ${n.sessionOrganizationId}, and its Organization record says ${n.typed.id}: nothing was read or written. Sign in to ${e} again with sf.
143
+ `),process.exit(1)),{conn:r,org:n.org,organization:n.organization,typingRequests:n.typingRequests}}function je(){try{return new ye({root:we()})}catch(e){process.stderr.write(`${z(e)} Nothing was read or written.
144
+ `),process.exit(1)}}function De(e,s,r){if(e.kind==="none")return["automation: none read: this run writes no user and no login"];if(e.kind==="unread")return[`automation: what ${s} runs as ${r} could not be read (${e.reason})`];let n=Ae(e),a=ge(e.automation);return n.length===0&&a.length===0?[`automation: ${s} runs nothing as ${r}`]:[...n.length>0?[`automation: ${s} runs as ${r}:`]:[],...n.map(o=>` ${be(o)}`),...a.map(({part:o,reason:u})=>` ${$e(o)} of ${s} could not be read: ${u}`)]}function is(e,s){let{reading:r}=e;return"unread"in r?`deliverability: not read (${r.unread})`:r.level==="all"?`deliverability: All email \u2014 what runs in ${s} emails the addresses its records hold`:"deliverability: closed \u2014 System email only or No access: what runs there emails nobody. Which of the two, no API says."}function Me(e){return s=>(e?process.stderr:process.stdout).write(`${s}
145
+ `)}function k(e){process.stdout.write(`${JSON.stringify(e,null,2)}
146
+ `)}function ds(e,s,r){return{org:e,users:[],emailsToPeople:0,apiRequests:r,refusals:[s]}}async function us(e,s,r){let n=await e.read(s,r);if(!n)return{refusal:{code:Qe,message:`--replaces ${r}: this machine keeps no run of that number for this org, whose Organization Id is ${s}: a sandbox refreshed since answers another, and its runs went with the copy they set up. Plan without --replaces to set the users up anew`}};let a=(await e.list(s)).find(o=>o.replaces===r);return a?{refusal:{code:Ye,message:`run ${r} was replaced by run ${a.run}, which holds what it set up: --replaces ${a.run}`}}:{record:n}}function cs(e,s,r){let n=r.org,a=[`plan of the users of ${B(e.org)}`];for(let o of e.users){let u=o.given!==void 0?`${o.username} (${o.given} in the config)`:o.username,l;o.userId===void 0?l="no single user has this username (below)":o.changes.length>0?l=o.changes.map(F).join(", "):o.address==="awaiting"?l="its address asked back by an earlier run, awaiting its owner's click":l="as the config says already: nothing to do",a.push(` ${u}: ${l}`)}return e.licenses!==void 0&&a.push(`licenses: ${e.licenses.map(o=>`${o.name} ${o.used} of ${o.total} used, ${o.toUse} more`).join("; ")}`),e.emailsToPeople>0&&a.push(`emails to people: ${e.emailsToPeople}, the confirmation of each address asked back, a system email, which leaves under System email only too`+(r.acceptUserEmails?"; accepted (--accept-user-emails)":"")),s.deliverability!==void 0&&a.push(is(s.deliverability,n)),a.push(...De(s.automation,n,"users are written")),a.push(`API requests: ${s.sent} sent by this plan; an apply sends about ${e.apiRequests}`),a.push(...os(e.refusals??[])),a}function ls(e,s){let r=[`run ${e.run} of the users of ${B(e.org)}: ${e.status}`];for(let n of e.users){let a=n.done.filter(o=>o.what!=="email");a.length>0&&r.push(` ${n.username}: ${a.map(F).join(", ")}`),n.address==="awaiting"&&n.done.some(o=>o.what==="email")&&r.push(` ${n.username}: ${ts}`),n.address==="restored"&&n.done.some(o=>o.what==="email")&&r.push(` ${n.username}: address restored`);for(let o of n.refused??[])r.push(` ${n.username}: refused ${F(o.change)}: ${o.code} ${o.message}`);n.done.length===0&&(n.refused??[]).length===0&&r.push(` ${n.username}: nothing to do`)}return r.push(`taken back by: ${ee("users")} remove --org ${s} --run ${e.run} --yes`),r.push(`API requests: ${e.apiRequests}`),r}function ps(e,s){let r=[`removal of run ${e.run} of the users of ${s}: ${e.status}`];for(let n of e.users){r.push(` ${n.username}: ${n.undone.length>0?n.undone.map(F).join(", "):"nothing put back"}`);for(let a of n.kept??[])r.push(` ${n.username}: kept ${F(a.change)}: ${a.why}`)}for(let n of e.refusals??[])r.push(P(n));return r.push(`API requests: ${e.apiRequests}`),r}function We(e,s){return e==="cancelled"?pe(s??"SIGINT"):e==="partial"?3:e==="failure"?1:0}function Ge(){let e=new AbortController,s,r=fe(n=>{s=n,process.stderr.write(`
147
+ interrupted: the run ends after the step under way, its file saying what it holds (Ctrl-C again ends it at once)
148
+ `),e.abort()});return{signal:e.signal,stopped:()=>s,release:r}}async function fs(e,s){let r=Me(e.json),n=await Le(e.org),{conn:a,org:o,organization:u}=n,l=je(),c=g=>n.typingRequests+o.requests()+g,d;if(e.replaces!==void 0){let g=await us(l,u.organizationId,e.replaces);if("refusal"in g){let A=ds(u,g.refusal,c(0));r(`plan of the users of ${B(u)}`),process.stderr.write(`${P(g.refusal)}
149
+ `),e.json&&k(A),E(1);return}d=g.record}let f=await Oe({conn:a,org:o,orgName:e.org,users:s,...d?{previous:d}:{},acceptUserEmails:e.acceptUserEmails,acceptEmails:e.acceptEmails,acceptAutomation:e.acceptAutomation}),{deliverability:h,automation:$}=f,R=c(f.outsideRequests),w=Ne(f,u,R),I=w.refusals??[];for(let g of cs(w,{...h?{deliverability:h}:{},automation:$,sent:R},e))r(g);if(e.verb==="plan"||e.dryRun){e.dryRun&&r("a dry run: nothing was written"),e.json&&k(w),E(I.length>0?1:0);return}if(I.length>0){for(let g of I)process.stderr.write(`${P(g)}
150
+ `);process.stderr.write(`Nothing was written.
151
+ `),e.json&&k(w),E(1);return}let T=w.users.filter(g=>g.changes.length>0).length;if(!e.yes){let g=`Set up ${T} user${T===1?"":"s"} of ${e.org} as above`+(w.emailsToPeople>0?`, Salesforce emailing ${w.emailsToPeople} ${w.emailsToPeople===1?"person":"people"}?`:"?");if(!await W(g)){r("Nothing was written.");return}}let O=Ge(),N;try{N=await _e({org:o,organization:u,users:s,store:l,signal:O.signal,...f.options})}finally{O.release()}if(N.kind==="refused"){let g=N.plan;for(let A of g.refusals??[])process.stderr.write(`${P(A)}
152
+ `);process.stderr.write(`The org changed since the plan read it. Nothing was written.
153
+ `),e.json&&k(g),E(1);return}let _={...N.answer,apiRequests:c(f.outsideRequests)};for(let g of ls(_,e.org))r(g);e.json&&k(_),E(We(_.status,O.stopped()))}async function hs(e){let s=Me(e.json),r=e.run??0,n=await Le(e.org),{conn:a,org:o,organization:u}=n,l=je(),c={kind:"none"},d=await l.read(u.organizationId,r),f=d!==void 0&&(await l.list(u.organizationId)).some(w=>w.replaces===r);if(d!==void 0&&!f){c=await Ie(a,e.org,ke(d));let w=Ee(c,e.org,"users are put back",e.acceptAutomation);if(c.kind!=="none")for(let I of De(c,e.org,"users are put back"))s(I);if(w!==void 0){let I={org:u,run:r,status:"failure",users:[],apiRequests:n.typingRequests+o.requests()+H(c),refusals:[w]};process.stderr.write(`${P(w)}
154
+ `),e.json&&k(I),E(1);return}if(!e.yes&&!await W(`Take back run ${r} of the users of ${e.org}?`)){s("Nothing was written.");return}}let h=Ge(),$;try{$=await Pe({org:o,organization:u,store:l,run:r,includeChanged:e.includeChanged,signal:h.signal})}finally{h.release()}let R={...$,apiRequests:n.typingRequests+o.requests()+H(c)};for(let w of ps(R,e.org))s(w);e.json&&k(R),E(We(R.status,h.stopped()))}async function gs(e=process.argv){let s=e.slice(2);if(s.includes("--help")||s.includes("-h")){process.stdout.write(Ze);return}let r=ss(s);if(r.verb==="remove"){await hs(r);return}await fs(r,rs(r.config??""))}/sandforge-users\.[cm]?[jt]s$/.test(process.argv[1]??"")&&(me(),gs().then(()=>process.exit(process.exitCode??0)).catch(e=>{process.stderr.write(`${e instanceof Error?e.stack??e.message:String(e)}
155
+ `),process.exit(1)}));export{Ze as HELP,Te as USERS_FLAGS,Qe as USERS_RUN_NOT_FOUND,Ye as USERS_RUN_REPLACED,F as changeWords,gs as main,ss as parseArgs,rs as readConfig,as as usersProductionRefusal};
package/lib/sandforge.mjs CHANGED
@@ -4,25 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
4
4
  const require = __sandforgeRequire(import.meta.url);
5
5
  const __filename = __sandforgePath(import.meta.url);
6
6
  const __dirname = __sandforgeDirname(__filename);
7
- import{a as s}from"./chunk-SCKUIE3R.mjs";import"./chunk-NTOVCTRS.mjs";import{readFileSync as d}from"node:fs";import{extname as p,join as i}from"node:path";import{pathToFileURL as c}from"node:url";var r={autopilot:"run an Autopilot copy between two orgs",backup:"take and restore DataOps snapshots",checkpoint:"take a checkpoint of an org's data, and rewind the org to it",cleanup:"Bulk delete records you created on a sandbox in a time window",clone:"clone a record, or whole tables, from one org to a sandbox, or remove a run",compare:"compare two orgs the way the Compare page does",dataops:"mask an org's records, and put them back",empty:"empty objects of a sandbox, or the whole of it",env:"apply a sandforge.yaml to an org, and take it back",frozen:"build and replay a Frozen Dataset",mcp:"the MCP server: these scripts as tools for an AI agent, on stdio",monitor:"read an org the way the Monitor page does",pipeline:"plan and run an Automation pipeline exported from VS Code",seed:"fill an org from a seed template",sync:"run a Sync between two orgs"},a=o=>Object.prototype.hasOwnProperty.call(r,o);function m(o){let[e,...n]=o;if(e===void 0)return{kind:"refused",reason:"Name the command to run."};if(e==="--help"||e==="-h"||e==="help")return{kind:"help"};if(e==="--version"||e==="-v")return{kind:"version"};if(a(e))return{kind:"run",tool:e,args:n};let t=e.replace(/^sandforge-/,"");return t!==e&&a(t)?{kind:"refused",reason:`"${e}" is named ${t} here: ${s(t)} \u2026.`}:{kind:"refused",reason:e.startsWith("-")?`"${e}" is not a flag sandforge reads: name a command first.`:`"${e}" is not a command of sandforge.`}}function l(){let o=Math.max(...Object.keys(r).map(n=>n.length));return`sandforge \u2014 SandForge's command lines, without the editor: Seed, Forge's clone, Sync,
8
- Checkpoints, DataOps, Frozen Dataset, the emptying of a sandbox, sandforge.yaml environments,
9
- Automation pipelines, and the MCP server.
10
-
11
- Usage:
12
- sandforge <command> [options]
13
- sandforge <command> --help what the command does, its options and its exit codes
14
-
15
- Commands:
16
- ${Object.entries(r).map(([n,t])=>` ${n.padEnd(o)} ${t}`).join(`
17
- `)}
18
-
19
- Each org is named by its sf CLI alias: the Salesforce CLI (sf) must be installed and logged in
20
- to it. In Claude Code:
21
- claude mcp add sandforge -- npx -y sandforge mcp
22
-
23
- --version the version of SandForge these scripts belong to
24
- --help this text
25
- `}function f(o,e=__dirname,n=__filename){return i(e,`sandforge-${o}${p(n)}`)}function g(o=__dirname){let e=JSON.parse(d(i(o,"..","package.json"),"utf8"));return typeof e.version=="string"?e.version:"0.0.0"}var u=o=>import(c(o).href);async function h(o=process.argv,e=u){let n=m(o.slice(2));switch(n.kind){case"help":process.stdout.write(l());return;case"version":process.stdout.write(`${g()}
26
- `);return;case"refused":process.stderr.write(`${n.reason} Nothing was run. The commands: ${Object.keys(r).join(", ")}. Run with --help.
27
- `),process.exitCode=2;return;case"run":{let t=f(n.tool);process.argv=[o[0]??process.execPath,t,...n.args],await e(t);return}}}/(?:^|[\\/])sandforge\.[cm]?[jt]s$/.test(process.argv[1]??"")&&h().catch(o=>{process.stderr.write(`${o instanceof Error?o.message:String(o)}
28
- `),process.exit(1)});export{r as TOOLS,m as dispatchOf,l as helpText,h as main,f as toolFile,g as versionOf};
7
+ import{a,b,c,d,e,f}from"./chunk-A32ISQ6M.mjs";import"./chunk-SCKUIE3R.mjs";import"./chunk-NTOVCTRS.mjs";export{a as TOOLS,b as dispatchOf,c as helpText,f as main,d as toolFile,e as versionOf};
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "run an Autopilot copy between two orgs";
3
+ static description = "sandforge autopilot — run an Autopilot copy between two orgs, without the editor.\n\nThe whole help, its options and its exit codes: sf sandforge autopilot --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge autopilot takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("autopilot", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "take and restore DataOps snapshots";
3
+ static description = "sandforge backup — take and restore DataOps snapshots, without the editor.\n\nThe whole help, its options and its exit codes: sf sandforge backup --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge backup takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("backup", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "take a checkpoint of an org's data, and rewind the org to it";
3
+ static description = "sandforge checkpoint — take a checkpoint of an org's data, and rewind the org to it, without the editor.\n\nThe whole help, its options and its exit codes: sf sandforge checkpoint --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge checkpoint takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("checkpoint", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "Bulk delete records you created on a sandbox in a time window";
3
+ static description = "sandforge cleanup — Bulk delete records you created on a sandbox in the --since window, whether or not a clone wrote them. Preview with --dry-run and narrow with --objects before deleting.\n\nThe whole help, its options and its exit codes: sf sandforge cleanup --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge cleanup takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("cleanup", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "clone a record, or whole tables, from one org to a sandbox, or remove a run";
3
+ static description = "sandforge clone — Forge a clone of one record, or of whole tables, from a source org to a target sandbox, or remove what a run of it created.\n\nThe whole help, its options and its exit codes: sf sandforge clone --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge clone takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("clone", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "compare two orgs the way the Compare page does";
3
+ static description = "sandforge compare — compare two orgs the way the Compare page does, without the editor.\n\nThe whole help, its options and its exit codes: sf sandforge compare --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge compare takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("compare", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "mask an org's records, and put them back";
3
+ static description = "sandforge dataops — mask an org's records, and put them back, without the editor.\n\nThe whole help, its options and its exit codes: sf sandforge dataops --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge dataops takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("dataops", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "empty objects of a sandbox, or the whole of it";
3
+ static description = "sandforge empty — empty objects of a sandbox, or the whole of it, without the editor: a dry run first, then the deletes, to the recycle bin with an undo, or for good.\n\nThe whole help, its options and its exit codes: sf sandforge empty --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge empty takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("empty", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "apply a sandforge.yaml to an org, and take it back";
3
+ static description = "sandforge env — apply a sandforge.yaml to an org: the data an environment needs, declared in your repository, created, kept and taken back, without the editor.\n\nThe whole help, its options and its exit codes: sf sandforge env --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge env takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("env", argv);
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ export default class SandforgeCommand {
2
+ static summary = "build and replay a Frozen Dataset";
3
+ static description = "sandforge frozen — build and replay a Frozen Dataset, without the editor.\n\nThe whole help, its options and its exit codes: sf sandforge frozen --help.";
4
+ static hidden = false;
5
+ static strict = false;
6
+ static flags = {};
7
+ static args = {"argv":{"name":"argv","description":"the words npx sandforge frozen takes"}};
8
+ static async run(argv) {
9
+ const [major, minor] = process.versions.node.split('.').map(Number);
10
+ if (major < 20 || (major === 20 && minor < 19)) {
11
+ process.stderr.write(
12
+ 'sandforge needs Node.js 20.19 or later, and this is ' + process.versions.node + '. Nothing was run.\n',
13
+ );
14
+ process.exitCode = 1;
15
+ return;
16
+ }
17
+ const { runTool } = await import('../../sfPlugin.mjs');
18
+ await runTool("frozen", argv);
19
+ }
20
+ }