@shopify/cli 3.94.3 → 4.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 (297) hide show
  1. package/README.md +2 -2
  2. package/bin/run.js +5 -1
  3. package/dist/analytics-5TEIW43T.js +1 -0
  4. package/dist/analytics-GG7CYCGL.js +1 -0
  5. package/dist/bootstrap.d.ts +5 -0
  6. package/dist/bootstrap.js +3 -0
  7. package/dist/chunk-2AJ5FI2K.js +7 -0
  8. package/dist/chunk-2GK56X53.js +1 -0
  9. package/dist/chunk-3D4JXJPS.js +2 -0
  10. package/dist/chunk-3NBK56IK.js +1 -0
  11. package/dist/chunk-3TNEIDOD.js +1 -0
  12. package/dist/chunk-3VZEETAV.js +1 -0
  13. package/dist/chunk-4DCQNGUV.js +19 -0
  14. package/dist/chunk-4IC626OL.js +1 -0
  15. package/dist/chunk-4LNCYIS3.js +1 -0
  16. package/dist/chunk-4ZGSSQC6.js +1 -0
  17. package/dist/chunk-54CAKCYR.js +144 -0
  18. package/dist/chunk-5CH3B62S.js +2 -0
  19. package/dist/chunk-5UHQVR2Z.js +1 -0
  20. package/dist/chunk-5WVAHE5E.js +1 -0
  21. package/dist/chunk-5Y7GIF2W.js +1 -0
  22. package/dist/chunk-67MH4AXG.js +1 -0
  23. package/dist/chunk-6CYMJ76C.js +9 -0
  24. package/dist/chunk-6G6TMKXF.js +28 -0
  25. package/dist/chunk-6HBRBQAN.js +6 -0
  26. package/dist/chunk-6ITDI2SD.js +1 -0
  27. package/dist/chunk-6M3ZYNGO.js +451 -0
  28. package/dist/chunk-6RE2SNCU.js +6 -0
  29. package/dist/chunk-6SF3ZETE.js +1 -0
  30. package/dist/chunk-6WL4GA2M.js +15 -0
  31. package/dist/chunk-75VPUOC5.js +1 -0
  32. package/dist/chunk-76R52ODR.js +1 -0
  33. package/dist/chunk-7ESSIN27.js +567 -0
  34. package/dist/chunk-7NH7CHVI.js +6 -0
  35. package/dist/chunk-7QIOUDCX.js +8 -0
  36. package/dist/chunk-7UYZQN4V.js +18 -0
  37. package/dist/chunk-7ZT57XT7.js +2 -0
  38. package/dist/chunk-AGNMOFJS.js +1 -0
  39. package/dist/chunk-BS3BKORT.js +16 -0
  40. package/dist/chunk-C2IK2HY3.js +4 -0
  41. package/dist/chunk-C7BTJ32Z.js +1 -0
  42. package/dist/chunk-CBXSPL4W.js +1 -0
  43. package/dist/chunk-CEIQFLCN.js +1 -0
  44. package/dist/chunk-CERXUPGC.js +14 -0
  45. package/dist/chunk-DCPBRWVC.js +1 -0
  46. package/dist/chunk-DN2IE3VY.js +1 -0
  47. package/dist/chunk-DRFGABEB.js +1 -0
  48. package/dist/chunk-E3EMHAJB.js +1 -0
  49. package/dist/chunk-EKXY5COY.js +1 -0
  50. package/dist/chunk-EQU4MUQJ.js +1 -0
  51. package/dist/chunk-F2QU6WWX.js +1 -0
  52. package/dist/chunk-FFQ5EWII.js +294 -0
  53. package/dist/chunk-FKMC5OFF.js +1 -0
  54. package/dist/chunk-FQWB2F75.js +3 -0
  55. package/dist/chunk-FUOIGXI4.js +1 -0
  56. package/dist/chunk-FYFNUDOC.js +19 -0
  57. package/dist/chunk-G4BPGWJC.js +1 -0
  58. package/dist/chunk-GVQIPEZT.js +1 -0
  59. package/dist/chunk-GZS44BUW.js +102 -0
  60. package/dist/chunk-HIBX234C.js +6 -0
  61. package/dist/chunk-HRUGYZZ4.js +2 -0
  62. package/dist/chunk-HUIJMGVJ.js +586 -0
  63. package/dist/chunk-HZA6IAA4.js +1 -0
  64. package/dist/chunk-IU2ZQ6TE.js +2 -0
  65. package/dist/chunk-IX5ICOBV.js +7 -0
  66. package/dist/chunk-IZ3C5J7G.js +5 -0
  67. package/dist/chunk-JAO53IH2.js +1 -0
  68. package/dist/chunk-JCL2RRU6.js +1 -0
  69. package/dist/chunk-JQJBBXMX.js +17 -0
  70. package/dist/chunk-JUVAGMIH.js +1 -0
  71. package/dist/chunk-JXW374CL.js +359 -0
  72. package/dist/chunk-K2WUCOQJ.js +32 -0
  73. package/dist/chunk-K6CTUBFC.js +12 -0
  74. package/dist/chunk-KHSYW7I4.js +1 -0
  75. package/dist/chunk-KHTV6PBV.js +12 -0
  76. package/dist/chunk-KKTW6ZCA.js +5 -0
  77. package/dist/chunk-KLMDWDT2.js +1 -0
  78. package/dist/chunk-KN3WTTHZ.js +1 -0
  79. package/dist/chunk-KR6QDE7D.js +2 -0
  80. package/dist/chunk-KZOBF55B.js +1 -0
  81. package/dist/chunk-L2MGAEV3.js +6 -0
  82. package/dist/chunk-LDGAHMS7.js +159 -0
  83. package/dist/chunk-M2D7USAX.js +1 -0
  84. package/dist/chunk-M2ZHFKPN.js +6 -0
  85. package/dist/chunk-M3RYUB22.js +1 -0
  86. package/dist/chunk-M56NDIMD.js +1 -0
  87. package/dist/chunk-MCVRONUY.js +1 -0
  88. package/dist/chunk-MHWV5RQV.js +10 -0
  89. package/dist/chunk-MOA33ZFO.js +1 -0
  90. package/dist/chunk-MWGBTOO3.js +1 -0
  91. package/dist/chunk-MWY3A7O3.js +4 -0
  92. package/dist/chunk-N5PQPIBF.js +374 -0
  93. package/dist/chunk-NF2ABOOU.js +1 -0
  94. package/dist/chunk-NMBBTTIH.js +2 -0
  95. package/dist/chunk-NPEVESCV.js +3 -0
  96. package/dist/chunk-OBEWZXOQ.js +2 -0
  97. package/dist/chunk-OCOY5MV2.js +1 -0
  98. package/dist/chunk-OLZHWPZP.js +1 -0
  99. package/dist/chunk-OTY24J2W.js +1 -0
  100. package/dist/chunk-OY3PNHPZ.js +103 -0
  101. package/dist/chunk-P6XE4MH5.js +1 -0
  102. package/dist/chunk-PAP22IQO.js +264 -0
  103. package/dist/chunk-PD5ZHJWI.js +1 -0
  104. package/dist/chunk-PIBY5DDZ.js +1 -0
  105. package/dist/chunk-PYVAWAUO.js +5 -0
  106. package/dist/chunk-Q33IBIVJ.js +1 -0
  107. package/dist/chunk-Q4T2T2QE.js +15 -0
  108. package/dist/chunk-QA23HIH4.js +1 -0
  109. package/dist/chunk-QBSKKQBN.js +1 -0
  110. package/dist/chunk-QFWIDATO.js +1 -0
  111. package/dist/chunk-QSTEVZFQ.js +1 -0
  112. package/dist/chunk-S6EJHWJL.js +1 -0
  113. package/dist/chunk-SIMFNECG.js +1 -0
  114. package/dist/chunk-SXTMSGUE.js +1 -0
  115. package/dist/chunk-T542UQBY.js +1 -0
  116. package/dist/chunk-TQ6HYDVC.js +1 -0
  117. package/dist/chunk-TYZXGSHO.js +3 -0
  118. package/dist/chunk-UHJYPEY2.js +1 -0
  119. package/dist/chunk-UJVH7FZS.js +1 -0
  120. package/dist/chunk-UJXUSRQK.js +1 -0
  121. package/dist/chunk-ULFWK45W.js +64 -0
  122. package/dist/chunk-ULQG3XQS.js +1 -0
  123. package/dist/chunk-URZPVSJZ.js +559 -0
  124. package/dist/chunk-UWJ73J4B.js +1 -0
  125. package/dist/chunk-UXVZ2P63.js +1411 -0
  126. package/dist/chunk-UYXEA3Y6.js +1 -0
  127. package/dist/chunk-VBUZWRUL.js +1 -0
  128. package/dist/chunk-VICYNG2W.js +1 -0
  129. package/dist/chunk-WDC3KIZT.js +2 -0
  130. package/dist/chunk-WFXRSKRK.js +1 -0
  131. package/dist/chunk-WSDN25F5.js +1 -0
  132. package/dist/chunk-XEFQQPL4.js +1 -0
  133. package/dist/chunk-XITQULK4.js +3 -0
  134. package/dist/chunk-XONFGLJQ.js +847 -0
  135. package/dist/chunk-XOTA6JTZ.js +11 -0
  136. package/dist/chunk-XR6GMMEU.js +1 -0
  137. package/dist/chunk-XULPJ6UG.js +1 -0
  138. package/dist/chunk-XXVEHDVO.js +1 -0
  139. package/dist/chunk-Y7JGYGV7.js +1 -0
  140. package/dist/chunk-YOZNRLFC.js +1 -0
  141. package/dist/chunk-YTNDFQJT.js +3 -0
  142. package/dist/chunk-Z35BTAM6.js +2 -0
  143. package/dist/chunk-ZBRRJDGW.js +1 -0
  144. package/dist/chunk-ZGK3LGCH.js +4 -0
  145. package/dist/chunk-ZR76GGZ6.js +5 -0
  146. package/dist/chunk-ZSBA6VIC.js +1 -0
  147. package/dist/chunk-ZTMSBSYD.js +1 -0
  148. package/dist/cli/commands/app/app-logs/sources.js +2 -0
  149. package/dist/cli/commands/app/build.js +1 -0
  150. package/dist/cli/commands/app/bulk/cancel.js +1 -0
  151. package/dist/cli/commands/app/bulk/execute.js +9 -0
  152. package/dist/cli/commands/app/bulk/status.js +5 -0
  153. package/dist/cli/commands/app/config/link.js +4 -0
  154. package/dist/cli/commands/app/config/pull.js +1 -0
  155. package/dist/cli/commands/app/config/use.js +1 -0
  156. package/dist/cli/commands/app/config/validate.js +3 -0
  157. package/dist/cli/commands/app/demo/watcher.js +1 -0
  158. package/dist/cli/commands/app/deploy.js +22 -0
  159. package/dist/cli/commands/app/dev/clean.js +5 -0
  160. package/dist/cli/commands/app/dev.js +320 -0
  161. package/dist/cli/commands/app/env/pull.js +11 -0
  162. package/dist/cli/commands/app/env/show.js +1 -0
  163. package/dist/cli/commands/app/execute.js +1 -0
  164. package/dist/cli/commands/app/function/build.js +1 -0
  165. package/dist/cli/commands/app/function/info.js +16 -0
  166. package/dist/cli/commands/app/function/replay.js +5 -0
  167. package/dist/cli/commands/app/function/run.js +1 -0
  168. package/dist/cli/commands/app/function/schema.js +1 -0
  169. package/dist/cli/commands/app/function/typegen.js +1 -0
  170. package/dist/cli/commands/app/generate/extension.js +5 -0
  171. package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
  172. package/dist/cli/commands/app/import-extensions.js +1 -0
  173. package/dist/cli/commands/app/info.js +11 -0
  174. package/dist/cli/commands/app/init.js +10 -0
  175. package/dist/cli/commands/app/logs.js +2 -0
  176. package/dist/cli/commands/app/release.js +4 -0
  177. package/dist/cli/commands/app/versions/list.js +1 -0
  178. package/dist/cli/commands/app/webhook/trigger.js +25 -0
  179. package/dist/cli/commands/auth/login.js +1 -20
  180. package/dist/cli/commands/auth/logout.js +1 -12
  181. package/dist/cli/commands/cache/clear.js +1 -11
  182. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
  183. package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
  184. package/dist/cli/commands/config/autoupgrade/off.js +1 -22
  185. package/dist/cli/commands/config/autoupgrade/on.js +1 -22
  186. package/dist/cli/commands/config/autoupgrade/status.js +1 -30
  187. package/dist/cli/commands/debug/command-flags.js +1 -79
  188. package/dist/cli/commands/docs/generate.d.ts +0 -8
  189. package/dist/cli/commands/docs/generate.js +1 -157
  190. package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
  191. package/dist/cli/commands/doctor-release/theme/index.js +1 -56
  192. package/dist/cli/commands/help.js +1 -26
  193. package/dist/cli/commands/kitchen-sink/async.js +1 -16
  194. package/dist/cli/commands/kitchen-sink/index.js +1 -21
  195. package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
  196. package/dist/cli/commands/kitchen-sink/static.js +1 -16
  197. package/dist/cli/commands/notifications/generate.js +1 -11
  198. package/dist/cli/commands/notifications/list.js +1 -33
  199. package/dist/cli/commands/organization/list.js +1 -0
  200. package/dist/cli/commands/search.js +1 -27
  201. package/dist/cli/commands/theme/check.js +1 -0
  202. package/dist/cli/commands/theme/console.js +15 -0
  203. package/dist/cli/commands/theme/delete.js +7 -0
  204. package/dist/cli/commands/theme/dev.js +26 -0
  205. package/dist/cli/commands/theme/duplicate.js +32 -0
  206. package/dist/cli/commands/theme/info.js +1 -0
  207. package/dist/cli/commands/theme/init.js +8 -0
  208. package/dist/cli/commands/theme/language-server.js +1 -0
  209. package/dist/cli/commands/theme/list.js +1 -0
  210. package/dist/cli/commands/theme/metafields/pull.js +3 -0
  211. package/dist/cli/commands/theme/open.js +8 -0
  212. package/dist/cli/commands/theme/package.js +7 -0
  213. package/dist/cli/commands/theme/preview.js +1 -0
  214. package/dist/cli/commands/theme/profile.js +3 -0
  215. package/dist/cli/commands/theme/publish.js +7 -0
  216. package/dist/cli/commands/theme/pull.js +3 -0
  217. package/dist/cli/commands/theme/push.js +28 -0
  218. package/dist/cli/commands/theme/rename.js +6 -0
  219. package/dist/cli/commands/theme/share.js +3 -0
  220. package/dist/cli/commands/upgrade.js +1 -17
  221. package/dist/cli/commands/version.js +1 -10
  222. package/dist/command-registry.d.ts +8 -0
  223. package/dist/command-registry.js +1 -0
  224. package/dist/conf-store-BMZFATRQ.js +1 -0
  225. package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
  226. package/dist/deprecations-7LHRXPXU.js +1 -0
  227. package/dist/dist-LDXPBYSZ.js +1 -0
  228. package/dist/dist-V63ILV6L.js +1 -0
  229. package/dist/environments-5X7S2O5U.js +1 -0
  230. package/dist/error-ZRLNNGIQ.js +1 -0
  231. package/dist/error-handler-PRZFHPRG.js +1 -0
  232. package/dist/fs-H7V6IRSH.js +1 -0
  233. package/dist/hooks/app-init.d.ts +9 -0
  234. package/dist/hooks/app-init.js +1 -0
  235. package/dist/hooks/did-you-mean.d.ts +1 -0
  236. package/dist/hooks/did-you-mean.js +1 -0
  237. package/dist/hooks/hydrogen-init.d.ts +7 -0
  238. package/dist/hooks/hydrogen-init.js +1 -0
  239. package/dist/hooks/plugin-plugins.d.ts +1 -0
  240. package/dist/hooks/plugin-plugins.js +1 -0
  241. package/dist/hooks/postrun.js +1 -1
  242. package/dist/hooks/prerun.js +1 -1
  243. package/dist/hooks/public-metadata.d.ts +1 -0
  244. package/dist/hooks/public-metadata.js +1 -0
  245. package/dist/hooks/sensitive-metadata.d.ts +1 -0
  246. package/dist/hooks/sensitive-metadata.js +1 -0
  247. package/dist/hooks/tunnel-provider.d.ts +1 -0
  248. package/dist/hooks/tunnel-provider.js +1 -0
  249. package/dist/hooks/tunnel-start.d.ts +1 -0
  250. package/dist/hooks/tunnel-start.js +1 -0
  251. package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
  252. package/dist/index.js +254 -3668
  253. package/dist/is-global-IOWPCT2U.js +1 -0
  254. package/dist/latest-version-EFWBOTWM.js +49 -0
  255. package/dist/lib-5L7UKDEK.js +1 -0
  256. package/dist/lib-C3VO2BQW.js +1 -0
  257. package/dist/lib-QB6I6CTC.js +1 -0
  258. package/dist/local-MTKXSZ3I.js +1 -0
  259. package/dist/local-storage-CYEL4MXF.js +1 -0
  260. package/dist/metadata-NOVBMKLM.js +1 -0
  261. package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
  262. package/dist/node-package-manager-N5CVNHA3.js +1 -0
  263. package/dist/notifications-system-YX2GPLDW.js +1 -0
  264. package/dist/npa-ICFSA3NL.js +1 -0
  265. package/dist/output-Q46DT46U.js +1 -0
  266. package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
  267. package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
  268. package/dist/system-E6Q3OBX3.js +1 -0
  269. package/dist/tsconfig.tsbuildinfo +1 -1
  270. package/dist/typescript-K5CWIA4V.js +1 -0
  271. package/dist/ui-WRS2IDPP.js +1 -0
  272. package/dist/upgrade-TKUN2M5P.js +1 -0
  273. package/dist/version-5W5RVAPA.js +1 -0
  274. package/dist/version-BQJ3FPXD.js +1 -0
  275. package/dist/workerd-GOK6GWEX.js +18 -0
  276. package/oclif.manifest.json +5136 -5945
  277. package/package.json +17 -41
  278. package/dist/chunk-45T5XUIM.js +0 -1
  279. package/dist/chunk-52KHWFYF.js +0 -1
  280. package/dist/chunk-66TIGB4U.js +0 -415
  281. package/dist/chunk-675GKVCB.js +0 -3
  282. package/dist/chunk-7ES6PV7M.js +0 -847
  283. package/dist/chunk-BF7JM4FH.js +0 -396
  284. package/dist/chunk-FU2Y2M3M.js +0 -5
  285. package/dist/chunk-IDQ4X47Z.js +0 -3
  286. package/dist/chunk-JBSYWYIP.js +0 -2
  287. package/dist/chunk-PBKIXB7L.js +0 -63
  288. package/dist/chunk-SVA22NZQ.js +0 -607
  289. package/dist/error-handler-LC7FITE7.js +0 -1
  290. package/dist/http-proxy-node16-TTURN6MD.js +0 -38
  291. package/dist/lib-3WHF5XD3.js +0 -1
  292. package/dist/local-TWIGLQ7X.js +0 -1
  293. package/dist/node-package-manager-3UCLJPGW.js +0 -1
  294. package/dist/npa-OKDXXRCU.js +0 -1
  295. package/dist/ui-UYE67X4Y.js +0 -1
  296. package/dist/workerd-37BZZEVW.js +0 -18
  297. /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
