@shopify/cli 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/README.md +2 -2
  2. package/dist/analytics-5TEIW43T.js +1 -0
  3. package/dist/analytics-GG7CYCGL.js +1 -0
  4. package/dist/bootstrap.js +1 -1
  5. package/dist/{chunk-MBAFWQSZ.js → chunk-2AJ5FI2K.js} +1 -1
  6. package/dist/{chunk-SRCQVUMC.js → chunk-2GK56X53.js} +1 -1
  7. package/dist/{chunk-3F6NZK7S.js → chunk-3D4JXJPS.js} +1 -1
  8. package/dist/{chunk-YI232QLS.js → chunk-3NBK56IK.js} +1 -1
  9. package/dist/{chunk-HUZUORYM.js → chunk-4DCQNGUV.js} +1 -1
  10. package/dist/{chunk-6TZAAS5H.js → chunk-4IC626OL.js} +1 -1
  11. package/dist/{chunk-SBEZBZM7.js → chunk-54CAKCYR.js} +2 -2
  12. package/dist/{chunk-VWYM4OWK.js → chunk-5UHQVR2Z.js} +1 -1
  13. package/dist/{chunk-D6JARNEH.js → chunk-5WVAHE5E.js} +1 -1
  14. package/dist/{chunk-Y5JKV2AI.js → chunk-67MH4AXG.js} +1 -1
  15. package/dist/{chunk-3DQIVE24.js → chunk-6CYMJ76C.js} +1 -1
  16. package/dist/chunk-6G6TMKXF.js +28 -0
  17. package/dist/{chunk-MQNYGGAM.js → chunk-6ITDI2SD.js} +1 -1
  18. package/dist/{chunk-WZBSLU4Q.js → chunk-6RE2SNCU.js} +1 -1
  19. package/dist/{chunk-KL5Z3T6L.js → chunk-6SF3ZETE.js} +1 -1
  20. package/dist/chunk-6WL4GA2M.js +15 -0
  21. package/dist/{chunk-DU4WR4OP.js → chunk-76R52ODR.js} +1 -1
  22. package/dist/{chunk-DJQVNH7P.js → chunk-7ESSIN27.js} +1 -1
  23. package/dist/{chunk-UGDBJTLP.js → chunk-7NH7CHVI.js} +1 -1
  24. package/dist/{chunk-ELYP4KFP.js → chunk-7QIOUDCX.js} +1 -1
  25. package/dist/{chunk-GD7FWXJ5.js → chunk-7ZT57XT7.js} +1 -1
  26. package/dist/{chunk-RF2DPBA6.js → chunk-AGNMOFJS.js} +1 -1
  27. package/dist/{chunk-WXVZJJOR.js → chunk-BS3BKORT.js} +1 -1
  28. package/dist/{chunk-K5YV6UVF.js → chunk-C2IK2HY3.js} +1 -1
  29. package/dist/{chunk-22PCRFG4.js → chunk-C7BTJ32Z.js} +1 -1
  30. package/dist/{chunk-RFG5RMPL.js → chunk-CBXSPL4W.js} +1 -1
  31. package/dist/{chunk-B2IVY4V5.js → chunk-CEIQFLCN.js} +1 -1
  32. package/dist/{chunk-XBXMPFXM.js → chunk-DCPBRWVC.js} +1 -1
  33. package/dist/{chunk-26D72ZNV.js → chunk-DN2IE3VY.js} +1 -1
  34. package/dist/{chunk-Q7ING5F5.js → chunk-DRFGABEB.js} +1 -1
  35. package/dist/{chunk-DJONKJSZ.js → chunk-E3EMHAJB.js} +1 -1
  36. package/dist/{chunk-TQYMC7TH.js → chunk-EKXY5COY.js} +1 -1
  37. package/dist/{chunk-4G7J6HIV.js → chunk-EQU4MUQJ.js} +1 -1
  38. package/dist/chunk-F2QU6WWX.js +1 -0
  39. package/dist/{chunk-AIV5RI3X.js → chunk-FKMC5OFF.js} +1 -1
  40. package/dist/{chunk-XLELNRFF.js → chunk-FQWB2F75.js} +1 -1
  41. package/dist/{chunk-JHPRFW5B.js → chunk-FYFNUDOC.js} +1 -1
  42. package/dist/chunk-G4BPGWJC.js +1 -0
  43. package/dist/{chunk-KNVM7N3U.js → chunk-GVQIPEZT.js} +1 -1
  44. package/dist/{chunk-66RJ5T7A.js → chunk-GZS44BUW.js} +61 -61
  45. package/dist/{chunk-J3KVONB3.js → chunk-HIBX234C.js} +1 -1
  46. package/dist/{chunk-OHY4ZL3U.js → chunk-HRUGYZZ4.js} +1 -1
  47. package/dist/{chunk-ZV6NCNI4.js → chunk-HUIJMGVJ.js} +1 -1
  48. package/dist/{chunk-ALKTLKQ6.js → chunk-IZ3C5J7G.js} +1 -1
  49. package/dist/{chunk-RVNMVBPM.js → chunk-JAO53IH2.js} +1 -1
  50. package/dist/chunk-JCL2RRU6.js +1 -0
  51. package/dist/{chunk-74HYYXXE.js → chunk-JQJBBXMX.js} +1 -1
  52. package/dist/{chunk-HSK7YMRE.js → chunk-JXW374CL.js} +1 -1
  53. package/dist/{chunk-KWJ562F2.js → chunk-K6CTUBFC.js} +1 -1
  54. package/dist/{chunk-A74GETYC.js → chunk-KHSYW7I4.js} +1 -1
  55. package/dist/{chunk-LX3ZOW52.js → chunk-KHTV6PBV.js} +1 -1
  56. package/dist/{chunk-TFSBQ4RY.js → chunk-KKTW6ZCA.js} +1 -1
  57. package/dist/{chunk-JGXWQULI.js → chunk-KN3WTTHZ.js} +1 -1
  58. package/dist/{chunk-R466TU3N.js → chunk-KR6QDE7D.js} +1 -1
  59. package/dist/{chunk-GFJ7UV74.js → chunk-KZOBF55B.js} +1 -1
  60. package/dist/{chunk-LAZJ47DZ.js → chunk-L2MGAEV3.js} +2 -2
  61. package/dist/{chunk-JVIKCGDY.js → chunk-M2D7USAX.js} +1 -1
  62. package/dist/{chunk-INEU4XKS.js → chunk-M2ZHFKPN.js} +1 -1
  63. package/dist/{chunk-LXFJDCNG.js → chunk-M3RYUB22.js} +1 -1
  64. package/dist/{chunk-JPGO36XP.js → chunk-M56NDIMD.js} +1 -1
  65. package/dist/{chunk-GNPS5SBU.js → chunk-MCVRONUY.js} +1 -1
  66. package/dist/{chunk-4HHXSMD7.js → chunk-MHWV5RQV.js} +1 -1
  67. package/dist/{chunk-LW7U753G.js → chunk-MWGBTOO3.js} +1 -1
  68. package/dist/{chunk-JLBH7RCF.js → chunk-MWY3A7O3.js} +1 -1
  69. package/dist/{chunk-GFEAKSGV.js → chunk-N5PQPIBF.js} +40 -40
  70. package/dist/{chunk-2APPXD5Z.js → chunk-NMBBTTIH.js} +1 -1
  71. package/dist/{chunk-VY6SNDKW.js → chunk-NPEVESCV.js} +1 -1
  72. package/dist/{chunk-V2CNCPIE.js → chunk-OBEWZXOQ.js} +1 -1
  73. package/dist/{chunk-6BMMB2UO.js → chunk-OTY24J2W.js} +1 -1
  74. package/dist/{chunk-2VQJQ36C.js → chunk-OY3PNHPZ.js} +1 -1
  75. package/dist/{chunk-VS3T5YOG.js → chunk-PAP22IQO.js} +2 -2
  76. package/dist/{chunk-LALIKZPS.js → chunk-PYVAWAUO.js} +1 -1
  77. package/dist/{chunk-LNHLDRC5.js → chunk-Q33IBIVJ.js} +1 -1
  78. package/dist/chunk-Q4T2T2QE.js +15 -0
  79. package/dist/{chunk-NRAFVIU3.js → chunk-QA23HIH4.js} +1 -1
  80. package/dist/{chunk-52GC6XUT.js → chunk-QBSKKQBN.js} +1 -1
  81. package/dist/{chunk-KGXQS7LS.js → chunk-S6EJHWJL.js} +1 -1
  82. package/dist/{chunk-P5VVOLGV.js → chunk-SIMFNECG.js} +1 -1
  83. package/dist/{chunk-YMWHHINU.js → chunk-SXTMSGUE.js} +1 -1
  84. package/dist/{chunk-IOLVEXM6.js → chunk-T542UQBY.js} +1 -1
  85. package/dist/{chunk-QRRNOVJ3.js → chunk-TQ6HYDVC.js} +1 -1
  86. package/dist/chunk-TYZXGSHO.js +3 -0
  87. package/dist/{chunk-IIIVWD4R.js → chunk-UHJYPEY2.js} +1 -1
  88. package/dist/{chunk-KBQ4LGFB.js → chunk-UJVH7FZS.js} +1 -1
  89. package/dist/{chunk-6B53BWJW.js → chunk-UJXUSRQK.js} +1 -1
  90. package/dist/{chunk-OXPWCC7I.js → chunk-ULFWK45W.js} +1 -1
  91. package/dist/chunk-ULQG3XQS.js +1 -0
  92. package/dist/{chunk-RM5SJJN6.js → chunk-URZPVSJZ.js} +1 -1
  93. package/dist/{chunk-UGXYQ23Y.js → chunk-UXVZ2P63.js} +1 -1
  94. package/dist/{chunk-72F3YBNA.js → chunk-UYXEA3Y6.js} +1 -1
  95. package/dist/{chunk-OUOYKNMY.js → chunk-VICYNG2W.js} +1 -1
  96. package/dist/{chunk-IASVAERO.js → chunk-WSDN25F5.js} +1 -1
  97. package/dist/{chunk-DFMQWJQ3.js → chunk-XITQULK4.js} +1 -1
  98. package/dist/{chunk-B2EHO7ZC.js → chunk-XONFGLJQ.js} +4 -4
  99. package/dist/{chunk-YZDDTYTU.js → chunk-XOTA6JTZ.js} +3 -3
  100. package/dist/{chunk-323UTVMM.js → chunk-XR6GMMEU.js} +1 -1
  101. package/dist/{chunk-XNO6DZYP.js → chunk-XULPJ6UG.js} +1 -1
  102. package/dist/{chunk-3LVGAQB4.js → chunk-XXVEHDVO.js} +1 -1
  103. package/dist/chunk-Y7JGYGV7.js +1 -0
  104. package/dist/chunk-YTNDFQJT.js +3 -0
  105. package/dist/{chunk-N5YIPQ6J.js → chunk-ZBRRJDGW.js} +1 -1
  106. package/dist/{chunk-ELVFJ7BR.js → chunk-ZGK3LGCH.js} +1 -1
  107. package/dist/{chunk-GOJ2QHSR.js → chunk-ZSBA6VIC.js} +1 -1
  108. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  109. package/dist/cli/commands/app/build.js +1 -1
  110. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  111. package/dist/cli/commands/app/bulk/execute.js +1 -1
  112. package/dist/cli/commands/app/bulk/status.js +1 -1
  113. package/dist/cli/commands/app/config/link.js +1 -1
  114. package/dist/cli/commands/app/config/pull.js +1 -1
  115. package/dist/cli/commands/app/config/use.js +1 -1
  116. package/dist/cli/commands/app/config/validate.js +1 -1
  117. package/dist/cli/commands/app/demo/watcher.js +1 -1
  118. package/dist/cli/commands/app/deploy.js +1 -1
  119. package/dist/cli/commands/app/dev/clean.js +1 -1
  120. package/dist/cli/commands/app/dev.js +1 -1
  121. package/dist/cli/commands/app/env/pull.js +1 -1
  122. package/dist/cli/commands/app/env/show.js +1 -1
  123. package/dist/cli/commands/app/execute.js +1 -1
  124. package/dist/cli/commands/app/function/build.js +1 -1
  125. package/dist/cli/commands/app/function/info.js +1 -1
  126. package/dist/cli/commands/app/function/replay.js +1 -1
  127. package/dist/cli/commands/app/function/run.js +1 -1
  128. package/dist/cli/commands/app/function/schema.js +1 -1
  129. package/dist/cli/commands/app/function/typegen.js +1 -1
  130. package/dist/cli/commands/app/generate/extension.js +1 -1
  131. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  132. package/dist/cli/commands/app/import-extensions.js +1 -1
  133. package/dist/cli/commands/app/info.js +1 -1
  134. package/dist/cli/commands/app/init.js +9 -9
  135. package/dist/cli/commands/app/logs.js +1 -1
  136. package/dist/cli/commands/app/release.js +1 -1
  137. package/dist/cli/commands/app/versions/list.js +1 -1
  138. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  139. package/dist/cli/commands/auth/login.js +1 -1
  140. package/dist/cli/commands/auth/logout.js +1 -1
  141. package/dist/cli/commands/cache/clear.js +1 -1
  142. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  143. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  144. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  145. package/dist/cli/commands/debug/command-flags.js +1 -1
  146. package/dist/cli/commands/docs/generate.d.ts +0 -8
  147. package/dist/cli/commands/docs/generate.js +1 -1
  148. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  149. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  150. package/dist/cli/commands/help.js +1 -1
  151. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  152. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  153. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  154. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  155. package/dist/cli/commands/notifications/generate.js +1 -1
  156. package/dist/cli/commands/notifications/list.js +1 -1
  157. package/dist/cli/commands/organization/list.js +1 -1
  158. package/dist/cli/commands/search.js +1 -1
  159. package/dist/cli/commands/theme/check.js +1 -1
  160. package/dist/cli/commands/theme/console.js +1 -1
  161. package/dist/cli/commands/theme/delete.js +1 -1
  162. package/dist/cli/commands/theme/dev.js +1 -1
  163. package/dist/cli/commands/theme/duplicate.js +1 -1
  164. package/dist/cli/commands/theme/info.js +1 -1
  165. package/dist/cli/commands/theme/init.js +1 -1
  166. package/dist/cli/commands/theme/language-server.js +1 -1
  167. package/dist/cli/commands/theme/list.js +1 -1
  168. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  169. package/dist/cli/commands/theme/open.js +1 -1
  170. package/dist/cli/commands/theme/package.js +1 -1
  171. package/dist/cli/commands/theme/preview.js +1 -1
  172. package/dist/cli/commands/theme/profile.js +1 -1
  173. package/dist/cli/commands/theme/publish.js +1 -1
  174. package/dist/cli/commands/theme/pull.js +1 -1
  175. package/dist/cli/commands/theme/push.js +1 -1
  176. package/dist/cli/commands/theme/rename.js +1 -1
  177. package/dist/cli/commands/theme/share.js +1 -1
  178. package/dist/cli/commands/upgrade.js +1 -1
  179. package/dist/cli/commands/version.js +1 -1
  180. package/dist/command-registry.js +1 -1
  181. package/dist/{conf-store-U5ZITKJN.js → conf-store-BMZFATRQ.js} +1 -1
  182. package/dist/{deprecations-TU5UQJVV.js → deprecations-7LHRXPXU.js} +1 -1
  183. package/dist/dist-LDXPBYSZ.js +1 -0
  184. package/dist/dist-V63ILV6L.js +1 -0
  185. package/dist/{environments-Z5PR7DSI.js → environments-5X7S2O5U.js} +1 -1
  186. package/dist/{error-IJGNYKZ3.js → error-ZRLNNGIQ.js} +1 -1
  187. package/dist/error-handler-PRZFHPRG.js +1 -0
  188. package/dist/{fs-5BDEA2KD.js → fs-H7V6IRSH.js} +1 -1
  189. package/dist/hooks/app-init.js +1 -1
  190. package/dist/hooks/did-you-mean.js +1 -1
  191. package/dist/hooks/hydrogen-init.js +1 -1
  192. package/dist/hooks/postrun.js +1 -1
  193. package/dist/hooks/prerun.js +1 -1
  194. package/dist/hooks/public-metadata.js +1 -1
  195. package/dist/hooks/sensitive-metadata.js +1 -1
  196. package/dist/hooks/tunnel-provider.js +1 -1
  197. package/dist/hooks/tunnel-start.js +1 -1
  198. package/dist/index.js +165 -165
  199. package/dist/is-global-IOWPCT2U.js +1 -0
  200. package/dist/local-MTKXSZ3I.js +1 -0
  201. package/dist/{local-storage-JLXBZVWO.js → local-storage-CYEL4MXF.js} +1 -1
  202. package/dist/{metadata-UDMOTRS7.js → metadata-NOVBMKLM.js} +1 -1
  203. package/dist/{node-package-manager-HAFRYGUM.js → node-package-manager-N5CVNHA3.js} +1 -1
  204. package/dist/notifications-system-YX2GPLDW.js +1 -0
  205. package/dist/{output-YGMHXEIS.js → output-Q46DT46U.js} +1 -1
  206. package/dist/{system-KLXD4FXF.js → system-E6Q3OBX3.js} +1 -1
  207. package/dist/tsconfig.tsbuildinfo +1 -1
  208. package/dist/{ui-GHG3UGB3.js → ui-WRS2IDPP.js} +1 -1
  209. package/dist/upgrade-TKUN2M5P.js +1 -0
  210. package/dist/{version-D5PJZIRW.js → version-5W5RVAPA.js} +1 -1
  211. package/dist/version-BQJ3FPXD.js +1 -0
  212. package/dist/{workerd-L2EJKIAQ.js → workerd-GOK6GWEX.js} +1 -1
  213. package/oclif.manifest.json +1 -1
  214. package/package.json +7 -7
  215. package/dist/analytics-6IHHYAV6.js +0 -1
  216. package/dist/analytics-KKVP5DT3.js +0 -1
  217. package/dist/chunk-2I4PRX2I.js +0 -1
  218. package/dist/chunk-7BGM2GAH.js +0 -1
  219. package/dist/chunk-BDVAE5MS.js +0 -28
  220. package/dist/chunk-D3TSJA5S.js +0 -1
  221. package/dist/chunk-N7RBSKYT.js +0 -1
  222. package/dist/chunk-ODNGDO4H.js +0 -50
  223. package/dist/chunk-P7R7FBY2.js +0 -3
  224. package/dist/chunk-SGQ6D3LU.js +0 -15
  225. package/dist/chunk-YC6G4MHD.js +0 -3
  226. package/dist/chunk-ZVJVDCIM.js +0 -1
  227. package/dist/dist-2Z5TND4U.js +0 -1
  228. package/dist/dist-GYHFDHKP.js +0 -1
  229. package/dist/error-handler-WSCGNS2P.js +0 -1
  230. package/dist/is-global-V4ZRHQG2.js +0 -1
  231. package/dist/local-6QPX4GCJ.js +0 -1
  232. package/dist/notifications-system-MP7WDOCS.js +0 -1
  233. package/dist/upgrade-OPZGPM5J.js +0 -1
  234. package/dist/version-KRQBMYCH.js +0 -1
