@shopify/cli 4.8.2 → 4.8.4
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-M4OC7RPG.js +1 -0
- package/dist/{analytics-5K4B2DE4.js → analytics-RGIJMP4U.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-3NVQTA2F.js → chunk-2HW6VRJT.js} +1 -1
- package/dist/{chunk-IGRDJ4EC.js → chunk-2HYR6EUD.js} +1 -1
- package/dist/{chunk-MWJVYQVC.js → chunk-2IRRFPEY.js} +1 -1
- package/dist/{chunk-CAT3FQ6U.js → chunk-2SL443J6.js} +1 -1
- package/dist/{chunk-MJ3WNVMQ.js → chunk-2VJ6NBPV.js} +1 -1
- package/dist/{chunk-WJ6GLVIM.js → chunk-2WATX3XV.js} +1 -1
- package/dist/{chunk-QJW6UIRU.js → chunk-2ZROBXJX.js} +1 -1
- package/dist/{chunk-DJGDJSXS.js → chunk-3CZ7DKE5.js} +1 -1
- package/dist/{chunk-M47E7LE5.js → chunk-3DIRCEXA.js} +1 -1
- package/dist/{chunk-KANWS6HC.js → chunk-3DT4NS4S.js} +1 -1
- package/dist/{chunk-2AJKHY5T.js → chunk-3IQ6WXDD.js} +1 -1
- package/dist/{chunk-DD7FQDTB.js → chunk-43FRAUV6.js} +3 -3
- package/dist/chunk-44QD4QNO.js +1 -0
- package/dist/{chunk-XQIPACFV.js → chunk-4DLRS7MT.js} +3 -3
- package/dist/{chunk-EVIITVUM.js → chunk-4F3XYIEY.js} +1 -1
- package/dist/{chunk-2MMJVHYZ.js → chunk-4HOJJCZ6.js} +1 -1
- package/dist/{chunk-7MFISB2R.js → chunk-4OMKKYFC.js} +1 -1
- package/dist/{chunk-R7XKECV5.js → chunk-4ZTRKEA2.js} +1 -1
- package/dist/{chunk-ROIASQF4.js → chunk-5DMFEDKY.js} +1 -1
- package/dist/{chunk-3EO3UEPZ.js → chunk-5Z6EW3FA.js} +1 -1
- package/dist/{chunk-5EW33K5C.js → chunk-66G2HJ2A.js} +1 -1
- package/dist/{chunk-UXFTZHBG.js → chunk-66HW6J57.js} +1 -1
- package/dist/{chunk-XS6EKKTD.js → chunk-67QK26HI.js} +1 -1
- package/dist/{chunk-RR4KN46J.js → chunk-6A3TDSON.js} +1 -1
- package/dist/{chunk-F6SKKCKZ.js → chunk-6B727IUY.js} +1 -1
- package/dist/{chunk-ESTXKKAB.js → chunk-6C5AVMKR.js} +1 -1
- package/dist/{chunk-2JORC3Q5.js → chunk-6CR2EEZ3.js} +1 -1
- package/dist/{chunk-5FHTBBDR.js → chunk-6P5FGN6P.js} +1 -1
- package/dist/{chunk-NAIXUSEF.js → chunk-6QADNGH4.js} +1 -1
- package/dist/{chunk-YXS4SFIN.js → chunk-6V6UNUMM.js} +1 -1
- package/dist/chunk-6XLFFOPK.js +1 -0
- package/dist/{chunk-BZC3KLVQ.js → chunk-74CYT3VX.js} +1 -1
- package/dist/{chunk-73MCDHWW.js → chunk-7FVCUY54.js} +1 -1
- package/dist/{chunk-AAEJL2TP.js → chunk-7KLPRSQR.js} +1 -1
- package/dist/{chunk-AD6BC3N6.js → chunk-7LZ34C4S.js} +1 -1
- package/dist/{chunk-THEONODK.js → chunk-7VQBIGJB.js} +1 -1
- package/dist/{chunk-XMQJUFVE.js → chunk-A3U7JDUC.js} +1 -1
- package/dist/{chunk-NEREVIKL.js → chunk-A3V2A2I4.js} +1 -1
- package/dist/{chunk-LZC2EJLI.js → chunk-A5U4KKNV.js} +1 -1
- package/dist/{chunk-XLEGKHUM.js → chunk-AIILEPSK.js} +1 -1
- package/dist/{chunk-6ZCPQOWW.js → chunk-APUYMORT.js} +1 -1
- package/dist/{chunk-44OAVCF6.js → chunk-AQPOPSQ7.js} +1 -1
- package/dist/{chunk-T7RMEJNE.js → chunk-AU7GNCOK.js} +1 -1
- package/dist/{chunk-EUSOP35K.js → chunk-BAWBC66R.js} +1 -1
- package/dist/{chunk-N6SZTZNB.js → chunk-BG7QQU23.js} +1 -1
- package/dist/{chunk-AXZG7H2F.js → chunk-BHJ3TGS7.js} +1 -1
- package/dist/{chunk-A27WKAFQ.js → chunk-BHTHUKHU.js} +1 -1
- package/dist/{chunk-65YY4727.js → chunk-BV62ZERJ.js} +1 -1
- package/dist/{chunk-GV2JI5PS.js → chunk-BYX7SQPM.js} +1 -1
- package/dist/{chunk-5NT2BNMB.js → chunk-C4Y7PQDQ.js} +1 -1
- package/dist/{chunk-R5ONMTHY.js → chunk-CBMX6XI7.js} +1 -1
- package/dist/{chunk-WKCXSP6V.js → chunk-CFQ5G2QS.js} +1 -1
- package/dist/{chunk-NYHGIWKZ.js → chunk-CNK3ZO2B.js} +5 -5
- package/dist/{chunk-7CV75WGB.js → chunk-CP56F5UR.js} +1 -1
- package/dist/{chunk-XZSSBNGP.js → chunk-CSOCXWP6.js} +98 -92
- package/dist/{chunk-7LW23M5C.js → chunk-CVW2HMQO.js} +2 -2
- package/dist/{chunk-XLSKATCP.js → chunk-D6LQ56XT.js} +1 -1
- package/dist/{chunk-KQJBTX6K.js → chunk-D6QTOQEJ.js} +1 -1
- package/dist/{chunk-CLUMXUR5.js → chunk-DDZEYA2I.js} +1 -1
- package/dist/{chunk-WU5HO6FZ.js → chunk-DH3DMUE2.js} +1 -1
- package/dist/{chunk-4Y7WHAJX.js → chunk-DO4SRE4M.js} +1 -1
- package/dist/{chunk-LY7PSCG4.js → chunk-DUNE3INK.js} +1 -1
- package/dist/{chunk-JADBWMQS.js → chunk-DZZORIWL.js} +1 -1
- package/dist/{chunk-JIZ3BECO.js → chunk-EJJPEWSB.js} +1 -1
- package/dist/{chunk-PKGJTTCP.js → chunk-EQ2PD2ZA.js} +1 -1
- package/dist/{chunk-YRRGHHTP.js → chunk-ERBXXVOZ.js} +1 -1
- package/dist/{chunk-DLCJRY3W.js → chunk-FGRW7GT4.js} +1 -1
- package/dist/{chunk-HQHKCLIU.js → chunk-FRRA5MI2.js} +1 -1
- package/dist/{chunk-QB6J3J6O.js → chunk-FRVRTOTF.js} +1 -1
- package/dist/{chunk-2GDXU42J.js → chunk-FW3RORD7.js} +1 -1
- package/dist/{chunk-OCT65FRG.js → chunk-FY47X4NG.js} +1 -1
- package/dist/{chunk-PPWJM7KE.js → chunk-G2YTINLI.js} +1 -1
- package/dist/{chunk-N4WEI6JA.js → chunk-GGPMDCCB.js} +1 -1
- package/dist/{chunk-N7VI7OWJ.js → chunk-GINXNPAR.js} +1 -1
- package/dist/{chunk-EZ6VGZXC.js → chunk-GJHBAOGJ.js} +1 -1
- package/dist/{chunk-5GBIXC2Y.js → chunk-GTAYTMCP.js} +1 -1
- package/dist/{chunk-H72B4Y5L.js → chunk-H2HR2AQE.js} +1 -1
- package/dist/{chunk-I2PSC3VF.js → chunk-H7TDIRIU.js} +1 -1
- package/dist/{chunk-KLXOMT3K.js → chunk-HINK4QAR.js} +1 -1
- package/dist/{chunk-HGJIYWXY.js → chunk-HXVUDGLH.js} +1 -1
- package/dist/{chunk-EJCBL2W2.js → chunk-HYM3HBDG.js} +1 -1
- package/dist/{chunk-5LGEBELU.js → chunk-HYPY5WH6.js} +1 -1
- package/dist/{chunk-LHLYEFO7.js → chunk-IHEBV2KO.js} +1 -1
- package/dist/{chunk-YAPH7GMC.js → chunk-IHH5XTPV.js} +1 -1
- package/dist/{chunk-T4UZOUVM.js → chunk-JJJIRCQP.js} +1 -1
- package/dist/{chunk-6BNOQJHH.js → chunk-JQPPLSFT.js} +1 -1
- package/dist/{chunk-UXDW37V5.js → chunk-JWHQPDOK.js} +1 -1
- package/dist/{chunk-36ZTFNMR.js → chunk-JXG2T76F.js} +1 -1
- package/dist/{chunk-GZKEIUJT.js → chunk-K2DP5Z76.js} +1 -1
- package/dist/{chunk-2D46X762.js → chunk-KUZ5Z6HM.js} +1 -1
- package/dist/{chunk-4YMU5WAG.js → chunk-KWQGJ3VC.js} +1 -1
- package/dist/{chunk-HGRTQIGQ.js → chunk-KZU727AL.js} +1 -1
- package/dist/{chunk-T6M5V6RH.js → chunk-L2DCUVZV.js} +1 -1
- package/dist/{chunk-ZQQDUU3T.js → chunk-L3JBKCAS.js} +1 -1
- package/dist/{chunk-XTPBKTAX.js → chunk-L3M7PTHU.js} +1 -1
- package/dist/{chunk-N4N35AQP.js → chunk-L4LDNEFK.js} +1 -1
- package/dist/{chunk-R5EBKVQR.js → chunk-LAMTFOVF.js} +1 -1
- package/dist/{chunk-PEWR7SF6.js → chunk-LBA6FGKC.js} +1 -1
- package/dist/{chunk-QD2KPFUT.js → chunk-LEW5IJK6.js} +1 -1
- package/dist/{chunk-QYV62H24.js → chunk-LX5UXWZ7.js} +1 -1
- package/dist/{chunk-VEVKY5LR.js → chunk-M7VQLMSW.js} +1 -1
- package/dist/{chunk-26LLUNJJ.js → chunk-MBRFIXCU.js} +1 -1
- package/dist/{chunk-ZQ4KG6U2.js → chunk-MYLMGH7Y.js} +1 -1
- package/dist/{chunk-ATMII5E5.js → chunk-NBXXTQWA.js} +1 -1
- package/dist/{chunk-N6A3ISBE.js → chunk-NDT3F2PR.js} +1 -1
- package/dist/{chunk-BCWKIFNX.js → chunk-NHOF2IN6.js} +1 -1
- package/dist/{chunk-X3PGH5S4.js → chunk-NKC3K3XP.js} +1 -1
- package/dist/chunk-O72SHE3Q.js +7 -0
- package/dist/chunk-OAG72Q2O.js +1 -0
- package/dist/{chunk-5GK7UKIP.js → chunk-OPOPO7DG.js} +1 -1
- package/dist/{chunk-M6KOCZVH.js → chunk-OUA6EOLX.js} +1 -1
- package/dist/{chunk-7SHHNWHL.js → chunk-OY6L7J53.js} +1 -1
- package/dist/{chunk-RB7J7C3A.js → chunk-OYCAYEQE.js} +1 -1
- package/dist/{chunk-AFA4NLPV.js → chunk-PGWQHSDV.js} +1 -1
- package/dist/{chunk-EEKB5GN6.js → chunk-PM3HRKPR.js} +1 -1
- package/dist/{chunk-7MZEOTFK.js → chunk-PNNW7YQG.js} +1 -1
- package/dist/{chunk-YP35VTKI.js → chunk-POMWFTBD.js} +1 -1
- package/dist/{chunk-BC42C35S.js → chunk-QKTBYAUD.js} +1 -1
- package/dist/{chunk-7VW2J53A.js → chunk-QVO5CAJN.js} +2 -2
- package/dist/{chunk-76PGSVVM.js → chunk-QXR5DJC2.js} +1 -1
- package/dist/{chunk-AEUVT7IU.js → chunk-QZEDYQVT.js} +1 -1
- package/dist/{chunk-O2FGO4CJ.js → chunk-R3GLEZSE.js} +1 -1
- package/dist/{chunk-SNAIF3ST.js → chunk-RDS2WYQH.js} +1 -1
- package/dist/{chunk-HCTPSLRL.js → chunk-RHBLXZGU.js} +1 -1
- package/dist/{chunk-F2X7F5QX.js → chunk-RHNZA4IL.js} +1 -1
- package/dist/{chunk-564CWTLZ.js → chunk-RIM7FNP3.js} +1 -1
- package/dist/{chunk-S67RM4AH.js → chunk-S5H5U3PR.js} +1 -1
- package/dist/{chunk-CGYVLQCZ.js → chunk-SCLGMVNB.js} +1 -1
- package/dist/{chunk-RF54RVOL.js → chunk-SPNM3GES.js} +1 -1
- package/dist/{chunk-LQJMBNVQ.js → chunk-SVYHWGMI.js} +1 -1
- package/dist/{chunk-F4HKZVXJ.js → chunk-T4V7KOGJ.js} +3 -3
- package/dist/{chunk-472T4YTY.js → chunk-TA2M37OB.js} +1 -1
- package/dist/{chunk-A6FO2ZZW.js → chunk-TAY7HU7X.js} +2 -2
- package/dist/{chunk-ZKWJX5GE.js → chunk-TCFGEOE4.js} +12 -12
- package/dist/{chunk-CEDXFKIK.js → chunk-U6URYCC6.js} +1 -1
- package/dist/{chunk-3NSZBIHE.js → chunk-UJBMY5WR.js} +1 -1
- package/dist/{chunk-FGZNKGW5.js → chunk-UPGRXCFS.js} +1 -1
- package/dist/{chunk-5AFM6CVE.js → chunk-V2GLAK2W.js} +1 -1
- package/dist/{chunk-M6Z6NXCE.js → chunk-V4774HTF.js} +1 -1
- package/dist/{chunk-JP4O56VD.js → chunk-VBICZDA4.js} +1 -1
- package/dist/{chunk-7BYWIVUZ.js → chunk-VDGTHMIQ.js} +1 -1
- package/dist/{chunk-ZG3I4COP.js → chunk-VETLNJ56.js} +1 -1
- package/dist/{chunk-2JXH2CQB.js → chunk-VG3YVCZW.js} +1 -1
- package/dist/chunk-VJ5YOXKL.js +1 -0
- package/dist/{chunk-3QF47EX2.js → chunk-W4SGAPPR.js} +1 -1
- package/dist/{chunk-AHFOIPEK.js → chunk-W4SQE6NR.js} +1 -1
- package/dist/{chunk-TQRKW6W3.js → chunk-WAJRWCZY.js} +1 -1
- package/dist/{chunk-WAVWKGSF.js → chunk-WGFGWDWP.js} +1 -1
- package/dist/{chunk-BPI25I3Q.js → chunk-WGUCRVII.js} +1 -1
- package/dist/{chunk-WSPQWLOS.js → chunk-WY7QF7VU.js} +1 -1
- package/dist/{chunk-RFYFI72S.js → chunk-X4V2CD2H.js} +1 -1
- package/dist/{chunk-ATFKBLMQ.js → chunk-XHXKPRF5.js} +1 -1
- package/dist/{chunk-AGKG5G6X.js → chunk-XKHKXUQY.js} +1 -1
- package/dist/chunk-XOYICV6P.js +1 -0
- package/dist/{chunk-VNW2YMPM.js → chunk-XRJCD3AO.js} +1 -1
- package/dist/{chunk-DY64LYXB.js → chunk-XWXAFJFC.js} +1 -1
- package/dist/{chunk-D7S4HEQE.js → chunk-XYUTD6IU.js} +1 -1
- package/dist/{chunk-JVZ3VF4D.js → chunk-Y4BBTWM5.js} +1 -1
- package/dist/{chunk-D3DCP4OT.js → chunk-YHTONNIZ.js} +1 -1
- package/dist/{chunk-NL7WDQSR.js → chunk-YNFXYVYN.js} +1 -1
- package/dist/{chunk-KTILY5HE.js → chunk-Z2HN5L6G.js} +1 -1
- package/dist/{chunk-6F6LL5UM.js → chunk-Z5KYKXMH.js} +1 -1
- package/dist/{chunk-KKUA7VMA.js → chunk-ZAH6QID2.js} +1 -1
- package/dist/{chunk-Q4BTAXLS.js → chunk-ZCNNJCTQ.js} +1 -1
- package/dist/chunk-ZVA5F4QC.js +272 -0
- package/dist/{chunk-2ZGU7VWR.js → chunk-ZVJD6CUY.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/doctor/instructions.js +1 -1
- package/dist/cli/commands/app/doctor.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/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.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/send-analytics.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-OFRC7GO7.js → conf-store-H3UAVGN5.js} +1 -1
- package/dist/configs/all.yml +8 -5
- package/dist/configs/recommended.yml +8 -5
- package/dist/data/objects.json +487 -75
- package/dist/data/shopify_system_translations.json +8 -7
- package/dist/data/tags.json +23 -0
- package/dist/{deprecations-PSCEZAQH.js → deprecations-TEUM7CML.js} +1 -1
- package/dist/dist-62I5X3FS.js +1 -0
- package/dist/dist-YHZ5BTYD.js +1 -0
- package/dist/{environments-FFWXZPU5.js → environments-LAFWOQWO.js} +1 -1
- package/dist/{error-UHLTMPVC.js → error-6ZCGAC5E.js} +1 -1
- package/dist/error-handler-JNCW56EC.js +1 -0
- package/dist/{fs-N6AHVL6I.js → fs-QEWOWUPQ.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-DDGO2AWZ.js → is-global-UYMEAGDR.js} +1 -1
- package/dist/{local-JZRBCKAH.js → local-Z4ZEMWE4.js} +1 -1
- package/dist/{metadata-KYBVCKB5.js → metadata-ZCQMB5AB.js} +1 -1
- package/dist/{node-package-manager-O3DQCYJC.js → node-package-manager-HMOTOBDS.js} +1 -1
- package/dist/notifications-system-RT3CY6LZ.js +1 -0
- package/dist/os-G6KDPJMC.js +1 -0
- package/dist/{output-VAVFLR73.js → output-BJCZYDNG.js} +1 -1
- package/dist/{system-3PB7N6PP.js → system-T4H2ISV6.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-YTGKLMHA.js → ui-4MQSY5IN.js} +1 -1
- package/dist/upgrade-4234MIYJ.js +1 -0
- package/dist/version-FRSRSCRX.js +1 -0
- package/dist/{version-5OTQ3U3D.js → version-RF7QQXRX.js} +1 -1
- package/dist/{workerd-GHAVFNOO.js → workerd-7E4H2DM3.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/analytics-3SII67XF.js +0 -1
- package/dist/chunk-BFL74TW2.js +0 -1
- package/dist/chunk-DWI2BHXZ.js +0 -1
- package/dist/chunk-GJ34J3XJ.js +0 -7
- package/dist/chunk-ID3AR4VW.js +0 -1
- package/dist/chunk-LX7W4GUD.js +0 -1
- package/dist/chunk-PIYTMQRC.js +0 -1
- package/dist/chunk-W25XMFZJ.js +0 -273
- package/dist/dist-733YLWJN.js +0 -1
- package/dist/dist-KOFJQ4RY.js +0 -1
- package/dist/error-handler-PVVDX7WF.js +0 -1
- package/dist/notifications-system-O7JENRRD.js +0 -1
- package/dist/os-ZZ47F6CA.js +0 -1
- package/dist/upgrade-XYGE5PDR.js +0 -1
- package/dist/version-P72VURM3.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-
|
|
1
|
+
import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-OY6L7J53.js";import{a as M,l as gt,m as yt}from"./chunk-GTAYTMCP.js";import{s as ie,t as W}from"./chunk-DO4SRE4M.js";import{a as D,b as O,e as nt,g as rt,i as ot,j as it,k as at,n as ct,p as lt,q as dt,r as oe,s as b,u as ut,w as pt}from"./chunk-Q7BOSHWX.js";import{aa as mt}from"./chunk-ZVA5F4QC.js";import{Aa as H,c as Ke,ya as L}from"./chunk-CNK3ZO2B.js";import{A as I,B as te,C as tt,T as st,y as et}from"./chunk-6C5AVMKR.js";import{h as se}from"./chunk-OAG72Q2O.js";import{Ab as P,Bb as N,O as Xe,Ta as $,Wa as C,Z as $e,bb as ke,ma as k,qb as j,sb as ne,ua as be,wa as Ze,xb as re,ya as Qe}from"./chunk-43FRAUV6.js";import{d as T,g as V,j as Ve,k as q}from"./chunk-773TIA5M.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var rs=".shopifyignore",Rt=/templates\/\*(\.(json|liquid))?$/,St=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=_e(s),[a=[],u=[]]=_e(n),[p=[],c=[]]=_e(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(p,"--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"))),Xe(l,x=>x.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>os(n,i)||cs(i)&&as(n,ls(i)));return(s?!r:r)?(P(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function wt(e){let t=T(e,rs);return await $(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function _e(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function os(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!St.has(t)&&(St.add(t),I({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),is(t)?ke(e,t.replace(Rt,"templates/**/*$1"),s):!1)}function is(e){return Rt.test(e)}function as(e,t){return t.test(e)}function cs(e){return e.startsWith("/")&&e.endsWith("/")}function ls(e){return new RegExp(e.slice(1,-1))}h();import Ft from"fs/promises";var le=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&N("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{P(`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}`)),N(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 Ft.writeFile(this.notifyPath,t),await Ft.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 ds from"node:events";var Pt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ds,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await ue(e,c),m=de(c,l),x=typeof l=="string"?l:"",f=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:m,value:x,attachment:f})),l},i=C(Pt,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let m=V(e,l),x=o(m).then(()=>{let f=t.get(m);return s.add(f.key),f.value??f.attachment??""});st(5).then(()=>{s.delete(m)}).catch(()=>{}),r(c,{fileKey:m,onContent:f=>{x.then(g=>{g&&f(g)}).catch(()=>{})},onSync:f=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:m=>m()})},p=new Set(Pt.map(c=>T(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-5RWEYTNQ.js");c.watch([...p],{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 us="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function $t(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function bt(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>${e.title}</title>
|
|
@@ -66,12 +66,12 @@ import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g
|
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
</body>
|
|
69
|
-
</html>`}h();h();var ps=/<head(\s[^>]*)?>/i,qe="https://cdn.shopify.com/storefront",ms=`${qe}/standard-events.js`,hs=`${qe}/standard-events.dev.js`,kt=`${qe}/standard-events-inspector.js`,It="shopify-cli-standard-events-inspector",fs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${je(It)}["']|\\bsrc=["']${je(kt)}["'])[^>]*>`,"i"),gs=new RegExp(je(ms),"g");function pe(e){return fs.test(e)?e:e.replace(ps,t=>`${t}<script id="${It}" src="${kt}" defer></script>`)}function _t(e){return e.replace(gs,hs)}function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}h();var Lt=80;function X(e,t,s){if(!ys(e)||s.type==="theme-extension")return;let n=e.path.length>Lt?`${e.path.substring(0,Lt)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=Es(t.status),
|
|
70
|
-
`)}))}):ce(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:He(s),replaceExtensionTemplates:fe(t),replaceTemplates:
|
|
71
|
-
`);return te(c),
|
|
72
|
-
`,"")??""}]})})})}function
|
|
73
|
-
`)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};h();h();function ge(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}h();function ye(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var As={stylesheet:new Map,javascript:new Map};function
|
|
74
|
-
`];for(let[,a]of[...s,...n,...r]){let
|
|
69
|
+
</html>`}h();h();var ps=/<head(\s[^>]*)?>/i,qe="https://cdn.shopify.com/storefront",ms=`${qe}/standard-events.js`,hs=`${qe}/standard-events.dev.js`,kt=`${qe}/standard-events-inspector.js`,It="shopify-cli-standard-events-inspector",fs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${je(It)}["']|\\bsrc=["']${je(kt)}["'])[^>]*>`,"i"),gs=new RegExp(je(ms),"g");function pe(e){return fs.test(e)?e:e.replace(ps,t=>`${t}<script id="${It}" src="${kt}" defer></script>`)}function _t(e){return e.replace(gs,hs)}function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}h();var Lt=80;function X(e,t,s){if(!ys(e)||s.type==="theme-extension")return;let n=e.path.length>Lt?`${e.path.substring(0,Lt)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=Es(t.status),u=e.method.padStart(6);re(ne`• ${ie.format(new Date)} Request ${j.raw("\xBB")} ${u} ${a(String(t.status))} ${n} ${j.gray(i)}`)}function ys(e){let t=[z,J,"/checkouts","/payments"],s=[".js",".css",".json",".map"];if(t.some(o=>e.path.startsWith(o)))return!1;let[n]=e.path.split("?"),r=q(n);return!s.includes(r)}function Es(e){return e<300?j.green:e<400?j.yellow:j.errorText}var J="/cdn/",z="/ext/cdn/",Ce="/api/collect",Ts=/^\/cart\//,xs=/^\/cart(\/|\.js|\.json|$)/,Ae=/^\/checkouts\/(?!internal\/)/,jt=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,Ss=new RegExp(`^${J}`),Rs=new RegExp(`^${z}`),ws=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,Fs=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",Ce,"/cdn-cgi/challenge-platform"],qt="_shopify_essential",Ps=new RegExp(`${qt}=([^;]*)(;|$)`);function Ct(e,t){return b(async s=>{if(Fs.some(n=>s.path.startsWith(n)))return null;if(vs(s)){let n=s.path.split("?")[0]??"";return Ne(s,t).then(async r=>{if(X(s,r,t),r.ok){let o=n.split("/").at(-1)??"";if(t.localThemeFileSystem.files.has(`assets/${o}.liquid`)){let i=Z(await r.text(),t);return new Response(i,r)}}return r}).catch(async r=>{let{status:o,statusText:i,...a}=A(r,`Failed to proxy request to ${n}`);return o>=500&&!n.endsWith(".js.map")&&I(a),new Response(r.message,{status:o,statusText:i})})}})}function vs(e){if(e.method!=="GET"||e.path.match(Ts)||e.path.match(Ae)||e.path.match(jt)||e.path.match(Ss)||e.path.match(Rs))return!0;let[t]=e.path.split("?"),s=q(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function $s(e){let[t]=e.split("?");return!(xs.test(t)||Ae.test(t)||jt.test(t))}function me(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function bs(e){return ws.test(e.path)}function Z(e,t){let s=e,n=`(data-shs-beacon-endpoint=["'])https://${me(t)}${Ce}`,r=new RegExp(n,"g");s=s.replace(r,`$1${Ce}`);let o=new RegExp(`(https?:)?//${me(t)}${J}`,"g");s=s.replace(o,J);let i=/(?:https?:)?\/\/cdn\.shopify\.com\/(.*?\/(assets\/[^?#"'`>\s]+))/g,a=c=>c.startsWith("assets/"),u=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),p=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,m)=>{let x=m&&u.has(m),f=m&&p.has(m)&&l.startsWith("extensions/");return U(m).startsWith("image/")?c:f?`${z}${l}`:x?`${J}${l}`:c}),t.options.standardEventsDevBundle&&(s=_t(s)),s}function ks(e,t){let s=`http://${t.options.host}:${t.options.port}`,n=new RegExp(`data-base-url=["']((?:https?:)?//${me(t)})[^"']*?["']`,"g");return e.replace(n,(r,o)=>r.replace(o,s))}function Is(e,t){let s=new RegExp(`Domain=${me(t)};\\s*`,"gi");return e.map(n=>n.replace(s,""))}async function Q(e,t,s){let n=Ht(e,t);if(n.status>=300&&n.status<400)return n;t.headers.get("content-type")?.includes("application/json")||n.headers.set("content-type","text/html; charset=utf-8");let i=await n.text();return i=Z(i,e),i=ks(i,e),e.options.standardEventsInspector&&(i=pe(i)),s&&(i=s(i)??i),new Response(i,n)}var At=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function Ht(e,t){let s=new Response(t.body,t);s.headers.delete("content-length"),s.headers.delete("content-encoding");for(let i of At)s.headers.delete(i);s.headers.delete("access-control-allow-origin"),s.headers.delete("access-control-allow-credentials"),s.headers.delete("access-control-allow-methods"),s.headers.delete("access-control-allow-headers"),s.headers.delete("access-control-expose-headers"),s.headers.delete("access-control-max-age");let n=s.headers.get("Link");n&&s.headers.set("Link",Z(n,e));let r=s.headers.get("Location");if(r){let i=new URL(r,"https://shopify.dev");Ae.test(i.pathname)||(i.searchParams.delete("_fd"),i.searchParams.delete("pb"),s.headers.set("Location",i.href.replace(i.origin,"")))}let o=s.headers.getSetCookie();if(o?.length){s.headers.set("Set-Cookie",Is(o,e).join(","));let i=o.join(",").match(Ps)?.[1];i&&(e.session.sessionCookies[qt]=i)}return s}function He(e){let t=nt(e);for(let n of At)delete t[n];delete t["upgrade-insecure-requests"];let s=rt(e);return s&&(t["X-Forwarded-For"]=s),t}function Ne(e,t){let s=e.path.replace(new RegExp(z,"g"),"/"),n=e.path.startsWith(z)?"cdn.shopify.com":t.session.storeFqdn,r=new URL(s,`https://${n}`);if(r.hostname!==n)return Promise.reject(new Error(`Request failed: Hostname mismatch. Expected host: ${n}. Resulting URL hostname: ${r.hostname}`));let o=ot(e),i=He(e);return bs(e)||(/\/assets\/[^/]+\.(css|js)$/.test(r.pathname)&&/\?\d+$/.test(r.search)&&(r.search=`?v=${Date.now()}`),r.searchParams.set("_fd","0"),r.searchParams.set("pb","0"),i=ft({...i,...ht(),...n===t.session.storeFqdn?t.session.crawlerSignatureHeaders:{},referer:r.origin,Cookie:Et(t.session,{headers:i}),...t.type==="theme"&&$s(e.path)?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>Ht(t,a)).catch(a=>{throw ae(L(a),r)})}var De=0,_s=5;function Dt(e,t){return b(s=>{let[n="/",r=""]=s.path.split("?");return js(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Nt(t,{status:500,statusText:"Internal Server Error"},{title:"Failed to Upload Theme Files",header:"Upload Errors",errors:Array.from(t.localThemeFileSystem.uploadErrors.entries()).map(([i,a])=>({message:i,code:a.join(`
|
|
70
|
+
`)}))}):ce(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:He(s),replaceExtensionTemplates:fe(t),replaceTemplates:Oe(t,n,it(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!Ls(s)){let a=await qs(s,t,i);if(a)return X(s,a,t),a}return X(s,i,t),Q(t,i,a=>(Cs(i,a,String(e.id)),De=0,We(a,t)))}).catch(async i=>{if(i instanceof he&&(P(`Theme ID mismatch: expected ${i.getExpectedThemeId()} but got ${i.getActualThemeId()}; refreshing session...`),H("theme-service:error-page:theme-id-mismatch"),t.session.refresh)){De++,De>_s&&(tt(new se(i.getMessage())),process.exit(1)),await t.session.refresh();let x=new URLSearchParams(r),f=new URLSearchParams([...x].filter(([Pe])=>!Pe.startsWith("__sfr"))),g=n+(f.toString()?`?${f}`:"");return new Response(null,{status:302,headers:{Location:g}})}let{status:a,statusText:u,cause:p,...c}=A(i,"Failed to render storefront"),[l,...m]=c.headline.split(`
|
|
71
|
+
`);return te(c),Nt(t,{status:a,statusText:u},{title:l,header:l,errors:[{message:[...m,p.message].join("<br>"),code:p.stack?.replace(`${p.message}
|
|
72
|
+
`,"")??""}]})})})}function Nt(e,t,s){let n=We(bt(s),e);return e.options.standardEventsInspector&&(n=pe(n)),H("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function Ls(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function js(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function qs(e,t,s){P(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await Ne(e,t).catch(r=>new Response(null,A(r)));if(n.status<400)return P(`Proxy status: ${n.status}. Returning proxy response.`),t.options.standardEventsInspector&&(n.headers.get("content-type")??"").includes("text/html")?Q(t,n):n;P(`Proxy status: ${n.status}. Returning render error.`)}function Cs(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new he(s,n,e)}var he=class extends Error{response;expectedThemeId;actualThemeId;constructor(t,s,n){super([`Theme ID mismatch: expected ${t} but got ${s}.`,`Request ID: ${n.headers.get("x-request-id")}`,`URL: ${n.url}`,"This is likely related to an issue in upstream Shopify APIs.","Please try again in a few minutes and report this issue:","https://community.shopify.dev/c/shopify-cli-libraries/14"].join(`
|
|
73
|
+
`)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};h();h();function ge(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}h();function ye(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var As={stylesheet:new Map,javascript:new Map};function Ot(e,t){return b(async s=>{if(s.method!=="GET")return;if(Os(s,t))return Ws(s,t);let{file:n,fileKey:r,isUnsynced:o}=Ds(s,t);if(!r)return;let i=U(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(ct(s,"X-Local-Asset","true"),!n){o&&O(s,D({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(Z(n.value,t)):Buffer.from(n.attachment??"","base64");return oe(s,{getContents:()=>a,getMeta:()=>({type:i,size:a.length,mtime:n.stats?.mtime})})})}var Hs=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,Ns=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Ds(e,t){let s=(n,r)=>{let o=e.path.match(n)?.[1];if(o){let i=T("assets",o),a=r.files.get(i),u=r.unsyncedFileKeys.has(i);if(a||u)return{file:a,isUnsynced:u,fileKey:i}}};return s(Hs,t.localThemeFileSystem)??s(Ns,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Os(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Ws(e,t){switch(ye(e).pathname.split("/").at(-1)){case"styles.css":return Ms(t,e);case"block-scripts.js":return Me(t,e,"block");case"snippet-scripts.js":return Me(t,e,"snippet");case"scripts.js":return Me(t,e,"section");case void 0:break;default:break}}function Ms(e,t){let s=Ee(e,"section"),n=Ee(e,"block"),r=Ee(e,"snippet"),o=[`/*** GENERATED LOCALLY ***/
|
|
74
|
+
`];for(let[,a]of[...s,...n,...r]){let u=Wt(a,"stylesheet");u&&o.push(u)}let i=o.join(`
|
|
75
75
|
`);return oe(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function Me(e,t,s){let n=Ee(e,s),r=`${s}s`,o=[`
|
|
76
76
|
/*** GENERATED LOCALLY ***/
|
|
77
77
|
|
|
@@ -86,9 +86,9 @@ import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g
|
|
|
86
86
|
for (var i = 0; i < ${r}.length; i++) {
|
|
87
87
|
__${r}__[${r}[i]] = true;
|
|
88
88
|
}
|
|
89
|
-
})();`];for(let[a,
|
|
89
|
+
})();`];for(let[a,u]of n){let p=a.split("/").pop()?.replace(".liquid",""),c=Wt(u,"javascript")??"";p&&c&&o.push(`
|
|
90
90
|
(function () {
|
|
91
|
-
if (!__${r}__["${
|
|
91
|
+
if (!__${r}__["${p}"] && !Shopify.designMode) return;
|
|
92
92
|
try {
|
|
93
93
|
${c}
|
|
94
94
|
} catch (e) {
|
|
@@ -96,8 +96,8 @@ import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g
|
|
|
96
96
|
}
|
|
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 Wt(e,t){let s=As[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
|
-
`);return s.set(e.key,{checksum:e.checksum,content:i}),i}}h();import*as Mt from"node:os";function Us(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(Mt.networkInterfaces()))for(let a of i??[]){let p=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${p}]`:p;s.add(`${c}${n}`)}return s}function Bs(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Ut(e,t){let s=Us(e,t);return $(n=>{let r=n.node.req.headers.host,o=Bs(r);if(!o||!s.has(o))return N(n,O({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Bt(){return Jt()}function Cr(){return Jt()}function Jt(){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 Js}from"node:http";async function Gr(e,t){let s=await Ys(e,t);return await Gs(e,s),zs(e,s)}function zs(e,t){let s=ut();s.use(Ut(t.options.host,t.options.port)),s.use(zt(e,t)),s.use(Nt(e,t)),s.use(Ct(e,t)),s.use(Ot(e,t));let n=Js(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 Ys(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",p=r??9293,m=Bt(),c=vt(o);return await c.ready(),{session:await Tt(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:p,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function Gs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{Te(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=Ge(mt(),1);import Vs from"node:events";var Ue=new Map,K=new Map;function Yt(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 Be(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(q(e))}function Ne(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$/,p=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Be(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(p){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function uo(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=q(r);o(p=>{!en(r)&&Be(r)&&a===".json"&&Yt(r,p),Te(e,t,i,{type:"update",key:r,payload:Qs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),Te(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"&&Yt(o,a)}else o.endsWith(".liquid")&&Zt(i)}))})}var Xs="1",Vt=new Vs;function Se(e){Vt.emit("hot-reload",{...e,version:Xs})}function zt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=dt(s);return Vt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{I({headline:"Failed to send HotReload event.",body:a.stack})})}),Se({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"?I(o):o.type==="info"?et(o):I({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Xt)return k(we()).then(o=>at(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")??"",p=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 u=t.localThemeFileSystem.files.get(o)?.value;if(!u)return"";c[o]=u}for(let u of l)if(u.endsWith(".json")){for(let[f,T]of K.get(u)??[])if(i.endsWith(`__${T}`)){let v=t.localThemeFileSystem.files.get(u)?.value;v&&(c[u]=v);continue}}}return ce(t.session,{method:s.method,path:p??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:lt(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:u,statusText:f,...T}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||I(T),new Response(null,{status:u,statusText:f})})}})}var ee=(e,t)=>Se({themeId:String(e),type:"full",key:t});function Te(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);Se({sync:"local",themeId:o,...n}),s(()=>Se({sync:"remote",themeId:o,...n}),r)}function Zs(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 Qs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Zs(e,t):[],replaceTemplates:Be(e)?Ne(t):{},updatedFileParts:n&&Zt(n)}}var xe="hot-reload-client",Ks="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Gt=new RegExp(`<script id="${xe}"[^>]*>[^<]*</script>`),Xt="/@shopify/theme-hot-reload";function We(e,t){return t.options.liveReload==="off"?e.replace(Gt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Gt,"").replace(/<\/head>/,`<script id="${xe}" src="${Xt}" defer></script></head>`):e.includes(`<script id="${xe}"`)?e:e.replace(/<\/head>/,`<script id="${xe}" src="${Ks}" defer></script></head>`)}function en(e){return e.startsWith("assets/")}function Zt(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=Ue.get(e.key);if(o?.checksum===e.checksum||(Ue.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),p=e.value,m=(c,l)=>{p=p.replace(l,"");let u=a(l),f=`${c}Tag`;n[f]=!o||u!==o[f],r[f]=u};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return p=a(p.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=p,n.liquid=!o||p!==o.liquid,Ue.set(e.key,r),n}h();var Qt=Ge(mt(),1);function tn(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Kt(e,t,s){if(tn(s)){let n=E(e,"listings",t,s);if(await P(n))return n}}async function es(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Qt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function Eo(e,t){let s=E(e,"listings"),n=E(s,t);if(await P(n))return;let o=[];await P(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 sn from"node:events";import{fileURLToPath as nn}from"node:url";var rn=250,ts=["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 Ho(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new sn,a=(d,g)=>{i.emit(d,g)},p=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await an(e,d,t.listing):await ue(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(ts,{cwd:e,deep:3,ignore:W}).then(d=>Promise.all([wt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),u=d=>Le([{key:d}],o).length===0;function f(d,g,y,x){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&x===we()){ee(g,x);return}let R=l(x);if(t?.listing&&R.startsWith(`listings/${t.listing}/`)){let S=R.replace(`listings/${t.listing}/`,"");if(S.startsWith("templates/")||S.startsWith("sections/"))R=S;else return}T(R).then(()=>{switch(d){case"add":case"change":return v(d,g,y,R);case"unlink":return Pe(g,y,R,n)}}).catch(S=>{D(`Error handling file event for ${R}: ${S}`)})}function T(d){return p?.notify(d)??Promise.resolve()}let v=(d,g,y,x)=>{if(u(x))return;let R=s.get(x)?.checksum,S=m(x).then(async()=>{let w=s.get(x);if(w)return w.checksum!==R&&r.add(x),{value:w.value||void 0,attachment:w.attachment}}),_=S.then(w=>{if(w)return on(r,n,x,g,y)(w)}).catch(Ie(x,"upload"));a(d,{fileKey:x,onContent:w=>{S.then(Y=>{r.has(x)&&w(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(w,Y)=>{_.then(G=>{G?w():Y?.()}).catch(()=>{})}})},Pe=(d,g,y,x)=>{if(u(y))return;x.delete(y),s.delete(y),r.add(y);let R=t?.noDelete?Promise.resolve():gt(Number(d),[y],g).then(async S=>{if(!S[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ss("delete",y),!0}).catch(S=>(Ie(y,"delete")(S),!1));a("unlink",{fileKey:y,onSync:S=>{R.then(_=>{_&&S()}).catch(()=>{})}})},ve=new Set(ts.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&ve.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&ve.add(we()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await cn(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),x=E(e,y),R=await P(x);s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),R?await Je(e,{...d,key:y}):await Je(e,d);return}s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Je(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-5RWEYTNQ.js"),x=y.watch([...ve],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),R=new Map,S=(_,w)=>{let G=`${l(w)}:${_}`,Ye=R.get(G);Ye&&clearTimeout(Ye);let ns=setTimeout(()=>{R.delete(G),f(_,d,g,w)},rn);R.set(G,ns)};x.on("add",S.bind(null,"add")).on("change",S.bind(null,"change")).on("unlink",S.bind(null,"unlink")).on("error",_=>{D(`File watcher error: ${_}`),L("theme-service:file-watcher:error")})}}}function on(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await yt(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),ss("update",s),!0}}async function Je(e,{key:t,attachment:s,value:n}){let r=
|
|
99
|
+
`);return s.set(e.key,{checksum:e.checksum,content:i}),i}}h();import*as Mt from"node:os";function Us(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(Mt.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 Bs(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Ut(e,t){let s=Us(e,t);return b(n=>{let r=n.node.req.headers.host,o=Bs(r);if(!o||!s.has(o))return O(n,D({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Bt(){return Jt()}function Cr(){return Jt()}function Jt(){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 Js}from"node:http";async function Yr(e,t){let s=await Gs(e,t);return await Ys(e,s),zs(e,s)}function zs(e,t){let s=ut();s.use(Ut(t.options.host,t.options.port)),s.use(zt(e,t)),s.use(Ot(e,t)),s.use(Ct(e,t)),s.use(Dt(e,t));let n=Js(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 Gs(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",u=r??9293,p=Bt(),c=vt(o);return await c.ready(),{session:await Tt(e.id.toString(),s,void 0,n,i),localThemeFileSystem:p,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 Ys(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{Te(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(mt(),1);import Vs from"node:events";var Ue=new Map,K=new Map;function Gt(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 Be(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(q(e))}function Oe(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${T("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 p of e.localThemeFileSystem.unsyncedFileKeys)if(Be(p)){if(i&&r.test(p)){if(p!==o)continue}else if(a.test(p)){if(u){if(!p.startsWith(`locales/${s}.`))continue}else if(!p.includes(".default."))continue}n[p]=e.localThemeFileSystem.files.get(p)?.value??""}return n}function uo(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=q(r);o(u=>{!en(r)&&Be(r)&&a===".json"&&Gt(r,u),Te(e,t,i,{type:"update",key:r,payload:Qs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),Te(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"&&Gt(o,a)}else o.endsWith(".liquid")&&Zt(i)}))})}var Xs="1",Vt=new Vs;function Se(e){Vt.emit("hot-reload",{...e,version:Xs})}function zt(e,t){return b(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=dt(s);return Vt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{I({headline:"Failed to send HotReload event.",body:a.stack})})}),Se({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"?I(o):o.type==="info"?et(o):I({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Xt)return k(we()).then(o=>at(s,o,"application/javascript")).catch(o=>O(s,D({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]??"",p=new URLSearchParams(r);if(p.delete("section_key"),p.delete("section_id"),p.delete("app_block_id"),p.delete("_fd"),p.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let m=t.localThemeFileSystem.files.get(o)?.value;if(!m)return"";c[o]=m}for(let m of l)if(m.endsWith(".json")){for(let[x,f]of K.get(m)??[])if(i.endsWith(`__${f}`)){let g=t.localThemeFileSystem.files.get(m)?.value;g&&(c[m]=g);continue}}}return ce(t.session,{method:s.method,path:u??"/",query:[...p.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:lt(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:m,statusText:x,...f}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||I(f),new Response(null,{status:m,statusText:x})})}})}var ee=(e,t)=>Se({themeId:String(e),type:"full",key:t});function Te(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);Se({sync:"local",themeId:o,...n}),s(()=>Se({sync:"remote",themeId:o,...n}),r)}function Zs(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 Qs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Zs(e,t):[],replaceTemplates:Be(e)?Oe(t):{},updatedFileParts:n&&Zt(n)}}var xe="hot-reload-client",Ks="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Yt=new RegExp(`<script id="${xe}"[^>]*>[^<]*</script>`),Xt="/@shopify/theme-hot-reload";function We(e,t){return t.options.liveReload==="off"?e.replace(Yt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Yt,"").replace(/<\/head>/,`<script id="${xe}" src="${Xt}" defer></script></head>`):e.includes(`<script id="${xe}"`)?e:e.replace(/<\/head>/,`<script id="${xe}" src="${Ks}" defer></script></head>`)}function en(e){return e.startsWith("assets/")}function Zt(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=Ue.get(e.key);if(o?.checksum===e.checksum||(Ue.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,p=(c,l)=>{u=u.replace(l,"");let m=a(l),x=`${c}Tag`;n[x]=!o||m!==o[x],r[x]=m};for(let c of i){let l=ge(e.value??"",c);l&&p(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,Ue.set(e.key,r),n}h();var Qt=Ye(mt(),1);function tn(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Kt(e,t,s){if(tn(s)){let n=T(e,"listings",t,s);if(await $(n))return n}}async function es(e,t){let s=T(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Qt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function Eo(e,t){let s=T(e,"listings"),n=T(s,t);if(await $(n))return;let o=[];await $(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 sn from"node:events";import{fileURLToPath as nn}from"node:url";var rn=250,ts=["AGENTS.md","DESIGN.md","assets/**/*.*","config/**/*.json","config/styles.css","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],v={documentationFilesRegex:/^(AGENTS|DESIGN)\.md$/,layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,configStylesheetRegex:/^config\/styles\.css$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function Ho(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new sn,a=(d,y)=>{i.emit(d,y)},u=t?.notify?new le(t.notify):void 0,p=async d=>{let y=t?.listing?await an(e,d,t.listing):await ue(e,d),E=de(d,y);return s.set(d,M({key:d,checksum:E,value:typeof y=="string"?y:"",attachment:Buffer.isBuffer(y)?y.toString("base64"):""})),y},c=C(ts,{cwd:e,deep:3,ignore:W}).then(d=>Promise.all([wt(e),...d.map(p)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),m=d=>Le([{key:d}],o).length===0;function x(d,y,E,S){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&S===we()){ee(y,S);return}let w=l(S);if(t?.listing&&w.startsWith(`listings/${t.listing}/`)){let R=w.replace(`listings/${t.listing}/`,"");if(R.startsWith("templates/")||R.startsWith("sections/"))w=R;else return}f(w).then(()=>{switch(d){case"add":case"change":return g(d,y,E,w);case"unlink":return Pe(y,E,w,n)}}).catch(R=>{N(`Error handling file event for ${w}: ${R}`)})}function f(d){return u?.notify(d)??Promise.resolve()}let g=(d,y,E,S)=>{if(m(S))return;let w=s.get(S)?.checksum,R=p(S).then(async()=>{let F=s.get(S);if(F)return F.checksum!==w&&r.add(S),{value:F.value||void 0,attachment:F.attachment}}),_=R.then(F=>{if(F)return on(r,n,S,y,E)(F)}).catch(Ie(S,"upload"));a(d,{fileKey:S,onContent:F=>{R.then(G=>{r.has(S)&&F(G?.value??G?.attachment??"")}).catch(()=>{})},onSync:(F,G)=>{_.then(Y=>{Y?F():G?.()}).catch(()=>{})}})},Pe=(d,y,E,S)=>{if(m(E))return;S.delete(E),s.delete(E),r.add(E);let w=t?.noDelete?Promise.resolve():gt(Number(d),[E],y).then(async R=>{if(!R[0]?.success)throw new Error(`Failed to delete file "${E}" from remote theme.`);return r.delete(E),ss("delete",E),!0}).catch(R=>(Ie(E,"delete")(R),!1));a("unlink",{fileKey:E,onSync:R=>{w.then(_=>{_&&R()}).catch(()=>{})}})},ve=new Set(ts.map(d=>T(e,d.split("/").shift()??"")));return t?.listing&&ve.add(T(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&ve.add(we()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await cn(e,d)},write:async d=>{let y=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&y){let E=T("listings",t.listing,d.key),S=T(e,E),w=await $(S);s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),w?await Je(e,{...d,key:E}):await Je(e,d);return}s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Je(e,d)},read:p,applyIgnoreFilters:d=>Le(d,o),addEventListener:(d,y)=>{i.on(d,y)},startWatcher:async(d,y)=>{let{default:E}=await import("./chokidar-5RWEYTNQ.js"),S=E.watch([...ve],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),w=new Map,R=(_,F)=>{let Y=`${l(F)}:${_}`,Ge=w.get(Y);Ge&&clearTimeout(Ge);let ns=setTimeout(()=>{w.delete(Y),x(_,d,y,F)},rn);w.set(Y,ns)};S.on("add",R.bind(null,"add")).on("change",R.bind(null,"change")).on("unlink",R.bind(null,"unlink")).on("error",_=>{N(`File watcher error: ${_}`),L("theme-service:file-watcher:error")})}}}function on(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await yt(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),ss("update",s),!0}}async function Je(e,{key:t,attachment:s,value:n}){let r=T(e,t);if(await ln(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function ue(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=T(e,t);if(!await $(n)){P(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function an(e,t,s){if(t==="config/settings_data.json")return es(e,s);let n=await Kt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return ue(e,t)}async function cn(e,t){let s=T(e,t);if(!await $(s)){P(`File ${s} can't be removed because it doesn't exist...`);return}await Qe(s)}function No(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],p=[],c=[],l=[],m=[],x=[];return e.forEach(f=>{let g=f.key;v.documentationFilesRegex.test(g)?x.push(f):g.endsWith(".liquid")?v.sectionLiquidRegex.test(g)?t.push(f):v.blockLiquidRegex.test(g)?l.push(f):v.layoutLiquidRegex.test(g)?m.push(f):s.push(f):v.configSchemaRegex.test(g)?a.push(f):v.configDataRegex.test(g)?u.push(f):v.configStylesheetRegex.test(g)?p.push(f):v.jsonRegex.test(g)?v.contextualizedJsonRegex.test(g)?i.push(f):v.sectionJsonRegex.test(g)?n.push(f):v.templateJsonRegex.test(g)?r.push(f):o.push(f):v.staticAssetRegex.test(g)&&c.push(f)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,configStylesheetFiles:p,staticAssetFiles:c,blockLiquidFiles:l,layoutFiles:m,documentationFiles:x}}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","text/markdown"].includes(U(e))}async function Do(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","templates"].every(n=>t.has(n))}async function ln(e){let t=dn(e);await $(t)||await Ze(t)}function dn(e){let t=Ve(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ss(e,t){re(ne`• ${ie.format(new Date)} Synced ${j.raw("\xBB")} ${e} ${t}`)}function we(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?T(nn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function de(e,t){return t?Buffer.isBuffer(t)?ze(t):hn(e)?un(t):pn(e,t):""}function un(e){let t=e;return t=t.replace(/\r\n/g,`
|
|
101
101
|
`),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=mn(t),ze(t)}function pn(e,t){let s=t;return Fe(e)&&(s=s.replace(/\r\n/g,`
|
|
102
102
|
`)),ze(s)}function mn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
|
|
103
|
-
`))&&(n+=r,s=r==="\\"&&!s);return n}function ze(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Ke(t)}function Bo(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 hn(e){return e.endsWith("/settings_data.json")}export{Bo as a,Ct as b,
|
|
103
|
+
`))&&(n+=r,s=r==="\\"&&!s);return n}function ze(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Ke(t)}function Bo(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 hn(e){return e.endsWith("/settings_data.json")}export{Bo as a,Ct as b,Dt as c,Ot as d,Ut as e,Cr as f,Yr as g,uo as h,zt as i,ee as j,Eo as k,Ho as l,No as m,Do as n};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as ge}from"./chunk-
|
|
1
|
+
import{b as ge}from"./chunk-2HYR6EUD.js";import{a as he,c as ye}from"./chunk-XWXAFJFC.js";import{b as ue}from"./chunk-QVO5CAJN.js";import{a as Te}from"./chunk-VJ5YOXKL.js";import{C as ve,K as Pe,M as Ae,O as ke,Y as xe,_ as Ce,h as we,ta as Fe,wa as Le}from"./chunk-CVW2HMQO.js";import{E as Re,z as Ie}from"./chunk-2VJ6NBPV.js";import{l as be}from"./chunk-YNFXYVYN.js";import{b as fe,f as de}from"./chunk-K2DP5Z76.js";import{B as ie,D as re,E as oe,f as C,g as ee,i as te,p as ae}from"./chunk-6QADNGH4.js";import{D as $,H as ce,y as le,z as pe}from"./chunk-6C5AVMKR.js";import{c as ne}from"./chunk-QZEDYQVT.js";import{a as z}from"./chunk-XOYICV6P.js";import{e as Q}from"./chunk-QKTBYAUD.js";import{d as se}from"./chunk-XRJCD3AO.js";import{h as m}from"./chunk-OAG72Q2O.js";import{a as He}from"./chunk-CTNBSUVU.js";import{$a as Z,Ca as I,Ja as V,Oa as K,Ta as R,Ua as x,Va as B,Wa as W,_ as H,hb as X,ib as J,ka as q,ma as O,qb as h,rb as F,sa as T,sb as b,ua as _,wa as Y}from"./chunk-43FRAUV6.js";import{e as me}from"./chunk-XYUTD6IU.js";import{d as l,e as k,f as M,p as U,q as D}from"./chunk-773TIA5M.js";import{e as De,g as c}from"./chunk-VKWPEFWQ.js";c();c();var y={reactRouter:{url:"https://github.com/Shopify/shopify-app-template-react-router",label:"Build a React Router app (recommended)",visible:!0,branches:{prompt:"For your React Router template, which language do you want?",options:{javascript:{branch:"javascript-cli",label:"JavaScript"},typescript:{branch:"main-cli",label:"TypeScript"}}}},remix:{url:"https://github.com/Shopify/shopify-app-template-remix",label:"Build a Remix app",visible:!1,branches:{prompt:"For your Remix template, which language do you want?",options:{javascript:{branch:"javascript",label:"JavaScript"},typescript:{branch:"main",label:"TypeScript"}}}},none:{url:"https://github.com/Shopify/shopify-app-template-extension-only",label:"Build an extension-only app",visible:!0},node:{url:"https://github.com/Shopify/shopify-app-template-node",visible:!1},ruby:{url:"https://github.com/Shopify/shopify-app-template-ruby",visible:!1}},S=Object.keys(y),L=S.filter(e=>y[e].visible),qe=["reactRouter","none"],Oe=async e=>{let t=e.template,a=e.flavor,r={template:y.reactRouter.url};t??=await $({choices:qe.map(o=>({label:y[o].label||o,value:o})),message:"Get started building your app:",defaultValue:S.find(o=>y[o].url===r.template)});let i={...e,template:t,templateType:P(t)?t:"custom",globalCLIResult:{install:!1,alreadyInstalled:!1}},n,s;if(i.templateType!=="custom"){let o=y[i.templateType];n=o.url,o.branches&&(a?s=o.branches.options[a]?.branch:s=await $({message:o.branches.prompt||"Choose a flavor:",choices:Object.entries(o.branches.options).map(([f,u])=>({value:u.branch,label:u.label}))}))}return s&&(n=`${n}#${s}`),i.template=n||i.template||r.template,i.globalCLIResult=await J(),i},_e=Oe;function P(e){return S.includes(e)}function $e(e){return e!==void 0&&P(e)&&y[e].branches!==void 0}c();c();import{platform as Ye}from"os";async function Se({packageJSON:e,local:t,useGlobalCLI:a}){if(e.dependencies=e.dependencies??{},a?delete e.dependencies["@shopify/cli"]:e.dependencies["@shopify/cli"]=z,delete e.dependencies["@shopify/app"],t){let r=await Ve("cli");e.dependencies["@shopify/cli"]=r;let i={"@shopify/cli":r};e.overrides=e.overrides?{...e.overrides,...i}:i,e.resolutions=e.resolutions?{...e.resolutions,...i}:i}return e}async function Ve(e){return`file:${await Z(`packages/${e}`,{type:"directory",cwd:U(import.meta.url)})}`}async function Ge({from:e,packageManager:t}){let a=Ye()==="win32"&&t==="yarn"?["--network-concurrency","1"]:[];return ae({directory:k(e),packageManager:t,args:a})}c();async function G(e,t){let r=(await W([l(e,"**",".git"),l(e,"**",".github"),l(e,"**",".gitmodules"),l(e,"**",".cli-liquid-bypass"),l(e,"LICENSE*"),l(e,"**","frontend/LICENSE*"),l(e,"package.json.cli2")],{dot:!0,onlyFiles:!1,onlyDirectories:!1,ignore:["**/node_modules/**"]})).map(s=>I(s,{force:!0})),i=new Set(ee[t]),n=C.filter(s=>!i.has(s)).map(s=>{let o=l(e,s);if(x(o))return V(o)});return Promise.all([...r,...n])}async function Ke(e){let t=e.packageManager,a=H(e.name),r=l(e.directory,a),i=ge(e.template);await Ee(r,a),await Be(r),le({body:["Initializing project with",{command:t},`
|
|
2
2
|
Use the`,{command:"--package-manager"},"flag to select a different package manager."]}),await q(async o=>{let f=l(o,"download"),u=i.filePath?l(f,i.filePath):f,d=l(o,"app"),A=i.branch?`${i.baseURL}#${i.branch}`:i.baseURL;await Y(f);let w=[{title:`Downloading template from ${A}`,task:async()=>{await ye({repoUrl:A,destination:f,shallow:!0})}}];w.push({title:"Parsing liquid",task:async()=>{await ue(u,d,{dependency_manager:t,app_name:e.name})}},{title:"Updating package.json",task:async()=>{let p=(await ie(d)).content;p.name=a,p.author=await ne()??"",p.private=!0;let v=["extensions/*"].concat(We(d));switch(t){case"npm":case"yarn":case"bun":p.workspaces=v;break;case"pnpm":{await Ze(d,v),await T(l(d,".npmrc"),`auto-install-peers=true
|
|
3
3
|
`);break}case"homebrew":case"unknown":throw new te}await Se({packageJSON:p,local:e.local,directory:d,useGlobalCLI:e.useGlobalCLI}),await re(d,p)}}),e.postCloneActions.removeLockfilesFromGitignore&&w.push({title:"Removing lockfiles from .gitignore",task:async()=>{let p=l(d,".gitignore");if(await R(p)){let v=await O(p);C.forEach(Me=>{let Ue=new RegExp(`^${Me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`,"gm");v=v.replace(Ue,"")}),await _(p,v.trim())}}}),await me()&&w.push({title:"[Shopifolks-only] Configuring the project's NPM registry",task:async()=>{let p=l(d,".npmrc");await T(p,`@shopify:registry=https://registry.npmjs.org
|
|
4
4
|
`)}});let N=!1;w.push({title:"Preparing project directory",task:async()=>{await Ee(r,a),N=!0,await K(d,r)}}),w.push({title:`Installing dependencies with ${t}`,task:async()=>{await Ge({from:r,packageManager:t})}},{title:"Cleaning up",task:async()=>{await G(r,t)}},{title:"Initializing a Git repository...",task:async()=>{await he(r)}});try{await ce(w)}catch(p){throw N&&await I(r).catch(()=>{}),p}});let n;if(e.selectedAppOrNameResult.result==="new"){let o=await ve(r,e.name),f=e.selectedAppOrNameResult.org;n=await e.developerPlatformClient.createApp(f,o)}else n=e.selectedAppOrNameResult.app;await Fe({directory:r,apiKey:n.apiKey,appId:n.id,organizationId:n.organizationId,configName:"shopify.app.toml",developerPlatformClient:e.developerPlatformClient,isNewApp:!0},!1);let s=await Le({directory:r,clientId:void 0,forceRelink:!1,userProvidedConfigName:void 0});return pe({headline:[{userInput:a},"is ready for you to build!"],nextSteps:[["Run",{command:`cd ${a}`}],["For extensions, run",{command:F(t,"shopify app generate extension")}],["To see your app, run",{command:F(t,"shopify app dev")}]],reference:[{link:{label:"Shopify docs",url:"https://shopify.dev"}},[{link:{label:"Shopify Dev MCP,",url:"https://shopify.dev/docs/apps/build/devmcp"}},"connect your AI assistant to development resources"],["For an overview of commands, run",{command:F(t,"shopify app","--help")}]]}),{app:s.app}}async function Ee(e,t){if(await R(e))throw new m(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as y}from"./chunk-
|
|
1
|
+
import{i as y}from"./chunk-EJJPEWSB.js";import{I as O,y as w}from"./chunk-6C5AVMKR.js";import{h as d}from"./chunk-OAG72Q2O.js";import{sb as m,wb as S}from"./chunk-43FRAUV6.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();function h(t){return t.map(M).join(" \xB7 ")}function $(t,r){if(r){S(JSON.stringify({schemaVersion:1,operations:t},null,2));return}w({headline:"Subscription migration operations.",body:t.map(M)})}function M(t){return`${t.id}: ${t.status} (${t.results.edges.length}/${t.total} settled)`}i();i();var T=1e3,A=new Set(["COMPLETED","FAILED","CANCELED"]);async function E({clientId:t,operationIds:r,getOperation:s=y,pollIntervalMs:p=T,sleep:u=C,onUpdate:c}){let f=new Map,l=new Map,g=!0,a=[...r];for(;a.length>0;){let e=await Promise.all(a.map(async o=>{let n=await s({clientId:t,operationId:o});if(!n)throw new d(`Migration operation not found: ${o}`);return{operationId:o,operation:n}})),L=e.some(({operationId:o,operation:n})=>l.get(o)!==JSON.stringify(n));for(let{operationId:o,operation:n}of e)f.set(o,n),l.set(o,JSON.stringify(n));if(c&&(g||L)){let o=r.map(n=>f.get(n));await c(o)}g=!1,a=e.filter(({operation:o})=>!A.has(o.status)).map(({operationId:o})=>o),a.length>0&&await u(p)}return r.map(e=>f.get(e))}async function C(t){await new Promise(r=>setTimeout(r,t))}async function U({clientId:t,operationIds:r,waitForOperations:s=E}){return O({title:m`Polling subscription migration operations`,task:p=>s({clientId:t,operationIds:r,onUpdate:u=>p(m`${h(u)}`)}),renderOptions:{stdout:process.stderr}})}export{$ as a,U as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-VJ5YOXKL.js";import{a as o}from"./chunk-GINXNPAR.js";import{ta as c,wa as s}from"./chunk-CVW2HMQO.js";import{b as n,f as r}from"./chunk-K2DP5Z76.js";import{a as u}from"./chunk-CTNBSUVU.js";import{e as g,g as a}from"./chunk-VKWPEFWQ.js";a();var i=g(u(),1);var t=class p extends f{static summary="Fetch your app configuration from the Developer Dashboard.";static descriptionWithMarkdown=`Pulls app configuration from the Developer Dashboard and creates or overwrites a configuration file. You can create a new app with this command to start with a default configuration file.
|
|
2
2
|
|
|
3
3
|
For more information on the format of the created TOML configuration file, refer to the [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration) page.
|
|
4
4
|
`;static description=this.descriptionWithoutMarkdown();static flags={...n,...o,"organization-id":i.Flags.string({hidden:!0,env:"SHOPIFY_FLAG_ORGANIZATION_ID",exclusive:["client-id"]}),"client-id":r(o["client-id"]),"file-name":i.Flags.string({hidden:!1,description:"The name of the app configuration file to create or overwrite.",env:"SHOPIFY_FLAG_APP_CONFIG_FILE_NAME",exclusive:["config"]}),force:i.Flags.boolean({hidden:!1,description:"Overwrite an existing configuration file without prompting.",env:"SHOPIFY_FLAG_FORCE",dependsOn:["file-name"]})};async run(){let{flags:e}=await this.parse(p),d={directory:e.path,apiKey:e["client-id"],organizationId:e["organization-id"],configName:e.config,fileName:e["file-name"],force:e.force??!1},l=await c(d),{app:m}=await s({directory:e.path,clientId:void 0,forceRelink:!1,userProvidedConfigName:l.configFileName});return{app:m}}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as A,I as O,J as z,L as P,N as x}from"./chunk-
|
|
1
|
+
import{H as A,I as O,J as z,L as P,N as x}from"./chunk-CVW2HMQO.js";import{B as L,F as D,g as $,y as l}from"./chunk-2VJ6NBPV.js";import{a as F}from"./chunk-H7TDIRIU.js";import{D as R,b as E}from"./chunk-CNK3ZO2B.js";import{H as N,M as v,T as y,y as g,z as k}from"./chunk-6C5AVMKR.js";import{f as _,h as d}from"./chunk-OAG72Q2O.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function b(e,t){if(t.clientName!==l.AppManagement||!t.devStoreCapReached)return!1;try{return await t.devStoreCapReached(e)}catch{return!1}}async function M(e,t,o,i="disabled"){let c=o.clientName===l.AppManagement,s=async f=>o.devStoresForOrg(t.id,f),n=i!=="disabled"&&o.clientName===l.AppManagement,r=async()=>{if(await b(t.id,o))throw new d(U,W(t.id));let f=await A(),w=await O(),u=await z(),T=await $({name:f,plan:w,withDemoData:u,organization:t,json:!1,summary:!1}),S=await I(t,T,o);return k({headline:`Dev store "${S.shopName}" created successfully.`}),S},a,h;if(n&&e.stores.length===0){if(await b(t.id,o))throw new d(U,W(t.id));if(v()===!1)throw new d("No development store was specified.",H(t.id));a=async()=>(g({body:Y(t)}),r())}else if(n&&i==="selection-option"){if(v()===!1&&(e.stores.length>1||e.hasMorePages))throw new d("No development store was specified.","Run `shopify app dev --store <store-domain>` to select a development store.");v()&&!await b(t.id,o)&&(h=r)}let m=await P({onSearchForStoresByName:s,...e,showDomainOnPrompt:c,...a?{onCreateStoreWhenEmpty:a}:{},...h?{onCreateStore:h}:{}});if(!m){if(a)throw new _;if(g({body:await o.getCreateDevStoreLink(t)}),await y(5),!await x(t))throw new _;let w=await B(t.id,o);m=await M({stores:w,hasMorePages:!1},t,o,i)}return C(m),m}async function I(e,t,o){let s;if(await N([{title:"Fetching organization data",task:async()=>{for(let r=0;r<10;r++){try{let a=await D(e,t,o);if(a){s=a;return}}catch(a){if(!(a instanceof L))throw a}await y(3)}}}]),!s)throw new d(`The newly created development store (${t}) is not available yet.`,`Run \`shopify app dev --store ${t}\` to select it when it is ready.`);return s}async function B(e,t){let c=[];return await N([{title:"Fetching organization data",task:async()=>{for(let n=0;n<10;n++){let{stores:r}=await t.devStoresForOrg(e);if(r.length>0){c=r;return}await y(3)}}}]),c}var U="Your organization has reached its development store limit.";function Y(e){return`You don't have any dev stores associated with ${e.businessName}'s Dev Dashboard. Let's create one.`}function q(e){return`shopify store create dev --organization-id ${e} --name <store-name> --plan <plan>`}function H(e){return`Create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function W(e){return`Make a development store slot available in Dev Dashboard. Then create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function C(e){if(!e.transferDisabled)throw!e.transferDisabled&&!e.convertableToPartnerTest?new d(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store."):new d(`The store you specified (${e.shopDomain}) is not transfer-disabled`,"Run dev --reset and select a transfer-disabled dev store.")}async function fe({appContextResult:e,storeFqdn:t,forceReselectStore:o,storeTypes:i=["APP_DEVELOPMENT"],storeCreationMode:c="disabled"}){let{app:s,organization:n,developerPlatformClient:r}=e,a,h=s.configuration.build?.dev_store_url,m=s.hiddenConfig.dev_store_url,f=h??m,u=t??(o?void 0:f),T=i.length===1&&i[0]==="APP_DEVELOPMENT";if(u)a=await D(n,u,r,i),T&&C(a);else{let S=await r.devStoresForOrg(n.id);a=await M(S,n,r,c)}return a.shopDomain=R(a.shopDomain),await V(a,o),(a.shopDomain!==f||!m)&&await s.updateHiddenConfig({dev_store_url:a.shopDomain}),await r.ensureUserAccessToStore(n.id,a),a}async function V(e,t){await F.addPublicMetadata(()=>({cmd_app_reset_used:t,store_fqdn_hash:E(e.shopDomain),store_domain:e.shopDomain})),await F.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{fe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as w}from"./chunk-
|
|
1
|
+
import{a as h,b as w}from"./chunk-L4LDNEFK.js";import{r as f}from"./chunk-CNK3ZO2B.js";import{T as d}from"./chunk-6C5AVMKR.js";import{h as i}from"./chunk-OAG72Q2O.js";import{Ga as m,na as p}from"./chunk-43FRAUV6.js";import{d as u}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as s,y as d,z as a}from"./chunk-
|
|
1
|
+
import{A as s,y as d,z as a}from"./chunk-6C5AVMKR.js";import{wb as r}from"./chunk-43FRAUV6.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();t();function l(e){let i=e.status==="success"?{schemaVersion:1,...e.submission}:{schemaVersion:1,...e.submission,failure:e.failure};return JSON.stringify(i,null,2)}function p(e){return JSON.stringify({schemaVersion:1,outcomes:e.outcomes},null,2)}function D(e){f(e)}function R(e,i){return i.json?r(l(e)):e.status==="failed"?S(e):i.watch?d({headline:"Subscription migration operations.",body:e.submission.operations.map(({operation:o})=>c(o))}):f(e.submission),e.status==="failed"?1:0}function v(e,i){let o=e.outcomes.some(({status:n})=>n==="failed");return i.json?r(p(e)):o?s({headline:"Some subscription migration operations could not be canceled.",body:m(e.outcomes)}):a({headline:"Subscription migration operations canceled.",body:m(e.outcomes)}),o?1:0}function f(e){let i=e.action==="schedule"?"scheduled":"unscheduled";a({headline:`Subscription migrations ${i}.`,body:[`Shops: ${e.total}`,"Operation IDs:",...e.operations.map(({operation:o})=>o.id),"Save every operation ID. You will need them to check or cancel this submission."]})}function S(e){if(e.failure.type==="operations"){s({headline:"Some subscription migration operations failed.",body:["Failed operation IDs:",...e.failure.operationIds,"Terminal operation outcomes:",...e.submission.operations.map(({operation:o})=>c(o)),"Save every operation ID. You will need them to inspect this submission."]});return}let i=e.submission.operations.map(({operation:o})=>o.id);s({headline:i.length===0?"Subscription migration submission failed.":"Some subscription migration operations were accepted before submission failed.",body:[...i.length===0?["Accepted operation IDs: None."]:["Accepted operation IDs:",...i],`Batch index: ${e.failure.batchIndex}`,"Errors:",...e.failure.userErrors.map(({message:o})=>o),...i.length===0?[]:["Save every accepted operation ID. You will need them to check or cancel accepted operations."]]})}function m(e){let i=e.filter(n=>n.status==="success"),o=e.filter(n=>n.status==="failed");return[...i.length===0?["Canceled operations: None."]:["Canceled operations:",...i.map(({operation:n})=>c(n))],...o.length===0?[]:["Failed operations:",...o.map(({operationId:n,operation:u,userErrors:b})=>{let h=u?` (returned status: ${u.status})`:"";return`${n}: ${b.map(({message:g})=>g).join("; ")}${h}`})]]}function c(e){return`${e.id}: ${e.status} (${e.results.edges.length}/${e.total} settled)`}export{D as a,R as b,v as c};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-XKHKXUQY.js";import{p as i,v as s}from"./chunk-DO4SRE4M.js";import{b as r}from"./chunk-K2DP5Z76.js";import{a as c}from"./chunk-CTNBSUVU.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var m=d(c(),1),t=class extends s{static summary="Download metafields definitions from your shop into a local file.";static descriptionWithMarkdown=`Retrieves metafields from Shopify Admin.
|
|
2
2
|
|
|
3
3
|
If the metafields file already exists, it will be overwritten.`;static description=this.descriptionWithoutMarkdown();static flags={...r,...i,force:m.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"})};static multiEnvironmentsFlags=null;async command(o){let n={path:o.path,password:o.password,store:o.store,force:o.force,verbose:o.verbose,noColor:o["no-color"]};await a(n)}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as A,wa as x}from"./chunk-
|
|
1
|
+
import{n as A,wa as x}from"./chunk-CVW2HMQO.js";import{F}from"./chunk-6C5AVMKR.js";import{h as s}from"./chunk-OAG72Q2O.js";import{a as D}from"./chunk-CTNBSUVU.js";import{Ta as p,sb as f,ua as v,wb as I,xb as P}from"./chunk-43FRAUV6.js";import{a as S}from"./chunk-XYUTD6IU.js";import{d as m,f as y,q as w}from"./chunk-773TIA5M.js";import{e as E,g as l}from"./chunk-VKWPEFWQ.js";l();async function b(n){let{extension:e,stdout:o,developerPlatformClient:i,app:r,orgId:t}=n,c=r.configuration.client_id,{api_version:a,type:u,targeting:d}=e.configuration,T=await(!!d?.length?_({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,target:d[0].target,version:a,orgId:t}):$({localIdentifier:e.localIdentifier,developerPlatformClient:i,apiKey:c,type:u,version:a,orgId:t})),h=A(T,a);if(o)I(h);else{let g=m(e.directory,"schema.graphql");await v(g,h),P(`GraphQL Schema for ${e.localIdentifier} written to ${g}`)}}async function _({localIdentifier:n,developerPlatformClient:e,apiKey:o,target:i,version:r,orgId:t}){let c={handle:i,version:r},a=await e.targetSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function targets and version are valid.`);return a}async function $({localIdentifier:n,developerPlatformClient:e,apiKey:o,version:i,type:r,orgId:t}){let c={version:i,type:r},a=await e.apiSchemaDefinition(c,o,t);if(!a)throw new s(f`A schema could not be generated for ${n}`,f`Check that the Function API type and version are valid.`);return a}l();var C=E(D(),1);var J={path:C.Flags.string({hidden:!1,description:"The path to your function directory.",parse:async n=>y(n),default:async()=>w(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"})};async function M(n,e){let o=n.allExtensions.filter(r=>r.isFunctionExtension),i=o.find(r=>r.directory===e);if(i)return i;if(o.length===1&&o[0])return o[0];if(S())return await F({message:"Which function?",choices:o.map(t=>({label:t.handle,value:t}))});throw new s("Run this command from a function directory or use `--path` to specify a function directory.")}async function N(n,e,o,i,r){let t=m(n.directory,"schema.graphql");if(await p(t))return t;let{app:c,developerPlatformClient:a,organization:u}=await x({directory:e,clientId:o,forceRelink:i,userProvidedConfigName:r});return await b({app:c,developerPlatformClient:a,extension:n,stdout:!1,orgId:u.id}),await p(t)?t:void 0}export{b as a,J as b,M as c,N as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Q,b as X,c as H}from"./chunk-
|
|
1
|
+
import{a as Q,b as X,c as H}from"./chunk-A3U7JDUC.js";import{a as L,c as M,e as f,f as P,h as T,i as q,m as V,p as U,q as F,r as j,s as z,u as _}from"./chunk-3CZ7DKE5.js";import{a as W}from"./chunk-VJ5YOXKL.js";import{a as G,b as J}from"./chunk-GINXNPAR.js";import{b as N}from"./chunk-K2DP5Z76.js";import{A as v,B as E,I as D,a as $,y as g,z as u}from"./chunk-6C5AVMKR.js";import{h as m,k as R}from"./chunk-OAG72Q2O.js";import{Ta as I,ma as C,qb as r,sb as s,ua as S,wb as x}from"./chunk-43FRAUV6.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();async function te(t,e){if(t)return t.join(`
|
|
2
2
|
`);if(e){if(!await I(e))throw new m(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return C(e,{encoding:"utf8"})}else return}async function Y(t){let{organization:e,remoteApp:i,store:n,query:o,variables:d,variableFile:b,outputFile:O,watch:Z=!1,version:ee}=t,{adminSession:p,version:k}=await D({title:s`Authenticating`,task:async()=>{let a=await Q(i,n.shopDomain),l=await P({adminSession:a,userSpecifiedVersion:ee,minimumDefaultVersion:L});return{adminSession:a,version:l}},renderOptions:{stdout:process.stderr}}),B=await te(d,b);ae(o,B),H(o,n),g({headline:"Starting bulk operation.",body:[{list:{items:X({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:k})}}]});let w=f(o)?await q({adminSession:p,query:o,variablesJsonl:B,version:k}):await T({adminSession:p,query:o,version:k});if(w?.userErrors?.length){E({headline:"Error creating bulk operation.",body:{list:{items:w.userErrors.map(a=>a.field?`${a.field.join(".")}: ${a.message}`:a.message)}}});return}let y=w?.bulkOperation;if(y)if(Z){let a=new $,l=await F(p,y.id,a.signal,()=>a.abort());a.signal.aborted?g({headline:`Bulk operation ${l.id} is still running in the background.`,body:h(l.id)}):await K(l,O)}else{let a=await U(p,y.id);["FAILED","CANCELED","EXPIRED"].includes(a.status)?await K(a,O):u({headline:"Bulk operation is running.",body:h(a.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(a.id)}`.value]}}]}]})}else throw v({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new R("Bulk operation response returned null with no error message.")}async function K(t,e){let i=V(t).value,o=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":u({headline:"Bulk operation started.",body:h(t.id),customSections:o});break;case"RUNNING":u({headline:"Bulk operation is running.",body:h(t.id),customSections:o});break;case"COMPLETED":if(t.url){let d=await j(t.url),b=z(d);e?await S(e,d):x(d),b?v({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:o}):u({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:o})}else u({headline:i,customSections:o});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":E({headline:i,customSections:o});break}}function ae(t,e){if(f(t)&&!e)throw new m(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!f(t)&&e)throw new m(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function h(t){return[`Monitor its progress with:
|
|
3
3
|
`,{command:`shopify app bulk status --id=${M(t)}`}]}var A=class t extends W{static summary="Execute bulk operations.";static descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-BHTHUKHU.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends o{};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,d as f,e as p}from"./chunk-
|
|
1
|
+
import{c as m,d as f,e as p}from"./chunk-JQPPLSFT.js";import{d as c,f as w,j as T}from"./chunk-GTAYTMCP.js";import{g as d}from"./chunk-DO4SRE4M.js";import{F as u}from"./chunk-6C5AVMKR.js";import{h as l}from"./chunk-OAG72Q2O.js";import{T as i}from"./chunk-43FRAUV6.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-6P5FGN6P.js";import{b as a}from"./chunk-4DLRS7MT.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static description="View the UI kit components that process async tasks";static hidden=!0;async run(){await o()}};export{t as a};
|
|
@@ -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-GTAYTMCP.js";import{k as h}from"./chunk-OAG72Q2O.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{adminSession;themeId;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};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as I}from"./chunk-LFOBYEWG.js";import{i as d,r as w,v as n}from"./chunk-
|
|
1
|
+
import{a as I}from"./chunk-LFOBYEWG.js";import{i as d,r as w,v as n}from"./chunk-CNK3ZO2B.js";import{w as l}from"./chunk-6QADNGH4.js";import{A as y,B as N,S,y as g}from"./chunk-6C5AVMKR.js";import{a as h}from"./chunk-XOYICV6P.js";import{m as u,n as m}from"./chunk-QKTBYAUD.js";import{j as _}from"./chunk-OAG72Q2O.js";import{Ab as a}from"./chunk-43FRAUV6.js";import{a as f}from"./chunk-JD5P5RAJ.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var C="https://cdn.shopify.com/static/cli/notifications.json",T="Cache is empty",O=["notifications:list","notifications:generate","init","app:init","theme:init","hydrogen:init","cache:clear","send-analytics"],$=["127.0.0.1","localhost","::1","[::1]"];function c(){let e=process.env.SHOPIFY_CLI_NOTIFICATIONS_URL;if(e)try{let t=new globalThis.URL(e);if(v(t))return e;a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) must use https, or http with a loopback host. Falling back to default.`)}catch{a(`The notifications URL provided via SHOPIFY_CLI_NOTIFICATIONS_URL (${e}) is not a valid URL. Falling back to default.`)}return C}function v(e){return e.protocol==="https:"?!0:e.protocol==="http:"&&$.includes(e.hostname)}var E=n.object({id:n.string(),message:n.string(),type:n.enum(["info","warning","error"]),frequency:n.enum(["always","once","once_a_day","once_a_week"]),ownerChannel:n.string(),cta:n.object({label:n.string(),url:n.string().url()}).optional(),title:n.string().optional(),minVersion:n.string().optional(),maxVersion:n.string().optional(),minDate:n.string().optional(),maxDate:n.string().optional(),commands:n.array(n.string()).optional(),surface:n.string().optional()}),x=n.object({notifications:n.array(E)});async function Z(e,t=process.env){try{let r=I();if(D(r,t)||d(t))return;let o=await k(),i=A(o.notifications,r,e);a(`Notifications to show: ${i.length}`),await L(i)}catch(r){if(r.message===T){a("Notifications to show: 0 (Cache is empty)");return}if(r.message==="abort")throw new _;let o=`Error showing notifications: ${r.message}`;a(o);let{sendErrorToBugsnag:i}=await import("./error-handler-JNCW56EC.js");await i(o,"unexpected_error")}}function D(e,t=process.env){return f(t.CI)||f(t.SHOPIFY_UNIT_TEST)||O.includes(e)}async function L(e){e.slice(0,2).forEach(t=>{let r={headline:t.title,body:t.message.replace(/\\n/g,`
|
|
2
2
|
`),link:t.cta};switch(t.type){case"info":{g(r);break}case"warning":{y(r);break}case"error":throw N(r),new Error("abort")}u(`notification-${t.id}`,new Date().getTime().toString())})}async function k(){let e=`notifications-${c()}`,t=m(e)?.value;if(!t)throw new Error(T);let r=JSON.parse(t);return x.parse(r)}async function ee(){a("Fetching notifications...");let e=await w(c(),void 0,{useNetworkLevelRetry:!1,useAbortSignal:!0,timeoutMs:3*1e3});if(e.status!==200)throw new Error(`Failed to fetch notifications: ${e.statusText}`);let t=await e.text(),r=JSON.parse(t),o=x.parse(r);return await F(t),o}async function F(e){u(`notifications-${c()}`,e),a(`Notifications from ${c()} stored in the cache`)}function te(e,t=process.argv,r=process.env){if(D(e,r)||!t[1])return;let o=process.execPath,s=[t[1],"notifications","list","--ignore-errors"];S(o,s,{background:!0,env:{...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},externalErrorHandler:async b=>{a(`Failed to fetch notifications in background: ${b.message}`)}})}function A(e,t,r,o=new Date(new Date().setUTCHours(0,0,0,0)),i=h){return e.filter(s=>V(s,i)).filter(s=>B(s,o)).filter(s=>R(s,t)).filter(s=>U(s,t,r)).filter(s=>H(s))}function V(e,t){let r=!e.minVersion||l(t,`>=${e.minVersion}`),o=!e.maxVersion||l(t,`<=${e.maxVersion}`);return r&&o}function B(e,t){let r=!e.minDate||new Date(e.minDate)<=t,o=!e.maxDate||new Date(e.maxDate)>=t;return r&&o}function R(e,t){return t===""?!0:!e.commands||e.commands.includes(t)}function U(e,t,r){let o=t.split(":")[0]??"all",i=e.surface??"all";return r?r.includes(i):i===o||i==="all"}function H(e){if(!e.frequency)return!0;let t=`notification-${e.id}`,r=m(t)?.value;if(!r)return!0;switch(e.frequency){case"always":return!0;case"once":return!1;case"once_a_day":return new Date().getTime()-Number(r)>24*3600*1e3;case"once_a_week":return new Date().getTime()-Number(r)>168*3600*1e3}}function re(e){let t=[];return e.minDate&&t.push(`from ${e.minDate}`),e.maxDate&&t.push(`to ${e.maxDate}`),e.minVersion&&t.push(`from v${e.minVersion}`),e.maxVersion&&t.push(`to v${e.maxVersion}`),e.frequency==="once"&&t.push("show only once"),e.frequency==="once_a_day"&&t.push("show once a day"),e.frequency==="once_a_week"&&t.push("show once a week"),e.surface&&t.push(`surface = ${e.surface}`),e.commands&&t.push(`commands = ${e.commands.join(", ")}`),t.join(`
|
|
3
3
|
`)}export{Z as a,k as b,ee as c,te as d,A as e,re as f};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as g,g as h}from"./chunk-
|
|
1
|
+
import{c as g,g as h}from"./chunk-EJJPEWSB.js";import{a as m}from"./chunk-VJ5YOXKL.js";import{wa as d}from"./chunk-CVW2HMQO.js";import{h as f}from"./chunk-OAG72Q2O.js";import{wb as s}from"./chunk-43FRAUV6.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();r();var v=250,c=class extends Error{constructor(){super("Migratable subscriptions were not found"),this.name="MigratableSubscriptionsNotFoundError"}},l=class extends Error{constructor(t){super(t),this.name="MigrationListProtocolError"}};async function*b({clientId:i,status:t,getPage:n=h}){let e=new Set,a;for(;;){let p=await n({clientId:i,first:v,after:a,status:t});if(p===null)throw new c;if(yield p.subscriptions,!p.pageInfo.hasNextPage)return;let{endCursor:o}=p.pageInfo;if(o===null||o.trim()==="")throw new l("Migratable subscription page has no cursor for its next page");if(e.has(o))throw new l(`Migratable subscription pagination repeated cursor: ${o}`);e.add(o),a=o}}r();var w="shop_id,status,manual_subscription_name,manual_subscription_price_amount,manual_subscription_price_currency_code,manual_subscription_interval,target_plan_handle,notification_kind,notification_opt_out_deadline,notification_sent_at,price_behavior,effective_date,last_failure_reason";function y(i){return JSON.stringify({schemaVersion:1,subscriptions:i},null,2)}async function _({pages:i,json:t}){t?s(y(await S(i))):await C(i)}async function S(i){let t=[];for await(let n of i)t.push(...n);return t}async function C(i){let t=!1;for await(let n of i){let e=x(n);t?e.length>0&&s(e.join(`
|
|
2
2
|
`)):(s([w,...e].join(`
|
|
3
3
|
`)),t=!0)}t||s(w)}function x(i){return i.map(t=>[t.shopId,t.status,t.manualSubscriptionName,t.manualSubscriptionPrice?.amount,t.manualSubscriptionPrice?.currencyCode,t.manualSubscriptionInterval,t.targetPlanHandle,t.notification?.kind,t.notification?.optOutDeadline,t.notification?.sentAt,t.priceBehavior,t.effectiveDate,t.lastFailureReason].map(E).join(","))}function E(i){let t=i??"";return/[",\r\n]/.test(t)?`"${t.replaceAll('"','""')}"`:t}var u=class i extends m{static hidden=!0;static summary="Lists app subscriptions eligible for migration.";static descriptionWithMarkdown="Lists every app subscription eligible for migration.\n\nBy default, the command writes CSV to stdout, streaming each page of results as it arrives. If a later page fails, the rows already written remain valid CSV. Use `--json` to fetch all pages first and then write a single versioned JSON envelope to stdout. Use shell redirection to save either format, for example `shopify app subscription-migrations list > subscriptions.csv` or `shopify app subscription-migrations list --json > subscriptions.json`.\n\nUse `--status` to filter subscriptions by migration status. Supported values are `UNSCHEDULED`, `SCHEDULED`, and `MIGRATED`.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %>","<%= config.bin %> <%= command.id %> --status SCHEDULED > scheduled-subscriptions.csv","<%= config.bin %> <%= command.id %> --json","<%= config.bin %> <%= command.id %> --json > subscriptions.json","<%= config.bin %> <%= command.id %> --client-id <client-id> > subscriptions.csv"];static flags={...g};async run(){let{flags:t}=await this.parse(i),{app:n,remoteApp:e}=await d({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config});try{let a=b({clientId:e.apiKey,status:t.status});await _({pages:a,json:t.json})}catch(a){throw a instanceof c?new f("App not found"):a}return{app:n}}};export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-VJ5YOXKL.js";import{a as y}from"./chunk-GINXNPAR.js";import{sa as k,ua as w,va as A,wa as P}from"./chunk-CVW2HMQO.js";import{b as h}from"./chunk-K2DP5Z76.js";import{z as g}from"./chunk-6C5AVMKR.js";import{h as u}from"./chunk-OAG72Q2O.js";import{j as r}from"./chunk-773TIA5M.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();async function s(p){let{directory:t,configName:o,configPath:e,configuration:a,remoteApp:i}=p;if(!a.client_id)throw new u("The selected configuration is not linked to a remote app.","Run `shopify app config link` first to link this configuration to a Shopify app.");let c=i.developerPlatformClient,l=await k({developerPlatformClient:c,app:i}),m=i.flags,b={directory:t,configName:o,developerPlatformClient:c,apiKey:a.client_id},d=await w(b,l,m,i.apiKey),v=r(e),x=await A({remoteApp:i,developerPlatformClient:c,specifications:l,flags:m,configFileName:v,appDirectory:d.appDirectory??t,localAppOptions:d});return{configPath:e,configuration:x,remoteApp:i}}var f=class p extends C{static summary="Refresh an already-linked app configuration without prompts.";static descriptionWithMarkdown="Pulls the latest configuration from the already-linked Shopify app and updates the selected configuration file.\n\nThis command reuses the existing linked app and organization and skips all interactive prompts. Use `--config` to target a specific configuration file, or omit it to use the default one.";static description=this.descriptionWithoutMarkdown();static flags={...h,...y};async run(){let{flags:t}=await this.parse(p),{app:o,remoteApp:e}=await P({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),{configuration:a,configPath:i}=await s({directory:t.path,configName:t.config,configPath:o.configPath,configuration:o.configuration,remoteApp:e});return g({headline:`Pulled latest configuration for "${a.name}"`,body:`Updated ${r(i)} with the remote data.`}),{app:o}}};export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as J}from"./chunk-
|
|
1
|
+
import{c as J}from"./chunk-XWXAFJFC.js";import{b as F}from"./chunk-QVO5CAJN.js";import{a as ae}from"./chunk-LAMTFOVF.js";import{a as ne}from"./chunk-VJ5YOXKL.js";import{a as z}from"./chunk-GINXNPAR.js";import{B as Z,D as ee,d as K,e as Q,wa as te}from"./chunk-CVW2HMQO.js";import{b as T,d as X,e as B}from"./chunk-YNFXYVYN.js";import{a as k}from"./chunk-H7TDIRIU.js";import{b as H,f as O}from"./chunk-K2DP5Z76.js";import{e as E}from"./chunk-CNK3ZO2B.js";import{C as G,p as P,x as L,y as _}from"./chunk-6QADNGH4.js";import{D as q,F as U,H as b,J as V,z as $}from"./chunk-6C5AVMKR.js";import{h as m}from"./chunk-OAG72Q2O.js";import{a as xe}from"./chunk-CTNBSUVU.js";import{Oa as j,Ta as h,Ua as R,Wa as D,X as f,_ as M,ka as w,qa as N,rb as W,wa as g,ya as v}from"./chunk-43FRAUV6.js";import{e as Y}from"./chunk-XYUTD6IU.js";import{d as p,n as C}from"./chunk-773TIA5M.js";import{e as he,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function re(e,t,r,n={}){let{templates:a,groupOrder:i}=await e.templateSpecifications(t,n);return{templates:a.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}d();d();async function ie(e,t){let r=e?.path??"",n=p(t,r);if(!await h(n))throw new m(`
|
|
2
2
|
The extension is not available for ${e?.value}`);return n}async function oe({name:e,app:t}){let r=M(e),n=p(t.directory,B.extensions.directoryName,r);if(await h(n))throw new m(`
|
|
3
3
|
A directory with this name (${r}) already exists.
|
|
4
4
|
Choose a new name for your extension.`);return await g(n),await N(p(n,T.lockFile)),n}function A(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function se(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,n=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),a=await oe({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:a,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:n,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await J({repoUrl:o,destination:c,shallow:!0})})};return await we(s),{directory:C(a),extensionTemplate:e.extensionTemplate}}async function we(e){try{switch(e.type){case"theme":await ge(e);break;case"function":await ve(e);break;default:await Ee(e);break}let t=p(e.directory,T.lockFile);await v(t)}catch(t){throw await v(e.directory),t}}async function ge({directory:e,url:t,type:r,name:n,extensionFlavor:a,onGetTemplateRepository:i}){return w(async s=>{let o=await I(t,a,s,i);await F(o,e,{name:n,type:r,uid:E(f(n))})})}async function ve({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await w(async l=>{let u=await I(t,i,l,s);await F(u,e,{name:a,handle:f(a),flavor:i?.value,uid:E(f(a))})}),o==="javascript"){let l=ce(i?.value??"rust");await le(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{n.usesWorkspaces&&await P({packageManager:n.packageManager,directory:n.directory});let l=Fe(o);await _(l,{packageManager:n.packageManager,type:"prod",directory:n.usesWorkspaces?e:n.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await Q({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await b(c)}async function Ee({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ce(i?.value??"vanilla-js");await w(async u=>{let y=await I(t,i,u,s);await F(y,e,{srcFileExtension:l,name:a,handle:f(a),flavor:i?.value??"",uid:E(f(a))})}),o==="javascript"&&await le(e,l)}},{title:"Installing dependencies",task:async()=>{let l=n.packageManager;if(n.usesWorkspaces)A(i?.value)==="javascript"&&await P({packageManager:l,directory:n.directory});else{await Te(n.directory,i?.value);let u=p(e,"package.json"),y=await ke(u);await _(y,{packageManager:l,type:"prod",directory:n.directory}),await v(u)}}}];c.push({title:"Update shared type definition",task:async()=>{await ee(r)}}),await b(c)}function ce(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function Fe(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${K}.0.0`}),t}async function le(e,t,r="*"){let n=await D(p(e,"src",r)),a=[];for(let i of n)a.push(j(i,`${i}.${t}`));await Promise.all(a)}async function Te(e,t){t==="typescript-react"&&await G(e,{"@types/react":X.reactTypes})}async function ke(e){if(!await h(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,n])=>({name:r,version:n}))}async function I(e,t,r,n){let a=p(r,"download");return await g(a),await n(e,a),ie(t,a)}d();function Pe(e,t=[]){let r=[...e.map(a=>({label:a.name,value:a.identifier,group:a.group||"Other",sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(a=>({label:`${a.name} (limit reached)`,value:a.identifier,group:a.group||"Other",disabled:!0,sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER}))],n=(a,i)=>a.sortPriority===i.sortPriority?a.label.localeCompare(i.label):a.sortPriority-i.sortPriority;return r.sort(n)}var _e=async e=>{let t=e.extensionTemplates,r=e.templateType,n=e.extensionFlavor;if(!r){if(n&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(n))),t.length===0)throw new m("You have reached the limit for the number of extensions you can create.");r=await U({message:"Type of extension?",choices:Pe(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let a=t.find(c=>c.identifier===r),i=e.name||await pe(e.directory,a.defaultName),s=e.extensionFlavor??await be(a);return{extensionTemplate:a,extensionContent:{name:i,flavor:s}}};async function pe(e,t,r=1){let n=t.includes(" ")?" ":"-",a=r<=1?t:`${t}${n}${r}`,i=p(e,f(a));return R(i)?pe(e,t,r+1):V({message:"Name your extension:",defaultValue:a})}async function be(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:q({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var de=_e;async function Oe(e){let{app:t,developerPlatformClient:r,remoteApp:n,specifications:a,template:i}=e,s=a.map(ye=>ye.identifier),{templates:o,groupOrder:c}=await re(r,n,s,{requestedTemplate:i}),l=await Ae(o,c,a,t,e),u=await de(l);await Se(u,i);let y=Ce(u,t,e,r),fe=await se(y);Me(fe,e.project.packageManager)}async function Ae(e,t,r,n,a){let i=await Re(a.template,n,e,r);Ne(i,a.flavor);let{validTemplates:s,templatesOverlimit:o}=Ie(e,r,n);return{templateType:i?.identifier,name:a.name,extensionFlavor:a.flavor,directory:p(a.directory,"extensions"),app:n,extensionTemplates:s??[],unavailableExtensions:o??[],reset:a.reset,groupOrder:t}}function Ie(e,t,r){return ae(e,a=>!ue(r,t,a)?"validTemplates":"templatesOverlimit")}function ue(e,t,r){let n=r.type,a=t.find(s=>s.identifier===n||s.externalIdentifier===n);return e.extensionsForType({identifier:n,externalIdentifier:n}).length>=(a?.registrationLimit??1)}async function Se(e,t){let{extensionContent:r}=e;return k.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Ce(e,t,r,n){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:n}}function Me(e,t){let r=je(e.extensionTemplate,e.directory,t);$(r)}function Ne(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(n=>n.value);if(!r.includes(t))throw new m("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function je(e,t,r){let n={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&n.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:W(r,"shopify app dev")}]),e.supportLinks[0]&&n.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),n}async function Re(e,t,r,n){if(!e)return;let a=r.find(i=>i.identifier===e);if(!a){let i=await Y(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new m(`Unknown extension type: ${e}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-WAJRWCZY.js";import{g as r,h as n,i as h}from"./chunk-DO4SRE4M.js";import{h as m}from"./chunk-OAG72Q2O.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var c=t=>`Development theme #${t} could not be found. Please create a new development theme.`,E="No development theme ID has been set. Please create a development theme first.",p=class extends s{context="Development";constructor(e){super(e),this.themeId=r()}async find(){let e=await this.fetch();if(!e)throw new m(this.themeId?c(this.themeId):E);return e}setTheme(e){n(e)}removeTheme(){h()}};export{p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as A}from"./chunk-
|
|
1
|
+
import{n as A}from"./chunk-TCFGEOE4.js";import{a as P}from"./chunk-BG7QQU23.js";import{c as C}from"./chunk-MYLMGH7Y.js";import{s as T}from"./chunk-GTAYTMCP.js";import{r as w}from"./chunk-DO4SRE4M.js";import{a as D}from"./chunk-LEW5IJK6.js";import{T as u}from"./chunk-CNK3ZO2B.js";import{B as y,z as h}from"./chunk-6C5AVMKR.js";import{Ab as O,va as p}from"./chunk-43FRAUV6.js";import{d,q as m}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();async function q(e){P({verbose:e.verbose,noColor:e.noColor});let t=w({store:e.store}),o=await u(t,e.password);await R(o,{path:e.path??m(),force:e.force??!1,silent:e.silent??!1})}var E={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",variant:"PRODUCTVARIANT",shop:"SHOP"};async function R(e,t){let{force:o,path:i,silent:n}=t;if(!await A(i)&&(process.env.SHOPIFY_LANGUAGE_SERVER==="1"||!await C(o)))return;let f=[],r=[];for(let[a,s]of Object.entries(E))f.push(T(s,e).catch(c=>(r.push(s),[])).then(c=>({[a]:c})));let b=(await Promise.all(f)).reduce((a,s)=>({...a,...s}));if(r.length===Object.values(E).length){n||y({body:"Failed to fetch metafield definitions.",nextSteps:["Check your network connection and try again.","Ensure you have the permission to fetch metafield definitions."],reference:[{link:{label:"Metafield Definition API",url:"https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinition"}}]});return}await S(i,b),r.length>0&&O(`Failed to fetch metafield definitions for the following owner types: ${r.join(", ")}`),n||h({body:"Metafield definitions have been successfully downloaded."})}async function S(e,t){let o=await D(e),i=d(o,"metafields.json"),n=JSON.stringify(t,null,2);p(i,n)}export{q as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.8.4";export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as b}from"./chunk-
|
|
1
|
+
import{f as b}from"./chunk-XYUTD6IU.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();import{performance as u}from"node:perf_hooks";function w(){return b()?"bubble":"mute-and-report"}function h(g={}){let i={sensitive:{},public:{...g}},p=t=>{Object.assign(i.public,t)},M=t=>{Object.assign(i.sensitive,t)},l=async(t,e,n)=>{let r=n==="auto"?w():n,s=async()=>{let c=await e();t(c)};if(r==="bubble")await s();else try{await s()}catch(c){let{sendErrorToBugsnag:o}=await import("./error-handler-JNCW56EC.js");await o(c,"unexpected_error")}},a=[];return{getAllPublicMetadata:()=>({...i.public}),getAllSensitiveMetadata:()=>({...i.sensitive}),addPublicMetadata:async(t,e="auto")=>l(p,t,e),addSensitiveMetadata:async(t,e="auto")=>l(M,t,e),runWithTimer:t=>async e=>{a.push(0);let n=u.now();try{return await e()}finally{let r=u.now();r=Math.max(n,r);let s=Math.max(r-n,0),c=a.pop(),o=Math.max(s-c,0);a.length>0&&(a[a.length-1]=(a[a.length-1]??0)+s),u.measure(`${t}#measurable`,{start:n,duration:o}),u.measure(`${t}#wall`,{start:n,end:r});let d=i.public[t]||0;d+=o,i.public[t]=d}}}}var y=h({cmd_all_timing_network_ms:0,cmd_all_timing_prompts_ms:0}),{getAllPublicMetadata:S,getAllSensitiveMetadata:f,addPublicMetadata:x,addSensitiveMetadata:A,runWithTimer:P}=y;export{h as a,S as b,f as c,x as d,A as e,P as f};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as A}from"./chunk-VJEKDBGZ.js";import{b as f}from"./chunk-
|
|
1
|
+
import{a as A}from"./chunk-VJEKDBGZ.js";import{b as f}from"./chunk-QZEDYQVT.js";import{f as C}from"./chunk-XRJCD3AO.js";import{h as n}from"./chunk-OAG72Q2O.js";import{Ab as u,Ea as b,Ta as I,Wa as G,qb as a,sb as s}from"./chunk-43FRAUV6.js";import{a as k,q as g}from"./chunk-XYUTD6IU.js";import{q as w}from"./chunk-773TIA5M.js";import{e as D,g as $}from"./chunk-VKWPEFWQ.js";$();var R=D(A());async function r(e,t){try{return(await f("git",e,{cwd:t})).stdout}catch(o){if(o instanceof Error){let i=new n(o.message);throw i.stack=o.stack,"exitCode"in o&&Object.assign(i,{exitCode:o.exitCode}),i}throw o}}async function K(e,t="main"){if(t.startsWith("-"))throw new n(`Invalid initial branch name: ${t}. Branch names can't start with a hyphen.`);u(s`Initializing git repository at ${a.path(e)}...`),await m(),await r(["init"],e),await r(["checkout","-b",t],e)}async function Q(e,t){try{return(await r(["check-ignore",...t],e)).split(`
|
|
2
2
|
`).filter(Boolean)}catch(o){if(o instanceof n&&"exitCode"in o&&o.exitCode===1)return[];throw o}}async function V(e){return C("cmd_all_timing_network_ms")(async()=>{let{repoUrl:t,destination:o,shallow:i,latestTag:l}=e;if(u(s`Git-cloning repository ${t} into ${a.path(o)}...`),await m(),await I(o)){if(!await b(o))throw new n(s`Can't clone to ${a.path(o)}`,"The path exists but isn't a directory.");if((await G(["*",".*"],{cwd:o,deep:1,onlyFiles:!1})).length>0)throw new n(s`Directory ${a.path(o)} already exists and is not empty`,s`Choose a different name or remove the existing directory first.`)}let[E,d]=t.split("#");if(d&&l)throw new n("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(i&&l)throw new n("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let h=["clone","--recurse-submodules"];d&&h.push("--branch",d),i&&h.push("--depth","1"),k()||h.push("-c","core.askpass=true"),h.push(E,o);try{if(await f("git",h),l){let c=await S(o,t);await r(["checkout",c],o)}}catch(c){if(c instanceof n)throw c;if(c instanceof Error){let x=new n(c.message);throw x.stack=c.stack,x}throw c}})}async function S(e,t){let o=await F(e);if(!o)throw new n(`Couldn't obtain the most recent tag of the repository ${t}`);return o}async function X(e){let o=await r(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],e);if(!o.trim())throw new n("Must have at least one commit to run command",s`Run ${a.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let i=o.split("\0");return{hash:i[0],date:i[1],message:i[2],refs:i[3],body:i[4],author_name:i[5],author_email:i[6]}}async function Y(e){await r(["add","--all"],e)}async function Z(e,t){let o=["commit","-m",e];if(t?.author){if(t.author.startsWith("-"))throw new n(`Invalid commit author: ${t.author}. Author name/email can't start with a hyphen.`);o.push("--author",t.author)}return await r(o,t?.directory),(await r(["rev-parse","HEAD"],t?.directory)).trim()}async function m(){if(!await g())throw new n("Git is necessary in the environment to continue",s`Install ${a.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var p=class extends n{};async function N(e){if(await m(),!await v(e))throw new p(`${a.path(e??w())} is not a Git directory`)}async function tt(e){return await g()?v(e):!1}async function v(e){try{return await f("git",["rev-parse","--git-dir"],{cwd:e}),!0}catch(t){if(t instanceof Error&&"exitCode"in t&&t.exitCode===128)return!1;throw t}}var y=class extends n{};async function et(e){if(!await T(e))throw new y(`${a.path(e??w())} is not a clean Git directory`)}async function T(e){return(await r(["status","--porcelain"],e)).trim()===""}async function F(e){try{return(await r(["describe","--tags","--abbrev=0"],e)).trim()||void 0}catch(t){if(t instanceof n&&"exitCode"in t&&t.exitCode===128)return;throw t}}async function ot(e,t="origin"){if(u(s`Removing git remote ${t} from ${a.path(e)}...`),await m(),!(await r(["remote"],e)).split(`
|
|
3
3
|
`).filter(Boolean).includes(t)){u(s`Remote ${t} does not exist, no action needed`);return}await r(["remote","remove",t],e)}export{K as a,Q as b,V as c,X as d,Y as e,Z as f,N as g,tt as h,y as i,et as j,T as k,ot as l};
|