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
|
@@ -4,6 +4,6 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a as u,b as a,c as h,d as g,e as l,f as m}from"./chunk-
|
|
7
|
+
import{a as u,b as a,c as h,d as g,e as l,f as m}from"./chunk-CT324C7I.mjs";import{k as p}from"./chunk-4CSBZZAL.mjs";import{randomBytes as R}from"node:crypto";import{mkdir as v,open as O,readdir as w,rename as S,rm as $}from"node:fs/promises";import{homedir as b}from"node:os";import{dirname as x,join as f,resolve as k}from"node:path";var E=448,D=384,A="_recovery",I="Back into service",T=/^(\d{8}T\d{9}Z)-(00D[A-Za-z0-9]{15})\.md$/;function J(e=process.env){let t=e.SANDFORGE_JOURNAL_DIR;return t!==void 0&&t.trim()!==""?k(t):f(b(),".sandforge")}function y(e){return f(k(e),"handoff",A)}function M(e,t){let n=new Date(t.at).toISOString().replace(/[-:.]/g,"");return f(y(e),`${n}-${p(t.organizationId)}.md`)}function _(e){return`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}T${e.slice(9,11)}:${e.slice(11,13)}:${e.slice(13,15)}.${e.slice(15,18)}Z`}async function F(e,t){let n=p(t),o=y(e),i;try{i=await w(o)}catch(r){let s=r?.code;if(s==="ENOENT"||s==="ENOTDIR")return;throw r}let c=i.flatMap(r=>{let s=T.exec(r);return s?.[1]!==void 0&&s[2]===n?[{stamp:s[1],name:r}]:[]}).sort((r,s)=>r.stamp<s.stamp?-1:1).at(-1);return c!==void 0?{at:_(c.stamp),path:f(o,c.name)}:void 0}async function W(e,t){return(await F(e,t))?.at}var H={refresh:"Refresh noticed",users:"Users",masking:"Masking of the data copied from production",replay:"Replay of the checkpoint of before",frozen:"Frozen dataset loaded",testersCheckpoint:"Testers' starting checkpoint",deliverability:"Email deliverability",scheduledJobs:"Scheduled jobs",endpoints:"Endpoints that still name production",handoff:"Handoff note"},N={refreshDetected:"noticed",ranAfterRefresh:"ran on the sandbox since its refresh",markedDone:"checked and marked done",ready:"kept",toDo:"to do",skipped:"skipped",noRefreshDetected:"no refresh was noticed",nothingCopied:"nothing of production was copied into this sandbox",noCheckpointBefore:"no checkpoint of the sandbox was taken before its refresh",noManifest:"no frozen dataset is kept on this machine",noInventoryBefore:"no inventory of its jobs was kept before the refresh",noUserToBringBack:"no user is under .invalid, frozen or inactive",stagingSandbox:"the sandbox is marked Staging"},B={todo:"to do",done:"done",skipped:"skipped",notApplicable:"not applicable",refused:"refused"};function z(e,t,n){let o=[B[e.status]];return e.status!=="todo"&&e.status!=="skipped"&&o.push(N[e.reason]),e.at!==void 0&&o.push(a(e.at)),e.id==="users"&&n.lastUsersRun!==void 0&&o.push(`last run ${n.lastUsersRun.run}, ${n.lastUsersRun.status}`+(n.lastUsersRun.takenBack===!0?", taken back by its removal":"")),e.id==="replay"&&n.checkpointBefore!==void 0&&o.push(`checkpoint ${u(n.checkpointBefore.name)} of ${a(n.checkpointBefore.takenAt)}`),`${t+1}. ${H[e.id]}: ${o.join(", ")}.`}function Y(e){let{status:t,org:n}=e,o=t.refresh,i=o!==void 0?`- Refresh: noticed ${a(o.detectedAt)}`+(o.previousOrganizationId!==void 0?`; the sandbox was ${u(o.previousOrganizationId)} before.`:"."):"- Refresh: none was noticed; the steps are of the org the sandbox is.",d=t.steps.find(r=>r.id==="testersCheckpoint");return`${[h(I,n),"","## Sandbox","",g(n),i,`- Written: ${a(e.at)}`+(e.sandforgeVersion!==void 0?`, by SandForge ${e.sandforgeVersion}`:"")+`; ${t.done} of ${t.total} steps done.`,"","## Steps","",...t.steps.map((r,s)=>z(r,s,t)),"","## Testers' starting point","",d?.status==="done"&&d.at!==void 0?`- A checkpoint of the sandbox taken ${a(d.at)}: what the testers start from, and what a rewind takes it back to.`:"- No checkpoint of the sandbox was taken since its refresh: take one before the testers start, to rewind to.","",...l(e.audits,{endpoints:"step 9 of Back into service lists those that still name production.",schedules:"step 8 of Back into service compares them with their inventory."}),"",...m()].join(`
|
|
8
8
|
`)}
|
|
9
9
|
`}async function Z(e,t){await v(x(e),{recursive:!0,mode:E});let n=`${e}.${process.pid}-${R(4).toString("hex")}.tmp`,o=await O(n,"wx",D);try{try{await o.writeFile(t,"utf8"),await o.sync()}finally{await o.close()}await S(n,e)}catch(i){throw await $(n,{force:!0}),i}}export{E as a,D as b,A as c,J as d,y as e,M as f,F as g,W as h,Y as i,Z as j};
|
|
@@ -0,0 +1,9 @@
|
|
|
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{i as E}from"./chunk-BBZUGKBZ.mjs";import{b as $,c as S,e as P,m as O,n as U,o as C}from"./chunk-CL75DEMQ.mjs";import{h as B}from"./chunk-DAUX63UB.mjs";import{da as N}from"./chunk-SZOJ7BEJ.mjs";import{ae as A,ie as D}from"./chunk-J347SPU6.mjs";var h="No record was written.",u=t=>t.toLocaleString("en-US"),j=t=>t.toDelete.createdSince+t.toDelete.broughtBackSince+t.toDelete.comesBackWithParent,v=t=>t.toBringBack.inBin+t.toBringBack.withParent+t.toBringBack.deletedWhileTaken,k=t=>t.toRecreate??0,y=t=>t.toBringBack.carriers??0;function L(t){let n=o=>j(o)+o.toGiveBack.records+v(o)+y(o)+k(o)>0,i=t.objects.filter(n).map(o=>o.objectApiName),a=t.files;return a!==void 0&&a.unlink+a.relink+a.updateLinks>0&&i.push(B),i}function M(t){return t.objects.reduce((n,i)=>({toDelete:n.toDelete+j(i),toGiveBack:n.toGiveBack+i.toGiveBack.records,toBringBack:n.toBringBack+v(i),toRecreate:n.toRecreate+k(i)}),{toDelete:0,toGiveBack:0,toBringBack:0,toRecreate:0})}function te(t,n){let i=new Set(n.objects),a=new Map(n.acts.map(e=>[e.objectApiName,e]));return{...E(t,i),objects:t.objects.filter(e=>i.has(e.objectApiName)||a.has(e.objectApiName)).map(e=>{let r=a.get(e.objectApiName),s=i.has(e.objectApiName);return{...e,toDelete:{createdSince:r?.toDelete??0,broughtBackSince:0,comesBackWithParent:0},toGiveBack:{...e.toGiveBack,records:r?.toGiveBack??0},toBringBack:{inBin:r?.toBringBack??0,withParent:0,deletedWhileTaken:0,...s&&e.toBringBack.carriers!==void 0?{carriers:e.toBringBack.carriers}:{}},toRecreate:r?.toRecreate??0,cannotUndo:s?e.cannotUndo:[],unexplained:s?e.unexplained:0}}),undoCannot:[...n.undoCannot],withParentDeleted:n.acts.flatMap(({objectApiName:e,withParent:r})=>(r??0)>0?[{objectApiName:e,count:r??0}]:[])}}function ne(t,n){let i=new Set(n.objects),a=new Map(t.objects.map(o=>[o.objectApiName,o]));return n.acts.flatMap(o=>{let e=a.get(o.objectApiName);if(i.has(o.objectApiName)||e===void 0||o.toDelete===0)return[];let r=n.undoCannot.filter(d=>d.objectApiName===o.objectApiName).reduce((d,c)=>d+c.count,0),s=o.withParent??0;return[{...e,toDelete:{createdSince:r+s,broughtBackSince:0,comesBackWithParent:Math.max(0,o.toDelete-s-r)},toGiveBack:{records:0,fields:0,clearedLookups:0},toBringBack:{inBin:0,withParent:0,deletedWhileTaken:0},toRecreate:0,cannotUndo:[],touched:0,unexplained:0}]})}function W(t){let n=new Map((t.withParentDeleted??[]).map(({objectApiName:e,count:r})=>[e,r])),i=t.objects.filter(e=>j(e)-(n.get(e.objectApiName)??0)+y(e)>0).map(e=>e.objectApiName),a=t.files,o=(e,r)=>r>0?[...e,B]:e;return{bringBack:t.objects.filter(e=>v(e)+y(e)>0).map(e=>e.objectApiName),recreate:o(t.objects.filter(e=>k(e)>0).map(e=>e.objectApiName),a?.relink??0),giveBack:o(t.objects.filter(e=>$(e)+P(e)>0).map(e=>e.objectApiName),a?.updateLinks??0),setToDraft:t.objects.filter(e=>S(e)>0).map(e=>e.objectApiName),delete:o(i,a?.unlink??0)}}function z(t){return new Set(t.map(n=>`${n.objectApiName}
|
|
8
|
+
${n.kind}
|
|
9
|
+
${n.name}`)).size}function oe(t,n,i,a=!1){let o=(c,f)=>(c??[]).includes(f),e=i.filter(c=>!o(n.recreate,c)),r=i.filter(c=>N[c]!==void 0&&!o(n.giveBack,c)),s=new Set(t.objectsRead),d=[...e,...r];return{fired:D(t,{recreate:e,giveBack:r}),blind:d.length>0&&(!a&&A(t.unread)||d.some(c=>!s.has(c)))}}var T={limit:t=>`this step's limit of ${u(t)}`,mutes:!1,lift:{acceptAutomation:"turn on muteAutomation in the step for what a bypass keeps quiet, or acceptAutomation to let it run, and confirm it again to rewind all the same",acceptEmails:"turn on acceptEmails in the step and confirm it again to rewind all the same",acceptNoUndo:"turn on acceptNoUndo in the step and confirm it again to rewind all the same",acceptRecreate:"turn on acceptRecreate in the step and confirm it again to rewind all the same",acceptUnseen:"turn on acceptUnseen in the step and confirm it again to rewind all the same",maxRecords:"preview the rewind, then raise the step's maxRecords to what it rewinds and confirm it again",refuseWhenActive:"run it once they are done, or turn off refuseWhenActive in the step and confirm it again"}},ie={...T,lift:{...T.lift,acceptAutomation:"turn on acceptAutomation in the step to let what no bypass keeps quiet run, and confirm it again to rewind all the same"}},H=[{reason:"onlyWithParent",words:"Salesforce undeletes them only with their parent, which stays"},{reason:"deletedBeforeParent",words:"deleted before a record they point at, which the rewind deletes next, Salesforce cannot bring them back after that"}],Y="Add --accept-emails to rewind all the same";function q(t,n,i,a,o){let{automation:e,deliverability:r}=n;if(!e||!r)return;let s=W(n.diff),{refusal:d}=C({act:"rewind",orgName:t,automation:e,steps:s,accepted:i.acceptEmails===!0,mayMute:o,...U({automation:e,steps:s}),reading:r.reading});if(!d)return;let c=a.acceptEmails;return{...d,message:d.message.replace(Y,`${c.charAt(0).toUpperCase()}${c.slice(1)}`)}}function ae(t,n,i,a,o="the user SandForge connects as",e=!1){return _(t,n,i,a,o,e)[0]}function _(t,n,i,a,o="the user SandForge connects as",e=!1){let r=[],{diff:s,automation:d}=n;if(s.undoCannot.length>0&&!i.acceptNoUndo){let l=H.flatMap(({reason:w,words:g})=>{let R=s.undoCannot.filter(b=>(b.reason??"onlyWithParent")===w);if(R.length===0)return[];let F=R.reduce((b,G)=>b+G.count,0),I=[...new Set(R.map(b=>b.objectApiName))].join(", ");return[`Undo couldn't bring back ${u(F)} ${I} record(s) this rewind deletes: ${g}.`]});r.push({code:"NO_UNDO",message:`${l.join(" ")} Rewind refused; ${a.acceptNoUndo}. ${h}`})}let c=s.objects.filter(l=>k(l)>0);if(c.length>0&&!i.acceptRecreate){let l=c.reduce((w,g)=>w+k(g),0);r.push({code:"RECREATE",message:`${u(l)} ${c.map(w=>w.objectApiName).join(", ")} record(s) deleted since are no longer in the recycle bin, or Salesforce keeps them there for good: this rewind makes them again from the checkpoint, with new Ids. Anything outside Salesforce that names their old Ids \u2014 an integration, a link, a report filter \u2014 no longer finds them. Rewind refused; ${a.acceptRecreate}. ${h}`})}let f=s.unseen??[];if(f.length>0&&i.acceptUnseen!==!0){let l=f.map(({objectApiName:w,children:g,records:R})=>`Deleting ${u(R)} ${w} record(s) created since also deletes what ${o} can't see under them in ${g.join(", ")}: Rewind can't count those.`);r.push({code:"UNSEEN",message:`${l.join(" ")} Rewind refused; ${a.acceptUnseen}. ${h}`})}if(!d)return r;let p=K(t,n,i,a),m=q(t,n,i,a,e);return[...r,...p?[p]:[],...m?[m]:[]]}function K(t,n,i,a){let{diff:o,automation:e,emailsUncounted:r}=n;if(!e||i.acceptAutomation)return;let s=W(o),d=D(e,s);if(d.length===0&&!A(e.unread)&&r===void 0)return;let c=[...new Set(d.map(l=>l.objectApiName))],f=(s.recreate??[]).some(l=>l!==B)?"makes them again, ":"",p=d.length>0?`${z(d)} flow(s), trigger(s) or rule(s) of ${c.join(", ")} run as the rewind brings records back, ${f}gives them their values back or deletes them`:"what runs as the rewind writes could not all be read, so automation may run",m=r!==void 0?`The emails it sends as the rewind writes were not counted against its daily limits, as what sends them was not read (${r}). `:"";return{code:"AUTOMATION",message:`${t}: ${p}. ${m}Rewind refused; ${a.acceptAutomation}. `+h}}var x=t=>t.slice(0,15);async function re(t){return(await J(t))[0]}async function J(t){let{orgName:n,preview:i,bounds:a,words:o}=t,{diff:e}=i;if(L(e).length===0)return[];let r=[],s=M(e),d=s.toDelete+s.toGiveBack+s.toBringBack+s.toRecreate;if(a.maxRecords!==void 0&&d>a.maxRecords){let f=[`${u(s.toDelete)} to delete`,`${u(s.toGiveBack)} to give back`,`${u(s.toBringBack)} to bring back`,...s.toRecreate>0?[`${u(s.toRecreate)} to make again`]:[]];r.push({code:"TOO_MANY_TO_REWIND",message:`The rewind of ${n} would rewind ${u(d)} records (${f.join(", ")}), past ${o.limit(a.maxRecords)}. Rewind refused; ${o.lift.maxRecords}. `+h})}if(a.refuseWhenActive&&e.activeLastHour.length>0){let f=new Set((await t.writers()).map(x)),p=new Set(e.activeLastHour.map(x).filter(m=>!f.has(m)));if(p.size>0){let m=p.size===1?"1 person":`${u(p.size)} people`;r.push({code:"PEOPLE_ACTIVE",message:`${m} other than the user the rewind writes as changed records of the checkpoint's objects in ${n} in the hour before the rewind read it: it would take their work back. Rewind refused; ${o.lift.refuseWhenActive}. `+h})}}let c=O("rewind",i.emails??[],n);return[...r,..._(n,i,t.accepted,o.lift,t.user,o.mutes),...c?[c]:[]]}function se(t,n,i){let a=n.map(o=>`${o.objectApiName} (${u(o.records)})`).join(", ");return{code:"UNDELETABLE_UNATTENDED",message:`The user SandForge connects to ${t} as may not delete the ${a} record(s) this rewind deletes. With nobody to ask whether to delete the rest, the deletion was left untouched. Give the user Delete on those objects, or rewind from the Checkpoints page, which asks. `+(i?"What the rewind's first pass wrote stays: its result says what, and Undo takes it back.":h)}}function ce(t,n){return{code:"NOT_CONFIRMED",message:`Rewind step "${t}" has `+(n?"not been confirmed since it was changed":"never been confirmed")+": open it and type the org's alias, or, for an org that has none, its name or Organization Id. "+h}}export{L as a,M as b,te as c,ne as d,W as e,z as f,oe as g,T as h,ie as i,ae as j,re as k,J as l,se as m,ce as n};
|
|
@@ -4,7 +4,7 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{b as X,e as Y}from"./chunk-
|
|
7
|
+
import{b as X,e as Y}from"./chunk-HLROVOR6.mjs";import{a as G,b as q,e as J,f as Q,j as L}from"./chunk-FQGHL7GR.mjs";import{Ka as A,Ma as N,Na as Z,Oa as W}from"./chunk-J347SPU6.mjs";var O=class extends Error{constructor(t){super(`The scenario cannot be compiled: ${t.join("; ")}`);this.issues=t;this.name="ScenarioCompileError"}issues},ee="2026-10-28T00:00:00.000Z",x={subject:255,description:32e3,commentBody:4e3,articleTitle:255,articleSummary:1e3},ie=new Set(["Phone"]);function $e(e,n={}){let t=Z.safeParse(e),a=W.safeParse(n);if(!t.success||!a.success)throw new O([...t.error?.issues.map(i=>te(["pack",...i.path],i))??[],...a.error?.issues.map(i=>te(["options",...i.path],i))??[]]);let r=n.customers??e.customers.count;if(r<e.topics.length)throw new O([`options.customers: ${r} customer(s) for ${e.topics.length} topics: each topic's utterances are said about a customer's open case on it`]);let s=n.seed??A.seed,u=n.historyPerCustomer??A.historyPerCustomer,l=n.caseStatus??A.caseStatus,c=ge(e.language),o=ce(),p=e.id,m=e.topics,f=fe(p,r,c,s),S=f.map((i,d)=>({key:i.key,values:o.row({Name:i.company,Industry:e.customers.industry,Type:"Customer - Direct",Phone:L(c,2*d),Website:`https://www.${se(i.company)}`})})),$=f.map((i,d)=>({key:i.key,parentKey:i.key,values:o.row({FirstName:i.firstName,LastName:i.lastName,Email:i.email,Phone:L(c,2*d+1)})})),T=m.map(()=>0),k=[],M=[],D=[],z=[],F=i=>`${p}-article-${m[i].key}`;for(let[i,d]of f.entries()){let I=[...Array.from({length:u},(g,h)=>({topicIndex:(i+1+h)%m.length,key:`${d.key}-h${h+1}`,open:!1})),{topicIndex:i%m.length,key:`${d.key}-open`,open:!0}];for(let{topicIndex:g,key:h,open:j}of I){let U=m[g].caseTemplates,w=U[T[g]++%U.length],v=o.text(P(w.subject,d),x.subject),V={...d,caseSubject:v};k.push({key:h,parentKey:d.key,values:o.row({Subject:v,Description:o.text(P(w.description,V),x.description),Status:j?l.open:l.closed,Priority:w.priority,Origin:w.origin})}),M.push(...le(h,w,j,V,o)),j?D.push({key:h,subject:v,topicIndex:g,customer:d}):z.push({caseKey:h,articleKey:F(g)})}}let y=ue(n),_=[],oe=m.map((i,d)=>{if(!y)return;let I=i.article.facts.map(h=>o.text(h)),g=me(o.text(i.article.body),I,y);if(typeof g=="string")return g;_.push(`pack.topics[${d}].article.facts[${g.unfit}]: the fact "${i.article.facts[g.unfit]}" does not fit, with the facts before it, in the ${y.max} characters of ${y.name}, the field the article's body goes to in this org: shorten the facts, or give Knowledge a longer field for the body`)});if(_.length>0)throw new O(_);let H=[...m.map((i,d)=>({key:F(d),values:ne(i.article,`${p}-${i.key}-${s}`,e,o,y&&{name:y.name,text:oe[d]??""})})),{key:`${p}-decoy-article`,values:ne(e.decoy,`${p}-${s}-decoy`,e,o,y&&{name:y.name,text:de(o.text(e.decoy.body),o.text(e.decoy.summary),y)})}],ae={id:`scenario-${p}`,name:o.text(e.name),description:o.text(e.businessContext),version:1,strategy:"template",objects:[R("Account",0,S),R("Contact",1,$),R("Case",2,k),R("CaseComment",3,M),{...R("Knowledge__kav",4,H),optional:!0}],relations:[B("Contact","AccountId","Account"),B("Case","ContactId","Contact"),B("CaseComment","ParentId","Case")],tags:["scenario",p],createdAt:ee,updatedAt:ee};return{packId:p,seed:s,template:ae,tests:pe(e,D,F,H,o),closedCaseArticles:z}}function te(e,n){return`${e.reduce((a,r)=>typeof r=="number"?`${a}[${r}]`:`${a}.${String(r)}`,"").replace(/^\./,"")}: ${n.message}`}function ce(){let e=X(),n=new Map,t=r=>{let s=n.get(r);if(s!==void 0)return s;let u=e(r);return n.set(r,u),u},a=(r,s)=>Y(r,s,t);return{text(r,s){let u=a({text:r},new Set).text;return E(typeof u=="string"?u:r,s)},row(r){return a(r,ie)}}}function E(e,n){if(n===void 0||e.length<=n)return e;let t=e.slice(0,n);if(/\s/.test(e.charAt(n)))return t.trimEnd();let a=t.search(/\s\S*$/);return a>0?t.slice(0,a).trimEnd():t}function P(e,n){return e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,a)=>n[a]??t)}function le(e,n,t,a,r){return(t?[n.followUp]:n.resolution).map((u,l)=>({key:`${e}-${l+1}`,parentKey:e,values:{CommentBody:r.text(P(u,a),x.commentBody),IsPublished:!1}}))}function ne(e,n,t,a,r){let s={Title:a.text(e.title,x.articleTitle),UrlName:n,Summary:a.text(e.summary,x.articleSummary),Language:t.language,IsVisibleInPkb:!1,IsVisibleInCsp:!1,IsVisibleInPrm:!1};return r&&(s[r.name]=r.text),s}function ue(e){let n=e.articleBodyField;if(n===void 0)return;let t=e.articleBodyLength??(n==="Summary"?x.articleSummary:void 0);return{name:n,...t!==void 0?{max:t}:{},html:e.articleBodyHtml===!0}}function K(e){return e.split(/\n\s*\n/).map(n=>n.trim()).filter(Boolean)}function C(e,n){return n.html?e.map(t=>`<p>${re(t)}</p>`).join(""):e.join(`
|
|
8
8
|
|
|
9
9
|
`)}function re(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function b(e,n){return n.max===void 0||e.length<=n.max}function me(e,n,t){let a=K(e),r=t.html?C(a,t):e;if(b(r,t))return r;let s=a.filter(c=>n.some(o=>N(c,o)));if(n.every(c=>N(s.join(`
|
|
10
10
|
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a,b,c,d}from"./chunk-
|
|
7
|
+
import{a,b,c,d}from"./chunk-DO6PSHQZ.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{b as PARENT_IDS_PER_QUERY,a as readExistingParentIds,c as readPresentParentIds,d as recordParentsRefusals};
|
|
@@ -0,0 +1,7 @@
|
|
|
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,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r}from"./chunk-CL75DEMQ.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-ZVU7MD2S.mjs";import"./chunk-OLCS7JCT.mjs";import"./chunk-TQ6HEJ73.mjs";import"./chunk-65AMXOQU.mjs";import"./chunk-6HHSAPIM.mjs";import"./chunk-K5PUMHZU.mjs";import"./chunk-VV3B6IC3.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-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-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{p as actDeliverability,o as actEmailsGate,n as actSendersOf,q as afterLeaseEmailsRefusal,l as checkpointEmails,j as checkpointEmailsUncounted,c as draftedByDiff,d as draftedByPlan,a as emailsOfLimit,m as emailsRefusal,k as emailsUncountedWords,r as pageEmailsRefusal,e as statusBackByDiff,f as statusBackByPlan,b as updatedByDiff,g as writtenByDiff,h as writtenByPlan,i as writtenByUndo};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a,b}from"./chunk-
|
|
7
|
+
import{a,b}from"./chunk-JRLYWVF4.mjs";import"./chunk-HLROVOR6.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as ScenarioCompileError,b as compileScenario};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{Q as f,j as k,k as s}from"./chunk-
|
|
7
|
+
import{Q as f,j as k,k as s}from"./chunk-4CSBZZAL.mjs";import{a as d,b as u}from"./chunk-PC247GKX.mjs";import{yb as i}from"./chunk-J347SPU6.mjs";import{b as c,l as a,u as p}from"./chunk-WZQEK4WT.mjs";import{homedir as E}from"node:os";import{join as O}from"node:path";var $=a({...d,operation:p(["apply","destroy","reset","recover"]),env:i,alias:c().min(1).max(255).optional()}),l=u(n=>{let e=$.safeParse(n);return e.success?e.data:void 0});function j(n=E()){return k(n)}function v(n,e){return O(n,`${s(e)}.env.lock`)}function K(n,e,o,r={}){let m=v(n,e),y=i.parse(o.env),t=l.acquire(m,h=>({...h,operation:o.operation,env:y,...o.alias!==void 0?{alias:o.alias}:{}}),r);return"busy"in t?{busy:L(t.busy)}:{lock:{organizationId:s(e),release:t.lock.release}}}function N(n,e,o={}){let r=l.holder(v(n,e),o);return r!==void 0?L(r):void 0}function L({version:n,token:e,...o}){return o}function g(n){return`process ${n.pid} on ${n.host}, since ${n.acquiredAt}`}function R(n){return`${w(n)}. Nothing was written: run this again once it ends. Two jobs applying to one org from two machines are not kept apart: give them one concurrency group.`}function w(n){let e=n.alias!==void 0?` to ${n.alias}`:"";return`${n.operation==="apply"?"an apply":n.operation==="recover"?"a state recover":`a ${n.operation}`} of ${n.env}${e} is under way on this machine (${g(n)})`}function _(n,e,o={}){let r=f(n,e,o);if(r!==void 0)return`a checkpoint ${r.operation} of this org is under way on this machine (${g(r)}): its records would be read or written as the step writes. Run this again once it ends.`}export{j as a,v as b,K as c,N as d,R as e,w as f,_ as g};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a,b,c,d,e}from"./chunk-
|
|
7
|
+
import{a,b,c,d,e}from"./chunk-DUBECLZV.mjs";import"./chunk-LHNAR6FC.mjs";import"./chunk-65AMXOQU.mjs";import"./chunk-Q7TLC3I2.mjs";import"./chunk-DAUX63UB.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{d as hostIsMyDomain,b as isScratchHost,a as myDomainHostOf,e as refreshedSince,c as sandboxMyDomainOf};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{chmodSync as t,mkdirSync as e}from"node:fs";import{chmod as i,mkdir as c}from"node:fs/promises";var n=448,O=384;async function p(r){await c(r,{recursive:!0,mode:n}),await m(r,n)}function f(r){e(r,{recursive:!0,mode:n}),s(r,n)}async function m(r,o){process.platform!=="win32"&&await i(r,o).catch(()=>{})}function s(r,o){if(process.platform!=="win32")try{t(r,o)}catch{}}export{n as a,O as b,p as c,f as d,m as e,s as f};
|
|
@@ -0,0 +1,7 @@
|
|
|
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,b,c,d,e}from"./chunk-VT6P3X6R.mjs";import"./chunk-34SMB5PA.mjs";import"./chunk-KWUS7UAV.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-K5PUMHZU.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{b as SEED_RUNS_DIR,a as SEED_RUNS_KEPT,e as SeedRunCreations,d as nodeSeedRunCreations,c as seedRunKept};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{i as d}from"./chunk-
|
|
7
|
+
import{i as d}from"./chunk-YZQN7BRB.mjs";import{i as s,j as c}from"./chunk-QACFTHJM.mjs";import{access as p}from"node:fs/promises";import*as l from"node:path";var u="sfdx-project.json";async function w(n,e=g){for(let t of n)if(await e(l.join(t,u)))return{kind:"dx",dir:t};let r=n[0];return r===void 0?{kind:"none"}:{kind:"folder",dir:r}}async function g(n){try{return await p(n),!0}catch{return!1}}async function S(n,e){if(e.project.kind==="none")return{kind:"unavailable",reason:"no-workspace",message:"Open a folder in VS Code: the test file is written into it."};let r=await c(n.sidecar,e.storagePath,e.runId);if(r.kind==="absent")return{kind:"unavailable",reason:"no-companion",message:"This run kept no companion file: it was not seeded from a scenario, or it wrote no open case for a test to be about."};if(r.kind==="invalid")return{kind:"unavailable",reason:"companion-invalid",message:r.message};let{sidecar:t}=r,o=await e.findPack(t.packId,t.packFingerprint);if(!o)return{kind:"unavailable",reason:"pack-not-found",message:`The scenario ${t.packId} this run was seeded from is no longer in the workspace as it was: its tests would be about subjects and addresses no record of the run holds.`};let i=await e.readCatalog();if(i.kind==="no-agent")return{kind:"no-agent",reason:i.reason,message:i.message};if(i.kind==="unreadable")return{kind:"unavailable",reason:"catalog-unreadable",message:i.message};let a=await d(n.spec,{sidecar:t,pack:o,catalog:i.catalog,choice:e.choice,projectDir:e.project.dir,alias:e.alias,...e.overwrite!==void 0?{overwrite:e.overwrite}:{}});if(a.kind==="refused")return a;if(a.kind==="exists")return{kind:"exists",path:a.path,specPath:a.specPath};await s(n.sidecar,e.storagePath,a.sidecar).catch(()=>{});let f=e.project.kind==="dx";return{kind:"written",path:a.path,specPath:a.specPath,apiName:a.apiName,...f?{commands:{create:a.commands.create.line,run:a.commands.run.line}}:{notDxProject:!0},leftOut:a.leftOut}}export{u as a,w as b,S as c};
|
|
@@ -0,0 +1,19 @@
|
|
|
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 Y,b as J,c as G,e as V}from"./chunk-K5PUMHZU.mjs";import{a as me}from"./chunk-TUACWKIH.mjs";import{$a as ge,Jd as pe,Ua as fe}from"./chunk-J347SPU6.mjs";import{b as k,e as I,k as b,l as p,r as ue,s as le,u as ne,v as E}from"./chunk-WZQEK4WT.mjs";import{appendFile as $e,mkdir as We,readFile as Ue,readdir as He,rename as Ye,rm as Ze,stat as qe,writeFile as Xe}from"node:fs/promises";import*as A from"node:path";import{appendFile as xe,readFile as Ie,readdir as Ae,rename as Ne,rm as Fe,stat as _e,writeFile as Me}from"node:fs/promises";import*as W from"node:path";var Ee="sync-links",De=2e5,Le=16*1024*1024,$=k().regex(/^[A-Za-z0-9]{15}(?:[A-Za-z0-9]{3})?$/),Q=k().min(1).max(200),Ke=p({s:Q,t:Q,o:k().regex(/^[A-Za-z][A-Za-z0-9_]{0,79}$/),p:b(ue([$,$])).max(5e4),l:E(!0).optional()}),Ce=p({s:Q,t:Q,f:b($).max(1e6)});function T(s){return s.slice(0,15)}function Be(s){return s.replace(/[^A-Za-z0-9_-]/g,"_")}function Te(s){try{return JSON.parse(s)}catch{return}}function Je(s){let e=new Map;for(let t of s.split(`
|
|
8
|
+
`)){if(t.trim()==="")continue;let r=Te(t),n=Ke.safeParse(r);if(n.success){let{s:y,t:O,o:K,p:P,l:D}=n.data;for(let[M,L]of P){let o=`${y}|${O}|${T(M)}`;e.delete(o),e.set(o,{s:y,t:O,o:K,source:M,target:L,...D===!0?{linked:!0}:{}})}continue}let i=Ce.safeParse(r);if(!i.success)continue;let{s:c,t:l,f:a}=i.data,g=new Set(a.map(T));for(let[y,O]of e)O.s===c&&O.t===l&&g.has(T(O.target))&&e.delete(y)}return e}function vt(s){return new Z({storagePath:s,readFile:e=>Ie(e,"utf8"),writeFile:(e,t)=>Me(e,t,{encoding:"utf8",mode:J}),appendFile:(e,t)=>xe(e,t,{encoding:"utf8",mode:J}),rename:(e,t)=>Ne(e,t),mkdir:e=>G(e),rm:e=>Fe(e,{force:!0}),listFiles:async e=>{let t;try{t=await Ae(e)}catch(n){if(n.code==="ENOENT")return[];throw n}await V(e,Y);let r=[];for(let n of t){let i=await _e(W.join(e,n)).catch(()=>{});i?.isFile()&&r.push({name:n,size:i.size})}return r}})}var Z=class{constructor(e){this.deps=e;this.dir=W.join(e.storagePath,Ee),this.maxPairs=e.maxPairs??De,this.compactBytes=e.compactBytes??Le}deps;dir;maxPairs;compactBytes;queue=Promise.resolve();fileOf(e){return W.join(this.dir,`${Be(e)}.ndjson`)}inTurn(e){let t=this.queue.then(e);return this.queue=t.catch(()=>{}),t}async read(e){let t;try{t=await this.deps.readFile(this.fileOf(e))}catch(r){if(r?.code==="ENOENT")return new Map;throw r}return Je(t)}async load(e,t){await this.queue;let r=new Map;for(let n of(await this.read(e)).values())n.s===t.sourceOrgId&&n.t===t.targetOrgId&&r.set(T(n.source),n.target);return r}async linked(e,t){await this.queue;let r=new Set;for(let n of(await this.read(e)).values())n.linked&&n.s===t.sourceOrgId&&n.t===t.targetOrgId&&r.add(T(n.source));return r}record(e,t,r,n,i=!1){let c=n.filter(([l,a])=>$.safeParse(l).success&&$.safeParse(a).success);return c.length===0?Promise.resolve():this.inTurn(async()=>{await this.deps.mkdir(this.dir);let l=this.fileOf(e);for(let a=0;a<c.length;a+=5e4){let g={s:t.sourceOrgId,t:t.targetOrgId,o:r,p:c.slice(a,a+5e4),...i?{l:!0}:{}};await this.deps.appendFile(l,`${JSON.stringify(g)}
|
|
9
|
+
`)}await this.keepWithinBounds(e)})}forget(e,t,r){let n=new Set(r.filter(i=>$.safeParse(i).success).map(T));return n.size===0?Promise.resolve(0):this.inTurn(async()=>{let i=0,c=[];for(let a of(await this.read(e)).values())a.s!==t.sourceOrgId||a.t!==t.targetOrgId||n.has(T(a.target))&&(i++,c.push(a.target));if(i===0)return 0;let l={s:t.sourceOrgId,t:t.targetOrgId,f:[...new Set(c)]};return await this.deps.appendFile(this.fileOf(e),`${JSON.stringify(l)}
|
|
10
|
+
`),await this.keepWithinBounds(e),i})}delete(e){return this.inTurn(()=>this.deps.rm(this.fileOf(e)))}async keepWithinBounds(e){let t=this.fileOf(e),r=W.basename(t);if(((await this.deps.listFiles(this.dir)).find(a=>a.name===r)?.size??0)<=this.compactBytes)return;let i=[...(await this.read(e)).values()].slice(-this.maxPairs),c=[];for(let a of i){let g=c[c.length-1];if(g?.s===a.s&&g.t===a.t&&g.o===a.o&&g.l===a.linked&&g.p.length<5e4){g.p.push([a.source,a.target]);continue}c.push({s:a.s,t:a.t,o:a.o,p:[[a.source,a.target]],...a.linked?{l:!0}:{}})}let l=`${t}.${process.pid}.tmp`;await this.deps.writeFile(l,c.map(a=>`${JSON.stringify(a)}
|
|
11
|
+
`).join("")),await this.deps.rename(l,t)}};function bt(s,e){return{load:async(t,r)=>e(t)?s.load(t,r):null,record:async(t,r,n,i,c)=>{e(t)&&await s.record(t,r,n,i,c)},linked:async(t,r)=>e(t)&&s.linked?s.linked(t,r):new Set,forget:async(t,r,n)=>e(t)&&s.forget?s.forget(t,r,n):0}}var Ge="sync-runs",Ve=4*1024*1024,Qe=64*1024*1024,ye=["ContentDocument","Attachment"],et=".scenario.json";function It(s,e,t){let r=n=>A.resolve(n)!==A.resolve(s);return new se({storagePath:s,...e!==void 0?{runsDir:e}:{},...t?{onDropped:t}:{},readFile:n=>Ue(n,"utf8"),writeFile:(n,i)=>Xe(n,i,{encoding:"utf8",mode:J}),appendFile:(n,i)=>$e(n,i,{encoding:"utf8",mode:J}),rename:(n,i)=>Ye(n,i),mkdir:async n=>{r(n)?await G(n):await We(n,{recursive:!0,mode:Y})},rm:n=>Ze(n,{force:!0}),listFiles:async n=>{let i;try{i=await He(n)}catch(l){if(l.code==="ENOENT")return[];throw l}r(n)&&await V(n,Y);let c=[];for(let l of i){let a=await qe(A.join(n,l)).catch(()=>{});a?.isFile()&&c.push({name:l,size:a.size})}return c}})}var R=5e4,h=k().regex(/^[A-Za-z0-9]{15}(?:[A-Za-z0-9]{3})?$/),S=k().regex(/^[A-Za-z][A-Za-z0-9_]{0,79}$/),w=k().min(1).max(40),tt=500,nt=p({run:p({runId:k().min(1).max(200),configId:k().min(1).max(200),configName:k().max(500),sourceOrgId:k().min(1).max(200),targetOrgId:k().min(1).max(200),targetAlias:k().min(1).max(200).optional(),startedAt:w,origin:ne(["csv","clone"]).optional(),pipeline:p({name:k().max(tt)}).optional(),realtime:E(!0).optional(),targetOrganizationId:h.optional(),answersNameJobs:E(!0).optional(),writer:p({pid:I().int().positive(),hostStartedAt:w}).optional(),runUserId:h.optional()})}),rt=p({object:S,created:b(h).max(R),at:w.optional(),job:h.optional()}),it=p({sending:p({object:S,rows:I().int().positive(),at:w,job:h.optional(),upsert:E(!0).optional()})}),st=p({writing:p({object:S,rows:I().int().positive(),at:w})}),at=p({touched:p({object:S,rows:I().int().positive(),at:w})}),Pe=k().regex(/^[A-Za-z0-9_-]{1,200}$/).refine(s=>!s.includes("__")),ot=p({overwriting:p({object:S,backup:Pe,ids:b(h).min(1).max(R),held:b(p({id:h,at:w,by:h.optional()})).max(R).optional(),at:w})}),ct=p({overwrote:p({object:S,notWritten:b(h).max(R),at:w})}),dt=p({unkept:p({object:S,fields:b(S).min(1).max(800),why:E("encrypted"),at:w})}),ut=p({deleted:p({object:S,ids:b(h).min(1).max(R),at:w})}),lt=p({runUser:h}),re=1e3,Se=p({objectApiName:S,reason:k().max(4e3),...ge}),ze=p({checkpoint:p({state:E("taken"),checkpointId:fe,name:k().min(1).max(500),takenAt:w,expiresAt:w.nullable(),objects:b(S).max(re),records:I().int().nonnegative(),bytes:I().int().nonnegative(),requests:I().int().nonnegative(),added:b(Se).max(re),notHeld:b(Se).max(re)})}),ft=p({end:p({at:w,status:ne(["success","partial","failure"]),cancelled:E(!0).optional()})}),we=100,gt=p({version:E(1),undo:p({removedAt:w,deleted:I().int().nonnegative(),alreadyGone:I().int().nonnegative(),kept:I().int().nonnegative(),refused:I().int().nonnegative(),notReached:I().int().nonnegative().optional(),notVisible:I().int().nonnegative().optional()}).optional(),removalStamps:le(h,w).optional(),removalSpans:b(p({first:w,last:w,userId:h})).optional(),removalLeft:b(h).optional(),restoreLeft:b(h).optional(),restoredAt:w.optional(),undeleteLeft:b(h).optional(),undeletedAt:w.optional(),madeEarlier:b(h).max(1e4*we).optional().catch(void 0),lateEarlier:b(h).max(1e4*we).optional().catch(void 0)});function pt(s){let e=gt.safeParse(s);if(!e.success)return;let{undo:t,removalStamps:r,removalSpans:n,removalLeft:i,restoreLeft:c,restoredAt:l,undeleteLeft:a,undeletedAt:g,madeEarlier:y,lateEarlier:O}=e.data;return{...t?{undo:t}:{},...r?{removalStamps:r}:{},...n?{removalSpans:n}:{},...i?{removalLeft:i}:{},...c?{restoreLeft:c}:{},...l!==void 0?{restoredAt:l}:{},...a?{undeleteLeft:a}:{},...g!==void 0?{undeletedAt:g}:{},...y?{madeEarlier:y}:{},...O?{lateEarlier:O}:{}}}function ee(s){return s.replace(/[^A-Za-z0-9_-]/g,"_")}function At(s){return ee(s)}function mt(s){try{return JSON.parse(s)}catch{return}}function ve(s){let e,t,r,n,i,c,l,a=(d,u=!0)=>{d===void 0||!Number.isFinite(Date.parse(d))||(u&&(c===void 0||Date.parse(d)<Date.parse(c))&&(c=d),(l===void 0||Date.parse(d)>Date.parse(l))&&(l=d))},g,y=new Map,O=new Map,K=new Set,P=new te,D=new Map,M=new Map,L=new Map;for(let d of s.split(`
|
|
12
|
+
`)){if(d.trim()==="")continue;let u=mt(d);if(!e){let v=nt.safeParse(u);v.success&&(e=v.data.run);continue}let m=ot.safeParse(u);if(m.success){let{object:v,backup:N,ids:j,at:x,held:_}=m.data.overwriting;a(x),P.candidates(v,N,j);for(let B of _??[]){let de=B.id.slice(0,15);L.has(de)||L.set(de,{at:B.at,...B.by!==void 0?{by:B.by}:{}})}continue}let C=ct.safeParse(u);if(C.success){let{object:v,notWritten:N,at:j}=C.data.overwrote;a(j,!1),P.answer(v,N);continue}let q=st.safeParse(u);if(q.success){a(q.data.writing.at);continue}let z=dt.safeParse(u);if(z.success){let{object:v,fields:N}=z.data.unkept,j=M.get(v)??new Set;for(let x of N)j.add(x);M.set(v,j);continue}let U=ut.safeParse(u);if(U.success){let{object:v,ids:N,at:j}=U.data.deleted;a(j);let x=D.get(v)??new Map;for(let _ of N)x.has(_.slice(0,15))||x.set(_.slice(0,15),_);D.set(v,x);continue}let H=it.safeParse(u);if(H.success){let{object:v,rows:N,at:j,job:x,upsert:_}=H.data.sending;a(j),g={objectApiName:v,rows:N,at:j,...x!==void 0?{job:x}:{},..._?{upsert:_}:{}},x!==void 0&&y.set(x,g);continue}let X=at.safeParse(u);if(X.success){let{at:v}=X.data.touched;a(v),(i===void 0||Date.parse(v)>Date.parse(i))&&(i=v);continue}let F=rt.safeParse(u);if(F.success){let{object:v,job:N}=F.data;N!==void 0?(y.delete(N),g?.job===N&&(g=void 0)):g?.objectApiName===v&&(e.answersNameJobs!==!0&&g.job!==void 0&&y.delete(g.job),g=void 0);let j=F.data.at;a(j,F.data.created.length>0),j!==void 0&&F.data.created.length>0&&(i===void 0||Date.parse(j)>Date.parse(i))&&(i=j);let x=O.get(F.data.object)??[];for(let _ of F.data.created){let B=_.slice(0,15);K.has(B)||(K.add(B),x.push(_))}O.set(F.data.object,x);continue}let ae=ze.safeParse(u);if(ae.success){r=ae.data.checkpoint;continue}let oe=lt.safeParse(u);if(oe.success){n=oe.data.runUser;continue}let ce=ft.safeParse(u);ce.success&&(t=ce.data.end)}if(!e)return;let o={...e};delete o.answersNameJobs;let f=P.read();return{...o,...o.runUserId===void 0&&n!==void 0?{runUserId:n}:{},...t?{end:t}:{},...i!==void 0?{lastWrittenAt:i}:{},...c!==void 0?{firstWrittenAt:c}:{},...l!==void 0?{lastWriteAt:l}:{},...!t&&g?{inFlight:g}:{},...y.size>0?{jobs:[...y.values()]}:{},created:[...O].flatMap(([d,u])=>u.length>0?[{objectApiName:d,ids:u}]:[]),...f.length>0?{overwritten:f}:{},...L.size>0?{heldBefore:Object.fromEntries(L)}:{},...M.size>0?{unkept:[...M].map(([d,u])=>({objectApiName:d,fields:[...u]}))}:{},...D.size>0?{deleted:[...D].map(([d,u])=>({objectApiName:d,ids:[...u.values()]}))}:{},...r?{checkpoint:r}:{}}}var te=class{byObject=new Map;pending=new Map;written=new Set;candidates(e,t,r){let n=this.byObject.get(e)??{backup:t,ids:new Map};this.byObject.set(e,n);let i=this.pending.get(e);if(!i||i.answered){for(let c of i?.ids??[])this.written.add(c);i={ids:new Set,answered:!1},this.pending.set(e,i)}for(let c of r){let l=c.slice(0,15);n.ids.has(l)||n.ids.set(l,c),i.ids.add(l)}}answer(e,t){let r=this.pending.get(e);if(!r)return;r.answered=!0;let n=this.byObject.get(e);for(let i of t){let c=i.slice(0,15);r.ids.has(c)&&(r.ids.delete(c),this.written.has(c)||n?.ids.delete(c))}}read(){return[...this.byObject].flatMap(([e,{backup:t,ids:r}])=>r.size>0?[{objectApiName:e,backup:t,ids:[...r.values()]}]:[])}get count(){let e=0;for(let{ids:t}of this.byObject.values())e+=t.size;return e}};function ke(s,e=!1){let t=ye.flatMap(i=>s.created.filter(c=>c.objectApiName===i)),r=s.created.filter(i=>!ye.includes(i.objectApiName)),n=[...t,...[...r].reverse()].map(({objectApiName:i,ids:c})=>({objectApiName:i,ids:[...c].reverse()}));return e?n.filter(({ids:i})=>i.length>0):pe({objects:n,undo:s.removal?.undo,removalLeft:s.removal?.removalLeft})}function Nt(s){return s.created.reduce((e,t)=>e+t.ids.length,0)}function Ft(s){return(s.overwritten??[]).reduce((e,t)=>e+t.ids.length,0)}function Oe(s){let e=s.removal?.restoreLeft,t=e?new Set(e.map(r=>r.slice(0,15))):void 0;return(s.overwritten??[]).flatMap(r=>{let n=t?r.ids.filter(i=>t.has(i.slice(0,15))):[...r.ids];return n.length>0?[{...r,ids:n}]:[]})}function _t(s){return(s.deleted??[]).reduce((e,t)=>e+t.ids.length,0)}function ht(s){let e=s.removal?.undeleteLeft,t=e?new Set(e.map(r=>r.slice(0,15))):void 0;return(s.deleted??[]).flatMap(r=>{let n=t?r.ids.filter(i=>t.has(i.slice(0,15))):[...r.ids];return n.length>0?[{objectApiName:r.objectApiName,ids:n}]:[]})}function ie(s){return ke(s).length>0||Oe(s).length>0||ht(s).length>0?!1:s.removal?.undo!==void 0||s.removal?.restoredAt!==void 0||s.removal?.undeletedAt!==void 0}function be(s){return new Set([...ke(s),...Oe(s)].flatMap(({ids:e})=>e.map(t=>t.slice(0,15))))}function Mt(s){return s.targetAlias??s.targetOrgId}function Re(s,e){return e.filter(t=>t.runId!==s.runId&&yt(s,t)&&!ie(t))}function yt(s,e){return s.targetOrganizationId!==void 0&&e.targetOrganizationId!==void 0?s.targetOrganizationId.slice(0,15)===e.targetOrganizationId.slice(0,15):s.targetOrgId===e.targetOrgId}function Et(s,e){let t=Date.parse(s.startedAt);return Re(s,e).filter(r=>Date.parse(r.startedAt)<t)}function Dt(s,e){let t=be(s);if(t.size===0)return[];let r=Date.parse(s.startedAt);return Re(s,e).filter(n=>Date.parse(n.startedAt)>r).flatMap(n=>{let i=0;for(let c of be(n))t.has(c)&&i++;return i>0?[{runId:n.runId,configName:n.configName,startedAt:n.startedAt,records:i,...n.realtime?{realtime:!0}:{}}]:[]}).sort((n,i)=>Date.parse(i.startedAt)-Date.parse(n.startedAt)||0)}var se=class{constructor(e){this.deps=e;this.dir=A.join(e.storagePath,e.runsDir??Ge),this.maxBytes=e.maxBytes??Ve,this.hardMaxBytes=Math.max(this.maxBytes,e.hardMaxBytes??Qe)}deps;dir;maxBytes;hardMaxBytes;queue=Promise.resolve();links;runPath(e){return A.join(this.dir,`${ee(e)}.ndjson`)}pathOf(e){return this.runPath(e)}removalPath(e){return A.join(this.dir,`${ee(e)}.removal.json`)}scenarioPath(e){return A.join(this.dir,`${ee(e)}${et}`)}get storagePath(){return this.deps.storagePath}recorder(e){let t=this.runPath(e.runId),r=this.deps.host??me,n={...e,startedAt:e.startedAt??new Date().toISOString(),answersNameJobs:!0,writer:{pid:r.pid,hostStartedAt:r.startedAt}},i=new Map,c=new te,l=!1,a=Promise.resolve(),g,y=!1,O,K,P=o=>{y=!0;let f=O;O=void 0;let d=K;K=void 0,a=a.then(async()=>{if(g===void 0)try{l||(l=!0,await this.deps.mkdir(this.dir),await this.keepWithinBounds(e.runId).catch(()=>{}),await this.deps.appendFile(t,`${JSON.stringify({run:n})}
|
|
13
|
+
`)),d!==void 0&&await this.deps.appendFile(t,`${JSON.stringify(d)}
|
|
14
|
+
`),f!==void 0&&await this.deps.appendFile(t,`${JSON.stringify(f)}
|
|
15
|
+
`),await this.deps.appendFile(t,`${JSON.stringify(o)}
|
|
16
|
+
`)}catch(u){g=u instanceof Error?u.message:String(u)}})},D=new Set,M=(o,f,d,u=0)=>{for(let m=u;m<f.length;m+=R)P({object:o,created:f.slice(m,m+R),at:d})},L=(o,f,d)=>{let u=f.filter(m=>h.safeParse(m).success);u.length===0||!S.safeParse(o).success||M(o,u,d??new Date().toISOString())};return{runId:e.runId,note:L,noteUnanswered:(o,f)=>L(o,f.filter(d=>!D.delete(d.slice(0,15)))),sending:(o,f,d)=>{if(f<=0||!S.safeParse(o).success)return;let u=d?.job!==void 0&&h.safeParse(d.job).success?d.job:"";u!==""?i.set(o,u):i.delete(o),P({sending:{object:o,rows:f,at:new Date().toISOString(),...u!==""?{job:u}:{},...d?.upsert?{upsert:!0}:{}}})},answered:(o,f)=>{if(!S.safeParse(o).success)return;let d=f.filter(C=>h.safeParse(C).success),u=i.get(o);i.delete(o);for(let C of d)D.add(C.slice(0,15));let m=new Date().toISOString();P({object:o,created:d.slice(0,R),at:m,...u!==void 0?{job:u}:{}}),M(o,d,m,R)},writing:(o,f)=>{if(f<=0||!S.safeParse(o).success)return;let d={writing:{object:o,rows:f,at:new Date().toISOString()}};y?P(d):O??=d},touched:(o,f)=>{f<=0||!S.safeParse(o).success||P({touched:{object:o,rows:f,at:new Date().toISOString()}})},overwriting:(o,f,d,u)=>{if(!S.safeParse(o).success||!Pe.safeParse(f).success)return;let m=d.filter(z=>h.safeParse(z).success);if(m.length===0)return;c.candidates(o,f,m);let C=new Date().toISOString(),q=new Map((u??[]).flatMap(z=>h.safeParse(z.id).success&&w.safeParse(z.at).success?[[z.id.slice(0,15),{id:z.id,at:z.at,...z.by!==void 0&&h.safeParse(z.by).success?{by:z.by}:{}}]]:[]));for(let z=0;z<m.length;z+=R){let U=m.slice(z,z+R),H=U.flatMap(X=>{let F=q.get(X.slice(0,15));return F?[F]:[]});P({overwriting:{object:o,backup:f,ids:U,...H.length>0?{held:H}:{},at:C}})}},overwrote:(o,f)=>{if(!S.safeParse(o).success)return;let d=f.filter(m=>h.safeParse(m).success);c.answer(o,d);let u=new Date().toISOString();for(let m=0;m===0||m<d.length;m+=R)P({overwrote:{object:o,notWritten:d.slice(m,m+R),at:u}})},deleted:(o,f)=>{if(!S.safeParse(o).success)return;let d=f.filter(m=>h.safeParse(m).success),u=new Date().toISOString();for(let m=0;m<d.length;m+=R)P({deleted:{object:o,ids:d.slice(m,m+R),at:u}})},unkept:(o,f)=>{if(!S.safeParse(o).success)return;let d=f.filter(u=>S.safeParse(u).success);d.length!==0&&P({unkept:{object:o,fields:d.slice(0,800),why:"encrypted",at:new Date().toISOString()}})},checkpoint:o=>{let f=ze.safeParse({checkpoint:o});f.success&&(y?P(f.data):K=f.data)},runUser:o=>{h.safeParse(o).success&&(y?P({runUser:o}):n.runUserId=o)},overwrittenCount:()=>c.count,flush:async()=>(await a,g),end:async o=>{await a,!(!l||g!==void 0)&&(P({end:{at:o.at??new Date().toISOString(),status:o.status,...o.cancelled?{cancelled:!0}:{}}}),await a)}}}idMap(){return this.links??=new Z(this.deps),this.links}async get(e){let t;try{t=await this.deps.readFile(this.runPath(e))}catch{return}let r=ve(t);if(!r||r.runId!==e)return;let n=await this.readRemoval(e);return n?{...r,removal:n}:r}async list(){let e=[];for(let t of await this.deps.listFiles(this.dir)){if(!t.name.endsWith(".ndjson"))continue;let r;try{r=await this.deps.readFile(A.join(this.dir,t.name))}catch{continue}let n=ve(r);if(!n)continue;let i=await this.readRemoval(n.runId);e.push(i?{...n,removal:i}:n)}return e.sort((t,r)=>Date.parse(r.startedAt)-Date.parse(t.startedAt)||0)}updateRemoval(e,t){let r=this.queue.then(async()=>{let n=t(await this.readRemoval(e)??{}),i=this.removalPath(e),c=`${i}.${process.pid}.tmp`;await this.deps.mkdir(this.dir),await this.deps.writeFile(c,JSON.stringify({version:1,...n})),await this.deps.rename(c,i)});return this.queue=r.catch(()=>{}),r}async answerInFlight(e,t,r,n,i){if(!S.safeParse(t).success)return!1;let c=this.runPath(e);try{await this.deps.readFile(c)}catch{return!1}let l=r.filter(y=>h.safeParse(y).success),a=i!==void 0&&h.safeParse(i).success?{job:i}:{},g=[];for(let y=0;y===0||y<l.length;y+=R)g.push(JSON.stringify({object:t,created:l.slice(y,y+R),at:n,...a}));return await this.deps.appendFile(c,`
|
|
17
|
+
${g.join(`
|
|
18
|
+
`)}
|
|
19
|
+
`),!0}async forget(e){await this.deps.rm(this.runPath(e)),await this.deps.rm(this.removalPath(e)),await this.deps.rm(this.scenarioPath(e))}async readRemoval(e){let t;try{t=JSON.parse(await this.deps.readFile(this.removalPath(e)))}catch{return}return pt(t)}async keepWithinBounds(e){let t=await this.deps.listFiles(this.dir),r=t.reduce((a,g)=>a+g.size,0);if(r<=this.maxBytes)return;let n=new Map(t.map(a=>[a.name,a.size])),i=(await this.list()).filter(a=>a.runId!==e).reverse(),c=a=>(n.get(A.basename(this.runPath(a.runId)))??0)+(n.get(A.basename(this.removalPath(a.runId)))??0)+(n.get(A.basename(this.scenarioPath(a.runId)))??0),l=async a=>{await this.forget(a.runId),r-=c(a)};for(let a of i){if(r<=this.maxBytes)return;ie(a)&&await l(a)}for(let a of i){if(r<=this.hardMaxBytes)return;if(!ie(a)){await l(a);try{this.deps.onDropped?.(a)}catch{}}}}};export{vt as a,bt as b,Ge as c,Ve as d,Qe as e,ye as f,et as g,It as h,R as i,tt as j,Pe as k,pt as l,At as m,ve as n,te as o,ke as p,Nt as q,Ft as r,Oe as s,_t as t,ht as u,ie as v,Mt as w,Et as x,Dt as y,se as z};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a as O,b as T,c as k}from"./chunk-
|
|
7
|
+
import{a as O,b as T,c as k}from"./chunk-WVVFR4E3.mjs";import{a as A,b as S,c as l,d as w,e as y,h as J,i as F}from"./chunk-H33DVU3D.mjs";import{c as R}from"./chunk-ZVU7MD2S.mjs";import{Ib as x}from"./chunk-J347SPU6.mjs";var $="SELECT CronJobDetail.Name, CronJobDetail.JobType, CronExpression, State, NextFireTime, PreviousFireTime, OwnerId FROM CronTrigger",C={0:"Data Export",3:"Dashboard Refresh",4:"Reporting Snapshot",7:"Scheduled Apex",8:"Report Run",9:"Batch Job",A:"Analytics Notification"},M=new Set(["COMPLETE","DELETED"]),z=200,_=/^005[A-Za-z0-9]{12}(?:[A-Za-z0-9]{3})?$/;function q(n){return n===void 0?"job of no type":C[n]??`job type ${n}`}function P(n){let e=[];for(let t=0;t<n.length;t+=z)e.push(n.slice(t,t+z));return e}function g(n){return n.slice(0,15)}async function j(n){let e;try{e=await n.query($)}catch(s){return{unread:A(s,n.timeout)}}let t=[];for(let s of e.records){let r=s.CronJobDetail,o=typeof r=="object"&&r!==null?r:{},f=l(o,"Name"),a=l(s,"State");if(f===void 0||a===void 0)continue;let c=l(s,"CronExpression"),E=y(s.NextFireTime),I=y(s.PreviousFireTime),m=l(s,"OwnerId");t.push({job:{name:f.slice(0,255),type:q(l(o,"JobType")),...c!==void 0?{cronExpression:c.slice(0,255)}:{},state:a.slice(0,40),...E!==void 0?{nextFireTime:E}:{},...I!==void 0?{previousFireTime:I}:{}},...m!==void 0&&_.test(m)?{ownerId:m}:{}})}let u=[...new Set(t.flatMap(s=>s.ownerId!==void 0&&b(s.job)?[g(s.ownerId)]:[]))],i=new Map,d;try{for(let s of P(u)){let r=s.map(a=>`'${a}'`).join(", "),o=await n.query(`SELECT Id, Username, IsActive FROM User WHERE Id IN (${r})`);for(let a of o.records){let c=l(a,"Id");c!==void 0&&i.set(g(c),{...i.get(g(c)),username:l(a,"Username"),active:w(a,"IsActive")})}let f=await n.query(`SELECT UserId, IsFrozen FROM UserLogin WHERE UserId IN (${r})`);for(let a of f.records){let c=l(a,"UserId");c!==void 0&&i.set(g(c),{...i.get(g(c)),frozen:w(a,"IsFrozen")})}}}catch(s){d=A(s,n.timeout)}return{jobs:t.map(({job:s,ownerId:r})=>{let o=r!==void 0?i.get(g(r)):void 0;return{...s,...o?.username!==void 0?{owner:o.username.slice(0,255)}:{},...o?.active!==void 0?{ownerActive:o.active}:{},...o?.frozen!==void 0?{ownerFrozen:o.frozen}:{}}}),truncated:e.truncated,...d!==void 0?{ownersUnread:d}:{}}}function b(n){return!M.has(n.state.toUpperCase())}function h(n){return`${n.type}\0${n.name}`}function U(n,e){return{version:1,savedAt:e.savedAt,organizationId:e.organizationId,host:e.host,jobs:n.map(t=>({name:t.name,type:t.type,...t.cronExpression!==void 0?{cronExpression:t.cronExpression}:{},state:t.state,...t.nextFireTime!==void 0?{nextFireTime:t.nextFireTime}:{},...t.previousFireTime!==void 0?{previousFireTime:t.previousFireTime}:{},...t.owner!==void 0?{owner:t.owner}:{}}))}}function v(n,e){return{status:n,name:e.name,type:e.type,...e.cronExpression!==void 0?{cronExpression:e.cronExpression}:{},...e.owner!==void 0?{owner:e.owner}:{},...e.nextFireTime!==void 0?{nextFireTime:e.nextFireTime}:{}}}var D=["gone","inactive","frozen","new"];function N(n,e){let t=n.jobs.filter(b),u=e?.kept.inventory.jobs.filter(b)??[],i=new Map;for(let r of u)i.set(h(r),(i.get(h(r))??0)+1);let d=[],p=0;for(let r of t){let o=h(r),f=(i.get(o)??0)>0;f&&i.set(o,(i.get(o)??0)-1),r.ownerActive===!1?d.push(v("inactive",r)):r.ownerFrozen===!0?d.push(v("frozen",r)):e!==void 0&&!f?d.push(v("new",r)):p++}if(e!==void 0&&!n.truncated)for(let r of u){let o=h(r);(i.get(o)??0)!==0&&(i.set(o,(i.get(o)??0)-1),d.push(v("gone",r)))}d.sort((r,o)=>D.indexOf(r.status)-D.indexOf(o.status)||r.name.localeCompare(o.name));let s=[n.truncated?`more jobs than ${n.jobs.length} were there: those past them were not read, and none is said gone`:void 0,n.ownersUnread!==void 0?`the users the jobs run as could not be read (${n.ownersUnread}): a job run as a frozen or inactive user is not told`:void 0].filter(r=>r!==void 0);return{now:t.length,...e!==void 0?{against:{savedAt:e.kept.inventory.savedAt,organizationId:e.kept.inventory.organizationId,refreshed:e.refreshed}}:{},jobs:d,kept:p,...s.length>0?{unread:s.join("; ")}:{}}}function V(n,e){let t=d=>typeof d=="object"?{productionHosts:d.productionHosts??[],fields:d.fields??[]}:{productionHosts:[],fields:[]};if(e==="verb")return{deliverability:!0,schedules:n?.schedules!==!1,endpoints:n?.endpoints===!1?!1:t(n?.endpoints)};let u=n?.schedules===!0,i=n?.endpoints!==void 0&&n.endpoints!==!1?t(n.endpoints):!1;if(!(!u&&i===!1))return{deliverability:!0,schedules:u,endpoints:i}}function X(n){let e=0,t=0;if(n.deliverability&&(e+=1,t+=2),n.schedules&&(e+=1,t+=3),n.endpoints!==!1){let u=J(n.endpoints.fields);e+=u,t+=u}return{fewest:e,most:t}}function H(n){let e=(n.schedules?.jobs??[]).filter(i=>i.status!=="new").length,t=n.endpoints?.found.length??0,u=n.deliverability?.read==="open"?1:0;return e+t+u}async function ee(n,e){let t=(n.now??(()=>new Date))(),u=new S(n.transport,{...n.timeoutMs!==void 0?{timeoutMs:n.timeoutMs}:{}}),i=[],d,p=!1,s={org:{organizationId:e.org.organizationId,kind:e.org.kind,...e.org.alias!==void 0?{alias:e.org.alias}:{},...e.org.host!==void 0?{host:e.org.host}:{}},at:t.toISOString()};if(e.asked.deliverability){let o=await R(u.asTransport(),{timeoutMs:u.timeout}).catch(f=>({reading:{unread:f instanceof Error?f.message:String(f)},requests:0}));s.deliverability="unread"in o.reading?{unread:o.reading.unread.slice(0,2e3)}:{read:o.reading.level==="all"?"open":"closed"}}if(e.asked.schedules){let o=await j(u);if("unread"in o)s.schedules={now:0,jobs:[],kept:0,unread:o.unread.slice(0,2e3)},e.save===!0&&(d="the scheduled jobs were not read");else{let f;if(e.org.host!==void 0){let a=await T(n.journalDir,e.org.host);for(let c of a.setAside)i.push(`inventory set aside: ${c.path}: ${c.why}`);a.unread!==void 0&&i.push(`no inventory read: ${a.unread}`),f=k(a.kept,e.org.organizationId)}if(s.schedules=N(o,f),e.save===!0)if(e.org.host===void 0)p=!0,d="the org's host is not known, and an inventory is kept by its host";else if(o.truncated)d="more jobs were there than were read: an inventory of part of them would have the next comparison call the others new";else try{let a=await O(n.journalDir,U(o.jobs,{savedAt:t.toISOString(),organizationId:e.org.organizationId,host:e.org.host}));s.schedules={...s.schedules,saved:a}}catch(a){p=!0,d=`it could not be written: ${a instanceof Error?a.message:String(a)}`}}}else e.save===!0&&(d="the file reads no scheduled jobs (audits.schedules: false)");return e.asked.endpoints!==!1&&(s.endpoints=await F(u,{...e.org.host!==void 0?{host:e.org.host}:{},productionHosts:e.asked.endpoints.productionHosts,fields:e.asked.endpoints.fields})),d!==void 0&&i.push(`nothing saved: ${d}`),{result:x.parse({...s,apiRequests:u.requests,findings:H(s)}),notes:i,...p&&d!==void 0?{saveFailed:d}:{}}}export{V as a,X as b,H as c,ee as d};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a as c}from"./chunk-
|
|
7
|
+
import{a as c}from"./chunk-3L6DVNCR.mjs";import{Ae as b,ze as a}from"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{c as ConditionalRouter,a as conditionDefect,b as evaluateCondition};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a as M,b as T,d as $,e as N}from"./chunk-CI2O7WBH.mjs";import{g as L,i as _,j}from"./chunk-FG4Y4ZVL.mjs";import{h as I}from"./chunk-TZE3Y7IQ.mjs";import{b as p}from"./chunk-CA5NAXSU.mjs";import{B as D,Zc as P,_c as C}from"./chunk-CRPLDXJU.mjs";import{e as A,l as E}from"./chunk-WZQEK4WT.mjs";var g="No record was read or deleted.",V="Nothing was deleted.";function m(e,t){return{allowed:!1,refusal:{code:"PRODUCTION",message:`${e} is a production org, or cannot be told from one: ${t}. Emptying is for sandboxes, scratch orgs and Developer Edition orgs: SandForge never empties objects of a production org, and nothing lifts this. ${g}`}}}async function ce(e,t){let{orgName:n,registered:a}=t;if(a===void 0)return m(n,"SandForge has no record of what kind of org it is");if(!C(a))return m(n,"SandForge has it registered as a production org");let o;try{o=await M(e)}catch(s){let d=$(s);return d!==void 0?{allowed:!1,refusal:{code:"ORG_UNTYPED",message:`${N(n,s,d)} SandForge empties no org it cannot tell from a production one. ${g}`}}:m(n,`it did not say what org it is (${p(s)})`)}if(T(o))return m(n,o.edition?`its Organization record says IsSandbox false, edition ${o.edition}`:"its Organization record says IsSandbox false, and no edition");let r=P(a);return r==="production"?m(n,"SandForge has it registered as a production org"):r==="staging"&&t.mode==="org"?{allowed:!1,refusal:{code:"STAGING_ORG",message:`${n} is a sandbox marked Staging: it holds real data, and SandForge never empties the whole of it. Pick the objects to empty instead, which Production Guard asks about, or unmark it on the Organizations page if it holds nobody's work. ${g}`}}:{allowed:!0,org:o,tier:r}}var B=["PermissionsViewAllData","PermissionsModifyAllData","PermissionsBulkApiHardDelete"];async function le(e){let t=async o=>(await e.query(`SELECT ${o.join(", ")} FROM UserPermissionAccess`)).records[0]??{},n,a;try{n=await t(B)}catch(o){try{n=await t(B.slice(0,2)),a=`whether the user has Bulk API Hard Delete could not be read: ${p(o)}`}catch(r){return{viewAllData:!1,modifyAllData:!1,hardDelete:!1,unread:p(r)}}}return{viewAllData:n.PermissionsViewAllData===!0,modifyAllData:n.PermissionsModifyAllData===!0,hardDelete:n.PermissionsBulkApiHardDelete===!0,...a!==void 0?{unread:a}:{}}}function pe(e){return{code:"HARD_DELETE_NOT_PERMITTED",message:"Deleting for good needs Bulk API Hard Delete, and the user SandForge deletes as "+(e.unread!==void 0?`could not be read to have it (${e.unread}). `:"doesn't have it: Salesforce refuses the job as it is opened. ")+"Give the user a permission set with Bulk API Hard Delete, or empty to the recycle bin, which Undo brings back. Nothing was deleted."}}var ue=60*6e4,v=2e3,G=/^005[A-Za-z0-9]{12}(?:[A-Za-z0-9]{3})?$/;async function fe(e,t,n,a){let o=n.filter(c=>G.test(c)).map(c=>c.slice(0,15)),r=o.length>0?` AND LastModifiedById NOT IN (${o.map(c=>`'${c}'`).join(", ")})`:"",s=new Map,d=[],i=!1;for(let c of t){let O=I(c);try{let y=await e.query(`SELECT LastModifiedById, LastModifiedDate FROM ${O} WHERE LastModifiedDate >= ${a}${r} LIMIT ${v}`);y.records.length>=v&&(i=!0);for(let W of y.records){let{LastModifiedById:k,LastModifiedDate:b}=W;if(typeof k!="string"||!G.test(k))continue;let S=k.slice(0,15),w=typeof b=="string"&&!Number.isNaN(Date.parse(b))?b:"",f=s.get(S);if(!f){s.set(S,{userId:k,records:1,lastChangedAt:w});continue}f.records+=1,w!==""&&(f.lastChangedAt===""||Date.parse(w)>Date.parse(f.lastChangedAt))&&(f.lastChangedAt=w)}}catch(y){d.push(`${c}: ${p(y)}`)}}let l=[...s.keys()].sort();return{people:l.map(c=>s.get(c).userId),...i?{atLeast:!0}:{},who:l.map(c=>s.get(c)),unread:d}}var q=200;async function me(e,t){let n=t.who.map(r=>r.userId).slice(0,q);if(n.length===0)return t;let a;try{a=(await e.query(`SELECT Id, Name FROM User WHERE Id IN (${n.map(r=>`'${r}'`).join(", ")})`)).records}catch{return t}let o=new Map;for(let r of a){let{Id:s,Name:d}=r;typeof s=="string"&&typeof d=="string"&&d.trim()!==""&&o.set(s.slice(0,15),d.trim())}return{...t,who:t.who.map(r=>{let s=o.get(r.userId.slice(0,15));return s!==void 0?{...r,name:s}:r})}}function K(e){let t;for(let n of e)n.lastChangedAt!==""&&(t===void 0||Date.parse(n.lastChangedAt)>Date.parse(t))&&(t=n.lastChangedAt);return t}function ge(e,t,n={}){if(n.accepted===!0)return;let a=new Set((n.accepted??[]).map(c=>c.slice(0,15))),o=t.people.filter(c=>!a.has(c.slice(0,15)));if(o.length===0)return;let r=o.length,s=`${t.atLeast?"At least ":""}${r} ${r===1?"person":"people"}`,d=K(t.who.filter(c=>o.includes(c.userId))),i=a.size>0?" the simulation did not name":"",l=n.voice==="page"?"or tick the box that lets their work go, to empty all the same":"or add --accept-people-active to empty all the same";return{code:"PEOPLE_ACTIVE",message:`${s}${i} other than the user SandForge deletes as changed records of these objects in ${e} in the last hour${d!==void 0?`, the last at ${d}`:""}: emptying them would take their work. Empty once they have stopped, ${l}. `+V}}var h=1024,z="COPY_SANDBOX",J=E({DataStorageMB:E({Max:A()}).loose()}).loose();async function Re(e){if(e.orgType!=="Sandbox")return;let t="Empty it whole from DataOps Emptying in the panel, which knows whether it is marked Staging, or pick the objects to empty with --objects, which Production Guard asks about. "+g,n;try{n=J.parse(await e.limits()).DataStorageMB.Max}catch(a){return{code:z,message:`${e.target} is a sandbox whose data storage could not be read (${p(a)}): this command cannot tell a Partial Copy or Full sandbox, which may hold real data, from a developer's. ${t}`}}if(!(n<=h))return{code:z,message:`${e.target} is a Partial Copy or Full sandbox, by its data storage (${n.toLocaleString("en-US")} MB, past the ${h.toLocaleString("en-US")} MB of a Developer Pro): it may hold real data, and this command cannot see whether it is marked Staging in the extension, where such a sandbox is never emptied whole. ${t}`}}var X="Nothing was read or written.",Z=new Set([L,_,j,"Document"].map(e=>e.toLowerCase()));function Q(e){return Z.has(e.toLowerCase())}function ee(e,t){let n=new Map(e.objects.map(i=>[i.objectApiName.toLowerCase(),i])),a=new Set(t.objects.map(i=>i.toLowerCase())),o=new Set(t.excluded.map(i=>i.toLowerCase())),r=[...t.objects,...t.excluded].filter(i=>!n.has(i.toLowerCase())),s=[],d=[];for(let i of e.objects){let l=i.objectApiName.toLowerCase(),c=O=>{d.push({objectApiName:i.objectApiName,records:i.records,reason:O})};Q(i.objectApiName)?c("fileContentNotKept"):a.size>0&&!a.has(l)||o.has(l)||i.customSetting!==void 0&&!t.customSettings?c("excluded"):s.push(i)}return{replayed:s,leftOut:d,unknown:[...new Set(r)],records:s.reduce((i,l)=>i+l.records,0)}}function U(e){let t=e.dataStorageMaxMB!==void 0?{dataStorageMaxMB:e.dataStorageMaxMB}:{};return e.staging===!0?{kind:"real",why:"staging",...t}:e.tier==="scratch"?{kind:"free",why:"scratch",...t}:e.tier==="developer"?{kind:"free",why:"developer",...t}:e.dataStorageMaxMB===void 0?{kind:"unknown"}:e.dataStorageMaxMB>h?{kind:"real",why:"storage",dataStorageMaxMB:e.dataStorageMaxMB}:{kind:"free",why:"developerSandbox",dataStorageMaxMB:e.dataStorageMaxMB}}function H(e,t){return e!==void 0&&t!==void 0&&e.slice(0,15)===t.slice(0,15)}var te=/\.my\.salesforce\.com$/;function F(e){if(e!==void 0)try{let t=new URL(e).hostname.toLowerCase();return te.test(t)?t:void 0}catch{return}}function Y(e,t){if(e.tier!=="sandbox")return;if((t.formerOrganizationIds??[]).some(a=>H(a,e.organizationId)))return"formerOrganizationId";if(t.username!==void 0&&t.username.trim().toLowerCase()===e.username.trim().toLowerCase())return"username";let n=F(t.instanceUrl);if(n!==void 0&&n===F(e.instanceUrl))return"myDomain"}var x={mask:"replay it masked (--mask)",noRealData:"declare that it holds no real data (--no-real-data), which the audit trail keeps",fewerObjects:"name the objects to replay (--objects A,B) or leave some out (--exclude-object X)",rewind:"rewind that org to the checkpoint instead"};function u(e,t,n){return{code:e,message:`${t} ${X}`,params:n}}function R(e){return e.toLocaleString("en-US")}function Se(e){let t={...x,...e.words},{checkpoint:n,target:a}=e;if(n===void 0)return u("REPLAY_CHECKPOINT_UNUSABLE",`Checkpoint ${e.checkpointId} does not read: its file is damaged, and what it holds cannot be told.`,{checkpoint:e.checkpointId,why:"damaged"});let o=n.name;if(n.status!=="ready")return u("REPLAY_CHECKPOINT_UNUSABLE",n.status==="taking"?`Checkpoint '${o}' is still being taken, or its take stopped before its end: it holds part of its org at most.`:`The take of checkpoint '${o}' failed: it holds part of its org at most.`,{checkpoint:o,why:n.status});let r=ae(n,a,t);if(r!==void 0)return r;let s=oe(n,e.choices,a,t);if(s!==void 0)return s;let d=ee(n,e.choices);if(d.records===0){let l=d.replayed.length===0?"every object it holds is left out":"the objects replayed hold no record";return u("REPLAY_NOTHING",`Nothing of checkpoint '${o}' is left to replay into ${a.name}: ${l}${ne(d)?", and a checkpoint keeps no file\u2019s content":""}.`,{checkpoint:o,target:a.name})}let i=e.maxRecords??D;if(d.records>i)return u("REPLAY_TOO_MANY",`Checkpoint '${o}' would replay ${R(d.records)} records into ${a.name}, past the ${R(i)} a replay sets up at once: ${t.fewerObjects}.`,{checkpoint:o,target:a.name,records:d.records,max:i})}function ne(e){return e.leftOut.length>0&&e.leftOut.every(t=>t.reason==="fileContentNotKept")}function ae(e,t,n={}){if(!H(t.organizationId,e.org.organizationId))return;let a=n.rewind??x.rewind;return u("REPLAY_SAME_ORG",`${t.name} is the org checkpoint '${e.name}' was taken of: a replay creates copies of its records in another org, beside what that org holds. To bring ${t.name} back to that moment, ${a}.`,{checkpoint:e.name,target:t.name})}function oe(e,t,n,a={}){let o={...x,...a},r=U(e.org);if(r.kind==="free"||t.mask||Y(e.org,n)!==void 0)return;let s=e.name;if(r.kind==="unknown")return t.noRealData===!0?void 0:u("REPLAY_COPY_UNKNOWN",`Checkpoint '${s}' is of a sandbox and does not say which: taken before SandForge 1.81, it keeps no data storage, and a Partial Copy or a Full sandbox holds production\u2019s records. To replay it into ${n.name}, ${o.mask}, or ${o.noRealData}.`,{checkpoint:s,target:n.name});let d=r.why==="staging"?"a sandbox marked Staging, which holds real data":`a Partial Copy or Full sandbox, by its data storage (${R(r.dataStorageMaxMB??0)} MB, past the ${R(h)} MB of a Developer Pro), which may hold real data`;return u("REPLAY_REAL_DATA",`Checkpoint '${s}' is of ${d}: it goes into another org masked only. To replay it into ${n.name}, ${o.mask}.`,{checkpoint:s,target:n.name,why:r.why,...r.dataStorageMaxMB!==void 0?{mb:r.dataStorageMaxMB}:{}})}function Ae(e,t,n){let a=U(e.org),o=Y(e.org,n),r=a.kind==="unknown"&&!t.mask&&t.noRealData===!0;return{replaySource:a.kind==="free"||a.kind==="real"?a.why:"unknown",...a.kind!=="unknown"&&a.dataStorageMaxMB!==void 0?{replaySourceStorageMB:a.dataStorageMaxMB}:{},replayMasked:t.mask,replayContactPoints:t.contactPoints,...r?{replayNoRealDataDeclared:!0}:{},...o!==void 0&&!t.mask&&a.kind!=="free"?{replayIntoSameSandbox:o}:{}}}export{g as a,ce as b,le as c,pe as d,ue as e,fe as f,me as g,ge as h,Re as i,Q as j,ee as k,U as l,Y as m,x as n,Se as o,Ae as p};
|
|
7
|
+
import{a as M,b as T,d as $,e as N}from"./chunk-65AMXOQU.mjs";import{g as L,i as _,j}from"./chunk-DAUX63UB.mjs";import{h as I}from"./chunk-TZE3Y7IQ.mjs";import{b as p}from"./chunk-CA5NAXSU.mjs";import{B as D,ed as P,fd as C}from"./chunk-J347SPU6.mjs";import{e as A,l as E}from"./chunk-WZQEK4WT.mjs";var g="No record was read or deleted.",V="Nothing was deleted.";function m(e,t){return{allowed:!1,refusal:{code:"PRODUCTION",message:`${e} is a production org, or cannot be told from one: ${t}. Emptying is for sandboxes, scratch orgs and Developer Edition orgs: SandForge never empties objects of a production org, and nothing lifts this. ${g}`}}}async function ce(e,t){let{orgName:n,registered:a}=t;if(a===void 0)return m(n,"SandForge has no record of what kind of org it is");if(!C(a))return m(n,"SandForge has it registered as a production org");let o;try{o=await M(e)}catch(s){let d=$(s);return d!==void 0?{allowed:!1,refusal:{code:"ORG_UNTYPED",message:`${N(n,s,d)} SandForge empties no org it cannot tell from a production one. ${g}`}}:m(n,`it did not say what org it is (${p(s)})`)}if(T(o))return m(n,o.edition?`its Organization record says IsSandbox false, edition ${o.edition}`:"its Organization record says IsSandbox false, and no edition");let r=P(a);return r==="production"?m(n,"SandForge has it registered as a production org"):r==="staging"&&t.mode==="org"?{allowed:!1,refusal:{code:"STAGING_ORG",message:`${n} is a sandbox marked Staging: it holds real data, and SandForge never empties the whole of it. Pick the objects to empty instead, which Production Guard asks about, or unmark it on the Organizations page if it holds nobody's work. ${g}`}}:{allowed:!0,org:o,tier:r}}var B=["PermissionsViewAllData","PermissionsModifyAllData","PermissionsBulkApiHardDelete"];async function le(e){let t=async o=>(await e.query(`SELECT ${o.join(", ")} FROM UserPermissionAccess`)).records[0]??{},n,a;try{n=await t(B)}catch(o){try{n=await t(B.slice(0,2)),a=`whether the user has Bulk API Hard Delete could not be read: ${p(o)}`}catch(r){return{viewAllData:!1,modifyAllData:!1,hardDelete:!1,unread:p(r)}}}return{viewAllData:n.PermissionsViewAllData===!0,modifyAllData:n.PermissionsModifyAllData===!0,hardDelete:n.PermissionsBulkApiHardDelete===!0,...a!==void 0?{unread:a}:{}}}function pe(e){return{code:"HARD_DELETE_NOT_PERMITTED",message:"Deleting for good needs Bulk API Hard Delete, and the user SandForge deletes as "+(e.unread!==void 0?`could not be read to have it (${e.unread}). `:"doesn't have it: Salesforce refuses the job as it is opened. ")+"Give the user a permission set with Bulk API Hard Delete, or empty to the recycle bin, which Undo brings back. Nothing was deleted."}}var ue=60*6e4,v=2e3,G=/^005[A-Za-z0-9]{12}(?:[A-Za-z0-9]{3})?$/;async function fe(e,t,n,a){let o=n.filter(c=>G.test(c)).map(c=>c.slice(0,15)),r=o.length>0?` AND LastModifiedById NOT IN (${o.map(c=>`'${c}'`).join(", ")})`:"",s=new Map,d=[],i=!1;for(let c of t){let O=I(c);try{let y=await e.query(`SELECT LastModifiedById, LastModifiedDate FROM ${O} WHERE LastModifiedDate >= ${a}${r} LIMIT ${v}`);y.records.length>=v&&(i=!0);for(let W of y.records){let{LastModifiedById:k,LastModifiedDate:b}=W;if(typeof k!="string"||!G.test(k))continue;let S=k.slice(0,15),w=typeof b=="string"&&!Number.isNaN(Date.parse(b))?b:"",f=s.get(S);if(!f){s.set(S,{userId:k,records:1,lastChangedAt:w});continue}f.records+=1,w!==""&&(f.lastChangedAt===""||Date.parse(w)>Date.parse(f.lastChangedAt))&&(f.lastChangedAt=w)}}catch(y){d.push(`${c}: ${p(y)}`)}}let l=[...s.keys()].sort();return{people:l.map(c=>s.get(c).userId),...i?{atLeast:!0}:{},who:l.map(c=>s.get(c)),unread:d}}var q=200;async function me(e,t){let n=t.who.map(r=>r.userId).slice(0,q);if(n.length===0)return t;let a;try{a=(await e.query(`SELECT Id, Name FROM User WHERE Id IN (${n.map(r=>`'${r}'`).join(", ")})`)).records}catch{return t}let o=new Map;for(let r of a){let{Id:s,Name:d}=r;typeof s=="string"&&typeof d=="string"&&d.trim()!==""&&o.set(s.slice(0,15),d.trim())}return{...t,who:t.who.map(r=>{let s=o.get(r.userId.slice(0,15));return s!==void 0?{...r,name:s}:r})}}function K(e){let t;for(let n of e)n.lastChangedAt!==""&&(t===void 0||Date.parse(n.lastChangedAt)>Date.parse(t))&&(t=n.lastChangedAt);return t}function ge(e,t,n={}){if(n.accepted===!0)return;let a=new Set((n.accepted??[]).map(c=>c.slice(0,15))),o=t.people.filter(c=>!a.has(c.slice(0,15)));if(o.length===0)return;let r=o.length,s=`${t.atLeast?"At least ":""}${r} ${r===1?"person":"people"}`,d=K(t.who.filter(c=>o.includes(c.userId))),i=a.size>0?" the simulation did not name":"",l=n.voice==="page"?"or tick the box that lets their work go, to empty all the same":"or add --accept-people-active to empty all the same";return{code:"PEOPLE_ACTIVE",message:`${s}${i} other than the user SandForge deletes as changed records of these objects in ${e} in the last hour${d!==void 0?`, the last at ${d}`:""}: emptying them would take their work. Empty once they have stopped, ${l}. `+V}}var h=1024,z="COPY_SANDBOX",J=E({DataStorageMB:E({Max:A()}).loose()}).loose();async function Re(e){if(e.orgType!=="Sandbox")return;let t="Empty it whole from DataOps Emptying in the panel, which knows whether it is marked Staging, or pick the objects to empty with --objects, which Production Guard asks about. "+g,n;try{n=J.parse(await e.limits()).DataStorageMB.Max}catch(a){return{code:z,message:`${e.target} is a sandbox whose data storage could not be read (${p(a)}): this command cannot tell a Partial Copy or Full sandbox, which may hold real data, from a developer's. ${t}`}}if(!(n<=h))return{code:z,message:`${e.target} is a Partial Copy or Full sandbox, by its data storage (${n.toLocaleString("en-US")} MB, past the ${h.toLocaleString("en-US")} MB of a Developer Pro): it may hold real data, and this command cannot see whether it is marked Staging in the extension, where such a sandbox is never emptied whole. ${t}`}}var X="Nothing was read or written.",Z=new Set([L,_,j,"Document"].map(e=>e.toLowerCase()));function Q(e){return Z.has(e.toLowerCase())}function ee(e,t){let n=new Map(e.objects.map(i=>[i.objectApiName.toLowerCase(),i])),a=new Set(t.objects.map(i=>i.toLowerCase())),o=new Set(t.excluded.map(i=>i.toLowerCase())),r=[...t.objects,...t.excluded].filter(i=>!n.has(i.toLowerCase())),s=[],d=[];for(let i of e.objects){let l=i.objectApiName.toLowerCase(),c=O=>{d.push({objectApiName:i.objectApiName,records:i.records,reason:O})};Q(i.objectApiName)?c("fileContentNotKept"):a.size>0&&!a.has(l)||o.has(l)||i.customSetting!==void 0&&!t.customSettings?c("excluded"):s.push(i)}return{replayed:s,leftOut:d,unknown:[...new Set(r)],records:s.reduce((i,l)=>i+l.records,0)}}function U(e){let t=e.dataStorageMaxMB!==void 0?{dataStorageMaxMB:e.dataStorageMaxMB}:{};return e.staging===!0?{kind:"real",why:"staging",...t}:e.tier==="scratch"?{kind:"free",why:"scratch",...t}:e.tier==="developer"?{kind:"free",why:"developer",...t}:e.dataStorageMaxMB===void 0?{kind:"unknown"}:e.dataStorageMaxMB>h?{kind:"real",why:"storage",dataStorageMaxMB:e.dataStorageMaxMB}:{kind:"free",why:"developerSandbox",dataStorageMaxMB:e.dataStorageMaxMB}}function H(e,t){return e!==void 0&&t!==void 0&&e.slice(0,15)===t.slice(0,15)}var te=/\.my\.salesforce\.com$/;function F(e){if(e!==void 0)try{let t=new URL(e).hostname.toLowerCase();return te.test(t)?t:void 0}catch{return}}function Y(e,t){if(e.tier!=="sandbox")return;if((t.formerOrganizationIds??[]).some(a=>H(a,e.organizationId)))return"formerOrganizationId";if(t.username!==void 0&&t.username.trim().toLowerCase()===e.username.trim().toLowerCase())return"username";let n=F(t.instanceUrl);if(n!==void 0&&n===F(e.instanceUrl))return"myDomain"}var x={mask:"replay it masked (--mask)",noRealData:"declare that it holds no real data (--no-real-data), which the audit trail keeps",fewerObjects:"name the objects to replay (--objects A,B) or leave some out (--exclude-object X)",rewind:"rewind that org to the checkpoint instead"};function u(e,t,n){return{code:e,message:`${t} ${X}`,params:n}}function R(e){return e.toLocaleString("en-US")}function Se(e){let t={...x,...e.words},{checkpoint:n,target:a}=e;if(n===void 0)return u("REPLAY_CHECKPOINT_UNUSABLE",`Checkpoint ${e.checkpointId} does not read: its file is damaged, and what it holds cannot be told.`,{checkpoint:e.checkpointId,why:"damaged"});let o=n.name;if(n.status!=="ready")return u("REPLAY_CHECKPOINT_UNUSABLE",n.status==="taking"?`Checkpoint '${o}' is still being taken, or its take stopped before its end: it holds part of its org at most.`:`The take of checkpoint '${o}' failed: it holds part of its org at most.`,{checkpoint:o,why:n.status});let r=ae(n,a,t);if(r!==void 0)return r;let s=oe(n,e.choices,a,t);if(s!==void 0)return s;let d=ee(n,e.choices);if(d.records===0){let l=d.replayed.length===0?"every object it holds is left out":"the objects replayed hold no record";return u("REPLAY_NOTHING",`Nothing of checkpoint '${o}' is left to replay into ${a.name}: ${l}${ne(d)?", and a checkpoint keeps no file\u2019s content":""}.`,{checkpoint:o,target:a.name})}let i=e.maxRecords??D;if(d.records>i)return u("REPLAY_TOO_MANY",`Checkpoint '${o}' would replay ${R(d.records)} records into ${a.name}, past the ${R(i)} a replay sets up at once: ${t.fewerObjects}.`,{checkpoint:o,target:a.name,records:d.records,max:i})}function ne(e){return e.leftOut.length>0&&e.leftOut.every(t=>t.reason==="fileContentNotKept")}function ae(e,t,n={}){if(!H(t.organizationId,e.org.organizationId))return;let a=n.rewind??x.rewind;return u("REPLAY_SAME_ORG",`${t.name} is the org checkpoint '${e.name}' was taken of: a replay creates copies of its records in another org, beside what that org holds. To bring ${t.name} back to that moment, ${a}.`,{checkpoint:e.name,target:t.name})}function oe(e,t,n,a={}){let o={...x,...a},r=U(e.org);if(r.kind==="free"||t.mask||Y(e.org,n)!==void 0)return;let s=e.name;if(r.kind==="unknown")return t.noRealData===!0?void 0:u("REPLAY_COPY_UNKNOWN",`Checkpoint '${s}' is of a sandbox and does not say which: taken before SandForge 1.81, it keeps no data storage, and a Partial Copy or a Full sandbox holds production\u2019s records. To replay it into ${n.name}, ${o.mask}, or ${o.noRealData}.`,{checkpoint:s,target:n.name});let d=r.why==="staging"?"a sandbox marked Staging, which holds real data":`a Partial Copy or Full sandbox, by its data storage (${R(r.dataStorageMaxMB??0)} MB, past the ${R(h)} MB of a Developer Pro), which may hold real data`;return u("REPLAY_REAL_DATA",`Checkpoint '${s}' is of ${d}: it goes into another org masked only. To replay it into ${n.name}, ${o.mask}.`,{checkpoint:s,target:n.name,why:r.why,...r.dataStorageMaxMB!==void 0?{mb:r.dataStorageMaxMB}:{}})}function Ae(e,t,n){let a=U(e.org),o=Y(e.org,n),r=a.kind==="unknown"&&!t.mask&&t.noRealData===!0;return{replaySource:a.kind==="free"||a.kind==="real"?a.why:"unknown",...a.kind!=="unknown"&&a.dataStorageMaxMB!==void 0?{replaySourceStorageMB:a.dataStorageMaxMB}:{},replayMasked:t.mask,replayContactPoints:t.contactPoints,...r?{replayNoRealDataDeclared:!0}:{},...o!==void 0&&!t.mask&&a.kind!=="free"?{replayIntoSameSandbox:o}:{}}}export{g as a,ce as b,le as c,pe as d,ue as e,fe as f,me as g,ge as h,Re as i,Q as j,ee as k,U as l,Y as m,x as n,Se as o,Ae as p};
|
|
@@ -0,0 +1,7 @@
|
|
|
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,b,c,d,e,f,g,h,i}from"./chunk-DYHF6DNT.mjs";import"./chunk-QACFTHJM.mjs";import"./chunk-JRLYWVF4.mjs";import"./chunk-HLROVOR6.mjs";import"./chunk-VT6P3X6R.mjs";import"./chunk-34SMB5PA.mjs";import"./chunk-KWUS7UAV.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-K5PUMHZU.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as SCENARIO_PACK_FILE_SUFFIX,b as SCENARIO_PACK_SEARCH,i as findScenarioPack,e as findScenarioPackFiles,f as listScenarioPacks,c as nodeScenarioPackFiles,d as readScenarioPackText,h as saveScenarioPack,g as scenarioPackText};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a,b,c,d,e,f,g}from"./chunk-
|
|
7
|
+
import{a,b,c,d,e,f,g}from"./chunk-JV7K2ZHK.mjs";import"./chunk-4CSBZZAL.mjs";import"./chunk-PC247GKX.mjs";import"./chunk-22L43JMK.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{c as acquireEnvLock,g as checkpointLockRefusal,a as defaultEnvLocksDir,b as envLockFileOf,d as envLockHolder,f as envLockLine,e as envLockRefusal};
|
|
@@ -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{c as ae,d as ie}from"./chunk-
|
|
7
|
+
import{c as ae,d as ie}from"./chunk-2LSGWTWX.mjs";import{b as F,d as B}from"./chunk-UV74P4H2.mjs";import{H as ne,d as te,k as E,z as re}from"./chunk-4CSBZZAL.mjs";import{Ua as J,Xa as Z,fb as q}from"./chunk-J347SPU6.mjs";import{b as l,e as h,i as X,k as I,l as f,r as Q,s as T,u as _,v as x,z as ee}from"./chunk-WZQEK4WT.mjs";import{randomBytes as Je}from"node:crypto";import{open as Be,readFile as De,readdir as $e,rename as Ue,rm as Ge,stat as We}from"node:fs/promises";import{homedir as Ze}from"node:os";import{join as k,resolve as qe}from"node:path";import*as L from"node:fs";import*as D from"node:path";function Pe(n){return`counting-contract.${F(n)}.json`}function K(n,e,t){return n.assertOutsideRepo(D.join(e,Pe(t)))}function et(n,e,t){let r=K(n,e,t.orgId);return L.mkdirSync(D.dirname(r),{recursive:!0}),L.writeFileSync(r,`${JSON.stringify(t,null,2)}
|
|
8
8
|
`,"utf8"),r}function tt(n,e){let t=n.assertOutsideRepo(e),r=JSON.parse(L.readFileSync(t,"utf8"));if(r.version!==1||typeof r.objects!="object"||r.objects===null)throw new Error(`Invalid counting contract at ${t}: version 1 with objects expected`);return r}function rt(n,e){if(n.loadStartedAt!==void 0)return n.loadStartedAt===e.startedAt;let t=Date.parse(n.writtenAt),r=Date.parse(e.endedAt);return Number.isFinite(t)&&Number.isFinite(r)&&t>=r}import*as w from"node:fs/promises";import*as O from"node:path";var ot=4*1024*1024,st=64*1024*1024;var se=1e4,M=l().regex(/^[A-Za-z0-9]{15}(?:[A-Za-z0-9]{3})?$/),b=l().min(1).max(40),dt=f({forgeId:l().min(1).max(200),targetOrgId:l().min(1).max(128),timestamp:b,duration:h().nonnegative(),status:_(["success","partial","failure"]),cancelled:x(!0).optional(),writtenBetween:f({first:b,last:b}).optional(),retryOf:l().min(1).max(200).optional(),objects:I(f({objectApiName:l().regex(/^[A-Za-z][A-Za-z0-9_]*$/),ids:I(M)})),linked:h().int().nonnegative(),mayHaveBeenWritten:h().int().nonnegative().optional(),undo:f({removedAt:b,deleted:h().int().nonnegative(),alreadyGone:h().int().nonnegative(),kept:h().int().nonnegative(),refused:h().int().nonnegative(),notReached:h().int().nonnegative().optional(),notVisible:h().int().nonnegative().optional()}).optional(),removalStamps:T(M,b).optional(),removalSpans:I(f({first:b,last:b,userId:M})).optional(),removalLeft:I(M).optional(),sweep:f({sweptAt:b,deleted:h().int().nonnegative(),keptChanged:h().int().nonnegative(),refused:h().int().nonnegative()}).optional(),inJournal:f({journalId:l().min(1).max(200),part:h().int().nonnegative(),left:I(f({objectApiName:l().regex(/^[A-Za-z][A-Za-z0-9_]*$/),count:h().int().nonnegative()}))}).optional()}),ct=f({version:x(1),plans:I(X())}),lt=f({version:x(1),runs:I(f({forgeId:l().min(1).max(300),ids:I(M),late:I(M).optional()}))});var U="referenceid-mapping.json",Re=/^referenceid-mapping\.([A-Za-z0-9_-]{1,128})\.json$/,ve=/^referenceid-mapping\.([A-Za-z0-9_-]{1,128})\.load-\d{1,16}\.ndjson$/,N=/^[A-Za-z0-9]{15}(?:[A-Za-z0-9]{3})?$/,V=new Set;function Se(n){try{return process.kill(n,0),!0}catch(e){return e.code==="EPERM"}}var Oe=f({at:l().min(1).max(40),object:l().regex(/^[A-Za-z][A-Za-z0-9_]{0,79}$/),created:I(Q([l().min(1).max(400),l().regex(N)])).max(1e4)}),be=f({journal:f({startedAt:l().min(1).max(40),pid:h().int().positive(),runUserId:l().regex(N).optional()})});function je(n){let e,t={},r=new Map,o;for(let a of n.split(`
|
|
9
9
|
`)){if(a.trim()==="")continue;let s;try{s=JSON.parse(a)}catch{continue}if(!e){let c=be.safeParse(s);c.success&&(e=c.data.journal);continue}let i=Oe.safeParse(s);if(!i.success)continue;let d=r.get(i.data.object)??[];for(let[c,u]of i.data.created)Object.prototype.hasOwnProperty.call(t,c)||d.push(c),t[c]=u;r.set(i.data.object,d),o=i.data.at}if(!(!e||o===void 0||Object.keys(t).length===0))return{startedAt:e.startedAt,pid:e.pid,load:{updatedAt:o,mapping:t,created:[...r].filter(([,a])=>a.length>0).map(([a,s])=>({objectApiName:a,referenceIds:s})),load:{startedAt:e.startedAt,endedAt:o},...e.runUserId?{runUserId:e.runUserId}:{}}}}function Ae(n){return`referenceid-mapping.${F(n)}.json`}async function $(n){let e;try{e=await w.readFile(n,"utf8")}catch(t){if(t.code==="ENOENT")return;throw t}return JSON.parse(e)}async function ue(n,e){let t=e.assertOutsideRepo(n),r;try{r=await w.readdir(t)}catch(a){if(a.code==="ENOENT")return[];throw a}let o=new Set(r.flatMap(a=>Re.exec(a)?.[1]??ve.exec(a)?.[1]??[]));if(r.includes(U)){let s=(await $(e.assertOutsideRepo(O.join(t,U))))?.orgId;typeof s=="string"&&Ee(s)&&o.add(s)}return[...o].sort()}function Ee(n){try{return F(n),!0}catch{return!1}}var ke=I(f({objectApiName:l(),referenceIds:I(l())})),xe=f({startedAt:l(),endedAt:l()}),Fe=f({first:l(),last:l()}),Le=f({removedAt:l(),deleted:h(),alreadyGone:h(),kept:h(),refused:h(),notReached:h().optional()}),Me=T(l(),l()),Ne=I(f({first:l(),last:l(),userId:l()})),de=T(l(),l()),Y=l().regex(N);function R(n,e){let t=n.safeParse(e);return t.success?t.data:void 0}function S(n){if(typeof n!="object"||n===null)return;let e=n,t=typeof e.mapping=="object"&&e.mapping!==null?Object.fromEntries(Object.entries(e.mapping).filter(m=>typeof m[1]=="string")):{},r=R(ke,e.created),o=R(xe,e.load),a=R(Fe,e.writtenBetween),s=R(Le,e.removal),i=R(Me,e.removalStamps),d=R(Ne,e.removalSpans),c=R(de,e.personContacts),u=R(de,e.withTheirRecord),g=R(Y,e.runUserId),p=R(I(Y),e.madeEarlier),P=R(I(Y),e.lateEarlier);return{updatedAt:typeof e.updatedAt=="string"?e.updatedAt:"",mapping:t,...r?{created:r}:{},...o?{load:o}:{},...a?{writtenBetween:a}:{},...s?{removal:s}:{},...i?{removalStamps:i}:{},...d?{removalSpans:d}:{},...c?{personContacts:c}:{},...u?{withTheirRecord:u}:{},...g?{runUserId:g}:{},...p?{madeEarlier:p}:{},...P?{lateEarlier:P}:{}}}function j(n){return Array.isArray(n.earlier)?n.earlier.flatMap(e=>S(e)??[]):[]}function A(n){return n.load?.endedAt??n.updatedAt}function Ce(n,e){return n.slice(0,15)===e.slice(0,15)}function v(n){return n.slice(0,15)}function ce(n,e){let t={};for(let[r,o]of Object.entries(n??{}))Object.prototype.hasOwnProperty.call(e,o)?Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=o):delete e[r];return t}function le(n,e){if(e.size===0)return n;let t=Object.fromEntries(Object.entries(n.mapping).filter(([,d])=>!e.has(v(d)))),r=ce(n.personContacts,t),o=ce(n.withTheirRecord,t),a=n.created?.map(({objectApiName:d,referenceIds:c})=>({objectApiName:d,referenceIds:c.filter(u=>Object.prototype.hasOwnProperty.call(t,u))})).filter(d=>d.referenceIds.length>0),s=Object.fromEntries(Object.entries(n.removalStamps??{}).filter(([d])=>!e.has(v(d)))),i={...n,mapping:t};return delete i.removalStamps,delete i.personContacts,delete i.withTheirRecord,{...i,...a?{created:a}:{},...Object.keys(s).length>0?{removalStamps:s}:{},...Object.keys(r).length>0?{personContacts:r}:{},...Object.keys(o).length>0?{withTheirRecord:o}:{}}}function ge(n){return n.created?n.created.some(e=>e.referenceIds.length>0):Object.keys(n.mapping).length>0}var G=class{constructor(e,t){this.sasDir=e;this.guard=t?.guard??new B,this.orgId=t?.orgId??"";let r=t?.organizationId;this.askOrganizationId=typeof r=="function"?r:async()=>r,this.now=t?.now??(()=>new Date)}sasDir;guard;orgId;askOrganizationId;organizationId;now;get filePath(){return this.guard.assertOutsideRepo(O.join(this.sasDir,this.orgId===""?U:Ae(this.orgId)))}get singleFilePath(){return this.orgId===""?void 0:this.guard.assertOutsideRepo(O.join(this.sasDir,U))}get journalStem(){return this.orgId===""?"referenceid-mapping":`referenceid-mapping.${F(this.orgId)}`}journalPath(e){let t=typeof e=="string"?Date.parse(e):e.getTime();return this.guard.assertOutsideRepo(O.join(this.sasDir,`${this.journalStem}.load-${Math.max(0,Math.trunc(t))}.ndjson`))}retiring=new Map;journal(e){let t=this.journalPath(e),r=!1,o=!1,a=!1,s,i=Promise.resolve(),d;V.add(t);let c=g=>{i=i.then(async()=>{if(!(d!==void 0||o))try{if(!r){r=!0,await w.mkdir(O.dirname(t),{recursive:!0});let p={journal:{startedAt:e.toISOString(),pid:process.pid,...s?{runUserId:s}:{}}};await w.appendFile(t,`${JSON.stringify(p)}
|
|
10
10
|
`,"utf8")}await w.appendFile(t,`${JSON.stringify(g)}
|
|
@@ -0,0 +1,7 @@
|
|
|
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{m as a,n as b,o as c,p as d,q as e,r as f,s as g}from"./chunk-FYG47CNA.mjs";import"./chunk-GMY5427L.mjs";import"./chunk-GB6W4Q56.mjs";import"./chunk-AVY742BJ.mjs";import"./chunk-BWWQXU2B.mjs";import"./chunk-M6P5ZZLE.mjs";import"./chunk-35B73566.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-TYUYPFDJ.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-UCUFLFNK.mjs";import"./chunk-HFSBDM7B.mjs";import"./chunk-OHEOJISY.mjs";import"./chunk-SZOJ7BEJ.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-22L43JMK.mjs";import"./chunk-UNDIBZWG.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";export{a as DataSync,f as MAX_RESULT_REFUSALS_PER_OBJECT,g as buildObjectResult,d as linkedRecordOf,c as notReachedOf,b as unsetOf,e as withCurrencies};
|
|
@@ -0,0 +1,7 @@
|
|
|
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 u}from"./chunk-QIRO4HTE.mjs";import{d as c}from"./chunk-TYUYPFDJ.mjs";var m=new Set(["FirstName","MiddleName","LastName","Suffix","SuppliedName","AssistantName","PersonAssistantName"]),y=new Set(["Company","CompanyName","SuppliedCompany"]),f=new Set(["string","textarea","encryptedstring"]),b=new Set([...f,"picklist","combobox","double"]),F=/^(?:Person)?(?:Mailing|Other|Billing|Shipping)?(?:Street|City|State|StateCode|PostalCode|Country|CountryCode|Latitude|Longitude)$/,h=/(?:^|_)(?:address|street|city|zip|postal_?code|postcode|adresse|ville)(?:_|$)/i,g=/birth|(?:^|_)dob(?:_|$)|naissance/i;function D(e){return e.createable!==!1||e.updateable!==!1}function P(e){let t=e.compoundFieldName;return typeof t=="string"&&t!==""?!/GeocodeAccuracy$/.test(e.name)&&/address$/i.test(t):F.test(e.name)?!0:/__c$/i.test(e.name)&&h.test(e.name.replace(/__c$/i,""))}function p(e,t){if(!D(t)||t.calculated===!0||t.autoNumber===!0)return;let n=t.type.toLowerCase();if(f.has(n)){if(m.has(t.name)||c(t.name))return"person_name";if(y.has(t.name)||e.toLowerCase()==="account"&&t.name==="Name")return"company_name"}if(b.has(n)&&P(t))return"address";if((n==="date"||n==="datetime")&&g.test(t.name))return"birthdate";if(n==="textarea")return"free_text"}var S={person_name:"person_name",company_name:"company_name",address:"address",birthdate:"birthdate",free_text:"free_text"};function B(e,t,n){let i=new Set(n.map(o=>o.field.name.toLowerCase())),r=[...n];for(let o of t){if(i.has(o.name.toLowerCase()))continue;let s=p(e,o);s!==void 0&&(i.add(o.name.toLowerCase()),r.push({field:o,classification:"PII",detectedBy:"name",pattern:S[s]}))}return r}function _(e,t,n){let i=new Set(n.map(r=>r.toLowerCase()));return t.filter(r=>!i.has(r.name.toLowerCase())&&p(e,r)!==void 0).map(r=>r.name)}function K(e,t,n,i){let r=e(n);return i==="everything"?[...r,..._(t,n,r)]:r}var C=new Set(["string","textarea","email","phone","url","encryptedstring","picklist","multipicklist","combobox","date","datetime","int","long","double","currency","percent"]),E=new Set(["string","textarea","email","phone","url","encryptedstring"]),N=["FirstName","MiddleName","LastName"];function H(e){return e==null?!1:typeof e!="string"||e.trim()!==""}function l(e){return C.has(e.type)}function x(e){return E.has(e.type)}var w={name_pattern:"name",type_analysis:"type",content_pattern:"content"},A="org_classification";function R(e){return{apiName:e.name,label:e.label,type:e.type}}function I(e){return e.createable===!0||e.updateable===!0}function k(e,t){let n=e.filter(I).map(i=>i.name);return t.map(i=>{let r={};for(let o of n)r[o]=i[o];return r})}function V(e,t,n,i){let r=n.filter(l),o=new Map(r.map(a=>[a.name,a]));return e.detectPII(t,r.map(R),i&&i.length>0?k(r,i):void 0).piiFields.flatMap(a=>{let d=o.get(a.fieldApiName);return d?[{field:d,classification:a.classification,detectedBy:w[a.detectionMethod],pattern:a.pattern??a.detectionMethod}]:[]})}function W(e,t,n){if(n===void 0||n.size===0)return[...e];let i=new Set(e.map(o=>o.field.name.toLowerCase())),r=e.map(o=>{let s=n.get(o.field.name.toLowerCase());return s?{...o,orgClassification:s.classification}:o});for(let o of t){let s=o.name.toLowerCase(),a=n.get(s);a===void 0||i.has(s)||!l(o)||r.push({field:o,classification:a.classification.classification,detectedBy:"classification",pattern:A,orgClassification:a.classification})}return r}function z(e,t){if(t===void 0)return[];let n=new Set(e.map(i=>i.name.toLowerCase()));return[...t].filter(([i])=>!n.has(i)).map(([,i])=>({fieldApiName:i.name,orgClassification:i.classification}))}function T(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 M(e){return e.fields.find(t=>t.nameField===!0&&t.filterable===!0&&t.autoNumber!==!0&&(t.type==="string"||t.type==="textarea"))}function Q(e){let t=[];for(let i of e.fields){let r=T(i);r&&t.push({field:i,kind:r})}let n=M(e);return n&&t.push({field:n,kind:"name"}),t}function O(e){let t=e.fields.find(n=>n.nameField===!0&&n.autoNumber!==!0);return t&&t.updateable===!0&&x(t)?[t]:e.fields.filter(n=>N.includes(n.name))}function L(e){return u[e.name]!==void 0?"fake":e.nillable===!0?"nullify":"fake"}var v=new Set(["email_content","ssn_content"]);function X(e,t){let n=new Set,i=[],r=t.filter(a=>a.detectedBy!=="content"||v.has(a.pattern));for(let a of[...r.map(d=>d.field),...O(e)])n.has(a.name)||!l(a)||a.calculated===!0||a.autoNumber===!0||(n.add(a.name),i.push(a));let o=[],s=[];for(let a of i)a.updateable===!0?o.push({field:a,method:L(a)}):s.push(a);return{fields:o,kept:s}}export{p as a,B as b,K as c,H as d,l as e,x as f,I as g,V as h,W as i,z as j,T as k,M as l,Q as m,L as n,X as o};
|
|
@@ -4,4 +4,4 @@ import { dirname as __sandforgeDirname } from 'node:path';
|
|
|
4
4
|
const require = __sandforgeRequire(import.meta.url);
|
|
5
5
|
const __filename = __sandforgePath(import.meta.url);
|
|
6
6
|
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{a,b,c,d,e}from"./chunk-
|
|
7
|
+
import{a,b,c,d,e}from"./chunk-3KJCSYXY.mjs";import"./chunk-HDDJ3CVN.mjs";import"./chunk-J347SPU6.mjs";import"./chunk-WZQEK4WT.mjs";import"./chunk-NTOVCTRS.mjs";export{a as FieldMappingService,b as MOVES_ITS_SOURCE,e as mapFields,c as mappedTargets,d as notSentAsRead};
|