UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

2 lines (1 loc) 3.26 kB
import{a as m,b as S,c as v,d as L}from"../../../chunk-JAO53IH2.js";import{b as O,k as b,q as y}from"../../../chunk-XITQULK4.js";import{a as F}from"../../../chunk-EQU4MUQJ.js";import"../../../chunk-CBXSPL4W.js";import"../../../chunk-UJVH7FZS.js";import"../../../chunk-EKXY5COY.js";import"../../../chunk-4DCQNGUV.js";import"../../../chunk-XONFGLJQ.js";import"../../../chunk-4LNCYIS3.js";import"../../../chunk-L2MGAEV3.js";import"../../../chunk-PRKBO42R.js";import"../../../chunk-ZSBA6VIC.js";import"../../../chunk-F2QU6WWX.js";import"../../../chunk-XULPJ6UG.js";import{b as h,c as g}from"../../../chunk-XR6GMMEU.js";import"../../../chunk-3TNEIDOD.js";import"../../../chunk-MHWV5RQV.js";import"../../../chunk-XOTA6JTZ.js";import"../../../chunk-MOA33ZFO.js";import"../../../chunk-JUVAGMIH.js";import{u as c}from"../../../chunk-6G6TMKXF.js";import"../../../chunk-P6XE4MH5.js";import"../../../chunk-KLMDWDT2.js";import"../../../chunk-5CH3B62S.js";import"../../../chunk-QUTQDXSL.js";import"../../../chunk-WSDN25F5.js";import"../../../chunk-M56NDIMD.js";import"../../../chunk-PD5ZHJWI.js";import{r as _}from"../../../chunk-LDGAHMS7.js";import"../../../chunk-ZR76GGZ6.js";import"../../../chunk-EENHXSWU.js";import"../../../chunk-FUOIGXI4.js";import"../../../chunk-6M3ZYNGO.js";import"../../../chunk-QYR5VPQA.js";import"../../../chunk-OBEWZXOQ.js";import{Mb as d}from"../../../chunk-N5PQPIBF.js";import"../../../chunk-CERXUPGC.js";import"../../../chunk-T4M5CWAO.js";import"../../../chunk-PRVQAHWI.js";import"../../../chunk-YTNDFQJT.js";import"../../../chunk-ULQG3XQS.js";import"../../../chunk-IU2ZQ6TE.js";import"../../../chunk-PIBY5DDZ.js";import{e as E,g as s}from"../../../chunk-VPRTJUIN.js";s();s();function w(e,t){return{title:e,body:{tabularData:t}}}async function T(e,t){let n=t.storeFqdn,u=new L({...m.reduce((o,r)=>(o[r]=e.role===r,o),{}),theme:e.id?.toString()??e.name}),i=await S(t),A=O(),I=F(n);if(u.any()&&(i=v(n,i,u)),e.json)return d(JSON.stringify(i,null,2));let D=i.map(({id:o,name:r,role:p})=>{let a="";return p&&(a=`[${p}]`,[A,I].includes(`${o}`)&&(a+=" [current]")),[r,a,`#${o}`]}),R=[["name","role","id"],["\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"],...D];c({customSections:[...e.environment?[{title:`${n} theme library`,body:[{subdued:`Environment name: ${e.environment}`}]}]:[],w("",R)]})}var l=E(_(),1);var f=class extends y{static{this.description="Lists the themes in your store, along with their IDs and statuses."}static{this.flags={...h,...g,...b,role:l.Flags.custom({description:"Only list themes with the given role.",options:m,env:"SHOPIFY_FLAG_ROLE"})(),name:l.Flags.string({description:"Only list themes that contain the given name.",env:"SHOPIFY_FLAG_NAME"}),id:l.Flags.integer({description:"Only list theme with the given ID.",env:"SHOPIFY_FLAG_ID"})}}static{this.multiEnvironmentsFlags=["store","password"]}async command(t,n){await T(t,n)}};export{f as default};