shopify 5.0.0 → 5.0.2

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 (330) hide show
  1. package/dist/{analytics-Q6QDIDYT.js → analytics-NMMVOF4B.js} +1 -1
  2. package/dist/{analytics-VKKJNJ62.js → analytics-UK77WNLG.js} +1 -1
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-Q5MEFIMV.js → chunk-224UPIYS.js} +1 -1
  5. package/dist/{chunk-XBQDMGUN.js → chunk-26PWHH3B.js} +1 -1
  6. package/dist/{chunk-46MSIQ6Z.js → chunk-27NXPOAS.js} +1 -1
  7. package/dist/{chunk-SFPXYHHL.js → chunk-2A2JSAAA.js} +1 -1
  8. package/dist/{chunk-P33TONYG.js → chunk-2L6AN3QA.js} +1 -1
  9. package/dist/{chunk-43KLFFP7.js → chunk-2MT3LSMZ.js} +1 -1
  10. package/dist/{chunk-PGLWZMJU.js → chunk-2T4HDR6R.js} +1 -1
  11. package/dist/{chunk-5UWMXOHM.js → chunk-2WJOTJOD.js} +1 -1
  12. package/dist/{chunk-HIRTL45Q.js → chunk-2ZBXHCQZ.js} +1 -1
  13. package/dist/chunk-33ZE3DRQ.js +16 -0
  14. package/dist/{chunk-WFWISGLS.js → chunk-34MOWGRL.js} +1 -1
  15. package/dist/{chunk-AXC2MHHO.js → chunk-35XFNKNB.js} +1 -1
  16. package/dist/{chunk-LHKVXJPX.js → chunk-3JSKNXL7.js} +1 -1
  17. package/dist/{chunk-Q2SZCZE7.js → chunk-3KM5ZOW2.js} +1 -1
  18. package/dist/{chunk-KJQDS5HI.js → chunk-3MG4MTWQ.js} +1 -1
  19. package/dist/{chunk-MDRVCBDO.js → chunk-3MYDSQHF.js} +1 -1
  20. package/dist/{chunk-MYAIWSOO.js → chunk-3ODQKAEA.js} +1 -1
  21. package/dist/{chunk-6DXP7PQ7.js → chunk-3XRI3D44.js} +1 -1
  22. package/dist/{chunk-KGRIYAMA.js → chunk-3Z3MADXZ.js} +1 -1
  23. package/dist/{chunk-GB6E3ATN.js → chunk-4KECSZTL.js} +1 -1
  24. package/dist/{chunk-G6ZMSWEU.js → chunk-4WYKPIN3.js} +1 -1
  25. package/dist/{chunk-M3ACZWMR.js → chunk-5AEZJZNQ.js} +1 -1
  26. package/dist/chunk-5ED7SOQZ.js +20 -0
  27. package/dist/{chunk-FFHH5LOR.js → chunk-5IDJALJH.js} +1 -1
  28. package/dist/{chunk-GXORLBVN.js → chunk-62EOM3Y2.js} +1 -1
  29. package/dist/{chunk-EXFBZPZS.js → chunk-64G5TGFF.js} +1 -1
  30. package/dist/{chunk-QN3774QI.js → chunk-66TMIQMB.js} +1 -1
  31. package/dist/{chunk-L7MSPGDS.js → chunk-67L7FIB6.js} +1 -1
  32. package/dist/{chunk-7UOA4DI7.js → chunk-6ES4KRFW.js} +1 -1
  33. package/dist/{chunk-XMODGI45.js → chunk-74NRFUGQ.js} +1 -1
  34. package/dist/{chunk-YVY32DNA.js → chunk-7CCTPBCT.js} +1 -1
  35. package/dist/{chunk-2DID73ML.js → chunk-7GUMJ5E4.js} +1 -1
  36. package/dist/{chunk-IUTZIN2T.js → chunk-7NFTSBHQ.js} +1 -1
  37. package/dist/{chunk-TPSA4JN5.js → chunk-ACZNWIRY.js} +1 -1
  38. package/dist/{chunk-CCMDZX35.js → chunk-AQ6EVL73.js} +1 -1
  39. package/dist/{chunk-7WPUV7GY.js → chunk-AQKWPRZE.js} +1 -1
  40. package/dist/chunk-AUE7LM32.js +1 -0
  41. package/dist/{chunk-PIAD3F6M.js → chunk-AXL2VIWA.js} +1 -1
  42. package/dist/{chunk-CVVQQLCF.js → chunk-B2O3ANRZ.js} +1 -1
  43. package/dist/chunk-B3ZJGYZY.js +3 -0
  44. package/dist/{chunk-4SS6DXC7.js → chunk-BWN2QG6D.js} +1 -1
  45. package/dist/{chunk-6BNKBCCU.js → chunk-C3RFAKWR.js} +1 -1
  46. package/dist/{chunk-SNNZ4U2W.js → chunk-CCUQM4FX.js} +1 -1
  47. package/dist/{chunk-EITIW5OX.js → chunk-CGVROSPS.js} +1 -1
  48. package/dist/{chunk-7QUZWCJZ.js → chunk-CLUUA3HX.js} +1 -1
  49. package/dist/{chunk-X7HVAVSZ.js → chunk-CXI3RHPW.js} +1 -1
  50. package/dist/chunk-CYEEGTVZ.js +11 -0
  51. package/dist/{chunk-CZ22VZDA.js → chunk-D2KIGKBI.js} +108 -108
  52. package/dist/chunk-DBDTE3EE.js +5 -0
  53. package/dist/{chunk-YKS7MH3F.js → chunk-DLVB3237.js} +1 -1
  54. package/dist/{chunk-UZROQRLX.js → chunk-DN6X7SHW.js} +1 -1
  55. package/dist/{chunk-OGWPS55W.js → chunk-DZKFP6H2.js} +1 -1
  56. package/dist/{chunk-S67I4E7M.js → chunk-E5COIKGY.js} +1 -1
  57. package/dist/{chunk-CW2T7EOQ.js → chunk-E6RONHMT.js} +1 -1
  58. package/dist/{chunk-2CMEKSI7.js → chunk-EAZIQI2D.js} +1 -1
  59. package/dist/{chunk-FNLECT7B.js → chunk-EEY4FKAW.js} +1 -1
  60. package/dist/{chunk-YGYEM6QO.js → chunk-EKFPTBXC.js} +1 -1
  61. package/dist/{chunk-VW6QS7DO.js → chunk-ER6C5WS3.js} +1 -1
  62. package/dist/{chunk-MR2AUT7Q.js → chunk-ESFCYB46.js} +1 -1
  63. package/dist/{chunk-GRGFA26K.js → chunk-F3CK3EJJ.js} +1 -1
  64. package/dist/{chunk-M4BVLMPH.js → chunk-FEBOZ2XX.js} +1 -1
  65. package/dist/{chunk-5OMJFPQW.js → chunk-GNCVDN7U.js} +1 -1
  66. package/dist/{chunk-H4V55Y3Z.js → chunk-GQLNG537.js} +83 -83
  67. package/dist/{chunk-IEQ4UOH3.js → chunk-GVI3DWSB.js} +1 -1
  68. package/dist/{chunk-DFQ4WTET.js → chunk-GW7YIJPJ.js} +1 -1
  69. package/dist/{chunk-SFQEHDJY.js → chunk-H6GNKWYM.js} +1 -1
  70. package/dist/{chunk-5TB52UUV.js → chunk-H6GYBLVQ.js} +1 -1
  71. package/dist/chunk-HSKDFEXW.js +1 -0
  72. package/dist/{chunk-JYMDWR25.js → chunk-HTRJU4R4.js} +1 -1
  73. package/dist/{chunk-EMSF57ZB.js → chunk-HXZAY5OA.js} +1 -1
  74. package/dist/{chunk-WJSUIUBW.js → chunk-I4CEH7AK.js} +1 -1
  75. package/dist/{chunk-4ARCB6DT.js → chunk-I7PEEJVH.js} +1 -1
  76. package/dist/{chunk-CCQNP5YR.js → chunk-IHMATNOR.js} +1 -1
  77. package/dist/{chunk-N2RFDHRY.js → chunk-IHXGZW42.js} +1 -1
  78. package/dist/chunk-IJY3RJPJ.js +47 -0
  79. package/dist/{chunk-52FDK2LC.js → chunk-ISKQQXLZ.js} +1 -1
  80. package/dist/{chunk-UVRKTMF7.js → chunk-J55GQLP4.js} +1 -1
  81. package/dist/{chunk-3LVCG4JB.js → chunk-J5ERDFIC.js} +1 -1
  82. package/dist/{chunk-LWCTKI4Z.js → chunk-JLQRDFR5.js} +3 -3
  83. package/dist/{chunk-HCZG7YJ6.js → chunk-JPWRZ5SL.js} +1 -1
  84. package/dist/{chunk-BWRNXCVN.js → chunk-K7ZSPQKL.js} +1 -1
  85. package/dist/{chunk-4GCI2YCZ.js → chunk-KNWT7JLL.js} +1 -1
  86. package/dist/{chunk-U25W35TX.js → chunk-KZRLZWOU.js} +1 -1
  87. package/dist/chunk-L5TSPCSY.js +26 -0
  88. package/dist/{chunk-J6TW43TG.js → chunk-LEHBZKK3.js} +1 -1
  89. package/dist/chunk-LGXI7EGM.js +8 -0
  90. package/dist/{chunk-3A3DZVEJ.js → chunk-LHXFTFFM.js} +1 -1
  91. package/dist/{chunk-4RDFMBRG.js → chunk-LUGMXSRI.js} +1 -1
  92. package/dist/chunk-M2CWCOFU.js +11 -0
  93. package/dist/{chunk-2VSNFOKD.js → chunk-M5VIFG2V.js} +1 -1
  94. package/dist/{chunk-IWEKM5Y3.js → chunk-MADINS4Z.js} +1 -1
  95. package/dist/{chunk-VMMUJN4T.js → chunk-MEYVUHQH.js} +1 -1
  96. package/dist/{chunk-PEVIRAMR.js → chunk-MGHPF7HU.js} +1 -1
  97. package/dist/{chunk-ZT5WFUKJ.js → chunk-MHR5OHT5.js} +1 -1
  98. package/dist/{chunk-5NEGOQT6.js → chunk-MXEXP3HT.js} +1 -1
  99. package/dist/{chunk-IQVRP7CT.js → chunk-N57Y7THE.js} +1 -1
  100. package/dist/{chunk-FWB3GLMW.js → chunk-NVKJ7ZLP.js} +1 -1
  101. package/dist/{chunk-GQNOVEKP.js → chunk-NXAEBGMO.js} +1 -1
  102. package/dist/{chunk-PYIICTLX.js → chunk-OJULL7HT.js} +1 -1
  103. package/dist/{chunk-SL3VBI62.js → chunk-OMPQ7REW.js} +1 -1
  104. package/dist/{chunk-NK2MGR6A.js → chunk-OR4IJ4BQ.js} +1 -1
  105. package/dist/{chunk-CIK5BF7V.js → chunk-P2RMFHQP.js} +1 -1
  106. package/dist/{chunk-R7EMV77H.js → chunk-P4VZYOKO.js} +2 -2
  107. package/dist/{chunk-NDKSG4CC.js → chunk-PDZBKVWL.js} +1 -1
  108. package/dist/{chunk-QKVVJXWS.js → chunk-PF53E2DC.js} +1 -1
  109. package/dist/{chunk-XNNKLUTN.js → chunk-PLSS456F.js} +1 -1
  110. package/dist/{chunk-XM7YUXTF.js → chunk-PTSCGSQV.js} +2 -2
  111. package/dist/{chunk-KSDU4YOB.js → chunk-PWAT52M4.js} +1 -1
  112. package/dist/{chunk-NOH63WC6.js → chunk-Q2KWXZQB.js} +1 -1
  113. package/dist/{chunk-EGCWR5AS.js → chunk-Q4JYAUVL.js} +1 -1
  114. package/dist/{chunk-4CRBTSVP.js → chunk-Q5IC3IYY.js} +1 -1
  115. package/dist/{chunk-Z5SILNH2.js → chunk-QDCLL5OI.js} +1 -1
  116. package/dist/{chunk-VB7YQMAM.js → chunk-QEKGGTMN.js} +1 -1
  117. package/dist/{chunk-BJPDJIS4.js → chunk-QEVTBD33.js} +1 -1
  118. package/dist/{chunk-PZUGDE7N.js → chunk-QF5WKTPD.js} +1 -1
  119. package/dist/{chunk-7NSK77WG.js → chunk-QFSENE5T.js} +1 -1
  120. package/dist/{chunk-IUP7POIE.js → chunk-QQJNQNKP.js} +1 -1
  121. package/dist/{chunk-PSSYLJG4.js → chunk-QW52RPAU.js} +1 -1
  122. package/dist/{chunk-ULD7CIOY.js → chunk-R4UVIYZP.js} +1 -1
  123. package/dist/{chunk-M5TGCSUK.js → chunk-RLNIOJH3.js} +1 -1
  124. package/dist/{chunk-ZYQ2XWC5.js → chunk-RPCIFYCY.js} +1 -1
  125. package/dist/{chunk-C3KEDG33.js → chunk-RPVZ2JON.js} +1 -1
  126. package/dist/{chunk-I4OVLRQR.js → chunk-RW6G4ZPU.js} +1 -1
  127. package/dist/{chunk-4GOJQKY5.js → chunk-S4LOWCGS.js} +1 -1
  128. package/dist/{chunk-OQU3HLAE.js → chunk-S5P7KWY4.js} +1 -1
  129. package/dist/{chunk-UWMZ5CSB.js → chunk-SACNUF4I.js} +1 -1
  130. package/dist/chunk-SB27UOXX.js +1 -0
  131. package/dist/{chunk-YVVU4J5O.js → chunk-SHD4VV5V.js} +1 -1
  132. package/dist/{chunk-M7LPHCP2.js → chunk-SIL6HPMK.js} +2 -2
  133. package/dist/{chunk-AJMDF3QC.js → chunk-SK7EPN6C.js} +1 -1
  134. package/dist/{chunk-XITZIDCL.js → chunk-SLY27GDC.js} +1 -1
  135. package/dist/{chunk-C7V755IT.js → chunk-SNH4XZ6E.js} +1 -1
  136. package/dist/{chunk-POKY4RWR.js → chunk-T4XJKM6B.js} +1 -1
  137. package/dist/{chunk-7MVWDCI3.js → chunk-TAWCKJKP.js} +1 -1
  138. package/dist/{chunk-BCYTZ7LM.js → chunk-TFPW2VGN.js} +1 -1
  139. package/dist/{chunk-UOS2XLGG.js → chunk-TODZ3TJR.js} +1 -1
  140. package/dist/chunk-U2T5HPRD.js +319 -0
  141. package/dist/{chunk-XTREQ4A2.js → chunk-U6YOP562.js} +1 -1
  142. package/dist/{chunk-53BG3NLH.js → chunk-UBP3LQFY.js} +1 -1
  143. package/dist/{chunk-GFVKTWFT.js → chunk-UKWIWCOH.js} +1 -1
  144. package/dist/{chunk-GAMC2BNY.js → chunk-UPPO3BMT.js} +1 -1
  145. package/dist/{chunk-Q2XRITUG.js → chunk-URXM5A2K.js} +1 -1
  146. package/dist/chunk-USXIXANP.js +103 -0
  147. package/dist/{chunk-R2BDABJD.js → chunk-UUAKOX7E.js} +1 -1
  148. package/dist/{chunk-WGUOLSMG.js → chunk-UV5GAGAD.js} +1 -1
  149. package/dist/{chunk-AYL6KBPE.js → chunk-UXVXVI6O.js} +1 -1
  150. package/dist/{chunk-VWH3VPYI.js → chunk-UY6W2EVZ.js} +1 -1
  151. package/dist/{chunk-BVSKBX7T.js → chunk-UYELAINQ.js} +1 -1
  152. package/dist/{chunk-KDPQXURV.js → chunk-VAVXDIUX.js} +1 -1
  153. package/dist/{chunk-OX7UVDSU.js → chunk-VEUKT5EI.js} +1 -1
  154. package/dist/chunk-VGSH52JM.js +1 -0
  155. package/dist/chunk-VHZ6RL67.js +1 -0
  156. package/dist/{chunk-UK6576EO.js → chunk-VQA3X7O3.js} +1 -1
  157. package/dist/{chunk-TTEF7GTX.js → chunk-VZCMJRYV.js} +1 -1
  158. package/dist/{chunk-3G4HJO72.js → chunk-W37IFK3P.js} +1 -1
  159. package/dist/{chunk-LMQGNECW.js → chunk-W56ZGEQQ.js} +1 -1
  160. package/dist/{chunk-GCNA3HXH.js → chunk-WBVS5NBV.js} +1 -1
  161. package/dist/{chunk-XKRJKUA7.js → chunk-WCC52MR2.js} +1 -1
  162. package/dist/{chunk-LDU5T3DN.js → chunk-WESTVWWD.js} +1 -1
  163. package/dist/{chunk-24NUJTIH.js → chunk-WRZWHT6M.js} +1 -1
  164. package/dist/{chunk-4TI7U2PN.js → chunk-WSDKCQH6.js} +1 -1
  165. package/dist/{chunk-UIQL5ZF3.js → chunk-X2PFXSU4.js} +1 -1
  166. package/dist/{chunk-NB4BRW3H.js → chunk-X5NIAZA4.js} +1 -1
  167. package/dist/{chunk-RFGEM5JC.js → chunk-XBMD3FEZ.js} +1 -1
  168. package/dist/{chunk-I6FRVYGE.js → chunk-XDVPIGXE.js} +1 -1
  169. package/dist/chunk-XLIJYJ6Q.js +1 -0
  170. package/dist/chunk-XUHGWIWW.js +4 -0
  171. package/dist/{chunk-2ORRV7GH.js → chunk-XWSWXQCC.js} +1 -1
  172. package/dist/{chunk-Q66CI37F.js → chunk-Y55T4IIQ.js} +1 -1
  173. package/dist/{chunk-WMAFG2JD.js → chunk-Y5CVX5LJ.js} +1 -1
  174. package/dist/{chunk-VHUD3CBC.js → chunk-Y6J46XYF.js} +1 -1
  175. package/dist/{chunk-DJAZBPYA.js → chunk-YKMINHYY.js} +1 -1
  176. package/dist/{chunk-KKPOOIE4.js → chunk-YSWVYPWR.js} +1 -1
  177. package/dist/{chunk-D7NB7YR6.js → chunk-YV2TP44L.js} +1 -1
  178. package/dist/{chunk-7IFE4UQY.js → chunk-Z2WAW6MM.js} +1 -1
  179. package/dist/chunk-ZBL7XMJ6.js +25 -0
  180. package/dist/{chunk-YTUDXZLN.js → chunk-ZGBTO46A.js} +1 -1
  181. package/dist/{chunk-ZQDDRIBA.js → chunk-ZJOX5HW4.js} +4 -4
  182. package/dist/{chunk-MXJAH2GW.js → chunk-ZOOT3GBY.js} +1 -1
  183. package/dist/{chunk-ZAA2DXK5.js → chunk-ZRI3SSLG.js} +1 -1
  184. package/dist/cli/commands/app/build.js +1 -1
  185. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  186. package/dist/cli/commands/app/bulk/execute.js +1 -1
  187. package/dist/cli/commands/app/bulk/status.js +1 -1
  188. package/dist/cli/commands/app/config/link.js +1 -1
  189. package/dist/cli/commands/app/config/pull.js +1 -1
  190. package/dist/cli/commands/app/config/use.js +1 -1
  191. package/dist/cli/commands/app/config/validate.js +1 -1
  192. package/dist/cli/commands/app/demo/watcher.js +1 -1
  193. package/dist/cli/commands/app/deploy.js +1 -1
  194. package/dist/cli/commands/app/dev/clean.js +1 -1
  195. package/dist/cli/commands/app/dev.js +1 -1
  196. package/dist/cli/commands/app/env/pull.js +1 -1
  197. package/dist/cli/commands/app/env/show.js +1 -1
  198. package/dist/cli/commands/app/execute.js +1 -1
  199. package/dist/cli/commands/app/function/build.js +1 -1
  200. package/dist/cli/commands/app/function/info.js +1 -1
  201. package/dist/cli/commands/app/function/replay.js +1 -1
  202. package/dist/cli/commands/app/function/run.js +1 -1
  203. package/dist/cli/commands/app/function/schema.js +1 -1
  204. package/dist/cli/commands/app/function/typegen.js +1 -1
  205. package/dist/cli/commands/app/generate/extension.js +1 -1
  206. package/dist/cli/commands/app/graphiql.js +1 -1
  207. package/dist/cli/commands/app/import/channel-config.js +1 -1
  208. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  209. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  210. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  211. package/dist/cli/commands/app/import-extensions.js +1 -1
  212. package/dist/cli/commands/app/info.js +1 -1
  213. package/dist/cli/commands/app/init.js +1 -1
  214. package/dist/cli/commands/app/logs.js +1 -1
  215. package/dist/cli/commands/app/release.js +1 -1
  216. package/dist/cli/commands/app/security/check.js +1 -1
  217. package/dist/cli/commands/app/security/clean.js +1 -1
  218. package/dist/cli/commands/app/security/instructions.js +1 -1
  219. package/dist/cli/commands/app/security/record.js +1 -1
  220. package/dist/cli/commands/app/security/review.js +1 -1
  221. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  222. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  223. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  224. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  225. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  226. package/dist/cli/commands/app/versions/list.js +1 -1
  227. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  228. package/dist/cli/commands/auth/login.js +1 -1
  229. package/dist/cli/commands/auth/logout.js +1 -1
  230. package/dist/cli/commands/cache/clear.js +1 -1
  231. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  232. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  233. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  234. package/dist/cli/commands/debug/command-flags.js +1 -1
  235. package/dist/cli/commands/doc/fetch.js +1 -1
  236. package/dist/cli/commands/doc/search.js +1 -1
  237. package/dist/cli/commands/docs/generate.js +1 -1
  238. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  239. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  240. package/dist/cli/commands/help.js +1 -1
  241. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  242. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  243. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  244. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  245. package/dist/cli/commands/notifications/generate.js +1 -1
  246. package/dist/cli/commands/notifications/list.js +1 -1
  247. package/dist/cli/commands/organization/list.js +1 -1
  248. package/dist/cli/commands/search.js +1 -1
  249. package/dist/cli/commands/send-analytics.js +1 -1
  250. package/dist/cli/commands/theme/check.js +1 -1
  251. package/dist/cli/commands/theme/console.js +1 -1
  252. package/dist/cli/commands/theme/delete.js +1 -1
  253. package/dist/cli/commands/theme/dev.js +1 -1
  254. package/dist/cli/commands/theme/duplicate.js +1 -1
  255. package/dist/cli/commands/theme/info.js +1 -1
  256. package/dist/cli/commands/theme/init.js +1 -1
  257. package/dist/cli/commands/theme/language-server.js +1 -1
  258. package/dist/cli/commands/theme/list.js +1 -1
  259. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  260. package/dist/cli/commands/theme/open.js +1 -1
  261. package/dist/cli/commands/theme/package.js +1 -1
  262. package/dist/cli/commands/theme/preview.js +1 -1
  263. package/dist/cli/commands/theme/profile.js +1 -1
  264. package/dist/cli/commands/theme/publish.js +1 -1
  265. package/dist/cli/commands/theme/pull.js +1 -1
  266. package/dist/cli/commands/theme/push.js +1 -1
  267. package/dist/cli/commands/theme/rename.js +1 -1
  268. package/dist/cli/commands/theme/share.js +1 -1
  269. package/dist/cli/commands/upgrade.js +1 -1
  270. package/dist/cli/commands/version.js +1 -1
  271. package/dist/cli/help.js +1 -1
  272. package/dist/{command-json-schema-2UMKY7MY.js → command-json-schema-F5XF7XHL.js} +1 -1
  273. package/dist/command-registry.js +1 -1
  274. package/dist/{conf-store-RI3TL6I4.js → conf-store-5CBLWTOC.js} +1 -1
  275. package/dist/{custom-oclif-loader-IZCKN67O.js → custom-oclif-loader-UDVUFKMD.js} +1 -1
  276. package/dist/{deprecations-IFVUXXDB.js → deprecations-EOHPSTCS.js} +1 -1
  277. package/dist/dist-RNV3GFZ7.js +1 -0
  278. package/dist/dist-ZFKWJVNB.js +1 -0
  279. package/dist/{environments-CYMEN7NV.js → environments-4FLRZW4P.js} +1 -1
  280. package/dist/{error-IL6WQMSW.js → error-JY2ADS6S.js} +1 -1
  281. package/dist/{error-handler-74HKA23T.js → error-handler-4GCXKC6I.js} +1 -1
  282. package/dist/{fs-AINFLJ2E.js → fs-XS5YF34R.js} +1 -1
  283. package/dist/hooks/did-you-mean.js +1 -1
  284. package/dist/hooks/hydrogen-init.js +1 -1
  285. package/dist/hooks/postrun.js +1 -1
  286. package/dist/hooks/prerun.js +1 -1
  287. package/dist/hooks/public-metadata.js +1 -1
  288. package/dist/hooks/sensitive-metadata.js +1 -1
  289. package/dist/hooks/tunnel-provider.js +1 -1
  290. package/dist/hooks/tunnel-start.js +1 -1
  291. package/dist/index.js +12 -12
  292. package/dist/{is-global-2VLKV46Q.js → is-global-27MUENOK.js} +1 -1
  293. package/dist/{json-error-HZB5YIHV.js → json-error-S5XFS3UX.js} +1 -1
  294. package/dist/{local-KOZETREJ.js → local-OKPVB4NH.js} +1 -1
  295. package/dist/{metadata-IBPHZB7N.js → metadata-2YJBAKR7.js} +1 -1
  296. package/dist/{node-package-manager-DXSRNEDC.js → node-package-manager-B3OW3PFQ.js} +1 -1
  297. package/dist/{notifications-system-XA3EBOGJ.js → notifications-system-BWTDYBG2.js} +1 -1
  298. package/dist/{os-X73O7BAB.js → os-F6QKJCFW.js} +1 -1
  299. package/dist/{output-3OYXK3Z5.js → output-BRIPK7UC.js} +1 -1
  300. package/dist/{system-JWYYT4PM.js → system-466QKFDI.js} +1 -1
  301. package/dist/tsconfig.tsbuildinfo +1 -1
  302. package/dist/{ui-PCG5D6RZ.js → ui-VJTNGCS6.js} +1 -1
  303. package/dist/{upgrade-7U2TUNC4.js → upgrade-VHVJLXKX.js} +1 -1
  304. package/dist/{version-7DGU2KYH.js → version-FETZRLZO.js} +1 -1
  305. package/dist/version-T4XXTJMB.js +1 -0
  306. package/dist/{workerd-MQZ3NKJI.js → workerd-32DMKLMN.js} +1 -1
  307. package/oclif.manifest.json +6 -3
  308. package/package.json +7 -7
  309. package/dist/chunk-3C6VLJ5D.js +0 -319
  310. package/dist/chunk-4C2DAX5T.js +0 -1
  311. package/dist/chunk-7LAKWAKX.js +0 -25
  312. package/dist/chunk-7RPFJZLP.js +0 -1
  313. package/dist/chunk-CEIJKJOF.js +0 -11
  314. package/dist/chunk-DNMXVMJM.js +0 -47
  315. package/dist/chunk-FDXHQZTO.js +0 -26
  316. package/dist/chunk-JDR6UVZA.js +0 -8
  317. package/dist/chunk-JEA3C7ON.js +0 -3
  318. package/dist/chunk-JOJV5E2K.js +0 -1
  319. package/dist/chunk-LVLAOBJM.js +0 -103
  320. package/dist/chunk-OQ5CLM2H.js +0 -4
  321. package/dist/chunk-OVWUGAEU.js +0 -11
  322. package/dist/chunk-PMHP57MH.js +0 -20
  323. package/dist/chunk-RVQV6G5M.js +0 -1
  324. package/dist/chunk-T2IUXXCT.js +0 -1
  325. package/dist/chunk-WDFCOZAY.js +0 -16
  326. package/dist/chunk-X2H6I2WW.js +0 -5
  327. package/dist/chunk-ZGV3HNEV.js +0 -1
  328. package/dist/dist-4H2B7BMN.js +0 -1
  329. package/dist/dist-QNWOGQN3.js +0 -1
  330. package/dist/version-SXQTRBXB.js +0 -1
