import i from"path";import{REGISTRY_APIS_PATHS_API_URL as a}from"../../constants/common.js";import n from"../../utils/reporter/logger";async function p(r,d,{variables:o}){const c=i.posix.dirname(r.fsPath);let t={};if(o.idpAccessToken&&a)try{const s=a+"/"+encodeURIComponent(c),e=await fetch(s,{headers:{Cookie:`accessToken=${o.idpAccessToken}`}});e.status!==200?n.warnProd(`Failed to fetch custom fields. API response status: ${e.status}. Request URL: ${s}`):t=(await e.json()).customFields||{}}catch(s){n.warnProd("Failed to fetch custom fields: "+s.message)}return{customFields:t}}export{p as default};