@@ -0,0 +1 @@
1
+ import{n as a}from"./chunk-XONFGLJQ.js";import{d as i}from"./chunk-M56NDIMD.js";import{g as s}from"./chunk-VPRTJUIN.js";s();var e={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},g={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function p(t,n){let r=T(t);return r===e.LOCALHOST&&n===e.HTTP?!0:r===n}function f(t){return g.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function w(t,n){if(!p(t,n))throw new i(`Can't deliver your webhook payload to this address using '${n}'`,"Use a valid URL for address",l(n));let r=n;return f(t)&&(r=e.LOCALHOST),[t.trim(),r]}function l(t){return t===e.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===e.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===e.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function d(t,n){if(n.includes(t))return t;throw new i(`Api Version '${t}' does not exist`,`Allowed values: ${n.join(", ")}`,["Try again with a valid api-version value"])}function E(t,n,r){if(r.length===0)throw new i(`No topics found for '${n}'`);let o=c(t.trim(),r);if(o===void 0)throw new i(`Topic '${t}' does not exist for ApiVersion '${n}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return o}function c(t,n){return n.includes(t)?t:n.find(r=>r.toUpperCase().replace("/","_")===t)}function T(t){if(t){if(t.startsWith("pubsub:"))return e.PUBSUB;if(t.startsWith("arn:aws:events:"))return e.EVENTBRIDGE;if(f(t))return e.LOCALHOST;if(g.HTTP.test(t))return e.HTTP}}s();async function H(t,n,r){let o={method:"POST",body:n,headers:{"Content-Type":"application/json",...JSON.parse(r)}},u=await a(t,o);return u.status>=200&&u.status<300}export{H as a,e as b,p as c,w as d,d as e,E as f,T as g};
@@ -0,0 +1,3 @@
1
+ import{d as w,n as y,r as n}from"./chunk-XONFGLJQ.js";import{w as l}from"./chunk-L2MGAEV3.js";import{k as u,l as m}from"./chunk-ZSBA6VIC.js";import{a as h}from"./chunk-F2QU6WWX.js";import{a as x}from"./chunk-MOA33ZFO.js";import{O as S,u as d,w as g,x as N}from"./chunk-6G6TMKXF.js";import{f as _}from"./chunk-M56NDIMD.js";import{Qb as a}from"./chunk-N5PQPIBF.js";import{a as f}from"./chunk-ULQG3XQS.js";import{g as p}from"./chunk-VPRTJUIN.js";p();var $="https://cdn.shopify.com/static/cli/notifications.json",D="Cache is empty",C=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear"];function c(){return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL??$}var E=n.object({id:n.string(),message:n.string(),type:n.enum(["info","warning","error"]),frequency:n.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:n.string(),cta:n.object({label:n.string(),url:n.string().url()}).optional(),title:n.string().optional(),minVersion:n.string().optional(),maxVersion:n.string().optional(),minDate:n.string().optional(),maxDate:n.string().optional(),commands:n.array(n.string()).optional(),surface:n.string().optional()}),I=n.object({notifications:n.array(E)});async function Q(e,t=process.env){try{let r=x();if(b(r,t)||w(t))return;let o=await k(),s=v(o.notifications,r,e);a(`Notifications to show: ${s.length}`),await V(s)}catch(r){if(r.message===D){a("Notifications to show: 0 (Cache is empty)");return}if(r.message==="abort")throw new _;let o=`Error showing notifications: ${r.message}`;a(o);let{sendErrorToBugsnag:s}=await import("./error-handler-PRZFHPRG.js");await s(o,"unexpected_error")}}function b(e,t=process.env){return f(t.CI)||f(t.SHOPIFY_UNIT_TEST)||C.includes(e)}async function V(e){e.slice(0,2).forEach(t=>{let r={headline:t.title,body:t.message.replace(/\\n/g,`
2
+ `),link:t.cta};switch(t.type){case"info":{d(r);break}case"warning":{g(r);break}case"error":throw N(r),new Error("abort")}u(`notification-${t.id}`,new Date().getTime().toString())})}async function k(){let e=`notifications-${c()}`,t=m(e)?.value;if(!t)throw new Error(D);let r=JSON.parse(t);return I.parse(r)}async function X(){a("Fetching notifications...");let e=await y(c(),void 0,{useNetworkLevelRetry:!1,useAbortSignal:!0,timeoutMs:3*1e3});if(e.status!==200)throw new Error(`Failed to fetch notifications: ${e.statusText}`);let t=await e.text(),r=JSON.parse(t),o=I.parse(r);return await O(t),o}async function O(e){u(`notifications-${c()}`,e),a(`Notifications from ${c()} stored in the cache`)}function Z(e,t=process.argv,r=process.env){if(b(e,r)||!t[0]||!t[1])return;let o=t[0],i=[t[1],"notifications","list","--ignore-errors"];S(o,i,{background:!0,env:{...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},externalErrorHandler:async T=>{a(`Failed to fetch notifications in background: ${T.message}`)}})}function v(e,t,r,o=new Date(new Date().setUTCHours(0,0,0,0)),s=h){return e.filter(i=>B(i,s)).filter(i=>F(i,o)).filter(i=>A(i,t)).filter(i=>j(i,t,r)).filter(i=>q(i))}function B(e,t){let r=!e.minVersion||l(t,`>=${e.minVersion}`),o=!e.maxVersion||l(t,`<=${e.maxVersion}`);return r&&o}function F(e,t){let r=!e.minDate||new Date(e.minDate)<=t,o=!e.maxDate||new Date(e.maxDate)>=t;return r&&o}function A(e,t){return t===""?!0:!e.commands||e.commands.includes(t)}function j(e,t,r){let o=t.split(":")[0]??"all",s=e.surface??"all";return r?r.includes(s):s===o||s==="all"}function q(e){if(!e.frequency)return!0;let t=`notification-${e.id}`,r=m(t)?.value;if(!r)return!0;switch(e.frequency){case"always":return!0;case"once":return!1;case"once_a_day":return new Date().getTime()-Number(r)>24*3600*1e3;case"once_a_week":return new Date().getTime()-Number(r)>168*3600*1e3}}function ee(e){let t=[];return e.minDate&&t.push(`from ${e.minDate}`),e.maxDate&&t.push(`to ${e.maxDate}`),e.minVersion&&t.push(`from v${e.minVersion}`),e.maxVersion&&t.push(`to v${e.maxVersion}`),e.frequency==="once"&&t.push("show only once"),e.frequency==="once_a_day"&&t.push("show once a day"),e.frequency==="once_a_week"&&t.push("show once a week"),e.surface&&t.push(`surface = ${e.surface}`),e.commands&&t.push(`commands = ${e.commands.join(", ")}`),t.join(`
3
+ `)}export{Q as a,k as b,X as c,Z as d,v as e,ee as f};
@@ -0,0 +1 @@
1
+ import{c as p,g as o}from"./chunk-VPRTJUIN.js";var v=p((Jn,Ee)=>{o();var tt="2.0.0",st=Number.MAX_SAFE_INTEGER||9007199254740991,nt=16,it=250,ot=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Ee.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:nt,MAX_SAFE_BUILD_LENGTH:it,MAX_SAFE_INTEGER:st,RELEASE_TYPES:ot,SEMVER_SPEC_VERSION:tt,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var x=p((ei,fe)=>{o();var lt=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};fe.exports=lt});var g=p((q,he)=>{o();var{MAX_SAFE_COMPONENT_LENGTH:B,MAX_SAFE_BUILD_LENGTH:at,MAX_LENGTH:ct}=v(),ut=x();q=he.exports={};var Et=q.re=[],ft=q.safeRe=[],a=q.src=[],c=q.t={},ht=0,W="[a-zA-Z0-9-]",pt=[["\\s",1],["\\d",ct],[W,at]],Rt=t=>{for(let[e,r]of pt)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},R=(t,e,r)=>{let s=Rt(e),n=ht++;ut(t,n,e),c[t]=n,a[n]=e,Et[n]=new RegExp(e,r?"g":void 0),ft[n]=new RegExp(s,r?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*");R("NUMERICIDENTIFIERLOOSE","\\d+");R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${W}*`);R("MAINVERSION",`(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})`);R("MAINVERSIONLOOSE",`(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})`);R("PRERELEASEIDENTIFIER",`(?:${a[c.NUMERICIDENTIFIER]}|${a[c.NONNUMERICIDENTIFIER]})`);R("PRERELEASEIDENTIFIERLOOSE",`(?:${a[c.NUMERICIDENTIFIERLOOSE]}|${a[c.NONNUMERICIDENTIFIER]})`);R("PRERELEASE",`(?:-(${a[c.PRERELEASEIDENTIFIER]}(?:\\.${a[c.PRERELEASEIDENTIFIER]})*))`);R("PRERELEASELOOSE",`(?:-?(${a[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[c.PRERELEASEIDENTIFIERLOOSE]})*))`);R("BUILDIDENTIFIER",`${W}+`);R("BUILD",`(?:\\+(${a[c.BUILDIDENTIFIER]}(?:\\.${a[c.BUILDIDENTIFIER]})*))`);R("FULLPLAIN",`v?${a[c.MAINVERSION]}${a[c.PRERELEASE]}?${a[c.BUILD]}?`);R("FULL",`^${a[c.FULLPLAIN]}$`);R("LOOSEPLAIN",`[v=\\s]*${a[c.MAINVERSIONLOOSE]}${a[c.PRERELEASELOOSE]}?${a[c.BUILD]}?`);R("LOOSE",`^${a[c.LOOSEPLAIN]}$`);R("GTLT","((?:<|>)?=?)");R("XRANGEIDENTIFIERLOOSE",`${a[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);R("XRANGEIDENTIFIER",`${a[c.NUMERICIDENTIFIER]}|x|X|\\*`);R("XRANGEPLAIN",`[v=\\s]*(${a[c.XRANGEIDENTIFIER]})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:${a[c.PRERELEASE]})?${a[c.BUILD]}?)?)?`);R("XRANGEPLAINLOOSE",`[v=\\s]*(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:${a[c.PRERELEASELOOSE]})?${a[c.BUILD]}?)?)?`);R("XRANGE",`^${a[c.GTLT]}\\s*${a[c.XRANGEPLAIN]}$`);R("XRANGELOOSE",`^${a[c.GTLT]}\\s*${a[c.XRANGEPLAINLOOSE]}$`);R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${B}})(?:\\.(\\d{1,${B}}))?(?:\\.(\\d{1,${B}}))?`);R("COERCE",`${a[c.COERCEPLAIN]}(?:$|[^\\d])`);R("COERCEFULL",a[c.COERCEPLAIN]+`(?:${a[c.PRERELEASE]})?(?:${a[c.BUILD]})?(?:$|[^\\d])`);R("COERCERTL",a[c.COERCE],!0);R("COERCERTLFULL",a[c.COERCEFULL],!0);R("LONETILDE","(?:~>?)");R("TILDETRIM",`(\\s*)${a[c.LONETILDE]}\\s+`,!0);q.tildeTrimReplace="$1~";R("TILDE",`^${a[c.LONETILDE]}${a[c.XRANGEPLAIN]}$`);R("TILDELOOSE",`^${a[c.LONETILDE]}${a[c.XRANGEPLAINLOOSE]}$`);R("LONECARET","(?:\\^)");R("CARETTRIM",`(\\s*)${a[c.LONECARET]}\\s+`,!0);q.caretTrimReplace="$1^";R("CARET",`^${a[c.LONECARET]}${a[c.XRANGEPLAIN]}$`);R("CARETLOOSE",`^${a[c.LONECARET]}${a[c.XRANGEPLAINLOOSE]}$`);R("COMPARATORLOOSE",`^${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]})$|^$`);R("COMPARATOR",`^${a[c.GTLT]}\\s*(${a[c.FULLPLAIN]})$|^$`);R("COMPARATORTRIM",`(\\s*)${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]}|${a[c.XRANGEPLAIN]})`,!0);q.comparatorTrimReplace="$1$2$3";R("HYPHENRANGE",`^\\s*(${a[c.XRANGEPLAIN]})\\s+-\\s+(${a[c.XRANGEPLAIN]})\\s*$`);R("HYPHENRANGELOOSE",`^\\s*(${a[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[c.XRANGEPLAINLOOSE]})\\s*$`);R("STAR","(<|>)?=?\\s*\\*");R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var j=p((si,pe)=>{o();var $t=Object.freeze({loose:!0}),mt=Object.freeze({}),It=t=>t?typeof t!="object"?$t:t:mt;pe.exports=It});var z=p((ii,me)=>{o();var Re=/^[0-9]+$/,$e=(t,e)=>{let r=Re.test(t),s=Re.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Lt=(t,e)=>$e(e,t);me.exports={compareIdentifiers:$e,rcompareIdentifiers:Lt}});var N=p((li,Oe)=>{o();var X=x(),{MAX_LENGTH:Ie,MAX_SAFE_INTEGER:U}=v(),{safeRe:Le,t:Ne}=g(),Nt=j(),{compareIdentifiers:P}=z(),K=class t{constructor(e,r){if(r=Nt(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ie)throw new TypeError(`version is longer than ${Ie} characters`);X("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?Le[Ne.LOOSE]:Le[Ne.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>U||this.major<0)throw new TypeError("Invalid major version");if(this.minor>U||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>U||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<U)return i}return n}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(X("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),P(this.major,e.major)||P(this.minor,e.minor)||P(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(X("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return P(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(X("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return P(s,n)}while(++r)}inc(e,r,s){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(s)?1:0;if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),P(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Oe.exports=K});var w=p((ci,Ae)=>{o();var de=N(),Ot=(t,e,r=!1)=>{if(t instanceof de)return t;try{return new de(t,e)}catch(s){if(!r)return null;throw s}};Ae.exports=Ot});var Te=p((Ei,Se)=>{o();var dt=w(),At=(t,e)=>{let r=dt(t,e);return r?r.version:null};Se.exports=At});var we=p((hi,qe)=>{o();var St=w(),Tt=(t,e)=>{let r=St(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};qe.exports=Tt});var ve=p((Ri,Pe)=>{o();var ge=N(),qt=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new ge(t instanceof ge?t.version:t,r).inc(e,s,n).version}catch{return null}};Pe.exports=qt});var De=p((mi,Ce)=>{o();var xe=w(),wt=(t,e)=>{let r=xe(t,null,!0),s=xe(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,l=i?r:s,u=i?s:r,E=!!l.prerelease.length;if(!!u.prerelease.length&&!E)return!u.patch&&!u.minor?"major":l.patch?"patch":l.minor?"minor":"major";let m=E?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"};Ce.exports=wt});var ye=p((Li,Ge)=>{o();var gt=N(),Pt=(t,e)=>new gt(t,e).major;Ge.exports=Pt});var je=p((Oi,Fe)=>{o();var vt=N(),xt=(t,e)=>new vt(t,e).minor;Fe.exports=xt});var Ue=p((Ai,Xe)=>{o();var Ct=N(),Dt=(t,e)=>new Ct(t,e).patch;Xe.exports=Dt});var _e=p((Ti,Ve)=>{o();var Gt=w(),yt=(t,e)=>{let r=Gt(t,e);return r&&r.prerelease.length?r.prerelease:null};Ve.exports=yt});var S=p((wi,be)=>{o();var He=N(),Ft=(t,e,r)=>new He(t,r).compare(new He(e,r));be.exports=Ft});var Me=p((Pi,ke)=>{o();var jt=S(),Xt=(t,e,r)=>jt(e,t,r);ke.exports=Xt});var Be=p((xi,Ye)=>{o();var Ut=S(),Vt=(t,e)=>Ut(t,e,!0);Ye.exports=Vt});var V=p((Di,ze)=>{o();var We=N(),_t=(t,e,r)=>{let s=new We(t,r),n=new We(e,r);return s.compare(n)||s.compareBuild(n)};ze.exports=_t});var Ze=p((yi,Ke)=>{o();var Ht=V(),bt=(t,e)=>t.sort((r,s)=>Ht(r,s,e));Ke.exports=bt});var Qe=p((ji,Je)=>{o();var kt=V(),Mt=(t,e)=>t.sort((r,s)=>kt(s,r,e));Je.exports=Mt});var C=p((Ui,er)=>{o();var Yt=S(),Bt=(t,e,r)=>Yt(t,e,r)>0;er.exports=Bt});var _=p((_i,rr)=>{o();var Wt=S(),zt=(t,e,r)=>Wt(t,e,r)<0;rr.exports=zt});var Z=p((bi,tr)=>{o();var Kt=S(),Zt=(t,e,r)=>Kt(t,e,r)===0;tr.exports=Zt});var J=p((Mi,sr)=>{o();var Jt=S(),Qt=(t,e,r)=>Jt(t,e,r)!==0;sr.exports=Qt});var H=p((Bi,nr)=>{o();var es=S(),rs=(t,e,r)=>es(t,e,r)>=0;nr.exports=rs});var b=p((zi,ir)=>{o();var ts=S(),ss=(t,e,r)=>ts(t,e,r)<=0;ir.exports=ss});var Q=p((Zi,or)=>{o();var ns=Z(),is=J(),os=C(),ls=H(),as=_(),cs=b(),us=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ns(t,r,s);case"!=":return is(t,r,s);case">":return os(t,r,s);case">=":return ls(t,r,s);case"<":return as(t,r,s);case"<=":return cs(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};or.exports=us});var ar=p((Qi,lr)=>{o();var Es=N(),fs=w(),{safeRe:k,t:M}=g(),hs=(t,e)=>{if(t instanceof Es)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?k[M.COERCEFULL]:k[M.COERCE]);else{let E=e.includePrerelease?k[M.COERCERTLFULL]:k[M.COERCERTL],$;for(;($=E.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||$.index+$[0].length!==r.index+r[0].length)&&(r=$),E.lastIndex=$.index+$[1].length+$[2].length;E.lastIndex=-1}if(r===null)return null;let s=r[2],n=r[3]||"0",i=r[4]||"0",l=e.includePrerelease&&r[5]?`-${r[5]}`:"",u=e.includePrerelease&&r[6]?`+${r[6]}`:"";return fs(`${s}.${n}.${i}${l}${u}`,e)};lr.exports=hs});var ur=p((ro,cr)=>{o();var ee=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};cr.exports=ee});var T=p((so,pr)=>{o();var ps=/\s+/g,re=class t{constructor(e,r){if(r=$s(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof te)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(ps," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!fr(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&As(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Os)|(this.options.loose&&ds))+":"+e,n=Er.get(s);if(n)return n;let i=this.options.loose,l=i?A[O.HYPHENRANGELOOSE]:A[O.HYPHENRANGE];e=e.replace(l,Ds(this.options.includePrerelease)),I("hyphen replace",e),e=e.replace(A[O.COMPARATORTRIM],Is),I("comparator trim",e),e=e.replace(A[O.TILDETRIM],Ls),I("tilde trim",e),e=e.replace(A[O.CARETTRIM],Ns),I("caret trim",e);let u=e.split(" ").map(f=>Ss(f,this.options)).join(" ").split(/\s+/).map(f=>Cs(f,this.options));i&&(u=u.filter(f=>(I("loose invalid filter",f,this.options),!!f.match(A[O.COMPARATORLOOSE])))),I("range list",u);let E=new Map,$=u.map(f=>new te(f,this.options));for(let f of $){if(fr(f))return[f];E.set(f.value,f)}E.size>1&&E.has("")&&E.delete("");let m=[...E.values()];return Er.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>hr(s,r)&&e.set.some(n=>hr(n,r)&&s.every(i=>n.every(l=>i.intersects(l,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new ms(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Gs(this.set[r],e,this.options))return!0;return!1}};pr.exports=re;var Rs=ur(),Er=new Rs,$s=j(),te=D(),I=x(),ms=N(),{safeRe:A,t:O,comparatorTrimReplace:Is,tildeTrimReplace:Ls,caretTrimReplace:Ns}=g(),{FLAG_INCLUDE_PRERELEASE:Os,FLAG_LOOSE:ds}=v(),fr=t=>t.value==="<0.0.0-0",As=t=>t.value==="",hr=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Ss=(t,e)=>(I("comp",t,e),t=ws(t,e),I("caret",t),t=Ts(t,e),I("tildes",t),t=Ps(t,e),I("xrange",t),t=xs(t,e),I("stars",t),t),d=t=>!t||t.toLowerCase()==="x"||t==="*",Ts=(t,e)=>t.trim().split(/\s+/).map(r=>qs(r,e)).join(" "),qs=(t,e)=>{let r=e.loose?A[O.TILDELOOSE]:A[O.TILDE];return t.replace(r,(s,n,i,l,u)=>{I("tilde",t,s,n,i,l,u);let E;return d(n)?E="":d(i)?E=`>=${n}.0.0 <${+n+1}.0.0-0`:d(l)?E=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:u?(I("replaceTilde pr",u),E=`>=${n}.${i}.${l}-${u} <${n}.${+i+1}.0-0`):E=`>=${n}.${i}.${l} <${n}.${+i+1}.0-0`,I("tilde return",E),E})},ws=(t,e)=>t.trim().split(/\s+/).map(r=>gs(r,e)).join(" "),gs=(t,e)=>{I("caret",t,e);let r=e.loose?A[O.CARETLOOSE]:A[O.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,l,u,E)=>{I("caret",t,n,i,l,u,E);let $;return d(i)?$="":d(l)?$=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d(u)?i==="0"?$=`>=${i}.${l}.0${s} <${i}.${+l+1}.0-0`:$=`>=${i}.${l}.0${s} <${+i+1}.0.0-0`:E?(I("replaceCaret pr",E),i==="0"?l==="0"?$=`>=${i}.${l}.${u}-${E} <${i}.${l}.${+u+1}-0`:$=`>=${i}.${l}.${u}-${E} <${i}.${+l+1}.0-0`:$=`>=${i}.${l}.${u}-${E} <${+i+1}.0.0-0`):(I("no pr"),i==="0"?l==="0"?$=`>=${i}.${l}.${u}${s} <${i}.${l}.${+u+1}-0`:$=`>=${i}.${l}.${u}${s} <${i}.${+l+1}.0-0`:$=`>=${i}.${l}.${u} <${+i+1}.0.0-0`),I("caret return",$),$})},Ps=(t,e)=>(I("replaceXRanges",t,e),t.split(/\s+/).map(r=>vs(r,e)).join(" ")),vs=(t,e)=>{t=t.trim();let r=e.loose?A[O.XRANGELOOSE]:A[O.XRANGE];return t.replace(r,(s,n,i,l,u,E)=>{I("xRange",t,s,n,i,l,u,E);let $=d(i),m=$||d(l),f=m||d(u),L=f;return n==="="&&L&&(n=""),E=e.includePrerelease?"-0":"",$?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&L?(m&&(l=0),u=0,n===">"?(n=">=",m?(i=+i+1,l=0,u=0):(l=+l+1,u=0)):n==="<="&&(n="<",m?i=+i+1:l=+l+1),n==="<"&&(E="-0"),s=`${n+i}.${l}.${u}${E}`):m?s=`>=${i}.0.0${E} <${+i+1}.0.0-0`:f&&(s=`>=${i}.${l}.0${E} <${i}.${+l+1}.0-0`),I("xRange return",s),s})},xs=(t,e)=>(I("replaceStars",t,e),t.trim().replace(A[O.STAR],"")),Cs=(t,e)=>(I("replaceGTE0",t,e),t.trim().replace(A[e.includePrerelease?O.GTE0PRE:O.GTE0],"")),Ds=t=>(e,r,s,n,i,l,u,E,$,m,f,L)=>(d(s)?r="":d(n)?r=`>=${s}.0.0${t?"-0":""}`:d(i)?r=`>=${s}.${n}.0${t?"-0":""}`:l?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,d($)?E="":d(m)?E=`<${+$+1}.0.0-0`:d(f)?E=`<${$}.${+m+1}.0-0`:L?E=`<=${$}.${m}.${f}-${L}`:t?E=`<${$}.${m}.${+f+1}-0`:E=`<=${E}`,`${r} ${E}`.trim()),Gs=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(I(t[s].semver),t[s].semver!==te.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var D=p((io,Nr)=>{o();var G=Symbol("SemVer ANY"),ie=class t{static get ANY(){return G}constructor(e,r){if(r=Rr(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ne("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===G?this.value="":this.value=this.operator+this.semver.version,ne("comp",this)}parse(e){let r=this.options.loose?$r[mr.COMPARATORLOOSE]:$r[mr.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ir(s[2],this.options.loose):this.semver=G}toString(){return this.value}test(e){if(ne("Comparator.test",e,this.options.loose),this.semver===G||e===G)return!0;if(typeof e=="string")try{e=new Ir(e,this.options)}catch{return!1}return se(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Lr(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Lr(this.value,r).test(e.semver):(r=Rr(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||se(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||se(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Nr.exports=ie;var Rr=j(),{safeRe:$r,t:mr}=g(),se=Q(),ne=x(),Ir=N(),Lr=T()});var y=p((lo,Or)=>{o();var ys=T(),Fs=(t,e,r)=>{try{e=new ys(e,r)}catch{return!1}return e.test(t)};Or.exports=Fs});var Ar=p((co,dr)=>{o();var js=T(),Xs=(t,e)=>new js(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));dr.exports=Xs});var Tr=p((Eo,Sr)=>{o();var Us=N(),Vs=T(),_s=(t,e,r)=>{let s=null,n=null,i=null;try{i=new Vs(e,r)}catch{return null}return t.forEach(l=>{i.test(l)&&(!s||n.compare(l)===-1)&&(s=l,n=new Us(s,r))}),s};Sr.exports=_s});var wr=p((ho,qr)=>{o();var Hs=N(),bs=T(),ks=(t,e,r)=>{let s=null,n=null,i=null;try{i=new bs(e,r)}catch{return null}return t.forEach(l=>{i.test(l)&&(!s||n.compare(l)===1)&&(s=l,n=new Hs(s,r))}),s};qr.exports=ks});var vr=p((Ro,Pr)=>{o();var oe=N(),Ms=T(),gr=C(),Ys=(t,e)=>{t=new Ms(t,e);let r=new oe("0.0.0");if(t.test(r)||(r=new oe("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(l=>{let u=new oe(l.semver.version);switch(l.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||gr(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),i&&(!r||gr(r,i))&&(r=i)}return r&&t.test(r)?r:null};Pr.exports=Ys});var Cr=p((mo,xr)=>{o();var Bs=T(),Ws=(t,e)=>{try{return new Bs(t,e).range||"*"}catch{return null}};xr.exports=Ws});var Y=p((Lo,Fr)=>{o();var zs=N(),yr=D(),{ANY:Ks}=yr,Zs=T(),Js=y(),Dr=C(),Gr=_(),Qs=b(),en=H(),rn=(t,e,r,s)=>{t=new zs(t,s),e=new Zs(e,s);let n,i,l,u,E;switch(r){case">":n=Dr,i=Qs,l=Gr,u=">",E=">=";break;case"<":n=Gr,i=en,l=Dr,u="<",E="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Js(t,e,s))return!1;for(let $=0;$<e.set.length;++$){let m=e.set[$],f=null,L=null;if(m.forEach(h=>{h.semver===Ks&&(h=new yr(">=0.0.0")),f=f||h,L=L||h,n(h.semver,f.semver,s)?f=h:l(h.semver,L.semver,s)&&(L=h)}),f.operator===u||f.operator===E||(!L.operator||L.operator===u)&&i(t,L.semver))return!1;if(L.operator===E&&l(t,L.semver))return!1}return!0};Fr.exports=rn});var Xr=p((Oo,jr)=>{o();var tn=Y(),sn=(t,e,r)=>tn(t,e,">",r);jr.exports=sn});var Vr=p((So,Ur)=>{o();var nn=Y(),on=(t,e,r)=>nn(t,e,"<",r);Ur.exports=on});var br=p((qo,Hr)=>{o();var _r=T(),ln=(t,e,r)=>(t=new _r(t,r),e=new _r(e,r),t.intersects(e,r));Hr.exports=ln});var Mr=p((go,kr)=>{o();var an=y(),cn=S();kr.exports=(t,e,r)=>{let s=[],n=null,i=null,l=t.sort((m,f)=>cn(m,f,r));for(let m of l)an(m,e,r)?(i=m,n||(n=m)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let u=[];for(let[m,f]of s)m===f?u.push(m):!f&&m===l[0]?u.push("*"):f?m===l[0]?u.push(`<=${f}`):u.push(`${m} - ${f}`):u.push(`>=${m}`);let E=u.join(" || "),$=typeof e.raw=="string"?e.raw:String(e);return E.length<$.length?E:e}});var Zr=p((vo,Kr)=>{o();var Yr=T(),ae=D(),{ANY:le}=ae,F=y(),ce=S(),un=(t,e,r={})=>{if(t===e)return!0;t=new Yr(t,r),e=new Yr(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let l=fn(n,i,r);if(s=s||l!==null,l)continue e}if(s)return!1}return!0},En=[new ae(">=0.0.0-0")],Br=[new ae(">=0.0.0")],fn=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===le){if(e.length===1&&e[0].semver===le)return!0;r.includePrerelease?t=En:t=Br}if(e.length===1&&e[0].semver===le){if(r.includePrerelease)return!0;e=Br}let s=new Set,n,i;for(let h of t)h.operator===">"||h.operator===">="?n=Wr(n,h,r):h.operator==="<"||h.operator==="<="?i=zr(i,h,r):s.add(h.semver);if(s.size>1)return null;let l;if(n&&i){if(l=ce(n.semver,i.semver,r),l>0)return null;if(l===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let h of s){if(n&&!F(h,String(n),r)||i&&!F(h,String(i),r))return null;for(let rt of e)if(!F(h,String(rt),r))return!1;return!0}let u,E,$,m,f=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,L=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;f&&f.prerelease.length===1&&i.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let h of e){if(m=m||h.operator===">"||h.operator===">=",$=$||h.operator==="<"||h.operator==="<=",n){if(L&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===L.major&&h.semver.minor===L.minor&&h.semver.patch===L.patch&&(L=!1),h.operator===">"||h.operator===">="){if(u=Wr(n,h,r),u===h&&u!==n)return!1}else if(n.operator===">="&&!F(n.semver,String(h),r))return!1}if(i){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator==="<"||h.operator==="<="){if(E=zr(i,h,r),E===h&&E!==i)return!1}else if(i.operator==="<="&&!F(i.semver,String(h),r))return!1}if(!h.operator&&(i||n)&&l!==0)return!1}return!(n&&$&&!i&&l!==0||i&&m&&!n&&l!==0||L||f)},Wr=(t,e,r)=>{if(!t)return e;let s=ce(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},zr=(t,e,r)=>{if(!t)return e;let s=ce(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Kr.exports=un});var Zn=p((Co,et)=>{o();var ue=g(),Jr=v(),hn=N(),Qr=z(),pn=w(),Rn=Te(),$n=we(),mn=ve(),In=De(),Ln=ye(),Nn=je(),On=Ue(),dn=_e(),An=S(),Sn=Me(),Tn=Be(),qn=V(),wn=Ze(),gn=Qe(),Pn=C(),vn=_(),xn=Z(),Cn=J(),Dn=H(),Gn=b(),yn=Q(),Fn=ar(),jn=D(),Xn=T(),Un=y(),Vn=Ar(),_n=Tr(),Hn=wr(),bn=vr(),kn=Cr(),Mn=Y(),Yn=Xr(),Bn=Vr(),Wn=br(),zn=Mr(),Kn=Zr();et.exports={parse:pn,valid:Rn,clean:$n,inc:mn,diff:In,major:Ln,minor:Nn,patch:On,prerelease:dn,compare:An,rcompare:Sn,compareLoose:Tn,compareBuild:qn,sort:wn,rsort:gn,gt:Pn,lt:vn,eq:xn,neq:Cn,gte:Dn,lte:Gn,cmp:yn,coerce:Fn,Comparator:jn,Range:Xn,satisfies:Un,toComparators:Vn,maxSatisfying:_n,minSatisfying:Hn,minVersion:bn,validRange:kn,outside:Mn,gtr:Yn,ltr:Bn,intersects:Wn,simplifyRange:zn,subset:Kn,SemVer:hn,re:ue.re,src:ue.src,tokens:ue.t,SEMVER_SPEC_VERSION:Jr.SEMVER_SPEC_VERSION,RELEASE_TYPES:Jr.RELEASE_TYPES,compareIdentifiers:Qr.compareIdentifiers,rcompareIdentifiers:Qr.rcompareIdentifiers}});export{Zn as a};
@@ -0,0 +1,19 @@
1
+ import{k as w,q as $}from"./chunk-XITQULK4.js";import{$ as ne,aa as E}from"./chunk-UXVZ2P63.js";import{r as C}from"./chunk-L2MGAEV3.js";import{b as P}from"./chunk-XR6GMMEU.js";import{u as S,v as T}from"./chunk-6G6TMKXF.js";import{r as te}from"./chunk-LDGAHMS7.js";import{$a as I,Mb as p,Nb as A,Ob as N,Qb as L,Ta as R,na as _,ua as F}from"./chunk-N5PQPIBF.js";import{d as k,p as x}from"./chunk-IU2ZQ6TE.js";import{e as O,g as v}from"./chunk-VPRTJUIN.js";v();v();var s=O(E(),1),h=O(ne(),1);function re(t){switch(t){case"error":return s.Severity.ERROR;case"suggestion":case"warning":return s.Severity.WARNING;case"style":case"info":return s.Severity.INFO;case"crash":return}}function G(t){switch(t){case s.Severity.ERROR:return"error";case s.Severity.WARNING:return"warning";case s.Severity.INFO:return"info"}}function ie(t,e,r){let n=s.path.fsPath(t),a=_(n).toString().split(`
2
+ `).slice(e,r+1),c=a.length===1;return a.map((f,m)=>{let u=e+m+1,d=c?f.trim():f;return`${u} ${d}`}).join(`
3
+ `)}function se(t){switch(t){case s.Severity.ERROR:return{error:`
4
+ [error]:`};case s.Severity.WARNING:return{warn:`
5
+ [warning]:`};case s.Severity.INFO:return{info:`
6
+ [info]:`}}}function oe(t){return t.map((r,n)=>{let{message:i,uri:o,start:a,end:c,check:f,severity:m}=r,u=ie(o,a.line,c.line),d=n===t.length-1?"":`
7
+
8
+ `;return[se(m),{bold:f},{subdued:`
9
+ ${i}`},`
10
+
11
+ ${u}`,d]}).flat()}var ae=(t,e)=>t.severity-e.severity;function j(t){let e=t.reduce((r,n)=>{let{uri:i}=n,o=s.path.fsPath(i);return r[o]??=[],r[o].push(n),r},{});return Object.keys(e).reduce((r,n)=>(r[n]=e[n].sort(ae),r),{})}function W(t){return t.reduce((e,r)=>(!Object.prototype.hasOwnProperty.call(e,r.severity)&&(e[r.severity]=0),e[r.severity]++,e),{})}function H(t,e,r){let n=[`${r.length} files inspected`];if(t.length===0)n.push("with no offenses found.");else{n.push(`with ${t.length} total offenses found across ${Object.keys(e).length} files.`);let i=W(t);i[s.Severity.ERROR]&&n.push(`
12
+ ${i[s.Severity.ERROR]} errors.`),i[s.Severity.WARNING]&&n.push(`
13
+ ${i[s.Severity.WARNING]} warnings.`),i[s.Severity.INFO]&&n.push(`
14
+ ${i[s.Severity.INFO]} info issues.`)}return n}function M(t,e,r){Object.keys(t).sort().forEach(i=>{let o=i.replace(e,"").slice(1);S({headline:r?`[${r}] ${o}`:o,body:oe(t[i])})})}function Y(t,e){return Object.entries(t).map(([r,n])=>{let i=n.map(a=>({check:a.check,severity:G(a.severity),start_row:a.start.line,start_column:a.start.character,end_row:a.end.line,end_column:a.end.character,message:a.message})),o=W(n);return{environment:e,path:r,offenses:i,errorCount:o[s.Severity.ERROR]??0,warningCount:o[s.Severity.WARNING]??0,infoCount:o[s.Severity.INFO]??0}})}function q(t,e){e||process.exit(0);let r=re(e),n=r!==void 0&&t.some(i=>i.severity<=r);process.exit(n?1:0)}function ce(t){return t.split(`
15
+ `).map(e=>`# ${e}`).join(`
16
+ `)}async function U(t){let e=".theme-check.yml",r=k(t,e);if(await R(r)){A(`${e} already exists at ${t}`);return}let{settings:n}=await(0,s.loadConfig)(void 0,t),i=ce(h.default.stringify(n)),o=h.default.stringify({extends:"theme-check:recommended",ignore:["node_modules/**"]});await F(r,`${o}${i}`),N(`Created ${e} at ${t}`)}var fe=async(t,e)=>{let r=(0,s.applyFixToString)(t.source,e),n=s.path.fsPath(t.uri);await F(n,r)};async function B(t,e){await(0,s.autofix)(t,e,fe)}async function J(t,e,r){let{ignore:n,settings:i,rootUri:o}=await(0,s.loadConfig)(e,t),a={extends:[],ignore:[...new Set(n)],rootUri:o,...i},c=r?{[r]:a}:a;p(h.default.stringify(c))}async function D(t,e,r){let{settings:n,ignore:i,checks:o}=await(0,s.loadConfig)(e,t),a=[...new Set(i)],f=Object.keys(n).reduce((u,d)=>{let{severity:z,enabled:K,...Q}=n[d];if(!K)return u;let X=G(z??s.Severity.INFO),y=o.find(ee=>ee.meta.code===d),Z=y&&y.meta?{description:y.meta.docs.description,doc:y.meta.docs.url}:{};return u[d]={severity:X,...Z,ignored_patterns:`[${a.join(", ")}]`,...Q},u},{}),m=r?{[r]:f}:f;p(h.default.stringify(m))}function V(t){return"_handle"in t&&typeof t._handle=="object"&&t._handle!==null&&typeof t._handle.setBlocking=="function"}var l=O(te(),1);var g=O(E(),1);var b=class extends ${static{this.summary="Validate the theme."}static{this.descriptionWithMarkdown="Calls and runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) to analyze your theme code for errors and to ensure that it follows theme and Liquid best practices. [Learn more about the checks that Theme Check runs.](https://shopify.dev/docs/themes/tools/theme-check/checks)"}static{this.description=this.descriptionWithoutMarkdown()}static{this.flags={...P,path:w.path,"auto-correct":l.Flags.boolean({char:"a",required:!1,description:"Automatically fix offenses",env:"SHOPIFY_FLAG_AUTO_CORRECT"}),config:l.Flags.string({char:"C",required:!1,description:`Use the config provided, overriding .theme-check.yml if present
17
+ Supports all theme-check: config values, e.g., theme-check:theme-app-extension,
18
+ theme-check:recommended, theme-check:all
19
+ For backwards compatibility, :theme_app_extension is also supported `,env:"SHOPIFY_FLAG_CONFIG"}),"fail-level":l.Flags.string({required:!1,description:"Minimum severity for exit with error code",env:"SHOPIFY_FLAG_FAIL_LEVEL",options:["crash","error","suggestion","style","warning","info"],default:"error"}),init:l.Flags.boolean({required:!1,description:"Generate a .theme-check.yml file",env:"SHOPIFY_FLAG_INIT"}),list:l.Flags.boolean({required:!1,description:"List enabled checks",env:"SHOPIFY_FLAG_LIST"}),output:l.Flags.string({char:"o",required:!1,description:"The output format to use",env:"SHOPIFY_FLAG_OUTPUT",options:["text","json"],default:"text"}),print:l.Flags.boolean({required:!1,description:"Output active config to STDOUT",env:"SHOPIFY_FLAG_PRINT"}),version:l.Flags.boolean({char:"v",required:!1,description:"Print Theme Check version",env:"SHOPIFY_FLAG_VERSION"}),environment:w.environment}}static{this.multiEnvironmentsFlags=["path"]}async command(e,r,n){let i=e.path,o=e.environment?.[0],c=e.config?.startsWith(":")&&g.LegacyIdentifiers.has(e.config.slice(1))?g.LegacyIdentifiers.get(e.config.slice(1)):e.config;if(e.init){await U(i);return}if(e.version){let u=await I(k("node_modules","@shopify","theme-check-node","package.json"),{type:"file",cwd:x(import.meta.url)}),d="unknown";u&&(d=await C(u)??"unknown"),p(d);return}if(e.print){await J(i,c,o);return}if(e.list){await D(i,c,o);return}let{offenses:f,theme:m}=await ue(i,e.output,c,o);if(e["auto-correct"]&&await B(m,f),!n)return q(f,e["fail-level"])}};async function ue(t,e,r,n){let{offenses:i,theme:o}=await(0,g.themeCheckRun)(t,r,c=>{process.env.SHOPIFY_TMP_FLAG_DEBUG&&L(c)}),a=j(i);if(e==="text"&&(M(a,t,n),(i.length?S:T)({headline:n?`[${n}] Theme Check Summary.`:"Theme Check Summary.",body:H(i,a,o)})),e==="json"){let c=process.stdout;V(c)&&c._handle.setBlocking(!0),p(JSON.stringify(Y(a,n)))}return{offenses:i,theme:o}}export{b as a,ue as b};
@@ -0,0 +1 @@
1
+ import{Da as e}from"./chunk-54CAKCYR.js";import{g as t}from"./chunk-VPRTJUIN.js";t();var p=class extends e{};export{p as a};
@@ -0,0 +1 @@
1
+ import{c as d}from"./chunk-CBXSPL4W.js";import{xa as i}from"./chunk-XONFGLJQ.js";import{A as s,D as u,w as a,x as c}from"./chunk-6G6TMKXF.js";import{g as m}from"./chunk-VPRTJUIN.js";m();function f(e){return[`'${e.name}'`,{subdued:`(#${e.id})`}]}function y(e){return{list:{items:e.map(f)}}}async function b(e,r="It doesn't seem like you're running this command in a theme directory.",o,n){if(e)return!0;if(n)return c({headline:o?`Environment: ${o}`:"",body:r}),!1;if(a({body:r}),!process.stdout.isTTY)return!0;let t=await s({message:"Do you want to proceed?"});return i(`theme-service:confirm-directory:${t}`),t}async function g(e,r,o){if(e.role!==d||!process.stdout.isTTY||o)return!0;let n=`You're about to ${r} on your live theme "${e.name}". This will make changes visible to customers. Are you sure you want to proceed?`,t=await s({message:n,confirmationMessage:"Yes, proceed with live theme",cancellationMessage:"No, cancel"});return i(`theme-service:confirm-live-theme:${t}`),t}async function v(e,r,o=!1){e.length>0&&await u(e,{renderOptions:{stdout:r??process.stderr},noProgressBar:o})}export{f as a,y as b,b as c,g as d,v as e};