sandforge 1.85.0 → 1.86.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 (274) hide show
  1. package/README.md +1 -1
  2. package/lib/{chunk-THYQOG24.mjs → chunk-22L43JMK.mjs} +1 -1
  3. package/lib/{chunk-U4S27YRP.mjs → chunk-2LSGWTWX.mjs} +1 -1
  4. package/lib/{chunk-MRN72UEO.mjs → chunk-2YJJTQNC.mjs} +1 -1
  5. package/lib/chunk-34SMB5PA.mjs +10 -0
  6. package/lib/chunk-35B73566.mjs +7 -0
  7. package/lib/{chunk-YZKE6D3K.mjs → chunk-35IJ4WEU.mjs} +1 -1
  8. package/lib/chunk-3EHPAFKV.mjs +7 -0
  9. package/lib/{chunk-3OKDWZ32.mjs → chunk-3HAVVEXF.mjs} +1 -1
  10. package/lib/{chunk-32ZB5ICW.mjs → chunk-3I6FXFCN.mjs} +1 -1
  11. package/lib/{chunk-JFVY66BS.mjs → chunk-3KJCSYXY.mjs} +1 -1
  12. package/lib/{chunk-ULEYGOZU.mjs → chunk-3L6DVNCR.mjs} +1 -1
  13. package/lib/chunk-3LRFPGYZ.mjs +7 -0
  14. package/lib/{chunk-GHUA6OQQ.mjs → chunk-3MVWGL5A.mjs} +1 -1
  15. package/lib/{chunk-SF52ZSIV.mjs → chunk-4CSBZZAL.mjs} +1 -1
  16. package/lib/{chunk-FBYFCKPG.mjs → chunk-4NSXPONF.mjs} +1 -1
  17. package/lib/{chunk-A3QNSALB.mjs → chunk-4VLP6RHC.mjs} +1 -1
  18. package/lib/{chunk-TWYNQ2OO.mjs → chunk-4XROG5CT.mjs} +1 -1
  19. package/lib/chunk-54V4FVEY.mjs +7 -0
  20. package/lib/chunk-55OJJT2Q.mjs +7 -0
  21. package/lib/{chunk-JRI6A24G.mjs → chunk-5EHHQ5UX.mjs} +1 -1
  22. package/lib/{chunk-VPGX5Z5D.mjs → chunk-5JMQXHJ2.mjs} +1 -1
  23. package/lib/{chunk-CI2O7WBH.mjs → chunk-65AMXOQU.mjs} +1 -1
  24. package/lib/{chunk-5T3LFDJ5.mjs → chunk-6HHSAPIM.mjs} +1 -1
  25. package/lib/chunk-6KVBCFVS.mjs +7 -0
  26. package/lib/chunk-6NG7C2U3.mjs +476 -0
  27. package/lib/{chunk-F2424IKX.mjs → chunk-6ROL3KBM.mjs} +1 -1
  28. package/lib/{chunk-7ZYCRIHE.mjs → chunk-72AWCN7U.mjs} +1 -1
  29. package/lib/{chunk-MQLTEXB7.mjs → chunk-7KHA5UIQ.mjs} +1 -1
  30. package/lib/chunk-7O6EFNQS.mjs +10 -0
  31. package/lib/{chunk-73SLYGWD.mjs → chunk-A2CH2QGX.mjs} +1 -1
  32. package/lib/chunk-A2TXLAC3.mjs +276 -0
  33. package/lib/chunk-ALWVNR34.mjs +7 -0
  34. package/lib/{chunk-JBOGAUGH.mjs → chunk-ATBQIE2V.mjs} +1 -1
  35. package/lib/{chunk-C2MHMI7U.mjs → chunk-ATQML7ZK.mjs} +1 -1
  36. package/lib/chunk-AVY742BJ.mjs +7 -0
  37. package/lib/{chunk-VLAU5QQT.mjs → chunk-AXTB2HJS.mjs} +1 -1
  38. package/lib/chunk-BBZUGKBZ.mjs +10 -0
  39. package/lib/chunk-BIDXK7KA.mjs +7 -0
  40. package/lib/{chunk-KYLHS74X.mjs → chunk-BLMJ4WVI.mjs} +1 -1
  41. package/lib/{chunk-A7YP27GQ.mjs → chunk-BNHJCJJM.mjs} +1 -1
  42. package/lib/{chunk-ZDMSTL2L.mjs → chunk-BNPQEQXC.mjs} +1 -1
  43. package/lib/chunk-C5AUNG6T.mjs +37 -0
  44. package/lib/{chunk-LY6EPMIP.mjs → chunk-C5EQ7GFC.mjs} +1 -1
  45. package/lib/{chunk-LOO42EW5.mjs → chunk-C7CKDZMC.mjs} +62 -62
  46. package/lib/{chunk-ZP3WJGS3.mjs → chunk-CB4U22NR.mjs} +1 -1
  47. package/lib/chunk-CJAWKLAL.mjs +7 -0
  48. package/lib/chunk-CL75DEMQ.mjs +9 -0
  49. package/lib/{chunk-7L6FE5PP.mjs → chunk-CLUNF4FK.mjs} +1 -1
  50. package/lib/chunk-CSMGP53U.mjs +7 -0
  51. package/lib/{chunk-S6BMJSLD.mjs → chunk-CT324C7I.mjs} +1 -1
  52. package/lib/{chunk-YXOPKGDX.mjs → chunk-CZXDJXQP.mjs} +1 -1
  53. package/lib/{chunk-PGG4ULEW.mjs → chunk-D2X6U3MS.mjs} +1 -1
  54. package/lib/{chunk-FG4Y4ZVL.mjs → chunk-DAUX63UB.mjs} +1 -1
  55. package/lib/chunk-DB7JNALQ.mjs +10 -0
  56. package/lib/chunk-DDNCJVZ2.mjs +17 -0
  57. package/lib/{chunk-YGE4AUXG.mjs → chunk-DLSU66MY.mjs} +1 -1
  58. package/lib/{chunk-DCJBP3LE.mjs → chunk-DO6PSHQZ.mjs} +1 -1
  59. package/lib/{chunk-ROTDZKOE.mjs → chunk-DUBECLZV.mjs} +1 -1
  60. package/lib/{chunk-SES5HPBZ.mjs → chunk-DYHF6DNT.mjs} +1 -1
  61. package/lib/chunk-E5FSPXYH.mjs +930 -0
  62. package/lib/{chunk-QAXKUEJT.mjs → chunk-EGL3I3IX.mjs} +1 -1
  63. package/lib/chunk-EIYMQPMG.mjs +7 -0
  64. package/lib/{chunk-AX3YF7SC.mjs → chunk-EUIALBMX.mjs} +1 -1
  65. package/lib/{chunk-57QRXYAZ.mjs → chunk-FI3R5ZOQ.mjs} +1 -1
  66. package/lib/{chunk-FCZDWGQI.mjs → chunk-FM4QCTO7.mjs} +1 -1
  67. package/lib/{chunk-74HZ274R.mjs → chunk-FRSIEASH.mjs} +1 -1
  68. package/lib/{chunk-G6IYOZEH.mjs → chunk-FV6MOSHD.mjs} +1 -1
  69. package/lib/chunk-FYG47CNA.mjs +7 -0
  70. package/lib/chunk-GB6W4Q56.mjs +7 -0
  71. package/lib/chunk-GEV2DCMK.mjs +7 -0
  72. package/lib/{chunk-NZJXEULY.mjs → chunk-GFB2DNCB.mjs} +1 -1
  73. package/lib/chunk-GFGMGFSH.mjs +7 -0
  74. package/lib/{chunk-EFHDE7W4.mjs → chunk-GIFQXB2Q.mjs} +1 -1
  75. package/lib/{chunk-P6A22FMQ.mjs → chunk-GP5J3DGS.mjs} +1 -1
  76. package/lib/chunk-GQZEX7LH.mjs +231 -0
  77. package/lib/{chunk-BRN42U26.mjs → chunk-GYDTM62J.mjs} +1 -1
  78. package/lib/{chunk-GNCEHAJY.mjs → chunk-GYFIXUJG.mjs} +1 -1
  79. package/lib/chunk-GZW2GNFK.mjs +7 -0
  80. package/lib/chunk-H6BHWAX7.mjs +8 -0
  81. package/lib/{chunk-GUYEXPJ4.mjs → chunk-HDDJ3CVN.mjs} +1 -1
  82. package/lib/{chunk-3GATEVHC.mjs → chunk-HDWB4ZOG.mjs} +1 -1
  83. package/lib/chunk-HGVPBJR6.mjs +7 -0
  84. package/lib/{chunk-55VBV2WK.mjs → chunk-HLROVOR6.mjs} +1 -1
  85. package/lib/{chunk-HV3TDLFR.mjs → chunk-HUOR4M2L.mjs} +1 -1
  86. package/lib/chunk-HZCS6EED.mjs +8 -0
  87. package/lib/{chunk-WZX6VCIT.mjs → chunk-HZUI56KZ.mjs} +1 -1
  88. package/lib/chunk-IAB5H7WN.mjs +7 -0
  89. package/lib/{chunk-RY7WUJXH.mjs → chunk-IQ5UKRHU.mjs} +1 -1
  90. package/lib/{chunk-OUWR5M5G.mjs → chunk-IRQ4WANV.mjs} +1 -1
  91. package/lib/{chunk-F44EHXLI.mjs → chunk-IT3DGX37.mjs} +1 -1
  92. package/lib/chunk-J347SPU6.mjs +49 -0
  93. package/lib/{chunk-IZ2M2RGO.mjs → chunk-JANBNTR5.mjs} +1 -1
  94. package/lib/chunk-JFXQZPRY.mjs +9 -0
  95. package/lib/{chunk-VKA5OZBJ.mjs → chunk-JRLYWVF4.mjs} +1 -1
  96. package/lib/{chunk-FM5ESRH6.mjs → chunk-JSNMUTY6.mjs} +1 -1
  97. package/lib/chunk-JTNJKSAA.mjs +7 -0
  98. package/lib/{chunk-4D6OHSX3.mjs → chunk-JV2LAKWQ.mjs} +1 -1
  99. package/lib/{chunk-BY42YL4D.mjs → chunk-JV7K2ZHK.mjs} +1 -1
  100. package/lib/{chunk-A6IJUOLB.mjs → chunk-K4TQ7YHX.mjs} +1 -1
  101. package/lib/chunk-K5PUMHZU.mjs +7 -0
  102. package/lib/chunk-KH4KLCYG.mjs +7 -0
  103. package/lib/{chunk-FZF6FB65.mjs → chunk-KQVLZVOP.mjs} +1 -1
  104. package/lib/chunk-KWUS7UAV.mjs +19 -0
  105. package/lib/{chunk-2UUSF32M.mjs → chunk-L6G73FXM.mjs} +1 -1
  106. package/lib/{chunk-LUNGNCM3.mjs → chunk-LG466Q5H.mjs} +1 -1
  107. package/lib/{chunk-YTBM3TSW.mjs → chunk-LHNAR6FC.mjs} +1 -1
  108. package/lib/chunk-LT4GHEI2.mjs +7 -0
  109. package/lib/{chunk-P3OYE2FS.mjs → chunk-MR262Y3B.mjs} +1 -1
  110. package/lib/{chunk-TSTCHIBU.mjs → chunk-NCCHOV2N.mjs} +1 -1
  111. package/lib/chunk-NICRSGLS.mjs +7 -0
  112. package/lib/chunk-NV5QA2HY.mjs +7 -0
  113. package/lib/{chunk-6HAKOS6W.mjs → chunk-O3GIN5TU.mjs} +1 -1
  114. package/lib/chunk-O6FHK6NQ.mjs +13 -0
  115. package/lib/{chunk-OXIIKAUZ.mjs → chunk-O7YIEFG7.mjs} +1 -1
  116. package/lib/chunk-OCUVAA5E.mjs +7 -0
  117. package/lib/chunk-OLCS7JCT.mjs +14 -0
  118. package/lib/chunk-ON7Y63FK.mjs +9 -0
  119. package/lib/{chunk-K2WOT75I.mjs → chunk-OO2WY3UB.mjs} +1 -1
  120. package/lib/{chunk-3EOIAC2M.mjs → chunk-OT2NHL2V.mjs} +1 -1
  121. package/lib/{chunk-BK5SRDAD.mjs → chunk-P2M5ZXWU.mjs} +1 -1
  122. package/lib/{chunk-DCZYWMSA.mjs → chunk-P4YOHLZ4.mjs} +1 -1
  123. package/lib/chunk-PBHDPTT6.mjs +343 -0
  124. package/lib/chunk-PE7CHD2W.mjs +7 -0
  125. package/lib/{chunk-LU7M5URW.mjs → chunk-PIQ2I67B.mjs} +1 -1
  126. package/lib/chunk-PKYDNZJK.mjs +7 -0
  127. package/lib/chunk-PVZ72OOQ.mjs +7 -0
  128. package/lib/chunk-QACFTHJM.mjs +8 -0
  129. package/lib/{chunk-LNAZHI3J.mjs → chunk-QGVL5EW3.mjs} +1 -1
  130. package/lib/chunk-QHE2RUWX.mjs +7 -0
  131. package/lib/{chunk-4RNP65FV.mjs → chunk-RCW5BZNW.mjs} +1 -1
  132. package/lib/{chunk-OTKXTBTX.mjs → chunk-RJ6HHG7J.mjs} +1 -1
  133. package/lib/{chunk-IVDBVWKK.mjs → chunk-RPTEEI4R.mjs} +1 -1
  134. package/lib/chunk-RQW5S67A.mjs +7 -0
  135. package/lib/chunk-RTCMYMED.mjs +7 -0
  136. package/lib/chunk-RWVX7XSD.mjs +7 -0
  137. package/lib/{chunk-2UUS4IGB.mjs → chunk-RZOINFNL.mjs} +1 -1
  138. package/lib/chunk-SOOTWGMQ.mjs +7 -0
  139. package/lib/chunk-STQ2JMIZ.mjs +7 -0
  140. package/lib/{chunk-RC25QQVF.mjs → chunk-SUIPDW5O.mjs} +1 -1
  141. package/lib/{chunk-Z354SAEF.mjs → chunk-SZOJ7BEJ.mjs} +1 -1
  142. package/lib/{chunk-45375WT5.mjs → chunk-T542Z54E.mjs} +1 -1
  143. package/lib/chunk-TAN2CIRI.mjs +21 -0
  144. package/lib/{chunk-BGJBYDRW.mjs → chunk-TCNBINOG.mjs} +1 -1
  145. package/lib/chunk-TFDF3DBN.mjs +7 -0
  146. package/lib/{chunk-B5A4JHNN.mjs → chunk-TICZXC53.mjs} +1 -1
  147. package/lib/chunk-TLX45X5U.mjs +7 -0
  148. package/lib/{chunk-W6SLQZKQ.mjs → chunk-TMIV3IWH.mjs} +1 -1
  149. package/lib/chunk-TQ6HEJ73.mjs +11 -0
  150. package/lib/chunk-TTU5EQZ6.mjs +7 -0
  151. package/lib/chunk-TYUYPFDJ.mjs +7 -0
  152. package/lib/chunk-TZXYVMZC.mjs +7 -0
  153. package/lib/{chunk-4N425UJC.mjs → chunk-UCUFLFNK.mjs} +1 -1
  154. package/lib/chunk-UK3QLBHW.mjs +7 -0
  155. package/lib/{chunk-SKGAERV4.mjs → chunk-UM2B4GR7.mjs} +1 -1
  156. package/lib/chunk-UZFTTNOP.mjs +7 -0
  157. package/lib/chunk-V3AXSKSU.mjs +7 -0
  158. package/lib/chunk-VA6EEI6X.mjs +21 -0
  159. package/lib/{chunk-LSEM2BZH.mjs → chunk-VFKG2G37.mjs} +1 -1
  160. package/lib/chunk-VJNEW5MQ.mjs +7 -0
  161. package/lib/{chunk-EYFP3NA6.mjs → chunk-VKREON6Q.mjs} +1 -1
  162. package/lib/{chunk-TIVI2KGB.mjs → chunk-VNNDYPBL.mjs} +1 -1
  163. package/lib/{chunk-J3FJ3BWE.mjs → chunk-VRBETPHY.mjs} +1 -1
  164. package/lib/{chunk-UX4AOSMU.mjs → chunk-VT6P3X6R.mjs} +1 -1
  165. package/lib/{chunk-CUOWQMGW.mjs → chunk-VUTQY76O.mjs} +1 -1
  166. package/lib/chunk-WF5S4FW5.mjs +7 -0
  167. package/lib/{chunk-JHJDDQDE.mjs → chunk-WJGK6VGU.mjs} +1 -1
  168. package/lib/{chunk-IZREPWYQ.mjs → chunk-WJHMB3SL.mjs} +1 -1
  169. package/lib/{chunk-XZRON54U.mjs → chunk-WQCXOZEJ.mjs} +1 -1
  170. package/lib/{chunk-N2MXYD67.mjs → chunk-WVVFR4E3.mjs} +1 -1
  171. package/lib/{chunk-GG5I52UT.mjs → chunk-XBYXT74L.mjs} +1 -1
  172. package/lib/chunk-XJE3LJHP.mjs +7 -0
  173. package/lib/{chunk-3QCUSZIZ.mjs → chunk-XV4CVZYD.mjs} +1 -1
  174. package/lib/chunk-Y37ED7AS.mjs +7 -0
  175. package/lib/{chunk-MN3XBJPE.mjs → chunk-YGBNZYT4.mjs} +1 -1
  176. package/lib/{chunk-SBDF4AE5.mjs → chunk-YGTOX7IL.mjs} +1 -1
  177. package/lib/{chunk-SQM32AOQ.mjs → chunk-YJ27WHKR.mjs} +1 -1
  178. package/lib/chunk-YRULC27A.mjs +7 -0
  179. package/lib/{chunk-RMFU4BAL.mjs → chunk-YSVAHT4Q.mjs} +4 -4
  180. package/lib/chunk-YTOTMJTY.mjs +15 -0
  181. package/lib/{chunk-SU24AE3H.mjs → chunk-YZKZC62O.mjs} +1 -1
  182. package/lib/{chunk-LJNRN7MY.mjs → chunk-YZQN7BRB.mjs} +1 -1
  183. package/lib/{chunk-NMF55UBQ.mjs → chunk-Z5IUK2QO.mjs} +1 -1
  184. package/lib/{chunk-6ZWY36LK.mjs → chunk-ZEGSMW5A.mjs} +1 -1
  185. package/lib/{chunk-YV7JYHJP.mjs → chunk-ZIKLQZBG.mjs} +1 -1
  186. package/lib/chunk-ZVU7MD2S.mjs +7 -0
  187. package/lib/sandforge-autopilot.mjs +33 -27
  188. package/lib/sandforge-backup.mjs +19 -19
  189. package/lib/sandforge-checkpoint.mjs +1 -1
  190. package/lib/sandforge-cleanup.mjs +1 -1
  191. package/lib/sandforge-clone.mjs +1 -1
  192. package/lib/sandforge-compare.mjs +29 -16
  193. package/lib/sandforge-dataops.mjs +1 -1
  194. package/lib/sandforge-empty.mjs +11 -13
  195. package/lib/sandforge-env.mjs +105 -105
  196. package/lib/sandforge-frozen.mjs +1 -1
  197. package/lib/sandforge-mcp.mjs +2 -2
  198. package/lib/sandforge-monitor.mjs +1 -1
  199. package/lib/sandforge-pipeline.mjs +13 -13
  200. package/lib/sandforge-seed.mjs +1 -1
  201. package/lib/sandforge-sync.mjs +1 -1
  202. package/lib/sandforge-users.mjs +13 -15
  203. package/lib/sandforge.mjs +1 -1
  204. package/lib/sf/sandforge/dataops.mjs +2 -2
  205. package/lib/sfPlugin.mjs +1 -1
  206. package/oclif.manifest.json +1 -1
  207. package/package.json +1 -1
  208. package/lib/chunk-26EGXYZ4.mjs +0 -21
  209. package/lib/chunk-2JRVBXJL.mjs +0 -7
  210. package/lib/chunk-2METQHGG.mjs +0 -7
  211. package/lib/chunk-3XU7CEJQ.mjs +0 -7
  212. package/lib/chunk-4BQPAVMP.mjs +0 -14
  213. package/lib/chunk-4KMKOE77.mjs +0 -156
  214. package/lib/chunk-4RPA7Z52.mjs +0 -7
  215. package/lib/chunk-5C7LQXYS.mjs +0 -7
  216. package/lib/chunk-5EESNYE3.mjs +0 -8
  217. package/lib/chunk-6ZW6BLV5.mjs +0 -7
  218. package/lib/chunk-AAOMUI7S.mjs +0 -15
  219. package/lib/chunk-AIUAEBHR.mjs +0 -7
  220. package/lib/chunk-BD724WOH.mjs +0 -7
  221. package/lib/chunk-CRPLDXJU.mjs +0 -48
  222. package/lib/chunk-CSSOLHE3.mjs +0 -7
  223. package/lib/chunk-D63HEQ3B.mjs +0 -7
  224. package/lib/chunk-DN7YBILC.mjs +0 -21
  225. package/lib/chunk-DNE7JI3A.mjs +0 -11
  226. package/lib/chunk-EFHM2U4D.mjs +0 -7
  227. package/lib/chunk-EINEGS6E.mjs +0 -7
  228. package/lib/chunk-EM5EFMHA.mjs +0 -272
  229. package/lib/chunk-FH5UR35W.mjs +0 -7
  230. package/lib/chunk-FN7TOBJR.mjs +0 -7
  231. package/lib/chunk-HGJFATSI.mjs +0 -10
  232. package/lib/chunk-HOEE3PE5.mjs +0 -7
  233. package/lib/chunk-HV63UGL5.mjs +0 -7
  234. package/lib/chunk-JKFCGYJE.mjs +0 -7
  235. package/lib/chunk-KATBU46O.mjs +0 -7
  236. package/lib/chunk-LD34JNCC.mjs +0 -7
  237. package/lib/chunk-LPN4WYTP.mjs +0 -478
  238. package/lib/chunk-MAOUFJ47.mjs +0 -7
  239. package/lib/chunk-MB2DG66I.mjs +0 -13
  240. package/lib/chunk-NCASRA7L.mjs +0 -9
  241. package/lib/chunk-NEKNAILD.mjs +0 -7
  242. package/lib/chunk-NN2IO4WE.mjs +0 -7
  243. package/lib/chunk-O3ZQSWDN.mjs +0 -10
  244. package/lib/chunk-OFQOKSEW.mjs +0 -7
  245. package/lib/chunk-PP7PJXRJ.mjs +0 -341
  246. package/lib/chunk-PT2E2HFD.mjs +0 -7
  247. package/lib/chunk-PZBZ7MNC.mjs +0 -7
  248. package/lib/chunk-QBYK5XIT.mjs +0 -8
  249. package/lib/chunk-RFD6NPWJ.mjs +0 -8
  250. package/lib/chunk-RIIJJRGF.mjs +0 -7
  251. package/lib/chunk-RKTFFCNS.mjs +0 -7
  252. package/lib/chunk-RM5G4IP6.mjs +0 -19
  253. package/lib/chunk-RTPNK7OB.mjs +0 -7
  254. package/lib/chunk-RZXEO5IE.mjs +0 -7
  255. package/lib/chunk-SAHGDSZQ.mjs +0 -37
  256. package/lib/chunk-SRPWW4A2.mjs +0 -10
  257. package/lib/chunk-SVNSAHG3.mjs +0 -7
  258. package/lib/chunk-T63U4OZJ.mjs +0 -7
  259. package/lib/chunk-TE2W76II.mjs +0 -10
  260. package/lib/chunk-TEIBWMJM.mjs +0 -7
  261. package/lib/chunk-TFGJDZFE.mjs +0 -7
  262. package/lib/chunk-TG52WNGV.mjs +0 -10
  263. package/lib/chunk-TQONVFI3.mjs +0 -7
  264. package/lib/chunk-TW3N6W5Z.mjs +0 -7
  265. package/lib/chunk-UZMLPKW6.mjs +0 -7
  266. package/lib/chunk-WB2RIVO3.mjs +0 -7
  267. package/lib/chunk-WQO7RXEB.mjs +0 -926
  268. package/lib/chunk-X3MBY2RX.mjs +0 -7
  269. package/lib/chunk-XMJRXXUN.mjs +0 -7
  270. package/lib/chunk-YNMU5I7P.mjs +0 -7
  271. package/lib/chunk-YSQJKIO6.mjs +0 -7
  272. package/lib/chunk-YVVPJRZC.mjs +0 -7
  273. package/lib/chunk-ZLQHBI6V.mjs +0 -9
  274. package/lib/chunk-ZRUDYB7O.mjs +0 -7
