shopify 5.0.1 → 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 (331) hide show
  1. package/dist/analytics-NMMVOF4B.js +1 -0
  2. package/dist/{analytics-RSUIYNLC.js → analytics-UK77WNLG.js} +1 -1
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-FTHVOIK7.js → chunk-224UPIYS.js} +1 -1
  5. package/dist/{chunk-YFRI75U4.js → chunk-26PWHH3B.js} +1 -1
  6. package/dist/{chunk-5TWYJQQO.js → chunk-27NXPOAS.js} +1 -1
  7. package/dist/{chunk-FK5OFLSJ.js → chunk-2A2JSAAA.js} +1 -1
  8. package/dist/{chunk-63UKZLPC.js → chunk-2L6AN3QA.js} +1 -1
  9. package/dist/{chunk-B2VE7WOX.js → chunk-2MT3LSMZ.js} +1 -1
  10. package/dist/{chunk-MZWPIFAM.js → chunk-2T4HDR6R.js} +1 -1
  11. package/dist/{chunk-37P5YOP2.js → chunk-2WJOTJOD.js} +1 -1
  12. package/dist/{chunk-FS5PZCZ3.js → chunk-2ZBXHCQZ.js} +1 -1
  13. package/dist/chunk-33ZE3DRQ.js +16 -0
  14. package/dist/{chunk-T5YVYVSW.js → chunk-34MOWGRL.js} +1 -1
  15. package/dist/{chunk-7NYCJG2U.js → chunk-35XFNKNB.js} +1 -1
  16. package/dist/{chunk-C3LL5CZA.js → chunk-3JSKNXL7.js} +1 -1
  17. package/dist/{chunk-5AWELO3D.js → chunk-3KM5ZOW2.js} +1 -1
  18. package/dist/{chunk-WQ6W725N.js → chunk-3MG4MTWQ.js} +1 -1
  19. package/dist/{chunk-ZBVHPC6W.js → chunk-3MYDSQHF.js} +1 -1
  20. package/dist/{chunk-VG2AESTZ.js → chunk-3ODQKAEA.js} +1 -1
  21. package/dist/{chunk-7U2MTK6I.js → chunk-3XRI3D44.js} +1 -1
  22. package/dist/{chunk-K3YALQBQ.js → chunk-3Z3MADXZ.js} +1 -1
  23. package/dist/chunk-43R5VGKT.js +1 -0
  24. package/dist/{chunk-CXPYOLGM.js → chunk-4KECSZTL.js} +1 -1
  25. package/dist/{chunk-4GQEXVDT.js → chunk-4WYKPIN3.js} +1 -1
  26. package/dist/{chunk-XYFYQWKW.js → chunk-5AEZJZNQ.js} +1 -1
  27. package/dist/{chunk-6JZC6UKY.js → chunk-5ED7SOQZ.js} +1 -1
  28. package/dist/{chunk-YCUEDZDA.js → chunk-5IDJALJH.js} +1 -1
  29. package/dist/{chunk-LENSEW2F.js → chunk-62EOM3Y2.js} +1 -1
  30. package/dist/{chunk-3JACWBUC.js → chunk-64G5TGFF.js} +1 -1
  31. package/dist/{chunk-LWMKZJ4M.js → chunk-66TMIQMB.js} +1 -1
  32. package/dist/{chunk-B4ISKIXN.js → chunk-67L7FIB6.js} +1 -1
  33. package/dist/{chunk-LGXNXAQA.js → chunk-6ES4KRFW.js} +1 -1
  34. package/dist/{chunk-YQ63ZFYT.js → chunk-74NRFUGQ.js} +1 -1
  35. package/dist/{chunk-2QQ7EBJD.js → chunk-7CCTPBCT.js} +1 -1
  36. package/dist/{chunk-X7DCL5LT.js → chunk-7GUMJ5E4.js} +1 -1
  37. package/dist/{chunk-OUMERKRE.js → chunk-7NFTSBHQ.js} +1 -1
  38. package/dist/{chunk-A7LBGXWG.js → chunk-ACZNWIRY.js} +1 -1
  39. package/dist/{chunk-MMUGP3WP.js → chunk-AQ6EVL73.js} +1 -1
  40. package/dist/{chunk-KNQXCU3Y.js → chunk-AQKWPRZE.js} +1 -1
  41. package/dist/chunk-AUE7LM32.js +1 -0
  42. package/dist/{chunk-H57KYDEI.js → chunk-AXL2VIWA.js} +1 -1
  43. package/dist/{chunk-V2FCZC7U.js → chunk-B2O3ANRZ.js} +1 -1
  44. package/dist/chunk-B3ZJGYZY.js +3 -0
  45. package/dist/{chunk-KVF55INC.js → chunk-BWN2QG6D.js} +1 -1
  46. package/dist/{chunk-EA5XVQJT.js → chunk-C3RFAKWR.js} +1 -1
  47. package/dist/{chunk-4IUXLUFD.js → chunk-CCUQM4FX.js} +1 -1
  48. package/dist/{chunk-2M4BKFYF.js → chunk-CGVROSPS.js} +1 -1
  49. package/dist/{chunk-6Y6A2QGK.js → chunk-CLUUA3HX.js} +1 -1
  50. package/dist/{chunk-FHNJLON5.js → chunk-CXI3RHPW.js} +1 -1
  51. package/dist/chunk-CYEEGTVZ.js +11 -0
  52. package/dist/{chunk-V654BMS7.js → chunk-D2KIGKBI.js} +2 -2
  53. package/dist/chunk-DBDTE3EE.js +5 -0
  54. package/dist/{chunk-4SDCXKYR.js → chunk-DLVB3237.js} +1 -1
  55. package/dist/{chunk-OH7BQZQ7.js → chunk-DN6X7SHW.js} +1 -1
  56. package/dist/{chunk-5XOEMYEQ.js → chunk-DZKFP6H2.js} +1 -1
  57. package/dist/{chunk-2S5NPJEJ.js → chunk-E5COIKGY.js} +1 -1
  58. package/dist/{chunk-PXFPVGWV.js → chunk-E6RONHMT.js} +1 -1
  59. package/dist/{chunk-ADVLRSSO.js → chunk-EAZIQI2D.js} +1 -1
  60. package/dist/{chunk-RFZNFTVM.js → chunk-EEY4FKAW.js} +1 -1
  61. package/dist/{chunk-E3CTHNQS.js → chunk-EKFPTBXC.js} +1 -1
  62. package/dist/{chunk-CX3ANDPI.js → chunk-ER6C5WS3.js} +1 -1
  63. package/dist/{chunk-5YUDEPEY.js → chunk-ESFCYB46.js} +1 -1
  64. package/dist/{chunk-DSKAIC7O.js → chunk-F3CK3EJJ.js} +1 -1
  65. package/dist/{chunk-AOBE6HN6.js → chunk-FEBOZ2XX.js} +1 -1
  66. package/dist/{chunk-OYGIQDME.js → chunk-GNCVDN7U.js} +1 -1
  67. package/dist/{chunk-NCPZVARH.js → chunk-GQLNG537.js} +3 -3
  68. package/dist/{chunk-HPT3UXZ5.js → chunk-GVI3DWSB.js} +1 -1
  69. package/dist/{chunk-PVASYKSJ.js → chunk-GW7YIJPJ.js} +1 -1
  70. package/dist/{chunk-KGASGUDQ.js → chunk-H6GNKWYM.js} +1 -1
  71. package/dist/{chunk-2NZ7GDDR.js → chunk-H6GYBLVQ.js} +1 -1
  72. package/dist/chunk-HSKDFEXW.js +1 -0
  73. package/dist/{chunk-REDUS6EW.js → chunk-HTRJU4R4.js} +1 -1
  74. package/dist/{chunk-BB7GAZP6.js → chunk-HXZAY5OA.js} +1 -1
  75. package/dist/{chunk-TTBNFGCW.js → chunk-I4CEH7AK.js} +1 -1
  76. package/dist/{chunk-HXNGLDMU.js → chunk-I7PEEJVH.js} +1 -1
  77. package/dist/{chunk-5YXYYQBX.js → chunk-IHMATNOR.js} +1 -1
  78. package/dist/{chunk-QGWC23HQ.js → chunk-IHXGZW42.js} +1 -1
  79. package/dist/{chunk-2RFCYZMG.js → chunk-IJY3RJPJ.js} +1 -1
  80. package/dist/{chunk-WQOPLNDH.js → chunk-ISKQQXLZ.js} +1 -1
  81. package/dist/{chunk-NMLLRFZF.js → chunk-J55GQLP4.js} +1 -1
  82. package/dist/{chunk-AIEVQSI3.js → chunk-J5ERDFIC.js} +1 -1
  83. package/dist/{chunk-RIG66DIQ.js → chunk-JLQRDFR5.js} +3 -3
  84. package/dist/{chunk-WAY723TL.js → chunk-JPWRZ5SL.js} +1 -1
  85. package/dist/{chunk-WGOSE3RL.js → chunk-K7ZSPQKL.js} +1 -1
  86. package/dist/{chunk-X4A5D3PZ.js → chunk-KNWT7JLL.js} +1 -1
  87. package/dist/{chunk-CWR3IFXD.js → chunk-KZRLZWOU.js} +1 -1
  88. package/dist/chunk-L5TSPCSY.js +26 -0
  89. package/dist/{chunk-F3OM2YO6.js → chunk-LEHBZKK3.js} +1 -1
  90. package/dist/{chunk-HT66BOEC.js → chunk-LGXI7EGM.js} +1 -1
  91. package/dist/{chunk-GSGCSBRN.js → chunk-LHXFTFFM.js} +1 -1
  92. package/dist/{chunk-IULZYDCI.js → chunk-LUGMXSRI.js} +1 -1
  93. package/dist/chunk-M2CWCOFU.js +11 -0
  94. package/dist/{chunk-J7BTC45S.js → chunk-M5VIFG2V.js} +1 -1
  95. package/dist/{chunk-OQUXGAF2.js → chunk-MADINS4Z.js} +1 -1
  96. package/dist/{chunk-QYFU363G.js → chunk-MEYVUHQH.js} +1 -1
  97. package/dist/{chunk-GGJUPL4W.js → chunk-MGHPF7HU.js} +1 -1
  98. package/dist/{chunk-J3UXIC23.js → chunk-MHR5OHT5.js} +1 -1
  99. package/dist/{chunk-CFUZ6574.js → chunk-MXEXP3HT.js} +1 -1
  100. package/dist/{chunk-ZHHTQRWU.js → chunk-N57Y7THE.js} +1 -1
  101. package/dist/{chunk-D4LFWIFE.js → chunk-NVKJ7ZLP.js} +1 -1
  102. package/dist/{chunk-QVVQUJQL.js → chunk-NXAEBGMO.js} +1 -1
  103. package/dist/{chunk-PNZURX3S.js → chunk-OJULL7HT.js} +1 -1
  104. package/dist/{chunk-JMVK2BIB.js → chunk-OMPQ7REW.js} +1 -1
  105. package/dist/{chunk-2AW3KBTP.js → chunk-OR4IJ4BQ.js} +1 -1
  106. package/dist/{chunk-GCKGQFV7.js → chunk-P2RMFHQP.js} +1 -1
  107. package/dist/{chunk-GHU6YEXH.js → chunk-P4VZYOKO.js} +2 -2
  108. package/dist/{chunk-FNWXMCSD.js → chunk-PDZBKVWL.js} +1 -1
  109. package/dist/{chunk-VXL5FBE7.js → chunk-PF53E2DC.js} +1 -1
  110. package/dist/{chunk-ETXBF6Q7.js → chunk-PLSS456F.js} +1 -1
  111. package/dist/{chunk-EH22T4FI.js → chunk-PTSCGSQV.js} +2 -2
  112. package/dist/{chunk-P5W5RVE6.js → chunk-PWAT52M4.js} +1 -1
  113. package/dist/{chunk-UU2R56LN.js → chunk-Q2KWXZQB.js} +1 -1
  114. package/dist/{chunk-DVW7NDVD.js → chunk-Q4JYAUVL.js} +1 -1
  115. package/dist/{chunk-3G2PEYPI.js → chunk-Q5IC3IYY.js} +1 -1
  116. package/dist/{chunk-ZTZGDZCE.js → chunk-QDCLL5OI.js} +1 -1
  117. package/dist/{chunk-56GKTWFF.js → chunk-QEKGGTMN.js} +1 -1
  118. package/dist/{chunk-36TZ447N.js → chunk-QEVTBD33.js} +1 -1
  119. package/dist/{chunk-DM7BTMFP.js → chunk-QF5WKTPD.js} +1 -1
  120. package/dist/{chunk-RDXLDCMI.js → chunk-QFSENE5T.js} +1 -1
  121. package/dist/chunk-QQJNQNKP.js +6 -0
  122. package/dist/{chunk-AQ34X5B3.js → chunk-QW52RPAU.js} +1 -1
  123. package/dist/{chunk-4QZ6OBXL.js → chunk-R4UVIYZP.js} +1 -1
  124. package/dist/{chunk-DTRENW4Q.js → chunk-RLNIOJH3.js} +1 -1
  125. package/dist/{chunk-LR4J4KYJ.js → chunk-RPCIFYCY.js} +1 -1
  126. package/dist/{chunk-2YGPWG3I.js → chunk-RPVZ2JON.js} +1 -1
  127. package/dist/{chunk-M2KX3PXA.js → chunk-RW6G4ZPU.js} +1 -1
  128. package/dist/{chunk-YXIFSIRX.js → chunk-S4LOWCGS.js} +1 -1
  129. package/dist/{chunk-ZVEBXHEY.js → chunk-S5P7KWY4.js} +1 -1
  130. package/dist/{chunk-XZLM4HLO.js → chunk-SACNUF4I.js} +1 -1
  131. package/dist/chunk-SB27UOXX.js +1 -0
  132. package/dist/{chunk-2TPLPZA2.js → chunk-SHD4VV5V.js} +1 -1
  133. package/dist/{chunk-75LAVRRL.js → chunk-SIL6HPMK.js} +2 -2
  134. package/dist/{chunk-7AWAOPLA.js → chunk-SK7EPN6C.js} +1 -1
  135. package/dist/{chunk-4EDE3UH7.js → chunk-SLY27GDC.js} +1 -1
  136. package/dist/{chunk-KOTZSPZA.js → chunk-SNH4XZ6E.js} +1 -1
  137. package/dist/{chunk-MZCIRMZJ.js → chunk-T4XJKM6B.js} +1 -1
  138. package/dist/{chunk-OPVXPDOQ.js → chunk-TAWCKJKP.js} +1 -1
  139. package/dist/{chunk-2CJQQQW4.js → chunk-TFPW2VGN.js} +1 -1
  140. package/dist/{chunk-HP2ZAAY7.js → chunk-TODZ3TJR.js} +1 -1
  141. package/dist/{chunk-XV6XCOTG.js → chunk-U2T5HPRD.js} +1 -1
  142. package/dist/{chunk-VXD26GIG.js → chunk-U6YOP562.js} +1 -1
  143. package/dist/{chunk-43HKFLOU.js → chunk-UBP3LQFY.js} +1 -1
  144. package/dist/{chunk-C4EKNOLY.js → chunk-UKWIWCOH.js} +1 -1
  145. package/dist/{chunk-HNU6R7RT.js → chunk-UPPO3BMT.js} +1 -1
  146. package/dist/{chunk-J5DUFSR4.js → chunk-URXM5A2K.js} +1 -1
  147. package/dist/{chunk-FVRI7ZKE.js → chunk-USXIXANP.js} +1 -1
  148. package/dist/{chunk-MS7DTL4U.js → chunk-UUAKOX7E.js} +1 -1
  149. package/dist/{chunk-GNPIKPHB.js → chunk-UV5GAGAD.js} +1 -1
  150. package/dist/{chunk-EXTVC33U.js → chunk-UXVXVI6O.js} +1 -1
  151. package/dist/{chunk-CNPBDSDL.js → chunk-UY6W2EVZ.js} +1 -1
  152. package/dist/{chunk-IAL6IQYW.js → chunk-UYELAINQ.js} +1 -1
  153. package/dist/{chunk-ULMNNGGX.js → chunk-VAVXDIUX.js} +1 -1
  154. package/dist/{chunk-XKKKMV46.js → chunk-VEUKT5EI.js} +1 -1
  155. package/dist/chunk-VGSH52JM.js +1 -0
  156. package/dist/chunk-VHZ6RL67.js +1 -0
  157. package/dist/{chunk-PRKJVU4Y.js → chunk-VQA3X7O3.js} +1 -1
  158. package/dist/{chunk-32O27NE3.js → chunk-VZCMJRYV.js} +1 -1
  159. package/dist/{chunk-NJVNGEOU.js → chunk-W37IFK3P.js} +1 -1
  160. package/dist/{chunk-MNWT2SQO.js → chunk-W56ZGEQQ.js} +1 -1
  161. package/dist/{chunk-MXXMIPUN.js → chunk-WBVS5NBV.js} +1 -1
  162. package/dist/{chunk-QBE6XVU3.js → chunk-WCC52MR2.js} +1 -1
  163. package/dist/{chunk-KLYGMYXV.js → chunk-WESTVWWD.js} +1 -1
  164. package/dist/{chunk-364BVGRY.js → chunk-WRZWHT6M.js} +1 -1
  165. package/dist/{chunk-M7NLCGCP.js → chunk-WSDKCQH6.js} +1 -1
  166. package/dist/{chunk-IWTOC6DG.js → chunk-X2PFXSU4.js} +1 -1
  167. package/dist/{chunk-CKVVJ4XO.js → chunk-X5NIAZA4.js} +1 -1
  168. package/dist/{chunk-RWTAPWLJ.js → chunk-XBMD3FEZ.js} +1 -1
  169. package/dist/{chunk-W7S6SYBM.js → chunk-XDVPIGXE.js} +1 -1
  170. package/dist/chunk-XLIJYJ6Q.js +1 -0
  171. package/dist/chunk-XUHGWIWW.js +4 -0
  172. package/dist/{chunk-IY5EI5V2.js → chunk-XWSWXQCC.js} +1 -1
  173. package/dist/{chunk-5AQ5JT2V.js → chunk-Y55T4IIQ.js} +1 -1
  174. package/dist/{chunk-QX3T6G5X.js → chunk-Y5CVX5LJ.js} +1 -1
  175. package/dist/{chunk-5D4FNAAD.js → chunk-Y6J46XYF.js} +1 -1
  176. package/dist/{chunk-KT5QQOES.js → chunk-YKMINHYY.js} +1 -1
  177. package/dist/{chunk-FPOZMNT2.js → chunk-YSWVYPWR.js} +1 -1
  178. package/dist/{chunk-M73IECPW.js → chunk-YV2TP44L.js} +1 -1
  179. package/dist/{chunk-V7H7ITCF.js → chunk-Z2WAW6MM.js} +1 -1
  180. package/dist/chunk-ZBL7XMJ6.js +25 -0
  181. package/dist/{chunk-RNUEPPVN.js → chunk-ZGBTO46A.js} +1 -1
  182. package/dist/{chunk-OLKLHVHA.js → chunk-ZJOX5HW4.js} +4 -4
  183. package/dist/{chunk-L6VONMA2.js → chunk-ZOOT3GBY.js} +1 -1
  184. package/dist/{chunk-NUCDRKDW.js → chunk-ZRI3SSLG.js} +1 -1
  185. package/dist/cli/commands/app/build.js +1 -1
  186. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  187. package/dist/cli/commands/app/bulk/execute.js +1 -1
  188. package/dist/cli/commands/app/bulk/status.js +1 -1
  189. package/dist/cli/commands/app/config/link.js +1 -1
  190. package/dist/cli/commands/app/config/pull.js +1 -1
  191. package/dist/cli/commands/app/config/use.js +1 -1
  192. package/dist/cli/commands/app/config/validate.js +1 -1
  193. package/dist/cli/commands/app/demo/watcher.js +1 -1
  194. package/dist/cli/commands/app/deploy.js +1 -1
  195. package/dist/cli/commands/app/dev/clean.js +1 -1
  196. package/dist/cli/commands/app/dev.js +1 -1
  197. package/dist/cli/commands/app/env/pull.js +1 -1
  198. package/dist/cli/commands/app/env/show.js +1 -1
  199. package/dist/cli/commands/app/execute.js +1 -1
  200. package/dist/cli/commands/app/function/build.js +1 -1
  201. package/dist/cli/commands/app/function/info.js +1 -1
  202. package/dist/cli/commands/app/function/replay.js +1 -1
  203. package/dist/cli/commands/app/function/run.js +1 -1
  204. package/dist/cli/commands/app/function/schema.js +1 -1
  205. package/dist/cli/commands/app/function/typegen.js +1 -1
  206. package/dist/cli/commands/app/generate/extension.js +1 -1
  207. package/dist/cli/commands/app/graphiql.js +1 -1
  208. package/dist/cli/commands/app/import/channel-config.js +1 -1
  209. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  210. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  211. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  212. package/dist/cli/commands/app/import-extensions.js +1 -1
  213. package/dist/cli/commands/app/info.js +1 -1
  214. package/dist/cli/commands/app/init.js +1 -1
  215. package/dist/cli/commands/app/logs.js +1 -1
  216. package/dist/cli/commands/app/release.js +1 -1
  217. package/dist/cli/commands/app/security/check.js +1 -1
  218. package/dist/cli/commands/app/security/clean.js +1 -1
  219. package/dist/cli/commands/app/security/instructions.js +1 -1
  220. package/dist/cli/commands/app/security/record.js +1 -1
  221. package/dist/cli/commands/app/security/review.js +1 -1
  222. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  223. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  224. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  225. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  226. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  227. package/dist/cli/commands/app/versions/list.js +1 -1
  228. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  229. package/dist/cli/commands/auth/login.js +1 -1
  230. package/dist/cli/commands/auth/logout.js +1 -1
  231. package/dist/cli/commands/cache/clear.js +1 -1
  232. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  233. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  234. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  235. package/dist/cli/commands/debug/command-flags.js +1 -1
  236. package/dist/cli/commands/doc/fetch.js +1 -1
  237. package/dist/cli/commands/doc/search.js +1 -1
  238. package/dist/cli/commands/docs/generate.js +1 -1
  239. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  240. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  241. package/dist/cli/commands/help.js +1 -1
  242. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  243. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  244. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  245. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  246. package/dist/cli/commands/notifications/generate.js +1 -1
  247. package/dist/cli/commands/notifications/list.js +1 -1
  248. package/dist/cli/commands/organization/list.js +1 -1
  249. package/dist/cli/commands/search.js +1 -1
  250. package/dist/cli/commands/send-analytics.js +1 -1
  251. package/dist/cli/commands/theme/check.js +1 -1
  252. package/dist/cli/commands/theme/console.js +1 -1
  253. package/dist/cli/commands/theme/delete.js +1 -1
  254. package/dist/cli/commands/theme/dev.js +1 -1
  255. package/dist/cli/commands/theme/duplicate.js +1 -1
  256. package/dist/cli/commands/theme/info.js +1 -1
  257. package/dist/cli/commands/theme/init.js +1 -1
  258. package/dist/cli/commands/theme/language-server.js +1 -1
  259. package/dist/cli/commands/theme/list.js +1 -1
  260. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  261. package/dist/cli/commands/theme/open.js +1 -1
  262. package/dist/cli/commands/theme/package.js +1 -1
  263. package/dist/cli/commands/theme/preview.js +1 -1
  264. package/dist/cli/commands/theme/profile.js +1 -1
  265. package/dist/cli/commands/theme/publish.js +1 -1
  266. package/dist/cli/commands/theme/pull.js +1 -1
  267. package/dist/cli/commands/theme/push.js +1 -1
  268. package/dist/cli/commands/theme/rename.js +1 -1
  269. package/dist/cli/commands/theme/share.js +1 -1
  270. package/dist/cli/commands/upgrade.js +1 -1
  271. package/dist/cli/commands/version.js +1 -1
  272. package/dist/cli/help.js +1 -1
  273. package/dist/{command-json-schema-6EGXCM4B.js → command-json-schema-F5XF7XHL.js} +1 -1
  274. package/dist/command-registry.js +1 -1
  275. package/dist/{conf-store-E7ELDWBA.js → conf-store-5CBLWTOC.js} +1 -1
  276. package/dist/{custom-oclif-loader-FKFZJPHF.js → custom-oclif-loader-UDVUFKMD.js} +1 -1
  277. package/dist/{deprecations-RNGBHZYB.js → deprecations-EOHPSTCS.js} +1 -1
  278. package/dist/dist-RNV3GFZ7.js +1 -0
  279. package/dist/dist-ZFKWJVNB.js +1 -0
  280. package/dist/{environments-WZJ6MRTH.js → environments-4FLRZW4P.js} +1 -1
  281. package/dist/{error-IFB626JA.js → error-JY2ADS6S.js} +1 -1
  282. package/dist/error-handler-4GCXKC6I.js +1 -0
  283. package/dist/{fs-7UOUHJDO.js → fs-XS5YF34R.js} +1 -1
  284. package/dist/hooks/did-you-mean.js +1 -1
  285. package/dist/hooks/hydrogen-init.js +1 -1
  286. package/dist/hooks/postrun.js +1 -1
  287. package/dist/hooks/prerun.js +1 -1
  288. package/dist/hooks/public-metadata.js +1 -1
  289. package/dist/hooks/sensitive-metadata.js +1 -1
  290. package/dist/hooks/tunnel-provider.js +1 -1
  291. package/dist/hooks/tunnel-start.js +1 -1
  292. package/dist/index.js +1 -1
  293. package/dist/{is-global-XW3CVHLK.js → is-global-27MUENOK.js} +1 -1
  294. package/dist/{json-error-C2U7ZLCG.js → json-error-S5XFS3UX.js} +1 -1
  295. package/dist/{local-KA3IWOZ6.js → local-OKPVB4NH.js} +1 -1
  296. package/dist/{metadata-6JI7HF5B.js → metadata-2YJBAKR7.js} +1 -1
  297. package/dist/{node-package-manager-X3QIEMMX.js → node-package-manager-B3OW3PFQ.js} +1 -1
  298. package/dist/{notifications-system-OXGLT2R4.js → notifications-system-BWTDYBG2.js} +1 -1
  299. package/dist/{os-NORIEVMI.js → os-F6QKJCFW.js} +1 -1
  300. package/dist/{output-K3JTLRJD.js → output-BRIPK7UC.js} +1 -1
  301. package/dist/{system-LTHR2T7L.js → system-466QKFDI.js} +1 -1
  302. package/dist/tsconfig.tsbuildinfo +1 -1
  303. package/dist/{ui-MYUBVKCK.js → ui-VJTNGCS6.js} +1 -1
  304. package/dist/upgrade-VHVJLXKX.js +1 -0
  305. package/dist/{version-RCGFWSB4.js → version-FETZRLZO.js} +1 -1
  306. package/dist/version-T4XXTJMB.js +1 -0
  307. package/dist/{workerd-ISSXMKIH.js → workerd-32DMKLMN.js} +1 -1
  308. package/oclif.manifest.json +1 -1
  309. package/package.json +7 -7
  310. package/dist/analytics-V2SDYXQJ.js +0 -1
  311. package/dist/chunk-2M535QQJ.js +0 -6
  312. package/dist/chunk-46JYM3GH.js +0 -1
  313. package/dist/chunk-7XAEI4XT.js +0 -3
  314. package/dist/chunk-BNTOGZLY.js +0 -1
  315. package/dist/chunk-BU3JQM3W.js +0 -1
  316. package/dist/chunk-JUTULEWW.js +0 -5
  317. package/dist/chunk-MHWETFNT.js +0 -1
  318. package/dist/chunk-MU2X7NGF.js +0 -11
  319. package/dist/chunk-NMECLRGK.js +0 -11
  320. package/dist/chunk-NPB753M3.js +0 -1
  321. package/dist/chunk-Q2ORJEB2.js +0 -25
  322. package/dist/chunk-UDPYSL3M.js +0 -4
  323. package/dist/chunk-URCH4ITT.js +0 -1
  324. package/dist/chunk-WFOU5M4H.js +0 -16
  325. package/dist/chunk-XDXHSGDL.js +0 -1
  326. package/dist/chunk-XRVJJG6W.js +0 -26
  327. package/dist/dist-VHIZZDYK.js +0 -1
  328. package/dist/dist-WXI5YQYP.js +0 -1
  329. package/dist/error-handler-OVJYVIOZ.js +0 -1
  330. package/dist/upgrade-MFTWBXL3.js +0 -1
  331. package/dist/version-BNGPPAUU.js +0 -1
