@shopify/cli 0.0.0-snapshot-20260529095708 → 0.0.0-snapshot-20260529134635

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 (222) hide show
  1. package/dist/analytics-P3RHTMS6.js +1 -0
  2. package/dist/analytics-P7HLTUUC.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/{chunk-KYGZEC24.js → chunk-24CBGP4I.js} +1 -1
  5. package/dist/{chunk-ON43SEWP.js → chunk-2CH6J7DU.js} +1 -1
  6. package/dist/{chunk-LOMYSS6G.js → chunk-32VSRKW6.js} +1 -1
  7. package/dist/{chunk-6SRPU3UN.js → chunk-3ETPVNO4.js} +1 -1
  8. package/dist/{chunk-UT3FNKCK.js → chunk-3LRBA2P7.js} +1 -1
  9. package/dist/{chunk-YJOJVJWD.js → chunk-3XTVBQTA.js} +1 -1
  10. package/dist/{chunk-357OIAHW.js → chunk-4IKHLRZL.js} +1 -1
  11. package/dist/{chunk-RMRXWIAS.js → chunk-4MPUUIBH.js} +1 -1
  12. package/dist/{chunk-JCLUYCTC.js → chunk-4PVZC6ZA.js} +2 -2
  13. package/dist/{chunk-DVF6GXVZ.js → chunk-4SKBJORU.js} +1 -1
  14. package/dist/{chunk-VGD3F3EE.js → chunk-54XCZDJR.js} +1 -1
  15. package/dist/{chunk-QRAC43MG.js → chunk-5ELT7DPJ.js} +1 -1
  16. package/dist/{chunk-XYWTCN22.js → chunk-5YI3LOKJ.js} +1 -1
  17. package/dist/{chunk-2RS7UGXD.js → chunk-67AFHB5Z.js} +1 -1
  18. package/dist/{chunk-RWGTJX3G.js → chunk-6GW7T3O7.js} +1 -1
  19. package/dist/{chunk-3ODFSKK3.js → chunk-6PAOR3TW.js} +3 -3
  20. package/dist/{chunk-56ENJ2TL.js → chunk-6RBPNXHX.js} +1 -1
  21. package/dist/{chunk-UW7RMASB.js → chunk-6UGHSVRE.js} +1 -1
  22. package/dist/{chunk-BYGJDFER.js → chunk-6UUEQ37L.js} +1 -1
  23. package/dist/{chunk-G22UVXJ5.js → chunk-6V7RKHUL.js} +1 -1
  24. package/dist/{chunk-Y64BSWVY.js → chunk-7BNELDYL.js} +1 -1
  25. package/dist/{chunk-HEIIOJUQ.js → chunk-7MZW3UQH.js} +1 -1
  26. package/dist/{chunk-ZB4OMMAT.js → chunk-AK3MADND.js} +1 -1
  27. package/dist/{chunk-GXD2LYKB.js → chunk-B3UUQOFB.js} +1 -1
  28. package/dist/{chunk-T5R4SVTZ.js → chunk-BBAZPHWS.js} +1 -1
  29. package/dist/{chunk-7REHYS4F.js → chunk-CFUHTMUD.js} +1 -1
  30. package/dist/{chunk-DKHNBNIX.js → chunk-CW3LRQBF.js} +1 -1
  31. package/dist/{chunk-IBR5TZRE.js → chunk-DLUBJJQT.js} +1 -1
  32. package/dist/{chunk-J42Z353K.js → chunk-DQBMNPXQ.js} +1 -1
  33. package/dist/{chunk-ER2GJ4AJ.js → chunk-DUWQVDIM.js} +1 -1
  34. package/dist/{chunk-HQK6R5ZQ.js → chunk-EQJQVBSZ.js} +1 -1
  35. package/dist/{chunk-A22XAO2H.js → chunk-EWVREPJ5.js} +1 -1
  36. package/dist/{chunk-AEFER5WA.js → chunk-F2KA77GF.js} +1 -1
  37. package/dist/{chunk-GSIOSXMR.js → chunk-F3CAXZRZ.js} +1 -1
  38. package/dist/{chunk-V2WSINE6.js → chunk-FHKWZK2R.js} +1 -1
  39. package/dist/{chunk-I55NI3AJ.js → chunk-GN2T6DLA.js} +1 -1
  40. package/dist/{chunk-DNL2VGCU.js → chunk-I3LKNWVA.js} +2 -2
  41. package/dist/{chunk-N4Q6DDUM.js → chunk-IALII2RY.js} +1 -1
  42. package/dist/{chunk-X6J563KT.js → chunk-IFVG4DVO.js} +1 -1
  43. package/dist/{chunk-SGNMFRKQ.js → chunk-IO4AZDF4.js} +1 -1
  44. package/dist/{chunk-LJJ2RSOM.js → chunk-IPVRLDJA.js} +1 -1
  45. package/dist/{chunk-BQLCWFYL.js → chunk-IZ4QDMLE.js} +1 -1
  46. package/dist/{chunk-HOG5CMPZ.js → chunk-IZBRNIXW.js} +1 -1
  47. package/dist/{chunk-NJZCMSN5.js → chunk-J2VLO4EY.js} +1 -1
  48. package/dist/{chunk-Q7PTJGXU.js → chunk-J6OZYQGF.js} +1 -1
  49. package/dist/{chunk-KKHFNKFV.js → chunk-JO4IFVYW.js} +1 -1
  50. package/dist/{chunk-EVN2PDJV.js → chunk-JODFPUAQ.js} +1 -1
  51. package/dist/chunk-JOUSXVRS.js +1 -0
  52. package/dist/{chunk-52FDPSF4.js → chunk-JVSOZDAO.js} +1 -1
  53. package/dist/{chunk-WOR3LSFH.js → chunk-JYZTW7B4.js} +1 -1
  54. package/dist/{chunk-FVYNHDU5.js → chunk-K3BLYTSS.js} +1 -1
  55. package/dist/{chunk-J3TLZU6G.js → chunk-KDA6FVYX.js} +1 -1
  56. package/dist/{chunk-F7TF5C6G.js → chunk-KOXDHFRA.js} +1 -1
  57. package/dist/{chunk-5G5FRMXA.js → chunk-L3TN6KGR.js} +1 -1
  58. package/dist/{chunk-KAE66QYE.js → chunk-LMTHK4AC.js} +1 -1
  59. package/dist/{chunk-5LCVA56T.js → chunk-LZX6V2H4.js} +1 -1
  60. package/dist/{chunk-NWJC4BVM.js → chunk-N2N2L3WD.js} +1 -1
  61. package/dist/{chunk-EOPSJXYR.js → chunk-NEXOH4MR.js} +1 -1
  62. package/dist/chunk-NREZ2RJ7.js +1 -0
  63. package/dist/{chunk-IARGV6W5.js → chunk-OMLJTLTL.js} +1 -1
  64. package/dist/{chunk-MG5UL2VK.js → chunk-OUH45V4N.js} +1 -1
  65. package/dist/{chunk-CDKYACQA.js → chunk-P5NZBPPD.js} +1 -1
  66. package/dist/{chunk-T7LIZZZ5.js → chunk-PA6H2JVD.js} +1 -1
  67. package/dist/{chunk-UWN2OXJT.js → chunk-PGUKHYQ5.js} +1 -1
  68. package/dist/{chunk-KYNQTAD3.js → chunk-PPJHKRNT.js} +1 -1
  69. package/dist/{chunk-3ZKOGKTA.js → chunk-PWZRNKZZ.js} +1 -1
  70. package/dist/{chunk-2SUYQJVJ.js → chunk-PX2OPQLC.js} +1 -1
  71. package/dist/{chunk-W676PHBV.js → chunk-QFAPNM3W.js} +1 -1
  72. package/dist/{chunk-HVSFJSZ2.js → chunk-QGFLYDT3.js} +1 -1
  73. package/dist/{chunk-756YM6XK.js → chunk-QHEXGZSS.js} +1 -1
  74. package/dist/{chunk-BIOKOORM.js → chunk-QHQQKSPO.js} +1 -1
  75. package/dist/{chunk-P6KIY2J3.js → chunk-QSXJMUIM.js} +1 -1
  76. package/dist/{chunk-SPDYVDFS.js → chunk-QVLBI5WV.js} +1 -1
  77. package/dist/{chunk-HFI6U4AS.js → chunk-QYAUDXDT.js} +1 -1
  78. package/dist/{chunk-LRN2FMSM.js → chunk-QZ4NI35U.js} +1 -1
  79. package/dist/{chunk-P5COLGHM.js → chunk-R3AZXNAF.js} +1 -1
  80. package/dist/{chunk-GRXYWD7O.js → chunk-R6JZJGXV.js} +1 -1
  81. package/dist/{chunk-FKH4ALOW.js → chunk-RCENTP43.js} +1 -1
  82. package/dist/{chunk-7BHZ77B4.js → chunk-RG5LO23H.js} +1 -1
  83. package/dist/{chunk-BTOVDGDV.js → chunk-SKFGRW6V.js} +1 -1
  84. package/dist/{chunk-AKVPUKAT.js → chunk-SLAAB5WQ.js} +1 -1
  85. package/dist/{chunk-KK2HZ2OV.js → chunk-TP4UI7Q5.js} +1 -1
  86. package/dist/{chunk-5CSQNFG3.js → chunk-U3WI3SBU.js} +1 -1
  87. package/dist/{chunk-PL5GITKB.js → chunk-UJ5557QD.js} +1 -1
  88. package/dist/{chunk-MF3ETRJP.js → chunk-URLRH3UT.js} +1 -1
  89. package/dist/{chunk-Y6ZRAKMR.js → chunk-UTZXAPAJ.js} +1 -1
  90. package/dist/{chunk-RNJVITH3.js → chunk-UUXOJLE5.js} +1 -1
  91. package/dist/{chunk-6UXHCQIP.js → chunk-VFN47EM4.js} +1 -1
  92. package/dist/chunk-VOYTYSXJ.js +1 -0
  93. package/dist/{chunk-YQ7LYBNF.js → chunk-VSARY23A.js} +1 -1
  94. package/dist/{chunk-HEH53EDZ.js → chunk-WCLD47VK.js} +1 -1
  95. package/dist/{chunk-VXM7ARRW.js → chunk-WG4ZAGCX.js} +1 -1
  96. package/dist/{chunk-UDNS3XF3.js → chunk-WMO777NI.js} +1 -1
  97. package/dist/{chunk-NHO3LLWK.js → chunk-WQ3LY4W5.js} +3 -3
  98. package/dist/{chunk-BTQNZGDM.js → chunk-WRM2O7V6.js} +1 -1
  99. package/dist/{chunk-YWQ6NKSS.js → chunk-WT7TXPIF.js} +1 -1
  100. package/dist/{chunk-PS3SGPSH.js → chunk-X2PRSP2J.js} +1 -1
  101. package/dist/{chunk-53YAQOZI.js → chunk-XOH74NUM.js} +1 -1
  102. package/dist/{chunk-U5DLHKFU.js → chunk-YCX775XO.js} +3 -3
  103. package/dist/{chunk-WJQ6EJKD.js → chunk-YJQQ6WNE.js} +1 -1
  104. package/dist/{chunk-JZZMGMFK.js → chunk-Z6XZ5ZVE.js} +1 -1
  105. package/dist/{chunk-G67MKPRC.js → chunk-ZDXNK3IC.js} +1 -1
  106. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  107. package/dist/cli/commands/app/build.js +1 -1
  108. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  109. package/dist/cli/commands/app/bulk/execute.js +1 -1
  110. package/dist/cli/commands/app/bulk/status.js +1 -1
  111. package/dist/cli/commands/app/config/link.js +1 -1
  112. package/dist/cli/commands/app/config/pull.js +1 -1
  113. package/dist/cli/commands/app/config/use.js +1 -1
  114. package/dist/cli/commands/app/config/validate.js +1 -1
  115. package/dist/cli/commands/app/demo/watcher.js +1 -1
  116. package/dist/cli/commands/app/deploy.js +1 -1
  117. package/dist/cli/commands/app/dev/clean.js +1 -1
  118. package/dist/cli/commands/app/dev.js +6 -2
  119. package/dist/cli/commands/app/env/pull.js +1 -1
  120. package/dist/cli/commands/app/env/show.js +1 -1
  121. package/dist/cli/commands/app/execute.js +1 -1
  122. package/dist/cli/commands/app/function/build.js +1 -1
  123. package/dist/cli/commands/app/function/info.js +1 -1
  124. package/dist/cli/commands/app/function/replay.js +1 -1
  125. package/dist/cli/commands/app/function/run.js +1 -1
  126. package/dist/cli/commands/app/function/schema.js +1 -1
  127. package/dist/cli/commands/app/function/typegen.js +1 -1
  128. package/dist/cli/commands/app/generate/extension.js +1 -1
  129. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  130. package/dist/cli/commands/app/import-extensions.js +1 -1
  131. package/dist/cli/commands/app/info.js +1 -1
  132. package/dist/cli/commands/app/init.js +1 -1
  133. package/dist/cli/commands/app/logs.js +1 -1
  134. package/dist/cli/commands/app/release.js +1 -1
  135. package/dist/cli/commands/app/versions/list.js +1 -1
  136. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  137. package/dist/cli/commands/auth/login.js +1 -1
  138. package/dist/cli/commands/auth/logout.js +1 -1
  139. package/dist/cli/commands/cache/clear.js +1 -1
  140. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  141. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  142. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  143. package/dist/cli/commands/debug/command-flags.js +1 -1
  144. package/dist/cli/commands/docs/generate.js +1 -1
  145. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  146. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  147. package/dist/cli/commands/help.js +1 -1
  148. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  149. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  150. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  151. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  152. package/dist/cli/commands/notifications/generate.js +1 -1
  153. package/dist/cli/commands/notifications/list.js +1 -1
  154. package/dist/cli/commands/organization/list.js +1 -1
  155. package/dist/cli/commands/search.js +1 -1
  156. package/dist/cli/commands/theme/check.js +1 -1
  157. package/dist/cli/commands/theme/console.js +1 -1
  158. package/dist/cli/commands/theme/delete.js +1 -1
  159. package/dist/cli/commands/theme/dev.js +1 -1
  160. package/dist/cli/commands/theme/duplicate.js +1 -1
  161. package/dist/cli/commands/theme/info.js +1 -1
  162. package/dist/cli/commands/theme/init.js +1 -1
  163. package/dist/cli/commands/theme/language-server.js +1 -1
  164. package/dist/cli/commands/theme/list.js +1 -1
  165. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  166. package/dist/cli/commands/theme/open.js +1 -1
  167. package/dist/cli/commands/theme/package.js +1 -1
  168. package/dist/cli/commands/theme/preview.js +1 -1
  169. package/dist/cli/commands/theme/profile.js +1 -1
  170. package/dist/cli/commands/theme/publish.js +1 -1
  171. package/dist/cli/commands/theme/pull.js +1 -1
  172. package/dist/cli/commands/theme/push.js +1 -1
  173. package/dist/cli/commands/theme/rename.js +1 -1
  174. package/dist/cli/commands/theme/share.js +1 -1
  175. package/dist/cli/commands/upgrade.js +1 -1
  176. package/dist/cli/commands/version.js +1 -1
  177. package/dist/command-registry.js +1 -1
  178. package/dist/{conf-store-T37CFZUN.js → conf-store-P6J5AF2O.js} +1 -1
  179. package/dist/{deprecations-Z3EJ6DLR.js → deprecations-SHRRJWOP.js} +1 -1
  180. package/dist/dist-R66CGG2A.js +1 -0
  181. package/dist/dist-RDF3EBYV.js +1 -0
  182. package/dist/{environments-FSHYT6FI.js → environments-W36TN5UG.js} +1 -1
  183. package/dist/{error-5I23PQ4Y.js → error-L5FPI2RR.js} +1 -1
  184. package/dist/error-handler-476A56HQ.js +1 -0
  185. package/dist/{fs-MIMD3BBN.js → fs-QI3FHUTA.js} +1 -1
  186. package/dist/hooks/app-init.js +1 -1
  187. package/dist/hooks/did-you-mean.js +1 -1
  188. package/dist/hooks/hydrogen-init.js +1 -1
  189. package/dist/hooks/postrun.js +1 -1
  190. package/dist/hooks/prerun.js +1 -1
  191. package/dist/hooks/public-metadata.js +1 -1
  192. package/dist/hooks/sensitive-metadata.js +1 -1
  193. package/dist/hooks/tunnel-provider.js +1 -1
  194. package/dist/hooks/tunnel-start.js +1 -1
  195. package/dist/index.js +6 -2
  196. package/dist/{is-global-ARDA4CSZ.js → is-global-F5VRY52F.js} +1 -1
  197. package/dist/{local-3ZQI22FG.js → local-PKE3GCEX.js} +1 -1
  198. package/dist/{local-storage-EZWBC67M.js → local-storage-MQVWNB72.js} +1 -1
  199. package/dist/{metadata-2ZGSR7V6.js → metadata-QOPVRQXV.js} +1 -1
  200. package/dist/{node-package-manager-543RDDQF.js → node-package-manager-MVUAI7EE.js} +1 -1
  201. package/dist/notifications-system-FKLQECEE.js +1 -0
  202. package/dist/{output-72FRMGSA.js → output-YAHUCEVR.js} +1 -1
  203. package/dist/{system-6WHERTOZ.js → system-WXTFQSRZ.js} +1 -1
  204. package/dist/tsconfig.tsbuildinfo +1 -1
  205. package/dist/{ui-Q6HHKE5A.js → ui-3LK7X2QG.js} +1 -1
  206. package/dist/upgrade-GIYAOSMY.js +1 -0
  207. package/dist/version-6IWCPJOP.js +1 -0
  208. package/dist/{version-HZDBZ4OS.js → version-UH3O5QLS.js} +1 -1
  209. package/dist/{workerd-MK4OU6DZ.js → workerd-U3HJ5AMT.js} +1 -1
  210. package/oclif.manifest.json +1 -1
  211. package/package.json +7 -7
  212. package/dist/analytics-4MDMXBYF.js +0 -1
  213. package/dist/analytics-IVVKLIEG.js +0 -1
  214. package/dist/chunk-46QACZOG.js +0 -1
  215. package/dist/chunk-FUKB5JWH.js +0 -1
  216. package/dist/chunk-HXST6PKJ.js +0 -1
  217. package/dist/dist-GBGQIPF4.js +0 -1
  218. package/dist/dist-UQVMYG24.js +0 -1
  219. package/dist/error-handler-HU5Y6I3H.js +0 -1
  220. package/dist/notifications-system-5XNKI3BF.js +0 -1
  221. package/dist/upgrade-4LKQ77U7.js +0 -1
  222. package/dist/version-HZU5UTS6.js +0 -1
