shopify 5.0.2 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (526) hide show
  1. package/dist/analytics-QFDTQYPM.js +1 -0
  2. package/dist/analytics-XADBBHOH.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/chunk-24Q6X53V.js +1 -0
  5. package/dist/{chunk-LEHBZKK3.js → chunk-25MYHE4W.js} +1 -1
  6. package/dist/{chunk-TODZ3TJR.js → chunk-27JT4NA4.js} +1 -1
  7. package/dist/chunk-2BYW3BYX.js +1 -0
  8. package/dist/chunk-2KFYIYLI.js +1 -0
  9. package/dist/{chunk-D2KIGKBI.js → chunk-2KUM2RU4.js} +60 -60
  10. package/dist/chunk-2PD7TNFS.js +275 -0
  11. package/dist/{chunk-64G5TGFF.js → chunk-3C72S6LO.js} +1 -1
  12. package/dist/chunk-3FZ4LE6A.js +10 -0
  13. package/dist/{chunk-3MYDSQHF.js → chunk-3GD5ESWN.js} +1 -1
  14. package/dist/chunk-3KGN6N7E.js +1 -0
  15. package/dist/{chunk-KNWT7JLL.js → chunk-3MZ7ELHS.js} +2 -2
  16. package/dist/{chunk-PF53E2DC.js → chunk-3PS52ZT4.js} +1 -1
  17. package/dist/chunk-3PYDIBTX.js +1 -0
  18. package/dist/chunk-3Z75BVGJ.js +1 -0
  19. package/dist/chunk-4FWPOGPQ.js +1 -0
  20. package/dist/chunk-4IP37MBX.js +1 -0
  21. package/dist/chunk-4NFX7YCT.js +1 -0
  22. package/dist/chunk-4TCXPHKN.js +1 -0
  23. package/dist/chunk-4WBWZIN5.js +6 -0
  24. package/dist/chunk-5534MHZW.js +97 -0
  25. package/dist/{chunk-UKWIWCOH.js → chunk-5C6CXU74.js} +1 -1
  26. package/dist/{chunk-QEKGGTMN.js → chunk-5HOZDOJ7.js} +1 -1
  27. package/dist/{chunk-ER6C5WS3.js → chunk-5PSQFQL6.js} +1 -1
  28. package/dist/chunk-5T3ZT6CC.js +1 -0
  29. package/dist/chunk-62NW4EPI.js +17 -0
  30. package/dist/chunk-65NCQJYR.js +1 -0
  31. package/dist/{chunk-IHXGZW42.js → chunk-6BYHL3DS.js} +1 -1
  32. package/dist/chunk-6I7DT7QR.js +3 -0
  33. package/dist/chunk-6IMTMS2S.js +3 -0
  34. package/dist/chunk-7A77JCED.js +11 -0
  35. package/dist/chunk-7ART2IKU.js +1 -0
  36. package/dist/{chunk-I4CEH7AK.js → chunk-7BPT5V24.js} +2 -2
  37. package/dist/{chunk-Z2WAW6MM.js → chunk-7CT3NIXI.js} +1 -1
  38. package/dist/chunk-7DBKSSDK.js +1 -0
  39. package/dist/chunk-7HECBXSP.js +1 -0
  40. package/dist/chunk-7KID5BIR.js +4 -0
  41. package/dist/{chunk-2L6AN3QA.js → chunk-7N7KRZOM.js} +1 -1
  42. package/dist/{chunk-W37IFK3P.js → chunk-7NRHZG5Y.js} +102 -102
  43. package/dist/chunk-7PHDEILV.js +1 -0
  44. package/dist/chunk-A2NSORBM.js +2296 -0
  45. package/dist/chunk-A54TADAZ.js +1 -0
  46. package/dist/{chunk-YTUUU33R.js → chunk-AE3IQG7S.js} +1 -1
  47. package/dist/chunk-AGTUAQHX.js +4 -0
  48. package/dist/chunk-AHYI27QL.js +11 -0
  49. package/dist/chunk-ALINJ6J2.js +1 -0
  50. package/dist/chunk-AMVWKHNY.js +1 -0
  51. package/dist/{chunk-NVKJ7ZLP.js → chunk-ASKBYEO7.js} +1 -1
  52. package/dist/{chunk-62EOM3Y2.js → chunk-AVJJGQOP.js} +1 -1
  53. package/dist/{chunk-NXAEBGMO.js → chunk-AY3AAV77.js} +1 -1
  54. package/dist/{chunk-F3CK3EJJ.js → chunk-BFAOTQGH.js} +1 -1
  55. package/dist/{chunk-H6GNKWYM.js → chunk-BPKQA2EO.js} +1 -1
  56. package/dist/{chunk-WESTVWWD.js → chunk-C2HJEGTS.js} +1 -1
  57. package/dist/chunk-C72QNK6O.js +4 -0
  58. package/dist/chunk-CDSDQTNB.js +16 -0
  59. package/dist/chunk-CEQGOCKX.js +1 -0
  60. package/dist/{chunk-WCC52MR2.js → chunk-CIGWIKOW.js} +1 -1
  61. package/dist/chunk-CQAD5WML.js +1 -0
  62. package/dist/chunk-CRQQCT7F.js +1 -0
  63. package/dist/chunk-CZNUBAAG.js +3 -0
  64. package/dist/{chunk-ISKQQXLZ.js → chunk-D7IMC2G4.js} +1 -1
  65. package/dist/{chunk-6ES4KRFW.js → chunk-DC7ITY6T.js} +1 -1
  66. package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
  67. package/dist/{chunk-SLY27GDC.js → chunk-DDZYIC76.js} +2 -2
  68. package/dist/chunk-DGIIUQH3.js +1 -0
  69. package/dist/{chunk-3KM5ZOW2.js → chunk-DMOLPSXF.js} +1 -1
  70. package/dist/{chunk-LHXFTFFM.js → chunk-DOLVBTCB.js} +1 -1
  71. package/dist/{chunk-WBVS5NBV.js → chunk-DTKGI43P.js} +2 -2
  72. package/dist/{chunk-2WJOTJOD.js → chunk-DVD7I2TX.js} +2 -2
  73. package/dist/chunk-DVFVO6ZE.js +2 -0
  74. package/dist/{chunk-3XRI3D44.js → chunk-DXEMSLI6.js} +1 -1
  75. package/dist/chunk-EDWIWZWM.js +15 -0
  76. package/dist/chunk-ELR6AZT4.js +9 -0
  77. package/dist/chunk-EVQPYZ7F.js +5 -0
  78. package/dist/chunk-F5QKMDP3.js +1 -0
  79. package/dist/{chunk-URXM5A2K.js → chunk-F6IQWX2F.js} +1 -1
  80. package/dist/{chunk-SACNUF4I.js → chunk-FAVPTYIR.js} +1 -1
  81. package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
  82. package/dist/{chunk-Q4JYAUVL.js → chunk-FHKK3QU7.js} +1 -1
  83. package/dist/chunk-FKKJQGYX.js +7 -0
  84. package/dist/chunk-FQLXQ7WN.js +16 -0
  85. package/dist/{chunk-6PUU6ZNQ.js → chunk-FRWQJAW2.js} +1 -1
  86. package/dist/{chunk-J5ERDFIC.js → chunk-FU7PYW7H.js} +1 -1
  87. package/dist/{chunk-ESFCYB46.js → chunk-FYQE5E6U.js} +1 -1
  88. package/dist/chunk-G3EWGBXR.js +1 -0
  89. package/dist/chunk-G3RNO2TC.js +1 -0
  90. package/dist/{chunk-35XFNKNB.js → chunk-GGCP2TIK.js} +1 -1
  91. package/dist/chunk-GSFWBFFH.js +1 -0
  92. package/dist/{chunk-ZRI3SSLG.js → chunk-H2KGP2FM.js} +2 -2
  93. package/dist/{chunk-GW7YIJPJ.js → chunk-H4K3F7PP.js} +1 -1
  94. package/dist/chunk-HGZ2HRPO.js +13 -0
  95. package/dist/chunk-HMPRWNGG.js +203 -0
  96. package/dist/chunk-HP4QYSBQ.js +1 -0
  97. package/dist/{chunk-RPCIFYCY.js → chunk-HSTZV6H7.js} +2 -2
  98. package/dist/{chunk-N57Y7THE.js → chunk-HVUMVDUG.js} +1 -1
  99. package/dist/{chunk-XWSWXQCC.js → chunk-HYCNYUHW.js} +1 -1
  100. package/dist/{chunk-CXI3RHPW.js → chunk-I3WRA2LH.js} +1 -1
  101. package/dist/{chunk-UUAKOX7E.js → chunk-IRLYC626.js} +2 -2
  102. package/dist/chunk-IWNFPBH2.js +33 -0
  103. package/dist/{chunk-C3RFAKWR.js → chunk-JALDNBTU.js} +1 -1
  104. package/dist/{chunk-QDCLL5OI.js → chunk-JC37YZ4I.js} +1 -1
  105. package/dist/{chunk-QF5WKTPD.js → chunk-JG4FAT2T.js} +1 -1
  106. package/dist/chunk-JGLLABZR.js +8 -0
  107. package/dist/chunk-JIY6XWSC.js +1 -0
  108. package/dist/{chunk-3ODQKAEA.js → chunk-JIYCZXK5.js} +1 -1
  109. package/dist/chunk-JMSAHCBU.js +35 -0
  110. package/dist/{chunk-KZRLZWOU.js → chunk-JNSVKDBY.js} +1 -1
  111. package/dist/chunk-JQU2BJDH.js +3 -0
  112. package/dist/chunk-JVY6CCLE.js +3 -0
  113. package/dist/{chunk-BAHIL37I.js → chunk-K4QJEQI4.js} +1 -1
  114. package/dist/chunk-KCAWHJGF.js +1 -0
  115. package/dist/{chunk-YV2TP44L.js → chunk-KFO2JNF5.js} +1 -1
  116. package/dist/chunk-KFR7HWCG.js +9 -0
  117. package/dist/{chunk-MEYVUHQH.js → chunk-KHZF73BL.js} +1 -1
  118. package/dist/{chunk-LGXI7EGM.js → chunk-KM4LE7K4.js} +2 -2
  119. package/dist/{chunk-IILLQOUC.js → chunk-L2PUDV7Y.js} +1 -1
  120. package/dist/chunk-LFBFPK22.js +1 -0
  121. package/dist/{chunk-BN7ZXAZJ.js → chunk-LG3KEHGD.js} +2 -2
  122. package/dist/chunk-LGDWE3H3.js +1 -0
  123. package/dist/chunk-LPPEAMI6.js +1 -0
  124. package/dist/chunk-LXIWMYM4.js +1 -0
  125. package/dist/chunk-MGWCXTGD.js +1 -0
  126. package/dist/chunk-MGX7UG44.js +1 -0
  127. package/dist/chunk-MKFRKNHF.js +3 -0
  128. package/dist/chunk-MTT6EAQO.js +1 -0
  129. package/dist/{chunk-SIL6HPMK.js → chunk-MU7IVBGI.js} +2 -2
  130. package/dist/{chunk-QEVTBD33.js → chunk-MYMBHVC4.js} +1 -1
  131. package/dist/chunk-MZDBH4XV.js +4 -0
  132. package/dist/{chunk-Q5IC3IYY.js → chunk-NUBJ2HK7.js} +1 -1
  133. package/dist/{chunk-3Z3MADXZ.js → chunk-NY5N4ANL.js} +1 -1
  134. package/dist/{chunk-WRZWHT6M.js → chunk-NYMKGE3J.js} +1 -1
  135. package/dist/{chunk-CX5CC6P5.js → chunk-O472FAYX.js} +1 -1
  136. package/dist/chunk-O7HZ3EIP.js +1 -0
  137. package/dist/chunk-OJOF6IYG.js +9 -0
  138. package/dist/{chunk-UXVXVI6O.js → chunk-ONZULPQH.js} +68 -66
  139. package/dist/chunk-ORMXPSJM.js +1 -0
  140. package/dist/chunk-ORYEDUKM.js +5 -0
  141. package/dist/{chunk-T4XJKM6B.js → chunk-OTMYJWIP.js} +1 -1
  142. package/dist/chunk-OVJVFB5E.js +20 -0
  143. package/dist/chunk-OWQEFORZ.js +1 -0
  144. package/dist/{chunk-UBP3LQFY.js → chunk-OXPEBT4I.js} +2 -2
  145. package/dist/chunk-OXZR2MB4.js +6 -0
  146. package/dist/chunk-OY5M52EF.js +6 -0
  147. package/dist/{chunk-2A2JSAAA.js → chunk-PJZZZNWR.js} +1 -1
  148. package/dist/chunk-Q2LQJYRK.js +16 -0
  149. package/dist/chunk-QBRRFFMZ.js +1 -0
  150. package/dist/{chunk-AQKWPRZE.js → chunk-QCLE5REL.js} +2 -2
  151. package/dist/{chunk-43R5VGKT.js → chunk-QGQWVA7N.js} +1 -1
  152. package/dist/chunk-QKPAB245.js +1 -0
  153. package/dist/chunk-QUPZOBTB.js +1 -0
  154. package/dist/chunk-R4E2E4NN.js +1 -0
  155. package/dist/{chunk-CGVROSPS.js → chunk-R6US7F33.js} +1 -1
  156. package/dist/chunk-RKNVTEO3.js +5 -0
  157. package/dist/{chunk-7CCTPBCT.js → chunk-RLOEI6VE.js} +1 -1
  158. package/dist/chunk-RSZAAN37.js +1 -0
  159. package/dist/{chunk-WBJ6ZHYH.js → chunk-S3RROJGG.js} +37 -37
  160. package/dist/chunk-S4KNPCW3.js +81 -0
  161. package/dist/{chunk-26PWHH3B.js → chunk-SBN3ILXO.js} +1 -1
  162. package/dist/chunk-SCDGLREP.js +1 -0
  163. package/dist/chunk-SHOMIS6Q.js +2 -0
  164. package/dist/chunk-SN3PMWUF.js +6 -0
  165. package/dist/chunk-SODCXZ5U.js +1 -0
  166. package/dist/chunk-SPJM7RTD.js +1 -0
  167. package/dist/chunk-SQL67BKI.js +5 -0
  168. package/dist/{chunk-AQ6EVL73.js → chunk-SURFUFAZ.js} +1 -1
  169. package/dist/{chunk-SNH4XZ6E.js → chunk-SVQDMZJO.js} +1 -1
  170. package/dist/chunk-T4ZOTYOY.js +1 -0
  171. package/dist/chunk-T6C4WC3Z.js +2 -0
  172. package/dist/chunk-TD6JBHUS.js +1 -0
  173. package/dist/chunk-TIM4CIXZ.js +22 -0
  174. package/dist/{chunk-B2O3ANRZ.js → chunk-TP7CTMMT.js} +1 -1
  175. package/dist/chunk-TSPJAMYB.js +1 -0
  176. package/dist/chunk-TSVEV2UD.js +26 -0
  177. package/dist/{chunk-ZBL7XMJ6.js → chunk-TTAT62N3.js} +2 -2
  178. package/dist/{chunk-S5P7KWY4.js → chunk-TUSS6PXB.js} +1 -1
  179. package/dist/chunk-TXP6KFWO.js +5 -0
  180. package/dist/chunk-TZHVCMZN.js +6 -0
  181. package/dist/chunk-UC4TOM36.js +3 -0
  182. package/dist/{chunk-RPVZ2JON.js → chunk-UFY4L5KQ.js} +1 -1
  183. package/dist/chunk-UU6UQ2QY.js +1 -0
  184. package/dist/chunk-V4FC72R6.js +1 -0
  185. package/dist/chunk-VA2S7W7H.js +10 -0
  186. package/dist/chunk-VE3IIC7H.js +1 -0
  187. package/dist/{chunk-PTSCGSQV.js → chunk-VJG7VXFU.js} +2 -2
  188. package/dist/chunk-VQSRU5XL.js +4 -0
  189. package/dist/chunk-VRIFLMA3.js +70 -0
  190. package/dist/chunk-WBJFTCEJ.js +1 -0
  191. package/dist/chunk-WBPP6PO7.js +31 -0
  192. package/dist/chunk-WE5KY6T6.js +1 -0
  193. package/dist/chunk-WFPVT2IY.js +1 -0
  194. package/dist/{chunk-PLSS456F.js → chunk-WLYXBQ2M.js} +1 -1
  195. package/dist/chunk-WNVOEE6T.js +7 -0
  196. package/dist/chunk-WPDJVUTY.js +47 -0
  197. package/dist/chunk-WWCYEZUU.js +1 -0
  198. package/dist/chunk-WWVDZ3GC.js +3 -0
  199. package/dist/{chunk-4KECSZTL.js → chunk-WZBZ7FWP.js} +2 -2
  200. package/dist/chunk-XEZPN5TR.js +22 -0
  201. package/dist/{chunk-QW52RPAU.js → chunk-XLMKHTJ5.js} +1 -1
  202. package/dist/chunk-XRNBCV2B.js +1 -0
  203. package/dist/{chunk-67L7FIB6.js → chunk-XWLNCBAG.js} +1 -1
  204. package/dist/chunk-YF4AXKM4.js +1 -0
  205. package/dist/chunk-YKDRUAY3.js +857 -0
  206. package/dist/{chunk-YSWVYPWR.js → chunk-YNFQBYSL.js} +1 -1
  207. package/dist/{chunk-TFPW2VGN.js → chunk-YNZLLZU2.js} +1 -1
  208. package/dist/chunk-YOYPYB4H.js +1 -0
  209. package/dist/{chunk-HF4NDEX3.js → chunk-YR4J46US.js} +1 -1
  210. package/dist/chunk-YTL45RXR.js +103 -0
  211. package/dist/chunk-YVPB7OT6.js +6 -0
  212. package/dist/chunk-YYWSHRO2.js +89 -0
  213. package/dist/{chunk-DZKFP6H2.js → chunk-Z5QEXS6F.js} +1 -1
  214. package/dist/chunk-Z5WFRYVQ.js +6 -0
  215. package/dist/{chunk-PWAT52M4.js → chunk-Z6ZRS256.js} +1 -1
  216. package/dist/chunk-ZMOW2YZ4.js +18 -0
  217. package/dist/chunk-ZMU4EYXT.js +1 -0
  218. package/dist/{chunk-ACA2BGAD.js → chunk-ZNEPRGFY.js} +1 -1
  219. package/dist/chunk-ZXZWMXXK.js +7 -0
  220. package/dist/cli/commands/app/build.js +1 -1
  221. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  222. package/dist/cli/commands/app/bulk/execute.js +1 -1
  223. package/dist/cli/commands/app/bulk/status.js +1 -1
  224. package/dist/cli/commands/app/config/link.js +1 -1
  225. package/dist/cli/commands/app/config/pull.js +1 -1
  226. package/dist/cli/commands/app/config/use.js +1 -1
  227. package/dist/cli/commands/app/config/validate.js +1 -1
  228. package/dist/cli/commands/app/demo/watcher.js +1 -1
  229. package/dist/cli/commands/app/deploy.js +1 -1
  230. package/dist/cli/commands/app/dev/clean.js +1 -1
  231. package/dist/cli/commands/app/dev.js +1 -1
  232. package/dist/cli/commands/app/env/pull.js +1 -1
  233. package/dist/cli/commands/app/env/show.js +1 -1
  234. package/dist/cli/commands/app/execute.js +1 -1
  235. package/dist/cli/commands/app/function/build.js +1 -1
  236. package/dist/cli/commands/app/function/info.js +1 -1
  237. package/dist/cli/commands/app/function/replay.js +1 -1
  238. package/dist/cli/commands/app/function/run.js +1 -1
  239. package/dist/cli/commands/app/function/schema.js +1 -1
  240. package/dist/cli/commands/app/function/typegen.js +1 -1
  241. package/dist/cli/commands/app/generate/extension.js +1 -1
  242. package/dist/cli/commands/app/graphiql.js +1 -1
  243. package/dist/cli/commands/app/import/channel-config.js +1 -1
  244. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  245. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  246. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  247. package/dist/cli/commands/app/import-extensions.js +1 -1
  248. package/dist/cli/commands/app/info.js +1 -1
  249. package/dist/cli/commands/app/init.js +1 -1
  250. package/dist/cli/commands/app/logs-next.js +1 -0
  251. package/dist/cli/commands/app/logs.js +1 -1
  252. package/dist/cli/commands/app/release.js +1 -1
  253. package/dist/cli/commands/app/security/check.js +1 -1
  254. package/dist/cli/commands/app/security/clean.js +1 -1
  255. package/dist/cli/commands/app/security/instructions.js +1 -1
  256. package/dist/cli/commands/app/security/record.js +1 -1
  257. package/dist/cli/commands/app/security/review.js +1 -1
  258. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  259. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  260. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  261. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  262. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  263. package/dist/cli/commands/app/versions/list.js +1 -1
  264. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  265. package/dist/cli/commands/auth/login.d.ts +10 -10
  266. package/dist/cli/commands/auth/login.js +1 -1
  267. package/dist/cli/commands/auth/logout.d.ts +7 -7
  268. package/dist/cli/commands/auth/logout.js +1 -1
  269. package/dist/cli/commands/cache/clear.js +1 -1
  270. package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -7
  271. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  272. package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -7
  273. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  274. package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -7
  275. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  276. package/dist/cli/commands/debug/command-flags.js +1 -1
  277. package/dist/cli/commands/doc/fetch.d.ts +21 -21
  278. package/dist/cli/commands/doc/fetch.js +1 -1
  279. package/dist/cli/commands/doc/search.d.ts +23 -23
  280. package/dist/cli/commands/doc/search.js +1 -1
  281. package/dist/cli/commands/docs/generate.js +1 -1
  282. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  283. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  284. package/dist/cli/commands/help.d.ts +90 -90
  285. package/dist/cli/commands/help.js +1 -1
  286. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  287. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  288. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  289. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  290. package/dist/cli/commands/notifications/generate.js +1 -1
  291. package/dist/cli/commands/notifications/list.js +1 -1
  292. package/dist/cli/commands/organization/list.js +1 -1
  293. package/dist/cli/commands/search.d.ts +7 -7
  294. package/dist/cli/commands/search.js +1 -1
  295. package/dist/cli/commands/send-analytics.js +1 -1
  296. package/dist/cli/commands/theme/check.js +1 -1
  297. package/dist/cli/commands/theme/console.js +1 -1
  298. package/dist/cli/commands/theme/delete.js +1 -1
  299. package/dist/cli/commands/theme/dev.js +1 -1
  300. package/dist/cli/commands/theme/duplicate.js +1 -1
  301. package/dist/cli/commands/theme/info.js +1 -1
  302. package/dist/cli/commands/theme/init.js +1 -1
  303. package/dist/cli/commands/theme/language-server.js +1 -1
  304. package/dist/cli/commands/theme/list.js +1 -1
  305. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  306. package/dist/cli/commands/theme/open.js +1 -1
  307. package/dist/cli/commands/theme/package.js +1 -1
  308. package/dist/cli/commands/theme/preview.js +1 -1
  309. package/dist/cli/commands/theme/profile.js +1 -1
  310. package/dist/cli/commands/theme/publish.js +1 -1
  311. package/dist/cli/commands/theme/pull.js +1 -1
  312. package/dist/cli/commands/theme/push.js +1 -1
  313. package/dist/cli/commands/theme/rename.js +1 -1
  314. package/dist/cli/commands/theme/share.js +1 -1
  315. package/dist/cli/commands/upgrade.d.ts +24 -24
  316. package/dist/cli/commands/upgrade.js +1 -1
  317. package/dist/cli/commands/version.d.ts +7 -7
  318. package/dist/cli/commands/version.js +1 -1
  319. package/dist/cli/help.js +1 -1
  320. package/dist/cli-version-check-V25AVSZ6.js +1 -0
  321. package/dist/{command-event-context-LFUZ7UCA.js → command-event-context-ILIANB5Q.js} +1 -1
  322. package/dist/command-json-schema-C5UZXP2W.js +1 -0
  323. package/dist/command-registry.js +1 -1
  324. package/dist/conf-store-OCGEEV4U.js +1 -0
  325. package/dist/custom-oclif-loader-ZVUKMRGH.js +1 -0
  326. package/dist/data/filters.json +41 -2
  327. package/dist/data/local_block_entry.json +1 -1
  328. package/dist/data/manifest_theme.json +1 -0
  329. package/dist/data/objects.json +78 -36
  330. package/dist/data/section.json +1 -1
  331. package/dist/data/shopify_system_translations.json +240 -23
  332. package/dist/data/strict_settings.json +24 -0
  333. package/dist/data/tags.json +57 -24
  334. package/dist/data/theme_block.json +1 -1
  335. package/dist/deprecations-A5AXXKIK.js +1 -0
  336. package/dist/dist-NORLLIHQ.js +1 -0
  337. package/dist/dist-XBM4XZS4.js +1 -0
  338. package/dist/environment-5P7JJ3GI.js +1 -0
  339. package/dist/environments-Y5JEI3U3.js +1 -0
  340. package/dist/error-GI4DXVDU.js +1 -0
  341. package/dist/error-handler-BS2ZENQV.js +1 -0
  342. package/dist/fs-UOOLPOHJ.js +1 -0
  343. package/dist/hooks/did-you-mean.js +1 -1
  344. package/dist/hooks/hydrogen-init.js +1 -1
  345. package/dist/hooks/plugin-plugins.js +1 -1
  346. package/dist/hooks/postrun.js +1 -1
  347. package/dist/hooks/prerun.js +2 -2
  348. package/dist/hooks/public-metadata.js +1 -1
  349. package/dist/hooks/sensitive-metadata.js +1 -1
  350. package/dist/hooks/tunnel-provider.js +1 -1
  351. package/dist/hooks/tunnel-start.js +1 -1
  352. package/dist/http-2OXOS2AW.js +1 -0
  353. package/dist/http-proxy-node16-NZZ674YW.js +38 -0
  354. package/dist/index.js +12 -12
  355. package/dist/is-global-CI77T7NE.js +1 -0
  356. package/dist/json-error-6PBUR4LQ.js +1 -0
  357. package/dist/latest-version-75YEFEMK.js +9 -0
  358. package/dist/lib-4JVADMNT.js +1 -0
  359. package/dist/lib-L4STV5B2.js +1 -0
  360. package/dist/lib-LEEN55OD.js +1 -0
  361. package/dist/{local-OKPVB4NH.js → local-5NIWPWDS.js} +1 -1
  362. package/dist/metadata-IXPNNPNJ.js +1 -0
  363. package/dist/{morph-CRY35DIK.js → morph-H7XQP55V.js} +3 -3
  364. package/dist/node-package-manager-ALFEGGD6.js +1 -0
  365. package/dist/notifications-system-FQW3GKH2.js +1 -0
  366. package/dist/{npa-A4YSCQ5Q.js → npa-LVYMN7GE.js} +1 -1
  367. package/dist/os-6TNQTEUN.js +1 -0
  368. package/dist/output-LEOB5LAM.js +1 -0
  369. package/dist/{prettier-EGVCP5CY.js → prettier-VLTY4MIE.js} +1 -1
  370. package/dist/registry-auth-token-EDH77OOW.js +1 -0
  371. package/dist/registry-url-JMNV3LLX.js +1 -0
  372. package/dist/semver-HHZRKD6Y.js +1 -0
  373. package/dist/system-J4CTESP5.js +1 -0
  374. package/dist/tsconfig.tsbuildinfo +1 -1
  375. package/dist/ui-YDUI56E3.js +1 -0
  376. package/dist/upgrade-LBCZORG2.js +1 -0
  377. package/dist/version-2YL4YEQ2.js +1 -0
  378. package/dist/version-X2CPQVWQ.js +1 -0
  379. package/dist/workerd-5UPTEWNI.js +18 -0
  380. package/oclif.manifest.json +25622 -1132
  381. package/package.json +7 -7
  382. package/dist/analytics-NMMVOF4B.js +0 -1
  383. package/dist/analytics-UK77WNLG.js +0 -1
  384. package/dist/chunk-224UPIYS.js +0 -4
  385. package/dist/chunk-27NXPOAS.js +0 -1
  386. package/dist/chunk-2MT3LSMZ.js +0 -1
  387. package/dist/chunk-2T4HDR6R.js +0 -70
  388. package/dist/chunk-2ZBXHCQZ.js +0 -1
  389. package/dist/chunk-335BUVBP.js +0 -1
  390. package/dist/chunk-33ZE3DRQ.js +0 -16
  391. package/dist/chunk-34MOWGRL.js +0 -1
  392. package/dist/chunk-3JSKNXL7.js +0 -1
  393. package/dist/chunk-3MG4MTWQ.js +0 -1
  394. package/dist/chunk-4WYKPIN3.js +0 -1
  395. package/dist/chunk-5AEZJZNQ.js +0 -1
  396. package/dist/chunk-5ED7SOQZ.js +0 -20
  397. package/dist/chunk-5IDJALJH.js +0 -1
  398. package/dist/chunk-66TMIQMB.js +0 -1
  399. package/dist/chunk-74NRFUGQ.js +0 -1
  400. package/dist/chunk-7GUMJ5E4.js +0 -1
  401. package/dist/chunk-7NFTSBHQ.js +0 -10
  402. package/dist/chunk-ACZNWIRY.js +0 -1
  403. package/dist/chunk-AUE7LM32.js +0 -1
  404. package/dist/chunk-AXL2VIWA.js +0 -16
  405. package/dist/chunk-B3ZJGYZY.js +0 -3
  406. package/dist/chunk-BOAGJ6P5.js +0 -1
  407. package/dist/chunk-BWN2QG6D.js +0 -5
  408. package/dist/chunk-CCUQM4FX.js +0 -6
  409. package/dist/chunk-CLUUA3HX.js +0 -3
  410. package/dist/chunk-CYEEGTVZ.js +0 -11
  411. package/dist/chunk-DBDTE3EE.js +0 -5
  412. package/dist/chunk-DLVB3237.js +0 -31
  413. package/dist/chunk-DN6X7SHW.js +0 -2
  414. package/dist/chunk-E5COIKGY.js +0 -5
  415. package/dist/chunk-E6RONHMT.js +0 -1
  416. package/dist/chunk-EAZIQI2D.js +0 -1
  417. package/dist/chunk-EEY4FKAW.js +0 -1
  418. package/dist/chunk-EKFPTBXC.js +0 -1
  419. package/dist/chunk-FEBOZ2XX.js +0 -31
  420. package/dist/chunk-FFSDGRAN.js +0 -1
  421. package/dist/chunk-FZCGRIOM.js +0 -1
  422. package/dist/chunk-GNCVDN7U.js +0 -1
  423. package/dist/chunk-GQLNG537.js +0 -836
  424. package/dist/chunk-GVI3DWSB.js +0 -4
  425. package/dist/chunk-H6GYBLVQ.js +0 -2
  426. package/dist/chunk-HB3MJYBK.js +0 -1
  427. package/dist/chunk-HSKDFEXW.js +0 -1
  428. package/dist/chunk-HTRJU4R4.js +0 -1
  429. package/dist/chunk-HXZAY5OA.js +0 -1
  430. package/dist/chunk-I7PEEJVH.js +0 -1
  431. package/dist/chunk-IHMATNOR.js +0 -1
  432. package/dist/chunk-IJY3RJPJ.js +0 -47
  433. package/dist/chunk-J3JPJCWP.js +0 -1
  434. package/dist/chunk-J55GQLP4.js +0 -1
  435. package/dist/chunk-JLQRDFR5.js +0 -18
  436. package/dist/chunk-JPWRZ5SL.js +0 -16
  437. package/dist/chunk-K7ZSPQKL.js +0 -4
  438. package/dist/chunk-L5TSPCSY.js +0 -26
  439. package/dist/chunk-LUGMXSRI.js +0 -9
  440. package/dist/chunk-M2CWCOFU.js +0 -11
  441. package/dist/chunk-M5VIFG2V.js +0 -1
  442. package/dist/chunk-MADINS4Z.js +0 -1
  443. package/dist/chunk-MGHPF7HU.js +0 -6
  444. package/dist/chunk-MHR5OHT5.js +0 -10
  445. package/dist/chunk-MXEXP3HT.js +0 -15
  446. package/dist/chunk-OJULL7HT.js +0 -1
  447. package/dist/chunk-OMPQ7REW.js +0 -3
  448. package/dist/chunk-OR4IJ4BQ.js +0 -1
  449. package/dist/chunk-P2RMFHQP.js +0 -1
  450. package/dist/chunk-P4VZYOKO.js +0 -15
  451. package/dist/chunk-PDZBKVWL.js +0 -97
  452. package/dist/chunk-Q2KWXZQB.js +0 -12
  453. package/dist/chunk-QFSENE5T.js +0 -3
  454. package/dist/chunk-QFWWCZOI.js +0 -1
  455. package/dist/chunk-QFYLJVJW.js +0 -77
  456. package/dist/chunk-QQJNQNKP.js +0 -6
  457. package/dist/chunk-R4UVIYZP.js +0 -4
  458. package/dist/chunk-RLNIOJH3.js +0 -272
  459. package/dist/chunk-RW6G4ZPU.js +0 -1
  460. package/dist/chunk-S4LOWCGS.js +0 -1
  461. package/dist/chunk-SB27UOXX.js +0 -1
  462. package/dist/chunk-SHD4VV5V.js +0 -3
  463. package/dist/chunk-SK7EPN6C.js +0 -1
  464. package/dist/chunk-TAWCKJKP.js +0 -1
  465. package/dist/chunk-U2T5HPRD.js +0 -319
  466. package/dist/chunk-U6YOP562.js +0 -1
  467. package/dist/chunk-UPPO3BMT.js +0 -7
  468. package/dist/chunk-USXIXANP.js +0 -103
  469. package/dist/chunk-UV5GAGAD.js +0 -1
  470. package/dist/chunk-UY6W2EVZ.js +0 -1
  471. package/dist/chunk-UYELAINQ.js +0 -16
  472. package/dist/chunk-V75WUEFU.js +0 -1
  473. package/dist/chunk-VAVXDIUX.js +0 -6
  474. package/dist/chunk-VEUKT5EI.js +0 -6
  475. package/dist/chunk-VGSH52JM.js +0 -1
  476. package/dist/chunk-VHZ6RL67.js +0 -1
  477. package/dist/chunk-VQA3X7O3.js +0 -1
  478. package/dist/chunk-VZCMJRYV.js +0 -1
  479. package/dist/chunk-W56ZGEQQ.js +0 -2265
  480. package/dist/chunk-WSDKCQH6.js +0 -6
  481. package/dist/chunk-X2PFXSU4.js +0 -1
  482. package/dist/chunk-X5NIAZA4.js +0 -1
  483. package/dist/chunk-XBMD3FEZ.js +0 -3
  484. package/dist/chunk-XDVPIGXE.js +0 -2
  485. package/dist/chunk-XLIJYJ6Q.js +0 -1
  486. package/dist/chunk-XUHGWIWW.js +0 -4
  487. package/dist/chunk-Y55T4IIQ.js +0 -7
  488. package/dist/chunk-Y5CVX5LJ.js +0 -1
  489. package/dist/chunk-Y6J46XYF.js +0 -3
  490. package/dist/chunk-YKMINHYY.js +0 -3
  491. package/dist/chunk-ZDQO6CNY.js +0 -1
  492. package/dist/chunk-ZGASBRSQ.js +0 -5
  493. package/dist/chunk-ZGBTO46A.js +0 -1
  494. package/dist/chunk-ZJOX5HW4.js +0 -22
  495. package/dist/chunk-ZOOT3GBY.js +0 -5
  496. package/dist/command-json-schema-F5XF7XHL.js +0 -1
  497. package/dist/conf-store-5CBLWTOC.js +0 -1
  498. package/dist/custom-oclif-loader-UDVUFKMD.js +0 -1
  499. package/dist/deprecations-EOHPSTCS.js +0 -1
  500. package/dist/dist-RNV3GFZ7.js +0 -1
  501. package/dist/dist-ZFKWJVNB.js +0 -1
  502. package/dist/environment-O7ECODHU.js +0 -1
  503. package/dist/environments-4FLRZW4P.js +0 -1
  504. package/dist/error-JY2ADS6S.js +0 -1
  505. package/dist/error-handler-4GCXKC6I.js +0 -1
  506. package/dist/fs-XS5YF34R.js +0 -1
  507. package/dist/http-proxy-node16-D3JUYA5D.js +0 -38
  508. package/dist/is-global-27MUENOK.js +0 -1
  509. package/dist/json-error-S5XFS3UX.js +0 -1
  510. package/dist/latest-version-LDWU5F7A.js +0 -49
  511. package/dist/lib-PJHT4MKY.js +0 -1
  512. package/dist/lib-VKSQ65BQ.js +0 -1
  513. package/dist/lib-YEZOHXF3.js +0 -1
  514. package/dist/metadata-2YJBAKR7.js +0 -1
  515. package/dist/node-package-manager-B3OW3PFQ.js +0 -1
  516. package/dist/notifications-system-BWTDYBG2.js +0 -1
  517. package/dist/os-F6QKJCFW.js +0 -1
  518. package/dist/output-BRIPK7UC.js +0 -1
  519. package/dist/system-466QKFDI.js +0 -1
  520. package/dist/ui-VJTNGCS6.js +0 -1
  521. package/dist/upgrade-VHVJLXKX.js +0 -1
  522. package/dist/version-FETZRLZO.js +0 -1
  523. package/dist/version-T4XXTJMB.js +0 -1
  524. package/dist/workerd-32DMKLMN.js +0 -18
  525. /package/dist/{chunk-YLQ3LNNY.js → chunk-2S3FHQFS.js} +0 -0
  526. /package/dist/{chunk-YRHFPXC3.js → chunk-Z2AV4BWZ.js} +0 -0
