import t from"../utils/fillTemplate.js";import e from"../node_modules/lodash/isNil.js";const o=(o,{CortexApi:r})=>{o.hook.wrap("request",(async(o,s)=>{if(e(r))throw new Error("CortexApi is not defined -- pass it in as an option to the Octokit plugin constructor to make requests");const a=await r.proxyFetch((e=>{const{baseUrl:o,url:r,...s}=e;return`${o}${t(r,s)}`})(s),{headers:s.headers,method:s.method}),i=await a.json(),n={};return a.headers.forEach(((t,e)=>{n[e]=t})),{data:i,headers:n,status:a.status,url:a.url}}))};export{o as default};
//# sourceMappingURL=octokitPlugin.js.map