@@ -1 +1 @@
1
- import{f as b}from"./chunk-UWN2OXJT.js";import{g as m}from"./chunk-VPRTJUIN.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-HU5Y6I3H.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
1
+ import{f as b}from"./chunk-PGUKHYQ5.js";import{g as m}from"./chunk-VPRTJUIN.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-476A56HQ.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
@@ -1,4 +1,4 @@
1
- import{C as s,u as e,v as o,w as n,x as i,y as t}from"./chunk-SPDYVDFS.js";import{d,g as l}from"./chunk-5CSQNFG3.js";import{g as r}from"./chunk-VPRTJUIN.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
1
+ import{C as s,u as e,v as o,w as n,x as i,y as t}from"./chunk-QVLBI5WV.js";import{d,g as l}from"./chunk-U3WI3SBU.js";import{g as r}from"./chunk-VPRTJUIN.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
2
2
  Error: Unexpected error
3
3
  at Module._compile (internal/modules/cjs/loader.js:1137:30)
4
4
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
@@ -1,4 +1,4 @@
1
- import{b as j}from"./chunk-N4Q6DDUM.js";import{a as H}from"./chunk-7BHZ77B4.js";import{i as U,j as W,l as q}from"./chunk-FKH4ALOW.js";import{a as J}from"./chunk-HXST6PKJ.js";import{a as g,c as D}from"./chunk-MG5UL2VK.js";import{a as F}from"./chunk-NJZCMSN5.js";import{a as N}from"./chunk-CDKYACQA.js";import{m as A}from"./chunk-P5COLGHM.js";import{a as f,b}from"./chunk-QFWIDATO.js";import{b as C,c as M,d as L,f as $,j as k,n as x,p as _}from"./chunk-SGNMFRKQ.js";import{aa as z}from"./chunk-WJQ6EJKD.js";import{O as y,ua as h,va as E}from"./chunk-3ODFSKK3.js";import{A as P,v as d,w as p,x as O}from"./chunk-SPDYVDFS.js";import{d as R}from"./chunk-5CSQNFG3.js";import{Mb as S}from"./chunk-U5DLHKFU.js";import{f as T,q as c}from"./chunk-IU2ZQ6TE.js";import{e as Y,g as v}from"./chunk-VPRTJUIN.js";v();var I=Y(z(),1);async function Ee(e,t,r,n){let o=e.environment?.[0],s=t??await y(A({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:u}=await j(e.path??c(),m);if(u.length>0&&u.filter(V=>V.severity===I.Severity.ERROR).length>0)throw E(new R(o?`[${o}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}h("theme-service:push:setup"),J({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,a=e.path?T(e.path):c();if(!await q(a)&&!await D(i,void 0,o,r))return;e.listing&&await U(a,e.listing);let l=await Z(s,e,r);l&&(h("theme-service:push:setup"),await B(l,s,{allowLive:e.allowLive??!1,environment:o,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:a,publish:e.publish??!1,listing:e.listing},n))}async function B(e,t,r,n){h("theme-service:push:file-system");let o=await x(e.id,t),s=W(r.path,{filters:r,listing:r.listing});h("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:a}=H(e,t,o,s,r,n);await a(),r.publish&&await _(e.id,t),await G(i,e,t,r)}function w(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,n){n.json?K(t,r,e,n.environment):n.publish?Q(r,e,n.environment):X(t,r,e,n.environment)}function K(e,t,r,n){let o={environment:n,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:b(e,t),preview_url:f(e,t)}};if(w(r)){let i=`${n?`[${n}] `:""}The theme '${e.name}' was pushed with errors`;o.theme.warning=i;let a={};for(let[l,m]of r.entries())!m.success&&m.errors?.asset&&(a[l]=m.errors.asset);Object.keys(a).length>0&&(o.theme.errors=a)}S(JSON.stringify(o))}function Q(e,t,r){let n=r?[{subdued:`Environment: ${r}
1
+ import{b as j}from"./chunk-IALII2RY.js";import{a as H}from"./chunk-RG5LO23H.js";import{i as U,j as W,l as q}from"./chunk-RCENTP43.js";import{a as J}from"./chunk-JOUSXVRS.js";import{a as g,c as D}from"./chunk-OUH45V4N.js";import{a as F}from"./chunk-J2VLO4EY.js";import{a as N}from"./chunk-P5NZBPPD.js";import{m as A}from"./chunk-R3AZXNAF.js";import{a as f,b}from"./chunk-QFWIDATO.js";import{b as C,c as M,d as L,f as $,j as k,n as x,p as _}from"./chunk-IO4AZDF4.js";import{aa as z}from"./chunk-YJQQ6WNE.js";import{O as y,ua as h,va as E}from"./chunk-6PAOR3TW.js";import{A as P,v as d,w as p,x as O}from"./chunk-QVLBI5WV.js";import{d as R}from"./chunk-U3WI3SBU.js";import{Mb as S}from"./chunk-YCX775XO.js";import{f as T,q as c}from"./chunk-IU2ZQ6TE.js";import{e as Y,g as v}from"./chunk-VPRTJUIN.js";v();var I=Y(z(),1);async function Ee(e,t,r,n){let o=e.environment?.[0],s=t??await y(A({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:u}=await j(e.path??c(),m);if(u.length>0&&u.filter(V=>V.severity===I.Severity.ERROR).length>0)throw E(new R(o?`[${o}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}h("theme-service:push:setup"),J({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,a=e.path?T(e.path):c();if(!await q(a)&&!await D(i,void 0,o,r))return;e.listing&&await U(a,e.listing);let l=await Z(s,e,r);l&&(h("theme-service:push:setup"),await B(l,s,{allowLive:e.allowLive??!1,environment:o,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:a,publish:e.publish??!1,listing:e.listing},n))}async function B(e,t,r,n){h("theme-service:push:file-system");let o=await x(e.id,t),s=W(r.path,{filters:r,listing:r.listing});h("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:a}=H(e,t,o,s,r,n);await a(),r.publish&&await _(e.id,t),await G(i,e,t,r)}function w(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,n){n.json?K(t,r,e,n.environment):n.publish?Q(r,e,n.environment):X(t,r,e,n.environment)}function K(e,t,r,n){let o={environment:n,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:b(e,t),preview_url:f(e,t)}};if(w(r)){let i=`${n?`[${n}] `:""}The theme '${e.name}' was pushed with errors`;o.theme.warning=i;let a={};for(let[l,m]of r.entries())!m.success&&m.errors?.asset&&(a[l]=m.errors.asset);Object.keys(a).length>0&&(o.theme.errors=a)}S(JSON.stringify(o))}function Q(e,t,r){let n=r?[{subdued:`Environment: ${r}
2
2
 
3
3
  `}]:[];w(t)?p({body:[...n,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):d({body:[...n,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,n){let o=n?[{subdued:`Environment: ${n}
4
4
 
@@ -1 +1 @@
1
- import{b as a}from"./chunk-JZZMGMFK.js";import{Fa as i}from"./chunk-3ODFSKK3.js";import{b as s}from"./chunk-NHO3LLWK.js";import{r as m}from"./chunk-LDGAHMS7.js";import{e as d,g as e}from"./chunk-VPRTJUIN.js";e();var n=d(m(),1);var t=class c extends s{static{this.description="List current notifications configured for the CLI."}static{this.hidden=!0}static{this.flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})}}async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
1
+ import{b as a}from"./chunk-Z6XZ5ZVE.js";import{Fa as i}from"./chunk-6PAOR3TW.js";import{b as s}from"./chunk-WQ3LY4W5.js";import{r as m}from"./chunk-LDGAHMS7.js";import{e as d,g as e}from"./chunk-VPRTJUIN.js";e();var n=d(m(),1);var t=class c extends s{static{this.description="List current notifications configured for the CLI."}static{this.hidden=!0}static{this.flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})}}async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
@@ -1 +1 @@
1
- import{a as h}from"./chunk-F7TF5C6G.js";import{Ba as A}from"./chunk-J3TLZU6G.js";import{d as y}from"./chunk-NWJC4BVM.js";import{R as x,g as C}from"./chunk-3ODFSKK3.js";import{d as r,g as c}from"./chunk-5CSQNFG3.js";import{Gb as f,Ib as s,Ta as g,ma as l}from"./chunk-U5DLHKFU.js";import{e as E,g as u}from"./chunk-VPRTJUIN.js";u();u();var m=E(C(),1);async function T(e,t){let n=e.apiSecretKeys[0]?.secret;if(!n)throw new c("No API secret keys found for app");return x(t,e.apiKey,n)}function v(e){let t;try{t=(0,m.parse)(e)}catch(o){throw o instanceof Error?new r(`Invalid GraphQL syntax: ${o.message}`):o}if(t.definitions.filter(o=>o.kind==="OperationDefinition").length!==1)throw new r("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}async function b(e){let{adminSession:t,userSpecifiedVersion:n,minimumDefaultVersion:o}=e;if(n==="unstable")return n;let i=await y(t);if(!n){let p=i.filter(d=>d.supported).map(d=>d.handle);return o&&p.push(o),p.sort().reverse()[0]}let a=i.map(p=>p.handle);if(a.includes(n))return n;let S=s`Invalid API version: ${n}`.value,w=s`Allowed versions: ${a.join(", ")}`.value;throw new r(S,w)}function z(e){let{organization:t,remoteApp:n,storeFqdn:o,version:i}=e,a=[`Organization: ${t.businessName}`,`App: ${n.title}`,`Store: ${o}`];return i&&a.push(`API version: ${i}`),a}function O(e){return(0,m.parse)(e).definitions.find(o=>o.kind==="OperationDefinition")?.operation==="mutation"}function N(e,t){if(O(e)&&t.storeType!=="APP_DEVELOPMENT")throw new r("Mutations can only be executed on dev stores.")}async function P(e){let t=await A({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),n=await h({appContextResult:t,storeFqdn:e.store,forceReselectStore:e.reset,storeTypes:["APP_DEVELOPMENT","DEVELOPMENT","DEVELOPMENT_SUPERSET","PRODUCTION"]});return{appContextResult:t,store:n}}async function K(e){let t;if(e.query!==void 0){if(!e.query.trim())throw new r("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");t=e.query}else if(e["query-file"]){let i=e["query-file"];if(!await g(i))throw new r(s`Query file not found at ${f.path(i)}. Please check the path and try again.`);if(t=await l(i,{encoding:"utf8"}),!t.trim())throw new r(s`Query file at ${f.path(i)} is empty. Please provide a valid GraphQL query or mutation.`)}if(!t)throw new c("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");v(t);let{appContextResult:n,store:o}=await P(e);return{query:t,appContextResult:n,store:o}}export{T as a,v as b,b as c,z as d,O as e,N as f,P as g,K as h};
1
+ import{a as h}from"./chunk-KOXDHFRA.js";import{Ba as A}from"./chunk-KDA6FVYX.js";import{d as y}from"./chunk-N2N2L3WD.js";import{R as x,g as C}from"./chunk-6PAOR3TW.js";import{d as r,g as c}from"./chunk-U3WI3SBU.js";import{Gb as f,Ib as s,Ta as g,ma as l}from"./chunk-YCX775XO.js";import{e as E,g as u}from"./chunk-VPRTJUIN.js";u();u();var m=E(C(),1);async function T(e,t){let n=e.apiSecretKeys[0]?.secret;if(!n)throw new c("No API secret keys found for app");return x(t,e.apiKey,n)}function v(e){let t;try{t=(0,m.parse)(e)}catch(o){throw o instanceof Error?new r(`Invalid GraphQL syntax: ${o.message}`):o}if(t.definitions.filter(o=>o.kind==="OperationDefinition").length!==1)throw new r("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}async function b(e){let{adminSession:t,userSpecifiedVersion:n,minimumDefaultVersion:o}=e;if(n==="unstable")return n;let i=await y(t);if(!n){let p=i.filter(d=>d.supported).map(d=>d.handle);return o&&p.push(o),p.sort().reverse()[0]}let a=i.map(p=>p.handle);if(a.includes(n))return n;let S=s`Invalid API version: ${n}`.value,w=s`Allowed versions: ${a.join(", ")}`.value;throw new r(S,w)}function z(e){let{organization:t,remoteApp:n,storeFqdn:o,version:i}=e,a=[`Organization: ${t.businessName}`,`App: ${n.title}`,`Store: ${o}`];return i&&a.push(`API version: ${i}`),a}function O(e){return(0,m.parse)(e).definitions.find(o=>o.kind==="OperationDefinition")?.operation==="mutation"}function N(e,t){if(O(e)&&t.storeType!=="APP_DEVELOPMENT")throw new r("Mutations can only be executed on dev stores.")}async function P(e){let t=await A({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),n=await h({appContextResult:t,storeFqdn:e.store,forceReselectStore:e.reset,storeTypes:["APP_DEVELOPMENT","DEVELOPMENT","DEVELOPMENT_SUPERSET","PRODUCTION"]});return{appContextResult:t,store:n}}async function K(e){let t;if(e.query!==void 0){if(!e.query.trim())throw new r("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");t=e.query}else if(e["query-file"]){let i=e["query-file"];if(!await g(i))throw new r(s`Query file not found at ${f.path(i)}. Please check the path and try again.`);if(t=await l(i,{encoding:"utf8"}),!t.trim())throw new r(s`Query file at ${f.path(i)} is empty. Please provide a valid GraphQL query or mutation.`)}if(!t)throw new c("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");v(t);let{appContextResult:n,store:o}=await P(e);return{query:t,appContextResult:n,store:o}}export{T as a,v as b,b as c,z as d,O as e,N as f,P as g,K as h};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-56ENJ2TL.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
1
+ import{a as e}from"./chunk-6RBPNXHX.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
@@ -1 +1 @@
1
- import{r as C}from"./chunk-LDGAHMS7.js";import{a as i,c as u}from"./chunk-ULQG3XQS.js";import{e as h,g as s}from"./chunk-VPRTJUIN.js";s();s();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-3ZQI22FG.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-DVFFWCBV.js"),t=await import("./lib-C3VO2BQW.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-HU5Y6I3H.js");return await l(r),d.handle(r)}}var c=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-Q6HHKE5A.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function O(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||i(o.NO_COLOR)||i(o.SHOPIFY_FLAG_NO_COLOR)||i(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await b(e,n),O(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function b(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-543RDDQF.js"),{moduleDirectory:t}=await import("./path-CWUNINMX.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var E={"no-color":c.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:c.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},F={json:c.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})};async function S(){let{cacheClear:e}=await import("./conf-store-T37CFZUN.js");e()}export{_ as a,E as b,F as c,S as d};
1
+ import{r as C}from"./chunk-LDGAHMS7.js";import{a as i,c as u}from"./chunk-ULQG3XQS.js";import{e as h,g as s}from"./chunk-VPRTJUIN.js";s();s();import{fileURLToPath as L}from"node:url";async function f(e){let{isDevelopment:o}=await import("./local-PKE3GCEX.js"),{ShopifyConfig:n}=await import("./custom-oclif-loader-DVFFWCBV.js"),t=await import("./lib-C3VO2BQW.js"),{run:a,flush:p,Errors:d,settings:m}=t.default??t;o()&&(m.debug=!0);try{let r=new n({root:L(e.moduleURL)});await r.load(),e.lazyCommandLoader&&r.setLazyCommandLoader(e.lazyCommandLoader),await a(e.argv,r),await p()}catch(r){let{errorHandler:l}=await import("./error-handler-476A56HQ.js");return await l(r),d.handle(r)}}var c=h(C());async function y(e=process.versions){let o=e.node,n=Number(o.split(".")[0]);if(n<18){let{renderError:a}=await import("./ui-3LK7X2QG.js");a({headline:"Upgrade to a supported Node version now.",body:[`Node ${n} has reached end-of-life and poses security risks. When you upgrade to a`,{link:{url:"https://nodejs.dev/en/about/previous-releases",label:"supported version"}},{char:","},"you'll be able to use Shopify CLI without interruption."]}),process.exit(1)}}function I(e,o=process.argv,n=process.env){o.includes("--verbose")&&(n.DEBUG=n.DEBUG??"*"),e.development&&(n.SHOPIFY_CLI_ENV=n.SHOPIFY_CLI_ENV??"development")}function O(e=process.argv,o=process.env){(e.includes("--no-color")||e.includes("--json")||e.includes("-j")||i(o.NO_COLOR)||i(o.SHOPIFY_FLAG_NO_COLOR)||i(o[u.json])||o.TERM==="dumb")&&(o.FORCE_COLOR="0")}async function _(e,o=f,n=process.argv,t=process.env,a=process.versions){return I(e,n,t),e.runInCreateMode&&await b(e,n),O(n,t),await y(a),o({moduleURL:e.moduleURL,lazyCommandLoader:e.lazyCommandLoader})}async function b(e,o=process.argv){let{findUpAndReadPackageJson:n}=await import("./node-package-manager-MVUAI7EE.js"),{moduleDirectory:t}=await import("./path-CWUNINMX.js"),d=(await n(t(e.moduleURL))).content.name.replace("@shopify/create-","");if(o.findIndex(r=>r.includes("init"))===-1){let r=o.findIndex(l=>l.match(new RegExp(`bin(\\/|\\\\)+(create-${d}|dev|run)`)))+1;o.splice(r,0,"init")}}var E={"no-color":c.Flags.boolean({hidden:!1,description:"Disable color output.",env:"SHOPIFY_FLAG_NO_COLOR"}),verbose:c.Flags.boolean({hidden:!1,description:"Increase the verbosity of the output.",env:"SHOPIFY_FLAG_VERBOSE"})},F={json:c.Flags.boolean({char:"j",description:"Output the result as JSON. Automatically disables color output.",hidden:!1,default:!1,env:u.json})};async function S(){let{cacheClear:e}=await import("./conf-store-P6J5AF2O.js");e()}export{_ as a,E as b,F as c,S as d};
@@ -1,4 +1,4 @@
1
- import{l as R}from"./chunk-SPDYVDFS.js";import{d}from"./chunk-5CSQNFG3.js";import{Qb as u,Rb as b,Z as h,da as y}from"./chunk-U5DLHKFU.js";import{g as c}from"./chunk-VPRTJUIN.js";c();c();var l=class{constructor({export:e,input:r,inputBytes:n,output:o,outputBytes:s,logs:i,functionId:g,fuelConsumed:p,target:x,errorMessage:N,errorType:T,inputQueryVariablesMetafieldValue:O,inputQueryVariablesMetafieldNamespace:L,inputQueryVariablesMetafieldKey:k}){this.export=e,this.input=r,this.inputBytes=n,this.output=o,this.outputBytes=s,this.logs=i,this.functionId=g,this.fuelConsumed=p,this.target=x,this.errorMessage=N,this.errorType=T,this.inputQueryVariablesMetafieldValue=O,this.inputQueryVariablesMetafieldNamespace=L,this.inputQueryVariablesMetafieldKey=k}},f=class{constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:n,httpResponse:o}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=n,this.httpResponse=o}};var _=class{constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},m=class{constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:n,httpRequest:o,httpResponse:s,error:i}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=n,this.httpRequest=o,this.httpResponse=s,this.error=i}};c();function E(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function M(t,e){return e?.deep&&E(t)||e?.deep&&Array.isArray(t)?a(t,e):t}function a(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?a(r,e):r);if(E(t)){let r={};for(let[n,o]of Object.entries(t))r[h(n)]=M(o,e);return r}return t}var S=450,I=5*1e3,w=60*1e3,z=5,Z=1e6,P="function_run",ee="function_network_access",C="function_network_access.response_from_cache",V="function_network_access.request_execution_in_background",q="function_network_access.request_execution",te="no_cached_response",re="cached_response_about_to_expire";function se(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&A(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function ne(t){let e=JSON.parse(t);return new f({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var U={no_cached_response:0,cached_response_about_to_expire:1};function oe(t){let e=JSON.parse(t);return new _({reason:U[e.reason]??2,httpRequest:e.http_request})}function ie(t){let e=JSON.parse(t);return new m({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ue=async t=>{let{errors:e}=t.response,r=S,n=null,o="not_attempted";if(e.length>0)if(u(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{n=await t.onResubscribe(),o="succeeded"}catch(s){u(`Failed to resubscribe to app logs: ${s}`),r=w,o="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=w,t.onThrottle(r)):(r=I,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:n,resubscribeResult:o}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var pe=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:n=!0})=>{let{cursor:o,...s}=t,i=a({...s,payload:e,localTime:y(t.log_timestamp),storeName:r});return e instanceof l&&(i.payload.logs=e.logs.split(`
1
+ import{l as R}from"./chunk-QVLBI5WV.js";import{d}from"./chunk-U3WI3SBU.js";import{Qb as u,Rb as b,Z as h,da as y}from"./chunk-YCX775XO.js";import{g as c}from"./chunk-VPRTJUIN.js";c();c();var l=class{constructor({export:e,input:r,inputBytes:n,output:o,outputBytes:s,logs:i,functionId:g,fuelConsumed:p,target:x,errorMessage:N,errorType:T,inputQueryVariablesMetafieldValue:O,inputQueryVariablesMetafieldNamespace:L,inputQueryVariablesMetafieldKey:k}){this.export=e,this.input=r,this.inputBytes=n,this.output=o,this.outputBytes=s,this.logs=i,this.functionId=g,this.fuelConsumed=p,this.target=x,this.errorMessage=N,this.errorType=T,this.inputQueryVariablesMetafieldValue=O,this.inputQueryVariablesMetafieldNamespace=L,this.inputQueryVariablesMetafieldKey=k}},f=class{constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:n,httpResponse:o}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=n,this.httpResponse=o}};var _=class{constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},m=class{constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:n,httpRequest:o,httpResponse:s,error:i}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=n,this.httpRequest=o,this.httpResponse=s,this.error=i}};c();function E(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function M(t,e){return e?.deep&&E(t)||e?.deep&&Array.isArray(t)?a(t,e):t}function a(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?a(r,e):r);if(E(t)){let r={};for(let[n,o]of Object.entries(t))r[h(n)]=M(o,e);return r}return t}var S=450,I=5*1e3,w=60*1e3,z=5,Z=1e6,P="function_run",ee="function_network_access",C="function_network_access.response_from_cache",V="function_network_access.request_execution_in_background",q="function_network_access.request_execution",te="no_cached_response",re="cached_response_about_to_expire";function se(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&A(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function ne(t){let e=JSON.parse(t);return new f({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var U={no_cached_response:0,cached_response_about_to_expire:1};function oe(t){let e=JSON.parse(t);return new _({reason:U[e.reason]??2,httpRequest:e.http_request})}function ie(t){let e=JSON.parse(t);return new m({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ue=async t=>{let{errors:e}=t.response,r=S,n=null,o="not_attempted";if(e.length>0)if(u(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{n=await t.onResubscribe(),o="succeeded"}catch(s){u(`Failed to resubscribe to app logs: ${s}`),r=w,o="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=w,t.onThrottle(r)):(r=I,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:n,resubscribeResult:o}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var pe=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:n=!0})=>{let{cursor:o,...s}=t,i=a({...s,payload:e,localTime:y(t.log_timestamp),storeName:r});return e instanceof l&&(i.payload.logs=e.logs.split(`
2
2
  `).filter(Boolean),i.payload.inputQueryVariablesMetafieldValue&&(i.payload.inputQueryVariablesMetafieldValue=A(i.payload.inputQueryVariablesMetafieldValue))),n?JSON.stringify(i,null,2):JSON.stringify(i)},ce=(t,e)=>{let r=a(JSON.parse(t));return e===P?new l(r):e===C?new f(r):e===V?new _(r):e===q?new m(r):r},le=async(t,e,r,n)=>{let o=await t.subscribeToAppLogs(e,r);if(!o.appLogsSubscribe)throw new d("Failed to subscribe to app logs: No response received");let{jwtToken:s,success:i,errors:g}=o.appLogsSubscribe;if(u(`Token: ${s}
3
3
  `),u(`API Key: ${e.apiKey}
4
4
  `),g&&g.length>0){let p=g.join(", ");throw await R({stripAnsi:!1},()=>{b(`Errors subscribing to app logs: ${p}`,n),b("App log streaming is not available in this session.",n)}),new d(p)}else{if(!s)throw new d("Failed to subscribe to app logs: No response received");let p=Array.isArray(e.shopIds)?e.shopIds:[e.shopIds];u(`Subscribed to App Events for shop ID(s) ${p.join(", ")}`),i!==void 0&&u(`Success: ${i}
@@ -1 +1 @@
1
- import{P as m}from"./chunk-SPDYVDFS.js";import{d as c}from"./chunk-5CSQNFG3.js";import{Gb as l,Ib as n,Qb as a}from"./chunk-U5DLHKFU.js";import{g as s}from"./chunk-VPRTJUIN.js";s();import{createServer as f}from"net";var u=new Set;async function P(r,t){if(r&&await g(r))return a(n`Port ${r.toString()} is free`),r;a(n`Getting a random port...`);let e=await w(()=>d(),t?.maxTries,t?.waitTimeInSeconds);for(let o=0;o<(t?.maxTries??5)&&u.has(e);o++)e=await w(()=>d(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${e}`)}`),u.add(e),e}async function g(r){return new Promise(t=>{let e=f();e.unref(),e.once("error",()=>t(!1)),e.listen(r,"localhost",()=>{e.close(()=>t(!0))})})}function d(){return new Promise((r,t)=>{let e=f();e.unref(),e.once("error",t),e.listen(0,"localhost",()=>{let o=e.address();if(o&&typeof o=="object"){let i=o.port;e.close(()=>r(i))}else e.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(r,t=5,e=1){let o=1;for(;;)try{return await r()}catch(i){if(o++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(e);else throw new c(i.message)}}export{P as a,g as b};
1
+ import{P as m}from"./chunk-QVLBI5WV.js";import{d as c}from"./chunk-U3WI3SBU.js";import{Gb as l,Ib as n,Qb as a}from"./chunk-YCX775XO.js";import{g as s}from"./chunk-VPRTJUIN.js";s();import{createServer as f}from"net";var u=new Set;async function P(r,t){if(r&&await g(r))return a(n`Port ${r.toString()} is free`),r;a(n`Getting a random port...`);let e=await w(()=>d(),t?.maxTries,t?.waitTimeInSeconds);for(let o=0;o<(t?.maxTries??5)&&u.has(e);o++)e=await w(()=>d(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${e}`)}`),u.add(e),e}async function g(r){return new Promise(t=>{let e=f();e.unref(),e.once("error",()=>t(!1)),e.listen(r,"localhost",()=>{e.close(()=>t(!0))})})}function d(){return new Promise((r,t)=>{let e=f();e.unref(),e.once("error",t),e.listen(0,"localhost",()=>{let o=e.address();if(o&&typeof o=="object"){let i=o.port;e.close(()=>r(i))}else e.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(r,t=5,e=1){let o=1;for(;;)try{return await r()}catch(i){if(o++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(e);else throw new c(i.message)}}export{P as a,g as b};
@@ -1 +1 @@
1
- import{d as o}from"./chunk-ZB4OMMAT.js";import{b as s}from"./chunk-NHO3LLWK.js";import{g as e}from"./chunk-VPRTJUIN.js";e();var t=class extends s{static{this.description="Clear the CLI cache, used to store some API responses and handle notifications status"}static{this.hidden=!0}async run(){await o()}};export{t as a};
1
+ import{d as o}from"./chunk-AK3MADND.js";import{b as s}from"./chunk-WQ3LY4W5.js";import{g as e}from"./chunk-VPRTJUIN.js";e();var t=class extends s{static{this.description="Clear the CLI cache, used to store some API responses and handle notifications status"}static{this.hidden=!0}async run(){await o()}};export{t as a};
@@ -1 +1 @@
1
- import{K as i}from"./chunk-SPDYVDFS.js";import{a as l}from"./chunk-QUTQDXSL.js";import{a as p}from"./chunk-FUOIGXI4.js";import{e as u,g as a}from"./chunk-VPRTJUIN.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
1
+ import{K as i}from"./chunk-QVLBI5WV.js";import{a as l}from"./chunk-QUTQDXSL.js";import{a as p}from"./chunk-FUOIGXI4.js";import{e as u,g as a}from"./chunk-VPRTJUIN.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
@@ -1 +1 @@
1
- import{b as n}from"./chunk-T7LIZZZ5.js";import{l as i}from"./chunk-5CSQNFG3.js";import{g as t}from"./chunk-VPRTJUIN.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
1
+ import{b as n}from"./chunk-PA6H2JVD.js";import{l as i}from"./chunk-U3WI3SBU.js";import{g as t}from"./chunk-VPRTJUIN.js";t();t();var o=class extends i.ExtendableError{constructor(e,p){super(p),this.type=e}},d=r=>async()=>r,f=r=>async e=>e.provider!==r.provider?n(new o("invalid-provider")):r.action(e.port);var a="cloudflare",l=d({name:a});export{o as a,f as b,a as c,l as d};
@@ -1 +1 @@
1
- import{a as c}from"./chunk-P6KIY2J3.js";import{g as p}from"./chunk-VPRTJUIN.js";p();var u=!1;function I(){return u}function k(){let a=0,o=!1,r=setInterval(()=>{if(!o){if(I()||a>=12e4){o=!0,clearInterval(r),c(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}a+=100}},100)}var b=async({config:t,Command:e})=>{await M(e);let{reportAnalyticsEvent:a}=await import("./analytics-IVVKLIEG.js");await a({config:t,exitMode:"ok"});let{postrun:o}=await import("./deprecations-Z3EJ6DLR.js");o(e);let{outputDebug:r}=await import("./output-72FRMGSA.js"),i=e.id.replace(/:/g," ");r(`Completed command ${i}`),!i.includes("notifications")&&!i.includes("upgrade")&&await v(),u=!0};async function v(){let{versionToAutoUpgrade:t,warnIfUpgradeAvailable:e}=await import("./upgrade-4LKQ77U7.js"),a=t();if(!a){await e();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await d(a);else{let{runAtMinimumInterval:r}=await import("./conf-store-T37CFZUN.js");await r("auto-upgrade",{days:1},async()=>{await d(a)})}}async function d(t){let[{CLI_KIT_VERSION:e},{isMajorVersionChange:a},{outputWarn:o,outputDebug:r},{getOutputUpdateCLIReminder:i,runCLIUpgrade:l,hasBlockingAutoUpgradeNotification:m},n]=await Promise.all([import("./version-HZU5UTS6.js"),import("./version-HZDBZ4OS.js"),import("./output-72FRMGSA.js"),import("./upgrade-4LKQ77U7.js"),import("./metadata-2ZGSR7V6.js")]);if(a(e,t)){o(i(t,!0)),await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await m()){await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await l({autoupgrade:!0}),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let s=`Auto-upgrade failed: ${f}`;r(s),o(i(t)),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-HU5Y6I3H.js"),import("./is-global-ARDA4CSZ.js")]),_=Object.assign(new Error(s),{packageManager:w(),platform:process.platform,cliVersion:e});await g(_,"expected_error")}}async function M(t){let e=new Date().getTime();if(t&&"analyticsStopCommand"in t&&typeof t.analyticsStopCommand=="function"){let a=t.analyticsStopCommand();if(a){let o=await import("./metadata-2ZGSR7V6.js"),{commandStartOptions:r}=o.getAllSensitiveMetadata();if(!r)return;await o.addSensitiveMetadata(()=>({commandStartOptions:{...r,startTime:e,startCommand:a}}))}}}export{k as a,b};
1
+ import{a as c}from"./chunk-QSXJMUIM.js";import{g as p}from"./chunk-VPRTJUIN.js";p();var u=!1;function I(){return u}function k(){let a=0,o=!1,r=setInterval(()=>{if(!o){if(I()||a>=12e4){o=!0,clearInterval(r),c(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}a+=100}},100)}var b=async({config:t,Command:e})=>{await M(e);let{reportAnalyticsEvent:a}=await import("./analytics-P7HLTUUC.js");await a({config:t,exitMode:"ok"});let{postrun:o}=await import("./deprecations-SHRRJWOP.js");o(e);let{outputDebug:r}=await import("./output-YAHUCEVR.js"),i=e.id.replace(/:/g," ");r(`Completed command ${i}`),!i.includes("notifications")&&!i.includes("upgrade")&&await v(),u=!0};async function v(){let{versionToAutoUpgrade:t,warnIfUpgradeAvailable:e}=await import("./upgrade-GIYAOSMY.js"),a=t();if(!a){await e();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await d(a);else{let{runAtMinimumInterval:r}=await import("./conf-store-P6J5AF2O.js");await r("auto-upgrade",{days:1},async()=>{await d(a)})}}async function d(t){let[{CLI_KIT_VERSION:e},{isMajorVersionChange:a},{outputWarn:o,outputDebug:r},{getOutputUpdateCLIReminder:i,runCLIUpgrade:l,hasBlockingAutoUpgradeNotification:m},n]=await Promise.all([import("./version-6IWCPJOP.js"),import("./version-UH3O5QLS.js"),import("./output-YAHUCEVR.js"),import("./upgrade-GIYAOSMY.js"),import("./metadata-QOPVRQXV.js")]);if(a(e,t)){o(i(t,!0)),await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await m()){await n.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await l({autoupgrade:!0}),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let s=`Auto-upgrade failed: ${f}`;r(s),o(i(t)),await n.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-476A56HQ.js"),import("./is-global-F5VRY52F.js")]),_=Object.assign(new Error(s),{packageManager:w(),platform:process.platform,cliVersion:e});await g(_,"expected_error")}}async function M(t){let e=new Date().getTime();if(t&&"analyticsStopCommand"in t&&typeof t.analyticsStopCommand=="function"){let a=t.analyticsStopCommand();if(a){let o=await import("./metadata-QOPVRQXV.js"),{commandStartOptions:r}=o.getAllSensitiveMetadata();if(!r)return;await o.addSensitiveMetadata(()=>({commandStartOptions:{...r,startTime:e,startCommand:a}}))}}}export{k as a,b};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-JZZMGMFK.js";import{b as i}from"./chunk-NHO3LLWK.js";import{g as e}from"./chunk-VPRTJUIN.js";e();var t=class extends i{static{this.description="Generate a notifications.json file for the the CLI, appending a new notification to the current file."}static{this.hidden=!0}async run(){await n()}};export{t as a};
1
+ import{a as n}from"./chunk-Z6XZ5ZVE.js";import{b as i}from"./chunk-WQ3LY4W5.js";import{g as e}from"./chunk-VPRTJUIN.js";e();var t=class extends i{static{this.description="Generate a notifications.json file for the the CLI, appending a new notification to the current file."}static{this.hidden=!0}async run(){await n()}};export{t as a};
@@ -1,4 +1,4 @@
1
- import{c as w}from"./chunk-DKHNBNIX.js";import{c as F,e as x}from"./chunk-KKHFNKFV.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-VGD3F3EE.js";import{o as $,q as m}from"./chunk-AKVPUKAT.js";import{a as c}from"./chunk-MF3ETRJP.js";import{O as V,S as y,v as R}from"./chunk-SPDYVDFS.js";import{Cb as U,Db as D,Gb as u,Ib as p,Nb as d,Qb as l,Rb as E,zb as A}from"./chunk-U5DLHKFU.js";import{c as _}from"./chunk-UWN2OXJT.js";import{p as C,q as b,r as I}from"./chunk-IU2ZQ6TE.js";import{g as v}from"./chunk-VPRTJUIN.js";v();function M(){let e=U();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function re(e={}){let n=I()??b(),o=D(n),t=A();if(_()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let a=M();if(!a)throw new Error("Could not determine the package manager");let[r,...i]=a.split(" ");if(!r)throw new Error("Could not determine the command to run");let s=f("@shopify/cli",c),T=s?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${s})`:"\u2728 New version of Shopify CLI available!";d(p`${T}
1
+ import{c as w}from"./chunk-CW3LRQBF.js";import{c as F,e as x}from"./chunk-JO4IFVYW.js";import{B as h,m as S,t as L,u as P,v as f,z as N}from"./chunk-54XCZDJR.js";import{o as $,q as m}from"./chunk-SLAAB5WQ.js";import{a as c}from"./chunk-URLRH3UT.js";import{O as V,S as y,v as R}from"./chunk-QVLBI5WV.js";import{Cb as U,Db as D,Gb as u,Ib as p,Nb as d,Qb as l,Rb as E,zb as A}from"./chunk-YCX775XO.js";import{c as _}from"./chunk-PGUKHYQ5.js";import{p as C,q as b,r as I}from"./chunk-IU2ZQ6TE.js";import{g as v}from"./chunk-VPRTJUIN.js";v();function M(){let e=U();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function re(e={}){let n=I()??b(),o=D(n),t=A();if(_()){d("Skipping upgrade in development mode.");return}if(!(e.autoupgrade&&!t))if(t){let a=M();if(!a)throw new Error("Could not determine the package manager");let[r,...i]=a.split(" ");if(!r)throw new Error("Could not determine the command to run");let s=f("@shopify/cli",c),T=s?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${s})`:"\u2728 New version of Shopify CLI available!";d(p`${T}
2
2
  Now upgrading by running: ${u.genericShellCommand(a)}...`),await V(r,i,{stdio:"inherit"}),R({headline:"Shopify CLI upgraded.",body:s?`You're now on version ${s}.`:"You're now on the latest version."})}else if(o)await Y(o,c);else throw new Error("Could not determine the local project directory")}function ie(){let e=c,n=f("@shopify/cli",e);if(!n){l("Auto-upgrade: No newer version available.");return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")return l("Auto-upgrade: Forcing auto-upgrade because of SHOPIFY_CLI_FORCE_AUTO_UPGRADE."),n;if(!m()){l("Auto-upgrade: Skipping because auto-upgrade is not enabled.");return}if(y()){l("Auto-upgrade: Skipping auto-upgrade in CI.");return}if(w(e)){l("Auto-upgrade: Skipping auto-upgrade for pre-release version.");return}return n}async function se(){try{let{notifications:e}=await F();return x(e,"",["autoupgrade"]).some(o=>o.type==="error")}catch{return!1}}async function ce(){if(y()||w(c)||m())return;let e=f("@shopify/cli",c);e&&await $("warn-on-available-upgrade",{days:1},async()=>{E(G(e))})}function G(e,n=!1){let o=M(),t=o?p`💡 Version ${e} available! Run ${u.genericShellCommand(o)}`.value:p`💡 Version ${e} available!`.value;if(n){let a=`https://github.com/Shopify/cli/releases/tag/${e}`,r=p`⚠️ This is a major version — review breaking changes before upgrading:\n ${u.link(a,a)}`.value;return`${t}
3
3
 
4
4
  ${r}`}return t}async function Y(e,n){let o=(await h(e)).content,t=o.dependencies??{},a=o.devDependencies??{},i={...t,...a}[await k()];if(!i){l("Auto-upgrade: CLI dependency not found in project dependencies, skipping local upgrade.");return}i.slice(0,1).match(/[\^~]/)&&(i=n);let s=await P(await k(),i);s?q(i,s):W(i),await J("prod",t,e),await J("dev",a,e)}async function J(e,n,o){let t=[await k(),...await j()].filter(r=>!!n[r]).map(r=>({name:r,version:"latest"})),a=await L(o);t.length>0&&await N(t,{packageManager:await S(o),type:e,directory:o,stdout:process.stdout,stderr:process.stderr,addToRootDirectory:a})}async function k(){return(await O()).name}async function j(){return(await O())?.oclif?.plugins??[]}var g;async function O(){if(!g){let e=await h(C(import.meta.url));g=g??e.content}return g}function W(e){d(p`You're on the latest version, ${u.yellow(e)}, no need to upgrade!`)}function q(e,n){d(p`Upgrading CLI from ${u.yellow(e)} to ${u.yellow(n)}...`)}export{M as a,re as b,ie as c,se as d,ce as e,G as f};
@@ -1,2 +1,2 @@
1
- import{Gb as e,Ib as r,Qb as n,Ta as o,ua as g,wa as d}from"./chunk-U5DLHKFU.js";import{d as i}from"./chunk-IU2ZQ6TE.js";import{g as s}from"./chunk-VPRTJUIN.js";s();var f=".shopify";async function E(p){let t=i(p,f),a=i(t,".gitignore"),[h,u]=await Promise.all([o(t),o(a)]);return h||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await d(t)),u||(n(r`Creating .gitignore in ${e.path(t)}...`),await g(a,`# Ignore the entire ${f} directory
1
+ import{Gb as e,Ib as r,Qb as n,Ta as o,ua as g,wa as d}from"./chunk-YCX775XO.js";import{d as i}from"./chunk-IU2ZQ6TE.js";import{g as s}from"./chunk-VPRTJUIN.js";s();var f=".shopify";async function E(p){let t=i(p,f),a=i(t,".gitignore"),[h,u]=await Promise.all([o(t),o(a)]);return h||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await d(t)),u||(n(r`Creating .gitignore in ${e.path(t)}...`),await g(a,`# Ignore the entire ${f} directory
2
2
  *`)),t}export{E as a};
@@ -1,4 +1,4 @@
1
- import{a as o}from"./chunk-OCOY5MV2.js";import{q as i}from"./chunk-AKVPUKAT.js";import{b as r}from"./chunk-NHO3LLWK.js";import{u as e}from"./chunk-SPDYVDFS.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
1
+ import{a as o}from"./chunk-OCOY5MV2.js";import{q as i}from"./chunk-SLAAB5WQ.js";import{b as r}from"./chunk-WQ3LY4W5.js";import{u as e}from"./chunk-QVLBI5WV.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var t=class extends r{static{this.summary="Check whether auto-upgrade is enabled, disabled, or not yet configured."}static{this.descriptionWithMarkdown=`Check whether auto-upgrade is enabled, disabled, or not yet configured.
2
2
 
3
3
  When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version after each command.
4
4
 
@@ -1,4 +1,4 @@
1
- import{F as N}from"./chunk-J3TLZU6G.js";import{b as A}from"./chunk-W676PHBV.js";import{a as y,b as H}from"./chunk-WFXRSKRK.js";import{j as D}from"./chunk-I55NI3AJ.js";import{a as q}from"./chunk-VBUZWRUL.js";import{b as C,l as k,s as R}from"./chunk-SPDYVDFS.js";import{d as S}from"./chunk-5CSQNFG3.js";import{Ca as b,Qb as l,Ta as T,Ua as _,bb as v,na as O,wa as g}from"./chunk-U5DLHKFU.js";import{f as L}from"./chunk-UWN2OXJT.js";import{d as m,e as u,g as w,i as F}from"./chunk-IU2ZQ6TE.js";import{e as X,g as f}from"./chunk-VPRTJUIN.js";f();f();var M=X(q(),1),G=200,K=6e4,U=200,Q=500,I=class{constructor(t,e,n=G){this.currentEvents=[];this.extensionPaths=[];this.ignored={};this.extensionWatchedFiles=new Map;this.emitEvents=()=>{let t=this.currentEvents;this.currentEvents=[];let e=`\u{1F509} ${t.length} EVENTS EMITTED in files: ${t.map(n=>n.path).join(`
1
+ import{F as N}from"./chunk-KDA6FVYX.js";import{b as A}from"./chunk-QFAPNM3W.js";import{a as y,b as H}from"./chunk-WFXRSKRK.js";import{j as D}from"./chunk-GN2T6DLA.js";import{a as q}from"./chunk-VBUZWRUL.js";import{b as C,l as k,s as R}from"./chunk-QVLBI5WV.js";import{d as S}from"./chunk-U3WI3SBU.js";import{Ca as b,Qb as l,Ta as T,Ua as _,bb as v,na as O,wa as g}from"./chunk-YCX775XO.js";import{f as L}from"./chunk-PGUKHYQ5.js";import{d as m,e as u,g as w,i as F}from"./chunk-IU2ZQ6TE.js";import{e as X,g as f}from"./chunk-VPRTJUIN.js";f();f();var M=X(q(),1),G=200,K=6e4,U=200,Q=500,I=class{constructor(t,e,n=G){this.currentEvents=[];this.extensionPaths=[];this.ignored={};this.extensionWatchedFiles=new Map;this.emitEvents=()=>{let t=this.currentEvents;this.currentEvents=[];let e=`\u{1F509} ${t.length} EVENTS EMITTED in files: ${t.map(n=>n.path).join(`
2
2
  `)}`;l(e,this.options.stdout),this.onChangeCallback?.(t)};this.handleFileEvent=(t,e)=>{let n=y(),i=u(e),s=e===this.app.configPath,r=e.endsWith(".extension.toml");if(l(`\u{1F300}: ${t} ${e.replace(this.app.directory,"")}
3
3
  `),s)this.handleEventForExtension(t,e,this.app.directory,n,!1);else{let a=this.extensionWatchedFiles.get(i),p=a===void 0||a.size===0;if(p&&t==="add"&&!r){let d=this.discoverFileOwners(i);d.size>0&&(this.extensionWatchedFiles.set(i,d),a=d,p=!1)}if(p&&!r&&!s){l(`\u{1F300}: File ${e} is not watched by any extension`,this.options.stdout);return}for(let d of a??[]){let c=this.app.realExtensions.find(E=>E.handle===d),h=c?u(c.directory):this.app.directory;this.handleEventForExtension(t,e,h,n,!1,d)}p&&this.handleEventForExtension(t,e,this.app.directory,n,!0)}this.debouncedEmit()};this.close=()=>{this.watcher&&(l("Closing file watcher",this.options.stdout),this.watcher.close().then(()=>l("File watching closed",this.options.stdout)).catch(t=>l(`File watching failed to close: ${t.message}`,this.options.stderr)))};this.app=t,this.options=e,this.debouncedEmit=R(this.emitEvents.bind(this),n,{leading:!0,trailing:!0}),this.updateApp(t)}onChange(t){this.onChangeCallback=t}async start(){let e=[...this.app.configuration.extension_directories??["extensions"]].map(r=>m(this.app.directory,r));await Promise.all(e.map(async r=>{try{await g(r.replace(/\/\*+$/,""))}catch{}}));let n=[this.app.configPath,...e],i=this.getAllWatchedFiles();n.push(...i),this.close();let{default:s}=await import("./chokidar-G4ONJSK4.js");this.watcher=s.watch(n,{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),this.watcher.on("all",this.handleFileEvent),this.addAbortListener(),l(`File watcher started with ${n.length} paths`,this.options.stdout)}updateApp(t){this.app=t,this.extensionPaths=this.app.nonConfigExtensions.map(e=>u(e.directory)).filter(e=>e!==this.app.directory),this.extensionPaths.forEach(e=>{this.ignored[e]??=this.createIgnoreInstance(e)})}addAbortListener(){this.options.signal.removeEventListener("abort",this.close),this.options.signal.addEventListener("abort",this.close)}getAllWatchedFiles(){this.extensionWatchedFiles.clear();let t=this.app.realExtensions.map(n=>({extension:n,watchedFiles:n.watchedFiles()})),e=new Set;for(let{extension:n,watchedFiles:i}of t)for(let s of i){let r=u(s);e.add(r);let a=this.extensionWatchedFiles.get(r)??new Set;a.add(n.handle),this.extensionWatchedFiles.set(r,a)}return Array.from(e)}pushEvent(t){this.shouldIgnoreEvent(t)||(t.type==="extension_folder_created"&&(this.ignored[t.path]=this.createIgnoreInstance(t.path)),!this.currentEvents.some(e=>e.path===t.path&&e.type===t.type&&e.extensionHandle===t.extensionHandle)&&this.currentEvents.push(t))}shouldIgnoreEvent(t){if(t.type==="extension_folder_deleted"||t.type==="extension_folder_created"||t.extensionHandle&&this.extensionWatchedFiles.get(u(t.path))?.has(t.extensionHandle))return!1;let n=(t.extensionHandle?this.app.realExtensions.find(s=>s.handle===t.extensionHandle):void 0)?.watchedFiles(),i=this.ignored[t.extensionPath];if(n)return!n.some(r=>v(t.path,r));if(i){let s=w(t.extensionPath,t.path);return i.ignores(s)}return!1}discoverFileOwners(t){let e=new Set;for(let n of this.app.realExtensions){let i=u(n.directory);i!==this.app.directory&&t.startsWith(`${i}/`)&&this.pathMatchesWatchPatterns(t,n)&&e.add(n.handle)}return e}pathMatchesWatchPatterns(t,e){let{paths:n,ignore:i}=e.watchPatterns(),s=w(u(e.directory),t);return i.some(r=>v(s,r))?!1:n.some(r=>v(s,r))}handleEventForExtension(t,e,n,i,s,r){let a=e.endsWith(".extension.toml"),p=e===this.app.configPath;switch(t){case"change":if(s)break;a||p?this.pushEvent({type:"extensions_config_updated",path:e,extensionPath:n,extensionHandle:r,startTime:i}):this.pushEvent({type:"file_updated",path:e,extensionPath:n,extensionHandle:r,startTime:i});break;case"add":if(!a){this.pushEvent({type:"file_created",path:e,extensionPath:n,extensionHandle:r,startTime:i});break}let d=0,c=F(e),h=setInterval(()=>{_(m(c,A.lockFile))?(l(`Waiting for extension to complete creation: ${e}
4
4
  `),d+=U):(clearInterval(h),this.extensionPaths.push(c),this.pushEvent({type:"extension_folder_created",path:c,extensionPath:n,startTime:i}),this.debouncedEmit()),d>=K&&(clearInterval(h),this.options.stderr.write(`Error loading new extension at path: ${e}.
@@ -1,2 +1,2 @@
1
- import{a as k,b as N,c as w}from"./chunk-IBR5TZRE.js";import{n as F}from"./chunk-3ODFSKK3.js";import{a as T,b as D}from"./chunk-T7LIZZZ5.js";import{O as A,P,a as O}from"./chunk-SPDYVDFS.js";import{g as b}from"./chunk-5CSQNFG3.js";import{Ia as _,La as U,Pa as I,Qb as u,Ua as p,xa as x,za as y}from"./chunk-U5DLHKFU.js";import{f as h}from"./chunk-UWN2OXJT.js";import{d as m,i as l,j as S}from"./chunk-IU2ZQ6TE.js";import{g as f}from"./chunk-VPRTJUIN.js";f();f();import{fileURLToPath as M}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as q,execFileSync as z}from"child_process";var v="2024.8.2",B=`https://github.com/cloudflare/cloudflared/releases/download/${v}/`,W={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},G={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},V={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},$={linux:W,darwin:G,win32:V};function X(e=process.platform,t=process.arch){if(!Object.keys($).includes(e))throw new Error(`Unsupported system platform: ${e}`);let n=$[e][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return B+n}function Z(e=process.env,t=process.platform){return e.SHOPIFY_CLI_CLOUDFLARED_PATH?e.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(M(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(e=process.env,t=process.platform,r=process.arch){if(e.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=X(t,r),o=Z(e,t);if(p(o))try{let a=z(o,["--version"],{encoding:"utf8"}).split(" "),i=a.length>2?a[2]:"0.0.0";if(!J(v,i)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await K(n,o);else if(t==="darwin")await tt(n,o);else if(t==="win32")await Q(n,o);else throw new Error(`Unsupported platform: ${t}`)}function J(e,t){let[r,n,o]=e.split(".").map(Number),[a,i,c]=t.split(".").map(Number);return r!==a?(r??0)>(a??0):n!==i?(n??0)>(i??0):(o??0)>(c??0)}async function K(e,t){await C(e,t),await I(t,"755")}async function Q(e,t){await C(e,t)}async function tt(e,t){await C(e,`${t}.tgz`);let r=S(`${t}.tgz`);q(`tar -xzf ${r}`,{cwd:l(t)}),_(`${t}.tgz`),await y(`${l(t)}/cloudflared`,t)}async function C(e,t){p(l(t))||x(l(t));let r=Y.promisify(j),n=await F(e,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${e} (${n.status} ${n.statusText})`);let o=U(t);return await r(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as rt}from"url";var kt=N({provider:w,action:st}),nt=h()?.2:40,ot=5;async function st(e){try{let t=new R(e);return await t.startTunnel(),T(t)}catch(t){let r=new k("unknown",t.message);return D(r)}}var R=class{constructor(t){this.provider=w,this.currentStatus={status:"not-started"},this.abortController=void 0,this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new O;let r=!1;if(t>=ot){r=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],a=!1,i;this.currentStatus={status:"starting"},setTimeout(()=>{if(!r){r=!0;let s=[...new Set(o)].slice(-5).join(`
1
+ import{a as k,b as N,c as w}from"./chunk-DLUBJJQT.js";import{n as F}from"./chunk-6PAOR3TW.js";import{a as T,b as D}from"./chunk-PA6H2JVD.js";import{O as A,P,a as O}from"./chunk-QVLBI5WV.js";import{g as b}from"./chunk-U3WI3SBU.js";import{Ia as _,La as U,Pa as I,Qb as u,Ua as p,xa as x,za as y}from"./chunk-YCX775XO.js";import{f as h}from"./chunk-PGUKHYQ5.js";import{d as m,i as l,j as S}from"./chunk-IU2ZQ6TE.js";import{g as f}from"./chunk-VPRTJUIN.js";f();f();import{fileURLToPath as M}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as q,execFileSync as z}from"child_process";var v="2024.8.2",B=`https://github.com/cloudflare/cloudflared/releases/download/${v}/`,W={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},G={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},V={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},$={linux:W,darwin:G,win32:V};function X(e=process.platform,t=process.arch){if(!Object.keys($).includes(e))throw new Error(`Unsupported system platform: ${e}`);let n=$[e][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return B+n}function Z(e=process.env,t=process.platform){return e.SHOPIFY_CLI_CLOUDFLARED_PATH?e.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(M(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(e=process.env,t=process.platform,r=process.arch){if(e.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=X(t,r),o=Z(e,t);if(p(o))try{let a=z(o,["--version"],{encoding:"utf8"}).split(" "),i=a.length>2?a[2]:"0.0.0";if(!J(v,i)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await K(n,o);else if(t==="darwin")await tt(n,o);else if(t==="win32")await Q(n,o);else throw new Error(`Unsupported platform: ${t}`)}function J(e,t){let[r,n,o]=e.split(".").map(Number),[a,i,c]=t.split(".").map(Number);return r!==a?(r??0)>(a??0):n!==i?(n??0)>(i??0):(o??0)>(c??0)}async function K(e,t){await C(e,t),await I(t,"755")}async function Q(e,t){await C(e,t)}async function tt(e,t){await C(e,`${t}.tgz`);let r=S(`${t}.tgz`);q(`tar -xzf ${r}`,{cwd:l(t)}),_(`${t}.tgz`),await y(`${l(t)}/cloudflared`,t)}async function C(e,t){p(l(t))||x(l(t));let r=Y.promisify(j),n=await F(e,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${e} (${n.status} ${n.statusText})`);let o=U(t);return await r(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as rt}from"url";var kt=N({provider:w,action:st}),nt=h()?.2:40,ot=5;async function st(e){try{let t=new R(e);return await t.startTunnel(),T(t)}catch(t){let r=new k("unknown",t.message);return D(r)}}var R=class{constructor(t){this.provider=w,this.currentStatus={status:"not-started"},this.abortController=void 0,this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new O;let r=!1;if(t>=ot){r=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],a=!1,i;this.currentStatus={status:"starting"},setTimeout(()=>{if(!r){r=!0;let s=[...new Set(o)].slice(-5).join(`
2
2
  `);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},nt*1e3);let c=this,E=new et({write(s,ft,H){if(u(s.toString()),r)return;i??(i=it(s)),ut(s)&&(a=!0),a&&(i?(r=!0,c.currentStatus={status:"connected",url:i}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let L=at(s);L&&o.push(L),H()}});A(ct(),n,{stdout:E,stderr:E,signal:this.abortController.signal,externalErrorHandler:async s=>{if(r)throw new b(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),h()||await P(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function it(e){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${dt()})`),r=e.toString().match(t)??void 0;return r&&r[1]}function at(e){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(e.toString())))return`Could not start Cloudflare tunnel: ${lt(e.toString())}`}function lt(e){let t=/^[0-9TZ:-]+ (ERR )?/g,r=/connIndex.*/g;return e.replace(t,"").replace(r,"")}function ut(e){let t=e.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function ct(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(rt(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{kt as a};
@@ -1,4 +1,4 @@
1
- import{a as Qe}from"./chunk-K2WUCOQJ.js";import{a as wo,b as So}from"./chunk-DKHNBNIX.js";import{T as bo,U as Bo,V as T0,W as P0,X as Oo,Y as N0,ba as cr,d as vo,g as w0}from"./chunk-3ODFSKK3.js";import{o as Ao}from"./chunk-AKVPUKAT.js";import{a as Gt}from"./chunk-MF3ETRJP.js";import{a as S0}from"./chunk-QRAC43MG.js";import{c as _o}from"./chunk-JUVAGMIH.js";import{q as j0,u as Po}from"./chunk-SPDYVDFS.js";import{F as A0,Fa as go,N as Mu,R as b0,S as B0,U as Co,Ua as yo,b as C0,c as m0,f as fo,i as g0,ia as mo,k as y0,m as po,n as Eo,q as _0,u as ho,v as v0,w as Kt,zb as To}from"./chunk-U5DLHKFU.js";import{b as E0,c as h0,e as co,f as Fo,j as O0}from"./chunk-CERXUPGC.js";import{d as _e,i as Iu}from"./chunk-IU2ZQ6TE.js";import{a as X,c as E,e as ru,f as p0,g as l}from"./chunk-VPRTJUIN.js";var jo=E((E1,No)=>{l();function Ce(e,r){typeof r=="boolean"&&(r={forever:r}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=r||{},this._maxRetryTime=r&&r.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}No.exports=Ce;Ce.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};Ce.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};Ce.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var r=new Date().getTime();if(e&&r-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var u=this._timeouts.shift();if(u===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),u=this._timeouts.shift();else return!1;var t=this,n=setTimeout(function(){t._attempts++,t._operationTimeoutCb&&(t._timeout=setTimeout(function(){t._operationTimeoutCb(t._attempts)},t._operationTimeout),t._options.unref&&t._timeout.unref()),t._fn(t._attempts)},u);return this._options.unref&&n.unref(),!0};Ce.prototype.attempt=function(e,r){this._fn=e,r&&(r.timeout&&(this._operationTimeout=r.timeout),r.cb&&(this._operationTimeoutCb=r.cb));var u=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){u._operationTimeoutCb()},u._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Ce.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};Ce.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};Ce.prototype.start=Ce.prototype.try;Ce.prototype.errors=function(){return this._errors};Ce.prototype.attempts=function(){return this._attempts};Ce.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},r=null,u=0,t=0;t<this._errors.length;t++){var n=this._errors[t],i=n.message,o=(e[i]||0)+1;e[i]=o,o>=u&&(r=n,u=o)}return r}});var Io=E(fr=>{l();var M0=jo();fr.operation=function(e){var r=fr.timeouts(e);return new M0(r,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};fr.timeouts=function(e){if(e instanceof Array)return[].concat(e);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var u in e)r[u]=e[u];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var t=[],n=0;n<r.retries;n++)t.push(this.createTimeout(n,r));return e&&e.forever&&!t.length&&t.push(this.createTimeout(n,r)),t.sort(function(i,o){return i-o}),t};fr.createTimeout=function(e,r){var u=r.randomize?Math.random()+1:1,t=Math.round(u*r.minTimeout*Math.pow(r.factor,e));return t=Math.min(t,r.maxTimeout),t};fr.wrap=function(e,r,u){if(r instanceof Array&&(u=r,r=null),!u){u=[];for(var t in e)typeof e[t]=="function"&&u.push(t)}for(var n=0;n<u.length;n++){var i=u[n],o=e[i];e[i]=function(s){var c=fr.operation(r),F=Array.prototype.slice.call(arguments,1),f=F.pop();F.push(function(p){c.retry(p)||(p&&(arguments[0]=c.mainError()),f.apply(this,arguments))}),c.attempt(function(){s.apply(e,F)})}.bind(e,o),e[i].options=r}}});var Ro=E((g1,Mo)=>{l();Mo.exports=Io()});var Lo=E((_1,Vt)=>{"use strict";l();var qo=Symbol();function R0(e,r,u){let t=r[qo];if(t)return r.stat(e,(i,o)=>{if(i)return u(i);u(null,o.mtime,t)});let n=new Date(Math.ceil(Date.now()/1e3)*1e3+5);r.utimes(e,n,n,i=>{if(i)return u(i);r.stat(e,(o,a)=>{if(o)return u(o);let s=a.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(r,qo,{value:s}),u(null,a.mtime,s)})})}function q0(e){let r=Date.now();return e==="s"&&(r=Math.ceil(r/1e3)*1e3),new Date(r)}Vt.exports.probe=R0;Vt.exports.getMtime=q0});var Yo=E((A1,tu)=>{"use strict";l();var L0=X("path"),Zt=mo(),k0=Ro(),x0=O0(),ko=Lo(),ke={};function uu(e,r){return r.lockfilePath||`${e}.lock`}function en(e,r,u){if(!r.realpath)return u(null,L0.resolve(e));r.fs.realpath(e,u)}function Xt(e,r,u){let t=uu(e,r);r.fs.mkdir(t,n=>{if(!n)return ko.probe(t,r.fs,(i,o,a)=>{if(i)return r.fs.rmdir(t,()=>{}),u(i);u(null,o,a)});if(n.code!=="EEXIST")return u(n);if(r.stale<=0)return u(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));r.fs.stat(t,(i,o)=>{if(i)return i.code==="ENOENT"?Xt(e,{...r,stale:0},u):u(i);if(!xo(o,r))return u(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));$o(e,r,a=>{if(a)return u(a);Xt(e,{...r,stale:0},u)})})})}function xo(e,r){return e.mtime.getTime()<Date.now()-r.stale}function $o(e,r,u){r.fs.rmdir(uu(e,r),t=>{if(t&&t.code!=="ENOENT")return u(t);u()})}function Ru(e,r){let u=ke[e];u.updateTimeout||(u.updateDelay=u.updateDelay||r.update,u.updateTimeout=setTimeout(()=>{u.updateTimeout=null,r.fs.stat(u.lockfilePath,(t,n)=>{let i=u.lastUpdate+r.stale<Date.now();if(t)return t.code==="ENOENT"||i?Qt(e,u,Object.assign(t,{code:"ECOMPROMISED"})):(u.updateDelay=1e3,Ru(e,r));if(!(u.mtime.getTime()===n.mtime.getTime()))return Qt(e,u,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let a=ko.getMtime(u.mtimePrecision);r.fs.utimes(u.lockfilePath,a,a,s=>{let c=u.lastUpdate+r.stale<Date.now();if(!u.released){if(s)return s.code==="ENOENT"||c?Qt(e,u,Object.assign(s,{code:"ECOMPROMISED"})):(u.updateDelay=1e3,Ru(e,r));u.mtime=a,u.lastUpdate=Date.now(),u.updateDelay=null,Ru(e,r)}})})},u.updateDelay),u.updateTimeout.unref&&u.updateTimeout.unref())}function Qt(e,r,u){r.released=!0,r.updateTimeout&&clearTimeout(r.updateTimeout),ke[e]===r&&delete ke[e],r.options.onCompromised(u)}function $0(e,r,u){r={stale:1e4,update:null,realpath:!0,retries:0,fs:Zt,onCompromised:t=>{throw t},...r},r.retries=r.retries||0,r.retries=typeof r.retries=="number"?{retries:r.retries}:r.retries,r.stale=Math.max(r.stale||0,2e3),r.update=r.update==null?r.stale/2:r.update||0,r.update=Math.max(Math.min(r.update,r.stale/2),1e3),en(e,r,(t,n)=>{if(t)return u(t);let i=k0.operation(r.retries);i.attempt(()=>{Xt(n,r,(o,a,s)=>{if(i.retry(o))return;if(o)return u(i.mainError());let c=ke[n]={lockfilePath:uu(n,r),mtime:a,mtimePrecision:s,options:r,lastUpdate:Date.now()};Ru(n,r),u(null,F=>{if(c.released)return F&&F(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));Uo(n,{...r,realpath:!1},F)})})})})}function Uo(e,r,u){r={fs:Zt,realpath:!0,...r},en(e,r,(t,n)=>{if(t)return u(t);let i=ke[n];if(!i)return u(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));i.updateTimeout&&clearTimeout(i.updateTimeout),i.released=!0,delete ke[n],$o(n,r,u)})}function U0(e,r,u){r={stale:1e4,realpath:!0,fs:Zt,...r},r.stale=Math.max(r.stale||0,2e3),en(e,r,(t,n)=>{if(t)return u(t);r.fs.stat(uu(n,r),(i,o)=>i?i.code==="ENOENT"?u(null,!1):u(i):u(null,!xo(o,r)))})}function Y0(){return ke}x0(()=>{for(let e in ke){let r=ke[e].options;try{r.fs.rmdirSync(uu(e,r))}catch{}}});tu.exports.lock=$0;tu.exports.unlock=Uo;tu.exports.check=U0;tu.exports.getLocks=Y0});var Wo=E((B1,Ho)=>{"use strict";l();var H0=mo();function W0(e){let r=["mkdir","realpath","stat","rmdir","utimes"],u={...e};return r.forEach(t=>{u[t]=(...n)=>{let i=n.pop(),o;try{o=e[`${t}Sync`](...n)}catch(a){return i(a)}i(null,o)}}),u}function z0(e){return(...r)=>new Promise((u,t)=>{r.push((n,i)=>{n?t(n):u(i)}),e(...r)})}function J0(e){return(...r)=>{let u,t;if(r.push((n,i)=>{u=n,t=i}),e(...r),u)throw u;return t}}function G0(e){if(e={...e},e.fs=W0(e.fs||H0),typeof e.retries=="number"&&e.retries>0||e.retries&&typeof e.retries.retries=="number"&&e.retries.retries>0)throw Object.assign(new Error("Cannot use retries with the sync api"),{code:"ESYNC"});return e}Ho.exports={toPromise:z0,toSync:J0,toSyncOptions:G0}});var eF=E((w1,Xe)=>{"use strict";l();var Tr=Yo(),{toPromise:qu,toSync:Lu,toSyncOptions:rn}=Wo();async function zo(e,r){let u=await qu(Tr.lock)(e,r);return qu(u)}function K0(e,r){let u=Lu(Tr.lock)(e,rn(r));return Lu(u)}function V0(e,r){return qu(Tr.unlock)(e,r)}function Q0(e,r){return Lu(Tr.unlock)(e,rn(r))}function X0(e,r){return qu(Tr.check)(e,r)}function Z0(e,r){return Lu(Tr.check)(e,rn(r))}Xe.exports=zo;Xe.exports.lock=zo;Xe.exports.unlock=V0;Xe.exports.lockSync=K0;Xe.exports.unlockSync=Q0;Xe.exports.check=X0;Xe.exports.checkSync=Z0});var Vo=E((H1,Ko)=>{l();function nF(e,r,u,t){for(var n=-1,i=e==null?0:e.length;++n<i;){var o=e[n];r(t,o,u(o),e)}return t}Ko.exports=nF});var Xo=E((z1,Qo)=>{l();var iF=j0();function oF(e,r,u,t){return iF(e,function(n,i,o){r(t,n,u(n),o)}),t}Qo.exports=oF});var un=E((G1,Zo)=>{l();var DF=Vo(),aF=Xo(),sF=A0(),lF=fo();function cF(e,r){return function(u,t){var n=lF(u)?DF:aF,i=r?r():{};return n(u,e,sF(t,2),i)}}Zo.exports=cF});var rD=E((V1,eD)=>{l();var fF=bo(),FF=un(),dF=Object.prototype,pF=dF.hasOwnProperty,EF=FF(function(e,r,u){pF.call(e,u)?e[u].push(r):fF(e,u,[r])});eD.exports=EF});var tD=E((X1,uD)=>{l();var hF=un(),CF=hF(function(e,r,u){e[u?0:1].push(r)},function(){return[[],[]]});uD.exports=CF});var DD=E((ku,oD)=>{l();(function(e,r){typeof ku=="object"&&typeof oD<"u"?r(ku,(B0(),p0(b0)),w0()):typeof define=="function"&&define.amd?define(["exports","tslib","graphql"],r):(e=typeof globalThis<"u"?globalThis:e||self,r(e["graphql-tag"]={},e.tslib,e.graphql))})(ku,(function(e,r,u){"use strict";var t=new Map,n=new Map,i=!0,o=!1;function a(P){return P.replace(/[\s,]+/g," ").trim()}function s(P){return a(P.source.body.substring(P.start,P.end))}function c(P){var R=new Set,M=[];return P.definitions.forEach(function(x){if(x.kind==="FragmentDefinition"){var H=x.name.value,K=s(x.loc),De=n.get(H);De&&!De.has(K)?i&&console.warn("Warning: fragment with name "+H+` already exists.
1
+ import{a as Qe}from"./chunk-K2WUCOQJ.js";import{a as wo,b as So}from"./chunk-CW3LRQBF.js";import{T as bo,U as Bo,V as T0,W as P0,X as Oo,Y as N0,ba as cr,d as vo,g as w0}from"./chunk-6PAOR3TW.js";import{o as Ao}from"./chunk-SLAAB5WQ.js";import{a as Gt}from"./chunk-URLRH3UT.js";import{a as S0}from"./chunk-5ELT7DPJ.js";import{c as _o}from"./chunk-JUVAGMIH.js";import{q as j0,u as Po}from"./chunk-QVLBI5WV.js";import{F as A0,Fa as go,N as Mu,R as b0,S as B0,U as Co,Ua as yo,b as C0,c as m0,f as fo,i as g0,ia as mo,k as y0,m as po,n as Eo,q as _0,u as ho,v as v0,w as Kt,zb as To}from"./chunk-YCX775XO.js";import{b as E0,c as h0,e as co,f as Fo,j as O0}from"./chunk-CERXUPGC.js";import{d as _e,i as Iu}from"./chunk-IU2ZQ6TE.js";import{a as X,c as E,e as ru,f as p0,g as l}from"./chunk-VPRTJUIN.js";var jo=E((E1,No)=>{l();function Ce(e,r){typeof r=="boolean"&&(r={forever:r}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=r||{},this._maxRetryTime=r&&r.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}No.exports=Ce;Ce.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};Ce.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};Ce.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var r=new Date().getTime();if(e&&r-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var u=this._timeouts.shift();if(u===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),u=this._timeouts.shift();else return!1;var t=this,n=setTimeout(function(){t._attempts++,t._operationTimeoutCb&&(t._timeout=setTimeout(function(){t._operationTimeoutCb(t._attempts)},t._operationTimeout),t._options.unref&&t._timeout.unref()),t._fn(t._attempts)},u);return this._options.unref&&n.unref(),!0};Ce.prototype.attempt=function(e,r){this._fn=e,r&&(r.timeout&&(this._operationTimeout=r.timeout),r.cb&&(this._operationTimeoutCb=r.cb));var u=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){u._operationTimeoutCb()},u._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Ce.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};Ce.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};Ce.prototype.start=Ce.prototype.try;Ce.prototype.errors=function(){return this._errors};Ce.prototype.attempts=function(){return this._attempts};Ce.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},r=null,u=0,t=0;t<this._errors.length;t++){var n=this._errors[t],i=n.message,o=(e[i]||0)+1;e[i]=o,o>=u&&(r=n,u=o)}return r}});var Io=E(fr=>{l();var M0=jo();fr.operation=function(e){var r=fr.timeouts(e);return new M0(r,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};fr.timeouts=function(e){if(e instanceof Array)return[].concat(e);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var u in e)r[u]=e[u];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var t=[],n=0;n<r.retries;n++)t.push(this.createTimeout(n,r));return e&&e.forever&&!t.length&&t.push(this.createTimeout(n,r)),t.sort(function(i,o){return i-o}),t};fr.createTimeout=function(e,r){var u=r.randomize?Math.random()+1:1,t=Math.round(u*r.minTimeout*Math.pow(r.factor,e));return t=Math.min(t,r.maxTimeout),t};fr.wrap=function(e,r,u){if(r instanceof Array&&(u=r,r=null),!u){u=[];for(var t in e)typeof e[t]=="function"&&u.push(t)}for(var n=0;n<u.length;n++){var i=u[n],o=e[i];e[i]=function(s){var c=fr.operation(r),F=Array.prototype.slice.call(arguments,1),f=F.pop();F.push(function(p){c.retry(p)||(p&&(arguments[0]=c.mainError()),f.apply(this,arguments))}),c.attempt(function(){s.apply(e,F)})}.bind(e,o),e[i].options=r}}});var Ro=E((g1,Mo)=>{l();Mo.exports=Io()});var Lo=E((_1,Vt)=>{"use strict";l();var qo=Symbol();function R0(e,r,u){let t=r[qo];if(t)return r.stat(e,(i,o)=>{if(i)return u(i);u(null,o.mtime,t)});let n=new Date(Math.ceil(Date.now()/1e3)*1e3+5);r.utimes(e,n,n,i=>{if(i)return u(i);r.stat(e,(o,a)=>{if(o)return u(o);let s=a.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(r,qo,{value:s}),u(null,a.mtime,s)})})}function q0(e){let r=Date.now();return e==="s"&&(r=Math.ceil(r/1e3)*1e3),new Date(r)}Vt.exports.probe=R0;Vt.exports.getMtime=q0});var Yo=E((A1,tu)=>{"use strict";l();var L0=X("path"),Zt=mo(),k0=Ro(),x0=O0(),ko=Lo(),ke={};function uu(e,r){return r.lockfilePath||`${e}.lock`}function en(e,r,u){if(!r.realpath)return u(null,L0.resolve(e));r.fs.realpath(e,u)}function Xt(e,r,u){let t=uu(e,r);r.fs.mkdir(t,n=>{if(!n)return ko.probe(t,r.fs,(i,o,a)=>{if(i)return r.fs.rmdir(t,()=>{}),u(i);u(null,o,a)});if(n.code!=="EEXIST")return u(n);if(r.stale<=0)return u(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));r.fs.stat(t,(i,o)=>{if(i)return i.code==="ENOENT"?Xt(e,{...r,stale:0},u):u(i);if(!xo(o,r))return u(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));$o(e,r,a=>{if(a)return u(a);Xt(e,{...r,stale:0},u)})})})}function xo(e,r){return e.mtime.getTime()<Date.now()-r.stale}function $o(e,r,u){r.fs.rmdir(uu(e,r),t=>{if(t&&t.code!=="ENOENT")return u(t);u()})}function Ru(e,r){let u=ke[e];u.updateTimeout||(u.updateDelay=u.updateDelay||r.update,u.updateTimeout=setTimeout(()=>{u.updateTimeout=null,r.fs.stat(u.lockfilePath,(t,n)=>{let i=u.lastUpdate+r.stale<Date.now();if(t)return t.code==="ENOENT"||i?Qt(e,u,Object.assign(t,{code:"ECOMPROMISED"})):(u.updateDelay=1e3,Ru(e,r));if(!(u.mtime.getTime()===n.mtime.getTime()))return Qt(e,u,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let a=ko.getMtime(u.mtimePrecision);r.fs.utimes(u.lockfilePath,a,a,s=>{let c=u.lastUpdate+r.stale<Date.now();if(!u.released){if(s)return s.code==="ENOENT"||c?Qt(e,u,Object.assign(s,{code:"ECOMPROMISED"})):(u.updateDelay=1e3,Ru(e,r));u.mtime=a,u.lastUpdate=Date.now(),u.updateDelay=null,Ru(e,r)}})})},u.updateDelay),u.updateTimeout.unref&&u.updateTimeout.unref())}function Qt(e,r,u){r.released=!0,r.updateTimeout&&clearTimeout(r.updateTimeout),ke[e]===r&&delete ke[e],r.options.onCompromised(u)}function $0(e,r,u){r={stale:1e4,update:null,realpath:!0,retries:0,fs:Zt,onCompromised:t=>{throw t},...r},r.retries=r.retries||0,r.retries=typeof r.retries=="number"?{retries:r.retries}:r.retries,r.stale=Math.max(r.stale||0,2e3),r.update=r.update==null?r.stale/2:r.update||0,r.update=Math.max(Math.min(r.update,r.stale/2),1e3),en(e,r,(t,n)=>{if(t)return u(t);let i=k0.operation(r.retries);i.attempt(()=>{Xt(n,r,(o,a,s)=>{if(i.retry(o))return;if(o)return u(i.mainError());let c=ke[n]={lockfilePath:uu(n,r),mtime:a,mtimePrecision:s,options:r,lastUpdate:Date.now()};Ru(n,r),u(null,F=>{if(c.released)return F&&F(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));Uo(n,{...r,realpath:!1},F)})})})})}function Uo(e,r,u){r={fs:Zt,realpath:!0,...r},en(e,r,(t,n)=>{if(t)return u(t);let i=ke[n];if(!i)return u(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));i.updateTimeout&&clearTimeout(i.updateTimeout),i.released=!0,delete ke[n],$o(n,r,u)})}function U0(e,r,u){r={stale:1e4,realpath:!0,fs:Zt,...r},r.stale=Math.max(r.stale||0,2e3),en(e,r,(t,n)=>{if(t)return u(t);r.fs.stat(uu(n,r),(i,o)=>i?i.code==="ENOENT"?u(null,!1):u(i):u(null,!xo(o,r)))})}function Y0(){return ke}x0(()=>{for(let e in ke){let r=ke[e].options;try{r.fs.rmdirSync(uu(e,r))}catch{}}});tu.exports.lock=$0;tu.exports.unlock=Uo;tu.exports.check=U0;tu.exports.getLocks=Y0});var Wo=E((B1,Ho)=>{"use strict";l();var H0=mo();function W0(e){let r=["mkdir","realpath","stat","rmdir","utimes"],u={...e};return r.forEach(t=>{u[t]=(...n)=>{let i=n.pop(),o;try{o=e[`${t}Sync`](...n)}catch(a){return i(a)}i(null,o)}}),u}function z0(e){return(...r)=>new Promise((u,t)=>{r.push((n,i)=>{n?t(n):u(i)}),e(...r)})}function J0(e){return(...r)=>{let u,t;if(r.push((n,i)=>{u=n,t=i}),e(...r),u)throw u;return t}}function G0(e){if(e={...e},e.fs=W0(e.fs||H0),typeof e.retries=="number"&&e.retries>0||e.retries&&typeof e.retries.retries=="number"&&e.retries.retries>0)throw Object.assign(new Error("Cannot use retries with the sync api"),{code:"ESYNC"});return e}Ho.exports={toPromise:z0,toSync:J0,toSyncOptions:G0}});var eF=E((w1,Xe)=>{"use strict";l();var Tr=Yo(),{toPromise:qu,toSync:Lu,toSyncOptions:rn}=Wo();async function zo(e,r){let u=await qu(Tr.lock)(e,r);return qu(u)}function K0(e,r){let u=Lu(Tr.lock)(e,rn(r));return Lu(u)}function V0(e,r){return qu(Tr.unlock)(e,r)}function Q0(e,r){return Lu(Tr.unlock)(e,rn(r))}function X0(e,r){return qu(Tr.check)(e,r)}function Z0(e,r){return Lu(Tr.check)(e,rn(r))}Xe.exports=zo;Xe.exports.lock=zo;Xe.exports.unlock=V0;Xe.exports.lockSync=K0;Xe.exports.unlockSync=Q0;Xe.exports.check=X0;Xe.exports.checkSync=Z0});var Vo=E((H1,Ko)=>{l();function nF(e,r,u,t){for(var n=-1,i=e==null?0:e.length;++n<i;){var o=e[n];r(t,o,u(o),e)}return t}Ko.exports=nF});var Xo=E((z1,Qo)=>{l();var iF=j0();function oF(e,r,u,t){return iF(e,function(n,i,o){r(t,n,u(n),o)}),t}Qo.exports=oF});var un=E((G1,Zo)=>{l();var DF=Vo(),aF=Xo(),sF=A0(),lF=fo();function cF(e,r){return function(u,t){var n=lF(u)?DF:aF,i=r?r():{};return n(u,e,sF(t,2),i)}}Zo.exports=cF});var rD=E((V1,eD)=>{l();var fF=bo(),FF=un(),dF=Object.prototype,pF=dF.hasOwnProperty,EF=FF(function(e,r,u){pF.call(e,u)?e[u].push(r):fF(e,u,[r])});eD.exports=EF});var tD=E((X1,uD)=>{l();var hF=un(),CF=hF(function(e,r,u){e[u?0:1].push(r)},function(){return[[],[]]});uD.exports=CF});var DD=E((ku,oD)=>{l();(function(e,r){typeof ku=="object"&&typeof oD<"u"?r(ku,(B0(),p0(b0)),w0()):typeof define=="function"&&define.amd?define(["exports","tslib","graphql"],r):(e=typeof globalThis<"u"?globalThis:e||self,r(e["graphql-tag"]={},e.tslib,e.graphql))})(ku,(function(e,r,u){"use strict";var t=new Map,n=new Map,i=!0,o=!1;function a(P){return P.replace(/[\s,]+/g," ").trim()}function s(P){return a(P.source.body.substring(P.start,P.end))}function c(P){var R=new Set,M=[];return P.definitions.forEach(function(x){if(x.kind==="FragmentDefinition"){var H=x.name.value,K=s(x.loc),De=n.get(H);De&&!De.has(K)?i&&console.warn("Warning: fragment with name "+H+` already exists.
2
2
  graphql-tag enforces all fragment names across your application to be unique; read more about
3
3
  this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):De||n.set(H,De=new Set),De.add(K),R.has(K)||(R.add(K),M.push(x))}else M.push(x)}),r.__assign(r.__assign({},P),{definitions:M})}function F(P){var R=new Set(P.definitions);R.forEach(function(x){x.loc&&delete x.loc,Object.keys(x).forEach(function(H){var K=x[H];K&&typeof K=="object"&&R.add(K)})});var M=P.loc;return M&&(delete M.startToken,delete M.endToken),P}function f(P){var R=a(P);if(!t.has(R)){var M=u.parse(P,{experimentalFragmentVariables:o,allowLegacyFragmentVariables:o});if(!M||M.kind!=="Document")throw new Error("Not a valid GraphQL document.");t.set(R,F(c(M)))}return t.get(R)}function p(P){for(var R=[],M=1;M<arguments.length;M++)R[M-1]=arguments[M];typeof P=="string"&&(P=[P]);var x=P[0];return R.forEach(function(H,K){H&&H.kind==="Document"?x+=H.loc.source.body:x+=H,x+=P[K+1]}),f(x)}function h(){t.clear(),n.clear()}function g(){i=!1}function v(){o=!0}function y(){o=!1}var B={gql:p,resetCaches:h,disableFragmentWarnings:g,enableExperimentalFragmentVariables:v,disableExperimentalFragmentVariables:y};(function(P){P.gql=B.gql,P.resetCaches=B.resetCaches,P.disableFragmentWarnings=B.disableFragmentWarnings,P.enableExperimentalFragmentVariables=B.enableExperimentalFragmentVariables,P.disableExperimentalFragmentVariables=B.disableExperimentalFragmentVariables})(p||(p={})),p.default=p;var O=p;e.default=O,e.disableExperimentalFragmentVariables=y,e.disableFragmentWarnings=g,e.enableExperimentalFragmentVariables=v,e.gql=p,e.resetCaches=h,Object.defineProperty(e,"__esModule",{value:!0})}))});var sD=E((i_,aD)=>{l();aD.exports=DD().gql});var MF=E(ED=>{l();var mF=Object.create,xu=Object.defineProperty,gF=Object.getPrototypeOf,yF=Object.prototype.hasOwnProperty,_F=Object.getOwnPropertyNames,vF=Object.getOwnPropertyDescriptor,cD=e=>xu(e,"__esModule",{value:!0}),AF=(e,r)=>{cD(e);for(var u in r)xu(e,u,{get:r[u],enumerable:!0})},bF=(e,r,u)=>{if(cD(e),r&&typeof r=="object"||typeof r=="function")for(let t of _F(r))!yF.call(e,t)&&t!=="default"&&xu(e,t,{get:()=>r[t],enumerable:!(u=vF(r,t))||u.enumerable});return e},$u=e=>e&&e.__esModule?e:bF(xu(e!=null?mF(gF(e)):{},"default",{value:e,enumerable:!0}),e);AF(ED,{default:()=>IF,generateContentsFromGraphqlString:()=>pD,generateGraphQLString:()=>FD});var BF=$u(X("fs")),OF=$u(sD()),wF=$u(X("readline")),lD=$u(X("path")),fD=(e,r)=>{let u=r?r(e):e;return JSON.stringify(u,(t,n)=>n===void 0?"__undefined":n).replace(/"__undefined"/g,"undefined")},SF=(e,r)=>{let u=new Set,t=[],n=i=>{u.has(i)||(u.add(i),i.imports.forEach(o=>{let a=r[o.absolutePath];n(a)}),t.unshift(i))};return e.forEach(n),t},TF=e=>new Promise(r=>{let u=wF.default.createInterface({input:BF.default.createReadStream(e)}),t="",n=[],i=!1,o=(a,s)=>{let c=s.replace(a,""),F=c.replace(/"|'/g,""),f=lD.default.join(lD.default.dirname(e),F);n.push({absolutePath:f,relativePath:c})};u.on("line",a=>{a.startsWith("#import ")?o("#import ",a):a.startsWith("# import ")?o("# import ",a):i?t+=a+`
4
4
  `:a[0]!=="#"&&a!==""&&(i=!0,t+=a+`
@@ -1,4 +1,4 @@
1
- import{Ta as j,ma as w,ua as R}from"./chunk-U5DLHKFU.js";import{a as H,c as f,e as G,g as o}from"./chunk-VPRTJUIN.js";var X=f((Ct,k)=>{"use strict";o();var m=class e extends Error{constructor(t,s,r){super("[ParserError] "+t,s,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},E=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},A=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new E(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let s;for(;s===!1||this.nextChar();)s=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new m("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,s){s&&this.next(s),this.stack.push(this.state),this.state=new E(t)}callNow(t,s){return this.call(t,s),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new m("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new m("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new m("Must declare a parseStart method")}};A.END=1114112;A.Error=m;k.exports=A});var te=f((wt,ee)=>{"use strict";o();ee.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var y=f((At,re)=>{"use strict";o();re.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var ie=f((bt,se)=>{"use strict";o();var C=y(),K=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${C(2,this.getUTCMonth()+1)}-${C(2,this.getUTCDate())}`,s=`${C(2,this.getUTCHours())}:${C(2,this.getUTCMinutes())}:${C(2,this.getUTCSeconds())}.${C(3,this.getUTCMilliseconds())}`;return`${t}T${s}`}};se.exports=e=>{let t=new K(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var ae=f((Et,he)=>{"use strict";o();var ne=y(),Fe=global.Date,v=class extends Fe{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ne(2,this.getUTCMonth()+1)}-${ne(2,this.getUTCDate())}`}};he.exports=e=>{let t=new v(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var le=f((Nt,oe)=>{"use strict";o();var N=y(),W=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${N(2,this.getUTCHours())}:${N(2,this.getUTCMinutes())}:${N(2,this.getUTCSeconds())}.${N(3,this.getUTCMilliseconds())}`}};oe.exports=e=>{let t=new W(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var I=f((exports,module)=>{"use strict";o();module.exports=makeParserClass(X());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=te(),createDateTimeFloat=ie(),createDate=ae(),createTime=le(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
1
+ import{Ta as j,ma as w,ua as R}from"./chunk-YCX775XO.js";import{a as H,c as f,e as G,g as o}from"./chunk-VPRTJUIN.js";var X=f((Ct,k)=>{"use strict";o();var m=class e extends Error{constructor(t,s,r){super("[ParserError] "+t,s,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},E=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},A=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new E(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let s;for(;s===!1||this.nextChar();)s=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new m("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,s){s&&this.next(s),this.stack.push(this.state),this.state=new E(t)}callNow(t,s){return this.call(t,s),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new m("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new m("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new m("Must declare a parseStart method")}};A.END=1114112;A.Error=m;k.exports=A});var te=f((wt,ee)=>{"use strict";o();ee.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var y=f((At,re)=>{"use strict";o();re.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var ie=f((bt,se)=>{"use strict";o();var C=y(),K=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${C(2,this.getUTCMonth()+1)}-${C(2,this.getUTCDate())}`,s=`${C(2,this.getUTCHours())}:${C(2,this.getUTCMinutes())}:${C(2,this.getUTCSeconds())}.${C(3,this.getUTCMilliseconds())}`;return`${t}T${s}`}};se.exports=e=>{let t=new K(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var ae=f((Et,he)=>{"use strict";o();var ne=y(),Fe=global.Date,v=class extends Fe{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ne(2,this.getUTCMonth()+1)}-${ne(2,this.getUTCDate())}`}};he.exports=e=>{let t=new v(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var le=f((Nt,oe)=>{"use strict";o();var N=y(),W=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${N(2,this.getUTCHours())}:${N(2,this.getUTCMinutes())}:${N(2,this.getUTCSeconds())}.${N(3,this.getUTCMilliseconds())}`}};oe.exports=e=>{let t=new W(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var I=f((exports,module)=>{"use strict";o();module.exports=makeParserClass(X());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=te(),createDateTimeFloat=ie(),createDate=ae(),createTime=le(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
2
2
  `,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(r){let i=this.ctx,h=r.key.pop();for(let n of r.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,h))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(r.value)||isFloat(r.value)?i[h]=r.value.valueOf():i[h]=r.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(r){return this.state.resultTable?this.state.resultTable.push(r):this.state.resultTable=[r],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(r){return this.returnNow({key:this.state.resultTable,value:r})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(r){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,r)&&(!isTable(this.ctx[r])||this.ctx[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[r]=this.ctx[r]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,r))this.ctx=this.ctx[r]=Table();else if(isTable(this.ctx[r]))this.ctx=this.ctx[r];else if(isList(this.ctx[r]))this.ctx=this.ctx[r][this.ctx[r].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(r){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,r)||(this.ctx[r]=List()),isInlineList(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[r])){let i=Table();this.ctx[r].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,r))this.ctx=this.ctx[r]=Table();else{if(isInlineList(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[r]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[r]))this.ctx=this.ctx[r][this.ctx[r].length-1];else if(isTable(this.ctx[r]))this.ctx=this.ctx[r];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(r){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(r){return this.returnNow(r)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(r){return this.state.buf+=r,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let r="\\u00";return this.char<16&&(r+="0"),r+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${r} instead`))}recordMultiEscapeReplacement(r){return this.state.buf+=r,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(r){try{let i=parseInt(r,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let r=Integer(this.state.buf);if(r.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(r)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(r){if(this.state.resultArr){let i=this.state.resultArr[_contentType],h=tomlType(r);if(i!==h)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${h}`))}else this.state.resultArr=InlineList(tomlType(r));return isFloat(r)||isInteger(r)?this.state.resultArr.push(r.valueOf()):this.state.resultArr.push(r),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(r){let i=this.state.resultTable,h=r.key.pop();for(let n of r.key){if(hasKey(i,n)&&(!isTable(i[n])||i[n][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[n]=i[n]||Table()}if(hasKey(i,h))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(r.value)||isFloat(r.value)?i[h]=r.value.valueOf():i[h]=r.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var L=f((St,ce)=>{"use strict";o();ce.exports=$e;function $e(e,t){if(e.pos==null||e.line==null)return e;let s=e.message;if(s+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
3
3
  `,t&&t.split){let r=t.split(/\n/),i=String(Math.min(r.length,e.line+3)).length,h=" ";for(;h.length<i;)h+=" ";for(let n=Math.max(0,e.line-1);n<Math.min(r.length,e.line+2);++n){let a=String(n+1);if(a.length<i&&(a=" "+a),e.line===n){s+=a+"> "+r[n]+`
4
4
  `,s+=h+" ";for(let l=0;l<e.col;++l)s+=" ";s+=`^
@@ -15,5 +15,5 @@ import{Ta as j,ma as w,ua as R}from"./chunk-U5DLHKFU.js";import{a as H,c as f,e
15
15
  `),n+=t+"[["+h+`]]
16
16
  `,n+=q(h+".",t,a)}),n}function ct(e,t,s,r){var i=e+O(s),h="";return we(r).length>0&&(h+=t+"["+i+`]
17
17
  `),h+q(i+".",t,r)}});var Ne=f(V=>{"use strict";o();V.parse=Te();V.stringify=ye()});var Me=f((Zt,u)=>{o();var Se={};Se.__wbindgen_placeholder__=u.exports;var c,{TextEncoder:ut,TextDecoder:ft}=H("util");function Z(e){return e==null}var T=null;function B(){return(T===null||T.buffer.detached===!0||T.buffer.detached===void 0&&T.buffer!==c.memory.buffer)&&(T=new DataView(c.memory.buffer)),T}var b=0,M=null;function U(){return(M===null||M.byteLength===0)&&(M=new Uint8Array(c.memory.buffer)),M}var P=new ut("utf-8"),pt=typeof P.encodeInto=="function"?function(e,t){return P.encodeInto(e,t)}:function(e,t){let s=P.encode(e);return t.set(s),{read:e.length,written:s.length}};function Y(e,t,s){if(s===void 0){let a=P.encode(e),l=t(a.length,1)>>>0;return U().subarray(l,l+a.length).set(a),b=a.length,l}let r=e.length,i=t(r,1)>>>0,h=U(),n=0;for(;n<r;n++){let a=e.charCodeAt(n);if(a>127)break;h[i+n]=a}if(n!==r){n!==0&&(e=e.slice(n)),i=s(i,r,r=n+e.length*3,1)>>>0;let a=U().subarray(i+n,i+r),l=pt(e,a);n+=l.written,i=s(i,r,n,1)>>>0}return b=n,i}var Oe=new ft("utf-8",{ignoreBOM:!0,fatal:!0});Oe.decode();function F(e,t){return e=e>>>0,Oe.decode(U().subarray(e,e+t))}function De(e){let t=c.__wbindgen_export_0.get(e);return c.__externref_table_dealloc(e),t}u.exports.echoToml=function(e){let t,s;try{let h=Y(e,c.__wbindgen_malloc,c.__wbindgen_realloc),n=b,a=c.echoToml(h,n);var r=a[0],i=a[1];if(a[3])throw r=0,i=0,De(a[2]);return t=r,s=i,F(r,i)}finally{c.__wbindgen_free(t,s,1)}};u.exports.updateTomlValues=function(e,t){let s,r;try{let n=Y(e,c.__wbindgen_malloc,c.__wbindgen_realloc),a=b,l=c.updateTomlValues(n,a,t);var i=l[0],h=l[1];if(l[3])throw i=0,h=0,De(l[2]);return s=i,r=h,F(i,h)}finally{c.__wbindgen_free(s,r,1)}};u.exports.__wbg_from_2a5d3e218e67aa85=function(e){return Array.from(e)};u.exports.__wbg_get_b9b93047fe3cf45b=function(e,t){return e[t>>>0]};u.exports.__wbg_length_e2d2a49132c1b256=function(e){return e.length};u.exports.__wbindgen_boolean_get=function(e){let t=e;return typeof t=="boolean"?t?1:0:2};u.exports.__wbindgen_init_externref_table=function(){let e=c.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)};u.exports.__wbindgen_is_array=function(e){return Array.isArray(e)};u.exports.__wbindgen_is_undefined=function(e){return e===void 0};u.exports.__wbindgen_number_get=function(e,t){let s=t,r=typeof s=="number"?s:void 0;B().setFloat64(e+8,Z(r)?0:r,!0),B().setInt32(e+0,!Z(r),!0)};u.exports.__wbindgen_string_get=function(e,t){let s=t,r=typeof s=="string"?s:void 0;var i=Z(r)?0:Y(r,c.__wbindgen_malloc,c.__wbindgen_realloc),h=b;B().setInt32(e+4,h,!0),B().setInt32(e+0,i,!0)};u.exports.__wbindgen_string_new=function(e,t){return F(e,t)};u.exports.__wbindgen_throw=function(e,t){throw new Error(F(e,t))};var _t=H("path").join(__dirname,"toml_patch_bg.wasm"),dt=H("fs").readFileSync(_t),mt=new WebAssembly.Module(dt),gt=new WebAssembly.Instance(mt,Se);c=gt.exports;u.exports.__wasm=c;c.__wbindgen_start()});o();o();var D=G(Ne(),1);function Ie(e){let t=e.replace(/\r\n$/g,`
18
- `);return D.parse(t)}function Le(e){return D.stringify(e)}var z=G(Me()),$=class extends Error{constructor(t,s){super(s),this.name="TomlFileError",this.path=t}},Ue=class e{static async read(t){if(!await j(t))throw new $(t,`TOML file not found: ${t}`);let s=await w(t),r=new e(t,{});return r.content=r.decode(s),r}constructor(t,s){this.errors=[],this.path=t,this.content=s}async patch(t){let s=Pe(t),r=await w(this.path),i=(0,z.updateTomlValues)(r,s),h=this.decode(i);await R(this.path,i),this.content=h}async remove(t){let s=t.split("."),r=await w(this.path),i=(0,z.updateTomlValues)(r,[[s,void 0]]),h=this.decode(i);await R(this.path,i),this.content=h}async replace(t){let s=Le(t);this.decode(s),await R(this.path,s),this.content=t}async transformRaw(t){let s=await w(this.path),r=t(s),i=this.decode(r);await R(this.path,r),this.content=i}decode(t){try{return Ie(t)}catch(s){if(s.line!==void 0&&s.col!==void 0){let r=String(s.message).split(`
18
+ `);return D.parse(t)}function Le(e){return D.stringify(e)}var z=G(Me(),1),$=class extends Error{constructor(t,s){super(s),this.name="TomlFileError",this.path=t}},Ue=class e{static async read(t){if(!await j(t))throw new $(t,`TOML file not found: ${t}`);let s=await w(t),r=new e(t,{});return r.content=r.decode(s),r}constructor(t,s){this.errors=[],this.path=t,this.content=s}async patch(t){let s=Pe(t),r=await w(this.path),i=(0,z.updateTomlValues)(r,s),h=this.decode(i);await R(this.path,i),this.content=h}async remove(t){let s=t.split("."),r=await w(this.path),i=(0,z.updateTomlValues)(r,[[s,void 0]]),h=this.decode(i);await R(this.path,i),this.content=h}async replace(t){let s=Le(t);this.decode(s),await R(this.path,s),this.content=t}async transformRaw(t){let s=await w(this.path),r=t(s),i=this.decode(r);await R(this.path,r),this.content=i}decode(t){try{return Ie(t)}catch(s){if(s.line!==void 0&&s.col!==void 0){let r=String(s.message).split(`
19
19
  `)[0]??"Invalid TOML";throw new $(this.path,`${r} at row ${s.line}, col ${s.col}`)}throw s}}};function Pe(e,t=[]){let s=[];for(let[r,i]of Object.entries(e)){let h=[...t,r];i!==null&&typeof i=="object"&&!Array.isArray(i)?s.push(...Pe(i,h)):s.push([h,i])}return s}export{Me as a,$ as b,Ue as c};
@@ -1,4 +1,4 @@
1
- import{k as w,q as $}from"./chunk-P5COLGHM.js";import{$ as ne,aa as E}from"./chunk-WJQ6EJKD.js";import{r as C}from"./chunk-VGD3F3EE.js";import{b as P}from"./chunk-ZB4OMMAT.js";import{u as S,v as T}from"./chunk-SPDYVDFS.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-U5DLHKFU.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(`
1
+ import{k as w,q as $}from"./chunk-R3AZXNAF.js";import{$ as ne,aa as E}from"./chunk-YJQQ6WNE.js";import{r as C}from"./chunk-54XCZDJR.js";import{b as P}from"./chunk-AK3MADND.js";import{u as S,v as T}from"./chunk-QVLBI5WV.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-YCX775XO.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
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
3
  `)}function se(t){switch(t){case s.Severity.ERROR:return{error:`
4
4
  [error]:`};case s.Severity.WARNING:return{warn:`
@@ -1,4 +1,4 @@
1
- import{a as i}from"./chunk-OCOY5MV2.js";import{r as t}from"./chunk-AKVPUKAT.js";import{b as r}from"./chunk-NHO3LLWK.js";import{u as e}from"./chunk-SPDYVDFS.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var o=class extends r{static{this.summary="Enable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Enable automatic upgrades for Shopify CLI.
1
+ import{a as i}from"./chunk-OCOY5MV2.js";import{r as t}from"./chunk-SLAAB5WQ.js";import{b as r}from"./chunk-WQ3LY4W5.js";import{u as e}from"./chunk-QVLBI5WV.js";import{g as a}from"./chunk-VPRTJUIN.js";a();var o=class extends r{static{this.summary="Enable automatic upgrades for Shopify CLI."}static{this.descriptionWithMarkdown=`Enable automatic upgrades for Shopify CLI.
2
2
 
3
3
  When auto-upgrade is enabled, Shopify CLI automatically updates to the latest version once per day. Major version upgrades are skipped and must be done manually.
4
4