@@ -1,4 +0,0 @@
1
- import{a as he,b as fe,c as ge,d as _}from"./chunk-JPWRZ5SL.js";import{a as q}from"./chunk-V75WUEFU.js";import{a as pe}from"./chunk-X5NIAZA4.js";import{B as ne,C as S,D as se,F as oe,G as re,H as ce,I as ae,J as le,K as ue,L as de,M as m,O as y,P as k,Q as j,R as w,S as v,T as F,U as C,V as me,W as $,X as ye,Y as T,Z as R,_ as be,a as z,c as Q,d as D,g as X,i as Z,p as ee,t as te,u as ie}from"./chunk-W56ZGEQQ.js";import{b as K}from"./chunk-ZJOX5HW4.js";import{b as J,c as V}from"./chunk-3KM5ZOW2.js";import{A as M,B as p,C as Y,E as H,W as b,z as P}from"./chunk-D2KIGKBI.js";import{a as U}from"./chunk-BN7ZXAZJ.js";import{na as B,wb as g}from"./chunk-JLQRDFR5.js";import{b as r}from"./chunk-FZCGRIOM.js";import{b as Ne}from"./chunk-YTUUU33R.js";import{f as d,p as W}from"./chunk-IWTNUJGY.js";import{e as Ge,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();function Se(e,t){if(t==="none")return 0;let i=e.scan.issues.filter(n=>D[n.severity]>=D[t]);return new Set(i.map(n=>n.id)).size}async function ke({includeDirs:e,excludePatterns:t,noGitIgnore:i,...n}){let s=Date.now();return{...await Z(n,{includeDirs:e,excludePatterns:t,noGitIgnore:i}),elapsedMilliseconds:Date.now()-s}}function we({includeDirs:e,excludePatterns:t,noGitIgnore:i,...n}){return X(n,{includeDirs:e,excludePatterns:t,noGitIgnore:i})}var Oe={resolveSelection:oe,execute:ke,listFiles:we,writeArtifacts:ie,canPrompt:b,recordMetadata:pe};async function G(e,t=Oe){let i=await re(e.includeDirs),n=await t.resolveSelection({path:e.directory,config:e.configName,clientId:e.clientId,withoutAppConfig:e.withoutAppConfig,allowPrompts:!e.listFiles&&t.canPrompt(),validateClientIdFlag:!0});if(n.kind==="declined")return{kind:"cancelled"};let{appDirectory:s}=n,o={include_dirs:[...e.includeDirs],excludes:[...e.excludePatterns],no_git_ignore:e.noGitIgnore},c=le(n,e.directory,o);(n.kind==="no-config"?!e.withoutAppConfig:n.appConfigFilePicked===!0)&&e.onSelectionPrompted?.(c);let I=n.kind==="config"?n.appConfigDirectories??[]:[],{scanDirectories:x,requestedScanDirectories:Te}=ce(s,i,I),A={selection:n,resultsKey:se(n),commands:c,scope:o,scanDirectories:x},L={appDirectory:s,scanDirectories:x.map(({directory:u})=>u),requestedScanDirectories:Te,appConfigDirectories:x.filter(({origin:u})=>u==="app_config_directory").map(({directory:u})=>u),appConfigFilePath:n.kind==="config"?n.appConfigFilePath:void 0,clientId:S(n),includeDirs:e.includeDirs,excludePatterns:e.excludePatterns,noGitIgnore:e.noGitIgnore};if(e.listFiles){let u=await t.listFiles(L);return{kind:"listed",...A,...u}}let f=await t.execute(L);await t.recordMetadata({num_security_findings:f.scan.issues.length});let Re=await t.writeArtifacts(s,A.resultsKey,{deterministicFindings:f.deterministicFindings,agentChecks:f.agentChecks});return{kind:"scanned",...A,execution:f,artifacts:Re,blocking:{level:e.blocking,blockedChecks:Se(f,e.blocking)}}}a();a();var ve=r.object({status:r.literal("success"),app:k,scope:w,scanDirectories:r.array(v).describe("The directories that a scan would walk."),files:r.array(r.object({path:y().describe("The absolute path of the file.")}).strict()).describe("The files that a scan would gather, ordered by their paths relative to the app directory, as listed without --json.")}).strict().describe("With --list-files, the files that a scan would gather. Nothing is scanned or written."),h=U({name:"AppSecurityCheckResult",schema:r.union([r.object({status:r.literal("success"),valid:r.boolean().describe("Whether --blocking passed: no finding of the scan has its own severity at or above the level. blocking.blockedCheckCount counts the checks with such findings, and --blocking none always passes. Run review --json for the findings."),app:k,resultsDirectory:y().describe("The absolute path of the results directory that holds the files the scan wrote."),deterministicFindingsPath:y().describe("The absolute path of deterministic-findings.json, which the scan replaced."),agentChecksPath:y().describe("The absolute path of agent-checks.json, which the scan replaced."),scope:w,scanDirectories:r.array(v).describe("The directories that the scan walked."),agentCheckCount:r.number().int().nonnegative().describe("The number of checks in agent-checks.json for a coding agent to investigate."),blocking:F,instructions:j.optional().describe("The coding-agent instructions for this scan, with --print-instructions or when chosen at the prompt. Left out otherwise.")}).strict(),ve,r.object({status:r.literal("cancelled")}).strict().describe("Asked whether to scan without app configuration, the user declined. Nothing was scanned or written.")]).describe("The scan and the files it wrote. With --list-files, the files that a scan would gather."),definitions:{AppSecurityApp:k,AppSecurityScope:w,AppSecurityScanDirectory:v,AppSecurityBlocking:F,AppSecurityInstructions:j,AppSecurityCheckFileList:ve}});a();var Ee={high:"High",medium:"Medium",low:"Low"},N=3,O=8;function Le(e){let t=Ue(e),i=ee(e.scan.issues);return{type:t,options:{headline:We(e,i),body:Be(e),reference:[{subdued:`Engine: ${e.engine.name} ${e.engine.version}`},{subdued:`Ruleset: ${e.engine.ruleset}`},...i.some(n=>n.issues.length>1)&&!e.verbose?[{subdued:"Use --verbose for every occurrence and fix. deterministic-findings.json retains all file and line details."}]:[]],customSections:Ke(e,i)}}}function Ce(e){let{type:t,options:i}=Le(e);if(t==="success"){M(i);return}if(t==="warning"){p(i);return}Y(i)}function Ie(e){return e.scan.scan.coverage_gaps.length>0}function Ue(e){return e.scan.issues.some(t=>t.severity==="high")?"error":e.scan.issues.length>0||Ie(e)?"warning":"success"}function We(e,t){let i=e.scan.issues.length;return t.length<i?`${t.length} security issue ${t.length===1?"group":"groups"} found (${i} occurrences).`:i>0?`${i} security ${i===1?"issue":"issues"} found.`:Ie(e)?"Scan completed with coverage gaps.":"No security issues found."}function Be(e){let t=e.scan,i=[{userInput:t.app.name},{char:"."},`${t.scan.files_scanned} files scanned in ${ze(e.elapsedMilliseconds)}.`],n=t.scan.checks_executed.filter(s=>s.status==="not_applicable").length;return n>0&&i.push({info:`
2
- ${n} check${n===1?"":"s"} not applicable.`}),i.push({info:`
3
- ${e.agentCheckCount} check${e.agentCheckCount===1?"":"s"} ready for your coding agent.`}),i}function Me(e){return[["Have your coding agent run the agent checks"],["Record the agent results with",{command:m(e.commands.record)}],["Review the results with",{command:m(e.commands.review)}]]}function Ye(e){let t=S(e)??"not linked";return e.kind==="config"&&e.clientIdOverride?`${t} (from --client-id)`:t}function He(e){let{selection:t}=e;return{title:"Selection",body:{tabularData:[["App directory",t.appDirectory],["Config file",ne(t)??"none"],["Client ID",Ye(t)],["Scan directories",e.scanDirectories.map(({directory:i})=>d(t.appDirectory,i)||".").join(", ")]],firstColumnSubdued:!0}}}function Ke(e,t){let i=[He(e)];for(let s of["high","medium","low"]){let o=t.filter(c=>c.severity===s);o.length!==0&&i.push({title:Ee[s],body:{list:{items:o.flatMap(c=>[Ve(c),...e.verbose?c.issues.map(Je):[]])}}})}if(e.scan.scan.coverage_gaps.length>0){let s=e.scan.scan.coverage_gaps,o=s.slice(0,O).map(c=>c.message);s.length>O&&o.push({info:`${s.length-O} more coverage gaps`}),i.push({title:"Coverage gaps",body:{list:{items:o}}})}let{appDirectory:n}=e.selection;return i.push({title:"Artifacts",body:{list:{items:[["Deterministic findings:",{filePath:d(n,e.deterministicFindingsPath)}],["Agent security check instructions:",{filePath:d(n,e.agentChecksPath)}]]}}}),i.push({title:"Next steps",body:{list:{items:Me(e),ordered:!0}}}),e.verbose&&i.push({title:"Scan details",body:{tabularData:[["Framework",e.scan.detection.framework],["Surface",e.scan.detection.surface],["Languages",e.scan.detection.languages.map(s=>`${s.name} (${s.support})`).join(", ")||"none"],["Capabilities",qe(e.scan.capabilities)],["Rules run",String(e.scan.scan.rules_run)],["Not run",String(e.scan.scan.rules_skipped)]],firstColumnSubdued:!0}}),i}function Je(e){let t=e.location.line?`${e.location.file}:${e.location.line}`:e.location.file,i=[{bold:e.title},xe(e.id),{filePath:t}];return i.push({subdued:e.message},{subdued:`Fix: ${e.fix.description}`}),e.fix.guide&&(e.fix.guide.startsWith("https://")||e.fix.guide.startsWith("http://")?i.push({link:{label:"Guide",url:e.fix.guide}}):i.push({subdued:`Guide: ${e.fix.guide}`})),e.snippet&&i.push({subdued:`Code: ${e.snippet}`}),i}function Ve(e){let t=e.issues[0],i=e.issues.length,n=e.files.length,s=e.files.slice(0,N).map(o=>{let c=e.issues.find(I=>I.location.file===o);return{filePath:c.location.line?`${o}:${c.location.line}`:o}});return[{bold:t.title},xe(t.id),`${i} ${i===1?"occurrence":"occurrences"} across ${n} ${n===1?"file":"files"}`,...s,...n>N?[{subdued:`+${n-N} more files`}]:[]]}function xe(e){let t=Q(e);return t?{link:{label:e,url:t}}:{subdued:e}}function qe(e){let t=Object.entries(e).filter(([,i])=>i).map(([i])=>i);return t.length>0?t.join(", "):"none detected"}function ze(e){return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}var Qe={canPrompt:b,selectInstructionsDestination:e=>H(e)};function Xe(e,t){return{message:`${e} recommended agent ${e===1?"check":"checks"} available to complete your scan. How do you want to pass that prompt to your agent?`,choices:t==="json"?[{label:"Include instructions in the JSON output and copy them to the clipboard",value:"copy"},{label:"Include instructions in the JSON output",value:"print"},{label:"Nothing",value:"nothing"}]:[{label:"Copy instructions to the clipboard",value:"copy"},{label:"Print instructions to the terminal",value:"print"},{label:"Nothing",value:"nothing"}],defaultValue:"copy"}}function Pe(e){P({headline:"To skip these prompts next time, run:",body:[{command:m(e.scan)}]})}async function De(e,t,i,n=Qe){if(e.kind==="cancelled"){if(i==="json")g(h.encode({status:"cancelled"}));else{let{headline:s,nextStep:o}=ae(t.directory);P({headline:s,body:o})}return}if(e.kind==="listed"){await Ae(e),i==="json"?g(h.encode(it(e))):e.paths.length>0&&g(e.paths.join(`
4
- `));return}await Ae(e.execution),i==="json"?await et(e,t,n):await Ze(e,t,n),e.blocking.blockedChecks>0&&(process.exitCode=1)}async function Ze(e,t,i){Ce(nt(e,t.verbose));let n=await Fe(e,t,"text",i);if(n==="nothing")return;let s=_e(e);n==="print"?_(s,{copy:!1}):await je(s,"text")&&_(s,{copy:!0})}async function et(e,t,i){let n=await Fe(e,t,"json",i),s=n==="nothing"?void 0:_e(e),o=s!==void 0&&n==="copy"&&await je(s,"json");g(h.encode(tt(e,s===void 0?void 0:ye(s,{copy:o}))))}async function je(e,t){try{return await ge(e,{copy:!0}),!0}catch(i){if(!(i instanceof he))throw i;return p({headline:i.message,body:t==="json"?"The result still includes them.":["Run the check again with",{command:"--print-instructions"},"to print them."]}),!1}}async function Fe(e,t,i,n){return t.skipInstructions?"nothing":t.printInstructions?"print":n.canPrompt()?n.selectInstructionsDestination(Xe(e.execution.agentChecks.checks.length,i)):"nothing"}function _e(e){return fe({appDirectory:e.selection.appDirectory,resultsKey:e.resultsKey,commands:e.commands,scanScope:e.scope})}function tt(e,t){let{appDirectory:i}=e.selection,{resultsDirectory:n}=te(i,e.resultsKey);return{status:"success",valid:e.blocking.blockedChecks===0,app:$(e.selection),resultsDirectory:C(n),deterministicFindingsPath:C(e.artifacts.deterministicFindingsPath),agentChecksPath:C(e.artifacts.agentChecksPath),scope:T(e.scope),scanDirectories:e.scanDirectories.map(s=>R(i,s)),agentCheckCount:e.execution.agentChecks.checks.length,blocking:be(e.blocking),...t===void 0?{}:{instructions:t}}}function it(e){let{appDirectory:t}=e.selection;return{status:"success",app:$(e.selection),scope:T(e.scope),scanDirectories:e.scanDirectories.map(i=>R(t,i)),files:e.paths.map(i=>({path:me(t,i)}))}}function nt(e,t){let{execution:i,artifacts:n}=e;return{scan:i.scan,selection:e.selection,scanDirectories:e.scanDirectories,engine:i.engine,verbose:t,elapsedMilliseconds:i.elapsedMilliseconds,commands:e.commands,deterministicFindingsPath:n.deterministicFindingsPath,agentChecksPath:n.agentChecksPath,agentCheckCount:i.agentChecks.checks.length}}function st(e){return e.replace(/[?*()[\]{}!#\\]/g,"\\$&")}async function Ae(e){if(e.ignoredScanDirectories.length===0&&e.otherAppDirectories.length===0)return;let t=await B(W()),i=n=>d(t,n)||".";for(let n of e.ignoredScanDirectories)p({headline:`${i(n)} is ignored by Git, so only the files Git tracks in it are scanned.`,body:["Use",{command:"--no-git-ignore"},"to scan everything in it."]});for(let n of e.otherAppDirectories){let s=i(n);p({headline:`${s} holds another app's configuration, so its files are scanned as part of this app.`,body:["Use",{command:`--exclude ${de(st(s),ue())}`},"to leave it out."]})}}var l=Ge(Ne(),1);var E=class e extends K{static summary="Check an app for Shopify-specific security issues and write deterministic-findings.json and agent-checks.json.";static descriptionWithMarkdown="Runs an app security check locally and writes `deterministic-findings.json` and `agent-checks.json` to the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`; the other `app security` commands take the same selection flags and find the same directory. Every run replaces both files, so it's always safe to run the check again.\n\n`deterministic-findings.json` holds the deterministic scan results. `agent-checks.json` holds the checks for your coding agent to investigate; the agent's results are recorded with `shopify app security record`. Use `--config` to select a specific app configuration when the project has multiple `shopify.app*.toml` files; the check inspects only that configuration. Use `--client-id` to replace the configuration's client ID for this run. `--client-id` is checked against your Shopify account before anything is scanned, so it needs you to be logged in. When no app configuration exists, use `--without-app-config --client-id <client-id>` to scan `--path` anyway with config checks skipped; in an interactive terminal the command offers to do this.\n\nThe check scans the app directory and each `--include-dir`. Git ignore rules apply by default: a file or directory that Git ignores is skipped, using the rules of the repository that contains it, while files that Git tracks are always scanned. Use `--no-git-ignore` to turn Git ignore rules off for every scanned directory. When the check uses Git, it requires Git 2.38.0 or later.\n\nUse `--exclude` to skip more paths. Each value is a glob that is matched against the path relative to the working directory, so a path above it starts with `../`, and a name at any depth needs `**/`, for example `--exclude '**/generated'`. Repeat the flag to add globs. An exclusion can't remove the selected app configuration file. Quote each value so your shell doesn't expand `*`. The coding-agent instructions this check offers repeat the globs. Other `app security` commands don't take `--exclude` or `--no-git-ignore`, so pass the same flags each time you run the check.\n\nUse `--list-files` to check the scope before scanning: it prints the files the check would gather, one path per line and relative to the app directory, and then stops. It writes no results and never prompts. `--client-id` is still checked, but doesn't change the list. With `--json`, the result lists the files with absolute paths.\n\nIn interactive terminals, the command offers to copy the coding-agent instructions, print them, or choose nothing; copying is the default. In CI and other non-interactive environments, instructions aren't offered unless you pass `--print-instructions`, which prints them. You can also run `shopify app security instructions` to print, copy, or write them later. With `--json`, the command offers to include the instructions in the result, with or without copying them, and `--print-instructions` includes them.\n\nWith `--json`, the result describes the scan and the files it wrote, and whether `--blocking` passed, but not the findings: run `shopify app security review --json` for those.\n\nReports the number of findings to Shopify as usage telemetry, but not finding details. See [usage reporting](https://shopify.dev/docs/api/shopify-cli#usage-reporting) for details.";static get jsonOutputSchema(){return h}static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --include-dir ../backend","<%= config.bin %> <%= command.id %> --path extensions --config production --include-dir .","<%= config.bin %> <%= command.id %> --without-app-config --client-id <client-id>",'<%= config.bin %> <%= command.id %> --path app --include-dir . --exclude marketing --exclude "**/generated"',"<%= config.bin %> <%= command.id %> --no-git-ignore --exclude local-data","<%= config.bin %> <%= command.id %> --include-dir ../backend --list-files"];static flags={...J,...z,"include-dir":l.Flags.string({description:"Also scan this directory, relative to the working directory. Repeat the flag to add directories. Use it for code that lives outside the app directory, such as a backend or a shared library.",multiple:!0}),exclude:l.Flags.string({description:"Skip paths that match this glob, relative to the working directory. Repeat the flag to add globs. The selected app configuration file can't be excluded.",multiple:!0}),"no-git-ignore":l.Flags.boolean({description:"Turn off Git ignore rules for every scanned directory, so files that Git ignores are scanned too. Files that Git tracks are always scanned.",env:"SHOPIFY_FLAG_NO_GIT_IGNORE"}),"list-files":l.Flags.boolean({description:"Print the files the check would gather, one path per line, and stop. Nothing is scanned, no results are written, and nothing is prompted for. With --json, the result lists them with absolute paths.",env:"SHOPIFY_FLAG_LIST_FILES",exclusive:["print-instructions","skip-instructions","blocking"]}),...q,"print-instructions":l.Flags.boolean({description:"Print coding-agent instructions without prompting for how to deliver them. With --json, the instructions are included in the result.",default:!1,exclusive:["skip-instructions"],env:"SHOPIFY_FLAG_APP_SECURITY_PRINT_INSTRUCTIONS"}),yes:l.Flags.boolean({description:"Print coding-agent instructions without prompting.",hidden:!0,deprecated:{to:"--print-instructions"},exclusive:["skip-instructions","list-files"],env:"SHOPIFY_FLAG_YES"}),"skip-instructions":l.Flags.boolean({description:"Don't offer the coding-agent instructions after the scan. Use it when you want only the deterministic scan results.",default:!1,exclusive:["print-instructions"],env:"SHOPIFY_FLAG_APP_SECURITY_SKIP_INSTRUCTIONS"}),...V};async run(){let{flags:t}=await this.parse(e),i=await G({directory:t.path,configName:t.config,clientId:t["client-id"],withoutAppConfig:!!t["without-app-config"],blocking:t.blocking,includeDirs:t["include-dir"]??[],excludePatterns:t.exclude??[],noGitIgnore:!!t["no-git-ignore"],listFiles:!!t["list-files"],onSelectionPrompted:Pe});await De(i,{directory:t.path,verbose:!!t.verbose,printInstructions:!!(t["print-instructions"]||t.yes),skipInstructions:t["skip-instructions"]},t.json?"json":"text")}};export{E as a};
@@ -1,2 +0,0 @@
1
- import{b as T}from"./chunk-SK7EPN6C.js";import{ga as D,p as C,ua as E,va as k,xa as o}from"./chunk-GQLNG537.js";import{A as U,K as B,M as L,N as q,O as R,X as P,z as O}from"./chunk-D2KIGKBI.js";import{h as c}from"./chunk-M5VIFG2V.js";import{Bb as _,S as I}from"./chunk-JLQRDFR5.js";import{j as A}from"./chunk-FZCGRIOM.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var de=/gid:\/\/shopify\/\w*\/(\d+)/,w="development",Fe="live",ge="unpublished";function be(e){return e.role===w}async function Te(e){let n=await I("creative");return B({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function N(e){let n=de.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:i,role:a,processing:t,createdAtRuntime:d}=e;return{id:n,name:i,processing:t,createdAtRuntime:d,role:a==="main"?"live":a}}function Ve(e){if(!e)return;let{key:n,checksum:i,attachment:a,value:t}=e,d={size:(t||a||"").length,mtime:Date.now()};return{key:n,checksum:i,attachment:a,value:t,stats:d}}l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var j={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var Q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var K={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var X={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var W={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var Z={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var J={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var ee={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var le="CHALLENGE_REQUIRED",me=["\r",`
2
- `," "],b=class extends c{},g,V=0;async function ie(e){g&&await g;let n=V,i=await ne(e);if(!i.challenged)return i.result;let a=V>n;(g||!a)&&await se(i.challengeUrl);let t=await ne(e);if(!t.challenged)return t.result;throw o("theme-api:trust-challenge:retry-challenged"),new b("Shopify still needs to verify your identity before it can continue.",void 0,[["Complete the verification at",{link:{url:t.challengeUrl}},"then run the command again."]])}async function ne(e){try{return{challenged:!1,result:await e()}}catch(n){let i=await oe(n);if(!i)throw n;return{challenged:!0,challengeUrl:i}}}async function oe(e){let i=D(e).find(a=>a.extensions?.code===le)?.extensions?.redirect_to;if(typeof i=="string"){if(!await re(i)){_(`Ignoring trust challenge with an unexpected URL host: ${i}`);return}return i}}async function re(e){try{let n=new URL(e);return n.protocol==="https:"&&n.hostname===await C()}catch{return!1}}async function se(e){return g??=ue(e).then(()=>{V+=1}).finally(()=>{g=void 0}),g}async function ue(e){if(o("theme-api:trust-challenge:required"),P()||!q()||A()==="json")throw o("theme-api:trust-challenge:non-interactive"),new b("Shopify needs to verify your identity before it can continue.",void 0,[["Open",{link:{url:e}},"in a browser where you're logged in to Shopify with the same account you use in Shopify CLI, complete the verification, then run the command again."]]);let n=await R(e);o(n?"theme-api:trust-challenge:browser-opened":"theme-api:trust-challenge:browser-not-opened"),O({headline:"Verify your identity to continue.",body:n?"A verification page opened in your browser.":"Shopify needs to verify your identity before it can continue.",link:n?void 0:{label:"Open the verification page",url:e},nextSteps:[["Complete the verification in your browser, logged in with the same account you use in Shopify CLI."],["Press",{userInput:"Enter"},"here once you have completed it."]],orderedNextSteps:!0}),await L(process.stdin,void 0,{keys:me}),o("theme-api:trust-challenge:acknowledged"),U({headline:"Continuing."})}var ke="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",p={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},ae="the required theme access scope";async function Pn(e,n){let i=S(e);o("theme-api:fetch-theme");try{let{theme:a}=await T({query:Z,session:n,variables:{id:i},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(a)return y({id:N(a.id),processing:a.processing,role:a.role.toLowerCase(),name:a.name})}catch(a){te(a),k(a),_(`Error fetching theme with ID: ${e}`)}}async function Gn(e){let n=[],i=null;for(o("theme-api:fetch-themes");;){let a=await h({query:W,session:e,variables:{after:i},responseOptions:{handleErrors:!1},preferredBehaviour:p});a.themes||s("Failed to fetch themes");let{nodes:t,pageInfo:d}=a.themes;if(t.forEach(m=>{let r=y({id:N(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});r&&n.push(r)}),!d.hasNextPage)return n;i=d.endCursor}}async function Mn(e,n){o("theme-api:find-development-theme-by-name");let{themes:i}=await h({query:J,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(i||s("Failed to fetch themes"),i.nodes.length>1)throw k(new c(`More than one development theme is named "${e}"`));if(i.nodes.length===1){let{id:a,processing:t,role:d,name:m}=i.nodes[0];return y({id:N(a),processing:t,role:d.toLowerCase(),name:m})}}async function $n(e,n){let i=e.src??ke;o("theme-api:create-theme");let{themeCreate:a}=await h({query:z,session:n,variables:{name:e.name??"",source:i,role:(e.role??w).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:p});a||s("Failed to create theme");let{theme:t,userErrors:d}=a;if(d.length){let m=a.userErrors.map(r=>r.message).join(", ");throw k(new c(m))}return t||s("Failed to create theme"),y({id:N(t.id),name:t.name,role:t.role.toLowerCase()})}async function Hn(e,n,i){let a=[],t=null;for(o("theme-api:fetch-assets");;){let d=await h({query:j,session:i,variables:{id:x(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(f=>f.filename).join(", ");s(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:r}=d.theme.files;if(a.push(...await Promise.all(m.map(async u=>{let{attachment:f,value:v}=await Ne(u.body);return{attachment:f,key:u.filename,checksum:u.checksumMd5,value:v}}))),!r.hasNextPage)return a;t=r.endCursor}}async function zn(e,n,i){let t=[];o("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:r}=await h({query:X,session:i,variables:{themeId:S(e),files:m},preferredBehaviour:p});r||s("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:f}=r;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),f.length>0&&f.forEach(v=>{v.filename?(k(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):s(`Failed to delete theme assets: ${v.message}`)})}return t}async function jn(e,n,i){let a=[];o("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=ce(d);E("theme-api:upload-files");let r=await pe(e,m,i);E("theme-api:upload-files"),a.push(...he(r))}return a}function ce(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function pe(e,n,i){return h({query:K,session:i,variables:{themeId:x(e),files:n},preferredBehaviour:p})}function he(e){let{themeFilesUpsert:n}=e;n||s("Failed to upload theme files");let{upsertedThemeFiles:i,userErrors:a}=n,t=[];return i?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),a.forEach(d=>{d.filename||s(`Error uploading theme files: ${d.message}`),k(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function Qn(e,n){let i=[],a=null;for(o("theme-api:fetch-checksums");;){let t=await h({query:Q,session:n,variables:{id:x(e),after:a},responseOptions:{handleErrors:!1},preferredBehaviour:p});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let r=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(new c(`Failed to fetch checksums for: ${r}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(i.push(...d.map(r=>({key:r.filename,checksum:r.checksumMd5}))),!m.hasNextPage)return i;a=m.endCursor}}async function Kn(e,n,i){let a=n.name,t={};a&&(t.name=a),o("theme-api:update-theme");let{themeUpdate:d}=await h({query:G,session:i,variables:{id:S(e),input:t},preferredBehaviour:p});d||s("Failed to update theme");let{theme:m,userErrors:r}=d;if(r.length){let u=d.userErrors.map(f=>f.message).join(", ");throw k(new c(u))}return m||s("Failed to update theme"),y({id:N(m.id),name:m.name,role:m.role.toLowerCase()})}async function Xn(e,n){o("theme-api:publish-theme");let{themePublish:i}=await h({query:H,session:n,variables:{id:S(e)},preferredBehaviour:p});i||s("Failed to update theme");let{theme:a,userErrors:t}=i;if(t.length){let d=i.userErrors.map(m=>m.message).join(", ");throw k(new c(d))}return a||s("Failed to update theme"),y({id:N(a.id),name:a.name,role:a.role.toLowerCase()})}async function Yn(e,n){o("theme-api:delete-theme");let{themeDelete:i}=await h({query:M,session:n,variables:{id:S(e)},preferredBehaviour:p});i||s("Failed to update theme");let{deletedThemeId:a,userErrors:t}=i;if(t.length){let d=i.userErrors.map(m=>m.message).join(", ");throw k(new c(d))}return a||s("Failed to update theme"),!0}async function Wn(e,n,i){let a;o("theme-api:duplicate-theme");let{themeDuplicate:t}=await h({query:$,session:i,variables:{id:S(e),name:n},preferredBehaviour:p,responseOptions:{onResponse:u=>{a=u.headers.get("x-request-id")??void 0}}});if(!t)return k("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:a};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:a}:d?{theme:y({id:N(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:a}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:a}}async function Zn(e,n){o("theme-api:fetch-metafield-definitions");let i=[],a=null;for(;;){let{metafieldDefinitions:t}=await T({query:Y,session:n,variables:{ownerType:e,after:a}});if(i.push(...t.nodes),!t.pageInfo.hasNextPage)break;let d=t.pageInfo.endCursor;(!d||d===a)&&s("Failed to paginate metafield definitions"),a=d}return i.map(t=>({key:t.key,namespace:t.namespace,name:t.name,description:t.description,type:{name:t.type.name,category:t.type.category}}))}async function Jn(e){o("theme-api:check-password-protection");let{onlineStore:n}=await T({query:ee,session:e});n||s("Unable to get details about the storefront's password protection");let{passwordProtection:i}=n;return i.enabled}function s(e){throw k(new c(e))}function ei(e){return e instanceof b}async function h(e){try{return await ie(()=>T(e))}catch(n){throw te(n),n}}function te(e){let n=ve(e);if(!n)return;let i=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},{char:","},{command:"theme dev"},{char:","},{command:"theme publish"},{char:","},{command:"theme delete"},{char:","},{command:"theme rename"},{char:","},"and",{command:"theme duplicate"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw k(new c(`The authenticated account or access token is missing ${n}.`,void 0,i))}function ve(e){let n=D(e).find(a=>a.extensions?.code==="ACCESS_DENIED");if(!n)return;let i=n.extensions?.requiredAccess;return typeof i!="string"?ae:fe(i)}function fe(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||ae}function x(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function Ne(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let i=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(i).toString("base64")}}catch{throw k(new c(`Error downloading content from URL: ${e.url}`))}}}export{Ve as a,w as b,Fe as c,ge as d,be as e,Te as f,Pn as g,Gn as h,Mn as i,$n as j,Hn as k,zn as l,jn as m,Qn as n,Kn as o,Xn as p,Yn as q,Wn as r,Zn as s,Jn as t,ei as u};
@@ -1 +0,0 @@
1
- import{g as i}from"./chunk-VKWPEFWQ.js";i();function d(e,n){return`${e} ${e===1?n:`${n}s`}`}function t(e){return`${d(e.withFindings,"check")} with findings`}function c(e){return[e.passed>0?`${e.passed} passed`:void 0,e.notApplicable>0?`${e.notApplicable} not applicable`:void 0,e.unresolved>0?`${e.unresolved} unresolved`:void 0].filter(n=>n!==void 0)}export{d as a,t as b,c};
@@ -1 +0,0 @@
1
- import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="5.0.2";export{o as a};
@@ -1 +0,0 @@
1
- import{a as k}from"./chunk-66TMIQMB.js";import{D as b,E as C,F as R,O as c,P as l,U as p,W as j,b as w,s as A,x as v,y as D}from"./chunk-W56ZGEQQ.js";import{b as f}from"./chunk-ZJOX5HW4.js";import{b as S,c as g}from"./chunk-3KM5ZOW2.js";import{A as y,z as d}from"./chunk-D2KIGKBI.js";import{a as m}from"./chunk-BN7ZXAZJ.js";import{wb as h}from"./chunk-JLQRDFR5.js";import{b as o}from"./chunk-FZCGRIOM.js";import{b as T}from"./chunk-YTUUU33R.js";import{e as J,g as i}from"./chunk-VKWPEFWQ.js";i();i();var W={cleanResults:v,cleanAllResults:D};async function n(t,e=W){return{removed:t.all?await e.cleanAllResults(t.appDirectory):await e.cleanResults(t.selection.appDirectory,b(t.selection))}}i();i();var x=o.object({directory:c().describe("The absolute app directory.")}).strict(),a=m({name:"AppSecurityCleanResult",schema:o.object({status:o.literal("success"),changed:o.boolean().describe("Whether any results directory was removed."),app:o.union([l,x]).describe("The selected app. With --all, only its directory."),resultsDirectories:o.array(c()).describe("The absolute paths of the removed results directories, sorted. Empty when there was nothing to remove.")}).strict(),definitions:{AppSecurityApp:l,AppSecurityCleanAllApp:x}});function O(t,e,s){if(s==="json"){h(a.encode(I(t,e)));return}if(t.removed.length===0){let r=e.all?e.appDirectory:e.selection.appDirectory;d({headline:"No app security check results to remove.",body:["Nothing was found in",{filePath:A(r)}]})}else y({headline:"App security check results removed.",body:{list:{items:t.removed.map(r=>({filePath:r}))}}})}function I(t,e){return{status:"success",changed:t.removed.length>0,app:e.all?{directory:p(e.appDirectory)}:j(e.selection),resultsDirectories:t.removed.map(p)}}var P=J(T(),1);var u=class t extends f{static summary="Remove local app security check results.";static descriptionWithMarkdown="Deletes the results directory, `.shopify/app-security/<results key>/`, without asking. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. Other results directories are left alone. Prints each removed path.\n\nUse `--all` to delete every results directory under `.shopify/app-security/` instead. `--all` takes neither `--config` nor `--client-id`, and with `--without-app-config` it doesn't need `--client-id`.";static get jsonOutputSchema(){return a}static description=this.descriptionForHelp();static flags={...S,...w,...g,all:P.Flags.boolean({description:"Delete every results directory under .shopify/app-security/, not only the selected one.",exclusive:["config","client-id"]})};async run(){let{flags:e}=await this.parse(t),s={path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"]},r=e.all?{all:!0,appDirectory:await C(s)}:{all:!1,selection:await R({...s,allowPrompts:!1})};r.all||await k(r.selection,e.path);let F=await n(r);O(F,r,e.json?"json":"text")}};export{u as a};
@@ -1 +0,0 @@
1
- import{a as h,b as w}from"./chunk-2T4HDR6R.js";import{j as f}from"./chunk-GQLNG537.js";import{U as d}from"./chunk-D2KIGKBI.js";import{h as i}from"./chunk-M5VIFG2V.js";import{Fa as m,ma as p}from"./chunk-JLQRDFR5.js";import{c as u}from"./chunk-IWTNUJGY.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
@@ -1 +0,0 @@
1
- import{a as v,c as w,d as O}from"./chunk-EAZIQI2D.js";import{f as y,g as P,h as b}from"./chunk-S4LOWCGS.js";import{a as F}from"./chunk-VGSH52JM.js";import{a as h}from"./chunk-NVKJ7ZLP.js";import{Na as x}from"./chunk-U2T5HPRD.js";import{b as m,c as d}from"./chunk-3KM5ZOW2.js";import{G as g,W as l}from"./chunk-D2KIGKBI.js";import{Bb as n}from"./chunk-JLQRDFR5.js";import{b as N}from"./chunk-YTUUU33R.js";import{e as I,g as f}from"./chunk-VKWPEFWQ.js";f();var r=I(N(),1);var a="_start",s=class S extends F{static get jsonOutputSchema(){return v}static summary="Run a function locally for testing.";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={...m,...h,...y,...d,input:r.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:r.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"}),profile:r.Flags.boolean({description:"Generate a WebAssembly performance profile for the function run. The profile can be viewed in Speedscope.",env:"SHOPIFY_FLAG_PROFILE"})};async run(){let{flags:t}=await this.parse(S),o=a,{app:p}=await x({directory:t.path,userProvidedConfigName:t.config}),e=await P(p,t.path);if(t.export!==void 0)n(`Using export ${t.export} from the --export flag.`),o=t.export;else if(e.configuration.targeting!==void 0&&e.configuration.targeting.length>0){let i=e.configuration.targeting;if(i.length>1&&!t["no-input"]&&l()){let E=i.map(u=>({label:u.target,value:u.export||a}));o=await g({message:"Which target would you like to execute?",choices:E})}else o=i?.[0]?.export||a,n(`Using export '${o}'. Use the --export flag or an interactive terminal to select a different export.`)}else n(`No targeting information found. Using the default export '${o}'. Use the --export flag or an interactive terminal to select a different export.`);let c=e?.configuration.targeting?.[0]?.input_query,A=c&&`${e?.directory}/${c}`,U=await b(e,t.path,t["client-id"],t.reset,t.config),_={functionExtension:e,inputPath:t.input,export:o,stdin:"inherit",schemaPath:U,queryPath:A,profile:t.profile,json:t.json},T=await w(_);return O(T),{app:p}}};export{s as a};
@@ -1 +0,0 @@
1
- import{a as y}from"./chunk-HB3MJYBK.js";import{a as B}from"./chunk-X5NIAZA4.js";import{a as P}from"./chunk-66TMIQMB.js";import{A as O,D as p,F as N,J as u,M as m,O as h,P as l,U as g,W as J,a as D,e as F,f as x,r as I,t as E,v as M}from"./chunk-W56ZGEQQ.js";import{b as C}from"./chunk-ZJOX5HW4.js";import{b as j,c as _}from"./chunk-3KM5ZOW2.js";import{$ as v,A as k}from"./chunk-D2KIGKBI.js";import{a as R}from"./chunk-BN7ZXAZJ.js";import{h as d}from"./chunk-M5VIFG2V.js";import{wb as T}from"./chunk-JLQRDFR5.js";import{b as c}from"./chunk-FZCGRIOM.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();var X=5e6,Y={readStdin:v,engineVersion:x,writeAgentFindings:M,recordMetadata:B};function z(t){return m(t.record)}function a(t,e){let i=new d("The findings document was rejected. Nothing was recorded.",null,[["Fix every error, then run",{command:z(e)},"again."]],[{title:"Errors",body:{list:{items:t}}}]);throw i.code="findings-document-rejected",i.details={errors:t},i}async function q(t,e){try{return await e.readStdin()}catch(i){throw i instanceof d&&a([i.message],t),i}}async function G(t,e){let i=await q(t,e);if(i===void 0){let n=new d("No findings document was piped on stdin.",null,[["Pipe the findings document on stdin:",{command:z(t)}]]);throw n.code="findings-document-missing",n}let r=Buffer.byteLength(i,"utf8");r>X&&a([`The findings document is ${r} bytes; the limit is 5 MB.`],t);try{return JSON.parse(i)}catch(n){let o=n instanceof Error?n.message:String(n);a([`The findings document is not valid JSON: ${o}`],t)}}async function S(t,e=Y){let{selection:i}=t,r=u(i,t.path),n=await G(r,e),o=F(n,{engineVersion:e.engineVersion()});o.ok||a(o.errors,r);let b=O(o.document);b>I&&a([`The recorded findings would be stored as ${b} bytes; the limit is 5 MB. Shorten or remove findings.`],r);let V=await e.writeAgentFindings(i.appDirectory,p(i),o.document),A=o.document.checks.reduce((L,K)=>L+K.findings.length,0);return await e.recordMetadata({num_security_findings:A}),{path:V,checks:o.document.checks.length,findings:A}}s();s();var f=R({name:"AppSecurityRecordResult",schema:c.object({status:c.literal("success"),app:l,resultsDirectory:h().describe("The absolute path of the results directory."),path:h().describe("The absolute path of the agent-findings.json file that was written."),checkCount:c.number().int().nonnegative().describe("The number of checks recorded."),findingCount:c.number().int().nonnegative().describe("The number of findings recorded, across every check.")}).strict(),definitions:{AppSecurityApp:l}});function $(t,e,i){if(i==="json"){T(f.encode(H(t,e)));return}let r=u(e.selection,e.path);k({headline:"Agent findings recorded.",body:[`Recorded ${y(t.checks,"check")} and ${y(t.findings,"finding")} in`,{filePath:t.path}],nextSteps:[["Run",{command:m(r.review)},"to see the results."]]})}function H(t,{selection:e}){let{resultsDirectory:i}=E(e.appDirectory,p(e));return{status:"success",app:J(e),resultsDirectory:g(i),path:g(t.path),checkCount:t.checks,findingCount:t.findings}}var w=class t extends C{static summary="Record agent findings from an app security check.";static descriptionWithMarkdown="Reads a coding agent's complete findings document from stdin, validates it, and replaces `agent-findings.json` in the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. `--client-id` is checked against your Shopify account before anything is read, so it needs you to be logged in.\n\nThe document must include a `scope` with the `include_dirs`, `excludes` and `no_git_ignore` values of the `check` run it describes, exactly as typed. It's recorded as reported and never compared with the scan's files.\n\nThe document is recorded all or nothing: if anything is invalid, the command fails with every error, writes nothing, and exits with a non-zero code. It needs the results directory that `shopify app security check` creates.\n\nReports the number of findings to Shopify as usage telemetry, but not finding details. See [usage reporting](https://shopify.dev/docs/api/shopify-cli#usage-reporting) for details.";static get jsonOutputSchema(){return f}static description=this.descriptionForHelp();static flags={...j,...D,..._};async run(){let{flags:e}=await this.parse(t),i=await N({path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"],allowPrompts:!1,validateClientIdFlag:!0});await P(i,e.path);let r={selection:i,path:e.path},n=await S(r);$(n,r,e.json?"json":"text")}};export{w as a};
@@ -1,47 +0,0 @@
1
- import{k as G,t as B}from"./chunk-H6GYBLVQ.js";import{a as j}from"./chunk-Q7BOSHWX.js";import{a as C}from"./chunk-SK7EPN6C.js";import{L as q,N as L,j as I,k as w,va as f,xa as h}from"./chunk-GQLNG537.js";import{a as x}from"./chunk-HSKDFEXW.js";import{C as O,D as P,U as N}from"./chunk-D2KIGKBI.js";import{h as l,j as U}from"./chunk-M5VIFG2V.js";import{Bb as c,qb as _,sb as D}from"./chunk-JLQRDFR5.js";import{i as H,j as v}from"./chunk-FZCGRIOM.js";import{u as F}from"./chunk-LHXFTFFM.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function M(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,o);for(let[r,o]of Object.entries(e.replaceExtensionTemplates??[])){let s=r.split("/")[0];t.append(`replace_extension_templates[${s}][${r}]`,o)}return t.append("_method",e.method),t}function S(){return{"User-Agent":`Shopify CLI; v=${x}`}}function k(e){return delete e.cookie,delete e.authorization,e}p();function E(e){let t={};return e.split(";").forEach(r=>{let o=r.match(/(.*?)=(.*)$/)??[],s=o[1]?.trim(),n=o[2]?.trim()??"";s&&(t[s]=n)}),t}function y(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var $=class extends l{};async function Pe(e){return B(e)}async function Ue(e,t,r){let o=Y(t),s=new URLSearchParams;s.append("form_type","storefront_password"),s.append("utf8","\u2713"),s.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let n={"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded",...r},a=await w(`${o}/password`,{headers:n,body:s.toString(),method:"POST",redirect:"manual"});if(a.status===429)throw f(new l(`Too many incorrect password attempts. Please try again after ${a.headers.get("retry-after")} seconds.`));return V(a,o)}async function z(e,t,r,o,s={}){let n={},a=await W(e,r,s),i=Y(t);if(n._shopify_essential=a,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return n;let u=await ae(a,e,i,o,s);return{...n,...u}}var se=1;async function W(e,t,r,o=1){let s=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),n=`${e}?${s}`;h("theme-service:storefront-session:get-session-essential-cookie");let a={...r,...S()},i=await w(n,{method:"HEAD",redirect:"manual",headers:a}),u=i.headers.raw()["set-cookie"]??[],d=R(u,"_shopify_essential");if(!d){if(c(`Failed to obtain _shopify_essential cookie.
2
-
3
- -Request ID: ${i.headers.get("x-request-id")??"unknown"}
4
-
5
- -Body: ${await i.text()}
6
-
7
- -Status: ${i.status}
8
- `),o>3)throw f(new $('Your development session could not be created because the "_shopify_essential" could not be defined. Please, check your internet connection.'));return c("Retrying to obtain the _shopify_essential cookie..."),await N(o),W(e,t,r,o+1)}return X(i,n,d,a)}async function X(e,t,r,o,s=0){let n=e.headers.get("location");if(!n||s>=se)return r;let a=new URL(n,t);if(a.origin!==new URL(t).origin||!a.searchParams.has("preview_theme_id"))return r;let i=await w(a.toString(),{method:"HEAD",redirect:"manual",headers:{...o,Cookie:y({_shopify_essential:r})}}),u=i.headers.raw()["set-cookie"]??[],d=R(u,"_shopify_essential");return d||c(`Preview redirect to ${a.pathname} did not set a new _shopify_essential cookie; keeping the previous one.`),X(i,a.toString(),d??r,o,s+1)}async function ae(e,t,r,o,s){let n=new URLSearchParams({password:o}),a={...s,...S(),Cookie:y({_shopify_essential:e})},i=await w(`${t}/password`,{method:"POST",redirect:"manual",body:n,headers:a});if(!V(i,r))throw f(new l("Your development session could not be created because the store password is invalid. Please, retry with a different password."));let u=i.headers.raw()["set-cookie"]??[],d=R(u,"storefront_digest"),m=R(u,"_shopify_essential"),g={};return d&&(g.storefront_digest=d),m&&(g._shopify_essential=m),g}function V(e,t){let r=e.headers.get("location")??"",o;try{o=new URL(r,t)}catch(n){if(n instanceof TypeError)return!1;throw n}let s=new URL(t).origin;return e.status===302&&o.origin===s}function R(e,t){let r=e.find(s=>E(s)[t]);return r?E(r)[t]:void 0}function Y(e){return`https://${e}`}p();p();function ie(e,t){if(!(t instanceof U)){if(f(t),v()==="json"){H({type:"diagnostic",level:"error",message:`${e}
9
- ${t.message}`});return}t instanceof l?(t.message=`${e}
10
- ${t.message}`,P(t)):(O({headline:e,body:t.message}),c(`${e}
11
- ${t.stack??t.message}`))}}function We(e,t){let r={delete:`Failed to delete file "${e}" from remote theme.`,upload:`Failed to upload file "${e}" to remote theme.`,default:e}[t??"default"]??e;return o=>{ie(r,o)}}function T(e,t){return j({status:e.status??502,statusText:e.statusText??"Bad Gateway",cause:e,data:{url:(t??e.url)?.toString(),requestId:e.headers?.get("x-request-id")??void 0}})}function Xe(e,t="Unexpected error during fetch"){let r=e,o=r.statusCode??502,s=r.statusMessage??"Bad Gateway",n=`${t.replace(/\.$/,"")} with status ${o} (${s}).`;r.data?.requestId&&(n+=`
12
- Request ID: ${r.data.requestId}`),r.data?.url&&(n+=`
13
- URL: ${r.data.url}`);let a=r.cause??e;return{headline:n,body:a.stack??r.stack??r.message??s,status:o,statusText:s,cause:a,requestId:r.data?.requestId,url:r.data?.url}}var ce={_fd:"0",pb:"0"},ue=/^(?:\/[a-z]{2,3}(?:-[a-zA-Z0-9]{2,})?)?\/url\/?$/;async function ot(e,t){let r=he(e,t),s={...await pe(e,t),...S()},n,a=Object.keys({...t.replaceTemplates,...t.replaceExtensionTemplates});if(de(t))c(`\u2192 Rendering ${r} (exit page)...`),n=await fe(r,s).catch(m=>{throw T(f(m),r)});else if(a.length>0){c(`\u2192 Rendering ${r} (with ${a})...`);let m=M(t);n=await fetch(r,{method:"POST",body:m,redirect:"manual",headers:s}).catch(g=>{throw T(f(g),r)})}else c(`\u2192 Rendering ${r}...`),n=await fetch(r,{method:t.method,redirect:"manual",headers:s}).catch(m=>{throw T(f(m),r)});let i=n.headers.get("x-request-id");c(`\u2190 ${n.status} (request_id: ${i})`);let d=n.headers.get("Content-Type")?.includes("application/json");return n=new Response(n.body,n),d||n.headers.delete("Content-Type"),n}function de({method:e,path:t}){return e.toUpperCase()==="GET"&&ue.test(t)}async function fe(e,t){let r=await I(e,{method:"GET",redirect:"manual",headers:t},"slow-request"),o=new Headers;for(let[n,a]of Object.entries(r.headers.raw()))for(let i of a)o.append(n,i);let s=[101,103,204,205,304].includes(r.status);return new Response(s?null:await r.arrayBuffer(),{status:r.status,statusText:r.statusText,headers:o})}async function pe(e,t){return Q(e)?me(e,t):le(e,t)}async function le(e,t){let r=await K(e,t),o=e.storefrontToken;return k({...t.headers,...e.crawlerSignatureHeaders,Authorization:`Bearer ${o}`,Cookie:r})}async function me(e,t){let r=await K(e,t),o=e.storefrontToken,s={},n=["ACCEPT","CONTENT-TYPE","CONTENT-LENGTH"];for(let[a,i]of Object.entries(t.headers))n.includes(a.toUpperCase())&&(s[a]=i);return k({...s,...ge(e),...e.crawlerSignatureHeaders,Authorization:`Bearer ${o}`,Cookie:r})}function K(e,t){let r=E(t.headers.cookie??t.headers.Cookie??""),o=e.sessionCookies??{};return y({...r,...o})}function he(e,{path:t,sectionId:r,appBlockId:o,query:s}){let a=`${A(e)}${t}`,i=new URLSearchParams(ce);for(let[u,d]of s)i.append(u,d);return r?i.append("section_id",r):o&&i.append("app_block_id",o),`${a}?${i}`}function A(e){return Q(e)?`https://${F()}/cli/sfr`:`https://${e.storeFqdn}`}function Q(e){return e.token.startsWith("shptka_")}function ge(e){return{"X-Shopify-Shop":e.storeFqdn,"X-Shopify-Access-Token":e.token}}p();var b="Shopify CLI",we=720*60*60,J=["Signature","Signature-Input","Signature-Agent"],Z="unstable",Se=`
14
- query StorefrontCrawlerSignatures($first: Int!, $expired: Boolean, $cli: Boolean, $domain: String) {
15
- storefrontCrawlerSignatures(first: $first, expired: $expired, cli: $cli, domain: $domain) {
16
- edges {
17
- node {
18
- id
19
- name
20
- domainHost
21
- signature
22
- signatureInput
23
- signatureAgent
24
- expiresAt
25
- }
26
- }
27
- }
28
- }
29
- `,Ee=`
30
- mutation StorefrontCrawlerSignatureGenerate($timeToLive: Int!, $name: String!, $domainHost: String!, $cli: Boolean) {
31
- storefrontCrawlerSignatureGenerate(timeToLive: $timeToLive, name: $name, domainHost: $domainHost, cli: $cli) {
32
- id
33
- signature
34
- signatureInput
35
- signatureAgent
36
- name
37
- expiresAt
38
- domainHost
39
- userErrors {
40
- field
41
- message
42
- code
43
- }
44
- }
45
- }
46
- `;async function re(e,t=e.storeFqdn){try{let o=(await C(Se,e,{first:1,expired:!1,cli:!0,domain:t},Z)).storefrontCrawlerSignatures;if(!o)throw f(new l("Could not fetch Shopify CLI crawler signatures."));let s=o.edges[0]?.node;if(s){h("theme-service:crawler-signature:reused");let u=te(s);return c(`Reusing crawler signature "${b}" for ${s.domainHost} (${ee(u)}).`),u}let a=(await C(Ee,e,{timeToLive:we,name:b,domainHost:t,cli:!0},Z)).storefrontCrawlerSignatureGenerate;if(!a)throw f(new l("Could not create a Shopify CLI crawler signature."));if(a.userErrors.length>0){let u=a.userErrors.map(d=>{let m=d.field?.join(".");return m?`${m}: ${d.message}`:d.message}).join(`
47
- `);throw f(new l("Could not create a Shopify CLI crawler signature.",u))}h("theme-service:crawler-signature:created");let i=te(a);return c(`Created crawler signature "${b}" for ${a.domainHost} expiring at ${a.expiresAt} (${ee(i)}).`),i}catch(r){let o=r instanceof Error?r.message:String(r);c(`Could not obtain crawler signature headers; continuing without them. ${o}`);return}}function ee(e){let t=Object.keys(e),r=J.filter(s=>t.some(n=>n.toLowerCase()===s.toLowerCase())),o=J.filter(s=>!r.includes(s));return`present: ${r.join(", ")||"none"}; missing: ${o.join(", ")||"none"}`}function te(e){if(!e.signature||!e.signatureInput||!e.signatureAgent)throw f(new l("The Shopify CLI crawler signature response did not include all required headers."));return{Signature:e.signature,"Signature-Input":e.signatureInput,"Signature-Agent":e.signatureAgent}}p();var ye=1800*1e3,oe=["layout/theme.liquid","config/settings_schema.json"];async function yt(e,t,r,o,s){let n=await ne(e,t,r,o,s);return n.refresh=async()=>{c("Refreshing theme session...");let a=await ne(e,t,r,o,n.crawlerSignatureHeaders);return h("theme-service:session:refreshed"),Object.assign(n,a),a},setInterval(()=>{n.refresh&&n.refresh().then(()=>c("Refreshed theme session via auto-refresher...")).catch(()=>c("Session could not be refreshed."))},ye),n}async function ne(e,t,r,o,s){let n=A(t),a=s??await re(t),i=await L(t.storeFqdn,r,[],{forceRefresh:!1,noPrompt:!0}),u=await q([],r,{forceRefresh:!1,noPrompt:!0}),d=await $e(n,e,t,u,o,a);return{...i,sessionCookies:d,storefrontToken:u,crawlerSignatureHeaders:a}}async function $e(e,t,r,o,s,n){try{return await z(e,r.storeFqdn,t,s,{"X-Shopify-Shop":r.storeFqdn,"X-Shopify-Access-Token":r.token,Authorization:`Bearer ${o}`,...n})}catch(a){throw a instanceof $&&await Re(t,r),a}}async function Re(e,t){if(c(`Verifying if theme with id ${e} has required files...`),(await G(Number(e),oe,t)).length!==oe.length)throw f(new l(D`Theme ${_.cyan(e)} is missing required files. Run ${_.cyan(`shopify theme delete -t ${e}`)} to delete it, then try your command again.`.value));c(`Theme with id ${e} has required files.`)}export{S as a,k as b,Pe as c,Ue as d,ie as e,We as f,T as g,Xe as h,ce as i,ot as j,de as k,pe as l,K as m,A as n,re as o,yt as p,ne as q};
@@ -1 +0,0 @@
1
- import{g as r}from"./chunk-VKWPEFWQ.js";r();function u(s,e,c){let n=[];for(let t=0;t<s.length;t+=e){let o=s.slice(t,t+e);n.push(c(o))}return n}function h(s,e,c){let n=[];for(let t=0;t<s.length;t+=e){let o=s.slice(t,t+e);n.push(c(o,t))}return n}export{u as a,h as b};
@@ -1 +0,0 @@
1
- import{R as A,S as O,T as z,V as P,X as x}from"./chunk-U2T5HPRD.js";import{Aa as D,o as $,ta as l,wa as L}from"./chunk-33ZE3DRQ.js";import{a as F}from"./chunk-N57Y7THE.js";import{u as R}from"./chunk-GQLNG537.js";import{A as k,I as N,N as v,U as y,z as g}from"./chunk-D2KIGKBI.js";import{b as E}from"./chunk-335BUVBP.js";import{f as _,h as d}from"./chunk-M5VIFG2V.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function b(e,t){if(t.clientName!==l.AppManagement||!t.devStoreCapReached)return!1;try{return await t.devStoreCapReached(e)}catch{return!1}}async function M(e,t,o,i="disabled"){let c=o.clientName===l.AppManagement,s=async f=>o.devStoresForOrg(t.id,f),n=i!=="disabled"&&o.clientName===l.AppManagement,r=async()=>{if(await b(t.id,o))throw new d(U,W(t.id));let f=await A(),w=await O(),u=await z(),T=await $({name:f,plan:w,withDemoData:u,organization:t,json:!1,summary:!1}),S=await I(t,T,o);return k({headline:`Dev store "${S.shopName}" created successfully.`}),S},a,h;if(n&&e.stores.length===0){if(await b(t.id,o))throw new d(U,W(t.id));if(v()===!1)throw new d("No development store was specified.",H(t.id));a=async()=>(g({body:Y(t)}),r())}else if(n&&i==="selection-option"){if(v()===!1&&(e.stores.length>1||e.hasMorePages))throw new d("No development store was specified.","Run `shopify app dev --store <store-domain>` to select a development store.");v()&&!await b(t.id,o)&&(h=r)}let m=await P({onSearchForStoresByName:s,...e,showDomainOnPrompt:c,...a?{onCreateStoreWhenEmpty:a}:{},...h?{onCreateStore:h}:{}});if(!m){if(a)throw new _;if(g({body:await o.getCreateDevStoreLink(t)}),await y(5),!await x(t))throw new _;let w=await B(t.id,o);m=await M({stores:w,hasMorePages:!1},t,o,i)}return C(m),m}async function I(e,t,o){let s;if(await N([{title:"Fetching organization data",task:async()=>{for(let r=0;r<10;r++){try{let a=await D(e,t,o);if(a){s=a;return}}catch(a){if(!(a instanceof L))throw a}await y(3)}}}]),!s)throw new d(`The newly created development store (${t}) is not available yet.`,`Run \`shopify app dev --store ${t}\` to select it when it is ready.`);return s}async function B(e,t){let c=[];return await N([{title:"Fetching organization data",task:async()=>{for(let n=0;n<10;n++){let{stores:r}=await t.devStoresForOrg(e);if(r.length>0){c=r;return}await y(3)}}}]),c}var U="Your organization has reached its development store limit.";function Y(e){return`You don't have any dev stores associated with ${e.businessName}'s Dev Dashboard. Let's create one.`}function q(e){return`shopify store create dev --organization-id ${e} --name <store-name> --plan <plan>`}function H(e){return`Create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function W(e){return`Make a development store slot available in Dev Dashboard. Then create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function C(e){if(!e.transferDisabled)throw!e.transferDisabled&&!e.convertableToPartnerTest?new d(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store."):new d(`The store you specified (${e.shopDomain}) is not transfer-disabled`,"Run dev --reset and select a transfer-disabled dev store.")}async function fe({appContextResult:e,storeFqdn:t,forceReselectStore:o,storeTypes:i=["APP_DEVELOPMENT"],storeCreationMode:c="disabled"}){let{app:s,organization:n,developerPlatformClient:r}=e,a,h=s.configuration.build?.dev_store_url,m=s.hiddenConfig.dev_store_url,f=h??m,u=t??(o?void 0:f),T=i.length===1&&i[0]==="APP_DEVELOPMENT";if(u)a=await D(n,u,r,i),T&&C(a);else{let S=await r.devStoresForOrg(n.id);a=await M(S,n,r,c)}return a.shopDomain=R(a.shopDomain),await V(a,o),(a.shopDomain!==f||!m)&&await s.updateHiddenConfig({dev_store_url:a.shopDomain}),await r.ensureUserAccessToStore(n.id,a),a}async function V(e,t){await F.addPublicMetadata(()=>({cmd_app_reset_used:t,store_fqdn_hash:E(e.shopDomain),store_domain:e.shopDomain})),await F.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{fe as a};