import{readEnvVariable as i}from"./read-env-variable.js";const l=/{{\s*process\.env\.([A-Z0-9_]+)\s*}}/gi;function V(r){let e=r;const t=new Set,a=new Set,c=[...r.matchAll(l)];for(const s of c){const n=s[1].toUpperCase(),o=i(n);o===void 0?t.add(n):(e=e.replace(s[0],o),a.add(n))}return{interpolatedValue:e,unsetVars:Array.from(t),interpolatedVars:Array.from(a)}}export{V as interpolateEnvVariables};
