sandforge 0.0.0-stage → 1.79.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/LICENSE +21 -0
- package/README.md +54 -2
- package/THIRD-PARTY-NOTICES.md +1624 -0
- package/bin/sandforge-autopilot.mjs +12 -0
- package/bin/sandforge-backup.mjs +12 -0
- package/bin/sandforge-checkpoint.mjs +12 -0
- package/bin/sandforge-cleanup.mjs +12 -0
- package/bin/sandforge-clone.mjs +12 -0
- package/bin/sandforge-compare.mjs +12 -0
- package/bin/sandforge-dataops.mjs +12 -0
- package/bin/sandforge-empty.mjs +12 -0
- package/bin/sandforge-env.mjs +12 -0
- package/bin/sandforge-frozen.mjs +12 -0
- package/bin/sandforge-mcp.mjs +12 -0
- package/bin/sandforge-monitor.mjs +12 -0
- package/bin/sandforge-seed.mjs +12 -0
- package/bin/sandforge-sync.mjs +12 -0
- package/bin/sandforge.mjs +12 -0
- package/lib/catalogue.en.json +1 -0
- package/lib/chunk-2BVTCNWA.mjs +7 -0
- package/lib/chunk-2S5OMIIA.mjs +7 -0
- package/lib/chunk-2YIV2OB2.mjs +7 -0
- package/lib/chunk-342FN7AO.mjs +9 -0
- package/lib/chunk-36U7IQ6Y.mjs +25 -0
- package/lib/chunk-3CA767QB.mjs +7 -0
- package/lib/chunk-3DCUADVK.mjs +7 -0
- package/lib/chunk-3F5YMM2F.mjs +7 -0
- package/lib/chunk-3OHPD72J.mjs +9 -0
- package/lib/chunk-3RYLICRX.mjs +7 -0
- package/lib/chunk-3SRXFZSD.mjs +7 -0
- package/lib/chunk-42RER7V4.mjs +14 -0
- package/lib/chunk-4GL773D5.mjs +7 -0
- package/lib/chunk-4HFRHFGQ.mjs +7 -0
- package/lib/chunk-4HW535YJ.mjs +7 -0
- package/lib/chunk-4NAHW2D3.mjs +7 -0
- package/lib/chunk-4SNDMJP2.mjs +7 -0
- package/lib/chunk-4TLYUZD5.mjs +7 -0
- package/lib/chunk-4U6NXJNL.mjs +7 -0
- package/lib/chunk-4XZ5YT5O.mjs +7 -0
- package/lib/chunk-55HEMHEG.mjs +7 -0
- package/lib/chunk-57VHUYNG.mjs +10 -0
- package/lib/chunk-5AJRHRXA.mjs +20 -0
- package/lib/chunk-5CD257T7.mjs +7 -0
- package/lib/chunk-5HMAPZBV.mjs +7 -0
- package/lib/chunk-5LFSFYFJ.mjs +7 -0
- package/lib/chunk-5MMXFWPD.mjs +7 -0
- package/lib/chunk-5O6JOMHS.mjs +13 -0
- package/lib/chunk-5P4PHJRL.mjs +9 -0
- package/lib/chunk-5QKTYCWE.mjs +11 -0
- package/lib/chunk-66NMFCWX.mjs +7 -0
- package/lib/chunk-6EBMEGZB.mjs +7 -0
- package/lib/chunk-6LAXTAVN.mjs +7 -0
- package/lib/chunk-6MUEPV7M.mjs +9 -0
- package/lib/chunk-6QSM2WIH.mjs +10 -0
- package/lib/chunk-75ADZS6B.mjs +7 -0
- package/lib/chunk-7EANH5PY.mjs +68 -0
- package/lib/chunk-7F54PZUS.mjs +7 -0
- package/lib/chunk-7UQD6V6F.mjs +7 -0
- package/lib/chunk-AAVJ5XVX.mjs +7 -0
- package/lib/chunk-ALJVEUUS.mjs +7 -0
- package/lib/chunk-ALUFROGA.mjs +7 -0
- package/lib/chunk-AR7BE5O2.mjs +7 -0
- package/lib/chunk-AUTM6H6Z.mjs +7 -0
- package/lib/chunk-AV5SWEHP.mjs +9 -0
- package/lib/chunk-B45CNPUX.mjs +47 -0
- package/lib/chunk-BILZ3SSR.mjs +7 -0
- package/lib/chunk-BN7A4GRQ.mjs +7 -0
- package/lib/chunk-BOGNK4LV.mjs +7 -0
- package/lib/chunk-BS5T3MOQ.mjs +7 -0
- package/lib/chunk-BZ24IAP5.mjs +7 -0
- package/lib/chunk-CA5NAXSU.mjs +7 -0
- package/lib/chunk-CE6ZDGBB.mjs +7 -0
- package/lib/chunk-CGWXQX75.mjs +7 -0
- package/lib/chunk-CHCHAE4B.mjs +7 -0
- package/lib/chunk-D3QRXG63.mjs +787 -0
- package/lib/chunk-DBFJB2B6.mjs +7 -0
- package/lib/chunk-DLDX6RRC.mjs +7 -0
- package/lib/chunk-EADHKH3A.mjs +7 -0
- package/lib/chunk-EEVVGGM6.mjs +7 -0
- package/lib/chunk-ENLBYECD.mjs +7 -0
- package/lib/chunk-EQF2IJS2.mjs +11 -0
- package/lib/chunk-EQOQASDQ.mjs +7 -0
- package/lib/chunk-F2424IKX.mjs +7 -0
- package/lib/chunk-F74IHMGL.mjs +7 -0
- package/lib/chunk-FOVVHGEP.mjs +7 -0
- package/lib/chunk-FQBRBBY4.mjs +7 -0
- package/lib/chunk-FQGHL7GR.mjs +259 -0
- package/lib/chunk-GAM726CK.mjs +7 -0
- package/lib/chunk-GCOB7K5N.mjs +7 -0
- package/lib/chunk-GMY5427L.mjs +7 -0
- package/lib/chunk-GNC27UEU.mjs +7 -0
- package/lib/chunk-H2PJNIYJ.mjs +7 -0
- package/lib/chunk-H45UXY6G.mjs +7 -0
- package/lib/chunk-HCIDVIOW.mjs +7 -0
- package/lib/chunk-HF6LAK3G.mjs +7 -0
- package/lib/chunk-HJC7AIBK.mjs +7 -0
- package/lib/chunk-HJKM3E56.mjs +7 -0
- package/lib/chunk-HTJ5OGP5.mjs +7 -0
- package/lib/chunk-HUMEKZT5.mjs +8 -0
- package/lib/chunk-HV2MXMGI.mjs +7 -0
- package/lib/chunk-HXS7ORUF.mjs +11 -0
- package/lib/chunk-I3JKJTLO.mjs +110 -0
- package/lib/chunk-I7O6C2B5.mjs +8 -0
- package/lib/chunk-IAZB4WIL.mjs +7 -0
- package/lib/chunk-IC2C2GOF.mjs +8 -0
- package/lib/chunk-IEYG5ATY.mjs +7 -0
- package/lib/chunk-INIQ23K6.mjs +7 -0
- package/lib/chunk-INIT2UKJ.mjs +7 -0
- package/lib/chunk-J7HVXMSW.mjs +7 -0
- package/lib/chunk-JVL444U5.mjs +7 -0
- package/lib/chunk-K22PA4XL.mjs +7 -0
- package/lib/chunk-K2FBZIXY.mjs +7 -0
- package/lib/chunk-KLX67VPL.mjs +7 -0
- package/lib/chunk-L776PUMV.mjs +7 -0
- package/lib/chunk-LQ4DRFUH.mjs +9 -0
- package/lib/chunk-LRFAIUN7.mjs +7 -0
- package/lib/chunk-LV6G4XTK.mjs +7 -0
- package/lib/chunk-M6P5ZZLE.mjs +7 -0
- package/lib/chunk-MTMH6H2A.mjs +8 -0
- package/lib/chunk-MYTIL2JD.mjs +10 -0
- package/lib/chunk-NEVXIGR6.mjs +10 -0
- package/lib/chunk-NGSMZZDA.mjs +7 -0
- package/lib/chunk-NHWE66K5.mjs +7 -0
- package/lib/chunk-NM4MDLK4.mjs +7 -0
- package/lib/chunk-NTDN2JQZ.mjs +19 -0
- package/lib/chunk-NTOVCTRS.mjs +7 -0
- package/lib/chunk-NZ5ZZLKS.mjs +7 -0
- package/lib/chunk-OQOZAPCI.mjs +7 -0
- package/lib/chunk-OTWRDD6L.mjs +7 -0
- package/lib/chunk-P2PJYWGQ.mjs +7 -0
- package/lib/chunk-P42X3B4D.mjs +7 -0
- package/lib/chunk-P7GSGFJO.mjs +7 -0
- package/lib/chunk-PA3MKJVH.mjs +7 -0
- package/lib/chunk-PBI4BYWW.mjs +7 -0
- package/lib/chunk-PNCONNFJ.mjs +10 -0
- package/lib/chunk-PTTHSSQO.mjs +7 -0
- package/lib/chunk-PUOX4NBJ.mjs +8 -0
- package/lib/chunk-PZTSVQSF.mjs +7 -0
- package/lib/chunk-QPF6C5MX.mjs +7 -0
- package/lib/chunk-QQZZMKU3.mjs +7 -0
- package/lib/chunk-QROPNEGY.mjs +14 -0
- package/lib/chunk-QRV2OSIS.mjs +7 -0
- package/lib/chunk-QSRAEUGZ.mjs +7 -0
- package/lib/chunk-QWT2C74M.mjs +7 -0
- package/lib/chunk-RAAANPPG.mjs +7 -0
- package/lib/chunk-RACDTRZA.mjs +7 -0
- package/lib/chunk-RFEO2KAN.mjs +7 -0
- package/lib/chunk-RH3N2H7P.mjs +7 -0
- package/lib/chunk-RSWDYIHY.mjs +37 -0
- package/lib/chunk-RSYICMZG.mjs +8 -0
- package/lib/chunk-SAR5622P.mjs +7 -0
- package/lib/chunk-SBIMVCXT.mjs +101 -0
- package/lib/chunk-SCKUIE3R.mjs +7 -0
- package/lib/chunk-SFURUNJM.mjs +7 -0
- package/lib/chunk-SIOZXPFG.mjs +7 -0
- package/lib/chunk-SRPWW4A2.mjs +10 -0
- package/lib/chunk-SRQDABQ2.mjs +15 -0
- package/lib/chunk-SVS6UMDU.mjs +323 -0
- package/lib/chunk-T63U4OZJ.mjs +7 -0
- package/lib/chunk-TBZMC2VV.mjs +11 -0
- package/lib/chunk-TEOLMRDO.mjs +7 -0
- package/lib/chunk-TLH7AD35.mjs +7 -0
- package/lib/chunk-TNXUU6W7.mjs +14 -0
- package/lib/chunk-TQX3PURV.mjs +7 -0
- package/lib/chunk-TUACWKIH.mjs +7 -0
- package/lib/chunk-TW3N6W5Z.mjs +7 -0
- package/lib/chunk-TYYOBZMU.mjs +10 -0
- package/lib/chunk-TZE3Y7IQ.mjs +7 -0
- package/lib/chunk-UNDIBZWG.mjs +7 -0
- package/lib/chunk-VGW4MXXZ.mjs +7 -0
- package/lib/chunk-VHI54FBK.mjs +441 -0
- package/lib/chunk-VXHDBYMI.mjs +7 -0
- package/lib/chunk-W7KFAY55.mjs +7 -0
- package/lib/chunk-WFEB5X4U.mjs +8 -0
- package/lib/chunk-WIO4XO4F.mjs +7 -0
- package/lib/chunk-WJY54JO7.mjs +13 -0
- package/lib/chunk-WR2GIKWE.mjs +7 -0
- package/lib/chunk-WRU5FJFC.mjs +7 -0
- package/lib/chunk-X2PY6MWZ.mjs +7 -0
- package/lib/chunk-X65MT4W3.mjs +7 -0
- package/lib/chunk-XBG5SP6Q.mjs +7 -0
- package/lib/chunk-XCA5AONB.mjs +7 -0
- package/lib/chunk-XEFDB2R4.mjs +7 -0
- package/lib/chunk-XETCPL7E.mjs +7 -0
- package/lib/chunk-Y5CGXLUB.mjs +7 -0
- package/lib/chunk-Y6J6QFI2.mjs +7 -0
- package/lib/chunk-YAZO75G2.mjs +8 -0
- package/lib/chunk-YBU4Z4QV.mjs +7 -0
- package/lib/chunk-YMJVMFPY.mjs +7 -0
- package/lib/chunk-YPSRZRIT.mjs +7 -0
- package/lib/chunk-YS4G22C2.mjs +7 -0
- package/lib/chunk-YW2SBL4Z.mjs +7 -0
- package/lib/chunk-YYZL7UGV.mjs +7 -0
- package/lib/chunk-Z7X534S4.mjs +10 -0
- package/lib/chunk-ZE6HKRR4.mjs +9 -0
- package/lib/chunk-ZHJP7L3K.mjs +7 -0
- package/lib/chunk-ZJKCWBRJ.mjs +7 -0
- package/lib/chunk-ZLZRU6MO.mjs +7 -0
- package/lib/chunk-ZOVSMN5C.mjs +7 -0
- package/lib/chunk-ZPYJPGDK.mjs +7 -0
- package/lib/chunk-ZQOZ4EFW.mjs +7 -0
- package/lib/chunk-ZUTYVST5.mjs +7 -0
- package/lib/chunk-ZXH4MBWP.mjs +7 -0
- package/lib/chunk-ZYEE34WO.mjs +7 -0
- package/lib/sandforge-autopilot.mjs +157 -0
- package/lib/sandforge-backup.mjs +99 -0
- package/lib/sandforge-checkpoint.mjs +353 -0
- package/lib/sandforge-cleanup.mjs +56 -0
- package/lib/sandforge-clone.mjs +7 -0
- package/lib/sandforge-compare.mjs +54 -0
- package/lib/sandforge-dataops.mjs +7 -0
- package/lib/sandforge-empty.mjs +140 -0
- package/lib/sandforge-env.mjs +355 -0
- package/lib/sandforge-frozen.mjs +263 -0
- package/lib/sandforge-mcp.mjs +40 -0
- package/lib/sandforge-monitor.mjs +43 -0
- package/lib/sandforge-seed.mjs +7 -0
- package/lib/sandforge-sync.mjs +7 -0
- package/lib/sandforge.mjs +28 -0
- package/package.json +52 -4
|
@@ -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{createHmac as c,randomBytes as C}from"node:crypto";import{deflateRawSync as P,inflateRawSync as A}from"node:zlib";var k="@example.invalid",M="+3363998",N=new Set(["picklist","multipicklist"]),R={FirstName:"firstName",LastName:"lastName",Email:"email",Phone:"phone",MobilePhone:"phone",HomePhone:"phone",MailingStreet:"address",OtherStreet:"address",BillingStreet:"address",ShippingStreet:"address",MailingCity:"city",OtherCity:"city",BillingCity:"city",ShippingCity:"city",MailingPostalCode:"postalCode",OtherPostalCode:"postalCode",BillingPostalCode:"postalCode",ShippingPostalCode:"postalCode",Company:"company",CompanyName:"company",Name:"company",PersonEmail:"email",PersonMobilePhone:"phone",PersonHomePhone:"phone",PersonOtherPhone:"phone",PersonMailingStreet:"address",PersonOtherStreet:"address",PersonMailingCity:"city",PersonOtherCity:"city",PersonMailingPostalCode:"postalCode",PersonOtherPostalCode:"postalCode"};function E(s,e){let t=s.split("");if(t.length<2)return s;let n=w(e,s,4*(t.length-1));for(let r=t.length-1,i=0;r>0;r--,i+=4){let a=n.readUInt32BE(i)%(r+1);[t[r],t[a]]=[t[a],t[r]]}return t.join("")}function w(s,e,t){let n=[];for(;n.length*32<t;)n.push(c("sha256",s).update(`${n.length}:${e}`).digest());return Buffer.concat(n).subarray(0,t)}function g(s,e){return c("sha256",s).update(e).digest().readUInt32BE(0)&2147483647}var d="Alex Jordan Morgan Casey Riley Quinn Avery Parker Reese Dakota Skyler Sage River Hayden Emery Finley Blake Charlie Drew Rowan Jamie Robin Kendall Logan Peyton Cameron Jesse Kai Arden Bailey Blair Brook Carson Corey Devon Eden Ellis Emerson Frankie Gray Harper Jules Jody Kerry Lane Leslie Linden Marley Micah Nico Noel Oakley Perry Quincy Reagan Remy Rory Sam Sasha Shawn Spencer Sutton Tatum Terry Toby Tracy Val Wren Wynn Adair Alden Ainsley Billie Briar Cass Dale Darcy Ellery Emory Fallon Glenn Hollis Ira Jaden Kit Lennon Lou Mackenzie Monroe Nova Palmer Presley Ridley Sawyer Scout Shay Sloane Tanner Teagan Winter".split(" "),h=["Ash","Birch","Brook","Clay","Fern","Hazel","Lark","Marsh","Oak","Thorn"].flatMap(s=>["bury","combe","dale","field","ford","gate","ridge","stone","ton","wood"].map(e=>`${s}${e}`)),$=32,p=d.length*h.length;function B(s){return{firstName:d[s%d.length],lastName:h[(s>>8)%h.length]}}function u(s){return s%d.length*h.length+(s>>8)%h.length}var m=class{personas=new Map;timesGiven=new Uint32Array(p);key;constructor(e){this.key=e??C(32).toString("hex")}cities=["Springfield","Riverside","Fairview","Greenville","Franklin","Clinton","Madison","Georgetown","Arlington","Salem"];streets=["Main St","Oak Ave","Elm St","Park Dr","Cedar Ln","Pine Rd","Maple Way","Lake Blvd"];companies=["Acme Corp","Global Tech","Sunrise Inc","Horizon Ltd","Evergreen Co","Summit Group","Atlas Partners","Apex Solutions","Nova Industries","Pinnacle LLC"];getPersona(e){let t=this.personas.get(e);if(t)return t;let n=g(this.key,`persona:${e}`);for(let y=1;y<=$&&this.timesGiven[u(n)]>0;y++)n=g(this.key,`persona:${e}:${y}`);let{firstName:r,lastName:i}=B(n),a=u(n),o=this.timesGiven[a];this.timesGiven[a]=o+1;let l=this.cities[(n>>16)%this.cities.length],f={sourceRecordId:e,firstName:r,lastName:i,email:this.emailFor(r,i,o,e),phone:`+1-555-${String(n%900+100).padStart(3,"0")}-${String((n>>4)%9e3+1e3).padStart(4,"0")}`,address:`${n%999+1} ${this.streets[(n>>12)%this.streets.length]}`,city:l,postalCode:String(n%9e4+1e4),company:this.companies[(n>>20)%this.companies.length]};return this.personas.set(e,f),f}emailFor(e,t,n,r){let i=n>0?String(n+1):"",a=`${e.toLowerCase()}.${t.toLowerCase()}${i}`,o=(g(this.key,`email:${r}`)&65535).toString(16).padStart(4,"0");return`${a}.${o}@example.com`}namesGiven(){let e=Buffer.alloc(p*4);return this.timesGiven.forEach((t,n)=>e.writeUInt32LE(t,n*4)),P(e).toString("base64")}continueFrom(e){let t;try{t=A(Buffer.from(e,"base64"),{maxOutputLength:p*4})}catch{return!1}if(t.length!==p*4)return!1;for(let n=0;n<p;n++)this.timesGiven[n]+=t.readUInt32LE(n*4);return!0}get size(){return this.personas.size}clear(){this.personas.clear(),this.timesGiven.fill(0)}},S=class{personaRegistry;hashSalt;constructor(e,t){this.hashSalt=t??C(32).toString("hex"),this.personaRegistry=e??new m(this.hashSalt)}getPersonaRegistry(){return this.personaRegistry}anonymize(e,t,n){let r=t.filter(i=>i.objectApiName===n);if(r.length===0)return e;for(let i of e){let a=String(i.Id??i.id??"");for(let o of r){let l=i[o.fieldApiName];l!=null&&(i[o.fieldApiName]=N.has(o.fieldType?.toLowerCase()??"")?null:this.applyMethod(o.method,String(l),o.fieldApiName,a,o.fieldType))}}return e}applyMethod(e,t,n,r,i){switch(e){case"fake":return this.applyFake(t,n,r,i);case"mask":return this.applyMask(t);case"hash":return this.applyHash(t);case"nullify":return null;case"redact":return"[REDACTED]";case"shuffle":return this.applyShuffle(t);case"truncate":return this.applyTruncate();case"preserve_format":return this.applyPreserveFormat(t);case"age_band":return this.applyAgeBand(t);case"generalize":return this.applyGeneralize(t,n);case"constant":return""}}applyFake(e,t,n,r){let i=this.personaRegistry.getPersona(n),a=R[t];if(a)return i[a];let o=c("sha256",this.hashSalt).update(`fake:${t}:${n}`).digest("hex");switch(r?.toLowerCase()){case"email":return`fake_${o.slice(0,8)}${k}`;case"phone":return`${M}${String(parseInt(o.slice(0,8),16)%1e4).padStart(4,"0")}`;default:return`fake_${o.slice(0,8)}`}}applyMask(e){return e.length<=4?"*".repeat(e.length):"*".repeat(e.length-4)+e.slice(-4)}applyHash(e){return c("sha256",this.hashSalt).update(e).digest("hex").slice(0,32)}applyShuffle(e){return E(e,this.hashSalt)}applyTruncate(){return""}applyPreserveFormat(e){let t=g(this.hashSalt,`preserve_format:${e}`);return e.split("").map(n=>(t=t*1664525+1013904223&2147483647,/[0-9]/.test(n)?String(t%10):/[A-Z]/.test(n)?String.fromCharCode(65+t%26):/[a-z]/.test(n)?String.fromCharCode(97+t%26):n)).join("")}applyAgeBand(e){let t=new Date(e);if(isNaN(t.getTime()))return"Unknown";let n=t.getFullYear(),r=Math.floor(n/10)*10;return`${r}-${r+9}`}applyGeneralize(e,t){if(e.includes("@")){let a=e.split("@");return`***@${a[a.length-1]}`}let n=(e.match(/\d/g)??[]).length;if(e.startsWith("+")||n>e.length/2)return e.slice(0,Math.min(3,e.length))+"-***";let r=t.toLowerCase();if(r.includes("street")||r.includes("address")||r.includes("city")||r.includes("state"))return e.split(/\s+/)[0]??e;let i=e.split(/\s+/);return i.length>1?`${i[0]} ...`:e.slice(0,Math.max(1,Math.ceil(e.length/2)))}};export{R as a,E as b,m as c,S as d};
|
|
@@ -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}from"./chunk-QQZZMKU3.mjs";import"./chunk-RSYICMZG.mjs";import"./chunk-FQGHL7GR.mjs";import"./chunk-B45CNPUX.mjs";import"./chunk-7EANH5PY.mjs";import"./chunk-NTOVCTRS.mjs";export{a as FieldMapper,b as generateValue};
|
|
@@ -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
|
+
async function i(r,l,n=5e4){let t=Math.max(500,Math.ceil(n/200)),e=await r.query(l),o=[...e.records],a=1;for(;!e.done&&e.nextRecordsUrl&&o.length<n&&a<t;)e=await r.queryMore(e.nextRecordsUrl),o.push(...e.records),a++;let s=o.length>n?o.slice(0,n):o;return{records:s,pages:a,truncated:!e.done||s.length<o.length}}var c=5;async function*g(r,l,n){if(n?.all&&!r.queryAll)throw new Error(`No queryAll to read ${u(l)} with its archived rows.`);let t=await(n?.all&&r.queryAll?r.queryAll(l):r.query(l)),e=t.records.length===0?1:0;for(yield t.records;!t.done&&t.nextRecordsUrl&&e<c;)t=await r.queryMore(t.nextRecordsUrl),e=t.records.length===0?e+1:0,yield t.records}function u(r){return/\bFROM\s+([A-Za-z0-9_]+)/i.exec(r)?.[1]??"unknown object"}export{i as a,c as b,g as c};
|
|
@@ -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-342FN7AO.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-VXHDBYMI.mjs";import"./chunk-ENLBYECD.mjs";import"./chunk-PA3MKJVH.mjs";import"./chunk-ZLZRU6MO.mjs";import"./chunk-WIO4XO4F.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-GCOB7K5N.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-PNCONNFJ.mjs";import"./chunk-CGWXQX75.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-SIOZXPFG.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-B45CNPUX.mjs";import"./chunk-7EANH5PY.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};
|
|
@@ -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{g as m,h as S,i as E,j as x}from"./chunk-PA3MKJVH.mjs";import{b as C}from"./chunk-CA5NAXSU.mjs";import{w as R,zd as T}from"./chunk-B45CNPUX.mjs";import{statfs as q}from"node:fs/promises";var oe=["reads","leasePlan","stillRunning","deliverabilityRead","question","checkpointTake","leaseAcquire","afterLeaseCheck","write","leaseRelease","recordTypeReadBack","result"];function re(e){let t=[],n=s=>e.indexOf(s),r=s=>e.lastIndexOf(s),o=(s,c,d,p=r(s),l=n(c))=>{p>=0&&l>=0&&p>l&&t.push(d)};o("leasePlan","stillRunning","what still runs was computed before the lease was planned"),o("stillRunning","deliverabilityRead","the deliverability was read before what still runs was known"),o("deliverabilityRead","question","the deliverability was read after the question it belongs to",n("deliverabilityRead")),o("question","checkpointTake","the checkpoint was taken before the last question"),o("question","leaseAcquire","the lease was taken before the last question"),o("checkpointTake","leaseAcquire","the lease was taken before the checkpoint"),o("leaseAcquire","afterLeaseCheck","the lease was checked before it was taken"),o("checkpointTake","write","a record was written before the checkpoint was taken"),o("leaseAcquire","write","a record was written before the lease was taken"),o("afterLeaseCheck","write","a record was written before the lease was checked"),o("write","leaseRelease","the lease was given back before the last write"),o("write","recordTypeReadBack","the record types were read back before the last write"),o("leaseRelease","recordTypeReadBack","the record types were read back while the lease was held"),n("leaseAcquire")>=0&&n("leaseRelease")<0&&t.push("the lease was never given back");let i=n("result");return i>=0&&e.slice(i+1).some(s=>s!=="result")&&t.push("the run went on past its result"),t}var W={insert:"go in",update:"are updated",delete:"are deleted",undelete:"come back"},L={flow:"flow",process:"process",workflowRule:"workflow rule",trigger:"Apex trigger"},h=3,v=/__e$/i;function u(e){return e.toLowerCase()}function N(e){let t=new Set,n=[];for(let r of e)t.has(u(r))||(t.add(u(r)),n.push(r));return n}function F(e){let t=e.slice(0,h),n=e.length-t.length,r=`${t.join("; ")}${n>0?`; and ${n} more`:""}`;return`${r.charAt(0).toUpperCase()}${r.slice(1)}.`}function I(e){let t=N(e.written),n=new Set(t.map(u)),r=new Map;for(let i of e.running.firing)if(i.flow!==void 0)for(let s of i.flow.creates??[]){let c=u(s);if(n.has(c)||v.test(s))continue;let d=r.get(c);d===void 0&&(d={objectApiName:s,clauses:[],by:[]},r.set(c,d));let p=`the target's ${L[i.kind]} '${i.name}' creates ${s} records as ${i.objectApiName} records ${W[i.write]}`;d.clauses.includes(p)||(d.clauses.push(p),d.by.push({kind:i.kind,name:i.name,objectApiName:i.objectApiName,write:i.write}))}let o=[...r.values()].map(({objectApiName:i,clauses:s,by:c})=>({objectApiName:i,code:"createdByAutomation",reason:F(s),creators:c.slice(0,h),...c.length>h?{moreCreators:c.length-h}:{}}));return{written:t,added:o,excluded:N(e.request.excluded??[]),picked:[...t,...o.map(({objectApiName:i})=>i)]}}var M={[u(m)]:{code:"files",reason:"Files, which every checkpoint of picked objects holds: a rewind deletes the files added since to the records it holds."},[u(x)]:{code:"attachments",reason:"Attachments, which every checkpoint of picked objects holds: a rewind deletes the attachments added since."}},K="Held as every checkpoint of picked objects holds it.",U=new Set([E,S].map(u)),J="A rewind leaves its records as they are.",k="No record was read.";function w(e,t,n){let r=new Map(t.map(a=>[u(a),a])),o=r.has(u(m)),i=a=>r.has(u(a))||o&&U.has(u(a)),s=[],c=a=>{let f=r.get(u(a));f!==void 0&&!s.includes(f)&&s.push(f)};for(let a of e.written)c(a);for(let{objectApiName:a}of e.added)c(a);for(let a of t)c(a);let d=new Set(e.picked.map(u)),p=[...e.added.flatMap(a=>{let f=r.get(u(a.objectApiName));return f===void 0?[]:[{...a,objectApiName:f}]}),...t.filter(a=>!d.has(u(a))).map(a=>({objectApiName:a,...M[u(a)]??{code:"heldUnasked",reason:K}}))],l=n.filter(({objectApiName:a})=>!i(a)).map(({objectApiName:a,reason:f,code:b,detail:y,records:O,limit:B})=>({objectApiName:a,...b!==void 0?{code:b}:{},reason:`${f} ${J}`,...y!==void 0?{detail:y}:{},...O!==void 0?{records:O}:{},...B!==void 0?{limit:B}:{}})),H=new Map(n.map(({objectApiName:a,reason:f})=>[u(a),f]));return{objects:s,added:p,notHeld:l,holds:i,why:a=>H.get(u(a))}}function g(e,t,n){return e.written.some(o=>t.holds(o))?void 0:e.written.length===0?{code:"NOTHING_HELD",message:`The run names no object it writes: a checkpoint before it would hold nothing a rewind could take back. ${n}`}:{code:"NOTHING_HELD",message:`The checkpoint before the run would hold none of the objects the run writes, so a rewind to it could take nothing of the run back. ${e.written.map(o=>`${o}: ${t.why(o)??"The take did not hold it."}`).join(" ")} ${n}`}}function z(e,t,n){let r={state:"planned",estimate:t.estimate,keepDays:n};if(t.objects.length===0&&t.leftOut.length===0&&t.refusal!==void 0)return{...r,objects:[],added:[],notHeld:[],refusal:t.refusal};let o=w(e,t.objects.map(({objectApiName:s})=>s),t.leftOut),i=g(e,o,k)??t.refusal;return{...r,objects:o.objects,added:o.added,notHeld:o.notHeld,...i!==void 0?{refusal:i}:{}}}var G=1.1;function j(e){return`${(e/(1024*1024)).toFixed(1)} MB`}function P(e,t){if(!(t===void 0||t>=Math.ceil(e*G)))return{code:"DISK",message:`The checkpoint before the run takes about ${j(e)} on this machine, and its disk has ${j(t)} free, less than that and a tenth more: make room, or leave objects out of the checkpoint. ${k}`}}async function _(e){try{let t=await q(e);return Number(t.bavail)*Number(t.bsize)}catch{return}}var V={forge:"Forge run",sync:"Sync run",seed:"Seed run",autopilot:"Autopilot run",frozen:"Frozen Dataset load",empty:"emptying"};function Y(e){return`Before ${V[e]} ${T}`}function ie(e,t){let{min:n,max:r}=R,o=i=>typeof i=="number"&&Number.isInteger(i)&&i>=n&&i<=r;if(e!==void 0){if(!o(e))throw new RangeError(`Not a number of days to keep a checkpoint, ${n} to ${r}: ${e}`);return e}return o(t)?t:R.default}function Q(e,t){return{mode:"picked",objects:e.picked,...e.excluded.length>0?{excluded:e.excluded}:{},nameWithDate:Y(t.module),keepDays:t.keepDays,unprovenLeftOut:!0,beforeRun:{module:t.module,operationId:t.operationId,tool:t.tool}}}function A(e,t){let{checkpoint:n}=t,r=w(e,n.objects.map(({objectApiName:o})=>o),n.scope.leftOut);return{state:"taken",checkpointId:n.checkpointId,name:n.name,takenAt:n.takenAt,expiresAt:n.expiresAt,objects:r.objects,records:n.objects.reduce((o,i)=>o+i.records,0),bytes:n.bytes,requests:t.requests?.total??t.estimate.apiRequests,added:r.added,notHeld:r.notHeld}}function D(e){return`${e.operation==="take"?"a checkpoint is being taken":e.operation==="rewind"?"a rewind is writing":e.operation==="undo"?"an undo is writing":e.operation==="empty"?"an emptying of its objects is writing":"SandForge is deleting checkpoints"} (process ${e.pid} on ${e.host})`}async function X(e,t,n){let r=w(t,n.checkpoint.objects.map(({objectApiName:c})=>c),n.checkpoint.scope.leftOut);if(g(t,r,"")===void 0)return{taken:!0,checkpoint:A(t,n)};let o=await e.delete(n.checkpoint.checkpointId),i=o.outcome==="busy"?`It is kept all the same, as ${D(o.holder)}: delete it from the Checkpoints page once that has ended. Nothing was written.`:"It was deleted again; nothing was written.",s=g(t,r,i);return s===void 0?{taken:!0,checkpoint:A(t,n)}:{taken:!1,refusal:s}}function $(e,t,n){return{...e,...Q(t,n)}}async function se(e,t,n){let{scopeCheckpoint:r}=await import("./chunk-EQOQASDQ.mjs"),o=I(n),i=await r(e,$(t,o,n)),s=z(o,i,n.keepDays);if(s.refusal!==void 0)return s;let c=P(s.estimate.bytes,await(e.freeBytes??_)(e.store.root));return c===void 0?s:{...s,refusal:c}}async function ae(e,t,n,r){let o=await import("./chunk-EQOQASDQ.mjs"),i=I(n);if(r!==void 0){let c=P(r.estimate.bytes,await(e.freeBytes??_)(e.store.root));if(c!==void 0)return{taken:!1,refusal:c}}let s;try{s=await o.takeCheckpoint(e,$(t,i,n))}catch(c){if(c instanceof o.CheckpointTakeStopped)return{taken:!1,stopped:!0};throw c}return s.taken?X(e.store,i,s):{taken:!1,refusal:s.refusal}}async function ce(e,t,n){if(n)return{info:t};let r=await e.delete(t.checkpointId);return r.outcome==="busy"?{info:t,notDeleted:`The checkpoint '${t.name}' taken before the run is kept, though the run wrote nothing: ${D(r.holder)}. Delete it from the Checkpoints page once that has ended.`}:{info:{state:"deleted",deleted:"nothingWritten"}}}function ue(e){return`The checkpoint before the run was refused: ${e.message.endsWith(k)?e.message.slice(0,-k.length).trimEnd():e.message} Nothing was written. Untick Checkpoint first to run without it, or fix what refuses it.`}function de(e){return`The checkpoint before the run could not be taken: ${C(e).replace(/\.$/,"")}. Nothing was written.`}var fe="The checkpoint taken before the run was deleted: the run wrote nothing.";function pe(e){return`Taking the checkpoint first (${Math.round(e)}%)`}export{oe as a,re as b,I as c,z as d,G as e,P as f,_ as g,Y as h,ie as i,Q as j,A as k,X as l,se as m,ae as n,ce as o,ue as p,de as q,fe as r,pe as s};
|
|
@@ -0,0 +1,11 @@
|
|
|
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{b as X,e as Y}from"./chunk-RSYICMZG.mjs";import{a as G,b as q,e as J,f as Q,j as L}from"./chunk-FQGHL7GR.mjs";import{ha as A,ja as N,ka as Z,la as W}from"./chunk-B45CNPUX.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
|
+
|
|
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
|
+
|
|
11
|
+
`),c))&&b(C(s,t),t))return C(s,t);if(b(C(n,t),t))return C(n,t);let l=n.findIndex((c,o)=>!b(C(n.slice(0,o+1),t),t));return{unfit:Math.max(0,l)}}function de(e,n,t){let a=t.html?C(K(e),t):e;if(b(a,t))return a;let r=t.html?C(K(n),t):n;if(b(r,t))return r;let s=(t.max??n.length)-(t.html?7:0);return t.html?`<p>${E(re(n),s)}</p>`:E(n,s)}function R(e,n,t){return{objectApiName:e,recordCount:t.length,fieldRules:[],excludedFields:[],insertOrder:n,batchSize:200,rows:t}}function B(e,n,t){return{childObject:e,lookupField:n,parentObject:t,parents:{kind:"generated"},distribution:{mode:"byKey"}}}function pe(e,n,t,a,r){let s=e.topics.flatMap((l,c)=>{let o=n.filter(m=>m.topicIndex===c),p=a[c].values;return l.utterances.map((m,f)=>{let S=o[f%o.length],$=S.customer,T={...$,caseSubject:S.subject};return{key:`${e.id}-test-${l.key}-${f+1}`,topicKey:l.key,utterance:r.text(P(m.text,T)),expectedOutcome:r.text(P(m.expectedOutcome,T)),article:{key:t(c),title:String(p.Title),facts:l.article.facts.map(k=>r.text(k))},openCase:{caseKey:S.key,contactKey:$.key,subject:S.subject,contactEmail:$.email}}})}),u=e.outOfScope.map((l,c)=>({key:`${e.id}-out-${c+1}`,topicKey:null,utterance:r.text(l.text),expectedOutcome:r.text(l.expectedOutcome)}));return[...s,...u]}function ge(e){let n=Object.keys(Q);return n.find(t=>t===e)??n.find(t=>t.split("_")[0]===e.split("_")[0])??"en_US"}function fe(e,n,t,a){let r=he(a),s=[...J(t)];for(let c=0;c<n;c++){let o=c+Math.floor(r()*(s.length-c));[s[c],s[o]]=[s[o],s[c]]}let u=G[t],l=q[t];return Array.from({length:n},(c,o)=>{let p=s[o],m=u[Math.floor(r()*u.length)],f=l[Math.floor(r()*l.length)],S=[m,f].map(ye).filter(Boolean).join(".");return{key:`${e}-c${String(o+1).padStart(2,"0")}`,company:p,firstName:m,lastName:f,email:`${S||`contact${o+1}`}@${se(p)}`}})}function ye(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]/g,"")}function se(e){return`${e.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"company"}.example`}function he(e){let n=e>>>0;return()=>{n=n+1831565813>>>0;let t=n;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}export{O as a,$e as b};
|
|
@@ -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-HUMEKZT5.mjs";import"./chunk-MYTIL2JD.mjs";import"./chunk-JVL444U5.mjs";import"./chunk-KLX67VPL.mjs";import"./chunk-5CD257T7.mjs";import"./chunk-5P4PHJRL.mjs";import"./chunk-SRQDABQ2.mjs";import"./chunk-66NMFCWX.mjs";import"./chunk-LV6G4XTK.mjs";import"./chunk-HJKM3E56.mjs";import"./chunk-XCA5AONB.mjs";import"./chunk-WR2GIKWE.mjs";import"./chunk-YMJVMFPY.mjs";import"./chunk-ALJVEUUS.mjs";import"./chunk-CE6ZDGBB.mjs";import"./chunk-4HFRHFGQ.mjs";import"./chunk-342FN7AO.mjs";import"./chunk-BOGNK4LV.mjs";import"./chunk-Z7X534S4.mjs";import"./chunk-6QSM2WIH.mjs";import"./chunk-WJY54JO7.mjs";import"./chunk-T63U4OZJ.mjs";import"./chunk-DBFJB2B6.mjs";import"./chunk-NEVXIGR6.mjs";import"./chunk-NTDN2JQZ.mjs";import"./chunk-QSRAEUGZ.mjs";import"./chunk-YYZL7UGV.mjs";import"./chunk-SAR5622P.mjs";import"./chunk-6MUEPV7M.mjs";import"./chunk-HJC7AIBK.mjs";import"./chunk-OTWRDD6L.mjs";import"./chunk-5LFSFYFJ.mjs";import"./chunk-TYYOBZMU.mjs";import"./chunk-RH3N2H7P.mjs";import"./chunk-ZUTYVST5.mjs";import"./chunk-55HEMHEG.mjs";import"./chunk-P42X3B4D.mjs";import"./chunk-TUACWKIH.mjs";import"./chunk-VXHDBYMI.mjs";import"./chunk-ENLBYECD.mjs";import"./chunk-PA3MKJVH.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-ZLZRU6MO.mjs";import"./chunk-WIO4XO4F.mjs";import"./chunk-EADHKH3A.mjs";import"./chunk-GCOB7K5N.mjs";import"./chunk-INIT2UKJ.mjs";import"./chunk-HF6LAK3G.mjs";import"./chunk-PNCONNFJ.mjs";import"./chunk-CGWXQX75.mjs";import"./chunk-TZE3Y7IQ.mjs";import"./chunk-SIOZXPFG.mjs";import"./chunk-UNDIBZWG.mjs";import"./chunk-CA5NAXSU.mjs";import"./chunk-B45CNPUX.mjs";import"./chunk-7EANH5PY.mjs";import"./chunk-NTOVCTRS.mjs";export{c as CheckpointTakeStopped,a as DEFAULT_MAX_TOTAL,d as scopeCheckpoint,e as takeCheckpoint,b as takeOrgOf};
|
|
@@ -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}from"./chunk-SRPWW4A2.mjs";import"./chunk-4TLYUZD5.mjs";import"./chunk-NTOVCTRS.mjs";export{c as DEFAULT_READ_BUDGET,d as MetadataCompare,f as firstDifference,b as installedByPackage,a as isInstalledByPackage,e as planReads};
|
|
@@ -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{f as $}from"./chunk-Y5CGXLUB.mjs";import{D as F,F as A}from"./chunk-ZLZRU6MO.mjs";import{c as M}from"./chunk-HF6LAK3G.mjs";var k=class{avgSecondsPerApiCall;batchStrategy;constructor(u){this.avgSecondsPerApiCall=u?.avgSecondsPerApiCall??.5,this.batchStrategy=new M}generate(u){let a=u.nodes.filter(o=>o.included);if(a.length===0)return{waves:[],totalRecords:0,totalApiCalls:0,estimatedDurationSeconds:0,cycleResolutions:[]};let{edges:c,components:t}=G(u),i=this.computeTopoLevels(c,t),l=new Map;for(let o of a){let e=i.get(o.objectApiName)??o.level,h=l.get(e);h?h.push(o.objectApiName):l.set(e,[o.objectApiName])}let n=[...l.keys()].sort((o,e)=>o-e),s=new Map(a.map(o=>[o.objectApiName,o])),g=n.map((o,e)=>{let h=l.get(o)??[],v=0,b=0,w=0;for(let N of h){let j=s.get(N);if(!j)continue;v+=j.recordCount;let x=this.batchStrategy.resolve(j.batchStrategy,j.recordCount),C=$(x,j.recordCount).batchCount;b+=C;let O=C*this.avgSecondsPerApiCall;O>w&&(w=O)}return{order:e,objectApiNames:h,totalRecords:v,estimatedDurationSeconds:w,estimatedApiCalls:b}}),r=this.detectCycles(u,c,t),p=g.reduce((o,e)=>o+e.totalRecords,0),f=g.reduce((o,e)=>o+e.estimatedApiCalls,0),m=g.reduce((o,e)=>o+e.estimatedDurationSeconds,0);return{waves:g,totalRecords:p,totalApiCalls:f,estimatedDurationSeconds:m,cycleResolutions:r}}computeTopoLevels(u,a){let c=new Map;a.forEach((n,s)=>{for(let g of n)c.set(g,s)});let t=new Map;for(let n of u){let s=c.get(n.sourceObject),g=c.get(n.targetObject);if(s===void 0||g===void 0||s===g)continue;let r=t.get(s);r?r.push(g):t.set(s,[g])}let i=a.map(()=>0);for(let n=a.length-1;n>=0;n--)for(let s of t.get(n)??[])i[s]=Math.max(i[s],i[n]+1);let l=new Map;for(let[n,s]of c)l.set(n,i[s]);return l}detectCycles(u,a,c){let t=c.filter(n=>n.length>1);if(t.length===0)return[];let i=new Map(A(u).map((n,s)=>[n.objectApiName,s])),l=n=>i.get(n)??0;return t.map(n=>{let s=new Set(n),g=[...n].sort((e,h)=>l(e)-l(h)),r=a.filter(e=>s.has(e.sourceObject)&&s.has(e.targetObject)&&l(e.targetObject)<l(e.sourceObject)),p=r.filter(e=>e.required===!0);if(p.length>0){let e=[...new Set(p.map(b=>b.targetObject))],h=[...new Set(p.map(b=>b.sourceObject))],v=e.length===1;return{objects:g,strategy:"unbreakable",description:`The run cannot break this cycle: ${y(p.map(S))} may not be left empty, and no order writes ${y(h)} first. ${y(e)} ${v?"is":"are"} refused, and what cannot be written without ${v?"it":"them"} is skipped.`}}let f=r.filter(e=>e.insertOnly!==!0),m=r.filter(e=>e.insertOnly===!0),o=[...f.length>0?[`${y(f.map(S))} left empty at insert and filled in by the second pass`]:[],...m.length>0?[`${y(m.map(S))} left empty for good: only an insert sets ${m.length===1?"it":"them"}, and no order writes ${y([...new Set(m.map(e=>e.sourceObject))])} first`]:[]];return{objects:g,strategy:"nullable_lookup",description:`Written in this order, with ${o.join(", and ")}.`}})}};function G(d){let u=d.nodes.filter(t=>t.included).map(t=>t.objectApiName),a=new Set(u),c=d.edges.filter(t=>t.sourceObject!==t.targetObject&&a.has(t.sourceObject)&&a.has(t.targetObject)&&F(t));return{edges:c,components:R(u,c)}}function R(d,u){let a=new Map;for(let r of d)a.set(r,[]);for(let r of u)a.get(r.sourceObject)?.push(r.targetObject);let c=0,t=new Map,i=new Map,l=new Set,n=[],s=[],g=r=>{let p=[];for(t.set(r,c),i.set(r,c),c++,n.push(r),l.add(r),p.push({v:r,neighbors:a.get(r)??[],i:0});p.length>0;){let f=p[p.length-1];if(f.i<f.neighbors.length){let e=f.neighbors[f.i++];t.has(e)?l.has(e)&&i.set(f.v,Math.min(i.get(f.v),t.get(e))):(t.set(e,c),i.set(e,c),c++,n.push(e),l.add(e),p.push({v:e,neighbors:a.get(e)??[],i:0}));continue}let m=f.v;p.pop();let o=p[p.length-1];if(o&&i.set(o.v,Math.min(i.get(o.v),i.get(m))),i.get(m)===t.get(m)){let e=[],h;do h=n.pop(),l.delete(h),e.push(h);while(h!==m);s.push(e)}}};for(let r of d)t.has(r)||g(r);return s}function S(d){return`${d.targetObject}'s lookup to ${d.sourceObject}`}function y(d){return d.length<=1?d.join(""):`${d.slice(0,-1).join(", ")} and ${d[d.length-1]}`}export{k as a,R as b};
|
|
@@ -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{B as w,Jb as v,Ua as k,d as m,e as h,eb as j,h as $,i as y}from"./chunk-B45CNPUX.mjs";var R=/^[A-Za-z0-9]{15}(?:[A-Za-z0-9]{3})?$/,T=new Set(["static","random","sequence","formula","reference","picklist_random","ai_generate","faker","regex","from_csv"]),A=class{validate(n){let t=[],a=[];return S(n,t),N(n,t,a),P(n,t),n.objects?.length&&C(n,t),M(n,t),q(n,t),{valid:t.length===0,errors:t,warnings:a}}};function S(e,n){(!e.name||e.name.trim().length===0)&&n.push({field:"name",message:"Template name is required"})}function N(e,n,t){if(!e.objects||e.objects.length===0){n.push({field:"objects",message:"Template must have at least one object"});return}for(let a of e.objects)E(a,n,t,$(a.objectApiName,e.relations))}function E(e,n,t,a){let i=`objects[${e.objectApiName}]`;(!e.objectApiName||e.objectApiName.trim().length===0)&&n.push({field:i,message:"Object API name is required"}),e.recordCount<=0&&n.push({field:`${i}.recordCount`,message:"Record count must be positive"}),e.recordCount>0&&e.fieldRules.length===0&&!a&&!V(e.rows)&&n.push({field:`${i}.fieldRules`,message:`${e.objectApiName} asks for ${e.recordCount} record(s) and names no field to fill: add at least one field rule`}),e.recordCount>1e5&&t.push({field:`${i}.recordCount`,message:"Record count exceeds 100,000 \u2014 consider using grappe mode"}),e.batchSize<=0&&n.push({field:`${i}.batchSize`,message:"Batch size must be positive"});for(let s of e.fieldRules)F(s,i,n);e.rows!==void 0&&x(e.rows,i,n)}function V(e){return Array.isArray(e)&&e.some(n=>b(n?.values)&&Object.keys(n.values).length>0)}function b(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function x(e,n,t){if(!Array.isArray(e)||e.length===0){t.push({field:`${n}.rows`,message:"Rows, when given, are at least one"});return}let a=new Set,i=h.maxKeyLength;for(let[s,o]of e.entries()){let r=`${n}.rows[${s}]`,c=b(o)?o:{},{key:d,parentKey:l,values:f}=c;if(typeof d!="string"||d.length===0||d.length>i?t.push({field:`${r}.key`,message:`A row is named by a key of 1 to ${i} characters`}):a.has(d)?t.push({field:`${r}.key`,message:`The key "${d}" names more than one row: each row is named once`}):a.add(d),l!==void 0&&(typeof l!="string"||l.length===0||l.length>i)&&t.push({field:`${r}.parentKey`,message:`A row names its parent by a key of 1 to ${i} characters`}),!b(f)){t.push({field:`${r}.values`,message:"A row gives its values as fields and values"});continue}for(let[u,g]of Object.entries(f))O(g)||t.push({field:`${r}.values[${u}]`,message:`${u} is given a value no field takes: a text of at most ${h.maxTextLength} characters, a number, true or false, or null`})}}function O(e){return e===null||typeof e=="boolean"?!0:typeof e=="number"?Number.isFinite(e):typeof e=="string"&&e.length<=h.maxTextLength}function C(e,n){let t=i=>{let[s,o,...r]=i,c=s==="objects"?e.objects[Number(o)]:void 0,d=s==="relations"?e.relations?.[Number(o)]:void 0,l=c?`objects[${c.objectApiName}]`:d?`relations[${d.childObject}.${d.lookupField}]`:`${String(s)}[${String(o)}]`;return r.reduce((f,u)=>typeof u=="number"?`${f}[${u}]`:`${f}.${u}`,l)};if(e.objects.every(i=>i.rows===void 0||Array.isArray(i.rows)&&i.rows.every(b)))for(let i of w(e))n.push({field:t(i.path),message:i.message})}function F(e,n,t){let a=`${n}.fieldRules[${e.fieldApiName}]`;(!e.fieldApiName||e.fieldApiName.trim().length===0)&&t.push({field:a,message:"Field API name is required"}),T.has(e.ruleType)||t.push({field:`${a}.ruleType`,message:`Invalid rule type: ${e.ruleType}`}),I(e,a,t)}function I(e,n,t){switch(e.ruleType){case"reference":e.config.referenceObject||t.push({field:`${n}.config.referenceObject`,message:"Reference rule requires a referenceObject"});break;case"picklist_random":(!e.config.picklistValues||e.config.picklistValues.length===0)&&t.push({field:`${n}.config.picklistValues`,message:"Picklist rule requires at least one value"});break;case"faker":e.config.fakerMethod?j(e.config.fakerMethod)||t.push({field:`${n}.config.fakerMethod`,message:`Faker method "${e.config.fakerMethod}" in ${n} is not implemented: choose a method SandForge generates. No record was written.`}):t.push({field:`${n}.config.fakerMethod`,message:"Faker rule requires a fakerMethod"});break;case"ai_generate":e.fieldType!==void 0&&!k(e.fieldType)&&t.push({field:`${n}.ruleType`,message:`AI generation in ${n} writes text, which a "${e.fieldType}" field cannot hold: choose another rule for this field. No record was written.`});break;case"regex":e.config.regexPattern||t.push({field:`${n}.config.regexPattern`,message:"Regex rule requires a regexPattern"});break;case"from_csv":e.config.csvColumn||t.push({field:`${n}.config.csvColumn`,message:"CSV rule requires a csvColumn"});break}}function P(e,n){let t=new Set(e.objects.map(i=>i.objectApiName)),a=new Set;for(let i of e.relations??[]){let{childObject:s,lookupField:o,parentObject:r}=i,c=`relations[${s}.${o}]`;if(t.has(s)||n.push({field:c,message:`The relation on ${s}.${o} fills an object the template does not write`}),a.has(s)&&n.push({field:c,message:`${s} has more than one relation: an object takes its record count from one relation, so keep one and let the other lookup draw from its field rule`}),a.add(s),i.parents.kind==="generated")r===s?n.push({field:c,message:`${s} records cannot point at ${s} records written by the same insert: draw the parents from records already in the org`}):t.has(r)||n.push({field:c,message:`The relation draws ${s}'s parents from the ${r} records this run writes, and the template writes none`});else if(i.parents.kind==="records"){let d=Array.isArray(i.parents.ids)?i.parents.ids:[],l=m.maxExistingParents;if(d.length<1||d.length>l)n.push({field:`${c}.parents.ids`,message:`The relation on ${s}.${o} names between 1 and ${l} ${r} records by id, not ${d.length}`});else{let f=d.filter(g=>typeof g!="string"||!R.test(g)),u=d.filter(g=>typeof g=="string").map(g=>g.slice(0,15));f.length>0?n.push({field:`${c}.parents.ids`,message:`The relation on ${s}.${o} names ${f.length} parent(s) by something that is not a record id, 15 or 18 letters and digits: ${f.slice(0,3).map(String).join(", ")}`}):new Set(u).size!==u.length&&n.push({field:`${c}.parents.ids`,message:`The relation on ${s}.${o} names the same ${r} record more than once: each parent is given once`})}}else p(i.parents.limit,1,m.maxExistingParents)||n.push({field:`${c}.parents.limit`,message:`The relation on ${s}.${o} reads between 1 and ${m.maxExistingParents} existing ${r} records`});_(i.distribution)||n.push({field:`${c}.distribution`,message:`The relation on ${s}.${o} gives each ${r} a number of children it cannot use`})}}function p(e,n,t){return Number.isInteger(e)&&e>=n&&e<=t}function _(e){let n=m.maxPerParent;switch(e.mode){case"perParent":return p(e.count,1,n);case"range":return p(e.min,0,n)&&p(e.max,1,n)&&e.min<=e.max;case"ratio":return Number.isFinite(e.ratio)&&e.ratio>=m.minRatio&&e.ratio<=n;case"byKey":return!0;default:return!1}}function M(e,n){let t=new Set(e.objects.map(a=>a.objectApiName));for(let a of e.objects){let i=$(a.objectApiName,e.relations);for(let s of a.fieldRules)i&&s.fieldApiName===i.lookupField||v(s,t)||s.ruleType==="reference"&&s.config.referenceObject&&(t.has(s.config.referenceObject)||n.push({field:`objects[${a.objectApiName}].fieldRules[${s.fieldApiName}]`,message:`Reference target "${s.config.referenceObject}" is not in the template`}))}}function q(e,n){let t=new Map;for(let o of e.objects)t.set(o.objectApiName,y(o,e.relations));let a=new Set,i=new Set;function s(o){if(i.has(o))return!0;if(a.has(o))return!1;i.add(o);let r=t.get(o)??[];for(let c of r)if(s(c))return!0;return i.delete(o),a.add(o),!1}for(let o of e.objects)if(s(o.objectApiName)){n.push({field:`objects[${o.objectApiName}]`,message:"Circular dependency detected"});break}}export{A as a};
|
|
@@ -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 Ge}from"./chunk-F74IHMGL.mjs";import{a as xe,b as je,c as Te,d as Oe,f as Pe}from"./chunk-M6P5ZZLE.mjs";import{S as Me,aa as Le,ca as De,ea as qe,ia as B,pa as Ie,qa as Ve,ua as Be,wa as U,xa as Ue,za as Qe}from"./chunk-ZLZRU6MO.mjs";import{b as E}from"./chunk-CA5NAXSU.mjs";import{J as Fe,L as ve,M as Ne,N as _e,O as Ae,P as Ce,Q as $e,R as Ee,Yc as Se}from"./chunk-B45CNPUX.mjs";import{e as X,l as ee}from"./chunk-7EANH5PY.mjs";var v=class extends Error{};function lt(e){let r=[],n=0;for(;n<e.length;){let t=e.slice(n),i=/^\s+/.exec(t);if(i){n+=i[0].length;continue}if(t.startsWith("/*")){let d=e.indexOf("*/",n+2);if(d<0)throw new v("an unclosed comment");n=d+2;continue}let l=t[0];if(l==="'"||l==='"'){let d=1;for(;d<t.length&&t[d]!==l;)d+=t[d]==="\\"?2:1;if(d>=t.length)throw new v("an unclosed text");r.push(t.slice(0,d+1)),n+=d+1;continue}let f=/^(?:\d+(?:\.\d+)?|[A-Za-z_$][A-Za-z0-9_$.]*)/.exec(t);if(f){r.push(f[0]),n+=f[0].length;continue}let p=/^(?:&&|\|\||==|!=|<>|<=|>=|[=<>+\-*/^&!(),])/.exec(t);if(!p)throw new v(`an unexpected character: ${t[0]}`);r.push(p[0]),n+=p[0].length}return r}var We=[new Set(["||"]),new Set(["&&"]),new Set(["=","==","<>","!=","<",">","<=",">="]),new Set(["+","-","&"]),new Set(["*","/"]),new Set(["^"])];function ut(e){let r=lt(e),n=0,t=()=>r[n],i=u=>{if(r[n]!==u)throw new v(`${u} expected`);n++},l=u=>{if(u>=We.length)return f();let o=l(u+1);for(let a=t();a!==void 0&&We[u].has(a);a=t())n++,o={kind:"binary",op:a,left:o,right:l(u+1)};return o},f=()=>{if(t()==="!")return n++,{kind:"not",arg:f()};if(t()==="-"||t()==="+"){let u=r[n++],o=f();return u==="-"?{kind:"negative",arg:o}:o}return p()},p=()=>{let u=r[n++];if(u===void 0)throw new v("the formula ends early");if(u==="("){let a=l(0);return i(")"),a}if(u.startsWith("'")||u.startsWith('"'))return{kind:"literal",value:`text:${u.slice(1,-1)}`};if(/^\d/.test(u))return{kind:"literal",value:`number:${Number(u)}`};if(!/^[A-Za-z_$]/.test(u))throw new v(`${u} out of place`);if(t()==="("){n++;let a=[];if(t()!==")")for(a.push(l(0));t()===",";)n++,a.push(l(0));return i(")"),{kind:"call",name:u.toUpperCase(),args:a}}let o=u.toUpperCase();return o==="TRUE"||o==="FALSE"||o==="NULL"?{kind:"literal",value:o.toLowerCase()}:{kind:"reference",name:u.toLowerCase()}},d=l(0);if(n!==r.length)throw new v(`${r[n]} out of place`);return d}function S(e){switch(e.kind){case"call":return e.name==="PRIORVALUE"&&e.args.length===1?S(e.args[0]):{...e,args:e.args.map(S)};case"binary":return{...e,left:S(e.left),right:S(e.right)};case"not":case"negative":return{...e,arg:S(e.arg)};default:return e}}function N(e){switch(e.kind){case"call":return`${e.name}(${e.args.map(N).join(",")})`;case"binary":{let r=e.op==="=="?"=":e.op==="!="?"<>":e.op,n=[N(e.left),N(e.right)];return(r==="="||r==="<>")&&n.sort(),`(${n[0]} ${r} ${n[1]})`}case"not":return`NOT(${N(e.arg)})`;case"negative":return`-(${N(e.arg)})`;case"literal":return e.value;case"reference":return e.name}}var Ke=e=>e==="true"?"false":e==="false"?"true":"unknown";function P(e){return e.kind==="call"&&e.name==="AND"?e.args.flatMap(P):e.kind==="binary"&&e.op==="&&"?[...P(e.left),...P(e.right)]:[e]}function M(e){return e.kind==="call"&&e.name==="OR"?e.args.flatMap(M):e.kind==="binary"&&e.op==="||"?[...M(e.left),...M(e.right)]:[e]}function te(e){if(e.kind==="not"){let r=te(e.arg);return{condition:r.condition,holds:!r.holds}}if(e.kind==="call"&&e.name==="NOT"&&e.args.length===1){let r=te(e.args[0]);return{condition:r.condition,holds:!r.holds}}return e.kind==="binary"&&(e.op==="<>"||e.op==="!=")?{condition:N({...e,op:"="}),holds:!1}:{condition:N(e),holds:!0}}function ne(e){if(e.kind==="literal"){if(e.value==="true")return"true";if(e.value==="false")return"false"}}function k(e){let r=ne(e);if(r)return r;if(e.kind==="not")return Ke(k(e.arg));if(e.kind==="call")switch(e.name){case"ISCHANGED":return"false";case"ISNEW":return"true";case"NOT":return e.args.length===1?Ke(k(e.args[0])):"unknown";case"AND":return ze(P(e));case"OR":return He(M(e));case"IF":{if(e.args.length!==3)return"unknown";let[n,t,i]=e.args,l=k(n);if(l==="true")return k(t);if(l==="false")return k(i);let f=k(t);return f===k(i)?f:"unknown"}default:return"unknown"}return e.kind==="binary"?e.op==="&&"?ze(P(e)):e.op==="||"?He(M(e)):ct(e):"unknown"}function ze(e){let r=e.map(k);if(r.includes("false"))return"false";let n=new Map;for(let t of e){let{condition:i,holds:l}=te(t),f=n.get(i);if(f!==void 0&&f!==l)return"false";n.set(i,l)}return r.every(t=>t==="true")?"true":"unknown"}function He(e){let r=e.map(k);return r.includes("true")?"true":r.every(n=>n==="false")?"false":"unknown"}function ct(e){let r=e.op==="="||e.op==="==",n=e.op==="<>"||e.op==="!=";if(N(e.left)===N(e.right))return n||e.op==="<"||e.op===">"?"false":"unknown";if(!r&&!n)return"unknown";let t=ne(e.left)??k(e.left),i=ne(e.right)??k(e.right);return t==="unknown"||i==="unknown"?"unknown":t===i===r?"true":"false"}function Ze(e){try{return k(S(ut(e)))==="false"}catch(r){if(r instanceof v)return!1;throw r}}var et=25,W=20,ie=W*Me,G=4,Ye=10,dt=2e3,ft=.8;function pt(e){return typeof e!="object"||e===null?null:{optional:e.optionalFilter===!0}}function It(e){return{name:e.name,type:String(e.type),createable:e.createable===!0,nillable:e.nillable!==!1,defaultedOnCreate:e.defaultedOnCreate===!0,referenceTo:(e.referenceTo??[]).filter(r=>typeof r=="string"),picklistValues:(e.picklistValues??[]).filter(r=>r?.active!==!1&&typeof r?.value=="string").map(r=>r?.value),lookupFilter:pt(e.filteredLookupInfo)}}function oe(e){return`SELECT Id, ValidationName, NamespacePrefix, ErrorDisplayField, ErrorMessage, EntityDefinition.QualifiedApiName FROM ValidationRule WHERE Active = true AND EntityDefinition.QualifiedApiName IN (${e.map(n=>`'${n}'`).join(", ")})`}function gt(e){return`SELECT QualifiedApiName, Label FROM FieldDefinition WHERE EntityDefinition.QualifiedApiName = '${x.test(e)?e:""}'`}function q(e){return`SELECT Metadata FROM ValidationRule WHERE Id = '${e}'`}var mt="SELECT DeveloperName, MasterLabel, NamespacePrefix, SobjectType FROM DuplicateRule WHERE IsActive = true",ae=/^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$/,x=/^[A-Za-z][A-Za-z0-9_]{0,79}$/,ht=ee({DailyApiRequests:ee({Max:X(),Remaining:X()}).loose()}).loose(),y=e=>typeof e=="string"?e:"";function le(e){if(typeof e!="object"||e===null)return;let r=e.QualifiedApiName;return typeof r=="string"&&r!==""?r:void 0}function Q(e,r){return e?`${e}__${r}`:r}function D(e){return typeof e=="string"?[e]:Array.isArray(e)?e.filter(r=>typeof r=="string"):[]}function yt(e){return{...e,nodes:e.nodes.map(r=>r.leftOutByUser===!0?{...r,included:!0}:r)}}function se(e,r){let n=y(e).trim(),t=n.slice(n.lastIndexOf(".")+1);if(x.test(t))return r?r.find(i=>i.name.toLowerCase()===t.toLowerCase())?.name:t}function tt(e){let r=Ie({filterFormula:e}).filter(t=>t.bypass).map(t=>t.name),n=Ve(e).map(t=>t.value===void 0?t.reference:`${t.reference} = '${t.value}'`);return{bypasses:[...r.map(t=>`$Permission.${t}`),...n],permissions:r}}function wt(e,r={}){let n=r.maxRecordsPerObject,t=e.nodes.filter(d=>d.included),i=r.inputMode==="record"&&typeof r.recordId=="string"?"atMost":"exact",l=t.map(d=>d.recordCountUnknown===!0?(n===void 0?i="unknown":i==="exact"&&(i="atMost"),{...d,recordCount:n??0}):{...d,recordCount:n===void 0?d.recordCount:Math.min(d.recordCount,n)}),f=new Ge().generate({...e,nodes:l}).totalApiCalls,p=l.reduce((d,u)=>d+Math.max(1,Math.ceil(u.recordCount/dt)),0);return{writes:f,reads:p,bound:i}}function j(e){let{idValue:r,...n}=e;return{id:Fe(e.kind,e.objectApiName,e.field,e.recordType,r??e.value),source:"metadata",rows:0,...n}}function ue(e){return e?{field:e}:{}}function Vt(e){return async r=>qe(await e.request({method:"POST",url:"/tooling/composite",body:JSON.stringify(De(`/services/data/v${e.version}`,r)),headers:{"Content-Type":"application/json"}}),r.length)}async function bt(e,r,n){let t=e.filter(({id:i})=>ae.test(i));t.length!==0&&await B(r,[{queries:t.map(({id:i,rule:l})=>({soql:q(i),retrieve:{sobject:"ValidationRule",id:i},take:f=>{let p=f[0]?.Metadata,d=typeof p=="object"&&p!==null?p.errorConditionFormula:void 0;typeof d=="string"&&Ze(d)&&(l.onChangeOnly=!0)},refused:()=>{}})),requests:W}],G,n)}async function kt(e,r,n,t,i){let l=[...new Set(r)].filter(g=>x.test(g));if(l.length===0)return[];let f=new Map(l.map(g=>[g.toLowerCase(),g])),p=new Map(l.map((g,b)=>[g,b])),d=await e(oe(l)),u=new Map,o=async(g,b)=>{let R=se(b,void 0);if(!n)return R;let F=u.get(g);F||(F=n(g).catch(()=>[]),u.set(g,F));let C=y(b).trim().toLowerCase();if(!C)return;let _=R?.toLowerCase(),$=await F;return $.length===0?R:$.find(A=>A.name.toLowerCase()===_)?.name??$.find(A=>A.label?.trim().toLowerCase()===C)?.name},h=(await Promise.all(d.map(async g=>{let b=le(g.EntityDefinition),R=b===void 0?void 0:f.get(b.toLowerCase()),F=y(g.ValidationName);return!R||!F?[]:[{id:y(g.Id),rule:{objectApiName:R,name:Q(y(g.NamespacePrefix),F),message:y(g.ErrorMessage),...ue(await o(R,g.ErrorDisplayField))}}]}))).flat().sort((g,b)=>(p.get(g.rule.objectApiName)??0)-(p.get(b.rule.objectApiName)??0)||g.rule.name.localeCompare(b.rule.name));return t&&await bt(h,t,i),h.map(({rule:g})=>g)}async function Bt(e,r,n,t){let i=[...new Set(r)].filter(a=>x.test(a));if(i.length===0)return{rules:[],notRead:0,requests:0};let l=new Map(i.map(a=>[a.toLowerCase(),a])),f=await e(oe(i)),p=f.requests,d=f.records.flatMap(a=>{let h=le(a.EntityDefinition),g=h===void 0?void 0:l.get(h.toLowerCase()),b=y(a.ValidationName);return!g||!b?[]:[{id:y(a.Id),objectApiName:g,name:Q(y(a.NamespacePrefix),b),read:!1,permissions:[]}]}),u=d.filter(a=>ae.test(a.id)),o=(a,h)=>{let g=typeof h=="object"&&h!==null?h.errorConditionFormula:void 0;typeof g=="string"&&(a.read=!0,a.permissions=tt(g).permissions)};return n?p+=await B(n,[{queries:u.slice(0,ie).map(a=>({soql:q(a.id),retrieve:{sobject:"ValidationRule",id:a.id},take:h=>o(a,h[0]?.Metadata),refused:()=>{}})),requests:W}],G,t):await U(u.slice(0,et).map(a=>async()=>{try{let h=await e(q(a.id));p+=h.requests,o(a,h.records[0]?.Metadata)}catch{p++}}),G),{rules:d.filter(a=>a.permissions.length>0).map(({objectApiName:a,name:h,permissions:g})=>({objectApiName:a,name:h,permissions:g})),notRead:d.filter(a=>!a.read).length,requests:p}}function Ut(e,r,n){let t=async i=>(await e(gt(i))).flatMap(l=>typeof l.QualifiedApiName=="string"?[{name:l.QualifiedApiName,...typeof l.Label=="string"?{label:l.Label}:{}}]:[]);return i=>kt(e,i,t,r,n)}var Je=class{deps;constructor(r){this.deps=r}async read(r,n,t,i={}){let l=new Set(i.excludedObjects??[]),f=Ue(yt(t),l),p=[];if(f.length===0)return{gaps:[],unread:p,requests:0};let d=0,u=(s,c)=>{p.push({part:s,reason:c})},o=new Map(f.map(s=>[s.toLowerCase(),s])),a=s=>s===void 0?void 0:o.get(s.toLowerCase()),h=new Map(f.map((s,c)=>[s,c])),g=f.filter(s=>x.test(s)),b=[],R=[],F,C,_=new Map,$=new Map,A=new Set,I=(s,c,m)=>async()=>{try{let w=await c();d+=w.requests,m(w.records)}catch(w){d++,u(s,E(w))}},ce=(s,c,m,w)=>async()=>{try{let{fields:J,sent:ot,createable:at}=await this.deps.describeFields(s,c);ot&&d++,w.set(c,J),w===_&&at===!1&&A.add(c)}catch(J){d++,u(m,`${c}: ${E(J)}`)}};await U([...g.length>0?[I("validationRules",()=>this.deps.toolingQuery(n,oe(g)),s=>{b=s})]:[],I("duplicateRules",()=>this.deps.query(n,mt),s=>{R=s}),async()=>{try{d++,F=await this.deps.readLimits(n)}catch(s){C=E(s)}},...f.flatMap(s=>[ce(n,s,"targetFields",_),ce(r,s,"sourceFields",$)])],G);let T=b.flatMap(s=>{let c=a(le(s.EntityDefinition)),m=y(s.ValidationName);if(!c||!m)return[];let w=y(s.Id);return[{id:ae.test(w)?w:null,name:Q(y(s.NamespacePrefix),m),objectApiName:c,...ue(se(s.ErrorDisplayField,_.get(c))),message:y(s.ErrorMessage),formula:"notRead",bypasses:[],permissions:[]}]}).sort((s,c)=>(h.get(s.objectApiName)??0)-(h.get(c.objectApiName)??0)||s.name.localeCompare(c.name)),{toolingQueries:O,toolingRetrieves:de}=this.deps,K=T.filter(s=>s.id!==null).slice(0,O?ie:et);for(let s of T)s.id===null&&(s.formula="unreadable");let z=R.flatMap(s=>{let c=a(y(s.SobjectType)),m=Q(y(s.NamespacePrefix),y(s.DeveloperName));return!c||!y(s.DeveloperName)?[]:[{objectApiName:c,developerName:m,label:y(s.MasterLabel)||m,fullName:`${y(s.SobjectType)}.${m}`}]}),fe=new Map,pe=[];for(let s=0;s<z.length;s+=Ye)pe.push(z.slice(s,s+Ye).map(c=>c.fullName));let V,H,ge=(s,c)=>{let m=typeof c=="object"&&c!==null?c.errorConditionFormula:void 0;if(typeof m!="string"){s.formula="unreadable";return}s.formula="read",Object.assign(s,tt(m));let w=se(c.errorDisplayField,_.get(s.objectApiName));w&&(s.field=w)},rt=async()=>{if(!O||K.length===0)return;let s=await B(c=>O(n,c),[{queries:K.map(c=>({soql:q(c.id),retrieve:{sobject:"ValidationRule",id:c.id},take:m=>ge(c,m[0]?.Metadata),refused:m=>{c.formula="unreadable",V??=m}})),requests:W}],G,de&&(c=>de(n,c)));d+=s},me=new Map,Z={},he=[...A].filter(s=>x.test(s)),st=async()=>{let[s,c]=await Promise.all([Oe((m,w)=>this.deps.toolingQuery(m,w),n,he),this.deps.createFacts?this.deps.createFacts(n).then(m=>({facts:m,requests:0})).catch(()=>({facts:{},requests:0})):Te(this.deps,n)]);d+=s.requests+c.requests;for(let[m,w]of s.answered)me.set(m,w);Z=c.facts};await U([...he.length>0?[st]:[],...O?[rt]:[],...(O?[]:K).map(s=>async()=>{try{let c=await this.deps.toolingQuery(n,q(s.id));d+=c.requests,ge(s,c.records[0]?.Metadata)}catch(c){d++,s.formula="unreadable",V??=E(c)}}),...pe.map(s=>async()=>{try{d++;for(let c of await this.deps.readDuplicateRules(n,s)){if(typeof c!="object"||c===null)continue;let m=c,w=y(m.fullName);w&&fe.set(w.toLowerCase(),m)}}catch(c){H??=E(c)}})],G),V!==void 0&&u("validationRuleFormulas",V),H!==void 0&&u("duplicateRuleActions",H);let Y=new Set,ye=!1;T.some(s=>s.permissions.length>0)&&await I("userPermissions",()=>this.deps.query(n,Le),s=>{ye=!0;for(let c of s)Y.add(Be(y(c.NamespacePrefix),y(c.DeveloperName)))})();let we=[...new Set(T.flatMap(s=>s.permissions.filter(c=>!Y.has(c.toLowerCase()))))],it=we.length>0?await Qe(we,async s=>{let c=[];return await I("permissionSets",()=>this.deps.query(n,s),m=>{c=m})(),c},()=>p.some(s=>s.part==="permissionSets")):void 0,be=[...T.map(s=>vt(s,ye?Y:void 0,it)),...z.map(s=>Nt(s,fe.get(s.fullName.toLowerCase()))),...f.flatMap(s=>{if(A.has(s))return[Ft(s,xe(s,Z,me.get(s.toLowerCase())),_.get(s)??[],Z)];let c=_.get(s),m=$.get(s);return c&&m?_t(s,c,m,i):[]})],ke=ht.safeParse(F),Re=C===void 0&&ke.success?ke.data.DailyApiRequests:void 0;return Re||u("apiBudget",C??"the limits the org answered hold no DailyApiRequests"),be.push(At(t,i,f[0],Re)),{gaps:Ae(be),unread:p,requests:d}}},Rt={platform:"object_platform_only",setup:"object_setup_only",feature:"object_feature_off",parent:"object_through_parent",user:"object_not_createable"};function Ft(e,r,n,t){let i=r==="parent"?Pe(n,t):[];return j({kind:Rt[r],severity:je(r)?"info":"blocking",objectApiName:e,...i.length>0?{detail:{editOn:i}}:{},decisions:["exclude_object"]})}function vt(e,r,n){let t=r?e.permissions.filter(f=>r.has(f.toLowerCase())):[],i=t.length>0?[]:e.permissions.flatMap(f=>{let p=n?.find(d=>d.permission.toLowerCase()===f.toLowerCase());return p?[Ce(p)]:[]}),l=e.field?["leave_empty","ignore"]:["ignore"];return j({kind:"validation_rule",severity:t.length>0?"info":"warning",objectApiName:e.objectApiName,...ue(e.field),idValue:e.name,detail:{rule:e.name,message:e.message,formula:e.formula,...e.bypasses.length>0?{bypasses:e.bypasses}:{},...t.length>0?{heldBypasses:t}:{},...i.length>0?{assign:i}:{}},decisions:l,...e.field?{defaultDecision:"leave_empty"}:{}})}function Nt(e,r){let n=y(r?.actionOnInsert).toLowerCase(),t=n==="block"||n==="allow"?n:"unknown",i=D(r?.operationsOnInsert).map(f=>f.toLowerCase());return j({kind:"duplicate_rule",severity:t==="allow"?"info":"warning",objectApiName:e.objectApiName,idValue:e.developerName,detail:{rule:e.label,developerName:e.developerName,action:t,...t==="allow"?{alert:i.includes("alert")}:{},...t==="allow"?{report:i.includes("report")}:{}},decisions:t==="allow"?["ignore"]:["ignore","exclude_object"],...t==="allow"?{defaultDecision:"ignore"}:{}})}function _t(e,r,n,t){let i=o=>o.toLowerCase(),l=new Set((t.fieldExclusions?.[e]??[]).map(i)),f=new Map(Object.entries(t.fieldMappings?.[e]??{}).map(([o,a])=>[i(o),i(a)])),p=new Set([...f].filter(([o])=>!l.has(o)).map(([,o])=>o)),d=new Map(n.map(o=>[i(o.name),o])),u=o=>{let a=i(o);if(p.has(a))return;let h=d.get(a);return h?l.has(a)||f.has(a)?"excluded":h.createable?void 0:"notCreateableInSource":"notInSource"};return r.flatMap(o=>{let a=u(o.name);if(o.createable&&!o.nillable&&!o.defaultedOnCreate&&a)return[j({kind:"required_field_missing",severity:"blocking",objectApiName:e,field:o.name,detail:{type:o.type,reason:a,...o.referenceTo.length>0?{referenceTo:o.referenceTo}:{},...o.picklistValues.length>0?{values:o.picklistValues}:{}},decisions:["set_default","exclude_object"]})];if(o.type==="reference"&&o.lookupFilter&&!a){let h=o.nillable;return[j({kind:"lookup_filter",severity:"warning",objectApiName:e,field:o.name,detail:{referenceTo:o.referenceTo,optional:h,filterOptional:o.lookupFilter.optional},decisions:h?["leave_empty","ignore"]:["ignore","exclude_object"],...h?{defaultDecision:"leave_empty"}:{}})]}return[]})}function At(e,r,n,t){let i=e.nodes[0]?.objectApiName??n,l=wt(e,r),f=l.writes+l.reads,p="warning";if(t&&l.bound!=="unknown"){let d=f>t.Remaining,u=t.Max-t.Remaining+f>ft*t.Max;p=d&&l.bound==="exact"?"blocking":d||u?"warning":"info"}return j({kind:"api_budget",severity:p,objectApiName:i,detail:{calls:f,writes:l.writes,reads:l.reads,estimate:l.bound,...t?{max:t.Max,remaining:t.Remaining}:{budgetRead:!1}},decisions:["ignore"]})}var Ct={blocking:"BLOCKING",warning:"warning",info:"info"},$t=new Set(["picklist_value_refused","dependent_value_invalid","picklist_value_absent","currency_inactive"]),Et=new Set(["record_type_unmapped","record_type_unavailable"]);function nt(e,r,n=[e.id]){if(ve(r.ignoredGaps,e.id,n)!==void 0)return"left as it is";let t=e.objectApiName;if(r.excludedObjects?.includes(t))return`${t} left out of the run`;let i=new Set(e.decisions),{field:l,value:f}=e;if(i.has("skip_rows")&&Ne((r.skippedRows??[]).filter(o=>o.object===t),e.id,n))return"these rows held back";if($t.has(e.kind)&&l!==void 0&&f!==void 0&&(i.has("map_value")||i.has("leave_empty"))){let o=(r.picklistValueMappings??[]).filter(h=>h.object===t&&h.field===l&&h.from===f),a=_e(o,e,n);if(a?.to===null&&i.has("leave_empty"))return"the field left empty in these rows";if(a&&a.to!==null&&i.has("map_value"))return`written as "${a.to}"`}let p=Et.has(e.kind)?e.value??e.recordType:void 0;if(p!==void 0&&i.has("map_record_type")){let o=r.recordTypeMappings?.find(a=>a.object===t&&a.from===p);if(o)return o.to===null?"written with the object's default record type":`written as record type ${o.to}`}if(l===void 0)return;let d=o=>o.object===t&&o.field===l,u=i.has("set_default")?r.defaultValues?.find(d):void 0;if(u)return`default "${String(u.value)}"`;if(i.has("truncate")&&r.truncateFields?.some(d))return"cut to the field's length";if(i.has("leave_empty")&&r.fieldExclusions?.[t]?.includes(l))return"the field left out of the rows"}function Qt(e,r){let n=e.gaps.map(t=>t.id);return{...e,gaps:e.gaps.map(t=>{let i=nt(t,r,n);return i===void 0?t:{...t,answeredBy:i}})}}function Xe(e,r,n,t){if(t)return`the mute lifts it (${t.permission}, in ${t.permissionSet}): ${re(e,!0)}`;let i=r?nt(e,r,n):void 0;return i===void 0?`${Ct[e.severity]}: ${re(e)}`:`answered by the run's decision: ${i} \u2014 ${re(e)}`}var St={validationRules:"the validation rules",validationRuleFormulas:"the formulas of some validation rules",duplicateRules:"the duplicate rules",duplicateRuleActions:"what the duplicate rules do on insert",userPermissions:"the custom permissions of the user the run writes as",permissionSets:"the permission sets that hold a bypass of a validation rule the user the run writes as does not",targetFields:"the fields of an object in the target",sourceFields:"the fields of an object in the source",apiBudget:"the daily API requests left"},Gt={notInSource:"the source has no such field",notCreateableInSource:"the source cannot give it",excluded:"the run leaves it out"},L=e=>typeof e=="number"?String(e):"?";function re(e,r=!1){let n=e.detail??{};switch(e.kind){case"required_field_missing":return`required field ${e.field??""} (${y(n.type)}): only the target requires it, and the run does not write it (${Gt[y(n.reason)]??y(n.reason)}): every row is refused unless it is given a value`;case"validation_rule":{let t=e.field?` on ${e.field}`:"",i=[...D(n.bypasses).map(f=>`not when ${f}`),...D(n.heldBypasses).length>0?[`kept quiet for this run: the user it writes as holds ${D(n.heldBypasses).join(", ")}`]:[],...n.formula==="notRead"?["formula not read"]:[],...n.formula==="unreadable"?["formula unreadable"]:[],...e.field&&!r?[`a row it refuses goes again without ${e.field}`]:[]],l=y(n.message)?`: "${y(n.message)}"`:"";return`validation rule "${y(n.rule)}"${t}${l}${i.length>0?` (${i.join("; ")})`:""}`}case"duplicate_rule":{let t=`duplicate rule "${y(n.rule)}"`;if(n.action==="block")return`${t}: blocks an insert it matches: a row it matches is refused, whatever allowSave says`;if(n.action==="allow"){let i=[n.alert===!0?"an alert":"",n.report===!0?"a report":""].filter(Boolean).join(" and ");return`${t}: allows an insert it matches${i?`, with ${i}`:""}: the run saves it (allowSave=true)`}return`${t}: what it does on insert was not read: a rule that blocks refuses a row it matches`}case"lookup_filter":return`lookup filter on ${e.field??""}: not checked before the run; `+(n.optional===!0?"a lookup it refuses is left empty":"the lookup is required, and a row it refuses is refused");case"object_not_createable":return"the user the run writes as may not create its records in the target: every row is skipped, after the objects written before it, unless the object is left out";case"object_platform_only":return"no user can create its records in the target, the platform writes them itself: the run skips every row of it";case"object_setup_only":return"no user can create its records in the target, not even one with Modify All Data, and no permission set gives Create on it: setup the org keeps as records, or the platform's own; the run skips every row of it";case"object_feature_off":return"even a user with Modify All Data may not create its records in the target, though a permission set can give Create on it: a feature or licence the target has not turned on for that user keeps it closed; turn it on, or every row is skipped, after the objects written before it, unless the object is left out";case"object_through_parent":{let t=D(n.editOn);return`no permission set gives Create on it: ${t.length>0?`the user the run writes as creates its records with Edit on ${t.join(" and ")}, which they hang from, or no user can`:"the records they hang from may open it to the user the run writes as, or no user can: read as a user with Modify All Data, the target would tell"}; every row is skipped, after the objects written before it, unless the object is left out`}case"api_budget":{let t=`about ${L(n.calls)} call(s) (${L(n.writes)} write(s) of 200 rows, ${L(n.reads)} read(s))`,i=n.estimate==="atMost"?`at most ${t}, counted on whole tables`:n.estimate==="unknown"?"an unknown number of calls: an object was never counted":t,l=n.budgetRead===!1?"the daily requests left could not be read":`${L(n.remaining)} of ${L(n.max)} daily requests left`;return`API budget: the run takes ${i}; ${l}`}default:return e.kind}}function xt(e,r,n){return $e(e).map(({permission:t,permissionSet:i,others:l})=>{if(!i)return` ${t}: no permission set of ${r} holds it: an admin creates one that includes it`;let f=l.length>0?`; also held by ${l.map(d=>d.name).join(", ")}`:"",p=n?`: ${Se(i.name,r,n)}`:"";return` ${t}: held by permission set ${i.name}, the smallest${f}${p}`})}function Wt(e,r,n={}){let t=[`target gaps: what ${r} holds against the rows, read from its metadata`],i=e.gaps.map(u=>u.id),l=e.gaps.filter(u=>u.kind==="api_budget"),f=e.gaps.filter(u=>u.kind!=="api_budget"),p=[...new Set(f.map(u=>u.objectApiName))].sort((u,o)=>u.localeCompare(o));for(let u of p){t.push(` ${u}`);for(let o of f.filter(a=>a.objectApiName===u)){let a=Ee(o,n.lifted);t.push(` ${Xe(o,n.decisions,i,a)}`),a||t.push(...xt(o,r,n.username))}}f.length===0&&t.push(e.unread.length>0?" nothing found in what could be read":" no validation rule, duplicate rule, field only the target requires or lookup filter");for(let u of l)t.push(` ${Xe(u,n.decisions,i)}`);let d=f.filter(u=>u.detail?.formula==="notRead").length;d>0&&t.push(` ${d} validation rule formula(s) not read: the read takes ${n.formulasBound??ie} at most`);for(let{part:u,reason:o}of e.unread)t.push(` ${St[u]??u} could not be read: ${o}`);return t.push(` read in ${e.requests} request(s) to ${r}`),t}export{et as a,W as b,ie as c,It as d,oe as e,gt as f,q as g,mt as h,tt as i,wt as j,Vt as k,kt as l,Bt as m,Ut as n,Je as o,nt as p,Qt as q,Wt as r};
|
|
@@ -0,0 +1,259 @@
|
|
|
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
|
+
function o(e){return e.split(/\s+/).filter(r=>r.length>0)}var l={en_US:o(`
|
|
8
|
+
Alice Bob Charlie Diana Eve Frank Grace Hank Ivy Jack Kate Leo Mia Noah Olivia
|
|
9
|
+
James Mary Robert Patricia John Jennifer Michael Linda David Elizabeth William Barbara
|
|
10
|
+
Richard Susan Joseph Jessica Thomas Sarah Charles Karen Christopher Lisa Daniel Nancy
|
|
11
|
+
Matthew Betty Anthony Sandra Mark Margaret Donald Ashley Steven Kimberly Andrew Emily
|
|
12
|
+
Paul Donna Joshua Michelle Kenneth Carol Kevin Amanda Brian Melissa George Deborah
|
|
13
|
+
Timothy Stephanie Ronald Dorothy Jason Rebecca Edward Sharon Jeffrey Laura Ryan Cynthia
|
|
14
|
+
Jacob Amy Gary Kathleen Nicholas Angela Eric Shirley Jonathan Brenda Stephen Emma Larry
|
|
15
|
+
Anna Justin Pamela Scott Nicole Brandon Samantha Benjamin Katherine Samuel Christine
|
|
16
|
+
Gregory Helen Alexander Debra Patrick Rachel Carolyn Raymond Janet Maria Dennis
|
|
17
|
+
Catherine Jerry Heather Tyler Aaron Julie Adam Joyce Nathan Victoria Henry Ruth
|
|
18
|
+
Zachary Virginia Douglas Lauren Peter Kelly Kyle Christina Ethan Evelyn Jeremy Judith
|
|
19
|
+
Walter Andrea Christian Hannah Keith Megan Roger Cheryl Terry Jacqueline Austin Martha
|
|
20
|
+
Sean Madison Gerald Teresa Carl Gloria Harold Sara Dylan Janice Arthur Ann Lawrence
|
|
21
|
+
Kathryn Jordan Abigail Jesse Sophia Bryan Frances Billy Jean Bruce Gabriel Judy Joe
|
|
22
|
+
Isabella Logan Julia Alan Juan Amber Albert Denise Willie Danielle Elijah
|
|
23
|
+
Marilyn Wayne Beverly Randy Charlotte Vincent Natalie Mason Theresa Roy Ralph
|
|
24
|
+
Brittany Bobby Doris Russell Kayla Bradley Alexis Philip Lori Eugene Marie Owen Chloe
|
|
25
|
+
`),fr_FR:o(`
|
|
26
|
+
Marie Pierre Jean Sophie Nicolas Camille Julien L\xE9a Thomas Emma Lucas Chlo\xE9 Hugo Manon
|
|
27
|
+
Antoine Louis Jade Gabriel Louise Arthur Alice Rapha\xEBl Lina Jules Rose Adam Anna Paul
|
|
28
|
+
Ambre L\xE9o Juliette Victor In\xE8s Nathan Mila Mathis Zo\xE9 Th\xE9o Lucie Maxime Clara Alexandre
|
|
29
|
+
Sarah Romain Laura Mathieu Pauline Guillaume Marion S\xE9bastien C\xE9line Vincent Isabelle
|
|
30
|
+
Fran\xE7ois Nathalie Laurent Sandrine Olivier Val\xE9rie Christophe St\xE9phanie Philippe
|
|
31
|
+
Catherine Michel Christine Alain Sylvie Patrick Martine \xC9ric Monique Fr\xE9d\xE9ric Fran\xE7oise
|
|
32
|
+
St\xE9phane Anne David V\xE9ronique Beno\xEEt H\xE9l\xE8ne J\xE9r\xF4me Caroline C\xE9dric Aur\xE9lie Damien \xC9milie
|
|
33
|
+
Florian \xC9lodie K\xE9vin M\xE9lanie Quentin Charlotte Bastien Margaux Cl\xE9ment Oc\xE9ane Adrien
|
|
34
|
+
Justine Baptiste Mathilde Benjamin Agathe Simon \xC9lise Valentin No\xE9mie Martin Margot
|
|
35
|
+
Robin H\xE9lo\xEFse Tristan Capucine Corentin Apolline Gaspard Victoire Alexis Jos\xE9phine R\xE9mi
|
|
36
|
+
Constance Yann Ga\xEBlle Lo\xEFc Sol\xE8ne Fabien Morgane J\xE9r\xE9my Audrey Thibault Amandine Arnaud
|
|
37
|
+
Virginie Gr\xE9goire Delphine Xavier Laetitia Bruno Florence Denis Brigitte Gilles Danielle
|
|
38
|
+
Thierry Chantal Yves Josiane Didier Annie Pascal Odile Serge Colette Herv\xE9 Jacqueline
|
|
39
|
+
Ren\xE9 Mireille G\xE9rard Ginette Bernard Simone Claude Yvette Daniel Nicole Jacques
|
|
40
|
+
Paulette Henri Jeanne Andr\xE9 Madeleine Marcel Suzanne Roger Denise Robert Germaine
|
|
41
|
+
Georges Marcelle Lucien Odette Raymond Huguette Maurice Lucienne \xC9mile Ren\xE9e Armand
|
|
42
|
+
Gis\xE8le \xC9tienne Raymonde L\xE9on L\xE9onie F\xE9lix Eug\xE9nie Joseph Albertine No\xE9 B\xE9r\xE9nice Axel
|
|
43
|
+
Tom Lou Nina Tim\xE9o Lisa Math\xE9o Romane Sacha
|
|
44
|
+
`),de_DE:o(`
|
|
45
|
+
Max Anna Lukas Lena Felix Marie Paul Sophia Leon Emma Jonas Mia Elias Hannah Ben Noah
|
|
46
|
+
Emilia Finn Lina Luis Ella Clara Matteo Leni Emil Ida Theo Lea Anton Mila Jakob Frieda
|
|
47
|
+
Moritz Lara Julian Laura Alexander Johanna Niklas Charlotte Tim Amelie Jan Leonie David
|
|
48
|
+
Luisa Fabian Sarah Tobias Julia Florian Katharina Sebastian Lisa Philipp Nina Daniel
|
|
49
|
+
Jana Simon Vanessa Benedikt Franziska Christian Sabine Stefan Andrea Thomas Claudia
|
|
50
|
+
Michael Petra Andreas Susanne Markus Nicole Martin Stefanie Frank Monika J\xFCrgen Birgit
|
|
51
|
+
Uwe Martina Wolfgang Heike Klaus Karin Dieter Ursula Peter Renate Hans Gisela Manfred
|
|
52
|
+
Ingrid Helmut Helga Gerhard Brigitte Werner Elke Rolf Christa Bernd Angelika Rainer
|
|
53
|
+
Gabriele Horst Barbara G\xFCnter Silke Dirk Anja Holger Kerstin Ralf Tanja Jens Melanie
|
|
54
|
+
Sven Daniela Kai Nadine Oliver Sandra Lars Bianca Torsten Christina Matthias Ines
|
|
55
|
+
Carsten Simone Volker Annette Heiko Doris Marco Ute Dennis Sonja Patrick Jutta Marcel
|
|
56
|
+
Karla Robin Greta Malte Mathilda Ole Paula Hannes Marlene Konstantin Pauline Vincent
|
|
57
|
+
Antonia Valentin Romy Johannes Elisa Leonard Isabell Maximilian Magdalena Carl Theresa
|
|
58
|
+
Oskar Helene Fritz Luise Karl Margarete Otto Hedwig Wilhelm Erna Heinrich Gertrud
|
|
59
|
+
Friedrich Irmgard Hermann Hildegard Ludwig Elfriede Kurt Lieselotte Ernst Waltraud
|
|
60
|
+
Walter Edith Rudolf Anneliese Bruno Rosemarie Arno Erika Lothar Marianne Norbert
|
|
61
|
+
Reinhard Gottfried Henriette Jonathan Merle Till Svenja Henrik Wiebke
|
|
62
|
+
`),es_ES:o(`
|
|
63
|
+
Carlos Mar\xEDa Alejandro Carmen Javier Luc\xEDa Miguel Marta Daniel Ana Pablo Elena Diego
|
|
64
|
+
Laura Sergio Antonio Isabel Manuel Pilar Francisco Dolores Jos\xE9 Teresa David Rosa Juan
|
|
65
|
+
Cristina Jes\xFAs Raquel Luis Mercedes \xC1ngel Sara Rafael Paula Fernando Beatriz Jorge Julia
|
|
66
|
+
Alberto Silvia \xC1lvaro Patricia Adri\xE1n Irene Rub\xE9n Nuria \xD3scar Roc\xEDo Iv\xE1n Alba Andr\xE9s
|
|
67
|
+
Andrea Ram\xF3n Claudia Enrique Sof\xEDa Vicente Marina Joaqu\xEDn Natalia Santiago Lorena V\xEDctor
|
|
68
|
+
Eva Mario Inmaculada Hugo Montserrat Jaime \xC1ngela Ignacio Susana Gonzalo Yolanda Marcos
|
|
69
|
+
Alicia Eduardo Concepci\xF3n Guillermo Esther Emilio Victoria Ricardo Rosario Roberto
|
|
70
|
+
Encarnaci\xF3n Tom\xE1s Noelia Salvador Ver\xF3nica Agust\xEDn Lidia Gabriel Miriam Mateo Carolina
|
|
71
|
+
Mart\xEDn Celia Lucas Ainhoa Nicol\xE1s Nerea Samuel Estela H\xE9ctor Gloria Leo Olga Iker
|
|
72
|
+
Vanesa Aitor Amparo Unai Bego\xF1a Asier Leire Xavier Jordi Pau Laia Marc Aina Arnau Clara
|
|
73
|
+
Pol Mireia Bruno Valeria Dar\xEDo Ximena Rodrigo Daniela Gael Carla Thiago Lola Luca Vega
|
|
74
|
+
Izan Candela Marco Abril Alonso Triana Enzo Jimena Eric Alma Aitana Ian Martina
|
|
75
|
+
Sebasti\xE1n Emma Felipe In\xE9s Gregorio Adela Juli\xE1n Rebeca Esteban Lourdes Ernesto
|
|
76
|
+
Milagros Ismael F\xE1tima Germ\xE1n Margarita Lorenzo Josefa Benito Juana Ramiro Francisca
|
|
77
|
+
Arturo Antonia Aurelio Manuela Fidel Gerardo Eulalia Leandro Maite Rosal\xEDa Bernardo
|
|
78
|
+
Cristian Pedro Ra\xFAl El\xEDas Ariadna Joel Leyre Hern\xE1n L\xEDa Sa\xFAl Mara Teo Gema Borja
|
|
79
|
+
Iratxe Ander Naia Oier Amaia Jacobo
|
|
80
|
+
`),ja_JP:o(`
|
|
81
|
+
Taro Hanako Yuki Kenji Sakura Haruto Yui Sota Hina Ren Mei Kaito Aoi Riku Mio Hiroshi
|
|
82
|
+
Akiko Takashi Yoko Satoshi Keiko Kazuo Michiko Makoto Naoko Daisuke Yumi Shota Ayaka
|
|
83
|
+
Kenta Misaki Yusuke Nanami Takumi Haruka Ryota Saki Kazuki Miyu Hayato Rin Yuto Yuna
|
|
84
|
+
Sora Koharu Minato Himari Itsuki Akari Hinata Mitsuki Asahi Tsumugi Yamato Ema Haruki
|
|
85
|
+
Mai Daiki Rika Tsubasa Chihiro Kosuke Erika Tomoya Kaori Naoki Megumi Shun Ayumi Yuya
|
|
86
|
+
Emi Ryo Kana Tatsuya Natsuki Shinji Asuka Hideki Eri Masato Mariko Atsushi Noriko Koji
|
|
87
|
+
Sachiko Hiroki Tomoko Akira Junko Shinichi Kumiko Masaki Reiko Kyoko Kiyoshi Hiromi
|
|
88
|
+
Osamu Yoshiko Tetsuya Mayumi Jun Miho Goro Chie Isamu Fumiko Ichiro Etsuko Jiro Kazuko
|
|
89
|
+
Saburo Masako Shiro Setsuko Taichi Kanako Kohei Momoka Ryusei Nozomi Sho Shiori Yuma Ami
|
|
90
|
+
Ryuji Rina Keita Chika Genki Honoka Kei Sayaka Masaru Yuko Nobuo Hisako Shigeru Teruko
|
|
91
|
+
Susumu Kimiko Tadashi Hatsue Toru Ayano Yasuo Sumire Yoshio Kotone Mamoru Miku Minoru
|
|
92
|
+
Wakana Hajime Yuzuki Noboru Kaede Takeshi Sana Hiroto Riko Kota Rena Sosuke Yuka
|
|
93
|
+
Tomohiro Aya Shoma Kyoka Kaname Fuka Ryunosuke Shizuka Seiji Aiko Takahiro Hitomi
|
|
94
|
+
Kunio Kazumi Haruo Kiyomi Fumio Shinobu Katsuo Tamaki Noriaki Mizuki Keisuke Mana
|
|
95
|
+
Hiroyuki Ryoko Tadao Midori Kenichi Natsumi Daichi Reina Shigeo Yoshie Toshio Masao
|
|
96
|
+
Harue Takao Junichi Sumiko Kengo Tomomi
|
|
97
|
+
`),pt_BR:o(`
|
|
98
|
+
Joao Ana Pedro Maria Lucas Juliana Gabriel Fernanda Rafael Camila Matheus Larissa Bruno
|
|
99
|
+
Beatriz Thiago Gustavo Mariana Felipe Amanda Rodrigo Let\xEDcia Leonardo Bruna Guilherme
|
|
100
|
+
Carolina Eduardo Aline Ricardo Patr\xEDcia Marcelo Vanessa Diego Nat\xE1lia Vin\xEDcius J\xE9ssica
|
|
101
|
+
Andr\xE9 Renata Daniel Gabriela Carlos Isabela Paulo Luana Marcos Bianca F\xE1bio D\xE9bora
|
|
102
|
+
Leandro Tatiana Alexandre Priscila Fernando Raquel Ant\xF4nio Sabrina Luiz Daniela
|
|
103
|
+
Francisco Adriana Jos\xE9 Simone Roberto Cristina S\xE9rgio Sandra J\xFAlio M\xE1rcia Henrique
|
|
104
|
+
Cl\xE1udia Caio Viviane Samuel Elaine Igor Luciana Arthur Alessandra Heitor Val\xE9ria
|
|
105
|
+
Bernardo Helena Davi Alice Miguel Laura Enzo Manuela Murilo Sophia Ot\xE1vio L\xEDvia
|
|
106
|
+
Benjamin Valentina Lorenzo Helo\xEDsa Theo Cec\xEDlia Nicolas Clara Pietro Elo\xE1 Joaquim
|
|
107
|
+
Lorena Bento Isadora Emanuel Yasmin Raul Rebeca Cau\xE3 Agatha Breno Mait\xEA Danilo Melissa
|
|
108
|
+
Kaique Pietra Wesley Stella Wellington Rayssa Anderson Tha\xEDs Everton Kelly Jefferson
|
|
109
|
+
Michele Rog\xE9rio Fabiana Reinaldo Silvana Ronaldo Rosana Edson Regina Cl\xE1udio L\xFAcia
|
|
110
|
+
Wagner S\xF4nia M\xE1rcio Vera Mauro Rita S\xEDlvio Denise Osvaldo Joana Gilberto Teresa Geraldo
|
|
111
|
+
Aparecida Raimundo Francisca Sebasti\xE3o Ant\xF4nia Benedito Ros\xE2ngela Valdir Marta Moacir
|
|
112
|
+
Neusa Nelson Irene Jorge C\xE9lia Renato Iara Augusto Dalva H\xE9lio Zilda Ivan Gl\xF3ria Alberto
|
|
113
|
+
Olga Cristiano Tiago Mirela Rafaela Vit\xF3ria Kau\xE3 Lara Nathan Giovanna Gael Liz Ravi
|
|
114
|
+
Esther Caetano \xCDris Levi Aurora Noah Hugo Catarina Rui In\xE1cio Mariah \xCDcaro Jade Tom\xE1s
|
|
115
|
+
`)},u={en_US:o(`
|
|
116
|
+
Smith Johnson Williams Brown Jones Garcia Miller Davis Rodriguez Martinez Hernandez
|
|
117
|
+
Lopez Gonzalez Wilson Anderson Thomas Taylor Moore Jackson Martin Lee Perez Thompson
|
|
118
|
+
White Harris Sanchez Clark Ramirez Lewis Robinson Walker Young Allen King Wright Scott
|
|
119
|
+
Torres Nguyen Hill Flores Green Adams Nelson Baker Hall Rivera Campbell Mitchell Carter
|
|
120
|
+
Roberts Gomez Phillips Evans Turner Diaz Parker Cruz Edwards Collins Reyes Stewart
|
|
121
|
+
Morris Morales Murphy Cook Rogers Gutierrez Ortiz Morgan Cooper Peterson Bailey Reed
|
|
122
|
+
Kelly Howard Ramos Kim Cox Ward Richardson Watson Brooks Chavez Wood James Bennett Gray
|
|
123
|
+
Mendoza Ruiz Hughes Price Alvarez Castillo Sanders Patel Myers Long Ross Foster Jimenez
|
|
124
|
+
Powell Jenkins Perry Russell Sullivan Bell Coleman Butler Henderson Barnes Gonzales
|
|
125
|
+
Fisher Vasquez Simmons Romero Jordan Patterson Alexander Hamilton Graham Reynolds
|
|
126
|
+
Griffin Wallace Moreno West Cole Hayes Bryant Herrera Gibson Ellis Tran Medina Aguilar
|
|
127
|
+
Stevens Murray Ford Castro Marshall Owens Harrison Fernandez McDonald Woods Washington
|
|
128
|
+
Kennedy Wells Vargas Henry Chen Freeman Webb Tucker Guzman Burns Crawford Olson Simpson
|
|
129
|
+
Porter Hunter Gordon Mendez Silva Shaw Snyder Mason Dixon Munoz Hunt Hicks Holmes Palmer
|
|
130
|
+
Wagner Black Robertson Boyd Rose Stone Salazar Fox Warren Mills Meyer Rice Schmidt Garza
|
|
131
|
+
Daniels Ferguson Nichols Stephens Soto Weaver Ryan Gardner Payne Grant Dunn Kelley
|
|
132
|
+
Spencer Hawkins Arnold Pierce Vazquez Hansen Peters Santos Hart Bradley Knight Elliott
|
|
133
|
+
Cunningham Duncan Armstrong Hudson Carroll Lane Riley Andrews Alvarado Ray Delgado Berry
|
|
134
|
+
Perkins Hoffman Johnston Matthews Pena Richards Contreras Willis Carpenter Lawrence
|
|
135
|
+
`),fr_FR:o(`
|
|
136
|
+
Dupont Martin Bernard Dubois Thomas Robert Richard Petit Durand Leroy Moreau Simon
|
|
137
|
+
Laurent Lefebvre Michel Roux David Bertrand Morel Fournier Girard Bonnet Lambert
|
|
138
|
+
Fontaine Rousseau Vincent Muller Lef\xE8vre Faure Andr\xE9 Mercier Blanc Gu\xE9rin Boyer Garnier
|
|
139
|
+
Chevalier Fran\xE7ois Legrand Gauthier Garcia Perrin Robin Cl\xE9ment Morin Nicolas Henry
|
|
140
|
+
Roussel Mathieu Gautier Masson Marchand Duval Denis Dumont Marie Lemaire No\xEBl Meyer
|
|
141
|
+
Dufour Meunier Brun Blanchard Giraud Joly Rivi\xE8re Lucas Brunet Gaillard Barbier Arnaud
|
|
142
|
+
Martinez G\xE9rard Roche Renard Schmitt Roy Leroux Colin Vidal Caron Picard Roger Fabre
|
|
143
|
+
Aubert Lemoine Renaud Dumas Lacroix Olivier Philippe Bourgeois Pierre Beno\xEEt Rey
|
|
144
|
+
Leclerc Payet Rolland Leclercq Guillaume Lecomte Lopez Jean Dupuy Guillot Hubert Berger
|
|
145
|
+
Carpentier Sanchez Dupuis Moulin Louis Deschamps Huet Vasseur Perez Boucher Fleury
|
|
146
|
+
Royer Klein Jacquet Adam Paris Poirier Marty Aubry Guyot Carr\xE9 Charles Renault
|
|
147
|
+
Charpentier M\xE9nard Maillard Baron Bertin Bailly Herv\xE9 Schneider Fernandez Collet L\xE9ger
|
|
148
|
+
Bouvier Julien Pr\xE9vost Millet Perrot Daniel Cousin Germain Breton Besson Langlois R\xE9my
|
|
149
|
+
Pelletier L\xE9v\xEAque Perrier Leblanc Barr\xE9 Lebrun Marchal Weber Mallet Hamon Boulanger
|
|
150
|
+
Jacob Monnier Michaud Rodriguez Guichard Gillet \xC9tienne Grondin Poulain Tessier
|
|
151
|
+
Chevallier Collin Chauvin Bouchet Gay Lema\xEEtre B\xE9nard Mar\xE9chal Humbert Reynaud Antoine
|
|
152
|
+
Hoarau Perret Barth\xE9lemy Cordier Pichon Lejeune Gilbert Lamy Delaunay Pasquier Carlier
|
|
153
|
+
Laporte Lebon Texier Riviere Granger Vallet Bousquet
|
|
154
|
+
`),de_DE:o(`
|
|
155
|
+
Schmidt Schneider Fischer Weber Meyer Wagner Becker Schulz Hoffmann Koch
|
|
156
|
+
Richter Wolf Bauer M\xFCller Sch\xE4fer Klein Schr\xF6der Neumann Schwarz Zimmermann
|
|
157
|
+
Braun Kr\xFCger Hofmann Hartmann Lange Schmitt Werner Schmitz Krause Meier Lehmann Schmid
|
|
158
|
+
Schulze Maier K\xF6hler Herrmann K\xF6nig Walter Mayer Huber Kaiser Fuchs Peters Lang Scholz
|
|
159
|
+
M\xF6ller Wei\xDF Jung Hahn Schubert Vogel Friedrich Keller G\xFCnther Frank Berger Winkler Roth
|
|
160
|
+
Beck Lorenz Baumann Franke Albrecht Schuster Simon Ludwig B\xF6hm Winter Kraus Martin
|
|
161
|
+
Schumacher Kr\xE4mer Vogt Stein J\xE4ger Otto Sommer Gro\xDF Seidel Heinrich Brandt Haas
|
|
162
|
+
Schreiber Graf Schulte Dietrich Ziegler Kuhn K\xFChn Pohl Engel Horn Busch Bergmann Thomas
|
|
163
|
+
Voigt Sauer Arnold Wolff Pfeiffer Ernst Lindner Franz B\xF6ttcher Beyer Seifert Fritz
|
|
164
|
+
H\xFCbner Kurz Kessler Kraft Jansen Ritter Wenzel Mertens Thiel Gerlach Ulrich Brinkmann
|
|
165
|
+
Naumann B\xF6hme Busse Riedel Kolb Herzog Sch\xFCtz Hesse Wendt Stark Schwab Martens Arndt
|
|
166
|
+
Rieger Schilling Zander Hartung Brandl Kirchner Steiner Marx Hauser Fiedler Reuter
|
|
167
|
+
Kramer Petersen Wirth Heinz Moser Funk Bender Thomsen Dittrich Pieper Kunz Schenk
|
|
168
|
+
Bach Witt Kuhlmann Lehner Weise Benz Paul Sander Vetter Ackermann Engelhardt
|
|
169
|
+
Harms Hagen Unger Seitz Maurer Bayer Reichert Frey Specht Nagel Roder
|
|
170
|
+
Ebert Siebert Bock Hein Kunze Jahn Wegner Otte Kaufmann Hermann Rothe Reinhardt Wiese
|
|
171
|
+
Freitag Pape Schott Dorn Nowak Ott Lohmann Beckmann Fr\xF6hlich R\xF6sler Scherer G\xF6rtz
|
|
172
|
+
`),es_ES:o(`
|
|
173
|
+
Garc\xEDa Rodr\xEDguez Gonz\xE1lez Fern\xE1ndez L\xF3pez Mart\xEDnez S\xE1nchez P\xE9rez G\xF3mez Mart\xEDn Jim\xE9nez
|
|
174
|
+
Ruiz Hern\xE1ndez D\xEDaz Moreno Mu\xF1oz \xC1lvarez Romero Alonso Guti\xE9rrez Navarro Torres
|
|
175
|
+
Dom\xEDnguez V\xE1zquez Ramos Gil Ram\xEDrez Serrano Blanco Molina Morales Su\xE1rez Ortega Delgado
|
|
176
|
+
Castro Ortiz Rubio Mar\xEDn Sanz N\xFA\xF1ez Iglesias Medina Garrido Cort\xE9s Castillo Santos
|
|
177
|
+
Lozano Guerrero Cano Prieto M\xE9ndez Cruz Calvo Gallego Vidal Le\xF3n M\xE1rquez Herrera Pe\xF1a
|
|
178
|
+
Flores Cabrera Campos Vega Fuentes Carrasco Diez Caballero Reyes Nieto Aguilar Pascual
|
|
179
|
+
Santana Herrero Lorenzo Montero Hidalgo Gim\xE9nez Ib\xE1\xF1ez Ferrer Dur\xE1n Santiago Ben\xEDtez
|
|
180
|
+
Mora Vicente Vargas Arias Carmona Crespo Rom\xE1n Pastor Soto S\xE1ez Velasco Moya Soler Parra
|
|
181
|
+
Esteban Bravo Gallardo Rojas Pardo Merino Franco Espinosa Izquierdo Lara Rivas Silva
|
|
182
|
+
Rivera Casado Arroyo Redondo Camacho Rey Vera Otero Luque Gal\xE1n Montes R\xEDos Sierra
|
|
183
|
+
Segura Carrillo Marcos Soriano Mendoza Robles Bernal Vila Valero Palacios Benito
|
|
184
|
+
Pereira Vallejo Varela Exp\xF3sito Andr\xE9s Guerra Bueno Mateo Villar Miranda Contreras
|
|
185
|
+
Mateos Aguilera Hurtado Rosa Ibarra Paredes Heredia Calder\xF3n Escobar Salazar Toledo
|
|
186
|
+
Cuesta Beltr\xE1n Salas Rico Plaza \xC1vila Pacheco Rueda Cordero Quintana Gracia Polo Fajardo
|
|
187
|
+
Manzano Rosales Tapia Barrera Acosta Berm\xFAdez Cabello Valencia Peinado Mesa Duarte
|
|
188
|
+
Maldonado Rinc\xF3n Figueroa Zamora Benavides Cisneros Ochoa Trujillo Salinas Villalobos
|
|
189
|
+
Barrios Escudero Sosa Andrade Guzm\xE1n Osorio Fuster Pons Mir Roca Casas Puig Alarc\xF3n
|
|
190
|
+
`),ja_JP:o(`
|
|
191
|
+
Tanaka Suzuki Takahashi Watanabe Ito Yamamoto Nakamura Kobayashi Kato Yoshida Yamada
|
|
192
|
+
Sasaki Yamaguchi Matsumoto Inoue Sato Kimura Hayashi Shimizu Yamazaki Mori Abe Ikeda
|
|
193
|
+
Hashimoto Yamashita Ishikawa Nakajima Maeda Fujita Ogawa Goto Okada Hasegawa Murakami
|
|
194
|
+
Kondo Ishii Saito Sakamoto Endo Aoki Fujii Nishimura Fukuda Ota Miura Fujiwara Okamoto
|
|
195
|
+
Matsuda Nakagawa Nakano Harada Ono Tamura Takeuchi Kaneko Wada Nakayama Ishida Ueda
|
|
196
|
+
Morita Hara Shibata Sakai Kudo Yokoyama Miyazaki Miyamoto Uchida Takagi Ando Taniguchi
|
|
197
|
+
Ohno Maruyama Imai Takada Fujimoto Takeda Murata Ueno Sugiyama Masuda Sugawara Hirano
|
|
198
|
+
Otsuka Chiba Kubo Matsui Iwasaki Sakurai Kinoshita Noguchi Matsuo Kikuchi Nomura Arai
|
|
199
|
+
Sano Onishi Sugimoto Hamada Ichikawa Furukawa Mizuno Komatsu Shimada Igarashi Kojima
|
|
200
|
+
Takano Taguchi Kitamura Yasuda Nakanishi Kawaguchi Hirata Kawasaki Iida Yoshikawa
|
|
201
|
+
Kubota Sawada Tsuji Seki Yoshimura Iwata Nakazawa Iwamoto Kawakami Sakaguchi Morimoto
|
|
202
|
+
Kuroda Hattori Higuchi Fukushima Nagai Matsuoka Akiyama Kitagawa Okazaki Tsuchiya
|
|
203
|
+
Hoshino Kawamura Takayama Hirai Tani Miyake Kanno Oshima Ochiai Kamata Hamaguchi
|
|
204
|
+
Nishida Nishikawa Okuda Ozawa Matsumura Murayama Shimomura Tsukamoto Takemoto Hino
|
|
205
|
+
Mochizuki Hirose Kumagai Azuma Hagiwara Okubo Nagata Hiraoka Kuwahara Kurosawa Amano
|
|
206
|
+
Oda Sekiguchi Yagi Nishiyama Ichinose Kono Asano Tsuda Minami Tsutsumi Oyama Yano
|
|
207
|
+
Kawabata Doi Mizutani Ozaki Shinohara Wakabayashi Ishihara Nakata Iwai Onodera Saeki
|
|
208
|
+
Kishi Fujisawa Fukui Hosokawa Kagawa Kamiya Nakatani Kanazawa Morikawa Hayakawa
|
|
209
|
+
Nagasawa Shiraishi Takamura
|
|
210
|
+
`),pt_BR:o(`
|
|
211
|
+
Silva Santos Oliveira Souza Rodrigues Ferreira Alves Pereira Lima Gomes Costa Ribeiro
|
|
212
|
+
Martins Carvalho Almeida Lopes Soares Fernandes Vieira Barbosa Rocha Dias Nascimento
|
|
213
|
+
Andrade Moreira Nunes Marques Machado Mendes Freitas Cardoso Ramos Gon\xE7alves Santana
|
|
214
|
+
Teixeira Ara\xFAjo Correia Monteiro Pinto Cavalcanti Batista Moura Campos Castro Cunha
|
|
215
|
+
Duarte Farias Melo Reis Azevedo Barros Borges Brito Cruz Fonseca Leite Macedo Medeiros
|
|
216
|
+
Miranda Morais Nogueira Pires Rezende Sales Siqueira Tavares Viana Xavier Aguiar Amaral
|
|
217
|
+
Antunes Bezerra Braga Bueno Caldeira Coelho Dantas Diniz Esteves Figueiredo Franco
|
|
218
|
+
Guimar\xE3es Jesus Lacerda Leal Magalh\xE3es Maia Matos Meireles Neves Pacheco Paiva Peixoto
|
|
219
|
+
Prado Queiroz Rangel Rios Sampaio Seixas Serra Toledo Valente Vasconcelos Vaz Amorim
|
|
220
|
+
Assis Bastos Cabral Calado Camargo Carneiro Chaves Couto Faria Feitosa Frota Galv\xE3o
|
|
221
|
+
Garcia Godoy Holanda Lins Lobo Luz Maciel Mattos Mesquita Mota Novaes Pimentel Porto
|
|
222
|
+
Ribas Salgado Sobral Telles Torres Uchoa Veloso Vilela Arruda Brand\xE3o Damasceno
|
|
223
|
+
Evangelista Falc\xE3o Fontes Freire Guerra Lustosa Marinho Mour\xE3o Paes Paix\xE3o Rosa
|
|
224
|
+
Saraiva Sim\xF5es Barreto Bittencourt Cordeiro Cerqueira Coutinho Fagundes Gusm\xE3o Leme
|
|
225
|
+
Lessa Mascarenhas Montenegro Muniz N\xF3brega Pedrosa Peres Quaresma Rabelo Rebou\xE7as
|
|
226
|
+
Sena Sodr\xE9 Ten\xF3rio Valadares Varela Vidal Zanetti Resende Moraes Arag\xE3o Bragan\xE7a
|
|
227
|
+
Medina Brum Fraga Goulart Lage Linhares Motta Nobre Pessoa Quintela Sarmento Tom\xE9
|
|
228
|
+
Vargas Werneck Ximenes Zago Carmo Dutra Gouveia Albuquerque
|
|
229
|
+
`)},M={en_US:o(`
|
|
230
|
+
Brantwell Corvane Halbrook Pellridge Quinmore Ashcombe Dunmore Everhart Glenwick
|
|
231
|
+
Harrowgate Ironvale Kestrelby Larkhaven Marlowick Northvale Oakhurst Pinecrest Thornbury
|
|
232
|
+
Upwell Vantor Wexley Yarrowby Zellmore Calloway Ellsworth Fenwick Stonebrook Wrenfield
|
|
233
|
+
Hartwell Bramblecote
|
|
234
|
+
`),fr_FR:o(`
|
|
235
|
+
Vercourt Lambrecq Dufrenois Morvanel Gaudri\xE8re Pelvoisin Varennel Hautemer Roussillac
|
|
236
|
+
Belcombe Chantelys Daumerac Fontclaire Joscaret Kervalec Lormanges Montbriel Navarrel
|
|
237
|
+
Orsenac Pradelis Quercyval Rivecourt Sablonnay Taverlac Valbrune Bressolles Cardinet
|
|
238
|
+
Dorvigny Escaloux Saint-Aubrac
|
|
239
|
+
`),de_DE:o(`
|
|
240
|
+
Kaltenbrunn Elbtaler Brennecke Auenfeld Steinhagel M\xFChlenkamp Hollerbach Rabenstein
|
|
241
|
+
Lindwurm Ostwald Achterberg Dornfeld Fallerstein Grimmelhof Haselbrink Ilmenhorst
|
|
242
|
+
Kornbach Lohwinkel Moorbeck Quellental Rothenwald Sandhagen Tannreuth Wiesengrund
|
|
243
|
+
Zwieselbrock Uhlenbrook Velmering Weidenkamp Brackwede Elsterhain
|
|
244
|
+
`),es_ES:o(`
|
|
245
|
+
Albarr\xE1n Valdeoro Guadalmar Pe\xF1alvar Riberalta Castellmar Arroyuelo Sotomonte
|
|
246
|
+
Puertoalba Encinar Alcorvia Berrocalia Doramonte Escalverde Fontanar Garrobal Hontalba
|
|
247
|
+
Lucenar Navalcruz Olmedal Pradoalto Robledal Torreluz Valcorba Almendrar Cortijuela
|
|
248
|
+
Jaramonte Linarejo Montejara Sauceda
|
|
249
|
+
`),ja_JP:o(`
|
|
250
|
+
Kawabe Midorigawa Hoshizora Kirisame Shirakaba Tsukinowa Hanamizuki Kuroiwa Minatogawa
|
|
251
|
+
Yamabuki Aozora Fuyumori Hikarizaka Isonami Kazahana Momijidani Natsukawa Oboro
|
|
252
|
+
Sakuragi Tobiume Umibe Yukishiro Akanegumo Hotaruno Kiribayashi Shiokaze Tsurugaoka
|
|
253
|
+
Yuugiri Komorebi Asagiri
|
|
254
|
+
`),pt_BR:o(`
|
|
255
|
+
Barrocal Verdejo Ribeirinha Aroeira Morroazul Caju\xEDna Jaboticaba Taquaral Ip\xEAzal
|
|
256
|
+
Pindorama Buritizal Carnaubal Jacarand\xE1 Mangueiral Palmeiral Quixabeira Sapucaia
|
|
257
|
+
Tamboril Umbuzeiro Vereda Cambu\xED Ingazeira Seriguela Ara\xE7\xE1 Goiabal Pitangueira
|
|
258
|
+
Juremal Angical Cajazeira Oiticica
|
|
259
|
+
`)},k={en_US:["{root} Industries","{root} Labs","{root} Systems","{root} Logistics","{root} Foods","{root} Analytics","{root} Partners","{root} Holdings","{root} Manufacturing","{root} Health","{root} Energy","{root} Software"],fr_FR:["Groupe {root}","Ateliers {root}","{root} SAS","Laboratoires {root}","Transports {root}","{root} Conseil","Maison {root}","Cabinet {root}","{root} Industries","Comptoir {root}","Optique {root}","Brasseries {root}"],de_DE:["{root} GmbH","{root} AG","{root} Maschinenbau GmbH","{root} Logistik AG","{root} & Partner","{root} Software GmbH","{root} Bau GmbH","{root} Elektrotechnik","{root} Feinkost","{root} Versicherung AG","{root} Chemie AG","{root} Medizintechnik"],es_ES:["Grupo {root}","Construcciones {root}","Transportes {root}","Bodegas {root}","Seguros {root}","Ingenier\xEDa {root}","Laboratorios {root}","{root} S.L.","Aceites {root}","Textiles {root}","Conservas {root}","Distribuciones {root}"],ja_JP:["{root} Shoji","{root} Denki","{root} Kogyo","{root} Seimitsu","{root} Foods","{root} Logistics","{root} Sangyo","{root} Kensetsu","{root} Shoken","{root} Software","{root} Seiyaku","{root} Tsusho"],pt_BR:["Construtora {root}","Grupo {root}","Transportadora {root}","Latic\xEDnios {root}","Tecelagem {root}","Seguradora {root}","Farm\xE1cias {root}","Metal\xFArgica {root}","{root} Ltda","Caf\xE9 {root}","Bioqu\xEDmica {root}","Distribuidora {root}"]},B={en_US:{names:["Main St","Oak Ave","Elm St","Park Blvd","Cedar Ln","Maple Dr","Pine St","Lake Rd","Hill St","River Rd","Washington Ave","Sunset Blvd"],format:"{n} {street}"},fr_FR:{names:["rue de la R\xE9publique","avenue Jean Jaur\xE8s","rue Victor Hugo","boulevard Pasteur","rue des Lilas","place de la Mairie","rue du Moulin","avenue de la Gare","rue Nationale","chemin des Vignes","rue des \xC9coles","all\xE9e des Tilleuls"],format:"{n} {street}"},de_DE:{names:["Hauptstra\xDFe","Bahnhofstra\xDFe","Gartenweg","Schulstra\xDFe","Lindenallee","Bergstra\xDFe","Kirchplatz","M\xFChlenweg","Dorfstra\xDFe","Am Markt","Rosenstra\xDFe","Waldweg"],format:"{street} {n}"},es_ES:{names:["Calle Mayor","Avenida de la Constituci\xF3n","Calle Real","Plaza de Espa\xF1a","Calle del Sol","Calle Nueva","Avenida del Mar","Calle San Jos\xE9","Camino Viejo","Calle de la Iglesia","Paseo del Prado","Calle Alta"],format:"{street} {n}"},ja_JP:{names:["Chuo","Honcho","Sakaecho","Midorimachi","Asahicho","Motomachi","Saiwaicho","Higashi","Kitamachi","Minamicho","Nishiki","Hanazono"],format:"{m}-{n} {street}"},pt_BR:{names:["Rua das Flores","Avenida Brasil","Rua S\xE3o Jo\xE3o","Rua XV de Novembro","Rua da Paz","Rua Sete de Setembro","Avenida Central","Rua do Com\xE9rcio","Travessa da Lapa","Rua das Palmeiras","Avenida Atl\xE2ntica","Rua Tiradentes"],format:"{street}, {n}"}},A={en_US:["Pacific","Midwest","Atlantic","Southwest","Northeast","Gulf"],fr_FR:["Ouest","Est","Sud","Nord","Centre","Atlantique"],de_DE:["Nord","S\xFCd","West","Ost","Mitte","Rhein"],es_ES:["Norte","Sur","Levante","Centro","Atl\xE1ntico","Mediterr\xE1neo"],ja_JP:["Kanto","Kansai","Kyushu","Tohoku","Chubu","Hokuriku"],pt_BR:["Sul","Nordeste","Norte","Centro-Oeste","Sudeste","Litoral"]};function y(e,r,a=0){let i=M[e],h=k[e],t=i[r%i.length],n=h[Math.floor(r/i.length)%h.length];if(a===0)return n.replace("{root}",t);let m=A[e],s=m[(a-1)%m.length],g=n.replace("{root}",`${t} ${s}`),S=Math.floor((a-1)/m.length);return S===0?g:`${g} ${S+1}`}function d(e){let r=k[e].length*M[e].length;return Array.from({length:r},(a,i)=>y(e,i))}var c={en_US:{firstNames:l.en_US,lastNames:u.en_US,cities:["New York","Los Angeles","Chicago","Houston","Phoenix","Philadelphia","San Antonio","San Diego","Dallas","Austin"],companies:d("en_US"),phoneFormats:["+1 212-555-01XX","+1 213-555-01XX","+1 312-555-01XX","+1 713-555-01XX","+1 602-555-01XX","+1 215-555-01XX","+1 210-555-01XX","+1 619-555-01XX","+1 214-555-01XX","+1 512-555-01XX"],phoneRange:{countryCode:"1",trunkPrefix:"1",nationalNumber:/^(?:[2-9]\d{2})?55501\d{2}$/},zipFormat:"#####",emailDomains:["example.com","example.net","example.org","company.example","mail.test"]},fr_FR:{firstNames:l.fr_FR,lastNames:u.fr_FR,cities:["Paris","Lyon","Marseille","Toulouse","Nice","Bordeaux","Strasbourg","Nantes","Lille","Rennes"],companies:d("fr_FR"),phoneFormats:["+33 1 99 00 XX XX","+33 2 61 91 XX XX","+33 3 53 01 XX XX","+33 4 65 71 XX XX","+33 5 36 49 XX XX","+33 6 39 98 XX XX"],phoneRange:{countryCode:"33",trunkPrefix:"0",nationalNumber:/^(?:19900|26191|35301|46571|53649|63998)\d{4}$/},zipFormat:"#####",emailDomains:["example.com","example.org","example.net","entreprise.example","courriel.test"]},de_DE:{firstNames:l.de_DE,lastNames:u.de_DE,cities:["Berlin","Munich","Hamburg","Frankfurt","Cologne","Stuttgart","Dusseldorf","Leipzig","Dresden","Hannover"],companies:d("de_DE"),phoneFormats:["+49 30 23125 XXX","+49 69 90009 XXX","+49 40 66969 XXX","+49 221 4710 XXX","+49 89 99998 XXX"],phoneRange:{countryCode:"49",trunkPrefix:"0",nationalNumber:/^(?:3023125|6990009|4066969|2214710|8999998)\d{3}$/},zipFormat:"#####",emailDomains:["example.com","example.net","example.org","firma.example","post.test"]},es_ES:{firstNames:l.es_ES,lastNames:u.es_ES,cities:["Madrid","Barcelona","Valencia","Seville","Zaragoza","Malaga","Bilbao","Murcia","Palma","Granada"],companies:d("es_ES"),phoneFormats:["+34 3XX XXX XXX"],phoneRange:{countryCode:"34",trunkPrefix:"",nationalNumber:/^3\d{8}$/},zipFormat:"#####",emailDomains:["example.com","example.org","example.net","empresa.example","correo.test"]},ja_JP:{firstNames:l.ja_JP,lastNames:u.ja_JP,cities:["Tokyo","Osaka","Yokohama","Nagoya","Sapporo","Fukuoka","Kobe","Kyoto","Sendai","Hiroshima"],companies:d("ja_JP"),phoneFormats:["+81 90-0XXX-XXXX"],phoneRange:{countryCode:"81",trunkPrefix:"0",nationalNumber:/^900\d{7}$/},zipFormat:"###-####",emailDomains:["example.com","example.net","example.org","kaisha.example","yubin.test"]},pt_BR:{firstNames:l.pt_BR,lastNames:u.pt_BR,cities:["Sao Paulo","Rio de Janeiro","Brasilia","Salvador","Fortaleza","Belo Horizonte","Manaus","Curitiba","Recife","Porto Alegre"],companies:d("pt_BR"),phoneFormats:["+55 11 90XXX-XXXX","+55 21 90XXX-XXXX","+55 61 90XXX-XXXX","+55 71 90XXX-XXXX","+55 85 90XXX-XXXX","+55 31 90XXX-XXXX","+55 92 90XXX-XXXX","+55 41 90XXX-XXXX","+55 81 90XXX-XXXX","+55 51 90XXX-XXXX"],phoneRange:{countryCode:"55",trunkPrefix:"0",nationalNumber:/^(?:[1-9]{2})?90\d{7}$/},zipFormat:"#####-###",emailDomains:["example.com","example.org","example.net","empresa.example","correio.test"]}},b=["example.com","example.net","example.org"],C=["example","invalid","test"];function X(e){let r=e.toLowerCase().replace(/\.$/,"");return b.some(a=>r===a||r.endsWith(`.${a}`))||C.some(a=>r.endsWith(`.${a}`))}function R(e){let r=e.trim(),a=r.replace(/\D/g,"");return r.startsWith("+")?a:a.startsWith("00")?a.slice(2):void 0}function f(e){let r=R(e);if(r!==void 0)return Object.keys(c).find(a=>r.startsWith(c[a].phoneRange.countryCode))}function F(e,r){let a=R(e),i=e.replace(/\D/g,"");return(r===void 0?Object.values(c):[p(r)]).some(({phoneRange:{countryCode:t,trunkPrefix:n,nationalNumber:m}})=>{let s=i;if(a!==void 0){if(!a.startsWith(t))return!1;s=a.slice(t.length)}let g=n!==""&&s.startsWith(n)?s.slice(n.length):s;return m.test(s)||m.test(g)})}function K(e,r){let a=p(e).phoneFormats;return z(a[r%a.length],Math.floor(r/a.length))}var L={en:"en_US",fr:"fr_FR",de:"de_DE",es:"es_ES",ja:"ja_JP",pt:"pt_BR"};function p(e){if(e in c)return c[e];let r=e.split("_")[0].toLowerCase(),a=L[r];return a?c[a]:c.en_US}function z(e,r){let a=e.split("X").length-1,i=10**a,h=(r%i+i)%i,t=String((h*7919+4027)%i).padStart(a,"0"),n=0;return e.replace(/X/g,()=>t[n++])}function v(e,r){let a=(r+1)*48271%2147483647;return e.replace(/#/g,()=>(a=a*48271%2147483647,String(a%10)))}export{l as a,u as b,B as c,y as d,d as e,c as f,X as g,f as h,F as i,K as j,p as k,v as l};
|
|
@@ -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{b as f}from"./chunk-SBIMVCXT.mjs";import{d as e}from"./chunk-NTOVCTRS.mjs";var o=e(f());var export_jsforce=o.default;export{export_jsforce as jsforce};
|
|
@@ -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{b as c,l as p}from"./chunk-7EANH5PY.mjs";var T="SELECT Id, SobjectType, DeveloperName, NamespacePrefix FROM RecordType",d=p({Id:c().min(15),DeveloperName:c().min(1),NamespacePrefix:c().nullable().optional(),SobjectType:c().min(1).optional()}).loose();function y(e){return Array.isArray(e)?e.flatMap(r=>{let a=d.safeParse(r);if(!a.success)return[];let{Id:n,DeveloperName:t,NamespacePrefix:o,SobjectType:i}=a.data;return[{id:n,developerName:t,namespacePrefix:o||null,...i?{sobjectType:i}:{}}]}):[]}function s(e,r){return e?`${e}__${r}`:r}function N(e){return s(e.namespacePrefix,e.developerName)}function g(e){return{namespacePrefix:e.namespacePrefix??null,developerName:e.developerName}}function x(e){return`${e.sobjectType??""}::${e.namespacePrefix??""}::${e.developerName}`}function m(e){let r=e.indexOf("__");return r>0&&r<e.length-2?{namespacePrefix:e.slice(0,r),developerName:e.slice(r+2)}:{namespacePrefix:void 0,developerName:e}}function P(e,r,a){let n=u(m(e),r,a);if(!("ambiguous"in n))return n;let t=n.ambiguous.filter(o=>a(o).namespacePrefix===null);return t.length===1?{found:t[0]}:n}function u(e,r,a){let n=r.filter(t=>{let o=a(t);return o.developerName!==e.developerName?!1:e.namespacePrefix===void 0||o.namespacePrefix===e.namespacePrefix});return n.length===1?{found:n[0]}:n.length>1?{ambiguous:n}:{none:!0}}function f(e){let r=s(e.namespacePrefix,e.developerName);return e.namespacePrefix?`${r}, of package ${e.namespacePrefix}`:e.namespacePrefix===null?`${r}, the org's own`:r}function R(e,r,a,n){return`${r} names ${n.length} ${e} record types in ${a}: `+n.map(f).join(" and ")}export{T as a,y as b,s as c,N as d,g as e,x as f,m as g,P as h,u as i,R as j};
|
|
@@ -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
|
+
var p=/[A-Za-z0-9_.$]/,h=/^[A-Za-z][A-Za-z0-9_]*$/;function x(t){let r=[],s=0,e=0;for(;e<t.length;){let n=t[e];if(n==="'"){for(e++;e<t.length&&t[e]!=="'";)e+=t[e]==="\\"?2:1;e++}else if(n==="(")s++,e++;else if(n===")")s=Math.max(0,s-1),e++;else if(p.test(n)){let o=e;for(;e<t.length&&p.test(t[e]);)e++;s===0&&r.push({text:t.slice(o,e),start:o,end:e})}else e++}return r}function C(t,r){let s=t[r].text.toLowerCase(),e=t[r+1]?.text.toLowerCase();return["where","with","having","limit","offset","for"].includes(s)?!0:s==="group"||s==="order"?e==="by":s==="all"?e==="rows":s==="using"?e==="scope":s==="update"&&(e==="tracking"||e==="viewstat")}function A(t,r){return t.split(/('(?:[^'\\]|\\.)*'?)/s).map((s,e)=>e%2===0?r(s):s).join("")}function w(t,r){let s=r?new RegExp(`(?<![\\w.$])${r}\\.`,"gi"):void 0;return A(t,e=>{let n=e.replace(/\s+/g," ");return s?n.replace(s,""):n}).trim()}function b(t,r){let s=r+2;if(!t[s]||C(t,s))return{at:s};let e=t[s].text.toLowerCase()==="as"?s+1:s;return t[e]&&h.test(t[e].text)?{alias:t[e].text,at:e+1}:{at:s}}var W=/^(?:all|(?:readonly|custom|standard|createable|updateable|lookup)_(?:true|false)|type_[a-z]\w*)$/i,S=/^(?:tolabel|convertcurrency|format)\s*\(\s*([A-Za-z][A-Za-z0-9_]*)\s*\)$/i;function _(t){let r=[],s=0,e=0;for(let n=0;n<t.length;n++){let o=t[n];if(o==="'")for(n++;n<t.length&&t[n]!=="'";)n+=t[n]==="\\"?2:1;else o==="("?s++:o===")"?s=Math.max(0,s-1):o===","&&s===0&&(r.push(t.slice(e,n)),e=n+1)}return r.push(t.slice(e)),r.map(n=>n.replace(/\s+/g," ").trim()).filter(n=>n!=="")}function v(t){let r=x(t),s=r.findIndex(i=>i.text.toLowerCase()==="select"),e=r.findIndex((i,f)=>f>s&&i.text.toLowerCase()==="from");if(s<0||e<0)return{every:t.replace(/\s+/g," ").trim().slice(0,80)};let n=t.slice(r[s].end,r[e].start),{alias:o}=b(r,e),c=i=>o&&i.toLowerCase().startsWith(`${o.toLowerCase()}.`)?i.slice(o.length+1):i,l=[];for(let i of _(n).map(c)){if(/^fields\s*\(/i.test(i)||W.test(i))return{every:i};let f=S.exec(i)?.[1]??(h.test(i)?i:void 0);f&&!l.some(d=>d.toLowerCase()===f.toLowerCase())&&l.push(f)}return l.every(i=>i.toLowerCase()==="id")?{every:l[0]??n.replace(/\s+/g," ").trim()}:{list:l}}function y(t){let r=x(t),s=r.findIndex(a=>a.text.toLowerCase()==="from"),e=r[s+1];if(s<0||!e||!h.test(e.text))return{otherClauses:[]};let{alias:n,at:o}=b(r,s),c=[];for(let a=o;a<r.length;a++)C(r,a)&&c.push(a);let l={object:e.text,otherClauses:[]},i=n?r[o-1].end:e.end,f=c.length>0?r[c[0]].start:t.length,d=t.slice(i,f).trim();return d!==""&&l.otherClauses.push(d),c.forEach((a,m)=>{let L=m+1<c.length?r[c[m+1]].start:t.length,g=r[a].text.toLowerCase(),u=t.slice(r[a].start,L).trim();g==="where"?l.where=w(u.slice(5),n):g==="order"?l.orderBy=w(u.replace(/^order\s+by/i,""),n):g==="limit"&&/^limit\s+\d+$/i.test(u)?l.limit=Number(u.slice(5)):l.otherClauses.push(u)}),l}export{v as a,y as b};
|
|
@@ -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{f as m,h as u}from"./chunk-TZE3Y7IQ.mjs";import{b as $}from"./chunk-CA5NAXSU.mjs";import{d as l}from"./chunk-B45CNPUX.mjs";async function q(n,a,o,t){if(!Number.isInteger(t)||t<1||t>l.maxExistingParents)throw new Error(`A relation reads between 1 and ${l.maxExistingParents} existing records, not ${t}.`);let c=o?.trim()?` WHERE ${m(o.trim())}`:"",i=`SELECT Id FROM ${u(a)}${c} LIMIT ${t}`,r=[],e=await n.query(i);for(;;){for(let s of e.records)typeof s.Id=="string"&&r.push(s.Id);if(e.done||!e.nextRecordsUrl||r.length>=t)break;e=await n.queryMore(e.nextRecordsUrl)}return r.slice(0,t)}var w=200,E=/^[A-Za-z0-9]{15}(?:[A-Za-z0-9]{3})?$/;function R(n){return n.slice(0,15)}async function N(n,a,o){let t=u(a);for(let i of o)if(!E.test(i))throw new Error(`Not a record id: "${i}".`);let c=[];for(let i=0;i<o.length;i+=w){let r=o.slice(i,i+w).map(s=>`'${s}'`).join(", "),e=await n.query(`SELECT Id FROM ${t} WHERE Id IN (${r})`);for(;;){for(let s of e.records)typeof s.Id=="string"&&c.push(s.Id);if(e.done||!e.nextRecordsUrl)break;e=await n.queryMore(e.nextRecordsUrl)}}return c}function y(n){let a=n.slice(0,5).join(", ");return n.length>5?`${a}, and ${n.length-5} more`:a}async function b(n,a){let o=[];for(let t of n??[]){if(t.parents.kind!=="records")continue;let{childObject:c,lookupField:i,parentObject:r}=t,e=t.parents.ids,s=`${c}.${i}`,d;try{d=await a.keyPrefixOf?.(r)}catch{d=void 0}let f=d?e.filter(g=>g.slice(0,3)!==d):[];if(f.length>0){o.push(`The relation on ${s} names ${f.length} id(s) that are not ${r} ids \u2014 the org's ${r} ids start with ${d}: ${y(f)}. Nothing was written. Give the ids of ${r} records.`);continue}if(!a.presentIds){o.push(`This run cannot check that the ${e.length} ${r} record(s) the relation on ${s} names are in the org. Nothing was written.`);continue}let p;try{p=await a.presentIds(r,e)}catch(g){o.push(`Reading the ${r} records the relation on ${s} names failed (${$(g)}). Nothing was written.`);continue}let I=new Set(p.map(R)),h=e.filter(g=>!I.has(R(g)));h.length>0&&o.push(`${h.length} of the ${e.length} ${r} record(s) the relation on ${s} names are no longer in the org: ${y(h)}. Nothing was written. Run again what created them, or give the ids of ${r} records the org holds.`)}return o}export{q as a,w as b,N as c,b as d};
|