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.
- package/README.md +1 -1
- package/lib/{chunk-THYQOG24.mjs → chunk-22L43JMK.mjs} +1 -1
- package/lib/{chunk-U4S27YRP.mjs → chunk-2LSGWTWX.mjs} +1 -1
- package/lib/{chunk-MRN72UEO.mjs → chunk-2YJJTQNC.mjs} +1 -1
- package/lib/chunk-34SMB5PA.mjs +10 -0
- package/lib/chunk-35B73566.mjs +7 -0
- package/lib/{chunk-YZKE6D3K.mjs → chunk-35IJ4WEU.mjs} +1 -1
- package/lib/chunk-3EHPAFKV.mjs +7 -0
- package/lib/{chunk-3OKDWZ32.mjs → chunk-3HAVVEXF.mjs} +1 -1
- package/lib/{chunk-32ZB5ICW.mjs → chunk-3I6FXFCN.mjs} +1 -1
- package/lib/{chunk-JFVY66BS.mjs → chunk-3KJCSYXY.mjs} +1 -1
- package/lib/{chunk-ULEYGOZU.mjs → chunk-3L6DVNCR.mjs} +1 -1
- package/lib/chunk-3LRFPGYZ.mjs +7 -0
- package/lib/{chunk-GHUA6OQQ.mjs → chunk-3MVWGL5A.mjs} +1 -1
- package/lib/{chunk-SF52ZSIV.mjs → chunk-4CSBZZAL.mjs} +1 -1
- package/lib/{chunk-FBYFCKPG.mjs → chunk-4NSXPONF.mjs} +1 -1
- package/lib/{chunk-A3QNSALB.mjs → chunk-4VLP6RHC.mjs} +1 -1
- package/lib/{chunk-TWYNQ2OO.mjs → chunk-4XROG5CT.mjs} +1 -1
- package/lib/chunk-54V4FVEY.mjs +7 -0
- package/lib/chunk-55OJJT2Q.mjs +7 -0
- package/lib/{chunk-JRI6A24G.mjs → chunk-5EHHQ5UX.mjs} +1 -1
- package/lib/{chunk-VPGX5Z5D.mjs → chunk-5JMQXHJ2.mjs} +1 -1
- package/lib/{chunk-CI2O7WBH.mjs → chunk-65AMXOQU.mjs} +1 -1
- package/lib/{chunk-5T3LFDJ5.mjs → chunk-6HHSAPIM.mjs} +1 -1
- package/lib/chunk-6KVBCFVS.mjs +7 -0
- package/lib/chunk-6NG7C2U3.mjs +476 -0
- package/lib/{chunk-F2424IKX.mjs → chunk-6ROL3KBM.mjs} +1 -1
- package/lib/{chunk-7ZYCRIHE.mjs → chunk-72AWCN7U.mjs} +1 -1
- package/lib/{chunk-MQLTEXB7.mjs → chunk-7KHA5UIQ.mjs} +1 -1
- package/lib/chunk-7O6EFNQS.mjs +10 -0
- package/lib/{chunk-73SLYGWD.mjs → chunk-A2CH2QGX.mjs} +1 -1
- package/lib/chunk-A2TXLAC3.mjs +276 -0
- package/lib/chunk-ALWVNR34.mjs +7 -0
- package/lib/{chunk-JBOGAUGH.mjs → chunk-ATBQIE2V.mjs} +1 -1
- package/lib/{chunk-C2MHMI7U.mjs → chunk-ATQML7ZK.mjs} +1 -1
- package/lib/chunk-AVY742BJ.mjs +7 -0
- package/lib/{chunk-VLAU5QQT.mjs → chunk-AXTB2HJS.mjs} +1 -1
- package/lib/chunk-BBZUGKBZ.mjs +10 -0
- package/lib/chunk-BIDXK7KA.mjs +7 -0
- package/lib/{chunk-KYLHS74X.mjs → chunk-BLMJ4WVI.mjs} +1 -1
- package/lib/{chunk-A7YP27GQ.mjs → chunk-BNHJCJJM.mjs} +1 -1
- package/lib/{chunk-ZDMSTL2L.mjs → chunk-BNPQEQXC.mjs} +1 -1
- package/lib/chunk-C5AUNG6T.mjs +37 -0
- package/lib/{chunk-LY6EPMIP.mjs → chunk-C5EQ7GFC.mjs} +1 -1
- package/lib/{chunk-LOO42EW5.mjs → chunk-C7CKDZMC.mjs} +62 -62
- package/lib/{chunk-ZP3WJGS3.mjs → chunk-CB4U22NR.mjs} +1 -1
- package/lib/chunk-CJAWKLAL.mjs +7 -0
- package/lib/chunk-CL75DEMQ.mjs +9 -0
- package/lib/{chunk-7L6FE5PP.mjs → chunk-CLUNF4FK.mjs} +1 -1
- package/lib/chunk-CSMGP53U.mjs +7 -0
- package/lib/{chunk-S6BMJSLD.mjs → chunk-CT324C7I.mjs} +1 -1
- package/lib/{chunk-YXOPKGDX.mjs → chunk-CZXDJXQP.mjs} +1 -1
- package/lib/{chunk-PGG4ULEW.mjs → chunk-D2X6U3MS.mjs} +1 -1
- package/lib/{chunk-FG4Y4ZVL.mjs → chunk-DAUX63UB.mjs} +1 -1
- package/lib/chunk-DB7JNALQ.mjs +10 -0
- package/lib/chunk-DDNCJVZ2.mjs +17 -0
- package/lib/{chunk-YGE4AUXG.mjs → chunk-DLSU66MY.mjs} +1 -1
- package/lib/{chunk-DCJBP3LE.mjs → chunk-DO6PSHQZ.mjs} +1 -1
- package/lib/{chunk-ROTDZKOE.mjs → chunk-DUBECLZV.mjs} +1 -1
- package/lib/{chunk-SES5HPBZ.mjs → chunk-DYHF6DNT.mjs} +1 -1
- package/lib/chunk-E5FSPXYH.mjs +930 -0
- package/lib/{chunk-QAXKUEJT.mjs → chunk-EGL3I3IX.mjs} +1 -1
- package/lib/chunk-EIYMQPMG.mjs +7 -0
- package/lib/{chunk-AX3YF7SC.mjs → chunk-EUIALBMX.mjs} +1 -1
- package/lib/{chunk-57QRXYAZ.mjs → chunk-FI3R5ZOQ.mjs} +1 -1
- package/lib/{chunk-FCZDWGQI.mjs → chunk-FM4QCTO7.mjs} +1 -1
- package/lib/{chunk-74HZ274R.mjs → chunk-FRSIEASH.mjs} +1 -1
- package/lib/{chunk-G6IYOZEH.mjs → chunk-FV6MOSHD.mjs} +1 -1
- package/lib/chunk-FYG47CNA.mjs +7 -0
- package/lib/chunk-GB6W4Q56.mjs +7 -0
- package/lib/chunk-GEV2DCMK.mjs +7 -0
- package/lib/{chunk-NZJXEULY.mjs → chunk-GFB2DNCB.mjs} +1 -1
- package/lib/chunk-GFGMGFSH.mjs +7 -0
- package/lib/{chunk-EFHDE7W4.mjs → chunk-GIFQXB2Q.mjs} +1 -1
- package/lib/{chunk-P6A22FMQ.mjs → chunk-GP5J3DGS.mjs} +1 -1
- package/lib/chunk-GQZEX7LH.mjs +231 -0
- package/lib/{chunk-BRN42U26.mjs → chunk-GYDTM62J.mjs} +1 -1
- package/lib/{chunk-GNCEHAJY.mjs → chunk-GYFIXUJG.mjs} +1 -1
- package/lib/chunk-GZW2GNFK.mjs +7 -0
- package/lib/chunk-H6BHWAX7.mjs +8 -0
- package/lib/{chunk-GUYEXPJ4.mjs → chunk-HDDJ3CVN.mjs} +1 -1
- package/lib/{chunk-3GATEVHC.mjs → chunk-HDWB4ZOG.mjs} +1 -1
- package/lib/chunk-HGVPBJR6.mjs +7 -0
- package/lib/{chunk-55VBV2WK.mjs → chunk-HLROVOR6.mjs} +1 -1
- package/lib/{chunk-HV3TDLFR.mjs → chunk-HUOR4M2L.mjs} +1 -1
- package/lib/chunk-HZCS6EED.mjs +8 -0
- package/lib/{chunk-WZX6VCIT.mjs → chunk-HZUI56KZ.mjs} +1 -1
- package/lib/chunk-IAB5H7WN.mjs +7 -0
- package/lib/{chunk-RY7WUJXH.mjs → chunk-IQ5UKRHU.mjs} +1 -1
- package/lib/{chunk-OUWR5M5G.mjs → chunk-IRQ4WANV.mjs} +1 -1
- package/lib/{chunk-F44EHXLI.mjs → chunk-IT3DGX37.mjs} +1 -1
- package/lib/chunk-J347SPU6.mjs +49 -0
- package/lib/{chunk-IZ2M2RGO.mjs → chunk-JANBNTR5.mjs} +1 -1
- package/lib/chunk-JFXQZPRY.mjs +9 -0
- package/lib/{chunk-VKA5OZBJ.mjs → chunk-JRLYWVF4.mjs} +1 -1
- package/lib/{chunk-FM5ESRH6.mjs → chunk-JSNMUTY6.mjs} +1 -1
- package/lib/chunk-JTNJKSAA.mjs +7 -0
- package/lib/{chunk-4D6OHSX3.mjs → chunk-JV2LAKWQ.mjs} +1 -1
- package/lib/{chunk-BY42YL4D.mjs → chunk-JV7K2ZHK.mjs} +1 -1
- package/lib/{chunk-A6IJUOLB.mjs → chunk-K4TQ7YHX.mjs} +1 -1
- package/lib/chunk-K5PUMHZU.mjs +7 -0
- package/lib/chunk-KH4KLCYG.mjs +7 -0
- package/lib/{chunk-FZF6FB65.mjs → chunk-KQVLZVOP.mjs} +1 -1
- package/lib/chunk-KWUS7UAV.mjs +19 -0
- package/lib/{chunk-2UUSF32M.mjs → chunk-L6G73FXM.mjs} +1 -1
- package/lib/{chunk-LUNGNCM3.mjs → chunk-LG466Q5H.mjs} +1 -1
- package/lib/{chunk-YTBM3TSW.mjs → chunk-LHNAR6FC.mjs} +1 -1
- package/lib/chunk-LT4GHEI2.mjs +7 -0
- package/lib/{chunk-P3OYE2FS.mjs → chunk-MR262Y3B.mjs} +1 -1
- package/lib/{chunk-TSTCHIBU.mjs → chunk-NCCHOV2N.mjs} +1 -1
- package/lib/chunk-NICRSGLS.mjs +7 -0
- package/lib/chunk-NV5QA2HY.mjs +7 -0
- package/lib/{chunk-6HAKOS6W.mjs → chunk-O3GIN5TU.mjs} +1 -1
- package/lib/chunk-O6FHK6NQ.mjs +13 -0
- package/lib/{chunk-OXIIKAUZ.mjs → chunk-O7YIEFG7.mjs} +1 -1
- package/lib/chunk-OCUVAA5E.mjs +7 -0
- package/lib/chunk-OLCS7JCT.mjs +14 -0
- package/lib/chunk-ON7Y63FK.mjs +9 -0
- package/lib/{chunk-K2WOT75I.mjs → chunk-OO2WY3UB.mjs} +1 -1
- package/lib/{chunk-3EOIAC2M.mjs → chunk-OT2NHL2V.mjs} +1 -1
- package/lib/{chunk-BK5SRDAD.mjs → chunk-P2M5ZXWU.mjs} +1 -1
- package/lib/{chunk-DCZYWMSA.mjs → chunk-P4YOHLZ4.mjs} +1 -1
- package/lib/chunk-PBHDPTT6.mjs +343 -0
- package/lib/chunk-PE7CHD2W.mjs +7 -0
- package/lib/{chunk-LU7M5URW.mjs → chunk-PIQ2I67B.mjs} +1 -1
- package/lib/chunk-PKYDNZJK.mjs +7 -0
- package/lib/chunk-PVZ72OOQ.mjs +7 -0
- package/lib/chunk-QACFTHJM.mjs +8 -0
- package/lib/{chunk-LNAZHI3J.mjs → chunk-QGVL5EW3.mjs} +1 -1
- package/lib/chunk-QHE2RUWX.mjs +7 -0
- package/lib/{chunk-4RNP65FV.mjs → chunk-RCW5BZNW.mjs} +1 -1
- package/lib/{chunk-OTKXTBTX.mjs → chunk-RJ6HHG7J.mjs} +1 -1
- package/lib/{chunk-IVDBVWKK.mjs → chunk-RPTEEI4R.mjs} +1 -1
- package/lib/chunk-RQW5S67A.mjs +7 -0
- package/lib/chunk-RTCMYMED.mjs +7 -0
- package/lib/chunk-RWVX7XSD.mjs +7 -0
- package/lib/{chunk-2UUS4IGB.mjs → chunk-RZOINFNL.mjs} +1 -1
- package/lib/chunk-SOOTWGMQ.mjs +7 -0
- package/lib/chunk-STQ2JMIZ.mjs +7 -0
- package/lib/{chunk-RC25QQVF.mjs → chunk-SUIPDW5O.mjs} +1 -1
- package/lib/{chunk-Z354SAEF.mjs → chunk-SZOJ7BEJ.mjs} +1 -1
- package/lib/{chunk-45375WT5.mjs → chunk-T542Z54E.mjs} +1 -1
- package/lib/chunk-TAN2CIRI.mjs +21 -0
- package/lib/{chunk-BGJBYDRW.mjs → chunk-TCNBINOG.mjs} +1 -1
- package/lib/chunk-TFDF3DBN.mjs +7 -0
- package/lib/{chunk-B5A4JHNN.mjs → chunk-TICZXC53.mjs} +1 -1
- package/lib/chunk-TLX45X5U.mjs +7 -0
- package/lib/{chunk-W6SLQZKQ.mjs → chunk-TMIV3IWH.mjs} +1 -1
- package/lib/chunk-TQ6HEJ73.mjs +11 -0
- package/lib/chunk-TTU5EQZ6.mjs +7 -0
- package/lib/chunk-TYUYPFDJ.mjs +7 -0
- package/lib/chunk-TZXYVMZC.mjs +7 -0
- package/lib/{chunk-4N425UJC.mjs → chunk-UCUFLFNK.mjs} +1 -1
- package/lib/chunk-UK3QLBHW.mjs +7 -0
- package/lib/{chunk-SKGAERV4.mjs → chunk-UM2B4GR7.mjs} +1 -1
- package/lib/chunk-UZFTTNOP.mjs +7 -0
- package/lib/chunk-V3AXSKSU.mjs +7 -0
- package/lib/chunk-VA6EEI6X.mjs +21 -0
- package/lib/{chunk-LSEM2BZH.mjs → chunk-VFKG2G37.mjs} +1 -1
- package/lib/chunk-VJNEW5MQ.mjs +7 -0
- package/lib/{chunk-EYFP3NA6.mjs → chunk-VKREON6Q.mjs} +1 -1
- package/lib/{chunk-TIVI2KGB.mjs → chunk-VNNDYPBL.mjs} +1 -1
- package/lib/{chunk-J3FJ3BWE.mjs → chunk-VRBETPHY.mjs} +1 -1
- package/lib/{chunk-UX4AOSMU.mjs → chunk-VT6P3X6R.mjs} +1 -1
- package/lib/{chunk-CUOWQMGW.mjs → chunk-VUTQY76O.mjs} +1 -1
- package/lib/chunk-WF5S4FW5.mjs +7 -0
- package/lib/{chunk-JHJDDQDE.mjs → chunk-WJGK6VGU.mjs} +1 -1
- package/lib/{chunk-IZREPWYQ.mjs → chunk-WJHMB3SL.mjs} +1 -1
- package/lib/{chunk-XZRON54U.mjs → chunk-WQCXOZEJ.mjs} +1 -1
- package/lib/{chunk-N2MXYD67.mjs → chunk-WVVFR4E3.mjs} +1 -1
- package/lib/{chunk-GG5I52UT.mjs → chunk-XBYXT74L.mjs} +1 -1
- package/lib/chunk-XJE3LJHP.mjs +7 -0
- package/lib/{chunk-3QCUSZIZ.mjs → chunk-XV4CVZYD.mjs} +1 -1
- package/lib/chunk-Y37ED7AS.mjs +7 -0
- package/lib/{chunk-MN3XBJPE.mjs → chunk-YGBNZYT4.mjs} +1 -1
- package/lib/{chunk-SBDF4AE5.mjs → chunk-YGTOX7IL.mjs} +1 -1
- package/lib/{chunk-SQM32AOQ.mjs → chunk-YJ27WHKR.mjs} +1 -1
- package/lib/chunk-YRULC27A.mjs +7 -0
- package/lib/{chunk-RMFU4BAL.mjs → chunk-YSVAHT4Q.mjs} +4 -4
- package/lib/chunk-YTOTMJTY.mjs +15 -0
- package/lib/{chunk-SU24AE3H.mjs → chunk-YZKZC62O.mjs} +1 -1
- package/lib/{chunk-LJNRN7MY.mjs → chunk-YZQN7BRB.mjs} +1 -1
- package/lib/{chunk-NMF55UBQ.mjs → chunk-Z5IUK2QO.mjs} +1 -1
- package/lib/{chunk-6ZWY36LK.mjs → chunk-ZEGSMW5A.mjs} +1 -1
- package/lib/{chunk-YV7JYHJP.mjs → chunk-ZIKLQZBG.mjs} +1 -1
- package/lib/chunk-ZVU7MD2S.mjs +7 -0
- package/lib/sandforge-autopilot.mjs +33 -27
- package/lib/sandforge-backup.mjs +19 -19
- package/lib/sandforge-checkpoint.mjs +1 -1
- package/lib/sandforge-cleanup.mjs +1 -1
- package/lib/sandforge-clone.mjs +1 -1
- package/lib/sandforge-compare.mjs +29 -16
- package/lib/sandforge-dataops.mjs +1 -1
- package/lib/sandforge-empty.mjs +11 -13
- package/lib/sandforge-env.mjs +105 -105
- package/lib/sandforge-frozen.mjs +1 -1
- package/lib/sandforge-mcp.mjs +2 -2
- package/lib/sandforge-monitor.mjs +1 -1
- package/lib/sandforge-pipeline.mjs +13 -13
- package/lib/sandforge-seed.mjs +1 -1
- package/lib/sandforge-sync.mjs +1 -1
- package/lib/sandforge-users.mjs +13 -15
- package/lib/sandforge.mjs +1 -1
- package/lib/sf/sandforge/dataops.mjs +2 -2
- package/lib/sfPlugin.mjs +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/lib/chunk-26EGXYZ4.mjs +0 -21
- package/lib/chunk-2JRVBXJL.mjs +0 -7
- package/lib/chunk-2METQHGG.mjs +0 -7
- package/lib/chunk-3XU7CEJQ.mjs +0 -7
- package/lib/chunk-4BQPAVMP.mjs +0 -14
- package/lib/chunk-4KMKOE77.mjs +0 -156
- package/lib/chunk-4RPA7Z52.mjs +0 -7
- package/lib/chunk-5C7LQXYS.mjs +0 -7
- package/lib/chunk-5EESNYE3.mjs +0 -8
- package/lib/chunk-6ZW6BLV5.mjs +0 -7
- package/lib/chunk-AAOMUI7S.mjs +0 -15
- package/lib/chunk-AIUAEBHR.mjs +0 -7
- package/lib/chunk-BD724WOH.mjs +0 -7
- package/lib/chunk-CRPLDXJU.mjs +0 -48
- package/lib/chunk-CSSOLHE3.mjs +0 -7
- package/lib/chunk-D63HEQ3B.mjs +0 -7
- package/lib/chunk-DN7YBILC.mjs +0 -21
- package/lib/chunk-DNE7JI3A.mjs +0 -11
- package/lib/chunk-EFHM2U4D.mjs +0 -7
- package/lib/chunk-EINEGS6E.mjs +0 -7
- package/lib/chunk-EM5EFMHA.mjs +0 -272
- package/lib/chunk-FH5UR35W.mjs +0 -7
- package/lib/chunk-FN7TOBJR.mjs +0 -7
- package/lib/chunk-HGJFATSI.mjs +0 -10
- package/lib/chunk-HOEE3PE5.mjs +0 -7
- package/lib/chunk-HV63UGL5.mjs +0 -7
- package/lib/chunk-JKFCGYJE.mjs +0 -7
- package/lib/chunk-KATBU46O.mjs +0 -7
- package/lib/chunk-LD34JNCC.mjs +0 -7
- package/lib/chunk-LPN4WYTP.mjs +0 -478
- package/lib/chunk-MAOUFJ47.mjs +0 -7
- package/lib/chunk-MB2DG66I.mjs +0 -13
- package/lib/chunk-NCASRA7L.mjs +0 -9
- package/lib/chunk-NEKNAILD.mjs +0 -7
- package/lib/chunk-NN2IO4WE.mjs +0 -7
- package/lib/chunk-O3ZQSWDN.mjs +0 -10
- package/lib/chunk-OFQOKSEW.mjs +0 -7
- package/lib/chunk-PP7PJXRJ.mjs +0 -341
- package/lib/chunk-PT2E2HFD.mjs +0 -7
- package/lib/chunk-PZBZ7MNC.mjs +0 -7
- package/lib/chunk-QBYK5XIT.mjs +0 -8
- package/lib/chunk-RFD6NPWJ.mjs +0 -8
- package/lib/chunk-RIIJJRGF.mjs +0 -7
- package/lib/chunk-RKTFFCNS.mjs +0 -7
- package/lib/chunk-RM5G4IP6.mjs +0 -19
- package/lib/chunk-RTPNK7OB.mjs +0 -7
- package/lib/chunk-RZXEO5IE.mjs +0 -7
- package/lib/chunk-SAHGDSZQ.mjs +0 -37
- package/lib/chunk-SRPWW4A2.mjs +0 -10
- package/lib/chunk-SVNSAHG3.mjs +0 -7
- package/lib/chunk-T63U4OZJ.mjs +0 -7
- package/lib/chunk-TE2W76II.mjs +0 -10
- package/lib/chunk-TEIBWMJM.mjs +0 -7
- package/lib/chunk-TFGJDZFE.mjs +0 -7
- package/lib/chunk-TG52WNGV.mjs +0 -10
- package/lib/chunk-TQONVFI3.mjs +0 -7
- package/lib/chunk-TW3N6W5Z.mjs +0 -7
- package/lib/chunk-UZMLPKW6.mjs +0 -7
- package/lib/chunk-WB2RIVO3.mjs +0 -7
- package/lib/chunk-WQO7RXEB.mjs +0 -926
- package/lib/chunk-X3MBY2RX.mjs +0 -7
- package/lib/chunk-XMJRXXUN.mjs +0 -7
- package/lib/chunk-YNMU5I7P.mjs +0 -7
- package/lib/chunk-YSQJKIO6.mjs +0 -7
- package/lib/chunk-YVVPJRZC.mjs +0 -7
- package/lib/chunk-ZLQHBI6V.mjs +0 -9
- package/lib/chunk-ZRUDYB7O.mjs +0 -7
package/lib/sandforge-empty.mjs
CHANGED
|
@@ -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{d as
|
|
7
|
+
import{d as he,e as fe,f as ge,q as me}from"./chunk-VA6EEI6X.mjs";import"./chunk-BXZ73A5M.mjs";import"./chunk-XV4CVZYD.mjs";import"./chunk-BLMJ4WVI.mjs";import"./chunk-4NSXPONF.mjs";import"./chunk-TAN2CIRI.mjs";import"./chunk-AXTB2HJS.mjs";import"./chunk-NCCHOV2N.mjs";import"./chunk-2LSGWTWX.mjs";import{i as le}from"./chunk-LHNAR6FC.mjs";import"./chunk-XBYXT74L.mjs";import"./chunk-UV74P4H2.mjs";import"./chunk-UM2B4GR7.mjs";import"./chunk-2YJJTQNC.mjs";import"./chunk-4VLP6RHC.mjs";import"./chunk-YRULC27A.mjs";import"./chunk-GYDTM62J.mjs";import"./chunk-5JMQXHJ2.mjs";import"./chunk-HLROVOR6.mjs";import"./chunk-WF5S4FW5.mjs";import"./chunk-FV6MOSHD.mjs";import"./chunk-T542Z54E.mjs";import"./chunk-DO6PSHQZ.mjs";import"./chunk-ZIKLQZBG.mjs";import"./chunk-FYG47CNA.mjs";import"./chunk-GMY5427L.mjs";import{a as pe}from"./chunk-HUOR4M2L.mjs";import{a as ye}from"./chunk-TLX45X5U.mjs";import{a as de,b as ce,c as ue}from"./chunk-5GBO4KD5.mjs";import{c as P,d as oe}from"./chunk-6FARZYMJ.mjs";import"./chunk-ON7Y63FK.mjs";import"./chunk-7KHA5UIQ.mjs";import"./chunk-YTOTMJTY.mjs";import"./chunk-WJGK6VGU.mjs";import"./chunk-3L6DVNCR.mjs";import"./chunk-54V4FVEY.mjs";import"./chunk-XCA5AONB.mjs";import"./chunk-66NMFCWX.mjs";import"./chunk-TZXYVMZC.mjs";import"./chunk-CJAWKLAL.mjs";import"./chunk-PE7CHD2W.mjs";import"./chunk-VKREON6Q.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-VFKG2G37.mjs";import"./chunk-CL75DEMQ.mjs";import"./chunk-BOGNK4LV.mjs";import{f as H,h as ee,k as te}from"./chunk-DDNCJVZ2.mjs";import{n as ae}from"./chunk-C5AUNG6T.mjs";import"./chunk-3I6FXFCN.mjs";import"./chunk-7O6EFNQS.mjs";import"./chunk-3LRFPGYZ.mjs";import"./chunk-34SMB5PA.mjs";import"./chunk-GB6W4Q56.mjs";import"./chunk-AVY742BJ.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-KWUS7UAV.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-HZCS6EED.mjs";import"./chunk-NV5QA2HY.mjs";import"./chunk-EGL3I3IX.mjs";import"./chunk-CSMGP53U.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-YDXMTWAT.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-35B73566.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-PVZ72OOQ.mjs";import"./chunk-QIRO4HTE.mjs";import"./chunk-TYUYPFDJ.mjs";import"./chunk-TICZXC53.mjs";import"./chunk-DLSU66MY.mjs";import"./chunk-ATQML7ZK.mjs";import"./chunk-H6BHWAX7.mjs";import{I as se,L as re,i as ne}from"./chunk-4CSBZZAL.mjs";import{a as U,b as q}from"./chunk-AL4C3GFT.mjs";import"./chunk-GP5J3DGS.mjs";import"./chunk-5LFSFYFJ.mjs";import{a as Q}from"./chunk-WQCXOZEJ.mjs";import{r as Y}from"./chunk-OT2NHL2V.mjs";import"./chunk-ZVU7MD2S.mjs";import"./chunk-OLCS7JCT.mjs";import{f as G}from"./chunk-TQ6HEJ73.mjs";import{f as X}from"./chunk-65AMXOQU.mjs";import"./chunk-6HHSAPIM.mjs";import"./chunk-K5PUMHZU.mjs";import"./chunk-VV3B6IC3.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-EUIALBMX.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-Q7TLC3I2.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-ATBQIE2V.mjs";import"./chunk-UCUFLFNK.mjs";import"./chunk-MS4FJDFD.mjs";import"./chunk-4XROG5CT.mjs";import{b as z,c as Z,f as j,h as ie}from"./chunk-LCDPCUXS.mjs";import"./chunk-TQ2TQHTT.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-DAUX63UB.mjs";import"./chunk-SZOJ7BEJ.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-22L43JMK.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-ICIYL45C.mjs";import"./chunk-3KJCSYXY.mjs";import"./chunk-HDDJ3CVN.mjs";import"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";import{mkdtempSync as Ie,rmSync as Pe}from"node:fs";import{tmpdir as Ne}from"node:os";import{basename as xe,join as Ce}from"node:path";var _="sandforge-empty",Le=`sandforge empty \u2014 empty objects of a sandbox, or the whole of it, without the editor:
|
|
8
8
|
a dry run first, then the deletes, to the recycle bin with an undo, or for good.
|
|
9
9
|
|
|
10
10
|
Usage:
|
|
@@ -70,7 +70,7 @@ Options:
|
|
|
70
70
|
first delete, to rewind to (sandforge checkpoint);
|
|
71
71
|
refused past 500,000 records or the disk's room, and
|
|
72
72
|
then nothing is deleted
|
|
73
|
-
${
|
|
73
|
+
${ue("deleted","--dry-run")} --audit <file> add the run's entry, or the undo's, to the audit trail
|
|
74
74
|
kept in <file>: the entry the panel keeps in Reports ->
|
|
75
75
|
Audit trail, counts only. Not with --dry-run,
|
|
76
76
|
which adds none
|
|
@@ -124,17 +124,15 @@ Exit codes:
|
|
|
124
124
|
3 partial: records the org refused, each said with why
|
|
125
125
|
130, 143, 129 a Ctrl-C, a SIGTERM or a SIGHUP stopped it before its next
|
|
126
126
|
call or job: --resume takes it up, --undo brings back what it deleted
|
|
127
|
-
`,
|
|
128
|
-
`),process.exit(2)}function
|
|
127
|
+
`,Te={switches:["--org","--custom-settings","--files","--managed-packages","--unrestorable","--hard-delete","--dry-run","--yes","--json","--accept-no-undo","--accept-people-active","--checkpoint-first",...de],values:["--target","--objects","--exclude-object","--undo","--resume","--audit"]},_e=/^[A-Za-z][A-Za-z0-9_]{0,79}$/;function k(o){process.stderr.write(`${o} Run with --help.
|
|
128
|
+
`),process.exit(2)}function be(o,t){let e=[];for(let n=0;n<o.length;n++)o[n]===t&&o[n+1]!==void 0&&e.push(o[n+1]);return e}function Ue(o){let t=o.replace(/[\\/]+$/,""),e=xe(t);return he(e)?e:void 0}function qe(o){let t=o.slice(2);(t.includes("--help")||t.includes("-h"))&&(process.stdout.write(Le),process.exit(0)),z(t,Te);let e=h=>t.includes(h),n=h=>{let p=be(t,h);return p.length>1&&k(`${h} is given ${p.length} times: give it once.`),p[0]},r=n("--target");r===void 0&&k("--target <alias> names the org to empty."),Z.test(r)||k(`--target ${r} is not an sf CLI alias.`);let f=e("--json"),a=ce(t),l=n("--audit"),g={target:r,json:f,accord:a,...l!==void 0?{audit:l}:{},...e("--accept-people-active")?{acceptPeopleActive:!0}:{}},s=n("--undo"),d=n("--resume"),c=n("--objects"),y=be(t,"--exclude-object"),b=e("--org"),v=["--custom-settings","--files","--managed-packages","--unrestorable"].filter(e);if(s!==void 0||d!==void 0){let h=s!==void 0?"--undo":"--resume";s!==void 0&&d!==void 0&&k("--undo and --resume go apart."),s!==void 0&&e("--accept-people-active")&&k("--undo deletes nothing, and does not go with --accept-people-active.");let p=[...c!==void 0?["--objects"]:[],...b?["--org"]:[],...y.length>0?["--exclude-object"]:[],...v,...["--hard-delete","--accept-no-undo","--checkpoint-first","--dry-run"].filter(e)];p.length>0&&k(`${h} acts on what its run's journal holds, and does not go with ${p.join(", ")}.`);let E=s??d,I=Ue(E);return I===void 0&&k(`${h} ${E} names no emptying: give its id (em-...) or its journal's folder.`),e("--yes")||we(g,s!==void 0?"undo":"resume"),{act:s!==void 0?"undo":"resume",runId:I,...g}}if(c!==void 0&&b&&k("--objects and --org go apart: give one."),c===void 0&&!b&&k("Name the objects to empty with --objects <A,B>, or the whole org with --org."),!b){let h=[...y.length>0?["--exclude-object"]:[],...v];h.length>0&&k(`${h.join(", ")} goes with --org alone.`)}let D=c===void 0?void 0:c.split(",").map(h=>h.trim()).filter(h=>h!=="");D!==void 0&&D.length===0&&k("--objects names no object.");for(let h of[...D??[],...y])_e.test(h)||k(`${h} is not an object API name.`);let A=e("--dry-run"),R=e("--yes");return A&&R&&k("--dry-run and --yes go apart: a dry run deletes nothing."),!A&&!R&&we(g,"empty"),A&&l!==void 0&&k("--audit records a run: a dry run adds no entry."),{act:"empty",request:b?{mode:"org",...y.length>0?{excluded:[...new Set(y)]}:{},...e("--custom-settings")?{customSettings:!0}:{},...e("--files")?{files:!0}:{},...e("--managed-packages")?{managedPackages:!0}:{},...e("--unrestorable")?{unrestorable:!0}:{}}:{mode:"objects",objects:[...new Set(D??[])]},hard:e("--hard-delete"),dryRun:A,acceptNoUndo:e("--accept-no-undo"),checkpointFirst:e("--checkpoint-first"),...g}}function we(o,t){let e={code:"NOT_CONFIRMED",message:t==="empty"?`${q(_)} asks no question: add --dry-run to read what it would delete, or --yes to empty once the dry run said it. Nothing was read or deleted.`:`${q(_)} asks no question: add --yes to ${t==="undo"?"undo":"take up"} the emptying. Nothing was read or written.`};process.stderr.write(`${P(e)}
|
|
129
129
|
`),o.json&&process.stdout.write(`${JSON.stringify({tool:_,target:o.target,action:t,refused:e},null,2)}
|
|
130
|
-
`),process.exit(1)}var u=o=>o.toLocaleString("en-US");function $(o){if(o.records===void 0)return`not counted (${o.unread??"no count"})`;if(o.atMost&&o.atLeast)return`about ${u(o.records)}`;let t=o.atMost?" at most":o.atLeast?" at least":"";return`${u(o.records)}${t}`}var we={configuration:"configuration: flows, orchestrations, settings, definitions",notRestorable:"cannot come back from the recycle bin (--unrestorable empties them)",excludedByUser:"left out as asked",notFound:"the org has no such object",chatter:"Chatter",history:"field history",sharing:"sharing",changeEvent:"change events",unsupportedKind:"big, external or platform event object",customSetting:"a custom setting (--custom-settings empties them)",files:"files (--files empties them)",managedPackage:"a managed package (--managed-packages empties them)",documents:"documents",heldWithFiles:"goes with the files",setup:"setup",platformCreated:"made by the platform",metadata:"metadata",notDeletable:"the user may not delete its records",notDescribed:"the org would not describe it",noRecycleBin:"its records never go to the recycle bin",notForGood:"its records are never deleted for good"},qe={activatedOrder:"activated order(s): set back to Draft first, as Salesforce deletes none activated",activatedOrderLeft:"activated order(s) left as they are: what blocks keeps too many records to tell those under them apart, so none is set back to Draft, and what each hangs from is refused",standardPriceBook:"the standard price book: kept, never deleted",directContactRelation:"direct relation(s) of a contact to its account: they go with the contact",personAccountContact:"person account contact(s): left, as each goes only with its account"};function L(o,...t){let e=t.every(n=>n!==void 0)?t.reduce((n,r)=>n+(r??0),0):void 0;return o===void 0&&e===void 0?{}:{apiRequests:{...o!==void 0?{estimate:o}:{},...e!==void 0?{sent:e}:{}}}}var Be={NO_UNDO:"--accept-no-undo",PEOPLE_ACTIVE:"--accept-people-active"},Me=new Set(["TOO_MANY_RECORDS","NOTHING_HELD"]);function K(o,t){if(Me.has(o.code)||t!==void 0&&t.code===o.code&&t.message===o.message)return{...o,message:Oe(o.message)};let n=Be[o.code];return n&&!o.message.includes(n)?{...o,message:`${o.message} (${n} accepts it)`}:o}function Oe(o){let t=o.replace(/\s*No record was read( or written)?\.$/,"").replace(/: pick fewer objects\.$/,".").replace(/\.$/,"");return`The checkpoint first was refused: ${t.charAt(0).toLowerCase()}${t.slice(1)}. Empty fewer objects (--objects, or --exclude-object with --org), or leave out --checkpoint-first to empty without one.`}function De(o){return o.reason==="notRestorable"?`${o.objectApiName} sent by its own pass: Salesforce does not bring them back`:`${o.objectApiName} before ${o.parent??"its parent"}${o.field!==void 0?` (${o.field})`:""}: they go before a record they name`}function Fe(o,t){let{preview:e}=t,n=[],r=e.mode==="org"?"every object people work in":`${e.passes.length} object(s) picked`;n.push(`${q(_)} target=${o} ${r} ${e.deleteMode==="hard"?"FOR GOOD":"to the recycle bin"}`),n.push(`read at ${t.readAt} on the org's clock: records made after it are left`),n.push(`${e.total.atLeast?"at least ":""}${u(e.total.records)} record(s) of ${u(e.total.objects)} object(s)`+(e.total.uncounted.length>0?`, and ${e.total.uncounted.join(", ")} not counted`:""));let f=e.passes.filter(s=>s.records.records===void 0||s.records.records>0);if(e.passes.length>0){n.push("","Emptied, in the order the run takes them:");for(let d of f){let c=d.sent.records!==d.records.records?`, ${$(d.sent)} sent by its own pass`:"",y=d.archived?.records?`, ${$(d.archived)} archived`:"",b=d.kept?.records?`, ${$(d.kept)} kept`:"",v=d.blocked?`, ${$(d.blocked)} kept by what blocks them, which stay`:"";n.push(` ${d.objectApiName.padEnd(40)} ${$(d.records)}${c}${y}${b}${v}`)}let s=e.passes.length-f.length;s>0&&n.push(` and ${u(s)} object(s) holding no record (--json lists them)`)}if(e.along.length>0){n.push("","Going along, deleted by the org with a record emptied:");for(let s of e.along){let d=[...new Set(s.via.map(b=>`${b.field} \u2192 ${b.parent}`))].join(", "),c=s.blocking?`; ${$(s.blocking)} more block the delete and stay`:"",y=s.routesNotRead?.length?`; routes through ${s.routesNotRead.join(", ")} not read, there may be more`:"";n.push(` ${s.objectApiName.padEnd(40)} ${$(s.records)}${d?` (${d})`:""}${c}${y}`)}}let i=e.refusals.filter(s=>s.records.records!==0);if(i.length>0){n.push("","Likely refused by the org, or done first so that it is not:");for(let s of i)n.push(` ${s.objectApiName}: ${$(s.records)} \u2014 ${qe[s.code]}`)}let l=e.blockers.filter(s=>s.records.records!==0);if(l.length>0){n.push("","Blocking: records of objects not emptied whose lookup refuses the delete; they stay, and so do the records they name, with what hangs from those:");for(let s of l){let d=s.keeps&&s.keeps.records!==0?`, keeping ${$(s.keeps)} ${s.parent}`:"";n.push(` ${s.objectApiName}.${s.field} \u2192 ${s.parent}: ${$(s.records)}${d}`)}}let g=e.undoLost.filter(s=>s.records.records!==0);if(e.deleteMode==="recycle"&&g.length>0){n.push("","Undo cannot bring back:");for(let s of g)n.push(` ${De(s)}: ${$(s.records)}`)}if(e.leftOut.length>0){let s=c=>e.mode==="objects"||c==="excludedByUser"||c==="notFound",d=new Map;n.push("",`Left out: ${u(e.leftOut.length)} object(s)`);for(let c of e.leftOut)s(c.reason)?n.push(` ${c.objectApiName}: ${we[c.reason]}`):d.set(c.reason,(d.get(c.reason)??0)+1);for(let[c,y]of d)n.push(` ${u(y)} object(s): ${we[c]}`)}if(n.push("",...We(t)),n.push(...He(t)),t.checkpoint){let{estimate:s,objects:d,refusal:c}=t.checkpoint;n.push(c?`checkpoint first: refused (${c.code}): ${Oe(c.message)}`:`checkpoint first: ${u(d.length)} object(s), about ${u(s.records)} record(s) and ${u(s.apiRequests)} API request(s), taken before the first delete`)}return t.openRun&&n.push(`the last emptying of ${o}, ${t.openRun.runId}, stopped part way: --resume ${t.openRun.runId} takes it up, --undo ${t.openRun.runId} brings back what it deleted`),t.automation.lines.length>0&&n.push("",...t.automation.lines),n}function We(o){let{cost:t}=o.preview,e=r=>r.verdict==="unread"?` (what the org has left today could not be read: ${r.unread})`:` of ${u(r.remaining)} left today${r.verdict==="exceeds"?": too many":""}`,n=[`about ${u(t.api.estimate)} API request(s), the dry run's reads and the run's together${e(t.api)}, ${u(t.bulkBatches)} Bulk API batch(es)`+(t.batches?e(t.batches):"")+`, about ${u(Math.ceil(t.seconds))} s`];return o.preview.deleteMode==="recycle"?n.push(`${u(t.binRecords)} record(s) to the recycle bin`+(t.bin?.past?`: past the ${u(t.bin.documentedCapacity)} the bin is documented to hold, it empties its oldest first, colleagues\u2019 deletions among them, and Undo may not bring all back`:"")):n.push("deleted for good, with what goes along: no undo brings anything back"),n}function He(o){let t=[];if(o.access.kind==="org")t.push("the user sees every record: View All Data and Modify All Data");else{t.push("the user holds "+(o.access.viewAllData?"View All Data":"no View All Data")+" and "+(o.access.modifyAllData?"Modify All Data":"no Modify All Data")+": the records of an object it is not proven to see whole are neither counted nor deleted, but those a deleted parent takes along are");for(let e of o.access.unseen)t.push(` not proven to see ${e.objectApiName} whole: ${e.reason}`)}if(o.preview.deleteMode==="hard"&&t.push(o.hardDelete.permitted?"the user holds Bulk API Hard Delete":`the user does not hold Bulk API Hard Delete${o.hardDelete.unread?` (${o.hardDelete.unread})`:""}`),o.peopleActive.people>0){t.push(`${o.peopleActive.atLeast?"at least ":""}${u(o.peopleActive.people)} other person(s) changed records of these objects in the hour before the read: their work goes with the emptying, which --accept-people-active accepts`);for(let e of o.peopleActive.who??[])t.push(` user ${e.userId}: ${u(e.records)} record(s), the last changed at ${e.lastChangedAt||"an unread time"}`)}return t}function ke(o,t){if(t.runId==="")return t.notes;let e=[`${t.resumed?"took up":"emptied"} ${o}: ${t.runId}, ${t.status}`+(t.hard?", for good":"")],n=t.passes.filter(i=>i.deleted+i.gone+i.refused+(i.notReached??0)+(i.madeSince??0)>0||i.reasons.length>0);for(let i of n){let l=[`deleted ${u(i.deleted)}`,...i.gone>0?[`gone before ${u(i.gone)}`]:[],...i.refused>0?[`refused ${u(i.refused)}`]:[],...(i.notReached??0)>0?[`not reached ${u(i.notReached??0)}`]:[],...(i.madeSince??0)>0?[`made since and left ${u(i.madeSince??0)}`]:[]];e.push(` ${i.objectApiName.padEnd(40)} ${l.join(", ")}`);for(let g of i.reasons)e.push(` ${g}`)}let r=t.passes.length-n.length;r>0&&e.push(` and ${u(r)} object(s) whose pass found nothing to delete (--json lists them)`);let{totals:f}=t;e.push(`deleted ${u(f.deleted)} record(s), ${u(f.gone)} gone before their delete, ${u(f.refused)} refused, ${u(f.notReached)} not reached`),t.hardRefused&&e.push(`the org refused to delete for good: ${t.hardRefused}`),t.checkpoint?.state==="taken"?e.push(`checkpoint taken first: ${t.checkpoint.name} (${t.checkpoint.checkpointId}); ${U("checkpoint")} rewind --org ${o} --checkpoint ${t.checkpoint.checkpointId} returns the objects it holds to it`):t.checkpoint?.state==="deleted"&&e.push("the checkpoint taken first was deleted again: the run deleted nothing");for(let i of t.notes)e.push(i);return t.status==="cancelled"||t.status==="failure"?e.push(`${U("empty")} --target ${o} --resume ${t.runId} --yes takes it up; --undo ${t.runId} --yes brings back what it deleted`):t.undo.offered?e.push(`${U("empty")} --target ${o} --undo ${t.runId} --yes brings them back while the recycle bin holds them, as long as no other emptying of the org follows`):t.undo.why==="hard"&&e.push("no undo: it deleted for good"),e}function Ge(o,t){let e=[`undid the emptying ${t.runId} of ${o}: ${t.status}`];for(let r of t.objects){let f=[`brought back ${u(r.undeleted)}`,...r.alreadyBack>0?[`already back ${u(r.alreadyBack)}`]:[],...r.notInBin>0?[`no longer in the recycle bin ${u(r.notInBin)}`]:[],...r.othersDeletion>0?[`deleted by another user, Modify All Data needed ${u(r.othersDeletion)}`]:[],...r.refused>0?[`refused ${u(r.refused)}`]:[],...(r.notReached??0)>0?[`not reached ${u(r.notReached??0)}`]:[]];e.push(` ${r.objectApiName.padEnd(40)} ${f.join(", ")}`);for(let i of r.reasons)e.push(` ${i}`)}let n=t.previewedLost??[];if(n.length>0){e.push("not brought back, as the preview said Undo could not:");for(let r of n)e.push(` ${De(r)}: ${$(r.records)}`)}for(let r of t.notes)e.push(r);return e}function J(o,t){return o==="success"?0:o==="partial"?3:o==="cancelled"?t!==void 0?H(t):1:1}var Je=60*6e4,$e=720*6e4,Re="dataops",O=class extends Error{constructor(e,n=1,r=[]){super(e.message);this.refusal=e;this.code=n;this.also=r;this.name="Stop"}refusal;code;also};function T(o){return o.message?.payload??{}}function V(o,t,e){if(o.outcome==="unanswered")return new O({code:"UNANSWERED",message:`${t}: no answer came in time.`});let n=T(o),r=typeof n.message=="string"?n.message:JSON.stringify(n),f=typeof n.code=="string"?n.code:o.outcome.toUpperCase(),i=Array.isArray(n.alsoRefused)?n.alsoRefused.flatMap(l=>{let g=l??{};return typeof g.code=="string"&&typeof g.message=="string"?[{code:g.code,message:g.message}]:[]}):[];return e!==void 0&&f==="CANCELLED"?new O({code:f,message:r},H(e)):new O(K({code:f,message:r}),1,i.map(l=>K(l)))}async function ve(o,t,e){let n,r=o.onEvent((i,l,g)=>{n!==void 0&&l==="started"&&g.module===Re&&o.abort(i)}),f=ee(i=>{n=i,process.stderr.write(`
|
|
131
|
-
interrupted: ${t} (Ctrl-C again ends it at once)
|
|
132
|
-
`);for(let l of o.getRunning())l.module===Re&&o.abort(l.operationId)});try{let i=await e();return n!==void 0?{answer:i,stoppedBy:n}:{answer:i}}finally{f(),r()}}async function Ve(o,t,e){if(o.act==="empty")return o.request.mode==="org";if(o.act!=="resume")return!1;try{return(await t.open(e.orgId,o.runId)).head.mode==="org"}catch{return!1}}async function Ke(o=process.argv,t={}){let e=Ue(o),n=d=>{process[e.json?"stderr":"stdout"].write(`${d}
|
|
130
|
+
`),process.exit(1)}var u=o=>o.toLocaleString("en-US");function $(o){if(o.records===void 0)return`not counted (${o.unread??"no count"})`;if(o.atMost&&o.atLeast)return`about ${u(o.records)}`;let t=o.atMost?" at most":o.atLeast?" at least":"";return`${u(o.records)}${t}`}var ke={configuration:"configuration: flows, orchestrations, settings, definitions",notRestorable:"cannot come back from the recycle bin (--unrestorable empties them)",excludedByUser:"left out as asked",notFound:"the org has no such object",chatter:"Chatter",history:"field history",sharing:"sharing",changeEvent:"change events",unsupportedKind:"big, external or platform event object",customSetting:"a custom setting (--custom-settings empties them)",files:"files (--files empties them)",managedPackage:"a managed package (--managed-packages empties them)",documents:"documents",heldWithFiles:"goes with the files",setup:"setup",platformCreated:"made by the platform",metadata:"metadata",notDeletable:"the user may not delete its records",notDescribed:"the org would not describe it",noRecycleBin:"its records never go to the recycle bin",notForGood:"its records are never deleted for good"},Be={activatedOrder:"activated order(s): set back to Draft first, as Salesforce deletes none activated",activatedOrderLeft:"activated order(s) left as they are: what blocks keeps too many records to tell those under them apart, so none is set back to Draft, and what each hangs from is refused",standardPriceBook:"the standard price book: kept, never deleted",directContactRelation:"direct relation(s) of a contact to its account: they go with the contact",personAccountContact:"person account contact(s): left, as each goes only with its account"};function L(o,...t){let e=t.every(n=>n!==void 0)?t.reduce((n,r)=>n+(r??0),0):void 0;return o===void 0&&e===void 0?{}:{apiRequests:{...o!==void 0?{estimate:o}:{},...e!==void 0?{sent:e}:{}}}}var Me={NO_UNDO:"--accept-no-undo",PEOPLE_ACTIVE:"--accept-people-active"},Fe=new Set(["TOO_MANY_RECORDS","NOTHING_HELD"]);function K(o,t){if(Fe.has(o.code)||t!==void 0&&t.code===o.code&&t.message===o.message)return{...o,message:De(o.message)};let n=Me[o.code];return n&&!o.message.includes(n)?{...o,message:`${o.message} (${n} accepts it)`}:o}function De(o){let t=o.replace(/\s*No record was read( or written)?\.$/,"").replace(/: pick fewer objects\.$/,".").replace(/\.$/,"");return`The checkpoint first was refused: ${t.charAt(0).toLowerCase()}${t.slice(1)}. Empty fewer objects (--objects, or --exclude-object with --org), or leave out --checkpoint-first to empty without one.`}function je(o){return o.reason==="notRestorable"?`${o.objectApiName} sent by its own pass: Salesforce does not bring them back`:`${o.objectApiName} before ${o.parent??"its parent"}${o.field!==void 0?` (${o.field})`:""}: they go before a record they name`}function We(o,t){let{preview:e}=t,n=[],r=e.mode==="org"?"every object people work in":`${e.passes.length} object(s) picked`;n.push(`${q(_)} target=${o} ${r} ${e.deleteMode==="hard"?"FOR GOOD":"to the recycle bin"}`),n.push(`read at ${t.readAt} on the org's clock: records made after it are left`),n.push(`${e.total.atLeast?"at least ":""}${u(e.total.records)} record(s) of ${u(e.total.objects)} object(s)`+(e.total.uncounted.length>0?`, and ${e.total.uncounted.join(", ")} not counted`:""));let f=e.passes.filter(s=>s.records.records===void 0||s.records.records>0);if(e.passes.length>0){n.push("","Emptied, in the order the run takes them:");for(let d of f){let c=d.sent.records!==d.records.records?`, ${$(d.sent)} sent by its own pass`:"",y=d.archived?.records?`, ${$(d.archived)} archived`:"",b=d.kept?.records?`, ${$(d.kept)} kept`:"",v=d.blocked?`, ${$(d.blocked)} kept by what blocks them, which stay`:"";n.push(` ${d.objectApiName.padEnd(40)} ${$(d.records)}${c}${y}${b}${v}`)}let s=e.passes.length-f.length;s>0&&n.push(` and ${u(s)} object(s) holding no record (--json lists them)`)}if(e.along.length>0){n.push("","Going along, deleted by the org with a record emptied:");for(let s of e.along){let d=[...new Set(s.via.map(b=>`${b.field} \u2192 ${b.parent}`))].join(", "),c=s.blocking?`; ${$(s.blocking)} more block the delete and stay`:"",y=s.routesNotRead?.length?`; routes through ${s.routesNotRead.join(", ")} not read, there may be more`:"";n.push(` ${s.objectApiName.padEnd(40)} ${$(s.records)}${d?` (${d})`:""}${c}${y}`)}}let a=e.refusals.filter(s=>s.records.records!==0);if(a.length>0){n.push("","Likely refused by the org, or done first so that it is not:");for(let s of a)n.push(` ${s.objectApiName}: ${$(s.records)} \u2014 ${Be[s.code]}`)}let l=e.blockers.filter(s=>s.records.records!==0);if(l.length>0){n.push("","Blocking: records of objects not emptied whose lookup refuses the delete; they stay, and so do the records they name, with what hangs from those:");for(let s of l){let d=s.keeps&&s.keeps.records!==0?`, keeping ${$(s.keeps)} ${s.parent}`:"";n.push(` ${s.objectApiName}.${s.field} \u2192 ${s.parent}: ${$(s.records)}${d}`)}}let g=e.undoLost.filter(s=>s.records.records!==0);if(e.deleteMode==="recycle"&&g.length>0){n.push("","Undo cannot bring back:");for(let s of g)n.push(` ${je(s)}: ${$(s.records)}`)}if(e.leftOut.length>0){let s=c=>e.mode==="objects"||c==="excludedByUser"||c==="notFound",d=new Map;n.push("",`Left out: ${u(e.leftOut.length)} object(s)`);for(let c of e.leftOut)s(c.reason)?n.push(` ${c.objectApiName}: ${ke[c.reason]}`):d.set(c.reason,(d.get(c.reason)??0)+1);for(let[c,y]of d)n.push(` ${u(y)} object(s): ${ke[c]}`)}if(n.push("",...He(t)),n.push(...Ge(t)),t.checkpoint){let{estimate:s,objects:d,refusal:c}=t.checkpoint;n.push(c?`checkpoint first: refused (${c.code}): ${De(c.message)}`:`checkpoint first: ${u(d.length)} object(s), about ${u(s.records)} record(s) and ${u(s.apiRequests)} API request(s), taken before the first delete`)}return t.openRun&&n.push(`the last emptying of ${o}, ${t.openRun.runId}, stopped part way: --resume ${t.openRun.runId} takes it up, --undo ${t.openRun.runId} brings back what it deleted`),t.automation.lines.length>0&&n.push("",...t.automation.lines),n}function He(o){let{cost:t}=o.preview,e=r=>r.verdict==="unread"?` (what the org has left today could not be read: ${r.unread})`:` of ${u(r.remaining)} left today${r.verdict==="exceeds"?": too many":""}`,n=[`about ${u(t.api.estimate)} API request(s), the dry run's reads and the run's together${e(t.api)}, ${u(t.bulkBatches)} Bulk API batch(es)`+(t.batches?e(t.batches):"")+`, about ${u(Math.ceil(t.seconds))} s`];return o.preview.deleteMode==="recycle"?n.push(`${u(t.binRecords)} record(s) to the recycle bin`+(t.bin?.past?`: past the ${u(t.bin.documentedCapacity)} the bin is documented to hold, it empties its oldest first, colleagues\u2019 deletions among them, and Undo may not bring all back`:"")):n.push("deleted for good, with what goes along: no undo brings anything back"),n}function Ge(o){let t=[];if(o.access.kind==="org")t.push("the user sees every record: View All Data and Modify All Data");else{t.push("the user holds "+(o.access.viewAllData?"View All Data":"no View All Data")+" and "+(o.access.modifyAllData?"Modify All Data":"no Modify All Data")+": the records of an object it is not proven to see whole are neither counted nor deleted, but those a deleted parent takes along are");for(let e of o.access.unseen)t.push(` not proven to see ${e.objectApiName} whole: ${e.reason}`)}if(o.preview.deleteMode==="hard"&&t.push(o.hardDelete.permitted?"the user holds Bulk API Hard Delete":`the user does not hold Bulk API Hard Delete${o.hardDelete.unread?` (${o.hardDelete.unread})`:""}`),o.peopleActive.people>0){t.push(`${o.peopleActive.atLeast?"at least ":""}${u(o.peopleActive.people)} other person(s) changed records of these objects in the hour before the read: their work goes with the emptying, which --accept-people-active accepts`);for(let e of o.peopleActive.who??[])t.push(` user ${e.userId}: ${u(e.records)} record(s), the last changed at ${e.lastChangedAt||"an unread time"}`)}return t}function $e(o,t){if(t.runId==="")return t.notes;let e=[`${t.resumed?"took up":"emptied"} ${o}: ${t.runId}, ${t.status}`+(t.hard?", for good":"")],n=t.passes.filter(a=>a.deleted+a.gone+a.refused+(a.notReached??0)+(a.madeSince??0)>0||a.reasons.length>0);for(let a of n){let l=[`deleted ${u(a.deleted)}`,...a.gone>0?[`gone before ${u(a.gone)}`]:[],...a.refused>0?[`refused ${u(a.refused)}`]:[],...(a.notReached??0)>0?[`not reached ${u(a.notReached??0)}`]:[],...(a.madeSince??0)>0?[`made since and left ${u(a.madeSince??0)}`]:[]];e.push(` ${a.objectApiName.padEnd(40)} ${l.join(", ")}`);for(let g of a.reasons)e.push(` ${g}`)}let r=t.passes.length-n.length;r>0&&e.push(` and ${u(r)} object(s) whose pass found nothing to delete (--json lists them)`);let{totals:f}=t;e.push(`deleted ${u(f.deleted)} record(s), ${u(f.gone)} gone before their delete, ${u(f.refused)} refused, ${u(f.notReached)} not reached`),t.hardRefused&&e.push(`the org refused to delete for good: ${t.hardRefused}`),t.checkpoint?.state==="taken"?e.push(`checkpoint taken first: ${t.checkpoint.name} (${t.checkpoint.checkpointId}); ${U("checkpoint")} rewind --org ${o} --checkpoint ${t.checkpoint.checkpointId} returns the objects it holds to it`):t.checkpoint?.state==="deleted"&&e.push("the checkpoint taken first was deleted again: the run deleted nothing");for(let a of t.notes)e.push(a);return t.status==="cancelled"||t.status==="failure"?e.push(`${U("empty")} --target ${o} --resume ${t.runId} --yes takes it up; --undo ${t.runId} --yes brings back what it deleted`):t.undo.offered?e.push(`${U("empty")} --target ${o} --undo ${t.runId} --yes brings them back while the recycle bin holds them, as long as no other emptying of the org follows`):t.undo.why==="hard"&&e.push("no undo: it deleted for good"),e}function Je(o,t){let e=[`undid the emptying ${t.runId} of ${o}: ${t.status}`];for(let r of t.objects){let f=[`brought back ${u(r.undeleted)}`,...r.alreadyBack>0?[`already back ${u(r.alreadyBack)}`]:[],...r.notInBin>0?[`no longer in the recycle bin ${u(r.notInBin)}`]:[],...r.othersDeletion>0?[`deleted by another user, Modify All Data needed ${u(r.othersDeletion)}`]:[],...r.refused>0?[`refused ${u(r.refused)}`]:[],...(r.notReached??0)>0?[`not reached ${u(r.notReached??0)}`]:[]];e.push(` ${r.objectApiName.padEnd(40)} ${f.join(", ")}`);for(let a of r.reasons)e.push(` ${a}`)}let n=t.previewedLost??[];if(n.length>0){e.push("not brought back, as the preview said Undo could not:");for(let r of n)e.push(` ${je(r)}: ${$(r.records)}`)}for(let r of t.notes)e.push(r);return e}function J(o,t){return o==="success"?0:o==="partial"?3:o==="cancelled"?t!==void 0?H(t):1:1}var Ve=60*6e4,Re=720*6e4,ve="dataops",O=class extends Error{constructor(e,n=1,r=[]){super(e.message);this.refusal=e;this.code=n;this.also=r;this.name="Stop"}refusal;code;also};function T(o){return o.message?.payload??{}}function V(o,t,e){if(o.outcome==="unanswered")return new O({code:"UNANSWERED",message:`${t}: no answer came in time.`});let n=T(o),r=typeof n.message=="string"?n.message:JSON.stringify(n),f=typeof n.code=="string"?n.code:o.outcome.toUpperCase(),a=Array.isArray(n.alsoRefused)?n.alsoRefused.flatMap(l=>{let g=l??{};return typeof g.code=="string"&&typeof g.message=="string"?[{code:g.code,message:g.message}]:[]}):[];return e!==void 0&&f==="CANCELLED"?new O({code:f,message:r},H(e)):new O(K({code:f,message:r}),1,a.map(l=>K(l)))}async function Ae(o,t,e){let n,r=o.onEvent((a,l,g)=>{n!==void 0&&l==="started"&&g.module===ve&&o.abort(a)}),f=te(a=>{n=a,ee(t,a);for(let l of o.getRunning())l.module===ve&&o.abort(l.operationId)});try{let a=await e();return n!==void 0?{answer:a,stoppedBy:n}:{answer:a}}finally{f(),r()}}async function Ke(o,t,e){if(o.act==="empty")return o.request.mode==="org";if(o.act!=="resume")return!1;try{return(await t.open(e.orgId,o.runId)).head.mode==="org"}catch{return!1}}async function Xe(o=process.argv,t={}){let e=qe(o),n=d=>{process[e.json?"stderr":"stdout"].write(`${d}
|
|
133
131
|
`)},r=d=>{e.json&&process.stdout.write(`${JSON.stringify({tool:_,target:e.target,action:e.act,...d},null,2)}
|
|
134
|
-
`)},f=
|
|
135
|
-
`);for(let
|
|
136
|
-
`);r({...I,...L(B,A(),p.requestsSent),refused:M,...F.length>0?{alsoRefused:F}:{}}),j(1);return}let x=await
|
|
132
|
+
`)},f=Ie(Ce(Ne(),"sandforge-empty-")),a=new ye,l,g,s;try{let d=t.checkpointRoot??ne(),c=re({root:d,...t.locksDir!==void 0?{locksDir:t.locksDir}:{}});if("refusal"in c)throw new O({code:"STORE_REFUSED",message:`The org's lock and a checkpoint taken first cannot be kept in ${c.refusal.path}: ${se(c.refusal,d,"SANDFORGE_JOURNAL_DIR=<folder>")} Nothing was read or deleted.`});let y=c.store,b=new ge(t.journalRoot??fe()),v=(t.createHost??me)({storeDir:f,log:i=>{i.startsWith("[WARN] ")&&n(`warning: ${i.slice(7)}`)},compose:i=>{l=i.configStore,g=i,i.handlers.setCheckpointStore(y),i.handlers.setEmptyStores({journals:b,lock:m=>y.lock(m,"empty")}),i.handlers.setInfraServices({backgroundRegistry:a,productionGuard:pe(n,e.target)})},onPost:i=>{if(i.type!=="operation:progress")return;let m=i.payload?.currentStep;typeof m!="string"||m===s||(s=m,n(` ${m}`))}}),D=()=>0,A=()=>(v.connectingRequests?.()??0)+D(),R;try{R=await v.connect(e.target)}catch(i){throw new O({code:"NOT_CONNECTED",message:i instanceof Q?`${i.reason} Nothing was read or deleted.`:`${e.target} could not be reached: ${i instanceof Error?i.message:String(i)}. Nothing was read or deleted.`})}let N={...e.accord};if(await Ke(e,b,R)){let i=g,m=await le({target:e.target,orgType:R.orgType,limits:async()=>{if(!i)throw new Error("the host built no registry");let w=await Y(R.id,i.orgRegistry,i.orgManager);return D=X(w),w.request({method:"GET",url:"/limits"})}});if(m)throw new O(m)}if(e.act!=="empty"){let i=e.act==="undo";n(i?`undo the emptying ${e.runId} of ${e.target}: bring back what it deleted, parents first`:`take up the emptying ${e.runId} of ${e.target} where it stopped`);let m=await Ae(a,i?"the undo stops before its next call to the org: --undo again takes up what it left":"the run stops before its next call or job, and keeps its journal: --resume takes it up",()=>v.request({type:i?"dataops:empty:undo":"dataops:empty:run",payload:i?{orgId:R.id,runId:e.runId,...N}:{orgId:R.id,resumeRunId:e.runId,...N,...e.acceptPeopleActive?{acceptPeopleActive:!0}:{}},timeoutMs:Re}));if(Ee(l,e.audit),m.answer.outcome!=="answered")throw V(m.answer,i?"The undo":"The run",m.stoppedBy);if(i){let w=T(m.answer).result;for(let W of Je(e.target,w))n(W);r({runId:e.runId,result:w,...L(w.requestsEstimate,A(),w.requestsSent)}),j(J(w.status,m.stoppedBy))}else{let w=T(m.answer).result;for(let W of $e(e.target,w))n(W);r({runId:e.runId,result:w,...L(w.requestsEstimate,A(),w.requestsSent)}),j(J(w.status,m.stoppedBy))}return}let h=await v.request({type:"dataops:empty:preview",payload:{orgId:R.id,request:e.request,deleteMode:e.hard?"hard":"recycle",...e.acceptNoUndo?{acceptNoUndo:!0}:{},...e.acceptPeopleActive?{acceptPeopleActive:!0}:{},...e.checkpointFirst?{checkpointFirst:!0}:{},...N},timeoutMs:Ve});if(h.outcome!=="answered")throw V(h,"The dry run");let p=T(h);for(let i of We(e.target,p))n(i);let E=p.refusals.map(i=>K(i,p.checkpoint?.refusal)),I={dryRun:e.dryRun,previewId:p.previewId,readAt:p.readAt,tier:p.tier,preview:p.preview,access:p.access,hardDelete:p.hardDelete,peopleActive:p.peopleActive,...p.checkpoint?{checkpoint:p.checkpoint}:{},...p.openRun?{openRun:p.openRun}:{},automation:p.automation},B=p.preview.cost.api.estimate;if(e.dryRun){for(let i of E)n(` ${oe(i)}`);E.length===0&&n(" a real run would not be refused"),r({...I,...L(B,A(),p.requestsSent),...E.length>0?{wouldBeRefused:E.map(i=>i.message),wouldBeRefusedCodes:E.map(i=>i.code)}:{}}),j(E.length>0?1:0);return}let[M,...F]=E;if(M){process.stderr.write(`${P(M)}
|
|
133
|
+
`);for(let i of F)process.stderr.write(`${P(i)}
|
|
134
|
+
`);r({...I,...L(B,A(),p.requestsSent),refused:M,...F.length>0?{alsoRefused:F}:{}}),j(1);return}let x=await Ae(a,"the run stops before its next call or job, and keeps its journal: --resume takes it up, --undo brings back what it deleted",()=>v.request({type:"dataops:empty:run",payload:{orgId:R.id,previewId:p.previewId,...e.acceptNoUndo?{acceptNoUndo:!0}:{},...e.acceptPeopleActive?{acceptPeopleActive:!0}:{},...e.checkpointFirst?{checkpointFirst:!0}:{},...N},timeoutMs:Re}));if(Ee(l,e.audit),x.answer.outcome!=="answered")throw V(x.answer,"The run",x.stoppedBy);let C=T(x.answer).result;for(let i of $e(e.target,C))n(i);C.runId!==""&&n(`journal: ${b.root}`),r({...I,...L(B,A(),p.requestsSent,C.requestsSent),result:C}),j(J(C.status,x.stoppedBy))}catch(d){let c=d instanceof O?d:new O({code:"FAILED",message:d instanceof Error?d.message:String(d)});process.stderr.write(`${P(c.refusal)}
|
|
137
135
|
`);for(let y of c.also)process.stderr.write(`${P(y)}
|
|
138
|
-
`);r({refused:c.refusal,...c.also.length>0?{alsoRefused:[...c.also]}:{}}),j(c.code)}finally{
|
|
139
|
-
`)}}process.argv[1]?.includes("sandforge-empty")&&(
|
|
140
|
-
`),process.exit(1)}));export{L as apiRequestsJson,J as emptyExitCode,
|
|
136
|
+
`);r({refused:c.refusal,...c.also.length>0?{alsoRefused:[...c.also]}:{}}),j(c.code)}finally{a.dispose(),Pe(f,{recursive:!0,force:!0})}}function Ee(o,t){if(!(t===void 0||o===void 0))try{let e=new G(ae(t)),n=new G(o).list({limit:1e3}).entries;for(let r of[...n].reverse())e.append(r)}catch(e){process.stderr.write(`The entry could not be added to the audit trail in ${t} (${e instanceof Error?e.message:String(e)}).
|
|
137
|
+
`)}}process.argv[1]?.includes("sandforge-empty")&&(ie(),Xe().then(()=>process.exit(process.exitCode??0)).catch(o=>{process.stderr.write(`${o instanceof Error?o.message:String(o)}
|
|
138
|
+
`),process.exit(1)}));export{L as apiRequestsJson,J as emptyExitCode,Xe as main,qe as parseArgs,We as previewLines,K as refusalWords,Ue as runIdOf,$e as runLines,Je as undoLines};
|