@shopify/cli 4.9.4 → 5.0.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 (501) hide show
  1. package/dist/analytics-Q6QDIDYT.js +1 -0
  2. package/dist/analytics-VKKJNJ62.js +1 -0
  3. package/dist/assets/hydrogen/starter/CHANGELOG.md +7 -0
  4. package/dist/assets/hydrogen/starter/package.json +2 -2
  5. package/dist/assets/hydrogen/vite/package.json +3 -4
  6. package/dist/assets/hydrogen/vite/vite.config.js +3 -3
  7. package/dist/bootstrap.js +1 -1
  8. package/dist/{chunk-LKXFHYLI.js → chunk-24NUJTIH.js} +1 -1
  9. package/dist/chunk-2CMEKSI7.js +1 -0
  10. package/dist/chunk-2DID73ML.js +1 -0
  11. package/dist/chunk-2ORRV7GH.js +1 -0
  12. package/dist/chunk-2VSNFOKD.js +1 -0
  13. package/dist/chunk-335BUVBP.js +1 -0
  14. package/dist/{chunk-UEBUGSBT.js → chunk-3A3DZVEJ.js} +1 -1
  15. package/dist/chunk-3C6VLJ5D.js +319 -0
  16. package/dist/{chunk-PB5ZZET5.js → chunk-3G4HJO72.js} +30 -30
  17. package/dist/chunk-3LVCG4JB.js +1 -0
  18. package/dist/chunk-43KLFFP7.js +1 -0
  19. package/dist/chunk-43R5VGKT.js +1 -0
  20. package/dist/chunk-46MSIQ6Z.js +1 -0
  21. package/dist/chunk-4ARCB6DT.js +1 -0
  22. package/dist/chunk-4C2DAX5T.js +1 -0
  23. package/dist/chunk-4CRBTSVP.js +2 -0
  24. package/dist/chunk-4GCI2YCZ.js +8 -0
  25. package/dist/chunk-4GOJQKY5.js +1 -0
  26. package/dist/chunk-4RDFMBRG.js +9 -0
  27. package/dist/chunk-4SS6DXC7.js +5 -0
  28. package/dist/{chunk-J4J2YXH3.js → chunk-4TI7U2PN.js} +1 -1
  29. package/dist/{chunk-67EBF76X.js → chunk-52FDK2LC.js} +1 -1
  30. package/dist/chunk-53BG3NLH.js +3 -0
  31. package/dist/{chunk-LD6ZCTZ3.js → chunk-5B76DT7X.js} +1 -1
  32. package/dist/{chunk-A2VCTDKH.js → chunk-5NEGOQT6.js} +1 -1
  33. package/dist/{chunk-MW3JKGJH.js → chunk-5OMJFPQW.js} +1 -1
  34. package/dist/chunk-5TB52UUV.js +2 -0
  35. package/dist/chunk-5UWMXOHM.js +7 -0
  36. package/dist/chunk-6BNKBCCU.js +1 -0
  37. package/dist/chunk-6DXP7PQ7.js +1 -0
  38. package/dist/chunk-6PUU6ZNQ.js +1 -0
  39. package/dist/chunk-7GHSE7SG.js +1 -0
  40. package/dist/{chunk-7556AIVG.js → chunk-7IFE4UQY.js} +1 -1
  41. package/dist/chunk-7LAKWAKX.js +25 -0
  42. package/dist/chunk-7MVWDCI3.js +1 -0
  43. package/dist/chunk-7NSK77WG.js +3 -0
  44. package/dist/chunk-7QUZWCJZ.js +3 -0
  45. package/dist/chunk-7RPFJZLP.js +1 -0
  46. package/dist/{chunk-LJIJEGND.js → chunk-7UOA4DI7.js} +2 -2
  47. package/dist/chunk-7WPUV7GY.js +6 -0
  48. package/dist/chunk-7Y7AZRL3.js +10 -0
  49. package/dist/{chunk-NGSEF3UX.js → chunk-ACA2BGAD.js} +1 -1
  50. package/dist/chunk-AJMDF3QC.js +1 -0
  51. package/dist/{chunk-R7YJNDXW.js → chunk-AXC2MHHO.js} +1 -1
  52. package/dist/{chunk-DEF2G7S4.js → chunk-AYL6KBPE.js} +1 -1
  53. package/dist/chunk-BAHIL37I.js +1 -0
  54. package/dist/{chunk-RSC5NQAT.js → chunk-BCYTZ7LM.js} +1 -1
  55. package/dist/{chunk-AVMNIZAJ.js → chunk-BJPDJIS4.js} +1 -1
  56. package/dist/{chunk-7VAKNVFD.js → chunk-BN7ZXAZJ.js} +1 -1
  57. package/dist/chunk-BVSKBX7T.js +16 -0
  58. package/dist/chunk-BWRNXCVN.js +4 -0
  59. package/dist/{chunk-XNPUZRWP.js → chunk-C3KEDG33.js} +1 -1
  60. package/dist/{chunk-WEXOA4C4.js → chunk-C7V755IT.js} +1 -1
  61. package/dist/chunk-CCMDZX35.js +7 -0
  62. package/dist/chunk-CCQNP5YR.js +1 -0
  63. package/dist/chunk-CEIJKJOF.js +11 -0
  64. package/dist/chunk-CIK5BF7V.js +1 -0
  65. package/dist/{chunk-6YDLNP4G.js → chunk-CVVQQLCF.js} +1 -1
  66. package/dist/chunk-CW2T7EOQ.js +1 -0
  67. package/dist/chunk-CZ22VZDA.js +376 -0
  68. package/dist/{chunk-3G2ZQ2EF.js → chunk-D7NB7YR6.js} +1 -1
  69. package/dist/{chunk-DYPZX7MW.js → chunk-DFQ4WTET.js} +2 -2
  70. package/dist/chunk-DJAZBPYA.js +3 -0
  71. package/dist/chunk-DNMXVMJM.js +47 -0
  72. package/dist/{chunk-CLD3NZYD.js → chunk-EGCWR5AS.js} +1 -1
  73. package/dist/{chunk-BOE2ST6J.js → chunk-EITIW5OX.js} +1 -1
  74. package/dist/chunk-EMSF57ZB.js +1 -0
  75. package/dist/{chunk-ZEBMW5KS.js → chunk-EXFBZPZS.js} +1 -1
  76. package/dist/chunk-FDXHQZTO.js +26 -0
  77. package/dist/{chunk-Q2XLIWG4.js → chunk-FFHH5LOR.js} +1 -1
  78. package/dist/{chunk-MMQZO2W2.js → chunk-FNLECT7B.js} +1 -1
  79. package/dist/{chunk-PO5T44H3.js → chunk-FWB3GLMW.js} +1 -1
  80. package/dist/chunk-FZCGRIOM.js +1 -0
  81. package/dist/{chunk-G7JW4UIM.js → chunk-G6ZMSWEU.js} +1 -1
  82. package/dist/chunk-GAMC2BNY.js +7 -0
  83. package/dist/chunk-GB6E3ATN.js +4 -0
  84. package/dist/chunk-GCNA3HXH.js +8 -0
  85. package/dist/{chunk-IGDVKRB4.js → chunk-GFVKTWFT.js} +1 -1
  86. package/dist/chunk-GQNOVEKP.js +2 -0
  87. package/dist/{chunk-5BTLE67Z.js → chunk-GRGFA26K.js} +1 -1
  88. package/dist/chunk-GXORLBVN.js +2 -0
  89. package/dist/{chunk-3V4VL3SD.js → chunk-H4V55Y3Z.js} +118 -118
  90. package/dist/chunk-HCZG7YJ6.js +16 -0
  91. package/dist/chunk-HF4NDEX3.js +1 -0
  92. package/dist/chunk-HIRTL45Q.js +1 -0
  93. package/dist/chunk-I4OVLRQR.js +1 -0
  94. package/dist/{chunk-ENQXB532.js → chunk-I6FRVYGE.js} +1 -1
  95. package/dist/chunk-IEQ4UOH3.js +4 -0
  96. package/dist/{chunk-PIZDYS7T.js → chunk-IILLQOUC.js} +60 -60
  97. package/dist/{chunk-45SZ5PSE.js → chunk-IQVRP7CT.js} +1 -1
  98. package/dist/chunk-IUP7POIE.js +6 -0
  99. package/dist/chunk-IUTZIN2T.js +10 -0
  100. package/dist/chunk-IWEKM5Y3.js +1 -0
  101. package/dist/chunk-IWTNUJGY.js +2 -0
  102. package/dist/chunk-J6TW43TG.js +1 -0
  103. package/dist/chunk-JDR6UVZA.js +8 -0
  104. package/dist/{chunk-CVFPY2SH.js → chunk-JEA3C7ON.js} +1 -1
  105. package/dist/chunk-JOJV5E2K.js +1 -0
  106. package/dist/chunk-JYMDWR25.js +1 -0
  107. package/dist/{chunk-TPHHQAUD.js → chunk-KDPQXURV.js} +1 -1
  108. package/dist/{chunk-MW3IMZJ5.js → chunk-KGRIYAMA.js} +1 -1
  109. package/dist/chunk-KJQDS5HI.js +1 -0
  110. package/dist/chunk-KKPOOIE4.js +2 -0
  111. package/dist/{chunk-VS7QVU3Z.js → chunk-KSDU4YOB.js} +1 -1
  112. package/dist/chunk-L7MSPGDS.js +5 -0
  113. package/dist/{chunk-43URS56H.js → chunk-LDU5T3DN.js} +1 -1
  114. package/dist/chunk-LHKVXJPX.js +1 -0
  115. package/dist/{chunk-EO4YJFMY.js → chunk-LMQGNECW.js} +86 -200
  116. package/dist/{chunk-TQ7URMGS.js → chunk-LQ7ENG4V.js} +1 -1
  117. package/dist/chunk-LVLAOBJM.js +103 -0
  118. package/dist/chunk-LWCTKI4Z.js +18 -0
  119. package/dist/chunk-M3ACZWMR.js +1 -0
  120. package/dist/chunk-M4BVLMPH.js +31 -0
  121. package/dist/{chunk-NCRWOW6F.js → chunk-M5TGCSUK.js} +1 -1
  122. package/dist/chunk-M7LPHCP2.js +274 -0
  123. package/dist/{chunk-IDKRJ2F4.js → chunk-MDRVCBDO.js} +1 -1
  124. package/dist/chunk-MR2AUT7Q.js +1 -0
  125. package/dist/chunk-MXJAH2GW.js +5 -0
  126. package/dist/{chunk-UU6BRRYS.js → chunk-MYAIWSOO.js} +1 -1
  127. package/dist/{chunk-NT4A37HG.js → chunk-N2RFDHRY.js} +1 -1
  128. package/dist/{chunk-GSE6FXZU.js → chunk-NB4BRW3H.js} +1 -1
  129. package/dist/chunk-NDKSG4CC.js +97 -0
  130. package/dist/chunk-NK2MGR6A.js +1 -0
  131. package/dist/chunk-NOH63WC6.js +12 -0
  132. package/dist/{chunk-BVB3DTNE.js → chunk-OGWPS55W.js} +1 -1
  133. package/dist/chunk-OQ5CLM2H.js +4 -0
  134. package/dist/{chunk-PVAZCZSY.js → chunk-OQU3HLAE.js} +1 -1
  135. package/dist/chunk-OVWUGAEU.js +11 -0
  136. package/dist/chunk-OX7UVDSU.js +6 -0
  137. package/dist/chunk-P33TONYG.js +1 -0
  138. package/dist/chunk-PEVIRAMR.js +6 -0
  139. package/dist/{chunk-YPCXVZ2N.js → chunk-PGLWZMJU.js} +4 -4
  140. package/dist/chunk-PIAD3F6M.js +16 -0
  141. package/dist/chunk-PMHP57MH.js +20 -0
  142. package/dist/{chunk-F3PZGSOY.js → chunk-POKY4RWR.js} +1 -1
  143. package/dist/chunk-PSSYLJG4.js +2 -0
  144. package/dist/chunk-PYIICTLX.js +1 -0
  145. package/dist/chunk-PZUGDE7N.js +2 -0
  146. package/dist/{chunk-NU5WLZ6Y.js → chunk-Q2SZCZE7.js} +1 -1
  147. package/dist/{chunk-MUM34KUM.js → chunk-Q2XRITUG.js} +1 -1
  148. package/dist/chunk-Q5MEFIMV.js +4 -0
  149. package/dist/chunk-Q66CI37F.js +7 -0
  150. package/dist/chunk-QFWWCZOI.js +1 -0
  151. package/dist/{chunk-TR4OWSEX.js → chunk-QFYLJVJW.js} +1 -1
  152. package/dist/chunk-QKVVJXWS.js +3 -0
  153. package/dist/chunk-QN3774QI.js +1 -0
  154. package/dist/chunk-R2BDABJD.js +213 -0
  155. package/dist/{chunk-7HWMURCW.js → chunk-R7EMV77H.js} +1 -1
  156. package/dist/chunk-RFGEM5JC.js +3 -0
  157. package/dist/{chunk-7A3RW2VM.js → chunk-RVQV6G5M.js} +1 -1
  158. package/dist/chunk-S67I4E7M.js +5 -0
  159. package/dist/chunk-SFPXYHHL.js +1 -0
  160. package/dist/{chunk-4OCVXE5Y.js → chunk-SFQEHDJY.js} +1 -1
  161. package/dist/chunk-SL3VBI62.js +3 -0
  162. package/dist/{chunk-LOWSU4BB.js → chunk-SNNZ4U2W.js} +1 -1
  163. package/dist/chunk-T2IUXXCT.js +1 -0
  164. package/dist/chunk-TPSA4JN5.js +1 -0
  165. package/dist/chunk-TTEF7GTX.js +1 -0
  166. package/dist/{chunk-FQL2WEKX.js → chunk-U25W35TX.js} +1 -1
  167. package/dist/chunk-UIQL5ZF3.js +1 -0
  168. package/dist/chunk-UK6576EO.js +1 -0
  169. package/dist/chunk-ULD7CIOY.js +4 -0
  170. package/dist/{chunk-D3KFKT4D.js → chunk-UOS2XLGG.js} +1 -1
  171. package/dist/{chunk-EMH7OHCW.js → chunk-UVRKTMF7.js} +1 -1
  172. package/dist/{chunk-ZTICX3AO.js → chunk-UWMZ5CSB.js} +1 -1
  173. package/dist/chunk-UZROQRLX.js +2 -0
  174. package/dist/{chunk-5BGUKF7L.js → chunk-V75WUEFU.js} +1 -1
  175. package/dist/chunk-VB7YQMAM.js +5 -0
  176. package/dist/chunk-VHUD3CBC.js +3 -0
  177. package/dist/chunk-VMMUJN4T.js +17 -0
  178. package/dist/{chunk-S36VGP37.js → chunk-VW6QS7DO.js} +1 -1
  179. package/dist/chunk-VWH3VPYI.js +1 -0
  180. package/dist/{chunk-4TF7ER72.js → chunk-WBJ6ZHYH.js} +1 -1
  181. package/dist/chunk-WDFCOZAY.js +16 -0
  182. package/dist/chunk-WFWISGLS.js +1 -0
  183. package/dist/chunk-WGUOLSMG.js +1 -0
  184. package/dist/{chunk-PFXNBHQQ.js → chunk-WJSUIUBW.js} +2 -2
  185. package/dist/{chunk-TFXUDHCP.js → chunk-WMAFG2JD.js} +1 -1
  186. package/dist/chunk-X2H6I2WW.js +5 -0
  187. package/dist/{chunk-DSS4ECIH.js → chunk-X7HVAVSZ.js} +1 -1
  188. package/dist/{chunk-NYYXH2SX.js → chunk-XBQDMGUN.js} +1 -1
  189. package/dist/chunk-XITZIDCL.js +18 -0
  190. package/dist/chunk-XKRJKUA7.js +1 -0
  191. package/dist/{chunk-FEQHCE2E.js → chunk-XM7YUXTF.js} +2 -2
  192. package/dist/chunk-XMODGI45.js +1 -0
  193. package/dist/{chunk-B3M3KIOU.js → chunk-XNNKLUTN.js} +1 -1
  194. package/dist/chunk-XTREQ4A2.js +1 -0
  195. package/dist/chunk-YGYEM6QO.js +1 -0
  196. package/dist/{chunk-LWU5TKNA.js → chunk-YKS7MH3F.js} +9 -6
  197. package/dist/chunk-YTUDXZLN.js +1 -0
  198. package/dist/{chunk-I3J63RFV.js → chunk-YTUUU33R.js} +1 -1
  199. package/dist/chunk-YVVU4J5O.js +3 -0
  200. package/dist/{chunk-4TZCRMBJ.js → chunk-YVY32DNA.js} +1 -1
  201. package/dist/chunk-Z5SILNH2.js +7 -0
  202. package/dist/chunk-ZAA2DXK5.js +5 -0
  203. package/dist/chunk-ZDQO6CNY.js +1 -0
  204. package/dist/chunk-ZGV3HNEV.js +1 -0
  205. package/dist/chunk-ZQDDRIBA.js +22 -0
  206. package/dist/{chunk-QTLGMJDW.js → chunk-ZT5WFUKJ.js} +4 -4
  207. package/dist/chunk-ZYQ2XWC5.js +5 -0
  208. package/dist/cli/commands/app/build.js +1 -1
  209. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  210. package/dist/cli/commands/app/bulk/execute.js +1 -1
  211. package/dist/cli/commands/app/bulk/status.js +1 -1
  212. package/dist/cli/commands/app/config/link.js +1 -1
  213. package/dist/cli/commands/app/config/pull.js +1 -1
  214. package/dist/cli/commands/app/config/use.js +1 -1
  215. package/dist/cli/commands/app/config/validate.js +1 -1
  216. package/dist/cli/commands/app/demo/watcher.js +1 -1
  217. package/dist/cli/commands/app/deploy.js +1 -1
  218. package/dist/cli/commands/app/dev/clean.js +1 -1
  219. package/dist/cli/commands/app/dev.js +1 -1
  220. package/dist/cli/commands/app/env/pull.js +1 -1
  221. package/dist/cli/commands/app/env/show.js +1 -1
  222. package/dist/cli/commands/app/execute.js +1 -1
  223. package/dist/cli/commands/app/function/build.js +1 -1
  224. package/dist/cli/commands/app/function/info.js +1 -1
  225. package/dist/cli/commands/app/function/replay.js +1 -1
  226. package/dist/cli/commands/app/function/run.js +1 -1
  227. package/dist/cli/commands/app/function/schema.js +1 -1
  228. package/dist/cli/commands/app/function/typegen.js +1 -1
  229. package/dist/cli/commands/app/generate/extension.js +1 -1
  230. package/dist/cli/commands/app/graphiql.js +1 -1
  231. package/dist/cli/commands/app/import/channel-config.js +1 -1
  232. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  233. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  234. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  235. package/dist/cli/commands/app/import-extensions.js +1 -1
  236. package/dist/cli/commands/app/info.js +1 -1
  237. package/dist/cli/commands/app/init.js +1 -1
  238. package/dist/cli/commands/app/logs.js +1 -1
  239. package/dist/cli/commands/app/release.js +1 -1
  240. package/dist/cli/commands/app/security/check.js +1 -1
  241. package/dist/cli/commands/app/security/clean.js +1 -1
  242. package/dist/cli/commands/app/security/instructions.js +1 -1
  243. package/dist/cli/commands/app/security/record.js +1 -1
  244. package/dist/cli/commands/app/security/review.js +1 -1
  245. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  246. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  247. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  248. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  249. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  250. package/dist/cli/commands/app/versions/list.js +1 -1
  251. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  252. package/dist/cli/commands/auth/login.js +1 -1
  253. package/dist/cli/commands/auth/logout.js +1 -1
  254. package/dist/cli/commands/cache/clear.js +1 -1
  255. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  256. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  257. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  258. package/dist/cli/commands/debug/command-flags.js +1 -1
  259. package/dist/cli/commands/doc/fetch.d.ts +34 -1
  260. package/dist/cli/commands/doc/fetch.js +1 -1
  261. package/dist/cli/commands/doc/search.d.ts +53 -1
  262. package/dist/cli/commands/doc/search.js +1 -1
  263. package/dist/cli/commands/docs/generate.js +1 -1
  264. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  265. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  266. package/dist/cli/commands/help.d.ts +6 -6
  267. package/dist/cli/commands/help.js +1 -1
  268. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  269. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  270. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  271. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  272. package/dist/cli/commands/notifications/generate.js +1 -1
  273. package/dist/cli/commands/notifications/list.js +1 -1
  274. package/dist/cli/commands/organization/list.js +1 -1
  275. package/dist/cli/commands/search.js +1 -1
  276. package/dist/cli/commands/send-analytics.js +1 -1
  277. package/dist/cli/commands/theme/check.js +1 -1
  278. package/dist/cli/commands/theme/console.js +1 -1
  279. package/dist/cli/commands/theme/delete.js +1 -1
  280. package/dist/cli/commands/theme/dev.js +1 -1
  281. package/dist/cli/commands/theme/duplicate.js +1 -1
  282. package/dist/cli/commands/theme/info.js +1 -1
  283. package/dist/cli/commands/theme/init.js +1 -1
  284. package/dist/cli/commands/theme/language-server.js +1 -1
  285. package/dist/cli/commands/theme/list.js +1 -1
  286. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  287. package/dist/cli/commands/theme/open.js +1 -1
  288. package/dist/cli/commands/theme/package.js +1 -1
  289. package/dist/cli/commands/theme/preview.js +1 -1
  290. package/dist/cli/commands/theme/profile.js +1 -1
  291. package/dist/cli/commands/theme/publish.js +1 -1
  292. package/dist/cli/commands/theme/pull.js +1 -1
  293. package/dist/cli/commands/theme/push.js +1 -1
  294. package/dist/cli/commands/theme/rename.js +1 -1
  295. package/dist/cli/commands/theme/share.js +1 -1
  296. package/dist/cli/commands/upgrade.d.ts +64 -0
  297. package/dist/cli/commands/upgrade.js +1 -1
  298. package/dist/cli/commands/version.js +1 -1
  299. package/dist/cli/help.js +1 -1
  300. package/dist/cli/services/commands/doc/fetch-result.d.ts +2 -0
  301. package/dist/cli/services/commands/doc/fetch-result.js +22 -0
  302. package/dist/cli/services/commands/doc/fetch.d.ts +2 -1
  303. package/dist/cli/services/commands/doc/fetch.js +2 -15
  304. package/dist/cli/services/commands/doc/search-result.d.ts +2 -0
  305. package/dist/cli/services/commands/doc/search-result.js +14 -0
  306. package/dist/cli/services/commands/doc/search.d.ts +9 -1
  307. package/dist/cli/services/commands/doc/search.js +27 -2
  308. package/dist/cli/services/commands/doc/types.d.ts +107 -0
  309. package/dist/cli/services/commands/doc/types.js +47 -0
  310. package/dist/cli/services/commands/help/types.d.ts +6 -6
  311. package/dist/command-event-context-LFUZ7UCA.js +1 -0
  312. package/dist/command-json-schema-2UMKY7MY.js +1 -0
  313. package/dist/command-registry.js +1 -1
  314. package/dist/conf-store-RI3TL6I4.js +1 -0
  315. package/dist/custom-oclif-loader-IZCKN67O.js +1 -0
  316. package/dist/deprecations-IFVUXXDB.js +1 -0
  317. package/dist/dist-4H2B7BMN.js +1 -0
  318. package/dist/dist-QNWOGQN3.js +1 -0
  319. package/dist/{environment-RSUK27TA.js → environment-O7ECODHU.js} +1 -1
  320. package/dist/environments-CYMEN7NV.js +1 -0
  321. package/dist/error-IL6WQMSW.js +1 -0
  322. package/dist/error-handler-74HKA23T.js +1 -0
  323. package/dist/fs-AINFLJ2E.js +1 -0
  324. package/dist/hooks/did-you-mean.js +1 -1
  325. package/dist/hooks/hydrogen-init.js +1 -1
  326. package/dist/hooks/plugin-plugins.js +1 -1
  327. package/dist/hooks/postrun.js +1 -1
  328. package/dist/hooks/prerun.js +1 -1
  329. package/dist/hooks/public-metadata.js +1 -1
  330. package/dist/hooks/sensitive-metadata.js +1 -1
  331. package/dist/hooks/tunnel-provider.js +1 -1
  332. package/dist/hooks/tunnel-start.js +1 -1
  333. package/dist/index.js +13 -13
  334. package/dist/is-global-2VLKV46Q.js +1 -0
  335. package/dist/json-error-HZB5YIHV.js +1 -0
  336. package/dist/{lib-TYM5B75S.js → lib-PJHT4MKY.js} +1 -1
  337. package/dist/{lib-55QUD4AJ.js → lib-VKSQ65BQ.js} +1 -1
  338. package/dist/{lib-PH52G55H.js → lib-YEZOHXF3.js} +1 -1
  339. package/dist/{local-R3UAQN7T.js → local-KOZETREJ.js} +1 -1
  340. package/dist/{metadata-JWJG4JV4.js → metadata-IBPHZB7N.js} +1 -1
  341. package/dist/{morph-BABFBRSW.js → morph-CRY35DIK.js} +1 -1
  342. package/dist/node-package-manager-DXSRNEDC.js +1 -0
  343. package/dist/notifications-system-XA3EBOGJ.js +1 -0
  344. package/dist/os-X73O7BAB.js +1 -0
  345. package/dist/out-B2GISN65.js +1 -0
  346. package/dist/output-3OYXK3Z5.js +1 -0
  347. package/dist/{path-CPAYTWQW.js → path-3L2QRACZ.js} +1 -1
  348. package/dist/system-JWYYT4PM.js +1 -0
  349. package/dist/tsconfig.tsbuildinfo +1 -1
  350. package/dist/ui-PCG5D6RZ.js +1 -0
  351. package/dist/upgrade-7U2TUNC4.js +1 -0
  352. package/dist/version-7DGU2KYH.js +1 -0
  353. package/dist/version-SXQTRBXB.js +1 -0
  354. package/dist/workerd-MQZ3NKJI.js +18 -0
  355. package/oclif.manifest.json +1664 -427
  356. package/package.json +8 -8
  357. package/dist/analytics-APDNTBDE.js +0 -1
  358. package/dist/analytics-LX52KYSE.js +0 -1
  359. package/dist/chunk-2PDVBGQH.js +0 -7
  360. package/dist/chunk-2YVSZFXJ.js +0 -4
  361. package/dist/chunk-35WQTGN3.js +0 -5
  362. package/dist/chunk-37BGAWAW.js +0 -2
  363. package/dist/chunk-3C4WVKSO.js +0 -6
  364. package/dist/chunk-3LHE4GIX.js +0 -1
  365. package/dist/chunk-47IQIIFX.js +0 -383
  366. package/dist/chunk-4ES7BJEK.js +0 -1
  367. package/dist/chunk-4IFY7V7W.js +0 -1
  368. package/dist/chunk-4JGWKUJN.js +0 -2
  369. package/dist/chunk-4O5GQ3DS.js +0 -7
  370. package/dist/chunk-4O7LK5RG.js +0 -26
  371. package/dist/chunk-4TFJ5RW7.js +0 -8
  372. package/dist/chunk-4ZNBEMRT.js +0 -20
  373. package/dist/chunk-5JIJDUXX.js +0 -20
  374. package/dist/chunk-66YRAUWX.js +0 -3
  375. package/dist/chunk-6A4H3HPY.js +0 -7
  376. package/dist/chunk-6HPUOCFF.js +0 -1
  377. package/dist/chunk-6IDEDOXW.js +0 -2
  378. package/dist/chunk-6IMHGT7F.js +0 -8
  379. package/dist/chunk-6MC2BEW4.js +0 -1
  380. package/dist/chunk-73D5O7A3.js +0 -1
  381. package/dist/chunk-7E4MJCVE.js +0 -10
  382. package/dist/chunk-7HNRK2CR.js +0 -1
  383. package/dist/chunk-7SJHVJ3W.js +0 -5
  384. package/dist/chunk-ALK66U3O.js +0 -3
  385. package/dist/chunk-AMLCWRHU.js +0 -4
  386. package/dist/chunk-AYIU6Z4C.js +0 -1
  387. package/dist/chunk-BIWG3FQQ.js +0 -5
  388. package/dist/chunk-BQ3U3CQV.js +0 -1
  389. package/dist/chunk-C6IBY7NW.js +0 -16
  390. package/dist/chunk-CQF5NDTJ.js +0 -4
  391. package/dist/chunk-DMDLJRLW.js +0 -1
  392. package/dist/chunk-DMNWSUKV.js +0 -5
  393. package/dist/chunk-FK7GA4QQ.js +0 -1
  394. package/dist/chunk-FO2R6KHG.js +0 -1
  395. package/dist/chunk-FOAV642V.js +0 -1
  396. package/dist/chunk-GE4MLO3C.js +0 -5
  397. package/dist/chunk-GM4EFJJF.js +0 -7
  398. package/dist/chunk-GN66BRYF.js +0 -1
  399. package/dist/chunk-GPRZYFDE.js +0 -1
  400. package/dist/chunk-GZ7VGCVW.js +0 -3
  401. package/dist/chunk-HASIOUH2.js +0 -3
  402. package/dist/chunk-HILYTMVA.js +0 -1
  403. package/dist/chunk-HJHS23Q3.js +0 -1
  404. package/dist/chunk-HLPAVELJ.js +0 -1
  405. package/dist/chunk-HPM3HF7A.js +0 -1
  406. package/dist/chunk-HQJ62PII.js +0 -3
  407. package/dist/chunk-HQY6JM6G.js +0 -6
  408. package/dist/chunk-HSYMUYEZ.js +0 -359
  409. package/dist/chunk-I5PQZRYM.js +0 -32
  410. package/dist/chunk-IPZ6LUJV.js +0 -4
  411. package/dist/chunk-J4NBPC57.js +0 -1
  412. package/dist/chunk-J6LQR2F6.js +0 -7
  413. package/dist/chunk-JYGZD4HM.js +0 -1
  414. package/dist/chunk-K3HUQLIC.js +0 -6
  415. package/dist/chunk-K7D53KSJ.js +0 -1
  416. package/dist/chunk-KQFA5YTT.js +0 -97
  417. package/dist/chunk-KTD7VLHL.js +0 -2
  418. package/dist/chunk-L4DFMMOI.js +0 -1
  419. package/dist/chunk-LJZTSQRD.js +0 -11
  420. package/dist/chunk-LLPB6JN5.js +0 -9
  421. package/dist/chunk-LYIXRMQJ.js +0 -46
  422. package/dist/chunk-MCNK5SJ6.js +0 -2
  423. package/dist/chunk-MJZSSCGD.js +0 -5
  424. package/dist/chunk-N55MSO3X.js +0 -12
  425. package/dist/chunk-N5AZZYQA.js +0 -4
  426. package/dist/chunk-NCVGCVQ5.js +0 -6
  427. package/dist/chunk-O5FFMTJE.js +0 -25
  428. package/dist/chunk-OE3HSNSE.js +0 -16
  429. package/dist/chunk-ONF7XXEL.js +0 -1
  430. package/dist/chunk-PG4S5HJJ.js +0 -5
  431. package/dist/chunk-PHG4DASY.js +0 -18
  432. package/dist/chunk-PP4VCR4Y.js +0 -1
  433. package/dist/chunk-PWS4VFSD.js +0 -1
  434. package/dist/chunk-Q37WAD6F.js +0 -1
  435. package/dist/chunk-Q43LBSPT.js +0 -1
  436. package/dist/chunk-QAJZUJR5.js +0 -1
  437. package/dist/chunk-QO5RNGWA.js +0 -1
  438. package/dist/chunk-QPQS2YU3.js +0 -1
  439. package/dist/chunk-QUXQM3S3.js +0 -1
  440. package/dist/chunk-R3KSOCMB.js +0 -6
  441. package/dist/chunk-R74WHKHH.js +0 -15
  442. package/dist/chunk-RJSQMKKS.js +0 -1
  443. package/dist/chunk-RK2V6OIJ.js +0 -2
  444. package/dist/chunk-RUHQNF2W.js +0 -1
  445. package/dist/chunk-RXTLNUPF.js +0 -1
  446. package/dist/chunk-SNE4RHM4.js +0 -1
  447. package/dist/chunk-SQAS5RVZ.js +0 -10
  448. package/dist/chunk-SZI6G247.js +0 -103
  449. package/dist/chunk-TVCWDEVS.js +0 -1
  450. package/dist/chunk-TYMYIUIQ.js +0 -1
  451. package/dist/chunk-UIC7K2HX.js +0 -7
  452. package/dist/chunk-UNHT4ZFP.js +0 -317
  453. package/dist/chunk-UQ6ALA3Y.js +0 -3
  454. package/dist/chunk-UWI76E2L.js +0 -18
  455. package/dist/chunk-VE35YELD.js +0 -1
  456. package/dist/chunk-VGBUN3CZ.js +0 -17
  457. package/dist/chunk-VMNOSVPT.js +0 -8
  458. package/dist/chunk-VNFUCH6T.js +0 -1
  459. package/dist/chunk-W4KE7AO6.js +0 -1
  460. package/dist/chunk-WEPO4J2F.js +0 -19
  461. package/dist/chunk-WLWHCUPZ.js +0 -1
  462. package/dist/chunk-XGKCPD6W.js +0 -1
  463. package/dist/chunk-XNVOKAF2.js +0 -1
  464. package/dist/chunk-XSMCQLJW.js +0 -1
  465. package/dist/chunk-XUUIBSLW.js +0 -1
  466. package/dist/chunk-XWQM2NZ2.js +0 -2
  467. package/dist/chunk-Y3PY5LP7.js +0 -3
  468. package/dist/chunk-Y62EMOQA.js +0 -1
  469. package/dist/chunk-Y743UVBS.js +0 -16
  470. package/dist/chunk-YBSX53QP.js +0 -1
  471. package/dist/chunk-YHCP326A.js +0 -16
  472. package/dist/chunk-YHESTFMZ.js +0 -4
  473. package/dist/chunk-YT27FIQN.js +0 -275
  474. package/dist/chunk-YTR5JHNJ.js +0 -2
  475. package/dist/chunk-YYA5VGDW.js +0 -1
  476. package/dist/chunk-Z6X2GT6Q.js +0 -1
  477. package/dist/chunk-ZEE32UH6.js +0 -1
  478. package/dist/cli/commands/app/app-logs/sources.js +0 -1
  479. package/dist/command-json-schema-SS4GDJTQ.js +0 -1
  480. package/dist/conf-store-54YJCIDK.js +0 -1
  481. package/dist/custom-oclif-loader-3UBH7Q7R.js +0 -1
  482. package/dist/deprecations-ZX7ZKF6L.js +0 -1
  483. package/dist/dist-JMNE7MP6.js +0 -1
  484. package/dist/dist-M2AXGBOL.js +0 -1
  485. package/dist/environments-KD2IDYPG.js +0 -1
  486. package/dist/error-AA6LW3PN.js +0 -1
  487. package/dist/error-handler-4VW3AV2G.js +0 -1
  488. package/dist/fs-4QZCAEP7.js +0 -1
  489. package/dist/is-global-FKG327CG.js +0 -1
  490. package/dist/json-error-32ETFU3V.js +0 -1
  491. package/dist/node-package-manager-M4XHUTQR.js +0 -1
  492. package/dist/notifications-system-QVM2JWKB.js +0 -1
  493. package/dist/os-FEHBQQKP.js +0 -1
  494. package/dist/out-53ABAVL7.js +0 -1
  495. package/dist/output-2LS5AOAH.js +0 -1
  496. package/dist/system-TMD2LYZM.js +0 -1
  497. package/dist/ui-FNPICAAH.js +0 -1
  498. package/dist/upgrade-YYPP5VZY.js +0 -1
  499. package/dist/version-OX3MORI6.js +0 -1
  500. package/dist/version-P7D5ME4Z.js +0 -1
  501. package/dist/workerd-TKVRZK2F.js +0 -18