@@ -1,4 +1,4 @@
1
- import{b as Ti}from"./chunk-LQ7ENG4V.js";import{$ as ci,$a as Fi,A as kt,Aa as Ei,B as Cr,Ba as so,C as ei,Ca as ao,D as ti,Da as co,E as Or,Ea as Pi,F as oi,Fa as lo,G as Dr,Ga as mo,H as Zt,Ha as xi,I as eo,Ia as uo,J as ot,Ja as po,K as ri,Ka as We,L as w,La as fo,M as G,Ma as ho,N as ni,Na as Ci,O as ke,Oa as Oi,P as to,Pa as Di,Q as Et,Qa as yo,R as rt,Ra as Je,S as Oe,Sa as at,T as ii,Ta as Pt,U as _e,Ua as wo,V as De,Va as ct,W as si,Wa as vo,X as oo,Xa as Ii,Y as we,Ya as $i,Z as Rr,Za as ji,_ as ai,_a as bo,a as Bn,aa as Tr,ab as Ai,b as de,ba as Ir,bb as _i,c as j,ca as nt,d as B,da as it,e as Gn,ea as li,f as Er,fa as ro,g as Yn,ga as di,h as qn,ha as mi,i as Wn,ia as ui,ib as Ni,j as Jn,ja as pi,k as zn,ka as fi,l as R,la as qe,m as Ze,ma as hi,n as Qn,na as X,o as Ye,oa as st,p as Ce,pa as gi,q as et,qa as yi,r as Kn,ra as no,s as Xn,sa as io,t as Pr,ta as wi,u as tt,ua as ve,v as St,va as vi,w as Ae,wa as bi,x as Zn,xa as $r,y as Xt,ya as Si,z as xr,za as ki}from"./chunk-MS7DTL4U.js";import{a as An}from"./chunk-JLGA3B7P.js";import{b as Vn}from"./chunk-XZLM4HLO.js";import{b as _n,c as Nn,d as Kt,h as Hn,j as Ln,k as Mn,l as Un}from"./chunk-EH22T4FI.js";import{a as Pa}from"./chunk-UWHAOGO4.js";import{a as So}from"./chunk-FKIVKNOV.js";import{a as go,b as Ri}from"./chunk-LGXNXAQA.js";import{Ca as Ea,ha as ge,i as Cn,j as Se}from"./chunk-NCPZVARH.js";import{B as $n,l as Dn,m as Pe,p as Yt,s as Rn,u as Tn,x as In}from"./chunk-2M535QQJ.js";import{c as $}from"./chunk-5AWELO3D.js";import{A as H,B as te,D as Wt,E as $e,F as Te,I as ne,N as Jt,T as kr,a as Gt,z as W}from"./chunk-V654BMS7.js";import{a as xn}from"./chunk-F3OM2YO6.js";import{c as En}from"./chunk-335BUVBP.js";import{a as Y}from"./chunk-BN7ZXAZJ.js";import{h as g,k as zt}from"./chunk-J7BTC45S.js";import{Ab as Fe,Ba as vr,Bb as Fn,Cb as V,Da as Bt,Db as ye,Fa as Sn,Ga as kn,Hb as Ge,Ja as br,Na as Sr,Sa as K,U as Mt,Va as vt,_ as vn,la as ue,lb as On,ma as bn,nb as qt,oa as Ut,pa as wr,qb as xe,sb as ee,ta as oe,ub as je,va as Vt,xa as Ee,xb as Qt,yb as A,zb as jn}from"./chunk-RIG66DIQ.js";import{i as M}from"./chunk-B4OMIONW.js";import{b as u,i as Be,j as Pn}from"./chunk-FZCGRIOM.js";import{s as bt}from"./chunk-GSGCSBRN.js";import{b as me}from"./chunk-YTUUU33R.js";import{a as yn}from"./chunk-JD5P5RAJ.js";import{c as O,e as P,f as le,h as yr,i as Xe,j as wn}from"./chunk-IWTNUJGY.js";import{a as ka}from"./chunk-CX5CC6P5.js";import{e as re,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();var jr=Y({name:"HydrogenBuildResult",definitions:{AbsolutePath:B},schema:u.object({directory:B,clientDirectory:B,serverDirectory:B,serverPath:B}).strict()});var Do=re(me(),1);c();c();var ko=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function xa(e){let t="No lockfile found",o="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",r=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new g(t,o,r);te({headline:t,body:o,nextSteps:r})}function Ca(e,t){let o=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),r="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
1
+ import{b as Ti}from"./chunk-LQ7ENG4V.js";import{$ as ci,$a as Fi,A as kt,Aa as Ei,B as Cr,Ba as so,C as ei,Ca as ao,D as ti,Da as co,E as Or,Ea as Pi,F as oi,Fa as lo,G as Dr,Ga as mo,H as Zt,Ha as xi,I as eo,Ia as uo,J as ot,Ja as po,K as ri,Ka as We,L as w,La as fo,M as G,Ma as ho,N as ni,Na as Ci,O as ke,Oa as Oi,P as to,Pa as Di,Q as Et,Qa as yo,R as rt,Ra as Je,S as Oe,Sa as at,T as ii,Ta as Pt,U as _e,Ua as wo,V as De,Va as ct,W as si,Wa as vo,X as oo,Xa as Ii,Y as we,Ya as $i,Z as Rr,Za as ji,_ as ai,_a as bo,a as Bn,aa as Tr,ab as Ai,b as de,ba as Ir,bb as _i,c as j,ca as nt,d as B,da as it,e as Gn,ea as li,f as Er,fa as ro,g as Yn,ga as di,h as qn,ha as mi,i as Wn,ia as ui,ib as Ni,j as Jn,ja as pi,k as zn,ka as fi,l as R,la as qe,m as Ze,ma as hi,n as Qn,na as X,o as Ye,oa as st,p as Ce,pa as gi,q as et,qa as yi,r as Kn,ra as no,s as Xn,sa as io,t as Pr,ta as wi,u as tt,ua as ve,v as St,va as vi,w as Ae,wa as bi,x as Zn,xa as $r,y as Xt,ya as Si,z as xr,za as ki}from"./chunk-UUAKOX7E.js";import{a as An}from"./chunk-JLGA3B7P.js";import{b as Vn}from"./chunk-SACNUF4I.js";import{b as _n,c as Nn,d as Kt,h as Hn,j as Ln,k as Mn,l as Un}from"./chunk-PTSCGSQV.js";import{a as Pa}from"./chunk-UWHAOGO4.js";import{a as So}from"./chunk-FKIVKNOV.js";import{a as go,b as Ri}from"./chunk-6ES4KRFW.js";import{Ca as Ea,ha as ge,i as Cn,j as Se}from"./chunk-GQLNG537.js";import{B as $n,l as Dn,m as Pe,p as Yt,s as Rn,u as Tn,x as In}from"./chunk-QQJNQNKP.js";import{c as $}from"./chunk-3KM5ZOW2.js";import{A as H,B as te,D as Wt,E as $e,F as Te,I as ne,N as Jt,T as kr,a as Gt,z as W}from"./chunk-D2KIGKBI.js";import{a as xn}from"./chunk-LEHBZKK3.js";import{c as En}from"./chunk-335BUVBP.js";import{a as Y}from"./chunk-BN7ZXAZJ.js";import{h as g,k as zt}from"./chunk-M5VIFG2V.js";import{Ab as Fe,Ba as vr,Bb as Fn,Cb as V,Da as Bt,Db as ye,Fa as Sn,Ga as kn,Hb as Ge,Ja as br,Na as Sr,Sa as K,U as Mt,Va as vt,_ as vn,la as ue,lb as On,ma as bn,nb as qt,oa as Ut,pa as wr,qb as xe,sb as ee,ta as oe,ub as je,va as Vt,xa as Ee,xb as Qt,yb as A,zb as jn}from"./chunk-JLQRDFR5.js";import{i as M}from"./chunk-B4OMIONW.js";import{b as u,i as Be,j as Pn}from"./chunk-FZCGRIOM.js";import{s as bt}from"./chunk-LHXFTFFM.js";import{b as me}from"./chunk-YTUUU33R.js";import{a as yn}from"./chunk-JD5P5RAJ.js";import{c as O,e as P,f as le,h as yr,i as Xe,j as wn}from"./chunk-IWTNUJGY.js";import{a as ka}from"./chunk-CX5CC6P5.js";import{e as re,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();var jr=Y({name:"HydrogenBuildResult",definitions:{AbsolutePath:B},schema:u.object({directory:B,clientDirectory:B,serverDirectory:B,serverPath:B}).strict()});var Do=re(me(),1);c();c();var ko=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function xa(e){let t="No lockfile found",o="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",r=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new g(t,o,r);te({headline:t,body:o,nextSteps:r})}function Ca(e,t){let o=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),r="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
2
2
  `,{list:{items:o}}],i=["Delete any unneeded lockfiles","Commit the change to your repository"];if(t)throw new g(r,n,i);te({headline:r,body:n,nextSteps:i})}function Oa(e){let t="Lockfile ignored by Git",o="Your project\u2019s lockfile isn\u2019t being tracked by Git. If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying.",r=[`In your project\u2019s .gitignore file, delete any references to ${e}`,"Commit the change to your repository"];te({headline:t,body:o,nextSteps:r})}async function Hi(e,t=!1){if(Ye&&!process.env.SHOPIFY_UNIT_TEST)return;let o=[];for(let i of ko){let s=[i.lockfile,...i.alternativeLockfiles||[]];for(let a of s)if(await K(P(e,a))){o.push({packageManager:i,foundLockfile:a});break}}if(o.length===0)return xa(t);if(o.length>1)return Ca(o,t);let r=o[0].foundLockfile;(await _n(e,[r]).catch(()=>[])).length>0&&Oa(r)}c();var Da=["^cdn/","^_t/"];function Eo(e){let t=new Set;return Object.values(e.routes).filter(o=>Da.some(r=>new RegExp(r).test(o.path??""))).forEach(o=>{o.path&&t.add(o.path)}),[...t]}var Ra=["","cart","products/:productHandle","collections","collections/:collectionHandle","sitemap.xml","robots.txt","pages/:pageHandle","policies/:policyHandle","search","account","account/login","account/orders/:orderId","account/authorize"];function Po(e,t=Ra){let o=Object.values(e.routes),r=new Set(t);for(let n of t)for(let i of o)if(!n&&!i.path)r.delete(n);else if(n&&i.path){let s={path:i.path,parentId:i.parentId};for(;s.parentId&&s.parentId!=="root";){let m=o.find(l=>l.id===s.parentId);if(!m)break;s.path=m.path==null?s.path:`${m.path}/${s.path}`,s.parentId=m.parentId}let a=":?[^\\/\\?]+\\?",d=`^(${a}\\/)?`+n.replaceAll(".","\\.").replace(/\//g,`\\/(${a}\\/)?`).replace(/:[^/)?]+/g,"(:[^\\/]+|\\*)")+`(\\/${a})?$`;new RegExp(d).test(s.path)&&r.delete(n)}return[...r]}var Ne=100;function Li(e){e.length?te({headline:"Standard Shopify routes missing",body:`Your Hydrogen project is missing ${e.length} standard Shopify route${e.length>1?"s":""}.
3
3
  Including these routes improves compatibility with Shopify\u2019s platform:
4
4
 
@@ -247,7 +247,7 @@ Skip the flag or provide the name of a template or a URL to a git repository.`,{
247
247
  }
248
248
  }
249
249
  }
250
- `;async function la(e){let{hydrogenStorefronts:t}=await nt(Pl,e);return t.map(o=>({...o,parsedId:it(o.id)}))}var tr=class e extends R{static get jsonOutputSchema(){return Tr}static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await Cl(t,t.json)}};async function xl({path:e=process.cwd()}){let{session:t}=await ve(e),o=await la(t);return{shop:t.storeFqdn,storefronts:o}}async function Cl(e,t){let o=await xl(e);return j(Tr,ci(o),t)||await Ol(o,e.path),o}async function Ol({shop:e,storefronts:t},o){t.length>0?(ye(),A(Tl({storefronts:t,shop:e}).toString()),t.forEach(({currentProductionDeployment:r,id:n,productionUrl:i,title:s})=>{ye(),A(ee`${M.whiteBright(s)} ${M.dim(`(id: ${it(n)})`)}`.value),i&&A(ee` ${M.whiteBright(i)}`.value),r&&A(ee` ${M.dim(Rl(r))}`.value)})):W({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${e})`,`Create a new Hydrogen storefront: Run \`${await X(o)} link\` or visit ${$s({storeFqdn:e})}`]})}var Dl=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function Rl(e){let t="";if(!e)return t;if(t+=Dl.format(new Date(e.createdAt)),e.commitMessage){let o=e.commitMessage.split(/\n/)[0];t+=`, ${o}`}return t}var Tl=({storefronts:e,shop:t})=>Mt(e,o=>`Showing ${o.length} Hydrogen storefronts for the store ${t}`,o=>`Showing 1 Hydrogen storefront for the store ${t}`);c();c();var nn=Y({name:"HydrogenLoginResult",schema:u.object({storeDomain:Wn,name:u.string().nullable(),email:u.string().email().nullable()}).strict()}),sn=Y({name:"HydrogenLogoutResult",schema:u.object({status:u.literal("success"),loggedOut:u.literal(!0)}).strict()});var or=class e extends R{static get jsonOutputSchema(){return nn}static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.shop};async run(){let{flags:t}=await this.parse(e);await Il(t,t.json)}};async function Il({path:e=process.cwd(),shop:t},o){ye(),gi(!0);let{config:r}=await ve(e,t??!0),{shop:n,shopName:i,email:s}=r,a={storeDomain:zn(n),name:i||null,email:s||null};return j(nn,a,o)||vi(r),a}c();var rr=class e extends R{static get jsonOutputSchema(){return sn}static descriptionWithMarkdown="Log out from the current shop.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await $l(t,t.json)}};async function $l({path:e=process.cwd()},t){ye(),await wi(e);let o={status:"success",loggedOut:!0};return j(sn,o,t)||H({body:"You are logged out from Shopify."}),o}c();var an=re(me(),1);c();async function da(e){let{startWorkerdServer:t}=await import("./workerd-ISSXMKIH.js");return t(e)}var nr=class e extends R{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...w.path,...w.port,...w.env,...w.envBranch,...w.envFile,...w.inspectorPort,...w.debug,...w.verbose,build:an.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:an.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ke(w.entry,{entry:{dependsOn:["build"]}}),...ke(w.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd(),{close:r}=await jl({...G(t),directory:o});He(async()=>{await r()})}};async function jl({port:e,directory:t,env:o,envBranch:r,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:d=!1,codegen:m=!1,codegenConfigPath:l,entry:f,envFile:p}){process.env.NODE_ENV||(process.env.NODE_ENV=d?"development":"production"),s&&no(),io()||st();let{root:y,buildPath:h,buildPathWorkerFile:b,buildPathClient:v}=Oe(t),S=await rt(y);if(S)throw new g(De);let k,x=Ot(),T=a?await ze({...{directory:y,entry:f,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:m,codegenConfigPath:l},watch:d,async onServerBuildFinish(){x.state==="pending"?x.resolve():A("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await k?.reload()}}):x.resolve();S||(b=(await we(y).catch(()=>null))?.serverOutFile??O(h,"server","index.js"));let{shop:_,storefront:E}=await ro(y),D=!!_&&!!E?.id,{allVariables:q,logInjectedVariables:I}=await vo({root:y,fetchRemote:D,envBranch:r,envHandle:o,envFile:p});e||(e=await pt(ot));let N=await pt(e+100);return await x.promise,I(),k=await da({root:y,appPort:e,assetsPort:N,env:q,buildPathClient:v,buildPathWorkerFile:b,inspectorPort:n,debug:i,watch:d}),k.showBanner({mode:"preview",headlinePrefix:d?"Watching for changes. ":""}),{async close(){await Promise.allSettled([k.close(),T?.close()])}}}c();c();var cn=Y({name:"HydrogenSetupResult",schema:u.object({status:u.literal("success"),changed:u.boolean(),directory:B,name:u.string(),i18n:u.enum(["subfolders","domains","subdomains"]).nullable(),routes:u.array(Qo),routeGroups:u.record(u.array(u.string())),shortcut:u.boolean()}).strict()}),ln=Y({name:"HydrogenSetupCssResult",definitions:{AbsolutePath:B},schema:u.object({status:u.enum(["success","cancelled"]),changed:u.boolean(),directory:B,strategy:u.enum(["tailwind","vanilla-extract","css-modules","postcss"]),filePaths:u.array(B),dependenciesInstalled:u.boolean(),needsNpmReinstall:u.boolean()}).strict()}),dn=Y({name:"HydrogenSetupMarketsResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,strategy:u.enum(["subfolders","domains","subdomains"]),serverPath:B.nullable()}).strict()}),mn=Y({name:"HydrogenSetupViteResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,viteConfigPath:B,serverPath:B,dependenciesInstalled:u.literal(!0),needsMdxSetup:u.boolean()}).strict()});var ir=class e extends R{static get jsonOutputSchema(){return cn}static descriptionWithMarkdown="Scaffold routes and core functionality.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...w.markets,...w.shortcut,...ke(w.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd();await Al({...G(t),directory:o},t.json)}};async function Fl(e){let t=new Gt,{rootDirectory:o,appDirectory:r}=await _e(e.directory),n=Xe(o),i=X(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],d=e.markets?e.markets:await eo({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),m=d==="none"?void 0:d,{setupRoutes:l}=so(t),f={},p=[],y=await Kn(".."),[h,b]=await Promise.all([K(O(o,"tsconfig.json")),vt("*.d.ts",{cwd:y})]);s=s.then(()=>Promise.all([...b.map(C=>Ut(O(y,C),P(o,C))),ao({rootDirectory:o,appDirectory:r,typescript:h})])).then(async()=>{let C=await l(o,h?"ts":"js",{i18nStrategy:m,overwriteFileDeps:!0});f=C.routeGroups,p=C.routes}),m&&(s=s.then(()=>Zt(m,{rootDirectory:o})));let v=await Promise.resolve(i),{createShortcut:S,showShortcutBanner:k}=await co(t,v,e.shortcut);if(!m&&!S)return await s,{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:!1,cliCommand:v,showSummary:!1};let x=!1;return S&&(s=s.then(async()=>{await S()&&(x=!0,v=qe)}),k()),await ne(a),{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:x,cliCommand:v,showSummary:!0}}async function Al(e,t){let o=await Fl(e);return!j(cn,{status:"success",changed:!0,directory:P(o.directory),name:o.name,i18n:o.i18n??null,routes:o.generatedRoutes.map(({sourceRoute:r,destinationRoute:n,operation:i,skipReason:s})=>({sourceRoute:r,destinationRoute:n,operation:i,...s?{skipReason:s}:{}})),routeGroups:o.routes,shortcut:o.shortcut},t)&&o.showSummary&&await fo(o,{cliCommand:o.cliCommand,depsInstalled:!0,packageManager:"npm",i18n:o.i18n,routes:o.routes}),o}c();var ma=re(me(),1);var sr=class e extends R{static get jsonOutputSchema(){return ln}static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...ke(w.installDeps,{"install-deps":{default:!0}})};static args={strategy:ma.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${Pr.join()}`,options:Pr})};async run(){let{flags:t,args:o}=await this.parse(e),r=t.path?P(t.path):process.cwd();await Nl({...G(t),strategy:o.strategy,directory:r},t.json)}};async function _l({strategy:e,directory:t,force:o=!1,installDeps:r=!0}){let n=await we(t).catch(()=>null);if(!n)throw new g("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await ti(),a={directory:i.rootDirectory,strategy:s,files:[],dependenciesInstalled:!1,needsNpmReinstall:!1};if(s==="css-modules"||s==="postcss")return{...a,status:"built-in"};let d=await ei(s,i,o);if(!d)return{...a,status:"cancelled"};let{workPromise:m,generatedAssets:l,needsInstallDeps:f}=d,p=[{title:"Updating files",task:async()=>{await m}}],y=!1;if(r&&f){let h=Pe(i.rootDirectory);p.push({title:"Installing new dependencies",task:async()=>{let b=await h;y=b==="npm"||b==="unknown",await Yt({directory:i.rootDirectory,packageManager:b,args:[]})}})}return await ne(p),{...a,status:"configured",files:l,dependenciesInstalled:!!(r&&f),needsNpmReinstall:!!(f&&y&&s==="tailwind")}}async function Nl(e,t){let o=await _l(e);return j(ln,{status:o.status==="cancelled"?"cancelled":"success",changed:o.status==="configured",directory:P(o.directory),strategy:o.strategy,filePaths:o.files.map(r=>P(o.directory,r)),dependenciesInstalled:o.dependenciesInstalled,needsNpmReinstall:o.needsNpmReinstall},t)||Hl(o),o}function Hl(e){let{strategy:t,files:o}=e;if(e.status!=="cancelled"){if(e.status==="built-in"){H({headline:`Vite works out of the box with ${kt[t]}.`,body:`See the Vite documentation for more information:
250
+ `;async function la(e){let{hydrogenStorefronts:t}=await nt(Pl,e);return t.map(o=>({...o,parsedId:it(o.id)}))}var tr=class e extends R{static get jsonOutputSchema(){return Tr}static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await Cl(t,t.json)}};async function xl({path:e=process.cwd()}){let{session:t}=await ve(e),o=await la(t);return{shop:t.storeFqdn,storefronts:o}}async function Cl(e,t){let o=await xl(e);return j(Tr,ci(o),t)||await Ol(o,e.path),o}async function Ol({shop:e,storefronts:t},o){t.length>0?(ye(),A(Tl({storefronts:t,shop:e}).toString()),t.forEach(({currentProductionDeployment:r,id:n,productionUrl:i,title:s})=>{ye(),A(ee`${M.whiteBright(s)} ${M.dim(`(id: ${it(n)})`)}`.value),i&&A(ee` ${M.whiteBright(i)}`.value),r&&A(ee` ${M.dim(Rl(r))}`.value)})):W({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${e})`,`Create a new Hydrogen storefront: Run \`${await X(o)} link\` or visit ${$s({storeFqdn:e})}`]})}var Dl=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function Rl(e){let t="";if(!e)return t;if(t+=Dl.format(new Date(e.createdAt)),e.commitMessage){let o=e.commitMessage.split(/\n/)[0];t+=`, ${o}`}return t}var Tl=({storefronts:e,shop:t})=>Mt(e,o=>`Showing ${o.length} Hydrogen storefronts for the store ${t}`,o=>`Showing 1 Hydrogen storefront for the store ${t}`);c();c();var nn=Y({name:"HydrogenLoginResult",schema:u.object({storeDomain:Wn,name:u.string().nullable(),email:u.string().email().nullable()}).strict()}),sn=Y({name:"HydrogenLogoutResult",schema:u.object({status:u.literal("success"),loggedOut:u.literal(!0)}).strict()});var or=class e extends R{static get jsonOutputSchema(){return nn}static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.shop};async run(){let{flags:t}=await this.parse(e);await Il(t,t.json)}};async function Il({path:e=process.cwd(),shop:t},o){ye(),gi(!0);let{config:r}=await ve(e,t??!0),{shop:n,shopName:i,email:s}=r,a={storeDomain:zn(n),name:i||null,email:s||null};return j(nn,a,o)||vi(r),a}c();var rr=class e extends R{static get jsonOutputSchema(){return sn}static descriptionWithMarkdown="Log out from the current shop.";static description=this.descriptionForHelp();static flags={...$,...w.path};async run(){let{flags:t}=await this.parse(e);await $l(t,t.json)}};async function $l({path:e=process.cwd()},t){ye(),await wi(e);let o={status:"success",loggedOut:!0};return j(sn,o,t)||H({body:"You are logged out from Shopify."}),o}c();var an=re(me(),1);c();async function da(e){let{startWorkerdServer:t}=await import("./workerd-32DMKLMN.js");return t(e)}var nr=class e extends R{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...w.path,...w.port,...w.env,...w.envBranch,...w.envFile,...w.inspectorPort,...w.debug,...w.verbose,build:an.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:an.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ke(w.entry,{entry:{dependsOn:["build"]}}),...ke(w.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd(),{close:r}=await jl({...G(t),directory:o});He(async()=>{await r()})}};async function jl({port:e,directory:t,env:o,envBranch:r,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:d=!1,codegen:m=!1,codegenConfigPath:l,entry:f,envFile:p}){process.env.NODE_ENV||(process.env.NODE_ENV=d?"development":"production"),s&&no(),io()||st();let{root:y,buildPath:h,buildPathWorkerFile:b,buildPathClient:v}=Oe(t),S=await rt(y);if(S)throw new g(De);let k,x=Ot(),T=a?await ze({...{directory:y,entry:f,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:m,codegenConfigPath:l},watch:d,async onServerBuildFinish(){x.state==="pending"?x.resolve():A("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await k?.reload()}}):x.resolve();S||(b=(await we(y).catch(()=>null))?.serverOutFile??O(h,"server","index.js"));let{shop:_,storefront:E}=await ro(y),D=!!_&&!!E?.id,{allVariables:q,logInjectedVariables:I}=await vo({root:y,fetchRemote:D,envBranch:r,envHandle:o,envFile:p});e||(e=await pt(ot));let N=await pt(e+100);return await x.promise,I(),k=await da({root:y,appPort:e,assetsPort:N,env:q,buildPathClient:v,buildPathWorkerFile:b,inspectorPort:n,debug:i,watch:d}),k.showBanner({mode:"preview",headlinePrefix:d?"Watching for changes. ":""}),{async close(){await Promise.allSettled([k.close(),T?.close()])}}}c();c();var cn=Y({name:"HydrogenSetupResult",schema:u.object({status:u.literal("success"),changed:u.boolean(),directory:B,name:u.string(),i18n:u.enum(["subfolders","domains","subdomains"]).nullable(),routes:u.array(Qo),routeGroups:u.record(u.array(u.string())),shortcut:u.boolean()}).strict()}),ln=Y({name:"HydrogenSetupCssResult",definitions:{AbsolutePath:B},schema:u.object({status:u.enum(["success","cancelled"]),changed:u.boolean(),directory:B,strategy:u.enum(["tailwind","vanilla-extract","css-modules","postcss"]),filePaths:u.array(B),dependenciesInstalled:u.boolean(),needsNpmReinstall:u.boolean()}).strict()}),dn=Y({name:"HydrogenSetupMarketsResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,strategy:u.enum(["subfolders","domains","subdomains"]),serverPath:B.nullable()}).strict()}),mn=Y({name:"HydrogenSetupViteResult",definitions:{AbsolutePath:B},schema:u.object({status:u.literal("success"),changed:u.literal(!0),directory:B,viteConfigPath:B,serverPath:B,dependenciesInstalled:u.literal(!0),needsMdxSetup:u.boolean()}).strict()});var ir=class e extends R{static get jsonOutputSchema(){return cn}static descriptionWithMarkdown="Scaffold routes and core functionality.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...w.markets,...w.shortcut,...ke(w.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),o=t.path?P(t.path):process.cwd();await Al({...G(t),directory:o},t.json)}};async function Fl(e){let t=new Gt,{rootDirectory:o,appDirectory:r}=await _e(e.directory),n=Xe(o),i=X(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],d=e.markets?e.markets:await eo({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),m=d==="none"?void 0:d,{setupRoutes:l}=so(t),f={},p=[],y=await Kn(".."),[h,b]=await Promise.all([K(O(o,"tsconfig.json")),vt("*.d.ts",{cwd:y})]);s=s.then(()=>Promise.all([...b.map(C=>Ut(O(y,C),P(o,C))),ao({rootDirectory:o,appDirectory:r,typescript:h})])).then(async()=>{let C=await l(o,h?"ts":"js",{i18nStrategy:m,overwriteFileDeps:!0});f=C.routeGroups,p=C.routes}),m&&(s=s.then(()=>Zt(m,{rootDirectory:o})));let v=await Promise.resolve(i),{createShortcut:S,showShortcutBanner:k}=await co(t,v,e.shortcut);if(!m&&!S)return await s,{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:!1,cliCommand:v,showSummary:!1};let x=!1;return S&&(s=s.then(async()=>{await S()&&(x=!0,v=qe)}),k()),await ne(a),{directory:o,name:n,location:n,i18n:m,routes:f,generatedRoutes:p,shortcut:x,cliCommand:v,showSummary:!0}}async function Al(e,t){let o=await Fl(e);return!j(cn,{status:"success",changed:!0,directory:P(o.directory),name:o.name,i18n:o.i18n??null,routes:o.generatedRoutes.map(({sourceRoute:r,destinationRoute:n,operation:i,skipReason:s})=>({sourceRoute:r,destinationRoute:n,operation:i,...s?{skipReason:s}:{}})),routeGroups:o.routes,shortcut:o.shortcut},t)&&o.showSummary&&await fo(o,{cliCommand:o.cliCommand,depsInstalled:!0,packageManager:"npm",i18n:o.i18n,routes:o.routes}),o}c();var ma=re(me(),1);var sr=class e extends R{static get jsonOutputSchema(){return ln}static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description=this.descriptionForHelp();static flags={...$,...w.path,...w.force,...ke(w.installDeps,{"install-deps":{default:!0}})};static args={strategy:ma.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${Pr.join()}`,options:Pr})};async run(){let{flags:t,args:o}=await this.parse(e),r=t.path?P(t.path):process.cwd();await Nl({...G(t),strategy:o.strategy,directory:r},t.json)}};async function _l({strategy:e,directory:t,force:o=!1,installDeps:r=!0}){let n=await we(t).catch(()=>null);if(!n)throw new g("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await ti(),a={directory:i.rootDirectory,strategy:s,files:[],dependenciesInstalled:!1,needsNpmReinstall:!1};if(s==="css-modules"||s==="postcss")return{...a,status:"built-in"};let d=await ei(s,i,o);if(!d)return{...a,status:"cancelled"};let{workPromise:m,generatedAssets:l,needsInstallDeps:f}=d,p=[{title:"Updating files",task:async()=>{await m}}],y=!1;if(r&&f){let h=Pe(i.rootDirectory);p.push({title:"Installing new dependencies",task:async()=>{let b=await h;y=b==="npm"||b==="unknown",await Yt({directory:i.rootDirectory,packageManager:b,args:[]})}})}return await ne(p),{...a,status:"configured",files:l,dependenciesInstalled:!!(r&&f),needsNpmReinstall:!!(f&&y&&s==="tailwind")}}async function Nl(e,t){let o=await _l(e);return j(ln,{status:o.status==="cancelled"?"cancelled":"success",changed:o.status==="configured",directory:P(o.directory),strategy:o.strategy,filePaths:o.files.map(r=>P(o.directory,r)),dependenciesInstalled:o.dependenciesInstalled,needsNpmReinstall:o.needsNpmReinstall},t)||Hl(o),o}function Hl(e){let{strategy:t,files:o}=e;if(e.status!=="cancelled"){if(e.status==="built-in"){H({headline:`Vite works out of the box with ${kt[t]}.`,body:`See the Vite documentation for more information:
251
251
  ${Cr[t]}`});return}H({headline:`${kt[t]} setup complete.`,body:(o.length>0?`You can now modify CSS configuration in the following files:
252
252
  `+o.map(r=>` - ${r}`).join(`
253
253
  `)+`
@@ -1 +1 @@
1
- import{A as u,c as a,f as q,g as A,ha as g,ia as v,n as l}from"./chunk-NCPZVARH.js";import{b as m}from"./chunk-J3UXIC23.js";import{h as n,k as F}from"./chunk-J7BTC45S.js";import{qb as b,sb as f}from"./chunk-RIG66DIQ.js";import{i as k}from"./chunk-ZDQO6CNY.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function Y(t,r,e,o){let d="Admin",h=o??await T(r),s=r.storeFqdn,i=V(r);m()==="local"&&(i["x-forwarded-host"]=s,s=new l().host("app"));let c=D(s,h,r);return g({query:t,api:d,addedHeaders:i,url:c,token:r.token,variables:e})}async function x(t){let{query:r,session:e,variables:o,version:d,responseOptions:h,preferredBehaviour:s}=t,i=d??S.get(e.storeFqdn);i??=await T(e,s);let c=e.storeFqdn,w=V(e);m()==="local"&&(w["x-forwarded-host"]=c,c=new l().host("app"));let E={url:D(c,i,e),api:"Admin",token:e.token,addedHeaders:w},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),v({...E,query:r,variables:o,responseOptions:h,unauthorizedHandler:y,preferredBehaviour:s})}function V(t){return u(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function T(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await x({query:$,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof a&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new n(f`Looks like you don't have access to this dev store: (${b.link(o,`https://${t.storeFqdn}`)})`,f`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof a&&e.response.status===401&&u(t)?new n(`The Theme Access password was rejected for the store ${t.storeFqdn}.`,"Theme Access passwords only work on the store they were generated for, and only with its permanent .myshopify.com domain.",["Check that the password was created in the Theme Access app on this store and has not been deleted.",["Pass the permanent domain to",{command:"--store"},{char:"."},"It is the .myshopify.com domain listed in the Shopify admin under",{subdued:"Settings > Domains"},{char:"."}]]):e instanceof a&&(e.response.status===401||e.response.status===404)?new n(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):e instanceof a&&e.response.status===402?new n(`The store ${t.storeFqdn} is currently unavailable.`,"This usually means the store is frozen, paused, or closed. Check the store in the Shopify admin and try again once it is reactivated."):e instanceof a&&e.response.status>=500?new n(`The Admin API for ${t.storeFqdn} returned a server error (HTTP ${e.response.status}).`,"This is a problem on the Shopify side, not with your command. Wait a moment and try again."):A(e)?new n(`Request to ${t.storeFqdn} was aborted before it completed.`,"The request was cancelled or timed out before the store responded. Try running the command again."):q(e)?new n(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function D(t,r,e){let o=r??"unstable";return e&&u(e)?`https://${k}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{Y as a,x as b,N as c,R as d,D as e};
1
+ import{A as u,c as a,f as q,g as A,ha as g,ia as v,n as l}from"./chunk-GQLNG537.js";import{b as m}from"./chunk-MHR5OHT5.js";import{h as n,k as F}from"./chunk-M5VIFG2V.js";import{qb as b,sb as f}from"./chunk-JLQRDFR5.js";import{i as k}from"./chunk-ZDQO6CNY.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"supported"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var S=new Map;async function Y(t,r,e,o){let d="Admin",h=o??await T(r),s=r.storeFqdn,i=V(r);m()==="local"&&(i["x-forwarded-host"]=s,s=new l().host("app"));let c=D(s,h,r);return g({query:t,api:d,addedHeaders:i,url:c,token:r.token,variables:e})}async function x(t){let{query:r,session:e,variables:o,version:d,responseOptions:h,preferredBehaviour:s}=t,i=d??S.get(e.storeFqdn);i??=await T(e,s);let c=e.storeFqdn,w=V(e);m()==="local"&&(w["x-forwarded-host"]=c,c=new l().host("app"));let E={url:D(c,i,e),api:"Admin",token:e.token,addedHeaders:w},y;return"refresh"in e&&(y={type:"token_refresh",handler:e.refresh}),v({...E,query:r,variables:o,responseOptions:h,unauthorizedHandler:y,preferredBehaviour:s})}function V(t){return u(t)?{"X-Shopify-Shop":t.storeFqdn,"X-Shopify-Access-Token":t.token}:{}}async function T(t,r){let o=(await N(t,r)).reverse()[0];return S.set(t.storeFqdn,o),o}async function N(t,r){return(await R(t,r)).filter(o=>o.supported).map(o=>o.handle).sort()}async function R(t,r){try{return(await x({query:$,session:t,variables:{},version:"unstable",responseOptions:{handleErrors:!1},preferredBehaviour:r})).publicApiVersions}catch(e){if(e instanceof a&&e.response.status===403){let o=t.storeFqdn.replace(".myshopify.com","");throw new n(f`Looks like you don't have access to this dev store: (${b.link(o,`https://${t.storeFqdn}`)})`,f`If you're not the owner, create a dev store staff account for yourself`)}throw e instanceof a&&e.response.status===401&&u(t)?new n(`The Theme Access password was rejected for the store ${t.storeFqdn}.`,"Theme Access passwords only work on the store they were generated for, and only with its permanent .myshopify.com domain.",["Check that the password was created in the Theme Access app on this store and has not been deleted.",["Pass the permanent domain to",{command:"--store"},{char:"."},"It is the .myshopify.com domain listed in the Shopify admin under",{subdued:"Settings > Domains"},{char:"."}]]):e instanceof a&&(e.response.status===401||e.response.status===404)?new n(`Error connecting to your store ${t.storeFqdn}: ${e.message} ${e.response.status} ${e.response.data}`):e instanceof a&&e.response.status===402?new n(`The store ${t.storeFqdn} is currently unavailable.`,"This usually means the store is frozen, paused, or closed. Check the store in the Shopify admin and try again once it is reactivated."):e instanceof a&&e.response.status>=500?new n(`The Admin API for ${t.storeFqdn} returned a server error (HTTP ${e.response.status}).`,"This is a problem on the Shopify side, not with your command. Wait a moment and try again."):A(e)?new n(`Request to ${t.storeFqdn} was aborted before it completed.`,"The request was cancelled or timed out before the store responded. Try running the command again."):q(e)?new n(`Network error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`,"Check your internet connection and try again."):new F(`Unknown error connecting to your store ${t.storeFqdn}: ${e instanceof Error?e.message:String(e)}`)}}function D(t,r,e){let o=r??"unstable";return e&&u(e)?`https://${k}/cli/admin/api/${o}/graphql.json`:`https://${t}/admin/api/${o}/graphql.json`}export{Y as a,x as b,N as c,R as d,D as e};
@@ -1,4 +1,4 @@
1
- import{d as le,h as pe,i as de,j as ce}from"./chunk-DM7BTMFP.js";import{a as ie,c as se,d as ae,e as re}from"./chunk-BB7GAZP6.js";import{a as M}from"./chunk-ACA2BGAD.js";import{b as D}from"./chunk-YFRI75U4.js";import{a as oe}from"./chunk-NPB753M3.js";import{a as q}from"./chunk-D4LFWIFE.js";import{Ma as ne,N as X,Q as ee,fa as te,g as Z}from"./chunk-XV6XCOTG.js";import{a as Q}from"./chunk-ZHHTQRWU.js";import{b as W,c as J}from"./chunk-5AWELO3D.js";import{A as T,F as Y,I as z,N as K,y as N,z as G}from"./chunk-V654BMS7.js";import{a as U}from"./chunk-BN7ZXAZJ.js";import{d as $}from"./chunk-FHNJLON5.js";import{h as y,j as E}from"./chunk-J7BTC45S.js";import{Ba as V,Db as k,L as B,rb as C,va as S,wb as H,yb as R}from"./chunk-RIG66DIQ.js";import{b as d}from"./chunk-FZCGRIOM.js";import{b as Ie}from"./chunk-YTUUU33R.js";import{c as _,h as j}from"./chunk-IWTNUJGY.js";import{e as Ee,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();async function ue(e){let t,o;e.bundlePath&&(t=await re(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await ae(t,e.bundlePath));let n={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};t&&(n.bundleUrl=t),e.appModules.length>0&&(n.appModules=e.appModules);let i=await e.developerPlatformClient.deploy(n);if(!i.appDeploy.appVersion){let a=_e(i.appDeploy.userErrors??[],e.appModuleRegistrationIds,e.appModules,{version:e.version});throw new y({bold:"Version couldn't be created."},null,[],a)}return i.appDeploy.userErrors?.length>0&&(o=i.appDeploy.userErrors.map(a=>a.message).join(", ")||"The app version could not be released."),{validationErrors:i.appDeploy.appVersion.appModuleVersions.filter(a=>a.validationErrors.length>0).map(a=>({uuid:a.registrationUuid,errors:a.validationErrors})),versionGid:i.appDeploy.appVersion.uuid,versionTag:i.appDeploy.appVersion.versionTag,location:i.appDeploy.appVersion.location,message:i.appDeploy.appVersion.message,deployError:o}}var x=`
1
+ import{d as le,h as pe,i as de,j as ce}from"./chunk-QF5WKTPD.js";import{a as ie,c as se,d as ae,e as re}from"./chunk-HXZAY5OA.js";import{a as M}from"./chunk-ACA2BGAD.js";import{b as D}from"./chunk-26PWHH3B.js";import{a as oe}from"./chunk-VHZ6RL67.js";import{a as q}from"./chunk-NVKJ7ZLP.js";import{Ma as ne,N as X,Q as ee,fa as te,g as Z}from"./chunk-U2T5HPRD.js";import{a as Q}from"./chunk-N57Y7THE.js";import{b as W,c as J}from"./chunk-3KM5ZOW2.js";import{A as T,F as Y,I as z,N as K,y as N,z as G}from"./chunk-D2KIGKBI.js";import{a as U}from"./chunk-BN7ZXAZJ.js";import{d as $}from"./chunk-CXI3RHPW.js";import{h as y,j as E}from"./chunk-M5VIFG2V.js";import{Ba as V,Db as k,L as B,rb as C,va as S,wb as H,yb as R}from"./chunk-JLQRDFR5.js";import{b as d}from"./chunk-FZCGRIOM.js";import{b as Ie}from"./chunk-YTUUU33R.js";import{c as _,h as j}from"./chunk-IWTNUJGY.js";import{e as Ee,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();async function ue(e){let t,o;e.bundlePath&&(t=await re(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await ae(t,e.bundlePath));let n={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};t&&(n.bundleUrl=t),e.appModules.length>0&&(n.appModules=e.appModules);let i=await e.developerPlatformClient.deploy(n);if(!i.appDeploy.appVersion){let a=_e(i.appDeploy.userErrors??[],e.appModuleRegistrationIds,e.appModules,{version:e.version});throw new y({bold:"Version couldn't be created."},null,[],a)}return i.appDeploy.userErrors?.length>0&&(o=i.appDeploy.userErrors.map(a=>a.message).join(", ")||"The app version could not be released."),{validationErrors:i.appDeploy.appVersion.appModuleVersions.filter(a=>a.validationErrors.length>0).map(a=>({uuid:a.registrationUuid,errors:a.validationErrors})),versionGid:i.appDeploy.appVersion.uuid,versionTag:i.appDeploy.appVersion.versionTag,location:i.appDeploy.appVersion.location,message:i.appDeploy.appVersion.message,deployError:o}}var x=`
2
2
  Validation errors`,O=`
3
3
  `;function _e(e,t,o,n={}){let i=l=>l.details?.some(v=>v.extension_id)??!1,s=(l,v)=>{let w=l.details?.find(F=>typeof F.extension_id<"u")?.extension_id??"";return Object.values(v).includes(w.toString())},a=l=>{let v=l.on?l.on[0]:void 0;return o.some(w=>w.uid===v?.user_identifier)},[c,u]=D(e,l=>a(l)),[h,p]=D(u,l=>i(l)),[g,r]=D(h,l=>s(l,t));return[...Se(p,{version:n.version}),...De(g,t),...Me(r),...Ae(c,o)]}function Se(e,t={}){return e.length>0?e.filter(o=>o.field&&o.field.includes("version_tag")&&o.message==="has already been taken").length>0&&t.version?[{body:["An app version with the name",{userInput:t.version},"already exists. Deploy again with a different version name."]}]:e.length===1?[{body:e[0]?.message??""}]:[{body:{list:{items:e.map(o=>o.message)}}}]:[]}function De(e,t){return e.reduce((o,n)=>{let i=(n.field??["unknown"]).join(".").replace("extension_points","extensions.targeting"),s=i==="base"?n.message:`${i}: ${n.message}`,a=n.details.find(r=>typeof r.extension_title<"u")?.extension_title,c=n.details.find(r=>typeof r.specification_identifier<"u")?.specification_identifier,u=n.details.find(r=>typeof r.extension_id<"u")?.extension_id?.toString(),p=Object.keys(t).find(r=>t[r]===u)??a;c==="webhook_subscription"&&(p="Webhook Subscription");let g=o.find(r=>r.title===p);if(g){let r=g.body,f=n.category==="invalid"?r.find(l=>l.list.title===x):r.find(l=>l.list.title===O);f?f.list.items.includes(s)||f.list.items.push(s):r.push({list:{title:n.category==="invalid"?x:O,items:[s]}})}else o.push({title:p,body:[{list:{title:n.category==="invalid"?x:O,items:[s]}}]});return o.forEach(r=>{r.body.sort((f,l)=>f.list.title===x?1:l.list.title===x?-1:0)}),o},[])}function Ae(e,t){return e.reduce((o,n)=>{let s=(n.on?n.on[0]:void 0)?.user_identifier,a=t.find(r=>r.uid===s),c=s?`Extension with uid: ${s}`:"Unknown Extension",u=a?.handle??c,p=`${(n.field??["unknown"]).join(".")}: ${n.message}`,g=o.find(r=>r.title===u);if(g){let f=g.body.find(l=>l.list.title===x);f&&(f.list.items.includes(p)||f.list.items.push(p))}else o.push({title:u,body:[{list:{title:x,items:[p]}}]});return o},[])}function Me(e){return e.reduce((t,o)=>{let n=o.details.find(s=>typeof s.extension_title<"u")?.extension_title,i=t.find(s=>s.title===n);return i?i.errorCount+=1:t.push({title:n,errorCount:1}),t},[]).map(t=>({title:t.title,body:`
4
4
  ${t.errorCount} error${t.errorCount>1?"s":""} found in your extensions. Fix these issues and try deploying again.`}))}m();async function me(e){let t=_(e.app.directory,".shopify","deploy-bundle");await V(t,{force:!0}),await S(t),await ie(e.appManifest,t),e.skipBuild||await Z(e.app);let o=e.app.allExtensions.map(i=>({prefix:i.localIdentifier,action:async(s,a,c)=>{await i.buildForBundle({stderr:a,stdout:s,signal:c,app:e.app,environment:"production",skipBuild:e.skipBuild},t)}}));if(await N({processes:o,showTimestamps:!1}),e.app.allExtensions.some(i=>i.hasDeploySteps))return await se(t,e.bundlePath),e.bundlePath}async function Te(e){let{app:t,remoteApp:o,developerPlatformClient:n,noRelease:i,allowUpdates:s,allowDeletes:a,extensions:c}=e,u=[i,s,a].some(Boolean),h=[`App can't be deployed until Partner Dashboard managed extensions are added to your version or removed from your app:
@@ -1 +1 @@
1
- import{a as o}from"./chunk-5AQ5JT2V.js";import{b as e}from"./chunk-OLKLHVHA.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static description="View the UI kit components that display static output";static hidden=!0;async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-Y55T4IIQ.js";import{b as e}from"./chunk-ZJOX5HW4.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var t=class extends e{static description="View the UI kit components that display static output";static hidden=!0;async run(){await o()}};export{t as a};
@@ -1,3 +1,3 @@
1
- import{a as I}from"./chunk-LFOBYEWG.js";import{j as w}from"./chunk-NCPZVARH.js";import{w as l}from"./chunk-2M535QQJ.js";import{m as u,n as m}from"./chunk-J3UXIC23.js";import{a as h}from"./chunk-MHWETFNT.js";import{B as y,C as N,T as S,z as g}from"./chunk-V654BMS7.js";import{o as d}from"./chunk-335BUVBP.js";import{j as _}from"./chunk-J7BTC45S.js";import{Bb as a}from"./chunk-RIG66DIQ.js";import{b as n}from"./chunk-FZCGRIOM.js";import{a as f}from"./chunk-JD5P5RAJ.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var C="https://cdn.shopify.com/static/cli/notifications.json",T="Cache is empty",O=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear","send-analytics"],$=["127.0.0.1","localhost","::1","[::1]"];function c(){let e=process.env.SHOPIFY_CLI_NOTIFICATIONS_URL;if(e)try{let t=new globalThis.URL(e);if(v(t))return e;a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) must use https, or http with a loopback host. Falling back to default.`)}catch{a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) is not a valid URL. Falling back to default.`)}return C}function v(e){return e.protocol==="https:"?!0:e.protocol==="http:"&&$.includes(e.hostname)}var E=n.object({id:n.string(),message:n.string(),type:n.enum(["info","warning","error"]),frequency:n.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:n.string(),cta:n.object({label:n.string(),url:n.string().url()}).optional(),title:n.string().optional(),minVersion:n.string().optional(),maxVersion:n.string().optional(),minDate:n.string().optional(),maxDate:n.string().optional(),commands:n.array(n.string()).optional(),surface:n.string().optional()}),x=n.object({notifications:n.array(E)});async function Z(e,t=process.env){try{let r=I();if(D(r,t)||d(t))return;let o=await k(),i=A(o.notifications,r,e);a(`Notifications to show: ${i.length}`),await L(i)}catch(r){if(r.message===T){a("Notifications to show: 0 (Cache is empty)");return}if(r.message==="abort")throw new _;let o=`Error showing notifications: ${r.message}`;a(o);let{sendErrorToBugsnag:i}=await import("./error-handler-OVJYVIOZ.js");await i(o,"unexpected_error")}}function D(e,t=process.env){return f(t.CI)||f(t.SHOPIFY_UNIT_TEST)||O.includes(e)}async function L(e){e.slice(0,2).forEach(t=>{let r={headline:t.title,body:t.message.replace(/\\n/g,`
1
+ import{a as I}from"./chunk-LFOBYEWG.js";import{j as w}from"./chunk-GQLNG537.js";import{w as l}from"./chunk-QQJNQNKP.js";import{m as u,n as m}from"./chunk-MHR5OHT5.js";import{a as h}from"./chunk-HSKDFEXW.js";import{B as y,C as N,T as S,z as g}from"./chunk-D2KIGKBI.js";import{o as d}from"./chunk-335BUVBP.js";import{j as _}from"./chunk-M5VIFG2V.js";import{Bb as a}from"./chunk-JLQRDFR5.js";import{b as n}from"./chunk-FZCGRIOM.js";import{a as f}from"./chunk-JD5P5RAJ.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var C="https://cdn.shopify.com/static/cli/notifications.json",T="Cache is empty",O=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear","send-analytics"],$=["127.0.0.1","localhost","::1","[::1]"];function c(){let e=process.env.SHOPIFY_CLI_NOTIFICATIONS_URL;if(e)try{let t=new globalThis.URL(e);if(v(t))return e;a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) must use https, or http with a loopback host. Falling back to default.`)}catch{a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) is not a valid URL. Falling back to default.`)}return C}function v(e){return e.protocol==="https:"?!0:e.protocol==="http:"&&$.includes(e.hostname)}var E=n.object({id:n.string(),message:n.string(),type:n.enum(["info","warning","error"]),frequency:n.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:n.string(),cta:n.object({label:n.string(),url:n.string().url()}).optional(),title:n.string().optional(),minVersion:n.string().optional(),maxVersion:n.string().optional(),minDate:n.string().optional(),maxDate:n.string().optional(),commands:n.array(n.string()).optional(),surface:n.string().optional()}),x=n.object({notifications:n.array(E)});async function Z(e,t=process.env){try{let r=I();if(D(r,t)||d(t))return;let o=await k(),i=A(o.notifications,r,e);a(`Notifications to show: ${i.length}`),await L(i)}catch(r){if(r.message===T){a("Notifications to show: 0 (Cache is empty)");return}if(r.message==="abort")throw new _;let o=`Error showing notifications: ${r.message}`;a(o);let{sendErrorToBugsnag:i}=await import("./error-handler-4GCXKC6I.js");await i(o,"unexpected_error")}}function D(e,t=process.env){return f(t.CI)||f(t.SHOPIFY_UNIT_TEST)||O.includes(e)}async function L(e){e.slice(0,2).forEach(t=>{let r={headline:t.title,body:t.message.replace(/\\n/g,`
2
2
  `),link:t.cta};switch(t.type){case"info":{g(r);break}case"warning":{y(r);break}case"error":throw N(r),new Error("abort")}u(`notification-${t.id}`,new Date().getTime().toString())})}async function k(){let e=`notifications-${c()}`,t=m(e)?.value;if(!t)throw new Error(T);let r=JSON.parse(t);return x.parse(r)}async function ee(){a("Fetching notifications...");let e=await w(c(),void 0,{useNetworkLevelRetry:!1,useAbortSignal:!0,timeoutMs:3*1e3});if(e.status!==200)throw new Error(`Failed to fetch notifications: ${e.statusText}`);let t=await e.text(),r=JSON.parse(t),o=x.parse(r);return await F(t),o}async function F(e){u(`notifications-${c()}`,e),a(`Notifications from ${c()} stored in the cache`)}function te(e,t=process.argv,r=process.env){if(D(e,r)||!t[1])return;let o=process.execPath,s=[t[1],"notifications","list","--ignore-errors"];S(o,s,{background:!0,env:{...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},externalErrorHandler:async b=>{a(`Failed to fetch notifications in background: ${b.message}`)}})}function A(e,t,r,o=new Date(new Date().setUTCHours(0,0,0,0)),i=h){return e.filter(s=>V(s,i)).filter(s=>B(s,o)).filter(s=>R(s,t)).filter(s=>U(s,t,r)).filter(s=>H(s))}function V(e,t){let r=!e.minVersion||l(t,`>=${e.minVersion}`),o=!e.maxVersion||l(t,`<=${e.maxVersion}`);return r&&o}function B(e,t){let r=!e.minDate||new Date(e.minDate)<=t,o=!e.maxDate||new Date(e.maxDate)>=t;return r&&o}function R(e,t){return t===""?!0:!e.commands||e.commands.includes(t)}function U(e,t,r){let o=t.split(":")[0]??"all",i=e.surface??"all";return r?r.includes(i):i===o||i==="all"}function H(e){if(!e.frequency)return!0;let t=`notification-${e.id}`,r=m(t)?.value;if(!r)return!0;switch(e.frequency){case"always":return!0;case"once":return!1;case"once_a_day":return new Date().getTime()-Number(r)>24*3600*1e3;case"once_a_week":return new Date().getTime()-Number(r)>168*3600*1e3}}function re(e){let t=[];return e.minDate&&t.push(`from ${e.minDate}`),e.maxDate&&t.push(`to ${e.maxDate}`),e.minVersion&&t.push(`from v${e.minVersion}`),e.maxVersion&&t.push(`to v${e.maxVersion}`),e.frequency==="once"&&t.push("show only once"),e.frequency==="once_a_day"&&t.push("show once a day"),e.frequency==="once_a_week"&&t.push("show once a week"),e.surface&&t.push(`surface = ${e.surface}`),e.commands&&t.push(`commands = ${e.commands.join(", ")}`),t.join(`
3
3
  `)}export{Z as a,k as b,ee as c,te as d,A as e,re as f};
@@ -1 +1 @@
1
- import{E as h,F as e,G as r,K as o,L as s,p as n}from"./chunk-V654BMS7.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
1
+ import{E as h,F as e,G as r,K as o,L as s,p as n}from"./chunk-D2KIGKBI.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function y(){await h({message:"Associate your project with the org Castile Ventures?",choices:[{label:"first",value:"first",disabled:!0},{label:"second",value:"second"},{label:"third (limit reached)",value:"third",disabled:!0},{label:"fourth (limit reached)",value:"fourth",disabled:!0},{label:"fifth",value:"fifth",group:"Automations",disabled:!0},{label:"sixth",value:"sixth",group:"Automations"},{label:"seventh",value:"seventh"},{label:"eighth (limit reached)",value:"eighth",group:"Merchant Admin",disabled:!0},{label:"ninth",value:"ninth",group:"Merchant Admin"},{label:"tenth",value:"tenth"}],infoTable:[{header:"add",items:["new-ext"],bullet:"+"},{header:"remove",items:["integrated-demand-ext","order-discount"],bullet:"-"}]}),await o({message:"App project name (can be changed later)",defaultValue:"expansive commerce app",validate:t=>{if(t.includes("shopify"))return`Can't include "shopify" in the name`}});let l=[{label:"first",value:"first"},{label:"second",value:"second"},{label:"third",value:"third"},{label:"fourth",value:"fourth"},{label:"fifth",value:"fifth"},{label:"sixth",value:"sixth"},{label:"seventh",value:"seventh"},{label:"eighth",value:"eighth"},{label:"ninth",value:"ninth"},{label:"tenth",value:"tenth"},{label:"eleventh",value:"eleventh"},{label:"twelfth",value:"twelfth"},{label:"thirteenth",value:"thirteenth"},{label:"fourteenth",value:"fourteenth"},{label:"fifteenth",value:"fifteenth"},{label:"sixteenth",value:"sixteenth"},{label:"seventeenth",value:"seventeenth"},{label:"eighteenth",value:"eighteenth"},{label:"nineteenth",value:"nineteenth"},{label:"twentieth",value:"twentieth"},{label:"twenty-first",value:"twenty-first"},{label:"twenty-second",value:"twenty-second"},{label:"twenty-third",value:"twenty-third"},{label:"twenty-fourth",value:"twenty-fourth"},{label:"twenty-fifth",value:"twenty-fifth"},{label:"twenty-sixth",value:"twenty-sixth"},{label:"twenty-seventh",value:"twenty-seventh"},{label:"twenty-eighth",value:"twenty-eighth"},{label:"twenty-ninth",value:"twenty-ninth"},{label:"thirtieth",value:"thirtieth"},{label:"thirty-first",value:"thirty-first"},{label:"thirty-second",value:"thirty-second"},{label:"thirty-third",value:"thirty-third"},{label:"thirty-fourth",value:"thirty-fourth"},{label:"thirty-fifth",value:"thirty-fifth"},{label:"thirty-sixth",value:"thirty-sixth"},{label:"thirty-seventh",value:"thirty-seventh"},{label:"thirty-eighth",value:"thirty-eighth"},{label:"thirty-ninth",value:"thirty-ninth"},{label:"fortieth",value:"fortieth"},{label:"forty-first",value:"forty-first"},{label:"forty-second",value:"forty-second"},{label:"forty-third",value:"forty-third"},{label:"forty-fourth",value:"forty-fourth"},{label:"forty-fifth",value:"forty-fifth"},{label:"forty-sixth",value:"forty-sixth"},{label:"forty-seventh",value:"forty-seventh"},{label:"forty-eighth",value:"forty-eighth"},{label:"forty-ninth",value:"forty-ninth"},{label:"fiftieth",value:"fiftieth"}];await r({message:"Template",choices:l,search(t){return Promise.resolve({data:l.filter(f=>f.label.includes(t))})}});let a=[["first theme",{subdued:"(#1)"}],["second theme",{subdued:"(#2)"}]];await e({message:"Add the following themes to the store?",infoTable:{"":a},confirmationMessage:"Yes, add them",cancellationMessage:"Cancel"});let u={title:{color:"red",text:`${n.warning} This can't be undone.`},body:"The action you are executing should be confirmed to proceed."};await e({message:"Delete the following themes from the store?",infoTable:{"":a},infoMessage:u,confirmationMessage:"Yes, delete them",cancellationMessage:"Cancel",defaultValue:!1}),await e({message:["Make the following changes to your",{filePath:".env"},"file?"],defaultValue:!0,confirmationMessage:"Yes, confirm changes",cancellationMessage:"No, make changes later"}),await s({message:"Release this version of Mega App?",infoTable:[{header:"Includes",items:["My subscription extension","Order discount function","Subscription cancelled trigger","Add subscription action"],bullet:"+"},{header:"Removes",items:["product-discount-function","product-subscription-extension"],bullet:"-"}],confirmation:"Mega App"})}export{y as a};
@@ -1 +1 @@
1
- import{d as l}from"./chunk-2RFCYZMG.js";import{c as t}from"./chunk-YY6TFARF.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-KT5QQOES.js";import{K as n}from"./chunk-V654BMS7.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
1
+ import{d as l}from"./chunk-IJY3RJPJ.js";import{c as t}from"./chunk-YY6TFARF.js";import{f as i,m,n as w,o as d,r as f}from"./chunk-YKMINHYY.js";import{K as n}from"./chunk-D2KIGKBI.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();async function y(o,r,P){i()||f({store:r});let e=o??m()??await p(["Enter your",{link:{label:"store password",url:t(r)}}]),s=!1;for(;!await l(e,r,P);)s||(d(),s=!0),e=await p(["Incorrect",{link:{label:"store password",url:t(r)}},{char:"."},"Please try again"]);return w(e),e}async function p(o){return n({message:o,password:!0})}export{y as a};
@@ -1,4 +1,4 @@
1
- import{h as k}from"./chunk-J7BTC45S.js";import{Sa as j,la as w,ta as R}from"./chunk-RIG66DIQ.js";import{a as H,c as f,e as G,g as o}from"./chunk-VKWPEFWQ.js";var ee=f((Tt,X)=>{"use strict";o();var m=class e extends Error{constructor(t,s,r){super("[ParserError] "+t,s,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},E=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},A=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new E(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let s;for(;s===!1||this.nextChar();)s=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new m("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,s){s&&this.next(s),this.stack.push(this.state),this.state=new E(t)}callNow(t,s){return this.call(t,s),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new m("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new m("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new m("Must declare a parseStart method")}};A.END=1114112;A.Error=m;X.exports=A});var re=f((Rt,te)=>{"use strict";o();te.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var y=f((xt,se)=>{"use strict";o();se.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var ne=f((Ht,ie)=>{"use strict";o();var C=y(),K=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${C(2,this.getUTCMonth()+1)}-${C(2,this.getUTCDate())}`,s=`${C(2,this.getUTCHours())}:${C(2,this.getUTCMinutes())}:${C(2,this.getUTCSeconds())}.${C(3,this.getUTCMilliseconds())}`;return`${t}T${s}`}};ie.exports=e=>{let t=new K(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var oe=f((yt,ae)=>{"use strict";o();var he=y(),$e=global.Date,W=class extends $e{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${he(2,this.getUTCMonth()+1)}-${he(2,this.getUTCDate())}`}};ae.exports=e=>{let t=new W(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var ce=f((It,le)=>{"use strict";o();var N=y(),q=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${N(2,this.getUTCHours())}:${N(2,this.getUTCMinutes())}:${N(2,this.getUTCSeconds())}.${N(3,this.getUTCMilliseconds())}`}};le.exports=e=>{let t=new q(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var I=f((exports,module)=>{"use strict";o();module.exports=makeParserClass(ee());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=re(),createDateTimeFloat=ne(),createDate=oe(),createTime=ce(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
1
+ import{h as k}from"./chunk-M5VIFG2V.js";import{Sa as j,la as w,ta as R}from"./chunk-JLQRDFR5.js";import{a as H,c as f,e as G,g as o}from"./chunk-VKWPEFWQ.js";var ee=f((Tt,X)=>{"use strict";o();var m=class e extends Error{constructor(t,s,r){super("[ParserError] "+t,s,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},E=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},A=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new E(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let s;for(;s===!1||this.nextChar();)s=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new m("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,s){s&&this.next(s),this.stack.push(this.state),this.state=new E(t)}callNow(t,s){return this.call(t,s),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new m("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new m("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new m("Must declare a parseStart method")}};A.END=1114112;A.Error=m;X.exports=A});var re=f((Rt,te)=>{"use strict";o();te.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var y=f((xt,se)=>{"use strict";o();se.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var ne=f((Ht,ie)=>{"use strict";o();var C=y(),K=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${C(2,this.getUTCMonth()+1)}-${C(2,this.getUTCDate())}`,s=`${C(2,this.getUTCHours())}:${C(2,this.getUTCMinutes())}:${C(2,this.getUTCSeconds())}.${C(3,this.getUTCMilliseconds())}`;return`${t}T${s}`}};ie.exports=e=>{let t=new K(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var oe=f((yt,ae)=>{"use strict";o();var he=y(),$e=global.Date,W=class extends $e{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${he(2,this.getUTCMonth()+1)}-${he(2,this.getUTCDate())}`}};ae.exports=e=>{let t=new W(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var ce=f((It,le)=>{"use strict";o();var N=y(),q=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${N(2,this.getUTCHours())}:${N(2,this.getUTCMinutes())}:${N(2,this.getUTCSeconds())}.${N(3,this.getUTCMilliseconds())}`}};le.exports=e=>{let t=new q(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var I=f((exports,module)=>{"use strict";o();module.exports=makeParserClass(ee());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=re(),createDateTimeFloat=ne(),createDate=oe(),createTime=ce(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
2
2
  `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(r){let i=this.ctx,h=r.key.pop();for(let n of r.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,h))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(r.value)||isFloat(r.value)?i[h]=r.value.valueOf():i[h]=r.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(r){return this.state.resultTable?this.state.resultTable.push(r):this.state.resultTable=[r],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(r){return this.returnNow({key:this.state.resultTable,value:r})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(r){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,r)&&(!isTable(this.ctx[r])||this.ctx[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[r]=this.ctx[r]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,r))this.ctx=this.ctx[r]=Table();else if(isTable(this.ctx[r]))this.ctx=this.ctx[r];else if(isList(this.ctx[r]))this.ctx=this.ctx[r][this.ctx[r].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(r){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,r)||(this.ctx[r]=List()),isInlineList(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[r])){let i=Table();this.ctx[r].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,r))this.ctx=this.ctx[r]=Table();else{if(isInlineList(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[r]))this.ctx=this.ctx[r][this.ctx[r].length-1];else if(isTable(this.ctx[r]))this.ctx=this.ctx[r];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(r){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(r){return this.returnNow(r)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(r){return this.state.buf+=r,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let r="\\u00";return this.char<16&&(r+="0"),r+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${r} instead`))}recordMultiEscapeReplacement(r){return this.state.buf+=r,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(r){try{let i=parseInt(r,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(r){if(this.state.resultArr){let i=this.state.resultArr[_contentType],h=tomlType(r);if(i!==h)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${h}`))}else this.state.resultArr=InlineList(tomlType(r));return isFloat(r)||isInteger(r)?this.state.resultArr.push(r.valueOf()):this.state.resultArr.push(r),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(r){let i=this.state.resultTable,h=r.key.pop();for(let n of r.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,h))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(r.value)||isFloat(r.value)?i[h]=r.value.valueOf():i[h]=r.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var L=f((Ot,ue)=>{"use strict";o();ue.exports=Ke;function Ke(e,t){if(e.pos==null||e.line==null)return e;let s=e.message;if(s+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
3
3
  `,t&&t.split){let r=t.split(/\n/),i=String(Math.min(r.length,e.line+3)).length,h=" ";for(;h.length<i;)h+=" ";for(let n=Math.max(0,e.line-1);n<Math.min(r.length,e.line+2);++n){let a=String(n+1);if(a.length<i&&(a=" "+a),e.line===n){s+=a+"> "+r[n]+`
4
4
  `,s+=h+" ";for(let l=0;l<e.col;++l)s+=" ";s+=`^
@@ -1,4 +1,4 @@
1
- import{a as C0,b as w0}from"./chunk-LGXNXAQA.js";import{b as v0,o as k8}from"./chunk-YLQ3LNNY.js";import{$ as T0,A as b0,B as Bd,C as Rd,E as Nn,F as A0,G as Di,H as S0,I as Nd,J as x0,K as Je,L as Go,M as Vo,N as P0,O as io,P as Jo,Q as Ko,R as pn,S as Gc,T as jr,U as Ie,V as mi,W as dn,X as vs,Y as O0,Z as Vc,aa as I0,ba as Jc,da as Yo,ea as B0,fa as R0,ga as N0,h as g0,ha as M0,ka as j0,la as $0,ma as L0,na as U0,p as _0,pa as k0,q as y0,qa as Md,r as F0,ra as q0,s as Id,t as Mr,u as zo,ua as W0,va as Kc,y as Hc,z as zc}from"./chunk-WFOU5M4H.js";import{a as E0}from"./chunk-M73IECPW.js";import{da as L8}from"./chunk-DTRENW4Q.js";import{a as m0}from"./chunk-7AWAOPLA.js";import{a as U8}from"./chunk-VJEKDBGZ.js";import{c as Es,d as wt}from"./chunk-HP2ZAAY7.js";import{a as Zy,b as Qy}from"./chunk-QX3T6G5X.js";import{a as D0}from"./chunk-MZCIRMZJ.js";import{a as _r}from"./chunk-ZHHTQRWU.js";import{$ as Mc,G as Hy,H as zy,J as Sd,M as Gy,U as R8,V as Vy,W as N8,X as M8,Y as Jy,Z as j8,_ as fn,b as I8,ba as Ky,ca as Ct,e as di,ea as _s,fa as Yy,j as $y,ka as Xy,l as Ly,o as Uy,u as ky}from"./chunk-NCPZVARH.js";import{m as jc,n as t0,s as r0,t as n0,w as $c,x as Lc}from"./chunk-2M535QQJ.js";import{d as B8,e as qy,q as Wy}from"./chunk-J3UXIC23.js";import{a as Ed}from"./chunk-MHWETFNT.js";import{a as Bn,b as to}from"./chunk-DSKAIC7O.js";import{A as ys,B as Uc,E as o0,F as Nr,G as Pd,I as u0,K as Fs,L as s0,N as a0,T as hi,W as kc,z as ro}from"./chunk-V654BMS7.js";import{a as $8}from"./chunk-5HBIIYSK.js";import{b as gs,d as Rc,e as Nc}from"./chunk-335BUVBP.js";import{a as bc}from"./chunk-BN7ZXAZJ.js";import{f as xd}from"./chunk-FHNJLON5.js";import{h as k,j as no,k as rr}from"./chunk-J7BTC45S.js";import{Aa as Iy,Ab as p0,Bb as ce,Cb as Rn,Da as pi,Ea as By,Eb as d0,Fa as Oc,Fb as h0,Ja as Ry,Ka as Ny,L as fi,N as Bt,Na as Tc,Oa as My,Q as O8,R as T8,Sa as K,T as xy,Ta as Rt,V as hs,Va as Le,Wa as jy,X as vt,Y as wd,_ as bd,_a as ln,aa as xc,ab as Ic,b as C8,c as w8,cb as Bc,da as Py,ea as Ho,f as b8,ha as Oy,i as A8,ib as e0,ja as Ds,k as S8,la as $e,m as by,ma as eo,n as Ay,na as ms,oa as Rr,pa as Pc,q as x8,qb as xe,rb as qc,sb as Pe,ta as mt,u as Sy,ua as Ty,v as P8,va as tr,w as Cd,wb as Wc,yb as f0}from"./chunk-RIG66DIQ.js";import{b as E8,c as v8,e as Cy,f as wy,i as i0}from"./chunk-B4OMIONW.js";import{b as y,j as Ad}from"./chunk-FZCGRIOM.js";import{g as c0,l as Od,m as Td,n as l0}from"./chunk-GSGCSBRN.js";import{a as ds}from"./chunk-JD5P5RAJ.js";import{c as B,d as Qi,e as ot,f as Se,g as Wo,h as he,i as ye,j as Ac,k as Fy,m as Sc,n as Ey,r as vy,s as vd}from"./chunk-IWTNUJGY.js";import{a as Ge,c as N,e as li,f as F8,g as d}from"./chunk-VKWPEFWQ.js";var nF=N((Xc,rF)=>{d();(function(e,t){typeof Xc=="object"&&typeof rF<"u"?t(Xc,(T8(),F8(O8)),I8()):typeof define=="function"&&define.amd?define(["exports","tslib","graphql"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["graphql-tag"]={},e.tslib,e.graphql))})(Xc,(function(e,t,r){"use strict";var n=new Map,o=new Map,s=!0,a=!1;function l(q){return q.replace(/[\s,]+/g," ").trim()}function p(q){return l(q.source.body.substring(q.start,q.end))}function D(q){var X=new Set,Q=[];return q.definitions.forEach(function(fe){if(fe.kind==="FragmentDefinition"){var Fe=fe.name.value,He=p(fe.loc),gt=o.get(Fe);gt&&!gt.has(He)?s&&console.warn("Warning: fragment with name "+Fe+` already exists.
1
+ import{a as C0,b as w0}from"./chunk-6ES4KRFW.js";import{b as v0,o as k8}from"./chunk-YLQ3LNNY.js";import{$ as T0,A as b0,B as Bd,C as Rd,E as Nn,F as A0,G as Di,H as S0,I as Nd,J as x0,K as Je,L as Go,M as Vo,N as P0,O as io,P as Jo,Q as Ko,R as pn,S as Gc,T as jr,U as Ie,V as mi,W as dn,X as vs,Y as O0,Z as Vc,aa as I0,ba as Jc,da as Yo,h as g0,ia as B0,ja as R0,ka as N0,la as M0,oa as j0,p as _0,pa as $0,q as y0,qa as L0,r as F0,ra as U0,s as Id,t as Mr,ta as k0,u as zo,ua as Md,va as q0,y as Hc,ya as W0,z as zc,za as Kc}from"./chunk-33ZE3DRQ.js";import{a as E0}from"./chunk-YV2TP44L.js";import{da as L8}from"./chunk-RLNIOJH3.js";import{a as m0}from"./chunk-SK7EPN6C.js";import{a as U8}from"./chunk-VJEKDBGZ.js";import{c as Es,d as wt}from"./chunk-TODZ3TJR.js";import{a as Zy,b as Qy}from"./chunk-Y5CVX5LJ.js";import{a as D0}from"./chunk-T4XJKM6B.js";import{a as _r}from"./chunk-N57Y7THE.js";import{$ as Mc,G as Hy,H as zy,J as Sd,M as Gy,U as R8,V as Vy,W as N8,X as M8,Y as Jy,Z as j8,_ as fn,b as I8,ba as Ky,ca as Ct,e as di,ea as _s,fa as Yy,j as $y,ka as Xy,l as Ly,o as Uy,u as ky}from"./chunk-GQLNG537.js";import{m as jc,n as t0,s as r0,t as n0,w as $c,x as Lc}from"./chunk-QQJNQNKP.js";import{d as B8,e as qy,q as Wy}from"./chunk-MHR5OHT5.js";import{a as Ed}from"./chunk-HSKDFEXW.js";import{a as Bn,b as to}from"./chunk-F3CK3EJJ.js";import{A as ys,B as Uc,E as o0,F as Nr,G as Pd,I as u0,K as Fs,L as s0,N as a0,T as hi,W as kc,z as ro}from"./chunk-D2KIGKBI.js";import{a as $8}from"./chunk-5HBIIYSK.js";import{b as gs,d as Rc,e as Nc}from"./chunk-335BUVBP.js";import{a as bc}from"./chunk-BN7ZXAZJ.js";import{f as xd}from"./chunk-CXI3RHPW.js";import{h as k,j as no,k as rr}from"./chunk-M5VIFG2V.js";import{Aa as Iy,Ab as p0,Bb as ce,Cb as Rn,Da as pi,Ea as By,Eb as d0,Fa as Oc,Fb as h0,Ja as Ry,Ka as Ny,L as fi,N as Bt,Na as Tc,Oa as My,Q as O8,R as T8,Sa as K,T as xy,Ta as Rt,V as hs,Va as Le,Wa as jy,X as vt,Y as wd,_ as bd,_a as ln,aa as xc,ab as Ic,b as C8,c as w8,cb as Bc,da as Py,ea as Ho,f as b8,ha as Oy,i as A8,ib as e0,ja as Ds,k as S8,la as $e,m as by,ma as eo,n as Ay,na as ms,oa as Rr,pa as Pc,q as x8,qb as xe,rb as qc,sb as Pe,ta as mt,u as Sy,ua as Ty,v as P8,va as tr,w as Cd,wb as Wc,yb as f0}from"./chunk-JLQRDFR5.js";import{b as E8,c as v8,e as Cy,f as wy,i as i0}from"./chunk-B4OMIONW.js";import{b as y,j as Ad}from"./chunk-FZCGRIOM.js";import{g as c0,l as Od,m as Td,n as l0}from"./chunk-LHXFTFFM.js";import{a as ds}from"./chunk-JD5P5RAJ.js";import{c as B,d as Qi,e as ot,f as Se,g as Wo,h as he,i as ye,j as Ac,k as Fy,m as Sc,n as Ey,r as vy,s as vd}from"./chunk-IWTNUJGY.js";import{a as Ge,c as N,e as li,f as F8,g as d}from"./chunk-VKWPEFWQ.js";var nF=N((Xc,rF)=>{d();(function(e,t){typeof Xc=="object"&&typeof rF<"u"?t(Xc,(T8(),F8(O8)),I8()):typeof define=="function"&&define.amd?define(["exports","tslib","graphql"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["graphql-tag"]={},e.tslib,e.graphql))})(Xc,(function(e,t,r){"use strict";var n=new Map,o=new Map,s=!0,a=!1;function l(q){return q.replace(/[\s,]+/g," ").trim()}function p(q){return l(q.source.body.substring(q.start,q.end))}function D(q){var X=new Set,Q=[];return q.definitions.forEach(function(fe){if(fe.kind==="FragmentDefinition"){var Fe=fe.name.value,He=p(fe.loc),gt=o.get(Fe);gt&&!gt.has(He)?s&&console.warn("Warning: fragment with name "+Fe+` already exists.
2
2
  graphql-tag enforces all fragment names across your application to be unique; read more about
3
3
  this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):gt||o.set(Fe,gt=new Set),gt.add(He),X.has(He)||(X.add(He),Q.push(fe))}else Q.push(fe)}),t.__assign(t.__assign({},q),{definitions:Q})}function g(q){var X=new Set(q.definitions);X.forEach(function(fe){fe.loc&&delete fe.loc,Object.keys(fe).forEach(function(Fe){var He=fe[Fe];He&&typeof He=="object"&&X.add(He)})});var Q=q.loc;return Q&&(delete Q.startToken,delete Q.endToken),q}function E(q){var X=l(q);if(!n.has(X)){var Q=r.parse(q,{experimentalFragmentVariables:a,allowLegacyFragmentVariables:a,experimentalFragmentArguments:a});if(!Q||Q.kind!=="Document")throw new Error("Not a valid GraphQL document.");n.set(X,g(D(Q)))}return n.get(X)}function w(q){for(var X=[],Q=1;Q<arguments.length;Q++)X[Q-1]=arguments[Q];typeof q=="string"&&(q=[q]);var fe=q[0];return X.forEach(function(Fe,He){Fe&&Fe.kind==="Document"?fe+=Fe.loc.source.body:fe+=Fe,fe+=q[He+1]}),E(fe)}function v(){n.clear(),o.clear()}function S(){s=!1}function O(){a=!0}function P(){a=!1}var I={gql:w,resetCaches:v,disableFragmentWarnings:S,enableExperimentalFragmentVariables:O,disableExperimentalFragmentVariables:P};(function(q){q.gql=I.gql,q.resetCaches=I.resetCaches,q.disableFragmentWarnings=I.disableFragmentWarnings,q.enableExperimentalFragmentVariables=I.enableExperimentalFragmentVariables,q.disableExperimentalFragmentVariables=I.disableExperimentalFragmentVariables})(w||(w={})),w.default=w;var U=w;e.default=U,e.disableExperimentalFragmentVariables=P,e.disableFragmentWarnings=S,e.enableExperimentalFragmentVariables=O,e.gql=w,e.resetCaches=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var oF=N((GH,iF)=>{d();iF.exports=nF().gql});var dF=N(pF=>{d();var eB=Object.create,Zc=Object.defineProperty,tB=Object.getPrototypeOf,rB=Object.prototype.hasOwnProperty,nB=Object.getOwnPropertyNames,iB=Object.getOwnPropertyDescriptor,sF=e=>Zc(e,"__esModule",{value:!0}),oB=(e,t)=>{sF(e);for(var r in t)Zc(e,r,{get:t[r],enumerable:!0})},uB=(e,t,r)=>{if(sF(e),t&&typeof t=="object"||typeof t=="function")for(let n of nB(t))!rB.call(e,n)&&n!=="default"&&Zc(e,n,{get:()=>t[n],enumerable:!(r=iB(t,n))||r.enumerable});return e},Qc=e=>e&&e.__esModule?e:uB(Zc(e!=null?eB(tB(e)):{},"default",{value:e,enumerable:!0}),e);oB(pF,{default:()=>DB,generateContentsFromGraphqlString:()=>fF,generateGraphQLString:()=>cF});var sB=Qc(Ge("fs")),aB=Qc(oF()),cB=Qc(Ge("readline")),uF=Qc(Ge("path")),aF=(e,t)=>{let r=t?t(e):e;return JSON.stringify(r,(n,o)=>o===void 0?"__undefined":o).replace(/"__undefined"/g,"undefined")},lB=(e,t)=>{let r=new Set,n=[],o=s=>{r.has(s)||(r.add(s),s.imports.forEach(a=>{let l=t[a.absolutePath];o(l)}),n.unshift(s))};return e.forEach(o),n},fB=e=>new Promise(t=>{let r=cB.default.createInterface({input:sB.default.createReadStream(e)}),n="",o=[],s=!1,a=(l,p)=>{let D=p.replace(l,""),g=D.replace(/"|'/g,""),E=uF.default.join(uF.default.dirname(e),g);o.push({absolutePath:E,relativePath:D})};r.on("line",l=>{l.startsWith("#import ")?a("#import ",l):l.startsWith("# import ")?a("# import ",l):s?n+=l+`
4
4
  `:l[0]!=="#"&&l!==""&&(s=!0,n+=l+`
@@ -1 +1 @@
1
- import{T as i}from"./chunk-V654BMS7.js";import{yb as o}from"./chunk-RIG66DIQ.js";import{j as d}from"./chunk-FZCGRIOM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();import{Writable as m}from"node:stream";import{StringDecoder as f}from"node:string_decoder";function p(){return d()!=="json"?{stdout:process.stdout,stderr:process.stderr}:{stdout:u(),stderr:u()}}function u(){let e=new f("utf8");return new m({write(r,t,c){let s=e.write(r);s&&o(s),c()},final(r){let t=e.end();t&&o(t),r()}})}async function y(e,r){let t=p();try{await i(e,r,t.stdout===process.stdout?{stdio:"inherit"}:{stdin:"inherit",...t})}finally{t.stdout!==process.stdout&&t.stdout.end(),t.stderr!==process.stderr&&t.stderr.end()}}export{p as a,y as b};
1
+ import{T as i}from"./chunk-D2KIGKBI.js";import{yb as o}from"./chunk-JLQRDFR5.js";import{j as d}from"./chunk-FZCGRIOM.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();import{Writable as m}from"node:stream";import{StringDecoder as f}from"node:string_decoder";function p(){return d()!=="json"?{stdout:process.stdout,stderr:process.stderr}:{stdout:u(),stderr:u()}}function u(){let e=new f("utf8");return new m({write(r,t,c){let s=e.write(r);s&&o(s),c()},final(r){let t=e.end();t&&o(t),r()}})}async function y(e,r){let t=p();try{await i(e,r,t.stdout===process.stdout?{stdio:"inherit"}:{stdin:"inherit",...t})}finally{t.stdout!==process.stdout&&t.stdout.end(),t.stderr!==process.stderr&&t.stderr.end()}}export{p as a,y as b};
@@ -1,3 +1,3 @@
1
- import{a as R,b as T,c as m,d as F,g as v}from"./chunk-2TPLPZA2.js";import{p as S,v as w}from"./chunk-KT5QQOES.js";import{ua as h}from"./chunk-NCPZVARH.js";import{b as l,c as f}from"./chunk-5AWELO3D.js";import{a as c}from"./chunk-BN7ZXAZJ.js";import{S as d,wb as n}from"./chunk-RIG66DIQ.js";import{b as P}from"./chunk-YTUUU33R.js";import{e as O,g as r}from"./chunk-VKWPEFWQ.js";r();r();var j=c({name:"ThemeShareResult",schema:m.schema,definitions:m.definitions}),o={...j,encode:m.encode};r();function g(s,e){e==="json"?n(o.encode(T(s))):F(s,"text")}function x(s){let e=s.map(t=>"error"in t?t:(R.safeParse(t.result).data?.hasErrors&&(process.exitCode=1),{...t,result:t.result??{status:"skipped",reason:"unsafe-directory"}}));n(o.encode({environments:e}))}var u=O(P(),1);var p=class extends w{static get jsonOutputSchema(){return o}static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
1
+ import{a as R,b as T,c as m,d as F,g as v}from"./chunk-SHD4VV5V.js";import{p as S,v as w}from"./chunk-YKMINHYY.js";import{ua as h}from"./chunk-GQLNG537.js";import{b as l,c as f}from"./chunk-3KM5ZOW2.js";import{a as c}from"./chunk-BN7ZXAZJ.js";import{S as d,wb as n}from"./chunk-JLQRDFR5.js";import{b as P}from"./chunk-YTUUU33R.js";import{e as O,g as r}from"./chunk-VKWPEFWQ.js";r();r();var j=c({name:"ThemeShareResult",schema:m.schema,definitions:m.definitions}),o={...j,encode:m.encode};r();function g(s,e){e==="json"?n(o.encode(T(s))):F(s,"text")}function x(s){let e=s.map(t=>"error"in t?t:(R.safeParse(t.result).data?.hasErrors&&(process.exitCode=1),{...t,result:t.result??{status:"skipped",reason:"unsafe-directory"}}));n(o.encode({environments:e}))}var u=O(P(),1);var p=class extends w{static get jsonOutputSchema(){return o}static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
2
2
 
3
3
  This command returns a [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.`;static description=this.descriptionForHelp();static flags={...l,...f,...S,force:u.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),listing:u.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"})};static multiEnvironmentsFlags=["store","password","path"];async command(e,t,a,C,y){let b={environment:e.environment,force:e.force,noColor:e["no-color"],password:e.password,path:e.path,store:e.store,theme:d("creative"),unpublished:!0,listing:e.listing};h("theme-command:share");let i=await v(b,t,a,y);return i?.hasErrors&&(process.exitCode=1),e.json&&a||(i?g(i,e.json?"json":"text"):e.json&&n(o.encode({status:"cancelled"}))),h("theme-command:share"),i??(e.json&&a?{status:"skipped",reason:"unsafe-directory"}:void 0)}renderEnvironmentResults(e){x(e)}};export{p as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-3JACWBUC.js";import{b as a}from"./chunk-OLKLHVHA.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
1
+ import{a as o}from"./chunk-64G5TGFF.js";import{b as a}from"./chunk-ZJOX5HW4.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{a as j}from"./chunk-NPB753M3.js";import{a as D}from"./chunk-D4LFWIFE.js";import{Ba as u,Ca as _,Ma as L}from"./chunk-XV6XCOTG.js";import{b as $,c as P}from"./chunk-5AWELO3D.js";import{A as R,B as A}from"./chunk-V654BMS7.js";import{a as S}from"./chunk-BN7ZXAZJ.js";import{h as a}from"./chunk-J7BTC45S.js";import{Sa as O,ab as v,ta as E,va as N,wb as F}from"./chunk-RIG66DIQ.js";import{b as s}from"./chunk-FZCGRIOM.js";import{b as X}from"./chunk-YTUUU33R.js";import{c as m,e as w,f,h as T,i as C}from"./chunk-IWTNUJGY.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function k({remoteApp:t,developerPlatformClient:e}){let n=await e.channelSpecExport(t);if(n.status===404)throw new a("The channel spec export endpoint is not available for this app.","Check that the app and organization are correct.");if(!n.ok){let i=typeof n.body?.reason=="string"?n.body.reason:void 0;if(n.status===426)throw new a(`Failed to fetch the channel spec export: ${i??"This version of the Shopify CLI is no longer supported."}`,"Upgrade the Shopify CLI and try again.");if(n.status===422)return{success:!1,reason:i??`http_${n.status}`};throw n.status===401||n.status===403?new a(`Failed to fetch the channel spec export: authentication failed (status ${n.status}).`,"Run `shopify auth logout` and try again."):new a(`Failed to fetch the channel spec export: the server responded with status ${n.status}.`,"Try again in a moment.")}let{handle:r,filename:p,toml:o,warnings:h}=n.body;if(typeof r!="string"||typeof p!="string"||typeof o!="string")throw new a("Failed to fetch the channel spec export: the response was missing required fields.");return{success:!0,handle:r,filename:p,toml:o,warnings:B(h)}}function B(t){return Array.isArray(t)?t.flatMap(e=>e&&typeof e=="object"&&typeof e.code=="string"&&typeof e.message=="string"?[e]:[]):[]}c();var M=s.object({code:s.string(),message:s.string()}).strict(),d=S({name:"ImportChannelConfigResult",schema:s.object({status:s.literal("success"),handle:s.string().min(1),filename:s.string().min(1),path:s.string().regex(/^(?:\/|[a-zA-Z]:[\\/]|\\\\)/,"The path must be absolute.").describe("Absolute path of the written TOML file."),toml:s.string().describe("Native channel_config TOML content, unchanged from the export."),warnings:s.array(M).describe("Warnings returned with the channel spec export.")}).strict(),definitions:{ChannelSpecExportWarning:M}});var g=m("extensions","channel-config"),he=m(g,_),x="shopify.extension.toml",G=`name = "Channel config"
1
+ import{a as j}from"./chunk-VHZ6RL67.js";import{a as D}from"./chunk-NVKJ7ZLP.js";import{Ba as u,Ca as _,Ma as L}from"./chunk-U2T5HPRD.js";import{b as $,c as P}from"./chunk-3KM5ZOW2.js";import{A as R,B as A}from"./chunk-D2KIGKBI.js";import{a as S}from"./chunk-BN7ZXAZJ.js";import{h as a}from"./chunk-M5VIFG2V.js";import{Sa as O,ab as v,ta as E,va as N,wb as F}from"./chunk-JLQRDFR5.js";import{b as s}from"./chunk-FZCGRIOM.js";import{b as X}from"./chunk-YTUUU33R.js";import{c as m,e as w,f,h as T,i as C}from"./chunk-IWTNUJGY.js";import{e as z,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();async function k({remoteApp:t,developerPlatformClient:e}){let n=await e.channelSpecExport(t);if(n.status===404)throw new a("The channel spec export endpoint is not available for this app.","Check that the app and organization are correct.");if(!n.ok){let i=typeof n.body?.reason=="string"?n.body.reason:void 0;if(n.status===426)throw new a(`Failed to fetch the channel spec export: ${i??"This version of the Shopify CLI is no longer supported."}`,"Upgrade the Shopify CLI and try again.");if(n.status===422)return{success:!1,reason:i??`http_${n.status}`};throw n.status===401||n.status===403?new a(`Failed to fetch the channel spec export: authentication failed (status ${n.status}).`,"Run `shopify auth logout` and try again."):new a(`Failed to fetch the channel spec export: the server responded with status ${n.status}.`,"Try again in a moment.")}let{handle:r,filename:p,toml:o,warnings:h}=n.body;if(typeof r!="string"||typeof p!="string"||typeof o!="string")throw new a("Failed to fetch the channel spec export: the response was missing required fields.");return{success:!0,handle:r,filename:p,toml:o,warnings:B(h)}}function B(t){return Array.isArray(t)?t.flatMap(e=>e&&typeof e=="object"&&typeof e.code=="string"&&typeof e.message=="string"?[e]:[]):[]}c();var M=s.object({code:s.string(),message:s.string()}).strict(),d=S({name:"ImportChannelConfigResult",schema:s.object({status:s.literal("success"),handle:s.string().min(1),filename:s.string().min(1),path:s.string().regex(/^(?:\/|[a-zA-Z]:[\\/]|\\\\)/,"The path must be absolute.").describe("Absolute path of the written TOML file."),toml:s.string().describe("Native channel_config TOML content, unchanged from the export."),warnings:s.array(M).describe("Warnings returned with the channel spec export.")}).strict(),definitions:{ChannelSpecExportWarning:M}});var g=m("extensions","channel-config"),he=m(g,_),x="shopify.extension.toml",G=`name = "Channel config"
2
2
  type = "${u}"
3
3
  handle = "channel-config"
4
4
  `,U=["extensions/*"],q={no_exportable_frozen_record:"This app doesn't have a channel spec that can be exported yet.",multiple_exportable_records:"This app has more than one channel spec, so it can't be exported automatically.",not_allowlisted:"This app isn't part of the channel spec export prototype yet.",contains_no_public_fields:"This app's channel spec has no public channel_config fields.",invalid_public_schema:"This app's channel spec doesn't match the public channel_config schema."};async function H(t){let{app:e,remoteApp:n,developerPlatformClient:r,force:p}=t,o=await k({remoteApp:n,developerPlatformClient:r});if(!o.success){let y=q[o.reason];throw y?new a(y):new a(`The channel spec for this app could not be exported (reason: ${o.reason}).`)}let{extensionDirectory:h,createExtension:i}=Z(e),l=w(h,_,C(o.filename));if(!p&&await O(l))throw new a(`A channel spec already exists at ${f(e.directory,l)}.`,"Re-run with `--force` to replace it.");let I=d.validate({status:"success",handle:o.handle,filename:C(o.filename),path:l,toml:o.toml,warnings:o.warnings.map(({code:y,message:Y})=>({code:y,message:Y}))});return await N(T(l)),i&&await E(m(h,x),G),await E(l,I.toml),{...I,extensionConfigurationPath:i?w(h,x):null}}function Z(t){let e=t.allExtensions.filter(i=>i.type===u);if(e.length>1){let i=e.map(l=>f(t.directory,l.directory)).join(", ");throw new a(`This app has more than one ${u} extension (${i}).`,"Only one is allowed. Remove the extras and try again.")}if(e.length===1)return{extensionDirectory:e[0].directory,createExtension:!1};let n=t.configuration.extension_directories,r=n&&n.length>0?n:U;if(!r.some(i=>v(`${g}/${x}`,`${i}/*.extension.toml`)))throw new a(`Your shopify.app.toml only loads extensions from ${r.join(", ")}, so a new extension at ${g} wouldn't be deployed.`,`Create a ${u} extension in one of those directories with a ${x} like:
@@ -1 +1 @@
1
- import{b as n}from"./chunk-DSKAIC7O.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends Error{type;constructor(e,p){super(p),this.type=e}},i=r=>async()=>r,s=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var d="cloudflare",v=i({name:d});export{o as a,s as b,d as c,v as d};
1
+ import{b as n}from"./chunk-F3CK3EJJ.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();var o=class extends Error{type;constructor(e,p){super(p),this.type=e}},i=r=>async()=>r,s=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var d="cloudflare",v=i({name:d});export{o as a,s as b,d as c,v as d};
@@ -1,4 +1,4 @@
1
- import{a as z,b as bt}from"./chunk-JLGA3B7P.js";import{a as Tt,b as Rt,f as Ae,g as le,h as N,j as de,k as Pt,m as vt,p as $t}from"./chunk-2RFCYZMG.js";import{a as J,l as St,m as Ft}from"./chunk-2NZ7GDDR.js";import{s as ce,t as B}from"./chunk-KT5QQOES.js";import{a as W,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-DTRENW4Q.js";import{va as j,xa as D}from"./chunk-NCPZVARH.js";import{B as L,C as re,D as ct,U as lt,z as at}from"./chunk-V654BMS7.js";import{c as it}from"./chunk-335BUVBP.js";import{h as k}from"./chunk-J7BTC45S.js";import{Bb as v,Cb as U,O as nt,Sa as b,Va as O,Z as Le,ab as Ce,la as _,na as qe,qb as C,sb as oe,ta as je,va as rt,xa as ot,yb as ie}from"./chunk-RIG66DIQ.js";import{c as x,e as et,f as A,h as tt,i as st,j as H,n as _e}from"./chunk-IWTNUJGY.js";import{e as Ke,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();var fs=".shopifyignore",It=/templates\/\*(\.(json|liquid))?$/,kt=new Set;function ue(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=He(s),[a=[],u=[]]=He(n),[p=[],c=[]]=He(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=>hs(n,i)||Es(i)&&ys(n,ws(i)));return(s?!r:r)?(v(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function _t(e){let t=x(e,fs);return await b(t)?(await _(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function He(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function hs(e,t){let s={matchBase:!0,noglobstar:!0};return Ce(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!kt.has(t)&&(kt.add(t),L({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),gs(t)?Ce(e,t.replace(It,"templates/**/*$1"),s):!1)}function gs(e){return It.test(e)}function ys(e,t){return t.test(e)}function Es(e){return e.startsWith("/")&&e.endsWith("/")}function ws(e){return new RegExp(e.slice(1,-1))}m();import Lt from"fs/promises";var pe=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&U("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){j(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),U(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 Lt.writeFile(this.notifyPath,t),await Lt.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 xs from"node:events";var qt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function jt(e){let t=new Map,s=new Set,n=new xs,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=O(qt,{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(qt.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 Ts="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Ct(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function At(e){return(0,String.raw)`<!DOCTYPE html>
1
+ import{a as z,b as bt}from"./chunk-JLGA3B7P.js";import{a as Tt,b as Rt,f as Ae,g as le,h as N,j as de,k as Pt,m as vt,p as $t}from"./chunk-IJY3RJPJ.js";import{a as J,l as St,m as Ft}from"./chunk-H6GYBLVQ.js";import{s as ce,t as B}from"./chunk-YKMINHYY.js";import{a as W,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-RLNIOJH3.js";import{va as j,xa as D}from"./chunk-GQLNG537.js";import{B as L,C as re,D as ct,U as lt,z as at}from"./chunk-D2KIGKBI.js";import{c as it}from"./chunk-335BUVBP.js";import{h as k}from"./chunk-M5VIFG2V.js";import{Bb as v,Cb as U,O as nt,Sa as b,Va as O,Z as Le,ab as Ce,la as _,na as qe,qb as C,sb as oe,ta as je,va as rt,xa as ot,yb as ie}from"./chunk-JLQRDFR5.js";import{c as x,e as et,f as A,h as tt,i as st,j as H,n as _e}from"./chunk-IWTNUJGY.js";import{e as Ke,g as m}from"./chunk-VKWPEFWQ.js";m();m();m();var fs=".shopifyignore",It=/templates\/\*(\.(json|liquid))?$/,kt=new Set;function ue(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=He(s),[a=[],u=[]]=He(n),[p=[],c=[]]=He(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=>hs(n,i)||Es(i)&&ys(n,ws(i)));return(s?!r:r)?(v(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function _t(e){let t=x(e,fs);return await b(t)?(await _(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function He(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function hs(e,t){let s={matchBase:!0,noglobstar:!0};return Ce(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!kt.has(t)&&(kt.add(t),L({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),gs(t)?Ce(e,t.replace(It,"templates/**/*$1"),s):!1)}function gs(e){return It.test(e)}function ys(e,t){return t.test(e)}function Es(e){return e.startsWith("/")&&e.endsWith("/")}function ws(e){return new RegExp(e.slice(1,-1))}m();import Lt from"fs/promises";var pe=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&U("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){j(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),U(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 Lt.writeFile(this.notifyPath,t),await Lt.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 xs from"node:events";var qt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function jt(e){let t=new Map,s=new Set,n=new xs,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=O(qt,{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(qt.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 Ts="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Ct(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function At(e){return(0,String.raw)`<!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
4
  <title>${e.title}</title>
@@ -1,4 +1,4 @@
1
- import{a as uo,e as fo,f as po}from"./chunk-EH22T4FI.js";import{a as ho}from"./chunk-LGXNXAQA.js";import{c as mo,i as go,o as Ur}from"./chunk-YLQ3LNNY.js";import{b as et}from"./chunk-OLKLHVHA.js";import{Da as oo,M as Yt,O as Jt,R as Wt,ha as Bt,l as qt,la as zt,u as je}from"./chunk-NCPZVARH.js";import{B as eo,D as to,l as Kt,m as Xt,p as Zt,x as Ze}from"./chunk-2M535QQJ.js";import{b as lo,c as ce}from"./chunk-5AWELO3D.js";import{A as ie,B as Y,D as no,E as G,F as M,I as io,K as se,N as so,z as q}from"./chunk-V654BMS7.js";import{a as Mt,c as Vt}from"./chunk-F3OM2YO6.js";import{o as Ht}from"./chunk-335BUVBP.js";import{a as re}from"./chunk-BN7ZXAZJ.js";import{h as p,k as Fe}from"./chunk-J7BTC45S.js";import{Ba as Xe,Bb as I,Da as _e,Sa as w,T as jt,Va as Dt,W as Ft,Y as Nt,_ as Lt,_a as Ut,ib as Qt,la as R,nb as ro,oa as ne,qb as J,rb as ao,sb as ae,ta as C,va as $e,wb as co,xa as Ie,yb as F}from"./chunk-RIG66DIQ.js";import{i as E}from"./chunk-B4OMIONW.js";import{b as S,h as Gt,j as Te}from"./chunk-FZCGRIOM.js";import{b as ke}from"./chunk-YTUUU33R.js";import{a as Tt}from"./chunk-JD5P5RAJ.js";import{c as g,e as b,f as Q,h as O,i as K,j as Oe,m as Qe,p as Ke}from"./chunk-IWTNUJGY.js";import{b as Dr}from"./chunk-JFBCE4HN.js";import{e as ye,g as l}from"./chunk-VKWPEFWQ.js";l();import{createRequire as Hr}from"node:module";import{pathToFileURL as yo}from"node:url";var wo=Hr(import.meta.url);async function So(e){let t;try{t=wo.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(s){throw s instanceof Error&&s.code==="MODULE_NOT_FOUND"?new p("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):s}let o=await eo(t),r=o.content.exports?.["."];typeof r!="string"&&(r=r?.import),typeof r!="string"&&(r=r.default);let n=g(O(o.path),r);return import(yo(n).href)}function Gr(e,t){let o=wo.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(yo(o).href)}l();l();import{isAbsolute as Mr,resolve as Vr}from"node:path";var Pi=S.string().refine(Mr,"Expected an absolute native filesystem path").transform(e=>Vr(e)),vo=S.string().datetime({precision:0}),we=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefront\/\d+$/).describe("A Shopify HydrogenStorefront GID."),Ei=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontEnvironment\/\d+$/).describe("A Shopify HydrogenStorefrontEnvironment GID."),bo=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontDeployment\/\d+$/).describe("A Shopify HydrogenStorefrontDeployment GID."),xo=S.enum(["success","partial","skipped","cancelled"]),tt=S.string().regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/).nullable();function Po(e){return new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function Ne(e){let t=e?.toLowerCase();return t&&/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/.test(t)?t:null}l();import{format as qr}from"node:util";async function Eo(e){if(!X())return e();let t={log:console.log,info:console.info,debug:console.debug},o={...t};for(let r of["log","info","debug"])o[r]=(...n)=>{X()?Mt(["--json"],()=>F(qr(...n))):t[r](...n)},console[r]=o[r];try{return await e()}finally{for(let r of["log","info","debug"])console[r]===o[r]&&(console[r]=t[r])}}function X(){return Te()==="json"||Ht()}function Le(e,t,o=X()){return o?(co(e.encode(t)),!0):!1}l();var Co=S.object({gid:bo,createdAt:vo,commitMessage:S.string().nullable()}).strict(),ot=S.object({gid:we,name:S.string(),productionUrl:S.string().url().nullable()}).strict().describe("All projected fields are present; unavailable productionUrl is null."),Ro=ot.extend({currentProductionDeployment:Co.nullable()}).strict();function rt(e){return{gid:e.id,name:e.title,productionUrl:e.productionUrl||null}}function Ni({shop:e,storefronts:t}){return{storeDomain:Ne(e),storefronts:t.map(o=>({...rt(o),currentProductionDeployment:o.currentProductionDeployment?{gid:o.currentProductionDeployment.id,createdAt:Po(o.currentProductionDeployment.createdAt),commitMessage:o.currentProductionDeployment.commitMessage??null}:null}))}}var Li=re({name:"HydrogenListResult",schema:S.object({storeDomain:tt,storefronts:S.array(Ro)}).strict().describe("The complete list of Hydrogen storefronts for the store."),definitions:{Storefront:Ro,Deployment:Co}}),nt=re({name:"HydrogenLinkResult",schema:S.object({status:xo,changed:S.boolean(),storeDomain:tt,storefront:ot.nullable()}).strict(),definitions:{Storefront:ot}}),Di=re({name:"HydrogenUnlinkResult",schema:S.object({status:S.literal("success"),changed:S.boolean(),storefront:S.object({gid:we,name:S.string()}).strict().nullable()}).strict()});var We=ye(ke(),1);l();var $o=ye(ke(),1);l();import{createRequire as Ao}from"node:module";function ko({id:e,projectPath:t}){if(!(!e||!Yr(t,e)))throw new p(`\`shopify ${e.replace(/:/g," ")}\` is not supported by this version of Hydrogen`,"The installed version of @shopify/hydrogen disables this command.",["Use your framework or package tooling instead."])}function Yr(e,t){try{let n=Ao(g(e,"package.json"))("@shopify/hydrogen/package.json")?.shopify?.cli?.disabledCommands;return Array.isArray(n)&&n.includes(t)}catch{return!1}}function Oo(e){try{let o=Ao(import.meta.url)(g(e,"package.json"));return[o?.dependencies,o?.devDependencies,o?.peerDependencies].some(r=>!!r?.["@shopify/hydrogen"])}catch{return!1}}var le=class extends et{static baseFlags={...et.baseFlags,...lo};async _run(){let t=()=>Eo(()=>super._run()),{flags:o}=await $o.Parser.parse([],{flags:ce});return o.json&&(process.env.SHOPIFY_FLAG_JSON="true"),o.json&&Te()!=="json"?Gt({outputMode:"json",sink:Vt},t):t()}async init(){if(await super.init(),!this.id?.startsWith("hydrogen:")||this.id==="hydrogen:init")return;let t=this.argv.indexOf("--"),o=t<0?this.argv:this.argv.slice(0,t);if(o.some(i=>["--help","-h","--json-schema"].includes(i))||Tt(process.env.SHOPIFY_FLAG_JSON_SCHEMA))return;let r=o.findIndex(i=>/^--path($|=)/.test(i)),n=r<0?process.env.SHOPIFY_HYDROGEN_FLAG_PATH:o[r]?.startsWith("--path=")?o[r].slice(7):o[r+1],s=n&&!n.startsWith("--")?b(Ke(),n):Ke();if(!Oo(s))throw new p("Looks like you're trying to run a Hydrogen command outside of a Hydrogen project.","Run `shopify hydrogen init` to create a new Hydrogen project or use the `--path` flag to specify an existing Hydrogen project.");ko({id:this.id,projectPath:s})}};l();var A=ye(ke(),1);l();l();l();import{fileURLToPath as Io}from"node:url";import{existsSync as Br}from"node:fs";l();import{exec as Jr}from"node:child_process";import{promisify as Wr}from"node:util";var D=Wr(Jr);function ns(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var st=new URL("../../..",import.meta.url).pathname,Se=(()=>{try{let e=g(O(st),"templates","skeleton");return Br(e)}catch{return!1}})(),ms=Se?st:void 0,zr="assets/hydrogen",Qr="starter",Z="routes",it;async function Kr(){if(it??=await Ut("package.json",{cwd:Io(import.meta.url),type:"file"}),!it)throw new p("Could not find assets directory","Please report this error.");return it}async function U(e,...t){return g(O(await Kr()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${zr}`,e??"",...t)}async function ve(e,t){t??=await at();let o=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return o.protocol==="file:"?Io(o):o.toString()}function at(e=!!process.env.SHOPIFY_UNIT_TEST){return e?De():U(Qr)}function De(){if(!Se)throw new p("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return g(O(st),"templates","skeleton")}function Xr(){return g(De(),"node_modules")}async function _o(){if(Se)return Xr();let{stdout:e}=await D("npm root");return e.trim()}var ct=["tailwind","vanilla-extract","css-modules","postcss"];async function To(e,t,o,r=(n,s)=>n){let n=await U(e);return Promise.all(Object.entries(t).map(async([s,i])=>{let a=await R(g(n,s));await C(g(o,i),r(a,s))}))}async function jo(e,t,o){let r=Object.values(e).map(s=>w(g(t,s)).then(i=>i?s:null)),n=(await Promise.all(r)).filter(Boolean);return!(n.length>0&&!o&&!await M({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}l();l();import{readdir as Zr}from"node:fs/promises";l();Ur();import*as Fo from"fs/promises";import*as No from"path";var lt={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function V(e=process.cwd()){let t=(await Fo.lstat(e)).isFile()?e:No.resolve(e,"prettier.file");try{return await mo(t)||lt}catch{return lt}}async function ee(e,t=lt,o=""){let r=Oe(o);return go(e,{parser:r===".tsx"||r===".ts"?"typescript":"babel",...t})}async function ue(e,t,o){let r=await o(await R(e));if(typeof r=="string")return t&&(r=await ee(r,t,e)),C(e,r)}var en=["tsx","ts","jsx","js","mjs","cjs"];async function T(e,t,o=en){let r=await Zr(e);if(r.includes(t)){let n=b(e,t);if(!await _e(n))return{filepath:n};for(let s of["ts","js"]){let i=b(e,`${t}/index.${s}`);if(await w(b(e,i)))return{filepath:i,extension:s,astType:s}}}else for(let n of o){let s=`${t}.${n}`;if(r.includes(s)){let i=n==="mjs"||n==="cjs"?"js":n;return{filepath:b(e,s),extension:n,astType:i}}}return{}}var Lo=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Ue(e,t,o){let r=await Ze(g(t,"package.json")),n=await Ze(g(e,"package.json")),s=new Set(["comment",...o?.ignoredKeys??[]]),i=Object.keys(n).filter(c=>!Lo.includes(c));for(let c of i){if(s.has(c))continue;let u=n[c],f=r[c],m=Array.isArray(u)&&Array.isArray(f)?[...f,...u]:typeof u=="object"&&typeof f=="object"?{...f,...u}:u;r[c]=m}let a=Object.entries(r.dependencies||{}).find(([c])=>c.startsWith("@remix-run/"))?.[1];for(let c of Lo)s.has(c)||n[c]&&(r[c]=[...new Set([...Object.keys(r[c]??{}),...Object.keys(n[c]??{})])].sort().reduce((u,f)=>{let m=n[c]?.[f]??r[c]?.[f];return f.startsWith("@remix-run/")&&a&&(m=a),u[f]=m,u},{}));await to(t,o?.onResult?.(r)??r)}l();l();async function be(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function Do(e,t,o){let{filepath:r,astType:n}=await T(e,"root");if(!r||!n)throw new p(`Could not find root file in ${e}`);await ue(r,t,async s=>{let i=`import ${o.isDefault?o.name:`{${o.name}}`} from '${(o.isAbsolute?"":"./")+o.path}';`;if(s.includes(i.split("from")[0]))return;let c=(await be(n)).parse(s).root(),u=c.findAll({rule:{kind:"import_statement"}}).reverse(),f=u.find(v=>v.text().includes(".css"))||u.shift(),m=c.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!f||!m)throw new p('Could not find a "links" export in root file. Please add one and try again.');let d=f.text(),h=m.text(),x=o.isConditional?`{${o.name} && <link rel="stylesheet" href={${o.name}}></link>}`:`<link rel="stylesheet" href={${o.name}}></link>`;return s.replace(d,d+`
1
+ import{a as uo,e as fo,f as po}from"./chunk-PTSCGSQV.js";import{a as ho}from"./chunk-6ES4KRFW.js";import{c as mo,i as go,o as Ur}from"./chunk-YLQ3LNNY.js";import{b as et}from"./chunk-ZJOX5HW4.js";import{Da as oo,M as Yt,O as Jt,R as Wt,ha as Bt,l as qt,la as zt,u as je}from"./chunk-GQLNG537.js";import{B as eo,D as to,l as Kt,m as Xt,p as Zt,x as Ze}from"./chunk-QQJNQNKP.js";import{b as lo,c as ce}from"./chunk-3KM5ZOW2.js";import{A as ie,B as Y,D as no,E as G,F as M,I as io,K as se,N as so,z as q}from"./chunk-D2KIGKBI.js";import{a as Mt,c as Vt}from"./chunk-LEHBZKK3.js";import{o as Ht}from"./chunk-335BUVBP.js";import{a as re}from"./chunk-BN7ZXAZJ.js";import{h as p,k as Fe}from"./chunk-M5VIFG2V.js";import{Ba as Xe,Bb as I,Da as _e,Sa as w,T as jt,Va as Dt,W as Ft,Y as Nt,_ as Lt,_a as Ut,ib as Qt,la as R,nb as ro,oa as ne,qb as J,rb as ao,sb as ae,ta as C,va as $e,wb as co,xa as Ie,yb as F}from"./chunk-JLQRDFR5.js";import{i as E}from"./chunk-B4OMIONW.js";import{b as S,h as Gt,j as Te}from"./chunk-FZCGRIOM.js";import{b as ke}from"./chunk-YTUUU33R.js";import{a as Tt}from"./chunk-JD5P5RAJ.js";import{c as g,e as b,f as Q,h as O,i as K,j as Oe,m as Qe,p as Ke}from"./chunk-IWTNUJGY.js";import{b as Dr}from"./chunk-JFBCE4HN.js";import{e as ye,g as l}from"./chunk-VKWPEFWQ.js";l();import{createRequire as Hr}from"node:module";import{pathToFileURL as yo}from"node:url";var wo=Hr(import.meta.url);async function So(e){let t;try{t=wo.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(s){throw s instanceof Error&&s.code==="MODULE_NOT_FOUND"?new p("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):s}let o=await eo(t),r=o.content.exports?.["."];typeof r!="string"&&(r=r?.import),typeof r!="string"&&(r=r.default);let n=g(O(o.path),r);return import(yo(n).href)}function Gr(e,t){let o=wo.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(yo(o).href)}l();l();import{isAbsolute as Mr,resolve as Vr}from"node:path";var Pi=S.string().refine(Mr,"Expected an absolute native filesystem path").transform(e=>Vr(e)),vo=S.string().datetime({precision:0}),we=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefront\/\d+$/).describe("A Shopify HydrogenStorefront GID."),Ei=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontEnvironment\/\d+$/).describe("A Shopify HydrogenStorefrontEnvironment GID."),bo=S.string().regex(/^gid:\/\/shopify\/HydrogenStorefrontDeployment\/\d+$/).describe("A Shopify HydrogenStorefrontDeployment GID."),xo=S.enum(["success","partial","skipped","cancelled"]),tt=S.string().regex(/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/).nullable();function Po(e){return new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z")}function Ne(e){let t=e?.toLowerCase();return t&&/^[a-z0-9][a-z0-9-]*\.myshopify\.com$/.test(t)?t:null}l();import{format as qr}from"node:util";async function Eo(e){if(!X())return e();let t={log:console.log,info:console.info,debug:console.debug},o={...t};for(let r of["log","info","debug"])o[r]=(...n)=>{X()?Mt(["--json"],()=>F(qr(...n))):t[r](...n)},console[r]=o[r];try{return await e()}finally{for(let r of["log","info","debug"])console[r]===o[r]&&(console[r]=t[r])}}function X(){return Te()==="json"||Ht()}function Le(e,t,o=X()){return o?(co(e.encode(t)),!0):!1}l();var Co=S.object({gid:bo,createdAt:vo,commitMessage:S.string().nullable()}).strict(),ot=S.object({gid:we,name:S.string(),productionUrl:S.string().url().nullable()}).strict().describe("All projected fields are present; unavailable productionUrl is null."),Ro=ot.extend({currentProductionDeployment:Co.nullable()}).strict();function rt(e){return{gid:e.id,name:e.title,productionUrl:e.productionUrl||null}}function Ni({shop:e,storefronts:t}){return{storeDomain:Ne(e),storefronts:t.map(o=>({...rt(o),currentProductionDeployment:o.currentProductionDeployment?{gid:o.currentProductionDeployment.id,createdAt:Po(o.currentProductionDeployment.createdAt),commitMessage:o.currentProductionDeployment.commitMessage??null}:null}))}}var Li=re({name:"HydrogenListResult",schema:S.object({storeDomain:tt,storefronts:S.array(Ro)}).strict().describe("The complete list of Hydrogen storefronts for the store."),definitions:{Storefront:Ro,Deployment:Co}}),nt=re({name:"HydrogenLinkResult",schema:S.object({status:xo,changed:S.boolean(),storeDomain:tt,storefront:ot.nullable()}).strict(),definitions:{Storefront:ot}}),Di=re({name:"HydrogenUnlinkResult",schema:S.object({status:S.literal("success"),changed:S.boolean(),storefront:S.object({gid:we,name:S.string()}).strict().nullable()}).strict()});var We=ye(ke(),1);l();var $o=ye(ke(),1);l();import{createRequire as Ao}from"node:module";function ko({id:e,projectPath:t}){if(!(!e||!Yr(t,e)))throw new p(`\`shopify ${e.replace(/:/g," ")}\` is not supported by this version of Hydrogen`,"The installed version of @shopify/hydrogen disables this command.",["Use your framework or package tooling instead."])}function Yr(e,t){try{let n=Ao(g(e,"package.json"))("@shopify/hydrogen/package.json")?.shopify?.cli?.disabledCommands;return Array.isArray(n)&&n.includes(t)}catch{return!1}}function Oo(e){try{let o=Ao(import.meta.url)(g(e,"package.json"));return[o?.dependencies,o?.devDependencies,o?.peerDependencies].some(r=>!!r?.["@shopify/hydrogen"])}catch{return!1}}var le=class extends et{static baseFlags={...et.baseFlags,...lo};async _run(){let t=()=>Eo(()=>super._run()),{flags:o}=await $o.Parser.parse([],{flags:ce});return o.json&&(process.env.SHOPIFY_FLAG_JSON="true"),o.json&&Te()!=="json"?Gt({outputMode:"json",sink:Vt},t):t()}async init(){if(await super.init(),!this.id?.startsWith("hydrogen:")||this.id==="hydrogen:init")return;let t=this.argv.indexOf("--"),o=t<0?this.argv:this.argv.slice(0,t);if(o.some(i=>["--help","-h","--json-schema"].includes(i))||Tt(process.env.SHOPIFY_FLAG_JSON_SCHEMA))return;let r=o.findIndex(i=>/^--path($|=)/.test(i)),n=r<0?process.env.SHOPIFY_HYDROGEN_FLAG_PATH:o[r]?.startsWith("--path=")?o[r].slice(7):o[r+1],s=n&&!n.startsWith("--")?b(Ke(),n):Ke();if(!Oo(s))throw new p("Looks like you're trying to run a Hydrogen command outside of a Hydrogen project.","Run `shopify hydrogen init` to create a new Hydrogen project or use the `--path` flag to specify an existing Hydrogen project.");ko({id:this.id,projectPath:s})}};l();var A=ye(ke(),1);l();l();l();import{fileURLToPath as Io}from"node:url";import{existsSync as Br}from"node:fs";l();import{exec as Jr}from"node:child_process";import{promisify as Wr}from"node:util";var D=Wr(Jr);function ns(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var st=new URL("../../..",import.meta.url).pathname,Se=(()=>{try{let e=g(O(st),"templates","skeleton");return Br(e)}catch{return!1}})(),ms=Se?st:void 0,zr="assets/hydrogen",Qr="starter",Z="routes",it;async function Kr(){if(it??=await Ut("package.json",{cwd:Io(import.meta.url),type:"file"}),!it)throw new p("Could not find assets directory","Please report this error.");return it}async function U(e,...t){return g(O(await Kr()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${zr}`,e??"",...t)}async function ve(e,t){t??=await at();let o=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return o.protocol==="file:"?Io(o):o.toString()}function at(e=!!process.env.SHOPIFY_UNIT_TEST){return e?De():U(Qr)}function De(){if(!Se)throw new p("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return g(O(st),"templates","skeleton")}function Xr(){return g(De(),"node_modules")}async function _o(){if(Se)return Xr();let{stdout:e}=await D("npm root");return e.trim()}var ct=["tailwind","vanilla-extract","css-modules","postcss"];async function To(e,t,o,r=(n,s)=>n){let n=await U(e);return Promise.all(Object.entries(t).map(async([s,i])=>{let a=await R(g(n,s));await C(g(o,i),r(a,s))}))}async function jo(e,t,o){let r=Object.values(e).map(s=>w(g(t,s)).then(i=>i?s:null)),n=(await Promise.all(r)).filter(Boolean);return!(n.length>0&&!o&&!await M({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}l();l();import{readdir as Zr}from"node:fs/promises";l();Ur();import*as Fo from"fs/promises";import*as No from"path";var lt={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function V(e=process.cwd()){let t=(await Fo.lstat(e)).isFile()?e:No.resolve(e,"prettier.file");try{return await mo(t)||lt}catch{return lt}}async function ee(e,t=lt,o=""){let r=Oe(o);return go(e,{parser:r===".tsx"||r===".ts"?"typescript":"babel",...t})}async function ue(e,t,o){let r=await o(await R(e));if(typeof r=="string")return t&&(r=await ee(r,t,e)),C(e,r)}var en=["tsx","ts","jsx","js","mjs","cjs"];async function T(e,t,o=en){let r=await Zr(e);if(r.includes(t)){let n=b(e,t);if(!await _e(n))return{filepath:n};for(let s of["ts","js"]){let i=b(e,`${t}/index.${s}`);if(await w(b(e,i)))return{filepath:i,extension:s,astType:s}}}else for(let n of o){let s=`${t}.${n}`;if(r.includes(s)){let i=n==="mjs"||n==="cjs"?"js":n;return{filepath:b(e,s),extension:n,astType:i}}}return{}}var Lo=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Ue(e,t,o){let r=await Ze(g(t,"package.json")),n=await Ze(g(e,"package.json")),s=new Set(["comment",...o?.ignoredKeys??[]]),i=Object.keys(n).filter(c=>!Lo.includes(c));for(let c of i){if(s.has(c))continue;let u=n[c],f=r[c],m=Array.isArray(u)&&Array.isArray(f)?[...f,...u]:typeof u=="object"&&typeof f=="object"?{...f,...u}:u;r[c]=m}let a=Object.entries(r.dependencies||{}).find(([c])=>c.startsWith("@remix-run/"))?.[1];for(let c of Lo)s.has(c)||n[c]&&(r[c]=[...new Set([...Object.keys(r[c]??{}),...Object.keys(n[c]??{})])].sort().reduce((u,f)=>{let m=n[c]?.[f]??r[c]?.[f];return f.startsWith("@remix-run/")&&a&&(m=a),u[f]=m,u},{}));await to(t,o?.onResult?.(r)??r)}l();l();async function be(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function Do(e,t,o){let{filepath:r,astType:n}=await T(e,"root");if(!r||!n)throw new p(`Could not find root file in ${e}`);await ue(r,t,async s=>{let i=`import ${o.isDefault?o.name:`{${o.name}}`} from '${(o.isAbsolute?"":"./")+o.path}';`;if(s.includes(i.split("from")[0]))return;let c=(await be(n)).parse(s).root(),u=c.findAll({rule:{kind:"import_statement"}}).reverse(),f=u.find(v=>v.text().includes(".css"))||u.shift(),m=c.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!f||!m)throw new p('Could not find a "links" export in root file. Please add one and try again.');let d=f.text(),h=m.text(),x=o.isConditional?`{${o.name} && <link rel="stylesheet" href={${o.name}}></link>}`:`<link rel="stylesheet" href={${o.name}}></link>`;return s.replace(d,d+`
2
2
  `+i).replace(h,x+`
3
3
  `+h)})}async function He(e,t,o,r){let{filepath:n,astType:s}=await T(e,"vite.config");if(!n||!s)throw new p(`Could not find vite.config file in ${e}`);await ue(n,t,async i=>{let a=`import ${o.isDefault?o.name:`{${o.name}}`} from '${o.path}';`;if(new RegExp(`['"]${o.path.replace("/","\\/")}['"]`).test(i))return;let u=(await be(s)).parse(i).root(),f=u.findAll({rule:{kind:"import_statement"}}).pop(),m=u.find(tn);if(!f||!m)throw new p('Could not find a "plugins" key in Vite config file. Please add one and try again.');let d=f.text(),h=m.text(),x=`${o.name}(${r?JSON.stringify(r):""})`;return i.replace(d,d+`
4
4
  `+a).replace(h,h.replace("[",`[${x},`))})}var tn={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Uo="styles/tailwind.css";async function Ho({rootDirectory:e,appDirectory:t},o=!1){let r=Q(e,t),n={"tailwind.css":g(r,Uo)};if(!await jo(n,e,o)){F("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Ue(await U("tailwind"),e),To("tailwind",n,e),V(e).then(i=>Promise.all([Do(t,i,{name:"tailwindCss",path:`${Uo}?url`,isDefault:!0}),He(e,i,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}l();async function Go({rootDirectory:e}){return{workPromise:Promise.all([Ue(await U("vanilla-extract"),e),V(e).then(o=>He(e,o,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var ut=[...ct,"none"],ft={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},ia={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Mo(e,t,o){switch(e){case"tailwind":return Ho(t,o);case"vanilla-extract":return Go(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function Vo(e){let t=Object.entries({...ft,...e?.extraChoices});return G({message:"Select a styling library",...e,choices:t.map(([o,r])=>({value:o,label:r})),defaultValue:"tailwind"})}l();l();l();l();async function te(e,t,o=!0){let{transpileTs:r}=await import("./morph-CRY35DIK.js");return r(e,t,o)}l();var qo={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},on=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(qo)]);function rn(e,t=!1){let o={compilerOptions:{...qo}};if(e.include&&(o.include=e.include.filter(r=>t||!r.endsWith(".d.ts")).map(r=>r.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let r of on)e.compilerOptions[r]!==void 0&&(o.compilerOptions[r]=e.compilerOptions[r]);return o}async function pt(e,t=!0){let o=g(e,"app/routes.ts");if(await w(o)){let i=(await R(o)).replace("./layout.tsx","./layout.jsx");await C(o,i)}let r=await Dt("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await V();for(let s of r){if(s.endsWith(".d.ts")){t||await Ie(s);continue}let i=await R(s),a=await ee(await te(i,s,t),n);await Ie(s),await C(s.replace(/\.ts(x?)$/,".js$1"),a)}try{let s=g(e,"remix.config.js"),i=await R(s);i=i.replace(/\/server\.ts/gim,"/server.js"),await C(s,i)}catch(s){I(`Could not change TS extensions in remix.config.js:
@@ -1 +1 @@
1
- import{j as l,oa as d,ta as z,ua as y}from"./chunk-WFOU5M4H.js";import{b as n}from"./chunk-OLKLHVHA.js";import{b as g,c as f,d as h}from"./chunk-5AWELO3D.js";import{H as c}from"./chunk-V654BMS7.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{wb as p}from"./chunk-RIG66DIQ.js";import{b as o}from"./chunk-FZCGRIOM.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static description=this.descriptionForHelp();static flags={...g,...f};static get jsonOutputSchema(){return r}async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};
1
+ import{j as l,sa as d,xa as z,ya as y}from"./chunk-33ZE3DRQ.js";import{b as n}from"./chunk-ZJOX5HW4.js";import{b as g,c as f,d as h}from"./chunk-3KM5ZOW2.js";import{H as c}from"./chunk-D2KIGKBI.js";import{a as u}from"./chunk-BN7ZXAZJ.js";import{wb as p}from"./chunk-JLQRDFR5.js";import{b as o}from"./chunk-FZCGRIOM.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var L=o.object({id:o.string(),gid:o.string(),name:o.string(),status:o.enum(l),shopCount:o.number().nullable(),url:o.string()}).strict(),r=u({name:"OrganizationListResult",schema:o.object({organizations:o.array(L)}).strict(),definitions:{OrganizationListEntry:L}});function e(s,t){if(t==="json"){p(r.encode(s));return}c({rows:s.organizations.map(a=>({id:a.id,name:a.name})),columns:{id:{header:"ID"},name:{header:"NAME"}}})}i();async function O(){return{organizations:(await y()).map(t=>({id:t.id,gid:d(t.id),name:t.businessName,status:t.status,shopCount:t.shopCount,url:t.url}))}}var m=class s extends n{static baseFlags={...n.baseFlags,...h};static summary="List Shopify organizations you have access to.";static descriptionWithMarkdown="Lists the Shopify organizations that you have access to, along with their organization IDs.";static description=this.descriptionForHelp();static flags={...g,...f};static get jsonOutputSchema(){return r}async run(){let{flags:t}=await this.parse(s);try{let a=await O();e(a,t.json?"json":"text")}catch(a){if(t.json&&a instanceof z){e({organizations:[]},"json");return}throw a}}};export{m as a};