@shopify/cli 0.0.0-snapshot-20260722210655 → 0.0.0-snapshot-20260723152140
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-JBPJLL57.js → analytics-OHVOANBW.js} +1 -1
- package/dist/analytics-WLBH4AWX.js +1 -0
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-WYT437LJ.js → chunk-22KSTELG.js} +1 -1
- package/dist/{chunk-N54QOQ2V.js → chunk-25XKE6QJ.js} +1 -1
- package/dist/{chunk-FDQNY7RF.js → chunk-2CUUHTG4.js} +1 -1
- package/dist/{chunk-VFU5YYTM.js → chunk-2HWXT3HB.js} +1 -1
- package/dist/{chunk-EL5U7452.js → chunk-33HDJ4C4.js} +1 -1
- package/dist/{chunk-2OBG4WT7.js → chunk-33RNTQU7.js} +1 -1
- package/dist/{chunk-XKMLKEYX.js → chunk-33Y5T275.js} +1 -1
- package/dist/{chunk-SH5VEQ7F.js → chunk-34AF5YGB.js} +1 -1
- package/dist/{chunk-ONCEFPYP.js → chunk-3AENHXGF.js} +1 -1
- package/dist/{chunk-CNOGRHAB.js → chunk-3B25ERQH.js} +1 -1
- package/dist/{chunk-AK4NPOQG.js → chunk-3I3XLKOW.js} +1 -1
- package/dist/{chunk-FS37ZPWQ.js → chunk-3QPMYF5Z.js} +1 -1
- package/dist/{chunk-MSDNBGRH.js → chunk-42CCXYWK.js} +1 -1
- package/dist/{chunk-6NRRHHK5.js → chunk-467KVJG7.js} +1 -1
- package/dist/{chunk-RXO77IC5.js → chunk-4NZLJIGL.js} +1 -1
- package/dist/chunk-4QJM243J.js +1 -0
- package/dist/{chunk-B3XKHB4G.js → chunk-4VPYU2R7.js} +1 -1
- package/dist/{chunk-CFZVZFVH.js → chunk-4WUX5CPT.js} +1 -1
- package/dist/{chunk-3I6ZVKZ2.js → chunk-4XQU3SLH.js} +1 -1
- package/dist/{chunk-MXATGPGZ.js → chunk-55CGOSP6.js} +1 -1
- package/dist/{chunk-XBFXB6S6.js → chunk-5ACGB45Y.js} +1 -1
- package/dist/{chunk-AMLHR2HO.js → chunk-5B4ZJFFV.js} +1 -1
- package/dist/{chunk-SXWAECCX.js → chunk-5EIDBUBM.js} +1 -1
- package/dist/{chunk-Q37I33P7.js → chunk-5IRJQ5XE.js} +1 -1
- package/dist/{chunk-GJGKVHUR.js → chunk-6NOY7LTB.js} +1 -1
- package/dist/{chunk-OPHCAOPB.js → chunk-6OUAYFVK.js} +1 -1
- package/dist/{chunk-4GWHZ4RW.js → chunk-7CIGXMZR.js} +1 -1
- package/dist/{chunk-H2Z3SST2.js → chunk-7LWP4FVK.js} +1 -1
- package/dist/{chunk-JNAAHGJ6.js → chunk-7QMA6EVS.js} +1 -1
- package/dist/{chunk-IV3S4JU6.js → chunk-A3DD7GW4.js} +1 -1
- package/dist/{chunk-WKJNCJUV.js → chunk-A72CPM4D.js} +1 -1
- package/dist/{chunk-3XBPV64S.js → chunk-A7LAO76V.js} +1 -1
- package/dist/{chunk-BPRY3O4N.js → chunk-AAG2JILI.js} +1 -1
- package/dist/{chunk-IPKYIHDV.js → chunk-AC5ZFC7W.js} +1 -1
- package/dist/{chunk-ZDKGQCIZ.js → chunk-AI4SAUYF.js} +1 -1
- package/dist/{chunk-LX3NHWCT.js → chunk-AJUNWJ5D.js} +1 -1
- package/dist/{chunk-ISVXQQ4E.js → chunk-B6WWMMWI.js} +1 -1
- package/dist/{chunk-CT5MMCRM.js → chunk-BB4GRHB5.js} +1 -1
- package/dist/{chunk-JBIXZWT6.js → chunk-BB4YLNGX.js} +1 -1
- package/dist/{chunk-MH6UDGGS.js → chunk-BNFVFPDX.js} +1 -1
- package/dist/{chunk-X5GZF33W.js → chunk-BNXEW2MP.js} +1 -1
- package/dist/{chunk-34CCAMTT.js → chunk-BO7B4F2D.js} +1 -1
- package/dist/{chunk-5Y33JTFD.js → chunk-BQJJADGF.js} +1 -1
- package/dist/{chunk-LZO2JTZS.js → chunk-BY25ZK2A.js} +1 -1
- package/dist/{chunk-M3FOYFPN.js → chunk-BYZ6LYUD.js} +1 -1
- package/dist/{chunk-2CMSXRZ5.js → chunk-BZXBSUZU.js} +1 -1
- package/dist/{chunk-3R45SEUK.js → chunk-CLJWB3TR.js} +1 -1
- package/dist/{chunk-EIEHPIWJ.js → chunk-CMF7QBZH.js} +1 -1
- package/dist/{chunk-NDVET7BL.js → chunk-CN6UV4PQ.js} +1 -1
- package/dist/{chunk-KNLPWHHJ.js → chunk-CUIOWLG3.js} +2 -2
- package/dist/{chunk-P4LA3M5S.js → chunk-CXYYGVNK.js} +1 -1
- package/dist/{chunk-OLQN2OBC.js → chunk-D2SN4X4Z.js} +1 -1
- package/dist/{chunk-EI6ZQXTF.js → chunk-D6JK3NBM.js} +1 -1
- package/dist/{chunk-POYWH3PD.js → chunk-D6NP4EQA.js} +1 -1
- package/dist/{chunk-SP7NSQ6G.js → chunk-DMOOB5AD.js} +1 -1
- package/dist/{chunk-W2RZY64W.js → chunk-EASRLGCZ.js} +1 -1
- package/dist/{chunk-GAUJKBLY.js → chunk-ECZRDNHP.js} +1 -1
- package/dist/{chunk-FFC42T6R.js → chunk-EHXVJUFD.js} +1 -1
- package/dist/{chunk-OYOTLGGD.js → chunk-EIP2MGZD.js} +1 -1
- package/dist/{chunk-CFXL555E.js → chunk-EZCNFSEC.js} +1 -1
- package/dist/{chunk-PPHJ4F2Z.js → chunk-FDG2PMS3.js} +1 -1
- package/dist/{chunk-SQVJGTTD.js → chunk-FGYV4PZF.js} +3 -3
- package/dist/{chunk-WFCP2AG5.js → chunk-FKWHO42M.js} +1 -1
- package/dist/{chunk-O7HL63YP.js → chunk-FMEVIGO7.js} +1 -1
- package/dist/{chunk-VBL7DLY7.js → chunk-FN2VTF24.js} +1 -1
- package/dist/{chunk-VQ44LFBY.js → chunk-FNDHJQWJ.js} +1 -1
- package/dist/{chunk-MTGARKCQ.js → chunk-G6T6BS3M.js} +1 -1
- package/dist/{chunk-X2NVFYY6.js → chunk-GBSEJYPY.js} +1 -1
- package/dist/{chunk-YKAMTVJM.js → chunk-GVQNF7CD.js} +1 -1
- package/dist/{chunk-FW732EHN.js → chunk-HEFOYZXX.js} +1 -1
- package/dist/{chunk-UA2432YR.js → chunk-HIIYIR25.js} +1 -1
- package/dist/{chunk-P5KLFBCI.js → chunk-HJ7VE3TC.js} +1 -1
- package/dist/{chunk-XGJH3HBA.js → chunk-HRO72CFJ.js} +1 -1
- package/dist/{chunk-XYV4QXQT.js → chunk-HW2F22DE.js} +1 -1
- package/dist/{chunk-3GQ6AVHU.js → chunk-IKXP72LE.js} +1 -1
- package/dist/{chunk-SW3DP3GU.js → chunk-IO2VHLX6.js} +1 -1
- package/dist/{chunk-33AVVFWW.js → chunk-IQLFGDUD.js} +1 -1
- package/dist/{chunk-IDRP7BXW.js → chunk-IT4OI5SI.js} +1 -1
- package/dist/{chunk-RUV5AE3N.js → chunk-IVMBGXXG.js} +1 -1
- package/dist/{chunk-I7QJGHS6.js → chunk-IZJ2EYCZ.js} +1 -1
- package/dist/{chunk-SACH2YSZ.js → chunk-J3XPLRPC.js} +1 -1
- package/dist/{chunk-PNYIQOOE.js → chunk-J4ZWORDQ.js} +1 -1
- package/dist/{chunk-FVQG4KLI.js → chunk-JAAIVKUX.js} +1 -1
- package/dist/{chunk-SY3LXLT2.js → chunk-JQNR75BG.js} +1 -1
- package/dist/{chunk-UZR7JB5B.js → chunk-K6E6AF77.js} +1 -1
- package/dist/{chunk-32KQUYFF.js → chunk-K6UNSDIM.js} +1 -1
- package/dist/{chunk-GVHVEYNG.js → chunk-KHCWSUJW.js} +1 -1
- package/dist/{chunk-VSPM4VES.js → chunk-KLY5BRZ2.js} +1 -1
- package/dist/{chunk-LANGOUPS.js → chunk-KYHMD54O.js} +1 -1
- package/dist/{chunk-Q3DRVTVJ.js → chunk-L5MGTMEH.js} +1 -1
- package/dist/{chunk-O5FUKS5D.js → chunk-LFCQ2FTD.js} +1 -1
- package/dist/{chunk-5VKFEYZK.js → chunk-LLNBH7KL.js} +1 -1
- package/dist/{chunk-KHOW6SXW.js → chunk-LPU7WQMQ.js} +1 -1
- package/dist/{chunk-5N6YKJLU.js → chunk-LTS6P5CN.js} +1 -1
- package/dist/{chunk-L6C3DLKN.js → chunk-M3RPZHYI.js} +1 -1
- package/dist/{chunk-E7Z7KYBR.js → chunk-MBIOMVRS.js} +1 -1
- package/dist/{chunk-OQ6WYWG4.js → chunk-MCP5CY6B.js} +2 -2
- package/dist/{chunk-UMMEUYHM.js → chunk-MEAQR6KA.js} +1 -1
- package/dist/{chunk-H3QSHKNT.js → chunk-MFJ2MXJG.js} +1 -1
- package/dist/{chunk-HXJ7HJFS.js → chunk-MGTKKOH3.js} +1 -1
- package/dist/{chunk-HPH7WWMW.js → chunk-MJR4HUGN.js} +1 -1
- package/dist/{chunk-X4JRQETX.js → chunk-MSGB47Q3.js} +1 -1
- package/dist/{chunk-4NSHAMD3.js → chunk-MW4QZJ7O.js} +1 -1
- package/dist/{chunk-2FNJZPYC.js → chunk-MZJ4WD2U.js} +2 -2
- package/dist/{chunk-6CZ7WGE2.js → chunk-NLQYXIR2.js} +1 -1
- package/dist/{chunk-HG5QVQ2T.js → chunk-NPOXJODC.js} +1 -1
- package/dist/{chunk-XEHMXJ5J.js → chunk-NTPMJHGK.js} +1 -1
- package/dist/{chunk-NIQWXTKA.js → chunk-NWELNZNO.js} +1 -1
- package/dist/{chunk-2RLFO4KD.js → chunk-OCAOSOGF.js} +1 -1
- package/dist/{chunk-5RMFBXP6.js → chunk-OEWEKEMD.js} +1 -1
- package/dist/{chunk-35Z5TIZM.js → chunk-OLCQ2V53.js} +1 -1
- package/dist/{chunk-HS7TCC4I.js → chunk-P6IDCK2B.js} +1 -1
- package/dist/{chunk-5HGRHX2Z.js → chunk-PKTSTP4J.js} +1 -1
- package/dist/{chunk-J2JMKTPR.js → chunk-PT3YH2M5.js} +1 -1
- package/dist/{chunk-ZKNONN2F.js → chunk-Q2YBCQEB.js} +1 -1
- package/dist/{chunk-65H3LZJA.js → chunk-QDGUOAOA.js} +1 -1
- package/dist/{chunk-SNK55FY2.js → chunk-QFJOCR7V.js} +1 -1
- package/dist/{chunk-74DZVIJF.js → chunk-QTLLDO6I.js} +1 -1
- package/dist/{chunk-ALKT4HX7.js → chunk-QTOMCGDI.js} +1 -1
- package/dist/{chunk-DC3JYNAG.js → chunk-R4SUXHX6.js} +1 -1
- package/dist/{chunk-6SVMZEJO.js → chunk-RB652QBR.js} +1 -1
- package/dist/{chunk-HFGB7XAM.js → chunk-SGFYNQLI.js} +1 -1
- package/dist/{chunk-J5D222UG.js → chunk-SQIG56JP.js} +1 -1
- package/dist/{chunk-ROBYXQMW.js → chunk-SQK5434I.js} +1 -1
- package/dist/{chunk-FS4HIL62.js → chunk-T5RTIJJQ.js} +1 -1
- package/dist/{chunk-L6VQZJM4.js → chunk-T6JRM4L6.js} +1 -1
- package/dist/{chunk-SUOXR2CE.js → chunk-TM4YHWMX.js} +1 -1
- package/dist/{chunk-O6BUPYXH.js → chunk-TYCR45XU.js} +2 -2
- package/dist/{chunk-ZZ5M5IMF.js → chunk-U36IMQ6Y.js} +1 -1
- package/dist/{chunk-VURVVLVE.js → chunk-V6GRT7OB.js} +1 -1
- package/dist/{chunk-5EDRU7YU.js → chunk-V7FAV65W.js} +2 -2
- package/dist/{chunk-N2UVYELM.js → chunk-V7FUMPKJ.js} +1 -1
- package/dist/{chunk-A35F74KC.js → chunk-V7QR5DU6.js} +1 -1
- package/dist/{chunk-2VVXGQ36.js → chunk-VD6G7MGQ.js} +1 -1
- package/dist/{chunk-GWUDVP3Q.js → chunk-VQMEJM7F.js} +1 -1
- package/dist/{chunk-BKMZCB6M.js → chunk-VSL6SVQS.js} +1 -1
- package/dist/{chunk-R56CBH7G.js → chunk-VX7XXDC2.js} +1 -1
- package/dist/{chunk-W6BBFBOM.js → chunk-WD3XHU3U.js} +1 -1
- package/dist/{chunk-QAMPDFZB.js → chunk-WDZN65TW.js} +1 -1
- package/dist/{chunk-IP2ZMDG4.js → chunk-WNAIL2B2.js} +1 -1
- package/dist/{chunk-22YTDD56.js → chunk-WQ5BPVZ5.js} +1 -1
- package/dist/{chunk-PNCF5LNZ.js → chunk-WWWGG5QP.js} +1 -1
- package/dist/{chunk-HJH672U6.js → chunk-WY2LFBPL.js} +1 -1
- package/dist/{chunk-3GPUBV4D.js → chunk-WZPCH34H.js} +1 -1
- package/dist/{chunk-V4CPWXJP.js → chunk-XD5DGSUM.js} +1 -1
- package/dist/{chunk-FOQ2RDEI.js → chunk-XHGGS5MV.js} +1 -1
- package/dist/{chunk-W6KRZTDH.js → chunk-XKZU2QHQ.js} +1 -1
- package/dist/{chunk-ZKIIMXKC.js → chunk-Y2GJEZSL.js} +1 -1
- package/dist/{chunk-NUCUZBO3.js → chunk-Y2VJUEJJ.js} +1 -1
- package/dist/chunk-Y3IZPAA6.js +1 -0
- package/dist/{chunk-IDMJWVJC.js → chunk-Y5RHZU3E.js} +1 -1
- package/dist/{chunk-OM3YN7ZK.js → chunk-YAZ5ARS3.js} +1 -1
- package/dist/{chunk-3RUWUOIR.js → chunk-YIO2MRPY.js} +1 -1
- package/dist/{chunk-AROEKWUX.js → chunk-YULNHJMG.js} +1 -1
- package/dist/{chunk-3PFIBTES.js → chunk-ZGI4ZRVE.js} +3 -3
- package/dist/{chunk-IKP2EM5F.js → chunk-ZHK5TYOH.js} +1 -1
- package/dist/{chunk-BQ2752RO.js → chunk-ZKOUILK2.js} +1 -1
- package/dist/{chunk-IZCDEDIM.js → chunk-ZPW4N66L.js} +1 -1
- package/dist/chunk-ZXAEYDNN.js +1 -0
- package/dist/{chunk-YZQYDTO7.js → chunk-ZZO5S7O5.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/skill/install.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/validate/components.js +1 -1
- package/dist/cli/commands/validate/functions.js +1 -1
- package/dist/cli/commands/validate/graphql.js +1 -1
- package/dist/cli/commands/validate/theme.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-OHJSRXSL.js → conf-store-U5CTOBFQ.js} +1 -1
- package/dist/{deprecations-SA4HEVBI.js → deprecations-4AFWWDIT.js} +1 -1
- package/dist/dist-35NERBRB.js +1 -0
- package/dist/{dist-MIUGJGUW.js → dist-OUY4DTL3.js} +1 -1
- package/dist/{environments-LDSGQHXC.js → environments-KUUXFDHZ.js} +1 -1
- package/dist/{error-YY774ESQ.js → error-MTDZ34GJ.js} +1 -1
- package/dist/{error-handler-QHCOZUC7.js → error-handler-VOQ4EOTX.js} +1 -1
- package/dist/{fs-EIM4AORY.js → fs-DJ47BQPK.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{is-global-USYUXR55.js → is-global-EKWTAVNX.js} +1 -1
- package/dist/{local-INRMOHAI.js → local-DZ2BTC3Y.js} +1 -1
- package/dist/{local-storage-7THURD3W.js → local-storage-RFBYTOUL.js} +1 -1
- package/dist/{metadata-WJ637XA2.js → metadata-SXK43PNH.js} +1 -1
- package/dist/{node-package-manager-4X2YQGFC.js → node-package-manager-FYFEYRNX.js} +1 -1
- package/dist/{notifications-system-ZSZWUJIZ.js → notifications-system-2RA4AYYM.js} +1 -1
- package/dist/{output-CLCX5WU7.js → output-S7SSOWA2.js} +1 -1
- package/dist/skills-YJ6XERLJ.js +1 -0
- package/dist/{system-J4OPHQAQ.js → system-L6ZQLKGR.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-ZC5QZT4J.js → ui-YLD5CNOR.js} +1 -1
- package/dist/upgrade-5U2HTZZY.js +1 -0
- package/dist/{version-EYLYG4JK.js → version-2JQNZMI4.js} +1 -1
- package/dist/version-PEZ4TEFU.js +1 -0
- package/dist/{workerd-VC3MCYDV.js → workerd-YTIIEADS.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/analytics-QVTQTZFT.js +0 -1
- package/dist/chunk-G3CPHVML.js +0 -1
- package/dist/chunk-WMKVFUMY.js +0 -1
- package/dist/chunk-X2ZCC772.js +0 -1
- package/dist/dist-XVWDWM2Y.js +0 -1
- package/dist/skills-OXV2TD42.js +0 -1
- package/dist/upgrade-VSILBOCY.js +0 -1
- package/dist/version-FEVNX3F6.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as r,b as j}from"./chunk-
|
|
1
|
+
import{a as r,b as j}from"./chunk-CXYYGVNK.js";import{V as W,W as z,aa as X}from"./chunk-WY2LFBPL.js";import{b as x,c as _}from"./chunk-AAG2JILI.js";import{b as k}from"./chunk-ZGI4ZRVE.js";import{v as w,w as A,x as C}from"./chunk-FGYV4PZF.js";import{o as R}from"./chunk-TYCR45XU.js";import{Lb as P,Pb as L,Ta as $,ma as D}from"./chunk-CUIOWLG3.js";import{d as b,e as F,f as v}from"./chunk-773TIA5M.js";import{a as B}from"./chunk-M5GXA5W4.js";import{e as S,g as y}from"./chunk-VKWPEFWQ.js";y();y();y();function N(e){return e.some(t=>t.result===r.FAILED)}var n=S(W(),1),U=S(z(),1),H=S(X(),1);var q=["assets","blocks","config","layout","locales","sections","snippets","templates"],M=["theme","app"],J="sections",K="theme";function E(e){return{responses:e,success:!N(e)}}function g(e){return E([{result:r.FAILED,resultDetail:e}])}async function Q(e,t){let i=b(e,".theme-check.yml"),l=await $(i)?i:void 0,d=await(0,H.themeCheckRun)(e,l,o=>L(o)),s={},u={};for(let o of d.offenses)(s[o.uri]??=[]).push(O(o)),G(o)&&(u[o.uri]=!0);return t.map(o=>{let m=Object.keys(s).find(f=>F(f).endsWith(F(o)));if(m){let f=s[m].join(`
|
|
2
2
|
`);return u[m]?{result:r.FAILED,resultDetail:`${o}:
|
|
3
3
|
${f}`}:{result:r.INFORM,resultDetail:`${o} passed all checks (with non-error findings):
|
|
4
4
|
${f}`}}return{result:r.SUCCESS,resultDetail:`${o} passed all checks.`}})}var I=class{constructor(t){this.theme=t}async readFile(t){let i=this.theme[t];if(!i)throw new Error(`File not found: ${t}`);return i}async readDirectory(){return[]}async stat(t){let i=this.theme[t];if(!i)throw new Error(`File not found: ${t}`);return{type:n.FileType.File,size:i.length}}},Z=new Set(["TranslationKeyExists","ValidSchemaTranslations","MissingTemplate","MissingAsset","ValidStaticBlockType","AssetSizeAppBlockCSS","AssetSizeAppBlockJavaScript"]);async function ee(e,t,i,l){let s={[`file:///${t}/${e}`]:l},u={checks:n.recommended.filter(a=>!Z.has(a.meta.code)),settings:{},rootUri:"file:///",context:i},o=new U.ThemeLiquidDocsManager,m=Object.entries(s).filter(([a])=>a.endsWith(".liquid")||a.endsWith(".json")).map(([a,c])=>(0,n.toSourceCode)(a,c)),f=await(0,n.check)(m,u,{fs:new I(s),themeDocset:o,jsonValidationSet:o,getBlockSchema:async a=>{let c=`file:///blocks/${a}.liquid`,p=m.find(T=>T.uri===c);if(p)return(0,n.toSchema)(i,c,p,async()=>!0)},getSectionSchema:async a=>{let c=`file:///sections/${a}.liquid`,p=m.find(T=>T.uri===c);if(p)return(0,n.toSchema)(i,c,p,async()=>!0)},async getDocDefinition(a){let c=m.find(p=>F(p.uri).endsWith(F(a)));if(!(!c||c.type!==n.SourceCodeType.LiquidHtml))return(0,n.extractDocDefinition)(c.uri,c.ast)}});return f.filter(G).length===0?f.length===0?{result:r.SUCCESS,resultDetail:`${e} passed all checks.`}:{result:r.INFORM,resultDetail:`${e} passed all checks (with ${f.length} non-error finding(s)):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o}from"./chunk-VKWPEFWQ.js";o();var s="0.0.0-snapshot-
|
|
1
|
+
import{g as o}from"./chunk-VKWPEFWQ.js";o();var s="0.0.0-snapshot-20260723152140";export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Q,b as $}from"./chunk-
|
|
1
|
+
import{a as Q,b as $}from"./chunk-7CIGXMZR.js";import{f as F,h as b,i as j,q as x,r as c,s as _}from"./chunk-LFCQ2FTD.js";import{a,b as E}from"./chunk-CXYYGVNK.js";import{b as R,c as D}from"./chunk-AAG2JILI.js";import{b as L}from"./chunk-ZGI4ZRVE.js";import{U as I,V as y,v as G,w as q,x as A}from"./chunk-FGYV4PZF.js";import{m as O,o as P}from"./chunk-TYCR45XU.js";import{Lb as w,ma as S}from"./chunk-CUIOWLG3.js";import{f as V}from"./chunk-773TIA5M.js";import{a as Y}from"./chunk-M5GXA5W4.js";import{e as M,g as p}from"./chunk-VKWPEFWQ.js";p();p();var U="supported-versions-schema.json",W=async({code:e,file:r})=>{if(e!==void 0)return e;if(r!==void 0)return S(r);let i=I()?await y():void 0;if(!i)throw new O("No GraphQL operation provided.","Pass the operation with --code, --file, or pipe it via stdin.");return i};function u(e,r,i){return{success:!1,result:a.FAILED,responses:[{result:a.FAILED,resultDetail:e}],resolvedVersion:r,versionDefaulted:i}}async function J(e){let{api:r,version:i}=e,N=e.readOperation??W;if(!_(r))return u(`Unsupported API '${r}'. Supported APIs: ${c.join(", ")}.`,void 0,!1);let o;try{let t=await N({code:e.code,file:e.file}),d=e.dataDir??F("graphql",[U]),h=e.schemaSource??j(d),H=h.readVersionCatalog(),s=x(H,r,i);if(!s.ok){let k=s.reason==="unsupported_version"?`Version '${i}' is not available for API '${r}'. Available versions for '${r}': ${s.supportedVersions.join(", ")}.`:`No supported versions available for API '${r}'.`;return u(k,void 0,!1)}o=s.version;let m=s.source==="default",T={api:r,name:o,schemaPath:b(d,r,o),latestVersion:m},{validation:n,scopes:v}=await $(t,r,{apiVersion:T,failOnDeprecated:!1,schemaSource:h}),g=n.resultDetail;return n.result!==a.FAILED&&v.length>0&&(g+=Q(v)),{success:n.result!==a.FAILED,result:n.result,responses:[{result:n.result,resultDetail:g}],resolvedVersion:o,versionDefaulted:m}}catch(t){let d=t instanceof Error?t.message:String(t);return u(d,o,!1)}}function B(e){let r=e.responses[0]?.resultDetail??"",i=e.versionDefaulted&&e.resolvedVersion!==void 0?`
|
|
2
2
|
Version validated against is ${e.resolvedVersion}.`:"";return`${r}${i}`}function K(e,r){if(r.json)w(JSON.stringify({success:e.success,responses:e.responses,resolvedVersion:e.resolvedVersion},null,2));else{let i=B(e);e.result===a.SUCCESS?G({headline:"GraphQL operation is valid.",body:i}):e.result===a.INFORM?q({headline:"GraphQL operation is valid, with warnings.",body:i}):A({headline:"GraphQL validation failed.",body:i})}if(!e.success)throw new P}async function C(e){let r=await J(e);await E({subcommand:"graphql",result:r.result,api:e.api,apiVersion:r.resolvedVersion,json:e.json}),K(r,{json:e.json})}var l=M(Y(),1),f=class e extends L{static{this.summary="Validate a GraphQL operation against a bundled Shopify API schema."}static{this.descriptionWithMarkdown="Validates a GraphQL query or mutation against the bundled introspection schema for the selected Shopify API. Runs fully offline \u2014 no network access or login required \u2014 so results are deterministic.\n\nPass the operation with `--code`, `--file`, or pipe it via stdin. On success, the required offline access scopes for the operation are reported. Use `--json` for a machine-readable result.\n\nExits with code 0 when the operation is valid (including when it only uses deprecated fields) and 1 when it is invalid or an error occurs."}static{this.description=this.descriptionWithoutMarkdown()}static{this.examples=[`# validate an Admin API query passed inline
|
|
3
3
|
shopify validate graphql --api admin --code "{ shop { name } }"`,`# validate a query from a file against a specific version
|
|
4
4
|
shopify validate graphql --api admin --file query.graphql --version 2026-04`,`# pipe an operation via stdin and get JSON output
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as C,c as F}from"./chunk-
|
|
1
|
+
import{a as C,c as F}from"./chunk-5ACGB45Y.js";import{d as k,f as A,u as q}from"./chunk-MGTKKOH3.js";import{a as N}from"./chunk-ZXAEYDNN.js";import{a as E,c as J}from"./chunk-IQLFGDUD.js";import{b as x}from"./chunk-Y2GJEZSL.js";import{b}from"./chunk-AAG2JILI.js";import{E as m,v as f,x as S}from"./chunk-FGYV4PZF.js";import{d as z,f as y,m as u}from"./chunk-TYCR45XU.js";import{Fb as c,Hb as n,Lb as O,Ta as v,ma as w,ua as g}from"./chunk-CUIOWLG3.js";import{e as I,g as l}from"./chunk-VKWPEFWQ.js";l();l();var M=I(z(),1);async function D(s,e){if(s)try{return JSON.parse(s)}catch(t){let r=t instanceof Error?t.message:"Unknown error";throw new u(n`Invalid JSON in ${c.yellow("--variables")} flag: ${r}`,"Please provide valid JSON format.")}else if(e){if(!await v(e))throw new u(n`Variable file not found at ${c.path(e)}. Please check the path and try again.`);let t=await w(e,{encoding:"utf8"});try{return JSON.parse(t)}catch(r){let p=r instanceof Error?r.message:"Unknown error";throw new u(n`Invalid JSON in variable file ${c.path(e)}: ${p}`,"Please provide valid JSON format.")}}}async function $(s){let{remoteApp:e,store:t,query:r,variables:p,variableFile:L,version:R,outputFile:d}=s,{adminSession:V,version:G}=await m({title:n`Authenticating`,task:async()=>{let o=await C(e,t.shopDomain),i=await A({adminSession:o,userSpecifiedVersion:R});return{adminSession:o,version:i}},renderOptions:{stdout:process.stderr}}),P=await D(p,L);k(r),F(r,t);try{let o=await m({title:n`Executing GraphQL operation`,task:async()=>x({query:(0,M.parse)(r),session:V,variables:P,version:G,responseOptions:{handleErrors:!1}}),renderOptions:{stdout:process.stderr}}),i=JSON.stringify(o,null,2);d?(await g(d,i),f({headline:"Operation succeeded.",body:`Results written to ${d}`})):(f({headline:"Operation succeeded."}),O(i))}catch(o){if(o instanceof y){let i={errors:o.response.errors},Q=JSON.stringify(i,null,2);S({headline:"GraphQL operation failed.",body:Q});return}throw o}}var h,a=class extends N{async run(){let{flags:e}=await this.parse(h),{query:t,appContextResult:r,store:p}=await q(e);return await $({organization:r.organization,remoteApp:r.remoteApp,store:p,query:t,variables:e.variables,variableFile:e["variable-file"],outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:r.app}}};h=a;a.summary="Execute GraphQL queries and mutations.";a.descriptionWithMarkdown="Executes an Admin API GraphQL query or mutation on the specified store. Mutations are only allowed on dev stores.\n\n For operations that process large amounts of data, use [`bulk execute`](https://shopify.dev/docs/api/shopify-cli/app/app-bulk-execute) instead.";a.description=h.descriptionWithoutMarkdown();a.flags={...b,...E,...J};var oe=a;export{oe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
1
|
+
import{b as c}from"./chunk-ZGI4ZRVE.js";import{Q as r}from"./chunk-MCP5CY6B.js";import{Nb as a}from"./chunk-CUIOWLG3.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var o=class extends c{static{this.description="Logs you out of the Shopify account or Partner account and store."}async run(){await r(),a("Logged out from all the accounts")}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as A}from"./chunk-
|
|
1
|
+
import{n as A}from"./chunk-KHCWSUJW.js";import{a as P}from"./chunk-QDGUOAOA.js";import{c as C}from"./chunk-EIP2MGZD.js";import{s as T}from"./chunk-FNDHJQWJ.js";import{r as w}from"./chunk-LLNBH7KL.js";import{a as D}from"./chunk-WD3XHU3U.js";import{O as u}from"./chunk-MCP5CY6B.js";import{v as h,x as y}from"./chunk-FGYV4PZF.js";import{Pb as O,va as p}from"./chunk-CUIOWLG3.js";import{d,q as m}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();async function q(e){P({verbose:e.verbose,noColor:e.noColor});let t=w({store:e.store}),o=await u(t,e.password);await R(o,{path:e.path??m(),force:e.force??!1,silent:e.silent??!1})}var E={article:"ARTICLE",blog:"BLOG",collection:"COLLECTION",company:"COMPANY",company_location:"COMPANY_LOCATION",location:"LOCATION",market:"MARKET",order:"ORDER",page:"PAGE",product:"PRODUCT",variant:"PRODUCTVARIANT",shop:"SHOP"};async function R(e,t){let{force:o,path:i,silent:n}=t;if(!await A(i)&&(process.env.SHOPIFY_LANGUAGE_SERVER==="1"||!await C(o)))return;let f=[],r=[];for(let[a,s]of Object.entries(E))f.push(T(s,e).catch(c=>(r.push(s),[])).then(c=>({[a]:c})));let b=(await Promise.all(f)).reduce((a,s)=>({...a,...s}));if(r.length===Object.values(E).length){n||y({body:"Failed to fetch metafield definitions.",nextSteps:["Check your network connection and try again.","Ensure you have the permission to fetch metafield definitions."],reference:[{link:{label:"Metafield Definition API",url:"https://shopify.dev/docs/api/admin-graphql/latest/queries/metafieldDefinition"}}]});return}await S(i,b),r.length>0&&O(`Failed to fetch metafield definitions for the following owner types: ${r.join(", ")}`),n||h({body:"Metafield definitions have been successfully downloaded."})}async function S(e,t){let o=await D(e),i=d(o,"metafields.json"),n=JSON.stringify(t,null,2);p(i,n)}export{q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk-
|
|
1
|
+
import{b as e}from"./chunk-ZGI4ZRVE.js";import{a as i}from"./chunk-HIIYIR25.js";import{Lb as t}from"./chunk-CUIOWLG3.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();o();async function s(){t(i)}var r=class extends e{static{this.description="Shopify CLI version currently installed."}async run(){await s()}};export{r as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as r}from"./chunk-
|
|
1
|
+
import{y as r}from"./chunk-MCP5CY6B.js";import{f as t,q as n}from"./chunk-773TIA5M.js";import{a as o}from"./chunk-M5GXA5W4.js";import{e as s,g as a}from"./chunk-VKWPEFWQ.js";a();var e=s(o(),1);var c={path:e.Flags.string({description:"The path to your app directory.",parse:async i=>t(i),default:async()=>n(),noCacheDefault:!0,env:"SHOPIFY_FLAG_PATH"}),config:e.Flags.string({hidden:!1,char:"c",description:"The name of the app configuration.",env:"SHOPIFY_FLAG_APP_CONFIG"}),"client-id":e.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]}),reset:e.Flags.boolean({hidden:!1,description:"Reset all your settings.",env:"SHOPIFY_FLAG_RESET",default:!1,exclusive:["config"]})},p={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation to run as a bulk operation.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your mutation, in JSON format. Can be specified multiple times.",env:"SHOPIFY_FLAG_VARIABLES",multiple:!0,exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSONL format (one JSON object per line). Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The store domain. Must be an existing dev store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),watch:e.Flags.boolean({description:"Wait for bulk operation results before exiting. Defaults to false.",env:"SHOPIFY_FLAG_WATCH"}),"output-file":e.Flags.string({description:"The file path where results should be written if --watch is specified. If not specified, results will be written to STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE",dependsOn:["watch"]}),version:e.Flags.string({description:"The API version to use for the bulk operation. If not specified, uses the latest stable version.",env:"SHOPIFY_FLAG_VERSION"})},h={query:e.Flags.string({char:"q",description:"The GraphQL query or mutation, as a string.",env:"SHOPIFY_FLAG_QUERY",required:!1,exactlyOne:["query","query-file"]}),"query-file":e.Flags.string({description:"Path to a file containing the GraphQL query or mutation. Can't be used with --query.",env:"SHOPIFY_FLAG_QUERY_FILE",parse:async i=>t(i),exactlyOne:["query","query-file"]}),variables:e.Flags.string({char:"v",description:"The values for any GraphQL variables in your query or mutation, in JSON format.",env:"SHOPIFY_FLAG_VARIABLES",exclusive:["variable-file"]}),"variable-file":e.Flags.string({description:"Path to a file containing GraphQL variables in JSON format. Can't be used with --variables.",env:"SHOPIFY_FLAG_VARIABLE_FILE",parse:async i=>t(i),exclusive:["variables"]}),store:e.Flags.string({char:"s",description:"The myshopify.com domain of the store to execute against. The app must be installed on the store. If not specified, you will be prompted to select a store.",env:"SHOPIFY_FLAG_STORE",parse:async i=>r(i)}),version:e.Flags.string({description:"The API version to use for the query or mutation. Defaults to the latest stable version.",env:"SHOPIFY_FLAG_VERSION"}),"output-file":e.Flags.string({description:"The file name where results should be written, instead of STDOUT.",env:"SHOPIFY_FLAG_OUTPUT_FILE"})};export{c as a,p as b,h as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-QTOMCGDI.js";import{b as i}from"./chunk-ZGI4ZRVE.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static{this.description="Generate a notifications.json file for the the CLI, appending a new notification to the current file."}static{this.hidden=!0}async run(){await n()}};export{t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-Y3IZPAA6.js";import{a as n}from"./chunk-IQLFGDUD.js";import{C as s,xa as c,z as p}from"./chunk-KYHMD54O.js";import{b as e}from"./chunk-AAG2JILI.js";import{a as d}from"./chunk-M5GXA5W4.js";import{e as l,g as r}from"./chunk-VKWPEFWQ.js";r();var m=l(d(),1);var t,{config:b,...u}=n,o=class extends f{async run(){let{flags:a,args:i}=await this.parse(t),{app:g}=await c({directory:a.path,userProvidedConfigName:i.config});return await s(a.path),await p({directory:a.path,configName:i.config,reset:a.reset}),{app:g}}};t=o;o.summary="Activate an app configuration.";o.descriptionWithMarkdown="Sets default configuration when you run app-related CLI commands. If you omit the `config-name` parameter, then you'll be prompted to choose from the configuration files in your project.";o.description=t.descriptionWithoutMarkdown();o.usage="app config use [config] [flags]";o.flags={...e,...u};o.args={config:m.Args.string({description:"The name of the app configuration. Can be 'shopify.app.staging.toml' or simply 'staging'."})};var v=o;export{v as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ea as cs,Fb as kt,Hb as gs,Pa as hs,Pb as ms,Qa as us,Ta as fs,Wa as ds,bb as ps,ma as wt,pa as be,ua as ls,wa as bt}from"./chunk-
|
|
1
|
+
import{Ea as cs,Fb as kt,Hb as gs,Pa as hs,Pb as ms,Qa as us,Ta as fs,Wa as ds,bb as ps,ma as wt,pa as be,ua as ls,wa as bt}from"./chunk-CUIOWLG3.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,4 +1,4 @@
|
|
|
1
|
-
import{b as L}from"./chunk-
|
|
1
|
+
import{b as L}from"./chunk-7LWP4FVK.js";import{a as V}from"./chunk-XD5DGSUM.js";import{k as q,l as H,n as I}from"./chunk-KHCWSUJW.js";import{a as N}from"./chunk-3AENHXGF.js";import{a as Y}from"./chunk-QDGUOAOA.js";import{a as p,b as w}from"./chunk-STJ3LWFL.js";import{a as F}from"./chunk-NTPMJHGK.js";import{a as y,c as U}from"./chunk-EIP2MGZD.js";import{b as g,c as x,d as M,f as _,j as R,n as j,p as D}from"./chunk-FNDHJQWJ.js";import{r as k}from"./chunk-LLNBH7KL.js";import{aa as B}from"./chunk-WY2LFBPL.js";import{O as b,ua as a,va as O}from"./chunk-MCP5CY6B.js";import{A as P,v as f,w as d,x as C}from"./chunk-FGYV4PZF.js";import{m as S}from"./chunk-TYCR45XU.js";import{Lb as $}from"./chunk-CUIOWLG3.js";import{f as T,q as l}from"./chunk-773TIA5M.js";import{e as z,g as v}from"./chunk-VKWPEFWQ.js";v();var A=z(B(),1);async function Te(e,t,r,o){let n=e.environment?.[0],s=t??await b(k({store:e.store}),e.password);if(e.strict){let m=e.json?"json":"text",{offenses:c}=await L(e.path??l(),m);if(c.length>0&&c.filter(J=>J.severity===A.Severity.ERROR).length>0)throw O(new S(n?`[${n}] Theme check failed. Please fix the errors before pushing.`:"Theme check failed. Please fix the errors before pushing."))}a("theme-service:push:setup"),Y({verbose:e.verbose,noColor:e.noColor});let i=e.force??!1,h=e.path?T(e.path):l();if(!await I(h)&&!await U(i,void 0,n,r))return;e.listing&&await q(h,e.listing);let u=await Z(s,e,r);u&&(a("theme-service:push:setup"),await W(u,s,{allowLive:e.allowLive??!1,environment:n,force:i,ignore:e.ignore??[],json:e.json??!1,multiEnvironment:r,nodelete:e.nodelete??!1,only:e.only??[],path:h,publish:e.publish??!1,listing:e.listing},o))}async function W(e,t,r,o){a("theme-service:push:file-system");let n=await j(e.id,t),s=H(r.path,{filters:r,listing:r.listing});a("theme-service:push:file-system");let{uploadResults:i,renderThemeSyncProgress:h}=V(e,t,n,s,r,o);await h(),r.publish&&await D(e.id,t),await G(i,e,t,r)}function E(e){for(let[t,r]of e.entries())if(!r.success)return!0;return!1}async function G(e,t,r,o){o.json?K(t,r,e,o.environment):o.publish?Q(r,e,o.environment):X(t,r,e,o.environment)}function K(e,t,r,o){let n={environment:o,theme:{id:e.id,name:e.name,role:e.role,shop:t.storeFqdn,editor_url:w(e,t),preview_url:p(e,t)}};if(E(r)){let i=`${o?`[${o}] `:""}The theme '${e.name}' was pushed with errors`;n.theme.warning=i;let h={};for(let[u,m]of r.entries())!m.success&&m.errors?.asset&&(h[u]=m.errors.asset);Object.keys(h).length>0&&(n.theme.errors=h)}$(JSON.stringify(n))}function Q(e,t,r){let o=r?[{subdued:`Environment: ${r}
|
|
2
2
|
|
|
3
3
|
`}]:[];E(t)?d({body:[...o,`Your theme was published with errors and is now live at https://${e.storeFqdn}`]}):f({body:[...o,`Your theme is now live at https://${e.storeFqdn}`]})}function X(e,t,r,o){let n=o?[{subdued:`Environment: ${o}
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as O}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-A7LAO76V.js";import{c as _,i as P,n as k}from"./chunk-P6IDCK2B.js";import{a as I}from"./chunk-ECZRDNHP.js";import{b as S,m as b}from"./chunk-FNDHJQWJ.js";import{j as g,k as T,l as L,p as R,v as q}from"./chunk-LLNBH7KL.js";import{b as E}from"./chunk-AAG2JILI.js";import{xa as x}from"./chunk-MCP5CY6B.js";import{a as v}from"./chunk-HIIYIR25.js";import{m as u}from"./chunk-TYCR45XU.js";import{Fb as d,Hb as m,Mb as o,Pb as c}from"./chunk-CUIOWLG3.js";import{a as G}from"./chunk-M5GXA5W4.js";import{e as V,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();var f=class extends I{constructor(t){super(t),this.context="REPL",this.themeId=g()}async create(t,n){let s=await super.create(t,n);return await this.uploadThemeAssets(s),s}async findOrCreate(){let t=await this.fetch();if(!t){let n=`Liquid Console (${v})`;t=await this.create(S,n)}return t}setTheme(t){T(t)}removeTheme(){L()}async uploadThemeAssets(t){let n=[{key:"config/settings_data.json",value:"{}"},{key:"config/settings_schema.json",value:"[]"},{key:"snippets/eval.liquid",value:""},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"sections/announcement-bar.liquid",value:""},{key:"templates/index.json",value:JSON.stringify({sections:{announcement:{type:"announcement-bar",settings:{}}},order:["announcement"]})}];await b(t.id,n,this.adminSession)}};r();r();async function A(e){return await H(e)??await $(e)??await Y(e)??await z(e)??void 0}async function H(e){c(`Evaluating snippet - ${e.snippet}`);let t=`{ "type": "display", "value": {{ ${e.snippet} | json }} }`,n=await h({...e,snippet:t}),s=await n.text();return C(n.status,s)?Q(s):void 0}async function $(e){c(`Evaluating context - ${e.snippet}`);let t=`{ "type": "context", "value": "{% ${e.snippet.replace(/"/g,'\\"')} %}" }`,n=await h({...e,snippet:t}),s=await n.text();C(n.status,s)&&e.replSession.push(JSON.parse(t))}async function Y(e){if(c(`Evaluating assignment context - ${e.snippet}`),oe(e.snippet))return e.snippet=`assign ${e.snippet}`,o(m`${d.gray(`> ${e.snippet}`)}`),$(e)}async function z(e){c(`Evaluating syntax error - ${e.snippet}`);let t="";if(X(e.snippet)||(t=await(await h({...e,snippet:`{{ ${e.snippet} }}`})).text()),y(t)||(t=await(await h({...e,snippet:`{% ${e.snippet} %}`})).text()),y(t)){let n=t.replace(/ \(snippets\/eval line \d+\)/,"");B(e.snippet,n)}}function B(e,t){if(t.includes("Unknown tag")){o(m`${d.errorText(`Unknown object, property, tag, or filter: '${e}'`)}`);return}let n=j(t);n&&o(m`${d.errorText(n)}`)}async function h(e){let t=K(e);e.url.startsWith("/")||(e.url=`/${e.url}`);let n=await P(e.themeSession,{method:"GET",path:e.url,query:[],themeId:e.themeId,sectionId:"announcement-bar",headers:{},replaceTemplates:{"sections/announcement-bar.liquid":"{% render 'eval' %}","snippets/eval.liquid":`
|
|
2
2
|
${t}
|
|
3
3
|
`}});return Z(n)&&ne(),ee(n)&&se(),te(n)&&re(),n}function K(e){return`[${[...e.replSession.map(n=>JSON.stringify(n)),e.snippet].join(",").replace(/\\"/g,'"')}]`}function Q(e){let t=j(e);if(t)return JSON.parse(t)?.find(s=>s.type==="display")?.value}function j(e){let t=e.split(`
|
|
4
4
|
`).slice(1,-1);if(t.length!==0)return t.join("")}function y(e){return e.includes("Liquid syntax error")}function X(e){return/^\s*assign\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function Z(e){return e.status===401||e.status===403}function ee(e){return e.status===430||e.status===429}function te(e){return e.headers.get("server-timing")?.includes('pageType;desc="404"')??!1}function ne(){throw new u("Session expired. Please initiate a new one.")}function se(){throw new u("Evaluations limit reached. Try again later.")}function re(){throw new u("Page not found. Please provide a valid --url value!")}function oe(e){return/^\s*((?:\(?[\w\-.[\]]\)?)+)\s*=\s*(.*)\s*/m.test(e)}function C(e,t){return e===200&&!y(t)}r();function F(e){if(N(e)){o("Object can't be printed, but you can access its fields. Read more at https://shopify.dev/docs/api/liquid.");return}if(e==null){M("null");return}let t=JSON.stringify(e,null,2);M(t)}function N(e){if(Array.isArray(e))return e.length>0?N(e[0]):!1;if(e&&typeof e=="object"){let n=e.error;return typeof n=="string"&&n.includes("json not allowed for this object")}return!1}function M(e){return o(m`${d.cyan(e)}`)}import{createInterface as ie}from"readline";var ae=`Liquid Console doesn't support Liquid delimiters such as '{{ ... }}' or '{% ... %}'.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w as h}from"./chunk-
|
|
1
|
+
import{w as h}from"./chunk-Y2VJUEJJ.js";import{a as d}from"./chunk-ZXAEYDNN.js";import{a as f}from"./chunk-IQLFGDUD.js";import{wa as l}from"./chunk-KYHMD54O.js";import{b as m}from"./chunk-AAG2JILI.js";import{Lb as c,Xb as u}from"./chunk-CUIOWLG3.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();function g(p){let e=h(p),o=new Map;e.forEach(s=>{let r=s.split(".");if(r.length>=2){let i=r[0];o.has(i)||o.set(i,[]),o.set(i,[...o.get(i),s])}});for(let[s,r]of o)c(u(s,r.join(`
|
|
2
2
|
`)))}var a,t=class extends d{async run(){let{flags:e}=await this.parse(a),{app:o}=await l({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config});return o.errors.isEmpty()?g(o):process.exit(2),{app:o}}};a=t;t.summary="Print out a list of sources that may be used with the logs command.";t.descriptionWithMarkdown="The output source names can be used with the `--source` argument of `shopify app logs` to filter log output. Currently only function extensions are supported as sources.";t.description=a.descriptionWithoutMarkdown();t.flags={...m,...f};var N=t;export{N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as i}from"./chunk-
|
|
1
|
+
import{K as i}from"./chunk-FGYV4PZF.js";import{a as l}from"./chunk-7UNQOKZW.js";import{a as p}from"./chunk-CX5CC6P5.js";import{e as u,g as a}from"./chunk-VKWPEFWQ.js";a();var f=u(l(),1),o=u(p(),1);async function h(t){try{return(await i("npm",["list","@shopify/cli"],{cwd:t})).match(/@shopify\/cli@([\w.-]*)/)?.[1]}catch{return}}async function d(){try{let t={...process.env,SHOPIFY_CLI_NO_ANALYTICS:"1"},e=f.default.sync("shopify",{all:!0}).filter(r=>!r.includes("node_modules"));if(!e[0])return;let n=(await i(e[0],[],{env:t})).match(/@shopify\/cli\/([^\s]+)/);if(n&&n[1]){let r=n[1];if((0,o.satisfies)(r,">=3.59.0")||s(r))return r}return}catch{return}}function s(t){return t.startsWith("0.0.0")}function y(t,e){if(s(t)||s(e))return!1;let c=new o.SemVer(t),n=new o.SemVer(e);return c.major!==n.major}export{h as a,d as b,s as c,y as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-QDGUOAOA.js";import{a as N}from"./chunk-STJ3LWFL.js";import{a as v,b as J}from"./chunk-NTPMJHGK.js";import{a as p}from"./chunk-EIP2MGZD.js";import{r as E}from"./chunk-FNDHJQWJ.js";import{p as c,r as F,v as S}from"./chunk-LLNBH7KL.js";import{b as q,c as D}from"./chunk-AAG2JILI.js";import{O as w}from"./chunk-MCP5CY6B.js";import{A as T,S as O,v as I,x as u}from"./chunk-FGYV4PZF.js";import{Lb as a}from"./chunk-CUIOWLG3.js";import{a as M}from"./chunk-M5GXA5W4.js";import{e as A,g as h}from"./chunk-VKWPEFWQ.js";h();h();async function _(t,o,e){let{name:r,verbose:d,noColor:l,json:m,force:x}=e,g=O()||x;if(C({verbose:d,noColor:l}),g&&!o){let s="A theme ID is required to duplicate a theme, specify one with the --theme flag";m?a(JSON.stringify({message:s,errors:[]})):u({body:[s]});return}let i=o?await J(t,o):await v(t,{header:"Select a theme to duplicate",filter:{theme:o}});if(!i){let s=`No theme with ID ${o} could be found. Use shopify theme list to find a theme ID.`;m?a(JSON.stringify({message:s,errors:[]})):u({body:[s]});return}if(i?.role==="development"){let s="Development themes can't be duplicated. Use shopify theme push to upload it to the store first.";m?a(JSON.stringify({message:s,errors:[]})):u({body:[s]});return}if(!g&&!await T({message:`Do you want to duplicate '${i.name}' on ${t.storeFqdn}?`,confirmationMessage:`Yes, duplicate '${i.name}'`,cancellationMessage:"No, cancel duplicate"}))return;let b=await E(i.id,r,t);m?j(i,t,b):P(i,t,b)}function P(t,o,e){if(e.userErrors&&e.userErrors.length>0){let r=e.userErrors.map(d=>d.message).join(", ");u({body:["The theme",...p(t),"could not be duplicated due to errors: ",{subdued:r},{char:"."},...e.requestId?[`
|
|
2
2
|
Request ID: `,{subdued:e.requestId}]:[]]})}else e.theme?I({body:["The theme",...p(t),"has been duplicated",{char:"."}],nextSteps:[[{link:{label:"View the duplicated theme",url:N(e.theme,o)}}]]}):u({body:["The theme",...p(t),"unexpectedly could not be duplicated",{char:"."},...e.requestId?[`
|
|
3
3
|
Request ID: `,{subdued:e.requestId}]:[]]})}function j(t,o,e){if(e.userErrors&&e.userErrors.length>0)a(JSON.stringify({message:`The theme '${t.name}' could not be duplicated due to errors`,errors:e.userErrors.map(r=>r.message),requestId:e.requestId}));else if(e.theme){let{id:r,name:d,role:l}=e.theme,m={theme:{id:r,name:d,role:l,shop:o.storeFqdn}};a(JSON.stringify(m))}else a(JSON.stringify({message:`The theme '${t.name}' unexpectedly could not be duplicated `,errors:[],requestId:e.requestId}))}var f=A(M(),1);var y,n=class extends S{async run(){let{flags:o}=await this.parse(y),e=F(o),r=await w(e,o.password);await _(r,o.theme,o)}};y=n;n.summary="Duplicates a theme from your theme library.";n.usage=["theme duplicate","theme duplicate --theme 10 --name 'New Theme'"];n.descriptionWithMarkdown=`If you want to duplicate your local theme, you need to run \`shopify theme push\` first.
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-D6JK3NBM.js";import{b as ne,c as re}from"./chunk-ZKOUILK2.js";import{c as ee,d as te}from"./chunk-WWWGG5QP.js";import{A as T}from"./chunk-Y2VJUEJJ.js";import{a as Z}from"./chunk-ZXAEYDNN.js";import{a as Q}from"./chunk-IQLFGDUD.js";import{wa as X}from"./chunk-KYHMD54O.js";import{b as Y,c as V}from"./chunk-AAG2JILI.js";import{B as q,a as S,i as K,j as U,k as b,p as C}from"./chunk-FGYV4PZF.js";import{a as J}from"./chunk-FKWHO42M.js";import{m as M}from"./chunk-TYCR45XU.js";import{eb as O,fb as l,gb as s,ib as j,jb as G,kb as H,ma as N}from"./chunk-CUIOWLG3.js";import{f as z}from"./chunk-MBIOMVRS.js";import{d as I}from"./chunk-773TIA5M.js";import{a as ye}from"./chunk-M5GXA5W4.js";import{e as R,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();c();c();var y=R(O(),1);import{Writable as oe}from"stream";function ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:i}){let a={type:"functionRun",input:e.payload.input,output:e.payload.output,logs:e.payload.logs,name:e.source,size:0,memory_usage:0,instructions:e.payload.fuelConsumed},[u,f]=(0,y.useState)([]),[p,m]=(0,y.useState)([a,a]),[w,d]=(0,y.useState)(void 0),{input:E,export:$}=e.payload,[fe,L]=(0,y.useState)(`Watching for changes to ${e.source}...`);return(0,y.useEffect)(()=>{let A=new S;t.signal.addEventListener("abort",()=>{A.abort()});let B=async()=>{let F=await we(r,JSON.stringify(E),$);m(h=>[F,h[0]]),L(`Watching for changes to ${e.source}...`),f(h=>[...h,F])},de=async()=>{L("Replaying log with local function..."),await B()},ge=async()=>{i.onEvent(async h=>{let x=h.extensionEvents.find(v=>v.extension.handle===r.handle);if(!(!x||x.type!==ee.Updated)){if(x.buildResult?.status==="error"){d(`Error while reloading and building extension: ${x.buildResult?.error}`);return}d(void 0),L("Re-running with latest changes..."),await B()}});let F=new oe({write(h,x,v){f(he=>[...he,{type:"systemMessage",message:h.toString()}]),v()}});await i.start({stdout:F,stderr:F,signal:A.signal},!1)};return de().then(()=>{ge()}),()=>{A.abort()}},[E,$,o,r]),C(t.signal,async()=>{setTimeout(()=>{z()||J(process.pid,"SIGINT",!1,()=>{process.exit(0)})},2e3)}),{logs:u,statusMessage:fe,recentFunctionRuns:p,error:w}}async function we(e,t,o){let r="",i=new oe({write(u,f,p){r+=u,p()}});return await D({functionExtension:e,input:t,export:o,stdout:i,json:!0}),{...JSON.parse(r),type:"functionRun"}}var n=R(O(),1);var ae=({selectedRun:e,abortController:t,app:o,extension:r})=>{let{isAborted:i}=C(t.signal),{isRawModeSupported:a}=G(),u=new te(o),{logs:f,statusMessage:p,recentFunctionRuns:m,error:w}=ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:u});return H((d,E)=>{U(d,E,()=>t.abort()),d==="q"&&t.abort()},{isActive:!!a}),n.default.createElement(n.default.Fragment,null,n.default.createElement(j,{items:f},(d,E)=>n.default.createElement(l,{key:`replayOutputScrollerLog${E}`,flexDirection:"column"},n.default.createElement(Se,{log:d}))),i?null:n.default.createElement(l,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},a?n.default.createElement(l,{flexDirection:"column"},n.default.createElement(l,{flexDirection:"row"},n.default.createElement(s,null,b.pointerSmall," ",p)),n.default.createElement(Re,{recentFunctionRuns:m}),n.default.createElement(s,null,b.pointerSmall," Press ",n.default.createElement(s,{bold:!0},"q")," ",b.lineVertical," quit")):null,w?n.default.createElement(s,{color:"red"},w):null))};function k({title:e,backgroundColor:t}){let o=Math.max(Math.round((28-e.length)/2),0),r=" ".repeat(o);return n.default.createElement(s,{backgroundColor:t,color:"black"},`
|
|
2
2
|
|
|
3
3
|
`,r,e,r,`
|
|
4
4
|
`)}function Ee({input:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Input",backgroundColor:"yellow"}),n.default.createElement(s,null,T(e)))}function Fe({logs:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Logs",backgroundColor:"blueBright"}),n.default.createElement(s,null,e))}function xe({output:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Output",backgroundColor:"greenBright"}),n.default.createElement(s,null,T(e)))}function be({functionRun:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Benchmark Results",backgroundColor:"green"}),n.default.createElement(s,null,"Name: ",e.name),n.default.createElement(s,null,"Linear Memory Usage: ",e.memory_usage,"KB"),n.default.createElement(s,null,"Instructions: ",e.instructions/1e3,"K"),n.default.createElement(s,null,"Size: ",e.size,"KB"))}function Re({recentFunctionRuns:e}){let t=e[0].instructions-e[1].instructions;return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(s,null,b.pointerSmall," Instruction count change: ",t>0?"+":"",t))}function Se({log:e}){switch(e.type){case"functionRun":return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(Ee,{input:e.input}),n.default.createElement(Fe,{logs:e.logs}),n.default.createElement(xe,{output:e.output}),n.default.createElement(be,{functionRun:e}),n.default.createElement(s,null,"\xA0"));case"systemMessage":return n.default.createElement(s,null,e.message);default:return null}}var se=R(O(),1);async function ce({selectedRun:e,abortController:t,app:o,extension:r}){return K(se.default.createElement(ae,{selectedRun:e,abortController:t,app:o,extension:r}),{exitOnCtrlC:!1})}c();async function le(e){if(e.length===0)return;let t=i=>({label:`${i.logTimestamp} (${i.status}) - ${i.identifier}`,value:i}),o=e.map(t);return await q({message:"Which function run would you like to replay locally?",choices:o})}import{existsSync as Ce,readdirSync as De}from"fs";var _=100;async function ue(e){let{watch:t,extension:o,app:r}=e,i=new S;try{let a=r.getLogsDir(),u=e.log?await ke(a,o.handle,e.log):await Ae(a,o.handle),{input:f,export:p}=u.payload;t?await ce({selectedRun:u,abortController:i,app:r,extension:o}):await D({functionExtension:o,json:e.json,input:JSON.stringify(f),export:p})}catch(a){throw i.abort(),a}}async function ke(e,t,o){let r=await Le(e,t,o);if(r===void 0)throw new M(`No log found for '${o}'.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as ft,b as ht,f as _e,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-
|
|
1
|
+
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as ft,b as ht,f as _e,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-P6IDCK2B.js";import{a as M,l as gt,m as yt}from"./chunk-FNDHJQWJ.js";import{s as ie,t as W}from"./chunk-LLNBH7KL.js";import{a as O,b as N,e as rt,g as ot,i as it,j as at,k as ct,n as lt,p as dt,q as ut,r as oe,s as $,u as pt,w as mt}from"./chunk-Q7BOSHWX.js";import{aa as nt}from"./chunk-WY2LFBPL.js";import{b as Ke,va as L,xa as H}from"./chunk-MCP5CY6B.js";import{P as st,u as et,w as _,x as te,y as tt}from"./chunk-FGYV4PZF.js";import{m as se}from"./chunk-TYCR45XU.js";import{Fb as j,Hb as ne,Mb as re,O as Xe,Pb as F,Qb as D,Ta as P,Wa as C,Z as $e,bb as ke,ma as k,ua as be,wa as Ze,ya as Qe}from"./chunk-CUIOWLG3.js";import{d as E,g as V,j as Ve,k as q}from"./chunk-773TIA5M.js";import{e as Ge,g as f}from"./chunk-VKWPEFWQ.js";f();f();f();var rs=".shopifyignore",Rt=/templates\/\*(\.(json|liquid))?$/,St=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=Ie(s),[a=[],p=[]]=Ie(n),[m=[],c=[]]=Ie(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(m,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),p.length>0&&(l=l.concat(e.filter(B(p,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Xe(l,h=>h.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>os(n,i)||cs(i)&&as(n,ls(i)));return(s?!r:r)?(F(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function wt(e){let t=E(e,rs);return await P(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function Ie(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function os(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!St.has(t)&&(St.add(t),_({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),is(t)?ke(e,t.replace(Rt,"templates/**/*$1"),s):!1)}function is(e){return Rt.test(e)}function as(e,t){return t.test(e)}function cs(e){return e.startsWith("/")&&e.endsWith("/")}function ls(e){return new RegExp(e.slice(1,-1))}f();import Ft from"fs/promises";var le=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&D("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{F(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),D(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await Ft.writeFile(this.notifyPath,t),await Ft.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};f();f();f();import ds from"node:events";var Pt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ds,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await ue(e,c),u=de(c,l),h=typeof l=="string"?l:"",T=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:u,value:h,attachment:T})),l},i=C(Pt,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let u=V(e,l),h=o(u).then(()=>{let T=t.get(u);return s.add(T.key),T.value??T.attachment??""});st(5).then(()=>{s.delete(u)}).catch(()=>{}),r(c,{fileKey:u,onContent:T=>{h.then(v=>{v&&T(v)}).catch(()=>{})},onSync:T=>{}})},p=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:u=>u()})},m=new Set(Pt.map(c=>E(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-5RWEYTNQ.js");c.watch([...m],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",p.bind(null))}}}f();f();var us="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function $t(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function bt(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>${e.title}</title>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as w}from"./chunk-
|
|
1
|
+
import{a as h,b as w}from"./chunk-BYZ6LYUD.js";import{m as f}from"./chunk-MCP5CY6B.js";import{P as d}from"./chunk-FGYV4PZF.js";import{m as i}from"./chunk-TYCR45XU.js";import{Ga as m,na as p}from"./chunk-CUIOWLG3.js";import{d as u}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as E0,b as v0}from"./chunk-
|
|
1
|
+
import{a as E0,b as v0}from"./chunk-GVQNF7CD.js";import{b as F0,o as i8}from"./chunk-2S3FHQFS.js";import{a as n8}from"./chunk-VJEKDBGZ.js";import{$ as U0,A as Uc,B as _r,C as Ie,D as hi,E as mi,F as io,G as Di,H as ys,I as S0,J as Lc,K as x0,L as P0,M as qc,N as O0,O as Ko,P as T0,Q as I0,R as B0,S as R0,T as N0,U as $0,V as M0,W as j0,Y as k0,Z as Td,_ as Id,aa as L0,ba as q0,c as _0,ca as Wc,e as Sd,f as jr,g as zo,k as Mc,l as jc,m as xd,n as Pd,p as kc,q as C0,r as di,s as w0,t as Od,u as b0,v as Je,w as Ho,x as Vo,y as A0,z as dn}from"./chunk-2CUUHTG4.js";import{a as y0}from"./chunk-WD3XHU3U.js";import{a as g0}from"./chunk-Y2GJEZSL.js";import{b as _s,c as wt}from"./chunk-V7FAV65W.js";import{aa as r8}from"./chunk-WY2LFBPL.js";import{a as Jy,b as Yy}from"./chunk-JQNR75BG.js";import{a as D0}from"./chunk-FMEVIGO7.js";import{a as gr}from"./chunk-33Y5T275.js";import{H as qy,I as Wy,K as vd,N as zy,T as XB,U as Hy,V as ZB,W as e8,X as Vy,Y as t8,Z as pn,_ as Tc,a as ds,aa as Ky,ba as Ct,c as Pc,d as Oc,da as ms,ea as Gy,h as $y,ja as r0,ka as n0,la as i0,m as My,n as jy,o as ky,q as E,s as hs,y as Uy}from"./chunk-MCP5CY6B.js";import{m as Ic,n as Xy,s as Zy,t as e0,w as Bc,x as t0}from"./chunk-34AF5YGB.js";import{A as $r,B as wd,D as s0,F as gs,G as a0,I as c0,O as pi,R as Nc,u as no,v as Ds,w as Rc,x as o0,z as u0}from"./chunk-FGYV4PZF.js";import{o as Ly}from"./chunk-4QJM243J.js";import{a as QB,b as Ed}from"./chunk-7QMA6EVS.js";import{a as cs}from"./chunk-HIIYIR25.js";import{f as Cd}from"./chunk-MW4QZJ7O.js";import{a as Rn,b as ro}from"./chunk-Y5RHZU3E.js";import{d as YB,i as oe,m as U,o as Nn,p as Mr}from"./chunk-TYCR45XU.js";import{$a as fn,Ba as Py,Ea as fi,Fa as Oy,Fb as Se,Ga as bc,Gb as $c,Hb as xe,Ka as Ty,L as to,La as Iy,Mb as p0,N as Bt,Oa as Ac,Ob as d0,Pa as By,Pb as le,Q as KB,Qb as $n,R as GB,Sb as h0,T as by,Ta as Z,Tb as m0,Ua as Lt,V as fs,Wa as Ke,X as Ut,Xa as Ry,Y as yd,_ as Fd,aa as vc,b as UB,bb as Sc,c as LB,da as Ay,db as xc,ea as Wo,f as qB,ha as Sy,i as WB,k as zB,ka as Cc,m as vy,ma as ke,n as Cy,na as Bn,oa as ps,pa as Rr,q as HB,qa as wc,u as wy,ua as vt,v as VB,va as xy,w as _d,wa as Nr,yb as Qy}from"./chunk-CUIOWLG3.js";import{b as jB,c as kB,e as Fy,f as Ey,j as JB,u as Ny}from"./chunk-A4SBXDZB.js";import{f as l0,k as bd,l as Ad,m as f0}from"./chunk-MBIOMVRS.js";import{a as ls}from"./chunk-UKQ7NE5V.js";import{d as B,e as eo,f as ut,g as Te,h as Dy,i as De,j as Ne,k as Fc,l as gy,n as Ec,o as _y,s as yy,t as gd}from"./chunk-773TIA5M.js";import{a as Ve,c as N,e as li,f as MB,g as d}from"./chunk-VKWPEFWQ.js";var fF=N((Hc,lF)=>{d();(function(e,t){typeof Hc=="object"&&typeof lF<"u"?t(Hc,(GB(),MB(KB)),YB()):typeof define=="function"&&define.amd?define(["exports","tslib","graphql"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["graphql-tag"]={},e.tslib,e.graphql))})(Hc,(function(e,t,r){"use strict";var n=new Map,o=new Map,s=!0,a=!1;function l(q){return q.replace(/[\s,]+/g," ").trim()}function p(q){return l(q.source.body.substring(q.start,q.end))}function m(q){var J=new Set,X=[];return q.definitions.forEach(function(pe){if(pe.kind==="FragmentDefinition"){var Fe=pe.name.value,ze=p(pe.loc),gt=o.get(Fe);gt&&!gt.has(ze)?s&&console.warn("Warning: fragment with name "+Fe+` already exists.
|
|
2
2
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
3
3
|
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):gt||o.set(Fe,gt=new Set),gt.add(ze),J.has(ze)||(J.add(ze),X.push(pe))}else X.push(pe)}),t.__assign(t.__assign({},q),{definitions:X})}function g(q){var J=new Set(q.definitions);J.forEach(function(pe){pe.loc&&delete pe.loc,Object.keys(pe).forEach(function(Fe){var ze=pe[Fe];ze&&typeof ze=="object"&&J.add(ze)})});var X=q.loc;return X&&(delete X.startToken,delete X.endToken),q}function F(q){var J=l(q);if(!n.has(J)){var X=r.parse(q,{experimentalFragmentVariables:a,allowLegacyFragmentVariables:a,experimentalFragmentArguments:a});if(!X||X.kind!=="Document")throw new Error("Not a valid GraphQL document.");n.set(J,g(m(X)))}return n.get(J)}function w(q){for(var J=[],X=1;X<arguments.length;X++)J[X-1]=arguments[X];typeof q=="string"&&(q=[q]);var pe=q[0];return J.forEach(function(Fe,ze){Fe&&Fe.kind==="Document"?pe+=Fe.loc.source.body:pe+=Fe,pe+=q[ze+1]}),F(pe)}function v(){n.clear(),o.clear()}function x(){s=!1}function O(){a=!0}function P(){a=!1}var I={gql:w,resetCaches:v,disableFragmentWarnings:x,enableExperimentalFragmentVariables:O,disableExperimentalFragmentVariables:P};(function(q){q.gql=I.gql,q.resetCaches=I.resetCaches,q.disableFragmentWarnings=I.disableFragmentWarnings,q.enableExperimentalFragmentVariables=I.enableExperimentalFragmentVariables,q.disableExperimentalFragmentVariables=I.disableExperimentalFragmentVariables})(w||(w={})),w.default=w;var L=w;e.default=L,e.disableExperimentalFragmentVariables=P,e.disableFragmentWarnings=x,e.enableExperimentalFragmentVariables=O,e.gql=w,e.resetCaches=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var dF=N((yH,pF)=>{d();pF.exports=fF().gql});var EF=N(FF=>{d();var C8=Object.create,Vc=Object.defineProperty,w8=Object.getPrototypeOf,b8=Object.prototype.hasOwnProperty,A8=Object.getOwnPropertyNames,S8=Object.getOwnPropertyDescriptor,mF=e=>Vc(e,"__esModule",{value:!0}),x8=(e,t)=>{mF(e);for(var r in t)Vc(e,r,{get:t[r],enumerable:!0})},P8=(e,t,r)=>{if(mF(e),t&&typeof t=="object"||typeof t=="function")for(let n of A8(t))!b8.call(e,n)&&n!=="default"&&Vc(e,n,{get:()=>t[n],enumerable:!(r=S8(t,n))||r.enumerable});return e},Kc=e=>e&&e.__esModule?e:P8(Vc(e!=null?C8(w8(e)):{},"default",{value:e,enumerable:!0}),e);x8(FF,{default:()=>j8,generateContentsFromGraphqlString:()=>yF,generateGraphQLString:()=>gF});var O8=Kc(Ve("fs")),T8=Kc(dF()),I8=Kc(Ve("readline")),hF=Kc(Ve("path")),DF=(e,t)=>{let r=t?t(e):e;return JSON.stringify(r,(n,o)=>o===void 0?"__undefined":o).replace(/"__undefined"/g,"undefined")},B8=(e,t)=>{let r=new Set,n=[],o=s=>{r.has(s)||(r.add(s),s.imports.forEach(a=>{let l=t[a.absolutePath];o(l)}),n.unshift(s))};return e.forEach(o),n},R8=e=>new Promise(t=>{let r=I8.default.createInterface({input:O8.default.createReadStream(e)}),n="",o=[],s=!1,a=(l,p)=>{let m=p.replace(l,""),g=m.replace(/"|'/g,""),F=hF.default.join(hF.default.dirname(e),g);o.push({absolutePath:F,relativePath:m})};r.on("line",l=>{l.startsWith("#import ")?a("#import ",l):l.startsWith("# import ")?a("# import ",l):s?n+=l+`
|
|
4
4
|
`:l[0]!=="#"&&l!==""&&(s=!0,n+=l+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as C}from"./chunk-
|
|
1
|
+
import{a as C}from"./chunk-ZXAEYDNN.js";import{a as E}from"./chunk-IQLFGDUD.js";import{P as F,Q as _,U as x,wa as R}from"./chunk-KYHMD54O.js";import{b as I}from"./chunk-AAG2JILI.js";import{D as A,v,x as h}from"./chunk-FGYV4PZF.js";import{d as w}from"./chunk-MW4QZJ7O.js";import{o as k}from"./chunk-TYCR45XU.js";import{a as y}from"./chunk-M5GXA5W4.js";import{e as b,g as l}from"./chunk-VKWPEFWQ.js";l();l();async function P(n){let{developerPlatformClient:e,app:p,remoteApp:s}=n,{extensionIdentifiersBreakdown:a,versionDetails:o}=await F(e,s,n.version),t=_({localApp:p,versionAppModules:o.appModuleVersions,activeAppVersion:await e.activeAppVersion(s)});if(!await x({configExtensionIdentifiersBreakdown:t,extensionIdentifiersBreakdown:a,appTitle:s.title,release:!0,allowUpdates:n.force||n.allowUpdates,allowDeletes:n.force||n.allowDeletes}))throw new k;let m=[{title:"Releasing version",task:async u=>{u.appRelease=await e.release({app:s,version:{versionId:o.uuid,appVersionId:o.id}})}}],{appRelease:{appRelease:i}}=await A(m),f=[{link:{label:o.versionTag??void 0,url:o.location}},o.message?`
|
|
2
2
|
${o.message}`:""];if(i.userErrors&&i.userErrors.length>0){let u=i.userErrors?.map(T=>T.message).join(", ");h({headline:"Version couldn't be released.",body:[...f,`${f.length>0?`
|
|
3
3
|
|
|
4
4
|
`:""}${u}`]})}else v({headline:"Version released to users.",body:f})}var d=b(y(),1);var g,r=class extends C{async run(){let{flags:e}=await this.parse(g),p=e["client-id"];await w(()=>({cmd_app_reset_used:e.reset}));let s=e["allow-updates"],a=e["allow-deletes"],o=!!(s&&a),t=[];!s&&!a&&t.push("allow-updates"),this.failMissingNonTTYFlags(e,t);let{app:c,remoteApp:m,developerPlatformClient:i}=await R({directory:e.path,clientId:p,forceRelink:e.reset,userProvidedConfigName:e.config});return await P({app:c,remoteApp:m,developerPlatformClient:i,force:o,allowUpdates:s,allowDeletes:a,version:e.version}),{app:c}}};g=r;r.summary="Release an app version.";r.usage="app release --version <version>";r.descriptionWithMarkdown="Releases an existing app version. Pass the name of the version that you want to release using the `--version` flag.";r.description=g.descriptionWithoutMarkdown();r.flags={...I,...E,"allow-updates":d.Flags.boolean({hidden:!1,description:"Allows adding and updating extensions and configuration without requiring user confirmation. Recommended option for CI/CD environments.",env:"SHOPIFY_FLAG_ALLOW_UPDATES"}),"allow-deletes":d.Flags.boolean({hidden:!1,description:"Allows removing extensions and configuration without requiring user confirmation. For CI/CD environments, the recommended flag is --allow-updates.",env:"SHOPIFY_FLAG_ALLOW_DELETES"}),version:d.Flags.string({hidden:!1,description:"The name of the app version to release.",env:"SHOPIFY_FLAG_VERSION",required:!0})};var G=r;export{G as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as y}from"./chunk-
|
|
1
|
+
import{m as y}from"./chunk-TYCR45XU.js";import{Ua as s,Xa as f,na as c}from"./chunk-CUIOWLG3.js";import{d as u,i as S,p as A}from"./chunk-773TIA5M.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var g=["@shopify/ui-extensions",{name:"@shopify/ui-extensions-react",versions:["2025-07"]}],_={"polaris-app-home":{publicPackages:["@shopify/polaris-types","@shopify/app-bridge-types","@shopify/app-bridge-react"],versioned:!1},"polaris-admin-extensions":{publicPackages:g,versioned:!0,extensionSurfaceName:"admin"},"polaris-checkout-extensions":{publicPackages:g,versioned:!0,extensionSurfaceName:"checkout"},"polaris-customer-account-extensions":{publicPackages:g,versioned:!0,extensionSurfaceName:"customer-account"},"pos-ui":{publicPackages:g,versioned:!0,extensionSurfaceName:"point-of-sale"},hydrogen:{publicPackages:["@shopify/hydrogen"],versioned:!0}},F=Object.keys(_);function k(n){return Object.prototype.hasOwnProperty.call(_,n)}function w(n){return typeof n=="string"?n:n.name}function z(n,e){return typeof n=="string"||!n.versions||e===void 0?!0:n.versions.includes(e)}p();var V=["admin","storefront-graphql","customer","partner","payments-apps"];function $(n){return V.includes(n)}var P={functions_discount:"Discount Function",functions_cart_transform:"Cart Transform Function",functions_cart_checkout_validation:"Cart Checkout Validation Function",functions_delivery_customization:"Delivery Customization Function",functions_fulfillment_constraints:"Fulfillment Constraints Function",functions_order_routing_location_rule:"Order Routing Location Rule Function",functions_payment_customization:"Payment Customization Function",functions_order_discounts:"Order Discounts Function",functions_product_discounts:"Product Discounts Function",functions_shipping_discounts:"Shipping Discounts Function",functions_discounts_allocator:"Discounts Allocator Function",functions_local_pickup_delivery_option_generator:"Local Pickup Delivery Option Generator Function",functions_pickup_point_delivery_option_generator:"Pickup Point Delivery Option Generator Function"},G=Object.keys(P);function L(n){return Object.prototype.hasOwnProperty.call(P,n)}p();import{gunzipSync as d}from"node:zlib";var N="supported-versions-schema.json";function O(n,e,t,o){let r=[["assets","validate",e],["dist","assets","validate",e]],a=n;for(;;){for(let m of r){let l=u(a,...m);if(o(u(l,...t)))return l}let i=S(a);if(i===a)return;a=i}}var h=new Map;function X(n,e){let t=`${n}::${e.join("/")}`,o=h.get(t);if(o!==void 0)return o;let r=O(A(import.meta.url),n,e,s);if(!r)throw new y(`Could not locate the bundled '${n}' validation data.`,"This is an internal packaging error \u2014 please report it.");return h.set(t,r),r}function E(n){let e=u(n,N);return JSON.parse(c(e).toString("utf8"))}var C=new Map;function I(n){let e=C.get(n);if(e!==void 0)return e;let t;if(n.endsWith(".gz"))t=d(c(n)).toString("utf8");else if(s(n))t=c(n).toString("utf8");else{let o=`${n}.gz`;if(!s(o))throw new y(`Schema file not found at ${n} or ${o}`);t=d(c(o)).toString("utf8")}return C.set(n,t),t}function B(n,e,t){return u(n,`${e}_${t}.json`)}function Y(n){return{readVersionCatalog(){return E(n)},readSchemaContent(e){return Promise.resolve(I(e.schemaPath))}}}function T(n){return u(n,"types")}function Z(n){let e=u(T(n),"index.json");return JSON.parse(c(e).toString("utf8"))}var x=new Map;function nn(n,e){let t=u(n,e);if(x.has(t))return x.get(t);let o=b(t);return x.set(t,o),o}function b(n){if(n.endsWith(".gz")){if(s(n))return d(c(n)).toString("utf8");let t=n.slice(0,-3);return s(t)?c(t).toString("utf8"):void 0}if(s(n))return c(n).toString("utf8");let e=`${n}.gz`;return s(e)?d(c(e)).toString("utf8"):void 0}function en(n,e){if(!s(n))return[];let t=f(["**/*.d.ts","**/*.d.ts.gz","**/*.ts","**/*.ts.gz"],{cwd:n,onlyFiles:!0,dot:!1,ignore:["**/node_modules/**"]}),o=new Set,r=[];for(let a of t){let i=a.endsWith(".gz")?a.slice(0,-3):a,m=i.endsWith(".d.ts"),l=i.endsWith(".ts")&&!i.endsWith(".test.ts")&&!i.endsWith(".spec.ts");!m&&!l||e&&!e(i)||o.has(i)||(o.add(i),r.push({assetPath:u(n,a),relPath:i}))}return r}function tn(n){return s(n)?f("*",{cwd:n,onlyDirectories:!0,dot:!1}):[]}function on(n){return s(n)?f("*",{cwd:n,onlyFiles:!0,dot:!1}):[]}p();function v(n,e){return n[e]??[]}function R(n,e){return v(n,e).map(t=>t.name)}function D(n,e){let t=v(n,e);return t.find(o=>o.latestVersion)?.name??t[0]?.name}function cn(n,e,t){let o=R(n,e);if(o.length===0)return{ok:!1,reason:"no_versions",supportedVersions:o};if(t)return o.includes(t)?{ok:!0,version:t,source:"explicit",supportedVersions:o}:{ok:!1,reason:"unsupported_version",supportedVersions:o};let r=D(n,e);return r?{ok:!0,version:r,source:"default",supportedVersions:o}:{ok:!1,reason:"no_versions",supportedVersions:o}}export{_ as a,F as b,k as c,w as d,z as e,X as f,E as g,B as h,Y as i,T as j,Z as k,nn as l,en as m,tn as n,on as o,R as p,cn as q,V as r,$ as s,G as t,L as u};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as ce}from"./chunk-R56CBH7G.js";import{d as de}from"./chunk-BPRY3O4N.js";import{a as me,b as ue}from"./chunk-3PFIBTES.js";import{F as $,O as N,a as ee,va as te,xa as U,y,ya as re}from"./chunk-OQ6WYWG4.js";import{A as ie,a as Z,t as se,w as R,x as I}from"./chunk-SQVJGTTD.js";import{b as x}from"./chunk-JNAAHGJ6.js";import{d as oe,e as ne}from"./chunk-4NSHAMD3.js";import{m as F,p as ae}from"./chunk-O6BUPYXH.js";import{Fa as X,Fb as q,Hb as h,Pb as A,Ua as _}from"./chunk-KNLPWHHJ.js";import{d as Q,f as k,i as V,q as P}from"./chunk-773TIA5M.js";import{a as Te}from"./chunk-M5GXA5W4.js";import{e as xe,g as f}from"./chunk-VKWPEFWQ.js";f();var T=xe(Te(),1);var O={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?X(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${V(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>P(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>y(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},pe="Wrap the value in double quotes if you're using wildcards.",Ue=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${pe}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${pe}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as Ie}from"node:async_hooks";var fe=new Ie,j,D,M,B;function l(){return j??(j=new x({projectName:"shopify-cli-theme-conf"})),j}function G(){return D??(D=new x({projectName:"shopify-cli-development-theme-config"})),D}function H(){return M??(M=new x({projectName:"shopify-cli-repl-theme-config"})),M}function z(){return B??(B=new x({projectName:"shopify-cli-theme-store-password"})),B}function Y(t=l()){return fe.getStore()?.store??t.get("themeStore")}function he(t,e=l()){e.set("themeStore",t)}function Be(t=l()){return A(h`Getting development theme...`),G().get(v(t))}function Ge(t,e=l()){A(h`Setting development theme...`),G().set(v(e),t)}function He(t=l()){A(h`Removing development theme...`),G().delete(v(t))}function ze(t=l()){return A(h`Getting REPL theme...`),H().get(v(t))}function Ye(t,e=l()){A(h`Setting REPL theme to ${t}...`),H().set(v(e),t)}function Je(t=l()){A(h`Removing REPL theme...`),H().delete(v(t))}function We(t=l()){let e=v(t);return A(h`Getting storefront password for shop ${e}...`),z().get(e)}function Ke(t,e=l()){let o=v(e);A(h`Setting storefront password for shop ${o}...`),z().set(o,t)}function Qe(t=l()){let e=v(t);A(h`Removing storefront password for ${e}...`),z().delete(e)}function v(t=l()){let e=Y(t);if(!e)throw new ae("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function le(t,e){return fe.run({store:t},e)}function Se(t){let e=t.store??Y();if(!e)throw te(new F("A store is required",`Specify the store passing ${h`${q.genericShellCommand(`--${O.store.name}=example.myshopify.com`)}`.value} or set the ${h`${q.genericShellCommand(O.store.env)}`.value} environment variable.`));return he(e),e}f();f();var ge="shopify.theme.toml",it=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),at=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],ct=50;f();f();var J="7e9cb568cfd431c538f36d1ad3f2b4f6";var _e="shopify-cli-store",gt=240*1e3,W;function C(){return W??(W=new x({projectName:_e})),W}function b(t){return`${J}::${Fe(t)}`}function Fe(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function be(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ee(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function ke(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=be(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?Ee(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let i=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(i);return}let a=Object.fromEntries(Object.entries(r).flatMap(([m,c])=>{let p=ke(c);return p?[[m,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(i,{currentUserId:n,sessionsByUserId:a});else{o.delete(i);return}return{currentUserId:n,sessionsByUserId:a}}function K(t,e){return ye(t,e.get(b(t)),e)}function Pe(t){return t.config?.store??{}}function we(t=C()){let e=[],o=`${J}::`;for(let[r,n]of Object.entries(Pe(t))){if(!r.startsWith(o))continue;let s=ye(r.slice(o.length),n,t),i=s?.sessionsByUserId[s.currentUserId];i&&e.push(i)}return e}function Ae(t,e=C()){let o=y(t),r=K(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function yt(t,e=C()){let o=b(t.store),r=K(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function wt(t,e,o){let r=y(t),n=typeof e=="string"?e:void 0,s=(typeof e=="string"?o:e)??C(),i=b(r);if(!n){s.delete(i);return}let a=K(r,s);if(!a)return;let{[n]:m,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){s.delete(i);return}s.set(i,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}var L=class extends ue{environmentsFilename(){return ge}async command(e,o,r=!1,n,s){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:s}=await this.parse(o),i="password"in o.flags,a=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=r!==null&&r.some(u=>Array.isArray(u)?u.includes("store"):u==="store");if(a.length<=1){if(a[0]&&!s.store&&m)throw new F("Please provide a valid environment.");let u=i?await this.createSession(s):void 0,w=this.constructor.name.toLowerCase();if(U(`theme-command:${w}:single-env:authenticated`),s.path&&!_(s.path))throw new F(`Path does not exist: ${s.path}`);try{await this.command(s,u,!1,n)}finally{await this.logAnalyticsData(u)}return}if(r===null){R({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(me(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,s,c),S=await this.validateEnvironments(p,r,i);"force"in o.flags&&!s.force&&!await this.showConfirmation(this.constructor.name,r,S)||await this.runConcurrent(S.valid)}storeAuthScopes(){return[]}async loadEnvironments(e,o,r){let n=new Map;for(let s of e){let i=await ce(s,"shopify.theme.toml",{from:o.path,silent:!0});i?.store&&typeof i.store=="string"&&(i.store=y(i.store)),i?.path&&typeof i.path=="string"&&(i.path=k(i.path)),n.set(s,{flags:{...o,...i,...r,environment:[s]},validationFlags:{...i,...r}})}return n}async validateEnvironments(e,o,r){let n=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,a=Array.from(e.entries()).map(([m,{flags:c,validationFlags:p}])=>({environmentName:m,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,i)}));for(let{environmentName:m,flags:c,validationFlags:p,storeAuthSession:S}of a){let g=this.validConfig(p,o,m,S);if(g!==!0){let u=g.join(", ");s.push({environment:m,reason:`Missing flags: ${u}`});continue}n.push({environment:m,flags:c,requiresAuth:r,storeAuthSession:S})}return{valid:n,invalid:s}}async showConfirmation(e,o,r){let i={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:m,flags:c})=>{let p=o.map(S=>{let g=Array.isArray(S)?S.find(u=>c[u]):S;if(g==="password")return"password";if(g==="path"&&typeof c.path=="string"){let u=c.path.split(/[/\\]/);if(u.length===1)return`path: ${c.path}`;let w=u[0]===""?`/${u[1]}`:u[0],E=u.at(-1);return`path: ${w}/.../${E}`}return g&&`${g}: ${c[g]}`}).join(", ");return[m,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:m,reason:c})=>[m,{error:`Skipping | ${c}`}])];return i.infoTable={Environment:a},r.invalid.length>0&&(i.confirmationMessage="Proceed anyway (will skip invalid environments)"),ie(i)}async runConcurrent(e){let o=new Z,r=e.map(i=>i.flags.store),n=new Set(r),s=r.length===n.size?[e]:this.createSequentialGroups(e);for(let i of s)await se({processes:i.map(({environment:a,flags:m,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(S,g,u)=>{try{let w=m.store;await le(w,async()=>{let E=c?await this.createSession(m,p):void 0,ve=this.constructor.name.toLowerCase();U(`theme-command:${ve}:multi-env:authenticated`);try{await this.command(m,E,!0,{},{stdout:S,stderr:g})}finally{await this.logAnalyticsData(E)}})}catch(w){w instanceof Error&&(w.message=`Environment ${a} failed:
|
|
1
|
+
import{a as ce}from"./chunk-VX7XXDC2.js";import{d as de}from"./chunk-AAG2JILI.js";import{a as me,b as ue}from"./chunk-ZGI4ZRVE.js";import{F as $,O as N,a as ee,va as te,xa as U,y,ya as re}from"./chunk-MCP5CY6B.js";import{A as ie,a as Z,t as se,w as R,x as I}from"./chunk-FGYV4PZF.js";import{b as x}from"./chunk-7QMA6EVS.js";import{d as oe,e as ne}from"./chunk-MW4QZJ7O.js";import{m as F,p as ae}from"./chunk-TYCR45XU.js";import{Fa as X,Fb as q,Hb as h,Pb as A,Ua as _}from"./chunk-CUIOWLG3.js";import{d as Q,f as k,i as V,q as P}from"./chunk-773TIA5M.js";import{a as Te}from"./chunk-M5GXA5W4.js";import{e as xe,g as f}from"./chunk-VKWPEFWQ.js";f();var T=xe(Te(),1);var O={path:T.Flags.string({description:"The path where you want to run the command. Defaults to the current working directory.",env:"SHOPIFY_FLAG_PATH",parse:async t=>{let e=k(t);return _(e)?X(e)?e:(I({headline:"The path must be a directory, not a file.",body:[`The provided path is not a directory: ${e}`,`Did you mean: ${V(e)}`]}),process.exit(1)):(I({headline:"A path was explicitly provided but doesn't exist.",body:[`Please check the path and try again: ${e}`]}),process.exit(1))},default:async()=>P(),noCacheDefault:!0}),password:T.Flags.string({description:"Password generated from the Theme Access app or an Admin API token.",env:"SHOPIFY_CLI_THEME_TOKEN"}),store:T.Flags.string({char:"s",description:"Store URL. It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).",env:"SHOPIFY_FLAG_STORE",parse:async t=>y(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},pe="Wrap the value in double quotes if you're using wildcards.",Ue=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${pe}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${pe}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as Ie}from"node:async_hooks";var fe=new Ie,j,D,M,B;function l(){return j??(j=new x({projectName:"shopify-cli-theme-conf"})),j}function G(){return D??(D=new x({projectName:"shopify-cli-development-theme-config"})),D}function H(){return M??(M=new x({projectName:"shopify-cli-repl-theme-config"})),M}function z(){return B??(B=new x({projectName:"shopify-cli-theme-store-password"})),B}function Y(t=l()){return fe.getStore()?.store??t.get("themeStore")}function he(t,e=l()){e.set("themeStore",t)}function Be(t=l()){return A(h`Getting development theme...`),G().get(v(t))}function Ge(t,e=l()){A(h`Setting development theme...`),G().set(v(e),t)}function He(t=l()){A(h`Removing development theme...`),G().delete(v(t))}function ze(t=l()){return A(h`Getting REPL theme...`),H().get(v(t))}function Ye(t,e=l()){A(h`Setting REPL theme to ${t}...`),H().set(v(e),t)}function Je(t=l()){A(h`Removing REPL theme...`),H().delete(v(t))}function We(t=l()){let e=v(t);return A(h`Getting storefront password for shop ${e}...`),z().get(e)}function Ke(t,e=l()){let o=v(e);A(h`Setting storefront password for shop ${o}...`),z().set(o,t)}function Qe(t=l()){let e=v(t);A(h`Removing storefront password for ${e}...`),z().delete(e)}function v(t=l()){let e=Y(t);if(!e)throw new ae("Theme store is not set. This indicates an unexpected issue with the CLI. Please report this to the Shopify CLI team.",["It may be possible to recover by running",{command:"shopify theme list --store <store>"},"(setting the store flag to the store you wish to use) and then running the command again."]);return e}async function le(t,e){return fe.run({store:t},e)}function Se(t){let e=t.store??Y();if(!e)throw te(new F("A store is required",`Specify the store passing ${h`${q.genericShellCommand(`--${O.store.name}=example.myshopify.com`)}`.value} or set the ${h`${q.genericShellCommand(O.store.env)}`.value} environment variable.`));return he(e),e}f();f();var ge="shopify.theme.toml",it=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),at=["**/.git","**/.vscode","**/.hg","**/.bzr","**/.svn","**/_darcs","**/CVS","**/*.sublime-(project|workspace)","**/.DS_Store","**/.sass-cache","**/Thumbs.db","**/desktop.ini","**/config.yml","**/node_modules/",".prettierrc.json","**/{blocks,layout,snippets}/**/*.liquid.tmp.*","**/{config,locales}/**/*.json.tmp.*","**/{sections,templates}/**/*.{liquid,json}.tmp.*"],ct=50;f();f();var J="7e9cb568cfd431c538f36d1ad3f2b4f6";var _e="shopify-cli-store",gt=240*1e3,W;function C(){return W??(W=new x({projectName:_e})),W}function b(t){return`${J}::${Fe(t)}`}function Fe(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function be(t){if(!t||typeof t!="object")return;let e=t;if(typeof e.id=="number")return{id:e.id,...d(e.email)?{email:e.email}:{},...d(e.firstName)?{firstName:e.firstName}:{},...d(e.lastName)?{lastName:e.lastName}:{},...typeof e.accountOwner=="boolean"?{accountOwner:e.accountOwner}:{}}}function Ee(t){if(!t||typeof t!="object")return;let e=t;if(!(!d(e.shopId)||!d(e.name)||!d(e.createdAt)))return{shopId:e.shopId,name:e.name,createdAt:e.createdAt,...d(e.placeholderAccountUuid)?{placeholderAccountUuid:e.placeholderAccountUuid}:{},...d(e.country)?{country:e.country}:{},...d(e.accessUrl)?{accessUrl:e.accessUrl}:{}}}function ke(t){if(!t||typeof t!="object")return;let e=t;if(!d(e.store)||!d(e.clientId)||!d(e.userId)||!d(e.accessToken)||!Array.isArray(e.scopes)||!e.scopes.every(d)||!d(e.acquiredAt))return;let o=be(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?Ee(e.preview):void 0;if(!(r==="preview"&&!n))return{store:e.store,clientId:e.clientId,userId:e.userId,accessToken:e.accessToken,scopes:e.scopes,acquiredAt:e.acquiredAt,...d(e.refreshToken)?{refreshToken:e.refreshToken}:{},...d(e.expiresAt)?{expiresAt:e.expiresAt}:{},...d(e.refreshTokenExpiresAt)?{refreshTokenExpiresAt:e.refreshTokenExpiresAt}:{},...o?{associatedUser:o}:{},...r==="preview"?{kind:r}:{},...n?{preview:n}:{}}}function ye(t,e,o){if(!e||typeof e!="object")return;let{sessionsByUserId:r,currentUserId:n}=e;if(!(r!==void 0||n!==void 0))return;let i=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(i);return}let a=Object.fromEntries(Object.entries(r).flatMap(([m,c])=>{let p=ke(c);return p?[[m,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(i,{currentUserId:n,sessionsByUserId:a});else{o.delete(i);return}return{currentUserId:n,sessionsByUserId:a}}function K(t,e){return ye(t,e.get(b(t)),e)}function Pe(t){return t.config?.store??{}}function we(t=C()){let e=[],o=`${J}::`;for(let[r,n]of Object.entries(Pe(t))){if(!r.startsWith(o))continue;let s=ye(r.slice(o.length),n,t),i=s?.sessionsByUserId[s.currentUserId];i&&e.push(i)}return e}function Ae(t,e=C()){let o=y(t),r=K(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function yt(t,e=C()){let o=b(t.store),r=K(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function wt(t,e,o){let r=y(t),n=typeof e=="string"?e:void 0,s=(typeof e=="string"?o:e)??C(),i=b(r);if(!n){s.delete(i);return}let a=K(r,s);if(!a)return;let{[n]:m,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){s.delete(i);return}s.set(i,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}var L=class extends ue{environmentsFilename(){return ge}async command(e,o,r=!1,n,s){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:s}=await this.parse(o),i="password"in o.flags,a=(Array.isArray(s.environment)?s.environment:[s.environment]).filter(Boolean),m=r!==null&&r.some(u=>Array.isArray(u)?u.includes("store"):u==="store");if(a.length<=1){if(a[0]&&!s.store&&m)throw new F("Please provide a valid environment.");let u=i?await this.createSession(s):void 0,w=this.constructor.name.toLowerCase();if(U(`theme-command:${w}:single-env:authenticated`),s.path&&!_(s.path))throw new F(`Path does not exist: ${s.path}`);try{await this.command(s,u,!1,n)}finally{await this.logAnalyticsData(u)}return}if(r===null){R({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(me(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,s,c),S=await this.validateEnvironments(p,r,i);"force"in o.flags&&!s.force&&!await this.showConfirmation(this.constructor.name,r,S)||await this.runConcurrent(S.valid)}storeAuthScopes(){return[]}async loadEnvironments(e,o,r){let n=new Map;for(let s of e){let i=await ce(s,"shopify.theme.toml",{from:o.path,silent:!0});i?.store&&typeof i.store=="string"&&(i.store=y(i.store)),i?.path&&typeof i.path=="string"&&(i.path=k(i.path)),n.set(s,{flags:{...o,...i,...r,environment:[s]},validationFlags:{...i,...r}})}return n}async validateEnvironments(e,o,r){let n=[],s=[],i=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:m})=>m)):new Map,a=Array.from(e.entries()).map(([m,{flags:c,validationFlags:p}])=>({environmentName:m,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,i)}));for(let{environmentName:m,flags:c,validationFlags:p,storeAuthSession:S}of a){let g=this.validConfig(p,o,m,S);if(g!==!0){let u=g.join(", ");s.push({environment:m,reason:`Missing flags: ${u}`});continue}n.push({environment:m,flags:c,requiresAuth:r,storeAuthSession:S})}return{valid:n,invalid:s}}async showConfirmation(e,o,r){let i={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:m,flags:c})=>{let p=o.map(S=>{let g=Array.isArray(S)?S.find(u=>c[u]):S;if(g==="password")return"password";if(g==="path"&&typeof c.path=="string"){let u=c.path.split(/[/\\]/);if(u.length===1)return`path: ${c.path}`;let w=u[0]===""?`/${u[1]}`:u[0],E=u.at(-1);return`path: ${w}/.../${E}`}return g&&`${g}: ${c[g]}`}).join(", ");return[m,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:m,reason:c})=>[m,{error:`Skipping | ${c}`}])];return i.infoTable={Environment:a},r.invalid.length>0&&(i.confirmationMessage="Proceed anyway (will skip invalid environments)"),ie(i)}async runConcurrent(e){let o=new Z,r=e.map(i=>i.flags.store),n=new Set(r),s=r.length===n.size?[e]:this.createSequentialGroups(e);for(let i of s)await se({processes:i.map(({environment:a,flags:m,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(S,g,u)=>{try{let w=m.store;await le(w,async()=>{let E=c?await this.createSession(m,p):void 0,ve=this.constructor.name.toLowerCase();U(`theme-command:${ve}:multi-env:authenticated`);try{await this.command(m,E,!0,{},{stdout:S,stderr:g})}finally{await this.logAnalyticsData(E)}})}catch(w){w instanceof Error&&(w.message=`Environment ${a} failed:
|
|
2
2
|
|
|
3
3
|
${w.message}`,I({body:[w.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(r=>{let n=o.find(s=>!s.some(i=>i.flags.store===r.flags.store));n?n.push(r):o.push([r])}),o}async createSession(e,o){let r=Se({store:e.store}),n=e.password;return n?await N(r,n):o??await this.storeAuthSessionForTheme({store:r})??await N(r,n)}async storeAuthSessionForTheme(e){let o=typeof e.store=="string"?e.store:void 0,r=e.password;if(!o||r)return;let n=y(o),s=Ae(n);if(s)return this.adminSessionFromStoreAuthSession(s,n)}storeAuthSessionsForTheme(e){let o=new Set(e.filter(({store:r,password:n})=>typeof r=="string"&&!n).map(({store:r})=>y(r)));return o.size===0?new Map:new Map(we().map(r=>{let n=y(r.store);if(!o.has(n))return;let s=this.adminSessionFromStoreAuthSession(r,n);return s?[n,s]:void 0}).filter(r=>r!==void 0))}storeAuthSessionFromCache(e,o){let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!(!r||n))return o.get(y(r))}adminSessionFromStoreAuthSession(e,o){if(this.hasRequiredStoreAuthScopes(e.scopes))return $(e.userId),{token:e.accessToken,storeFqdn:o}}expandImpliedStoreAuthScopes(e){let o=new Set(e);for(let r of e){let n=r.match(/^(unauthenticated_)?write_(.*)$/);n&&o.add(`${n[1]??""}read_${n[2]}`)}return o}hasRequiredStoreAuthScopes(e){if(e.length===0)return!0;let o=this.expandImpliedStoreAuthScopes(e);return this.storeAuthScopes().every(r=>o.has(r))}validConfig(e,o,r,n){let s=o.filter(i=>Array.isArray(i)?!i.some(a=>this.hasRequiredFlag(e,a,n)):!this.hasRequiredFlag(e,i,n)).map(i=>Array.isArray(i)?i.join(" or "):i);return s.length>0?(R({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:s}}]}),s):!0}hasRequiredFlag(e,o,r){return o==="password"&&r?!0:!!e[o]}errorOnGlobalPath(){let e=Q(P(),"shopify.theme.toml"),o=_(e);I({body:["Can't use `--path` flag with multiple environments.",...o?["Configure each environment's theme path in your shopify.theme.toml file instead."]:["Run this command from the directory containing shopify.theme.toml.","No shopify.theme.toml found in current directory."]]})}async logAnalyticsData(e){if(!e)return;let o=re();await oe(()=>({store_fqdn_hash:ee(e.storeFqdn),store_domain:e.storeFqdn,cmd_theme_timings:JSON.stringify(o.timings),cmd_theme_errors:JSON.stringify(o.errors),cmd_theme_retries:JSON.stringify(o.retries),cmd_theme_events:JSON.stringify(o.events)})),await ne(()=>({store_fqdn:e.storeFqdn}))}};L.baseFlags=de;var jt=L;export{J as a,we as b,Ae as c,yt as d,wt as e,Y as f,Be as g,Ge as h,He as i,ze as j,Ye as k,Je as l,We as m,Ke as n,Qe as o,O as p,Ue as q,Se as r,it as s,at as t,ct as u,jt as v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ne,e as te,f as oe,g as ie}from"./chunk-
|
|
1
|
+
import{c as ne,e as te,f as oe,g as ie}from"./chunk-WQ5BPVZ5.js";import{a as Z,c as Q,d as X,e as ee}from"./chunk-KLY5BRZ2.js";import{b as I}from"./chunk-WNAIL2B2.js";import{a as J}from"./chunk-ZXAEYDNN.js";import{a as Y}from"./chunk-IQLFGDUD.js";import{E as K,H as W,Z as H,g as z,wa as q}from"./chunk-KYHMD54O.js";import{a as G}from"./chunk-33Y5T275.js";import{b as j}from"./chunk-AAG2JILI.js";import{A as B,D as N,I as $,t as O,u as U,v as A}from"./chunk-FGYV4PZF.js";import{d as L}from"./chunk-MW4QZJ7O.js";import{m as h,o as V}from"./chunk-TYCR45XU.js";import{Ca as F,Gb as S,L as R,Mb as C,Rb as k,wa as _}from"./chunk-CUIOWLG3.js";import{d as E,i as D}from"./chunk-773TIA5M.js";import{a as ue}from"./chunk-M5GXA5W4.js";import{e as ce,g}from"./chunk-VKWPEFWQ.js";g();g();g();async function ae(e){let n,t;e.bundlePath&&(n=await ee(e.developerPlatformClient,{id:e.apiKey,apiKey:e.apiKey,organizationId:e.organizationId}),await X(n,e.bundlePath));let o={appManifest:e.appManifest,appId:e.appId,apiKey:e.apiKey,name:e.name,organizationId:e.organizationId,skipPublish:!e.release,message:e.message,versionTag:e.version,commitReference:e.commitReference};n&&(o.bundleUrl=n),e.appModules.length>0&&(o.appModules=e.appModules);let s=await e.developerPlatformClient.deploy(o);if(!s.appDeploy.appVersion){let i=fe(s.appDeploy.userErrors??[],e.appModuleRegistrationIds,e.appModules,{version:e.version});throw new h({bold:"Version couldn't be created."},null,[],i)}return s.appDeploy.userErrors?.length>0&&(t=s.appDeploy.userErrors.map(i=>i.message).join(", ")),{validationErrors:s.appDeploy.appVersion.appModuleVersions.filter(i=>i.validationErrors.length>0).map(i=>({uuid:i.registrationUuid,errors:i.validationErrors})),versionTag:s.appDeploy.appVersion.versionTag,location:s.appDeploy.appVersion.location,message:s.appDeploy.appVersion.message,deployError:t}}var v=`
|
|
2
2
|
Validation errors`,T=`
|
|
3
3
|
`;function fe(e,n,t,o={}){let s=l=>l.details?.some(y=>y.extension_id)??!1,a=(l,y)=>{let x=l.details?.find(M=>typeof M.extension_id<"u")?.extension_id??"";return Object.values(y).includes(x.toString())},i=l=>{let y=l.on?l.on[0]:void 0;return t.some(x=>x.uid===y?.user_identifier)},[d,u]=I(e,l=>i(l)),[c,p]=I(u,l=>s(l)),[m,r]=I(c,l=>a(l,n));return[...me(p,{version:o.version}),...ge(m,n),...ye(r),...he(d,t)]}function me(e,n={}){return e.length>0?e.filter(t=>t.field&&t.field.includes("version_tag")&&t.message==="has already been taken").length>0&&n.version?[{body:["An app version with the name",{userInput:n.version},"already exists. Deploy again with a different version name."]}]:e.length===1?[{body:e[0]?.message??""}]:[{body:{list:{items:e.map(t=>t.message)}}}]:[]}function ge(e,n){return e.reduce((t,o)=>{let s=(o.field??["unknown"]).join(".").replace("extension_points","extensions.targeting"),a=s==="base"?o.message:`${s}: ${o.message}`,i=o.details.find(r=>typeof r.extension_title<"u")?.extension_title,d=o.details.find(r=>typeof r.specification_identifier<"u")?.specification_identifier,u=o.details.find(r=>typeof r.extension_id<"u")?.extension_id?.toString(),p=Object.keys(n).find(r=>n[r]===u)??i;d==="webhook_subscription"&&(p="Webhook Subscription");let m=t.find(r=>r.title===p);if(m){let r=m.body,f=o.category==="invalid"?r.find(l=>l.list.title===v):r.find(l=>l.list.title===T);f?f.list.items.includes(a)||f.list.items.push(a):r.push({list:{title:o.category==="invalid"?v:T,items:[a]}})}else t.push({title:p,body:[{list:{title:o.category==="invalid"?v:T,items:[a]}}]});return t.forEach(r=>{r.body.sort((f,l)=>f.list.title===v?1:l.list.title===v?-1:0)}),t},[])}function he(e,n){return e.reduce((t,o)=>{let a=(o.on?o.on[0]:void 0)?.user_identifier,i=n.find(r=>r.uid===a),d=a?`Extension with uid: ${a}`:"Unknown Extension",u=i?.handle??d,p=`${(o.field??["unknown"]).join(".")}: ${o.message}`,m=t.find(r=>r.title===u);if(m){let f=m.body.find(l=>l.list.title===v);f&&(f.list.items.includes(p)||f.list.items.push(p))}else t.push({title:u,body:[{list:{title:v,items:[p]}}]});return t},[])}function ye(e){return e.reduce((n,t)=>{let o=t.details.find(a=>typeof a.extension_title<"u")?.extension_title,s=n.find(a=>a.title===o);return s?s.errorCount+=1:n.push({title:o,errorCount:1}),n},[]).map(n=>({title:n.title,body:`
|
|
4
4
|
${n.errorCount} error${n.errorCount>1?"s":""} found in your extensions. Fix these issues and try deploying again.`}))}g();async function se(e){let n=E(e.app.directory,".shopify","deploy-bundle");await F(n,{force:!0}),await _(n),await Z(e.appManifest,n),e.skipBuild||await z(e.app);let t=e.app.allExtensions.map(s=>({prefix:s.localIdentifier,action:async(a,i,d)=>{await s.buildForBundle({stderr:i,stdout:a,signal:d,app:e.app,environment:"production",skipBuild:e.skipBuild},n)}}));if(await O({processes:t,showTimestamps:!1}),e.app.allExtensions.some(s=>s.hasDeploySteps))return await Q(n,e.bundlePath),e.bundlePath}async function we(e){let{app:n,remoteApp:t,developerPlatformClient:o,noRelease:s,allowUpdates:a,allowDeletes:i,extensions:d}=e,u=[s,a,i].some(Boolean),c=[`App can't be deployed until Partner Dashboard managed extensions are added to your version or removed from your app:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-NUCUZBO3.js";import{a as oe}from"./chunk-IV3S4JU6.js";import{a as se}from"./chunk-X2ZCC772.js";import{a as z}from"./chunk-33AVVFWW.js";import{C as X,V as ee,X as te,l as W,wa as re}from"./chunk-LANGOUPS.js";import{da as Z}from"./chunk-FDQNY7RF.js";import{b as Y,c as K}from"./chunk-BPRY3O4N.js";import{y as G}from"./chunk-OQ6WYWG4.js";import{i as H,u as Q}from"./chunk-SQVJGTTD.js";import{m as _}from"./chunk-O6BUPYXH.js";import{Lb as M,Mb as S,ca as $,eb as F,fb as f,gb as o}from"./chunk-KNLPWHHJ.js";import{j as V}from"./chunk-773TIA5M.js";import{a as _e}from"./chunk-M5GXA5W4.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var B=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new _(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await Fe({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=v)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
|
|
1
|
+
import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-Y2VJUEJJ.js";import{a as oe}from"./chunk-A3DD7GW4.js";import{a as se}from"./chunk-ZXAEYDNN.js";import{a as z}from"./chunk-IQLFGDUD.js";import{C as X,V as ee,X as te,l as W,wa as re}from"./chunk-KYHMD54O.js";import{da as Z}from"./chunk-2CUUHTG4.js";import{b as Y,c as K}from"./chunk-AAG2JILI.js";import{y as G}from"./chunk-MCP5CY6B.js";import{i as H,u as Q}from"./chunk-FGYV4PZF.js";import{m as _}from"./chunk-TYCR45XU.js";import{Lb as M,Mb as S,ca as $,eb as F,fb as f,gb as o}from"./chunk-CUIOWLG3.js";import{j as V}from"./chunk-773TIA5M.js";import{a as _e}from"./chunk-M5GXA5W4.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var B=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new _(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await Fe({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=v)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
|
|
2
2
|
`),await Se({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id}))}async function Le(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:l,organization:a}=t,p=V(s.configPath);t.format==="text"&&Pe(n.title,l.shopDomain,t.storeFqdns,p,a.businessName);let u=new Map;return u.set(l.shopId,l.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let d=await Z(a,c,i);u.set(d.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Pe(t,s,n,i,l){let a=[];n&&n.length>0?n.forEach(u=>a.push(u)):a.push(s);let p=i?W(i):void 0;Q({headline:i?`Using ${p} for default values:`:"Using these settings:",body:ee({appName:t,org:l,devStores:a,messages:[te]})})}var O=N(_e(),1);var J,I=class extends se{async run(){let{flags:s}=await this.parse(J);await X(s.path);let n=await re({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await oe({appContextResult:n,storeFqdn:s.store?.[0],forceReselectStore:s.reset}),l={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Ae(l),{app:n.app}}};J=I;I.summary="Stream detailed logs for your Shopify app.";I.descriptionWithMarkdown="\n Opens a real-time stream of detailed app logs from the selected app and store.\n Use the `--source` argument to limit output to a particular log source, such as a specific Shopify Function handle. Use the `shopify app logs sources` command to view a list of sources.\n Use the `--status` argument to filter on status, either `success` or `failure`.\n ```\n shopify app logs --status=success --source=extension.discount-function\n ```\n ";I.description=J.descriptionWithoutMarkdown();I.flags={...Y,...z,...K,store:O.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async t=>G(t)}),source:O.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:O.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};var _t=I;export{_t as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as l}from"./chunk-
|
|
1
|
+
import{h as l}from"./chunk-FNDHJQWJ.js";import{O as c}from"./chunk-MCP5CY6B.js";import{m as u}from"./chunk-TYCR45XU.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var s=["live","unpublished","development"];async function A(e,r){let t=await c(e,r);return p(t)}async function p(e){let r=e.storeFqdn,t=(await l(e)).filter(d);if(t.length===0)throw new u(`There are no themes in the ${r} store`);return t.sort(w)}function d(e){return s.includes(e.role)}function w(e,r){return s.indexOf(e.role)-s.indexOf(r.role)}i();function E(e,r,t){return y(e,r,t)??T(e,r,t)}function y(e,r,t){let o=t.role;if(!o)return;let n=`No themes on the store ${e} match the role "${o}"`;return m(r,h=>h.role===o).orThrow(n)}function T(e,r,t){return t.themeIdentifiers.flatMap(n=>{let h=`No themes on the store ${e} match the ID or name "${n}"`;return m(r,f=>`${f.id}`===n||f.name.toLowerCase()===n.toLowerCase()?!0:L(f.name.toLowerCase(),n.toLowerCase())).orThrow(h)})}function m(e,r){let t=e.filter(r);return t.length>0?{orThrow:o=>t}:{orThrow:o=>{throw new u(o)}}}var a=class{constructor(r){this.queryProps=r}get role(){for(let r of s)if(this.queryProps[r])return r}get themeIdentifiers(){return[this.queryProps.theme,this.queryProps.themes].flat().filter(t=>!!t)}any(){return Object.values(this.queryProps).some(r=>r?.length!==void 0?r.length>0:!!r)}};function L(e,r){let t=r.replace(/(^\*)|(\*$)/g,"");return r.startsWith("*")&&r.endsWith("*")?e.includes(t):r.startsWith("*")?e.endsWith(t):r.endsWith("*")?e.startsWith(t):!1}export{s as a,A as b,p as c,E as d,a as e};
|