@@ -1,10 +0,0 @@
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{G as ve,m as Ce,n as Be}from"./chunk-CSSOLHE3.mjs";import{e as w,f as L,g as je,l as v,m as Te}from"./chunk-YGE4AUXG.mjs";import{a as ie}from"./chunk-C2MHMI7U.mjs";import{b as $}from"./chunk-P6A22FMQ.mjs";import{_b as _e,ib as Ne,kb as J,mb as De}from"./chunk-O3ZQSWDN.mjs";import{k as Se}from"./chunk-DNE7JI3A.mjs";import{b as oe,f as we}from"./chunk-INIT2UKJ.mjs";import{k as ke,l as Ae,m as Ee}from"./chunk-JBOGAUGH.mjs";import{da as z,ea as Oe}from"./chunk-Z354SAEF.mjs";import{b as M}from"./chunk-CA5NAXSU.mjs";import{b as ne,e as V,f as re,k as ye,l as _}from"./chunk-WZQEK4WT.mjs";function dt(e){return e.keptChanged+e.keptDependents+e.refused+(e.notVisible??0)}function Bn(e,t){return t?"cancelled":e.every(n=>dt(n)===0)?"success":e.some(n=>n.deleted>0)?"partial":"failure"}function vn(e,t){return e!=="success"||!t||t.status==="success"?e:t.status==="cancelled"?"cancelled":"partial"}function jn(e){return e.status}function Tn(e){return e.filter(t=>t.deleted+t.refused+(t.notReached??0)>0).map(t=>({...Se(t.objectApiName),deleted:t.deleted,failed:t.refused,...(t.notReached??0)>0?{notSent:t.notReached}:{}}))}function Nn(e,t,n,r=!1){let o=R=>e.objects.reduce((C,B)=>C+R(B),0),i=o(R=>R.deleted),s=o(R=>R.alreadyGone),l=o(R=>R.keptChanged+R.keptDependents),u=o(R=>R.refused),c=o(R=>R.notVisible??0);if(i+s===0&&(!r||e.status==="cancelled"||l+u+c===0))return;let b=r?void 0:n,O=o(R=>R.platformCopies??0),E=e.status==="cancelled"?Math.max(0,t+O-i-s-l-u-c):0;return{removedAt:e.finishedAt,deleted:(b?.deleted??0)+i,alreadyGone:(b?.alreadyGone??0)+s,kept:l,refused:u,...E>0?{notReached:E}:{},...c>0?{notVisible:c}:{}}}function Dn(e,t){let n=o=>e.objects.reduce((i,s)=>i+o(s),0),r=n(o=>o.notVisible??0);return{removedAt:e.finishedAt,deleted:t.deleted,alreadyGone:t.alreadyGone,kept:n(o=>o.keptChanged+o.keptDependents),refused:n(o=>o.refused),...r>0?{notVisible:r}:{}}}function _n(...e){let t=new Set,n=[];for(let r of e.flatMap(o=>o??[])){let o=`${r.first}|${r.last}|${r.userId.slice(0,15)}`;t.has(o)||(t.add(o),n.push(r))}return n.sort((r,o)=>Date.parse(r.first)-Date.parse(o.first))}var se=5;function x(e,t,n=1/0){return[...new Set([...e,...t])].slice(0,n)}function P(e,t){return e===void 0&&t===void 0?void 0:(e??0)+(t??0)}function Pe(e,t){if(!(!e&&!t))return{count:(e?.count??0)+(t?.count??0),objects:x(e?.objects??[],t?.objects??[])}}function Pn(...e){let t=new Map;for(let n of e.flat()){let r=t.get(n.objectApiName);if(!r){t.set(n.objectApiName,{...n});continue}let o={notVisible:P(r.notVisible,n.notVisible),notReached:P(r.notReached,n.notReached),heldByAutomation:P(r.heldByAutomation,n.heldByAutomation),heldByAutomationAfterRun:P(r.heldByAutomationAfterRun,n.heldByAutomationAfterRun),heldByAutomationAlong:P(r.heldByAutomationAlong,n.heldByAutomationAlong),platformCopies:P(r.platformCopies,n.platformCopies)},i=x(r.automationHolders??[],n.automationHolders??[]),s=r.filesLeft||n.filesLeft?{count:(r.filesLeft?.count??0)+(n.filesLeft?.count??0),names:x(r.filesLeft?.names??[],n.filesLeft?.names??[],se)}:void 0,l=Pe(r.tookAlong,n.tookAlong),u=Pe(r.cameAlong,n.cameAlong);t.set(n.objectApiName,{objectApiName:n.objectApiName,planned:r.planned+n.planned,deleted:r.deleted+n.deleted,alreadyGone:r.alreadyGone+n.alreadyGone,keptChanged:r.keptChanged+n.keptChanged,keptDependents:r.keptDependents+n.keptDependents,refused:r.refused+n.refused,...Object.fromEntries(Object.entries(o).filter(([,c])=>c!==void 0)),heldBy:x(r.heldBy,n.heldBy),...i.length>0?{automationHolders:i}:{},unchecked:x(r.unchecked,n.unchecked),reasons:x(r.reasons,n.reasons,se),...s?{filesLeft:s}:{},...l?{tookAlong:l}:{},...u?{cameAlong:u}:{}})}return[...t.values()]}function xn(...e){let t=new Map;for(let n of e.flat()){let r=t.get(n.objectApiName);if(!r){t.set(n.objectApiName,{...n,changedBy:{...n.changedBy}});continue}let o={...r.changedBy};for(let[s,l]of Object.entries(n.changedBy))o[s]=(o[s]??0)+l;let i=P(r.platformCopies,n.platformCopies);t.set(n.objectApiName,{objectApiName:n.objectApiName,planned:r.planned+n.planned,toDelete:r.toDelete+n.toDelete,alreadyGone:r.alreadyGone+n.alreadyGone,changedSince:r.changedSince+n.changedSince,keptChanged:r.keptChanged+n.keptChanged,changedBy:o,undeletable:r.undeletable+n.undeletable,notVisible:r.notVisible+n.notVisible,unread:r.unread+n.unread,...i!==void 0?{platformCopies:i}:{},reasons:x(r.reasons,n.reasons,se)})}return[...t.values()]}import{AsyncLocalStorage as ct}from"node:async_hooks";var xe=new Set(["delete","hardDelete"]),ue=1e4,$e=5e4;function $n(e){switch(e){case"production":return;case"staging":return ue;case"development":case"scratch":return $e}}var Le=new ct;function ae(){let e=Le.getStore();return e?.live?e:void 0}async function Ln(e,t){let n={approved:e.approved,live:!0};try{return await Le.run(n,t)}finally{n.live=!1}}var Ie=class{overrides=new Map;options;constructor(t){this.options=t??{}}check(t){let n=this.checkTier(t),{orgNameOf:r}=this.options;return!n.requiresConfirmation||!r?n:{...n,question:ft(t,r(t.orgId),this.options.questionWords)}}checkTier(t){switch(t.orgTier){case"production":return this.checkProduction(t);case"staging":return this.checkStaging(t);case"development":case"scratch":return this.checkDevelopment(t)}}setProductionOverride(t,n){this.overrides.set(t,n)}isProductionOverridden(t){return this.overrides.get(t)===!0}get canAskForConfirmation(){return this.options.requestConfirmation!==void 0||ae()!==void 0}async confirmIfNeeded(t,n){if(!t.allowed||!t.requiresConfirmation)return t.allowed;let r=ae();return r?r.approved:this.options.requestConfirmation?t.question===void 0?this.options.requestConfirmation(t.impactSummary,n):this.options.requestConfirmation(t.impactSummary,n,t.question):!0}declinedWithoutAsking(t,n){if(!(!t.allowed||!t.requiresConfirmation||ae())&&this.options.requestConfirmation)return this.options.declinesWithoutAsking?.(n)}async confirmRun(t){return this.options.requestRunConfirmation?await this.options.requestRunConfirmation(t)?"confirmed":"declined":"unavailable"}orgPhrase(t,n){let r=this.options.orgNameOf?.(t.orgId);return r?n.org(t.orgTier,r,!0):n.org(t.orgTier,t.orgId,!1)}checkProduction(t){let n=[],r=xe.has(t.operation),o=this.isProductionOverridden(t.orgId);n.push(`Production operation: ${t.operation} on ${t.objectName} (${q(t.recordCount)} ${ut(t)}${t.alsoWrites?`, plus ${t.alsoWrites}`:""})`);let i=this.options.questionWords??Fe;return t.operation==="deploy"?{allowed:!1,requiresConfirmation:!1,blockedReason:i.deployRefused(this.orgPhrase(t,i)),warnings:n,impactSummary:W(t)}:r&&!o?{allowed:!1,requiresConfirmation:!1,blockedReason:i.deleteRefused(t.operation==="hardDelete"?"hardDelete":"delete",this.orgPhrase(t,i)),warnings:n,impactSummary:W(t)}:(r&&o&&n.push("Production override is active \u2014 destructive operation permitted"),{allowed:!0,requiresConfirmation:!0,warnings:n,impactSummary:W(t)})}checkStaging(t){let n=[],r=xe.has(t.operation),o=t.operation==="deploy",i=r||o||de(t.recordCount)>ue;return r&&n.push(`Destructive operation (${t.operation}) on staging org \u2014 confirmation required`),o&&n.push("Metadata deployment on staging org \u2014 confirmation required"),de(t.recordCount)>ue&&n.push(`Large volume operation: ${q(t.recordCount)} records on staging`),{allowed:!0,requiresConfirmation:i,warnings:n,impactSummary:W(t)}}checkDevelopment(t){let n=[];return de(t.recordCount)>$e&&n.push(`Large volume operation: ${q(t.recordCount)} records on ${t.orgTier} org`),{allowed:!0,requiresConfirmation:!1,warnings:n,impactSummary:W(t)}}};function q(e){return e==="unknown"?"an unknown number of":typeof e=="number"?String(e):`at most ${e.atMost}`}function de(e){return e==="unknown"?0:typeof e=="number"?e:e.atMost}function ut(e){return e.operation==="deploy"?"components":"records"}var Fn="the related records the run adds",Fe={sentence:(e,t,n)=>{switch(e){case"insert":return`Insert ${t} into ${n}.`;case"update":return`Update ${t} in ${n}.`;case"upsert":return`Insert or update ${t} in ${n}.`;case"delete":return`Delete ${t} in ${n}.`;case"hardDelete":return`Permanently delete ${t} in ${n}.`;case"deploy":return`Deploy ${t} to ${n}.`}},counted:(e,t)=>t==="unknown"?`${e}s`:typeof t=="number"?`${t} ${e}${t===1?"":"s"}`:`at most ${t.atMost} ${e}s`,besides:(e,t)=>`${e}, plus ${t},`,org:(e,t,n)=>n?`the ${e} org "${t}"`:`the ${e} org ${t}`,deployRefused:e=>`SandForge deploys metadata only to a sandbox, a scratch org or a Developer Edition org, not to ${e}: bring the change there through your release process, as a change set or a deployment from source control.`,deleteRefused:(e,t)=>e==="hardDelete"?`Permanently deleting records is not allowed in ${t}.`:`Deleting records is not allowed in ${t}.`},lt=new Set(["SeedData","SyncData","CloneData","AutopilotData"]);function ft(e,t,n=Fe){let r=e.operation==="deploy"?"component":"record",o=lt.has(e.objectName)?"":` (${e.objectName})`,i=`${n.counted(r,e.recordCount)}${o}`,s=e.alsoWrites?n.besides(i,e.alsoWrites):i,l=t?n.org(e.orgTier,t,!0):n.org(e.orgTier,e.orgId,!1);return n.sentence(e.operation,s,l)}function W(e){if(e.operation==="deploy")return`DEPLOY ${q(e.recordCount)} component(s) (${e.objectName}) to ${e.orgTier} org ${e.orgId} [module: ${e.module}]`;let t=e.alsoWrites?`, plus ${e.alsoWrites},`:"";return`${e.operation.toUpperCase()} ${q(e.recordCount)} ${e.objectName} record(s)${t} on ${e.orgTier} org ${e.orgId} [module: ${e.module}]`}function Y(e,t){return`${e} ${t}${e===1?"":"s"}`}var mt={cost:({records:e,objects:t,requests:n,seconds:r,megabytes:o,keepDays:i})=>`Checkpoint first: about ${Y(e,"record")} of ${Y(t,"object")}, ${Y(n,"API request")}, ${r} s, ${o} MB on this machine, unencrypted, and none of the org's storage, `+(i===0?"kept until you delete it.":`kept ${Y(i,"day")}.`),added:(e,t)=>`Added: ${e} \u2014 ${t}`,notHeld:(e,t)=>`Not in the checkpoint: ${e} \u2014 ${t}`,more:e=>`\u2026 and ${e} more`,unknown:"What an Apex trigger, or automation that could not be read, creates as the run writes is not known: a rewind leaves those records as they are."},ce=10;function pt(e){return e<=0?"0":Math.max(.1,Math.ceil(e/1048576*10-1e-9)/10).toFixed(1)}function Un(e,t=mt){let{estimate:n}=e,r=[t.cost({records:n.records,objects:e.objects.length,requests:n.apiRequests,seconds:Math.ceil(n.seconds),megabytes:pt(n.bytes),keepDays:e.keepDays})],o=(i,s)=>{for(let{objectApiName:l,reason:u}of i.slice(0,ce))r.push(s(l,u));i.length>ce&&r.push(t.more(i.length-ce))};return o(e.added,t.added),o(e.notHeld,t.notHeld),r.push(t.unknown),r}var gt=300,bt=1024,ht=160,Rt=500,Je=40,yt=4,Ot=3,St=3,wt=1,kt=1e3,At=1,Ue=200,Et=60,Ct=50,Bt=Buffer.byteLength(`${JSON.stringify({Id:"0".repeat(18)})}
8
- `),vt="IsDeleted = false",Ye=4;function jt(e){return e.access?.kind==="perObject"?e.access.requests:0}var Tt=1,Nt=200,Dt=3,_t=1,Pt=1,Xe=2,xt=3,It=2e3,Mt=100,Ze=["Id","SystemModstamp"],We=23,N=2.5,h=.35,$t=1,Lt=.9,S=.5,ge=.25,j=.86,Ft="ContentVersion",Ut="ContentDocument",le=200,qe=150,y={apiRequests:0,seconds:0};function d(e,t){return{apiRequests:e,seconds:e*t}}function G(e){return{apiRequests:e,seconds:g(e,je)*h}}function f(...e){return e.reduce((t,n)=>({apiRequests:t.apiRequests+n.apiRequests,seconds:t.seconds+n.seconds}),y)}function g(e,t){return e>0?Math.ceil(e/t):0}function k(e){return g(e,$)}function et(e){return oe(e,Ze).length}function Wt(e){return e.length>Mt?$/4:$}function Q(e,t){return g(e,Wt(t))*et(t)}function Ge(e,t){if(e.length===0)return 0;let n=2*(e.length-1)+2+2*(t-1);for(let r of e){let o=JSON.stringify(r,null,2),i=1;for(let s=o.indexOf(`
9
- `);s>=0;s=o.indexOf(`
10
- `,s+1))i++;n+=Buffer.byteLength(o,"utf8")+i*2*t}return n}function qt(e){let t=bt+(e.printsBytes??0),n=[];for(let r of e.objects)t+=r.records*gt+Te(r.records,2),r.records>0&&(t+=ht),t+=(r.inBin??0)*Bt,t+=(r.links??0)*(Et+Ct),r.entry!==void 0&&n.push(r.entry);return t+Ge(n,2)+Ge(e.leftOut??[],3)}function tr(e,t,n){let[,...r]=oe(t,Ze),o=n==="scanAllLive"?vt:void 0;return r.map(i=>we(e,i,o))}function He(e,t){return t.reduce((n,r)=>n+g(e,Math.max(1,r)),0)}function Gt(e,t){if(e.records===0)return{pages:0,reads:0};let n=Math.floor(e.records/t),r=e.records-n*t,o=e.otherGroups??[];return{pages:n+(r>0?1:0),reads:n*He(t,o)+He(r,o)}}function nr(e){let t=e.objects.length,n=g(e.described,L),r=e.describedAlone??0,o=G(g(e.counted??t,w)),i=(e.countedAlone??0)+g(e.recounted??0,w),s=o.apiRequests+i,l=G(g(t,w)),u=Math.min(e.pageRows,kt),c=0,b=0,O=0;for(let m of e.objects){O+=m.records;let p=Gt(m,u);c+=p.pages,b+=p.reads}let E=H(e.objects.map(m=>F(m.inBin??0))),R=Ht(e.objects),C=e.objects.filter(m=>(m.stampedSince??0)>0),B=f(H(C.flatMap(m=>[F(m.stampedSince??0),1])),G(g(C.length,w))),D=c+b+(c>0?wt:0),A=e.annexCalls??0,a={guard:yt,scope:Ot+n+r,start:St,counts:s,bin:E.apiRequests,snapshot:D+R.apiRequests+A,stability:At+l.apiRequests+B.apiRequests};return{records:O,apiRequests:Object.values(a).reduce((m,p)=>m+p,0),requestsByPhase:a,seconds:Math.ceil(n*N+(r+i+A)*h+o.seconds+l.seconds+E.seconds+B.seconds+R.seconds+c*$t+b*S),bytes:qt(e)}}function Ht(e){let t=e.filter(o=>o.links!==void 0);if(t.length===0)return y;let n=0,r=0;for(let o of t)o.links===null?n+=g(g(o.records,Ue),w):r+=o.links??0;return f(H(t.map(o=>F(o.links??0))),d(n,S),d(g(g(r,Ue),w),S))}function F(e){return Math.max(1,g(e,It))}function H(e){let t=0,n=0;for(let r=0;r<e.length;r+=w){let o=Math.max(1,...e.slice(r,r+w));t+=1,n+=o-1}return f(d(t,h),d(n,Lt))}function Qt(e){let t=new Set([...e.held,...e.moved.map(n=>n.objectApiName)]);return f(G(g(e.objects,w)),H(e.moved.flatMap(({live:n,deleted:r})=>[F(n),F(r)])),G(g(t.size,w)))}function tt(e){let t=e.reduce((n,r)=>n+k(r),0);return f(d(t*(Dt-1),S),d(t,j))}function Kt(e){return f(...e.filter(t=>t.records>0).map(({records:t,cascades:n,described:r})=>{let o=k(t);return f(d(r?0:1,N),tt([t]),d(o*g(n,w),h),d(o*_t,S))}))}function fe(e,t){let n=y;for(let r=e;r>0;r-=v){let o=Math.min(r,v);n=f(n,d(Xe,h),d(Q(o,t),S),d(J([{rows:o}]),j),d(k(o),S))}return n}function Vt(e,t,n,r){return e===0||n===0?y:f(d(r?0:1,N),d((n+k(e))*g(t,w),h))}var nt=_({childRelationships:ye(_({childSObject:ne().optional(),field:ne().optional(),cascadeDelete:re().optional(),restrictedDelete:re().optional()}).loose()).nullish()}).loose();function rr(e,t){let n=nt.parse(e).childRelationships??[],r=n.filter(u=>u.cascadeDelete===!0),o=t?.worked,i={dependents:n.filter(u=>(u.cascadeDelete===!0||u.restrictedDelete===!0)&&(o===void 0||u.childSObject!==void 0&&o.has(u.childSObject))).length,cascades:r.length,cascadeChildren:[...new Set(r.flatMap(u=>u.childSObject===void 0?[]:[u.childSObject]))]};if(t===void 0)return i;let s=n.filter(u=>u.cascadeDelete===!0&&u.childSObject!==void 0&&!t.inCheckpoint.has(u.childSObject.toLowerCase())),l=s.filter(u=>u.childSObject!==void 0&&t.worked?.has(u.childSObject)===!0);return{...i,outside:{all:s.length,worked:l.length}}}function or(e,t){return(nt.parse(e).childRelationships??[]).flatMap(n=>(n.cascadeDelete===!0||n.restrictedDelete===!0)&&n.childSObject!==void 0&&n.field!==void 0&&(t===void 0||t.has(n.childSObject))?[{childSObject:n.childSObject,field:n.field}]:[])}function be(e,t){return e?.get(t)??{dependents:We,cascades:We}}function zt(e,t){if(e<Ce||t===Ft||t===Ut)return d(J([{rows:e}]),j);let n=Math.ceil(e/Be),r=Math.ceil(e/n),o=y;for(let i=e;i>0;i-=r){let s=Math.min(i,r);o=f(o,{apiRequests:ke({stateReads:Ee(s)}),seconds:Ae(s)})}return o}function me(e,t=Number.POSITIVE_INFINITY){let n=e.filter(r=>r.records>0);return n.length===0?y:f(d(xt,h),...n.map(({records:r,dependents:o,pointing:i,objectApiName:s})=>{let l=k(r),u=0;for(let c=r;c>0;c-=t){let b=k(Math.min(c,t));u+=b>1?o+Math.min(i??o,o)*b:o}return f(d(1,h),d(l,S),d(u,ge),Yt(s,l,u),zt(r,s))}))}function Jt(e,t,n){return f(...e.filter(({count:r})=>r>0).map(({objectApiName:r,count:o})=>{let{dependents:i}=be(t,r),s=o>$?i:0;return f(d(n.has(r)?0:1,N),d(s+i*k(o),ge))}))}function Yt(e,t,n){return e===void 0||z[e]===void 0||Oe.has(e)?y:f(d(1,h),d(t,S),d(n,ge),d(t,j))}function T(e){return e.toDelete.createdSince+e.toDelete.broughtBackSince}function X(e){return e.toBringBack.inBin+e.toBringBack.deletedWhileTaken+te(e)}function te(e){return e.toBringBack.carriers??0}function U(e){return e.toDelete.comesBackWithParent+te(e)}function Z(e){return e.cannotUndo.filter(t=>t.reason==="deletedWithCreatedParent"||t.reason==="deletedWithParentOutside").reduce((t,n)=>t+n.count,0)}function ee(e){return X(e)-te(e)+e.toBringBack.withParent}function rt(e){return e.toGiveBack.records+e.toBringBack.inBin+e.toBringBack.withParent}function pe(e){return e.cannotUndo.filter(t=>t.reason==="goneForGood").reduce((t,n)=>t+n.count,0)}function I(e){return e.toRecreate??0}function Xt(e){return pe(e)+I(e)}function Zt(e,t){let n=0;for(let r=e;r>0&&t>0;r-=v){let o=Math.min(r,v);n+=g(t*k(o),w)}return n}function he(e,t,n){let r=Xt(e);return{objectApiName:e.objectApiName,live:e.toGiveBack.records+e.touched+T(e)+e.unexplained,deleted:ee(e)+U(e)+Z(e),valued:e.toGiveBack.records+e.touched+e.toBringBack.withParent,backTo:ee(e)+te(e)+Z(e)>0||t.undeletable===!1&&r>0,deletes:T(e),scans:r>0&&t.undeletable!==!1,whole:e.schemaDrift!==void 0,outside:n?.get(e.objectApiName)?.outside??{all:e.outside.length,worked:e.outside.length}}}function en(e,t,n,r){let o=he(e,t,n),i=e.toBringBack,s=r?0:U(e);return{...o,live:e.toGiveBack.records+e.touched+e.unexplained+ee(e)+I(e)+s,deleted:T(e)+U(e)-s+Z(e),valued:e.toGiveBack.records+e.touched+i.inBin+i.withParent+I(e),backTo:Z(e)>0||t.undeletable===!1&&pe(e)>0,scans:pe(e)>0&&t.undeletable!==!1,deletes:s}}function ot(e,t,n,r,o,i=0,s,l=0){let u=[],c=[],b=0,O=0,E=0,R=!1,C=0;for(let{objectApiName:A,records:a,fields:m}of e){let p=t.get(A);if(p===void 0){n.has(A)&&u.push({objectApiName:A,live:0,deleted:0});continue}u.push({objectApiName:A,live:p.live,deleted:p.deleted}),b+=Q(p.valued,m),p.backTo&&!p.whole&&O++,p.scans&&c.push(H([F(a)])),p.deletes!==0&&(!p.whole&&!p.backTo&&E++,p.outside.all>0&&(R=!0),C+=Zt(p.deletes,p.outside.worked))}s!==void 0&&(R=!0);let B=s!==void 0?1:0,D=o===void 0?g(e.length+B,L):g(o.first+B,L)+g(o.later,L);return f(d(Tt,h),d(D,N),Qt({objects:e.length,held:e.filter(A=>A.records>0).map(A=>A.objectApiName),moved:u}),d(b,S),d(g(O,L),N),d(E,h),d(R?1:0,N),d(C,h),d(i,h),d(l,h),d(s?.requests??0,S),...c,d(g(g(r,Nt),w),h))}function it(e){return e.files!==void 0?{requests:e.filesRequests??0}:void 0}function st(e,t){let n=new Map(e.diff.objects.map(o=>[o.objectApiName,o])),r=new Map;for(let o of e.objects){let i=n.get(o.objectApiName);i&&r.set(o.objectApiName,t(i,o))}return r}function tn(e){let t=new Set(e.diff.objects.flatMap(n=>Object.keys(n.lastChangedBy)));return ot(e.objects,st(e,(n,r)=>he(n,r,e.relationships)),new Set(e.diff.unread.map(n=>n.objectApiName)),t.size,e.diff.described,e.diff.parentsOutsideRequests??0,it(e.diff),e.diff.fieldsRequests??0)}function Qe(e,t,n=!1){let r=!t&&(n||e.diff.objects.some(s=>U(s)>0)),o=e.diff.described,i=new Set(e.diff.objects.map(s=>s.objectApiName));return ot(e.objects,st({...e,diff:e.readDiff??e.diff},(s,l)=>i.has(s.objectApiName)?en(s,l,e.relationships,t):he(s,l,e.relationships)),new Set(e.diff.unread.map(s=>s.objectApiName)),r?1:0,o===void 0?void 0:{first:o.first+o.later,later:0},e.diff.parentsOutsideRequests??0,it(e.diff),e.diff.fieldsRequests??0)}function nn(e){return f(...e.filter(t=>t>0).map(t=>f(d(1,h),d(k(t),j))))}var rn=new Set(["activateddate","activatedbyid"]);function on(e){return f(...e.filter(({objectApiName:t,records:n})=>n>0&&z[t]!==void 0).map(({records:t})=>f(d(1,h),d(k(t),j))))}function sn(e,t){return e*Rt+t*Je}function Ke(e){return f(d(Xe,h),d(et(e),S),d(1,j),d(1,S))}function an(e,t,n,r){if(t===0)return y;let o=e==="Order"?n.find(c=>c.toLowerCase()==="status"):void 0,i=o===void 0?[]:[o],s=c=>f(fe(c,n),o?fe(c,i):y),l=f(Ke(n),o?Ke(i):y),u=d(Q(t,n),S);return f(s(t),r.held?f(u,l):y,r.held&&r.twice?f(s(t),l):y,r.nextPass?f(u,l):y)}function Ve(e,t,n,r){let o=r?.get(n.objectApiName)?.cascadeChildren;return o!==void 0?o.includes(t):e?.cascadeParents!==void 0&&e.cascadeParents.length===0?!1:e?.readOrder!==void 0&&n.readOrder!==void 0?e.readOrder<n.readOrder:!0}function dn(e){let t=e.diff.objects,n=new Map(e.objects.map(a=>[a.objectApiName,a])),r=a=>be(e.relationships,a),o=e.diff.undoCannot?e.diff.undoCannot.reduce((a,{objectApiName:m,count:p})=>a.set(m,(a.get(m)??0)+p),new Map):void 0,i=e.diff.withParentDeleted?new Map(e.diff.withParentDeleted.map(({objectApiName:a,count:m})=>[a,m])):void 0,s=a=>{if(i!==void 0)return Math.max(0,T(a)-(i.get(a.objectApiName)??0));if(o===void 0||n.get(a.objectApiName)?.undeletable!==!1)return T(a);let m=(o.get(a.objectApiName)??0)-a.toDelete.comesBackWithParent;return Math.max(0,Math.min(T(a),m))},l=t.filter(a=>s(a)>0),u=t.filter(a=>U(a)>0),c=(a,m)=>m.some(p=>p.objectApiName!==a.objectApiName&&Ve(n.get(p.objectApiName),p.objectApiName,a,e.relationships)),b=(a,m)=>m.some(p=>{let K=n.get(p.objectApiName);return K!==void 0&&p.objectApiName!==a.objectApiName&&Ve(a,a.objectApiName,K,e.relationships)}),O=t.reduce((a,m)=>a+k(X(m)),0),E=e.duplicateSets??0,R=e.reusesPreview!==!0&&t.some(a=>T(a)>0&&(e.relationships?.get(a.objectApiName)?.outside?.all??a.outside.length)>0),C=t.some(a=>X(a)>0&&r(a.objectApiName).cascades>0),B=f(d(C&&!R?1:0,N),Kt(t.map(a=>({records:X(a),cascades:r(a.objectApiName).cascades,described:e.reusesPreview!==!0}))),...t.map(a=>Vt(a.toBringBack.withParent,r(a.objectApiName).cascades,O,e.reusesPreview!==!0)),...t.map(a=>{let m=n.get(a.objectApiName);return m===void 0?y:an(a.objectApiName,rt(a),m.fields,{held:c(m,l),twice:b(m,l),nextPass:c(m,u)})}),nn(t.map(I)),on(t.map(a=>({objectApiName:a.objectApiName,records:I(a)}))),d(E>0?2+g(E,$):0,S),me([...t.map(a=>({objectApiName:a.objectApiName,records:s(a),dependents:r(a.objectApiName).dependents,pointing:r(a.objectApiName).pointing})),{objectApiName:ve,records:E,dependents:1}],ie)),D=t.flatMap(a=>{let m=n.get(a.objectApiName),p=I(a);return p===0||m===void 0?[]:z[a.objectApiName]===void 0?[]:m.fields.some(K=>rn.has(K.toLowerCase()))?[fe(p,m.fields)]:[]}),A=u.length>0||D.length>0?f(me(u.map(a=>({objectApiName:a.objectApiName,records:U(a),dependents:r(a.objectApiName).dependents,pointing:r(a.objectApiName).pointing})),ie),...D,Qe(e,!0)):y;return f(d(Pt,h),B,un(e.diff.files),Qe(e,!1,D.length>0),A)}function cn(e){return e===void 0?0:e.unlink+e.relink+e.updateLinks}function un(e){return e===void 0?y:d(g(e.unlink,le)+g(e.relink,le)+g(e.updateLinks,le),j)}function ir(e){let t=e.diff.objects,n=t.reduce((b,O)=>b+T(O)+O.toDelete.comesBackWithParent,0),r=t.reduce((b,O)=>b+O.toGiveBack.records,0),o=t.reduce((b,O)=>b+ee(O),0),i=t.reduce((b,O)=>b+I(O),0),s=n+r+o+i,l=f(d(Ye+jt(e.diff),h),e.reusesPreview===!0?y:tn({...e,diff:e.readDiff??e.diff})),u=e.diff.files;if(s===0&&cn(u)===0)return{records:0,apiRequests:l.apiRequests,seconds:Math.ceil(l.seconds),bytes:0};let c=f(l,d(e.automationRequests,S),d(e.deliverabilityRequests??0,h),d(e.muteRequests??0,h),dn(e));return{records:s,apiRequests:c.apiRequests,seconds:Math.ceil(c.seconds),bytes:sn(t.reduce((b,O)=>b+rt(O),0),n+o+2*i)+ln(u)}}function ln(e){return e===void 0?0:e.unlink*qe+e.relink*Je+e.updateLinks*qe}var fn=1;function ze(e,t){let n=y;for(let r=e;r>0;r-=v){let o=Math.min(r,v);n=f(n,d(fn,h),d(Q(o,t),S),d(J([{rows:o}]),j))}return n}function mn(e,t){let n=Math.min(e.givenBackHeld??0,e.givenBack),r=y;for(let o=e.givenBack;o>0;o-=v)r=f(r,d(Q(Math.min(o,v),t),S));return f(ze(n,t),ze(e.givenBack-n,t),r)}var pn=2;function gn(e){let t=Math.min(e.givenBackHeld??0,e.givenBack);return d(k(e.givenBack)+k(t)+k(e.givenBack-t),S)}function sr(e){let t=new Map(e.objects.map(c=>[c.objectApiName,c.fields])),n=e.rewound.reduce((c,b)=>c+b.deleted+b.broughtBack+b.givenBack,0),r=d(Ye,h);if(n===0)return{records:0,apiRequests:r.apiRequests,seconds:Math.ceil(r.seconds),bytes:0};let o=e.rewound.some(c=>c.deleted>0),i=e.rewound.some(c=>c.givenBack>0),s=new Set(e.rewound.filter(c=>c.broughtBack>0).map(c=>c.objectApiName)),l=o&&i?f(d(pn,h),...e.rewound.map(gn)):y,u=f(r,d(e.automationRequests,S),l,me(e.rewound.map(c=>({objectApiName:c.objectApiName,records:c.broughtBack,dependents:be(e.relationships,c.objectApiName).dependents}))),s.size>0?Jt(e.along??[],e.relationships,s):y,tt(e.rewound.map(c=>c.deleted)),...e.rewound.map(c=>mn(c,t.get(c.objectApiName)??[])));return{records:n,apiRequests:u.apiRequests,seconds:Math.ceil(u.seconds),bytes:0}}var bn={take:{what:"This checkpoint",then:"Take it once the org has requests to spare \u2014 the limit is counted over the last 24 hours \u2014 or pick fewer objects.",done:"No record was read."},rewind:{what:"This rewind",then:"Rewind once the org has requests to spare \u2014 the limit is counted over the last 24 hours \u2014 or rewind fewer of its objects at a time, which sends only theirs (the objects ticked in the preview, or --object on a command line).",done:"No record was read or written."},undo:{what:"This undo",then:"Undo the rewind once the org has requests to spare \u2014 the limit is counted over the last 24 hours \u2014 while the recycle bin still holds what it brings back.",done:"No record was read or written."}},hn=_({FileStorageMB:_({Max:V(),Remaining:V()}).loose()}).loose(),Rn=_({DataStorageMB:_({Max:V().int().nonnegative()}).loose()}).loose();async function ar(e,t){let n,r;try{n=await e.request({method:"GET",url:"/limits"}),r=await Ne({request:()=>Promise.resolve(n)})}catch(l){throw new Error(`${t} did not say how many API requests it has left today: ${M(l)}`)}let o;try{o=await _e({request:()=>Promise.resolve(n)})}catch(l){o={unread:M(l)}}let i=hn.safeParse(n),s=Rn.safeParse(n);return{...r,emails:o,...i.success?{fileStorage:{max:i.data.FileStorageMB.Max,remaining:i.data.FileStorageMB.Remaining}}:{},...s.success?{dataStorageMaxMB:s.data.DataStorageMB.Max}:{}}}var yn={mute:e=>`to assign and take back the permission sets that mute ${e}'s automation`,deliverability:e=>`to read whether ${e} delivers its emails`};function On(e,t){if(e===void 0)return"";let n=Object.entries(yn).flatMap(([r,o])=>{let i=e[r]??0;return i>0&&o?[{requests:i,words:o(t)}]:[]}).map(({requests:r,words:o},i)=>`${r}${i===0?" of them":""} ${o}`);return n.length>0?` (${n.join(", ")})`:""}function dr(e,t,n,r){let o=De(t,n);if(o.verdict!=="exceeds")return;let i=bn[e];return{code:"API_BUDGET",message:`${i.what} takes about ${o.estimate} API requests${On(o.parts,r)}; ${r} has ${n.remaining} of its ${n.max} left today. ${i.then} ${i.done}`}}var Sn={rewind:{then:"Free file storage, then rewind again.",done:"Nothing was written."},undo:{then:"Free file storage, then undo the rewind again while the recycle bin still holds them.",done:"Nothing was written."}};function wn(e){let t=e/1048576;return t<1?`${Math.max(1,Math.round(t*10))/10} MB`:`${Math.ceil(t)} MB`}function cr(e,t,n,r){if(n===void 0||t.files===0||t.bytes<=n*1048576)return;let o=Sn[e];return{code:"FILE_STORAGE",message:`Bringing back ${t.files===1?"1 file":`${t.files} files`} takes ${wn(t.bytes)} of file storage; ${r} has ${n} MB left. ${o.then} ${o.done}`}}import{randomUUID as kn}from"node:crypto";var Re="\0configStore:revision",An="\0configStore";function En(e){let t=e[Re]?.value;if(t!==void 0)try{let n=JSON.parse(t);return typeof n.writer=="string"&&typeof n.write=="number"?{writer:n.writer,write:n.write}:void 0}catch{return}}var at=class{backend;logWarning;writer=kn();writes=0;written;constructor(t,n){this.backend=t,this.logWarning=n}initialize(){this.backend.getData()}get(t){let n=this.current()[t];if(n)try{return JSON.parse(n.value)}catch(r){let o=M(r);this.logWarning?.(`[ConfigStore] Failed to parse JSON for key "${t}": ${o}`);return}}set(t,n,r="general"){let o=JSON.stringify(n);this.update(i=>{let s=i[t];return s&&s.value===o&&s.category===r?!1:(i[t]={value:o,category:r},!0)})}delete(t){return this.update(n=>t in n?(delete n[t],!0):!1)}has(t){return t in this.current()}getByCategory(t){let n={};for(let[r,o]of Object.entries(this.current()))if(o.category===t)try{n[r]=JSON.parse(o.value)}catch(i){let s=M(i);this.logWarning?.(`[ConfigStore] Corrupted entry in category "${t}", key "${r}": ${s}`)}return n}getAllKeys(){return Object.keys(this.current()).filter(t=>t!==Re)}getKeysByPrefix(t){return this.getAllKeys().filter(n=>n.startsWith(t))}clearCategory(t){let n=0;return this.update(r=>{for(let[o,i]of Object.entries(r))i.category===t&&(delete r[o],n++);return n>0}),n}clearAll(){this.write({})}current(){let t=this.backend.getData(),n=En(t);return this.written&&n?.writer===this.writer&&n.write<this.writes?this.written:t}update(t){let n={...this.current()},r=t(n);return r&&this.write(n),r}write(t){this.writes+=1,t[Re]={value:JSON.stringify({writer:this.writer,write:this.writes}),category:An},this.backend.setData(t),this.written=t}};export{Bn as a,vn as b,jn as c,Tn as d,Nn as e,Dn as f,_n as g,Pn as h,xn as i,$n as j,ae as k,Ln as l,Ie as m,Fn as n,Un as o,kt as p,It as q,h as r,$t as s,j as t,tr as u,nr as v,rr as w,or as x,dn as y,ir as z,sr as A,ar as B,dr as C,cr as D,at as E};
@@ -1,7 +0,0 @@
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{l as a,m as b,n as c,o as d,p as e,q as f}from"./chunk-5EESNYE3.mjs";import"./chunk-QAXKUEJT.mjs";import"./chunk-JKFCGYJE.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-YDXMTWAT.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-EINEGS6E.mjs";import"./chunk-C2MHMI7U.mjs";import"./chunk-RFD6NPWJ.mjs";import"./chunk-SF52ZSIV.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-AX3YF7SC.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-Q7TLC3I2.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-JBOGAUGH.mjs";import"./chunk-4N425UJC.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-FG4Y4ZVL.mjs";import"./chunk-Z354SAEF.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-THYQOG24.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-CRPLDXJU.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as WHOLE_ORG_MAX_NODES,b as WHOLE_ORG_MAX_PAIRS,f as discoverWholeOrg,d as eachInPool,e as recordCountsOf,c as refusedByTheOrg};
@@ -1,7 +0,0 @@
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
- var o=class{operations=new Map;listeners=new Set;maxCompleted=50;pendingStarts=new Map;register(t,e,r,n,a){let s={operationId:t,module:e,description:r,status:"running",progressPercent:0,startedAt:Date.now(),abortController:a,notifiedNatively:!1};return this.pendingStarts.delete(t),this.operations.set(t,s),this.emit(t,"started",s),n.then(i=>{if(typeof i=="object"&&i!==null&&i.status==="failure"){this.markFailed(t,new Error("Operation finished with a failure status."));return}this.markCompleted(t)}).catch(i=>{this.markFailed(t,i)}),s}updateProgress(t,e,r){let n=this.operations.get(t);n&&(n.progressPercent=e,r!==void 0&&(n.resultSummary=r),this.emit(t,"progress",n))}abort(t){let e=this.operations.get(t);!e||e.status!=="running"||(e.abortController.abort(),e.status="aborted",e.completedAt=Date.now(),this.emit(t,"aborted",e))}holdUntilStart(t){let e=new AbortController;return this.pendingStarts.set(t,e),{signal:e.signal,release:()=>{this.pendingStarts.get(t)===e&&this.pendingStarts.delete(t)}}}cancelBeforeStart(t){let e=this.pendingStarts.get(t);return e?(e.abort(),!0):!1}markNotifiedNatively(t){let e=this.operations.get(t);e&&(e.notifiedNatively=!0)}getActiveOperations(){return[...this.operations.values()].sort((t,e)=>e.startedAt-t.startedAt).map(t=>({operationId:t.operationId,module:t.module,description:t.description,status:t.status,progressPercent:t.progressPercent,startedAt:t.startedAt,completedAt:t.completedAt,resultSummary:t.resultSummary}))}getRunning(){return[...this.operations.values()].filter(t=>t.status==="running")}has(t){return this.operations.has(t)}get(t){return this.operations.get(t)}onEvent(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}dispose(){for(let t of this.operations.values())t.status==="running"&&t.abortController.abort();for(let t of this.pendingStarts.values())t.abort();this.pendingStarts.clear(),this.operations.clear(),this.listeners.clear()}markCompleted(t,e){let r=this.operations.get(t);!r||r.status!=="running"||(r.status="completed",r.completedAt=Date.now(),r.progressPercent=100,e!==void 0&&(r.resultSummary=e),this.emit(t,"completed",r),this.evictOldCompleted())}markFailed(t,e){let r=this.operations.get(t);!r||r.status!=="running"||(r.status="failed",r.completedAt=Date.now(),r.resultSummary=e instanceof Error?e.message:String(e),this.emit(t,"failed",r))}emit(t,e,r){for(let n of this.listeners)n(t,e,r)}evictOldCompleted(){let t=[...this.operations.values()].filter(e=>e.status!=="running").sort((e,r)=>(e.completedAt??0)-(r.completedAt??0));for(;t.length>this.maxCompleted;){let e=t.shift();e&&this.operations.delete(e.operationId)}}};export{o as a};
@@ -1,7 +0,0 @@
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 xe}from"./chunk-QAXKUEJT.mjs";import{a as Pe,b as Te,c as je,d as Oe,f as Me}from"./chunk-M6P5ZZLE.mjs";import{Ca as Ve,Da as Ue,Ia as Be,Ka as B,La as Qe,Na as We,da as De,na as Le,pa as qe,ra as Ie,va as U}from"./chunk-O3ZQSWDN.mjs";import{b as E}from"./chunk-CA5NAXSU.mjs";import{O as Fe,Q as ve,R as Ne,S as _e,T as Ae,U as Ce,V as Se,W as Ee,ae as Ge,ja as $e}from"./chunk-CRPLDXJU.mjs";import{e as X,l as ee}from"./chunk-WZQEK4WT.mjs";var v=class extends Error{};function ct(e){let r=[],n=0;for(;n<e.length;){let t=e.slice(n),s=/^\s+/.exec(t);if(s){n+=s[0].length;continue}if(t.startsWith("/*")){let d=e.indexOf("*/",n+2);if(d<0)throw new v("an unclosed comment");n=d+2;continue}let l=t[0];if(l==="'"||l==='"'){let d=1;for(;d<t.length&&t[d]!==l;)d+=t[d]==="\\"?2:1;if(d>=t.length)throw new v("an unclosed text");r.push(t.slice(0,d+1)),n+=d+1;continue}let f=/^(?:\d+(?:\.\d+)?|[A-Za-z_$][A-Za-z0-9_$.]*)/.exec(t);if(f){r.push(f[0]),n+=f[0].length;continue}let p=/^(?:&&|\|\||==|!=|<>|<=|>=|[=<>+\-*/^&!(),])/.exec(t);if(!p)throw new v(`an unexpected character: ${t[0]}`);r.push(p[0]),n+=p[0].length}return r}var Ke=[new Set(["||"]),new Set(["&&"]),new Set(["=","==","<>","!=","<",">","<=",">="]),new Set(["+","-","&"]),new Set(["*","/"]),new Set(["^"])];function dt(e){let r=ct(e),n=0,t=()=>r[n],s=u=>{if(r[n]!==u)throw new v(`${u} expected`);n++},l=u=>{if(u>=Ke.length)return f();let o=l(u+1);for(let a=t();a!==void 0&&Ke[u].has(a);a=t())n++,o={kind:"binary",op:a,left:o,right:l(u+1)};return o},f=()=>{if(t()==="!")return n++,{kind:"not",arg:f()};if(t()==="-"||t()==="+"){let u=r[n++],o=f();return u==="-"?{kind:"negative",arg:o}:o}return p()},p=()=>{let u=r[n++];if(u===void 0)throw new v("the formula ends early");if(u==="("){let a=l(0);return s(")"),a}if(u.startsWith("'")||u.startsWith('"'))return{kind:"literal",value:`text:${u.slice(1,-1)}`};if(/^\d/.test(u))return{kind:"literal",value:`number:${Number(u)}`};if(!/^[A-Za-z_$]/.test(u))throw new v(`${u} out of place`);if(t()==="("){n++;let a=[];if(t()!==")")for(a.push(l(0));t()===",";)n++,a.push(l(0));return s(")"),{kind:"call",name:u.toUpperCase(),args:a}}let o=u.toUpperCase();return o==="TRUE"||o==="FALSE"||o==="NULL"?{kind:"literal",value:o.toLowerCase()}:{kind:"reference",name:u.toLowerCase()}},d=l(0);if(n!==r.length)throw new v(`${r[n]} out of place`);return d}function $(e){switch(e.kind){case"call":return e.name==="PRIORVALUE"&&e.args.length===1?$(e.args[0]):{...e,args:e.args.map($)};case"binary":return{...e,left:$(e.left),right:$(e.right)};case"not":case"negative":return{...e,arg:$(e.arg)};default:return e}}function N(e){switch(e.kind){case"call":return`${e.name}(${e.args.map(N).join(",")})`;case"binary":{let r=e.op==="=="?"=":e.op==="!="?"<>":e.op,n=[N(e.left),N(e.right)];return(r==="="||r==="<>")&&n.sort(),`(${n[0]} ${r} ${n[1]})`}case"not":return`NOT(${N(e.arg)})`;case"negative":return`-(${N(e.arg)})`;case"literal":return e.value;case"reference":return e.name}}var ze=e=>e==="true"?"false":e==="false"?"true":"unknown";function O(e){return e.kind==="call"&&e.name==="AND"?e.args.flatMap(O):e.kind==="binary"&&e.op==="&&"?[...O(e.left),...O(e.right)]:[e]}function M(e){return e.kind==="call"&&e.name==="OR"?e.args.flatMap(M):e.kind==="binary"&&e.op==="||"?[...M(e.left),...M(e.right)]:[e]}function te(e){if(e.kind==="not"){let r=te(e.arg);return{condition:r.condition,holds:!r.holds}}if(e.kind==="call"&&e.name==="NOT"&&e.args.length===1){let r=te(e.args[0]);return{condition:r.condition,holds:!r.holds}}return e.kind==="binary"&&(e.op==="<>"||e.op==="!=")?{condition:N({...e,op:"="}),holds:!1}:{condition:N(e),holds:!0}}function ne(e){if(e.kind==="literal"){if(e.value==="true")return"true";if(e.value==="false")return"false"}}function R(e){let r=ne(e);if(r)return r;if(e.kind==="not")return ze(R(e.arg));if(e.kind==="call")switch(e.name){case"ISCHANGED":return"false";case"ISNEW":return"true";case"NOT":return e.args.length===1?ze(R(e.args[0])):"unknown";case"AND":return He(O(e));case"OR":return Ze(M(e));case"IF":{if(e.args.length!==3)return"unknown";let[n,t,s]=e.args,l=R(n);if(l==="true")return R(t);if(l==="false")return R(s);let f=R(t);return f===R(s)?f:"unknown"}default:return"unknown"}return e.kind==="binary"?e.op==="&&"?He(O(e)):e.op==="||"?Ze(M(e)):ft(e):"unknown"}function He(e){let r=e.map(R);if(r.includes("false"))return"false";let n=new Map;for(let t of e){let{condition:s,holds:l}=te(t),f=n.get(s);if(f!==void 0&&f!==l)return"false";n.set(s,l)}return r.every(t=>t==="true")?"true":"unknown"}function Ze(e){let r=e.map(R);return r.includes("true")?"true":r.every(n=>n==="false")?"false":"unknown"}function ft(e){let r=e.op==="="||e.op==="==",n=e.op==="<>"||e.op==="!=";if(N(e.left)===N(e.right))return n||e.op==="<"||e.op===">"?"false":"unknown";if(!r&&!n)return"unknown";let t=ne(e.left)??R(e.left),s=ne(e.right)??R(e.right);return t==="unknown"||s==="unknown"?"unknown":t===s===r?"true":"false"}function Ye(e){try{return R($(dt(e)))==="false"}catch(r){if(r instanceof v)return!1;throw r}}var nt=25,W=20,ie=W*De,G=4,Je=10,pt=2e3,gt=.8,Xe=["validationRules","validationRuleFormulas","duplicateRules","duplicateRuleActions","userPermissions","permissionSets","targetFields","sourceFields","apiBudget"];function mt(e){return typeof e!="object"||e===null?null:{optional:e.optionalFilter===!0}}function Bt(e){return{name:e.name,type:String(e.type),createable:e.createable===!0,nillable:e.nillable!==!1,defaultedOnCreate:e.defaultedOnCreate===!0,referenceTo:(e.referenceTo??[]).filter(r=>typeof r=="string"),picklistValues:(e.picklistValues??[]).filter(r=>r?.active!==!1&&typeof r?.value=="string").map(r=>r?.value),lookupFilter:mt(e.filteredLookupInfo)}}function oe(e){return`SELECT Id, ValidationName, NamespacePrefix, ErrorDisplayField, ErrorMessage, EntityDefinition.QualifiedApiName FROM ValidationRule WHERE Active = true AND EntityDefinition.QualifiedApiName IN (${e.map(n=>`'${n}'`).join(", ")})`}function ht(e){return`SELECT QualifiedApiName, Label FROM FieldDefinition WHERE EntityDefinition.QualifiedApiName = '${x.test(e)?e:""}'`}function q(e){return`SELECT Metadata FROM ValidationRule WHERE Id = '${e}'`}var yt="SELECT DeveloperName, MasterLabel, NamespacePrefix, SobjectType FROM DuplicateRule WHERE IsActive = true",ae=/^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$/,x=/^[A-Za-z][A-Za-z0-9_]{0,79}$/,wt=ee({DailyApiRequests:ee({Max:X(),Remaining:X()}).loose()}).loose(),y=e=>typeof e=="string"?e:"";function le(e){if(typeof e!="object"||e===null)return;let r=e.QualifiedApiName;return typeof r=="string"&&r!==""?r:void 0}function Q(e,r){return e?`${e}__${r}`:r}function L(e){return typeof e=="string"?[e]:Array.isArray(e)?e.filter(r=>typeof r=="string"):[]}function bt(e){return{...e,nodes:e.nodes.map(r=>r.leftOutByUser===!0?{...r,included:!0}:r)}}function se(e,r){let n=y(e).trim(),t=n.slice(n.lastIndexOf(".")+1);if(x.test(t))return r?r.find(s=>s.name.toLowerCase()===t.toLowerCase())?.name:t}function rt(e){let r=Ve({filterFormula:e}).filter(t=>t.bypass).map(t=>t.name),n=Ue(e).map(t=>t.value===void 0?t.reference:`${t.reference} = '${t.value}'`);return{bypasses:[...r.map(t=>`$Permission.${t}`),...n],permissions:r}}function Rt(e,r={}){let n=r.maxRecordsPerObject,t=e.nodes.filter(d=>d.included),s=$e(r)?"atMost":"exact",l=t.map(d=>d.recordCountUnknown===!0?(n===void 0?s="unknown":s==="exact"&&(s="atMost"),{...d,recordCount:n??0}):{...d,recordCount:n===void 0?d.recordCount:Math.min(d.recordCount,n)}),f=new xe().generate({...e,nodes:l}).totalApiCalls,p=l.reduce((d,u)=>d+Math.max(1,Math.ceil(u.recordCount/pt)),0);return{writes:f,reads:p,bound:s}}function P(e){let{idValue:r,...n}=e;return{id:Fe(e.kind,e.objectApiName,e.field,e.recordType,r??e.value),source:"metadata",rows:0,...n}}function ue(e){return e?{field:e}:{}}function Qt(e){return async r=>Ie(await e.request({method:"POST",url:"/tooling/composite",body:JSON.stringify(qe(`/services/data/v${e.version}`,r)),headers:{"Content-Type":"application/json"}}),r.length)}async function kt(e,r,n){let t=e.filter(({id:s})=>ae.test(s));t.length!==0&&await U(r,[{queries:t.map(({id:s,rule:l})=>({soql:q(s),retrieve:{sobject:"ValidationRule",id:s},take:f=>{let p=f[0]?.Metadata,d=typeof p=="object"&&p!==null?p.errorConditionFormula:void 0;typeof d=="string"&&Ye(d)&&(l.onChangeOnly=!0)},refused:()=>{}})),requests:W}],G,n)}async function Ft(e,r,n,t,s){let l=[...new Set(r)].filter(m=>x.test(m));if(l.length===0)return[];let f=new Map(l.map(m=>[m.toLowerCase(),m])),p=new Map(l.map((m,b)=>[m,b])),d=await e(oe(l)),u=new Map,o=async(m,b)=>{let k=se(b,void 0);if(!n)return k;let F=u.get(m);F||(F=n(m).catch(()=>[]),u.set(m,F));let C=y(b).trim().toLowerCase();if(!C)return;let _=k?.toLowerCase(),S=await F;return S.length===0?k:S.find(A=>A.name.toLowerCase()===_)?.name??S.find(A=>A.label?.trim().toLowerCase()===C)?.name},h=(await Promise.all(d.map(async m=>{let b=le(m.EntityDefinition),k=b===void 0?void 0:f.get(b.toLowerCase()),F=y(m.ValidationName);return!k||!F?[]:[{id:y(m.Id),rule:{objectApiName:k,name:Q(y(m.NamespacePrefix),F),message:y(m.ErrorMessage),...ue(await o(k,m.ErrorDisplayField))}}]}))).flat().sort((m,b)=>(p.get(m.rule.objectApiName)??0)-(p.get(b.rule.objectApiName)??0)||m.rule.name.localeCompare(b.rule.name));return t&&await kt(h,t,s),h.map(({rule:m})=>m)}async function Wt(e,r,n,t){let s=[...new Set(r)].filter(a=>x.test(a));if(s.length===0)return{rules:[],notRead:0,requests:0};let l=new Map(s.map(a=>[a.toLowerCase(),a])),f=await e(oe(s)),p=f.requests,d=f.records.flatMap(a=>{let h=le(a.EntityDefinition),m=h===void 0?void 0:l.get(h.toLowerCase()),b=y(a.ValidationName);return!m||!b?[]:[{id:y(a.Id),objectApiName:m,name:Q(y(a.NamespacePrefix),b),read:!1,permissions:[]}]}),u=d.filter(a=>ae.test(a.id)),o=(a,h)=>{let m=typeof h=="object"&&h!==null?h.errorConditionFormula:void 0;typeof m=="string"&&(a.read=!0,a.permissions=rt(m).permissions)};return n?p+=await U(n,[{queries:u.slice(0,ie).map(a=>({soql:q(a.id),retrieve:{sobject:"ValidationRule",id:a.id},take:h=>o(a,h[0]?.Metadata),refused:()=>{}})),requests:W}],G,t):await B(u.slice(0,nt).map(a=>async()=>{try{let h=await e(q(a.id));p+=h.requests,o(a,h.records[0]?.Metadata)}catch{p++}}),G),{rules:d.filter(a=>a.permissions.length>0).map(({objectApiName:a,name:h,permissions:m})=>({objectApiName:a,name:h,permissions:m})),notRead:d.filter(a=>!a.read).length,requests:p}}function Kt(e,r,n){let t=async s=>(await e(ht(s))).flatMap(l=>typeof l.QualifiedApiName=="string"?[{name:l.QualifiedApiName,...typeof l.Label=="string"?{label:l.Label}:{}}]:[]);return s=>Ft(e,s,t,r,n)}var et=class{deps;constructor(r){this.deps=r}async read(r,n,t,s={}){let l=new Set(s.excludedObjects??[]),f=Qe(bt(t),l),p=[];if(f.length===0)return{gaps:[],unread:[],requests:0};let d=0,u=(i,c,g)=>{p.push({part:i,reason:c,...g!==void 0?{objectApiName:g}:{}})},o=new Map(f.map(i=>[i.toLowerCase(),i])),a=i=>i===void 0?void 0:o.get(i.toLowerCase()),h=new Map(f.map((i,c)=>[i,c])),m=f.filter(i=>x.test(i)),b=[],k=[],F,C,_=new Map,S=new Map,A=new Set,I=(i,c,g)=>async()=>{try{let w=await c();d+=w.requests,g(w.records)}catch(w){d++,u(i,E(w))}},ce=(i,c,g,w)=>async()=>{try{let{fields:J,sent:lt,createable:ut}=await this.deps.describeFields(i,c);lt&&d++,w.set(c,J),w===_&&ut===!1&&A.add(c)}catch(J){d++,u(g,`${c}: ${E(J)}`,c)}};await B([...m.length>0?[I("validationRules",()=>this.deps.toolingQuery(n,oe(m)),i=>{b=i})]:[],I("duplicateRules",()=>this.deps.query(n,yt),i=>{k=i}),async()=>{try{d++,F=await this.deps.readLimits(n)}catch(i){C=E(i)}},...f.flatMap(i=>[ce(n,i,"targetFields",_),ce(r,i,"sourceFields",S)])],G);let T=b.flatMap(i=>{let c=a(le(i.EntityDefinition)),g=y(i.ValidationName);if(!c||!g)return[];let w=y(i.Id);return[{id:ae.test(w)?w:null,name:Q(y(i.NamespacePrefix),g),objectApiName:c,...ue(se(i.ErrorDisplayField,_.get(c))),message:y(i.ErrorMessage),formula:"notRead",bypasses:[],permissions:[]}]}).sort((i,c)=>(h.get(i.objectApiName)??0)-(h.get(c.objectApiName)??0)||i.name.localeCompare(c.name)),{toolingQueries:j,toolingRetrieves:de}=this.deps,K=T.filter(i=>i.id!==null).slice(0,j?ie:nt);for(let i of T)i.id===null&&(i.formula="unreadable");let z=k.flatMap(i=>{let c=a(y(i.SobjectType)),g=Q(y(i.NamespacePrefix),y(i.DeveloperName));return!c||!y(i.DeveloperName)?[]:[{objectApiName:c,developerName:g,label:y(i.MasterLabel)||g,fullName:`${y(i.SobjectType)}.${g}`}]}),fe=new Map,pe=[];for(let i=0;i<z.length;i+=Je)pe.push(z.slice(i,i+Je).map(c=>c.fullName));let V,H,ge=(i,c)=>{let g=typeof c=="object"&&c!==null?c.errorConditionFormula:void 0;if(typeof g!="string"){i.formula="unreadable";return}i.formula="read",Object.assign(i,rt(g));let w=se(c.errorDisplayField,_.get(i.objectApiName));w&&(i.field=w)},it=async()=>{if(!j||K.length===0)return;let i=await U(c=>j(n,c),[{queries:K.map(c=>({soql:q(c.id),retrieve:{sobject:"ValidationRule",id:c.id},take:g=>ge(c,g[0]?.Metadata),refused:g=>{c.formula="unreadable",V??=g}})),requests:W}],G,de&&(c=>de(n,c)));d+=i},me=new Map,Z={},he=[...A].filter(i=>x.test(i)),ot=async()=>{let[i,c]=await Promise.all([Oe((g,w)=>this.deps.toolingQuery(g,w),n,he),this.deps.createFacts?this.deps.createFacts(n).then(g=>({facts:g,requests:0})).catch(()=>({facts:{},requests:0})):je(this.deps,n)]);d+=i.requests+c.requests;for(let[g,w]of i.answered)me.set(g,w);Z=c.facts};await B([...he.length>0?[ot]:[],...j?[it]:[],...(j?[]:K).map(i=>async()=>{try{let c=await this.deps.toolingQuery(n,q(i.id));d+=c.requests,ge(i,c.records[0]?.Metadata)}catch(c){d++,i.formula="unreadable",V??=E(c)}}),...pe.map(i=>async()=>{try{d++;for(let c of await this.deps.readDuplicateRules(n,i)){if(typeof c!="object"||c===null)continue;let g=c,w=y(g.fullName);w&&fe.set(w.toLowerCase(),g)}}catch(c){H??=E(c)}})],G),V!==void 0&&u("validationRuleFormulas",V),H!==void 0&&u("duplicateRuleActions",H);let Y=new Set,ye=!1;T.some(i=>i.permissions.length>0)&&await I("userPermissions",()=>this.deps.query(n,Le),i=>{ye=!0;for(let c of i)Y.add(Be(y(c.NamespacePrefix),y(c.DeveloperName)))})();let we=[...new Set(T.flatMap(i=>i.permissions.filter(c=>!Y.has(c.toLowerCase()))))],at=we.length>0?await We(we,async i=>{let c=[];return await I("permissionSets",()=>this.deps.query(n,i),g=>{c=g})(),c},()=>p.some(i=>i.part==="permissionSets")):void 0,be=[...T.map(i=>At(i,ye?Y:void 0,at)),...z.map(i=>Ct(i,fe.get(i.fullName.toLowerCase()))),...f.flatMap(i=>{if(A.has(i))return[_t(i,Pe(i,Z,me.get(i.toLowerCase())),_.get(i)??[],Z)];let c=_.get(i),g=S.get(i);return c&&g?St(i,c,g,s):[]})],Re=wt.safeParse(F),ke=C===void 0&&Re.success?Re.data.DailyApiRequests:void 0;return ke||u("apiBudget",C??"the limits the org answered hold no DailyApiRequests"),be.push(Et(t,s,f[0],ke)),{gaps:Ae(be),unread:vt(p,h),requests:d}}};function vt(e,r){let n=t=>t===void 0?-1:r.get(t)??r.size;return[...e].sort((t,s)=>n(t.objectApiName)-n(s.objectApiName)||Xe.indexOf(t.part)-Xe.indexOf(s.part)||(t.reason<s.reason?-1:t.reason>s.reason?1:0)).map(({part:t,reason:s})=>({part:t,reason:s}))}var Nt={platform:"object_platform_only",setup:"object_setup_only",feature:"object_feature_off",parent:"object_through_parent",user:"object_not_createable"};function _t(e,r,n,t){let s=r==="parent"?Me(n,t):[];return P({kind:Nt[r],severity:Te(r)?"info":"blocking",objectApiName:e,...s.length>0?{detail:{editOn:s}}:{},decisions:["exclude_object"]})}function At(e,r,n){let t=r?e.permissions.filter(f=>r.has(f.toLowerCase())):[],s=t.length>0?[]:e.permissions.flatMap(f=>{let p=n?.find(d=>d.permission.toLowerCase()===f.toLowerCase());return p?[Ce(p)]:[]}),l=e.field?["leave_empty","ignore"]:["ignore"];return P({kind:"validation_rule",severity:t.length>0?"info":"warning",objectApiName:e.objectApiName,...ue(e.field),idValue:e.name,detail:{rule:e.name,message:e.message,formula:e.formula,...e.bypasses.length>0?{bypasses:e.bypasses}:{},...t.length>0?{heldBypasses:t}:{},...s.length>0?{assign:s}:{}},decisions:l,...e.field?{defaultDecision:"leave_empty"}:{}})}function Ct(e,r){let n=y(r?.actionOnInsert).toLowerCase(),t=n==="block"||n==="allow"?n:"unknown",s=L(r?.operationsOnInsert).map(f=>f.toLowerCase());return P({kind:"duplicate_rule",severity:t==="allow"?"info":"warning",objectApiName:e.objectApiName,idValue:e.developerName,detail:{rule:e.label,developerName:e.developerName,action:t,...t==="allow"?{alert:s.includes("alert")}:{},...t==="allow"?{report:s.includes("report")}:{}},decisions:t==="allow"?["ignore"]:["ignore","exclude_object"],...t==="allow"?{defaultDecision:"ignore"}:{}})}function St(e,r,n,t){let s=o=>o.toLowerCase(),l=new Set((t.fieldExclusions?.[e]??[]).map(s)),f=new Map(Object.entries(t.fieldMappings?.[e]??{}).map(([o,a])=>[s(o),s(a)])),p=new Set([...f].filter(([o])=>!l.has(o)).map(([,o])=>o)),d=new Map(n.map(o=>[s(o.name),o])),u=o=>{let a=s(o);if(p.has(a))return;let h=d.get(a);return h?l.has(a)||f.has(a)?"excluded":h.createable?void 0:"notCreateableInSource":"notInSource"};return r.flatMap(o=>{let a=u(o.name);if(o.createable&&!o.nillable&&!o.defaultedOnCreate&&a)return[P({kind:"required_field_missing",severity:"blocking",objectApiName:e,field:o.name,detail:{type:o.type,reason:a,...o.referenceTo.length>0?{referenceTo:o.referenceTo}:{},...o.picklistValues.length>0?{values:o.picklistValues}:{}},decisions:["set_default","exclude_object"]})];if(o.type==="reference"&&o.lookupFilter&&!a){let h=o.nillable;return[P({kind:"lookup_filter",severity:"warning",objectApiName:e,field:o.name,detail:{referenceTo:o.referenceTo,optional:h,filterOptional:o.lookupFilter.optional},decisions:h?["leave_empty","ignore"]:["ignore","exclude_object"],...h?{defaultDecision:"leave_empty"}:{}})]}return[]})}function Et(e,r,n,t){let s=e.nodes[0]?.objectApiName??n,l=Rt(e,r),f=l.writes+l.reads,p="warning";if(t&&l.bound!=="unknown"){let d=f>t.Remaining,u=t.Max-t.Remaining+f>gt*t.Max;p=d&&l.bound==="exact"?"blocking":d||u?"warning":"info"}return P({kind:"api_budget",severity:p,objectApiName:s,detail:{calls:f,writes:l.writes,reads:l.reads,estimate:l.bound,...t?{max:t.Max,remaining:t.Remaining}:{budgetRead:!1}},decisions:["ignore"]})}var $t={blocking:"BLOCKING",warning:"warning",info:"info"},Gt=new Set(["picklist_value_refused","dependent_value_invalid","picklist_value_absent","currency_inactive"]),xt=new Set(["record_type_unmapped","record_type_unavailable"]);function st(e,r,n=[e.id]){if(ve(r.ignoredGaps,e.id,n)!==void 0)return"left as it is";let t=e.objectApiName;if(r.excludedObjects?.includes(t))return`${t} left out of the run`;let s=new Set(e.decisions),{field:l,value:f}=e;if(s.has("skip_rows")&&Ne((r.skippedRows??[]).filter(o=>o.object===t),e.id,n))return"these rows held back";if(Gt.has(e.kind)&&l!==void 0&&f!==void 0&&(s.has("map_value")||s.has("leave_empty"))){let o=(r.picklistValueMappings??[]).filter(h=>h.object===t&&h.field===l&&h.from===f),a=_e(o,e,n);if(a?.to===null&&s.has("leave_empty"))return"the field left empty in these rows";if(a&&a.to!==null&&s.has("map_value"))return`written as "${a.to}"`}let p=xt.has(e.kind)?e.value??e.recordType:void 0;if(p!==void 0&&s.has("map_record_type")){let o=r.recordTypeMappings?.find(a=>a.object===t&&a.from===p);if(o)return o.to===null?"written with the object's default record type":`written as record type ${o.to}`}if(l===void 0)return;let d=o=>o.object===t&&o.field===l,u=s.has("set_default")?r.defaultValues?.find(d):void 0;if(u)return`default "${String(u.value)}"`;if(s.has("truncate")&&r.truncateFields?.some(d))return"cut to the field's length";if(s.has("leave_empty")&&r.fieldExclusions?.[t]?.includes(l))return"the field left out of the rows"}function zt(e,r){let n=e.gaps.map(t=>t.id);return{...e,gaps:e.gaps.map(t=>{let s=st(t,r,n);return s===void 0?t:{...t,answeredBy:s}})}}function tt(e,r,n,t){if(t)return`the mute lifts it (${t.permission}, in ${t.permissionSet}): ${re(e,!0)}`;let s=r?st(e,r,n):void 0;return s===void 0?`${$t[e.severity]}: ${re(e)}`:`answered by the run's decision: ${s} \u2014 ${re(e)}`}var Pt={validationRules:"the validation rules",validationRuleFormulas:"the formulas of some validation rules",duplicateRules:"the duplicate rules",duplicateRuleActions:"what the duplicate rules do on insert",userPermissions:"the custom permissions of the user the run writes as",permissionSets:"the permission sets that hold a bypass of a validation rule the user the run writes as does not",targetFields:"the fields of an object in the target",sourceFields:"the fields of an object in the source",apiBudget:"the daily API requests left"},Tt={notInSource:"the source has no such field",notCreateableInSource:"the source cannot give it",excluded:"the run leaves it out"},D=e=>typeof e=="number"?String(e):"?";function re(e,r=!1){let n=e.detail??{};switch(e.kind){case"required_field_missing":return`required field ${e.field??""} (${y(n.type)}): only the target requires it, and the run does not write it (${Tt[y(n.reason)]??y(n.reason)}): every row is refused unless it is given a value`;case"validation_rule":{let t=e.field?` on ${e.field}`:"",s=[...L(n.bypasses).map(f=>`not when ${f}`),...L(n.heldBypasses).length>0?[`kept quiet for this run: the user it writes as holds ${L(n.heldBypasses).join(", ")}`]:[],...n.formula==="notRead"?["formula not read"]:[],...n.formula==="unreadable"?["formula unreadable"]:[],...e.field&&!r?[`a row it refuses goes again without ${e.field}`]:[]],l=y(n.message)?`: "${y(n.message)}"`:"";return`validation rule "${y(n.rule)}"${t}${l}${s.length>0?` (${s.join("; ")})`:""}`}case"duplicate_rule":{let t=`duplicate rule "${y(n.rule)}"`;if(n.action==="block")return`${t}: blocks an insert it matches: a row it matches is refused, whatever allowSave says`;if(n.action==="allow"){let s=[n.alert===!0?"an alert":"",n.report===!0?"a report":""].filter(Boolean).join(" and ");return`${t}: allows an insert it matches${s?`, with ${s}`:""}: the run saves it (allowSave=true)`}return`${t}: what it does on insert was not read: a rule that blocks refuses a row it matches`}case"lookup_filter":return`lookup filter on ${e.field??""}: not checked before the run; `+(n.optional===!0?"a lookup it refuses is left empty":"the lookup is required, and a row it refuses is refused");case"object_not_createable":return"the user the run writes as may not create its records in the target: every row is skipped, after the objects written before it, unless the object is left out";case"object_platform_only":return"no user can create its records in the target, the platform writes them itself: the run skips every row of it";case"object_setup_only":return"no user can create its records in the target, not even one with Modify All Data, and no permission set gives Create on it: setup the org keeps as records, or the platform's own; the run skips every row of it";case"object_feature_off":return"even a user with Modify All Data may not create its records in the target, though a permission set can give Create on it: a feature or licence the target has not turned on for that user keeps it closed; turn it on, or every row is skipped, after the objects written before it, unless the object is left out";case"object_through_parent":{let t=L(n.editOn);return`no permission set gives Create on it: ${t.length>0?`the user the run writes as creates its records with Edit on ${t.join(" and ")}, which they hang from, or no user can`:"the records they hang from may open it to the user the run writes as, or no user can: read as a user with Modify All Data, the target would tell"}; every row is skipped, after the objects written before it, unless the object is left out`}case"api_budget":{let t=`about ${D(n.calls)} call(s) (${D(n.writes)} write(s) of 200 rows, ${D(n.reads)} read(s))`,s=n.estimate==="atMost"?`at most ${t}, counted on whole tables`:n.estimate==="unknown"?"an unknown number of calls: an object was never counted":t,l=n.budgetRead===!1?"the daily requests left could not be read":`${D(n.remaining)} of ${D(n.max)} daily requests left`;return`API budget: the run takes ${s}; ${l}`}default:return e.kind}}function jt(e,r,n){return Se(e).map(({permission:t,permissionSet:s,others:l})=>{if(!s)return` ${t}: no permission set of ${r} holds it: an admin creates one that includes it`;let f=l.length>0?`; also held by ${l.map(d=>d.name).join(", ")}`:"",p=n?`: ${Ge(s.name,r,n)}`:"";return` ${t}: held by permission set ${s.name}, the smallest${f}${p}`})}function Ht(e,r,n={}){let t=[`target gaps: what ${r} holds against the rows, read from its metadata`],s=e.gaps.map(u=>u.id),l=e.gaps.filter(u=>u.kind==="api_budget"),f=e.gaps.filter(u=>u.kind!=="api_budget"),p=[...new Set(f.map(u=>u.objectApiName))].sort((u,o)=>u.localeCompare(o));for(let u of p){t.push(` ${u}`);for(let o of f.filter(a=>a.objectApiName===u)){let a=Ee(o,n.lifted);t.push(` ${tt(o,n.decisions,s,a)}`),a||t.push(...jt(o,r,n.username))}}f.length===0&&t.push(e.unread.length>0?" nothing found in what could be read":" no validation rule, duplicate rule, field only the target requires or lookup filter");for(let u of l)t.push(` ${tt(u,n.decisions,s)}`);let d=f.filter(u=>u.detail?.formula==="notRead").length;d>0&&t.push(` ${d} validation rule formula(s) not read: the read takes ${n.formulasBound??ie} at most`);for(let{part:u,reason:o}of e.unread)t.push(` ${Pt[u]??u} could not be read: ${o}`);return t.push(` read in ${e.requests} request(s) to ${r}`),t}export{nt as a,W as b,ie as c,Bt as d,oe as e,ht as f,q as g,yt as h,rt as i,Rt as j,Qt as k,Ft as l,Wt as m,Kt as n,et as o,st as p,zt as q,Ht as r};
@@ -1,7 +0,0 @@
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 c}from"./chunk-QIRO4HTE.mjs";var u=new Set(["string","textarea","email","phone","url","encryptedstring","picklist","multipicklist","combobox","date","datetime","int","long","double","currency","percent"]),f=new Set(["string","textarea","email","phone","url","encryptedstring"]),p=["FirstName","MiddleName","LastName"];function k(e){return e==null?!1:typeof e!="string"||e.trim()!==""}function l(e){return u.has(e.type)}function m(e){return f.has(e.type)}var b={name_pattern:"name",type_analysis:"type",content_pattern:"content"};function D(e){return{apiName:e.name,label:e.label,type:e.type}}function F(e){return e.createable===!0||e.updateable===!0}function h(e,n){let i=e.filter(F).map(r=>r.name);return n.map(r=>{let d={};for(let a of i)d[a]=r[a];return d})}function _(e,n,i,r){let d=i.filter(l),a=new Map(d.map(t=>[t.name,t]));return e.detectPII(n,d.map(D),r&&r.length>0?h(d,r):void 0).piiFields.flatMap(t=>{let o=a.get(t.fieldApiName);return o?[{field:o,classification:t.classification,detectedBy:b[t.detectionMethod],pattern:t.pattern??t.detectionMethod}]:[]})}function y(e){if(e.filterable===!0){if(e.type==="email")return"email";if(e.type==="phone")return"phone";if(e.type==="string"){if(/email(?:__c)?$/i.test(e.name))return"email";if(/phone(?:__c)?$/i.test(e.name))return"phone"}}}function P(e){return e.fields.find(n=>n.nameField===!0&&n.filterable===!0&&n.autoNumber!==!0&&(n.type==="string"||n.type==="textarea"))}function M(e){let n=[];for(let r of e.fields){let d=y(r);d&&n.push({field:r,kind:d})}let i=P(e);return i&&n.push({field:i,kind:"name"}),n}function E(e){let n=e.fields.find(i=>i.nameField===!0&&i.autoNumber!==!0);return n&&n.updateable===!0&&m(n)?[n]:e.fields.filter(i=>p.includes(i.name))}function g(e){return c[e.name]!==void 0?"fake":e.nillable===!0?"nullify":"fake"}var x=new Set(["email_content","ssn_content"]);function N(e,n){let i=new Set,r=[],d=n.filter(t=>t.detectedBy!=="content"||x.has(t.pattern));for(let t of[...d.map(o=>o.field),...E(e)])i.has(t.name)||!l(t)||t.calculated===!0||t.autoNumber===!0||(i.add(t.name),r.push(t));let a=[],s=[];for(let t of r)t.updateable===!0?a.push({field:t,method:g(t)}):s.push(t);return{fields:a,kept:s}}export{k as a,l as b,m as c,F as d,_ as e,y as f,P as g,M as h,g as i,N as j};