import{loadConfig as r}from"@redocly/openapi-core";import a from"node:path";import{access as i}from"node:fs/promises";import{CONFIG_FILE_NAME as e}from"../../../../constants/common.js";import{getPortalConfigStats as c}from"../../../telemetry/get-portal-config-stats.js";const C=async({context:t})=>{const o=a.join(t.fs.cwd,e),n=await f(o);return{version:"2",name:"buildContext",value:c(n)}};async function f(t){try{await i(t)}catch{return{}}const o=await r({configPath:t});return o.document?.parsed||o.resolvedConfig}export{C as getConfigStatsUsage};
