import{getApiFunctionsUsage as f}from"./collectors/get-api-functions-usage.js";import{getAsyncApiUsage as l}from"./collectors/get-async-api-usage.js";import{getConfigStatsUsage as c}from"./collectors/get-config-stats-usage.js";import{getFileExtensionsUsage as d}from"./collectors/get-file-extensions-usage.js";import{getFrontmatterUsage as U}from"./collectors/get-frontmatter-usage.js";import{getMarkdocUsage as p}from"./collectors/get-markdoc-usage.js";import{getNestedConfigsUsage as u}from"./collectors/get-nested-configs-usage.js";import{getProcessedConfigStatsUsage as S}from"./collectors/get-processed-config-stats-usage.js";import{getRefsUsage as C}from"./collectors/get-refs-usage.js";import{getThemeFolderUsage as x}from"./collectors/get-theme-folder-usage.js";import{telemetry as y}from"../../telemetry/index.js";async function w(r,i){const n=[f,l,c,d,U,p,u,S,C,x],g=await Promise.allSettled(n.map(t=>t({store:r,context:i}))),e={},s={};for(const t of g)if(t.status==="fulfilled"){const{name:o,value:a,version:m}=t.value;a&&(e[o]=a,s[o]=m)}y.sendBuildMessage({usageStats:e.usageStats,asyncApiUsage:e.asyncApiUsage,buildContext:e.buildContext,fileExtensions:e.fileExtensions,frontmatterUsage:e.frontmatterUsage,markdocUsage:e.markdocUsage,processedBuildContext:e.processedBuildContext,nestedConfigStats:e.nestedConfigStats,refsUsageStats:e.refsUsageStats,themeFolderUsage:e.themeFolderUsage,versions:JSON.stringify(s)})}export{w as collectAnalytics};