@@ -1,103 +0,0 @@
1
- import{a as z,b as $t}from"./chunk-JLGA3B7P.js";import{a as Tt,b as St,f as Ce,g as le,h as O,j as de,l as Pt,o as vt}from"./chunk-DNMXVMJM.js";import{a as J,l as Rt,m as Ft}from"./chunk-5TB52UUV.js";import{s as ce,t as B}from"./chunk-DJAZBPYA.js";import{a as U,b as M,e as dt,g as ut,i as pt,j as mt,k as ft,n as ht,p as gt,q as yt,r as ae,s as I,u as Et,w as wt}from"./chunk-Q7BOSHWX.js";import{da as xt}from"./chunk-M5TGCSUK.js";import{va as q,xa as D}from"./chunk-H4V55Y3Z.js";import{B as L,C as re,D as ct,U as lt,z as at}from"./chunk-CZ22VZDA.js";import{c as it}from"./chunk-335BUVBP.js";import{h as k}from"./chunk-2VSNFOKD.js";import{Bb as v,Cb as W,O as nt,Sa as b,Va as N,Z as _e,ab as qe,la as _,na as Le,qb as C,sb as oe,ta as je,va as rt,xa as ot,yb as ie}from"./chunk-LWCTKI4Z.js";import{c as x,e as et,f as A,h as tt,i as st,j as H,n as Ie}from"./chunk-IWTNUJGY.js";import{e as Ke,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();var ps=".shopifyignore",kt=/templates\/\*(\.(json|liquid))?$/,bt=new Set;function ue(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=Ae(s),[a=[],u=[]]=Ae(n),[p=[],c=[]]=Ae(r),l=e.filter(G(o,".shopifyignore"));return l=l.filter(G(a,"--ignore")),l=l.filter(G(p,"--only",!0)),i.length>0&&(l=l.concat(e.filter(G(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(G(u,"--ignore",!0)))),c.length>0&&(l=l.filter(G(c,"--only"))),nt(l,w=>w.key)}function G(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>ms(n,i)||gs(i)&&hs(n,ys(i)));return(s?!r:r)?(v(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function It(e){let t=x(e,ps);return await b(t)?(await _(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function Ae(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function ms(e,t){let s={matchBase:!0,noglobstar:!0};return qe(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!bt.has(t)&&(bt.add(t),L({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),fs(t)?qe(e,t.replace(kt,"templates/**/*$1"),s):!1)}function fs(e){return kt.test(e)}function hs(e,t){return t.test(e)}function gs(e){return e.startsWith("/")&&e.endsWith("/")}function ys(e){return new RegExp(e.slice(1,-1))}m();import _t from"fs/promises";var pe=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&W("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{v(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){q(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),W(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 _t.writeFile(this.notifyPath,t),await _t.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}}};m();m();m();import Es from"node:events";var Lt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function jt(e){let t=new Map,s=new Set,n=new Es,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await fe(e,c),f=me(c,l),w=typeof l=="string"?l:"",h=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,J({key:c,checksum:f,value:w,attachment:h})),l},i=N(Lt,{cwd:e,deep:3,ignore:B}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let f=A(e,l),w=o(f).then(()=>{let h=t.get(f);return s.add(h.key),h.value??h.attachment??""});lt(5).then(()=>{s.delete(f)}).catch(()=>{}),r(c,{fileKey:f,onContent:h=>{w.then(y=>{y&&h(y)}).catch(()=>{})},onSync:h=>{}})},u=c=>{let l=A(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:f=>f()})},p=new Set(Lt.map(c=>x(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-5RWEYTNQ.js");c.watch([...p],{ignored:B,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}m();m();var ws="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function qt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Ct(e){return(0,String.raw)`<!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>${e.title}</title>
5
- <link rel="stylesheet" href="${ws}" />
6
- </head>
7
- <body>
8
- <div style="display: flex; justify-content: center; padding-top: 2rem;">
9
- <div style="width: 80%;">
10
- <div class="Polaris-Banner Polaris-Banner--withinPage" tabindex="0" role="alert" aria-live="polite">
11
- <div class="Polaris-Box" style="--pc-box-width:100%">
12
- <div
13
- class="Polaris-BlockStack"
14
- style="--pc-block-stack-align:space-between;--pc-block-stack-order:column"
15
- >
16
- <div
17
- class="Polaris-Box"
18
- style="--pc-box-color: var(--p-color-text-critical-on-bg-fill); --pc-box-background: var(--p-color-bg-fill-critical); --pc-box-padding-block-start-xs: var(--p-space-300); --pc-box-padding-block-end-xs: var(--p-space-300); --pc-box-padding-inline-start-xs: var(--p-space-300); --pc-box-padding-inline-end-xs: var(--p-space-300); --pc-box-border-start-start-radius: var(--p-border-radius-300); --pc-box-border-start-end-radius: var(--p-border-radius-300);"
19
- >
20
- <div
21
- class="Polaris-InlineStack"
22
- style="--pc-inline-stack-align:space-between;--pc-inline-stack-block-align:center;--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-200);--pc-inline-stack-flex-direction-xs:row"
23
- >
24
- <div
25
- class="Polaris-InlineStack"
26
- style="--pc-inline-stack-wrap:nowrap;--pc-inline-stack-gap-xs:var(--p-space-100);--pc-inline-stack-flex-direction-xs:row"
27
- >
28
- <span class="Polaris-Banner--textCriticalOnBgFill">
29
- <span class="Polaris-Icon">
30
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
31
- <path d="M10 6a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5a.75.75 0 0 1 .75-.75Z" />
32
- <path d="M11 13a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z" />
33
- <path
34
- fill-rule="evenodd"
35
- d="M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"
36
- />
37
- </svg>
38
- </span>
39
- </span>
40
- <h2 class="Polaris-Text--root Polaris-Text--headingSm Polaris-Text--break">
41
- ${e.header}
42
- </h2>
43
- </div>
44
- </div>
45
- </div>
46
- <div
47
- class="Polaris-Box"
48
- style="--pc-box-padding-block-start-xs:var(--p-space-300);--pc-box-padding-block-end-xs:var(--p-space-300);--pc-box-padding-block-end-md:var(--p-space-400);--pc-box-padding-inline-start-xs:var(--p-space-300);--pc-box-padding-inline-start-md:var(--p-space-400);--pc-box-padding-inline-end-xs:var(--p-space-300);--pc-box-padding-inline-end-md:var(--p-space-400)"
49
- >
50
- <div
51
- class="Polaris-BlockStack"
52
- style="--pc-block-stack-order:column;--pc-block-stack-gap-xs:var(--p-space-300)"
53
- >
54
- ${e.errors.map(s=>`
55
- <div>
56
- <span class="Polaris-Text--root Polaris-Text--headingSm">${qt(s.message)}</span>
57
- <ul class="Polaris-List">
58
- <li class="Polaris-List__Item">${qt(s.code)}</li>
59
- </ul>
60
- </div>`).join("")}
61
- </div>
62
- </div>
63
- </div>
64
- </div>
65
- </div>
66
- </div>
67
- </div>
68
- </body>
69
- </html>`}m();m();var xs=/<head(\s[^>]*)?>/i,Ne="https://cdn.shopify.com/storefront",Ts=`${Ne}/standard-events.js`,Ss=`${Ne}/standard-events.dev.js`,At=`${Ne}/standard-events-inspector.js`,Ht="shopify-cli-standard-events-inspector",Rs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${He(Ht)}["']|\\bsrc=["']${He(At)}["'])[^>]*>`,"i"),Fs=new RegExp(He(Ts),"g");function he(e){return Rs.test(e)?e:e.replace(xs,t=>`${t}<script id="${Ht}" src="${At}" defer></script>`)}function Nt(e){return e.replace(Fs,Ss)}function He(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}m();var Ot=80;function K(e,t,s){if(!Ps(e)||s.type==="theme-extension")return;let n=e.path.length>Ot?`${e.path.substring(0,Ot)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=vs(t.status),u=e.method.padStart(6);ie(oe`• ${ce.format(new Date)} Request ${C.raw("\xBB")} ${u} ${a(String(t.status))} ${n} ${C.gray(i)}`)}function Ps(e){let t=[V,Y,"/checkouts","/payments"],s=[".js",".css",".json",".map"];if(t.some(o=>e.path.startsWith(o)))return!1;let[n]=e.path.split("?"),r=H(n);return!s.includes(r)}function vs(e){return e<300?C.green:e<400?C.yellow:C.errorText}var Y="/cdn/",V="/ext/cdn/",Oe="/api/collect",$s=/^\/cart\//,bs=/^\/cart(\/|\.js|\.json|$)/,De=/^\/checkouts\/(?!internal\/)/,Dt=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,ks=new RegExp(`^${Y}`),Is=new RegExp(`^${V}`),_s=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,Ls=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",Oe,"/cdn-cgi/challenge-platform"],Wt="_shopify_essential",js=new RegExp(`${Wt}=([^;]*)(;|$)`);function Ut(e,t){return I(async s=>{if(Ls.some(n=>s.path.startsWith(n)))return null;if(qs(s)){let n=s.path.split("?")[0]??"";return Ue(s,t).then(async r=>{if(K(s,r,t),r.ok){let o=n.split("/").at(-1)??"";if(t.localThemeFileSystem.files.has(`assets/${o}.liquid`)){let i=ee(await r.text(),t);return new Response(i,r)}}return r}).catch(async r=>{let{status:o,statusText:i,...a}=O(r,`Failed to proxy request to ${n}`);return o>=500&&!n.endsWith(".js.map")&&L(a),new Response(r.message,{status:o,statusText:i})})}})}function qs(e){if(e.method!=="GET"||e.path.match($s)||e.path.match(De)||e.path.match(Dt)||e.path.match(ks)||e.path.match(Is))return!0;let[t]=e.path.split("?"),s=H(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function Cs(e){let[t]=e.split("?");return!(bs.test(t)||De.test(t)||Dt.test(t))}function ge(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function As(e){return _s.test(e.path)}function ee(e,t){let s=e,n=`(data-shs-beacon-endpoint=["'])https://${ge(t)}${Oe}`,r=new RegExp(n,"g");s=s.replace(r,`$1${Oe}`);let o=new RegExp(`(https?:)?//${ge(t)}${Y}`,"g");s=s.replace(o,Y);let i=/(?:https?:)?\/\/cdn\.shopify\.com\/(.*?\/(assets\/[^?#"'`>\s]+))/g,a=c=>c.startsWith("assets/"),u=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),p=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,f)=>{let w=f&&u.has(f),h=f&&p.has(f)&&l.startsWith("extensions/");return z(f).startsWith("image/")?c:h?`${V}${l}`:w?`${Y}${l}`:c}),t.options.standardEventsDevBundle&&(s=Nt(s)),s}function Hs(e,t){let s=`http://${t.options.host}:${t.options.port}`,n=new RegExp(`data-base-url=["']((?:https?:)?//${ge(t)})[^"']*?["']`,"g");return e.replace(n,(r,o)=>r.replace(o,s))}function Ns(e,t){let s=new RegExp(`Domain=${ge(t)};\\s*`,"gi");return e.map(n=>n.replace(s,""))}async function te(e,t,s){let n=Bt(e,t);if(n.status>=300&&n.status<400)return n;t.headers.get("content-type")?.includes("application/json")||n.headers.set("content-type","text/html; charset=utf-8");let i=await n.text();return i=ee(i,e),i=Hs(i,e),e.options.standardEventsInspector&&(i=he(i)),s&&(i=s(i)??i),new Response(i,n)}var Mt=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function Bt(e,t){let s=new Response(t.body,t);s.headers.delete("content-length"),s.headers.delete("content-encoding");for(let i of Mt)s.headers.delete(i);s.headers.delete("access-control-allow-origin"),s.headers.delete("access-control-allow-credentials"),s.headers.delete("access-control-allow-methods"),s.headers.delete("access-control-allow-headers"),s.headers.delete("access-control-expose-headers"),s.headers.delete("access-control-max-age");let n=s.headers.get("Link");n&&s.headers.set("Link",ee(n,e));let r=s.headers.get("Location");if(r){let i=new URL(r,"https://shopify.dev");De.test(i.pathname)||(i.searchParams.delete("_fd"),i.searchParams.delete("pb"),s.headers.set("Location",i.href.replace(i.origin,"")))}let o=s.headers.getSetCookie();if(o?.length){s.headers.set("Set-Cookie",Ns(o,e).join(","));let i=o.join(",").match(js)?.[1];i&&(e.session.sessionCookies[Wt]=i)}return s}function We(e){let t=dt(e);for(let n of Mt)delete t[n];delete t["upgrade-insecure-requests"];let s=ut(e);return s&&(t["X-Forwarded-For"]=s),t}function Ue(e,t){let s=e.path.replace(new RegExp(V,"g"),"/"),n=e.path.startsWith(V)?"cdn.shopify.com":t.session.storeFqdn,r=new URL(s,`https://${n}`);if(r.hostname!==n)return Promise.reject(new Error(`Request failed: Hostname mismatch. Expected host: ${n}. Resulting URL hostname: ${r.hostname}`));let o=pt(e),i=We(e);return As(e)||(/\/assets\/[^/]+\.(css|js)$/.test(r.pathname)&&/\?\d+$/.test(r.search)&&(r.search=`?v=${Date.now()}`),r.searchParams.set("_fd","0"),r.searchParams.set("pb","0"),i=St({...i,...Tt(),...n===t.session.storeFqdn?t.session.crawlerSignatureHeaders:{},referer:r.origin,Cookie:Pt(t.session,{headers:i}),...t.type==="theme"&&Cs(e.path)?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>Bt(t,a)).catch(a=>{throw le(q(a),r)})}var Me=0,Os=5;function zt(e,t){return I(s=>{let[n="/",r=""]=s.path.split("?");return Ws(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Jt(t,{status:500,statusText:"Internal Server Error"},{title:"Failed to Upload Theme Files",header:"Upload Errors",errors:Array.from(t.localThemeFileSystem.uploadErrors.entries()).map(([i,a])=>({message:i,code:a.join(`
70
- `)}))}):de(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:We(s),replaceExtensionTemplates:Ee(t),replaceTemplates:Be(t,n,mt(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!Ds(s)){let a=await Us(s,t,i);if(a)return K(s,a,t),a}return K(s,i,t),te(t,i,a=>(Ms(i,a,String(e.id)),Me=0,Je(a,t)))}).catch(async i=>{if(i instanceof ye&&(v(`Theme ID mismatch: expected ${i.getExpectedThemeId()} but got ${i.getActualThemeId()}; refreshing session...`),D("theme-service:error-page:theme-id-mismatch"),t.session.refresh)){Me++,Me>Os&&(ct(new k(i.getMessage())),process.exit(1)),await t.session.refresh();let w=new URLSearchParams(r),h=new URLSearchParams([...w].filter(([be])=>!be.startsWith("__sfr"))),y=n+(h.toString()?`?${h}`:"");return new Response(null,{status:302,headers:{Location:y}})}let{status:a,statusText:u,cause:p,...c}=O(i,"Failed to render storefront"),[l,...f]=c.headline.split(`
71
- `);return re(c),Jt(t,{status:a,statusText:u},{title:l,header:l,errors:[{message:[...f,p.message].join("<br>"),code:p.stack?.replace(`${p.message}
72
- `,"")??""}]})})})}function Jt(e,t,s){let n=Je(Ct(s),e);return e.options.standardEventsInspector&&(n=he(n)),D("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function Ds(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function Ws(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function Us(e,t,s){v(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await Ue(e,t).catch(r=>new Response(null,O(r)));if(n.status<400)return v(`Proxy status: ${n.status}. Returning proxy response.`),t.options.standardEventsInspector&&(n.headers.get("content-type")??"").includes("text/html")?te(t,n):n;v(`Proxy status: ${n.status}. Returning render error.`)}function Ms(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new ye(s,n,e)}var ye=class extends Error{response;expectedThemeId;actualThemeId;constructor(t,s,n){super([`Theme ID mismatch: expected ${t} but got ${s}.`,`Request ID: ${n.headers.get("x-request-id")}`,`URL: ${n.url}`,"This is likely related to an issue in upstream Shopify APIs.","Please try again in a few minutes and report this issue:","https://community.shopify.dev/c/shopify-cli-libraries/14"].join(`
73
- `)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};m();m();function we(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}m();function xe(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var Bs={stylesheet:new Map,javascript:new Map};function Gt(e,t){return I(async s=>{if(s.method!=="GET")return;if(Ys(s,t))return Vs(s,t);let{file:n,fileKey:r,isUnsynced:o}=Gs(s,t);if(!r)return;let i=z(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(ht(s,"X-Local-Asset","true"),!n){o&&M(s,U({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(ee(n.value,t)):Buffer.from(n.attachment??"","base64");return ae(s,{getContents:()=>a,getMeta:()=>({type:i,size:a.length,mtime:n.stats?.mtime})})})}var Js=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,zs=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Gs(e,t){let s=(n,r)=>{let o=e.path.match(n)?.[1];if(o){let i=x("assets",o),a=r.files.get(i),u=r.unsyncedFileKeys.has(i);if(a||u)return{file:a,isUnsynced:u,fileKey:i}}};return s(Js,t.localThemeFileSystem)??s(zs,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Ys(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Vs(e,t){switch(xe(e).pathname.split("/").at(-1)){case"styles.css":return Xs(t,e);case"block-scripts.js":return ze(t,e,"block");case"snippet-scripts.js":return ze(t,e,"snippet");case"scripts.js":return ze(t,e,"section");case void 0:break;default:break}}function Xs(e,t){let s=Te(e,"section"),n=Te(e,"block"),r=Te(e,"snippet"),o=[`/*** GENERATED LOCALLY ***/
74
- `];for(let[,a]of[...s,...n,...r]){let u=Yt(a,"stylesheet");u&&o.push(u)}let i=o.join(`
75
- `);return ae(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function ze(e,t,s){let n=Te(e,s),r=`${s}s`,o=[`
76
- /*** GENERATED LOCALLY ***/
77
-
78
- (function () {
79
- var __${r}__ = {};
80
-
81
- (function () {
82
- var element = document.getElementById("${r}-script");
83
- var attribute = element ? element.getAttribute("data-${r}") : "";
84
- var ${r} = attribute.split(",").filter(Boolean);
85
-
86
- for (var i = 0; i < ${r}.length; i++) {
87
- __${r}__[${r}[i]] = true;
88
- }
89
- })();`];for(let[a,u]of n){let p=a.split("/").pop()?.replace(".liquid",""),c=Yt(u,"javascript")??"";p&&c&&o.push(`
90
- (function () {
91
- if (!__${r}__["${p}"] && !Shopify.designMode) return;
92
- try {
93
- ${c}
94
- } catch (e) {
95
- console.error(e);
96
- }
97
- })();`)}o.push("})();");let i=o.join(`
98
- `);return ae(t,{getContents:()=>i,getMeta:()=>({type:"text/javascript",size:Buffer.byteLength(i),mtime:new Date})})}function Te(e,t){return[...e.localThemeFileSystem.files.entries()].filter(([s])=>s.endsWith(".liquid")&&s.startsWith(`${t}s/`)).sort(([s],[n])=>s.localeCompare(n))}function Yt(e,t){let s=Bs[t],n=s.get(e.key);if(n?.checksum===e.checksum)return n.content;if(s.delete(e.key),!e.value)return;let r=[`/* ${e.key} */`],o=we(e.value??"",t)?.trimEnd();if(o&&r.push(o),r.length>1){let i=r.join(`
99
- `);return s.set(e.key,{checksum:e.checksum,content:i}),i}}m();import*as Vt from"node:os";function Zs(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Vt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function Qs(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Xt(e,t){let s=Zs(e,t);return I(n=>{let r=n.node.req.headers.host,o=Qs(r);if(!o||!s.has(o))return M(n,U({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}m();function Zt(){return Qt()}function Br(){return Qt()}function Qt(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as Ks}from"node:http";async function no(e,t){let s=await tn(e,t);return await sn(e,s),en(e,s)}function en(e,t){let s=Et();s.use(Xt(t.options.host,t.options.port)),s.use(Kt(e,t)),s.use(Gt(e,t)),s.use(Ut(e,t)),s.use(zt(e,t));let n=Ks(wt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function tn(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",u=r??9293,p=Zt(),c=jt(o);return await c.ready(),{session:await vt(e.id.toString(),s,void 0,n,i),localThemeFileSystem:p,localThemeExtensionFileSystem:c,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:a,port:u,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function sn(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{Se(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function Ee(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var Pe=Ke(xt(),1);import nn from"node:events";var Ge=new Map,se=new Map;function es(e,t){let s=(0,Pe.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?se.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):se.delete(e)}function Ye(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(H(e))}function Be(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${x("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let p of e.localThemeFileSystem.unsyncedFileKeys)if(Ye(p)){if(i&&r.test(p)){if(p!==o)continue}else if(a.test(p)){if(u){if(!p.startsWith(`locales/${s}.`))continue}else if(!p.includes(".default."))continue}n[p]=e.localThemeFileSystem.files.get(p)?.value??""}return n}function xo(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=H(r);o(u=>{!ln(r)&&Ye(r)&&a===".json"&&es(r,u),Se(e,t,i,{type:"update",key:r,payload:an(r,t)})})},n=({fileKey:r,onSync:o})=>{se.delete(r),Se(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&es(o,a)}else o.endsWith(".liquid")&&rs(i)}))})}var rn="1",ss=new nn;function Fe(e){ss.emit("hot-reload",{...e,version:rn})}function Kt(e,t){return I(s=>{let n=s.headers.get("accept")==="text/event-stream",r=xe(s).searchParams;if(n){let o=yt(s);return ss.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{L({headline:"Failed to send HotReload event.",body:a.stack})})}),Fe({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,Pe.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?re(o):o.type==="warn"?L(o):o.type==="info"?at(o):L({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===ns)return _(ve()).then(o=>ft(s,o,"application/javascript")).catch(o=>M(s,U({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",u=s.path.split("?")[0]??"",p=new URLSearchParams(r);if(p.delete("section_key"),p.delete("section_id"),p.delete("app_block_id"),p.delete("_fd"),p.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let f=t.localThemeFileSystem.files.get(o)?.value;if(!f)return"";c[o]=f}for(let f of l)if(f.endsWith(".json")){for(let[w,h]of se.get(f)??[])if(i.endsWith(`__${h}`)){let y=t.localThemeFileSystem.files.get(f)?.value;y&&(c[f]=y);continue}}}return de(t.session,{method:s.method,path:u??"/",query:[...p.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:gt(s),replaceExtensionTemplates:Ee(t)}).then(async l=>{if(!l.ok)throw D("theme-service:hot-reload:section:render-failed"),le(l);return te(t,l)}).catch(async l=>{let{status:f,statusText:w,...h}=O(q(l),"Failed to render section on Hot Reload");return D("theme-service:hot-reload:section:render-error"),a||L(h),new Response(null,{status:f,statusText:w})})}})}var ne=(e,t)=>Fe({themeId:String(e),type:"full",key:t});function Se(e,t,s,n){let r=()=>ne(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);Fe({sync:"local",themeId:o,...n}),s(()=>Fe({sync:"remote",themeId:o,...n}),r)}function on(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,Pe.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of se)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function an(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?on(e,t):[],replaceTemplates:Ye(e)?Be(t):{},updatedFileParts:n&&rs(n)}}var Re="hot-reload-client",cn="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",ts=new RegExp(`<script id="${Re}"[^>]*>[^<]*</script>`),ns="/@shopify/theme-hot-reload";function Je(e,t){return t.options.liveReload==="off"?e.replace(ts,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(ts,"").replace(/<\/head>/,`<script id="${Re}" src="${ns}" defer></script></head>`):e.includes(`<script id="${Re}"`)?e:e.replace(/<\/head>/,`<script id="${Re}" src="${cn}" defer></script></head>`)}function ln(e){return e.startsWith("assets/")}function rs(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Ge.get(e.key);if(o?.checksum===e.checksum||(Ge.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,p=(c,l)=>{u=u.replace(l,"");let f=a(l),w=`${c}Tag`;n[w]=!o||f!==o[w],r[w]=f};for(let c of i){let l=we(e.value??"",c);l&&p(c,l)}return u=a(u.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=u,n.liquid=!o||u!==o.liquid,Ge.set(e.key,r),n}m();m();import{lstat as dn}from"node:fs/promises";async function Ve(e){try{return await dn(e),!0}catch(t){if(t instanceof Error&&"code"in t&&(t.code==="ENOENT"||t.code==="ENOTDIR"))return!1;throw t}}async function os(e,t){return e===t||await Ve(e)?e:os(tt(e),t)}function X(e){if(!e||e==="."||e===".."||/[\\/]/.test(e)||/^[a-z]:/i.test(e))throw new k(`Unsafe listing name: ${e}`)}async function P(e,t){let s=t.replace(/\\/g,"/");if(!t||/^[\\/]/.test(t)||/^[a-z]:/i.test(t)||s.split("/").includes(".."))throw new k(`Unsafe theme file key: ${t}`);let n=et(e),r=x(n,s);if(A(n,r)===""||!Ie(n,r,{native:!0}))throw new k(`Unsafe theme file key: ${t}`);let o=await os(r,n);try{let i=await Le(n),a=await Le(o);if(!Ie(i,a,{native:!0}))throw new k(`Unsafe theme file key: ${t}`)}catch{throw new k(`Unsafe theme file key: ${t}`)}return r}var is=Ke(xt(),1);function un(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function as(e,t,s){if(X(t),un(s)){await P(e,s);let n=await P(e,x("listings",t,s));if(await b(n))return n}}async function cs(e,t){X(t);let s=await P(e,"config/settings_data.json"),n=await _(s,{encoding:"utf8"}),r=(0,is.parseJSON)(n,null,!0);return r?(r.current=_e(t),JSON.stringify(r,null,2)):n}async function qo(e,t){X(t);let s=x(e,"listings"),n=x(s,t);if(await Ve(e)&&(await P(e,"listings"),await P(e,x("listings",t))),await b(n))return;let o=[];await b(s)&&(o=await N("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${_e(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new k(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import pn from"node:events";import{fileURLToPath as mn}from"node:url";var fn=250,ls=["AGENTS.md","DESIGN.md","assets/**/*.*","config/**/*.json","config/styles.css","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],$={documentationFilesRegex:/^(AGENTS|DESIGN)\.md$/,layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,configStylesheetRegex:/^config\/styles\.css$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function ei(e,t){t?.listing!==void 0&&X(t.listing);let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new pn,a=(d,E)=>{i.emit(d,E)},u=t?.notify?new pe(t.notify):void 0,p=async d=>{let E=t?.listing?await gn(e,d,t.listing):await fe(e,d),g=me(d,E);return s.set(d,J({key:d,checksum:g,value:typeof E=="string"?E:"",attachment:Buffer.isBuffer(E)?E.toString("base64"):""})),E},c=N(ls,{cwd:e,deep:3,ignore:B}).then(async d=>{o.ignoreFromFile.push(...await It(e));let E=ue(d.map(g=>({key:g})),o);await Promise.all(E.map(({key:g})=>p(g)))}),l=d=>A(e,d),f=d=>ue([{key:d}],o).length===0;function w(d,E,g,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===ve()){ne(E,T);return}let R=l(T);if(t?.listing&&R.startsWith(`listings/${t.listing}/`)){let S=R.replace(`listings/${t.listing}/`,"");if(S.startsWith("templates/")||S.startsWith("sections/"))R=S;else return}h(R).then(()=>{switch(d){case"add":case"change":return y(d,E,g,R);case"unlink":return be(E,g,R,n)}}).catch(S=>{W(`Error handling file event for ${R}: ${S}`)})}function h(d){return u?.notify(d)??Promise.resolve()}let y=(d,E,g,T)=>{if(f(T))return;let R=s.get(T)?.checksum,S=p(T).then(async()=>{let F=s.get(T);if(F)return F.checksum!==R&&r.add(T),{value:F.value||void 0,attachment:F.attachment}}),j=S.then(F=>{if(F)return hn(r,n,T,E,g)(F)}).catch(Ce(T,"upload"));a(d,{fileKey:T,onContent:F=>{S.then(Z=>{r.has(T)&&F(Z?.value??Z?.attachment??"")}).catch(()=>{})},onSync:(F,Z)=>{j.then(Q=>{Q?F():Z?.()}).catch(()=>{})}})},be=(d,E,g,T)=>{if(f(g))return;T.delete(g),s.delete(g),r.add(g);let R=t?.noDelete?Promise.resolve():Rt(Number(d),[g],E).then(async S=>{if(!S[0]?.success)throw new Error(`Failed to delete file "${g}" from remote theme.`);return r.delete(g),ds("delete",g),!0}).catch(S=>(Ce(g,"delete")(S),!1));a("unlink",{fileKey:g,onSync:S=>{R.then(j=>{j&&S()}).catch(()=>{})}})},ke=new Set(ls.map(d=>x(e,d.split("/").shift()??"")));return t?.listing&&ke.add(x(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&ke.add(ve()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{await P(e,d),s.delete(d),await yn(e,d)},write:async d=>{await P(e,d.key);let E=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&E){let g=x("listings",t.listing,d.key),T=await P(e,g),R=await b(T);s.set(d.key,J({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),R?await Xe(e,{...d,key:g}):await Xe(e,d);return}s.set(d.key,J({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Xe(e,d)},read:p,applyIgnoreFilters:d=>ue(d,o),addEventListener:(d,E)=>{i.on(d,E)},startWatcher:async(d,E)=>{let{default:g}=await import("./chokidar-5RWEYTNQ.js"),T=g.watch([...ke],{ignored:B,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),R=new Map,S=(j,F)=>{let Q=`${l(F)}:${j}`,Qe=R.get(Q);Qe&&clearTimeout(Qe);let us=setTimeout(()=>{R.delete(Q),w(j,d,E,F)},fn);R.set(Q,us)};T.on("add",S.bind(null,"add")).on("change",S.bind(null,"change")).on("unlink",S.bind(null,"unlink")).on("error",j=>{W(`File watcher error: ${j}`),q("theme-service:file-watcher:error")})}}}function hn(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await Ft(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ne(n,s),new Error(a.join(`
100
- `))}return t.delete(s)&&ne(n,s),e.delete(s),ds("update",s),!0}}async function Xe(e,{key:t,attachment:s,value:n}){let r=await P(e,t);if(await En(r),s){let o=Buffer.from(s,"base64");await je(r,o,{encoding:"base64"})}else await je(r,n??"")}async function fe(e,t){let s=$e(t)?{encoding:"utf8"}:{},n=await P(e,t);if(!await b(n)){v(`File ${n} can't be read because it doesn't exist...`);return}return _(n,s)}async function gn(e,t,s){if(t==="config/settings_data.json")return cs(e,s);let n=await as(e,s,t);if(n){let r=$e(t)?{encoding:"utf8"}:{};return _(n,r)}return fe(e,t)}async function yn(e,t){let s=await P(e,t);if(!await b(s)){v(`File ${s} can't be removed because it doesn't exist...`);return}await ot(s)}function ti(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],p=[],c=[],l=[],f=[],w=[];return e.forEach(h=>{let y=h.key;$.documentationFilesRegex.test(y)?w.push(h):y.endsWith(".liquid")?$.sectionLiquidRegex.test(y)?t.push(h):$.blockLiquidRegex.test(y)?l.push(h):$.layoutLiquidRegex.test(y)?f.push(h):s.push(h):$.configSchemaRegex.test(y)?a.push(h):$.configDataRegex.test(y)?u.push(h):$.configStylesheetRegex.test(y)?p.push(h):$.jsonRegex.test(y)?$.contextualizedJsonRegex.test(y)?i.push(h):$.sectionJsonRegex.test(y)?n.push(h):$.templateJsonRegex.test(y)?r.push(h):o.push(h):$.staticAssetRegex.test(y)&&c.push(h)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,configStylesheetFiles:p,staticAssetFiles:c,blockLiquidFiles:l,layoutFiles:f,documentationFiles:w}}function $e(e){return $t({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml","text/markdown"].includes(z(e))}async function si(e){let t=new Set(await N("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","templates"].every(n=>t.has(n))}async function En(e){let t=wn(e);await b(t)||await rt(t)}function wn(e){let t=st(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ds(e,t){ie(oe`• ${ce.format(new Date)} Synced ${C.raw("\xBB")} ${e} ${t}`)}function ve(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?x(mn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function me(e,t){return t?Buffer.isBuffer(t)?Ze(t):Rn(e)?xn(t):Tn(e,t):""}function xn(e){let t=e;return t=t.replace(/\r\n/g,`
101
- `),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=Sn(t),Ze(t)}function Tn(e,t){let s=t;return $e(e)&&(s=s.replace(/\r\n/g,`
102
- `)),Ze(s)}function Sn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
103
- `))&&(n+=r,s=r==="\\"&&!s);return n}function Ze(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return it(t)}function ai(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function Rn(e){return e.endsWith("/settings_data.json")}export{ai as a,Ut as b,zt as c,Gt as d,Xt as e,Br as f,no as g,xo as h,Kt as i,ne as j,as as k,qo as l,ei as m,ti as n,si as o};
@@ -1,4 +0,0 @@
1
- import{a as $}from"./chunk-UVRKTMF7.js";import{a as V}from"./chunk-ZGV3HNEV.js";import{a as w}from"./chunk-FWB3GLMW.js";import{L as P,Ma as x}from"./chunk-3C6VLJ5D.js";import{e as L}from"./chunk-AJMDF3QC.js";import{b as ae}from"./chunk-UOS2XLGG.js";import{D,S as T,ea as A,ia as j,u as g}from"./chunk-H4V55Y3Z.js";import{b as E,c as M}from"./chunk-Q2SZCZE7.js";import{I as R,J as k,z as O}from"./chunk-CZ22VZDA.js";import{a as h}from"./chunk-BN7ZXAZJ.js";import{k as I}from"./chunk-2VSNFOKD.js";import{qb as p,sb as c,wb as C,yb as v}from"./chunk-LWCTKI4Z.js";import{b as m}from"./chunk-FZCGRIOM.js";import{b as te}from"./chunk-YTUUU33R.js";import{e as _,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"30"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetafieldForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetafieldForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetafieldDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}},{kind:"Field",name:{kind:"Name",value:"customerAccount"}}]}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adminFilterable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]};r();async function de(i){let n="Admin",e=L(i.storeFqdn,"unstable");return{token:i.token,api:n,url:e}}async function U(i){return j({query:i.query,...await de(i.session),variables:i.variables,autoRateLimitRestore:i.autoRateLimitRestore})}r();var K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metaobjectDefinitions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaobjectDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"MetaobjectForImport"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"MetaobjectForImport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MetaobjectDefinition"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"access"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"admin"}},{kind:"Field",name:{kind:"Name",value:"storefront"}}]}},{kind:"Field",name:{kind:"Name",value:"displayNameKey"}},{kind:"Field",name:{kind:"Name",value:"capabilities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publishable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"translatable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}}]}},{kind:"Field",name:{kind:"Name",value:"renderable"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metaTitleKey"}},{kind:"Field",name:{kind:"Name",value:"metaDescriptionKey"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"fieldDefinitions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"required"}},{kind:"Field",name:{kind:"Name",value:"validations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}}]}}]}}]};var H=_(ae(),1);var oe={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",customer:"CUSTOMER",delivery_customization:"DELIVERY_CUSTOMIZATION",delivery_method:"DELIVERY_METHOD",delivery_option_generator:"DELIVERY_OPTION_GENERATOR",discount:"DISCOUNT",draft_order:"DRAFTORDER",fulfillment_constraint_rule:"FULFILLMENT_CONSTRAINT_RULE",gift_card_transaction:"GIFT_CARD_TRANSACTION",order_routing_location_rule:"ORDER_ROUTING_LOCATION_RULE",payment_customization:"PAYMENT_CUSTOMIZATION",selling_plan:"SELLING_PLAN",shop:"SHOP",validation:"VALIDATION",variant:"PRODUCTVARIANT",cart_transform:"CARTTRANSFORM"};async function B({query:i,session:n,toNodes:e,toVariables:t,performQuery:d=a=>U({query:i,session:n,variables:a,autoRateLimitRestore:!0})}){let a;try{let o=e(await d(t(a))),s=[];for(s.push(...o.nodes);o.pageInfo.hasNextPage;)a=o.pageInfo.endCursor,o=e(await d(t(a))),s.push(...o.nodes);return{status:"ok",items:s}}catch(o){if(o instanceof Error&&o.message.includes("ACCESS_DENIED"))return{status:"scope_error"};throw o}}function G(i,n){let e="";for(let t of i)e=(0,H.updateTomlValues)(e,t);return`# ${n}
2
- ${e}`}function se(i,n){let e=n.map(fe).map(a=>{switch(a.status){case"ok":{let{typeName:o,patches:s}=a;return G(s,`type: $app:${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null),t=i.flatMap(({items:a,ownerType:o,graphQLOwner:s})=>a.map(l=>({result:pe(l,o),graphQLOwner:s}))).map(({result:a,graphQLOwner:o})=>{switch(a.status){case"ok":{let{namespace:s,key:l,patches:S}=a;return G(S,`namespace: ${s==="app"?"$app":`$app:${s}`} key: ${l} owner_type: ${o}`)}case"not_app_reserved":return null}}).filter(a=>a!==null);return{tomlContent:[...e,...t].join(`
3
- `),metafieldCount:t.length,metaobjectCount:e.length}}async function Y(i){let n=await ue(i),e=await le(n),t=await re(n),d=e.nodes,a=t.nodes;i.includeExistingDeclaredDefinitions||(d=me(d,i.appConfiguration),a=ce(a,i.appConfiguration));let{tomlContent:o,metafieldCount:s,metaobjectCount:l}=se(d,a);return{status:"success",storeDomain:n.storeFqdn,metafieldCount:s,metaobjectCount:l,tomlContent:o,skippedSections:[...e.skippedSections,...t.skippedSections]}}async function le(i){let n=[];return await R(Object.entries(oe).map(([e,t])=>({title:c`Loading ${p.green(e)} metafields`,task:async()=>{let d=await B({query:q,session:i,toNodes:a=>a.metafieldDefinitions,toVariables:a=>({ownerType:t,after:a})});n.push({metafields:d,ownerType:e,graphQLOwner:t})}}))),{nodes:n.map(({metafields:e,ownerType:t,graphQLOwner:d})=>e.status==="ok"?{ownerType:t,items:e.items,graphQLOwner:d}:null).filter(e=>e!==null),skippedSections:n.filter(({metafields:e})=>e.status==="scope_error").map(({graphQLOwner:e})=>({type:"metafields",ownerType:e}))}}async function re(i){let n=await k({title:c`Loading ${p.green("metaobjects")}`,task:async()=>B({query:K,session:i,toNodes:e=>e.metaobjectDefinitions,toVariables:e=>({after:e})})});return n.status==="ok"?{nodes:n.items,skippedSections:[]}:{nodes:[],skippedSections:[{type:"metaobjects"}]}}function me(i,n){return i.map(e=>{let t=e.items.filter(d=>!J(n,[e.ownerType,"metafields",f(d.namespace)??"",d.key]));return t.length>0?{...e,items:t}:null}).filter(e=>e!==null)}function ce(i,n){return i.filter(e=>!J(n,["metaobjects","app",f(e.type)??""]))}function J(i,n){let e=i;for(let t of n){if(!e[t])return!1;e=e[t]}return!0}async function ue(i){let{remoteApp:n,store:e}=i,t=n.apiSecretKeys[0]?.secret;if(!t)throw new I("No API secret keys found for app");return await T(e.shopDomain,n.apiKey,t)}function f(i){if(!i.match(/^app--\d+/))return null;let n="app";return i.match(/^app--\d+--/)&&(n=i.replace(/^app--\d+--/,"")),n}function pe(i,n){let e=f(i.namespace);if(!e)return{status:"not_app_reserved"};let t=i.key,d=ke(i),a=be(d,n,e,t);return{status:"ok",key:t,namespace:e,patches:a}}function fe(i){let n=f(i.type);if(!n)return{status:"not_app_reserved"};let e=ve(i,n),t=Ne(e,n);return{status:"ok",typeName:n,patches:t}}function ke(i){let n={name:i.name===i.key?void 0:i.name,type:i.type.name,description:i.description??void 0,capabilities:u({admin_filterable:i.capabilities.adminFilterable.enabled||void 0}),access:u({admin:Z(i.access.admin),storefront:X(i.access.storefront),customer_account:Se(i.access.customerAccount)}),validations:z(i.validations)},{type:e,validations:t}=W(n.type,n.validations);return n.type=e,n.validations=t,n}function ve(i,n){return{name:i.name===n?void 0:i.name,description:i.description??void 0,display_name_field:i.displayNameKey??void 0,access:u({admin:Z(i.access.admin),storefront:X(i.access.storefront)}),capabilities:u({translatable:i.capabilities.translatable.enabled||void 0,publishable:i.capabilities.publishable.enabled||void 0,renderable:i.capabilities.renderable?.enabled||void 0,renderable_meta_title_field:i.capabilities.renderable?.data?.metaTitleKey??void 0,renderable_meta_description_field:i.capabilities.renderable?.data?.metaDescriptionKey??void 0}),fields:Object.fromEntries(i.fieldDefinitions.map(e=>{let t={type:e.type.name,description:e.description??void 0,name:e.name===e.key?void 0:e.name,required:e.required||void 0,validations:z(e.validations)},{type:d,validations:a}=W(t.type,t.validations);return t.type=d,t.validations=a,[e.key,t]}))}}function W(i,n){if(!n)return{type:i,validations:void 0};if(n.metaobject_definition_type&&typeof n.metaobject_definition_type=="string"){let e=f(n.metaobject_definition_type);return{type:`${i}<$app:${e}>`,validations:u({...n,metaobject_definition_type:void 0})}}if(n.metaobject_definition_types&&Array.isArray(n.metaobject_definition_types)&&n.metaobject_definition_types.every(e=>typeof e=="string")){let e=n.metaobject_definition_types.map(t=>f(t));return{type:`${i}<${e.map(t=>`$app:${t}`).join(",")}>`,validations:u({...n,metaobject_definition_types:void 0})}}return{type:i,validations:n}}function z(i){let n=e=>{try{return JSON.parse(e)}catch{return e}};return u(Object.fromEntries(i.filter(e=>e.value!==void 0&&e.name!=="metaobject_definition_id"&&e.name!=="metaobject_definition_ids").map(e=>[e.name,e.value?n(e.value):void 0])))}function be(i,n,e,t){let d=[[[n,"metafields",e,t,"name"],i.name],[[n,"metafields",e,t,"type"],i.type],[[n,"metafields",e,t,"description"],i.description]],a=[[[n,"metafields",e,t,"access","admin"],i.access?.admin],[[n,"metafields",e,t,"access","storefront"],i.access?.storefront],[[n,"metafields",e,t,"access","customer_account"],i.access?.customer_account],[[n,"metafields",e,t,"capabilities","admin_filterable"],i.capabilities?.admin_filterable||void 0]];return i.validations&&Q(i.validations).forEach(({validationKey:s,actualValue:l})=>{d.push([[n,"metafields",e,t,"validations",s],l])}),[b(d),b(a)]}function Ne(i,n){let e=[[["metaobjects","app",n,"name"],i.name===n?void 0:i.name],[["metaobjects","app",n,"description"],i.description],[["metaobjects","app",n,"display_name_field"],i.display_name_field]],t=[[["metaobjects","app",n,"access","admin"],i.access?.admin],[["metaobjects","app",n,"access","storefront"],i.access?.storefront]];return i.capabilities?.translatable&&t.push([["metaobjects","app",n,"capabilities","translatable"],!0]),i.capabilities?.publishable&&t.push([["metaobjects","app",n,"capabilities","publishable"],!0]),i.capabilities?.renderable&&(t.push([["metaobjects","app",n,"capabilities","renderable"],!0]),i.capabilities?.renderable_meta_title_field&&t.push([["metaobjects","app",n,"capabilities","renderable_meta_title_field"],i.capabilities.renderable_meta_title_field]),i.capabilities?.renderable_meta_description_field&&t.push([["metaobjects","app",n,"capabilities","renderable_meta_description_field"],i.capabilities.renderable_meta_description_field])),Object.entries(i.fields).forEach(([d,a])=>{if(typeof a=="string")e.push([["metaobjects","app",n,"fields",d],a]);else{let o=Object.fromEntries(Object.entries(a).filter(([s,l])=>l!==void 0));Object.keys(o).length===1?e.push([["metaobjects","app",n,"fields",d],a.type]):(e.push([["metaobjects","app",n,"fields",d,"type"],a.type]),e.push([["metaobjects","app",n,"fields",d,"description"],a.description]),e.push([["metaobjects","app",n,"fields",d,"name"],a.name]),e.push([["metaobjects","app",n,"fields",d,"required"],a.required||void 0]),a.validations&&Q(a.validations).forEach(({validationKey:l,actualValue:S})=>{e.push([["metaobjects","app",n,"fields",d,"validations",l],S])}))}}),[b(e),b(t)]}function Q(i){return Object.entries(i).map(([n,e])=>{let t;return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||Array.isArray(e)&&e.every(d=>typeof d=="string")?t=e:t=JSON.stringify(e),{validationKey:n,actualValue:t}})}function Z(i){switch(i){case"MERCHANT_READ_WRITE":return"merchant_read_write";case"MERCHANT_READ":case"PRIVATE":case"PUBLIC_READ":case"PUBLIC_READ_WRITE":case null:case void 0:return}}function X(i){switch(i){case"PUBLIC_READ":return"public_read";case"NONE":case null:case void 0:return}}function Se(i){switch(i){case"READ":return"read";case"READ_WRITE":return"read_write";case"NONE":case null:case void 0:return}}function u(i){if(i&&!A(i)&&!(typeof i=="object"&&Object.values(i).every(n=>n===void 0)))return i}function b(i){return i.filter(([n,e])=>e!==void 0)}r();var ee=m.object({type:m.literal("metafields"),ownerType:m.string().min(1).describe("The Admin API metafield owner type, such as PRODUCT.")}).strict(),ie=m.object({type:m.literal("metaobjects")}).strict(),N=h({name:"ImportCustomDataDefinitionsResult",schema:m.object({status:m.literal("success"),storeDomain:m.string().nullable().describe("The full myshopify.com domain of the development store, or null when unavailable."),metafieldCount:m.number().int().nonnegative().describe("The number of available metafields converted to TOML."),metaobjectCount:m.number().int().nonnegative().describe("The number of available metaobjects converted to TOML."),toml:m.string().describe("Suggested native TOML for app-reserved definitions. No file is written."),skippedSections:m.array(m.discriminatedUnion("type",[ee,ie])).describe("Sections skipped because required access scopes are unavailable. An empty array means all requests were authorized.")}).strict(),definitions:{SkippedMetafields:ee,SkippedMetaobjects:ie}});r();function ne({status:i,metafieldCount:n,metaobjectCount:e,storeDomain:t,tomlContent:d,skippedSections:a},o=!1){if(o){let s=D(t);C(N.encode({status:i,storeDomain:s?`${s}.myshopify.com`:null,metafieldCount:n,metaobjectCount:e,toml:d,skippedSections:a.map(l=>l.type==="metafields"?{type:l.type,ownerType:l.ownerType}:{type:l.type})}));return}O({headline:"Conversion to TOML complete.",body:["Converted",{warn:`${n} metafields`},"and",{warn:`${e} metaobjects`},"from",{warn:t},"into TOML, ready for you to copy."],orderedNextSteps:!0,nextSteps:["Review the suggested TOML carefully before applying.",["Missing sections? Make sure your app has the required access scopes to load metafields and metaobjects (e.g.",{command:"read_customers"},"to load customer metafields,",{command:"read_metaobject_definitions"},"to load metaobjects.)"],["Missing definitions? Only metafields and metaobjects that are app-reserved (using",{command:"$app"},") will be converted."],["When you're ready, add the generated TOML to your app's configuration file and test out changes with the",{command:"shopify app dev"},"command."]]}),ye(d)}function ye(i){let n=i.split(`
4
- `);for(let e of n)e.match(/^\s*\[/)?v(c`${p.green(e)}`):e.match(/^\s*#/)?v(c`${p.gray(e)}`):v(c`${e}`)}var y=_(te(),1);var F=class i extends V{static summary="Import metafield and metaobject definitions.";static descriptionWithMarkdown="Import metafield and metaobject definitions from your development store. [Read more about declarative custom data definitions](https://shopify.dev/docs/apps/build/custom-data/declarative-custom-data-definitions).";static get jsonOutputSchema(){return N}static description=this.descriptionForHelp();static flags={...E,...w,...M,store:y.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",parse:async n=>g(n)}),"include-existing":y.Flags.boolean({description:"Include existing declared definitions in the output.",default:!1,env:"SHOPIFY_FLAG_INCLUDE_EXISTING"})};async run(){let{appContextResult:n,json:e,...t}=await k({title:c`Loading application`,task:async()=>{let{flags:a}=await this.parse(i);await P(a.path);let o=await x({directory:a.path,clientId:a["client-id"],forceRelink:a.reset,userProvidedConfigName:a.config}),s=await $({appContextResult:o,storeFqdn:a.store,forceReselectStore:a.reset});return{appContextResult:o,json:a.json,appConfiguration:o.app.configuration,remoteApp:o.remoteApp,store:s,includeExistingDeclaredDefinitions:a["include-existing"]}}}),d=await Y(t);return ne(d,e),{app:n.app}}};export{F as a};
@@ -1,11 +0,0 @@
1
- import{a as S}from"./chunk-FKIVKNOV.js";import{a as R}from"./chunk-T2IUXXCT.js";import{a as f}from"./chunk-7GHSE7SG.js";import{a as C}from"./chunk-ZGV3HNEV.js";import{a as j}from"./chunk-FWB3GLMW.js";import{Ma as k,O}from"./chunk-3C6VLJ5D.js";import{b as y}from"./chunk-7UOA4DI7.js";import{b as w,c as A}from"./chunk-Q2SZCZE7.js";import{a as g}from"./chunk-BN7ZXAZJ.js";import{Sa as F,la as E,qb as l,sb as c,ta as x,wb as P}from"./chunk-LWCTKI4Z.js";import{b as r}from"./chunk-FZCGRIOM.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as m,g as b}from"./chunk-IWTNUJGY.js";import{e as H,g as o}from"./chunk-VKWPEFWQ.js";o();o();async function $({app:n,remoteApp:e,organization:a,envFile:i}){let{variables:s}=await R(n,e,a),t=m(i),p=await F(t)?await E(t):null,d=y(p,Object.fromEntries(s.map(({name:N,value:T})=>[N,T]))),v=d!==p;return v&&await x(t,d),{result:{path:t,status:"success",changed:v,variables:s,content:d},previousContent:p}}o();var u=g({name:"AppEnvPullResult",schema:r.object({path:r.string().refine(b,"Expected an absolute path").describe("The absolute native dotenv file path."),status:r.literal("success"),changed:r.boolean().describe("Whether the dotenv file was created or updated."),variables:r.array(f).describe("The known app variables, not unrelated local variables."),content:r.string().describe("The complete native dotenv content, preserving existing variables and comments.")}).strict(),definitions:{AppEnvironmentVariable:f}});o();import{resolve as V}from"node:path";function W({result:n,previousContent:e},a){if(a==="json")return u.encode({...n,path:V(n.path)});let{path:i,changed:s,content:t}=n;return s?e===null?c`Created ${l.path(i)}:
2
-
3
- ${t}
4
- `:c`Updated ${l.path(i)} to be:
5
-
6
- ${t}
7
-
8
- Here's what changed:
9
-
10
- ${l.linesDiff(S(e??"",t))}
11
- `:c`No changes to ${l.path(i)}`}function J(n,e){P(W(n,e))}var L=H(I(),1);var h=class n extends C{static summary="Pull app and extensions environment variables.";static descriptionWithMarkdown="Creates or updates an `.env` files that contains app and app extension environment variables.\n\n When an existing `.env` file is updated, changes to the variables are displayed in the terminal output. Existing variables and commented variables are preserved.";static get jsonOutputSchema(){return u}static description=this.descriptionForHelp();static flags={...w,...A,...j,"env-file":L.Flags.string({hidden:!1,description:"Specify an environment file to update if the update flag is set",env:"SHOPIFY_FLAG_ENV_FILE"})};async run(){let{flags:e}=await this.parse(n),{app:a,remoteApp:i,organization:s}=await k({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),t=m(a.directory,e["env-file"]??O(a.configPath)),p=await $({app:a,remoteApp:i,organization:s,envFile:t});return J(p,e.json?"json":"text"),{app:a}}};export{h as a};
@@ -1,20 +0,0 @@
1
- import{e as se}from"./chunk-QFWWCZOI.js";import{p as L,v as re}from"./chunk-DJAZBPYA.js";import{ca as Te,da as ie}from"./chunk-M5TGCSUK.js";import{r as X}from"./chunk-IUP7POIE.js";import{b as oe,c as E}from"./chunk-Q2SZCZE7.js";import{A as Z,z as T}from"./chunk-CZ22VZDA.js";import{c as Q}from"./chunk-J6TW43TG.js";import{h as N}from"./chunk-2VSNFOKD.js";import{Bb as ne,Da as D,N as I,Sa as j,_a as M,na as B,ta as A,wb as g,yb as ee,zb as te}from"./chunk-LWCTKI4Z.js";import{b as m,h as V,i as z,j as K}from"./chunk-FZCGRIOM.js";import{b as Oe}from"./chunk-YTUUU33R.js";import{c as O,e as R,g as U,o as q}from"./chunk-IWTNUJGY.js";import{e as b,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();import{AsyncLocalStorage as xe}from"node:async_hooks";import{format as Se}from"node:util";var ce=new xe,x=0,P;async function ae(t){if(K()!=="json")return t();x===0&&(P=console.error,console.error=(...e)=>{ce.getStore()?z({type:"diagnostic",level:"warning",message:Se(...e)}):P(...e)}),x++;try{return await ce.run(!0,t)}finally{Fe()}}function Fe(){x--,x===0&&(console.error=P)}var i=b(ie(),1),k=b(Te(),1);function _e(t,e){return t instanceof Error&&"code"in t&&t.code==="ENOENT"&&"path"in t&&typeof t.path=="string"&&R(t.path)===R(e)}async function Re(t){if(!(t===void 0||i.ModernIdentifiers.some(e=>e===t))&&await j(t)&&await D(await B(t)))throw new N(`Theme Check config must be a file, but ${t} is a directory.`,"Pass the path to a .theme-check.yml file to --config, or omit --config to use the .theme-check.yml in your theme root. To choose the theme directory, use --path.")}async function $(t,e){await Re(t);try{return await e()}catch(r){throw t!==void 0&&_e(r,t)?new N(`Theme Check config file not found: ${t}`):r}}function Ie(t){switch(t){case"error":return i.Severity.ERROR;case"suggestion":case"warning":return i.Severity.WARNING;case"style":case"info":return i.Severity.INFO;case"crash":return}}function ue(t){switch(t){case i.Severity.ERROR:return"error";case i.Severity.WARNING:return"warning";case i.Severity.INFO:return"info"}}function Ae(t){return new Map(t.map(e=>[e.uri,e.source]))}function je(t,e,r){let o=t.split(`
2
- `).slice(e,r+1),s=o.length===1;return o.map((c,a)=>{let u=e+a+1,h=s?c.trim():c;return`${u} ${h}`}).join(`
3
- `)}function Ne(t){switch(t){case i.Severity.ERROR:return{error:`
4
- [error]:`};case i.Severity.WARNING:return{warn:`
5
- [warning]:`};case i.Severity.INFO:return{info:`
6
- [info]:`}}}function Ee(t,e){return t.map((n,o)=>{let{message:s,uri:c,start:a,end:u,check:h,severity:y}=n,f=e.get(c),p=f===void 0?[]:[`
7
-
8
- ${je(f,a.line,u.line)}`],v=o===t.length-1?"":`
9
-
10
- `;return[Ne(y),{bold:h},{subdued:`
11
- ${s}`},...p,v]}).flat()}var Le=(t,e)=>t.severity-e.severity;function G(t){let e=t.reduce((r,n)=>{let{uri:o}=n,s=i.path.fsPath(o);return r[s]??=[],r[s].push(n),r},{});return Object.keys(e).reduce((r,n)=>(r[n]=e[n].sort(Le),r),{})}function me(t){return t.reduce((e,r)=>(e[r.severity]=(e[r.severity]??0)+1,e),{})}function he(t,e,r){let n=[`${r.length} files inspected`];if(t.length===0)n.push("with no offenses found.");else{n.push(`with ${t.length} total offenses found across ${Object.keys(e).length} files.`);let o=me(t);o[i.Severity.ERROR]&&n.push(`
12
- ${o[i.Severity.ERROR]} errors.`),o[i.Severity.WARNING]&&n.push(`
13
- ${o[i.Severity.WARNING]} warnings.`),o[i.Severity.INFO]&&n.push(`
14
- ${o[i.Severity.INFO]} info issues.`)}return n}function fe(t,e,r,n){let o=Ae(r);Object.keys(t).sort().forEach(c=>{let a=c.replace(e,"").slice(1);T({headline:n?`[${n}] ${a}`:a,body:Ee(t[c],o)})})}function Pe(t,e){return Object.entries(t).map(([r,n])=>{let o=n.map(c=>({check:c.check,severity:ue(c.severity),start_row:c.start.line,start_column:c.start.character,end_row:c.end.line,end_column:c.end.character,message:c.message})),s=me(n);return{environment:e,path:r,offenses:o,errorCount:s[i.Severity.ERROR]??0,warningCount:s[i.Severity.WARNING]??0,infoCount:s[i.Severity.INFO]??0}})}function le(t,e){process.exit(H(t,e)?1:0)}function H(t,e){let r=e?Ie(e):void 0;return r!==void 0&&t.some(n=>n.severity<=r)}function $e(t){return t.split(`
15
- `).map(e=>`# ${e}`).join(`
16
- `)}async function de(t){let e=".theme-check.yml",r=O(t,e);if(await j(r)){ee(`${e} already exists at ${t}`);return}let{settings:n}=await(0,i.loadConfig)(void 0,t),o=$e(k.default.stringify(n)),s=k.default.stringify({extends:"theme-check:recommended",ignore:["node_modules/**"]});await A(r,`${s}${o}`),te(`Created ${e} at ${t}`)}var Ge=async(t,e)=>{let r=(0,i.applyFixToString)(t.source,e),n=i.path.fsPath(t.uri);await A(n,r)};async function pe(t,e){await(0,i.autofix)(t,e,Ge)}async function ge(t,e,r){let{ignore:n,settings:o,rootUri:s}=await $(e,()=>(0,i.loadConfig)(e,t)),c={extends:[],ignore:I(n??[]),rootUri:s,...o},a=r?{[r]:c}:c;g(k.default.stringify(a))}async function ye(t,e,r){let{settings:n,ignore:o,checks:s}=await $(e,()=>(0,i.loadConfig)(e,t)),c=I(o??[]),u=Object.keys(n).reduce((y,f)=>{let{severity:p,enabled:v,...C}=n[f];if(!v)return y;let Ce=ue(p??i.Severity.INFO),w=s.find(be=>be.meta.code===f),we=w&&w.meta?{description:w.meta.docs.description,doc:w.meta.docs.url}:{};return y[f]={severity:Ce,...we,ignored_patterns:`[${c.join(", ")}]`,...C},y},{}),h=r?{[r]:u}:u;g(k.default.stringify(h))}function ve(t){return"_handle"in t&&typeof t._handle=="object"&&t._handle!==null&&typeof t._handle.setBlocking=="function"}async function W(t,e,r){let{offenses:n,theme:o}=await $(e,()=>ae(()=>(0,i.themeCheckRun)(t,e,c=>{process.env.SHOPIFY_TMP_FLAG_DEBUG&&ne(c)})));return{result:Pe(G(n),r),offenses:n,theme:o}}l();l();import{resolve as He}from"node:path";var ke=m.object({filePath:m.string().refine(U).describe("The absolute native path of the file."),check:m.string(),severity:m.enum(["error","warning","info"]),startRow:m.number().int().positive().describe("The one-based starting line."),startColumn:m.number().int().positive().describe("The one-based starting column."),endRow:m.number().int().positive().describe("The one-based ending line."),endColumn:m.number().int().positive().describe("The one-based ending column."),message:m.string()}).strict(),We=m.object({valid:m.boolean().describe("Whether the validation passes the selected blocking policy."),issues:m.array(ke),errorCount:m.number().int().nonnegative(),warningCount:m.number().int().nonnegative(),infoCount:m.number().int().nonnegative()}).strict(),S=se({name:"ThemeCheckResult",schema:We,definitions:{ThemeCheckIssue:ke},project:t=>{let{files:e,valid:r}=Array.isArray(t)?{files:t,valid:void 0}:t;return{valid:r??e.every(n=>n.errorCount===0),issues:e.flatMap(n=>n.offenses.map(o=>({filePath:He(n.path),check:o.check,severity:o.severity,startRow:o.start_row+1,startColumn:o.start_column+1,endRow:o.end_row+1,endColumn:o.end_column+1,message:o.message}))),errorCount:e.reduce((n,o)=>n+o.errorCount,0),warningCount:e.reduce((n,o)=>n+o.warningCount,0),infoCount:e.reduce((n,o)=>n+o.infoCount,0)}}});function Y(t){return JSON.stringify(JSON.parse(S.encode(t)))}function F({result:t,offenses:e,theme:r,valid:n},o,s,c){let a=G(e);if(o==="text"&&(fe(a,s,r,c),(e.length?T:Z)({headline:c?`[${c}] Theme Check Summary.`:"Theme Check Summary.",body:he(e,a,r)})),o==="json"){let u=process.stdout;ve(u)&&u._handle.setBlocking(!0),g(Y(n===void 0?t:{files:t,valid:n}))}}var d=b(Oe(),1);var J=b(ie(),1);var _=class extends re{static get jsonOutputSchema(){return S}static summary="Validate the theme.";static descriptionWithMarkdown="Calls and runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) to analyze your theme code for errors and to ensure that it follows theme and Liquid best practices. [Learn more about the checks that Theme Check runs.](https://shopify.dev/docs/themes/tools/theme-check/checks)";static description=this.descriptionForHelp();static flags={...oe,...E,json:d.Flags.boolean({...E.json,env:"SHOPIFY_FLAG_JSON",exclusive:["init","version","print","list"]}),path:L.path,"auto-correct":d.Flags.boolean({char:"a",required:!1,description:"Automatically fix offenses",env:"SHOPIFY_FLAG_AUTO_CORRECT"}),config:d.Flags.string({char:"C",required:!1,description:`Path to a config file to use, overriding .theme-check.yml if present
17
- Use --path to set the theme directory
18
- Supports all theme-check: config values, e.g., theme-check:theme-app-extension,
19
- theme-check:recommended, theme-check:all
20
- For backwards compatibility, :theme_app_extension is also supported `,env:"SHOPIFY_FLAG_CONFIG"}),"fail-level":d.Flags.string({required:!1,description:"Minimum severity for exit with error code",env:"SHOPIFY_FLAG_FAIL_LEVEL",options:["crash","error","suggestion","style","warning","info"],default:"error"}),init:d.Flags.boolean({required:!1,description:"Generate a .theme-check.yml file",env:"SHOPIFY_FLAG_INIT"}),list:d.Flags.boolean({required:!1,description:"List enabled checks",env:"SHOPIFY_FLAG_LIST"}),output:d.Flags.string({char:"o",required:!1,description:"The output format to use",env:"SHOPIFY_FLAG_OUTPUT",options:["text","json"],default:"text"}),print:d.Flags.boolean({required:!1,description:"Output active config to STDOUT",env:"SHOPIFY_FLAG_PRINT"}),version:d.Flags.boolean({char:"v",required:!1,description:"Print Theme Check version",env:"SHOPIFY_FLAG_VERSION"}),environment:L.environment};static multiEnvironmentsFlags=["path"];async command(e,r,n){let o=e.path,s=e.environment?.[0],a=e.config?.startsWith(":")&&J.LegacyIdentifiers.has(e.config.slice(1))?J.LegacyIdentifiers.get(e.config.slice(1)):e.config;if(e.init){await de(o);return}if(e.version){let v=await M(O("node_modules","@shopify","theme-check-node","package.json"),{type:"file",cwd:q(import.meta.url)}),C="unknown";v&&(C=await X(v)??"unknown"),g(C);return}if(e.print){await ge(o,a,s);return}if(e.list){await ye(o,a,s);return}let u=await W(o,a,s),{offenses:h,theme:y}=u,f=e.json||e.output==="json",p=!H(h,e["fail-level"]);if(f||F({...u,valid:p},e.output,o,s),e["auto-correct"]&&await pe(y,h),f&&!n&&F({...u,valid:p},"json",o,s),f)return p||(process.exitCode=1),{files:u.result,valid:p};if(!n)return le(h,e["fail-level"])}async _run(){let e=this.argv.indexOf("--"),r=e<0?this.argv:this.argv.slice(0,e),n=Ye(r)==="json";return n&&!r.includes("--json")&&(this.argv=[...r,"--json",...e<0?[]:this.argv.slice(e)]),n?V({outputMode:"json",sink:Q},()=>super._run()):super._run()}collectsEnvironmentResults(e){return!!e.json||e.output==="json"}validateCommandFlags(e){if(!this.collectsEnvironmentResults(e))return;let r=["init","version","print","list"].find(n=>e[n]);r&&this.error(`JSON output can't be used with --${r}.`,{exit:2})}renderEnvironmentResults(e){g(Y({environments:e}))}};function Ye(t){let e=process.env.SHOPIFY_FLAG_OUTPUT,r=Object.entries(_.flags);for(let n=0;n<t.length;n++){let o=t[n];if(o.startsWith("--")){let[s,...c]=o.slice(2).split("=");if(r.find(([h])=>h===s)?.[1]?.type!=="option")continue;let u=c.length?c.join("="):t[++n];s==="output"&&(e=u)}else if(o.startsWith("-"))for(let s=1;s<o.length;s++){let c=r.find(([,u])=>u.char===o[s]);if(!c)break;if(c[1].type!=="option")continue;let a=o.slice(s+1).replace(/^=/,"")||t[++n];c[0]==="output"&&(e=a);break}}return e}async function xt(t,e,r,n){let o=await W(t,r,n);return F(o,e,t,n),{offenses:o.offenses,theme:o.theme}}export{_ as a,xt as b};
@@ -1 +0,0 @@
1
- import{e as c}from"./chunk-OGWPS55W.js";import{S as s}from"./chunk-H4V55Y3Z.js";import{h as p,k as a}from"./chunk-2VSNFOKD.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
@@ -1 +0,0 @@
1
- import{i as t,ka as r}from"./chunk-3C6VLJ5D.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function o(i,e,s){return await r(e,s.source),{variables:[{name:"SHOPIFY_API_KEY",value:e.apiKey,isSecret:!1},...e.apiSecretKeys[0]?[{name:"SHOPIFY_API_SECRET",value:e.apiSecretKeys[0].secret,isSecret:!0}]:[],{name:"SCOPES",value:t(i.configuration),isSecret:!1}]}}export{o as a};