shopify 4.9.5 → 5.0.1

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 (501) hide show
  1. package/dist/analytics-RSUIYNLC.js +1 -0
  2. package/dist/analytics-V2SDYXQJ.js +1 -0
  3. package/dist/assets/hydrogen/starter/CHANGELOG.md +7 -0
  4. package/dist/assets/hydrogen/starter/package.json +2 -2
  5. package/dist/assets/hydrogen/vite/package.json +3 -4
  6. package/dist/assets/hydrogen/vite/vite.config.js +3 -3
  7. package/dist/bootstrap.js +1 -1
  8. package/dist/chunk-2AW3KBTP.js +1 -0
  9. package/dist/{chunk-S6A7TMR4.js → chunk-2CJQQQW4.js} +1 -1
  10. package/dist/{chunk-7LB6DPB6.js → chunk-2M4BKFYF.js} +1 -1
  11. package/dist/chunk-2M535QQJ.js +6 -0
  12. package/dist/chunk-2NZ7GDDR.js +2 -0
  13. package/dist/{chunk-QUO4RD3W.js → chunk-2QQ7EBJD.js} +1 -1
  14. package/dist/chunk-2RFCYZMG.js +47 -0
  15. package/dist/chunk-2S5NPJEJ.js +5 -0
  16. package/dist/chunk-2TPLPZA2.js +3 -0
  17. package/dist/{chunk-ANG44FIF.js → chunk-2YGPWG3I.js} +1 -1
  18. package/dist/chunk-32O27NE3.js +1 -0
  19. package/dist/chunk-335BUVBP.js +1 -0
  20. package/dist/{chunk-MZL6VM3W.js → chunk-364BVGRY.js} +1 -1
  21. package/dist/{chunk-4VS7YD53.js → chunk-36TZ447N.js} +1 -1
  22. package/dist/chunk-37P5YOP2.js +7 -0
  23. package/dist/chunk-3G2PEYPI.js +2 -0
  24. package/dist/{chunk-2II4W4ZF.js → chunk-3JACWBUC.js} +1 -1
  25. package/dist/chunk-43HKFLOU.js +3 -0
  26. package/dist/chunk-46JYM3GH.js +1 -0
  27. package/dist/chunk-4EDE3UH7.js +18 -0
  28. package/dist/{chunk-ND6O6KT6.js → chunk-4GQEXVDT.js} +1 -1
  29. package/dist/{chunk-5XTJ4OL4.js → chunk-4IUXLUFD.js} +1 -1
  30. package/dist/chunk-4QZ6OBXL.js +4 -0
  31. package/dist/{chunk-XVFQ6CNO.js → chunk-4SDCXKYR.js} +9 -6
  32. package/dist/chunk-56GKTWFF.js +5 -0
  33. package/dist/chunk-5AQ5JT2V.js +7 -0
  34. package/dist/{chunk-SUTVPAJF.js → chunk-5AWELO3D.js} +1 -1
  35. package/dist/{chunk-LD6ZCTZ3.js → chunk-5B76DT7X.js} +1 -1
  36. package/dist/chunk-5D4FNAAD.js +3 -0
  37. package/dist/chunk-5TWYJQQO.js +1 -0
  38. package/dist/{chunk-3XAD2E55.js → chunk-5XOEMYEQ.js} +1 -1
  39. package/dist/chunk-5YUDEPEY.js +1 -0
  40. package/dist/chunk-5YXYYQBX.js +1 -0
  41. package/dist/chunk-63UKZLPC.js +1 -0
  42. package/dist/chunk-6JZC6UKY.js +20 -0
  43. package/dist/chunk-6PUU6ZNQ.js +1 -0
  44. package/dist/chunk-6Y6A2QGK.js +3 -0
  45. package/dist/chunk-75LAVRRL.js +274 -0
  46. package/dist/chunk-7AWAOPLA.js +1 -0
  47. package/dist/chunk-7GHSE7SG.js +1 -0
  48. package/dist/{chunk-CEQ5S3HH.js → chunk-7NYCJG2U.js} +1 -1
  49. package/dist/chunk-7U2MTK6I.js +1 -0
  50. package/dist/{chunk-NHE46R6C.js → chunk-7XAEI4XT.js} +1 -1
  51. package/dist/chunk-7Y7AZRL3.js +10 -0
  52. package/dist/chunk-A7LBGXWG.js +1 -0
  53. package/dist/{chunk-SEXH4EP5.js → chunk-ACA2BGAD.js} +1 -1
  54. package/dist/chunk-ADVLRSSO.js +1 -0
  55. package/dist/chunk-AIEVQSI3.js +1 -0
  56. package/dist/chunk-AOBE6HN6.js +31 -0
  57. package/dist/chunk-AQ34X5B3.js +2 -0
  58. package/dist/chunk-B2VE7WOX.js +1 -0
  59. package/dist/chunk-B4ISKIXN.js +5 -0
  60. package/dist/chunk-BAHIL37I.js +1 -0
  61. package/dist/chunk-BB7GAZP6.js +1 -0
  62. package/dist/{chunk-AJMJQA4J.js → chunk-BN7ZXAZJ.js} +1 -1
  63. package/dist/chunk-BNTOGZLY.js +1 -0
  64. package/dist/chunk-BU3JQM3W.js +1 -0
  65. package/dist/chunk-C3LL5CZA.js +1 -0
  66. package/dist/{chunk-PIGERIRY.js → chunk-C4EKNOLY.js} +1 -1
  67. package/dist/{chunk-YN4FSUFF.js → chunk-CFUZ6574.js} +1 -1
  68. package/dist/{chunk-7DSH4CRU.js → chunk-CKVVJ4XO.js} +1 -1
  69. package/dist/chunk-CNPBDSDL.js +1 -0
  70. package/dist/{chunk-BAHM64B4.js → chunk-CWR3IFXD.js} +1 -1
  71. package/dist/{chunk-T3UCIWRH.js → chunk-CX3ANDPI.js} +1 -1
  72. package/dist/chunk-CXPYOLGM.js +4 -0
  73. package/dist/{chunk-MTBABHUB.js → chunk-D4LFWIFE.js} +1 -1
  74. package/dist/chunk-DM7BTMFP.js +2 -0
  75. package/dist/{chunk-WGO2GC6I.js → chunk-DSKAIC7O.js} +1 -1
  76. package/dist/{chunk-WKVFVT3H.js → chunk-DTRENW4Q.js} +1 -1
  77. package/dist/{chunk-G362JEAV.js → chunk-DVW7NDVD.js} +1 -1
  78. package/dist/chunk-E3CTHNQS.js +1 -0
  79. package/dist/chunk-EA5XVQJT.js +1 -0
  80. package/dist/{chunk-K6FH5JSY.js → chunk-EH22T4FI.js} +2 -2
  81. package/dist/{chunk-5NCWBBRW.js → chunk-ETXBF6Q7.js} +1 -1
  82. package/dist/{chunk-5GFVMGAZ.js → chunk-EXTVC33U.js} +1 -1
  83. package/dist/chunk-F3OM2YO6.js +1 -0
  84. package/dist/{chunk-MWWULCLD.js → chunk-FHNJLON5.js} +1 -1
  85. package/dist/chunk-FK5OFLSJ.js +1 -0
  86. package/dist/chunk-FNWXMCSD.js +97 -0
  87. package/dist/chunk-FPOZMNT2.js +2 -0
  88. package/dist/chunk-FS5PZCZ3.js +1 -0
  89. package/dist/chunk-FTHVOIK7.js +4 -0
  90. package/dist/chunk-FVRI7ZKE.js +103 -0
  91. package/dist/chunk-FZCGRIOM.js +1 -0
  92. package/dist/chunk-GCKGQFV7.js +1 -0
  93. package/dist/chunk-GGJUPL4W.js +6 -0
  94. package/dist/{chunk-RW3P3UMU.js → chunk-GHU6YEXH.js} +2 -2
  95. package/dist/chunk-GNPIKPHB.js +1 -0
  96. package/dist/{chunk-PT3OZEBI.js → chunk-GSGCSBRN.js} +1 -1
  97. package/dist/chunk-H57KYDEI.js +16 -0
  98. package/dist/chunk-HF4NDEX3.js +1 -0
  99. package/dist/chunk-HNU6R7RT.js +7 -0
  100. package/dist/{chunk-65GNYRYR.js → chunk-HP2ZAAY7.js} +2 -2
  101. package/dist/chunk-HPT3UXZ5.js +4 -0
  102. package/dist/chunk-HT66BOEC.js +8 -0
  103. package/dist/chunk-HXNGLDMU.js +1 -0
  104. package/dist/chunk-IAL6IQYW.js +16 -0
  105. package/dist/{chunk-PIZDYS7T.js → chunk-IILLQOUC.js} +60 -60
  106. package/dist/chunk-IULZYDCI.js +9 -0
  107. package/dist/chunk-IWTNUJGY.js +2 -0
  108. package/dist/chunk-IWTOC6DG.js +1 -0
  109. package/dist/chunk-IY5EI5V2.js +1 -0
  110. package/dist/{chunk-AODTY2BL.js → chunk-J3UXIC23.js} +4 -4
  111. package/dist/{chunk-EZG5EB7D.js → chunk-J5DUFSR4.js} +1 -1
  112. package/dist/chunk-J7BTC45S.js +1 -0
  113. package/dist/chunk-JMVK2BIB.js +3 -0
  114. package/dist/chunk-JUTULEWW.js +5 -0
  115. package/dist/{chunk-DO5YFMTJ.js → chunk-K3YALQBQ.js} +1 -1
  116. package/dist/{chunk-XPDHT3Z4.js → chunk-KGASGUDQ.js} +1 -1
  117. package/dist/{chunk-JPFHPVIO.js → chunk-KLYGMYXV.js} +1 -1
  118. package/dist/chunk-KNQXCU3Y.js +6 -0
  119. package/dist/{chunk-4BXQTW5G.js → chunk-KOTZSPZA.js} +1 -1
  120. package/dist/chunk-KT5QQOES.js +3 -0
  121. package/dist/chunk-KVF55INC.js +5 -0
  122. package/dist/chunk-L6VONMA2.js +5 -0
  123. package/dist/chunk-LENSEW2F.js +2 -0
  124. package/dist/{chunk-35NTERVR.js → chunk-LGXNXAQA.js} +2 -2
  125. package/dist/{chunk-TQ7URMGS.js → chunk-LQ7ENG4V.js} +1 -1
  126. package/dist/chunk-LR4J4KYJ.js +5 -0
  127. package/dist/chunk-LWMKZJ4M.js +1 -0
  128. package/dist/chunk-M2KX3PXA.js +1 -0
  129. package/dist/{chunk-VSFZEGIK.js → chunk-M73IECPW.js} +1 -1
  130. package/dist/{chunk-Z4DESIR5.js → chunk-M7NLCGCP.js} +1 -1
  131. package/dist/chunk-MHWETFNT.js +1 -0
  132. package/dist/chunk-MMUGP3WP.js +7 -0
  133. package/dist/{chunk-VG5ZDVDQ.js → chunk-MNWT2SQO.js} +86 -200
  134. package/dist/chunk-MS7DTL4U.js +213 -0
  135. package/dist/chunk-MU2X7NGF.js +11 -0
  136. package/dist/chunk-MXXMIPUN.js +8 -0
  137. package/dist/{chunk-XTOOTN4P.js → chunk-MZCIRMZJ.js} +1 -1
  138. package/dist/{chunk-LLNUIGHP.js → chunk-MZWPIFAM.js} +4 -4
  139. package/dist/{chunk-HB4YI2PF.js → chunk-NCPZVARH.js} +118 -118
  140. package/dist/{chunk-LCMDVUVO.js → chunk-NJVNGEOU.js} +30 -30
  141. package/dist/chunk-NMECLRGK.js +11 -0
  142. package/dist/{chunk-VNG2I7NM.js → chunk-NMLLRFZF.js} +1 -1
  143. package/dist/chunk-NPB753M3.js +1 -0
  144. package/dist/chunk-NUCDRKDW.js +5 -0
  145. package/dist/chunk-OH7BQZQ7.js +2 -0
  146. package/dist/chunk-OLKLHVHA.js +22 -0
  147. package/dist/chunk-OPVXPDOQ.js +1 -0
  148. package/dist/chunk-OQUXGAF2.js +1 -0
  149. package/dist/chunk-OUMERKRE.js +10 -0
  150. package/dist/{chunk-PFXDXD5O.js → chunk-OYGIQDME.js} +1 -1
  151. package/dist/{chunk-4IAGBAQD.js → chunk-P5W5RVE6.js} +1 -1
  152. package/dist/chunk-PNZURX3S.js +1 -0
  153. package/dist/chunk-PRKJVU4Y.js +1 -0
  154. package/dist/{chunk-2VGPNRHH.js → chunk-PVASYKSJ.js} +2 -2
  155. package/dist/chunk-PXFPVGWV.js +1 -0
  156. package/dist/chunk-Q2ORJEB2.js +25 -0
  157. package/dist/chunk-QBE6XVU3.js +1 -0
  158. package/dist/chunk-QFWWCZOI.js +1 -0
  159. package/dist/{chunk-TR4OWSEX.js → chunk-QFYLJVJW.js} +1 -1
  160. package/dist/{chunk-Y5VFOLNQ.js → chunk-QGWC23HQ.js} +1 -1
  161. package/dist/chunk-QVVQUJQL.js +2 -0
  162. package/dist/{chunk-762IKULK.js → chunk-QX3T6G5X.js} +1 -1
  163. package/dist/chunk-QYFU363G.js +17 -0
  164. package/dist/chunk-RDXLDCMI.js +3 -0
  165. package/dist/chunk-REDUS6EW.js +1 -0
  166. package/dist/{chunk-KOS53Z7E.js → chunk-RFZNFTVM.js} +1 -1
  167. package/dist/chunk-RIG66DIQ.js +18 -0
  168. package/dist/chunk-RNUEPPVN.js +1 -0
  169. package/dist/chunk-RWTAPWLJ.js +3 -0
  170. package/dist/chunk-T5YVYVSW.js +1 -0
  171. package/dist/{chunk-VTOPYXHO.js → chunk-TTBNFGCW.js} +2 -2
  172. package/dist/chunk-UDPYSL3M.js +4 -0
  173. package/dist/{chunk-EAVD3OH2.js → chunk-ULMNNGGX.js} +1 -1
  174. package/dist/chunk-URCH4ITT.js +1 -0
  175. package/dist/chunk-UU2R56LN.js +12 -0
  176. package/dist/{chunk-YIZAQABE.js → chunk-V2FCZC7U.js} +1 -1
  177. package/dist/chunk-V654BMS7.js +376 -0
  178. package/dist/{chunk-5BGUKF7L.js → chunk-V75WUEFU.js} +1 -1
  179. package/dist/{chunk-5O7JTVO2.js → chunk-V7H7ITCF.js} +1 -1
  180. package/dist/{chunk-EO422KZZ.js → chunk-VG2AESTZ.js} +1 -1
  181. package/dist/chunk-VXD26GIG.js +1 -0
  182. package/dist/chunk-VXL5FBE7.js +3 -0
  183. package/dist/{chunk-RUDHGUIM.js → chunk-W7S6SYBM.js} +1 -1
  184. package/dist/chunk-WAY723TL.js +16 -0
  185. package/dist/{chunk-4TF7ER72.js → chunk-WBJ6ZHYH.js} +1 -1
  186. package/dist/chunk-WFOU5M4H.js +16 -0
  187. package/dist/chunk-WGOSE3RL.js +4 -0
  188. package/dist/chunk-WQ6W725N.js +1 -0
  189. package/dist/{chunk-7BWSN3SG.js → chunk-WQOPLNDH.js} +1 -1
  190. package/dist/chunk-X4A5D3PZ.js +8 -0
  191. package/dist/chunk-X7DCL5LT.js +1 -0
  192. package/dist/{chunk-HY6EXJBZ.js → chunk-XDXHSGDL.js} +1 -1
  193. package/dist/chunk-XKKKMV46.js +6 -0
  194. package/dist/chunk-XRVJJG6W.js +26 -0
  195. package/dist/chunk-XV6XCOTG.js +319 -0
  196. package/dist/chunk-XYFYQWKW.js +1 -0
  197. package/dist/{chunk-BD2L6YE5.js → chunk-XZLM4HLO.js} +1 -1
  198. package/dist/{chunk-YLCYRG2T.js → chunk-YCUEDZDA.js} +1 -1
  199. package/dist/{chunk-MF7IHOM5.js → chunk-YFRI75U4.js} +1 -1
  200. package/dist/chunk-YQ63ZFYT.js +1 -0
  201. package/dist/{chunk-I3J63RFV.js → chunk-YTUUU33R.js} +1 -1
  202. package/dist/chunk-YXIFSIRX.js +1 -0
  203. package/dist/{chunk-QBIYAMSH.js → chunk-ZBVHPC6W.js} +1 -1
  204. package/dist/chunk-ZDQO6CNY.js +1 -0
  205. package/dist/{chunk-LG6DGIFX.js → chunk-ZHHTQRWU.js} +1 -1
  206. package/dist/chunk-ZTZGDZCE.js +7 -0
  207. package/dist/{chunk-MQ4WV4B6.js → chunk-ZVEBXHEY.js} +1 -1
  208. package/dist/cli/commands/app/build.js +1 -1
  209. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  210. package/dist/cli/commands/app/bulk/execute.js +1 -1
  211. package/dist/cli/commands/app/bulk/status.js +1 -1
  212. package/dist/cli/commands/app/config/link.js +1 -1
  213. package/dist/cli/commands/app/config/pull.js +1 -1
  214. package/dist/cli/commands/app/config/use.js +1 -1
  215. package/dist/cli/commands/app/config/validate.js +1 -1
  216. package/dist/cli/commands/app/demo/watcher.js +1 -1
  217. package/dist/cli/commands/app/deploy.js +1 -1
  218. package/dist/cli/commands/app/dev/clean.js +1 -1
  219. package/dist/cli/commands/app/dev.js +1 -1
  220. package/dist/cli/commands/app/env/pull.js +1 -1
  221. package/dist/cli/commands/app/env/show.js +1 -1
  222. package/dist/cli/commands/app/execute.js +1 -1
  223. package/dist/cli/commands/app/function/build.js +1 -1
  224. package/dist/cli/commands/app/function/info.js +1 -1
  225. package/dist/cli/commands/app/function/replay.js +1 -1
  226. package/dist/cli/commands/app/function/run.js +1 -1
  227. package/dist/cli/commands/app/function/schema.js +1 -1
  228. package/dist/cli/commands/app/function/typegen.js +1 -1
  229. package/dist/cli/commands/app/generate/extension.js +1 -1
  230. package/dist/cli/commands/app/graphiql.js +1 -1
  231. package/dist/cli/commands/app/import/channel-config.js +1 -1
  232. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  233. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  234. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  235. package/dist/cli/commands/app/import-extensions.js +1 -1
  236. package/dist/cli/commands/app/info.js +1 -1
  237. package/dist/cli/commands/app/init.js +1 -1
  238. package/dist/cli/commands/app/logs.js +1 -1
  239. package/dist/cli/commands/app/release.js +1 -1
  240. package/dist/cli/commands/app/security/check.js +1 -1
  241. package/dist/cli/commands/app/security/clean.js +1 -1
  242. package/dist/cli/commands/app/security/instructions.js +1 -1
  243. package/dist/cli/commands/app/security/record.js +1 -1
  244. package/dist/cli/commands/app/security/review.js +1 -1
  245. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  246. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  247. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  248. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  249. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  250. package/dist/cli/commands/app/versions/list.js +1 -1
  251. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  252. package/dist/cli/commands/auth/login.js +1 -1
  253. package/dist/cli/commands/auth/logout.js +1 -1
  254. package/dist/cli/commands/cache/clear.js +1 -1
  255. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  256. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  257. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  258. package/dist/cli/commands/debug/command-flags.js +1 -1
  259. package/dist/cli/commands/doc/fetch.d.ts +34 -1
  260. package/dist/cli/commands/doc/fetch.js +1 -1
  261. package/dist/cli/commands/doc/search.d.ts +53 -1
  262. package/dist/cli/commands/doc/search.js +1 -1
  263. package/dist/cli/commands/docs/generate.js +1 -1
  264. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  265. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  266. package/dist/cli/commands/help.d.ts +6 -6
  267. package/dist/cli/commands/help.js +1 -1
  268. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  269. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  270. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  271. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  272. package/dist/cli/commands/notifications/generate.js +1 -1
  273. package/dist/cli/commands/notifications/list.js +1 -1
  274. package/dist/cli/commands/organization/list.js +1 -1
  275. package/dist/cli/commands/search.js +1 -1
  276. package/dist/cli/commands/send-analytics.js +1 -1
  277. package/dist/cli/commands/theme/check.js +1 -1
  278. package/dist/cli/commands/theme/console.js +1 -1
  279. package/dist/cli/commands/theme/delete.js +1 -1
  280. package/dist/cli/commands/theme/dev.js +1 -1
  281. package/dist/cli/commands/theme/duplicate.js +1 -1
  282. package/dist/cli/commands/theme/info.js +1 -1
  283. package/dist/cli/commands/theme/init.js +1 -1
  284. package/dist/cli/commands/theme/language-server.js +1 -1
  285. package/dist/cli/commands/theme/list.js +1 -1
  286. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  287. package/dist/cli/commands/theme/open.js +1 -1
  288. package/dist/cli/commands/theme/package.js +1 -1
  289. package/dist/cli/commands/theme/preview.js +1 -1
  290. package/dist/cli/commands/theme/profile.js +1 -1
  291. package/dist/cli/commands/theme/publish.js +1 -1
  292. package/dist/cli/commands/theme/pull.js +1 -1
  293. package/dist/cli/commands/theme/push.js +1 -1
  294. package/dist/cli/commands/theme/rename.js +1 -1
  295. package/dist/cli/commands/theme/share.js +1 -1
  296. package/dist/cli/commands/upgrade.d.ts +64 -0
  297. package/dist/cli/commands/upgrade.js +1 -1
  298. package/dist/cli/commands/version.js +1 -1
  299. package/dist/cli/help.js +1 -1
  300. package/dist/cli/services/commands/doc/fetch-result.d.ts +2 -0
  301. package/dist/cli/services/commands/doc/fetch-result.js +22 -0
  302. package/dist/cli/services/commands/doc/fetch.d.ts +2 -1
  303. package/dist/cli/services/commands/doc/fetch.js +2 -15
  304. package/dist/cli/services/commands/doc/search-result.d.ts +2 -0
  305. package/dist/cli/services/commands/doc/search-result.js +14 -0
  306. package/dist/cli/services/commands/doc/search.d.ts +9 -1
  307. package/dist/cli/services/commands/doc/search.js +27 -2
  308. package/dist/cli/services/commands/doc/types.d.ts +107 -0
  309. package/dist/cli/services/commands/doc/types.js +47 -0
  310. package/dist/cli/services/commands/help/types.d.ts +6 -6
  311. package/dist/command-event-context-LFUZ7UCA.js +1 -0
  312. package/dist/command-json-schema-6EGXCM4B.js +1 -0
  313. package/dist/command-registry.js +1 -1
  314. package/dist/conf-store-E7ELDWBA.js +1 -0
  315. package/dist/custom-oclif-loader-FKFZJPHF.js +1 -0
  316. package/dist/deprecations-RNGBHZYB.js +1 -0
  317. package/dist/dist-VHIZZDYK.js +1 -0
  318. package/dist/dist-WXI5YQYP.js +1 -0
  319. package/dist/{environment-RSUK27TA.js → environment-O7ECODHU.js} +1 -1
  320. package/dist/environments-WZJ6MRTH.js +1 -0
  321. package/dist/error-IFB626JA.js +1 -0
  322. package/dist/error-handler-OVJYVIOZ.js +1 -0
  323. package/dist/fs-7UOUHJDO.js +1 -0
  324. package/dist/hooks/did-you-mean.js +1 -1
  325. package/dist/hooks/hydrogen-init.js +1 -1
  326. package/dist/hooks/plugin-plugins.js +1 -1
  327. package/dist/hooks/postrun.js +1 -1
  328. package/dist/hooks/prerun.js +1 -1
  329. package/dist/hooks/public-metadata.js +1 -1
  330. package/dist/hooks/sensitive-metadata.js +1 -1
  331. package/dist/hooks/tunnel-provider.js +1 -1
  332. package/dist/hooks/tunnel-start.js +1 -1
  333. package/dist/index.js +13 -13
  334. package/dist/is-global-XW3CVHLK.js +1 -0
  335. package/dist/json-error-C2U7ZLCG.js +1 -0
  336. package/dist/{lib-TYM5B75S.js → lib-PJHT4MKY.js} +1 -1
  337. package/dist/{lib-55QUD4AJ.js → lib-VKSQ65BQ.js} +1 -1
  338. package/dist/{lib-PH52G55H.js → lib-YEZOHXF3.js} +1 -1
  339. package/dist/{local-ZZGRGYUP.js → local-KA3IWOZ6.js} +1 -1
  340. package/dist/{metadata-YQNVKC2R.js → metadata-6JI7HF5B.js} +1 -1
  341. package/dist/{morph-BABFBRSW.js → morph-CRY35DIK.js} +1 -1
  342. package/dist/node-package-manager-X3QIEMMX.js +1 -0
  343. package/dist/notifications-system-OXGLT2R4.js +1 -0
  344. package/dist/os-NORIEVMI.js +1 -0
  345. package/dist/out-B2GISN65.js +1 -0
  346. package/dist/output-K3JTLRJD.js +1 -0
  347. package/dist/{path-CPAYTWQW.js → path-3L2QRACZ.js} +1 -1
  348. package/dist/system-LTHR2T7L.js +1 -0
  349. package/dist/tsconfig.tsbuildinfo +1 -1
  350. package/dist/ui-MYUBVKCK.js +1 -0
  351. package/dist/upgrade-MFTWBXL3.js +1 -0
  352. package/dist/version-BNGPPAUU.js +1 -0
  353. package/dist/version-RCGFWSB4.js +1 -0
  354. package/dist/workerd-ISSXMKIH.js +18 -0
  355. package/oclif.manifest.json +1669 -429
  356. package/package.json +8 -8
  357. package/dist/analytics-PBZEKUGU.js +0 -1
  358. package/dist/analytics-WVGBNFGK.js +0 -1
  359. package/dist/chunk-2EC5SUGK.js +0 -19
  360. package/dist/chunk-2QENUJVG.js +0 -1
  361. package/dist/chunk-2RONPKOD.js +0 -1
  362. package/dist/chunk-2WDJXERZ.js +0 -25
  363. package/dist/chunk-32NWVYUC.js +0 -1
  364. package/dist/chunk-32RRWGNS.js +0 -1
  365. package/dist/chunk-32VQQ6EU.js +0 -1
  366. package/dist/chunk-34RFTE5T.js +0 -4
  367. package/dist/chunk-35VQQKVX.js +0 -1
  368. package/dist/chunk-3N6NKC2U.js +0 -1
  369. package/dist/chunk-3Q5BAPQK.js +0 -7
  370. package/dist/chunk-42DMJGOW.js +0 -2
  371. package/dist/chunk-4CTTWXUX.js +0 -32
  372. package/dist/chunk-4HBKQUKY.js +0 -1
  373. package/dist/chunk-4MQXMIWQ.js +0 -7
  374. package/dist/chunk-5APLAJCB.js +0 -3
  375. package/dist/chunk-5AQNISGC.js +0 -1
  376. package/dist/chunk-5OM72O4N.js +0 -1
  377. package/dist/chunk-5SLKHURV.js +0 -1
  378. package/dist/chunk-5VRB3FBD.js +0 -6
  379. package/dist/chunk-62GA7XR3.js +0 -18
  380. package/dist/chunk-62LMVFR7.js +0 -1
  381. package/dist/chunk-6IDEDOXW.js +0 -2
  382. package/dist/chunk-72CBJYAG.js +0 -16
  383. package/dist/chunk-7E4MJCVE.js +0 -10
  384. package/dist/chunk-7HZU7CYS.js +0 -1
  385. package/dist/chunk-7Q4EKY3E.js +0 -3
  386. package/dist/chunk-7YXHILW4.js +0 -383
  387. package/dist/chunk-7Z6IX7MU.js +0 -1
  388. package/dist/chunk-A4XREDFZ.js +0 -1
  389. package/dist/chunk-AHNLGCHF.js +0 -5
  390. package/dist/chunk-ARRRFY6S.js +0 -4
  391. package/dist/chunk-BAP2CHI2.js +0 -1
  392. package/dist/chunk-BQWK222Q.js +0 -1
  393. package/dist/chunk-C3PXIZY3.js +0 -8
  394. package/dist/chunk-C6HGU77I.js +0 -1
  395. package/dist/chunk-CBFAU5AF.js +0 -5
  396. package/dist/chunk-COP2Q2YT.js +0 -1
  397. package/dist/chunk-CSWDRG3E.js +0 -1
  398. package/dist/chunk-CVBWEUWX.js +0 -1
  399. package/dist/chunk-D3NVUE65.js +0 -1
  400. package/dist/chunk-DCKRQZLE.js +0 -20
  401. package/dist/chunk-DYH3ZXJS.js +0 -15
  402. package/dist/chunk-EBX6DYDX.js +0 -2
  403. package/dist/chunk-EDRCFY3K.js +0 -16
  404. package/dist/chunk-EEAY7HFW.js +0 -317
  405. package/dist/chunk-EJMLNBZA.js +0 -275
  406. package/dist/chunk-EO3S2TFI.js +0 -2
  407. package/dist/chunk-EOIGDOUD.js +0 -7
  408. package/dist/chunk-EYKXHMEJ.js +0 -6
  409. package/dist/chunk-FHV2H3Z2.js +0 -12
  410. package/dist/chunk-FOAV642V.js +0 -1
  411. package/dist/chunk-FVTP7EO4.js +0 -46
  412. package/dist/chunk-FYIC4JHB.js +0 -26
  413. package/dist/chunk-GF36WNMH.js +0 -5
  414. package/dist/chunk-GJ3QUZO6.js +0 -1
  415. package/dist/chunk-GJZVUEMP.js +0 -11
  416. package/dist/chunk-GP6O7YRO.js +0 -20
  417. package/dist/chunk-GW424AJO.js +0 -7
  418. package/dist/chunk-GXSF6NCR.js +0 -1
  419. package/dist/chunk-GYVQIRBD.js +0 -1
  420. package/dist/chunk-H3ZPYOQV.js +0 -1
  421. package/dist/chunk-H7YSZKZ2.js +0 -1
  422. package/dist/chunk-HILYTMVA.js +0 -1
  423. package/dist/chunk-HMWQOQAQ.js +0 -2
  424. package/dist/chunk-HNSRF4SQ.js +0 -1
  425. package/dist/chunk-HTODXNY6.js +0 -3
  426. package/dist/chunk-IUYVJJKE.js +0 -9
  427. package/dist/chunk-JM2CQP64.js +0 -97
  428. package/dist/chunk-K4AF7A25.js +0 -1
  429. package/dist/chunk-KDV4WR5A.js +0 -4
  430. package/dist/chunk-KF7NL5YM.js +0 -8
  431. package/dist/chunk-KMJTO7CU.js +0 -103
  432. package/dist/chunk-KN3MUEWA.js +0 -4
  433. package/dist/chunk-KYB4JX76.js +0 -5
  434. package/dist/chunk-LJAU6YHF.js +0 -10
  435. package/dist/chunk-LMQOFVRC.js +0 -17
  436. package/dist/chunk-LQSD25YS.js +0 -3
  437. package/dist/chunk-M2HQFHNO.js +0 -1
  438. package/dist/chunk-M5WBYWSQ.js +0 -7
  439. package/dist/chunk-N47RQHEI.js +0 -2
  440. package/dist/chunk-NRG2WPSM.js +0 -1
  441. package/dist/chunk-O2CP7DQE.js +0 -1
  442. package/dist/chunk-O6FXUKI2.js +0 -2
  443. package/dist/chunk-OHJUEUSA.js +0 -1
  444. package/dist/chunk-OOKTWSGP.js +0 -4
  445. package/dist/chunk-OONMCK7X.js +0 -1
  446. package/dist/chunk-OWK2RI4O.js +0 -6
  447. package/dist/chunk-P2UEQJJ4.js +0 -5
  448. package/dist/chunk-QBJ74XPX.js +0 -18
  449. package/dist/chunk-QGFJOTOH.js +0 -4
  450. package/dist/chunk-QLHPTMIH.js +0 -1
  451. package/dist/chunk-RIO5HKD5.js +0 -1
  452. package/dist/chunk-S7EKUSO6.js +0 -3
  453. package/dist/chunk-SJ2ROSXG.js +0 -1
  454. package/dist/chunk-SNTRSP5K.js +0 -359
  455. package/dist/chunk-SYCN2GT2.js +0 -3
  456. package/dist/chunk-TBNEN73P.js +0 -1
  457. package/dist/chunk-TVI7TQ4C.js +0 -16
  458. package/dist/chunk-TYMYIUIQ.js +0 -1
  459. package/dist/chunk-UEQT7TA4.js +0 -1
  460. package/dist/chunk-UUM367NR.js +0 -5
  461. package/dist/chunk-V5FZRNXI.js +0 -1
  462. package/dist/chunk-VE35YELD.js +0 -1
  463. package/dist/chunk-WEICJ4GW.js +0 -1
  464. package/dist/chunk-WJJXJNNP.js +0 -3
  465. package/dist/chunk-XAQUXFN5.js +0 -1
  466. package/dist/chunk-XE6EUHSS.js +0 -2
  467. package/dist/chunk-XFEJS652.js +0 -16
  468. package/dist/chunk-XI4QEULN.js +0 -1
  469. package/dist/chunk-XP63T4KZ.js +0 -5
  470. package/dist/chunk-XRCAUZAZ.js +0 -8
  471. package/dist/chunk-XSRZWJIJ.js +0 -1
  472. package/dist/chunk-YFJELEVH.js +0 -1
  473. package/dist/chunk-YNJIDLI3.js +0 -7
  474. package/dist/chunk-YRX4E67D.js +0 -6
  475. package/dist/chunk-Z2NL6XQK.js +0 -6
  476. package/dist/chunk-Z6Z5DPKS.js +0 -1
  477. package/dist/chunk-ZOE6WXW6.js +0 -1
  478. package/dist/cli/commands/app/app-logs/sources.js +0 -1
  479. package/dist/command-json-schema-3RP5P43D.js +0 -1
  480. package/dist/conf-store-XORTWCKZ.js +0 -1
  481. package/dist/custom-oclif-loader-ZRYPPYIP.js +0 -1
  482. package/dist/deprecations-AZDMCRNN.js +0 -1
  483. package/dist/dist-DTBXLVHF.js +0 -1
  484. package/dist/dist-SOYIDACZ.js +0 -1
  485. package/dist/environments-L42SEHB4.js +0 -1
  486. package/dist/error-H6B5BHYC.js +0 -1
  487. package/dist/error-handler-JB752NKM.js +0 -1
  488. package/dist/fs-XHZY6MNM.js +0 -1
  489. package/dist/is-global-2NBDZWLC.js +0 -1
  490. package/dist/json-error-OHV2KQFY.js +0 -1
  491. package/dist/node-package-manager-LN2Y7FQ2.js +0 -1
  492. package/dist/notifications-system-HWJ3F44U.js +0 -1
  493. package/dist/os-MHOCCDIB.js +0 -1
  494. package/dist/out-53ABAVL7.js +0 -1
  495. package/dist/output-GILH4S6M.js +0 -1
  496. package/dist/system-6WYK24ET.js +0 -1
  497. package/dist/ui-RP6SVJUK.js +0 -1
  498. package/dist/upgrade-5G7FBJJV.js +0 -1
  499. package/dist/version-TOBC7X2C.js +0 -1
  500. package/dist/version-UIRCT6RC.js +0 -1
  501. package/dist/workerd-ARH2OCYL.js +0 -18
