sandforge 1.80.0 → 1.81.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/bin/sandforge-pipeline.mjs +12 -0
- package/lib/{chunk-EMNC6YI4.mjs → chunk-2IB7I3IQ.mjs} +1 -1
- package/lib/{chunk-3RZQZHEB.mjs → chunk-2NAIUKVL.mjs} +1 -1
- package/lib/{chunk-AEKONPF4.mjs → chunk-2OIRJEYE.mjs} +1 -1
- package/lib/{chunk-BV6VTP3J.mjs → chunk-2OZG6GRW.mjs} +1 -1
- package/lib/{chunk-JEERQRLW.mjs → chunk-2Z54GB6X.mjs} +1 -1
- package/lib/chunk-2ZMGVBLW.mjs +7 -0
- package/lib/{chunk-FKG7Q3WH.mjs → chunk-33ZX3A56.mjs} +1 -1
- package/lib/{chunk-HLWMJF6Y.mjs → chunk-3AOKLIVE.mjs} +1 -1
- package/lib/{chunk-GGD7ON3M.mjs → chunk-3B5H24ZG.mjs} +1 -1
- package/lib/chunk-43K2C6H2.mjs +7 -0
- package/lib/chunk-4JKR4PTZ.mjs +8 -0
- package/lib/chunk-4L7FBOJS.mjs +8 -0
- package/lib/chunk-5344TZBT.mjs +11 -0
- package/lib/{chunk-SAR5622P.mjs → chunk-54HYHHVL.mjs} +1 -1
- package/lib/chunk-55LQD3Y3.mjs +7 -0
- package/lib/chunk-56MPPWLA.mjs +7 -0
- package/lib/chunk-5C5XEVZN.mjs +11 -0
- package/lib/chunk-5CKWGZX4.mjs +9 -0
- package/lib/{chunk-RSWDYIHY.mjs → chunk-5GBO4KD5.mjs} +1 -1
- package/lib/{chunk-BKDV4ENO.mjs → chunk-5UT2ZBGF.mjs} +1 -1
- package/lib/chunk-5VQNKDFU.mjs +7 -0
- package/lib/{chunk-XAMBCQPU.mjs → chunk-5WGA5CZB.mjs} +1 -1
- package/lib/chunk-5ZKCLBTN.mjs +474 -0
- package/lib/{chunk-UCD54V2M.mjs → chunk-67CC7RAE.mjs} +1 -1
- package/lib/{chunk-TSLJUSLW.mjs → chunk-6CDIIFNX.mjs} +1 -1
- package/lib/{chunk-AV5SWEHP.mjs → chunk-6FARZYMJ.mjs} +1 -1
- package/lib/{chunk-FPKYYFM7.mjs → chunk-6FMLW7PH.mjs} +1 -1
- package/lib/chunk-6IGEASOF.mjs +7 -0
- package/lib/{chunk-XUWL6ZPC.mjs → chunk-6NADW3OI.mjs} +1 -1
- package/lib/chunk-6SEDOIO3.mjs +10 -0
- package/lib/{chunk-PJ5I73CK.mjs → chunk-742SSN7I.mjs} +1 -1
- package/lib/chunk-7DALDJMO.mjs +7 -0
- package/lib/chunk-7PK5QDQI.mjs +7 -0
- package/lib/chunk-AELFEK3G.mjs +7 -0
- package/lib/chunk-AITNZWLB.mjs +9 -0
- package/lib/{chunk-2UZPIMUC.mjs → chunk-AJPSGVMD.mjs} +1 -1
- package/lib/{chunk-GSKCGQIP.mjs → chunk-BNO5GIJ6.mjs} +1 -1
- package/lib/{chunk-K2FBZIXY.mjs → chunk-BWWQXU2B.mjs} +1 -1
- package/lib/{chunk-IC2C2GOF.mjs → chunk-BXZ73A5M.mjs} +1 -1
- package/lib/chunk-BZFIOZS3.mjs +156 -0
- package/lib/{chunk-J525F5KI.mjs → chunk-C4YGSK6W.mjs} +1 -1
- package/lib/chunk-CAFUNR6D.mjs +7 -0
- package/lib/chunk-CULAOP3U.mjs +7 -0
- package/lib/chunk-D62KWDDT.mjs +7 -0
- package/lib/{chunk-OHWNPXWW.mjs → chunk-D7P7DTWL.mjs} +1 -1
- package/lib/{chunk-COFG7Q6R.mjs → chunk-DHGPDSXS.mjs} +1 -1
- package/lib/{chunk-WU3GLFZO.mjs → chunk-DHIW4IO5.mjs} +1 -1
- package/lib/{chunk-6XYKJSGX.mjs → chunk-DMBR24CK.mjs} +1 -1
- package/lib/chunk-DPYTG6DM.mjs +48 -0
- package/lib/{chunk-BY2HJFFG.mjs → chunk-DQR5NDMI.mjs} +1 -1
- package/lib/chunk-DXOXLUZA.mjs +7 -0
- package/lib/{chunk-YRQGKDHM.mjs → chunk-E2OBAWSH.mjs} +1 -1
- package/lib/chunk-E2YJVSX6.mjs +10 -0
- package/lib/{chunk-JWTSEDIQ.mjs → chunk-EAFLDSQ2.mjs} +1 -1
- package/lib/{chunk-MILU7WFN.mjs → chunk-EH5YUA5W.mjs} +1 -1
- package/lib/{chunk-BGUEWRK2.mjs → chunk-EOSEMFPU.mjs} +1 -1
- package/lib/chunk-ETT5GP4P.mjs +13 -0
- package/lib/{chunk-MYW5QNGI.mjs → chunk-FDGFUEK3.mjs} +1 -1
- package/lib/{chunk-NTFIRZP6.mjs → chunk-FLNLG43R.mjs} +1 -1
- package/lib/{chunk-CHYDMRSV.mjs → chunk-FSDO4DJA.mjs} +1 -1
- package/lib/{chunk-MJVTDA5Q.mjs → chunk-FSZTXLNW.mjs} +1 -1
- package/lib/{chunk-SOU4FRYN.mjs → chunk-FTA5LOVX.mjs} +1 -1
- package/lib/chunk-G4VXPS3A.mjs +7 -0
- package/lib/chunk-GF247DA7.mjs +7 -0
- package/lib/{chunk-BTWDMNN3.mjs → chunk-GK7VEYFM.mjs} +1 -1
- package/lib/{chunk-SE4QEZUG.mjs → chunk-GR3NGDVM.mjs} +1 -1
- package/lib/{chunk-3TJON4F3.mjs → chunk-GTIXJCGS.mjs} +1 -1
- package/lib/{chunk-NZC67CGR.mjs → chunk-GWRKS3AL.mjs} +1 -1
- package/lib/{chunk-XLXIPIEW.mjs → chunk-GYKNCYES.mjs} +1 -1
- package/lib/{chunk-WIO4XO4F.mjs → chunk-HFSBDM7B.mjs} +1 -1
- package/lib/{chunk-KDGMAGQR.mjs → chunk-HVC5CYIB.mjs} +1 -1
- package/lib/{chunk-WR4Q363I.mjs → chunk-HYBH5PFM.mjs} +1 -1
- package/lib/chunk-HYOOJVR6.mjs +7 -0
- package/lib/{chunk-5K5VLULK.mjs → chunk-IBURU7T7.mjs} +1 -1
- package/lib/chunk-ICIYL45C.mjs +7 -0
- package/lib/{chunk-QR3WELJQ.mjs → chunk-IKGHRYCN.mjs} +1 -1
- package/lib/chunk-IM2XA6JI.mjs +7 -0
- package/lib/{chunk-IWDREM66.mjs → chunk-J6G23RUI.mjs} +1 -1
- package/lib/{chunk-2BA2XKAY.mjs → chunk-JU2XEKEO.mjs} +1 -1
- package/lib/{chunk-MHMH6MTP.mjs → chunk-K55LH4ZQ.mjs} +1 -1
- package/lib/chunk-K5HV4YRO.mjs +7 -0
- package/lib/{chunk-M3ROUWDX.mjs → chunk-K77NR3UK.mjs} +1 -1
- package/lib/chunk-KE2PGD6C.mjs +7 -0
- package/lib/chunk-KGYXLSQ5.mjs +37 -0
- package/lib/{chunk-E5AHXLS6.mjs → chunk-KNIRA333.mjs} +1 -1
- package/lib/chunk-KOQV4WXC.mjs +8 -0
- package/lib/{chunk-L77FJZEP.mjs → chunk-KRNFVAGC.mjs} +1 -1
- package/lib/{chunk-MTMH6H2A.mjs → chunk-LCDPCUXS.mjs} +1 -1
- package/lib/{chunk-YAZO75G2.mjs → chunk-LNXBCE7E.mjs} +1 -1
- package/lib/{chunk-IZQZ6ZUF.mjs → chunk-LO527YLT.mjs} +1 -1
- package/lib/chunk-MAHZMPMZ.mjs +7 -0
- package/lib/{chunk-F6GUDTOB.mjs → chunk-MHW6DV6T.mjs} +1 -1
- package/lib/{chunk-2YIV2OB2.mjs → chunk-MIDBQ7SD.mjs} +1 -1
- package/lib/{chunk-FGRG7ANU.mjs → chunk-MKNAZPOT.mjs} +1 -1
- package/lib/{chunk-PZPJKATS.mjs → chunk-MNITSYI2.mjs} +8 -8
- package/lib/{chunk-OLSGVAIL.mjs → chunk-MO3N5XVV.mjs} +53 -53
- package/lib/chunk-MWLFFVQV.mjs +8 -0
- package/lib/chunk-N6HHNR6J.mjs +7 -0
- package/lib/chunk-N7J6NJQ6.mjs +7 -0
- package/lib/chunk-NJ3EOEHS.mjs +9 -0
- package/lib/chunk-NWPQF5XR.mjs +7 -0
- package/lib/{chunk-IG2MTQRP.mjs → chunk-NWVVCZUK.mjs} +1 -1
- package/lib/{chunk-2NBYT7GR.mjs → chunk-O6ADMP36.mjs} +1 -1
- package/lib/chunk-O7DAFE6M.mjs +14 -0
- package/lib/chunk-OEHVAJAB.mjs +7 -0
- package/lib/chunk-OETEC3P7.mjs +7 -0
- package/lib/{chunk-GCOB7K5N.mjs → chunk-OHEOJISY.mjs} +1 -1
- package/lib/chunk-OIIL4NVI.mjs +7 -0
- package/lib/chunk-OMZJ37JI.mjs +15 -0
- package/lib/{chunk-CEX3NEZL.mjs → chunk-ONMBSACW.mjs} +1 -1
- package/lib/chunk-OQQHNYR7.mjs +272 -0
- package/lib/{chunk-SOGQW4IG.mjs → chunk-OU5W7SCB.mjs} +1 -1
- package/lib/{chunk-O2HDYYUV.mjs → chunk-OVOLG3AL.mjs} +1 -1
- package/lib/{chunk-DYFALGRT.mjs → chunk-OXKZ4Y3B.mjs} +1 -1
- package/lib/{chunk-2GTBABKU.mjs → chunk-OZNLOV4U.mjs} +1 -1
- package/lib/{chunk-TYYOBZMU.mjs → chunk-PC247GKX.mjs} +1 -1
- package/lib/chunk-PPGDAUEQ.mjs +7 -0
- package/lib/{chunk-IGYH7GMA.mjs → chunk-PYUEHBA6.mjs} +1 -1
- package/lib/{chunk-TLH7AD35.mjs → chunk-PZBZ7MNC.mjs} +1 -1
- package/lib/{chunk-DBFJB2B6.mjs → chunk-QIRO4HTE.mjs} +1 -1
- package/lib/{chunk-BXU6WFMH.mjs → chunk-QXLZINZB.mjs} +1 -1
- package/lib/chunk-R2BJWO5N.mjs +20 -0
- package/lib/chunk-R6TF26V4.mjs +10 -0
- package/lib/{chunk-YKKRIEH4.mjs → chunk-RKALOKAU.mjs} +1 -1
- package/lib/chunk-SQGP46QS.mjs +7 -0
- package/lib/chunk-SW2NUKQL.mjs +9 -0
- package/lib/{chunk-MFG4MUIO.mjs → chunk-T26C576X.mjs} +1 -1
- package/lib/{chunk-LKQ5RKIV.mjs → chunk-T3PLRQ2T.mjs} +1 -1
- package/lib/chunk-T5VAULLQ.mjs +7 -0
- package/lib/{chunk-KYEDBS54.mjs → chunk-TEIBWMJM.mjs} +1 -1
- package/lib/chunk-TKQQVB2D.mjs +9 -0
- package/lib/{chunk-ELFXJHU7.mjs → chunk-TPHXRHOA.mjs} +1 -1
- package/lib/chunk-TQ2TQHTT.mjs +9 -0
- package/lib/{chunk-RPI7LRTW.mjs → chunk-TQM2XJ27.mjs} +1 -1
- package/lib/{chunk-IOIWJ3DJ.mjs → chunk-UCHAZ4ZU.mjs} +1 -1
- package/lib/{chunk-G35N4P7D.mjs → chunk-UIUPPEFB.mjs} +1 -1
- package/lib/{chunk-DBB3EMIN.mjs → chunk-UT27HXE7.mjs} +1 -1
- package/lib/{chunk-KBJ5VERV.mjs → chunk-UUSLTW5V.mjs} +1 -1
- package/lib/chunk-V2QO6KOE.mjs +19 -0
- package/lib/chunk-V473C7LY.mjs +7 -0
- package/lib/chunk-V4RKM4QZ.mjs +8 -0
- package/lib/chunk-VSU74RQ3.mjs +9 -0
- package/lib/chunk-VV3B6IC3.mjs +7 -0
- package/lib/chunk-W2AAGIZF.mjs +7 -0
- package/lib/{chunk-WR2GIKWE.mjs → chunk-WB2RIVO3.mjs} +1 -1
- package/lib/chunk-WD47PGUS.mjs +10 -0
- package/lib/{chunk-HEKAZJRH.mjs → chunk-WEZLXE34.mjs} +1 -1
- package/lib/{chunk-W622GUAW.mjs → chunk-WI4HYWV6.mjs} +1 -1
- package/lib/{chunk-WA7EYLAQ.mjs → chunk-WM5JI4JI.mjs} +1 -1
- package/lib/chunk-WWTXRWNZ.mjs +7 -0
- package/lib/{chunk-7EANH5PY.mjs → chunk-WZQEK4WT.mjs} +1 -1
- package/lib/{chunk-FXXLX4O6.mjs → chunk-X2ZVSQ54.mjs} +1 -1
- package/lib/{chunk-ZVAED4QV.mjs → chunk-XC2QKQT5.mjs} +1 -1
- package/lib/chunk-XC54KKKC.mjs +7 -0
- package/lib/chunk-XEB6HZ34.mjs +7 -0
- package/lib/chunk-XGKSSCW7.mjs +7 -0
- package/lib/chunk-XIZ5LMQM.mjs +7 -0
- package/lib/{chunk-74Q6DORA.mjs → chunk-Y5ZCPY36.mjs} +1 -1
- package/lib/{chunk-UNJA4J37.mjs → chunk-YCSFP6ER.mjs} +4 -4
- package/lib/{chunk-X5JYBPXP.mjs → chunk-YHIOS2PU.mjs} +1 -1
- package/lib/chunk-YIGFYZQY.mjs +7 -0
- package/lib/chunk-YJEXE6HZ.mjs +925 -0
- package/lib/{chunk-TTKXMDBN.mjs → chunk-YOGMP72T.mjs} +4 -4
- package/lib/chunk-ZRUDYB7O.mjs +7 -0
- package/lib/{chunk-CU2INBND.mjs → chunk-ZUA5BNAO.mjs} +1 -1
- package/lib/chunk-ZWCRWF7E.mjs +7 -0
- package/lib/{chunk-N652NMZ4.mjs → chunk-ZWZXQTAK.mjs} +52 -52
- package/lib/sandforge-autopilot.mjs +11 -11
- package/lib/sandforge-backup.mjs +63 -32
- package/lib/sandforge-checkpoint.mjs +1 -348
- package/lib/sandforge-cleanup.mjs +1 -1
- package/lib/sandforge-clone.mjs +1 -1
- package/lib/sandforge-compare.mjs +1 -1
- package/lib/sandforge-dataops.mjs +1 -1
- package/lib/sandforge-empty.mjs +11 -11
- package/lib/sandforge-env.mjs +104 -104
- package/lib/sandforge-frozen.mjs +1 -266
- package/lib/sandforge-mcp.mjs +33 -14
- package/lib/sandforge-monitor.mjs +1 -1
- package/lib/sandforge-pipeline.mjs +88 -0
- package/lib/sandforge-seed.mjs +1 -1
- package/lib/sandforge-sync.mjs +1 -1
- package/lib/sandforge.mjs +6 -6
- package/package.json +2 -1
- package/lib/chunk-2CNCDM56.mjs +0 -7
- package/lib/chunk-3F6Q5E7I.mjs +0 -14
- package/lib/chunk-4VS2V6WU.mjs +0 -25
- package/lib/chunk-5P4PHJRL.mjs +0 -9
- package/lib/chunk-5TC3QB4U.mjs +0 -10
- package/lib/chunk-7ABODJ4G.mjs +0 -7
- package/lib/chunk-7EGQP6S4.mjs +0 -7
- package/lib/chunk-7FFGJWHN.mjs +0 -7
- package/lib/chunk-7YDNUBO5.mjs +0 -7
- package/lib/chunk-A527W53V.mjs +0 -7
- package/lib/chunk-ADOAS63R.mjs +0 -7
- package/lib/chunk-B5QQJ4SI.mjs +0 -7
- package/lib/chunk-CION3VMZ.mjs +0 -7
- package/lib/chunk-CSBS5U5I.mjs +0 -7
- package/lib/chunk-DB7RBE5D.mjs +0 -7
- package/lib/chunk-E5ZB3LU5.mjs +0 -7
- package/lib/chunk-EFR2Y7E4.mjs +0 -7
- package/lib/chunk-EHQ3FX6X.mjs +0 -7
- package/lib/chunk-EQNW3UC2.mjs +0 -7
- package/lib/chunk-F43REJDZ.mjs +0 -10
- package/lib/chunk-GSG7WZHM.mjs +0 -7
- package/lib/chunk-HOJYWTP7.mjs +0 -20
- package/lib/chunk-HS4YRX4J.mjs +0 -7
- package/lib/chunk-I7O6C2B5.mjs +0 -8
- package/lib/chunk-IFETCRWE.mjs +0 -10
- package/lib/chunk-IQXHJEYB.mjs +0 -7
- package/lib/chunk-JPUR2CFX.mjs +0 -10
- package/lib/chunk-K327QKMD.mjs +0 -7
- package/lib/chunk-KRCA6IPH.mjs +0 -8
- package/lib/chunk-LPBMBW3O.mjs +0 -13
- package/lib/chunk-LWW4U276.mjs +0 -7
- package/lib/chunk-MJU2PGZQ.mjs +0 -15
- package/lib/chunk-OAZRPP4I.mjs +0 -7
- package/lib/chunk-OO6CLPEH.mjs +0 -7
- package/lib/chunk-OPXCV2KL.mjs +0 -7
- package/lib/chunk-P33PSCXK.mjs +0 -7
- package/lib/chunk-Q3DM32KF.mjs +0 -11
- package/lib/chunk-QROPNEGY.mjs +0 -14
- package/lib/chunk-QWT2C74M.mjs +0 -7
- package/lib/chunk-R3X3LV64.mjs +0 -14
- package/lib/chunk-RMBPOTD7.mjs +0 -7
- package/lib/chunk-SIHORWVK.mjs +0 -7
- package/lib/chunk-T62WNR54.mjs +0 -7
- package/lib/chunk-TTFDUKUS.mjs +0 -47
- package/lib/chunk-VE6XKGGD.mjs +0 -7
- package/lib/chunk-VGW4MXXZ.mjs +0 -7
- package/lib/chunk-VS7ZXUII.mjs +0 -824
- package/lib/chunk-VXQLDM4R.mjs +0 -7
- package/lib/chunk-VYXMVJL5.mjs +0 -7
- package/lib/chunk-W7U5E5ZL.mjs +0 -9
- package/lib/chunk-WXAQ7FK3.mjs +0 -115
- package/lib/chunk-YS4G22C2.mjs +0 -7
- package/lib/chunk-ZM6OJGIG.mjs +0 -7
- package/lib/chunk-ZUTYVST5.mjs +0 -7
package/lib/chunk-F43REJDZ.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createRequire as __sandforgeRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __sandforgePath } from 'node:url';
|
|
3
|
-
import { dirname as __sandforgeDirname } from 'node:path';
|
|
4
|
-
const require = __sandforgeRequire(import.meta.url);
|
|
5
|
-
const __filename = __sandforgePath(import.meta.url);
|
|
6
|
-
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{W as S,X as I,Y as Ae,n as Ee,o as Ce,oa as re}from"./chunk-JPUR2CFX.mjs";import{t as v,u as Be}from"./chunk-LPBMBW3O.mjs";import{b as x}from"./chunk-GSKCGQIP.mjs";import{L as ve,N as V,O as Te,f as ye,ka as Ne}from"./chunk-VYXMVJL5.mjs";import{b as ne,f as Oe}from"./chunk-INIT2UKJ.mjs";import{k as we,l as ke,m as Se}from"./chunk-L77FJZEP.mjs";import{ca as K,da as Re}from"./chunk-A527W53V.mjs";import{b as P}from"./chunk-CA5NAXSU.mjs";import{b as be,e as ee,f as te,k as he,l as W}from"./chunk-7EANH5PY.mjs";function ot(e){return e.keptChanged+e.keptDependents+e.refused+(e.notVisible??0)}function Sn(e,t){return t?"cancelled":e.every(n=>ot(n)===0)?"success":e.some(n=>n.deleted>0)?"partial":"failure"}function En(e,t){return e!=="success"||!t||t.status==="success"?e:t.status==="cancelled"?"cancelled":"partial"}function Cn(e){return e.status}function An(e){return e.filter(t=>t.deleted+t.refused+(t.notReached??0)>0).map(t=>({...ye(t.objectApiName),deleted:t.deleted,failed:t.refused,...(t.notReached??0)>0?{notSent:t.notReached}:{}}))}function Bn(e,t,n,r=!1){let o=h=>e.objects.reduce((B,C)=>B+h(C),0),i=o(h=>h.deleted),a=o(h=>h.alreadyGone),m=o(h=>h.keptChanged+h.keptDependents),u=o(h=>h.refused),c=o(h=>h.notVisible??0);if(i+a===0&&(!r||e.status==="cancelled"||m+u+c===0))return;let g=r?void 0:n,y=o(h=>h.platformCopies??0),A=e.status==="cancelled"?Math.max(0,t+y-i-a-m-u-c):0;return{removedAt:e.finishedAt,deleted:(g?.deleted??0)+i,alreadyGone:(g?.alreadyGone??0)+a,kept:m,refused:u,...A>0?{notReached:A}:{},...c>0?{notVisible:c}:{}}}function vn(...e){let t=new Set,n=[];for(let r of e.flatMap(o=>o??[])){let o=`${r.first}|${r.last}|${r.userId.slice(0,15)}`;t.has(o)||(t.add(o),n.push(r))}return n.sort((r,o)=>Date.parse(r.first)-Date.parse(o.first))}var oe=5;function M(e,t,n=1/0){return[...new Set([...e,...t])].slice(0,n)}function D(e,t){return e===void 0&&t===void 0?void 0:(e??0)+(t??0)}function Tn(...e){let t=new Map;for(let n of e.flat()){let r=t.get(n.objectApiName);if(!r){t.set(n.objectApiName,{...n});continue}let o={notVisible:D(r.notVisible,n.notVisible),notReached:D(r.notReached,n.notReached),heldByAutomation:D(r.heldByAutomation,n.heldByAutomation),heldByAutomationAfterRun:D(r.heldByAutomationAfterRun,n.heldByAutomationAfterRun),heldByAutomationAlong:D(r.heldByAutomationAlong,n.heldByAutomationAlong),platformCopies:D(r.platformCopies,n.platformCopies)},i=M(r.automationHolders??[],n.automationHolders??[]),a=r.filesLeft||n.filesLeft?{count:(r.filesLeft?.count??0)+(n.filesLeft?.count??0),names:M(r.filesLeft?.names??[],n.filesLeft?.names??[],oe)}:void 0;t.set(n.objectApiName,{objectApiName:n.objectApiName,planned:r.planned+n.planned,deleted:r.deleted+n.deleted,alreadyGone:r.alreadyGone+n.alreadyGone,keptChanged:r.keptChanged+n.keptChanged,keptDependents:r.keptDependents+n.keptDependents,refused:r.refused+n.refused,...Object.fromEntries(Object.entries(o).filter(([,m])=>m!==void 0)),heldBy:M(r.heldBy,n.heldBy),...i.length>0?{automationHolders:i}:{},unchecked:M(r.unchecked,n.unchecked),reasons:M(r.reasons,n.reasons,oe),...a?{filesLeft:a}:{}})}return[...t.values()]}function Nn(...e){let t=new Map;for(let n of e.flat()){let r=t.get(n.objectApiName);if(!r){t.set(n.objectApiName,{...n,changedBy:{...n.changedBy}});continue}let o={...r.changedBy};for(let[a,m]of Object.entries(n.changedBy))o[a]=(o[a]??0)+m;let i=D(r.platformCopies,n.platformCopies);t.set(n.objectApiName,{objectApiName:n.objectApiName,planned:r.planned+n.planned,toDelete:r.toDelete+n.toDelete,alreadyGone:r.alreadyGone+n.alreadyGone,changedSince:r.changedSince+n.changedSince,keptChanged:r.keptChanged+n.keptChanged,changedBy:o,undeletable:r.undeletable+n.undeletable,notVisible:r.notVisible+n.notVisible,unread:r.unread+n.unread,...i!==void 0?{platformCopies:i}:{},reasons:M(r.reasons,n.reasons,oe)})}return[...t.values()]}import{AsyncLocalStorage as it}from"node:async_hooks";var je=new Set(["delete","hardDelete"]),de=1e4,Pe=5e4;function _n(e){switch(e){case"production":return;case"staging":return de;case"development":case"scratch":return Pe}}var xe=new it;function ie(){let e=xe.getStore();return e?.live?e:void 0}async function Pn(e,t){let n={approved:e.approved,live:!0};try{return await xe.run(n,t)}finally{n.live=!1}}var De=class{overrides=new Map;options;constructor(t){this.options=t??{}}check(t){let n=this.checkTier(t),{orgNameOf:r}=this.options;return!n.requiresConfirmation||!r?n:{...n,question:dt(t,r(t.orgId),this.options.questionWords)}}checkTier(t){switch(t.orgTier){case"production":return this.checkProduction(t);case"staging":return this.checkStaging(t);case"development":case"scratch":return this.checkDevelopment(t)}}setProductionOverride(t,n){this.overrides.set(t,n)}isProductionOverridden(t){return this.overrides.get(t)===!0}get canAskForConfirmation(){return this.options.requestConfirmation!==void 0||ie()!==void 0}async confirmIfNeeded(t,n){if(!t.allowed||!t.requiresConfirmation)return t.allowed;let r=ie();return r?r.approved:this.options.requestConfirmation?t.question===void 0?this.options.requestConfirmation(t.impactSummary,n):this.options.requestConfirmation(t.impactSummary,n,t.question):!0}declinedWithoutAsking(t,n){if(!(!t.allowed||!t.requiresConfirmation||ie())&&this.options.requestConfirmation)return this.options.declinesWithoutAsking?.(n)}async confirmRun(t){return this.options.requestRunConfirmation?await this.options.requestRunConfirmation(t)?"confirmed":"declined":"unavailable"}orgPhrase(t,n){let r=this.options.orgNameOf?.(t.orgId);return r?n.org(t.orgTier,r,!0):n.org(t.orgTier,t.orgId,!1)}checkProduction(t){let n=[],r=je.has(t.operation),o=this.isProductionOverridden(t.orgId);n.push(`Production operation: ${t.operation} on ${t.objectName} (${q(t.recordCount)} ${st(t)}${t.alsoWrites?`, plus ${t.alsoWrites}`:""})`);let i=this.options.questionWords??Ie;return t.operation==="deploy"?{allowed:!1,requiresConfirmation:!1,blockedReason:i.deployRefused(this.orgPhrase(t,i)),warnings:n,impactSummary:U(t)}:r&&!o?{allowed:!1,requiresConfirmation:!1,blockedReason:i.deleteRefused(t.operation==="hardDelete"?"hardDelete":"delete",this.orgPhrase(t,i)),warnings:n,impactSummary:U(t)}:(r&&o&&n.push("Production override is active \u2014 destructive operation permitted"),{allowed:!0,requiresConfirmation:!0,warnings:n,impactSummary:U(t)})}checkStaging(t){let n=[],r=je.has(t.operation),o=t.operation==="deploy",i=r||o||se(t.recordCount)>de;return r&&n.push(`Destructive operation (${t.operation}) on staging org \u2014 confirmation required`),o&&n.push("Metadata deployment on staging org \u2014 confirmation required"),se(t.recordCount)>de&&n.push(`Large volume operation: ${q(t.recordCount)} records on staging`),{allowed:!0,requiresConfirmation:i,warnings:n,impactSummary:U(t)}}checkDevelopment(t){let n=[];return se(t.recordCount)>Pe&&n.push(`Large volume operation: ${q(t.recordCount)} records on ${t.orgTier} org`),{allowed:!0,requiresConfirmation:!1,warnings:n,impactSummary:U(t)}}};function q(e){return e==="unknown"?"an unknown number of":typeof e=="number"?String(e):`at most ${e.atMost}`}function se(e){return e==="unknown"?0:typeof e=="number"?e:e.atMost}function st(e){return e.operation==="deploy"?"components":"records"}var xn="the related records the run adds",Ie={sentence:(e,t,n)=>{switch(e){case"insert":return`Insert ${t} into ${n}.`;case"update":return`Update ${t} in ${n}.`;case"upsert":return`Insert or update ${t} in ${n}.`;case"delete":return`Delete ${t} in ${n}.`;case"hardDelete":return`Permanently delete ${t} in ${n}.`;case"deploy":return`Deploy ${t} to ${n}.`}},counted:(e,t)=>t==="unknown"?`${e}s`:typeof t=="number"?`${t} ${e}${t===1?"":"s"}`:`at most ${t.atMost} ${e}s`,besides:(e,t)=>`${e}, plus ${t},`,org:(e,t,n)=>n?`the ${e} org "${t}"`:`the ${e} org ${t}`,deployRefused:e=>`SandForge deploys metadata only to a sandbox, a scratch org or a Developer Edition org, not to ${e}: bring the change there through your release process, as a change set or a deployment from source control.`,deleteRefused:(e,t)=>e==="hardDelete"?`Permanently deleting records is not allowed in ${t}.`:`Deleting records is not allowed in ${t}.`},at=new Set(["SeedData","SyncData","CloneData","AutopilotData"]);function dt(e,t,n=Ie){let r=e.operation==="deploy"?"component":"record",o=at.has(e.objectName)?"":` (${e.objectName})`,i=`${n.counted(r,e.recordCount)}${o}`,a=e.alsoWrites?n.besides(i,e.alsoWrites):i,m=t?n.org(e.orgTier,t,!0):n.org(e.orgTier,e.orgId,!1);return n.sentence(e.operation,a,m)}function U(e){if(e.operation==="deploy")return`DEPLOY ${q(e.recordCount)} component(s) (${e.objectName}) to ${e.orgTier} org ${e.orgId} [module: ${e.module}]`;let t=e.alsoWrites?`, plus ${e.alsoWrites},`:"";return`${e.operation.toUpperCase()} ${q(e.recordCount)} ${e.objectName} record(s)${t} on ${e.orgTier} org ${e.orgId} [module: ${e.module}]`}function J(e,t){return`${e} ${t}${e===1?"":"s"}`}var ct={cost:({records:e,objects:t,requests:n,seconds:r,megabytes:o,keepDays:i})=>`Checkpoint first: about ${J(e,"record")} of ${J(t,"object")}, ${J(n,"API request")}, ${r} s, ${o} MB on this machine, unencrypted, and none of the org's storage, `+(i===0?"kept until you delete it.":`kept ${J(i,"day")}.`),added:(e,t)=>`Added: ${e} \u2014 ${t}`,notHeld:(e,t)=>`Not in the checkpoint: ${e} \u2014 ${t}`,more:e=>`\u2026 and ${e} more`,unknown:"What an Apex trigger, or automation that could not be read, creates as the run writes is not known: a rewind leaves those records as they are."},ae=10;function ut(e){return e<=0?"0":Math.max(.1,Math.ceil(e/1048576*10-1e-9)/10).toFixed(1)}function In(e,t=ct){let{estimate:n}=e,r=[t.cost({records:n.records,objects:e.objects.length,requests:n.apiRequests,seconds:Math.ceil(n.seconds),megabytes:ut(n.bytes),keepDays:e.keepDays})],o=(i,a)=>{for(let{objectApiName:m,reason:u}of i.slice(0,ae))r.push(a(m,u));i.length>ae&&r.push(t.more(i.length-ae))};return o(e.added,t.added),o(e.notHeld,t.notHeld),r.push(t.unknown),r}import{randomUUID as lt}from"node:crypto";var ce="\0configStore:revision",ft="\0configStore";function mt(e){let t=e[ce]?.value;if(t!==void 0)try{let n=JSON.parse(t);return typeof n.writer=="string"&&typeof n.write=="number"?{writer:n.writer,write:n.write}:void 0}catch{return}}var Me=class{backend;logWarning;writer=lt();writes=0;written;constructor(t,n){this.backend=t,this.logWarning=n}initialize(){this.backend.getData()}get(t){let n=this.current()[t];if(n)try{return JSON.parse(n.value)}catch(r){let o=P(r);this.logWarning?.(`[ConfigStore] Failed to parse JSON for key "${t}": ${o}`);return}}set(t,n,r="general"){let o=JSON.stringify(n);this.update(i=>{let a=i[t];return a&&a.value===o&&a.category===r?!1:(i[t]={value:o,category:r},!0)})}delete(t){return this.update(n=>t in n?(delete n[t],!0):!1)}has(t){return t in this.current()}getByCategory(t){let n={};for(let[r,o]of Object.entries(this.current()))if(o.category===t)try{n[r]=JSON.parse(o.value)}catch(i){let a=P(i);this.logWarning?.(`[ConfigStore] Corrupted entry in category "${t}", key "${r}": ${a}`)}return n}getAllKeys(){return Object.keys(this.current()).filter(t=>t!==ce)}getKeysByPrefix(t){return this.getAllKeys().filter(n=>n.startsWith(t))}clearCategory(t){let n=0;return this.update(r=>{for(let[o,i]of Object.entries(r))i.category===t&&(delete r[o],n++);return n>0}),n}clearAll(){this.write({})}current(){let t=this.backend.getData(),n=mt(t);return this.written&&n?.writer===this.writer&&n.write<this.writes?this.written:t}update(t){let n={...this.current()},r=t(n);return r&&this.write(n),r}write(t){this.writes+=1,t[ce]={value:JSON.stringify({writer:this.writer,write:this.writes}),category:ft},this.backend.setData(t),this.written=t}};var pt=300,gt=1024,bt=160,ht=500,Ke=40,Rt=4,yt=3,Ot=3,wt=1,kt=1e3,St=1,$e=200,Et=60,Ct=50,At=Buffer.byteLength(`${JSON.stringify({Id:"0".repeat(18)})}
|
|
8
|
-
`),Bt="IsDeleted = false",Ve=4;function vt(e){return e.access?.kind==="perObject"?e.access.requests:0}var Tt=1,Nt=200,jt=3,Dt=1,_t=1,Je=2,Pt=3,xt=2e3,It=100,ze=["Id","SystemModstamp"],Le=23,j=2.5,b=.35,Mt=1,$t=.9,O=.5,pe=.25,T=.86,Lt="ContentVersion",Ft="ContentDocument",ue=200,Fe=150,R={apiRequests:0,seconds:0};function d(e,t){return{apiRequests:e,seconds:e*t}}function G(e){return{apiRequests:e,seconds:p(e,Ae)*b}}function l(...e){return e.reduce((t,n)=>({apiRequests:t.apiRequests+n.apiRequests,seconds:t.seconds+n.seconds}),R)}function p(e,t){return e>0?Math.ceil(e/t):0}function E(e){return p(e,x)}function Ye(e){return ne(e,ze).length}function Wt(e){return e.length>It?x/4:x}function Q(e,t){return p(e,Wt(t))*Ye(t)}function We(e,t){if(e.length===0)return 0;let n=2*(e.length-1)+2+2*(t-1);for(let r of e){let o=JSON.stringify(r,null,2),i=1;for(let a=o.indexOf(`
|
|
9
|
-
`);a>=0;a=o.indexOf(`
|
|
10
|
-
`,a+1))i++;n+=Buffer.byteLength(o,"utf8")+i*2*t}return n}function Ut(e){let t=gt+(e.printsBytes??0),n=[];for(let r of e.objects)t+=r.records*pt+Be(r.records,2),r.records>0&&(t+=bt),t+=(r.inBin??0)*At,t+=(r.links??0)*(Et+Ct),r.entry!==void 0&&n.push(r.entry);return t+We(n,2)+We(e.leftOut??[],3)}function Xn(e,t,n){let[,...r]=ne(t,ze),o=n==="scanAllLive"?Bt:void 0;return r.map(i=>Oe(e,i,o))}function Ue(e,t){return t.reduce((n,r)=>n+p(e,Math.max(1,r)),0)}function qt(e,t){if(e.records===0)return{pages:0,reads:0};let n=Math.floor(e.records/t),r=e.records-n*t,o=e.otherGroups??[];return{pages:n+(r>0?1:0),reads:n*Ue(t,o)+Ue(r,o)}}function Zn(e){let t=e.objects.length,n=p(e.described,I),r=e.describedAlone??0,o=G(p(e.counted??t,S)),i=(e.countedAlone??0)+p(e.recounted??0,S),a=o.apiRequests+i,m=G(p(t,S)),u=Math.min(e.pageRows,kt),c=0,g=0,y=0;for(let f of e.objects){y+=f.records;let w=qt(f,u);c+=w.pages,g+=w.reads}let A=H(e.objects.map(f=>$(f.inBin??0))),h=Gt(e.objects),B=e.objects.filter(f=>(f.stampedSince??0)>0),C=l(H(B.flatMap(f=>[$(f.stampedSince??0),1])),G(p(B.length,S))),F=c+g+(c>0?wt:0),s={guard:Rt,scope:yt+n+r,start:Ot,counts:a,bin:A.apiRequests,snapshot:F+h.apiRequests,stability:St+m.apiRequests+C.apiRequests};return{records:y,apiRequests:Object.values(s).reduce((f,w)=>f+w,0),requestsByPhase:s,seconds:Math.ceil(n*j+(r+i)*b+o.seconds+m.seconds+A.seconds+C.seconds+h.seconds+c*Mt+g*O),bytes:Ut(e)}}function Gt(e){let t=e.filter(o=>o.links!==void 0);if(t.length===0)return R;let n=0,r=0;for(let o of t)o.links===null?n+=p(p(o.records,$e),S):r+=o.links??0;return l(H(t.map(o=>$(o.links??0))),d(n,O),d(p(p(r,$e),S),O))}function $(e){return Math.max(1,p(e,xt))}function H(e){let t=0,n=0;for(let r=0;r<e.length;r+=S){let o=Math.max(1,...e.slice(r,r+S));t+=1,n+=o-1}return l(d(t,b),d(n,$t))}function Ht(e){let t=new Set([...e.held,...e.moved.map(n=>n.objectApiName)]);return l(G(p(e.objects,S)),H(e.moved.flatMap(({live:n,deleted:r})=>[$(n),$(r)])),G(p(t.size,S)))}function Xe(e){let t=e.reduce((n,r)=>n+E(r),0);return l(d(t*(jt-1),O),d(t,T))}function Qt(e){return l(...e.filter(t=>t.records>0).map(({records:t,cascades:n,described:r})=>{let o=E(t);return l(d(r?0:1,j),Xe([t]),d(o*p(n,S),b),d(o*Dt,O))}))}function le(e,t){let n=R;for(let r=e;r>0;r-=v){let o=Math.min(r,v);n=l(n,d(Je,b),d(Q(o,t),O),d(V([{rows:o}]),T),d(E(o),O))}return n}function Kt(e,t,n,r){return e===0||n===0?R:l(d(r?0:1,j),d((n+E(e))*p(t,S),b))}var Vt=W({childRelationships:he(W({childSObject:be().optional(),cascadeDelete:te().optional(),restrictedDelete:te().optional()}).loose()).nullish()}).loose();function er(e,t){let n=Vt.parse(e).childRelationships??[],r=n.filter(u=>u.cascadeDelete===!0),o=t?.worked,i={dependents:n.filter(u=>(u.cascadeDelete===!0||u.restrictedDelete===!0)&&(o===void 0||u.childSObject!==void 0&&o.has(u.childSObject))).length,cascades:r.length,cascadeChildren:[...new Set(r.flatMap(u=>u.childSObject===void 0?[]:[u.childSObject]))]};if(t===void 0)return i;let a=n.filter(u=>u.cascadeDelete===!0&&u.childSObject!==void 0&&!t.inCheckpoint.has(u.childSObject.toLowerCase())),m=a.filter(u=>u.childSObject!==void 0&&t.worked?.has(u.childSObject)===!0);return{...i,outside:{all:a.length,worked:m.length}}}function ge(e,t){return e?.get(t)??{dependents:Le,cascades:Le}}function Jt(e,t){if(e<Ee||t===Lt||t===Ft)return d(V([{rows:e}]),T);let n=Math.ceil(e/Ce),r=Math.ceil(e/n),o=R;for(let i=e;i>0;i-=r){let a=Math.min(i,r);o=l(o,{apiRequests:we({stateReads:Se(a)}),seconds:ke(a)})}return o}function fe(e,t=Number.POSITIVE_INFINITY){let n=e.filter(r=>r.records>0);return n.length===0?R:l(d(Pt,b),...n.map(({records:r,dependents:o,objectApiName:i})=>{let a=E(r),m=0;for(let c=r;c>0;c-=t)Math.min(c,t)>x&&m++;let u=m*o;return l(d(1,b),d(a,O),d(u+o*a,pe),Yt(i,a,u+o*a),Jt(r,i))}))}function zt(e,t,n){return l(...e.filter(({count:r})=>r>0).map(({objectApiName:r,count:o})=>{let{dependents:i}=ge(t,r),a=o>x?i:0;return l(d(n.has(r)?0:1,j),d(a+i*E(o),pe))}))}function Yt(e,t,n){return e===void 0||K[e]===void 0||Re.has(e)?R:l(d(1,b),d(t,O),d(n,pe),d(t,T))}function N(e){return e.toDelete.createdSince+e.toDelete.broughtBackSince}function z(e){return e.toBringBack.inBin+e.toBringBack.deletedWhileTaken+Z(e)}function Z(e){return e.toBringBack.carriers??0}function L(e){return e.toDelete.comesBackWithParent+Z(e)}function Y(e){return e.cannotUndo.filter(t=>t.reason==="deletedWithCreatedParent"||t.reason==="deletedWithParentOutside").reduce((t,n)=>t+n.count,0)}function X(e){return z(e)-Z(e)+e.toBringBack.withParent}function Ze(e){return e.toGiveBack.records+e.toBringBack.inBin+e.toBringBack.withParent}function me(e){return e.cannotUndo.filter(t=>t.reason==="goneForGood").reduce((t,n)=>t+n.count,0)}function _(e){return e.toRecreate??0}function Xt(e){return me(e)+_(e)}function Zt(e,t){let n=0;for(let r=e;r>0&&t>0;r-=v){let o=Math.min(r,v);n+=p(t*E(o),S)}return n}function et(e,t,n){let r=Xt(e);return{objectApiName:e.objectApiName,live:e.toGiveBack.records+e.touched+N(e)+e.unexplained,deleted:X(e)+L(e)+Y(e),valued:e.toGiveBack.records+e.touched+e.toBringBack.withParent,backTo:X(e)+Z(e)+Y(e)>0||t.undeletable===!1&&r>0,deletes:N(e),scans:r>0&&t.undeletable!==!1,whole:e.schemaDrift!==void 0,outside:n?.get(e.objectApiName)?.outside??{all:e.outside.length,worked:e.outside.length}}}function en(e,t,n,r){let o=et(e,t,n),i=e.toBringBack,a=r?0:L(e);return{...o,live:e.toGiveBack.records+e.touched+e.unexplained+X(e)+_(e)+a,deleted:N(e)+L(e)-a+Y(e),valued:e.toGiveBack.records+e.touched+i.inBin+i.withParent+_(e),backTo:Y(e)>0||t.undeletable===!1&&me(e)>0,scans:me(e)>0&&t.undeletable!==!1,deletes:a}}function tt(e,t,n,r,o,i=0,a,m=0){let u=[],c=[],g=0,y=0,A=0,h=!1,B=0;for(let{objectApiName:s,records:f,fields:w}of e){let k=t.get(s);if(k===void 0){n.has(s)&&u.push({objectApiName:s,live:0,deleted:0});continue}u.push({objectApiName:s,live:k.live,deleted:k.deleted}),g+=Q(k.valued,w),k.backTo&&!k.whole&&y++,k.scans&&c.push(H([$(f)])),k.deletes!==0&&(!k.whole&&!k.backTo&&A++,k.outside.all>0&&(h=!0),B+=Zt(k.deletes,k.outside.worked))}a!==void 0&&(h=!0);let C=a!==void 0?1:0,F=o===void 0?p(e.length+C,I):p(o.first+C,I)+p(o.later,I);return l(d(Tt,b),d(F,j),Ht({objects:e.length,held:e.filter(s=>s.records>0).map(s=>s.objectApiName),moved:u}),d(g,O),d(p(y,I),j),d(A,b),d(h?1:0,j),d(B,b),d(i,b),d(m,b),d(a?.requests??0,O),...c,d(p(p(r,Nt),S),b))}function nt(e){return e.files!==void 0?{requests:e.filesRequests??0}:void 0}function rt(e,t){let n=new Map(e.diff.objects.map(o=>[o.objectApiName,o])),r=new Map;for(let o of e.objects){let i=n.get(o.objectApiName);i&&r.set(o.objectApiName,t(i,o))}return r}function tn(e){let t=new Set(e.diff.objects.flatMap(n=>Object.keys(n.lastChangedBy)));return tt(e.objects,rt(e,(n,r)=>et(n,r,e.relationships)),new Set(e.diff.unread.map(n=>n.objectApiName)),t.size,e.diff.described,e.diff.parentsOutsideRequests??0,nt(e.diff),e.diff.fieldsRequests??0)}function qe(e,t,n=!1){let r=!t&&(n||e.diff.objects.some(i=>L(i)>0)),o=e.diff.described;return tt(e.objects,rt(e,(i,a)=>en(i,a,e.relationships,t)),new Set(e.diff.unread.map(i=>i.objectApiName)),r?1:0,o===void 0?void 0:{first:o.first+o.later,later:0},e.diff.parentsOutsideRequests??0,nt(e.diff),e.diff.fieldsRequests??0)}function nn(e){return l(...e.filter(t=>t>0).map(t=>l(d(1,b),d(E(t),T))))}var rn=new Set(["activateddate","activatedbyid"]);function on(e){return l(...e.filter(({objectApiName:t,records:n})=>n>0&&K[t]!==void 0).map(({records:t})=>l(d(1,b),d(E(t),T))))}function sn(e,t){return e*ht+t*Ke}function Ge(e){return l(d(Je,b),d(Ye(e),O),d(1,T),d(1,O))}function an(e,t,n,r){if(t===0)return R;let o=e==="Order"?n.find(c=>c.toLowerCase()==="status"):void 0,i=o===void 0?[]:[o],a=c=>l(le(c,n),o?le(c,i):R),m=l(Ge(n),o?Ge(i):R),u=d(Q(t,n),O);return l(a(t),r.held?l(u,m):R,r.held&&r.twice?l(a(t),m):R,r.nextPass?l(u,m):R)}function He(e,t,n,r){let o=r?.get(n.objectApiName)?.cascadeChildren;return o!==void 0?o.includes(t):e?.cascadeParents!==void 0&&e.cascadeParents.length===0?!1:e?.readOrder!==void 0&&n.readOrder!==void 0?e.readOrder<n.readOrder:!0}function dn(e){let t=e.diff.objects,n=new Map(e.objects.map(s=>[s.objectApiName,s])),r=s=>ge(e.relationships,s),o=e.diff.undoCannot?e.diff.undoCannot.reduce((s,{objectApiName:f,count:w})=>s.set(f,(s.get(f)??0)+w),new Map):void 0,i=e.diff.withParentDeleted?new Map(e.diff.withParentDeleted.map(({objectApiName:s,count:f})=>[s,f])):void 0,a=s=>{if(i!==void 0)return Math.max(0,N(s)-(i.get(s.objectApiName)??0));if(o===void 0||n.get(s.objectApiName)?.undeletable!==!1)return N(s);let f=(o.get(s.objectApiName)??0)-s.toDelete.comesBackWithParent;return Math.max(0,Math.min(N(s),f))},m=t.filter(s=>a(s)>0),u=t.filter(s=>L(s)>0),c=(s,f)=>f.some(w=>w.objectApiName!==s.objectApiName&&He(n.get(w.objectApiName),w.objectApiName,s,e.relationships)),g=(s,f)=>f.some(w=>{let k=n.get(w.objectApiName);return k!==void 0&&w.objectApiName!==s.objectApiName&&He(s,s.objectApiName,k,e.relationships)}),y=t.reduce((s,f)=>s+E(z(f)),0),A=e.reusesPreview!==!0&&t.some(s=>N(s)>0&&(e.relationships?.get(s.objectApiName)?.outside?.all??s.outside.length)>0),h=t.some(s=>z(s)>0&&r(s.objectApiName).cascades>0),B=l(d(h&&!A?1:0,j),Qt(t.map(s=>({records:z(s),cascades:r(s.objectApiName).cascades,described:e.reusesPreview!==!0}))),...t.map(s=>Kt(s.toBringBack.withParent,r(s.objectApiName).cascades,y,e.reusesPreview!==!0)),...t.map(s=>{let f=n.get(s.objectApiName);return f===void 0?R:an(s.objectApiName,Ze(s),f.fields,{held:c(f,m),twice:g(f,m),nextPass:c(f,u)})}),nn(t.map(_)),on(t.map(s=>({objectApiName:s.objectApiName,records:_(s)}))),fe(t.map(s=>({objectApiName:s.objectApiName,records:a(s),dependents:r(s.objectApiName).dependents})),re)),C=t.flatMap(s=>{let f=n.get(s.objectApiName),w=_(s);return w===0||f===void 0?[]:K[s.objectApiName]===void 0?[]:f.fields.some(k=>rn.has(k.toLowerCase()))?[le(w,f.fields)]:[]}),F=u.length>0||C.length>0?l(fe(u.map(s=>({objectApiName:s.objectApiName,records:L(s),dependents:r(s.objectApiName).dependents})),re),...C,qe(e,!0)):R;return l(d(_t,b),B,un(e.diff.files),qe(e,!1,C.length>0),F)}function cn(e){return e===void 0?0:e.unlink+e.relink+e.updateLinks}function un(e){return e===void 0?R:d(p(e.unlink,ue)+p(e.relink,ue)+p(e.updateLinks,ue),T)}function tr(e){let t=e.diff.objects,n=t.reduce((g,y)=>g+N(y)+y.toDelete.comesBackWithParent,0),r=t.reduce((g,y)=>g+y.toGiveBack.records,0),o=t.reduce((g,y)=>g+X(y),0),i=t.reduce((g,y)=>g+_(y),0),a=n+r+o+i,m=l(d(Ve+vt(e.diff),b),e.reusesPreview===!0?R:tn(e)),u=e.diff.files;if(a===0&&cn(u)===0)return{records:0,apiRequests:m.apiRequests,seconds:Math.ceil(m.seconds),bytes:0};let c=l(m,d(e.automationRequests,O),d(e.deliverabilityRequests??0,b),dn(e));return{records:a,apiRequests:c.apiRequests,seconds:Math.ceil(c.seconds),bytes:sn(t.reduce((g,y)=>g+Ze(y),0),n+o+2*i)+ln(u)}}function ln(e){return e===void 0?0:e.unlink*Fe+e.relink*Ke+e.updateLinks*Fe}var fn=1;function Qe(e,t){let n=R;for(let r=e;r>0;r-=v){let o=Math.min(r,v);n=l(n,d(fn,b),d(Q(o,t),O),d(V([{rows:o}]),T))}return n}function mn(e,t){let n=Math.min(e.givenBackHeld??0,e.givenBack),r=R;for(let o=e.givenBack;o>0;o-=v)r=l(r,d(Q(Math.min(o,v),t),O));return l(Qe(n,t),Qe(e.givenBack-n,t),r)}var pn=2;function gn(e){let t=Math.min(e.givenBackHeld??0,e.givenBack);return d(E(e.givenBack)+E(t)+E(e.givenBack-t),O)}function nr(e){let t=new Map(e.objects.map(c=>[c.objectApiName,c.fields])),n=e.rewound.reduce((c,g)=>c+g.deleted+g.broughtBack+g.givenBack,0),r=d(Ve,b);if(n===0)return{records:0,apiRequests:r.apiRequests,seconds:Math.ceil(r.seconds),bytes:0};let o=e.rewound.some(c=>c.deleted>0),i=e.rewound.some(c=>c.givenBack>0),a=new Set(e.rewound.filter(c=>c.broughtBack>0).map(c=>c.objectApiName)),m=o&&i?l(d(pn,b),...e.rewound.map(gn)):R,u=l(r,d(e.automationRequests,O),m,fe(e.rewound.map(c=>({objectApiName:c.objectApiName,records:c.broughtBack,dependents:ge(e.relationships,c.objectApiName).dependents}))),a.size>0?zt(e.along??[],e.relationships,a):R,Xe(e.rewound.map(c=>c.deleted)),...e.rewound.map(c=>mn(c,t.get(c.objectApiName)??[])));return{records:n,apiRequests:u.apiRequests,seconds:Math.ceil(u.seconds),bytes:0}}var bn={take:{what:"This checkpoint",then:"Take it once the org has requests to spare \u2014 the limit is counted over the last 24 hours \u2014 or pick fewer objects.",done:"No record was read."},rewind:{what:"This rewind",then:"Rewind once the org has requests to spare \u2014 the limit is counted over the last 24 hours \u2014 or rewind fewer of its objects at a time, which sends only theirs (the objects ticked in the preview, or --object on a command line).",done:"No record was read or written."},undo:{what:"This undo",then:"Undo the rewind once the org has requests to spare \u2014 the limit is counted over the last 24 hours \u2014 while the recycle bin still holds what it brings back.",done:"No record was read or written."}},hn=W({FileStorageMB:W({Max:ee(),Remaining:ee()}).loose()}).loose();async function rr(e,t){let n,r;try{n=await e.request({method:"GET",url:"/limits"}),r=await ve({request:()=>Promise.resolve(n)})}catch(a){throw new Error(`${t} did not say how many API requests it has left today: ${P(a)}`)}let o;try{o=await Ne({request:()=>Promise.resolve(n)})}catch(a){o={unread:P(a)}}let i=hn.safeParse(n);return{...r,emails:o,...i.success?{fileStorage:{max:i.data.FileStorageMB.Max,remaining:i.data.FileStorageMB.Remaining}}:{}}}var Rn={deliverability:e=>`to read whether ${e} delivers its emails`};function yn(e,t){if(e===void 0)return"";let n=Object.entries(Rn).flatMap(([r,o])=>{let i=e[r]??0;return i>0&&o?[{requests:i,words:o(t)}]:[]}).map(({requests:r,words:o},i)=>`${r}${i===0?" of them":""} ${o}`);return n.length>0?` (${n.join(", ")})`:""}function or(e,t,n,r){let o=Te(t,n);if(o.verdict!=="exceeds")return;let i=bn[e];return{code:"API_BUDGET",message:`${i.what} takes about ${o.estimate} API requests${yn(o.parts,r)}; ${r} has ${n.remaining} of its ${n.max} left today. ${i.then} ${i.done}`}}var On={rewind:{then:"Free file storage, then rewind again.",done:"Nothing was written."},undo:{then:"Free file storage, then undo the rewind again while the recycle bin still holds them.",done:"Nothing was written."}};function wn(e){let t=e/1048576;return t<1?`${Math.max(1,Math.round(t*10))/10} MB`:`${Math.ceil(t)} MB`}function ir(e,t,n,r){if(n===void 0||t.files===0||t.bytes<=n*1048576)return;let o=On[e];return{code:"FILE_STORAGE",message:`Bringing back ${t.files===1?"1 file":`${t.files} files`} takes ${wn(t.bytes)} of file storage; ${r} has ${n} MB left. ${o.then} ${o.done}`}}export{Sn as a,En as b,Cn as c,An as d,Bn as e,vn as f,Tn as g,Nn as h,_n as i,ie as j,Pn as k,De as l,xn as m,In as n,Me as o,kt as p,xt as q,b as r,Mt as s,T as t,Xn as u,Zn as v,er as w,dn as x,tr as y,nr as z,rr as A,or as B,ir as C};
|
package/lib/chunk-GSG7WZHM.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __sandforgeRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __sandforgePath } from 'node:url';
|
|
3
|
-
import { dirname as __sandforgeDirname } from 'node:path';
|
|
4
|
-
const require = __sandforgeRequire(import.meta.url);
|
|
5
|
-
const __filename = __sandforgePath(import.meta.url);
|
|
6
|
-
const __dirname = __sandforgeDirname(__filename);
|
|
7
|
-
import{A as y,B as z,C as A,D as B,E as C,F as D,G as E,H as F,I as G,J as H,K as I,L as J,M as K,N as L,O as M,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,v as t,w as u,x as v,y as w,z as x}from"./chunk-IFETCRWE.mjs";import"./chunk-TYYOBZMU.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-GGD7ON3M.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-TTFDUKUS.mjs";import"./chunk-7EANH5PY.mjs";import"./chunk-NTOVCTRS.mjs";export{a as CHECKPOINT_DIR_MODE,b as CHECKPOINT_FILE_MODE,p as CHECKPOINT_FILE_PATH,D as CheckpointStoreError,c as DEFAULT_KEEP_DAYS,d as EXPIRY_WARNING_DAYS,I as OrgCheckpointStore,f as PREVIEW_KEEP_MS,e as RECYCLE_BIN_DAYS,L as acquireOrgLock,m as binFileOf,A as binReachSince,G as compressedFieldPrints,h as defaultCheckpointLocksDir,g as defaultCheckpointStoreRoot,x as expiresAtFor,z as expiresSoon,s as exportedFileIn,r as exportedFilesOf,n as filesDocumentsFileOf,o as filesLinksFileOf,j as indexFileOf,y as isExpired,q as isExportedPath,J as latestRewindOf,v as makePrivateDir,w as newFolderId,l as notInBinFileOf,H as openCheckpointStore,K as orgLockFileOf,M as orgLockHolder,i as organizationKey,t as previewDirOf,F as readFieldPrints,k as recreatedFileOf,u as rewindDirOf,B as scratchOrgExpired,C as scratchOrgExpiresSoon,E as storeRefusalWords};
|