@shopify/cli 4.5.1 → 4.5.2
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.
- package/dist/{analytics-CIKTYXZ6.js → analytics-M7ZU437S.js} +1 -1
- package/dist/{analytics-DM7CBV2M.js → analytics-ZRM4FEOE.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-QMSYJIAU.js → chunk-23LZNWB5.js} +1 -1
- package/dist/{chunk-DE3WCNP6.js → chunk-2ACN7JIZ.js} +1 -1
- package/dist/{chunk-OCYPWE2O.js → chunk-2TJ6LOCC.js} +1 -1
- package/dist/{chunk-MQXSMZQZ.js → chunk-34SINZ7L.js} +1 -1
- package/dist/{chunk-ALQKJAHP.js → chunk-35FS2NTM.js} +1 -1
- package/dist/{chunk-GAYQKMOM.js → chunk-3EJGRQTH.js} +1 -1
- package/dist/{chunk-6Y3QXASG.js → chunk-3IFZECSI.js} +1 -1
- package/dist/{chunk-DQE7XRCK.js → chunk-3OCR7P3S.js} +1 -1
- package/dist/{chunk-XWQ72WTQ.js → chunk-42RVM4EZ.js} +1 -1
- package/dist/{chunk-UZ7U322K.js → chunk-4MLEL3VK.js} +1 -1
- package/dist/{chunk-PTIJDS6I.js → chunk-4P54DKG4.js} +1 -1
- package/dist/chunk-4ROX2TCK.js +1 -0
- package/dist/{chunk-P6S5YLOP.js → chunk-4UJNCOE6.js} +1 -1
- package/dist/{chunk-COTYR5RC.js → chunk-4VJ5VBSR.js} +1 -1
- package/dist/{chunk-5UXPTCSD.js → chunk-523SJVNT.js} +1 -1
- package/dist/{chunk-M2AS5BWX.js → chunk-5CV7GFWZ.js} +1 -1
- package/dist/{chunk-MKCXLBQ4.js → chunk-5GVE4ILZ.js} +1 -1
- package/dist/{chunk-U7ZRDNZU.js → chunk-5N7H4PJJ.js} +1 -1
- package/dist/{chunk-YJCJDCVP.js → chunk-5VC4XXYH.js} +1 -1
- package/dist/{chunk-ASOT7VNB.js → chunk-5VRU3BT5.js} +1 -1
- package/dist/{chunk-OVLTFTZW.js → chunk-6AWRW3GS.js} +1 -1
- package/dist/{chunk-CGULQAB5.js → chunk-6K4DVV37.js} +1 -1
- package/dist/{chunk-QDYDB7DY.js → chunk-6VR22Z5R.js} +1 -1
- package/dist/{chunk-7ZLKT2TB.js → chunk-6ZWMXMNM.js} +1 -1
- package/dist/{chunk-VSZS3FAJ.js → chunk-75DBVSVI.js} +1 -1
- package/dist/{chunk-3QVXHF6I.js → chunk-7AY6HLQG.js} +1 -1
- package/dist/{chunk-H7DDRARV.js → chunk-7AYYQUJG.js} +1 -1
- package/dist/{chunk-ZHPXJRHR.js → chunk-7KWBVZPI.js} +1 -1
- package/dist/{chunk-5JCREGSD.js → chunk-7PVNAILK.js} +1 -1
- package/dist/{chunk-3SJHCEQR.js → chunk-7RJPTSL6.js} +1 -1
- package/dist/{chunk-72K36DID.js → chunk-7TQ6HVHN.js} +1 -1
- package/dist/{chunk-MOCD7GFI.js → chunk-AAK3WGD7.js} +1 -1
- package/dist/{chunk-XU6CCL4P.js → chunk-AATUQ2AY.js} +2 -2
- package/dist/{chunk-VHAZBDFE.js → chunk-ADKFAPED.js} +1 -1
- package/dist/{chunk-IIHPONSQ.js → chunk-ANH2V6DJ.js} +1 -1
- package/dist/{chunk-ZVQBSXE4.js → chunk-AUAUAK6P.js} +1 -1
- package/dist/chunk-B5MFFERE.js +1 -0
- package/dist/{chunk-AH2ZJ73H.js → chunk-BLSWUNOK.js} +1 -1
- package/dist/{chunk-E7OLCSAL.js → chunk-BQARKSGG.js} +1 -1
- package/dist/{chunk-BVFIJSD7.js → chunk-BUVP2UUA.js} +1 -1
- package/dist/{chunk-RIRSTGFU.js → chunk-BVWQZKNK.js} +1 -1
- package/dist/{chunk-NGPJXONG.js → chunk-CEBDKIVH.js} +1 -1
- package/dist/{chunk-UHJ65YFN.js → chunk-CX44CQFL.js} +1 -1
- package/dist/{chunk-UB5BVO76.js → chunk-DELISRUH.js} +1 -1
- package/dist/{chunk-6XLVKD6Q.js → chunk-DI5ZPWNA.js} +1 -1
- package/dist/{chunk-JO4ZHVOD.js → chunk-DIPTSBQM.js} +1 -1
- package/dist/{chunk-5NY4HKJF.js → chunk-DN3BB4IO.js} +2 -2
- package/dist/{chunk-RFDT525K.js → chunk-DZMXYETH.js} +1 -1
- package/dist/{chunk-DKKBJ4H5.js → chunk-EAOT5CK5.js} +1 -1
- package/dist/{chunk-E24W34C4.js → chunk-EEEKSYWV.js} +1 -1
- package/dist/{chunk-GXUZ3V7S.js → chunk-EOJNSPIH.js} +1 -1
- package/dist/{chunk-GQG6WELZ.js → chunk-FSVSM57K.js} +1 -1
- package/dist/{chunk-HXYWEKMS.js → chunk-G6BFXMOV.js} +1 -1
- package/dist/{chunk-DA4LHFJQ.js → chunk-GMAZ2BQY.js} +1 -1
- package/dist/{chunk-DDVT2K7E.js → chunk-HOAVZLEG.js} +1 -1
- package/dist/{chunk-EDSKA6UB.js → chunk-HQE5B2CF.js} +1 -1
- package/dist/{chunk-KOB6T6NK.js → chunk-HSVZU7MP.js} +1 -1
- package/dist/{chunk-5PLLJPEW.js → chunk-HYF3VJYS.js} +1 -1
- package/dist/{chunk-5T3OVTF5.js → chunk-I5X3IP6T.js} +1 -1
- package/dist/{chunk-5U6MXSNY.js → chunk-ICRQZAXP.js} +1 -1
- package/dist/{chunk-ELIH6GCC.js → chunk-IIFRDOYG.js} +1 -1
- package/dist/{chunk-GKQ6CSJZ.js → chunk-JADXT2DY.js} +1 -1
- package/dist/{chunk-KC2TN7AR.js → chunk-JOKLZMTP.js} +1 -1
- package/dist/{chunk-BEXQB4RT.js → chunk-K4APB7O3.js} +1 -1
- package/dist/{chunk-SKM44SK5.js → chunk-KB6H5LQJ.js} +1 -1
- package/dist/{chunk-SRAHMYWJ.js → chunk-KFUOVO3X.js} +1 -1
- package/dist/{chunk-Q2X7IXPQ.js → chunk-KIAMA3L2.js} +1 -1
- package/dist/{chunk-KOUKBXOZ.js → chunk-KMQE7WFZ.js} +1 -1
- package/dist/{chunk-WO5YOBQ7.js → chunk-KPNNGJAW.js} +1 -1
- package/dist/{chunk-2WDKXDFM.js → chunk-KQTVJMV6.js} +1 -1
- package/dist/{chunk-QPJQ67GU.js → chunk-L42FYXFW.js} +144 -144
- package/dist/{chunk-PGKP7W5T.js → chunk-LGFOE4XL.js} +1 -1
- package/dist/{chunk-BZAZMLII.js → chunk-LSCDB36D.js} +1 -1
- package/dist/{chunk-ZNWFTUFV.js → chunk-LVLDPYH5.js} +1 -1
- package/dist/{chunk-O2PI2PYG.js → chunk-LXOBFJZO.js} +1 -1
- package/dist/{chunk-PGN5EZTI.js → chunk-MC466GSO.js} +2 -2
- package/dist/{chunk-TXJEP4FB.js → chunk-ML6SILEL.js} +1 -1
- package/dist/{chunk-EAXEV45I.js → chunk-MYQTAM77.js} +1 -1
- package/dist/{chunk-YBFCDINU.js → chunk-N6IFIMC6.js} +1 -1
- package/dist/{chunk-Q6LCSRIW.js → chunk-NGCPVRDM.js} +1 -1
- package/dist/{chunk-YYHCPLBX.js → chunk-NIVGP4LB.js} +1 -1
- package/dist/{chunk-IHUCBI6L.js → chunk-NSADN5S2.js} +1 -1
- package/dist/{chunk-FO6FNY6P.js → chunk-NVA2354A.js} +1 -1
- package/dist/{chunk-AI756VJI.js → chunk-NWH3TAHK.js} +1 -1
- package/dist/{chunk-MMKBIMMC.js → chunk-NYG2VQFQ.js} +1 -1
- package/dist/{chunk-JNEGEJH6.js → chunk-OC5PD4ID.js} +1 -1
- package/dist/{chunk-G7QLHXVA.js → chunk-OCBGHOH2.js} +1 -1
- package/dist/{chunk-3YCTWCHH.js → chunk-ODSMT2ZC.js} +1 -1
- package/dist/{chunk-T5DF2GGD.js → chunk-OJZT3NA2.js} +1 -1
- package/dist/{chunk-DCUAVLTM.js → chunk-OMXKQY2L.js} +1 -1
- package/dist/{chunk-O7MONSF7.js → chunk-P2SBE77Z.js} +1 -1
- package/dist/{chunk-APYASWBA.js → chunk-P6LVSNTT.js} +1 -1
- package/dist/{chunk-CNOL26GA.js → chunk-P7OSUECN.js} +1 -1
- package/dist/chunk-P7U6BWKN.js +1 -0
- package/dist/{chunk-3GMW7IEC.js → chunk-PEYYIWP6.js} +2 -2
- package/dist/{chunk-MCATVWHC.js → chunk-Q7DSLGTN.js} +1 -1
- package/dist/{chunk-4TC4M4RC.js → chunk-QEVGRNUE.js} +1 -1
- package/dist/{chunk-HHSUBF73.js → chunk-QFXJNFMI.js} +1 -1
- package/dist/{chunk-IBBFRL3Y.js → chunk-R6A754UW.js} +1 -1
- package/dist/{chunk-IRH6IGFT.js → chunk-R7QYSC6T.js} +1 -1
- package/dist/{chunk-JOYM7AEQ.js → chunk-RE652L3G.js} +1 -1
- package/dist/{chunk-6ZMNEURG.js → chunk-RFOALCVH.js} +1 -1
- package/dist/{chunk-5K4DONQJ.js → chunk-RLB5QHWG.js} +1 -1
- package/dist/{chunk-UYNCJGMC.js → chunk-RTINXD5Z.js} +1 -1
- package/dist/{chunk-XH5FCMS5.js → chunk-SG5TRPJ7.js} +1 -1
- package/dist/{chunk-NV5IDANV.js → chunk-SH6Q5CLM.js} +1 -1
- package/dist/{chunk-VRRDIXFQ.js → chunk-SSDEWKDZ.js} +1 -1
- package/dist/{chunk-JCNRQYRP.js → chunk-SZM6ANMN.js} +1 -1
- package/dist/{chunk-Q2UHGP2Z.js → chunk-T35C6NC7.js} +1 -1
- package/dist/{chunk-EYDNSYYE.js → chunk-TB7HFPBB.js} +2 -2
- package/dist/{chunk-SFMXFH33.js → chunk-TH6CLNGO.js} +1 -1
- package/dist/{chunk-2HZMOK4U.js → chunk-TIU7MMRT.js} +2 -2
- package/dist/{chunk-OASPW2P2.js → chunk-TM44Z7U7.js} +1 -1
- package/dist/{chunk-ICFFBMFB.js → chunk-TNUY66EE.js} +1 -1
- package/dist/{chunk-2GDACKZF.js → chunk-TPGREOWO.js} +1 -1
- package/dist/{chunk-2MNOWKMI.js → chunk-TSEPNC3O.js} +1 -1
- package/dist/{chunk-IRTCLR3F.js → chunk-TTEY5PLR.js} +1 -1
- package/dist/{chunk-EXQXGSGY.js → chunk-U3MSTPZP.js} +1 -1
- package/dist/{chunk-N5HGT3TE.js → chunk-U4HLIXRH.js} +1 -1
- package/dist/{chunk-IDKUJQIG.js → chunk-UAYIFFYJ.js} +3 -3
- package/dist/chunk-UHIP5CFI.js +1 -0
- package/dist/{chunk-MYQQOOGA.js → chunk-UHMRDG6J.js} +1 -1
- package/dist/{chunk-TDCY3BRI.js → chunk-UMB4BWCK.js} +1 -1
- package/dist/{chunk-2FIDORHT.js → chunk-UMFVRG33.js} +1 -1
- package/dist/{chunk-FPCPFECH.js → chunk-UVIGXZMV.js} +1 -1
- package/dist/{chunk-QPY6WJTT.js → chunk-UW6YEKST.js} +1 -1
- package/dist/{chunk-U2LQBJJL.js → chunk-V6QZF5YS.js} +1 -1
- package/dist/{chunk-TDSR2X7X.js → chunk-VCWESQBC.js} +1 -1
- package/dist/{chunk-QVYZZNAS.js → chunk-VGSH33QU.js} +1 -1
- package/dist/{chunk-7XQDZF73.js → chunk-VJQJ5PTQ.js} +1 -1
- package/dist/{chunk-AVMNXIXF.js → chunk-WDSBR7KX.js} +1 -1
- package/dist/{chunk-H7PNMMDO.js → chunk-WN5VTUWJ.js} +1 -1
- package/dist/{chunk-7USHLXEN.js → chunk-WTRKTFVE.js} +1 -1
- package/dist/{chunk-OHASEW7T.js → chunk-X3VG75LO.js} +1 -1
- package/dist/{chunk-YZY4M6IH.js → chunk-XCGV3IJ5.js} +1 -1
- package/dist/{chunk-XDEAZP2I.js → chunk-XDV4PRFT.js} +1 -1
- package/dist/{chunk-KHXDP3SF.js → chunk-XHTICMA7.js} +1 -1
- package/dist/{chunk-WIXW233Y.js → chunk-XS7WK4YK.js} +1 -1
- package/dist/{chunk-ZDQNCYRH.js → chunk-XSUZPWYV.js} +1 -1
- package/dist/{chunk-T3AJL2M5.js → chunk-XUAAQI5N.js} +1 -1
- package/dist/{chunk-ODH2U44N.js → chunk-XXLGM6OZ.js} +1 -1
- package/dist/{chunk-TVU4YD2H.js → chunk-YKNMNGV7.js} +1 -1
- package/dist/{chunk-FOPGI6GO.js → chunk-YNX4DT2O.js} +1 -1
- package/dist/{chunk-WMDYHUPS.js → chunk-YWQPSMRZ.js} +1 -1
- package/dist/{chunk-C5U4NLNU.js → chunk-YXNKDX56.js} +1 -1
- package/dist/{chunk-4E354M4H.js → chunk-Z33MWGCG.js} +1 -1
- package/dist/{chunk-JVMYTC3J.js → chunk-Z6VNPAY7.js} +1 -1
- package/dist/{chunk-IQYZAALJ.js → chunk-ZAN7AZTX.js} +1 -1
- package/dist/{chunk-IOU6EKTT.js → chunk-ZIM2G3EP.js} +1 -1
- package/dist/{chunk-H3QZN45D.js → chunk-ZSYMRT3S.js} +1 -1
- package/dist/{chunk-LUG2BZJP.js → chunk-ZT4PUH7L.js} +1 -1
- package/dist/{chunk-DU5LZYQX.js → chunk-ZUWEGJA7.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-OC4XCP45.js → conf-store-HOA62HKK.js} +1 -1
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/data/filters.json +1 -1
- package/dist/data/objects.json +30 -3
- package/dist/data/shopify_system_translations.json +48 -4
- package/dist/{deprecations-M5JGGK47.js → deprecations-2FTB7JEW.js} +1 -1
- package/dist/{dist-Z4H2OM7V.js → dist-63JMGNUL.js} +1 -1
- package/dist/dist-6TY6L7OW.js +1 -0
- package/dist/{environments-ZLSO534C.js → environments-XVYTKHRZ.js} +1 -1
- package/dist/{error-ZBG2MA5U.js → error-SDU6RPQQ.js} +1 -1
- package/dist/{error-handler-MCUV4RZV.js → error-handler-4YEBBCUH.js} +1 -1
- package/dist/{fs-7LCRIUF3.js → fs-B4UJTUCD.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{is-global-RURDJZDU.js → is-global-5LFZDDNH.js} +1 -1
- package/dist/{local-5AKD7T5X.js → local-VTYGIJVD.js} +1 -1
- package/dist/{local-storage-TJU77VRQ.js → local-storage-A6NBLBB2.js} +1 -1
- package/dist/{metadata-D5GLZOLV.js → metadata-FREAI3KR.js} +1 -1
- package/dist/{node-package-manager-FA3Y6DPG.js → node-package-manager-N5SUT2WN.js} +1 -1
- package/dist/notifications-system-P3SUTD25.js +1 -0
- package/dist/{output-FYS764MJ.js → output-VUR2QZPW.js} +1 -1
- package/dist/{system-KDM2BB7R.js → system-OXF2P5CT.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-QIHGXICT.js → ui-N2C5FC3G.js} +1 -1
- package/dist/upgrade-AJ36IT7H.js +1 -0
- package/dist/{version-LULWCT5R.js → version-DSFP332V.js} +1 -1
- package/dist/version-HUOO3XOE.js +1 -0
- package/dist/{workerd-N25GY5MX.js → workerd-KPQTFQD4.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/chunk-6ZRHK4ON.js +0 -1
- package/dist/chunk-J3KRY2SD.js +0 -1
- package/dist/chunk-PGODIZ64.js +0 -1
- package/dist/chunk-YB3SGPFF.js +0 -1
- package/dist/dist-3SP7TISC.js +0 -1
- package/dist/notifications-system-76GJJAJP.js +0 -1
- package/dist/upgrade-DY4L43H4.js +0 -1
- package/dist/version-WIERCO5R.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as ni,A as Wn,Aa as hi,B as k,Ba as gi,C as U,Ca as yi,D as zn,E as ve,F as Zt,G as qe,H as rt,I as xe,Ia as To,J as Jn,Ja as wi,K as Ne,Ka as mr,L as Pe,La as ze,M as Qn,Ma as at,N as er,Na as Pt,O as he,Oa as pr,P as Do,Pa as lt,Q as Kn,Qa as hr,R as ot,Ra as bi,S as nt,Sa as ki,T as Xn,Ta as Ei,U as tr,Ua as gr,V as Zn,Va as Si,W as ei,Wa as xi,X as ti,Xa as Pi,Y as ri,Z as oi,_ as Ye,a as ue,aa as z,b as Et,ba as it,c as Hn,ca as ii,d as Ie,da as si,e as Se,ea as rr,f as Ge,fa as or,g as Mn,ga as ai,h as Un,ha as ge,i as Bn,ia as li,j as ko,ja as ci,k as et,ka as Co,l as St,la as di,m as je,ma as ui,n as Vn,na as fi,o as Qt,oa as nr,p as Eo,pa as ir,q as xt,qa as sr,r as So,ra as mi,s as Gn,sa as ar,t as qn,ta as lr,u as xo,ua as pi,v as Yn,va as cr,w as Po,wa as dr,x as Kt,xa as We,y as Xt,ya as st,z as tt,za as ur}from"./chunk-IHUCBI6L.js";import{b as vi}from"./chunk-XWPPBOGF.js";import{a as yr}from"./chunk-FKIVKNOV.js";import{a as _n}from"./chunk-KRZABRYT.js";import{a as Di}from"./chunk-6XLVKD6Q.js";import{b as Rn,c as $n,d as Jt,g as An,i as Fn,j as jn,k as Nn}from"./chunk-VSZS3FAJ.js";import{a as pl,b as Ln,d as hl}from"./chunk-JVMYTC3J.js";import{a as fr,b as Io,c as Oo}from"./chunk-MQXSMZQZ.js";import{c as On}from"./chunk-F3TMLDLC.js";import{Aa as ul,Ba as Dn,Ca as fl,Da as ml,fa as pe,m as vn,n as ae}from"./chunk-2HZMOK4U.js";import{B as Pn,l as kn,m as Ee,p as Yt,s as En,u as Sn,x as xn}from"./chunk-VRRDIXFQ.js";import{b as O}from"./chunk-IDKUJQIG.js";import{b as wn}from"./chunk-5C7HDTHJ.js";import{A as Te,D as ee,O as bo,a as qt,u as B,v as N,w as Y,x as Cn,y as Re,z as $e}from"./chunk-E24W34C4.js";import{d as E,g as Wt}from"./chunk-ELIH6GCC.js";import{$ as pn,Bb as bn,Ca as yo,Ea as Vt,Fb as we,Ga as gn,Ha as yn,Hb as W,Jb as Ae,Ka as wo,Mb as F,Nb as Tn,Oa as vo,Ob as Fe,Pb as In,Qb as V,Rb as te,Ta as G,V as Ut,Wa as kt,ma as de,na as hn,pa as Bt,qa as go,qb as Gt,ua as K,wa as bt,ya as ke}from"./chunk-EYDNSYYE.js";import{u as H}from"./chunk-A4SBXDZB.js";import{s as zt}from"./chunk-JCNRQYRP.js";import{d as x,f as T,g as se,i as ho,j as Ze,k as fn,q as mn}from"./chunk-773TIA5M.js";import{a as cl}from"./chunk-CX5CC6P5.js";import{b as dl}from"./chunk-TOLPNBZK.js";import{a as be,c as ce,e as Q,g as l}from"./chunk-VKWPEFWQ.js";var Ys=ce((Xw,qs)=>{l();qs.exports=Jc;function Jc(e){var t=e._readableState;return t?t.objectMode||typeof e._duplexState=="number"?e.read():e.read(Qc(t)):null}function Qc(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}});var qo=ce((ev,Qs)=>{l();var Yr=Ln(),Ws=Dn(),Kc=On(),Xc=Ys(),zs=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),Go=function(e,t){e._corked?e.once("uncork",t):t()},Zc=function(e,t){e._autoDestroy&&e.destroy(t)},Js=function(e,t){return function(r){r?Zc(e,r.message==="premature close"?null:r):t&&!e._ended&&e.end()}},ed=function(e,t){if(!e||e._writableState&&e._writableState.finished)return t();if(e._writableState)return e.end(t);e.end(),t()},td=function(e){return new Yr.Readable({objectMode:!0,highWaterMark:16}).wrap(e)},X=function(e,t,r){if(!(this instanceof X))return new X(e,t,r);Yr.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};Kc(X,Yr.Duplex);X.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new X(e,t,r)};X.prototype.cork=function(){++this._corked===1&&this.emit("cork")};X.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};X.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.end();return}var t=this,r=Ws(e,{writable:!0,readable:!1},Js(this,this._forwardEnd)),o=function(){var i=t._ondrain;t._ondrain=null,i&&i()},n=function(){t._writable.removeListener("drain",o),r()};this._unwrite&&process.nextTick(o),this._writable=e,this._writable.on("drain",o),this._unwrite=n,this.uncork()};X.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.push(null),this.resume();return}var t=this,r=Ws(e,{writable:!1,readable:!0},Js(this)),o=function(){t._forward()},n=function(){t.push(null)},i=function(){t._readable2.removeListener("readable",o),t._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:td(e),this._readable2.on("readable",o),this._readable2.on("end",n),this._unread=i,this._forward()};X.prototype._read=function(){this._drained=!0,this._forward()};X.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var e;this._drained&&(e=Xc(this._readable2))!==null;)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}};X.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;process.nextTick(function(){t._destroy(e)})}};X.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};X.prototype._write=function(e,t,r){if(this.destroyed)return r();if(this._corked)return Go(this,this._write.bind(this,e,t,r));if(e===zs)return this._finish(r);if(!this._writable)return r();this._writable.write(e)===!1?this._ondrain=r:r()};X.prototype._finish=function(e){var t=this;this.emit("preend"),Go(this,function(){ed(t._forwardEnd&&t._writable,function(){t._writableState.prefinished===!1&&(t._writableState.prefinished=!0),t.emit("prefinish"),Go(t,e)})})};X.prototype.end=function(e,t,r){return typeof e=="function"?this.end(null,null,e):typeof t=="function"?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(zs),Yr.Writable.prototype.end.call(this,r))};Qs.exports=X});var Xs=ce((rv,Ks)=>{l();Ks.exports=od;var rd=Object.prototype.hasOwnProperty;function od(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)rd.call(r,o)&&(e[o]=r[o])}return e}});var Wo=ce((nv,Wr)=>{l();var Zs=Ln().Transform,ea=be("util").inherits,ta=Xs();function gt(e){Zs.call(this,e),this._destroyed=!1}ea(gt,Zs);gt.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}};function nd(e,t,r){r(null,e)}function Yo(e){return function(t,r,o){return typeof t=="function"&&(o=r,r=t,t={}),typeof r!="function"&&(r=nd),typeof o!="function"&&(o=null),e(t,r,o)}}Wr.exports=Yo(function(e,t,r){var o=new gt(e);return o._transform=t,r&&(o._flush=r),o});Wr.exports.ctor=Yo(function(e,t,r){function o(n){if(!(this instanceof o))return new o(n);this.options=ta(e,n),gt.call(this,this.options)}return ea(o,gt),o.prototype._transform=t,r&&(o.prototype._flush=r),o});Wr.exports.obj=Yo(function(e,t,r){var o=new gt(ta({objectMode:!0,highWaterMark:16},e));return o._transform=t,r&&(o._flush=r),o})});var na=ce((sv,oa)=>{l();var id=qo(),sd=Wo(),ad=dl(),ld=function(e){return!Buffer.isBuffer(e)&&typeof e!="string"},ra=function(e,t){if(typeof e=="number"&&(e={maxBuffer:e}),typeof e=="function")return ra(null,e);e||(e={});var r=typeof e.maxBuffer=="number"?e.maxBuffer:65535,o=e.strict,n=e.newline!==!1,i=[],s=0,a=id.obj(),c=sd.obj({highWaterMark:1},function(f,m,p){if(ld(f))return u(f,null,p);if(Buffer.isBuffer(f)||(f=ad(f)),n){var h=Array.prototype.indexOf.call(f,10);if(h>0&&f[h-1]===13&&h--,h>-1)return i.push(f.slice(0,h)),u(Buffer.concat(i),f.slice(h),p)}if(i.push(f),s+=f.length,s<r)return p();if(o)return p(new Error("No newline found"));u(Buffer.concat(i),null,p)}),d=function(){if(o)return a.destroy(new Error("No newline found"));a.cork(),u(Buffer.concat(i),null,function(f){if(f)return a.destroy(f);a.uncork()})},u=function(f,m,p){a.removeListener("preend",d),t(f,function(h,y){if(h)return p(h);a.setWritable(y),a.setReadable(y),f&&y.write(f),m&&y.write(m),m=i=c=null,p()})};return a.on("preend",d),a.setWritable(c),a};oa.exports=ra});var aa=ce((lv,sa)=>{l();var cd=ul(),dd=Dn(),zo=be("fs"),Ft=function(){},ud=/^v?\.0/.test(process.version),zr=function(e){return typeof e=="function"},fd=function(e){return!ud||!zo?!1:(e instanceof(zo.ReadStream||Ft)||e instanceof(zo.WriteStream||Ft))&&zr(e.close)},md=function(e){return e.setHeader&&zr(e.abort)},pd=function(e,t,r,o){o=cd(o);var n=!1;e.on("close",function(){n=!0}),dd(e,{readable:t,writable:r},function(s){if(s)return o(s);n=!0,o()});var i=!1;return function(s){if(!n&&!i){if(i=!0,fd(e))return e.close(Ft);if(md(e))return e.abort();if(zr(e.destroy))return e.destroy();o(s||new Error("stream was destroyed"))}}},ia=function(e){e()},hd=function(e,t){return e.pipe(t)},gd=function(){var e=Array.prototype.slice.call(arguments),t=zr(e[e.length-1]||Ft)&&e.pop()||Ft;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(n,i){var s=i<e.length-1,a=i>0;return pd(n,s,a,function(c){r||(r=c),c&&o.forEach(ia),!s&&(o.forEach(ia),t(r))})});e.reduce(hd)};sa.exports=gd});var da=ce((dv,Jr)=>{l();var yd=aa(),wd=On(),la=qo(),ca=function(e){return e.length?Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e):[]},Jo=function(e){var t=function(){var r=ca(arguments);if(!(this instanceof t))return new t(r);la.call(this,null,null,e),r.length&&this.setPipeline(r)};return wd(t,la),t.prototype.setPipeline=function(){var r=ca(arguments),o=this,n=!1,i=r[0],s=r[r.length-1];s=s.readable?s:null,i=i.writable?i:null;var a=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){n||o.cork()}),yd(r,function(c){if(o.removeListener("close",a),c)return o.destroy(c.message==="premature close"?null:c);n=!0,o._autoDestroy===!1&&(o._autoDestroy=!0),o.uncork()}),this.destroyed)return a();this.setWritable(i),this.setReadable(s)},t};Jr.exports=Jo({autoDestroy:!1,destroy:!1});Jr.exports.obj=Jo({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});Jr.exports.ctor=Jo});var fa=ce((fv,ua)=>{"use strict";l();ua.exports=function(e){return!e||e.length<3?!1:e[0]===31&&e[1]===139&&e[2]===8}});var pa=ce((pv,ma)=>{"use strict";l();ma.exports=function(e){return!e||e.length<2?!1:e[0]===120&&(e[1]===1||e[1]===156||e[1]===218)}});var wa=ce((gv,ya)=>{l();var ha=be("zlib"),vd=na(),bd=Wo(),ga=da(),kd=fa(),Ed=pa(),Sd=function(e){return kd(e)?1:Ed(e)?2:0},Qo=function(e){return e===void 0&&(e=3),vd({newline:!1,maxBuffer:10},function(t,r){if(e<0)return r(new Error("Maximum recursion reached"));switch(Sd(t)){case 1:r(null,ga(ha.createGunzip(),Qo(e-1)));break;case 2:r(null,ga(ha.createInflate(),Qo(e-1)));break;default:r(null,bd())}})};ya.exports=Qo});var Pa=ce((wv,xa)=>{"use strict";l();var ye=be("fs"),Ke=be("path"),xd=ye.lchown?"lchown":"chown",Pd=ye.lchownSync?"lchownSync":"chownSync",ba=ye.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),va=(e,t,r)=>{try{return ye[Pd](e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Dd=(e,t,r)=>{try{return ye.chownSync(e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Cd=ba?(e,t,r,o)=>n=>{!n||n.code!=="EISDIR"?o(n):ye.chown(e,t,r,o)}:(e,t,r,o)=>o,Ko=ba?(e,t,r)=>{try{return va(e,t,r)}catch(o){if(o.code!=="EISDIR")throw o;Dd(e,t,r)}}:(e,t,r)=>va(e,t,r),Td=process.version,ka=(e,t,r)=>ye.readdir(e,t,r),Id=(e,t)=>ye.readdirSync(e,t);/^v4\./.test(Td)&&(ka=(e,t,r)=>ye.readdir(e,r));var Qr=(e,t,r,o)=>{ye[xd](e,t,r,Cd(e,t,r,n=>{o(n&&n.code!=="ENOENT"?n:null)}))},Ea=(e,t,r,o,n)=>{if(typeof t=="string")return ye.lstat(Ke.resolve(e,t),(i,s)=>{if(i)return n(i.code!=="ENOENT"?i:null);s.name=t,Ea(e,s,r,o,n)});if(t.isDirectory())Xo(Ke.resolve(e,t.name),r,o,i=>{if(i)return n(i);let s=Ke.resolve(e,t.name);Qr(s,r,o,n)});else{let i=Ke.resolve(e,t.name);Qr(i,r,o,n)}},Xo=(e,t,r,o)=>{ka(e,{withFileTypes:!0},(n,i)=>{if(n){if(n.code==="ENOENT")return o();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return o(n)}if(n||!i.length)return Qr(e,t,r,o);let s=i.length,a=null,c=d=>{if(!a){if(d)return o(a=d);if(--s===0)return Qr(e,t,r,o)}};i.forEach(d=>Ea(e,d,t,r,c))})},Od=(e,t,r,o)=>{if(typeof t=="string")try{let n=ye.lstatSync(Ke.resolve(e,t));n.name=t,t=n}catch(n){if(n.code==="ENOENT")return;throw n}t.isDirectory()&&Sa(Ke.resolve(e,t.name),r,o),Ko(Ke.resolve(e,t.name),r,o)},Sa=(e,t,r)=>{let o;try{o=Id(e,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return Ko(e,t,r);throw n}return o&&o.length&&o.forEach(n=>Od(e,n,t,r)),Ko(e,t,r)};xa.exports=Xo;Xo.sync=Sa});var Ia=ce((bv,Ta)=>{l();var Kr=be("path"),Da=be("fs"),Ca=parseInt("0777",8);Ta.exports=yt.mkdirp=yt.mkdirP=yt;function yt(e,t,r,o){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var n=t.mode,i=t.fs||Da;n===void 0&&(n=Ca&~process.umask()),o||(o=null);var s=r||function(){};e=Kr.resolve(e),i.mkdir(e,n,function(a){if(!a)return o=o||e,s(null,o);a.code==="ENOENT"?yt(Kr.dirname(e),t,function(c,d){c?s(c,d):yt(e,t,s,d)}):i.stat(e,function(c,d){c||!d.isDirectory()?s(a,o):s(null,o)})})}yt.sync=function e(t,r,o){(!r||typeof r!="object")&&(r={mode:r});var n=r.mode,i=r.fs||Da;n===void 0&&(n=Ca&~process.umask()),o||(o=null),t=Kr.resolve(t);try{i.mkdirSync(t,n),o=o||t}catch(a){switch(a.code){case"ENOENT":o=e(Kr.dirname(t),r,o),e(t,r,o);break;default:var s;try{s=i.statSync(t)}catch{throw a}if(!s.isDirectory())throw a;break}}return o}});var La=ce(tn=>{l();var _d=Pa(),Ra=hl(),$a=fl(),Rd=Ia(),Aa=be("fs"),Z=be("path"),$d=be("os"),jt=$d.platform()==="win32",Nt=function(){},en=function(e){return e},Zo=jt?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:en,Ad=function(e,t,r,o,n,i){var s=n||["."];return function(c){if(!s.length)return c();var d=s.shift(),u=Z.join(r,d);t.call(e,u,function(f,m){if(f)return c(f);if(!m.isDirectory())return c(null,d,m);e.readdir(u,function(p,h){if(p)return c(p);i&&h.sort();for(var y=0;y<h.length;y++)o(Z.join(r,d,h[y]))||s.push(Z.join(d,h[y]));c(null,d,m)})})}},Fa=function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var o=r.linkname;return o&&(r.type==="link"||Z.isAbsolute(o))&&(r.linkname=o.split("/").slice(t).join("/")),e(r)}};tn.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||Aa,o=t.ignore||t.filter||Nt,n=t.map||Nt,i=t.mapStream||en,s=Ad(r,t.dereference?r.stat:r.lstat,e,o,t.entries,t.sort),a=t.strict!==!1,c=typeof t.umask=="number"?~t.umask:~ja(),d=typeof t.dmode=="number"?t.dmode:0,u=typeof t.fmode=="number"?t.fmode:0,f=t.pack||Ra.pack(),m=t.finish||Nt;t.strip&&(n=Fa(n,t.strip)),t.readable&&(d|=parseInt(555,8),u|=parseInt(444,8)),t.writable&&(d|=parseInt(333,8),u|=parseInt(222,8));var p=function(b,w){r.readlink(Z.join(e,b),function(g,v){if(g)return f.destroy(g);w.linkname=Zo(v),f.entry(w,y)})},h=function(b,w,g){if(b)return f.destroy(b);if(!w)return t.finalize!==!1&&f.finalize(),m(f);if(g.isSocket())return y();var v={name:Zo(w),mode:(g.mode|(g.isDirectory()?d:u))&c,mtime:g.mtime,size:g.size,type:"file",uid:g.uid,gid:g.gid};if(g.isDirectory())return v.size=0,v.type="directory",v=n(v)||v,f.entry(v,y);if(g.isSymbolicLink())return v.size=0,v.type="symlink",v=n(v)||v,p(w,v);if(v=n(v)||v,!g.isFile())return a?f.destroy(new Error("unsupported type for "+w)):y();var S=f.entry(v,y);if(S){var P=i(r.createReadStream(Z.join(e,w),{start:0,end:v.size>0?v.size-1:v.size}),v);P.on("error",function(C){S.destroy(C)}),$a(P,S)}},y=function(b){if(b)return f.destroy(b);s(h)};return y(),f};var Fd=function(e){return e.length?e[e.length-1]:null},jd=function(){return process.getuid?process.getuid():-1},ja=function(){return process.umask?process.umask():0};tn.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||Aa,o=t.ignore||t.filter||Nt,n=t.map||Nt,i=t.mapStream||en,s=t.chown!==!1&&!jt&&jd()===0,a=t.extract||Ra.extract(),c=[],d=new Date,u=typeof t.umask=="number"?~t.umask:~ja(),f=typeof t.dmode=="number"?t.dmode:0,m=typeof t.fmode=="number"?t.fmode:0,p=t.strict!==!1;t.strip&&(n=Fa(n,t.strip)),t.readable&&(f|=parseInt(555,8),m|=parseInt(444,8)),t.writable&&(f|=parseInt(333,8),m|=parseInt(222,8));var h=function(w,g){for(var v;(v=Fd(c))&&w.slice(0,v[0].length)!==v[0];)c.pop();if(!v)return g();r.utimes(v[0],d,v[1],g)},y=function(w,g,v){if(t.utimes===!1)return v();if(g.type==="directory")return r.utimes(w,d,g.mtime,v);if(g.type==="symlink")return h(w,v);r.utimes(w,d,g.mtime,function(S){if(S)return v(S);h(w,v)})},b=function(w,g,v){var S=g.type==="symlink",P=S?r.lchmod:r.chmod,C=S?r.lchown:r.chown;if(!P)return v();var D=(g.mode|(g.type==="directory"?f:m))&u;C&&s?C.call(r,w,g.uid,g.gid,R):R(null);function R($){if($)return v($);if(!P)return v();P.call(r,w,D,v)}};return a.on("entry",function(w,g,v){w=n(w)||w,w.name=Zo(w.name);var S=Z.join(e,Z.join("/",w.name));if(o(S,w))return g.resume(),v();var P=function(I){if(I)return v(I);y(S,w,function(_){if(_)return v(_);if(jt)return v();b(S,w,v)})},C=function(){if(jt)return v();r.unlink(S,function(){var I=Z.resolve(Z.dirname(S),w.linkname);if(!_a(I,e))return v(new Error(S+" is not a valid symlink"));r.symlink(w.linkname,S,P)})},D=function(){if(jt)return v();r.unlink(S,function(){var I=Z.join(e,Z.join("/",w.linkname));r.realpath(I,function(_,L){if(_||!_a(L,e))return v(new Error(S+" is not a valid hardlink"));r.link(L,S,function(j){if(j&&j.code==="EPERM"&&t.hardlinkAsFilesFallback)return g=r.createReadStream(I),R();P(j)})})})},R=function(){var I=r.createWriteStream(S),_=i(g,w);I.on("error",function(L){_.destroy(L)}),$a(_,I,function(L){if(L)return v(L);I.on("close",P)})};if(w.type==="directory")return c.push([S,w.mtime]),Oa(S,{fs:r,own:s,uid:w.uid,gid:w.gid},P);var $=Z.dirname(S);Na(r,$,Z.join(e,"."),function(I,_){if(I)return v(I);if(!_)return v(new Error($+" is not a valid path"));Oa($,{fs:r,own:s,uid:w.uid,gid:w.gid},function(L){if(L)return v(L);switch(w.type){case"file":return R();case"link":return D();case"symlink":return C()}if(p)return v(new Error("unsupported type for "+S+" ("+w.type+")"));g.resume(),v()})})}),t.finish&&a.on("finish",t.finish),a};function Na(e,t,r,o){if(t===r)return o(null,!0);e.lstat(t,function(n,i){if(n&&n.code!=="ENOENT")return o(n);if(n||i.isDirectory())return Na(e,Z.join(t,".."),r,o);o(null,!1)})}function Oa(e,t,r){Rd(e,{fs:t.fs},function(o,n){!o&&n&&t.own?_d(n,t.uid,t.gid,r):r(o)})}function _a(e,t){return t=Z.resolve(t),t===e||e.startsWith(t+Z.sep)}});l();l();var xr=Q(ue(),1);l();l();var wr=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function gl(e){let t="No lockfile found",r="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",o=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new E(t,r,o);Y({headline:t,body:r,nextSteps:o})}function yl(e,t){let r=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),o="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
|
|
1
|
+
import{$ as ni,A as Wn,Aa as hi,B as k,Ba as gi,C as U,Ca as yi,D as zn,E as ve,F as Zt,G as qe,H as rt,I as xe,Ia as To,J as Jn,Ja as wi,K as Ne,Ka as mr,L as Pe,La as ze,M as Qn,Ma as at,N as er,Na as Pt,O as he,Oa as pr,P as Do,Pa as lt,Q as Kn,Qa as hr,R as ot,Ra as bi,S as nt,Sa as ki,T as Xn,Ta as Ei,U as tr,Ua as gr,V as Zn,Va as Si,W as ei,Wa as xi,X as ti,Xa as Pi,Y as ri,Z as oi,_ as Ye,a as ue,aa as z,b as Et,ba as it,c as Hn,ca as ii,d as Ie,da as si,e as Se,ea as rr,f as Ge,fa as or,g as Mn,ga as ai,h as Un,ha as ge,i as Bn,ia as li,j as ko,ja as ci,k as et,ka as Co,l as St,la as di,m as je,ma as ui,n as Vn,na as fi,o as Qt,oa as nr,p as Eo,pa as ir,q as xt,qa as sr,r as So,ra as mi,s as Gn,sa as ar,t as qn,ta as lr,u as xo,ua as pi,v as Yn,va as cr,w as Po,wa as dr,x as Kt,xa as We,y as Xt,ya as st,z as tt,za as ur}from"./chunk-NSADN5S2.js";import{b as vi}from"./chunk-XWPPBOGF.js";import{a as yr}from"./chunk-FKIVKNOV.js";import{a as _n}from"./chunk-KRZABRYT.js";import{a as Di}from"./chunk-DI5ZPWNA.js";import{b as Rn,c as $n,d as Jt,g as An,i as Fn,j as jn,k as Nn}from"./chunk-75DBVSVI.js";import{a as pl,b as Ln,d as hl}from"./chunk-Z6VNPAY7.js";import{a as fr,b as Io,c as Oo}from"./chunk-34SINZ7L.js";import{c as On}from"./chunk-F3TMLDLC.js";import{Aa as ul,Ba as Dn,Ca as fl,Da as ml,fa as pe,m as vn,n as ae}from"./chunk-TIU7MMRT.js";import{B as Pn,l as kn,m as Ee,p as Yt,s as En,u as Sn,x as xn}from"./chunk-SSDEWKDZ.js";import{b as O}from"./chunk-UAYIFFYJ.js";import{b as wn}from"./chunk-5C7HDTHJ.js";import{A as Te,D as ee,O as bo,a as qt,u as B,v as N,w as Y,x as Cn,y as Re,z as $e}from"./chunk-EEEKSYWV.js";import{d as E,g as Wt}from"./chunk-IIFRDOYG.js";import{$ as pn,Bb as bn,Ca as yo,Ea as Vt,Fb as we,Ga as gn,Ha as yn,Hb as W,Jb as Ae,Ka as wo,Mb as F,Nb as Tn,Oa as vo,Ob as Fe,Pb as In,Qb as V,Rb as te,Ta as G,V as Ut,Wa as kt,ma as de,na as hn,pa as Bt,qa as go,qb as Gt,ua as K,wa as bt,ya as ke}from"./chunk-TB7HFPBB.js";import{u as H}from"./chunk-A4SBXDZB.js";import{s as zt}from"./chunk-SZM6ANMN.js";import{d as x,f as T,g as se,i as ho,j as Ze,k as fn,q as mn}from"./chunk-773TIA5M.js";import{a as cl}from"./chunk-CX5CC6P5.js";import{b as dl}from"./chunk-TOLPNBZK.js";import{a as be,c as ce,e as Q,g as l}from"./chunk-VKWPEFWQ.js";var Ys=ce((Xw,qs)=>{l();qs.exports=Jc;function Jc(e){var t=e._readableState;return t?t.objectMode||typeof e._duplexState=="number"?e.read():e.read(Qc(t)):null}function Qc(e){if(e.buffer.length){var t=e.bufferIndex||0;if(e.buffer.head)return e.buffer.head.data.length;if(e.buffer.length-t>0&&e.buffer[t])return e.buffer[t].length}return e.length}});var qo=ce((ev,Qs)=>{l();var Yr=Ln(),Ws=Dn(),Kc=On(),Xc=Ys(),zs=Buffer.from&&Buffer.from!==Uint8Array.from?Buffer.from([0]):new Buffer([0]),Go=function(e,t){e._corked?e.once("uncork",t):t()},Zc=function(e,t){e._autoDestroy&&e.destroy(t)},Js=function(e,t){return function(r){r?Zc(e,r.message==="premature close"?null:r):t&&!e._ended&&e.end()}},ed=function(e,t){if(!e||e._writableState&&e._writableState.finished)return t();if(e._writableState)return e.end(t);e.end(),t()},td=function(e){return new Yr.Readable({objectMode:!0,highWaterMark:16}).wrap(e)},X=function(e,t,r){if(!(this instanceof X))return new X(e,t,r);Yr.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||r.autoDestroy!==!1,this._forwardDestroy=!r||r.destroy!==!1,this._forwardEnd=!r||r.end!==!1,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,e&&this.setWritable(e),t&&this.setReadable(t)};Kc(X,Yr.Duplex);X.obj=function(e,t,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new X(e,t,r)};X.prototype.cork=function(){++this._corked===1&&this.emit("cork")};X.prototype.uncork=function(){this._corked&&--this._corked===0&&this.emit("uncork")};X.prototype.setWritable=function(e){if(this._unwrite&&this._unwrite(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.end();return}var t=this,r=Ws(e,{writable:!0,readable:!1},Js(this,this._forwardEnd)),o=function(){var i=t._ondrain;t._ondrain=null,i&&i()},n=function(){t._writable.removeListener("drain",o),r()};this._unwrite&&process.nextTick(o),this._writable=e,this._writable.on("drain",o),this._unwrite=n,this.uncork()};X.prototype.setReadable=function(e){if(this._unread&&this._unread(),this.destroyed){e&&e.destroy&&e.destroy();return}if(e===null||e===!1){this.push(null),this.resume();return}var t=this,r=Ws(e,{writable:!1,readable:!0},Js(this)),o=function(){t._forward()},n=function(){t.push(null)},i=function(){t._readable2.removeListener("readable",o),t._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=e,this._readable2=e._readableState?e:td(e),this._readable2.on("readable",o),this._readable2.on("end",n),this._unread=i,this._forward()};X.prototype._read=function(){this._drained=!0,this._forward()};X.prototype._forward=function(){if(!(this._forwarding||!this._readable2||!this._drained)){this._forwarding=!0;for(var e;this._drained&&(e=Xc(this._readable2))!==null;)this.destroyed||(this._drained=this.push(e));this._forwarding=!1}};X.prototype.destroy=function(e){if(!this.destroyed){this.destroyed=!0;var t=this;process.nextTick(function(){t._destroy(e)})}};X.prototype._destroy=function(e){if(e){var t=this._ondrain;this._ondrain=null,t?t(e):this.emit("error",e)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")};X.prototype._write=function(e,t,r){if(this.destroyed)return r();if(this._corked)return Go(this,this._write.bind(this,e,t,r));if(e===zs)return this._finish(r);if(!this._writable)return r();this._writable.write(e)===!1?this._ondrain=r:r()};X.prototype._finish=function(e){var t=this;this.emit("preend"),Go(this,function(){ed(t._forwardEnd&&t._writable,function(){t._writableState.prefinished===!1&&(t._writableState.prefinished=!0),t.emit("prefinish"),Go(t,e)})})};X.prototype.end=function(e,t,r){return typeof e=="function"?this.end(null,null,e):typeof t=="function"?this.end(e,null,t):(this._ended=!0,e&&this.write(e),this._writableState.ending||this.write(zs),Yr.Writable.prototype.end.call(this,r))};Qs.exports=X});var Xs=ce((rv,Ks)=>{l();Ks.exports=od;var rd=Object.prototype.hasOwnProperty;function od(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)rd.call(r,o)&&(e[o]=r[o])}return e}});var Wo=ce((nv,Wr)=>{l();var Zs=Ln().Transform,ea=be("util").inherits,ta=Xs();function gt(e){Zs.call(this,e),this._destroyed=!1}ea(gt,Zs);gt.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var t=this;process.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}};function nd(e,t,r){r(null,e)}function Yo(e){return function(t,r,o){return typeof t=="function"&&(o=r,r=t,t={}),typeof r!="function"&&(r=nd),typeof o!="function"&&(o=null),e(t,r,o)}}Wr.exports=Yo(function(e,t,r){var o=new gt(e);return o._transform=t,r&&(o._flush=r),o});Wr.exports.ctor=Yo(function(e,t,r){function o(n){if(!(this instanceof o))return new o(n);this.options=ta(e,n),gt.call(this,this.options)}return ea(o,gt),o.prototype._transform=t,r&&(o.prototype._flush=r),o});Wr.exports.obj=Yo(function(e,t,r){var o=new gt(ta({objectMode:!0,highWaterMark:16},e));return o._transform=t,r&&(o._flush=r),o})});var na=ce((sv,oa)=>{l();var id=qo(),sd=Wo(),ad=dl(),ld=function(e){return!Buffer.isBuffer(e)&&typeof e!="string"},ra=function(e,t){if(typeof e=="number"&&(e={maxBuffer:e}),typeof e=="function")return ra(null,e);e||(e={});var r=typeof e.maxBuffer=="number"?e.maxBuffer:65535,o=e.strict,n=e.newline!==!1,i=[],s=0,a=id.obj(),c=sd.obj({highWaterMark:1},function(f,m,p){if(ld(f))return u(f,null,p);if(Buffer.isBuffer(f)||(f=ad(f)),n){var h=Array.prototype.indexOf.call(f,10);if(h>0&&f[h-1]===13&&h--,h>-1)return i.push(f.slice(0,h)),u(Buffer.concat(i),f.slice(h),p)}if(i.push(f),s+=f.length,s<r)return p();if(o)return p(new Error("No newline found"));u(Buffer.concat(i),null,p)}),d=function(){if(o)return a.destroy(new Error("No newline found"));a.cork(),u(Buffer.concat(i),null,function(f){if(f)return a.destroy(f);a.uncork()})},u=function(f,m,p){a.removeListener("preend",d),t(f,function(h,y){if(h)return p(h);a.setWritable(y),a.setReadable(y),f&&y.write(f),m&&y.write(m),m=i=c=null,p()})};return a.on("preend",d),a.setWritable(c),a};oa.exports=ra});var aa=ce((lv,sa)=>{l();var cd=ul(),dd=Dn(),zo=be("fs"),Ft=function(){},ud=/^v?\.0/.test(process.version),zr=function(e){return typeof e=="function"},fd=function(e){return!ud||!zo?!1:(e instanceof(zo.ReadStream||Ft)||e instanceof(zo.WriteStream||Ft))&&zr(e.close)},md=function(e){return e.setHeader&&zr(e.abort)},pd=function(e,t,r,o){o=cd(o);var n=!1;e.on("close",function(){n=!0}),dd(e,{readable:t,writable:r},function(s){if(s)return o(s);n=!0,o()});var i=!1;return function(s){if(!n&&!i){if(i=!0,fd(e))return e.close(Ft);if(md(e))return e.abort();if(zr(e.destroy))return e.destroy();o(s||new Error("stream was destroyed"))}}},ia=function(e){e()},hd=function(e,t){return e.pipe(t)},gd=function(){var e=Array.prototype.slice.call(arguments),t=zr(e[e.length-1]||Ft)&&e.pop()||Ft;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(n,i){var s=i<e.length-1,a=i>0;return pd(n,s,a,function(c){r||(r=c),c&&o.forEach(ia),!s&&(o.forEach(ia),t(r))})});e.reduce(hd)};sa.exports=gd});var da=ce((dv,Jr)=>{l();var yd=aa(),wd=On(),la=qo(),ca=function(e){return e.length?Array.isArray(e[0])?e[0]:Array.prototype.slice.call(e):[]},Jo=function(e){var t=function(){var r=ca(arguments);if(!(this instanceof t))return new t(r);la.call(this,null,null,e),r.length&&this.setPipeline(r)};return wd(t,la),t.prototype.setPipeline=function(){var r=ca(arguments),o=this,n=!1,i=r[0],s=r[r.length-1];s=s.readable?s:null,i=i.writable?i:null;var a=function(){r[0].emit("error",new Error("stream was destroyed"))};if(this.on("close",a),this.on("prefinish",function(){n||o.cork()}),yd(r,function(c){if(o.removeListener("close",a),c)return o.destroy(c.message==="premature close"?null:c);n=!0,o._autoDestroy===!1&&(o._autoDestroy=!0),o.uncork()}),this.destroyed)return a();this.setWritable(i),this.setReadable(s)},t};Jr.exports=Jo({autoDestroy:!1,destroy:!1});Jr.exports.obj=Jo({autoDestroy:!1,destroy:!1,objectMode:!0,highWaterMark:16});Jr.exports.ctor=Jo});var fa=ce((fv,ua)=>{"use strict";l();ua.exports=function(e){return!e||e.length<3?!1:e[0]===31&&e[1]===139&&e[2]===8}});var pa=ce((pv,ma)=>{"use strict";l();ma.exports=function(e){return!e||e.length<2?!1:e[0]===120&&(e[1]===1||e[1]===156||e[1]===218)}});var wa=ce((gv,ya)=>{l();var ha=be("zlib"),vd=na(),bd=Wo(),ga=da(),kd=fa(),Ed=pa(),Sd=function(e){return kd(e)?1:Ed(e)?2:0},Qo=function(e){return e===void 0&&(e=3),vd({newline:!1,maxBuffer:10},function(t,r){if(e<0)return r(new Error("Maximum recursion reached"));switch(Sd(t)){case 1:r(null,ga(ha.createGunzip(),Qo(e-1)));break;case 2:r(null,ga(ha.createInflate(),Qo(e-1)));break;default:r(null,bd())}})};ya.exports=Qo});var Pa=ce((wv,xa)=>{"use strict";l();var ye=be("fs"),Ke=be("path"),xd=ye.lchown?"lchown":"chown",Pd=ye.lchownSync?"lchownSync":"chownSync",ba=ye.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),va=(e,t,r)=>{try{return ye[Pd](e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Dd=(e,t,r)=>{try{return ye.chownSync(e,t,r)}catch(o){if(o.code!=="ENOENT")throw o}},Cd=ba?(e,t,r,o)=>n=>{!n||n.code!=="EISDIR"?o(n):ye.chown(e,t,r,o)}:(e,t,r,o)=>o,Ko=ba?(e,t,r)=>{try{return va(e,t,r)}catch(o){if(o.code!=="EISDIR")throw o;Dd(e,t,r)}}:(e,t,r)=>va(e,t,r),Td=process.version,ka=(e,t,r)=>ye.readdir(e,t,r),Id=(e,t)=>ye.readdirSync(e,t);/^v4\./.test(Td)&&(ka=(e,t,r)=>ye.readdir(e,r));var Qr=(e,t,r,o)=>{ye[xd](e,t,r,Cd(e,t,r,n=>{o(n&&n.code!=="ENOENT"?n:null)}))},Ea=(e,t,r,o,n)=>{if(typeof t=="string")return ye.lstat(Ke.resolve(e,t),(i,s)=>{if(i)return n(i.code!=="ENOENT"?i:null);s.name=t,Ea(e,s,r,o,n)});if(t.isDirectory())Xo(Ke.resolve(e,t.name),r,o,i=>{if(i)return n(i);let s=Ke.resolve(e,t.name);Qr(s,r,o,n)});else{let i=Ke.resolve(e,t.name);Qr(i,r,o,n)}},Xo=(e,t,r,o)=>{ka(e,{withFileTypes:!0},(n,i)=>{if(n){if(n.code==="ENOENT")return o();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return o(n)}if(n||!i.length)return Qr(e,t,r,o);let s=i.length,a=null,c=d=>{if(!a){if(d)return o(a=d);if(--s===0)return Qr(e,t,r,o)}};i.forEach(d=>Ea(e,d,t,r,c))})},Od=(e,t,r,o)=>{if(typeof t=="string")try{let n=ye.lstatSync(Ke.resolve(e,t));n.name=t,t=n}catch(n){if(n.code==="ENOENT")return;throw n}t.isDirectory()&&Sa(Ke.resolve(e,t.name),r,o),Ko(Ke.resolve(e,t.name),r,o)},Sa=(e,t,r)=>{let o;try{o=Id(e,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return Ko(e,t,r);throw n}return o&&o.length&&o.forEach(n=>Od(e,n,t,r)),Ko(e,t,r)};xa.exports=Xo;Xo.sync=Sa});var Ia=ce((bv,Ta)=>{l();var Kr=be("path"),Da=be("fs"),Ca=parseInt("0777",8);Ta.exports=yt.mkdirp=yt.mkdirP=yt;function yt(e,t,r,o){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var n=t.mode,i=t.fs||Da;n===void 0&&(n=Ca&~process.umask()),o||(o=null);var s=r||function(){};e=Kr.resolve(e),i.mkdir(e,n,function(a){if(!a)return o=o||e,s(null,o);a.code==="ENOENT"?yt(Kr.dirname(e),t,function(c,d){c?s(c,d):yt(e,t,s,d)}):i.stat(e,function(c,d){c||!d.isDirectory()?s(a,o):s(null,o)})})}yt.sync=function e(t,r,o){(!r||typeof r!="object")&&(r={mode:r});var n=r.mode,i=r.fs||Da;n===void 0&&(n=Ca&~process.umask()),o||(o=null),t=Kr.resolve(t);try{i.mkdirSync(t,n),o=o||t}catch(a){switch(a.code){case"ENOENT":o=e(Kr.dirname(t),r,o),e(t,r,o);break;default:var s;try{s=i.statSync(t)}catch{throw a}if(!s.isDirectory())throw a;break}}return o}});var La=ce(tn=>{l();var _d=Pa(),Ra=hl(),$a=fl(),Rd=Ia(),Aa=be("fs"),Z=be("path"),$d=be("os"),jt=$d.platform()==="win32",Nt=function(){},en=function(e){return e},Zo=jt?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:en,Ad=function(e,t,r,o,n,i){var s=n||["."];return function(c){if(!s.length)return c();var d=s.shift(),u=Z.join(r,d);t.call(e,u,function(f,m){if(f)return c(f);if(!m.isDirectory())return c(null,d,m);e.readdir(u,function(p,h){if(p)return c(p);i&&h.sort();for(var y=0;y<h.length;y++)o(Z.join(r,d,h[y]))||s.push(Z.join(d,h[y]));c(null,d,m)})})}},Fa=function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var o=r.linkname;return o&&(r.type==="link"||Z.isAbsolute(o))&&(r.linkname=o.split("/").slice(t).join("/")),e(r)}};tn.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||Aa,o=t.ignore||t.filter||Nt,n=t.map||Nt,i=t.mapStream||en,s=Ad(r,t.dereference?r.stat:r.lstat,e,o,t.entries,t.sort),a=t.strict!==!1,c=typeof t.umask=="number"?~t.umask:~ja(),d=typeof t.dmode=="number"?t.dmode:0,u=typeof t.fmode=="number"?t.fmode:0,f=t.pack||Ra.pack(),m=t.finish||Nt;t.strip&&(n=Fa(n,t.strip)),t.readable&&(d|=parseInt(555,8),u|=parseInt(444,8)),t.writable&&(d|=parseInt(333,8),u|=parseInt(222,8));var p=function(b,w){r.readlink(Z.join(e,b),function(g,v){if(g)return f.destroy(g);w.linkname=Zo(v),f.entry(w,y)})},h=function(b,w,g){if(b)return f.destroy(b);if(!w)return t.finalize!==!1&&f.finalize(),m(f);if(g.isSocket())return y();var v={name:Zo(w),mode:(g.mode|(g.isDirectory()?d:u))&c,mtime:g.mtime,size:g.size,type:"file",uid:g.uid,gid:g.gid};if(g.isDirectory())return v.size=0,v.type="directory",v=n(v)||v,f.entry(v,y);if(g.isSymbolicLink())return v.size=0,v.type="symlink",v=n(v)||v,p(w,v);if(v=n(v)||v,!g.isFile())return a?f.destroy(new Error("unsupported type for "+w)):y();var S=f.entry(v,y);if(S){var P=i(r.createReadStream(Z.join(e,w),{start:0,end:v.size>0?v.size-1:v.size}),v);P.on("error",function(C){S.destroy(C)}),$a(P,S)}},y=function(b){if(b)return f.destroy(b);s(h)};return y(),f};var Fd=function(e){return e.length?e[e.length-1]:null},jd=function(){return process.getuid?process.getuid():-1},ja=function(){return process.umask?process.umask():0};tn.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||Aa,o=t.ignore||t.filter||Nt,n=t.map||Nt,i=t.mapStream||en,s=t.chown!==!1&&!jt&&jd()===0,a=t.extract||Ra.extract(),c=[],d=new Date,u=typeof t.umask=="number"?~t.umask:~ja(),f=typeof t.dmode=="number"?t.dmode:0,m=typeof t.fmode=="number"?t.fmode:0,p=t.strict!==!1;t.strip&&(n=Fa(n,t.strip)),t.readable&&(f|=parseInt(555,8),m|=parseInt(444,8)),t.writable&&(f|=parseInt(333,8),m|=parseInt(222,8));var h=function(w,g){for(var v;(v=Fd(c))&&w.slice(0,v[0].length)!==v[0];)c.pop();if(!v)return g();r.utimes(v[0],d,v[1],g)},y=function(w,g,v){if(t.utimes===!1)return v();if(g.type==="directory")return r.utimes(w,d,g.mtime,v);if(g.type==="symlink")return h(w,v);r.utimes(w,d,g.mtime,function(S){if(S)return v(S);h(w,v)})},b=function(w,g,v){var S=g.type==="symlink",P=S?r.lchmod:r.chmod,C=S?r.lchown:r.chown;if(!P)return v();var D=(g.mode|(g.type==="directory"?f:m))&u;C&&s?C.call(r,w,g.uid,g.gid,R):R(null);function R($){if($)return v($);if(!P)return v();P.call(r,w,D,v)}};return a.on("entry",function(w,g,v){w=n(w)||w,w.name=Zo(w.name);var S=Z.join(e,Z.join("/",w.name));if(o(S,w))return g.resume(),v();var P=function(I){if(I)return v(I);y(S,w,function(_){if(_)return v(_);if(jt)return v();b(S,w,v)})},C=function(){if(jt)return v();r.unlink(S,function(){var I=Z.resolve(Z.dirname(S),w.linkname);if(!_a(I,e))return v(new Error(S+" is not a valid symlink"));r.symlink(w.linkname,S,P)})},D=function(){if(jt)return v();r.unlink(S,function(){var I=Z.join(e,Z.join("/",w.linkname));r.realpath(I,function(_,L){if(_||!_a(L,e))return v(new Error(S+" is not a valid hardlink"));r.link(L,S,function(j){if(j&&j.code==="EPERM"&&t.hardlinkAsFilesFallback)return g=r.createReadStream(I),R();P(j)})})})},R=function(){var I=r.createWriteStream(S),_=i(g,w);I.on("error",function(L){_.destroy(L)}),$a(_,I,function(L){if(L)return v(L);I.on("close",P)})};if(w.type==="directory")return c.push([S,w.mtime]),Oa(S,{fs:r,own:s,uid:w.uid,gid:w.gid},P);var $=Z.dirname(S);Na(r,$,Z.join(e,"."),function(I,_){if(I)return v(I);if(!_)return v(new Error($+" is not a valid path"));Oa($,{fs:r,own:s,uid:w.uid,gid:w.gid},function(L){if(L)return v(L);switch(w.type){case"file":return R();case"link":return D();case"symlink":return C()}if(p)return v(new Error("unsupported type for "+S+" ("+w.type+")"));g.resume(),v()})})}),t.finish&&a.on("finish",t.finish),a};function Na(e,t,r,o){if(t===r)return o(null,!0);e.lstat(t,function(n,i){if(n&&n.code!=="ENOENT")return o(n);if(n||i.isDirectory())return Na(e,Z.join(t,".."),r,o);o(null,!1)})}function Oa(e,t,r){Rd(e,{fs:t.fs},function(o,n){!o&&n&&t.own?_d(n,t.uid,t.gid,r):r(o)})}function _a(e,t){return t=Z.resolve(t),t===e||e.startsWith(t+Z.sep)}});l();l();var xr=Q(ue(),1);l();l();var wr=[{name:"npm",lockfile:"package-lock.json",alternativeLockfiles:["npm-shrinkwrap.json"],installCommand:"npm ci"},{name:"yarn",lockfile:"yarn.lock",installCommand:"yarn install --frozen-lockfile"},{name:"pnpm",lockfile:"pnpm-lock.yaml",installCommand:"pnpm install --frozen-lockfile"},{name:"bun",lockfile:"bun.lockb",alternativeLockfiles:["bun.lock"],installCommand:"bun install --frozen-lockfile"}];function gl(e){let t="No lockfile found",r="If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying. To avoid versioning issues, generate a new lockfile and commit it to your repository.",o=[["Generate a lockfile. Run",{command:"npm|yarn|pnpm install"}],"Commit the new file to your repository"];if(e)throw new E(t,r,o);Y({headline:t,body:r,nextSteps:o})}function yl(e,t){let r=e.map(({packageManager:s,foundLockfile:a})=>`${a} (created by ${s.name})`),o="Multiple lockfiles found",n=[`Your project contains more than one lockfile. This can cause version conflicts when installing and deploying your app. The following lockfiles were detected:
|
|
2
2
|
`,{list:{items:r}}],i=["Delete any unneeded lockfiles","Commit the change to your repository"];if(t)throw new E(o,n,i);Y({headline:o,body:n,nextSteps:i})}function wl(e){let t="Lockfile ignored by Git",r="Your project\u2019s lockfile isn\u2019t being tracked by Git. If you don\u2019t commit a lockfile, then your app might install the wrong package versions when deploying.",o=[`In your project\u2019s .gitignore file, delete any references to ${e}`,"Commit the change to your repository"];Y({headline:t,body:r,nextSteps:o})}async function Ci(e,t=!1){if(Ie&&!process.env.SHOPIFY_UNIT_TEST)return;let r=[];for(let i of wr){let s=[i.lockfile,...i.alternativeLockfiles||[]];for(let a of s)if(await G(T(e,a))){r.push({packageManager:i,foundLockfile:a});break}}if(r.length===0)return gl(t);if(r.length>1)return yl(r,t);let o=r[0].foundLockfile;(await Rn(e,[o]).catch(()=>[])).length>0&&wl(o)}l();var vl=["^cdn/","^_t/"];function vr(e){let t=new Set;return Object.values(e.routes).filter(r=>vl.some(o=>new RegExp(o).test(r.path??""))).forEach(r=>{r.path&&t.add(r.path)}),[...t]}var bl=["","cart","products/:productHandle","collections","collections/:collectionHandle","sitemap.xml","robots.txt","pages/:pageHandle","policies/:policyHandle","search","account","account/login","account/orders/:orderId","account/authorize"];function br(e,t=bl){let r=Object.values(e.routes),o=new Set(t);for(let n of t)for(let i of r)if(!n&&!i.path)o.delete(n);else if(n&&i.path){let s={path:i.path,parentId:i.parentId};for(;s.parentId&&s.parentId!=="root";){let d=r.find(u=>u.id===s.parentId);if(!d)break;s.path=d.path==null?s.path:`${d.path}/${s.path}`,s.parentId=d.parentId}let a=":?[^\\/\\?]+\\?",c=`^(${a}\\/)?`+n.replaceAll(".","\\.").replace(/\//g,`\\/(${a}\\/)?`).replace(/:[^/)?]+/g,"(:[^\\/]+|\\*)")+`(\\/${a})?$`;new RegExp(c).test(s.path)&&o.delete(n)}return[...o]}var Le=100;function Ti(e){e.length?Y({headline:"Standard Shopify routes missing",body:`Your Hydrogen project is missing ${e.length} standard Shopify route${e.length>1?"s":""}.
|
|
3
3
|
Including these routes improves compatibility with Shopify\u2019s platform:
|
|
4
4
|
|
|
@@ -249,7 +249,7 @@ Skip the flag or provide the name of a template or example in the Hydrogen repos
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
`;async function za(e){let{hydrogenStorefronts:t}=await ot(qd,e);return t.map(r=>({...r,parsedId:nt(r.id)}))}var Zr=class e extends O{static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description="Returns a list of Hydrogen storefronts available on a given shop.";static flags={...k.path};async run(){let{flags:t}=await this.parse(e);await Yd(t)}};async function Yd({path:e=process.cwd()}){let{session:t}=await ge(e),r=await za(t);r.length>0?(te(),F(Jd({storefronts:r,shop:t.storeFqdn}).toString()),r.forEach(({currentProductionDeployment:o,id:n,productionUrl:i,title:s})=>{te(),F(W`${H.whiteBright(s)} ${H.dim(`(id: ${nt(n)})`)}`.value),i&&F(W` ${H.whiteBright(i)}`.value),o&&F(W` ${H.dim(zd(o))}`.value)})):B({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${t.storeFqdn})`,`Create a new Hydrogen storefront: Run \`${await z(e)} link\` or visit ${bs(t)}`]})}var Wd=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function zd(e){let t="";if(!e)return t;if(t+=Wd.format(new Date(e.createdAt)),e.commitMessage){let r=e.commitMessage.split(/\n/)[0];t+=`, ${r}`}return t}var Jd=({storefronts:e,shop:t})=>Ut(e,r=>`Showing ${r.length} Hydrogen storefronts for the store ${t}`,r=>`Showing 1 Hydrogen storefront for the store ${t}`);l();var eo=class e extends O{static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description="Login to your Shopify account.";static flags={...k.path,...k.shop};async run(){let{flags:t}=await this.parse(e);await Qd(t)}};async function Qd({path:e=process.cwd(),shop:t}){te(),ii(!0);let{config:r}=await ge(e,t??!0);li(r)}l();var to=class e extends O{static descriptionWithMarkdown="Log out from the current shop.";static description="Logout of your local session.";static flags={...k.path};async run(){let{flags:t}=await this.parse(e);await Kd(t)}};async function Kd({path:e=process.cwd()}){te(),await ai(e),N({body:"You are logged out from Shopify."})}l();var rn=Q(ue(),1);l();async function Ja(e){let{startWorkerdServer:t}=await import("./workerd-
|
|
252
|
+
`;async function za(e){let{hydrogenStorefronts:t}=await ot(qd,e);return t.map(r=>({...r,parsedId:nt(r.id)}))}var Zr=class e extends O{static descriptionWithMarkdown="Lists all remote Hydrogen storefronts available to link to your local development environment.";static description="Returns a list of Hydrogen storefronts available on a given shop.";static flags={...k.path};async run(){let{flags:t}=await this.parse(e);await Yd(t)}};async function Yd({path:e=process.cwd()}){let{session:t}=await ge(e),r=await za(t);r.length>0?(te(),F(Jd({storefronts:r,shop:t.storeFqdn}).toString()),r.forEach(({currentProductionDeployment:o,id:n,productionUrl:i,title:s})=>{te(),F(W`${H.whiteBright(s)} ${H.dim(`(id: ${nt(n)})`)}`.value),i&&F(W` ${H.whiteBright(i)}`.value),o&&F(W` ${H.dim(zd(o))}`.value)})):B({headline:"Hydrogen storefronts",body:"There are no Hydrogen storefronts on your Shop.",nextSteps:[`Ensure you are logged in to the correct shop (currently: ${t.storeFqdn})`,`Create a new Hydrogen storefront: Run \`${await z(e)} link\` or visit ${bs(t)}`]})}var Wd=new Intl.DateTimeFormat("default",{year:"numeric",month:"numeric",day:"numeric"});function zd(e){let t="";if(!e)return t;if(t+=Wd.format(new Date(e.createdAt)),e.commitMessage){let r=e.commitMessage.split(/\n/)[0];t+=`, ${r}`}return t}var Jd=({storefronts:e,shop:t})=>Ut(e,r=>`Showing ${r.length} Hydrogen storefronts for the store ${t}`,r=>`Showing 1 Hydrogen storefront for the store ${t}`);l();var eo=class e extends O{static descriptionWithMarkdown="Logs in to the specified shop and saves the shop domain to the project.";static description="Login to your Shopify account.";static flags={...k.path,...k.shop};async run(){let{flags:t}=await this.parse(e);await Qd(t)}};async function Qd({path:e=process.cwd(),shop:t}){te(),ii(!0);let{config:r}=await ge(e,t??!0);li(r)}l();var to=class e extends O{static descriptionWithMarkdown="Log out from the current shop.";static description="Logout of your local session.";static flags={...k.path};async run(){let{flags:t}=await this.parse(e);await Kd(t)}};async function Kd({path:e=process.cwd()}){te(),await ai(e),N({body:"You are logged out from Shopify."})}l();var rn=Q(ue(),1);l();async function Ja(e){let{startWorkerdServer:t}=await import("./workerd-KPQTFQD4.js");return t(e)}var ro=class e extends O{static descriptionWithMarkdown="Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the [build](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-build) command first.";static description="Runs a Hydrogen storefront in an Oxygen worker for production.";static flags={...k.path,...k.port,...k.env,...k.envBranch,...k.envFile,...k.inspectorPort,...k.debug,...k.verbose,build:rn.Flags.boolean({description:"Builds the app before starting the preview server."}),watch:rn.Flags.boolean({description:"Watches for changes and rebuilds the project.",dependsOn:["build"]}),...ve(k.entry,{entry:{dependsOn:["build"]}}),...ve(k.codegen,{codegen:{dependsOn:["build"]}})};async run(){let{flags:t}=await this.parse(e),r=t.path?T(t.path):process.cwd(),{close:o}=await Xd({...U(t),directory:r});He(async()=>{await o()})}};async function Xd({port:e,directory:t,env:r,envBranch:o,inspectorPort:n,debug:i,verbose:s,build:a=!1,watch:c=!1,codegen:d=!1,codegenConfigPath:u,entry:f,envFile:m}){process.env.NODE_ENV||(process.env.NODE_ENV=c?"development":"production"),s&&rr(),or()||it();let{root:p,buildPath:h,buildPathWorkerFile:y,buildPathClient:b}=xe(t),w=await rt(p);if(w)throw new E(Pe);let g,v=Tt(),P=a?await Je({...{directory:p,entry:f,disableRouteWarning:!1,lockfileCheck:!1,sourcemap:!0,bundleStats:!1,useCodegen:d,codegenConfigPath:u},watch:c,async onServerBuildFinish(){v.state==="pending"?v.resolve():F("\u{1F3D7}\uFE0F Project rebuilt. Reloading server..."),await g?.reload()}}):v.resolve();w||(y=(await he(p).catch(()=>null))?.serverOutFile??x(h,"server","index.js"));let{shop:C,storefront:D}=await tr(p),R=!!C&&!!D?.id,{allVariables:$,logInjectedVariables:I}=await hr({root:p,fetchRemote:R,envBranch:o,envHandle:r,envFile:m});e||(e=await pt(tt));let _=await pt(e+100);return await v.promise,I(),g=await Ja({root:p,appPort:e,assetsPort:_,env:$,buildPathClient:b,buildPathWorkerFile:y,inspectorPort:n,debug:i,watch:c}),g.showBanner({mode:"preview",headlinePrefix:c?"Watching for changes. ":""}),{async close(){await Promise.allSettled([g.close(),P?.close()])}}}l();var oo=class e extends O{static description="Scaffold routes and core functionality.";static flags={...k.path,...k.force,...k.markets,...k.shortcut,...ve(k.installDeps,{"install-deps":{default:!0}})};async run(){let{flags:t}=await this.parse(e),r=t.path?T(t.path):process.cwd();await Zd({...U(t),directory:r})}};async function Zd(e){let t=new qt,{rootDirectory:r,appDirectory:o}=await Ne(e.directory),n=Ze(r),i=z(),s=Promise.resolve(),a=[{title:"Setting up project",task:async()=>{await s}}],c=e.markets?e.markets:await Xt({abortSignal:t.signal,extraChoices:{none:"Set up later"}}),d=c==="none"?void 0:c,{setupRoutes:u}=nr(t),f,m=await Mn(".."),[p,h]=await Promise.all([G(x(r,"tsconfig.json")),kt("*.d.ts",{cwd:m})]);s=s.then(()=>Promise.all([...h.map(g=>Bt(x(m,g),T(r,g))),ir({rootDirectory:r,appDirectory:o,typescript:p})])).then(async()=>{f=await u(r,p?"ts":"js",{i18nStrategy:d,overwriteFileDeps:!0})}),d&&(s=s.then(()=>Kt(d,{rootDirectory:r})));let y=await Promise.resolve(i),{createShortcut:b,showShortcutBanner:w}=await sr(t,y,e.shortcut);!d&&!b||(b&&(s=s.then(async()=>{await b()&&(y=Ye)}),w()),await ee(a),await st({location:n,name:n,directory:r},{cliCommand:y,depsInstalled:!0,packageManager:"npm",i18n:d,routes:f}))}l();var Qa=Q(ue(),1);var no=class e extends O{static descriptionWithMarkdown="Adds support for certain CSS strategies to your project.";static description="Setup CSS strategies for your project.";static flags={...k.path,...k.force,...ve(k.installDeps,{"install-deps":{default:!0}})};static args={strategy:Qa.Args.string({name:"strategy",description:`The CSS strategy to setup. One of ${ko.join()}`,options:ko})};async run(){let{flags:t,args:r}=await this.parse(e),o=t.path?T(t.path):process.cwd();await eu({...U(t),strategy:r.strategy,directory:o})}};async function eu({strategy:e,directory:t,force:r=!1,installDeps:o=!0}){let n=await he(t).catch(()=>null);if(!n)throw new E("No Vite config found. This command is only supported in Vite projects.");let{remixConfig:i}=n,s=e||await qn();if(s==="css-modules"||s==="postcss"){N({headline:`Vite works out of the box with ${xt[s]}.`,body:`See the Vite documentation for more information:
|
|
253
253
|
${So[s]}`});return}let a=await Gn(s,i,r);if(!a)return;let{workPromise:c,generatedAssets:d,needsInstallDeps:u}=a,f=[{title:"Updating files",task:async()=>{await c}}],m=!1;if(o&&u){let p=Ee(i.rootDirectory);f.push({title:"Installing new dependencies",task:async()=>{let h=await p;m=h==="npm"||h==="unknown",await Yt({directory:i.rootDirectory,packageManager:h,args:[]})}})}await ee(f),N({headline:`${xt[s]} setup complete.`,body:(d.length>0?`You can now modify CSS configuration in the following files:
|
|
254
254
|
`+d.map(p=>` - ${p}`).join(`
|
|
255
255
|
`)+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as qr}from"./chunk-O7MONSF7.js";import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ir}from"./chunk-FPCPFECH.js";import{a as Lr}from"./chunk-OCYPWE2O.js";import{a as Mr}from"./chunk-XDEAZP2I.js";import{a as kr}from"./chunk-JO4ZHVOD.js";import{a as Dr}from"./chunk-H7DDRARV.js";import{b as Fr}from"./chunk-E7OLCSAL.js";import{a as Or}from"./chunk-AVMNXIXF.js";import{a as Nr}from"./chunk-T5DF2GGD.js";import{a as Pr}from"./chunk-DDVT2K7E.js";import{a as Er}from"./chunk-DA4LHFJQ.js";import{a as br}from"./chunk-DU5LZYQX.js";import{a as Sr}from"./chunk-WO5YOBQ7.js";import{a as Ur}from"./chunk-TDCY3BRI.js";import{a as Rr}from"./chunk-PGN5EZTI.js";import{a as Tr,b as Ar,c as _r,d as Cr}from"./chunk-7ZLKT2TB.js";import{a as $r}from"./chunk-MKCXLBQ4.js";import{g as xr}from"./chunk-5NY4HKJF.js";import{a as Lo,b as ko}from"./chunk-HHSUBF73.js";import{a as gr}from"./chunk-G7QLHXVA.js";import{a as vr}from"./chunk-CNOL26GA.js";import{a as gt}from"./chunk-2WDKXDFM.js";import{a as yr}from"./chunk-RFDT525K.js";import{c as ht,m as wt}from"./chunk-KOB6T6NK.js";import{b as wr,g as je,j as ft}from"./chunk-5T3OVTF5.js";import{c as Yo}from"./chunk-SKM44SK5.js";import{a as fr,b as hr,c as Ye,d as Co,e as Pt,f as Io,g as Do}from"./chunk-WMDYHUPS.js";import{a as O,b as mt}from"./chunk-SRAHMYWJ.js";import{a as cr,b as lr,d as Ee,f as pr,m as Ge,n as ee,s as W,u as ur,v as dr,w as mr}from"./chunk-Q7BOSHWX.js";import{c as Wr}from"./chunk-6XLVKD6Q.js";import{a as ir}from"./chunk-3GMW7IEC.js";import{a as bo,b as vt,c as te,d as So}from"./chunk-TDSR2X7X.js";import{a as $o,f as Mo,g as Fo,h as xt,i as Oo,j as No,k as qo,l as Wo,m as Ho,n as Bo,o as Go,p as jo,q as Ko,v as zo,x as Vo,z as Et}from"./chunk-YZY4M6IH.js";import{a as Uo,b as Ro,c as To,d as Ao,e as _o}from"./chunk-5U6MXSNY.js";import{a as Br}from"./chunk-MOCD7GFI.js";import{a as Eo}from"./chunk-JOYM7AEQ.js";import{a as xo}from"./chunk-6ZRHK4ON.js";import{a as Hr}from"./chunk-7XQDZF73.js";import{a as Qe}from"./chunk-NV5IDANV.js";import{Aa as Ve,F as no,Fa as Po,H as so,J as fe,R as ao,U as uo,V as mo,Z as fo,aa as ho,fa as go,g as Gr,i as Kr,ia as wo,j as zr,ja as yo,k as J,ka as vo,l as Vr,n as Yr,o as Qr,r as yt,s as Jr,u as Xr,v as Zr,w as eo,x as to,y as ro,z as oo,za as ze}from"./chunk-UZ7U322K.js";import{O as io,P as co,Z as lo,ca as po,e as Ke,j as be,p as jr}from"./chunk-IRH6IGFT.js";import{c as sr}from"./chunk-ASOT7VNB.js";import{a as H}from"./chunk-5JCREGSD.js";import{$ as Yt,N as Vt,Z as de,a as Wt,c as Ht,h as Bt,l as Gt,n as jt,q as Kt,t as zt,ta as Qt,u as ke,z as De}from"./chunk-2HZMOK4U.js";import{b as ar,d as Be}from"./chunk-Q6LCSRIW.js";import{a as lt,c as qt}from"./chunk-5C7HDTHJ.js";import{D as Ne,H as Zt,J as Z,O as qe,P as xe,Q as dt,R as tr,T as rr,a as Nt,i as pt,j as $e,k as M,l as F,m as Me,n as ut,o as Xt,p as Fe,u as Oe,w as ne}from"./chunk-E24W34C4.js";import{a as Zn}from"./chunk-7UNQOKZW.js";import{d as Jt}from"./chunk-3QVXHF6I.js";import{d as _,g as me,l as er}from"./chunk-ELIH6GCC.js";import{$a as ve,Ea as Dt,Fb as U,Gb as nr,Hb as R,Mb as Q,Na as Ie,Pb as y,Q as ct,Qb as k,Ta as X,Wa as Le,cb as $t,eb as Pe,fb as L,gb as S,jb as le,kb as pe,ma as I,mb as Ft,nb as Ot,tb as ue,ua as _e,wa as Ce}from"./chunk-EYDNSYYE.js";import{d as or,f as We,j as He}from"./chunk-JCNRQYRP.js";import{a as Re}from"./chunk-NNOSZ447.js";import{d as T,f as it,g as Te,i as ce,j as Lt,k as Ae,o as kt,p as ye}from"./chunk-773TIA5M.js";import{r as Xn}from"./chunk-T6CC5WUU.js";import{e as oe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var es=300*1e3,ts='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Qo(t,e,r=Date.now()){for(;await rs(t,e,r););}async function rs(t,e,r){let o=await je(t,e);if(!o||os(o,r))throw new _(ts);return await xe(3),o.processing}function os(t,e){return t.processing&&Date.now()-e>=es}var ns="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",ss="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",bt=3,Je=class extends yr{constructor(e,r={devPreview:!1}){super(e),this.context="App Ext. Host",this.themeId=Tr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??(e=this.devPreview?await this.createHostTheme():await this.create()),e}setTheme(e){Ar(this.adminSession.storeFqdn,e)}removeTheme(){_r(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:wr,name:this.generateThemeName(this.context),src:ns};for(let o=0;o<bt;o++){y(`Attempt ${o}/${bt}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await ft(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),y(`Waiting for theme with id "${n.id}" to be processed`),await Qo(n.id,this.adminSession),n;throw new Error}catch{y(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}y(`Theme creation failed after ${bt} retries. Creating theme using fallback theme zip`);let r=await ft({...e,src:ss},this.adminSession);if(!r)throw y("Theme creation failed. Exiting process."),new me(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var as={"theme:init":Ur,"theme:check":gr,"theme:console":vr,"theme:delete":Pr,"theme:dev":Er,"theme:duplicate":br,"theme:info":Sr,"theme:language-server":Rr,"theme:list":Cr,"theme:metafields:pull":$r,"theme:open":Ir,"theme:package":Lr,"theme:profile":kr,"theme:publish":Dr,"theme:preview":Mr,"theme:pull":Fr,"theme:push":Or,"theme:rename":Nr,"theme:share":qr},oi=as;async function Jo(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(v=>v.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[l,u]=await Promise.all([Vt(t.storeFqdn),ls(e)]),c=l.storeFqdn,[m,h]=await Promise.all([wt(l),ht(l)]),g=h?await gt(void 0,c,m):void 0,d=await cs(l,t.theme),f=d.id.toString();return Oe({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:u}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${c}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:is,options:{theme:d,adminSession:l,storefrontPassword:g,crawlerSignatureHeaders:m,themeExtensionDirectory:a,themeExtensionPort:i}}}var is=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await xr(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function cs(t,e){let r;if(e)y(`Fetching theme with provided id ${e}`),r=await je(parseInt(e,10),t);else{let o=new Je(t,{devPreview:!0});await Ne([{title:"Configuring host theme for theme app extension",task:async()=>{y("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new _("Could not find or create a host theme for theme app extensions");return r}async function ls(t){return t.developerPlatformClient?.clientName===lo.AppManagement?`https://${await ke()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await zt()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function ps(t){let e=T(t.directory,"locales");return Le([T(e,"*.json")])}async function Xo(t,e){let r=await ps(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),us(a,s,o,t,e)})),o.lastUpdated=Date.now(),y(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function us(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw k(i,n.stderr),new er.ExtendableError(i)}}p();function Xe(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}async function he(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Xo(t,r),l=await Vr(t),u=t.outputRelativePath?ce(n):n,c=await ds(t,s,u,o),m=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(m=t.configuration.metafields),{assets:{main:Se(c)&&c[0]?.assets?.main?c[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await Ie(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:Xe(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:c,localization:a??null,metafields:m,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:l?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function ds(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),Se(s)){let a=await ms(r);return Promise.all(s.map(async i=>{let{target:l,resource:u}=i,c={...i,surface:Ve(l),root:{url:`${e}/${l}`},resource:u||{url:""}},m=a?.[l];if(!m)return c;let g=await ys(m,{target:l,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...c,...g}}))}return s}async function ms(t){try{let e=T(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function fs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,l=e[s];if(typeof l=="string"){let g=await Ze(s,i,typeof a=="string"?a:l,r,o,n,typeof a=="string"?l:void 0);return{assets:{[g.name]:g}}}let c=e.build_manifest?.assets?.[s];if(c?.filepath){let m=await Ze(s,i,c.filepath,r,o,n,c.module);return{assets:{[m.name]:m}}}return{}}async function hs({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await Ie(T(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function gs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,l)=>{let u=i.schema,c=s[l]?.schema,m=typeof c=="string"?c:u,h=typeof c=="string"?u:void 0;return{...i,schema:await Ze("schema",`${t}/intents/${l}/schema`,m,r,o,n,h)}}))}:{}}async function ws({target:t,url:e,extension:r,resolver:o},n,s){let a=await Ze(n,`${t}/${n}`,s,e,r,o);return{assets:{[a.name]:a}}}async function ys(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return vs(o,n)?gs(e,n):Ps(o,n)?ws(e,o,n):xs(o,n)?hs(e,o,n):fs(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Se(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Ze(t,e,r,o,n,s,a){let i=`${e}${Ae(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await Ie(T(n.directory,a??r))??0}}function vs(t,e){return t==="intents"&&Array.isArray(e)}function Ps(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function xs(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as Es}from"events";var Ue;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(Ue||(Ue={}));async function Zo(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:Ye(t.storeFqdn,t.apiKey),mobileUrl:Io(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>he(n,e,t,r&&St(r,n.devUUID))))}}function St(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var et=class extends Es{constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=de(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(Se(n.extensionPoints)&&Se(o.extensionPoints)){let s=n.extensionPoints.reduce((l,u)=>({...l,[u.target]:u}),{});o.extensionPoints=de(o.extensionPoints,n.extensionPoints,l=>l.map(u=>{let c=s[u.target];return c?de(u,c,(m,h)=>h):u}));let{extensionPoints:a,...i}=n;return de(o,i)}return de(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){y(R`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await he(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},St(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await he(e,r,this.options,St(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(Ue.Update,e)}};p();p();var se;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(se||(se={}));function en(t,e){return(r,o,n)=>{r.url==="/extensions"&&(y("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,bs(t,e)))}}function bs(t,e){return r=>{y("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};y(R`Sending connected payload: ${U.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",As(t,e))}}function Ss(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?U.json(o).output():String(o)).join(" ");return R`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var Us={debug:t=>U.gray(t),warn:t=>U.yellow(t),error:t=>U.errorText(t)};function Rs({type:t,message:e}){let r=Ss(e);switch(t){case"debug":case"warn":case"error":return R`${Us[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function Ts(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(Rs(t))})}function As(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(y(R`Received websocket message with event type ${n} and data:
|
|
1
|
+
import{a as qr}from"./chunk-P2SBE77Z.js";import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ir}from"./chunk-UVIGXZMV.js";import{a as Lr}from"./chunk-2TJ6LOCC.js";import{a as Mr}from"./chunk-XDV4PRFT.js";import{a as kr}from"./chunk-DIPTSBQM.js";import{a as Dr}from"./chunk-7AYYQUJG.js";import{b as Fr}from"./chunk-BQARKSGG.js";import{a as Or}from"./chunk-WDSBR7KX.js";import{a as Nr}from"./chunk-OJZT3NA2.js";import{a as Pr}from"./chunk-HOAVZLEG.js";import{a as Er}from"./chunk-GMAZ2BQY.js";import{a as br}from"./chunk-ZUWEGJA7.js";import{a as Sr}from"./chunk-KPNNGJAW.js";import{a as Ur}from"./chunk-UMB4BWCK.js";import{a as Rr}from"./chunk-MC466GSO.js";import{a as Tr,b as Ar,c as _r,d as Cr}from"./chunk-6ZWMXMNM.js";import{a as $r}from"./chunk-5GVE4ILZ.js";import{g as xr}from"./chunk-DN3BB4IO.js";import{a as Lo,b as ko}from"./chunk-QFXJNFMI.js";import{a as gr}from"./chunk-OCBGHOH2.js";import{a as vr}from"./chunk-P7OSUECN.js";import{a as gt}from"./chunk-KQTVJMV6.js";import{a as yr}from"./chunk-DZMXYETH.js";import{c as ht,m as wt}from"./chunk-HSVZU7MP.js";import{b as wr,g as je,j as ft}from"./chunk-I5X3IP6T.js";import{c as Yo}from"./chunk-KB6H5LQJ.js";import{a as fr,b as hr,c as Ye,d as Co,e as Pt,f as Io,g as Do}from"./chunk-YWQPSMRZ.js";import{a as O,b as mt}from"./chunk-KFUOVO3X.js";import{a as cr,b as lr,d as Ee,f as pr,m as Ge,n as ee,s as W,u as ur,v as dr,w as mr}from"./chunk-Q7BOSHWX.js";import{c as Wr}from"./chunk-DI5ZPWNA.js";import{a as ir}from"./chunk-PEYYIWP6.js";import{a as bo,b as vt,c as te,d as So}from"./chunk-VCWESQBC.js";import{a as $o,f as Mo,g as Fo,h as xt,i as Oo,j as No,k as qo,l as Wo,m as Ho,n as Bo,o as Go,p as jo,q as Ko,v as zo,x as Vo,z as Et}from"./chunk-XCGV3IJ5.js";import{a as Uo,b as Ro,c as To,d as Ao,e as _o}from"./chunk-ICRQZAXP.js";import{a as Br}from"./chunk-AAK3WGD7.js";import{a as Eo}from"./chunk-RE652L3G.js";import{a as xo}from"./chunk-UHIP5CFI.js";import{a as Hr}from"./chunk-VJQJ5PTQ.js";import{a as Qe}from"./chunk-SH6Q5CLM.js";import{Aa as Ve,F as no,Fa as Po,H as so,J as fe,R as ao,U as uo,V as mo,Z as fo,aa as ho,fa as go,g as Gr,i as Kr,ia as wo,j as zr,ja as yo,k as J,ka as vo,l as Vr,n as Yr,o as Qr,r as yt,s as Jr,u as Xr,v as Zr,w as eo,x as to,y as ro,z as oo,za as ze}from"./chunk-4MLEL3VK.js";import{O as io,P as co,Z as lo,ca as po,e as Ke,j as be,p as jr}from"./chunk-R7QYSC6T.js";import{c as sr}from"./chunk-5VRU3BT5.js";import{a as H}from"./chunk-7PVNAILK.js";import{$ as Yt,N as Vt,Z as de,a as Wt,c as Ht,h as Bt,l as Gt,n as jt,q as Kt,t as zt,ta as Qt,u as ke,z as De}from"./chunk-TIU7MMRT.js";import{b as ar,d as Be}from"./chunk-NGCPVRDM.js";import{a as lt,c as qt}from"./chunk-5C7HDTHJ.js";import{D as Ne,H as Zt,J as Z,O as qe,P as xe,Q as dt,R as tr,T as rr,a as Nt,i as pt,j as $e,k as M,l as F,m as Me,n as ut,o as Xt,p as Fe,u as Oe,w as ne}from"./chunk-EEEKSYWV.js";import{a as Zn}from"./chunk-7UNQOKZW.js";import{d as Jt}from"./chunk-7AY6HLQG.js";import{d as _,g as me,l as er}from"./chunk-IIFRDOYG.js";import{$a as ve,Ea as Dt,Fb as U,Gb as nr,Hb as R,Mb as Q,Na as Ie,Pb as y,Q as ct,Qb as k,Ta as X,Wa as Le,cb as $t,eb as Pe,fb as L,gb as S,jb as le,kb as pe,ma as I,mb as Ft,nb as Ot,tb as ue,ua as _e,wa as Ce}from"./chunk-TB7HFPBB.js";import{d as or,f as We,j as He}from"./chunk-SZM6ANMN.js";import{a as Re}from"./chunk-NNOSZ447.js";import{d as T,f as it,g as Te,i as ce,j as Lt,k as Ae,o as kt,p as ye}from"./chunk-773TIA5M.js";import{r as Xn}from"./chunk-T6CC5WUU.js";import{e as oe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var es=300*1e3,ts='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Qo(t,e,r=Date.now()){for(;await rs(t,e,r););}async function rs(t,e,r){let o=await je(t,e);if(!o||os(o,r))throw new _(ts);return await xe(3),o.processing}function os(t,e){return t.processing&&Date.now()-e>=es}var ns="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",ss="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",bt=3,Je=class extends yr{constructor(e,r={devPreview:!1}){super(e),this.context="App Ext. Host",this.themeId=Tr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??(e=this.devPreview?await this.createHostTheme():await this.create()),e}setTheme(e){Ar(this.adminSession.storeFqdn,e)}removeTheme(){_r(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:wr,name:this.generateThemeName(this.context),src:ns};for(let o=0;o<bt;o++){y(`Attempt ${o}/${bt}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await ft(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),y(`Waiting for theme with id "${n.id}" to be processed`),await Qo(n.id,this.adminSession),n;throw new Error}catch{y(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}y(`Theme creation failed after ${bt} retries. Creating theme using fallback theme zip`);let r=await ft({...e,src:ss},this.adminSession);if(!r)throw y("Theme creation failed. Exiting process."),new me(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var as={"theme:init":Ur,"theme:check":gr,"theme:console":vr,"theme:delete":Pr,"theme:dev":Er,"theme:duplicate":br,"theme:info":Sr,"theme:language-server":Rr,"theme:list":Cr,"theme:metafields:pull":$r,"theme:open":Ir,"theme:package":Lr,"theme:profile":kr,"theme:publish":Dr,"theme:preview":Mr,"theme:pull":Fr,"theme:push":Or,"theme:rename":Nr,"theme:share":qr},oi=as;async function Jo(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(v=>v.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[l,u]=await Promise.all([Vt(t.storeFqdn),ls(e)]),c=l.storeFqdn,[m,h]=await Promise.all([wt(l),ht(l)]),g=h?await gt(void 0,c,m):void 0,d=await cs(l,t.theme),f=d.id.toString();return Oe({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:u}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${c}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:is,options:{theme:d,adminSession:l,storefrontPassword:g,crawlerSignatureHeaders:m,themeExtensionDirectory:a,themeExtensionPort:i}}}var is=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await xr(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function cs(t,e){let r;if(e)y(`Fetching theme with provided id ${e}`),r=await je(parseInt(e,10),t);else{let o=new Je(t,{devPreview:!0});await Ne([{title:"Configuring host theme for theme app extension",task:async()=>{y("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new _("Could not find or create a host theme for theme app extensions");return r}async function ls(t){return t.developerPlatformClient?.clientName===lo.AppManagement?`https://${await ke()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await zt()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function ps(t){let e=T(t.directory,"locales");return Le([T(e,"*.json")])}async function Xo(t,e){let r=await ps(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),us(a,s,o,t,e)})),o.lastUpdated=Date.now(),y(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function us(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw k(i,n.stderr),new er.ExtendableError(i)}}p();function Xe(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}async function he(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Xo(t,r),l=await Vr(t),u=t.outputRelativePath?ce(n):n,c=await ds(t,s,u,o),m=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(m=t.configuration.metafields),{assets:{main:Se(c)&&c[0]?.assets?.main?c[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await Ie(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:Xe(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:c,localization:a??null,metafields:m,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:l?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function ds(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),Se(s)){let a=await ms(r);return Promise.all(s.map(async i=>{let{target:l,resource:u}=i,c={...i,surface:Ve(l),root:{url:`${e}/${l}`},resource:u||{url:""}},m=a?.[l];if(!m)return c;let g=await ys(m,{target:l,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...c,...g}}))}return s}async function ms(t){try{let e=T(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function fs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,l=e[s];if(typeof l=="string"){let g=await Ze(s,i,typeof a=="string"?a:l,r,o,n,typeof a=="string"?l:void 0);return{assets:{[g.name]:g}}}let c=e.build_manifest?.assets?.[s];if(c?.filepath){let m=await Ze(s,i,c.filepath,r,o,n,c.module);return{assets:{[m.name]:m}}}return{}}async function hs({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await Ie(T(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function gs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,l)=>{let u=i.schema,c=s[l]?.schema,m=typeof c=="string"?c:u,h=typeof c=="string"?u:void 0;return{...i,schema:await Ze("schema",`${t}/intents/${l}/schema`,m,r,o,n,h)}}))}:{}}async function ws({target:t,url:e,extension:r,resolver:o},n,s){let a=await Ze(n,`${t}/${n}`,s,e,r,o);return{assets:{[a.name]:a}}}async function ys(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return vs(o,n)?gs(e,n):Ps(o,n)?ws(e,o,n):xs(o,n)?hs(e,o,n):fs(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Se(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Ze(t,e,r,o,n,s,a){let i=`${e}${Ae(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await Ie(T(n.directory,a??r))??0}}function vs(t,e){return t==="intents"&&Array.isArray(e)}function Ps(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function xs(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as Es}from"events";var Ue;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(Ue||(Ue={}));async function Zo(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:Ye(t.storeFqdn,t.apiKey),mobileUrl:Io(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>he(n,e,t,r&&St(r,n.devUUID))))}}function St(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var et=class extends Es{constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=de(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(Se(n.extensionPoints)&&Se(o.extensionPoints)){let s=n.extensionPoints.reduce((l,u)=>({...l,[u.target]:u}),{});o.extensionPoints=de(o.extensionPoints,n.extensionPoints,l=>l.map(u=>{let c=s[u.target];return c?de(u,c,(m,h)=>h):u}));let{extensionPoints:a,...i}=n;return de(o,i)}return de(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){y(R`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await he(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},St(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await he(e,r,this.options,St(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(Ue.Update,e)}};p();p();var se;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(se||(se={}));function en(t,e){return(r,o,n)=>{r.url==="/extensions"&&(y("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,bs(t,e)))}}function bs(t,e){return r=>{y("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};y(R`Sending connected payload: ${U.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",As(t,e))}}function Ss(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?U.json(o).output():String(o)).join(" ");return R`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var Us={debug:t=>U.gray(t),warn:t=>U.yellow(t),error:t=>U.errorText(t)};function Rs({type:t,message:e}){let r=Ss(e);switch(t){case"debug":case"warn":case"error":return R`${Us[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function Ts(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(Rs(t))})}function As(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(y(R`Received websocket message with event type ${n} and data:
|
|
2
2
|
${U.json(s)}
|
|
3
3
|
`,e.stdout),n===se.Update){let a=e.payloadStore.getRawPayload().app.apiKey,i=s.app?.apiKey;if(s.app){if(a!==i)return;e.payloadStore.updateApp(s.app)}s.extensions&&e.payloadStore.updateExtensions(s.extensions)}else if(n===se.Dispatch){let a=_s(o,e);rn(t,a,e)}else n===se.Log&&Ts(s,e)}}function tn(t,e){return r=>{let o={event:se.Update,version:e.manifestVersion,data:{...e.payloadStore.getRawPayloadFilteredByExtensionIds(r)}};y(R`Sending websocket update event to the websocket clients:
|
|
4
4
|
${U.json(o)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-P7U6BWKN.js";import{a as n}from"./chunk-VJQJ5PTQ.js";import{C as p,F as s,Ga as c}from"./chunk-4MLEL3VK.js";import{b as e}from"./chunk-NGCPVRDM.js";import{r as d}from"./chunk-T6CC5WUU.js";import{e as l,g as r}from"./chunk-VKWPEFWQ.js";r();var m=l(d(),1);var t,{config:b,...u}=n,o=class extends f{async run(){let{flags:a,args:i}=await this.parse(t),{app:g}=await c({directory:a.path,userProvidedConfigName:i.config});return await s(a.path),await p({directory:a.path,configName:i.config,reset:a.reset}),{app:g}}};t=o;o.summary="Activate an app configuration.";o.descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";o.description=t.descriptionWithoutMarkdown();o.usage="app config use [config] [flags]";o.flags={...e,...u};o.args={config:m.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};var v=o;export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as m,E as d,t as c}from"./chunk-
|
|
1
|
+
import{D as m,E as d,t as c}from"./chunk-EEEKSYWV.js";import{Eb as w,Fb as n,Hb as a}from"./chunk-TB7HFPBB.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();async function P(){let r,l=new Promise(function(e,i){r=e});await c({processes:[{prefix:"backend",action:async(e,i,s)=>{e.write("first backend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("second backend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("third backend message"),await new Promise(t=>setTimeout(t,1e3)),r()}},{prefix:"frontend",action:async(e,i,s)=>{await l,e.write("first frontend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("second frontend message"),await new Promise(t=>setTimeout(t,1e3)),e.write("third frontend message")}}]}),await m([{title:"Installing dependencies",task:async()=>{await new Promise(e=>setTimeout(e,2e3))}},{title:"Downloading assets",task:async()=>{await new Promise(e=>setTimeout(e,2e3))}}]),await d({title:new w("Importing data"),task:async e=>{for(let i=1;i<=10;i++){await new Promise(t=>setTimeout(t,500));let s=a`Importing data ${n.italic(a`(${n.green(i.toString())} complete)`)}`;e(s)}return"completed"}})}export{P as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.5.2";export{o as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as C}from"./chunk-
|
|
1
|
+
import{b as C}from"./chunk-QEVGRNUE.js";import{b as f}from"./chunk-UAYIFFYJ.js";import{A as S,u as i,y as x}from"./chunk-EEEKSYWV.js";import{d as v}from"./chunk-IIFRDOYG.js";import{Pb as I}from"./chunk-TB7HFPBB.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();a();a();var m={on:"Autocorrect on. The system will automatically run commands even when you mistype them.",off:"Autocorrect off. You'll need to confirm corrections for mistyped commands."};a();function p(o=W()){return!!o.get("autocorrectEnabled")}function y(o,n=W()){n.set("autocorrectEnabled",o)}function W(){return b??(b=new C({projectName:"did-you-mean"})),b}var b;var A,s=class extends f{async run(){y(!0),i({body:m.on})}};A=s;s.summary="Enable autocorrect. Off by default.";s.descriptionWithMarkdown=`Enable autocorrect. Off by default.
|
|
2
2
|
|
|
3
3
|
When autocorrection is enabled, Shopify CLI automatically runs a corrected version of your command if a correction is available.
|
|
4
4
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as $}from"./chunk-J3JPJCWP.js";import{a as O}from"./chunk-
|
|
1
|
+
import{b as $}from"./chunk-J3JPJCWP.js";import{a as O}from"./chunk-5VC4XXYH.js";import{a as M}from"./chunk-TM44Z7U7.js";import{a as x,l as H,n as Y}from"./chunk-DN3BB4IO.js";import{a as R}from"./chunk-2ACN7JIZ.js";import{a as G,c as y}from"./chunk-N6IFIMC6.js";import{a as S,b as L}from"./chunk-STJ3LWFL.js";import{k as A,n as I}from"./chunk-I5X3IP6T.js";import{p as D,q as E,r as _,u as P,v as C}from"./chunk-4P54DKG4.js";import{h as V,k as B}from"./chunk-75DBVSVI.js";import{O as g,ua as a}from"./chunk-TIU7MMRT.js";import{b}from"./chunk-NGCPVRDM.js";import{D as F,v as k}from"./chunk-EEEKSYWV.js";import{Wa as T}from"./chunk-TB7HFPBB.js";import{q as p}from"./chunk-773TIA5M.js";import{r as Q}from"./chunk-T6CC5WUU.js";import{e as z,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function K(e,t,o,n,r,l){let i=X(o,n,r),c=J(o,e,n,t),s=[...i,...c,{title:"Theme download complete",task:async()=>{}}];s.length>0&&await F(s,{renderOptions:{stdout:l?.stdout??process.stdout},noProgressBar:r.multiEnvironment})}function X(e,t,o){if(o.nodelete)return[];let n=new Set(e.map(i=>i.key));return t.applyIgnoreFilters([...t.files.values()]).map(({key:i})=>i).filter(i=>!n.has(i)).map(i=>({title:`Cleaning your local directory (removing ${i})`,task:async()=>t.delete(i)}))}function J(e,t,o,n){let r=o.applyIgnoreFilters(e);r=r.filter(s=>{let u=s.checksum;return o.files.get(s.key)?.checksum!==u});let l=r.map(s=>s.key),i=s=>s.total===0?"[100%]":`[${Math.round(s.current/s.total*100)}%]`;return $(l,P,(s,u)=>({title:`Downloading files from remote theme ${i({current:u,total:l.length})}`,task:async()=>Z(t,o,s,n)}))}async function Z(e,t,o,n){let r=await A(e.id,o,n);r&&await Promise.all(r.map(l=>t.write(l)))}async function N(e,t,o,n){a("theme-service:pull:setup"),R({verbose:e.verbose,noColor:e.noColor});let r=t??await g(_({store:e.store}),e.password),l=new O(r),i=await(e.development?l.find():l.fetch()),{path:c,nodelete:s,live:u,development:f,only:W,ignore:j,force:w,environment:v}=e;if(!await oe(c??p(),w??!1,v?.[0],o))return;let q=await M(r,{header:"Select a theme to open",filter:{live:u,theme:f?`${i?.id}`:e.theme}});a("theme-service:pull:setup"),await ee(q,r,{environment:v?.[0],force:w??!1,ignore:j??[],multiEnvironment:o,nodelete:s??!1,only:W??[],path:c??p()},n)}async function ee(e,t,o,n){a("theme-service:pull:file-system");let r=H(o.path,{filters:o}),[l]=await Promise.all([I(e.id,t),r.ready()]),i=x(l);a("theme-service:pull:file-system"),await K(e,t,i,r,o,n);let c=o.environment?`Environment: ${o.environment}`:"";k({headline:c,body:["The theme",...G(e),"has been pulled."],nextSteps:[[{link:{label:"View your theme",url:S(e,t)}}],[{link:{label:"Customize your theme at the theme editor",url:L(e,t)}}]]})}async function te(e){return(await T("*",{cwd:e,deep:1,onlyFiles:!1})).length===0}async function oe(e,t,o,n){return t?!0:!(!await te(e)&&!await Y(e)&&!await y(t,void 0,o,n)||await V(e)&&!await B(e)&&!await y(t,"The current Git directory has uncommitted changes.",o,n))}var h=z(Q(),1);var U,m=class extends C{async command(t,o,n,r,l){a("theme-command:pull"),await N({...t,noColor:t["no-color"]},o,n,l),a("theme-command:pull")}storeAuthScopes(){return["read_themes"]}};U=m;m.summary="Download your remote theme files locally.";m.descriptionWithMarkdown=`Retrieves theme files from Shopify.
|
|
2
2
|
|
|
3
3
|
If no theme is specified, then you're prompted to select the theme to pull from the list of the themes in your store.`;m.description=U.descriptionWithoutMarkdown();m.flags={...b,...D,...E("download"),theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),development:h.Flags.boolean({char:"d",description:"Pull theme files from your remote development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),live:h.Flags.boolean({char:"l",description:"Pull theme files from your remote live theme.",env:"SHOPIFY_FLAG_LIVE"}),nodelete:h.Flags.boolean({char:"n",description:"Prevent deleting local files that don't exist remotely.",env:"SHOPIFY_FLAG_NODELETE"}),force:h.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};m.multiEnvironmentsFlags=["store","password","path",["live","development","theme"]];var Le=m;export{N as a,Le as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as l,C as f,D as m,E as d,J as p,y as u}from"./chunk-
|
|
1
|
+
import{B as l,C as f,D as m,E as d,J as p,y as u}from"./chunk-TIU7MMRT.js";import{h as n}from"./chunk-ZT4PUH7L.js";import{b as g}from"./chunk-UAYIFFYJ.js";import{F as S,z as h}from"./chunk-EEEKSYWV.js";import{Ob as w}from"./chunk-TB7HFPBB.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();var r="NEW_LOGIN";function N(e,t){let s=[],o=e[t];if(o)for(let[c,I]of Object.entries(o))s.push({label:I.identity.alias??c,value:c});return s}async function b(){let e=await p({},{forceNewSession:!0}),t=await f(e.userId);if(!t){let s=await S({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await m(e.userId,s),s}return t}async function v(){let e=await l(),t=await u(),s=[];return e&&s.push(...N(e,t)),s.length>0&&s.push({label:"Log in with a different account",value:r}),s}async function y(e){if(e){let o=await d(e);if(o)return n(o),e}let t=await v(),s=r;return t.length>0&&(s=await h({message:"Which account would you like to use?",choices:t})),s===r?b():(n(s),t.find(o=>o.value===s)?.label??s)}var A=L(C(),1);var a=class e extends g{static{this.description="Logs you in to your Shopify account."}static{this.flags={alias:A.Flags.string({description:"Alias of the session you want to login to.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})}}async run(){let{flags:t}=await this.parse(e),s=await y(t.alias);w(`Current account: ${s}.`)}};export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as E}from"./chunk-
|
|
1
|
+
import{b as E}from"./chunk-NGCPVRDM.js";import{b}from"./chunk-UAYIFFYJ.js";import{M as F,N}from"./chunk-EEEKSYWV.js";import{Mb as k,T as C,Ta as w,ma as O}from"./chunk-TB7HFPBB.js";import{u as n}from"./chunk-A4SBXDZB.js";import{k as R}from"./chunk-SZM6ANMN.js";import{d as u,f as P,g as x,h as g,n as T,q as y}from"./chunk-773TIA5M.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as H,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();d();var m=class{constructor(){this.assertions=[],this.registeredTests=[]}async runSuite(t){this.context=t,this.registeredTests=[];let e=[];this.tests();for(let i of this.registeredTests){this.assertions=[];let s=Date.now();try{await i.fn(),e.push({name:i.name,status:this.hasFailures()?"failed":"passed",duration:Date.now()-s,assertions:[...this.assertions]})}catch(r){e.push({name:i.name,status:"failed",duration:Date.now()-s,assertions:[...this.assertions],error:r instanceof Error?r:new Error(String(r))})}}return e}test(t,e){this.registeredTests.push({name:t,fn:e})}tests(){}async run(t,e){let i=e?.cwd??this.context.workingDirectory,s=await F(t,{cwd:i,env:e?.env});return{command:t,exitCode:s.exitCode,stdout:s.stdout,stderr:s.stderr,output:String(s.stdout)+String(s.stderr),success:s.exitCode===0}}async runInteractive(t,e){let i=e?.cwd??this.context.workingDirectory,s=0;try{await N(t,{cwd:i,env:e?.env,stdin:"inherit"})}catch{s=1}return{command:t,exitCode:s,stdout:"",stderr:"",output:"",success:s===0}}assertSuccess(t,e){this.assertions.push({description:e??`Command succeeded: ${t.command}`,passed:t.success,expected:"exit code 0",actual:`exit code ${t.exitCode}`})}assertError(t,e,i){let s=!t.success;if(e){let h=(typeof e=="string"?new RegExp(e):e).test(t.output),c;s?h?c="matched":c=`output: ${t.output.slice(0,200)}`:c="command succeeded",this.assertions.push({description:i??`Command failed with expected error: ${e}`,passed:s&&h,expected:`failure with error matching ${e}`,actual:c})}else this.assertions.push({description:i??`Command failed: ${t.command}`,passed:s,expected:"non-zero exit code",actual:`exit code ${t.exitCode}`})}async assertFile(t,e,i){let s=g(t)?t:u(this.context.workingDirectory,t),r=x(this.context.workingDirectory,s);if(!await w(s)){this.assertions.push({description:i??`File exists: ${r}`,passed:!1,expected:"file exists",actual:"file not found"});return}if(e){let c=await O(s),D=(typeof e=="string"?new RegExp(e):e).test(c);this.assertions.push({description:i??`File ${r} matches ${e}`,passed:D,expected:`content matching ${e}`,actual:D?"matched":`content: ${c.slice(0,200)}...`})}else this.assertions.push({description:i??`File exists: ${r}`,passed:!0,expected:"file exists",actual:"file exists"})}async assertNoFile(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`File does not exist: ${s}`,passed:!r,expected:"file does not exist",actual:r?"file exists":"file does not exist"})}async assertDirectory(t,e){let i=g(t)?t:u(this.context.workingDirectory,t),s=x(this.context.workingDirectory,i),r=await w(i);this.assertions.push({description:e??`Directory exists: ${s}`,passed:r,expected:"directory exists",actual:r?"directory exists":"directory not found"})}assertOutput(t,e,i){let r=(typeof e=="string"?new RegExp(e):e).test(t.output);this.assertions.push({description:i??`Output matches ${e}`,passed:r,expected:`output matching ${e}`,actual:r?"matched":`output: ${t.output.slice(0,200)}`})}assertJson(t,e,i){try{let s=JSON.parse(t.stdout);if(e){let r=e(s);this.assertions.push({description:i??"Output is valid JSON matching validator",passed:r,expected:"valid JSON matching validator",actual:r?"matched":"validator returned false"})}else this.assertions.push({description:i??"Output is valid JSON",passed:!0,expected:"valid JSON",actual:"valid JSON"});return s}catch{this.assertions.push({description:i??"Output is valid JSON",passed:!1,expected:"valid JSON",actual:`invalid JSON: ${t.stdout.slice(0,100)}`});return}}assert(t,e){this.assertions.push({description:e,passed:t,expected:"true",actual:String(t)})}assertEqual(t,e,i){this.assertions.push({description:i,passed:t===e,expected:String(e),actual:String(t)})}hasFailures(){return this.assertions.some(t=>!t.passed)}};m.description="Doctor test suite";var p=class extends m{constructor(){super(...arguments);this.themeName="";this.themePath=""}static{this.description="Tests the theme init command creates a valid theme structure"}tests(){this.test("init creates theme directory",async()=>{this.themeName=`doctor-theme-${C("creative")}`,this.themePath=u(this.context.workingDirectory,this.themeName);let e=await this.runInteractive(`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`);this.assertSuccess(e),this.context.themeName=this.themeName,this.context.themePath=this.themePath}),this.test("essential theme files exist",async()=>{let e=["layout/theme.liquid","config/settings_schema.json","templates/index.json"];await Promise.all(e.map(i=>this.assertFile(u(this.themePath,i))))}),this.test("theme directories exist",async()=>{let e=["sections","snippets","assets","locales"];await Promise.all(e.map(i=>this.assertDirectory(u(this.themePath,i))))}),this.test("layout/theme.liquid has valid content",async()=>{await this.assertFile(u(this.themePath,"layout/theme.liquid"),/<!doctype html>|<html|{{ content_for_header }}/i,"layout/theme.liquid contains expected Liquid markup")})}};d();var l=class extends m{static{this.description="Tests pushing a theme to the store creates an unpublished theme"}static{this.requiresStore=!0}tests(){this.test("push creates unpublished theme",async()=>{if(!this.context.themePath){this.assert(!1,"Theme init did not complete successfully; themePath is missing in context");return}let t=this.context.themeName??"doctor-theme",e=`shopify theme push --unpublished --json --path ${this.context.themePath} -t ${t}`;this.context.environment&&(e+=` -e ${this.context.environment}`),this.context.store&&(e+=` -s ${this.context.store}`),this.context.password&&(e+=` --password ${this.context.password}`);let i=await this.run(e);this.assertSuccess(i);let s=this.assertJson(i,r=>typeof r.theme?.id=="number");s?.theme&&(this.assert(typeof s.theme.id=="number","Theme was created with a valid ID"),this.assertEqual(s.theme.role,"unpublished","Theme role is unpublished"),this.assert(s.theme.editor_url.includes("/admin/themes/"),"Editor URL is provided"),this.assert(s.theme.preview_url.includes("preview_theme_id="),"Preview URL is provided"),this.context.themeId=String(s.theme.id),this.context.data.editorUrl=s.theme.editor_url,this.context.data.previewUrl=s.theme.preview_url)})}};d();function _(o){return{workingDirectory:o.path??y(),environment:o.environment,store:o.store,password:o.password,data:{}}}d();var a=o=>k(o),v;function J(o){v=o}function G(o){if(!v)return o;let t=/\/[^\s,)]+/g;return o.replace(t,e=>T(e,v))}function A(o,t){a(""),a(n.bold(n.cyan(`Suite: ${o}`))),a(n.dim(t))}function j(o){a(n.bold(n.blue(`Running: ${o}`)))}function q(o){let t=`(${(o.duration/1e3).toFixed(2)}s)`;if(o.status==="passed"){a(n.bold(n.green(`PASSED: ${o.name} ${n.dim(t)}`)));for(let e of I(o.assertions))a(e)}else if(o.status==="failed"){a(n.red(`FAILED: ${o.name} ${n.dim(t)}`));for(let e of I(o.assertions))a(e);o.error&&a(n.red(` Error: ${G(o.error.message)}`))}else a(n.yellow(`SKIPPED: ${o.name}`))}function S(o){let t=o.filter(h=>h.status==="passed").length,e=o.filter(h=>h.status==="failed").length,i=o.filter(h=>h.status==="skipped").length,s=o.length,r=o.reduce((h,c)=>h+c.duration,0);a(""),a(n.bold("\u2500".repeat(40))),e>0?a(n.red(n.bold(`Doctor Complete: ${e}/${s} tests failed`))):a(n.green(n.bold(`Doctor Complete: ${t}/${s} tests passed`))),a(` Passed: ${n.green(String(t))}`),a(` Failed: ${n.red(String(e))}`),i>0&&a(` Skipped: ${n.yellow(String(i))}`),a(` Total time: ${n.dim(`${(r/1e3).toFixed(2)}s`)}`)}function I(o){return o.map(t=>{if(t.passed)return n.green(` [OK] ${t.description}`);{let e=` (expected: ${t.expected}, actual: ${t.actual})`;return n.red(` [FAIL] ${t.description}${e}`)}})}var Y=[p,l];async function L(o){let t=[],e=_(o);J(e.workingDirectory);for(let i of Y){let s=new i,r=i.description??"Test suite";A(i.name,r);let h=await s.runSuite(e);for(let c of h)if(j(c.name),q(c),t.push(c),c.status==="failed")return S(t),t}return S(t),t}var f=H(U(),1);var $=class o extends b{static{this.description="Run all theme command doctor-release tests"}static{this.hidden=!0}static{this.flags={...E,path:f.Flags.string({char:"p",description:"The path to run tests in. Defaults to current directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>P(t),default:async()=>y()}),environment:f.Flags.string({char:"e",description:"The environment to use from shopify.theme.toml (required for store-connected tests).",env:"SHOPIFY_FLAG_ENVIRONMENT",required:!0}),store:f.Flags.string({char:"s",description:"Store URL (overrides environment).",env:"SHOPIFY_FLAG_STORE"}),password:f.Flags.string({description:"Password from Theme Access app (overrides environment).",env:"SHOPIFY_FLAG_PASSWORD"})}}async run(){if(!R())return;let{flags:t}=await this.parse(o);(await L({path:t.path,environment:t.environment,store:t.store,password:t.password})).some(s=>s.status==="failed")&&(process.exitCode=1)}};export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as T}from"./chunk-
|
|
1
|
+
import{a as T}from"./chunk-TPGREOWO.js";import{b as P,c as w,d as v}from"./chunk-TSEPNC3O.js";import{a as F}from"./chunk-P7U6BWKN.js";import{a as x}from"./chunk-VJQJ5PTQ.js";import{Ga as y}from"./chunk-4MLEL3VK.js";import{b as h,c as m}from"./chunk-NGCPVRDM.js";import{B as d,I as l}from"./chunk-EEEKSYWV.js";import{Pb as r}from"./chunk-TB7HFPBB.js";import{r as N}from"./chunk-T6CC5WUU.js";import{e as A,g}from"./chunk-VKWPEFWQ.js";g();var s=A(N(),1);var p,a="_start",e=class extends F{async run(){let{flags:t}=await this.parse(p),n=a,{app:c}=await y({directory:t.path,userProvidedConfigName:t.config}),o=await w(c,t.path);if(t.export!==void 0)r(`Using export ${t.export} from the --export flag.`),n=t.export;else if(o.configuration.targeting!==void 0&&o.configuration.targeting.length>0){let i=o.configuration.targeting;if(i.length>1&&l({})){let b=i.map(f=>({label:f.target,value:f.export||a}));n=await d({message:"Which target would you like to execute?",choices:b})}else n=i?.[0]?.export||a,r(`Using export '${n}'. Use the --export flag or an interactive terminal to select a different export.`)}else r(`No targeting information found. Using the default export '${n}'. Use the --export flag or an interactive terminal to select a different export.`);let u=o?.configuration.targeting?.[0]?.input_query,U=u&&`${o?.directory}/${u}`,_=await v(o,t.path,t["client-id"],t.reset,t.config);return await T({functionExtension:o,json:t.json,inputPath:t.input,export:n,stdin:"inherit",schemaPath:_,queryPath:U}),{app:c}}};p=e;e.summary="Run a function locally for testing.";e.descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";e.description=p.descriptionWithoutMarkdown();e.flags={...h,...x,...P,...m,input:s.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:s.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"})};var G=e;export{G as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as r}from"./chunk-
|
|
1
|
+
import{Q as r}from"./chunk-TIU7MMRT.js";import{b as c}from"./chunk-UAYIFFYJ.js";import{Nb as a}from"./chunk-TB7HFPBB.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var o=class extends c{static{this.description="Logs you out of the Shopify account or Partner account and store."}async run(){await r(),a("Logged out from all the accounts")}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-UAYIFFYJ.js";import{u as t}from"./chunk-EEEKSYWV.js";import{k as r}from"./chunk-SZM6ANMN.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var e=class extends n{static{this.description="Run CLI doctor-release tests"}static{this.hidden=!0}async run(){r()&&t({headline:"Shopify CLI Doctor Release.",body:["Available doctor-release commands:",""," shopify doctor-release theme -e <environment> Run all theme command tests","","The -e/--environment flag is required to specify the store configuration.","Use --help with any command for more options."]})}};export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as R}from"./chunk-
|
|
1
|
+
import{n as R}from"./chunk-TIU7MMRT.js";import{a as T,b as k}from"./chunk-XXLGM6OZ.js";import{f as G}from"./chunk-7AY6HLQG.js";import{d as l}from"./chunk-IIFRDOYG.js";import{Fb as u,Hb as h,Oa as y,Pa as x,Pb as f,ka as $,ua as b,wa as g}from"./chunk-TB7HFPBB.js";import{d,i as w}from"./chunk-773TIA5M.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();function U(a){let t=/^(?:(?:https:\/\/)?([^:/]+\.[^:/]+)\/|git@([^:/]+)[:/]|([^/]+):)?([^/\s]+)\/([^/\s#]+)(?:((?:\/[^/\s#]+)+))?(?:\/)?(?:#(.+))?/.exec(a);if(!t){let v=["github:user/repo","user/repo/subdirectory","git@github.com:user/repo","user/repo#dev","https://github.com/user/repo"];return k(new Error(`Parsing the url ${a} failed. Supported formats are ${v.join(", ")}.`))}let e=t[1]??t[2]??t[3]??"github.com",r=e==="github"?"github.com":e,s=t[4],i=t[5].replace(/\.git$/,""),n=t[6]?.slice(1),o=t[7],p=o?`#${o}`:"",c=`git@${r}:${s}/${i}`,H=`https://${r}/${s}/${i}`,P=["https:/",r,s,i,n].join("/").concat(p);return T({full:P,site:r,user:s,name:i,ref:o,subDirectory:n,ssh:c,http:H})}function A(a){let t=new URL(a),e=t.hash?t.hash.slice(1):void 0,[r,s,i,...n]=t.pathname.split("/"),o=n.length>0?n.join("/"):void 0;return{baseURL:`${t.origin}/${s}/${i}`,branch:e,filePath:o}}async function B(a,t,e,r){let s=`https://github.com/${a}/releases/download/${t}/${e}`;return G("cmd_all_timing_network_ms")(async()=>{f(h`Downloading ${u.link(e,s)}`),await $(async i=>{let n=d(i,e),o;try{if(o=await R(s,void 0,"slow-request"),!o.ok)throw new l(`Failed to download ${e}: ${o.statusText}`)}catch(c){throw new l(`Failed to download ${e}: ${c instanceof Error?c.message:"unknown error"}`)}let p=await o.arrayBuffer();await b(n,Buffer.from(p)),await x(n,493),await g(w(r)),await y(n,r)}),f(h`${u.successIcon()} Successfully downloaded ${u.path(r)}`)})}export{U as a,A as b,B as c};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as _}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-TM44Z7U7.js";import{e as R}from"./chunk-N6IFIMC6.js";import{a as j}from"./chunk-KQTVJMV6.js";import{c as O,i as k,o as x}from"./chunk-HSVZU7MP.js";import{p as v,v as A}from"./chunk-4P54DKG4.js";import{b as F,c as L}from"./chunk-NGCPVRDM.js";import{J as y}from"./chunk-EEEKSYWV.js";import{d as T}from"./chunk-IIFRDOYG.js";import{$a as $,Lb as S,Pb as p,la as P,ua as g}from"./chunk-TB7HFPBB.js";import{d as m,i as w}from"./chunk-773TIA5M.js";import{r as U}from"./chunk-T6CC5WUU.js";import{e as D,g as l}from"./chunk-VKWPEFWQ.js";l();l();l();import{fileURLToPath as I}from"node:url";async function E(...i){let e=await $("package.json",{cwd:I(import.meta.url),type:"file"});if(!e)throw new Error("Failed to find CLI root path");return e.endsWith("/packages/theme/package.json")?m(w(e),"assets",...i):m(w(e),"dist","assets",...i)}async function b(i,e,s,t,n,f){let c=await O(i)?await j(f,i.storeFqdn):void 0;if(n)throw new T("Unable to use Admin API or Theme Access tokens with the profile command","You must authenticate manually by not passing the --password flag.");let d=await x(e,i,n,c),o=await k(d,{method:"GET",path:s,query:[],themeId:e,headers:{Accept:"application/vnd.speedscope+json"}});if(o.status!==200){let u=await o.text();throw new Error(`Bad response: ${o.status}: ${u}`)}let a=await o.text();t?S(a):await J(a)}async function J(i){let e=process.env.WSL_DISTRO_NAME,s=e?`//wsl$/${e}`:"",t=await E("speedscope","index.html");p(`[Theme Profile] Resolved URL to open: ${t}`);let n="liquid-profile",f=Buffer.from(i).toString("base64"),c=`speedscope.loadFileFromBase64(${JSON.stringify(n)}, ${JSON.stringify(f)})`,d=`speedscope-${Number(new Date)}-${process.pid}`,o=m(P(),`${d}.js`);p(`[Theme Profile] writing JS file to: ${o}`),await g(o,c),p(`[Theme Profile] JS file created successfully: ${o}`),t=`${s}${t}`,o=`${s}${o}`,t+=`#localProfilePath=${o}`;let a=m(P(),`${d}.html`);p(`[Theme Profile] writing HTML file to: ${a}`),await g(a,`<script>window.location=${JSON.stringify(t)}</script>`),p(`[Theme Profile] HTML file created successfully: ${a}`),a=`${s}${a}`,t=`file://${a}`,p(`[Theme Profile] Opening URL: ${t}`);let u=await y(t);p(`[Theme Profile] URL opened successfully: ${u}`)}var h=D(U(),1);var q,r=class extends A{async command(e,s){let{password:t}=e,n;e.theme?n={filter:{theme:e.theme}}:n={filter:{live:!0}};let f=await _(s,n),c=[{title:`Generating Liquid profile for ${s.storeFqdn} ${e.url}`,task:async()=>{await b(s,f.id.toString(),e.url,e.json,t,e["store-password"])}}];await R(c)}};q=r;r.summary="Profile the Liquid rendering of a theme page.";r.usage=["theme profile","theme profile --url /products/classic-leather-jacket"];r.descriptionWithMarkdown=`Profile the Shopify Liquid on a given page.
|
|
2
2
|
|
|
3
3
|
This command will open a web page with the Speedscope profiler detailing the time spent executing Liquid on the given page.`;r.description=q.descriptionWithoutMarkdown();r.flags={...F,...v,theme:h.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"}),url:h.Flags.string({description:"The url to be used as context",env:"SHOPIFY_FLAG_URL",default:"/"}),"store-password":h.Flags.string({description:"The password for storefronts with password protection.",env:"SHOPIFY_FLAG_STORE_PASSWORD"}),...L};r.multiEnvironmentsFlags=null;var le=r;export{le as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as mt,b as ht,f as _e,g as ae,h as A,i as ce,k as yt,n as Et}from"./chunk-
|
|
1
|
+
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as mt,b as ht,f as _e,g as ae,h as A,i as ce,k as yt,n as Et}from"./chunk-HSVZU7MP.js";import{a as M,l as ft,m as gt}from"./chunk-I5X3IP6T.js";import{s as ie,t as W}from"./chunk-4P54DKG4.js";import{a as O,b as N,e as st,g as nt,i as rt,j as ot,k as it,n as at,p as ct,q as lt,r as oe,s as $,u as dt,w as pt}from"./chunk-Q7BOSHWX.js";import{aa as ut}from"./chunk-L42FYXFW.js";import{va as L,xa as H}from"./chunk-TIU7MMRT.js";import{b as Qe}from"./chunk-5C7HDTHJ.js";import{P as tt,u as Ke,w as _,x as te,y as et}from"./chunk-EEEKSYWV.js";import{d as se}from"./chunk-IIFRDOYG.js";import{Fb as q,Hb as ne,Mb as re,O as Ve,Pb as F,Qb as D,Ta as v,Wa as C,_ as $e,bb as ke,ma as k,ua as be,wa as Xe,ya as Ze}from"./chunk-TB7HFPBB.js";import{d as E,g as V,j as Ge,k as j}from"./chunk-773TIA5M.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var ns=".shopifyignore",wt=/templates\/\*(\.(json|liquid))?$/,Tt=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=Ie(s),[a=[],u=[]]=Ie(n),[m=[],c=[]]=Ie(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(m,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Ve(l,f=>f.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>rs(n,i)||as(i)&&is(n,cs(i)));return(s?!r:r)?(F(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function Rt(e){let t=E(e,ns);return await v(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function Ie(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function rs(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!Tt.has(t)&&(Tt.add(t),_({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),os(t)?ke(e,t.replace(wt,"templates/**/*$1"),s):!1)}function os(e){return wt.test(e)}function is(e,t){return t.test(e)}function as(e){return e.startsWith("/")&&e.endsWith("/")}function cs(e){return new RegExp(e.slice(1,-1))}h();import St from"fs/promises";var le=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&D("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{F(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),D(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await St.writeFile(this.notifyPath,t),await St.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ls from"node:events";var Ft=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ls,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await pe(e,c),p=de(c,l),f=typeof l=="string"?l:"",x=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:p,value:f,attachment:x})),l},i=C(Ft,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let p=V(e,l),f=o(p).then(()=>{let x=t.get(p);return s.add(x.key),x.value??x.attachment??""});tt(5).then(()=>{s.delete(p)}).catch(()=>{}),r(c,{fileKey:p,onContent:x=>{f.then(P=>{P&&x(P)}).catch(()=>{})},onSync:x=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:p=>p()})},m=new Set(Ft.map(c=>E(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-VDIVGBZH.js");c.watch([...m],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var ds="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Pt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function $t(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>${e.title}</title>
|
|
@@ -97,7 +97,7 @@ import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as mt,b as ht,f as _e,g
|
|
|
97
97
|
})();`)}o.push("})();");let i=o.join(`
|
|
98
98
|
`);return oe(t,{getContents:()=>i,getMeta:()=>({type:"text/javascript",size:Buffer.byteLength(i),mtime:new Date})})}function Ee(e,t){return[...e.localThemeFileSystem.files.entries()].filter(([s])=>s.endsWith(".liquid")&&s.startsWith(`${t}s/`)).sort(([s],[n])=>s.localeCompare(n))}function Nt(e,t){let s=js[t],n=s.get(e.key);if(n?.checksum===e.checksum)return n.content;if(s.delete(e.key),!e.value)return;let r=[`/* ${e.key} */`],o=ge(e.value??"",t)?.trimEnd();if(o&&r.push(o),r.length>1){let i=r.join(`
|
|
99
99
|
`);return s.set(e.key,{checksum:e.checksum,content:i}),i}}h();import*as Wt from"node:os";function Ws(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Wt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function Ms(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Mt(e,t){let s=Ws(e,t);return $(n=>{let r=n.node.req.headers.host,o=Ms(r);if(!o||!s.has(o))return N(n,O({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Ut(){return Bt()}function qr(){return Bt()}function Bt(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as Us}from"node:http";async function zr(e,t){let s=await Js(e,t);return await zs(e,s),Bs(e,s)}function Bs(e,t){let s=dt();s.use(Mt(t.options.host,t.options.port)),s.use(Jt(e,t)),s.use(Ot(e,t)),s.use(jt(e,t)),s.use(Dt(e,t));let n=Us(pt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function Js(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",u=r??9293,m=Ut(),c=vt(o);return await c.ready(),{session:await Et(e.id.toString(),s,void 0,n,i),localThemeFileSystem:m,localThemeExtensionFileSystem:c,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:a,port:u,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function zs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{xe(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function fe(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var Re=Ye(ut(),1);import Ys from"node:events";var Me=new Map,K=new Map;function zt(e,t){let s=(0,Re.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?K.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):K.delete(e)}function Ue(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(j(e))}function Oe(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${E("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Ue(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(u){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function co(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=j(r);o(u=>{!Qs(r)&&Ue(r)&&a===".json"&&zt(r,u),xe(e,t,i,{type:"update",key:r,payload:Xs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),xe(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&zt(o,a)}else o.endsWith(".liquid")&&Xt(i)}))})}var Gs="1",Gt=new Ys;function we(e){Gt.emit("hot-reload",{...e,version:Gs})}function Jt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=lt(s);return Gt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{_({headline:"Failed to send HotReload event.",body:a.stack})})}),we({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,Re.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?te(o):o.type==="warn"?_(o):o.type==="info"?Ke(o):_({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Vt)return k(Se()).then(o=>it(s,o,"application/javascript")).catch(o=>N(s,O({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",u=s.path.split("?")[0]??"",m=new URLSearchParams(r);if(m.delete("section_key"),m.delete("section_id"),m.delete("app_block_id"),m.delete("_fd"),m.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let p=t.localThemeFileSystem.files.get(o)?.value;if(!p)return"";c[o]=p}for(let p of l)if(p.endsWith(".json")){for(let[f,x]of K.get(p)??[])if(i.endsWith(`__${x}`)){let P=t.localThemeFileSystem.files.get(p)?.value;P&&(c[p]=P);continue}}}return ce(t.session,{method:s.method,path:u??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:ct(s),replaceExtensionTemplates:fe(t)}).then(async l=>{if(!l.ok)throw H("theme-service:hot-reload:section:render-failed"),ae(l);return Q(t,l)}).catch(async l=>{let{status:p,statusText:f,...x}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||_(x),new Response(null,{status:p,statusText:f})})}})}var ee=(e,t)=>we({themeId:String(e),type:"full",key:t});function xe(e,t,s,n){let r=()=>ee(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);we({sync:"local",themeId:o,...n}),s(()=>we({sync:"remote",themeId:o,...n}),r)}function Vs(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,Re.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of K)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function Xs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Vs(e,t):[],replaceTemplates:Ue(e)?Oe(t):{},updatedFileParts:n&&Xt(n)}}var Te="hot-reload-client",Zs="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Yt=new RegExp(`<script id="${Te}"[^>]*>[^<]*</script>`),Vt="/@shopify/theme-hot-reload";function Ne(e,t){return t.options.liveReload==="off"?e.replace(Yt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Yt,"").replace(/<\/head>/,`<script id="${Te}" src="${Vt}" defer></script></head>`):e.includes(`<script id="${Te}"`)?e:e.replace(/<\/head>/,`<script id="${Te}" src="${Zs}" defer></script></head>`)}function Qs(e){return e.startsWith("assets/")}function Xt(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Me.get(e.key);if(o?.checksum===e.checksum||(Me.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,m=(c,l)=>{u=u.replace(l,"");let p=a(l),f=`${c}Tag`;n[f]=!o||p!==o[f],r[f]=p};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return u=a(u.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=u,n.liquid=!o||u!==o.liquid,Me.set(e.key,r),n}h();var Zt=Ye(ut(),1);function Ks(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Qt(e,t,s){if(Ks(s)){let n=E(e,"listings",t,s);if(await v(n))return n}}async function Kt(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Zt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function go(e,t){let s=E(e,"listings"),n=E(s,t);if(await v(n))return;let o=[];await v(s)&&(o=await C("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${$e(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new se(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import en from"node:events";import{fileURLToPath as tn}from"node:url";var sn=250,es=["assets/**/*.*","config/**/*.json","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],b={layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function Co(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new en,a=(d,g)=>{i.emit(d,g)},u=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await rn(e,d,t.listing):await pe(e,d),y=de(d,g);return s.set(d,M({key:d,checksum:y,value:typeof g=="string"?g:"",attachment:Buffer.isBuffer(g)?g.toString("base64"):""})),g},c=C(es,{cwd:e,deep:3,ignore:W}).then(d=>Promise.all([Rt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),p=d=>Le([{key:d}],o).length===0;function f(d,g,y,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===Se()){ee(g,T);return}let R=l(T);if(t?.listing&&R.startsWith(`listings/${t.listing}/`)){let w=R.replace(`listings/${t.listing}/`,"");if(w.startsWith("templates/")||w.startsWith("sections/"))R=w;else return}x(R).then(()=>{switch(d){case"add":case"change":return P(d,g,y,R);case"unlink":return ve(g,y,R,n)}}).catch(w=>{D(`Error handling file event for ${R}: ${w}`)})}function x(d){return u?.notify(d)??Promise.resolve()}let P=(d,g,y,T)=>{if(p(T))return;let R=s.get(T)?.checksum,w=m(T).then(async()=>{let S=s.get(T);if(S)return S.checksum!==R&&r.add(T),{value:S.value||void 0,attachment:S.attachment}}),I=w.then(S=>{if(S)return nn(r,n,T,g,y)(S)}).catch(_e(T,"upload"));a(d,{fileKey:T,onContent:S=>{w.then(Y=>{r.has(T)&&S(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(S,Y)=>{I.then(G=>{G?S():Y?.()}).catch(()=>{})}})},ve=(d,g,y,T)=>{if(p(y))return;T.delete(y),s.delete(y),r.add(y);let R=t?.noDelete?Promise.resolve():ft(Number(d),[y],g).then(async w=>{if(!w[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ts("delete",y),!0}).catch(w=>(_e(y,"delete")(w),!1));a("unlink",{fileKey:y,onSync:w=>{R.then(I=>{I&&w()}).catch(()=>{})}})},Pe=new Set(es.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&Pe.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&Pe.add(Se()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await on(e,d)},write:async d=>{let g=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&g){let y=E("listings",t.listing,d.key),T=E(e,y),R=await v(T);s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),R?await Be(e,{...d,key:y}):await Be(e,d);return}s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Be(e,d)},read:m,applyIgnoreFilters:d=>Le(d,o),addEventListener:(d,g)=>{i.on(d,g)},startWatcher:async(d,g)=>{let{default:y}=await import("./chokidar-VDIVGBZH.js"),T=y.watch([...Pe],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),R=new Map,w=(I,S)=>{let G=`${l(S)}:${I}`,ze=R.get(G);ze&&clearTimeout(ze);let ss=setTimeout(()=>{R.delete(G),f(I,d,g,S)},sn);R.set(G,ss)};T.on("add",w.bind(null,"add")).on("change",w.bind(null,"change")).on("unlink",w.bind(null,"unlink")).on("error",I=>{D(`File watcher error: ${I}`),L("theme-service:file-watcher:error")})}}}function nn(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await gt(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ee(n,s),new Error(a.join(`
|
|
100
|
-
`))}return t.delete(s)&&ee(n,s),e.delete(s),ts("update",s),!0}}async function Be(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await an(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function pe(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await v(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function rn(e,t,s){if(t==="config/settings_data.json")return Kt(e,s);let n=await Qt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return pe(e,t)}async function on(e,t){let s=E(e,t);if(!await v(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Ze(s)}function Ao(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],m=[],c=[],l=[];return e.forEach(p=>{let f=p.key;f.endsWith(".liquid")?b.sectionLiquidRegex.test(f)?t.push(p):b.blockLiquidRegex.test(f)?c.push(p):b.layoutLiquidRegex.test(f)?l.push(p):s.push(p):b.configSchemaRegex.test(f)?a.push(p):b.configDataRegex.test(f)?u.push(p):b.jsonRegex.test(f)?b.contextualizedJsonRegex.test(f)?i.push(p):b.sectionJsonRegex.test(f)?n.push(p):b.templateJsonRegex.test(f)?r.push(p):o.push(p):b.staticAssetRegex.test(f)&&m.push(p)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,staticAssetFiles:m,blockLiquidFiles:c,layoutFiles:l}}function Fe(e){return xt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml"].includes(U(e))}async function Ho(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","
|
|
100
|
+
`))}return t.delete(s)&&ee(n,s),e.delete(s),ts("update",s),!0}}async function Be(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await an(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function pe(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await v(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function rn(e,t,s){if(t==="config/settings_data.json")return Kt(e,s);let n=await Qt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return pe(e,t)}async function on(e,t){let s=E(e,t);if(!await v(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Ze(s)}function Ao(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],m=[],c=[],l=[];return e.forEach(p=>{let f=p.key;f.endsWith(".liquid")?b.sectionLiquidRegex.test(f)?t.push(p):b.blockLiquidRegex.test(f)?c.push(p):b.layoutLiquidRegex.test(f)?l.push(p):s.push(p):b.configSchemaRegex.test(f)?a.push(p):b.configDataRegex.test(f)?u.push(p):b.jsonRegex.test(f)?b.contextualizedJsonRegex.test(f)?i.push(p):b.sectionJsonRegex.test(f)?n.push(p):b.templateJsonRegex.test(f)?r.push(p):o.push(p):b.staticAssetRegex.test(f)&&m.push(p)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,staticAssetFiles:m,blockLiquidFiles:c,layoutFiles:l}}function Fe(e){return xt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml"].includes(U(e))}async function Ho(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","templates"].every(n=>t.has(n))}async function an(e){let t=cn(e);await v(t)||await Xe(t)}function cn(e){let t=Ge(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ts(e,t){re(ne`• ${ie.format(new Date)} Synced ${q.raw("\xBB")} ${e} ${t}`)}function Se(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?E(tn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function de(e,t){return t?Buffer.isBuffer(t)?Je(t):un(e)?ln(t):dn(e,t):""}function ln(e){let t=e;return t=t.replace(/\r\n/g,`
|
|
101
101
|
`),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=pn(t),Je(t)}function dn(e,t){let s=t;return Fe(e)&&(s=s.replace(/\r\n/g,`
|
|
102
102
|
`)),Je(s)}function pn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
|
|
103
103
|
`))&&(n+=r,s=r==="\\"&&!s);return n}function Je(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Qe(t)}function Mo(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function un(e){return e.endsWith("/settings_data.json")}export{Mo as a,jt as b,Dt as c,Ot as d,Mt as e,qr as f,zr as g,co as h,Jt as i,ee as j,go as k,Co as l,Ao as m,Ho as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,g as c,i as p,j as f}from"./chunk-
|
|
1
|
+
import{b as a,g as c,i as p,j as f}from"./chunk-I5X3IP6T.js";import{g as h}from"./chunk-IIFRDOYG.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();i();i();function d(n){let e=/[^\p{Letter}\p{Number}\p{Mark}-]/gu;return n.replace(e,"-")}import{randomBytes as l}from"crypto";import{hostname as g}from"os";var T=50;function m(n){let e=g().split(".")[0],r=l(3).toString("hex"),t=`${n} ()`,s=T-t.length-r.length-1,o=d(`${r}-${e.substring(0,s)}`);return`${n} (${o})`}var u=class{constructor(e){this.adminSession=e}async findOrCreate(e,r){let t=await this.fetch(e,r);return t?this.setTheme(t.id.toString()):t=await this.create(r,e),t}async fetch(e,r){if(!this.themeId&&!e)return;let t=e&&r===a?await p(e,this.adminSession):await c(parseInt(this.themeId,10),this.adminSession);return t||this.removeTheme(),t}generateThemeName(e){return m(e)}async create(e,r){let t=r??m(this.context),s=e??a,o=await f({name:t,role:s},this.adminSession);if(!o)throw new h(`Could not create theme with name "${t}" and role "${s}"`);return this.setTheme(o.id.toString()),o}};export{u as a};
|