@shopify/cli 4.8.4 → 4.8.5
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-4D5FCVMV.js +1 -0
- package/dist/{analytics-RGIJMP4U.js → analytics-XRYJEPWC.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-K2DP5Z76.js → chunk-2IZROVCY.js} +1 -1
- package/dist/{chunk-NHOF2IN6.js → chunk-2JM3XHTQ.js} +1 -1
- package/dist/{chunk-V2GLAK2W.js → chunk-2SOA4M4G.js} +1 -1
- package/dist/{chunk-ZVJD6CUY.js → chunk-2WNF5BX4.js} +1 -1
- package/dist/{chunk-XYUTD6IU.js → chunk-2Z52XJQG.js} +1 -1
- package/dist/chunk-34PQ6LJC.js +1 -0
- package/dist/{chunk-CBMX6XI7.js → chunk-3CKUOG4B.js} +1 -1
- package/dist/{chunk-SCLGMVNB.js → chunk-3NW372KT.js} +1 -1
- package/dist/{chunk-HXVUDGLH.js → chunk-4DIR65KL.js} +1 -1
- package/dist/{chunk-66G2HJ2A.js → chunk-4JLOCGTK.js} +1 -1
- package/dist/{chunk-GINXNPAR.js → chunk-4JU7N2OF.js} +1 -1
- package/dist/{chunk-4F3XYIEY.js → chunk-4NZ465W4.js} +1 -1
- package/dist/{chunk-RDS2WYQH.js → chunk-4SXHXMK6.js} +1 -1
- package/dist/{chunk-BYX7SQPM.js → chunk-4UAJ6ULU.js} +1 -1
- package/dist/{chunk-RIM7FNP3.js → chunk-4UD2LW4O.js} +1 -1
- package/dist/{chunk-Y4BBTWM5.js → chunk-4XE6E4DC.js} +1 -1
- package/dist/{chunk-O72SHE3Q.js → chunk-5EME57E6.js} +1 -1
- package/dist/{chunk-6QADNGH4.js → chunk-5GUXN2RU.js} +1 -1
- package/dist/{chunk-CFQ5G2QS.js → chunk-5N33O2RV.js} +1 -1
- package/dist/{chunk-AQPOPSQ7.js → chunk-5PAPCPUM.js} +1 -1
- package/dist/{chunk-BV62ZERJ.js → chunk-5U24BORP.js} +1 -1
- package/dist/{chunk-2SL443J6.js → chunk-6ARAJULJ.js} +1 -1
- package/dist/{chunk-APUYMORT.js → chunk-6ICRPFG4.js} +1 -1
- package/dist/{chunk-NDT3F2PR.js → chunk-6IOVTFAH.js} +1 -1
- package/dist/{chunk-NBXXTQWA.js → chunk-6LNTC6EK.js} +1 -1
- package/dist/{chunk-VG3YVCZW.js → chunk-6QU2BHVL.js} +1 -1
- package/dist/{chunk-S5H5U3PR.js → chunk-6QWLOSUQ.js} +1 -1
- package/dist/{chunk-2WATX3XV.js → chunk-77KSMVIO.js} +1 -1
- package/dist/{chunk-JQPPLSFT.js → chunk-7O2KMA4J.js} +1 -1
- package/dist/{chunk-L3M7PTHU.js → chunk-7VJPQ52S.js} +1 -1
- package/dist/{chunk-4ZTRKEA2.js → chunk-7ZEVVGCH.js} +1 -1
- package/dist/{chunk-CP56F5UR.js → chunk-A2BZY6TE.js} +1 -1
- package/dist/{chunk-POMWFTBD.js → chunk-A5FV7HOY.js} +1 -1
- package/dist/{chunk-2VJ6NBPV.js → chunk-ADS7BFDG.js} +1 -1
- package/dist/chunk-ADUMJRRY.js +1 -0
- package/dist/{chunk-RHBLXZGU.js → chunk-AEPBX4GI.js} +1 -1
- package/dist/{chunk-YNFXYVYN.js → chunk-AI4SPBPV.js} +1 -1
- package/dist/{chunk-KZU727AL.js → chunk-AKETXXYD.js} +1 -1
- package/dist/{chunk-X4V2CD2H.js → chunk-ANOCIVJ3.js} +1 -1
- package/dist/{chunk-LAMTFOVF.js → chunk-AOPEKBDL.js} +1 -1
- package/dist/{chunk-UPGRXCFS.js → chunk-BMPCDXJR.js} +1 -1
- package/dist/{chunk-HYPY5WH6.js → chunk-BPJRQOHO.js} +1 -1
- package/dist/{chunk-5Z6EW3FA.js → chunk-BU6LJZG7.js} +1 -1
- package/dist/{chunk-FRVRTOTF.js → chunk-C4UCOQUP.js} +1 -1
- package/dist/{chunk-OYCAYEQE.js → chunk-CAKGQWX4.js} +1 -1
- package/dist/{chunk-CVW2HMQO.js → chunk-CBGDD3ZG.js} +1 -1
- package/dist/chunk-CUGLV7UX.js +1 -0
- package/dist/{chunk-RHNZA4IL.js → chunk-CWSQIPY5.js} +1 -1
- package/dist/{chunk-D6LQ56XT.js → chunk-D34ZSTCK.js} +1 -1
- package/dist/{chunk-ERBXXVOZ.js → chunk-D6LV5CJL.js} +1 -1
- package/dist/{chunk-3DT4NS4S.js → chunk-DGMHUJV3.js} +1 -1
- package/dist/{chunk-3CZ7DKE5.js → chunk-DKAWQBTI.js} +1 -1
- package/dist/{chunk-QKTBYAUD.js → chunk-DPMOLROM.js} +1 -1
- package/dist/{chunk-XKHKXUQY.js → chunk-DV7FOLG4.js} +1 -1
- package/dist/{chunk-PNNW7YQG.js → chunk-EBBS7VG6.js} +1 -1
- package/dist/{chunk-DUNE3INK.js → chunk-EJJPVVQ2.js} +1 -1
- package/dist/{chunk-2HW6VRJT.js → chunk-ENUN2VSC.js} +1 -1
- package/dist/{chunk-BHTHUKHU.js → chunk-EX7Y3BEH.js} +1 -1
- package/dist/{chunk-T4V7KOGJ.js → chunk-F33TYJM5.js} +1 -1
- package/dist/{chunk-BAWBC66R.js → chunk-FDK3NDYQ.js} +1 -1
- package/dist/{chunk-LX5UXWZ7.js → chunk-FLV6UQRA.js} +1 -1
- package/dist/{chunk-LBA6FGKC.js → chunk-FTC3BXSD.js} +1 -1
- package/dist/{chunk-FY47X4NG.js → chunk-FXBQKJTS.js} +1 -1
- package/dist/{chunk-L2DCUVZV.js → chunk-FXWNYGIW.js} +1 -1
- package/dist/{chunk-H2HR2AQE.js → chunk-G5272L77.js} +1 -1
- package/dist/{chunk-43FRAUV6.js → chunk-G5QSVBYP.js} +4 -4
- package/dist/{chunk-DDZEYA2I.js → chunk-G6SURO6V.js} +1 -1
- package/dist/{chunk-7FVCUY54.js → chunk-G7C4LBG2.js} +1 -1
- package/dist/{chunk-DO4SRE4M.js → chunk-GBYDMHZ3.js} +1 -1
- package/dist/{chunk-6A3TDSON.js → chunk-GCJAY2XJ.js} +1 -1
- package/dist/{chunk-NKC3K3XP.js → chunk-GR6NR5QK.js} +1 -1
- package/dist/{chunk-67QK26HI.js → chunk-GUPUXFIP.js} +1 -1
- package/dist/{chunk-VBICZDA4.js → chunk-GW7IEG4G.js} +1 -1
- package/dist/{chunk-SVYHWGMI.js → chunk-H5MENHJ2.js} +1 -1
- package/dist/{chunk-YHTONNIZ.js → chunk-H6TWXT6Q.js} +1 -1
- package/dist/chunk-HGFCNPSN.js +1 -0
- package/dist/{chunk-BHJ3TGS7.js → chunk-HKHGJYRC.js} +1 -1
- package/dist/{chunk-OY6L7J53.js → chunk-HS3VTFW3.js} +1 -1
- package/dist/{chunk-FRRA5MI2.js → chunk-HSETBDXR.js} +1 -1
- package/dist/{chunk-WY7QF7VU.js → chunk-I6DVGPJ7.js} +1 -1
- package/dist/{chunk-GJHBAOGJ.js → chunk-IKNCFVVX.js} +1 -1
- package/dist/{chunk-Z2HN5L6G.js → chunk-IMIPD73V.js} +1 -1
- package/dist/{chunk-D6QTOQEJ.js → chunk-IPN5OHBY.js} +1 -1
- package/dist/{chunk-AU7GNCOK.js → chunk-IYFHBTJ2.js} +1 -1
- package/dist/{chunk-4OMKKYFC.js → chunk-J2HBEHCX.js} +1 -1
- package/dist/{chunk-JJJIRCQP.js → chunk-J774336K.js} +1 -1
- package/dist/{chunk-MYLMGH7Y.js → chunk-K3OI5VDE.js} +1 -1
- package/dist/{chunk-QZEDYQVT.js → chunk-K5OTE6CX.js} +1 -1
- package/dist/{chunk-JWHQPDOK.js → chunk-KB43BSFM.js} +1 -1
- package/dist/{chunk-TCFGEOE4.js → chunk-KDMJ2BLO.js} +1 -1
- package/dist/{chunk-EQ2PD2ZA.js → chunk-KGRDHI2A.js} +1 -1
- package/dist/{chunk-FGRW7GT4.js → chunk-KHRZFJHM.js} +1 -1
- package/dist/{chunk-OPOPO7DG.js → chunk-KNCYAIJ2.js} +1 -1
- package/dist/{chunk-CNK3ZO2B.js → chunk-KYNXMDFU.js} +3 -3
- package/dist/{chunk-6CR2EEZ3.js → chunk-L7CQQML6.js} +1 -1
- package/dist/{chunk-2IRRFPEY.js → chunk-LCVDLQEZ.js} +1 -1
- package/dist/{chunk-4HOJJCZ6.js → chunk-LZZAD3FW.js} +1 -1
- package/dist/{chunk-XRJCD3AO.js → chunk-M2M3I63K.js} +1 -1
- package/dist/{chunk-ZVA5F4QC.js → chunk-MFP63IUM.js} +1 -1
- package/dist/{chunk-XHXKPRF5.js → chunk-MMHTYLTG.js} +1 -1
- package/dist/{chunk-VETLNJ56.js → chunk-MNYKIPG7.js} +1 -1
- package/dist/{chunk-XWXAFJFC.js → chunk-MVJSQT7V.js} +1 -1
- package/dist/{chunk-BG7QQU23.js → chunk-NAQ7KT6L.js} +1 -1
- package/dist/{chunk-V4774HTF.js → chunk-NDAUL4H4.js} +1 -1
- package/dist/{chunk-MBRFIXCU.js → chunk-NDFKLPHJ.js} +1 -1
- package/dist/{chunk-WGFGWDWP.js → chunk-NPATN7YS.js} +1 -1
- package/dist/{chunk-FW3RORD7.js → chunk-NUKSSKYR.js} +1 -1
- package/dist/chunk-NVNDQQN6.js +8 -0
- package/dist/{chunk-KWQGJ3VC.js → chunk-NZ3HLDJG.js} +1 -1
- package/dist/{chunk-WAJRWCZY.js → chunk-NZE4C4OI.js} +1 -1
- package/dist/{chunk-PM3HRKPR.js → chunk-O452KNRL.js} +1 -1
- package/dist/{chunk-6P5FGN6P.js → chunk-OAEGTH4Q.js} +1 -1
- package/dist/{chunk-TAY7HU7X.js → chunk-OJSF3H2G.js} +20 -20
- package/dist/{chunk-JXG2T76F.js → chunk-P5R6JZMT.js} +1 -1
- package/dist/{chunk-3DIRCEXA.js → chunk-PDWJ2YH2.js} +1 -1
- package/dist/{chunk-ZCNNJCTQ.js → chunk-PIQI72DV.js} +1 -1
- package/dist/{chunk-ZAH6QID2.js → chunk-PJ7L6NSD.js} +1 -1
- package/dist/{chunk-H7TDIRIU.js → chunk-PL7AJVTV.js} +1 -1
- package/dist/{chunk-W4SQE6NR.js → chunk-POOKYUTJ.js} +1 -1
- package/dist/{chunk-7KLPRSQR.js → chunk-PQDB3FUL.js} +1 -1
- package/dist/{chunk-6C5AVMKR.js → chunk-PSSOCUUD.js} +2 -2
- package/dist/{chunk-74CYT3VX.js → chunk-PU6KWWVK.js} +1 -1
- package/dist/{chunk-IHEBV2KO.js → chunk-PWXGGZQB.js} +1 -1
- package/dist/{chunk-R3GLEZSE.js → chunk-QKUTVLRJ.js} +1 -1
- package/dist/{chunk-G2YTINLI.js → chunk-QOOVB6RW.js} +1 -1
- package/dist/{chunk-CSOCXWP6.js → chunk-R4TOHQH3.js} +1 -1
- package/dist/{chunk-WGUCRVII.js → chunk-RGJVJ22M.js} +1 -1
- package/dist/{chunk-DH3DMUE2.js → chunk-RSGIMVPN.js} +1 -1
- package/dist/{chunk-SPNM3GES.js → chunk-RU6J6QQF.js} +1 -1
- package/dist/{chunk-L3JBKCAS.js → chunk-RX63KGTK.js} +1 -1
- package/dist/{chunk-AIILEPSK.js → chunk-SOJHJ4QK.js} +1 -1
- package/dist/{chunk-66HW6J57.js → chunk-SYBKHTVU.js} +1 -1
- package/dist/{chunk-EJJPEWSB.js → chunk-T3B6KIPU.js} +1 -1
- package/dist/{chunk-6V6UNUMM.js → chunk-TIG7SSKB.js} +1 -1
- package/dist/{chunk-L4LDNEFK.js → chunk-TTV2GWNE.js} +1 -1
- package/dist/{chunk-GTAYTMCP.js → chunk-TUWRPDTE.js} +1 -1
- package/dist/{chunk-4DLRS7MT.js → chunk-UBTHWHPB.js} +3 -3
- package/dist/chunk-UDWSRNKO.js +1 -0
- package/dist/{chunk-U6URYCC6.js → chunk-UJSCQJLW.js} +1 -1
- package/dist/{chunk-6B727IUY.js → chunk-VE6BYYBP.js} +1 -1
- package/dist/{chunk-LEW5IJK6.js → chunk-VIMFXQ3Q.js} +1 -1
- package/dist/{chunk-UJBMY5WR.js → chunk-VPOAOUT4.js} +1 -1
- package/dist/{chunk-IHH5XTPV.js → chunk-VVPIXC3W.js} +1 -1
- package/dist/{chunk-OAG72Q2O.js → chunk-W3BNL2Q5.js} +1 -1
- package/dist/{chunk-A3U7JDUC.js → chunk-WAZL37JY.js} +1 -1
- package/dist/{chunk-OUA6EOLX.js → chunk-WDY5CK2T.js} +1 -1
- package/dist/{chunk-TA2M37OB.js → chunk-WHXY372K.js} +1 -1
- package/dist/{chunk-M7VQLMSW.js → chunk-WHZKFG2B.js} +1 -1
- package/dist/{chunk-7VQBIGJB.js → chunk-WKRX4FBZ.js} +1 -1
- package/dist/{chunk-QVO5CAJN.js → chunk-WKTIQUQP.js} +1 -1
- package/dist/{chunk-VDGTHMIQ.js → chunk-WLU7UG44.js} +1 -1
- package/dist/{chunk-C4Y7PQDQ.js → chunk-WM3GKSPE.js} +1 -1
- package/dist/{chunk-KUZ5Z6HM.js → chunk-WNBRPWSB.js} +1 -1
- package/dist/{chunk-A5U4KKNV.js → chunk-WQOV3LQA.js} +1 -1
- package/dist/{chunk-A3V2A2I4.js → chunk-WWRLFLGM.js} +1 -1
- package/dist/{chunk-3IQ6WXDD.js → chunk-XOEBZR5C.js} +1 -1
- package/dist/{chunk-W4SGAPPR.js → chunk-XRWQ7AXY.js} +1 -1
- package/dist/{chunk-5DMFEDKY.js → chunk-YGSXN3YD.js} +1 -1
- package/dist/{chunk-2ZROBXJX.js → chunk-YN5SVIOI.js} +1 -1
- package/dist/{chunk-HYM3HBDG.js → chunk-YVB7ZPHR.js} +2 -2
- package/dist/{chunk-7LZ34C4S.js → chunk-Z4E2EXZV.js} +1 -1
- package/dist/{chunk-HINK4QAR.js → chunk-ZFA5DIJ3.js} +1 -1
- package/dist/{chunk-PGWQHSDV.js → chunk-ZIAXZ5VG.js} +1 -1
- package/dist/{chunk-QXR5DJC2.js → chunk-ZMD5TNU5.js} +1 -1
- package/dist/{chunk-Z5KYKXMH.js → chunk-ZMTTZXC4.js} +1 -1
- package/dist/{chunk-DZZORIWL.js → chunk-ZZNGFCJ3.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-H3UAVGN5.js → conf-store-5UUKEHZV.js} +1 -1
- package/dist/{deprecations-TEUM7CML.js → deprecations-DVGWC3RL.js} +1 -1
- package/dist/dist-CN7N5IOM.js +1 -0
- package/dist/dist-Q5U4WGYG.js +1 -0
- package/dist/{environments-LAFWOQWO.js → environments-M4CFP4XF.js} +1 -1
- package/dist/{error-6ZCGAC5E.js → error-ZES2RSN7.js} +1 -1
- package/dist/error-handler-CRTU67VJ.js +1 -0
- package/dist/{fs-QEWOWUPQ.js → fs-GELMKEWX.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-UYMEAGDR.js → is-global-X2QNCXXB.js} +1 -1
- package/dist/{local-Z4ZEMWE4.js → local-HMFFXIE3.js} +1 -1
- package/dist/{metadata-ZCQMB5AB.js → metadata-SXJZZMCI.js} +1 -1
- package/dist/{node-package-manager-HMOTOBDS.js → node-package-manager-2D2CIFTG.js} +1 -1
- package/dist/notifications-system-WH6MAXEN.js +1 -0
- package/dist/os-PY42WAOB.js +1 -0
- package/dist/{output-BJCZYDNG.js → output-MSTNB7GI.js} +1 -1
- package/dist/{system-T4H2ISV6.js → system-7XRI63YJ.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-4MQSY5IN.js → ui-77QYNWJB.js} +1 -1
- package/dist/upgrade-UVPNOKKK.js +1 -0
- package/dist/version-DXGPL73I.js +1 -0
- package/dist/{version-RF7QQXRX.js → version-XMVQO6PD.js} +1 -1
- package/dist/{workerd-7E4H2DM3.js → workerd-SOWC66FA.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/analytics-M4OC7RPG.js +0 -1
- package/dist/chunk-2HYR6EUD.js +0 -1
- package/dist/chunk-44QD4QNO.js +0 -1
- package/dist/chunk-6XLFFOPK.js +0 -1
- package/dist/chunk-GGPMDCCB.js +0 -8
- package/dist/chunk-VJ5YOXKL.js +0 -1
- package/dist/chunk-XOYICV6P.js +0 -1
- package/dist/dist-62I5X3FS.js +0 -1
- package/dist/dist-YHZ5BTYD.js +0 -1
- package/dist/error-handler-JNCW56EC.js +0 -1
- package/dist/notifications-system-RT3CY6LZ.js +0 -1
- package/dist/os-G6KDPJMC.js +0 -1
- package/dist/upgrade-4234MIYJ.js +0 -1
- package/dist/version-FRSRSCRX.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as p}from"./chunk-CFQ5G2QS.js";import{Aa as s,l as E,xa as b,ya as k}from"./chunk-CNK3ZO2B.js";import{J as w}from"./chunk-6C5AVMKR.js";import{h as N}from"./chunk-OAG72Q2O.js";import{Ab as V,S as _}from"./chunk-43FRAUV6.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ie="live",ae="unpublished";function te(e){return e.role===g}async function de(e){let n=await _("creative");return w({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function f(e){let n=j.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:a,role:i,processing:t,createdAtRuntime:d}=e;return{id:n,name:a,processing:t,createdAtRuntime:d,role:i==="main"?"live":i}}function se(e){if(!e)return;let{key:n,checksum:a,attachment:i,value:t}=e,d={size:(t||i||"").length,mtime:Date.now()};return{key:n,checksum:a,attachment:i,value:t,stats:d}}l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Q="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",c={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function sn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await p({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),k(i),V(`Error fetching theme with ID: ${e}`)}}async function un(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await T({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});i.themes||r("Failed to fetch themes");let{nodes:t,pageInfo:d}=i.themes;if(t.forEach(m=>{let o=y({id:f(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&n.push(o)}),!d.hasNextPage)return n;a=d.endCursor}}async function kn(e,n){s("theme-api:find-development-theme-by-name");let{themes:a}=await T({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw k(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:i,processing:t,role:d,name:m}=a.nodes[0];return y({id:f(i),processing:t,role:d.toLowerCase(),name:m})}}async function cn(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await T({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:c});i||r("Failed to create theme");let{theme:t,userErrors:d}=i;if(d.length){let m=i.userErrors.map(o=>o.message).join(", ");throw k(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function pn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await T({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async u=>{let{attachment:h,value:v}=await J(u.body);return{attachment:h,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function vn(e,n,a){let t=[];s("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:o}=await p({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:c});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:h}=o;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(k(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return t}async function Nn(e,n,a){let i=[];s("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=X(d);b("theme-api:upload-files");let o=await K(e,m,a);b("theme-api:upload-files"),i.push(...W(o))}return i}function X(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function K(e,n,a){return p({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:c})}function W(e){let{themeFilesUpsert:n}=e;n||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:i}=n,t=[];return a?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),i.forEach(d=>{d.filename||r(`Error uploading theme files: ${d.message}`),k(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function hn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await T({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(a.push(...d.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;i=m.endCursor}}async function fn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await p({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:c});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let u=d.userErrors.map(h=>h.message).join(", ");throw k(new N(u))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function yn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await p({query:O,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{theme:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function Sn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await p({query:x,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{deletedThemeId:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),!0}async function Fn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await p({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:c,responseOptions:{onResponse:u=>{i=u.headers.get("x-request-id")??void 0}}});if(!t)return k("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:i}:d?{theme:y({id:f(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:i}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i}}async function Tn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await p({query:L,session:n,variables:{ownerType:e}});return a.nodes.map(i=>({key:i.key,namespace:i.namespace,name:i.name,description:i.description,type:{name:i.type.name,category:i.type.category}}))}async function bn(e){s("theme-api:check-password-protection");let{onlineStore:n}=await p({query:$,session:e});n||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=n;return a.enabled}function r(e){throw k(new N(e))}async function T(e){try{return await p(e)}catch(n){throw H(n),n}}function H(e){if(!(e instanceof E))return;let n=Y(e);if(!n)return;let a=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},"and",{command:"theme dev"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw k(new N(`The authenticated account or access token is missing ${n}.`,void 0,a))}function Y(e){let n=e.response.errors;if(!Array.isArray(n))return;let a=n.find(t=>t.extensions?.code==="ACCESS_DENIED");if(!a)return;let i=a.extensions?.requiredAccess;return typeof i!="string"?z:Z(i)}function Z(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function J(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw k(new N(`Error downloading content from URL: ${e.url}`))}}}export{se as a,g as b,ie as c,ae as d,te as e,de as f,sn as g,un as h,kn as i,cn as j,pn as k,vn as l,Nn as m,hn as n,fn as o,yn as p,Sn as q,Fn as r,Tn as s,bn as t};
|
|
1
|
+
import{b as p}from"./chunk-5N33O2RV.js";import{Aa as s,l as E,xa as b,ya as k}from"./chunk-KYNXMDFU.js";import{J as w}from"./chunk-PSSOCUUD.js";import{h as N}from"./chunk-W3BNL2Q5.js";import{Ab as V,S as _}from"./chunk-G5QSVBYP.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var j=/gid:\/\/shopify\/\w*\/(\d+)/,g="development",ie="live",ae="unpublished";function te(e){return e.role===g}async function de(e){let n=await _("creative");return w({message:e,defaultValue:n})}function S(e){return`gid://shopify/OnlineStoreTheme/${e}`}function f(e){let n=j.exec(e);if(n&&n[1]!==void 0)return parseInt(n[1],10);throw new Error(`Invalid GID: ${e}`)}l();l();var F;(function(e){e.Delete="DELETE",e.Upload="UPLOAD"})(F||(F={}));l();function y(e){if(!e)return;e.processing??=!1,e.createdAtRuntime??=!1;let{id:n,name:a,role:i,processing:t,createdAtRuntime:d}=e;return{id:n,name:a,processing:t,createdAtRuntime:d,role:i==="main"?"live":i}}function se(e){if(!e)return;let{key:n,checksum:a,attachment:i,value:t}=e,d={size:(t||i||"").length,mtime:Date.now()};return{key:n,checksum:a,attachment:i,value:t,stats:d}}l();var A={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var x={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeId"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeDuplicate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeDuplicate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"newTheme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var O={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themePublish"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themePublish"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var B={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"source"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"URL"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"role"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ThemeRole"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"source"},value:{kind:"Variable",name:{kind:"Name",value:"source"}}},{kind:"Argument",name:{kind:"Name",value:"role"},value:{kind:"Variable",name:{kind:"Name",value:"role"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var C={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileBodies"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filenames"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}},{kind:"Argument",name:{kind:"Name",value:"filenames"},value:{kind:"Variable",name:{kind:"Name",value:"filenames"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"body"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyText"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyBase64"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentBase64"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFileBodyUrl"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemeFileChecksums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"size"}},{kind:"Field",name:{kind:"Name",value:"checksumMd5"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesUpsert"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OnlineStoreThemeFilesUpsertFileInput"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesUpsert"},arguments:[{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}},{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"upsertedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"themeFilesDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"themeId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"files"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themeFilesDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"themeId"},value:{kind:"Variable",name:{kind:"Name",value:"themeId"}}},{kind:"Argument",name:{kind:"Name",value:"files"},value:{kind:"Variable",name:{kind:"Name",value:"files"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletedThemeFiles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"filename"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"metafieldDefinitionsByOwnerType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"ownerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MetafieldOwnerType"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"metafieldDefinitions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"ownerType"},value:{kind:"Variable",name:{kind:"Name",value:"ownerType"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"250"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"namespace"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"type"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getThemes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"endCursor"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var M={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTheme"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"theme"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var G={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"findDevelopmentThemeByName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"themes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}},{kind:"Argument",name:{kind:"Name",value:"names"},value:{kind:"ListValue",values:[{kind:"Variable",name:{kind:"Name",value:"name"}}]}},{kind:"Argument",name:{kind:"Name",value:"roles"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"role"}},{kind:"Field",name:{kind:"Name",value:"processing"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};l();var $={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OnlineStorePasswordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"onlineStore"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"passwordProtection"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"enabled"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Q="https://cdn.shopify.com/static/online-store/theme-skeleton.zip",c={useNetworkLevelRetry:!0,useAbortSignal:!1,maxRetryTimeMs:90*1e3,recordCommandRetries:!0},z="the required theme access scope";async function sn(e,n){let a=S(e);s("theme-api:fetch-theme");try{let{theme:i}=await p({query:M,session:n,variables:{id:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(i)return y({id:f(i.id),processing:i.processing,role:i.role.toLowerCase(),name:i.name})}catch(i){H(i),k(i),V(`Error fetching theme with ID: ${e}`)}}async function un(e){let n=[],a=null;for(s("theme-api:fetch-themes");;){let i=await T({query:R,session:e,variables:{after:a},responseOptions:{handleErrors:!1},preferredBehaviour:c});i.themes||r("Failed to fetch themes");let{nodes:t,pageInfo:d}=i.themes;if(t.forEach(m=>{let o=y({id:f(m.id),processing:m.processing,role:m.role.toLowerCase(),name:m.name});o&&n.push(o)}),!d.hasNextPage)return n;a=d.endCursor}}async function kn(e,n){s("theme-api:find-development-theme-by-name");let{themes:a}=await T({query:G,session:n,variables:{name:e},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(a||r("Failed to fetch themes"),a.nodes.length>1)throw k(new N(`More than one development theme is named "${e}"`));if(a.nodes.length===1){let{id:i,processing:t,role:d,name:m}=a.nodes[0];return y({id:f(i),processing:t,role:d.toLowerCase(),name:m})}}async function cn(e,n){let a=e.src??Q;s("theme-api:create-theme");let{themeCreate:i}=await T({query:B,session:n,variables:{name:e.name??"",source:a,role:(e.role??g).toUpperCase()},responseOptions:{handleErrors:!1},preferredBehaviour:c});i||r("Failed to create theme");let{theme:t,userErrors:d}=i;if(d.length){let m=i.userErrors.map(o=>o.message).join(", ");throw k(new N(m))}return t||r("Failed to create theme"),y({id:f(t.id),name:t.name,role:t.role.toLowerCase()})}async function pn(e,n,a){let i=[],t=null;for(s("theme-api:fetch-assets");;){let d=await T({query:C,session:a,variables:{id:D(e),filenames:n,after:t},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!d.theme?.files?.nodes||!d.theme?.files?.pageInfo){let u=d.theme?.files?.userErrors.map(h=>h.filename).join(", ");r(`Error fetching assets: ${u}`)}let{nodes:m,pageInfo:o}=d.theme.files;if(i.push(...await Promise.all(m.map(async u=>{let{attachment:h,value:v}=await J(u.body);return{attachment:h,key:u.filename,checksum:u.checksumMd5,value:v}}))),!o.hasNextPage)return i;t=o.endCursor}}async function vn(e,n,a){let t=[];s("theme-api:delete-assets");for(let d=0;d<n.length;d+=50){let m=n.slice(d,d+50),{themeFilesDelete:o}=await p({query:U,session:a,variables:{themeId:S(e),files:m},preferredBehaviour:c});o||r("Failed to delete theme assets");let{deletedThemeFiles:u,userErrors:h}=o;u&&u.forEach(v=>{t.push({key:v.filename,success:!0,operation:F.Delete})}),h.length>0&&h.forEach(v=>{v.filename?(k(`Asset deletion failed for ${v.filename}: ${v.message}`),t.push({key:v.filename,success:!1,operation:F.Delete,errors:{asset:[v.message]}})):r(`Failed to delete theme assets: ${v.message}`)})}return t}async function Nn(e,n,a){let i=[];s("theme-api:bulk-upload-assets");for(let t=0;t<n.length;t+=50){let d=n.slice(t,t+50),m=X(d);b("theme-api:upload-files");let o=await K(e,m,a);b("theme-api:upload-files"),i.push(...W(o))}return i}function X(e){return e.map(n=>n.attachment?{filename:n.key,body:{type:"BASE64",value:n.attachment}}:{filename:n.key,body:{type:"TEXT",value:n.value??""}})}async function K(e,n,a){return p({query:P,session:a,variables:{themeId:D(e),files:n},preferredBehaviour:c})}function W(e){let{themeFilesUpsert:n}=e;n||r("Failed to upload theme files");let{upsertedThemeFiles:a,userErrors:i}=n,t=[];return a?.forEach(d=>{t.push({key:d.filename,success:!0,operation:F.Upload})}),i.forEach(d=>{d.filename||r(`Error uploading theme files: ${d.message}`),k(`Asset upload failed for ${d.filename}: ${d.message}`),t.push({key:d.filename,success:!1,operation:F.Upload,errors:{asset:[d.message]}})}),t}async function hn(e,n){let a=[],i=null;for(s("theme-api:fetch-checksums");;){let t=await T({query:q,session:n,variables:{id:D(e),after:i},responseOptions:{handleErrors:!1},preferredBehaviour:c});if(!t?.theme?.files?.nodes||!t?.theme?.files?.pageInfo){let o=t.theme?.files?.userErrors.map(u=>u.filename).join(", ");throw k(new N(`Failed to fetch checksums for: ${o}`))}let{nodes:d,pageInfo:m}=t.theme.files;if(a.push(...d.map(o=>({key:o.filename,checksum:o.checksumMd5}))),!m.hasNextPage)return a;i=m.endCursor}}async function fn(e,n,a){let i=n.name,t={};i&&(t.name=i),s("theme-api:update-theme");let{themeUpdate:d}=await p({query:A,session:a,variables:{id:S(e),input:t},preferredBehaviour:c});d||r("Failed to update theme");let{theme:m,userErrors:o}=d;if(o.length){let u=d.userErrors.map(h=>h.message).join(", ");throw k(new N(u))}return m||r("Failed to update theme"),y({id:f(m.id),name:m.name,role:m.role.toLowerCase()})}async function yn(e,n){s("theme-api:publish-theme");let{themePublish:a}=await p({query:O,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{theme:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),y({id:f(i.id),name:i.name,role:i.role.toLowerCase()})}async function Sn(e,n){s("theme-api:delete-theme");let{themeDelete:a}=await p({query:x,session:n,variables:{id:S(e)},preferredBehaviour:c});a||r("Failed to update theme");let{deletedThemeId:i,userErrors:t}=a;if(t.length){let d=a.userErrors.map(m=>m.message).join(", ");throw k(new N(d))}return i||r("Failed to update theme"),!0}async function Fn(e,n,a){let i;s("theme-api:duplicate-theme");let{themeDuplicate:t}=await p({query:I,session:a,variables:{id:S(e),name:n},preferredBehaviour:c,responseOptions:{onResponse:u=>{i=u.headers.get("x-request-id")??void 0}}});if(!t)return k("Failed to duplicate theme"),{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i};let{newTheme:d,userErrors:m}=t;return m.length>0?{theme:void 0,userErrors:m,requestId:i}:d?{theme:y({id:f(d.id),name:d.name,role:d.role.toLowerCase()}),userErrors:[],requestId:i}:{theme:void 0,userErrors:[{message:"Failed to duplicate theme"}],requestId:i}}async function Tn(e,n){s("theme-api:fetch-metafield-definitions");let{metafieldDefinitions:a}=await p({query:L,session:n,variables:{ownerType:e}});return a.nodes.map(i=>({key:i.key,namespace:i.namespace,name:i.name,description:i.description,type:{name:i.type.name,category:i.type.category}}))}async function bn(e){s("theme-api:check-password-protection");let{onlineStore:n}=await p({query:$,session:e});n||r("Unable to get details about the storefront's password protection");let{passwordProtection:a}=n;return a.enabled}function r(e){throw k(new N(e))}async function T(e){try{return await p(e)}catch(n){throw H(n),n}}function H(e){if(!(e instanceof E))return;let n=Y(e);if(!n)return;let a=[["If you authenticated with an Admin API access token, update the app or integration that issued the token to include the required theme access scopes, then reauthorize it or generate a new token."],["For",{command:"theme pull"},{char:","},{command:"theme list"},{char:","},"and",{command:"theme info"},{char:","},"add the",{command:"read_themes"},"scope",{char:"."}],["For",{command:"theme push"},"and",{command:"theme dev"},{char:","},"add both the",{command:"read_themes"},"and",{command:"write_themes"},"scopes",{char:"."}],["If you authenticated with your Shopify account, make sure your staff or collaborator account can access Online Store themes, then run",{command:"shopify auth logout"},"and try again",{char:"."}],["See",{link:{label:"Shopify access scopes",url:"https://shopify.dev/api/usage/access-scopes"}},{char:"."}]];throw k(new N(`The authenticated account or access token is missing ${n}.`,void 0,a))}function Y(e){let n=e.response.errors;if(!Array.isArray(n))return;let a=n.find(t=>t.extensions?.code==="ACCESS_DENIED");if(!a)return;let i=a.extensions?.requiredAccess;return typeof i!="string"?z:Z(i)}function Z(e){return e.trim().replace(/\.$/,"").replace(/^The user needs\s+/i,"")||z}function D(e){return`gid://shopify/OnlineStoreTheme/${e}`}async function J(e){switch(e.__typename){case"OnlineStoreThemeFileBodyText":return{value:e.content};case"OnlineStoreThemeFileBodyBase64":return{attachment:e.contentBase64};case"OnlineStoreThemeFileBodyUrl":try{let a=await(await fetch(e.url)).arrayBuffer();return{attachment:Buffer.from(a).toString("base64")}}catch{throw k(new N(`Error downloading content from URL: ${e.url}`))}}}export{se as a,g as b,ie as c,ae as d,te as e,de as f,sn as g,un as h,kn as i,cn as j,pn as k,vn as l,Nn as m,hn as n,fn as o,yn as p,Sn as q,Fn as r,Tn as s,bn as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as N}from"./chunk-LFOBYEWG.js";import{L as E,b}from"./chunk-
|
|
1
|
+
import{b as N}from"./chunk-LFOBYEWG.js";import{L as E,b}from"./chunk-KYNXMDFU.js";import{V as O}from"./chunk-PSSOCUUD.js";import{d as _}from"./chunk-M2M3I63K.js";import{h as f}from"./chunk-W3BNL2Q5.js";import{a as q}from"./chunk-CTNBSUVU.js";import{$ as F,qb as d,sb as g,wb as $}from"./chunk-G5QSVBYP.js";import{c as P}from"./chunk-2Z52XJQG.js";import{a as T}from"./chunk-JD5P5RAJ.js";import{e as j,g as w}from"./chunk-VKWPEFWQ.js";w();var u=j(q()),h=class extends u.Command{static baseFlags={};static get requiresSyncAnalytics(){return!1}static nonTTYFlagRequirements(e){return[]}static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(e){e.skipOclifErrorHandling=!0;let{errorHandler:t}=await import("./error-handler-CRTU67VJ.js");return await t(e,this.config),u.Errors.handle(e)}async init(){if(this.exitWithTimestampWhenEnvVariablePresent(),N(this.id??""),!P()){let{registerCleanBugsnagErrorsFromWithinPlugins:t}=await import("./error-handler-CRTU67VJ.js");await t(this.config)}await M(this.config),this.showNpmFlagWarning();let{showNotificationsIfNeeded:e}=await import("./notifications-system-WH6MAXEN.js");return await e(),super.init()}showNpmFlagWarning(){let e=this.constructor;Object.keys(e.flags||{}).map(r=>`npm_config_${F(r).replace(/^no_/,"")}`).some(r=>process.env[r]!==void 0)&&import("./ui-77QYNWJB.js").then(({renderWarning:r})=>{r({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})})}exitWithTimestampWhenEnvVariablePresent(){T(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&($(`
|
|
2
2
|
SHOPIFY_CLI_TIMESTAMP_START
|
|
3
3
|
{ "timestamp": ${Date.now()} }
|
|
4
4
|
SHOPIFY_CLI_TIMESTAMP_END
|
|
@@ -7,6 +7,6 @@ import{b as N}from"./chunk-LFOBYEWG.js";import{L as E,b}from"./chunk-CNK3ZO2B.js
|
|
|
7
7
|
|
|
8
8
|
${d.cyan(i)}
|
|
9
9
|
|
|
10
|
-
${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(e){let t=this.constructor,n={...t.baseFlags,...t.flags},r=Object.entries(n).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),i=(t.nonTTYFlagRequirements?.(e)??[]).filter(a=>a.when?.(e)??!0);return[...r,...i]}async resultWithEnvironment(e,t,n){let r=e.flags,i=this.environmentsFilename();if(!i)return e;let{environmentFilePath:a}=await import("./environments-
|
|
11
|
-
`),{renderWarning:a}=await import("./ui-
|
|
10
|
+
${a} in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the options in the command, or run the command in an interactive environment such as your local terminal.")}applicableNonTTYFlagRequirements(e){let t=this.constructor,n={...t.baseFlags,...t.flags},r=Object.entries(n).filter(([,a])=>!!a.requiredIfNonInteractive).map(([a])=>({flags:[a]})),i=(t.nonTTYFlagRequirements?.(e)??[]).filter(a=>a.when?.(e)??!0);return[...r,...i]}async resultWithEnvironment(e,t,n){let r=e.flags,i=this.environmentsFilename();if(!i)return e;let{environmentFilePath:a}=await import("./environments-M4CFP4XF.js"),o=await a(i,{from:r.path}),l=[];r.environment&&(l=Array.isArray(r.environment)?r.environment:[r.environment]);let c=l.length>0;if(!o&&!c||c&&l.length>1)return e;let{environment:m,isDefaultEnvironment:p}=await this.loadEnvironmentForCommand(r.path,i,l[0]);if(!m||p&&!S(t?.flags,"environment"))return e;let v=await super.parse(A(t),n),y=await super.parse(t,[...n??this.argv,...R(m,t,v),...p?["--environment","default"]:[]]);return I(v.flags,y.flags,p?"default":l[0],m),y}async loadEnvironmentForCommand(e,t,n){let{loadEnvironment:r}=await import("./environments-M4CFP4XF.js");return n?{environment:await r(n,t,{from:e}),isDefaultEnvironment:!1}:{environment:await r("default",t,{from:e,silent:!0}),isDefaultEnvironment:!0}}};async function C(s){await _(()=>({cmd_all_verbose:s.verbose,cmd_all_path_override:s.path!==void 0,cmd_all_path_override_hash:s.path===void 0?void 0:b(s.path)}))}function I(s,e,t,n){let r={};for(let[a,o]of Object.entries(e)){let l=Object.prototype.hasOwnProperty.call(s,a),c=Object.prototype.hasOwnProperty.call(n,a);if(!l&&c){let m=a==="password"?`********${o.substr(-4)}`:o;r[a]=m}}if(Object.keys(r).length===0)return;let i=Object.entries(r).map(([a,o])=>`${a}: ${o}`);import("./ui-77QYNWJB.js").then(({renderInfo:a})=>{a({headline:["Using applicable flags from",{userInput:t},"environment:"],body:[{list:{items:i}}]})})}function A(s){return s?.flags?{...s,flags:Object.fromEntries(Object.entries(s.flags).map(([e,t])=>{let n={...t};return delete n.default,[e,n]}))}:s}function R(s,e,t){let n=[];for(let[r,i]of Object.entries(s)){let a=S(e?.flags,r),o=t.flags&&Object.prototype.hasOwnProperty.call(t.flags,r);if(a&&!o)if(typeof i=="boolean")if(i)n.push(`--${r}`);else throw new f(g`Environments can only specify true for boolean flags. Attempted to set ${d.yellow(r)} to false.`);else Array.isArray(i)?i.forEach(l=>n.push(`--${r}`,`${l}`)):n.push(`--${r}`,`${i}`)}return n}function S(s,e){return!!s&&Object.prototype.hasOwnProperty.call(s,e)}async function M(s){let e=Array.from(s.plugins.values()),t=["@shopify/app","@shopify/plugin-cloudflare"],n=e.filter(i=>t.includes(i.name));if(n.length>0){let i=n.map(o=>` - shopify plugins remove ${o.name}`).join(`
|
|
11
|
+
`),{renderWarning:a}=await import("./ui-77QYNWJB.js");a({headline:`Unsupported plugins detected: ${n.map(o=>o.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
|
|
12
12
|
${i}`]})}let r=e.filter(i=>!t.includes(i.name));s.plugins=new Map(r.map(i=>[i.name,i]))}var z=h;export{A as a,z as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as I}from"./chunk-VKWPEFWQ.js";I();var o="4.8.5";export{o as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as ge}from"./chunk-HGFCNPSN.js";import{a as he,c as ye}from"./chunk-MVJSQT7V.js";import{b as ue}from"./chunk-WKTIQUQP.js";import{a as Te}from"./chunk-34PQ6LJC.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-CBGDD3ZG.js";import{E as Re,z as Ie}from"./chunk-ADS7BFDG.js";import{l as be}from"./chunk-AI4SPBPV.js";import{b as fe,f as de}from"./chunk-2IZROVCY.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-5GUXN2RU.js";import{D as $,H as ce,y as le,z as pe}from"./chunk-PSSOCUUD.js";import{c as ne}from"./chunk-K5OTE6CX.js";import{a as z}from"./chunk-UDWSRNKO.js";import{e as Q}from"./chunk-DPMOLROM.js";import{d as se}from"./chunk-M2M3I63K.js";import{h as m}from"./chunk-W3BNL2Q5.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-G5QSVBYP.js";import{e as me}from"./chunk-2Z52XJQG.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,4 +1,4 @@
|
|
|
1
|
-
import{ba as a,i}from"./chunk-
|
|
1
|
+
import{ba as a,i}from"./chunk-CBGDD3ZG.js";import{qb as e,sb as r}from"./chunk-G5QSVBYP.js";import{g as u}from"./chunk-VKWPEFWQ.js";u();async function f(n,t,o){return c(n,t,o,"text")}async function c(n,t,o,S){return await a(t,o.source),S==="json"?r`${e.json({SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:i(n.configuration)})}`:r`
|
|
2
2
|
${e.green("SHOPIFY_API_KEY")}=${t.apiKey}
|
|
3
3
|
${e.green("SHOPIFY_API_SECRET")}=${t.apiSecretKeys[0]?.secret??""}
|
|
4
4
|
${e.green("SCOPES")}=${i(n.configuration)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ab as n,Ta as o,qb as e,sb as r,ua as d,wa as f}from"./chunk-
|
|
1
|
+
import{Ab as n,Ta as o,qb as e,sb as r,ua as d,wa as f}from"./chunk-G5QSVBYP.js";import{d as i}from"./chunk-773TIA5M.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=".shopify";async function c(h){let t=i(h,g),a=i(t,".gitignore");return await o(t)||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await f(t)),await o(a)||(n(r`Creating .gitignore in ${e.path(t)}...`),await d(a,`# Ignore the entire ${g} directory
|
|
2
2
|
*`)),t}export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as y}from"./chunk-
|
|
1
|
+
import{i as y}from"./chunk-T3B6KIPU.js";import{I as O,y as w}from"./chunk-PSSOCUUD.js";import{h as d}from"./chunk-W3BNL2Q5.js";import{sb as m,wb as S}from"./chunk-G5QSVBYP.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 +1 @@
|
|
|
1
|
-
import{d as i,i as r,p as s}from"./chunk-773TIA5M.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();import{existsSync as f,readFileSync as u}from"fs";import{fileURLToPath as p,pathToFileURL as g}from"url";var a;function h(){if(!a){let n=i(s(import.meta.url),"..","oclif.manifest.json");a=JSON.parse(u(n,"utf8")).commands}return a}var m=new Map;function y(n){let t=m.get(n);if(!t){for(t=r(p(import.meta.resolve(n)));t!==r(t);){try{if(JSON.parse(u(i(t,"package.json"),"utf8")).name===n)break}catch(o){if(o instanceof SyntaxError){t=r(t);continue}if(o.code==="ENOENT"){t=r(t);continue}throw o}t=r(t)}m.set(n,t)}return t}var P={"app:logs:sources":"dist/cli/commands/app/app-logs/sources.js","demo:watcher":"dist/cli/commands/app/demo/watcher.js","kitchen-sink":"dist/cli/commands/kitchen-sink/index.js","doctor-release":"dist/cli/commands/doctor-release/doctor-release.js","doctor-release:theme":"dist/cli/commands/doctor-release/theme/index.js"};function l(n){return P[n]??`dist/cli/commands/${n.replace(/:/g,"/")}.js`}var C=new Set(["@shopify/cli","@shopify/app","@shopify/theme"]);async function D(n){let o=h()[n];if(!o)return;let e=o.customPluginName??o.pluginName;if(e)return C.has(e)?j(n,e):k(n,e)}var d=i(s(import.meta.url),"..");function w(n,t){let o=l(n),e=i(d,o);return f(e)?d:y(t)}async function j(n,t){let o=l(n),e=w(n,t);return(await import(g(i(e,o)).href)).default}async function k(n,t){if(t==="@shopify/cli-hydrogen"){let{COMMANDS:o}=await import("./dist-
|
|
1
|
+
import{d as i,i as r,p as s}from"./chunk-773TIA5M.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();import{existsSync as f,readFileSync as u}from"fs";import{fileURLToPath as p,pathToFileURL as g}from"url";var a;function h(){if(!a){let n=i(s(import.meta.url),"..","oclif.manifest.json");a=JSON.parse(u(n,"utf8")).commands}return a}var m=new Map;function y(n){let t=m.get(n);if(!t){for(t=r(p(import.meta.resolve(n)));t!==r(t);){try{if(JSON.parse(u(i(t,"package.json"),"utf8")).name===n)break}catch(o){if(o instanceof SyntaxError){t=r(t);continue}if(o.code==="ENOENT"){t=r(t);continue}throw o}t=r(t)}m.set(n,t)}return t}var P={"app:logs:sources":"dist/cli/commands/app/app-logs/sources.js","demo:watcher":"dist/cli/commands/app/demo/watcher.js","kitchen-sink":"dist/cli/commands/kitchen-sink/index.js","doctor-release":"dist/cli/commands/doctor-release/doctor-release.js","doctor-release:theme":"dist/cli/commands/doctor-release/theme/index.js"};function l(n){return P[n]??`dist/cli/commands/${n.replace(/:/g,"/")}.js`}var C=new Set(["@shopify/cli","@shopify/app","@shopify/theme"]);async function D(n){let o=h()[n];if(!o)return;let e=o.customPluginName??o.pluginName;if(e)return C.has(e)?j(n,e):k(n,e)}var d=i(s(import.meta.url),"..");function w(n,t){let o=l(n),e=i(d,o);return f(e)?d:y(t)}async function j(n,t){let o=l(n),e=w(n,t);return(await import(g(i(e,o)).href)).default}async function k(n,t){if(t==="@shopify/cli-hydrogen"){let{COMMANDS:o}=await import("./dist-CN7N5IOM.js");return o?.[n]}if(t==="@oclif/plugin-commands"){let{commands:o}=await import("./lib-M72BVWQ3.js");return o[n]}if(t==="@oclif/plugin-plugins"){let{commands:o}=await import("./lib-P3APEIHY.js");return o[n]}if(t==="@shopify/plugin-did-you-mean"){let{DidYouMeanCommands:o}=await import("./dist-Q5U4WGYG.js");return o[n]}}export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as P}from"./chunk-CTNBSUVU.js";import{Db as f,eb as g,pb as E}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-CTNBSUVU.js";import{Db as f,eb as g,pb as E}from"./chunk-G5QSVBYP.js";import{e as m}from"./chunk-773TIA5M.js";import{e as A,g as p}from"./chunk-VKWPEFWQ.js";p();p();var w=new Set(["THROTTLED","429"]),I=new Set(["ACCESS_DENIED","access_denied"]);function b(e){return Array.isArray(e)?e.flatMap(t=>{let s=[],n=t,r=n?.extensions?.code;typeof r=="string"&&s.push(r);let c=n?.extensions?.app_errors?.errors;if(Array.isArray(c))for(let u of c){let d=u?.category;typeof d=="string"&&s.push(d)}return s}):[]}function C(e){return e!==void 0&&w.has(e)}function v(e){return e!==void 0&&I.has(e)}function h(e){return b(e).some(C)}var M=A(P(),1),o;(function(e){e[e.Abort=0]="Abort",e[e.AbortSilent=1]="AbortSilent",e[e.Bug=2]="Bug"})(o||(o={}));var x=class extends Error{},i=class extends Error{tryMessage;type;nextSteps;formattedMessage;customSections;skipOclifErrorHandling;constructor(t,s,n=null,r,c){let u=typeof t=="string"||"value"in t;super(u?f(t):g(t)),n?n instanceof E?this.tryMessage=f(n):this.tryMessage=n:this.tryMessage=null,this.type=s,this.nextSteps=r,this.customSections=c,this.skipOclifErrorHandling=!0,u||(this.formattedMessage=t)}},l=class extends i{constructor(t,s=null,n,r){super(t,o.Abort,s,n,r)}},y=class extends i{command;args;constructor(t,s,n,r=null){super(t,o.Abort,r),this.command=s,this.args=n}},S=class extends i{constructor(){super("",o.AbortSilent)}},a=class extends i{constructor(t,s=null){super(t,o.Bug,s)}};async function B(e){let t;if(k(e))t=e;else if(typeof e=="string")t=new a(e);else if(e instanceof Error)t=new a(e.message),t.stack=e.stack;else{let n=e;t=new a(n?.message??"Unknown error"),n?.stack&&(t.stack=n?.stack)}let{renderFatalError:s}=await import("./ui-77QYNWJB.js");return s(t),Promise.resolve(e)}function H(e){if(e instanceof M.Errors.CLIError){let t=new l(e.message);return t.stack=e.stack,Promise.resolve(t)}else return Promise.resolve(e)}function k(e){try{return Object.prototype.hasOwnProperty.call(e,"type")}catch{return!1}}function j(e){if(!k(e)){if(e instanceof Error){if(O(e))return!1;let t=e.message;return!R(t)}return!0}return e.type===o.Bug}function O(e){let t=e;if(typeof t.response!="object"||t.response===null||t.request===void 0)return!1;let s=t.response.status;return s===401||s===429||s===502||s===503||s===504?!0:h(t.response.errors)}function q(e){return m(e).replace("file:/","/").replace(/^\/?[A-Z]:/,"")}function R(e){return["EPERM: operation not permitted, scandir","EPERM: operation not permitted, rename","EACCES: permission denied","EPERM: operation not permitted, symlink","This version of npm supports the following node versions","EBUSY: resource busy or locked","ENOTEMPTY: directory not empty","getaddrinfo ENOTFOUND","Client network socket disconnected before secure TLS connection was established","spawn EPERM","socket hang up","The user aborted a request.","write EPIPE","Unsupported platform"].some(n=>e.includes(n))}export{b as a,C as b,v as c,h as d,o as e,x as f,i as g,l as h,y as i,S as j,a as k,B as l,H as m,j as n,q as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c}from"./chunk-
|
|
1
|
+
import{e as c}from"./chunk-DKAWQBTI.js";import{W as s}from"./chunk-KYNXMDFU.js";import{h as p,k as a}from"./chunk-W3BNL2Q5.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as w}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-FKIVKNOV.js";import{a as P}from"./chunk-34PQ6LJC.js";import{a as E}from"./chunk-4JU7N2OF.js";import{E as F,ba as x,i as C,wa as y}from"./chunk-CBGDD3ZG.js";import{b as f}from"./chunk-BPJRQOHO.js";import{b as v}from"./chunk-2IZROVCY.js";import{a as _}from"./chunk-CTNBSUVU.js";import{Ta as g,ma as u,qb as o,sb as p,ua as l,wb as h}from"./chunk-G5QSVBYP.js";import{f as c}from"./chunk-773TIA5M.js";import{e as k,g as s}from"./chunk-VKWPEFWQ.js";s();s();async function S({app:d,remoteApp:t,organization:a,envFile:e}){await x(t,a.source);let n={SHOPIFY_API_KEY:t.apiKey,SHOPIFY_API_SECRET:t.apiSecretKeys[0]?.secret,SCOPES:C(d.configuration)};if(await g(e)){let i=await u(e),r=f(i,n);if(r===i)return p`No changes to ${o.path(e)}`;{await l(e,r);let I=w(i??"",r);return p`Updated ${o.path(e)} to be:
|
|
2
2
|
|
|
3
3
|
${r}
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-HSETBDXR.js";import{b as e}from"./chunk-UBTHWHPB.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class extends e{static description="View the UI kit components prompts";static hidden=!0;async run(){await i()}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as r}from"./chunk-
|
|
1
|
+
import{b as r}from"./chunk-DGMHUJV3.js";import{b as a}from"./chunk-UBTHWHPB.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static summary="Upgrades Shopify CLI.";static descriptionWithMarkdown="Upgrades Shopify CLI using your package manager.";static description=this.descriptionWithoutMarkdown();async run(){await r()}};export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as m}from"./chunk-
|
|
1
|
+
import{T as m}from"./chunk-PSSOCUUD.js";import{h as c}from"./chunk-W3BNL2Q5.js";import{Ab as a,qb as l,sb as n}from"./chunk-G5QSVBYP.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();import{createServer as d}from"net";var u=new Set;async function P(o,t){if(o&&await g(o))return a(n`Port ${o.toString()} is free`),o;a(n`Getting a random port...`);let r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);for(let e=0;e<(t?.maxTries??5)&&u.has(r);e++)r=await w(()=>f(),t?.maxTries,t?.waitTimeInSeconds);return a(n`Random port obtained: ${l.raw(`${r}`)}`),u.add(r),r}async function g(o){return new Promise(t=>{let r=d();r.unref(),r.once("error",()=>t(!1));try{r.listen(o,"localhost",()=>{r.close(()=>t(!0))})}catch(e){if(!(e instanceof RangeError))throw e;t(!1)}})}function f(){return new Promise((o,t)=>{let r=d();r.unref(),r.once("error",t),r.listen(0,"localhost",()=>{let e=r.address();if(e&&typeof e=="object"){let i=e.port;r.close(()=>o(i))}else r.close(()=>t(new Error("Unable to determine assigned port")))})})}async function w(o,t=5,r=1){let e=1;for(;;)try{return await o()}catch(i){if(e++<t)a(n`Unknown problem getting a random port: ${i.message}`),await m(r);else throw new c(i.message)}}export{P as a,g as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ab as ms,Ea as cs,Pa as hs,Qa as us,Ta as fs,Wa as ds,bb as ps,ma as wt,pa as be,qb as kt,sb as gs,ua as ls,wa as bt}from"./chunk-
|
|
1
|
+
import{Ab as ms,Ea as cs,Pa as hs,Qa as us,Ta as fs,Wa as ds,bb as ps,ma as wt,pa as be,qb as kt,sb as gs,ua as ls,wa as bt}from"./chunk-G5QSVBYP.js";import{d as we,g as yt,i as as}from"./chunk-773TIA5M.js";import{a as X,c as gi,e as mi,g as ye}from"./chunk-VKWPEFWQ.js";var ui=gi(l=>{"use strict";ye();Object.defineProperty(l,"__esModule",{value:!0});var yi=X("stream"),W=X("path"),G=X("fs"),Es=X("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
|
|
2
2
|
`?(e++,s=1):s++;return[e,s]}size(){return this.end-this.begin}},D=class{liquidMethodMissing(e,s){}},wi=Object.prototype.toString,ys=String.prototype.toLowerCase,Qt=Object.hasOwnProperty;function d(t){return typeof t=="string"}function x(t){return typeof t=="function"}function bi(t){return t&&x(t.then)}function _e(t){return t&&x(t.next)&&x(t.throw)&&x(t.return)}function Kt(t){return function(...e){return new Promise((s,i)=>{t(...e,(r,n)=>{r?i(r):s(n)})})}}function h(t){return t=m(t),d(t)?t:k(t)?"":S(t)?t.map(e=>h(e)).join(""):String(t)}function ge(t){return t=m(t),S(t)?t:d(t)&&t.length>0?[t]:Ti(t)?Array.from(t):dt(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function L(t){return t=m(t),k(t)?[]:S(t)?t:[t]}function m(t){return t instanceof D&&x(t.valueOf)?t.valueOf():t}function xt(t){return+m(t)||0}function ft(t){return typeof t=="number"}function Vs(t){return t&&x(t.toLiquid)?Vs(t.toLiquid()):t}function k(t){return t==null}function ki(t){return t===void 0}function S(t){return wi.call(t)==="[object Array]"}function Ps(t){return t&&ft(t.length)}function Ti(t){return dt(t)&&Symbol.iterator in t}function ws(t,e){t=t||{};for(let s in t)if(Qt.call(t,s)&&e(t[s],s,t)===!1)break;return t}function xi(t){return t[t.length-1]}function dt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function Cs(t,e,s=1){let i=[];for(let r=t;r<e;r+=s)i.push(r);return i}function oe(t,e,s=" "){return $s(t,e,s,(i,r)=>r+i)}function Si(t,e,s=" "){return $s(t,e,s,(i,r)=>i+r)}function $s(t,e,s,i){t=String(t);let r=e-t.length;return r<=0?t:i(t,s.repeat(r))}function js(t){return t}function _i(t){return[...t].some(s=>s>="a"&&s<="z")?t.toUpperCase():t.toLowerCase()}function Li(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Fi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||t<e?-1:t>e?1:0}function Oi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||(t=ys.call(t),e=ys.call(e),t<e)?-1:t>e?1:0}function pt(t){return function(...e){return t.call(this,...e.map(m))}}function V(t){return function(...e){return t.call(this,...e.map(xt))}}function*ke(t){let e=new Set;for(let s of t){let i=JSON.stringify(s);e.has(i)||(e.add(i),yield s)}}var bs="__liquidClass__",E=class extends Error{constructor(e,s){super(typeof e=="string"?e:e.message),this.context="",typeof e!="string"&&Object.defineProperty(this,"originalError",{value:e,enumerable:!1}),Object.defineProperty(this,"token",{value:s,enumerable:!1}),Object.defineProperty(this,bs,{value:"LiquidError",enumerable:!1})}update(){Object.defineProperty(this,"context",{value:vi(this.token),enumerable:!1}),this.message=zi(this.message,this.token),this.stack=this.message+`
|
|
3
3
|
`+this.context+`
|
|
4
4
|
`+this.stack,this.originalError&&(this.stack+=`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-DV7FOLG4.js";import{p as i,v as s}from"./chunk-GBYDMHZ3.js";import{b as r}from"./chunk-2IZROVCY.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{c as u}from"./chunk-
|
|
1
|
+
import{c as u}from"./chunk-WWRLFLGM.js";import{A as c}from"./chunk-PSSOCUUD.js";import{e as s}from"./chunk-M2M3I63K.js";import{$a as d}from"./chunk-G5QSVBYP.js";import{q as m}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-J774336K.js";import{a as r,b as c}from"./chunk-GW7IEG4G.js";import{d as s}from"./chunk-T3B6KIPU.js";import{a}from"./chunk-34PQ6LJC.js";import{wa as n}from"./chunk-CBGDD3ZG.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class d extends a{static hidden=!0;static summary="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.";static descriptionWithMarkdown="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.\n\nWhen `--input` is omitted, the command reads CSV data from stdin. Use `--input <path>` to read from a file. `--input -` is also supported as an explicit stdin path.\n\n- Required CSV columns: `shop_id`, `target_plan_handle`, and `price_behavior`.\n- Optional CSV column: `notification`.\n- Example header: `shop_id,target_plan_handle,price_behavior,notification`.\n- Example row: `123456789,pro,HONOR_BILLING_PRICE,WHEN_REQUIRED`.\n\n`price_behavior` must be `HONOR_BILLING_PRICE` or `PLAN_PRICE`. `notification` can be `OPT_OUT` or `WHEN_REQUIRED` and defaults to `WHEN_REQUIRED` when omitted or blank.\n\nValidation is atomic: the command submits no operations unless the entire CSV is valid. Valid rows are submitted in batches of 250 shops. Preserve every operation GID printed by the command so you can check or cancel the submitted operations.\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.\n\nUse `--force` to skip confirmation and immediately submit every valid row. With `--watch`, human-readable output shows accepted identifiers before polling begins, then displays operation progress and the final outcome. With `--json --watch`, the command outputs one structured JSON document after every operation reaches a terminal status.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --input migrations.csv --force","cat migrations.csv | <%= config.bin %> <%= command.id %> --force","<%= config.bin %> <%= command.id %> --input migrations.csv --path ../my-app --config staging --force --json","<%= config.bin %> <%= command.id %> --input migrations.csv --client-id <client-id> --force","<%= config.bin %> <%= command.id %> --input - --force --watch"];static flags={...s};async run(){let{flags:i}=await this.parse(d),{app:m,remoteApp:l}=await n({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),u=await p({action:"schedule",input:i.input??"-",clientId:l.apiKey,skipConfirmation:i.force,watch:i.watch,...i.watch&&!i.json?{onSubmissionAccepted:r}:{}}),e=c(u,{json:i.json,watch:i.watch});return e!==0&&(process.exitCode=e),{app:m}}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
1
|
+
import{b as h}from"./chunk-UBTHWHPB.js";import{Ca as g,ua as u,wa as c}from"./chunk-G5QSVBYP.js";import{d as f,q as p}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();var d=f(p(),"/docs-shopify.dev/commands"),m=class extends h{static description="Generate CLI commands documentation";static hidden=!0;async run(){let a=this.config.commands;await g(d),await c(d);let o=a.sort((e,i)=>e.id.length-i.id.length).filter(e=>!b(e)).map(e=>{let i=k(e);return N(e,i)});await Promise.all(o)}},C=["commands","help","plugins"];function b(t){return t.hidden?(C.push(t.id),!0):t.pluginType==="user"?!0:C.some(a=>t.id.startsWith(`${a}:`))}function k(t){let a=t.id.replace(/[:]/g," "),s=t.id.replace(/[:]/g,"-"),o=t.id.replace(/[:-]/g,"");return{commandName:a,fileName:s,interfaceName:o}}async function N(t,{commandName:a,fileName:s,interfaceName:o}){let e=Object.keys(t.flags).map(r=>{let n=t.flags[r];if(!n||n.hidden)return;let $=n.description??"",w=n.char?`-${n.char}, `:"",y=n.type==="option"?"string":"''",v=n.type==="option"?" <value>":"",x=n.required?"":"?",D=n.env!==void 0?` @environment ${n.env}`:"";return` /**
|
|
2
2
|
* ${$}
|
|
3
3
|
*${D}
|
|
4
4
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as V,b as F}from"./chunk-4QBJ5JBX.js";import{h as v}from"./chunk-
|
|
1
|
+
import{a as V,b as F}from"./chunk-4QBJ5JBX.js";import{h as v}from"./chunk-W3BNL2Q5.js";import{Ta as I,ma as _,ua as l}from"./chunk-G5QSVBYP.js";import{a as T,c as k,e as $,g as h}from"./chunk-VKWPEFWQ.js";var L=k((z,a)=>{h();var S={};S.__wbindgen_placeholder__=a.exports;var s,{TextEncoder:q,TextDecoder:U}=T("util");function A(e){return e==null}var f=null;function g(){return(f===null||f.buffer.detached===!0||f.buffer.detached===void 0&&f.buffer!==s.memory.buffer)&&(f=new DataView(s.memory.buffer)),f}var w=0,b=null;function p(){return(b===null||b.byteLength===0)&&(b=new Uint8Array(s.memory.buffer)),b}var m=new q("utf-8"),C=typeof m.encodeInto=="function"?function(e,t){return m.encodeInto(e,t)}:function(e,t){let r=m.encode(e);return t.set(r),{read:e.length,written:r.length}};function M(e,t,r){if(r===void 0){let i=m.encode(e),u=t(i.length,1)>>>0;return p().subarray(u,u+i.length).set(i),w=i.length,u}let n=e.length,o=t(n,1)>>>0,d=p(),c=0;for(;c<n;c++){let i=e.charCodeAt(c);if(i>127)break;d[o+c]=i}if(c!==n){c!==0&&(e=e.slice(c)),o=r(o,n,n=c+e.length*3,1)>>>0;let i=p().subarray(o+c,o+n),u=C(e,i);c+=u.written,o=r(o,n,c,1)>>>0}return w=c,o}var j=new U("utf-8",{ignoreBOM:!0,fatal:!0});j.decode();function y(e,t){return e=e>>>0,j.decode(p().subarray(e,e+t))}function D(e){let t=s.__wbindgen_export_0.get(e);return s.__externref_table_dealloc(e),t}a.exports.echoToml=function(e){let t,r;try{let d=M(e,s.__wbindgen_malloc,s.__wbindgen_realloc),c=w,i=s.echoToml(d,c);var n=i[0],o=i[1];if(i[3])throw n=0,o=0,D(i[2]);return t=n,r=o,y(n,o)}finally{s.__wbindgen_free(t,r,1)}};a.exports.updateTomlValues=function(e,t){let r,n;try{let c=M(e,s.__wbindgen_malloc,s.__wbindgen_realloc),i=w,u=s.updateTomlValues(c,i,t);var o=u[0],d=u[1];if(u[3])throw o=0,d=0,D(u[2]);return r=o,n=d,y(o,d)}finally{s.__wbindgen_free(r,n,1)}};a.exports.__wbg_from_2a5d3e218e67aa85=function(e){return Array.from(e)};a.exports.__wbg_get_b9b93047fe3cf45b=function(e,t){return e[t>>>0]};a.exports.__wbg_length_e2d2a49132c1b256=function(e){return e.length};a.exports.__wbindgen_boolean_get=function(e){let t=e;return typeof t=="boolean"?t?1:0:2};a.exports.__wbindgen_init_externref_table=function(){let e=s.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)};a.exports.__wbindgen_is_array=function(e){return Array.isArray(e)};a.exports.__wbindgen_is_undefined=function(e){return e===void 0};a.exports.__wbindgen_number_get=function(e,t){let r=t,n=typeof r=="number"?r:void 0;g().setFloat64(e+8,A(n)?0:n,!0),g().setInt32(e+0,!A(n),!0)};a.exports.__wbindgen_string_get=function(e,t){let r=t,n=typeof r=="string"?r:void 0;var o=A(n)?0:M(n,s.__wbindgen_malloc,s.__wbindgen_realloc),d=w;g().setInt32(e+4,d,!0),g().setInt32(e+0,o,!0)};a.exports.__wbindgen_string_new=function(e,t){return y(e,t)};a.exports.__wbindgen_throw=function(e,t){throw new Error(y(e,t))};var N=T("path").join(__dirname,"toml_patch_bg.wasm"),R=T("fs").readFileSync(N),B=new WebAssembly.Module(R),P=new WebAssembly.Instance(B,S);s=P.exports;a.exports.__wasm=s;s.__wbindgen_start()});h();var E=$(L(),1),x=class extends v{path;constructor(t,r){super(r),this.name="TomlFileError",this.path=t}},O=class e{static async read(t){if(!await I(t))throw new x(t,`TOML file not found: ${t}`);let r=await _(t),n=new e(t,{});return n.content=n.decode(r),n}path;content;errors=[];constructor(t,r){this.path=t,this.content=r}async patch(t){let r=W(t),n=await _(this.path),o=(0,E.updateTomlValues)(n,r),d=this.decode(o);await l(this.path,o),this.content=d}async remove(t){let r=t.split("."),n=await _(this.path),o=(0,E.updateTomlValues)(n,[[r,void 0]]),d=this.decode(o);await l(this.path,o),this.content=d}async replace(t){let r=F(t);this.decode(r),await l(this.path,r),this.content=t}async transformRaw(t){let r=await _(this.path),n=t(r),o=this.decode(n);await l(this.path,n),this.content=o}decode(t){try{return V(t)}catch(r){let n=r;if(n.line!==void 0&&n.col!==void 0){let o=String(n.message).split(`
|
|
2
2
|
`)[0]??"Invalid TOML";throw new x(this.path,`${o} at row ${n.line}, col ${n.col}`)}throw r}}};function W(e,t=[]){return Object.entries(e).flatMap(([r,n])=>{let o=[...t,r];return n!==null&&typeof n=="object"&&!Array.isArray(n)?W(n,o):[[o,n]]})}export{L as a,x as b,O as c};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-34PQ6LJC.js";import{a as b}from"./chunk-4JU7N2OF.js";import{A as x,w as S,wa as V,x as A,z as C}from"./chunk-CBGDD3ZG.js";import{a as f}from"./chunk-PL7AJVTV.js";import{b as j,c as E}from"./chunk-2IZROVCY.js";import{B as u,z as v}from"./chunk-PSSOCUUD.js";import{h as g,j as n}from"./chunk-W3BNL2Q5.js";import{Db as w,Gb as h,wb as l}from"./chunk-G5QSVBYP.js";import{j as p}from"./chunk-773TIA5M.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function N(s,t){let e=new Set(t.map(r=>r.file)).size;await f.addPublicMetadata(()=>({cmd_app_validate_valid:s,cmd_app_validate_issue_count:t.length,cmd_app_validate_file_count:e}))}async function P(s,t={json:!1}){let e=s.errors;if(!e||e.isEmpty()){if(await N(!0,[]),t.json){l(JSON.stringify({valid:!0,issues:[]},null,2));return}v({headline:`App configuration '${p(s.configPath)}' is valid.`});return}let r=e.getErrors();if(await N(!1,r),t.json){let d=r.map(({file:c,message:a,path:i,code:o})=>({file:c,message:a,path:i,code:o}));throw l(JSON.stringify({valid:!1,issues:d},null,2)),new n}throw u({headline:"Validation errors found.",body:r.map(d=>`\u2022 ${x(d)}`).join(`
|
|
2
2
|
`)}),new n}async function _(s,t){await f.addPublicMetadata(()=>({cmd_app_validate_valid:!1,cmd_app_validate_issue_count:s,cmd_app_validate_file_count:t}))}var y=class s extends M{static summary="Validate your app configuration and extensions.";static descriptionWithMarkdown="Validates the selected app configuration file and all extension configurations against their schemas and reports any errors found.";static description=this.descriptionWithoutMarkdown();static flags={...j,...b,...E};async run(){let{flags:t}=await this.parse(s);await f.addPublicMetadata(()=>({cmd_app_validate_json:t.json}));let e;try{e=await S.load(t.path)}catch(a){if(a instanceof g&&t.json){await _(1,1);let i=h(w(a.message)).trim();throw l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n}throw a}let r;try{r=await C(e,t.config,{clientId:t["client-id"],skipPrompts:!!t["client-id"]})}catch(a){if(a instanceof g&&t.json){await _(1,1);let i=h(w(a.message)).trim();throw l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n}throw a}let d=A(e,r.file);if(d.length>0){let a=d.map(o=>({file:o.path,message:o.message})),i=new Set(d.map(o=>o.path)).size;throw await _(a.length,i),t.json?(l(JSON.stringify({valid:!1,issues:a},null,2)),new n):(u({headline:"Validation errors found.",body:a.map(o=>`\u2022 ${o.message}`).join(`
|
|
3
3
|
`)}),new n)}let c;try{c=(await V({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config??(t["client-id"]?p(r.file.path):void 0),unsafeTolerateErrors:!0})).app}catch(a){let i=a instanceof g?h(w(a.message)).trim():"";throw i.startsWith("Validation errors in ")&&t.json?(await _(1,1),l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n):a}return await P(c,{json:t.json}),{app:c}}};export{y 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-7O2KMA4J.js";import{d as c,f as w,j as T}from"./chunk-TUWRPDTE.js";import{g as d}from"./chunk-GBYDMHZ3.js";import{F as u}from"./chunk-PSSOCUUD.js";import{h as l}from"./chunk-W3BNL2Q5.js";import{T as i}from"./chunk-G5QSVBYP.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,4 +1,4 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-EJJPVVQ2.js";import{p as n,q as m,v as l}from"./chunk-GBYDMHZ3.js";import{b as s,c as h}from"./chunk-2IZROVCY.js";import{xa as o}from"./chunk-KYNXMDFU.js";import{a as v}from"./chunk-CTNBSUVU.js";import{e as c,g as r}from"./chunk-VKWPEFWQ.js";r();var e=c(v(),1);var i=class extends l{static summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";static usage=["theme push","theme push --unpublished --json"];static descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
|
|
2
2
|
|
|
3
3
|
If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as $}from"./chunk-
|
|
1
|
+
import{b as $}from"./chunk-VE6BYYBP.js";import{a as O}from"./chunk-34PQ6LJC.js";import{a as I}from"./chunk-4JU7N2OF.js";import{i as T,wa as k}from"./chunk-CBGDD3ZG.js";import{b as f}from"./chunk-AI4SPBPV.js";import{b as N,c as P}from"./chunk-2IZROVCY.js";import{M as S,N as b}from"./chunk-KYNXMDFU.js";import{y as E}from"./chunk-PSSOCUUD.js";import{d as v}from"./chunk-K5OTE6CX.js";import{a as m}from"./chunk-UDWSRNKO.js";import{a as W}from"./chunk-CTNBSUVU.js";import{Hb as _,L as g,N as y,rb as C,sb as w,wb as A}from"./chunk-G5QSVBYP.js";import{g as p,j as h}from"./chunk-773TIA5M.js";import{e as U,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function x(r,e,t,o,i){return i.webEnv?F(r,e,t,i):R(r,e,t,o,i)}async function F(r,e,t,{format:o}){return $(r,e,t,o)}async function R(r,e,t,o,i){if(i.format==="json"){let n=j(r.allExtensions.filter(a=>a.isReturnedAsInfo())),s={...r,packageManager:o.packageManager,nodeDependencies:o.nodeDependencies,usesWorkspaces:o.usesWorkspaces,organization:{id:t.id,businessName:t.businessName},allExtensions:n};return"realExtensions"in s&&(s.realExtensions=j(s.realExtensions)),"specifications"in s&&(s={...s,specifications:s.specifications?.map(a=>D(a))}),w`${JSON.stringify(Object.fromEntries(Object.entries(s).filter(([a])=>a!=="configSchema")),null,2)}`}else return new l(r,e,t,o,i).output()}function D(r){if("schema"in r){let{schema:e,...t}=r;return t}return r}function j(r){return r.map(e=>{if("specification"in e&&e.specification){let t=e.specification,o=D(t);return{...e,specification:o}}else return e})}var M="unknown",u={subdued:"Not yet configured"},z="NOT LOADED",l=class{app;remoteApp;organization;project;options;constructor(e,t,o,i,n){this.app=e,this.remoteApp=t,this.organization=o,this.project=i,this.options=n}async output(){return[...await this.devConfigsSection(),this.projectSettingsSection(),...await this.appComponentsSection(),await this.systemInfoSection()]}async devConfigsSection(){let e=u;this.app.configuration.build?.automatically_update_urls_on_dev!==void 0&&(e=this.app.configuration.build.automatically_update_urls_on_dev?"Yes":"No");let t=["User","unknown"],o=await this.options.developerPlatformClient.accountInfo();return b(o)?t=["Service account",o.orgName]:S(o)&&(t[1]=o.email),[this.tableSection("Current app configuration",[["Configuration file",{filePath:h(this.app.configPath)||f.app}],["App name",this.remoteApp.title?{userInput:this.remoteApp.title}:u],["Client ID",this.remoteApp.apiKey||u],["Organization",`${this.organization.businessName} (${this.organization.id})`],["Access scopes",T(this.app.configuration)],["Dev store",this.app.configuration.build?.dev_store_url??this.app.hiddenConfig.dev_store_url??u],["Update URLs",e],t],{isFirstItem:!0}),{body:["\u{1F4A1} To change these, run",{command:C(this.project.packageManager,"shopify app config link")}]}]}projectSettingsSection(){return this.tableSection("Your Project",[["Root location",{filePath:this.app.directory}]])}async appComponentsSection(){let e=this.webComponentsSection();return[{title:`
|
|
2
2
|
Directory components`.toUpperCase(),body:""},...e?[e]:[],...this.extensionsSections()]}webComponentsSection(){let e=[],t=[];if(this.app.webs[0])return this.app.webs.forEach(o=>{if(o.configuration)if(o.configuration.name){let{name:i,roles:n}=o.configuration,s=p(this.app.directory,o.directory);t.push([` \u{1F4C2} ${i}`,{filePath:s||"/"}]),n.length>0&&t.push([" roles",n.join(", ")])}else o.configuration.roles.forEach(i=>{t.push([` \u{1F4C2} ${i}`,{filePath:p(this.app.directory,o.directory)}])});else t.push([{subdued:` \u{1F4C2} ${M}`},{filePath:p(this.app.directory,o.directory)}]);if(!this.app.errors.isEmpty()){let i=this.app.errors.getErrors(`${o.directory}/${f.web}`);e.push(...i.map(n=>n.message))}}),this.subtableSection("web",[["\u{1F4C2} web",""],...t,...e.map(o=>[{error:"error"},{error:this.formattedError(o)}])])}extensionsSections(){let e=this.app.allExtensions.filter(i=>i.isReturnedAsInfo()),o=y(e.map(i=>i.type)).map(i=>{let n=e.filter(s=>s.type===i);if(n[0])return this.subtableSection(n[0].externalType,n.flatMap(s=>this.extensionSubSection(s)))});return g(o)}extensionSubSection(e){let t=e.configuration,o=[[`\u{1F4C2} ${e.handle||z}`,{filePath:p(this.app.directory,e.directory)}],[" config file",{filePath:p(e.directory,e.configurationPath)}]];t&&"metafields"in t&&Array.isArray(t.metafields)&&t.metafields.length>0&&o.push([" metafields",`${t.metafields.length}`]);let i=this.app.errors.getErrors(e.configurationPath);for(let n of i)o.push([{error:" error"},{error:this.formattedError(n.message)}]);return o}formattedError(e){let t=e.trim();if(_())return t;let[o,...i]=t.split(`
|
|
3
3
|
`);return[`! ${o}`,...i.map(n=>` ${n}`)].join(`
|
|
4
4
|
`)}async systemInfoSection(){let{platform:e,arch:t}=v();return this.tableSection("Tooling and System",[["Shopify CLI",m],["Package manager",this.project.packageManager],["OS",`${e}-${t}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}tableSection(e,t,{isFirstItem:o=!1}={}){return{title:`${o?"":`
|