@@ -1 +1 @@
1
- import{b as n}from"./chunk-WGO2GC6I.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-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};
@@ -0,0 +1 @@
1
+ import{Eb as f,db as E,pb as h,xb as g}from"./chunk-RIG66DIQ.js";import{b as P}from"./chunk-YTUUU33R.js";import{d as m}from"./chunk-IWTNUJGY.js";import{e as O,g as i}from"./chunk-VKWPEFWQ.js";i();i();i();var R=new Set(["THROTTLED","429"]),b=new Set(["ACCESS_DENIED","access_denied"]);function I(e){return Array.isArray(e)?e.flatMap(t=>{let s=[],n=t,r=n?.extensions?.code;typeof r=="string"&&s.push(r);let o=n?.extensions?.app_errors?.errors;if(Array.isArray(o))for(let p of o){let l=p?.category;typeof l=="string"&&s.push(l)}return s}):[]}function T(e){return e!==void 0&&R.has(e)}function _(e){return e!==void 0&&b.has(e)}function S(e){return I(e).some(T)}i();var C=new Set([502,503,504]);function x(e){return e!==void 0&&C.has(e)}var A=O(P(),1),a;(function(e){e[e.Abort=0]="Abort",e[e.AbortSilent=1]="AbortSilent",e[e.Bug=2]="Bug"})(a||(a={}));var y=class extends Error{},c=class extends Error{tryMessage;type;nextSteps;formattedMessage;customSections;code;details;skipOclifErrorHandling;constructor(t,s,n=null,r,o){let p=typeof t=="string"||"value"in t;super(p?f(t):E(t)),n?n instanceof h?this.tryMessage=f(n):this.tryMessage=n:this.tryMessage=null,this.type=s,this.nextSteps=r,this.customSections=o,this.skipOclifErrorHandling=!0,p||(this.formattedMessage=t)}},d=class extends c{constructor(t,s=null,n,r){super(t,a.Abort,s,n,r)}},w=class extends c{command;args;constructor(t,s,n,r=null){super(t,a.Abort,r),this.command=s,this.args=n}},M=class extends c{constructor(){super("",a.AbortSilent)}},u=class extends c{constructor(t,s=null){super(t,a.Bug,s)}};async function z(e){let t;if(k(e))t=e;else if(typeof e=="string")t=new u(e);else if(e instanceof Error)t=new u(e.message),t.stack=e.stack;else{let o=e;t=new u(o?.message??"Unknown error"),o?.stack&&(t.stack=o?.stack)}let{jsonOutputEnabled:s}=await import("./environment-O7ECODHU.js"),{commandEventOutputMode:n}=await import("./command-event-context-LFUZ7UCA.js");if(s()||n()==="json"){let{renderFatalErrorAsJson:o}=await import("./json-error-C2U7ZLCG.js");return o(t),await g(),e}let{renderFatalError:r}=await import("./ui-MYUBVKCK.js");return r(t),Promise.resolve(e)}function J(e){if(e instanceof A.Errors.CLIError){let t=new d(e.message);return t.stack=e.stack,Promise.resolve(t)}else return Promise.resolve(e)}function k(e){try{return Object.prototype.hasOwnProperty.call(e,"type")}catch{return!1}}function Q(e){if(!k(e)){if(e instanceof Error){if(v(e))return!1;let t=e.message;return!L(t)}return!0}return e.type===a.Bug}function v(e){let t=e;if(typeof t.response!="object"||t.response===null||t.request===void 0)return!1;let s=t.response.status;return s===401||s===429||x(s)?!0:S(t.response.errors)}function W(e){return m(e).replace("file:/","/").replace(/^\/?[A-Z]:/,"")}function L(e){return["EPERM: operation not permitted, scandir","EPERM: operation not permitted, rename","EACCES: permission denied","EPERM: operation not permitted, symlink","This version of npm supports the following node versions","EBUSY: resource busy or locked","ENOTEMPTY: directory not empty","getaddrinfo ENOTFOUND","Client network socket disconnected before secure TLS connection was established","spawn EPERM","socket hang up","The user aborted a request.","write EPIPE","Unsupported platform"].some(n=>e.includes(n))}export{I as a,T as b,_ as c,x as d,a as e,y as f,c as g,d as h,w as i,M as j,u as k,z as l,J as m,Q as n,W as o};
@@ -0,0 +1,3 @@
1
+ import{a as o,b as p,d as u}from"./chunk-OQUXGAF2.js";import{p as f,v as c}from"./chunk-KT5QQOES.js";import{b as d,c as l}from"./chunk-5AWELO3D.js";import{h as a}from"./chunk-J7BTC45S.js";import{wb as m}from"./chunk-RIG66DIQ.js";import{i as n}from"./chunk-FZCGRIOM.js";import{b as v}from"./chunk-YTUUU33R.js";import{e as F,g as s}from"./chunk-VKWPEFWQ.js";s();var h=F(v(),1),i=class extends c{static get jsonOutputSchema(){return o}static summary="Download metafields definitions from your shop into a local file.";static descriptionWithMarkdown=`Retrieves metafields from Shopify Admin.
2
+
3
+ If the metafields file already exists, it will be overwritten.`;static description=this.descriptionForHelp();static flags={...d,...l,...f,force:h.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=null;async command(e,b,w=!1){let y={path:e.path,password:e.password,store:e.store,force:e.force,verbose:e.verbose,noColor:e["no-color"]},t=await u(y);if(t.status==="failed"){let r=new a("Failed to fetch metafield definitions.","Check your connection and permissions, then try again.");throw r.details={failedOwnerTypes:t.failedOwnerTypes},r}return t.status==="downloaded"&&t.failedOwnerTypes.length>0&&(process.exitCode=1,e.json&&n({type:"diagnostic",level:"error",message:`Failed to fetch metafield definitions for: ${t.failedOwnerTypes.join(", ")}.`})),(!w||!e.json)&&p(t,e.json?"json":"text"),t}renderEnvironmentResults(e){m(o.encode({environments:e}))}};export{i as a};
@@ -0,0 +1,5 @@
1
+ import{a as d,d as M,e as D,f as U}from"./chunk-6Y6A2QGK.js";import{a as E,b as T,c as L,f as $,j as R,k as N,m as P,t as j}from"./chunk-5XOEMYEQ.js";import{a as _}from"./chunk-NPB753M3.js";import{a as q}from"./chunk-D4LFWIFE.js";import{S as O,u as I}from"./chunk-NCPZVARH.js";import{b as x,c as C}from"./chunk-5AWELO3D.js";import{A,C as S,H as F,z as g}from"./chunk-V654BMS7.js";import{k as B}from"./chunk-J7BTC45S.js";import{Db as y,ba as h,ga as k,qb as p,sb as u,wb as v}from"./chunk-RIG66DIQ.js";import{i as l}from"./chunk-B4OMIONW.js";import{b as Y}from"./chunk-YTUUU33R.js";import{e as K,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function V(t){let{storeFqdn:o,operationId:e,remoteApp:n}=t,{adminSession:r,version:i}=await G(o,n),a=await R({adminSession:r,operationId:e,version:i});return{store:o,apiVersion:i,operationId:e,operation:a??null}}async function z(t){let{storeFqdn:o,remoteApp:e}=t,{adminSession:n,version:r}=await G(o,e),i=await N({adminSession:n,version:r});return{store:o,apiVersion:r,operations:i}}async function G(t,o){let e=o.apiSecretKeys[0]?.secret;if(!e)throw new B("No API secret keys found for app");let n=await O(t,o.apiKey,e),r=await $({adminSession:n,minimumDefaultVersion:E});return{adminSession:n,version:r}}s();function H(t,o){if(o==="json"){v(d.encode({...M(t),..."operation"in t?{operationGid:t.operationId,operation:t.operation?D(t.operation):null}:{operations:t.operations.map(D),pageInfo:{hasNextPage:t.operations.length<100?!1:null}}}));return}if("operation"in t){t.operation?W(t.operation):S({headline:"Bulk operation not found.",body:u`ID: ${p.yellow(t.operationId)}`.value});return}let e=t.operations.map(n=>({id:L(n.id),status:X(n.status),count:Z(n.objectCount),dateCreated:h(new Date(String(n.createdAt))),dateFinished:n.completedAt?h(new Date(String(n.completedAt))):"",results:tt(n.url??n.partialDataUrl)}));y(),e.length===0?g({body:"No bulk operations found in the last 7 days."}):F({rows:e,columns:{id:{header:"ID",color:"yellow"},status:{header:"STATUS"},count:{header:"COUNT"},dateCreated:{header:"DATE CREATED",color:"cyan"},dateFinished:{header:"DATE FINISHED",color:"cyan"},results:{header:"RESULTS"}}}),y()}function W(t){let{id:o,status:e,createdAt:n,completedAt:r,url:i,partialDataUrl:a}=t,c=P(t).value,J=Q(n,r),m=u`ID: ${p.yellow(o)}\n${J}`.value;if(e==="COMPLETED"){let f=i?p.link("Download results",i):"";A({headline:c,body:u`${m}\n${f}`.value})}else if(e==="FAILED"){let f=a?p.link("Download partial results",a):"";S({headline:c,body:u`${m}\n${f}`.value})}else g({headline:c,body:m})}function Q(t,o){let e=new Date;return o?`Finished ${k(new Date(String(o)),e)}`:`Started ${k(new Date(String(t)),e)}`}function X(t){return t==="COMPLETED"?l.green(t):t==="FAILED"?l.red(t):l.dim(t)}function Z(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:String(t)}function tt(t){return t?u`${p.link("download",t)}`.value:""}var b=K(Y(),1);var w=class t extends _{static summary="Check the status of bulk operations.";static descriptionWithMarkdown=`Check the status of a specific bulk operation by ID, or list all bulk operations belonging to this app on this store in the last 7 days.
2
+
3
+ Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](https://shopify.dev/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](https://shopify.dev/docs/api/usage/bulk-operations/imports).
4
+
5
+ Use [\`bulk execute\`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) to start a new bulk operation.`;static description=this.descriptionForHelp();static flags={...x,...C,...q,id:b.Flags.string({description:"The bulk operation ID (numeric ID or full GID). If not provided, lists all bulk operations belonging to this app on this store in the last 7 days.",env:"SHOPIFY_FLAG_ID"}),store:b.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async o=>I(o)})};static get jsonOutputSchema(){return d}async run(){let{flags:o}=await this.parse(t),{appContextResult:e,store:n}=await j(o),r=o.json?"json":"text";U(o.id?"Checking bulk operation status.":"Listing bulk operations.",{organization:e.organization,remoteApp:e.remoteApp,storeFqdn:n.shopDomain},r);let i={storeFqdn:n.shopDomain,remoteApp:e.remoteApp},a=o.id?await V({...i,operationId:T(o.id)}):await z(i);return H(a,r),{app:e.app}}};export{w as a};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-2II4W4ZF.js";import{a as e}from"./chunk-C6HGU77I.js";import{a as o}from"./chunk-GW424AJO.js";import{b as i}from"./chunk-DCKRQZLE.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static description="View all the available UI kit components";static hiddenAliases=["kitchen-sink all"];static hidden=!0;async run(){await o(),await e(),await s()}};export{t as a};
1
+ import{a as s}from"./chunk-3JACWBUC.js";import{a as e}from"./chunk-OPVXPDOQ.js";import{a as o}from"./chunk-5AQ5JT2V.js";import{b as i}from"./chunk-OLKLHVHA.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static description="View all the available UI kit components";static hiddenAliases=["kitchen-sink all"];static hidden=!0;async run(){await o(),await e(),await s()}};export{t as a};
@@ -1 +1 @@
1
- import{T as m}from"./chunk-7YXHILW4.js";import{i as c}from"./chunk-4HBKQUKY.js";import{Cb as l,Eb as n,Nb as a}from"./chunk-62GA7XR3.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();import{createServer as d}from"net";var u=new Set;async function P(o,t){if(o&&await g(o))return a(n`Port ${o.toString()} is free`),o;a(n`Getting a random port...`);let r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);for(let e=0;e<(t?.maxTries??5)&&u.has(r);e++)r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${r}`)}`),u.add(r),r}async function g(o){return new Promise(t=>{let r=d();r.unref(),r.once("error",()=>t(!1));try{r.listen(o,"localhost",()=>{r.close(()=>t(!0))})}catch(e){if(!(e instanceof RangeError))throw e;t(!1)}})}function f(){return new Promise((o,t)=>{let r=d();r.unref(),r.once("error",t),r.listen(0,"localhost",()=>{let e=r.address();if(e&&typeof e=="object"){let i=e.port;r.close(()=>o(i))}else r.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(o,t=5,r=1){let e=1;for(;;)try{return await o()}catch(i){if(e++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(r);else throw new c(i.message)}}export{P as a,g as b};
1
+ import{U as m}from"./chunk-V654BMS7.js";import{h as c}from"./chunk-J7BTC45S.js";import{Bb as a,qb as l,sb as n}from"./chunk-RIG66DIQ.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();import{createServer as d}from"net";var u=new Set;async function P(o,t){if(o&&await g(o))return a(n`Port ${o.toString()} is free`),o;a(n`Getting a random port...`);let r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);for(let e=0;e<(t?.maxTries??5)&&u.has(r);e++)r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${r}`)}`),u.add(r),r}async function g(o){return new Promise(t=>{let r=d();r.unref(),r.once("error",()=>t(!1));try{r.listen(o,"localhost",()=>{r.close(()=>t(!0))})}catch(e){if(!(e instanceof RangeError))throw e;t(!1)}})}function f(){return new Promise((o,t)=>{let r=d();r.unref(),r.once("error",t),r.listen(0,"localhost",()=>{let e=r.address();if(e&&typeof e=="object"){let i=e.port;r.close(()=>o(i))}else r.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(o,t=5,r=1){let e=1;for(;;)try{return await o()}catch(i){if(e++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(r);else throw new c(i.message)}}export{P as a,g as b};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-5NCWBBRW.js";import{a as t}from"./chunk-ARRRFY6S.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a=class extends t{static hidden=!0;static flags={...t.flags};static baseFlags={...t.baseFlags};async run(){return r({from:"app import-custom-data-definitions",to:"app import custom-data-definitions"}),super.run()}};export{a};
1
+ import{a as r}from"./chunk-ETXBF6Q7.js";import{a as t}from"./chunk-UDPYSL3M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a=class extends t{static hidden=!0;static flags={...t.flags};static baseFlags={...t.baseFlags};async run(){return r({from:"app import-custom-data-definitions",to:"app import custom-data-definitions"}),super.run()}};export{a};
@@ -0,0 +1,6 @@
1
+ import{a as N,b as c,c as S}from"./chunk-HF4NDEX3.js";import{a as O}from"./chunk-6PUU6ZNQ.js";import{a as w}from"./chunk-AQ34X5B3.js";import{a as E}from"./chunk-63UKZLPC.js";import{e as g}from"./chunk-QFWWCZOI.js";import{f as R,o as F}from"./chunk-2NZ7GDDR.js";import{p as v,v as T}from"./chunk-KT5QQOES.js";import{b as u,c as d,f}from"./chunk-5AWELO3D.js";import{A as l}from"./chunk-V654BMS7.js";import{wb as h}from"./chunk-RIG66DIQ.js";import{b as r}from"./chunk-FZCGRIOM.js";import{b as j}from"./chunk-YTUUU33R.js";import{e as _,g as m}from"./chunk-VKWPEFWQ.js";m();m();var x=O.extend({originalName:r.string(),theme:N}),a=g({name:"ThemeRenameResult",schema:r.object({status:r.literal("success"),changed:r.boolean(),originalName:r.string(),theme:c}).strict(),definitions:{Theme:c},project(t){let e=x.parse(t);return{status:e.status,changed:e.originalName!==e.theme.name,originalName:e.originalName,theme:S(e.theme)}}});m();function y(t,e,n){if(e==="json"){h(a.encode(t.data));return}l({body:[...n?[{subdued:`Environment: ${n}
2
+
3
+ `}]:[],"The theme",...w(t.originalTheme),"was renamed to",`'${t.requestedName}'`]})}m();async function I(t,e){let n=t.name??await R("New name for the theme"),o=await E(e,{header:"Select a theme to rename",filter:{theme:t.theme,development:t.development,live:t.live}}),s=await F(o.id,{name:n},e);return{data:{status:"success",originalName:o.name,theme:{...s,processing:o.processing,shop:e.storeFqdn}},originalTheme:o,requestedName:n}}var i=_(j(),1);var p=class extends T{static get jsonOutputSchema(){return a}static summary="Renames an existing theme.";static descriptionWithMarkdown=`Renames a theme in your store.
4
+
5
+ If no theme is specified, then you're prompted to select the theme that you want to rename from the list of themes in your store.
6
+ `;static description=this.descriptionForHelp();static flags={...u,...d,...v,name:f(i.Flags.string({char:"n",description:"The new name for the theme.",env:"SHOPIFY_FLAG_NEW_NAME",required:!1})),development:i.Flags.boolean({char:"d",description:"Rename your development theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:i.Flags.string({char:"t",description:"Theme ID or name of the remote theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_THEME_ID"}),live:i.Flags.boolean({char:"l",description:"Rename your remote live theme. Use --development, --live, or --theme in non-interactive environments.",env:"SHOPIFY_FLAG_LIVE"})};static multiEnvironmentsFlags=["store","password","name",["live","development","theme"]];static nonTTYFlagRequirements(){return[{flags:["theme","development","live"]}]}async command(e,n,o=!1){let s=await I(e,n);if(e.json&&o)return s.data;y(s,e.json?"json":"text",e.environment)}renderEnvironmentResults(e){h(a.encode({environments:e}))}};export{p as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-GW424AJO.js";import{b as e}from"./chunk-DCKRQZLE.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-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};
@@ -0,0 +1,3 @@
1
+ import{a as Se}from"./chunk-V7H7ITCF.js";import{a as se}from"./chunk-EA5XVQJT.js";import{a as ye,b as H}from"./chunk-OLKLHVHA.js";import{E as U,N as O,u as w,va as ce,xa as M,ya as me}from"./chunk-NCPZVARH.js";import{e as _}from"./chunk-J3UXIC23.js";import{d as ve}from"./chunk-5AWELO3D.js";import{B as D,C as B,F as le,W as fe,a as ae,y as pe}from"./chunk-V654BMS7.js";import{c as ie}from"./chunk-F3OM2YO6.js";import{b as ne,o as re}from"./chunk-335BUVBP.js";import{d as ue,e as de}from"./chunk-FHNJLON5.js";import{h as x,k as he}from"./chunk-J7BTC45S.js";import{Bb as g,Ea as te,Ta as C,qb as G,sb as y,wb as ge}from"./chunk-RIG66DIQ.js";import{h as oe,i as L,j as R}from"./chunk-FZCGRIOM.js";import{b as Le}from"./chunk-YTUUU33R.js";import{c as Z,e as $,h as ee,p as k}from"./chunk-IWTNUJGY.js";import{e as qe,g as S}from"./chunk-VKWPEFWQ.js";S();var b=qe(Le(),1);var Y={path:b.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async n=>{let e=$(n);if(!C(e))throw new x("A path was explicitly provided but doesn't exist.",`Please check the path and try again: ${e}`);if(!te(e))throw new x("The path must be a directory, not a file.",`The provided path is not a directory: ${e}. Did you mean: ${ee(e)}`);return e},default:async()=>k(),noCacheDefault:!0}),password:b.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:b.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async n=>w(n)}),environment:b.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},we="Wrap the value in double quotes if you're using wildcards.",Ve=n=>({only:b.Flags.string({char:"o",multiple:!0,description:`${n.charAt(0).toUpperCase()+n.slice(1)} only the specified files (Multiple flags allowed). ${we}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:b.Flags.string({char:"x",multiple:!0,description:`Skip ${n}ing the specified files (Multiple flags allowed). ${we}`,env:"SHOPIFY_FLAG_IGNORE"})});S();S();S();import{AsyncLocalStorage as Ue}from"node:async_hooks";var Fe=new Ue,Ae,Ee,xe,Te;function v(){return Ae??=new _({projectName:"shopify-cli-theme-conf"}),Ae}function z(){return Ee??=new _({projectName:"shopify-cli-development-theme-config"}),Ee}function J(){return xe??=new _({projectName:"shopify-cli-repl-theme-config"}),xe}function W(){return Te??=new _({projectName:"shopify-cli-theme-store-password"}),Te}function K(n=v()){return Fe.getStore()?.store??n.get("themeStore")}function Ie(n,e=v()){e.set("themeStore",n)}function rt(n=v()){return g(y`Getting development theme...`),z().get(F(n))}function ot(n,e=v()){g(y`Setting development theme...`),z().set(F(e),n)}function st(n=v()){g(y`Removing development theme...`),z().delete(F(n))}function it(n=v()){return g(y`Getting REPL theme...`),J().get(F(n))}function at(n,e=v()){g(y`Setting REPL theme to ${n}...`),J().set(F(e),n)}function ct(n=v()){g(y`Removing REPL theme...`),J().delete(F(n))}function mt(n=v()){let e=F(n);return g(y`Getting storefront password for shop ${e}...`),W().get(e)}function ut(n,e=v()){let t=F(e);g(y`Setting storefront password for shop ${t}...`),W().set(t,n)}function dt(n=v()){let e=F(n);g(y`Removing storefront password for ${e}...`),W().delete(e)}function F(n=v()){let e=K(n);if(!e)throw new he("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function _e(n,e){return Fe.run({store:n},e)}function be(n){let e=n.store??K();if(!e)throw ce(new x("A store is required",`Specify the store passing ${y`${G.genericShellCommand(`--${Y.store.name}=example.myshopify.com`)}`.value} or set the ${y`${G.genericShellCommand(Y.store.env)}`.value} environment variable.`));return Ie(e),e}S();var Ce="shopify.theme.toml",At=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),Et=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],xt=50;S();S();var V="7e9cb568cfd431c538f36d1ad3f2b4f6";var Oe="shopify-cli-store",Me=240*1e3,Pe;function j(){return Pe??=new _({projectName:Oe}),Pe}function P(n){return`${V}::${De(n)}`}function De(n){return n.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function p(n){return typeof n=="string"}function Be(n){if(!n||typeof n!="object")return;let e=n;if(typeof e.id=="number")return{id:e.id,...p(e.email)?{email:e.email}:{},...p(e.firstName)?{firstName:e.firstName}:{},...p(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ge(n){if(!n||typeof n!="object")return;let e=n;if(!(!p(e.shopId)||!p(e.name)||!p(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...p(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...p(e.country)?{country:e.country}:{},...p(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function He(n){if(!n||typeof n!="object")return;let e=n;if(!p(e.store)||!p(e.clientId)||!p(e.userId)||!p(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(p)||!p(e.acquiredAt))return;let t=Be(e.associatedUser),r=e.kind==="preview"?"preview":"standard",o=r==="preview"?Ge(e.preview):void 0;if(!(r==="preview"&&!o))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...p(e.refreshToken)?{refreshToken:e.refreshToken}:{},...p(e.expiresAt)?{expiresAt:e.expiresAt}:{},...p(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...t?{associatedUser:t}:{},...r==="preview"?{kind:r}:{},...o?{preview:o}:{}}}function $e(n,e,t){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:o}=e;if(!(r!==void 0||o!==void 0))return;let s=P(n);if(!r||typeof r!="object"||Array.isArray(r)||typeof o!="string"){t.delete(s);return}let i=Object.fromEntries(Object.entries(r).flatMap(([c,m])=>{let u=He(m);return u?[[c,u]]:[]}));if(Object.keys(i).length!==Object.keys(r).length)if(i[o])t.set(s,{currentUserId:o,sessionsByUserId:i});else{t.delete(s);return}return{currentUserId:o,sessionsByUserId:i}}function Q(n,e){return $e(n,e.get(P(n)),e)}function Ye(n){return n.config?.store??{}}function ke(n=j()){let e=[],t=`${V}::`;for(let[r,o]of Object.entries(Ye(n))){if(!r.startsWith(t))continue;let a=$e(r.slice(t.length),o,n),s=a?.sessionsByUserId[a.currentUserId];s&&e.push(s)}return e}function Re(n,e=j()){let t=w(n),r=Q(t,e);if(!r)return;let o=r.sessionsByUserId[r.currentUserId];if(!o){e.delete(P(t));return}return o}function kt(n,e=j()){let t=P(n.store),r=Q(n.store,e),o={currentUserId:n.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[n.userId]:n}};e.set(t,o)}function Rt(n,e,t){let r=w(n),o=typeof e=="string"?e:void 0,a=(typeof e=="string"?t:e)??j(),s=P(r);if(!o){a.delete(s);return}let i=Q(r,a);if(!i)return;let{[o]:c,...m}=i.sessionsByUserId,u=Object.keys(m);if(u.length===0){a.delete(s);return}a.set(s,{currentUserId:i.currentUserId===o?u[0]:i.currentUserId,sessionsByUserId:m})}function je(n){if(!n.expiresAt)return!1;let e=new Date(n.expiresAt).getTime();return Number.isNaN(e)?!0:e-Me<Date.now()}var X=class extends H{static baseFlags={...H.baseFlags,...ve};environmentsFilename(){return this.hasExplicitEnvironment()&&this.collectsEnvironmentResults({json:re(process.env,this.argv)})?void 0:Ce}async command(e,t,r=!1,o,a){}async run(e){let t=this.constructor,r=t.multiEnvironmentsFlags,o=this.hasExplicitEnvironment(),{args:a,flags:s}=await this.parse(t);return this.runWithParsedOutput(s,async()=>{let i="password"in t.flags,c=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=o&&this.collectsEnvironmentResults(s),u=this.requiredFlagsForSingleEnvironment(r??[]),l=u.some(d=>Array.isArray(d)?d.includes("store"):d==="store");if(c.length<=1&&!(c.length>0&&m)){if(c[0]&&!s.store&&l)throw new x("Please provide a valid environment.");this.validateCommandFlags(s);let d=i?await this.createSession(s):void 0,N=this.constructor.name.toLowerCase();if(M(`theme-command:${N}:single-env:authenticated`),s.path&&!C(s.path))throw new x(`Path does not exist: ${s.path}`);try{await this.command(s,d,!1,a)}finally{await this.logAnalyticsData(d)}return}if(r===null&&c.length>1){if(s.json)throw new x("This command does not support multiple environments.");D({body:"This command does not support multiple environments."});return}let{flags:h}=await this.parse(ye(t),this.argv);if(c.length>1&&"path"in h){this.errorOnGlobalPath(!!s.json);return}let f=await this.loadEnvironments(c,s,h);m||=Array.from(f.values()).some(({flags:d})=>this.collectsEnvironmentResults(d));let T=async()=>{let d=await this.validateEnvironments(f,c.length===1?u:r??[],i,m);if((m?d.valid.some(({flags:I})=>this.requiresEnvironmentConfirmation(I)):this.requiresEnvironmentConfirmation(s))&&!await this.showConfirmation(this.constructor.name,r??[],d)){m&&this.renderEnvironmentResults(c.map(E=>({environment:E,result:{status:"cancelled"}})));return}let A=await this.runConcurrent(d.valid,m);if(m){let I=c.map(E=>{let q=d.invalid.find(Ne=>Ne.environment===E);return A.get(E)??{environment:E,error:{type:"abort",message:q?.reason??"The environment did not return a result."}}});this.renderEnvironmentResults(I),I.some(E=>"error"in E)&&(process.exitCode=1)}};return m&&R()!=="json"?oe({outputMode:"json",sink:ie},T):T()})}validateCommandFlags(e){}requiredFlagsForSingleEnvironment(e){return e.filter(t=>t!=="password")}collectsEnvironmentResults(e){let t=this.constructor;return!!(e.json&&t.jsonOutputSchema)}requiresEnvironmentConfirmation(e){return"force"in this.constructor.flags&&!e.force&&(!this.collectsEnvironmentResults(e)||fe())}renderEnvironmentResults(e){let t=this.constructor;ge(t.jsonOutputSchema.encode({environments:e}))}validateNonTTYFlags(e){let t=this.constructor;"multiEnvironmentsFlags"in t&&t.multiEnvironmentsFlags!==void 0&&Array.isArray(e.environment)&&(e.environment.length>1||e.environment.length===1&&this.hasExplicitEnvironment()&&this.collectsEnvironmentResults(e))||super.validateNonTTYFlags(e)}storeAuthScopes(){}hasExplicitEnvironment(){return this.argv.some(e=>e==="--environment"||e.startsWith("--environment=")||e.startsWith("-e"))||!!process.env.SHOPIFY_FLAG_ENVIRONMENT}async loadEnvironments(e,t,r){let o=new Map;for(let s of e){let i;try{i=await Se(s,"shopify.theme.toml",{from:t.path,silent:!0})}catch(c){if(!this.collectsEnvironmentResults(t))throw c;o.set(s,{flags:t,validationFlags:{},parserFlags:{},error:c instanceof Error?c.message:String(c)});continue}i?.store&&typeof i.store=="string"&&(i.store=w(i.store)),typeof i?.theme=="number"?i.theme=String(i.theme):Array.isArray(i?.theme)&&(i.theme=i.theme.map(String)),i?.path&&typeof i.path=="string"&&(i.path=$(i.path)),o.set(s,{parserFlags:{...i,...r},flags:{...t,...i,...r,environment:[s]},validationFlags:{...e.length===1?t:{},...i,...r}})}if(this.collectsEnvironmentResults(t)||Array.from(o.values()).some(s=>this.collectsEnvironmentResults(s.flags))){for(let[s,i]of o)if(!i.error){i.flags={...i.flags,json:!0};try{let c=await this.parseEnvironmentFlags({json:!0,...i.parserFlags},this.constructor,r);i.flags={...i.flags,...c,environment:[s]}}catch(c){i.error=c instanceof Error?c.message:String(c)}}}return o}async validateEnvironments(e,t,r,o=!1){let a=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,c=Array.from(e.entries()).map(([m,{flags:u,validationFlags:l,error:h}])=>({environmentName:m,error:h,flags:u,validationFlags:l,storeAuthSession:this.storeAuthSessionFromCache(l,i)}));for(let{environmentName:m,flags:u,validationFlags:l,storeAuthSession:h,error:f}of c){if(f){s.push({environment:m,reason:f});continue}let T=this.validConfig(l,t,m,h,o);if(T!==!0){let d=T.join(", ");s.push({environment:m,reason:`Missing flags: ${d}`});continue}try{this.validateCommandFlags(u),super.validateNonTTYFlags(u)}catch(d){if(!o)throw d;s.push({environment:m,reason:d instanceof Error?d.message:String(d)});continue}a.push({environment:m,flags:u,requiresAuth:r,storeAuthSession:h})}return{valid:a,invalid:s}}async showConfirmation(e,t,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},i=[...r.valid.map(({environment:c,flags:m})=>{let u=t.map(l=>{let h=Array.isArray(l)?l.find(f=>m[f]):l;if(h==="password")return"password";if(h==="path"&&typeof m.path=="string"){let f=m.path.split(/[/\\]/);if(f.length===1)return`path: ${m.path}`;let T=f[0]===""?`/${f[1]}`:f[0],d=f.at(-1);return`path: ${T}/.../${d}`}return h&&`${h}: ${m[h]}`}).join(", ");return[c,{subdued:u||"No flags required"}]}),...r.invalid.map(({environment:c,reason:m})=>[c,{error:`Skipping | ${m}`}])];return s.infoTable={Environment:i},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),le(s)}async runConcurrent(e,t=!1){let r=new Map,o=new ae,a=e.map(c=>c.flags.store),s=new Set(a),i=a.length===s.size?[e]:this.createSequentialGroups(e);for(let c of i){let m=c.map(({environment:u,flags:l,requiresAuth:h,storeAuthSession:f})=>({prefix:u,action:async(T,d,N)=>{try{let A=l.store,I=await _e(A,async()=>{let E=h?await this.createSession(l,f):void 0,q=this.constructor.name.toLowerCase();M(`theme-command:${q}:multi-env:authenticated`);try{return await this.command(t?{...l,json:!0}:l,E,!0,{},{stdout:T,stderr:d})}finally{await this.logAnalyticsData(E)}});r.set(u,{environment:u,result:I??{status:"cancelled"}})}catch(A){process.exitCode=1,t&&r.set(u,{environment:u,error:se(A)}),A instanceof Error&&(A.message=`Environment ${u} failed:
2
+
3
+ ${A.message}`,t||R()==="json"?L({type:"diagnostic",level:"error",code:"theme-environment-failed",message:A.message}):B({body:[A.message]}))}}}));t?await Promise.all(m.map(({action:u})=>u(process.stdout,process.stderr,o.signal))):await pe({processes:m,abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}return r}createSequentialGroups(e){let t=[];return e.forEach(r=>{let o=t.find(a=>!a.some(s=>s.flags.store===r.flags.store));o?o.push(r):t.push([r])}),t}async createSession(e,t){let r=be({store:e.store}),o=e.password;return o?await O(r,o):t??await this.storeAuthSessionForTheme({store:r})??await O(r,o)}async storeAuthSessionForTheme(e){let t=this.storeAuthScopes();if(!t)return;let r=typeof e.store=="string"?e.store:void 0,o=e.password;if(!r||o)return;let a=w(r),s=Re(a);if(s)return this.adminSessionFromStoreAuthSession(s,a,t)}storeAuthSessionsForTheme(e){let t=this.storeAuthScopes();if(!t)return new Map;let r=new Set(e.filter(({store:o,password:a})=>typeof o=="string"&&!a).map(({store:o})=>w(o)));return r.size===0?new Map:new Map(ke().map(o=>{let a=w(o.store);if(!r.has(a))return;let s=this.adminSessionFromStoreAuthSession(o,a,t);return s?[a,s]:void 0}).filter(o=>o!==void 0))}storeAuthSessionFromCache(e,t){let r=typeof e.store=="string"?e.store:void 0,o=e.password;if(!(!r||o))return t.get(w(r))}adminSessionFromStoreAuthSession(e,t,r){if(je(e)){g(`Ignoring stored store auth session for ${t}: it expired at ${e.expiresAt??"unknown"}.`);return}if(!this.hasRequiredStoreAuthScopes(e.scopes,r)){g(`Ignoring stored store auth session for ${t}: it is missing required scopes (has: ${e.scopes.join(", ")}; needs: ${r.join(", ")}).`);return}return g(`Using stored store auth session for ${t} (scopes: ${e.scopes.join(", ")}).`),U(e.userId),{token:e.accessToken,storeFqdn:t}}expandImpliedStoreAuthScopes(e){let t=new Set(e);for(let r of e){let o=r.match(/^(unauthenticated_)?write_(.*)$/);o&&t.add(`${o[1]??""}read_${o[2]}`)}return t}hasRequiredStoreAuthScopes(e,t){let r=this.expandImpliedStoreAuthScopes(e);return t.every(o=>r.has(o))}validConfig(e,t,r,o,a=!1){let s=t.filter(i=>Array.isArray(i)?!i.some(c=>this.hasRequiredFlag(e,c,o)):!this.hasRequiredFlag(e,i,o)).map(i=>Array.isArray(i)?i.join(" or "):i);return s.length>0?(a||R()==="json"?L({type:"diagnostic",level:"warning",code:"theme-environment-invalid",message:`Missing required flags in environment configuration for ${r}: ${s.join(", ")}`}):D({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:s}}]}),s):!0}hasRequiredFlag(e,t,r){return t==="password"&&r?!0:!!e[t]}errorOnGlobalPath(e){let t=Z(k(),"shopify.theme.toml"),r=C(t),o="Can't use `--path` flag with multiple environments.",a=r?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."];if(e)throw new x(o,a.join(" "));B({body:[o,...a]})}async logAnalyticsData(e){if(e)try{let t=me();await ue(()=>({store_fqdn_hash:ne(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(t.timings),cmd_theme_errors:JSON.stringify(t.errors),cmd_theme_retries:JSON.stringify(t.retries),cmd_theme_events:JSON.stringify(t.events)})),await de(()=>({store_fqdn:e.storeFqdn}))}catch(t){g(`Unable to record theme analytics: ${t instanceof Error?t.message:String(t)}`)}}};export{V as a,ke as b,Re as c,kt as d,Rt as e,K as f,rt as g,ot as h,st as i,it as j,at as k,ct as l,mt as m,ut as n,dt as o,Y as p,Ve as q,be as r,At as s,Et as t,xt as u,X as v};
@@ -0,0 +1,5 @@
1
+ import{a as re,b as oe,c as ie,d as ae}from"./chunk-ADVLRSSO.js";import{f as te,g as ne}from"./chunk-YXIFSIRX.js";import{q as v}from"./chunk-L6VONMA2.js";import{c as Z,d as ee}from"./chunk-GGJUPL4W.js";import{a as X}from"./chunk-NPB753M3.js";import{a as V}from"./chunk-D4LFWIFE.js";import{Ma as Q}from"./chunk-XV6XCOTG.js";import{b as K,c as z,f as Y}from"./chunk-5AWELO3D.js";import{G,a as b,f as O,g as u,h as s,i as j,j as B,k as J,n as H,o as q,p as x,u as C}from"./chunk-V654BMS7.js";import{h as R}from"./chunk-J7BTC45S.js";import{a as $}from"./chunk-QVVQUJQL.js";import{la as N}from"./chunk-RIG66DIQ.js";import{g as U}from"./chunk-GSGCSBRN.js";import{b as Fe}from"./chunk-YTUUU33R.js";import{c as I}from"./chunk-IWTNUJGY.js";import{e as S,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();c();c();var h=S(O(),1);import{Writable as se}from"stream";function ce({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:i}){let a={type:"functionRun",input:e.payload.input,output:e.payload.output,logs:e.payload.logs,name:e.source,size:0,memory_usage:0,instructions:e.payload.fuelConsumed},[m,p]=(0,h.useState)([]),[d,l]=(0,h.useState)([a,a]),[y,f]=(0,h.useState)(void 0),{input:w,export:W}=e.payload,[he,A]=(0,h.useState)(`Watching for changes to ${e.source}...`);return(0,h.useEffect)(()=>{let k=new b;t.signal.addEventListener("abort",()=>{k.abort()});let _=async()=>{let E=await xe(r,JSON.stringify(w),W);l(g=>[E,g[0]]),A(`Watching for changes to ${e.source}...`),p(g=>[...g,E])},ye=async()=>{A("Replaying log with local function..."),await _()},we=async()=>{i.onEvent(async g=>{let F=g.extensionEvents.find(L=>L.extension.handle===r.handle);if(!(!F||F.type!==Z.Updated)){if(F.buildResult?.status==="error"){f(`Error while reloading and building extension: ${F.buildResult?.error}`);return}f(void 0),A("Re-running with latest changes..."),await _()}});let E=new se({write(g,F,L){p(Ee=>[...Ee,{type:"systemMessage",message:g.toString()}]),L()}});await i.start({stdout:E,stderr:E,signal:k.signal},!1)};return ye().then(()=>{we()}),()=>{k.abort()}},[w,W,o,r]),C(t.signal,async()=>{setTimeout(()=>{U()||$(process.pid,"SIGINT",!1,()=>{process.exit(0)})},2e3)}),{logs:m,statusMessage:he,recentFunctionRuns:d,error:y}}async function xe(e,t,o){let r="",i=new se({write(m,p,d){r+=m,d()}});return await oe({functionExtension:e,input:t,export:o,stdout:i,json:!0}),{...JSON.parse(r),type:"functionRun"}}var n=S(O(),1);var ue=({selectedRun:e,abortController:t,app:o,extension:r})=>{let{isAborted:i}=C(t.signal),{isRawModeSupported:a}=B(),m=new ee(o),{logs:p,statusMessage:d,recentFunctionRuns:l,error:y}=ce({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:m});return J((f,w)=>{q(f,w,()=>t.abort()),f==="q"&&t.abort()},{isActive:!!a}),n.default.createElement(n.default.Fragment,null,n.default.createElement(j,{items:p},(f,w)=>n.default.createElement(u,{key:`replayOutputScrollerLog${w}`,flexDirection:"column"},n.default.createElement(Ae,{log:f}))),i?null:n.default.createElement(u,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},a?n.default.createElement(u,{flexDirection:"column"},n.default.createElement(u,{flexDirection:"row"},n.default.createElement(s,null,x.pointerSmall," ",d)),n.default.createElement(De,{recentFunctionRuns:l}),n.default.createElement(s,null,x.pointerSmall," Press ",n.default.createElement(s,{bold:!0},"q")," ",x.lineVertical," quit")):null,y?n.default.createElement(s,{color:"red"},y):null))};function D({title:e,backgroundColor:t}){let o=Math.max(Math.round((28-e.length)/2),0),r=" ".repeat(o);return n.default.createElement(s,{backgroundColor:t,color:"black"},`
2
+
3
+ `,r,e,r,`
4
+ `)}function Re({input:e}){return n.default.createElement(u,{flexDirection:"column"},n.default.createElement(D,{title:"Input",backgroundColor:"yellow"}),n.default.createElement(s,null,v(e)))}function Se({logs:e}){return n.default.createElement(u,{flexDirection:"column"},n.default.createElement(D,{title:"Logs",backgroundColor:"blueBright"}),n.default.createElement(s,null,e))}function be({output:e}){return n.default.createElement(u,{flexDirection:"column"},n.default.createElement(D,{title:"Output",backgroundColor:"greenBright"}),n.default.createElement(s,null,v(e)))}function Ce({functionRun:e}){return n.default.createElement(u,{flexDirection:"column"},n.default.createElement(D,{title:"Benchmark Results",backgroundColor:"green"}),n.default.createElement(s,null,"Name: ",e.name),n.default.createElement(s,null,"Linear Memory Usage: ",e.memory_usage,"KB"),n.default.createElement(s,null,"Instructions: ",e.instructions/1e3,"K"),n.default.createElement(s,null,"Size: ",e.size,"KB"))}function De({recentFunctionRuns:e}){let t=e[0].instructions-e[1].instructions;return n.default.createElement(u,{flexDirection:"column"},n.default.createElement(s,null,x.pointerSmall," Instruction count change: ",t>0?"+":"",t))}function Ae({log:e}){switch(e.type){case"functionRun":return n.default.createElement(u,{flexDirection:"column"},n.default.createElement(Re,{input:e.input}),n.default.createElement(Se,{logs:e.logs}),n.default.createElement(be,{output:e.output}),n.default.createElement(Ce,{functionRun:e}),n.default.createElement(s,null,"\xA0"));case"systemMessage":return n.default.createElement(s,null,e.message);default:return null}}var le=S(O(),1);async function me({selectedRun:e,abortController:t,app:o,extension:r}){return H(le.default.createElement(ue,{selectedRun:e,abortController:t,app:o,extension:r}),{exitOnCtrlC:!1})}c();async function pe(e){if(e.length===0)return;let t=i=>({label:`${i.logTimestamp} (${i.status}) - ${i.identifier}`,value:i}),o=e.map(t);return await G({message:"Which function run would you like to replay locally?",choices:o})}import{existsSync as ke,readdirSync as Le}from"fs";var M=100;async function fe(e){let{watch:t,extension:o,app:r}=e,i=new b;try{let a=await Ie(e),{input:m,export:p}=a.payload;if(t)await me({selectedRun:a,abortController:i,app:r,extension:o});else return await ie({functionExtension:o,json:e.json,input:JSON.stringify(m),export:p})}catch(a){throw i.abort(),a}}async function Ie(e){let t=e.app.getLogsDir();return e.log?Ne(t,e.extension.handle,e.log):ve(t,e.extension.handle)}async function Ne(e,t,o){let r=await Oe(e,t,o);if(r===void 0)throw new R(`No log found for '${o}'.
5
+ Searched ${e} for function ${t}.`);let i=await N(r);return JSON.parse(i)}function de(e){let t=e.split(/[_.]/);if(!(t.length<6))return{namespace:t[3],functionHandle:t[4],identifier:t[5]}}async function Oe(e,t,o){let r=ge(e).find(i=>{let a=de(i);return a?.namespace==="extensions"&&a?.functionHandle===t&&a?.identifier===o});return r?I(e,r):void 0}async function ve(e,t){let o=await Me(e,t),r=await pe(o);if(r===void 0)throw new R(`No logs found in ${e}`);return r}async function Me(e,t){let o=ge(e).filter(i=>{let a=de(i);return a?.namespace==="extensions"&&a?.functionHandle===t}).reverse(),r=[];for(let i=0;i<o.length&&r.length<M;i+=M){let m=o.slice(i,i+M).map(l=>I(e,l)),d=(await Promise.all(m.map(async l=>{let y=await N(l);return{...JSON.parse(y),identifier:Te(l)}}))).filter(l=>l.payload.input!=null);r=r.concat(d)}return r}function Te(e){return e.split("_").pop().substring(0,6)}function ge(e){return ke(e)?Le(e):[]}var T=S(Fe(),1);var P=class e extends X{static get requiresSyncAnalytics(){return!0}static get jsonOutputSchema(){return re}static summary="Replays a function run from an app log.";static descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";static description=this.descriptionForHelp();static flags={...K,...V,...te,...z,log:Y(T.Flags.string({char:"l",description:"Specifies a log identifier to replay instead of selecting from a list. The identifier is provided in the output of `shopify app dev` and is the suffix of the log file name.",env:"SHOPIFY_FLAG_LOG"})),watch:T.Flags.boolean({char:"w",hidden:!1,allowNo:!0,default:!0,description:"Re-run the function when the source code changes.",env:"SHOPIFY_FLAG_WATCH"})};async run(){let{flags:t}=await this.parse(e);if(t.json&&t.watch)throw new R("JSON output requires a finite replay. Use --no-watch with --json.");let{app:o}=await Q({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),r=await ne(o,t.path),i=await fe({app:o,extension:r,path:t.path,log:t.log,json:t.json,watch:t.watch});return i&&ae(i),{app:o}}};export{P as a};
@@ -0,0 +1,5 @@
1
+ import{d}from"./chunk-V654BMS7.js";import{h as _}from"./chunk-J7BTC45S.js";import{Bb as u,Cb as E,Y as y,ca as O}from"./chunk-RIG66DIQ.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();var f=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:t,input:r,inputBytes:s,output:n,outputBytes:o,logs:i,functionId:l,fuelConsumed:c,target:m,errorMessage:T,errorType:h,inputQueryVariablesMetafieldValue:S,inputQueryVariablesMetafieldNamespace:A,inputQueryVariablesMetafieldKey:g}){this.export=t,this.input=r,this.inputBytes=s,this.output=n,this.outputBytes=o,this.logs=i,this.functionId=l,this.fuelConsumed=c,this.target=m,this.errorMessage=T,this.errorType=h,this.inputQueryVariablesMetafieldValue=S,this.inputQueryVariablesMetafieldNamespace=A,this.inputQueryVariablesMetafieldKey=g}};a();function b(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function I(e,t){return t?.deep&&b(e)||t?.deep&&Array.isArray(e)?p(e,t):e}function p(e,t){if(Array.isArray(e))return e.map(r=>t?.deep?p(r,t):r);if(b(e)){let r={};for(let[s,n]of Object.entries(e))r[y(s)]=I(n,t);return r}return e}var R=450,x=5*1e3,N=60*1e3,K=5,F=1e6,D="function_run",$="function_network_access",j="function_network_access.response_from_cache",Y="function_network_access.request_execution_in_background",X="function_network_access.request_execution",H="no_cached_response",W="cached_response_about_to_expire",q=async e=>{let{errors:t}=e.response,r=R,s=null,n="not_attempted";if(t.length>0)if(u(`Errors: ${t.map(o=>o.message).join(", ")}`),t.some(o=>o.status===401))try{s=await e.onResubscribe(),n="succeeded"}catch(o){u(`Failed to resubscribe to app logs: ${o}`),r=N,n="failed",e.onThrottle(r)}else t.some(o=>o.status===429)?(r=N,e.onThrottle(r)):(r=x,e.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:s,resubscribeResult:n}},z=({appLog:e,appLogPayload:t,storeName:r,prettyPrint:s=!0})=>{let{cursor:n,...o}=e,i=p({...o,payload:t,localTime:O(e.log_timestamp),storeName:r});return t instanceof f&&(i.payload.logs=t.logs.split(`
2
+ `).filter(Boolean),i.payload.inputQueryVariablesMetafieldValue&&(i.payload.inputQueryVariablesMetafieldValue=C(i.payload.inputQueryVariablesMetafieldValue))),s?JSON.stringify(i,null,2):JSON.stringify(i)},Z=async(e,t,r,s)=>{let n=await e.subscribeToAppLogs(t,r);if(!n.appLogsSubscribe)throw new _("Failed to subscribe to app logs: No response received");let{jwtToken:o,success:i,errors:l}=n.appLogsSubscribe;if(u(`Token: ${o}
3
+ `),u(`API Key: ${t.apiKey}
4
+ `),l&&l.length>0){let c=l.join(", ");throw await d({stripAnsi:!1},()=>{E(`Errors subscribing to app logs: ${c}`,s),E("App log streaming is not available in this session.",s)}),new _(c)}else{if(!o)throw new _("Failed to subscribe to app logs: No response received");let c=Array.isArray(t.shopIds)?t.shopIds:[t.shopIds];u(`Subscribed to App Events for shop ID(s) ${c.join(", ")}`),i!==void 0&&u(`Success: ${i}
5
+ `)}return o};function v(e){try{if(typeof e=="string"){let t=JSON.parse(e);return JSON.stringify(t,null,2)}else return typeof e=="object"&&e!==null?JSON.stringify(e,null,2):void 0}catch(t){throw new Error(`Error parsing JSON: ${t}`)}}var C=e=>{try{return JSON.parse(e)}catch{return e}};a();a();export{f as a,p as b,R as c,x as d,K as e,F as f,D as g,$ as h,j as i,Y as j,X as k,H as l,W as m,q as n,z as o,Z as p,v as q};
@@ -0,0 +1,2 @@
1
+ import{h as g,j as S,l as s,m as I,o as E}from"./chunk-FNWXMCSD.js";import{a as p}from"./chunk-EA5XVQJT.js";import{A as l,B as c,z as h}from"./chunk-V654BMS7.js";import{h as m}from"./chunk-J7BTC45S.js";import{wb as u}from"./chunk-RIG66DIQ.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();function f(e){return S.encode(E(e))}function y(e){return g.encode({status:e.outcomes.some(({status:o})=>o==="failed")?"partial":"success",operations:e.outcomes.map(o=>o.status==="success"?{status:o.status,operationGid:o.operationId,operation:s(o.operation)}:{status:o.status,operationGid:o.operationId,operation:o.operation===null?null:s(o.operation),error:"error"in o?p(o.error):{type:"abort",message:o.userErrors.map(({message:i})=>i).join("; "),details:{userErrors:I(o.userErrors)}}})})}function T(e){j(e)}function Y(e,o){if(e.status==="failed"&&e.submission.operations.length===0){let i=["Subscription migration submission failed.",...e.failure.type==="submission"?e.failure.userErrors.map(({message:n})=>n):[]].join(`
2
+ `),r=new m(i);throw r.details=e.failure.type==="submission"?{batchIndex:e.failure.batchIndex,userErrors:e.failure.userErrors.map(({message:n,field:t})=>({message:n,fieldPath:t}))}:{operationGids:e.failure.operationIds},r}return e.status==="cancelled"?(o.json&&u(f(e)),0):(o.json?u(f(e)):e.status==="failed"?$(e):o.watch?h({headline:"Subscription migration operations.",body:e.submission.operations.map(({operation:i})=>b(i))}):j(e.submission),e.status==="failed"?1:0)}function k(e,o){let i=e.outcomes[0];if(e.outcomes.length===1&&i?.status==="failed"){if("error"in i)throw i.error;let n=new m(i.userErrors.map(({message:t})=>t).join("; "));throw n.details={operationGid:i.operationId,operation:i.operation===null?null:s(i.operation),userErrors:i.userErrors.map(({message:t,field:d})=>({message:t,fieldPath:d}))},n}let r=e.outcomes.some(({status:n})=>n==="failed");return o.json?u(y(e)):r?c({headline:"Some subscription migration operations could not be canceled.",body:M(e.outcomes)}):l({headline:"Subscription migration operations canceled.",body:M(e.outcomes)}),r?1:0}function j(e){let o=e.action==="schedule"?"scheduled":"unscheduled";l({headline:`Subscription migrations ${o}.`,body:[`Shops: ${e.total}`,"Operation IDs:",...e.operations.map(({operation:i})=>i.id),"Save every operation ID. You will need them to check or cancel this submission."]})}function $(e){if(e.failure.type==="operations"){c({headline:"Some subscription migration operations failed.",body:["Failed operation IDs:",...e.failure.operationIds,"Terminal operation outcomes:",...e.submission.operations.map(({operation:i})=>b(i)),"Save every operation ID. You will need them to inspect this submission."]});return}let o=e.submission.operations.map(({operation:i})=>i.id);c({headline:o.length===0?"Subscription migration submission failed.":"Some subscription migration operations were accepted before submission failed.",body:[...o.length===0?["Accepted operation IDs: None."]:["Accepted operation IDs:",...o],`Batch index: ${e.failure.batchIndex}`,"Errors:",...e.failure.userErrors.map(({message:i})=>i),...o.length===0?[]:["Save every accepted operation ID. You will need them to check or cancel accepted operations."]]})}function M(e){let o=e.filter(r=>r.status==="success"),i=e.filter(r=>r.status==="failed");return[...o.length===0?["Canceled operations: None."]:["Canceled operations:",...o.map(({operation:r})=>b(r))],...i.length===0?[]:["Failed operations:",...i.map(r=>{let n=r.operation?` (returned status: ${r.operation.status})`:"",t="error"in r?p(r.error).message:r.userErrors.map(({message:d})=>d).join("; ");return`${r.operationId}: ${t}${n}`})]]}function b(e){return`${e.id}: ${e.status} (${e.results.edges.length}/${e.total} settled)`}export{T as a,Y as b,k as c};
@@ -1,8 +1,8 @@
1
- import{i as E}from"./chunk-4HBKQUKY.js";import{Cb as $,Eb as T,Nb as O,Xa as V,qa as N}from"./chunk-62GA7XR3.js";import{a as g,c as w,e as Y,g as m}from"./chunk-VKWPEFWQ.js";var I=w((z,R)=>{R.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var K=w((X,d)=>{m();var b=g("fs"),y=g("path"),q=g("os"),F=g("crypto"),P=I(),D=P.version,C=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
1
+ import{h as E}from"./chunk-J7BTC45S.js";import{Bb as O,Sa as V,la as N,qb as $,sb as T}from"./chunk-RIG66DIQ.js";import{a as g,c as w,e as Y,g as m}from"./chunk-VKWPEFWQ.js";var I=w((z,R)=>{R.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var K=w((X,d)=>{m();var b=g("fs"),y=g("path"),q=g("os"),F=g("crypto"),P=I(),D=P.version,C=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
2
2
  `);let s;for(;(s=C.exec(r))!=null;){let a=s[1],t=s[2]||"";t=t.trim();let o=t[0];t=t.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(t=t.replace(/\\n/g,`
3
3
  `),t=t.replace(/\\r/g,"\r")),n[a]=t}return n}function U(e){e=e||{};let n=x(e);e.path=n;let r=l.configDotenv(e);if(!r.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw o.code="MISSING_DATA",o}let s=A(e).split(","),a=s.length,t;for(let o=0;o<a;o++)try{let i=s[o].trim(),f=M(r,i);t=l.decrypt(f.ciphertext,f.key);break}catch(i){if(o+1>=a)throw i}return l.parse(t)}function B(e){console.log(`[dotenv@${D}][WARN] ${e}`)}function v(e){console.log(`[dotenv@${D}][DEBUG] ${e}`)}function j(e){console.log(`[dotenv@${D}] ${e}`)}function A(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function M(e,n){let r;try{r=new URL(n)}catch(i){if(i.code==="ERR_INVALID_URL"){let f=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw f.code="INVALID_DOTENV_KEY",f}throw i}let s=r.password;if(!s){let i=new Error("INVALID_DOTENV_KEY: Missing key part");throw i.code="INVALID_DOTENV_KEY",i}let a=r.searchParams.get("environment");if(!a){let i=new Error("INVALID_DOTENV_KEY: Missing environment part");throw i.code="INVALID_DOTENV_KEY",i}let t=`DOTENV_VAULT_${a.toUpperCase()}`,o=e.parsed[t];if(!o){let i=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${t} in your .env.vault file.`);throw i.code="NOT_FOUND_DOTENV_ENVIRONMENT",i}return{ciphertext:o,key:s}}function x(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)b.existsSync(r)&&(n=r.endsWith(".vault")?r:`${r}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=y.resolve(process.cwd(),".env.vault");return b.existsSync(n)?n:null}function k(e){return e[0]==="~"?y.join(q.homedir(),e.slice(1)):e}function W(e){let n=!!(e&&e.debug),r=e&&"quiet"in e?e.quiet:!0;(n||!r)&&j("Loading env from encrypted .env.vault");let s=l._parseVault(e),a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),l.populate(a,s,e),{parsed:s}}function G(e){let n=y.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug),a=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?r=e.encoding:s&&v("No encoding is specified. UTF-8 is used by default");let t=[n];if(e&&e.path)if(!Array.isArray(e.path))t=[k(e.path)];else{t=[];for(let u of e.path)t.push(k(u))}let o,i={};for(let u of t)try{let c=l.parse(b.readFileSync(u,{encoding:r}));l.populate(i,c,e)}catch(c){s&&v(`Failed to load ${u} ${c.message}`),o=c}let f=process.env;if(e&&e.processEnv!=null&&(f=e.processEnv),l.populate(f,i,e),s||!a){let u=Object.keys(i).length,c=[];for(let p of t)try{let h=y.relative(process.cwd(),p);c.push(h)}catch(h){s&&v(`Failed to load ${p} ${h.message}`),o=h}j(`injecting env (${u}) from ${c.join(",")}`)}return o?{parsed:i,error:o}:{parsed:i}}function J(e){if(A(e).length===0)return l.configDotenv(e);let n=x(e);return n?l._configVault(e):(B(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),l.configDotenv(e))}function Q(e,n){let r=Buffer.from(n.slice(-64),"hex"),s=Buffer.from(e,"base64"),a=s.subarray(0,12),t=s.subarray(-16);s=s.subarray(12,-16);try{let o=F.createDecipheriv("aes-256-gcm",r,a);return o.setAuthTag(t),`${o.update(s)}${o.final()}`}catch(o){let i=o instanceof RangeError,f=o.message==="Invalid key length",u=o.message==="Unsupported state or unable to authenticate data";if(i||f){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw o}}function H(e,n,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof n!="object"){let t=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw t.code="OBJECT_REQUIRED",t}for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)?(a===!0&&(e[t]=n[t]),s&&v(a===!0?`"${t}" is already defined and WAS overwritten`:`"${t}" is already defined and was NOT overwritten`)):e[t]=n[t]}var l={configDotenv:G,_configVault:W,_parseVault:U,config:J,decrypt:Q,parse:S,populate:H};d.exports.configDotenv=l.configDotenv;d.exports._configVault=l._configVault;d.exports._parseVault=l._parseVault;d.exports.config=l.config;d.exports.decrypt=l.decrypt;d.exports.parse=l.parse;d.exports.populate=l.populate;d.exports=l});m();var L=Y(K());async function oe(e){if(O(T`Reading the .env file at ${$.path(e)}`),!await V(e))throw new E(`The environment file at ${e} does not exist.`);let n=await N(e);return{path:e,variables:(0,L.parse)(n)}}function se(e,n){let r=[],s=e===null?[]:e.split(`
4
4
  `),a=[],t;for(let o of s){if(t){if(o.endsWith(t.quote)){let u=_(t.key,t.value+o.slice(0,-1),t.quote),c=n[t.key];c&&(a.push(t.key),u=_(t.key,c)),r.push(u),t=void 0}else t.value+=`${o}
5
5
  `;continue}let i=o.match(/^([^=:#]+?)[=:](.*)/),f=o;if(i){let u=i[1].trim(),c=(i[2]??"").trim();if(/^["'`]/.test(c)&&!c.endsWith(c[0])){t={key:u,value:`${c.slice(1)}
6
6
  `,quote:c[0]};continue}let p=n[u];p&&(a.push(u),f=_(u,p))}r.push(f)}if(t)throw new E(`Multi-line environment variable '${t.key}' is not properly enclosed.`);for(let[o,i]of Object.entries(n))a.includes(o)||r.push(_(o,i));return r.join(`
7
7
  `)}function _(e,n,r){if(r)return`${e}=${r}${n}${r}`;if(n?.includes(`
8
- `)){let s=['"',"'","`"].find(a=>!n.includes(a));if(!s)throw new E(`The environment file patch has an env value that can't be surrounded by quotes: ${n}`);return`${e}=${s}${n}${s}`}return`${e}=${n}`}export{oe as a,se as b,_ as c};
8
+ `)){let s=['"',"'","`"].find(a=>!n.includes(a));if(!s)throw new E(`The environment file patch has an env value that can't be surrounded by quotes: ${n}`);return`${e}=${s}${n}${s}`}return`${e}=${n}`}export{oe as a,se as b};
@@ -1 +1 @@
1
- import{e as c,f as m}from"./chunk-7E4MJCVE.js";import{g as F}from"./chunk-VKWPEFWQ.js";F();F();F();function o(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var S=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,B=["\x1B","\x9B"],E=e=>`${B[0]}[${e}m`,y=(e,t,a)=>{let i=[];e=[...e];for(let f of e){let s=f;f.includes(";")&&(f=f.split(";")[0][0]+"0");let r=m.codes.get(Number.parseInt(f,10));if(r){let n=e.indexOf(r.toString());n===-1?i.push(E(t?r:s)):e.splice(n,1)}else if(t){i.push(E(0));break}else i.push(E(s))}if(t&&(i=i.filter((f,s)=>i.indexOf(f)===s),a!==void 0)){let f=E(m.codes.get(Number.parseInt(a,10)));i=i.reduce((s,r)=>r===f?[r,...s]:[...s,r],[])}return i.join("")};function p(e,t,a){let i=[...e],f=[],s=typeof a=="number"?a:i.length,r=!1,n,u=0,l="";for(let[h,x]of i.entries()){let b=!1;if(B.includes(x)){let A=/\d[^m]*/.exec(e.slice(h,h+18));n=A&&A.length>0?A[0]:void 0,u<s&&(r=!0,n!==void 0&&f.push(n))}else r&&x==="m"&&(r=!1,b=!0);if(!r&&!b&&u++,!S.test(x)&&o(x.codePointAt())&&(u++,typeof a!="number"&&s++),u>t&&u<=s)l+=x;else if(u===t&&!r&&n!==void 0)l=y(f);else if(u>=s){l+=y(f,!0,n);break}}return l}function g(e,t,a){if(e.charAt(t)===" ")return t;let i=a?1:-1;for(let f=0;f<=3;f++){let s=t+f*i;if(e.charAt(s)===" ")return s}return t}function C(e,t,a={}){let{position:i="end",space:f=!1,preferTruncationOnSpace:s=!1}=a,{truncationCharacter:r="\u2026"}=a;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return r;let n=c(e);if(n<=t)return e;if(i==="start"){if(s){let u=g(e,n-t+1,!0);return r+p(e,u,n).trim()}return f===!0&&(r+=" "),r+p(e,n-t+c(r),n)}if(i==="middle"){f===!0&&(r=` ${r} `);let u=Math.floor(t/2);if(s){let l=g(e,u),h=g(e,n-(t-u)+1,!0);return p(e,0,l)+r+p(e,h,n).trim()}return p(e,0,u)+r+p(e,n-(t-u)+c(r),n)}if(i==="end"){if(s){let u=g(e,t-1);return p(e,0,u)+r}return f===!0&&(r=` ${r}`),p(e,0,t-c(r))+r}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${i}`)}export{o as a,C as b};
1
+ import{e as c,f as m}from"./chunk-7Y7AZRL3.js";import{g as F}from"./chunk-VKWPEFWQ.js";F();F();F();function o(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var S=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,B=["\x1B","\x9B"],E=e=>`${B[0]}[${e}m`,y=(e,t,a)=>{let i=[];e=[...e];for(let f of e){let s=f;f.includes(";")&&(f=f.split(";")[0][0]+"0");let r=m.codes.get(Number.parseInt(f,10));if(r){let n=e.indexOf(r.toString());n===-1?i.push(E(t?r:s)):e.splice(n,1)}else if(t){i.push(E(0));break}else i.push(E(s))}if(t&&(i=i.filter((f,s)=>i.indexOf(f)===s),a!==void 0)){let f=E(m.codes.get(Number.parseInt(a,10)));i=i.reduce((s,r)=>r===f?[r,...s]:[...s,r],[])}return i.join("")};function p(e,t,a){let i=[...e],f=[],s=typeof a=="number"?a:i.length,r=!1,n,u=0,l="";for(let[h,x]of i.entries()){let b=!1;if(B.includes(x)){let A=/\d[^m]*/.exec(e.slice(h,h+18));n=A&&A.length>0?A[0]:void 0,u<s&&(r=!0,n!==void 0&&f.push(n))}else r&&x==="m"&&(r=!1,b=!0);if(!r&&!b&&u++,!S.test(x)&&o(x.codePointAt())&&(u++,typeof a!="number"&&s++),u>t&&u<=s)l+=x;else if(u===t&&!r&&n!==void 0)l=y(f);else if(u>=s){l+=y(f,!0,n);break}}return l}function g(e,t,a){if(e.charAt(t)===" ")return t;let i=a?1:-1;for(let f=0;f<=3;f++){let s=t+f*i;if(e.charAt(s)===" ")return s}return t}function C(e,t,a={}){let{position:i="end",space:f=!1,preferTruncationOnSpace:s=!1}=a,{truncationCharacter:r="\u2026"}=a;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof e}`);if(typeof t!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof t}`);if(t<1)return"";if(t===1)return r;let n=c(e);if(n<=t)return e;if(i==="start"){if(s){let u=g(e,n-t+1,!0);return r+p(e,u,n).trim()}return f===!0&&(r+=" "),r+p(e,n-t+c(r),n)}if(i==="middle"){f===!0&&(r=` ${r} `);let u=Math.floor(t/2);if(s){let l=g(e,u),h=g(e,n-(t-u)+1,!0);return p(e,0,l)+r+p(e,h,n).trim()}return p(e,0,u)+r+p(e,n-(t-u)+c(r),n)}if(i==="end"){if(s){let u=g(e,t-1);return p(e,0,u)+r}return f===!0&&(r=` ${r}`),p(e,0,t-c(r))+r}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${i}`)}export{o as a,C as b};
@@ -0,0 +1,5 @@
1
+ import{a as U}from"./chunk-2CJQQQW4.js";import{c as I,i as _,j as A,q as D}from"./chunk-2RFCYZMG.js";import{e as k}from"./chunk-AQ34X5B3.js";import{a as q}from"./chunk-63UKZLPC.js";import{e as x}from"./chunk-QFWWCZOI.js";import{p as E,v as F}from"./chunk-KT5QQOES.js";import{b as O,c as j}from"./chunk-5AWELO3D.js";import{O as L}from"./chunk-V654BMS7.js";import{h as d}from"./chunk-J7BTC45S.js";import{Bb as p,_a as v,ka as S,ta as R,wb as w}from"./chunk-RIG66DIQ.js";import{b as t}from"./chunk-FZCGRIOM.js";import{b as X}from"./chunk-YTUUU33R.js";import{c as h,h as $}from"./chunk-IWTNUJGY.js";import{e as z,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();var J=t.object({name:t.string(),file:t.string().optional(),line:t.number().optional(),col:t.number().optional()}).passthrough(),N=t.object({type:t.enum(["O","C"]),at:t.number(),frame:t.number()}).passthrough(),H=t.object({name:t.string(),unit:t.enum(["bytes","microseconds","milliseconds","nanoseconds","none","seconds"]),startValue:t.number(),endValue:t.number()}),B=H.extend({type:t.literal("evented"),events:t.array(N)}).passthrough(),M=H.extend({type:t.literal("sampled"),samples:t.array(t.array(t.number())),weights:t.array(t.number())}).passthrough(),C=t.object({frames:t.array(J)}).passthrough(),T=t.object({$schema:t.literal("https://www.speedscope.app/file-format-schema.json"),shared:C,profiles:t.array(t.discriminatedUnion("type",[B,M])),name:t.string().optional(),exporter:t.string().optional(),activeProfileIndex:t.number().optional()}).passthrough().describe("The native Speedscope file format, defined by its $schema URL. Original keys and extension fields are preserved."),u=x({name:"ThemeProfileResult",schema:T,project:o=>o,definitions:{ProfileFrame:J,ProfileEvent:N,ProfileShared:C,EventedProfile:B,SampledProfile:M}});var g="https://storefront.invalid",K=200;async function W(o,e,r,s,a){if(r.startsWith("//")||!URL.canParse(r,g))throw new d(`${r} isn't a valid storefront URL.`,"Pass the path of a storefront page to --url, for example /products/classic-leather-jacket.");let n=await I(o)?await U(a,o.storeFqdn):void 0;if(s)throw new d("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let f=await D(e,o,s,n),m=Y(r),i=await A(f,{method:"GET",path:m.pathname,query:[...m.searchParams],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(i.status>=300&&i.status<400)throw new d(`The page ${r} redirects (${i.status}) instead of rendering, so it can't be profiled.`,Z(m,i.headers.get("Location")));if(i.status!==200){let y=await ee(i);throw new d(`Can't profile ${r}. The storefront responded with ${i.status}.${y}`)}let c=await i.text();return{result:T.parse(JSON.parse(c)),source:c}}function Y(o){let e=new URL(o,g);return Object.keys(_).forEach(r=>e.searchParams.delete(r)),e}function G(o){return`${o.pathname}${o.search}`}function Z(o,e){if(!e||!URL.canParse(e,g))return null;let r=Y(e);if(r.pathname==="/password")return"It redirects to the storefront password page. Check the storefront password, and pass it with --store-password.";let s=G(r),a=r.origin===g,n=a?s:r.href;return s===G(o)?`It redirects to ${n}.`:a?`It redirects to ${n}. Run the command again with --url "${s}".`:`It redirects to ${n}. If that page is on your storefront, run the command again with --url "${s}".`}async function ee(o){let e=o.headers.get("x-request-id"),r=e?`
2
+ Request ID: ${e}`:"",s=(await o.text()).trim(),a=o.headers.get("Content-Type")?.includes("application/json")??!1,f=s.length>0&&(a||s.length<=K)?`
3
+ ${s}`:"";return`${r}${f}`}l();l();import{fileURLToPath as te}from"node:url";async function V(...o){let e=await v("package.json",{cwd:te(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?h($(e),"assets",...o):h($(e),"dist","assets",...o)}async function Q({result:o,source:e},r){u.validate(o),r==="json"?w(e):await re(e)}async function re(o){let e=process.env.WSL_DISTRO_NAME,r=e?`//wsl$/${e}`:"",s=await V("speedscope","index.html");p(`[Theme Profile] Resolved URL to open: ${s}`);let a="liquid-profile",n=Buffer.from(o).toString("base64"),f=`speedscope.loadFileFromBase64(${JSON.stringify(a)}, ${JSON.stringify(n)})`,m=`speedscope-${Number(new Date)}-${process.pid}`,i=h(S(),`${m}.js`);p(`[Theme Profile] writing JS file to: ${i}`),await R(i,f),p(`[Theme Profile] JS file created successfully: ${i}`),s=`${r}${s}`,i=`${r}${i}`,s+=`#localProfilePath=${i}`;let c=h(S(),`${m}.html`);p(`[Theme Profile] writing HTML file to: ${c}`),await R(c,`<script>window.location=${JSON.stringify(s)}</script>`),p(`[Theme Profile] HTML file created successfully: ${c}`),c=`${r}${c}`,s=`file://${c}`,p(`[Theme Profile] Opening URL: ${s}`);let y=await L(s);p(`[Theme Profile] URL opened successfully: ${y}`)}var P=z(X(),1);var b=class extends F{static get jsonOutputSchema(){return u}static summary="Profile the Liquid rendering of a theme page.";static usage=["theme profile","theme profile --url /products/classic-leather-jacket"];static descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
4
+
5
+ This command will open a web page with the Speedscope profiler detailing the time spent executing Liquid on the given page.`;static description=this.descriptionForHelp();static flags={...O,...E,theme:P.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),url:P.Flags.string({description:"The path of the page to profile, with an optional query string. For a full URL, only the path and query string are used.",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":P.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),...j};static multiEnvironmentsFlags=null;async command(e,r,s=!1){let{password:a}=e,n;e.theme?n={filter:{theme:e.theme}}:n={filter:{live:!0}};let f=await q(r,n),m=`Generating Liquid profile for ${r.storeFqdn} ${e.url}`,i;return await k([{title:m,task:async()=>{i=await W(r,f.id.toString(),e.url,a,e["store-password"]),(!s||!e.json)&&await Q(i,e.json?"json":"text")}}]),i?.result}renderEnvironmentResults(e){w(u.encode({environments:e}))}};export{b as a};
@@ -0,0 +1 @@
1
+ import{D as c,J as p,M as o,U as S,j as f,t as h,w as y,z as g}from"./chunk-MNWT2SQO.js";import{h as a}from"./chunk-J7BTC45S.js";import{i as d}from"./chunk-IWTNUJGY.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();async function A(t,e){let r=c(t);if(await y(t.appDirectory,r))return;let{scan:s}=p(t,e),n=new a(`No app security check results for ${r} in ${t.appDirectory}.`,`Run \`${o(s)}\`.`);throw n.code="results-directory-not-found",n}async function q(t,e){await A(t,e);let r=h(t.appDirectory,c(t)),[s,n]=await Promise.all([b(r.deterministicFindingsPath,"deterministic"),b(r.agentFindingsPath,"agent")]),i=[v(s,"deterministic"),v(n,"agent")].filter(k=>k!==void 0);i.length>0&&D(i,p(t,e));let u=w(s),l=w(n);return{sources:{deterministic:u,agent:l},checks:f({deterministic:u?.document??null,agent:l?.document??null})}}async function b(t,e){return{path:t,result:await g(t,e)}}function v(t,e){if(t.result.status==="invalid")return{source:e,path:t.path,errors:t.result.errors}}function w(t){return t.result.status!=="ok"?null:{path:t.path,document:t.result.value}}function D(t,e){let r=t.length===1?"The app security check results could not be loaded because a results file is invalid.":"The app security check results could not be loaded because both results files are invalid.",s=[...t.map(i=>R(i.source,e,`${d(i.path)}.`)),["Or run",{command:o(e.clean)},"to delete both results files and start over."]],n=new a(r,null,s,t.map($));throw n.code="results-file-invalid",n.details={files:t.map(({path:i,errors:u})=>({path:S(i),errors:u}))},n}function R(t,e,r){return t==="deterministic"?["Run",{command:o(e.scan)},`to regenerate ${r}`]:["Have your coding agent run",{command:o(e.record)},`again to regenerate ${r}`]}function $(t){return{title:t.path,body:{list:{items:t.errors}}}}export{A as a,q as b};
@@ -0,0 +1 @@
1
+ import{a as $,c as M}from"./chunk-XDXHSGDL.js";import{d as N,f as Q,u as P}from"./chunk-5XOEMYEQ.js";import{a as C}from"./chunk-NPB753M3.js";import{a as G,c as q}from"./chunk-D4LFWIFE.js";import{b as L}from"./chunk-7AWAOPLA.js";import{b as X,c as j}from"./chunk-NCPZVARH.js";import{b as J,c as R}from"./chunk-5AWELO3D.js";import{A as w,C as k,J as x}from"./chunk-V654BMS7.js";import{a as S}from"./chunk-BN7ZXAZJ.js";import{h as p}from"./chunk-J7BTC45S.js";import{Sa as A,la as b,qb as m,sb as c,ta as E,wb as f}from"./chunk-RIG66DIQ.js";import{b as a}from"./chunk-FZCGRIOM.js";import{e as y,g as O}from"./chunk-IWTNUJGY.js";import{e as K,g as i}from"./chunk-VKWPEFWQ.js";i();i();var V=K(X(),1);async function Y(o,e){if(o)try{return JSON.parse(o)}catch(r){let t=r instanceof Error?r.message:"Unknown error";throw new p(c`Invalid JSON in ${m.yellow("--variables")} flag: ${t}`,"Please provide valid JSON format.")}else if(e){if(!await A(e))throw new p(c`Variable file not found at ${m.path(e)}. Please check the path and try again.`);let r=await b(e,{encoding:"utf8"});try{return JSON.parse(r)}catch(t){let s=t instanceof Error?t.message:"Unknown error";throw new p(c`Invalid JSON in variable file ${m.path(e)}: ${s}`,"Please provide valid JSON format.")}}}async function F(o){let{remoteApp:e,store:r,query:t,variables:s,variableFile:h,version:U}=o,{adminSession:H,version:W}=await x({title:c`Authenticating`,task:async()=>{let n=await $(e,r.shopDomain),d=await Q({adminSession:n,userSpecifiedVersion:U});return{adminSession:n,version:d}},renderOptions:{stdout:process.stderr}}),B=await Y(s,h);N(t),M(t,r);try{let n;return{status:"success",result:{data:await x({title:c`Executing GraphQL operation`,task:async()=>L({query:(0,V.parse)(t),session:H,variables:B,version:W,responseOptions:{handleErrors:!1,onResponse:u=>{n=u.extensions}}}),renderOptions:{stdout:process.stderr}}),...n===void 0?{}:{extensions:n}}}}catch(n){if(n instanceof j){let{errors:d,extensions:u,data:v}=n.response;return{status:"failed",details:{...d===void 0?{}:{errors:d},...u===void 0?{}:{extensions:u},...v===void 0?{}:{data:v}}}}throw n}}i();var z=a.unknown().and(a.record(a.unknown())),I=a.object({data:z.nullable().describe("Native GraphQL query data, preserving fields and aliases."),extensions:z.optional().describe("Native GraphQL response extensions, when supplied.")}).strict(),D=a.object({path:a.string().refine(O,"Expected an absolute filesystem path."),format:a.literal("json")}).strict().describe("Receipt for a written JSON file containing the GraphQL result, including data and optional extensions."),l=S({name:"AppExecuteResult",schema:a.union([I,D]),definitions:{AppExecuteGraphQLResult:I,AppExecuteFileReceipt:D}});i();async function T(o,e,r){if(o.status==="failed"){if(e==="json"){let s=new p("GraphQL operation failed.");throw s.details=o.details,s}k({headline:"GraphQL operation failed.",body:JSON.stringify({errors:o.details.errors},null,2)});return}let t=e==="json"?l.encode(o.result):JSON.stringify(o.result.data,null,2);r?(await E(r,t),e==="json"?f(l.encode({path:y(r),format:"json"})):w({headline:"Operation succeeded.",body:`Results written to ${r}`})):e==="json"?f(t):(w({headline:"Operation succeeded."}),f(t))}var g=class o extends C{static summary="Execute GraphQL queries and mutations.";static descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";static get jsonOutputSchema(){return l}static description=this.descriptionForHelp();static flags={...J,...G,...q,...R};async run(){let{flags:e}=await this.parse(o),{query:r,appContextResult:t,store:s}=await P(e),h=await F({organization:t.organization,remoteApp:t.remoteApp,store:s,query:r,variables:e.variables,variableFile:e["variable-file"],...e.version&&{version:e.version}});return await T(h,e.json?"json":"text",e["output-file"]),{app:t.app}}};export{g as a};
@@ -1,2 +1,2 @@
1
- import{Aa as f,Cb as e,Eb as r,Nb as n,Xa as o,ya as d}from"./chunk-62GA7XR3.js";import{c as i}from"./chunk-6IDEDOXW.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
1
+ import{Bb as n,Sa as o,qb as e,sb as r,ta as d,va as f}from"./chunk-RIG66DIQ.js";import{c as i}from"./chunk-IWTNUJGY.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
2
2
  *`)),t}export{c as a};
@@ -1,4 +1,4 @@
1
- import{b as i,c as r,d as p}from"./chunk-3N6NKC2U.js";import{b as s,c as e}from"./chunk-SUTVPAJF.js";import{b as o}from"./chunk-DCKRQZLE.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class u extends o{static summary="Disable automatic upgrades for Shopify CLI.";static descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
1
+ import{b as i,c as r,d as p}from"./chunk-IY5EI5V2.js";import{b as o}from"./chunk-OLKLHVHA.js";import{b as s,c as e}from"./chunk-5AWELO3D.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class u extends o{static summary="Disable automatic upgrades for Shopify CLI.";static descriptionWithMarkdown=`Disable automatic upgrades for Shopify CLI.
2
2
 
3
3
  When auto-upgrade is disabled, Shopify CLI won't automatically update. Run \`shopify upgrade\` to update manually.
4
4
 
@@ -0,0 +1 @@
1
+ import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="5.0.1";export{o as a};
@@ -0,0 +1,7 @@
1
+ import{a as F,b as c,c as P}from"./chunk-HF4NDEX3.js";import{a as I}from"./chunk-6PUU6ZNQ.js";import{a as S}from"./chunk-AQ34X5B3.js";import{a as w}from"./chunk-YY6TFARF.js";import{a as j}from"./chunk-63UKZLPC.js";import{e as g}from"./chunk-QFWWCZOI.js";import{p as v}from"./chunk-2NZ7GDDR.js";import{p as T,v as y}from"./chunk-KT5QQOES.js";import{b as d,c as b,f as n}from"./chunk-5AWELO3D.js";import{A as p,F as f}from"./chunk-V654BMS7.js";import{wb as a}from"./chunk-RIG66DIQ.js";import{b as h}from"./chunk-FZCGRIOM.js";import{b as k}from"./chunk-YTUUU33R.js";import{e as R,g as r}from"./chunk-VKWPEFWQ.js";r();r();var x=I.extend({changed:h.boolean(),theme:F}),s=g({name:"ThemePublishResult",schema:h.object({status:h.literal("success"),changed:h.boolean(),theme:c}).strict(),definitions:{Theme:c},project(t){let e=x.parse(t);return{status:e.status,changed:e.changed,theme:P(e.theme)}}});r();function O(t,e,m){if(e==="json"){a(s.encode(t.data));return}p({headline:m?`Environment: ${m}`:void 0,body:["The theme",...S(t.originalTheme),t.data.changed?"is now live at":"is already live at",{link:{label:t.previewUrl,url:t.previewUrl}},{char:"."}]})}r();async function M(t,e,m){let o=await j(t,{header:"Select a theme to publish",filter:{development:!1,live:!1,theme:e.theme}}),i=w({...o,role:"live"},t);return o.role==="live"?{data:{status:"success",changed:!1,theme:{...o,shop:t.storeFqdn}},originalTheme:o,previewUrl:i}:!e.force&&!m&&!await f({message:`Do you want to make '${o.name}' the new live theme on ${t.storeFqdn}?`,confirmationMessage:`Yes, make '${o.name}' the new live theme`,cancellationMessage:"No, cancel publish"})?void 0:{data:{status:"success",changed:!0,theme:{...await v(o.id,t),shop:t.storeFqdn}},originalTheme:o,previewUrl:i}}var u=R(k(),1);var l=class extends y{static get jsonOutputSchema(){return s}static summary="Set a remote theme as the live theme.";static descriptionWithMarkdown=`Publishes an unpublished theme from your theme library.
2
+
3
+ If no theme ID is specified, then you're prompted to select the theme that you want to publish from the list of themes in your store.
4
+
5
+ You can run this command only in a directory that matches the [default Shopify theme folder structure](https://shopify.dev/docs/themes/tools/cli#directory-structure).
6
+
7
+ If you want to publish your local theme, then you need to run \`shopify theme push\` first. You're asked to confirm that you want to publish the specified theme. You can skip this confirmation using the \`--force\` flag.`;static description=this.descriptionForHelp();static flags={...d,...b,...T,force:n(u.Flags.boolean({char:"f",description:"Skip confirmation.",env:"SHOPIFY_FLAG_FORCE"})),theme:n(u.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}))};static multiEnvironmentsFlags=["store","password","theme"];async command(e,m,o){let i=await M(m,e,o);if(!i){e.json&&!o&&a(s.encode({status:"cancelled"}));return}if(e.json&&o)return i.data;O(i,e.json?"json":"text",e.environment)}renderEnvironmentResults(e){a(s.encode({environments:e}))}};export{l as a};