import{b as S,c as A,d as R}from"./chunk-2MNOWKMI.js";import{a as N}from"./chunk-YB3SGPFF.js";import{a as P}from"./chunk-7XQDZF73.js";import{Ga as T,b as y,c as x}from"./chunk-UZ7U322K.js";import{b,c as g}from"./chunk-Q6LCSRIW.js";import{u as h}from"./chunk-E24W34C4.js";import{Fb as l,Hb as m,Lb as d}from"./chunk-EYDNSYYE.js";import{d as f}from"./chunk-773TIA5M.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function C(n,t){let o={};return n.targeting?.forEach(e=>{e.target&&(o[e.target]={...e.input_query&&{inputQueryPath:`${t}/${e.input_query}`},...e.export&&{export:e.export}})}),o}function I(n,t,o,e,i,r){return JSON.stringify({handle:t.handle,name:n.name,apiVersion:t.api_version,targeting:o,schemaPath:r,wasmPath:i,functionRunnerPath:e},null,2)}function j(n,t){return{title:`CONFIGURATION
`,body:{tabularData:[["Handle",n.handle??"N/A"],["Name",t??"N/A"],["API Version",n.api_version??"N/A"]],firstColumnSubdued:!0}}}function O(n){if(Object.keys(n).length===0)return null;let t=[];return Object.entries(n).forEach(([o,e])=>{t.push([m`${l.cyan(o)}`.value,""]),e.inputQueryPath&&t.push([{subdued:"  Input Query Path"},{filePath:e.inputQueryPath}]),e.export&&t.push([{subdued:"  Export"},e.export])}),{title:`
TARGETING
`,body:{tabularData:t}}}function v(n,t){return{title:`
BUILD
`,body:{tabularData:[["Schema Path",{filePath:t??"N/A"}],["Wasm Path",{filePath:n}]],firstColumnSubdued:!0}}}function D(n){return{title:`
FUNCTION RUNNER
`,body:{tabularData:[["Path",{filePath:n}]],firstColumnSubdued:!0}}}function k(n,t,o,e,i,r){let a=[j(t,n.name)],s=O(o);return s&&a.push(s),a.push(v(i,r),D(e)),a}function w(n,t){let{format:o,functionRunnerPath:e,schemaPath:i}=t,r=n.configuration,a=C(r,n.directory),s=f(n.directory,r.build?.path??n.outputRelativePath);return o==="json"?I(n,r,a,e,s,i):k(n,r,a,e,s,i)}var c,u=class extends N{async run(){let{flags:t}=await this.parse(c),{app:o}=await T({directory:t.path,userProvidedConfigName:t.config}),e=await A(o,t.path),i=y();await x(i);let r=await R(e,t.path,t["client-id"],t.reset,t.config),a=w(e,{format:t.json?"json":"text",functionRunnerPath:i.path,schemaPath:r});return t.json?d(a):h({customSections:a}),{app:o}}};c=u;u.summary="Print basic information about your function.";u.descriptionWithMarkdown=`The information returned includes the following:

  - The function handle
  - The function name
  - The function API version
  - The targeting configuration
  - The schema path
  - The WASM path
  - The function runner path`;u.description=c.descriptionWithoutMarkdown();u.flags={...b,...P,...S,...g};var H=u;export{H as a};