@@ -0,0 +1,16 @@
1
+ import{K as y,M as c,N as S,h as C,t as w}from"./chunk-LMQGNECW.js";import{A as u}from"./chunk-CZ22VZDA.js";import{h as f}from"./chunk-2VSNFOKD.js";import{ta as m,wb as g}from"./chunk-LWCTKI4Z.js";import{p}from"./chunk-IWTNUJGY.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import N from"clipboardy";var _="{{SCAN_CONTEXT}}",I="<the findings document from step 4>",P={posix:"bash",powershell:"powershell",cmd:"bat"};function r(e){return`\`${e.replace(/`/g,"'")}\``}function E(e,t){return`\`\`\`${P[t]}
2
+ ${e}
3
+ \`\`\``}function s(e){return{...e,args:[...e.args,"--json","--no-input"]}}function T(e,t){let n=E(c(e,t),t),i=`replacing \`${e.stdinPlaceholder}\` with the file's path`,o=S(e,I,t);if(o===void 0)return`cmd.exe can't pipe multi-line text inline, so write the document to a file and redirect it to \`record\`, ${i}:
4
+
5
+ ${n}`;let a=t==="powershell"?"The closing `'@` must start its line. The single-quoted here-string keeps PowerShell from expanding `$` in the document.":"The quoted `'EOF'` keeps the shell from expanding `$` and backticks in the document.",d=t==="powershell"?"\n\nWindows PowerShell 5.1 pipes text to `record` as ASCII by default. If the document contains non-ASCII characters, run `$OutputEncoding = [System.Text.UTF8Encoding]::new()` before either command.":"";return`${E(o,t)}
6
+
7
+ Replace \`${I}\` with the document itself; you don't need to write a file. ${a}
8
+
9
+ If you'd rather write the document to a file, pipe the file instead, ${i}:
10
+
11
+ ${n}${d}`}function O(e,t,n,i){let{resultsDirectory:o,deterministicFindingsPath:a,agentChecksPath:d,agentFindingsPath:A}=w(e,t);return{commands:i,scanCommand:c(s(i.scan),n),deterministicScanCommand:c(i.scan,n),recordInstructions:T(s(i.record),n),reviewCommand:c(s(i.review),n),cleanCommand:c(s(i.clean),n),deterministicFindingsPath:a,agentChecksPath:d,agentFindingsPath:A,resultsDirectory:o}}function k(e){return`### 1. Run the scan
12
+
13
+ Decide what to scan before running the check. By default, \`check\` scans the app directory. If the app's code also lives elsewhere (a backend, a shared library, another repository), add each of those directories with \`--include-dir\`. Skip paths with \`--exclude\`. Use \`--no-git-ignore\` only if Git-ignored files must be scanned. Include only directories relevant to the app. Check the scope with ${r(`${e.scanCommand} --list-files`)} and adjust the flags until its \`files\` list is right. Then run \`check\` with the same flags, and use the same flags every time you run \`check\` again.`}function $(e){return`### 1. Use the existing scan results
14
+
15
+ \`shopify app security check\` has already run. It wrote ${r(e.deterministicFindingsPath)} and ${r(e.agentChecksPath)}. Continue by reading the agent checks. Running \`check\` again is always safe; do so once source files change (step 7).`}var D=JSON.stringify({include_dirs:[],excludes:[],no_git_ignore:!1});function x(e){return e?{json:JSON.stringify(e),guidance:"`scope` is the scope of the `check` run these results come from. Copy it into the document unchanged."}:{json:D,guidance:"Fill in `scope` with the flags you settled on with `--list-files`: `include_dirs` and `excludes` hold the `--include-dir` and `--exclude` values exactly as you typed them, in order, and `no_git_ignore` is `true` only if you passed `--no-git-ignore`."}}function R(e,t){return Object.entries(t).reduce((n,[i,o])=>n.replaceAll(i,()=>o),e)}var h=class extends f{constructor(t){let n=t instanceof Error?t.message:String(t);super(`Couldn't copy the app security check instructions to the clipboard: ${n}`,null,[["Run the command without",{command:"--copy"},"to print the instructions, or with",{command:"--write <file>"},"to write them to a file."]]),this.code="clipboard-unavailable"}},b={copyToClipboard:e=>N.write(e),writeToFile:m};function q(e){let t=e.shell??y(),n=O(e.appDirectory,e.resultsKey,t,e.commands),i=e.scanScope?$(n):k(n),o=x(e.scanScope);return R(C(),{[_]:i,"{{WORKING_DIRECTORY_LINE}}":`Run these commands from ${r(p())}.`,"{{SCOPE_JSON}}":o.json,"{{SCOPE_GUIDANCE}}":o.guidance,"{{SCAN_COMMAND}}":n.scanCommand,"{{DETERMINISTIC_SCAN_COMMAND}}":n.deterministicScanCommand,"{{RECORD_COMMAND}}":n.recordInstructions,"{{REVIEW_COMMAND}}":n.reviewCommand,"{{CLEAN_COMMAND}}":n.cleanCommand,"{{DETERMINISTIC_FINDINGS_PATH}}":r(n.deterministicFindingsPath),"{{AGENT_CHECKS_PATH}}":r(n.agentChecksPath),"{{AGENT_FINDINGS_PATH}}":r(n.agentFindingsPath)}).trimEnd()}async function B(e,t,n=b){if(t.copy)try{await n.copyToClipboard(e)}catch(i){throw new h(i)}else t.writePath&&await n.writeToFile(t.writePath,`${e}
16
+ `)}function K(e,t){t.copy?u({headline:"Copied app security check instructions to the clipboard"}):t.writePath?u({headline:`Wrote app security check instructions to ${t.writePath}`}):g(e)}export{h as a,q as b,B as c,K as d};
@@ -0,0 +1 @@
1
+ import{b as n,c as t,g as s,h as i}from"./chunk-QFWWCZOI.js";import{b as e}from"./chunk-FZCGRIOM.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();var l=e.object({id:e.number(),name:e.string(),role:e.string(),processing:e.boolean(),createdAtRuntime:e.boolean(),src:e.string().optional(),shop:e.string()}),m=t.extend({storeDomain:n,processing:e.boolean(),sourceUrl:e.string().url().nullable()}).strict().describe("The selected theme projection; sourceUrl is null when the upstream source URL is unavailable.");function u(o){return{...i(o),storeDomain:s(o.shop),processing:o.processing,sourceUrl:o.src===""?null:o.src??null}}export{l as a,m as b,u as c};
@@ -0,0 +1 @@
1
+ import{k as S,m as O,p as R}from"./chunk-DNMXVMJM.js";import{a as x}from"./chunk-P33TONYG.js";import{e as J}from"./chunk-QFWWCZOI.js";import{p as E,v as j}from"./chunk-DJAZBPYA.js";import{k as l,ua as u}from"./chunk-H4V55Y3Z.js";import{b as g,c as f}from"./chunk-Q2SZCZE7.js";import{A as b,B as I,O as _}from"./chunk-CZ22VZDA.js";import{h as s}from"./chunk-2VSNFOKD.js";import{Ta as y,la as P,wb as w}from"./chunk-LWCTKI4Z.js";import{b as p}from"./chunk-FZCGRIOM.js";import{b as N}from"./chunk-YTUUU33R.js";import{e as H,g as n}from"./chunk-VKWPEFWQ.js";n();n();n();async function $({session:r,overridesContent:e,themeId:t}){u("theme-preview:create");let d=`${O(r)}/theme_preview.json?preview_theme_id=${t}`,i=await S(r,{headers:{"Content-Type":"application/json"}}),o=await l(d,{method:"POST",body:e,headers:i});if(!o.ok)throw new s(`Theme preview request failed with status ${o.status}: ${o.statusText}`);let m=await U(o);return u("theme-preview:create"),m}async function A({session:r,overridesContent:e,themeId:t,previewIdentifier:a}){u("theme-preview:update");let i=`${O(r)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(a)}`,o=await S(r,{headers:{"Content-Type":"application/json"}}),m=await l(i,{method:"POST",body:e,headers:o});if(!m.ok)throw new s(`Theme preview request failed with status ${m.status}: ${m.statusText}`);let v=await U(m);return u("theme-preview:update"),v}async function U(r){let e=await r.json();if(e.error)throw new s(`Theme preview failed: ${e.error}`);if(!e.url||!e.preview_identifier)throw new s("Theme preview returned an unexpected response");return{url:e.url,preview_identifier:e.preview_identifier}}async function L(r){if(!y(r.overrideJson))throw new s(`Override file not found: ${r.overrideJson}`);let e=await P(r.overrideJson),t;try{t=JSON.parse(e)}catch(i){let o=i instanceof Error?i.message:String(i);throw new s(`Failed to parse override file: ${r.overrideJson}`,o)}let a=await R(r.themeId,r.adminSession,r.password),d=JSON.stringify(t);return r.previewIdentifier?A({session:a,overridesContent:d,themeId:r.themeId,previewIdentifier:r.previewIdentifier}):$({session:a,overridesContent:d,themeId:r.themeId})}n();n();var C=p.object({id:p.string().min(1).describe("The opaque Storefront preview identifier, not a theme ID or Shopify GID."),url:p.string().url()}).strict(),h=J({name:"ThemePreviewResult",schema:p.object({status:p.literal("success"),preview:C}).strict(),definitions:{ThemePreview:C},project:r=>{let e=r;return{status:"success",preview:{id:e.preview_identifier,url:e.url}}}});function D(r,e,t){if(e==="json"){w(h.encode(r));return}b({body:[{list:{title:t?"Preview updated":"Preview is ready",items:[{link:{url:r.url}},`Preview ID: ${r.preview_identifier}`]}}]})}function T(r){let e="Failed to open theme preview.",t=r.stack??r.message;I({headline:e,body:t})}var c=H(N(),1);var F=class extends j{static get jsonOutputSchema(){return h}static summary="Applies JSON overrides to a theme and returns a preview URL.";static descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";static description=this.descriptionForHelp();static flags={...g,...f,...E,theme:c.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),overrides:c.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES"}),"preview-id":c.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:c.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:c.Flags.boolean({...f.json,description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};static multiEnvironmentsFlags=["store","password","theme","overrides"];async command(e,t,a=!1){let d=await x(t,{filter:{theme:e.theme}}),i=await L({adminSession:t,overrideJson:e.overrides,themeId:d.id.toString(),previewIdentifier:e["preview-id"],password:e.password}),o=e.json?"json":"text";return e.open&&await _(i.url).catch(v=>T(v))===!1&&T(new Error(`Could not open the browser. Open this URL manually: ${i.url}`)),(!a||!e.json)&&D(i,o,!!e["preview-id"]),i}renderEnvironmentResults(e){w(h.encode({environments:e}))}validateCommandFlags(e){if(!e.theme||!e.overrides)throw new s("Specify both --theme and --overrides, either as flags or in an environment.")}requiredFlagsForSingleEnvironment(e){return super.requiredFlagsForSingleEnvironment(e).filter(t=>t!=="store")}};export{F as a};
@@ -0,0 +1 @@
1
+ import{a as $,c as M}from"./chunk-RVQV6G5M.js";import{d as N,f as Q,u as P}from"./chunk-OGWPS55W.js";import{a as C}from"./chunk-ZGV3HNEV.js";import{a as G,c as q}from"./chunk-FWB3GLMW.js";import{b as L}from"./chunk-AJMDF3QC.js";import{b as X,c as j}from"./chunk-H4V55Y3Z.js";import{b as J,c as R}from"./chunk-Q2SZCZE7.js";import{A as w,C as k,J as x}from"./chunk-CZ22VZDA.js";import{a as S}from"./chunk-BN7ZXAZJ.js";import{h as p}from"./chunk-2VSNFOKD.js";import{Sa as A,la as b,qb as m,sb as c,ta as E,wb as f}from"./chunk-LWCTKI4Z.js";import{b as a}from"./chunk-FZCGRIOM.js";import{e as y,g as O}from"./chunk-IWTNUJGY.js";import{e as K,g as i}from"./chunk-VKWPEFWQ.js";i();i();var V=K(X(),1);async function Y(o,e){if(o)try{return JSON.parse(o)}catch(r){let t=r instanceof Error?r.message:"Unknown error";throw new p(c`Invalid JSON in ${m.yellow("--variables")} flag: ${t}`,"Please provide valid JSON format.")}else if(e){if(!await A(e))throw new p(c`Variable file not found at ${m.path(e)}. Please check the path and try again.`);let r=await b(e,{encoding:"utf8"});try{return JSON.parse(r)}catch(t){let s=t instanceof Error?t.message:"Unknown error";throw new p(c`Invalid JSON in variable file ${m.path(e)}: ${s}`,"Please provide valid JSON format.")}}}async function F(o){let{remoteApp:e,store:r,query:t,variables:s,variableFile:h,version:U}=o,{adminSession:H,version:W}=await x({title:c`Authenticating`,task:async()=>{let n=await $(e,r.shopDomain),d=await Q({adminSession:n,userSpecifiedVersion:U});return{adminSession:n,version:d}},renderOptions:{stdout:process.stderr}}),B=await Y(s,h);N(t),M(t,r);try{let n;return{status:"success",result:{data:await x({title:c`Executing GraphQL operation`,task:async()=>L({query:(0,V.parse)(t),session:H,variables:B,version:W,responseOptions:{handleErrors:!1,onResponse:u=>{n=u.extensions}}}),renderOptions:{stdout:process.stderr}}),...n===void 0?{}:{extensions:n}}}}catch(n){if(n instanceof j){let{errors:d,extensions:u,data:v}=n.response;return{status:"failed",details:{...d===void 0?{}:{errors:d},...u===void 0?{}:{extensions:u},...v===void 0?{}:{data:v}}}}throw n}}i();var z=a.unknown().and(a.record(a.unknown())),I=a.object({data:z.nullable().describe("Native GraphQL query data, preserving fields and aliases."),extensions:z.optional().describe("Native GraphQL response extensions, when supplied.")}).strict(),D=a.object({path:a.string().refine(O,"Expected an absolute filesystem path."),format:a.literal("json")}).strict().describe("Receipt for a written JSON file containing the GraphQL result, including data and optional extensions."),l=S({name:"AppExecuteResult",schema:a.union([I,D]),definitions:{AppExecuteGraphQLResult:I,AppExecuteFileReceipt:D}});i();async function T(o,e,r){if(o.status==="failed"){if(e==="json"){let s=new p("GraphQL operation failed.");throw s.details=o.details,s}k({headline:"GraphQL operation failed.",body:JSON.stringify({errors:o.details.errors},null,2)});return}let t=e==="json"?l.encode(o.result):JSON.stringify(o.result.data,null,2);r?(await E(r,t),e==="json"?f(l.encode({path:y(r),format:"json"})):w({headline:"Operation succeeded.",body:`Results written to ${r}`})):e==="json"?f(t):(w({headline:"Operation succeeded."}),f(t))}var g=class o extends C{static summary="Execute GraphQL queries and mutations.";static descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";static get jsonOutputSchema(){return l}static description=this.descriptionForHelp();static flags={...J,...G,...q,...R};async run(){let{flags:e}=await this.parse(o),{query:r,appContextResult:t,store:s}=await P(e),h=await F({organization:t.organization,remoteApp:t.remoteApp,store:s,query:r,variables:e.variables,variableFile:e["variable-file"],...e.version&&{version:e.version}});return await T(h,e.json?"json":"text",e["output-file"]),{app:t.app}}};export{g as a};
@@ -1,2 +1,2 @@
1
- import{b as x,c as D,f as M}from"./chunk-F3PZGSOY.js";import{a as o}from"./chunk-XUUIBSLW.js";import{D as s,G as h,J as e,z as y}from"./chunk-47IQIIFX.js";import{d as w}from"./chunk-HILYTMVA.js";import{Kb as _,ya as u}from"./chunk-UWI76E2L.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
1
+ import{b as x,c as D,f as M}from"./chunk-POKY4RWR.js";import{a as o}from"./chunk-4C2DAX5T.js";import{A as y,E as s,H as h,K as e}from"./chunk-CZ22VZDA.js";import{d as w}from"./chunk-335BUVBP.js";import{ta as u,yb as _}from"./chunk-LWCTKI4Z.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
2
2
  `)}export{$ as a,j as b};
@@ -0,0 +1,4 @@
1
+ import{a as he,b as fe,c as ge,d as _}from"./chunk-HCZG7YJ6.js";import{a as q}from"./chunk-V75WUEFU.js";import{a as pe}from"./chunk-NB4BRW3H.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-LMQGNECW.js";import{b as K}from"./chunk-ZQDDRIBA.js";import{b as J,c as V}from"./chunk-Q2SZCZE7.js";import{A as M,B as p,C as Y,E as H,W as b,z as P}from"./chunk-CZ22VZDA.js";import{a as U}from"./chunk-BN7ZXAZJ.js";import{na as B,wb as g}from"./chunk-LWCTKI4Z.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};