@@ -1,2 +1,2 @@
1
- import{b as x,c as D,f as M}from"./chunk-XLELNRFF.js";import{a as o}from"./chunk-7BGM2GAH.js";import{c as w}from"./chunk-JUVAGMIH.js";import{C as h,F as e,v as y,z as s}from"./chunk-BDVAE5MS.js";import{Nb as _,ua as u}from"./chunk-GFEAKSGV.js";import{g as p}from"./chunk-VPRTJUIN.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
1
+ import{b as x,c as D,f as M}from"./chunk-FQWB2F75.js";import{a as o}from"./chunk-F2QU6WWX.js";import{c as w}from"./chunk-JUVAGMIH.js";import{C as h,F as e,v as y,z as s}from"./chunk-6G6TMKXF.js";import{Nb as _,ua as u}from"./chunk-N5PQPIBF.js";import{g as p}from"./chunk-VPRTJUIN.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
2
2
  `)}export{$ as a,j as b};
@@ -1,3 +1,3 @@
1
- import{c as S,d as D}from"./chunk-LXFJDCNG.js";import{b}from"./chunk-TQYMC7TH.js";import{R as g}from"./chunk-B2EHO7ZC.js";import{C as E,u as m,v as w,x as k}from"./chunk-BDVAE5MS.js";import{g as v}from"./chunk-JPGO36XP.js";import{Gb as i,Ib as n,Sb as B,ca as N,ha as O,tb as y}from"./chunk-GFEAKSGV.js";import{g as l}from"./chunk-VPRTJUIN.js";l();l();function A(e){switch(e.status){case"RUNNING":return n`Bulk operation in progress${e.objectCount>0?i.gray(` (${String(e.objectCount)} objects ${e.type==="MUTATION"?"written":"read"})`):""}`;case"CREATED":return n`Starting`;case"COMPLETED":return n`Bulk operation succeeded: ${i.gray(`${String(e.objectCount)} objects`)}`;case"FAILED":return n`Bulk operation failed. ${i.errorText(`Error: ${e.errorCode??"unknown"}`)}`;case"CANCELING":return n`Bulk operation canceling...`;case"CANCELED":return n`Bulk operation canceled.`;case"EXPIRED":return n`Bulk operation expired.`;default:return n`Bulk operation status: ${e.status}`}}function q(e,a){let t=e.map(o=>n`${o.field?.join(".")??"unknown"}: ${o.message}`.value).join(`
1
+ import{c as S,d as D}from"./chunk-M3RYUB22.js";import{b}from"./chunk-EKXY5COY.js";import{R as g}from"./chunk-XONFGLJQ.js";import{C as E,u as m,v as w,x as k}from"./chunk-6G6TMKXF.js";import{g as v}from"./chunk-M56NDIMD.js";import{Gb as i,Ib as n,Sb as B,ca as N,ha as O,tb as y}from"./chunk-N5PQPIBF.js";import{g as l}from"./chunk-VPRTJUIN.js";l();l();function A(e){switch(e.status){case"RUNNING":return n`Bulk operation in progress${e.objectCount>0?i.gray(` (${String(e.objectCount)} objects ${e.type==="MUTATION"?"written":"read"})`):""}`;case"CREATED":return n`Starting`;case"COMPLETED":return n`Bulk operation succeeded: ${i.gray(`${String(e.objectCount)} objects`)}`;case"FAILED":return n`Bulk operation failed. ${i.errorText(`Error: ${e.errorCode??"unknown"}`)}`;case"CANCELING":return n`Bulk operation canceling...`;case"CANCELED":return n`Bulk operation canceled.`;case"EXPIRED":return n`Bulk operation expired.`;default:return n`Bulk operation status: ${e.status}`}}function q(e,a){let t=e.map(o=>n`${o.field?.join(".")??"unknown"}: ${o.message}`.value).join(`
2
2
  `);k({headline:a,body:t})}function K(e){let a=A(e).value;switch(e.status){case"CANCELING":return{headline:"Bulk operation is being cancelled.",body:[`This may take a few moments. Check the status with:
3
3
  `,{command:`shopify app bulk status --id=${T(e.id)}`}],renderType:"success"};case"CANCELED":case"COMPLETED":case"FAILED":{let t=[n`ID: ${i.cyan(e.id)}`.value,n`Status: ${i.yellow(e.status)}`.value,n`Created at: ${i.gray(String(e.createdAt))}`.value,...e.completedAt?[n`Completed at: ${i.gray(String(e.completedAt))}`.value]:[]];return{headline:n`Bulk operation is already ${e.status.toLowerCase()}.`.value,body:n`This operation has already finished and can't be canceled.`.value,customSections:[{body:[{list:{items:t}}]}],renderType:"warning"}}case"CREATED":case"EXPIRED":case"RUNNING":return{headline:a,renderType:"info"}}}l();var I="2026-01";l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetBulkOperationById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListBulkOperations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkOperationsSortKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"sortKey"},value:{kind:"Variable",name:{kind:"Name",value:"sortKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};function ke(e){return e.startsWith("gid://")?e:/^\d+$/.test(e)?`gid://shopify/BulkOperation/${e}`:e}function T(e){return e.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1]??e}async function ce(e){let{organization:a,storeFqdn:t,operationId:o,remoteApp:s}=e;m({headline:"Checking bulk operation status.",body:[{list:{items:D({organization:a,remoteApp:s,storeFqdn:t})}}]});let u=s.apiSecretKeys[0]?.secret;if(!u)throw new v("No API secret keys found for app");let d=await g(t,s.apiKey,u),p=await b({query:C,session:d,variables:{id:o},version:await S({adminSession:d,minimumDefaultVersion:I})});p.bulkOperation?F(p.bulkOperation):k({headline:"Bulk operation not found.",body:n`ID: ${i.yellow(o)}`.value})}async function ye(e){let{organization:a,storeFqdn:t,remoteApp:o}=e;m({headline:"Listing bulk operations.",body:[{list:{items:D({organization:a,remoteApp:o,storeFqdn:t})}}]});let s=o.apiSecretKeys[0]?.secret;if(!s)throw new v("No API secret keys found for app");let u=await g(t,o.apiKey,s),d=new Date(Date.now()-10080*60*1e3).toISOString().split("T")[0],c=(await b({query:h,session:u,variables:{query:`created_at:>=${d}`,first:100,sortKey:"CREATED_AT"},version:await S({adminSession:u,minimumDefaultVersion:I})})).bulkOperations.nodes.map(r=>({id:T(r.id),status:$(r.status),count:V(r.objectCount),dateCreated:N(new Date(String(r.createdAt))),dateFinished:r.completedAt?N(new Date(String(r.completedAt))):"",results:x(r.url??r.partialDataUrl)}));B(),c.length===0?m({body:"No bulk operations found in the last 7 days."}):E({rows:c,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),B()}function F(e){let{id:a,status:t,createdAt:o,completedAt:s,url:u,partialDataUrl:d}=e,p=A(e).value,c=L(o,s),r=n`ID: ${i.yellow(a)}\n${c}`.value;if(t==="COMPLETED"){let f=u?i.link("Download results",u):"";w({headline:p,body:n`${r}\n${f}`.value})}else if(t==="FAILED"){let f=d?i.link("Download partial results",d):"";k({headline:p,body:n`${r}\n${f}`.value})}else m({headline:p,body:r})}function L(e,a){let t=new Date;return a?`Finished ${O(new Date(String(a)),t)}`:`Started ${O(new Date(String(e)),t)}`}function $(e){return e==="COMPLETED"?y.green(e):e==="FAILED"?y.red(e):y.dim(e)}function V(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function x(e){return e?n`${i.link("download",e)}`.value:""}export{I as a,C as b,ke as c,T as d,ce as e,ye as f,A as g,q as h,K as i};
@@ -1,2 +1,2 @@
1
- import{Qb as m}from"./chunk-GFEAKSGV.js";import{g as p}from"./chunk-VPRTJUIN.js";p();import{spawn as h}from"child_process";function g(e=process.pid,i="SIGTERM",r=!0,s){k(e,i,r,s??(n=>{n&&m(`Failed to kill process ${e}: ${n}`)}))}function k(e,i,r,s){let t=typeof e=="number"?e.toString():e;if(!/^\d+$/.test(t))if(s){s(new Error("pid must be a number"));return}else throw new Error("pid must be a number");let n={};n[t]=[];let o=new Set;switch(o.add(t),process.platform){case"win32":{h("taskkill",["/pid",t,"/T","/F"]).on("close",u=>{s&&(u===0?s():s(new Error(`taskkill exited with code ${u}`)))});break}case"darwin":l(t,n,o,function(f){return h("pgrep",["-lfP",f])},function(){w(n,i,t,r,s)});break;default:l(t,n,o,function(f){return h("ps",["-o","pid command","--no-headers","--ppid",f])},function(){w(n,i,t,r,s)});break}}function w(e,i,r,s,t){let n=new Set;try{Object.keys(e).forEach(function(o){e[o].forEach(function(f){n.has(f)||(E(f,i),n.add(f))}),o===r&&s&&!n.has(o)&&(E(o,i),n.add(o))})}catch(o){if(t){t(o);return}else throw o}t&&t()}function E(e,i){try{process.kill(parseInt(e,10),i)}catch(r){if(r.code!=="ESRCH")throw r}}function l(e,i,r,s,t){let n=s(e),o="";n.stdout?.on("data",function(u){let a=u.toString("ascii");o+=a});let f=u=>{if(r.delete(e),u!==0){if(r.size===0){t();return}return}o.trim().split(`
1
+ import{Qb as m}from"./chunk-N5PQPIBF.js";import{g as p}from"./chunk-VPRTJUIN.js";p();import{spawn as h}from"child_process";function g(e=process.pid,i="SIGTERM",r=!0,s){k(e,i,r,s??(n=>{n&&m(`Failed to kill process ${e}: ${n}`)}))}function k(e,i,r,s){let t=typeof e=="number"?e.toString():e;if(!/^\d+$/.test(t))if(s){s(new Error("pid must be a number"));return}else throw new Error("pid must be a number");let n={};n[t]=[];let o=new Set;switch(o.add(t),process.platform){case"win32":{h("taskkill",["/pid",t,"/T","/F"]).on("close",u=>{s&&(u===0?s():s(new Error(`taskkill exited with code ${u}`)))});break}case"darwin":l(t,n,o,function(f){return h("pgrep",["-lfP",f])},function(){w(n,i,t,r,s)});break;default:l(t,n,o,function(f){return h("ps",["-o","pid command","--no-headers","--ppid",f])},function(){w(n,i,t,r,s)});break}}function w(e,i,r,s,t){let n=new Set;try{Object.keys(e).forEach(function(o){e[o].forEach(function(f){n.has(f)||(E(f,i),n.add(f))}),o===r&&s&&!n.has(o)&&(E(o,i),n.add(o))})}catch(o){if(t){t(o);return}else throw o}t&&t()}function E(e,i){try{process.kill(parseInt(e,10),i)}catch(r){if(r.code!=="ESRCH")throw r}}function l(e,i,r,s,t){let n=s(e),o="";n.stdout?.on("data",function(u){let a=u.toString("ascii");o+=a});let f=u=>{if(r.delete(e),u!==0){if(r.size===0){t();return}return}o.trim().split(`
2
2
  `).forEach(function(a){let d=a.match(/^(\d+)\s(.*)$/);if(d){let c=d[1],$=d[2];i[e].push(c),i[c]=[],m(`Killing process ${c}: ${$}`),r.add(c),l(c,i,r,s,t)}})};n.on("close",f)}export{g as a};
@@ -1 +1 @@
1
- import{a as c,b as d}from"./chunk-OXPWCC7I.js";import{m as p,n as f}from"./chunk-B2EHO7ZC.js";import{d as n}from"./chunk-JPGO36XP.js";import{Ga as l,na as m}from"./chunk-GFEAKSGV.js";import{d as a}from"./chunk-IU2ZQ6TE.js";import{g as s}from"./chunk-VPRTJUIN.js";s();import{writeFile as E}from"fs/promises";var u=1024*1024,h=100,w=h*u;async function _(r,t){let e=a(t,"manifest.json");await E(e,JSON.stringify(r,null,2))}var S=["!**/*.js.map","!**/*.metafile.json"];async function b(r,t,e){let o=e??["**/*",...S];t.endsWith(".br")?await d({inputDirectory:r,outputPath:t,matchFilePattern:o}):await c({inputDirectory:r,outputZipPath:t,matchFilePattern:o})}async function C(r,t){let e=await l(t);if(e>w){let g=`${(Math.ceil(e/u*100)/100).toFixed(2)} MB`;throw new n(`Your app bundle exceeds the ${h} MB upload limit (it is ${g}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let o=p(),i=m(t);o.append("my_upload",i),await f(r,{method:"put",body:i,headers:o.getHeaders()},"slow-request")}async function N(r,t){let e=await r.generateSignedUploadUrl(t);if(!e.assetUrl||e.userErrors?.length>0){let o=e.userErrors.map(i=>i.message).join(", ");throw new n(o)}return e.assetUrl}export{_ as a,S as b,b as c,C as d,N as e};
1
+ import{a as c,b as d}from"./chunk-ULFWK45W.js";import{m as p,n as f}from"./chunk-XONFGLJQ.js";import{d as n}from"./chunk-M56NDIMD.js";import{Ga as l,na as m}from"./chunk-N5PQPIBF.js";import{d as a}from"./chunk-IU2ZQ6TE.js";import{g as s}from"./chunk-VPRTJUIN.js";s();import{writeFile as E}from"fs/promises";var u=1024*1024,h=100,w=h*u;async function _(r,t){let e=a(t,"manifest.json");await E(e,JSON.stringify(r,null,2))}var S=["!**/*.js.map","!**/*.metafile.json"];async function b(r,t,e){let o=e??["**/*",...S];t.endsWith(".br")?await d({inputDirectory:r,outputPath:t,matchFilePattern:o}):await c({inputDirectory:r,outputZipPath:t,matchFilePattern:o})}async function C(r,t){let e=await l(t);if(e>w){let g=`${(Math.ceil(e/u*100)/100).toFixed(2)} MB`;throw new n(`Your app bundle exceeds the ${h} MB upload limit (it is ${g}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let o=p(),i=m(t);o.append("my_upload",i),await f(r,{method:"put",body:i,headers:o.getHeaders()},"slow-request")}async function N(r,t){let e=await r.generateSignedUploadUrl(t);if(!e.assetUrl||e.userErrors?.length>0){let o=e.userErrors.map(i=>i.message).join(", ");throw new n(o)}return e.assetUrl}export{_ as a,S as b,b as c,C as d,N as e};
@@ -1,4 +1,4 @@
1
- import{a as dt,b as pt,f as we,g as ie,h as H,i as oe,k as mt}from"./chunk-KWJ562F2.js";import{n as ne,o as re}from"./chunk-DFMQWJQ3.js";import{a as O,b as lt}from"./chunk-3VZEETAV.js";import{a as ee,b as te,e as tt,g as st,i as nt,j as rt,k as it,n as ot,p as at,q as ct,r as se,s as I}from"./chunk-IX5ICOBV.js";import{a as J,l as Ke,m as et}from"./chunk-RFG5RMPL.js";import{aa as Qe}from"./chunk-UGXYQ23Y.js";import{va as C,xa as q}from"./chunk-B2EHO7ZC.js";import{b as Ve}from"./chunk-JUVAGMIH.js";import{u as Xe,w as b,x as X,y as Ze}from"./chunk-BDVAE5MS.js";import{d as Z}from"./chunk-JPGO36XP.js";import{Gb as $,Ib as Q,Nb as K,O as Ge,Qb as R,Rb as j,Ta as F,Wa as L,_ as Re,bb as Pe,ma as k,ua as Fe,wa as ze,ya as Ye}from"./chunk-GFEAKSGV.js";import{d as E,g as Se,j as Je,k as A}from"./chunk-IU2ZQ6TE.js";import{e as Ue,g as u}from"./chunk-VPRTJUIN.js";u();u();u();var qt=".shopifyignore",ht=/templates\/\*(\.(json|liquid))?$/,ut=new Set;function be(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[i=[],o=[]]=ke(s),[a=[],m=[]]=ke(n),[p=[],h=[]]=ke(r),l=e.filter(N(i,".shopifyignore"));return l=l.filter(N(a,"--ignore")),l=l.filter(N(p,"--only",!0)),o.length>0&&(l=l.concat(e.filter(N(o,".shopifyignore",!0)))),m.length>0&&(l=l.concat(e.filter(N(m,"--ignore",!0)))),h.length>0&&(l=l.filter(N(h,"--only"))),Ge(l,f=>f.key)}function N(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(o=>jt(n,o)||Wt(o)&&Nt(n,Mt(o)));return(s?!r:r)?(R(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function ft(e){let t=E(e,qt);return await F(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function ke(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function jt(e,t){let s={matchBase:!0,noglobstar:!0};return Pe(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!ut.has(t)&&(ut.add(t),b({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),Ot(t)?Pe(e,t.replace(ht,"templates/**/*$1"),s):!1)}function Ot(e){return ht.test(e)}function Nt(e,t){return t.test(e)}function Wt(e){return e.startsWith("/")&&e.endsWith("/")}function Mt(e){return new RegExp(e.slice(1,-1))}u();import gt from"fs/promises";var ae=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&j("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{R(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){C(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),j(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await gt.writeFile(this.notifyPath,t),await gt.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};u();u();u();u();u();var Bt="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function yt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Et(e){return(0,String.raw)`<!DOCTYPE html>
1
+ import{a as dt,b as pt,f as we,g as ie,h as H,i as oe,k as mt}from"./chunk-K6CTUBFC.js";import{n as ne,o as re}from"./chunk-XITQULK4.js";import{a as O,b as lt}from"./chunk-3VZEETAV.js";import{a as ee,b as te,e as tt,g as st,i as nt,j as rt,k as it,n as ot,p as at,q as ct,r as se,s as I}from"./chunk-IX5ICOBV.js";import{a as J,l as Ke,m as et}from"./chunk-CBXSPL4W.js";import{aa as Qe}from"./chunk-UXVZ2P63.js";import{va as C,xa as q}from"./chunk-XONFGLJQ.js";import{b as Ve}from"./chunk-JUVAGMIH.js";import{u as Xe,w as b,x as X,y as Ze}from"./chunk-6G6TMKXF.js";import{d as Z}from"./chunk-M56NDIMD.js";import{Gb as $,Ib as Q,Nb as K,O as Ge,Qb as R,Rb as j,Ta as F,Wa as L,_ as Re,bb as Pe,ma as k,ua as Fe,wa as ze,ya as Ye}from"./chunk-N5PQPIBF.js";import{d as E,g as Se,j as Je,k as A}from"./chunk-IU2ZQ6TE.js";import{e as Ue,g as u}from"./chunk-VPRTJUIN.js";u();u();u();var qt=".shopifyignore",ht=/templates\/\*(\.(json|liquid))?$/,ut=new Set;function be(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[i=[],o=[]]=ke(s),[a=[],m=[]]=ke(n),[p=[],h=[]]=ke(r),l=e.filter(N(i,".shopifyignore"));return l=l.filter(N(a,"--ignore")),l=l.filter(N(p,"--only",!0)),o.length>0&&(l=l.concat(e.filter(N(o,".shopifyignore",!0)))),m.length>0&&(l=l.concat(e.filter(N(m,"--ignore",!0)))),h.length>0&&(l=l.filter(N(h,"--only"))),Ge(l,f=>f.key)}function N(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(o=>jt(n,o)||Wt(o)&&Nt(n,Mt(o)));return(s?!r:r)?(R(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function ft(e){let t=E(e,qt);return await F(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function ke(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function jt(e,t){let s={matchBase:!0,noglobstar:!0};return Pe(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!ut.has(t)&&(ut.add(t),b({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),Ot(t)?Pe(e,t.replace(ht,"templates/**/*$1"),s):!1)}function Ot(e){return ht.test(e)}function Nt(e,t){return t.test(e)}function Wt(e){return e.startsWith("/")&&e.endsWith("/")}function Mt(e){return new RegExp(e.slice(1,-1))}u();import gt from"fs/promises";var ae=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&j("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{R(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){C(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),j(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await gt.writeFile(this.notifyPath,t),await gt.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};u();u();u();u();u();var Bt="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function yt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Et(e){return(0,String.raw)`<!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
4
  <title>${e.title}</title>
@@ -1,4 +1,4 @@
1
- import{b as mi}from"./chunk-OLZHWPZP.js";import{$ as Xn,A as Un,Aa as ci,B as b,Ba as di,C as U,Ca as ui,D as Bn,E as ye,F as er,G as qe,H as rt,I as Se,Ia as Io,J as Vn,Ja as fi,K as Ne,Ka as pr,L as xe,La as ze,M as Gn,Ma as at,N as tr,Na as It,O as pe,Oa as hr,P as Co,Pa as lt,Q as qn,Qa as gr,R as ot,Ra as pi,S as nt,Sa as hi,T as Wn,Ta as gi,U as rr,Ua as yr,V as Yn,Va as yi,W as zn,Wa as wi,X as Jn,Xa as vi,Y as Qn,Z as Kn,_ as We,a as me,aa as W,b as xt,ba as it,c as Rn,ca as Zn,d as De,da as ei,e as Ee,ea as or,f as Ge,fa as nr,g as An,ga as ti,h as Fn,ha as he,i as jn,ia as ri,j as ko,ja as oi,k as tt,ka as To,l as Pt,la as ni,m as je,ma as ii,n as Nn,na as si,o as Kt,oa as ir,p as Eo,pa as sr,q as Ct,qa as ar,r as So,ra as ai,s as Ln,sa as lr,t as Mn,ta as cr,u as xo,ua as li,v as Hn,va as dr,w as Po,wa as ur,x as Xt,xa as Ye,y as Zt,ya as st,z as Tt,za as fr}from"./chunk-HSK7YMRE.js";import{a as Pn}from"./chunk-3VZEETAV.js";import{a as bi}from"./chunk-DJONKJSZ.js";import{b as Cn,c as Tn,d as Qt,g as In,i as Dn,j as On,k as _n}from"./chunk-P7R7FBY2.js";import{a as rl,b as $n,d as ol}from"./chunk-LX3ZOW52.js";import{a as wr}from"./chunk-WDC3KIZT.js";import{a as mr,b as Do,c as Oo}from"./chunk-ELYP4KFP.js";import{c as xn}from"./chunk-QSTEVZFQ.js";import{Aa as Za,Ba as bn,Ca as el,Da as tl,fa as fe,m as mn,n as ie}from"./chunk-B2EHO7ZC.js";import{B as vn,l as hn,m as be,p as et,s as gn,u as yn,x as wn}from"./chunk-LAZJ47DZ.js";import{b as D}from"./chunk-YZDDTYTU.js";import{b as fn}from"./chunk-JUVAGMIH.js";import{A as Ie,D as ee,O as kn,a as Yt,u as V,v as N,w as q,y as $e,z as Re}from"./chunk-BDVAE5MS.js";import{d as E,g as zt}from"./chunk-JPGO36XP.js";import{a as nl}from"./chunk-HZA6IAA4.js";import{b as Xa}from"./chunk-QYR5VPQA.js";import{$ as ln,Ca as wo,Cb as pn,Ea as qt,Ga as dn,Gb as ke,Ha as un,Ib as Y,Ka as vo,Kb as Ae,Nb as $,Oa as bo,Ob as En,Pb as Fe,Qb as Sn,Rb as B,Sb as se,Ta as G,V as Vt,Wa as St,ma as de,na as cn,pa as Gt,qa as yo,qb as Wt,tb as L,ua as J,wa as Et,ya as ve}from"./chunk-GFEAKSGV.js";import{t as Jt}from"./chunk-YC6G4MHD.js";import{d as x,f as C,g as ne,i as go,j as Ze,k as sn,q as an}from"./chunk-IU2ZQ6TE.js";import{a as we,c as ce,e as Q,g as l}from"./chunk-VPRTJUIN.js";var Ls=ce((Mw,Ns)=>{l();Ns.exports=Fc;function Fc(e){var t=e._readableState;return t?t.objectMode||typeof e._duplexState=="number"?e.read():e.read(jc(t)):null}function jc(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}});var Vo=ce((Uw,Bs)=>{l();var Wr=$n(),Ms=bn(),Nc=xn(),Lc=Ls(),Hs=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),Bo=function(e,t){e._corked?e.once("uncork",t):t()},Mc=function(e,t){e._autoDestroy&&e.destroy(t)},Us=function(e,t){return function(r){r?Mc(e,r.message==="premature close"?null:r):t&&!e._ended&&e.end()}},Hc=function(e,t){if(!e||e._writableState&&e._writableState.finished)return t();if(e._writableState)return e.end(t);e.end(),t()},Uc=function(e){return new Wr.Readable({objectMode:!0,highWaterMark:16}).wrap(e)},K=function(e,t,r){if(!(this instanceof K))return new K(e,t,r);Wr.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};Nc(K,Wr.Duplex);K.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new K(e,t,r)};K.prototype.cork=function(){++this._corked===1&&this.emit("cork")};K.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};K.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.end();return}var t=this,r=Ms(e,{writable:!0,readable:!1},Us(this,this._forwardEnd)),o=function(){var i=t._ondrain;t._ondrain=null,i&&i()},n=function(){t._writable.removeListener("drain",o),r()};this._unwrite&&process.nextTick(o),this._writable=e,this._writable.on("drain",o),this._unwrite=n,this.uncork()};K.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.push(null),this.resume();return}var t=this,r=Ms(e,{writable:!1,readable:!0},Us(this)),o=function(){t._forward()},n=function(){t.push(null)},i=function(){t._readable2.removeListener("readable",o),t._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:Uc(e),this._readable2.on("readable",o),this._readable2.on("end",n),this._unread=i,this._forward()};K.prototype._read=function(){this._drained=!0,this._forward()};K.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var e;this._drained&&(e=Lc(this._readable2))!==null;)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}};K.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;process.nextTick(function(){t._destroy(e)})}};K.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};K.prototype._write=function(e,t,r){if(this.destroyed)return r();if(this._corked)return Bo(this,this._write.bind(this,e,t,r));if(e===Hs)return this._finish(r);if(!this._writable)return r();this._writable.write(e)===!1?this._ondrain=r:r()};K.prototype._finish=function(e){var t=this;this.emit("preend"),Bo(this,function(){Hc(t._forwardEnd&&t._writable,function(){t._writableState.prefinished===!1&&(t._writableState.prefinished=!0),t.emit("prefinish"),Bo(t,e)})})};K.prototype.end=function(e,t,r){return typeof e=="function"?this.end(null,null,e):typeof t=="function"?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(Hs),Wr.Writable.prototype.end.call(this,r))};Bs.exports=K});var Gs=ce((Vw,Vs)=>{l();Vs.exports=Vc;var Bc=Object.prototype.hasOwnProperty;function Vc(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)Bc.call(r,o)&&(e[o]=r[o])}return e}});var qo=ce((qw,Yr)=>{l();var qs=$n().Transform,Ws=we("util").inherits,Ys=Gs();function ht(e){qs.call(this,e),this._destroyed=!1}Ws(ht,qs);ht.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}};function Gc(e,t,r){r(null,e)}function Go(e){return function(t,r,o){return typeof t=="function"&&(o=r,r=t,t={}),typeof r!="function"&&(r=Gc),typeof o!="function"&&(o=null),e(t,r,o)}}Yr.exports=Go(function(e,t,r){var o=new ht(e);return o._transform=t,r&&(o._flush=r),o});Yr.exports.ctor=Go(function(e,t,r){function o(n){if(!(this instanceof o))return new o(n);this.options=Ys(e,n),ht.call(this,this.options)}return Ws(o,ht),o.prototype._transform=t,r&&(o.prototype._flush=r),o});Yr.exports.obj=Go(function(e,t,r){var o=new ht(Ys({objectMode:!0,highWaterMark:16},e));return o._transform=t,r&&(o._flush=r),o})});var Qs=ce((Yw,Js)=>{l();var qc=Vo(),Wc=qo(),Yc=Xa(),zc=function(e){return!Buffer.isBuffer(e)&&typeof e!="string"},zs=function(e,t){if(typeof e=="number"&&(e={maxBuffer:e}),typeof e=="function")return zs(null,e);e||(e={});var r=typeof e.maxBuffer=="number"?e.maxBuffer:65535,o=e.strict,n=e.newline!==!1,i=[],s=0,a=qc.obj(),c=Wc.obj({highWaterMark:1},function(m,f,p){if(zc(m))return d(m,null,p);if(Buffer.isBuffer(m)||(m=Yc(m)),n){var g=Array.prototype.indexOf.call(m,10);if(g>0&&m[g-1]===13&&g--,g>-1)return i.push(m.slice(0,g)),d(Buffer.concat(i),m.slice(g),p)}if(i.push(m),s+=m.length,s<r)return p();if(o)return p(new Error("No newline found"));d(Buffer.concat(i),null,p)}),u=function(){if(o)return a.destroy(new Error("No newline found"));a.cork(),d(Buffer.concat(i),null,function(m){if(m)return a.destroy(m);a.uncork()})},d=function(m,f,p){a.removeListener("preend",u),t(m,function(g,w){if(g)return p(g);a.setWritable(w),a.setReadable(w),m&&w.write(m),f&&w.write(f),f=i=c=null,p()})};return a.on("preend",u),a.setWritable(c),a};Js.exports=zs});var Zs=ce((Jw,Xs)=>{l();var Jc=Za(),Qc=bn(),Wo=we("fs"),Mt=function(){},Kc=/^v?\.0/.test(process.version),zr=function(e){return typeof e=="function"},Xc=function(e){return!Kc||!Wo?!1:(e instanceof(Wo.ReadStream||Mt)||e instanceof(Wo.WriteStream||Mt))&&zr(e.close)},Zc=function(e){return e.setHeader&&zr(e.abort)},ed=function(e,t,r,o){o=Jc(o);var n=!1;e.on("close",function(){n=!0}),Qc(e,{readable:t,writable:r},function(s){if(s)return o(s);n=!0,o()});var i=!1;return function(s){if(!n&&!i){if(i=!0,Xc(e))return e.close(Mt);if(Zc(e))return e.abort();if(zr(e.destroy))return e.destroy();o(s||new Error("stream was destroyed"))}}},Ks=function(e){e()},td=function(e,t){return e.pipe(t)},rd=function(){var e=Array.prototype.slice.call(arguments),t=zr(e[e.length-1]||Mt)&&e.pop()||Mt;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(n,i){var s=i<e.length-1,a=i>0;return ed(n,s,a,function(c){r||(r=c),c&&o.forEach(Ks),!s&&(o.forEach(Ks),t(r))})});e.reduce(td)};Xs.exports=rd});var ra=ce((Kw,Jr)=>{l();var od=Zs(),nd=xn(),ea=Vo(),ta=function(e){return e.length?Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e):[]},Yo=function(e){var t=function(){var r=ta(arguments);if(!(this instanceof t))return new t(r);ea.call(this,null,null,e),r.length&&this.setPipeline(r)};return nd(t,ea),t.prototype.setPipeline=function(){var r=ta(arguments),o=this,n=!1,i=r[0],s=r[r.length-1];s=s.readable?s:null,i=i.writable?i:null;var a=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){n||o.cork()}),od(r,function(c){if(o.removeListener("close",a),c)return o.destroy(c.message==="premature close"?null:c);n=!0,o._autoDestroy===!1&&(o._autoDestroy=!0),o.uncork()}),this.destroyed)return a();this.setWritable(i),this.setReadable(s)},t};Jr.exports=Yo({autoDestroy:!1,destroy:!1});Jr.exports.obj=Yo({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});Jr.exports.ctor=Yo});var na=ce((Zw,oa)=>{"use strict";l();oa.exports=function(e){return!e||e.length<3?!1:e[0]===31&&e[1]===139&&e[2]===8}});var sa=ce((tv,ia)=>{"use strict";l();ia.exports=function(e){return!e||e.length<2?!1:e[0]===120&&(e[1]===1||e[1]===156||e[1]===218)}});var da=ce((ov,ca)=>{l();var aa=we("zlib"),id=Qs(),sd=qo(),la=ra(),ad=na(),ld=sa(),cd=function(e){return ad(e)?1:ld(e)?2:0},zo=function(e){return e===void 0&&(e=3),id({newline:!1,maxBuffer:10},function(t,r){if(e<0)return r(new Error("Maximum recursion reached"));switch(cd(t)){case 1:r(null,la(aa.createGunzip(),zo(e-1)));break;case 2:r(null,la(aa.createInflate(),zo(e-1)));break;default:r(null,sd())}})};ca.exports=zo});var ya=ce((iv,ga)=>{"use strict";l();var ge=we("fs"),Ke=we("path"),dd=ge.lchown?"lchown":"chown",ud=ge.lchownSync?"lchownSync":"chownSync",fa=ge.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),ua=(e,t,r)=>{try{return ge[ud](e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},fd=(e,t,r)=>{try{return ge.chownSync(e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},md=fa?(e,t,r,o)=>n=>{!n||n.code!=="EISDIR"?o(n):ge.chown(e,t,r,o)}:(e,t,r,o)=>o,Jo=fa?(e,t,r)=>{try{return ua(e,t,r)}catch(o){if(o.code!=="EISDIR")throw o;fd(e,t,r)}}:(e,t,r)=>ua(e,t,r),pd=process.version,ma=(e,t,r)=>ge.readdir(e,t,r),hd=(e,t)=>ge.readdirSync(e,t);/^v4\./.test(pd)&&(ma=(e,t,r)=>ge.readdir(e,r));var Qr=(e,t,r,o)=>{ge[dd](e,t,r,md(e,t,r,n=>{o(n&&n.code!=="ENOENT"?n:null)}))},pa=(e,t,r,o,n)=>{if(typeof t=="string")return ge.lstat(Ke.resolve(e,t),(i,s)=>{if(i)return n(i.code!=="ENOENT"?i:null);s.name=t,pa(e,s,r,o,n)});if(t.isDirectory())Qo(Ke.resolve(e,t.name),r,o,i=>{if(i)return n(i);let s=Ke.resolve(e,t.name);Qr(s,r,o,n)});else{let i=Ke.resolve(e,t.name);Qr(i,r,o,n)}},Qo=(e,t,r,o)=>{ma(e,{withFileTypes:!0},(n,i)=>{if(n){if(n.code==="ENOENT")return o();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return o(n)}if(n||!i.length)return Qr(e,t,r,o);let s=i.length,a=null,c=u=>{if(!a){if(u)return o(a=u);if(--s===0)return Qr(e,t,r,o)}};i.forEach(u=>pa(e,u,t,r,c))})},gd=(e,t,r,o)=>{if(typeof t=="string")try{let n=ge.lstatSync(Ke.resolve(e,t));n.name=t,t=n}catch(n){if(n.code==="ENOENT")return;throw n}t.isDirectory()&&ha(Ke.resolve(e,t.name),r,o),Jo(Ke.resolve(e,t.name),r,o)},ha=(e,t,r)=>{let o;try{o=hd(e,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return Jo(e,t,r);throw n}return o&&o.length&&o.forEach(n=>gd(e,n,t,r)),Jo(e,t,r)};ga.exports=Qo;Qo.sync=ha});var ka=ce((av,ba)=>{l();var Kr=we("path"),wa=we("fs"),va=parseInt("0777",8);ba.exports=gt.mkdirp=gt.mkdirP=gt;function gt(e,t,r,o){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var n=t.mode,i=t.fs||wa;n===void 0&&(n=va&~process.umask()),o||(o=null);var s=r||function(){};e=Kr.resolve(e),i.mkdir(e,n,function(a){if(!a)return o=o||e,s(null,o);a.code==="ENOENT"?gt(Kr.dirname(e),t,function(c,u){c?s(c,u):gt(e,t,s,u)}):i.stat(e,function(c,u){c||!u.isDirectory()?s(a,o):s(null,o)})})}gt.sync=function e(t,r,o){(!r||typeof r!="object")&&(r={mode:r});var n=r.mode,i=r.fs||wa;n===void 0&&(n=va&~process.umask()),o||(o=null),t=Kr.resolve(t);try{i.mkdirSync(t,n),o=o||t}catch(a){switch(a.code){case"ENOENT":o=e(Kr.dirname(t),r,o),e(t,r,o);break;default:var s;try{s=i.statSync(t)}catch{throw a}if(!s.isDirectory())throw a;break}}return o}});var Oa=ce(Zo=>{l();var yd=ya(),xa=ol(),Pa=el(),wd=ka(),Ca=we("fs"),X=we("path"),vd=we("os"),Ht=vd.platform()==="win32",Ut=function(){},Xo=function(e){return e},Ko=Ht?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:Xo,bd=function(e,t,r,o,n,i){var s=n||["."];return function(c){if(!s.length)return c();var u=s.shift(),d=X.join(r,u);t.call(e,d,function(m,f){if(m)return c(m);if(!f.isDirectory())return c(null,u,f);e.readdir(d,function(p,g){if(p)return c(p);i&&g.sort();for(var w=0;w<g.length;w++)o(X.join(r,u,g[w]))||s.push(X.join(u,g[w]));c(null,u,f)})})}},Ta=function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var o=r.linkname;return o&&(r.type==="link"||X.isAbsolute(o))&&(r.linkname=o.split("/").slice(t).join("/")),e(r)}};Zo.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||Ca,o=t.ignore||t.filter||Ut,n=t.map||Ut,i=t.mapStream||Xo,s=bd(r,t.dereference?r.stat:r.lstat,e,o,t.entries,t.sort),a=t.strict!==!1,c=typeof t.umask=="number"?~t.umask:~Ia(),u=typeof t.dmode=="number"?t.dmode:0,d=typeof t.fmode=="number"?t.fmode:0,m=t.pack||xa.pack(),f=t.finish||Ut;t.strip&&(n=Ta(n,t.strip)),t.readable&&(u|=parseInt(555,8),d|=parseInt(444,8)),t.writable&&(u|=parseInt(333,8),d|=parseInt(222,8));var p=function(k,y){r.readlink(X.join(e,k),function(v,h){if(v)return m.destroy(v);y.linkname=Ko(h),m.entry(y,w)})},g=function(k,y,v){if(k)return m.destroy(k);if(!y)return t.finalize!==!1&&m.finalize(),f(m);if(v.isSocket())return w();var h={name:Ko(y),mode:(v.mode|(v.isDirectory()?u:d))&c,mtime:v.mtime,size:v.size,type:"file",uid:v.uid,gid:v.gid};if(v.isDirectory())return h.size=0,h.type="directory",h=n(h)||h,m.entry(h,w);if(v.isSymbolicLink())return h.size=0,h.type="symlink",h=n(h)||h,p(y,h);if(h=n(h)||h,!v.isFile())return a?m.destroy(new Error("unsupported type for "+y)):w();var S=m.entry(h,w);if(S){var P=i(r.createReadStream(X.join(e,y),{start:0,end:h.size>0?h.size-1:h.size}),h);P.on("error",function(_){S.destroy(_)}),Pa(P,S)}},w=function(k){if(k)return m.destroy(k);s(g)};return w(),m};var kd=function(e){return e.length?e[e.length-1]:null},Ed=function(){return process.getuid?process.getuid():-1},Ia=function(){return process.umask?process.umask():0};Zo.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||Ca,o=t.ignore||t.filter||Ut,n=t.map||Ut,i=t.mapStream||Xo,s=t.chown!==!1&&!Ht&&Ed()===0,a=t.extract||xa.extract(),c=[],u=new Date,d=typeof t.umask=="number"?~t.umask:~Ia(),m=typeof t.dmode=="number"?t.dmode:0,f=typeof t.fmode=="number"?t.fmode:0,p=t.strict!==!1;t.strip&&(n=Ta(n,t.strip)),t.readable&&(m|=parseInt(555,8),f|=parseInt(444,8)),t.writable&&(m|=parseInt(333,8),f|=parseInt(222,8));var g=function(y,v){for(var h;(h=kd(c))&&y.slice(0,h[0].length)!==h[0];)c.pop();if(!h)return v();r.utimes(h[0],u,h[1],v)},w=function(y,v,h){if(t.utimes===!1)return h();if(v.type==="directory")return r.utimes(y,u,v.mtime,h);if(v.type==="symlink")return g(y,h);r.utimes(y,u,v.mtime,function(S){if(S)return h(S);g(y,h)})},k=function(y,v,h){var S=v.type==="symlink",P=S?r.lchmod:r.chmod,_=S?r.lchown:r.chown;if(!P)return h();var I=(v.mode|(v.type==="directory"?m:f))&d;_&&s?_.call(r,y,v.uid,v.gid,F):F(null);function F(R){if(R)return h(R);if(!P)return h();P.call(r,y,I,h)}};return a.on("entry",function(y,v,h){y=n(y)||y,y.name=Ko(y.name);var S=X.join(e,X.join("/",y.name));if(o(S,y))return v.resume(),h();var P=function(T){if(T)return h(T);w(S,y,function(j){if(j)return h(j);if(Ht)return h();k(S,y,h)})},_=function(){if(Ht)return h();r.unlink(S,function(){var T=X.resolve(X.dirname(S),y.linkname);if(!Sa(T,e))return h(new Error(S+" is not a valid symlink"));r.symlink(y.linkname,S,P)})},I=function(){if(Ht)return h();r.unlink(S,function(){var T=X.join(e,X.join("/",y.linkname));r.realpath(T,function(j,H){if(j||!Sa(H,e))return h(new Error(S+" is not a valid hardlink"));r.link(H,S,function(A){if(A&&A.code==="EPERM"&&t.hardlinkAsFilesFallback)return v=r.createReadStream(T),F();P(A)})})})},F=function(){var T=r.createWriteStream(S),j=i(v,y);T.on("error",function(H){j.destroy(H)}),Pa(j,T,function(H){if(H)return h(H);T.on("close",P)})};if(y.type==="directory")return c.push([S,y.mtime]),Ea(S,{fs:r,own:s,uid:y.uid,gid:y.gid},P);var R=X.dirname(S);Da(r,R,X.join(e,"."),function(T,j){if(T)return h(T);if(!j)return h(new Error(R+" is not a valid path"));Ea(R,{fs:r,own:s,uid:y.uid,gid:y.gid},function(H){if(H)return h(H);switch(y.type){case"file":return F();case"link":return I();case"symlink":return _()}if(p)return h(new Error("unsupported type for "+S+" ("+y.type+")"));v.resume(),h()})})}),t.finish&&a.on("finish",t.finish),a};function Da(e,t,r,o){if(t===r)return o(null,!0);e.lstat(t,function(n,i){if(n&&n.code!=="ENOENT")return o(n);if(n||i.isDirectory())return Da(e,X.join(t,".."),r,o);o(null,!1)})}function Ea(e,t,r){wd(e,{fs:t.fs},function(o,n){!o&&n&&t.own?yd(n,t.uid,t.gid,r):r(o)})}function Sa(e,t){return t=X.resolve(t),t===e||e.startsWith(t+X.sep)}});l();l();var xr=Q(me(),1);l();l();var vr=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function il(e){let t="No lockfile found",r="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",o=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new E(t,r,o);q({headline:t,body:r,nextSteps:o})}function sl(e,t){let r=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),o="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
1
+ import{b as mi}from"./chunk-OLZHWPZP.js";import{$ as Xn,A as Un,Aa as ci,B as b,Ba as di,C as U,Ca as ui,D as Bn,E as ye,F as er,G as qe,H as rt,I as Se,Ia as Io,J as Vn,Ja as fi,K as Ne,Ka as pr,L as xe,La as ze,M as Gn,Ma as at,N as tr,Na as It,O as pe,Oa as hr,P as Co,Pa as lt,Q as qn,Qa as gr,R as ot,Ra as pi,S as nt,Sa as hi,T as Wn,Ta as gi,U as rr,Ua as yr,V as Yn,Va as yi,W as zn,Wa as wi,X as Jn,Xa as vi,Y as Qn,Z as Kn,_ as We,a as me,aa as W,b as xt,ba as it,c as Rn,ca as Zn,d as De,da as ei,e as Ee,ea as or,f as Ge,fa as nr,g as An,ga as ti,h as Fn,ha as he,i as jn,ia as ri,j as ko,ja as oi,k as tt,ka as To,l as Pt,la as ni,m as je,ma as ii,n as Nn,na as si,o as Kt,oa as ir,p as Eo,pa as sr,q as Ct,qa as ar,r as So,ra as ai,s as Ln,sa as lr,t as Mn,ta as cr,u as xo,ua as li,v as Hn,va as dr,w as Po,wa as ur,x as Xt,xa as Ye,y as Zt,ya as st,z as Tt,za as fr}from"./chunk-JXW374CL.js";import{a as Pn}from"./chunk-3VZEETAV.js";import{a as bi}from"./chunk-E3EMHAJB.js";import{b as Cn,c as Tn,d as Qt,g as In,i as Dn,j as On,k as _n}from"./chunk-TYZXGSHO.js";import{a as rl,b as $n,d as ol}from"./chunk-KHTV6PBV.js";import{a as wr}from"./chunk-WDC3KIZT.js";import{a as mr,b as Do,c as Oo}from"./chunk-7QIOUDCX.js";import{c as xn}from"./chunk-QSTEVZFQ.js";import{Aa as Za,Ba as bn,Ca as el,Da as tl,fa as fe,m as mn,n as ie}from"./chunk-XONFGLJQ.js";import{B as vn,l as hn,m as be,p as et,s as gn,u as yn,x as wn}from"./chunk-L2MGAEV3.js";import{b as D}from"./chunk-XOTA6JTZ.js";import{b as fn}from"./chunk-JUVAGMIH.js";import{A as Ie,D as ee,O as kn,a as Yt,u as V,v as N,w as q,y as $e,z as Re}from"./chunk-6G6TMKXF.js";import{d as E,g as zt}from"./chunk-M56NDIMD.js";import{a as nl}from"./chunk-HZA6IAA4.js";import{b as Xa}from"./chunk-QYR5VPQA.js";import{$ as ln,Ca as wo,Cb as pn,Ea as qt,Ga as dn,Gb as ke,Ha as un,Ib as Y,Ka as vo,Kb as Ae,Nb as $,Oa as bo,Ob as En,Pb as Fe,Qb as Sn,Rb as B,Sb as se,Ta as G,V as Vt,Wa as St,ma as de,na as cn,pa as Gt,qa as yo,qb as Wt,tb as L,ua as J,wa as Et,ya as ve}from"./chunk-N5PQPIBF.js";import{s as Jt}from"./chunk-YTNDFQJT.js";import{d as x,f as C,g as ne,i as go,j as Ze,k as sn,q as an}from"./chunk-IU2ZQ6TE.js";import{a as we,c as ce,e as Q,g as l}from"./chunk-VPRTJUIN.js";var Ls=ce((Mw,Ns)=>{l();Ns.exports=Fc;function Fc(e){var t=e._readableState;return t?t.objectMode||typeof e._duplexState=="number"?e.read():e.read(jc(t)):null}function jc(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}});var Vo=ce((Uw,Bs)=>{l();var Wr=$n(),Ms=bn(),Nc=xn(),Lc=Ls(),Hs=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),Bo=function(e,t){e._corked?e.once("uncork",t):t()},Mc=function(e,t){e._autoDestroy&&e.destroy(t)},Us=function(e,t){return function(r){r?Mc(e,r.message==="premature close"?null:r):t&&!e._ended&&e.end()}},Hc=function(e,t){if(!e||e._writableState&&e._writableState.finished)return t();if(e._writableState)return e.end(t);e.end(),t()},Uc=function(e){return new Wr.Readable({objectMode:!0,highWaterMark:16}).wrap(e)},K=function(e,t,r){if(!(this instanceof K))return new K(e,t,r);Wr.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};Nc(K,Wr.Duplex);K.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new K(e,t,r)};K.prototype.cork=function(){++this._corked===1&&this.emit("cork")};K.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};K.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.end();return}var t=this,r=Ms(e,{writable:!0,readable:!1},Us(this,this._forwardEnd)),o=function(){var i=t._ondrain;t._ondrain=null,i&&i()},n=function(){t._writable.removeListener("drain",o),r()};this._unwrite&&process.nextTick(o),this._writable=e,this._writable.on("drain",o),this._unwrite=n,this.uncork()};K.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.push(null),this.resume();return}var t=this,r=Ms(e,{writable:!1,readable:!0},Us(this)),o=function(){t._forward()},n=function(){t.push(null)},i=function(){t._readable2.removeListener("readable",o),t._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:Uc(e),this._readable2.on("readable",o),this._readable2.on("end",n),this._unread=i,this._forward()};K.prototype._read=function(){this._drained=!0,this._forward()};K.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var e;this._drained&&(e=Lc(this._readable2))!==null;)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}};K.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;process.nextTick(function(){t._destroy(e)})}};K.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};K.prototype._write=function(e,t,r){if(this.destroyed)return r();if(this._corked)return Bo(this,this._write.bind(this,e,t,r));if(e===Hs)return this._finish(r);if(!this._writable)return r();this._writable.write(e)===!1?this._ondrain=r:r()};K.prototype._finish=function(e){var t=this;this.emit("preend"),Bo(this,function(){Hc(t._forwardEnd&&t._writable,function(){t._writableState.prefinished===!1&&(t._writableState.prefinished=!0),t.emit("prefinish"),Bo(t,e)})})};K.prototype.end=function(e,t,r){return typeof e=="function"?this.end(null,null,e):typeof t=="function"?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(Hs),Wr.Writable.prototype.end.call(this,r))};Bs.exports=K});var Gs=ce((Vw,Vs)=>{l();Vs.exports=Vc;var Bc=Object.prototype.hasOwnProperty;function Vc(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)Bc.call(r,o)&&(e[o]=r[o])}return e}});var qo=ce((qw,Yr)=>{l();var qs=$n().Transform,Ws=we("util").inherits,Ys=Gs();function ht(e){qs.call(this,e),this._destroyed=!1}Ws(ht,qs);ht.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}};function Gc(e,t,r){r(null,e)}function Go(e){return function(t,r,o){return typeof t=="function"&&(o=r,r=t,t={}),typeof r!="function"&&(r=Gc),typeof o!="function"&&(o=null),e(t,r,o)}}Yr.exports=Go(function(e,t,r){var o=new ht(e);return o._transform=t,r&&(o._flush=r),o});Yr.exports.ctor=Go(function(e,t,r){function o(n){if(!(this instanceof o))return new o(n);this.options=Ys(e,n),ht.call(this,this.options)}return Ws(o,ht),o.prototype._transform=t,r&&(o.prototype._flush=r),o});Yr.exports.obj=Go(function(e,t,r){var o=new ht(Ys({objectMode:!0,highWaterMark:16},e));return o._transform=t,r&&(o._flush=r),o})});var Qs=ce((Yw,Js)=>{l();var qc=Vo(),Wc=qo(),Yc=Xa(),zc=function(e){return!Buffer.isBuffer(e)&&typeof e!="string"},zs=function(e,t){if(typeof e=="number"&&(e={maxBuffer:e}),typeof e=="function")return zs(null,e);e||(e={});var r=typeof e.maxBuffer=="number"?e.maxBuffer:65535,o=e.strict,n=e.newline!==!1,i=[],s=0,a=qc.obj(),c=Wc.obj({highWaterMark:1},function(m,f,p){if(zc(m))return d(m,null,p);if(Buffer.isBuffer(m)||(m=Yc(m)),n){var g=Array.prototype.indexOf.call(m,10);if(g>0&&m[g-1]===13&&g--,g>-1)return i.push(m.slice(0,g)),d(Buffer.concat(i),m.slice(g),p)}if(i.push(m),s+=m.length,s<r)return p();if(o)return p(new Error("No newline found"));d(Buffer.concat(i),null,p)}),u=function(){if(o)return a.destroy(new Error("No newline found"));a.cork(),d(Buffer.concat(i),null,function(m){if(m)return a.destroy(m);a.uncork()})},d=function(m,f,p){a.removeListener("preend",u),t(m,function(g,w){if(g)return p(g);a.setWritable(w),a.setReadable(w),m&&w.write(m),f&&w.write(f),f=i=c=null,p()})};return a.on("preend",u),a.setWritable(c),a};Js.exports=zs});var Zs=ce((Jw,Xs)=>{l();var Jc=Za(),Qc=bn(),Wo=we("fs"),Mt=function(){},Kc=/^v?\.0/.test(process.version),zr=function(e){return typeof e=="function"},Xc=function(e){return!Kc||!Wo?!1:(e instanceof(Wo.ReadStream||Mt)||e instanceof(Wo.WriteStream||Mt))&&zr(e.close)},Zc=function(e){return e.setHeader&&zr(e.abort)},ed=function(e,t,r,o){o=Jc(o);var n=!1;e.on("close",function(){n=!0}),Qc(e,{readable:t,writable:r},function(s){if(s)return o(s);n=!0,o()});var i=!1;return function(s){if(!n&&!i){if(i=!0,Xc(e))return e.close(Mt);if(Zc(e))return e.abort();if(zr(e.destroy))return e.destroy();o(s||new Error("stream was destroyed"))}}},Ks=function(e){e()},td=function(e,t){return e.pipe(t)},rd=function(){var e=Array.prototype.slice.call(arguments),t=zr(e[e.length-1]||Mt)&&e.pop()||Mt;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(n,i){var s=i<e.length-1,a=i>0;return ed(n,s,a,function(c){r||(r=c),c&&o.forEach(Ks),!s&&(o.forEach(Ks),t(r))})});e.reduce(td)};Xs.exports=rd});var ra=ce((Kw,Jr)=>{l();var od=Zs(),nd=xn(),ea=Vo(),ta=function(e){return e.length?Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e):[]},Yo=function(e){var t=function(){var r=ta(arguments);if(!(this instanceof t))return new t(r);ea.call(this,null,null,e),r.length&&this.setPipeline(r)};return nd(t,ea),t.prototype.setPipeline=function(){var r=ta(arguments),o=this,n=!1,i=r[0],s=r[r.length-1];s=s.readable?s:null,i=i.writable?i:null;var a=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){n||o.cork()}),od(r,function(c){if(o.removeListener("close",a),c)return o.destroy(c.message==="premature close"?null:c);n=!0,o._autoDestroy===!1&&(o._autoDestroy=!0),o.uncork()}),this.destroyed)return a();this.setWritable(i),this.setReadable(s)},t};Jr.exports=Yo({autoDestroy:!1,destroy:!1});Jr.exports.obj=Yo({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});Jr.exports.ctor=Yo});var na=ce((Zw,oa)=>{"use strict";l();oa.exports=function(e){return!e||e.length<3?!1:e[0]===31&&e[1]===139&&e[2]===8}});var sa=ce((tv,ia)=>{"use strict";l();ia.exports=function(e){return!e||e.length<2?!1:e[0]===120&&(e[1]===1||e[1]===156||e[1]===218)}});var da=ce((ov,ca)=>{l();var aa=we("zlib"),id=Qs(),sd=qo(),la=ra(),ad=na(),ld=sa(),cd=function(e){return ad(e)?1:ld(e)?2:0},zo=function(e){return e===void 0&&(e=3),id({newline:!1,maxBuffer:10},function(t,r){if(e<0)return r(new Error("Maximum recursion reached"));switch(cd(t)){case 1:r(null,la(aa.createGunzip(),zo(e-1)));break;case 2:r(null,la(aa.createInflate(),zo(e-1)));break;default:r(null,sd())}})};ca.exports=zo});var ya=ce((iv,ga)=>{"use strict";l();var ge=we("fs"),Ke=we("path"),dd=ge.lchown?"lchown":"chown",ud=ge.lchownSync?"lchownSync":"chownSync",fa=ge.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),ua=(e,t,r)=>{try{return ge[ud](e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},fd=(e,t,r)=>{try{return ge.chownSync(e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},md=fa?(e,t,r,o)=>n=>{!n||n.code!=="EISDIR"?o(n):ge.chown(e,t,r,o)}:(e,t,r,o)=>o,Jo=fa?(e,t,r)=>{try{return ua(e,t,r)}catch(o){if(o.code!=="EISDIR")throw o;fd(e,t,r)}}:(e,t,r)=>ua(e,t,r),pd=process.version,ma=(e,t,r)=>ge.readdir(e,t,r),hd=(e,t)=>ge.readdirSync(e,t);/^v4\./.test(pd)&&(ma=(e,t,r)=>ge.readdir(e,r));var Qr=(e,t,r,o)=>{ge[dd](e,t,r,md(e,t,r,n=>{o(n&&n.code!=="ENOENT"?n:null)}))},pa=(e,t,r,o,n)=>{if(typeof t=="string")return ge.lstat(Ke.resolve(e,t),(i,s)=>{if(i)return n(i.code!=="ENOENT"?i:null);s.name=t,pa(e,s,r,o,n)});if(t.isDirectory())Qo(Ke.resolve(e,t.name),r,o,i=>{if(i)return n(i);let s=Ke.resolve(e,t.name);Qr(s,r,o,n)});else{let i=Ke.resolve(e,t.name);Qr(i,r,o,n)}},Qo=(e,t,r,o)=>{ma(e,{withFileTypes:!0},(n,i)=>{if(n){if(n.code==="ENOENT")return o();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return o(n)}if(n||!i.length)return Qr(e,t,r,o);let s=i.length,a=null,c=u=>{if(!a){if(u)return o(a=u);if(--s===0)return Qr(e,t,r,o)}};i.forEach(u=>pa(e,u,t,r,c))})},gd=(e,t,r,o)=>{if(typeof t=="string")try{let n=ge.lstatSync(Ke.resolve(e,t));n.name=t,t=n}catch(n){if(n.code==="ENOENT")return;throw n}t.isDirectory()&&ha(Ke.resolve(e,t.name),r,o),Jo(Ke.resolve(e,t.name),r,o)},ha=(e,t,r)=>{let o;try{o=hd(e,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return Jo(e,t,r);throw n}return o&&o.length&&o.forEach(n=>gd(e,n,t,r)),Jo(e,t,r)};ga.exports=Qo;Qo.sync=ha});var ka=ce((av,ba)=>{l();var Kr=we("path"),wa=we("fs"),va=parseInt("0777",8);ba.exports=gt.mkdirp=gt.mkdirP=gt;function gt(e,t,r,o){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var n=t.mode,i=t.fs||wa;n===void 0&&(n=va&~process.umask()),o||(o=null);var s=r||function(){};e=Kr.resolve(e),i.mkdir(e,n,function(a){if(!a)return o=o||e,s(null,o);a.code==="ENOENT"?gt(Kr.dirname(e),t,function(c,u){c?s(c,u):gt(e,t,s,u)}):i.stat(e,function(c,u){c||!u.isDirectory()?s(a,o):s(null,o)})})}gt.sync=function e(t,r,o){(!r||typeof r!="object")&&(r={mode:r});var n=r.mode,i=r.fs||wa;n===void 0&&(n=va&~process.umask()),o||(o=null),t=Kr.resolve(t);try{i.mkdirSync(t,n),o=o||t}catch(a){switch(a.code){case"ENOENT":o=e(Kr.dirname(t),r,o),e(t,r,o);break;default:var s;try{s=i.statSync(t)}catch{throw a}if(!s.isDirectory())throw a;break}}return o}});var Oa=ce(Zo=>{l();var yd=ya(),xa=ol(),Pa=el(),wd=ka(),Ca=we("fs"),X=we("path"),vd=we("os"),Ht=vd.platform()==="win32",Ut=function(){},Xo=function(e){return e},Ko=Ht?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:Xo,bd=function(e,t,r,o,n,i){var s=n||["."];return function(c){if(!s.length)return c();var u=s.shift(),d=X.join(r,u);t.call(e,d,function(m,f){if(m)return c(m);if(!f.isDirectory())return c(null,u,f);e.readdir(d,function(p,g){if(p)return c(p);i&&g.sort();for(var w=0;w<g.length;w++)o(X.join(r,u,g[w]))||s.push(X.join(u,g[w]));c(null,u,f)})})}},Ta=function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var o=r.linkname;return o&&(r.type==="link"||X.isAbsolute(o))&&(r.linkname=o.split("/").slice(t).join("/")),e(r)}};Zo.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||Ca,o=t.ignore||t.filter||Ut,n=t.map||Ut,i=t.mapStream||Xo,s=bd(r,t.dereference?r.stat:r.lstat,e,o,t.entries,t.sort),a=t.strict!==!1,c=typeof t.umask=="number"?~t.umask:~Ia(),u=typeof t.dmode=="number"?t.dmode:0,d=typeof t.fmode=="number"?t.fmode:0,m=t.pack||xa.pack(),f=t.finish||Ut;t.strip&&(n=Ta(n,t.strip)),t.readable&&(u|=parseInt(555,8),d|=parseInt(444,8)),t.writable&&(u|=parseInt(333,8),d|=parseInt(222,8));var p=function(k,y){r.readlink(X.join(e,k),function(v,h){if(v)return m.destroy(v);y.linkname=Ko(h),m.entry(y,w)})},g=function(k,y,v){if(k)return m.destroy(k);if(!y)return t.finalize!==!1&&m.finalize(),f(m);if(v.isSocket())return w();var h={name:Ko(y),mode:(v.mode|(v.isDirectory()?u:d))&c,mtime:v.mtime,size:v.size,type:"file",uid:v.uid,gid:v.gid};if(v.isDirectory())return h.size=0,h.type="directory",h=n(h)||h,m.entry(h,w);if(v.isSymbolicLink())return h.size=0,h.type="symlink",h=n(h)||h,p(y,h);if(h=n(h)||h,!v.isFile())return a?m.destroy(new Error("unsupported type for "+y)):w();var S=m.entry(h,w);if(S){var P=i(r.createReadStream(X.join(e,y),{start:0,end:h.size>0?h.size-1:h.size}),h);P.on("error",function(_){S.destroy(_)}),Pa(P,S)}},w=function(k){if(k)return m.destroy(k);s(g)};return w(),m};var kd=function(e){return e.length?e[e.length-1]:null},Ed=function(){return process.getuid?process.getuid():-1},Ia=function(){return process.umask?process.umask():0};Zo.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||Ca,o=t.ignore||t.filter||Ut,n=t.map||Ut,i=t.mapStream||Xo,s=t.chown!==!1&&!Ht&&Ed()===0,a=t.extract||xa.extract(),c=[],u=new Date,d=typeof t.umask=="number"?~t.umask:~Ia(),m=typeof t.dmode=="number"?t.dmode:0,f=typeof t.fmode=="number"?t.fmode:0,p=t.strict!==!1;t.strip&&(n=Ta(n,t.strip)),t.readable&&(m|=parseInt(555,8),f|=parseInt(444,8)),t.writable&&(m|=parseInt(333,8),f|=parseInt(222,8));var g=function(y,v){for(var h;(h=kd(c))&&y.slice(0,h[0].length)!==h[0];)c.pop();if(!h)return v();r.utimes(h[0],u,h[1],v)},w=function(y,v,h){if(t.utimes===!1)return h();if(v.type==="directory")return r.utimes(y,u,v.mtime,h);if(v.type==="symlink")return g(y,h);r.utimes(y,u,v.mtime,function(S){if(S)return h(S);g(y,h)})},k=function(y,v,h){var S=v.type==="symlink",P=S?r.lchmod:r.chmod,_=S?r.lchown:r.chown;if(!P)return h();var I=(v.mode|(v.type==="directory"?m:f))&d;_&&s?_.call(r,y,v.uid,v.gid,F):F(null);function F(R){if(R)return h(R);if(!P)return h();P.call(r,y,I,h)}};return a.on("entry",function(y,v,h){y=n(y)||y,y.name=Ko(y.name);var S=X.join(e,X.join("/",y.name));if(o(S,y))return v.resume(),h();var P=function(T){if(T)return h(T);w(S,y,function(j){if(j)return h(j);if(Ht)return h();k(S,y,h)})},_=function(){if(Ht)return h();r.unlink(S,function(){var T=X.resolve(X.dirname(S),y.linkname);if(!Sa(T,e))return h(new Error(S+" is not a valid symlink"));r.symlink(y.linkname,S,P)})},I=function(){if(Ht)return h();r.unlink(S,function(){var T=X.join(e,X.join("/",y.linkname));r.realpath(T,function(j,H){if(j||!Sa(H,e))return h(new Error(S+" is not a valid hardlink"));r.link(H,S,function(A){if(A&&A.code==="EPERM"&&t.hardlinkAsFilesFallback)return v=r.createReadStream(T),F();P(A)})})})},F=function(){var T=r.createWriteStream(S),j=i(v,y);T.on("error",function(H){j.destroy(H)}),Pa(j,T,function(H){if(H)return h(H);T.on("close",P)})};if(y.type==="directory")return c.push([S,y.mtime]),Ea(S,{fs:r,own:s,uid:y.uid,gid:y.gid},P);var R=X.dirname(S);Da(r,R,X.join(e,"."),function(T,j){if(T)return h(T);if(!j)return h(new Error(R+" is not a valid path"));Ea(R,{fs:r,own:s,uid:y.uid,gid:y.gid},function(H){if(H)return h(H);switch(y.type){case"file":return F();case"link":return I();case"symlink":return _()}if(p)return h(new Error("unsupported type for "+S+" ("+y.type+")"));v.resume(),h()})})}),t.finish&&a.on("finish",t.finish),a};function Da(e,t,r,o){if(t===r)return o(null,!0);e.lstat(t,function(n,i){if(n&&n.code!=="ENOENT")return o(n);if(n||i.isDirectory())return Da(e,X.join(t,".."),r,o);o(null,!1)})}function Ea(e,t,r){wd(e,{fs:t.fs},function(o,n){!o&&n&&t.own?yd(n,t.uid,t.gid,r):r(o)})}function Sa(e,t){return t=X.resolve(t),t===e||e.startsWith(t+X.sep)}});l();l();var xr=Q(me(),1);l();l();var vr=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function il(e){let t="No lockfile found",r="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",o=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new E(t,r,o);q({headline:t,body:r,nextSteps:o})}function sl(e,t){let r=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),o="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
2
2
  `,{list:{items:r}}],i=["Delete any unneeded lockfiles","Commit the change to your repository"];if(t)throw new E(o,n,i);q({headline:o,body:n,nextSteps:i})}function al(e){let t="Lockfile ignored by Git",r="Your project\u2019s lockfile isn\u2019t being tracked by Git. If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying.",o=[`In your project\u2019s .gitignore file, delete any references to ${e}`,"Commit the change to your repository"];q({headline:t,body:r,nextSteps:o})}async function ki(e,t=!1){if(De&&!process.env.SHOPIFY_UNIT_TEST)return;let r=[];for(let i of vr){let s=[i.lockfile,...i.alternativeLockfiles||[]];for(let a of s)if(await G(C(e,a))){r.push({packageManager:i,foundLockfile:a});break}}if(r.length===0)return il(t);if(r.length>1)return sl(r,t);let o=r[0].foundLockfile;(await Cn(e,[o]).catch(()=>[])).length>0&&al(o)}l();var ll=["^cdn/","^_t/"];function br(e){let t=new Set;return Object.values(e.routes).filter(r=>ll.some(o=>new RegExp(o).test(r.path??""))).forEach(r=>{r.path&&t.add(r.path)}),[...t]}var cl=["","cart","products/:productHandle","collections","collections/:collectionHandle","sitemap.xml","robots.txt","pages/:pageHandle","policies/:policyHandle","search","account","account/login","account/orders/:orderId","account/authorize"];function kr(e,t=cl){let r=Object.values(e.routes),o=new Set(t);for(let n of t)for(let i of r)if(!n&&!i.path)o.delete(n);else if(n&&i.path){let s={path:i.path,parentId:i.parentId};for(;s.parentId&&s.parentId!=="root";){let u=r.find(d=>d.id===s.parentId);if(!u)break;s.path=u.path==null?s.path:`${u.path}/${s.path}`,s.parentId=u.parentId}let a=":?[^\\/\\?]+\\?",c=`^(${a}\\/)?`+n.replaceAll(".","\\.").replace(/\//g,`\\/(${a}\\/)?`).replace(/:[^/)?]+/g,"(:[^\\/]+|\\*)")+`(\\/${a})?$`;new RegExp(c).test(s.path)&&o.delete(n)}return[...o]}var Le=100;function Ei(e){e.length?q({headline:"Standard Shopify routes missing",body:`Your Hydrogen project is missing ${e.length} standard Shopify route${e.length>1?"s":""}.
3
3
  Including these routes improves compatibility with Shopify\u2019s platform:
4
4
 
@@ -235,7 +235,7 @@ Skip the flag or provide the name of a template or example in the Hydrogen repos
235
235
  }
236
236
  }
237
237
  }
238
- `;async function Ha(e){let{hydrogenStorefronts:t}=await ot(_d,e);return t.map(r=>({...r,parsedId:nt(r.id)}))}var Zr=class e extends D{static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description="Returns a list of Hydrogen storefronts available on a given shop.";static flags={...b.path};async run(){let{flags:t}=await this.parse(e);await $d(t)}};async function $d({path:e=process.cwd()}){let{session:t}=await he(e),r=await Ha(t);r.length>0?(se(),$(Fd({storefronts:r,shop:t.storeFqdn}).toString()),r.forEach(({currentProductionDeployment:o,id:n,productionUrl:i,title:s})=>{se(),$(Y`${L.whiteBright(s)} ${L.dim(`(id: ${nt(n)})`)}`.value),i&&$(Y` ${L.whiteBright(i)}`.value),o&&$(Y` ${L.dim(Ad(o))}`.value)})):V({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${t.storeFqdn})`,`Create a new Hydrogen storefront: Run \`${await W(e)} link\` or visit ${ps(t)}`]})}var Rd=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function Ad(e){let t="";if(!e)return t;if(t+=Rd.format(new Date(e.createdAt)),e.commitMessage){let r=e.commitMessage.split(/\n/)[0];t+=`, ${r}`}return t}var Fd=({storefronts:e,shop:t})=>Vt(e,r=>`Showing ${r.length} Hydrogen storefronts for the store ${t}`,r=>`Showing 1 Hydrogen storefront for the store ${t}`);l();var eo=class e extends D{static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description="Login to your Shopify account.";static flags={...b.path,...b.shop};async run(){let{flags:t}=await this.parse(e);await jd(t)}};async function jd({path:e=process.cwd(),shop:t}){se(),Zn(!0);let{config:r}=await he(e,t??!0);ri(r)}l();var to=class e extends D{static descriptionWithMarkdown="Log out from the current shop.";static description="Logout of your local session.";static flags={...b.path};async run(){let{flags:t}=await this.parse(e);await Nd(t)}};async function Nd({path:e=process.cwd()}){se(),await ti(e),N({body:"You are logged out from Shopify."})}l();var en=Q(me(),1);l();async function Ua(e){let{startWorkerdServer:t}=await import("./workerd-L2EJKIAQ.js");return t(e)}var ro=class e extends D{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...b.path,...b.port,...b.env,...b.envBranch,...b.envFile,...b.inspectorPort,...b.debug,...b.verbose,build:en.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:en.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ye(b.entry,{entry:{dependsOn:["build"]}}),...ye(b.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),r=t.path?C(t.path):process.cwd(),{close:o}=await Ld({...U(t),directory:r});He(async()=>{await o()})}};async function Ld({port:e,directory:t,env:r,envBranch:o,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:c=!1,codegen:u=!1,codegenConfigPath:d,entry:m,envFile:f}){process.env.NODE_ENV||(process.env.NODE_ENV=c?"development":"production"),s&&or(),nr()||it();let{root:p,buildPath:g,buildPathWorkerFile:w,buildPathClient:k}=Se(t),y=await rt(p);if(y)throw new E(xe);let v,h=_t(),P=a?await Je({...{directory:p,entry:m,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:u,codegenConfigPath:d},watch:c,async onServerBuildFinish(){h.state==="pending"?h.resolve():$("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await v?.reload()}}):h.resolve();y||(w=(await pe(p).catch(()=>null))?.serverOutFile??x(g,"server","index.js"));let{shop:_,storefront:I}=await rr(p),F=!!_&&!!I?.id,{allVariables:R,logInjectedVariables:T}=await gr({root:p,fetchRemote:F,envBranch:o,envHandle:r,envFile:f});e||(e=await jt(Tt));let j=await jt(e+100);return await h.promise,T(),v=await Ua({root:p,appPort:e,assetsPort:j,env:R,buildPathClient:k,buildPathWorkerFile:w,inspectorPort:n,debug:i,watch:c}),v.showBanner({mode:"preview",headlinePrefix:c?"Watching for changes. ":""}),{async close(){await Promise.allSettled([v.close(),P?.close()])}}}l();var oo=class e extends D{static description="Scaffold routes and core functionality.";static flags={...b.path,...b.force,...b.markets,...b.shortcut,...ye(b.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),r=t.path?C(t.path):process.cwd();await Md({...U(t),directory:r})}};async function Md(e){let t=new Yt,{rootDirectory:r,appDirectory:o}=await Ne(e.directory),n=Ze(r),i=W(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],c=e.markets?e.markets:await Zt({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),u=c==="none"?void 0:c,{setupRoutes:d}=ir(t),m,f=await An(".."),[p,g]=await Promise.all([G(x(r,"tsconfig.json")),St("*.d.ts",{cwd:f})]);s=s.then(()=>Promise.all([...g.map(v=>Gt(x(f,v),C(r,v))),sr({rootDirectory:r,appDirectory:o,typescript:p})])).then(async()=>{m=await d(r,p?"ts":"js",{i18nStrategy:u,overwriteFileDeps:!0})}),u&&(s=s.then(()=>Xt(u,{rootDirectory:r})));let w=await Promise.resolve(i),{createShortcut:k,showShortcutBanner:y}=await ar(t,w,e.shortcut);!u&&!k||(k&&(s=s.then(async()=>{await k()&&(w=We)}),y()),await ee(a),await st({location:n,name:n,directory:r},{cliCommand:w,depsInstalled:!0,packageManager:"npm",i18n:u,routes:m}))}l();var Ba=Q(me(),1);var no=class e extends D{static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description="Setup CSS strategies for your project.";static flags={...b.path,...b.force,...ye(b.installDeps,{"install-deps":{default:!0}})};static args={strategy:Ba.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${ko.join()}`,options:ko})};async run(){let{flags:t,args:r}=await this.parse(e),o=t.path?C(t.path):process.cwd();await Hd({...U(t),strategy:r.strategy,directory:o})}};async function Hd({strategy:e,directory:t,force:r=!1,installDeps:o=!0}){let n=await pe(t).catch(()=>null);if(!n)throw new E("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await Mn();if(s==="css-modules"||s==="postcss"){N({headline:`Vite works out of the box with ${Ct[s]}.`,body:`See the Vite documentation for more information:
238
+ `;async function Ha(e){let{hydrogenStorefronts:t}=await ot(_d,e);return t.map(r=>({...r,parsedId:nt(r.id)}))}var Zr=class e extends D{static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description="Returns a list of Hydrogen storefronts available on a given shop.";static flags={...b.path};async run(){let{flags:t}=await this.parse(e);await $d(t)}};async function $d({path:e=process.cwd()}){let{session:t}=await he(e),r=await Ha(t);r.length>0?(se(),$(Fd({storefronts:r,shop:t.storeFqdn}).toString()),r.forEach(({currentProductionDeployment:o,id:n,productionUrl:i,title:s})=>{se(),$(Y`${L.whiteBright(s)} ${L.dim(`(id: ${nt(n)})`)}`.value),i&&$(Y` ${L.whiteBright(i)}`.value),o&&$(Y` ${L.dim(Ad(o))}`.value)})):V({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${t.storeFqdn})`,`Create a new Hydrogen storefront: Run \`${await W(e)} link\` or visit ${ps(t)}`]})}var Rd=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function Ad(e){let t="";if(!e)return t;if(t+=Rd.format(new Date(e.createdAt)),e.commitMessage){let r=e.commitMessage.split(/\n/)[0];t+=`, ${r}`}return t}var Fd=({storefronts:e,shop:t})=>Vt(e,r=>`Showing ${r.length} Hydrogen storefronts for the store ${t}`,r=>`Showing 1 Hydrogen storefront for the store ${t}`);l();var eo=class e extends D{static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description="Login to your Shopify account.";static flags={...b.path,...b.shop};async run(){let{flags:t}=await this.parse(e);await jd(t)}};async function jd({path:e=process.cwd(),shop:t}){se(),Zn(!0);let{config:r}=await he(e,t??!0);ri(r)}l();var to=class e extends D{static descriptionWithMarkdown="Log out from the current shop.";static description="Logout of your local session.";static flags={...b.path};async run(){let{flags:t}=await this.parse(e);await Nd(t)}};async function Nd({path:e=process.cwd()}){se(),await ti(e),N({body:"You are logged out from Shopify."})}l();var en=Q(me(),1);l();async function Ua(e){let{startWorkerdServer:t}=await import("./workerd-GOK6GWEX.js");return t(e)}var ro=class e extends D{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...b.path,...b.port,...b.env,...b.envBranch,...b.envFile,...b.inspectorPort,...b.debug,...b.verbose,build:en.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:en.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ye(b.entry,{entry:{dependsOn:["build"]}}),...ye(b.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),r=t.path?C(t.path):process.cwd(),{close:o}=await Ld({...U(t),directory:r});He(async()=>{await o()})}};async function Ld({port:e,directory:t,env:r,envBranch:o,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:c=!1,codegen:u=!1,codegenConfigPath:d,entry:m,envFile:f}){process.env.NODE_ENV||(process.env.NODE_ENV=c?"development":"production"),s&&or(),nr()||it();let{root:p,buildPath:g,buildPathWorkerFile:w,buildPathClient:k}=Se(t),y=await rt(p);if(y)throw new E(xe);let v,h=_t(),P=a?await Je({...{directory:p,entry:m,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:u,codegenConfigPath:d},watch:c,async onServerBuildFinish(){h.state==="pending"?h.resolve():$("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await v?.reload()}}):h.resolve();y||(w=(await pe(p).catch(()=>null))?.serverOutFile??x(g,"server","index.js"));let{shop:_,storefront:I}=await rr(p),F=!!_&&!!I?.id,{allVariables:R,logInjectedVariables:T}=await gr({root:p,fetchRemote:F,envBranch:o,envHandle:r,envFile:f});e||(e=await jt(Tt));let j=await jt(e+100);return await h.promise,T(),v=await Ua({root:p,appPort:e,assetsPort:j,env:R,buildPathClient:k,buildPathWorkerFile:w,inspectorPort:n,debug:i,watch:c}),v.showBanner({mode:"preview",headlinePrefix:c?"Watching for changes. ":""}),{async close(){await Promise.allSettled([v.close(),P?.close()])}}}l();var oo=class e extends D{static description="Scaffold routes and core functionality.";static flags={...b.path,...b.force,...b.markets,...b.shortcut,...ye(b.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),r=t.path?C(t.path):process.cwd();await Md({...U(t),directory:r})}};async function Md(e){let t=new Yt,{rootDirectory:r,appDirectory:o}=await Ne(e.directory),n=Ze(r),i=W(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],c=e.markets?e.markets:await Zt({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),u=c==="none"?void 0:c,{setupRoutes:d}=ir(t),m,f=await An(".."),[p,g]=await Promise.all([G(x(r,"tsconfig.json")),St("*.d.ts",{cwd:f})]);s=s.then(()=>Promise.all([...g.map(v=>Gt(x(f,v),C(r,v))),sr({rootDirectory:r,appDirectory:o,typescript:p})])).then(async()=>{m=await d(r,p?"ts":"js",{i18nStrategy:u,overwriteFileDeps:!0})}),u&&(s=s.then(()=>Xt(u,{rootDirectory:r})));let w=await Promise.resolve(i),{createShortcut:k,showShortcutBanner:y}=await ar(t,w,e.shortcut);!u&&!k||(k&&(s=s.then(async()=>{await k()&&(w=We)}),y()),await ee(a),await st({location:n,name:n,directory:r},{cliCommand:w,depsInstalled:!0,packageManager:"npm",i18n:u,routes:m}))}l();var Ba=Q(me(),1);var no=class e extends D{static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description="Setup CSS strategies for your project.";static flags={...b.path,...b.force,...ye(b.installDeps,{"install-deps":{default:!0}})};static args={strategy:Ba.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${ko.join()}`,options:ko})};async run(){let{flags:t,args:r}=await this.parse(e),o=t.path?C(t.path):process.cwd();await Hd({...U(t),strategy:r.strategy,directory:o})}};async function Hd({strategy:e,directory:t,force:r=!1,installDeps:o=!0}){let n=await pe(t).catch(()=>null);if(!n)throw new E("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await Mn();if(s==="css-modules"||s==="postcss"){N({headline:`Vite works out of the box with ${Ct[s]}.`,body:`See the Vite documentation for more information:
239
239
  ${So[s]}`});return}let a=await Ln(s,i,r);if(!a)return;let{workPromise:c,generatedAssets:u,needsInstallDeps:d}=a,m=[{title:"Updating files",task:async()=>{await c}}],f=!1;if(o&&d){let p=be(i.rootDirectory);m.push({title:"Installing new dependencies",task:async()=>{let g=await p;f=g==="npm"||g==="unknown",await et({directory:i.rootDirectory,packageManager:g,args:[]})}})}await ee(m),N({headline:`${Ct[s]} setup complete.`,body:(u.length>0?`You can now modify CSS configuration in the following files:
240
240
  `+u.map(p=>` - ${p}`).join(`
241
241
  `)+`
@@ -1,4 +1,4 @@
1
- import{da as p,h as a}from"./chunk-SBEZBZM7.js";import{Gb as e,Ib as r}from"./chunk-GFEAKSGV.js";import{g as i}from"./chunk-VPRTJUIN.js";i();async function P(n,t,o){return u(n,t,o,"text")}async function u(n,t,o,s){return await p(t,o.source),s==="json"?r`${e.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:a(n.configuration)})}`:r`
1
+ import{da as p,h as a}from"./chunk-54CAKCYR.js";import{Gb as e,Ib as r}from"./chunk-N5PQPIBF.js";import{g as i}from"./chunk-VPRTJUIN.js";i();async function P(n,t,o){return u(n,t,o,"text")}async function u(n,t,o,s){return await p(t,o.source),s==="json"?r`${e.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:a(n.configuration)})}`:r`
2
2
  ${e.green("SHOPIFY_API_KEY")}=${t.apiKey}
3
3
  ${e.green("SHOPIFY_API_SECRET")}=${t.apiSecretKeys[0]?.secret??""}
4
4
  ${e.green("SCOPES")}=${a(n.configuration)}
@@ -1 +1 @@
1
- import{b as r}from"./chunk-ELVFJ7BR.js";import{b as a}from"./chunk-YZDDTYTU.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var i=class extends a{static{this.summary="Upgrades Shopify CLI."}static{this.descriptionWithMarkdown="Upgrades Shopify CLI using your package manager."}static{this.description=this.descriptionWithoutMarkdown()}async run(){await r()}};export{i as a};
1
+ import{b as r}from"./chunk-ZGK3LGCH.js";import{b as a}from"./chunk-XOTA6JTZ.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var i=class extends a{static{this.summary="Upgrades Shopify CLI."}static{this.descriptionWithMarkdown="Upgrades Shopify CLI using your package manager."}static{this.description=this.descriptionWithoutMarkdown()}async run(){await r()}};export{i as a};
@@ -0,0 +1,15 @@
1
+ import{b as h}from"./chunk-XOTA6JTZ.js";import{Ca as g,ua as u,wa as c}from"./chunk-N5PQPIBF.js";import{d as f,q as p}from"./chunk-IU2ZQ6TE.js";import{g as l}from"./chunk-VPRTJUIN.js";l();var d=f(p(),"/docs-shopify.dev/commands"),m=class extends h{static{this.description="Generate CLI commands documentation"}static{this.hidden=!0}async run(){let a=this.config.commands;await g(d),await c(d);let o=a.sort((e,i)=>e.id.length-i.id.length).filter(e=>!b(e)).map(e=>{let i=k(e);return N(e,i)});await Promise.all(o)}},C=["commands","help","plugins"];function b(t){return t.hidden?(C.push(t.id),!0):t.pluginType==="user"?!0:C.some(a=>t.id.startsWith(`${a}:`))}function k(t){let a=t.id.replace(/[:]/g," "),s=t.id.replace(/[:]/g,"-"),o=t.id.replace(/[:-]/g,"");return{commandName:a,fileName:s,interfaceName:o}}async function N(t,{commandName:a,fileName:s,interfaceName:o}){let e=Object.keys(t.flags).map(r=>{let n=t.flags[r];if(!n||n.hidden)return;let $=n.description??"",w=n.char?`-${n.char}, `:"",y=n.type==="option"?"string":"''",v=n.type==="option"?" <value>":"",x=n.required?"":"?",D=n.env!==void 0?` @environment ${n.env}`:"";return` /**
2
+ * ${$}
3
+ *${D}
4
+ */
5
+ '${w}--${r}${v}'${x}: ${y}`}).filter(r=>r&&r?.length>0).join(`
6
+
7
+ `),i=`// This is an autogenerated file. Don't edit this file manually.
8
+ /**
9
+ * The following flags are available for the \`${a}\` command:
10
+ * @publicDocs
11
+ */
12
+ export interface ${o} {
13
+ ${e}
14
+ }
15
+ `;await c(`${d}/interfaces`),await u(`${d}/interfaces/${s}.interface.ts`,i)}export{m as a,k as b,N as c};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-IASVAERO.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
1
+ import{a as e}from"./chunk-WSDN25F5.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
@@ -1 +1 @@
1
- import{K as i}from"./chunk-BDVAE5MS.js";import{a as l}from"./chunk-QUTQDXSL.js";import{a as p}from"./chunk-FUOIGXI4.js";import{e as u,g as a}from"./chunk-VPRTJUIN.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
1
+ import{K as i}from"./chunk-6G6TMKXF.js";import{a as l}from"./chunk-QUTQDXSL.js";import{a as p}from"./chunk-FUOIGXI4.js";import{e as u,g as a}from"./chunk-VPRTJUIN.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-V2CNCPIE.js";import{g as p}from"./chunk-VPRTJUIN.js";p();var u=!1;function I(){return u}function k(){let a=0,o=!1,r=setInterval(()=>{if(!o){if(I()||a>=12e4){o=!0,clearInterval(r),c(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}a+=100}},100)}var b=async({config:t,Command:e})=>{await M(e);let{reportAnalyticsEvent:a}=await import("./analytics-6IHHYAV6.js");await a({config:t,exitMode:"ok"});let{postrun:o}=await import("./deprecations-TU5UQJVV.js");o(e);let{outputDebug:r}=await import("./output-YGMHXEIS.js"),i=e.id.replace(/:/g," ");r(`Completed command ${i}`),!i.includes("notifications")&&!i.includes("upgrade")&&await v(),u=!0};async function v(){let{versionToAutoUpgrade:t,warnIfUpgradeAvailable:e}=await import("./upgrade-OPZGPM5J.js"),a=t();if(!a){await e();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await d(a);else{let{runAtMinimumInterval:r}=await import("./conf-store-U5ZITKJN.js");await r("auto-upgrade",{days:1},async()=>{await d(a)})}}async function d(t){let[{CLI_KIT_VERSION:e},{isMajorVersionChange:a},{outputWarn:o,outputDebug:r},{getOutputUpdateCLIReminder:i,runCLIUpgrade:l,hasBlockingAutoUpgradeNotification:m},n]=await Promise.all([import("./version-KRQBMYCH.js"),import("./version-D5PJZIRW.js"),import("./output-YGMHXEIS.js"),import("./upgrade-OPZGPM5J.js"),import("./metadata-UDMOTRS7.js")]);if(a(e,t)){o(i(t,!0)),await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await m()){await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await l({autoupgrade:!0}),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let s=`Auto-upgrade failed: ${f}`;r(s),o(i(t)),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-WSCGNS2P.js"),import("./is-global-V4ZRHQG2.js")]),_=Object.assign(new Error(s),{packageManager:w(),platform:process.platform,cliVersion:e});await g(_,"expected_error")}}async function M(t){let e=new Date().getTime();if(t&&"analyticsStopCommand"in t&&typeof t.analyticsStopCommand=="function"){let a=t.analyticsStopCommand();if(a){let o=await import("./metadata-UDMOTRS7.js"),{commandStartOptions:r}=o.getAllSensitiveMetadata();if(!r)return;await o.addSensitiveMetadata(()=>({commandStartOptions:{...r,startTime:e,startCommand:a}}))}}}export{k as a,b};
1
+ import{a as c}from"./chunk-OBEWZXOQ.js";import{g as p}from"./chunk-VPRTJUIN.js";p();var u=!1;function I(){return u}function k(){let a=0,o=!1,r=setInterval(()=>{if(!o){if(I()||a>=12e4){o=!0,clearInterval(r),c(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}a+=100}},100)}var b=async({config:t,Command:e})=>{await M(e);let{reportAnalyticsEvent:a}=await import("./analytics-GG7CYCGL.js");await a({config:t,exitMode:"ok"});let{postrun:o}=await import("./deprecations-7LHRXPXU.js");o(e);let{outputDebug:r}=await import("./output-Q46DT46U.js"),i=e.id.replace(/:/g," ");r(`Completed command ${i}`),!i.includes("notifications")&&!i.includes("upgrade")&&await v(),u=!0};async function v(){let{versionToAutoUpgrade:t,warnIfUpgradeAvailable:e}=await import("./upgrade-TKUN2M5P.js"),a=t();if(!a){await e();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await d(a);else{let{runAtMinimumInterval:r}=await import("./conf-store-BMZFATRQ.js");await r("auto-upgrade",{days:1},async()=>{await d(a)})}}async function d(t){let[{CLI_KIT_VERSION:e},{isMajorVersionChange:a},{outputWarn:o,outputDebug:r},{getOutputUpdateCLIReminder:i,runCLIUpgrade:l,hasBlockingAutoUpgradeNotification:m},n]=await Promise.all([import("./version-BQJ3FPXD.js"),import("./version-5W5RVAPA.js"),import("./output-Q46DT46U.js"),import("./upgrade-TKUN2M5P.js"),import("./metadata-NOVBMKLM.js")]);if(a(e,t)){o(i(t,!0)),await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await m()){await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await l({autoupgrade:!0}),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let s=`Auto-upgrade failed: ${f}`;r(s),o(i(t)),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-PRZFHPRG.js"),import("./is-global-IOWPCT2U.js")]),_=Object.assign(new Error(s),{packageManager:w(),platform:process.platform,cliVersion:e});await g(_,"expected_error")}}async function M(t){let e=new Date().getTime();if(t&&"analyticsStopCommand"in t&&typeof t.analyticsStopCommand=="function"){let a=t.analyticsStopCommand();if(a){let o=await import("./metadata-NOVBMKLM.js"),{commandStartOptions:r}=o.getAllSensitiveMetadata();if(!r)return;await o.addSensitiveMetadata(()=>({commandStartOptions:{...r,startTime:e,startCommand:a}}))}}}export{k as a,b};
@@ -1 +1 @@
1
- import{b as E}from"./chunk-323UTVMM.js";import{b}from"./chunk-YZDDTYTU.js";import{M as F,N}from"./chunk-BDVAE5MS.js";import{r as U}from"./chunk-LDGAHMS7.js";import{Nb as k,T as C,Ta as w,ma as O,tb as n}from"./chunk-GFEAKSGV.js";import{l as R}from"./chunk-YC6G4MHD.js";import{d as u,f as P,g as x,h as g,n as T,q as y}from"./chunk-IU2ZQ6TE.js";import{e as H,g as d}from"./chunk-VPRTJUIN.js";d();d();d();d();var m=class{constructor(){this.assertions=[],this.registeredTests=[]}async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let i of this.registeredTests){this.assertions=[];let s=Date.now();try{await i.fn(),e.push({name:i.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:i.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let i=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:i,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let i=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:i,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,i){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:i??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:i??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,i){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:i??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:i??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:i??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,i){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:i??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,i){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:i??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:i??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:i??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,i){this.assertions.push({description:i,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};m.description="Doctor test suite";var p=class extends m{constructor(){super(...arguments);this.themeName="";this.themePath=""}static{this.description="Tests the theme init command creates a valid theme structure"}tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let e=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(e),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let e=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(e.map(i=>this.assertFile(u(this.themePath,i))))}),this.test("theme directories exist",async()=>{let e=["sections","snippets","assets","locales"];await Promise.all(e.map(i=>this.assertDirectory(u(this.themePath,i))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static{this.description="Tests pushing a theme to the store creates an unpublished theme"}static{this.requiresStore=!0}tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let i=await this.run(e);this.assertSuccess(i);let s=this.assertJson(i,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(o){return{workingDirectory:o.path??y(),environment:o.environment,store:o.store,password:o.password,data:{}}}d();var a=o=>k(o),v;function J(o){v=o}function G(o){if(!v)return o;let t=/\/[^\s,)]+/g;return o.replace(t,e=>T(e,v))}function A(o,t){a(""),a(n.bold(n.cyan(`Suite: ${o}`))),a(n.dim(t))}function j(o){a(n.bold(n.blue(`Running: ${o}`)))}function q(o){let t=`(${(o.duration/1e3).toFixed(2)}s)`;if(o.status==="passed"){a(n.bold(n.green(`PASSED: ${o.name} ${n.dim(t)}`)));for(let e of I(o.assertions))a(e)}else if(o.status==="failed"){a(n.red(`FAILED: ${o.name} ${n.dim(t)}`));for(let e of I(o.assertions))a(e);o.error&&a(n.red(` Error: ${G(o.error.message)}`))}else a(n.yellow(`SKIPPED: ${o.name}`))}function S(o){let t=o.filter(h=>h.status==="passed").length,e=o.filter(h=>h.status==="failed").length,i=o.filter(h=>h.status==="skipped").length,s=o.length,r=o.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),i>0&&a(` Skipped: ${n.yellow(String(i))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(o){return o.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(o){let t=[],e=_(o);J(e.workingDirectory);for(let i of Y){let s=new i,r=i.description??"Test suite";A(i.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class o extends b{static{this.description="Run all theme command doctor-release tests"}static{this.hidden=!0}static{this.flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})}}async run(){if(!R())return;let{flags:t}=await this.parse(o);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
1
+ import{b as E}from"./chunk-XR6GMMEU.js";import{b}from"./chunk-XOTA6JTZ.js";import{M as F,N}from"./chunk-6G6TMKXF.js";import{r as U}from"./chunk-LDGAHMS7.js";import{Nb as k,T as C,Ta as w,ma as O,tb as n}from"./chunk-N5PQPIBF.js";import{k as R}from"./chunk-YTNDFQJT.js";import{d as u,f as P,g as x,h as g,n as T,q as y}from"./chunk-IU2ZQ6TE.js";import{e as H,g as d}from"./chunk-VPRTJUIN.js";d();d();d();d();var m=class{constructor(){this.assertions=[],this.registeredTests=[]}async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let i of this.registeredTests){this.assertions=[];let s=Date.now();try{await i.fn(),e.push({name:i.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:i.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let i=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:i,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let i=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:i,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,i){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:i??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:i??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,i){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:i??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:i??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:i??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,i){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:i??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,i){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:i??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:i??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:i??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,i){this.assertions.push({description:i,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};m.description="Doctor test suite";var p=class extends m{constructor(){super(...arguments);this.themeName="";this.themePath=""}static{this.description="Tests the theme init command creates a valid theme structure"}tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let e=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(e),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let e=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(e.map(i=>this.assertFile(u(this.themePath,i))))}),this.test("theme directories exist",async()=>{let e=["sections","snippets","assets","locales"];await Promise.all(e.map(i=>this.assertDirectory(u(this.themePath,i))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static{this.description="Tests pushing a theme to the store creates an unpublished theme"}static{this.requiresStore=!0}tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let i=await this.run(e);this.assertSuccess(i);let s=this.assertJson(i,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(o){return{workingDirectory:o.path??y(),environment:o.environment,store:o.store,password:o.password,data:{}}}d();var a=o=>k(o),v;function J(o){v=o}function G(o){if(!v)return o;let t=/\/[^\s,)]+/g;return o.replace(t,e=>T(e,v))}function A(o,t){a(""),a(n.bold(n.cyan(`Suite: ${o}`))),a(n.dim(t))}function j(o){a(n.bold(n.blue(`Running: ${o}`)))}function q(o){let t=`(${(o.duration/1e3).toFixed(2)}s)`;if(o.status==="passed"){a(n.bold(n.green(`PASSED: ${o.name} ${n.dim(t)}`)));for(let e of I(o.assertions))a(e)}else if(o.status==="failed"){a(n.red(`FAILED: ${o.name} ${n.dim(t)}`));for(let e of I(o.assertions))a(e);o.error&&a(n.red(` Error: ${G(o.error.message)}`))}else a(n.yellow(`SKIPPED: ${o.name}`))}function S(o){let t=o.filter(h=>h.status==="passed").length,e=o.filter(h=>h.status==="failed").length,i=o.filter(h=>h.status==="skipped").length,s=o.length,r=o.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),i>0&&a(` Skipped: ${n.yellow(String(i))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(o){return o.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(o){let t=[],e=_(o);J(e.workingDirectory);for(let i of Y){let s=new i,r=i.description??"Test suite";A(i.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class o extends b{static{this.description="Run all theme command doctor-release tests"}static{this.hidden=!0}static{this.flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})}}async run(){if(!R())return;let{flags:t}=await this.parse(o);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
@@ -1 +1 @@
1
- import{b as a,g as c,i as p,j as f}from"./chunk-RFG5RMPL.js";import{g as h}from"./chunk-JPGO36XP.js";import{g as i}from"./chunk-VPRTJUIN.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
1
+ import{b as a,g as c,i as p,j as f}from"./chunk-CBXSPL4W.js";import{g as h}from"./chunk-M56NDIMD.js";import{g as i}from"./chunk-VPRTJUIN.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-NRAFVIU3.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var e=async()=>a.getAllPublicMetadata(),l=e;export{l as a};
1
+ import{a}from"./chunk-QA23HIH4.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var e=async()=>a.getAllPublicMetadata(),l=e;export{l as a};
@@ -1 +1 @@
1
- import{K as h,L as y,N as _,l as S}from"./chunk-SBEZBZM7.js";import{Y as E}from"./chunk-DJQVNH7P.js";import{z as T}from"./chunk-B2EHO7ZC.js";import{a as D}from"./chunk-JUVAGMIH.js";import{D as O,P as l,u as b}from"./chunk-BDVAE5MS.js";import{b as m,d as p,g as P}from"./chunk-JPGO36XP.js";import{Ob as z}from"./chunk-GFEAKSGV.js";import{k as C}from"./chunk-YC6G4MHD.js";import{g as d}from"./chunk-VPRTJUIN.js";d();d();async function u(e,t,r){let s=r.clientName==="app-management",n;r.supportsStoreSearch&&(n=async a=>r.devStoresForOrg(t.id,a));let o=await h({onSearchForStoresByName:n,...e,showDomainOnPrompt:s});if(!o){if(b({body:await r.getCreateDevStoreLink(t)}),await l(5),!await _(t))throw new m;let f=await I(t.id,r);o=await u({stores:f,hasMorePages:!1},t,r)}let i=await c(o,t.id,r,"prompt-first");for(;!i;){if(o=await h({stores:[o],hasMorePages:!1,showDomainOnPrompt:s}),!o)throw new m;i=await c(o,t.id,r,"prompt-first")}return o}async function I(e,t){let n=[];return await O([{title:"Fetching organization data",task:async()=>{for(let i=0;i<10;i++){let{stores:a}=await t.devStoresForOrg(e);if(a.length>0){n=a;return}await l(3)}}}]),n}async function c(e,t,r,s){if(e.transferDisabled||C())return!0;if(!e.transferDisabled&&!e.convertableToPartnerTest)throw new p(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store.");switch(s){case"prompt-first":return await y()?(await A(e,t,r),!0):!1;case"never":throw new p("The store you specified is not transfer-disabled","Try running 'dev --reset' and selecting a different store, or choosing to convert this one.")}}async function A(e,t,r){let s={input:{organizationID:parseInt(t,10),shopId:e.shopId}},n=await r.convertToTransferDisabledStore(s);if(!n.convertDevToTestStore.convertedToTestStore){let o=n.convertDevToTestStore.userErrors.map(i=>i.message).join(", ");throw new P(`Error converting store ${e.shopDomain} to a transfer-disabled store: ${o}`,"This store might not be compatible with draft apps, please try a different store")}z(`Converted ${e.shopDomain} to a transfer-disabled store`)}async function Z({appContextResult:e,storeFqdn:t,forceReselectStore:r,storeTypes:s=["APP_DEVELOPMENT"]}){let{app:n,organization:o,developerPlatformClient:i}=e,a,f=n.configuration.build?.dev_store_url,g=n.hiddenConfig.dev_store_url,v=f??g,w=t??(r?void 0:v),F=s.length===1&&s[0]==="APP_DEVELOPMENT";if(w)a=await E(o,w,i,s),F&&await c(a,o.id,i,"never");else{let x=await i.devStoresForOrg(o.id);a=await u(x,o,i)}return await M(a,r),a.shopDomain=T(a.shopDomain),(a.shopDomain!==v||!g)&&await n.updateHiddenConfig({dev_store_url:a.shopDomain}),await i.ensureUserAccessToStore(o.id,a),a}async function M(e,t){await S.addPublicMetadata(()=>({cmd_app_reset_used:t,store_fqdn_hash:D(e.shopDomain)})),await S.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{Z as a};
1
+ import{K as h,L as y,N as _,l as S}from"./chunk-54CAKCYR.js";import{Y as E}from"./chunk-7ESSIN27.js";import{z as T}from"./chunk-XONFGLJQ.js";import{a as D}from"./chunk-JUVAGMIH.js";import{D as O,P as l,u as b}from"./chunk-6G6TMKXF.js";import{b as m,d as p,g as P}from"./chunk-M56NDIMD.js";import{Ob as z}from"./chunk-N5PQPIBF.js";import{j as C}from"./chunk-YTNDFQJT.js";import{g as d}from"./chunk-VPRTJUIN.js";d();d();async function u(e,t,r){let s=r.clientName==="app-management",n;r.supportsStoreSearch&&(n=async a=>r.devStoresForOrg(t.id,a));let o=await h({onSearchForStoresByName:n,...e,showDomainOnPrompt:s});if(!o){if(b({body:await r.getCreateDevStoreLink(t)}),await l(5),!await _(t))throw new m;let f=await I(t.id,r);o=await u({stores:f,hasMorePages:!1},t,r)}let i=await c(o,t.id,r,"prompt-first");for(;!i;){if(o=await h({stores:[o],hasMorePages:!1,showDomainOnPrompt:s}),!o)throw new m;i=await c(o,t.id,r,"prompt-first")}return o}async function I(e,t){let n=[];return await O([{title:"Fetching organization data",task:async()=>{for(let i=0;i<10;i++){let{stores:a}=await t.devStoresForOrg(e);if(a.length>0){n=a;return}await l(3)}}}]),n}async function c(e,t,r,s){if(e.transferDisabled||C())return!0;if(!e.transferDisabled&&!e.convertableToPartnerTest)throw new p(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store.");switch(s){case"prompt-first":return await y()?(await A(e,t,r),!0):!1;case"never":throw new p("The store you specified is not transfer-disabled","Try running 'dev --reset' and selecting a different store, or choosing to convert this one.")}}async function A(e,t,r){let s={input:{organizationID:parseInt(t,10),shopId:e.shopId}},n=await r.convertToTransferDisabledStore(s);if(!n.convertDevToTestStore.convertedToTestStore){let o=n.convertDevToTestStore.userErrors.map(i=>i.message).join(", ");throw new P(`Error converting store ${e.shopDomain} to a transfer-disabled store: ${o}`,"This store might not be compatible with draft apps, please try a different store")}z(`Converted ${e.shopDomain} to a transfer-disabled store`)}async function Z({appContextResult:e,storeFqdn:t,forceReselectStore:r,storeTypes:s=["APP_DEVELOPMENT"]}){let{app:n,organization:o,developerPlatformClient:i}=e,a,f=n.configuration.build?.dev_store_url,g=n.hiddenConfig.dev_store_url,v=f??g,w=t??(r?void 0:v),F=s.length===1&&s[0]==="APP_DEVELOPMENT";if(w)a=await E(o,w,i,s),F&&await c(a,o.id,i,"never");else{let x=await i.devStoresForOrg(o.id);a=await u(x,o,i)}return await M(a,r),a.shopDomain=T(a.shopDomain),(a.shopDomain!==v||!g)&&await n.updateHiddenConfig({dev_store_url:a.shopDomain}),await i.ensureUserAccessToStore(o.id,a),a}async function M(e,t){await S.addPublicMetadata(()=>({cmd_app_reset_used:t,store_fqdn_hash:D(e.shopDomain)})),await S.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{Z as a};
@@ -0,0 +1,3 @@
1
+ import{a as R}from"./chunk-VBUZWRUL.js";import{e as l}from"./chunk-6G6TMKXF.js";import{f as I}from"./chunk-WSDN25F5.js";import{d as n}from"./chunk-M56NDIMD.js";import{Ea as b,Gb as a,Ib as s,Qb as f,Ta as G,Wa as C}from"./chunk-N5PQPIBF.js";import{a as k,r as w}from"./chunk-YTNDFQJT.js";import{q as g}from"./chunk-IU2ZQ6TE.js";import{e as D,g as $}from"./chunk-VPRTJUIN.js";$();var A=D(R());async function r(t,e){try{return(await l("git",t,{cwd:e})).stdout}catch(o){if(o instanceof Error){let i=new n(o.message);throw i.stack=o.stack,"exitCode"in o&&Object.assign(i,{exitCode:o.exitCode}),i}throw o}}async function K(t,e="main"){f(s`Initializing git repository at ${a.path(t)}...`),await h(),await r(["init"],t),await r(["checkout","-b",e],t)}async function Q(t,e){try{return(await r(["check-ignore",...e],t)).split(`
2
+ `).filter(Boolean)}catch(o){if(o instanceof n&&"exitCode"in o&&o.exitCode===1)return[];throw o}}async function V(t){return I("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:o,shallow:i,latestTag:m}=t;if(f(s`Git-cloning repository ${e} into ${a.path(o)}...`),await h(),await G(o)){if(!await b(o))throw new n(s`Can't clone to ${a.path(o)}`,"The path exists but isn't a directory.");if((await C(["*",".*"],{cwd:o,deep:1,onlyFiles:!1})).length>0)throw new n(s`Directory ${a.path(o)} already exists and is not empty`,s`Choose a different name or remove the existing directory first.`)}let[v,d]=e.split("#");if(d&&m)throw new n("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(i&&m)throw new n("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let u=["clone","--recurse-submodules"];d&&u.push("--branch",d),i&&u.push("--depth","1"),k()||u.push("-c","core.askpass=true"),u.push(v,o);try{if(await l("git",u),m){let c=await S(o,e);await r(["checkout",c],o)}}catch(c){if(c instanceof n)throw c;if(c instanceof Error){let x=new n(c.message);throw x.stack=c.stack,x}throw c}})}async function S(t,e){let o=await F(t);if(!o)throw new n(`Couldn't obtain the most recent tag of the repository ${e}`);return o}async function X(t){let o=await r(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!o.trim())throw new n("Must have at least one commit to run command",s`Run ${a.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let i=o.split("\0");return{hash:i[0],date:i[1],message:i[2],refs:i[3],body:i[4],author_name:i[5],author_email:i[6]}}async function Y(t){await r(["add","--all"],t)}async function Z(t,e){let o=["commit","-m",t];return e?.author&&o.push("--author",e.author),await r(o,e?.directory),(await r(["rev-parse","HEAD"],e?.directory)).trim()}async function h(){if(!await w())throw new n("Git is necessary in the environment to continue",s`Install ${a.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var p=class extends n{};async function N(t){if(await h(),!await E(t))throw new p(`${a.path(t??g())} is not a Git directory`)}async function tt(t){return await w()?E(t):!1}async function E(t){try{return await l("git",["rev-parse","--git-dir"],{cwd:t}),!0}catch(e){if(e instanceof Error&&"exitCode"in e&&e.exitCode===128)return!1;throw e}}var y=class extends n{};async function et(t){if(!await T(t))throw new y(`${a.path(t??g())} is not a clean Git directory`)}async function T(t){return(await r(["status","--porcelain"],t)).trim()===""}async function F(t){try{return(await r(["describe","--tags","--abbrev=0"],t)).trim()||void 0}catch(e){if(e instanceof n&&"exitCode"in e&&e.exitCode===128)return;throw e}}async function ot(t,e="origin"){if(f(s`Removing git remote ${e} from ${a.path(t)}...`),await h(),!(await r(["remote"],t)).split(`
3
+ `).filter(Boolean).includes(e)){f(s`Remote ${e} does not exist, no action needed`);return}await r(["remote","remove",e],t)}export{K as a,Q as b,V as c,X as d,Y as e,Z as f,N as g,tt as h,y as i,et as j,T as k,ot as l};
@@ -1 +1 @@
1
- import{Ba as C,n as w}from"./chunk-SBEZBZM7.js";import{B as I}from"./chunk-BDVAE5MS.js";import{d as s}from"./chunk-JPGO36XP.js";import{r as D}from"./chunk-LDGAHMS7.js";import{Ib as f,Mb as T,Nb as P,Ta as d,ua as F}from"./chunk-GFEAKSGV.js";import{a as v}from"./chunk-YC6G4MHD.js";import{d as p,f as y,q as S}from"./chunk-IU2ZQ6TE.js";import{e as G,g as m}from"./chunk-VPRTJUIN.js";m();async function x(i){let{extension:t,stdout:n,developerPlatformClient:r,app:o,orgId:e}=i,c=o.configuration.client_id,{api_version:a,type:l,targeting:u}=t.configuration,b=await(!!u?.length?E({localIdentifier:t.localIdentifier,developerPlatformClient:r,apiKey:c,target:u[0].target,version:a,orgId:e}):O({localIdentifier:t.localIdentifier,developerPlatformClient:r,apiKey:c,type:l,version:a,orgId:e})),h=w(b,a);if(n)T(h);else{let g=p(t.directory,"schema.graphql");await F(g,h),P(`GraphQL Schema for ${t.localIdentifier} written to ${g}`)}}async function E({localIdentifier:i,developerPlatformClient:t,apiKey:n,target:r,version:o,orgId:e}){let c={handle:r,version:o},a=await t.targetSchemaDefinition(c,n,e);if(!a)throw new s(f`A schema could not be generated for ${i}`,f`Check that the Function targets and version are valid.`);return a}async function O({localIdentifier:i,developerPlatformClient:t,apiKey:n,version:r,type:o,orgId:e}){let c={version:r,type:o},a=await t.apiSchemaDefinition(c,n,e);if(!a)throw new s(f`A schema could not be generated for ${i}`,f`Check that the Function API type and version are valid.`);return a}m();var A=G(D(),1);var J={path:A.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async i=>y(i),default:async()=>S(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(i,t){let n=i.allExtensions.filter(o=>o.isFunctionExtension),r=n.find(o=>o.directory===t);if(r)return r;if(n.length===1&&n[0])return n[0];if(v())return await I({message:"Which function?",choices:n.map(e=>({label:e.handle,value:e}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(i,t,n,r,o){let e=p(i.directory,"schema.graphql");if(await d(e))return e;let{app:c,developerPlatformClient:a,organization:l}=await C({directory:t,clientId:n,forceRelink:r,userProvidedConfigName:o});return await x({app:c,developerPlatformClient:a,extension:i,stdout:!1,orgId:l.id}),await d(e)?e:void 0}export{x as a,J as b,M as c,N as d};
1
+ import{Ba as C,n as w}from"./chunk-54CAKCYR.js";import{B as I}from"./chunk-6G6TMKXF.js";import{d as s}from"./chunk-M56NDIMD.js";import{r as D}from"./chunk-LDGAHMS7.js";import{Ib as f,Mb as T,Nb as P,Ta as d,ua as F}from"./chunk-N5PQPIBF.js";import{a as v}from"./chunk-YTNDFQJT.js";import{d as p,f as y,q as S}from"./chunk-IU2ZQ6TE.js";import{e as G,g as m}from"./chunk-VPRTJUIN.js";m();async function x(i){let{extension:t,stdout:n,developerPlatformClient:r,app:o,orgId:e}=i,c=o.configuration.client_id,{api_version:a,type:l,targeting:u}=t.configuration,b=await(!!u?.length?E({localIdentifier:t.localIdentifier,developerPlatformClient:r,apiKey:c,target:u[0].target,version:a,orgId:e}):O({localIdentifier:t.localIdentifier,developerPlatformClient:r,apiKey:c,type:l,version:a,orgId:e})),h=w(b,a);if(n)T(h);else{let g=p(t.directory,"schema.graphql");await F(g,h),P(`GraphQL Schema for ${t.localIdentifier} written to ${g}`)}}async function E({localIdentifier:i,developerPlatformClient:t,apiKey:n,target:r,version:o,orgId:e}){let c={handle:r,version:o},a=await t.targetSchemaDefinition(c,n,e);if(!a)throw new s(f`A schema could not be generated for ${i}`,f`Check that the Function targets and version are valid.`);return a}async function O({localIdentifier:i,developerPlatformClient:t,apiKey:n,version:r,type:o,orgId:e}){let c={version:r,type:o},a=await t.apiSchemaDefinition(c,n,e);if(!a)throw new s(f`A schema could not be generated for ${i}`,f`Check that the Function API type and version are valid.`);return a}m();var A=G(D(),1);var J={path:A.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async i=>y(i),default:async()=>S(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(i,t){let n=i.allExtensions.filter(o=>o.isFunctionExtension),r=n.find(o=>o.directory===t);if(r)return r;if(n.length===1&&n[0])return n[0];if(v())return await I({message:"Which function?",choices:n.map(e=>({label:e.handle,value:e}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(i,t,n,r,o){let e=p(i.directory,"schema.graphql");if(await d(e))return e;let{app:c,developerPlatformClient:a,organization:l}=await C({directory:t,clientId:n,forceRelink:r,userProvidedConfigName:o});return await x({app:c,developerPlatformClient:a,extension:i,stdout:!1,orgId:l.id}),await d(e)?e:void 0}export{x as a,J as b,M as c,N as d};
@@ -1 +1 @@
1
- import{c as u}from"./chunk-HUZUORYM.js";import{w as c}from"./chunk-BDVAE5MS.js";import{e as s}from"./chunk-IASVAERO.js";import{$a as d}from"./chunk-GFEAKSGV.js";import{q as m}from"./chunk-IU2ZQ6TE.js";import{g as f}from"./chunk-VPRTJUIN.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
1
+ import{c as u}from"./chunk-4DCQNGUV.js";import{w as c}from"./chunk-6G6TMKXF.js";import{e as s}from"./chunk-WSDN25F5.js";import{$a as d}from"./chunk-N5PQPIBF.js";import{q as m}from"./chunk-IU2ZQ6TE.js";import{g as f}from"./chunk-VPRTJUIN.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
@@ -1 +1 @@
1
- import{Q as r}from"./chunk-B2EHO7ZC.js";import{b as c}from"./chunk-YZDDTYTU.js";import{Ob as a}from"./chunk-GFEAKSGV.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var o=class extends c{static{this.description="Logs you out of the Shopify account or Partner account and store."}async run(){await r(),a("Logged out from all the accounts")}};export{o as a};
1
+ import{Q as r}from"./chunk-XONFGLJQ.js";import{b as c}from"./chunk-XOTA6JTZ.js";import{Ob as a}from"./chunk-N5PQPIBF.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var o=class extends c{static{this.description="Logs you out of the Shopify account or Partner account and store."}async run(){await r(),a("Logged out from all the accounts")}};export{o as a};