@shopify/cli 4.7.1 → 4.8.1
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-32PK45SE.js +1 -0
- package/dist/analytics-TQHJN5PY.js +1 -0
- package/dist/assets/hydrogen/starter/AGENTS.md +5 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +9 -0
- package/dist/assets/hydrogen/starter/CLAUDE.md +1 -0
- package/dist/assets/hydrogen/starter/package.json +3 -3
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-UK4WXL4G.js → chunk-22JJHQVU.js} +1 -1
- package/dist/{chunk-ULR25PTO.js → chunk-2BHYBR2F.js} +1 -1
- package/dist/{chunk-22NROZ5X.js → chunk-2R6KOKWG.js} +46 -46
- package/dist/{chunk-3HCWJRL6.js → chunk-32IIURQB.js} +1 -1
- package/dist/{chunk-YCU7ZCIG.js → chunk-33PLVLCE.js} +1 -1
- package/dist/{chunk-RA3WWB2S.js → chunk-36OXWMXZ.js} +1 -1
- package/dist/{chunk-UZVON6GP.js → chunk-3A2HLI4D.js} +1 -1
- package/dist/{chunk-26DH5P7S.js → chunk-3ACZB27E.js} +1 -1
- package/dist/{chunk-JQUEW7CB.js → chunk-3FTP36HH.js} +1 -1
- package/dist/{chunk-4FCS6PJY.js → chunk-3GAN6KS6.js} +1 -1
- package/dist/{chunk-22NWEE5U.js → chunk-3LBHSZSR.js} +1 -1
- package/dist/chunk-3NVQXPTU.js +1 -0
- package/dist/{chunk-XMQFQUUK.js → chunk-3NYK63U4.js} +1 -1
- package/dist/{chunk-R5EGWWZH.js → chunk-3R7OHZ4C.js} +1 -1
- package/dist/{chunk-5WGT45CO.js → chunk-4ARQFW35.js} +1 -1
- package/dist/{chunk-FELV7GWY.js → chunk-4ASQQTCD.js} +1 -1
- package/dist/chunk-4IG7WG6V.js +1 -0
- package/dist/{chunk-SCXL5UQ4.js → chunk-4QAM7ROJ.js} +1 -1
- package/dist/{chunk-IENBHP2S.js → chunk-4QBJ5JBX.js} +15 -16
- package/dist/{chunk-I2LNQKIJ.js → chunk-4QXDDAMD.js} +1 -1
- package/dist/{chunk-2S3GOPRL.js → chunk-562EV2EJ.js} +1 -1
- package/dist/{chunk-AWHS336T.js → chunk-565SON6A.js} +1 -1
- package/dist/{chunk-46BKAF3F.js → chunk-5AMPXLKT.js} +1 -1
- package/dist/chunk-5CC4QYN4.js +1 -0
- package/dist/{chunk-USBP7H7J.js → chunk-5G2W7QKA.js} +1 -1
- package/dist/{chunk-U46RPVQA.js → chunk-5PWJTOWK.js} +1 -1
- package/dist/{chunk-RXUOQZ32.js → chunk-5THZTE44.js} +1 -1
- package/dist/{chunk-N4KDWHT2.js → chunk-5U4UTFA4.js} +1 -1
- package/dist/{chunk-PV6T52KB.js → chunk-6633X2JU.js} +1 -1
- package/dist/chunk-6HMTAB2V.js +2 -0
- package/dist/{chunk-U3F6GPCE.js → chunk-6JC2PM43.js} +1 -1
- package/dist/{chunk-6R62DGJG.js → chunk-6T5AZZUI.js} +1 -1
- package/dist/{chunk-J2VRPZFC.js → chunk-6U4BOZ73.js} +1 -1
- package/dist/{chunk-UZV5H2JI.js → chunk-6USL7BKQ.js} +1 -1
- package/dist/{chunk-WTES5ZXR.js → chunk-7CPYFKFK.js} +1 -1
- package/dist/{chunk-CRP4PQU2.js → chunk-7DGVNVW3.js} +1 -1
- package/dist/{chunk-3KM2GKXH.js → chunk-7DJNASBC.js} +1 -1
- package/dist/{chunk-EMETQFFJ.js → chunk-7DLMETRR.js} +1 -1
- package/dist/{chunk-JJSV7HNM.js → chunk-7JG3CKDE.js} +1 -1
- package/dist/{chunk-WR6LRE4I.js → chunk-7USNGNVI.js} +1 -1
- package/dist/{chunk-6QJIGFQJ.js → chunk-AICVQH4V.js} +1 -1
- package/dist/{chunk-PK73ZSND.js → chunk-AINDVTMY.js} +39 -39
- package/dist/{chunk-5MD7GNEY.js → chunk-AVX7CIDJ.js} +1 -1
- package/dist/chunk-AXLLN6DZ.js +2 -0
- package/dist/{chunk-WOIAYH5U.js → chunk-AXMSJ46T.js} +1 -1
- package/dist/{chunk-4FI2YBRF.js → chunk-B3I7OMRN.js} +1 -1
- package/dist/{chunk-VXX4EZ7G.js → chunk-BHDFVO2R.js} +1 -1
- package/dist/{chunk-N7425436.js → chunk-BKYTBTQ5.js} +1 -1
- package/dist/{chunk-KBBITJSF.js → chunk-BMDCOBUR.js} +1 -1
- package/dist/{chunk-KRLEEYLL.js → chunk-CKZOLGWI.js} +1 -1
- package/dist/{chunk-WXSDPMIZ.js → chunk-CSAVYME2.js} +1 -1
- package/dist/{chunk-R2RULBBV.js → chunk-D2R7HPCT.js} +1 -1
- package/dist/{chunk-RM3B7AFT.js → chunk-DQVNW6EQ.js} +1 -1
- package/dist/chunk-DS7OKDQN.js +1 -0
- package/dist/chunk-E3FZRPNL.js +1 -0
- package/dist/{chunk-HOVIGRE4.js → chunk-E7I5YT53.js} +1 -1
- package/dist/chunk-EDHR546O.js +97 -0
- package/dist/{chunk-X5JQU6T7.js → chunk-EIBQRJTQ.js} +1 -1
- package/dist/{chunk-QASOHYDS.js → chunk-F2DO3R6R.js} +1 -1
- package/dist/{chunk-CUUCRIGC.js → chunk-F5BTQI5W.js} +1 -1
- package/dist/{chunk-7EUIO4ZO.js → chunk-FH36PGZH.js} +12 -12
- package/dist/{chunk-YFKEESYB.js → chunk-FM6VJLE7.js} +1 -1
- package/dist/{chunk-I6XH7XDX.js → chunk-FZUPL5YO.js} +1 -1
- package/dist/{chunk-5JW4JQWZ.js → chunk-GCTCRKET.js} +1 -1
- package/dist/{chunk-ZULQKYJ6.js → chunk-GTIBT4V6.js} +1 -1
- package/dist/{chunk-6ELAWKMY.js → chunk-GVEJO3WM.js} +1 -1
- package/dist/{chunk-HQUWYKSJ.js → chunk-GYFRTLML.js} +2 -2
- package/dist/{chunk-P5OQUFH6.js → chunk-GZEPWYMP.js} +1 -1
- package/dist/{chunk-OF6CV5R4.js → chunk-H6HILX7D.js} +1 -1
- package/dist/chunk-H7IQZNKR.js +1 -0
- package/dist/{chunk-ZBSC2KZ7.js → chunk-HEIZ3RSD.js} +1 -1
- package/dist/{chunk-3WV7DQMM.js → chunk-HEWKCSY7.js} +3 -3
- package/dist/{chunk-HRHNJFAA.js → chunk-HFRWZQOF.js} +1 -1
- package/dist/{chunk-PU3NATV4.js → chunk-HKSRCMQ7.js} +1 -1
- package/dist/{chunk-PEHLR7XP.js → chunk-HZDEDEAS.js} +1 -1
- package/dist/{chunk-RY4YUBG3.js → chunk-ILHEVBNU.js} +1 -1
- package/dist/chunk-IMSPA67L.js +5 -0
- package/dist/chunk-IPSY5EEL.js +1 -0
- package/dist/{chunk-IF6EYTHG.js → chunk-J3PS4JF2.js} +2 -2
- package/dist/{chunk-7S73765P.js → chunk-JDEOBIXA.js} +1 -1
- package/dist/{chunk-GW4JHUIA.js → chunk-JLR6X5NA.js} +1 -1
- package/dist/{chunk-6G5TDB45.js → chunk-JVXKDM2E.js} +1 -1
- package/dist/{chunk-NSZHEXZK.js → chunk-KAAC4VIW.js} +1 -1
- package/dist/{chunk-K3VLFPPI.js → chunk-KEUMU5TQ.js} +1 -1
- package/dist/{chunk-3MN3WLA2.js → chunk-KPJRLS53.js} +1 -1
- package/dist/{chunk-2F2DXTRI.js → chunk-L6OBJDYK.js} +1 -1
- package/dist/{chunk-XMJFT4WP.js → chunk-LC2BDU4B.js} +1 -1
- package/dist/{chunk-O4G6TE26.js → chunk-LEPENRGG.js} +1 -1
- package/dist/{chunk-QHLY2IID.js → chunk-LH7KQZDD.js} +1 -1
- package/dist/{chunk-WSCSFFLH.js → chunk-LIH7CQO7.js} +2 -2
- package/dist/chunk-LJO22Z6S.js +1 -0
- package/dist/{chunk-JNIPCLAF.js → chunk-LQGF3RKX.js} +1 -1
- package/dist/chunk-LTRJWOI6.js +11 -0
- package/dist/chunk-MA6QRENS.js +1 -0
- package/dist/chunk-MNTJZ6JO.js +15 -0
- package/dist/chunk-NQRSFMS7.js +273 -0
- package/dist/chunk-NV4SPMQS.js +1 -0
- package/dist/{chunk-7JIYJMRN.js → chunk-O2X6EVXQ.js} +1 -1
- package/dist/chunk-OBRMBYTG.js +1 -0
- package/dist/{chunk-OJSJWGP2.js → chunk-ODFOSJU3.js} +1 -1
- package/dist/{chunk-LKZQSER3.js → chunk-OJE7S6D4.js} +1 -1
- package/dist/{chunk-VXYABRFY.js → chunk-OTVZU5AQ.js} +1 -1
- package/dist/{chunk-27UEK3FU.js → chunk-OYFNB5RY.js} +1 -1
- package/dist/{chunk-SJGPJDGH.js → chunk-PCL4UWAE.js} +1 -1
- package/dist/{chunk-MTTBBZSR.js → chunk-PGBXHL2G.js} +1 -1
- package/dist/{chunk-KNVHXIEB.js → chunk-PJTRZSH4.js} +1 -1
- package/dist/{chunk-Y6UZW73M.js → chunk-PPC3RJDZ.js} +1 -1
- package/dist/{chunk-O4RHWBBM.js → chunk-PROWADZL.js} +1 -1
- package/dist/{chunk-PQG7XSQP.js → chunk-PSH4QKUX.js} +1 -1
- package/dist/chunk-PSUNX2YX.js +1 -0
- package/dist/{chunk-AIA7JVSJ.js → chunk-PSYQTFPK.js} +1 -1
- package/dist/{chunk-WMZS3Y4Z.js → chunk-PVZE65R7.js} +1 -1
- package/dist/{chunk-77AC3OJQ.js → chunk-QH7QOLZK.js} +1 -1
- package/dist/{chunk-XTXYS7LB.js → chunk-QMYCJ2TM.js} +1 -1
- package/dist/{chunk-O53YIDJL.js → chunk-QPT6DUMC.js} +1 -1
- package/dist/{chunk-IQT6LOA2.js → chunk-R4YJM7KY.js} +1 -1
- package/dist/{chunk-LBREJXT6.js → chunk-RAOMLN5A.js} +1 -1
- package/dist/{chunk-HU4GFVEN.js → chunk-RHJLAYNK.js} +1 -1
- package/dist/{chunk-SGIMJQEM.js → chunk-RNFZJQVV.js} +1 -1
- package/dist/{chunk-UAJBQEGE.js → chunk-RRQYOGEA.js} +1 -1
- package/dist/{chunk-DMFEYI4G.js → chunk-S5FGFQHD.js} +1 -1
- package/dist/chunk-SAKMJGXL.js +2 -0
- package/dist/{chunk-P5WLH64A.js → chunk-SEGZQCXZ.js} +1 -1
- package/dist/{chunk-EWS2RNM6.js → chunk-SIVRBIKH.js} +1 -1
- package/dist/chunk-T24RA3WI.js +1 -0
- package/dist/{chunk-JNVCCE6M.js → chunk-T74ECTO7.js} +1 -1
- package/dist/{chunk-SYF6LGQB.js → chunk-TBEG57SV.js} +1 -1
- package/dist/{chunk-DLSUDLXD.js → chunk-TCP4OG3D.js} +1 -1
- package/dist/{chunk-RY4MPX5A.js → chunk-TQNGFSCI.js} +1 -1
- package/dist/{chunk-HCQABTQL.js → chunk-TVQVZHNP.js} +1 -1
- package/dist/chunk-U42P3F7Y.js +1 -0
- package/dist/{chunk-ZDDLEFVO.js → chunk-U63A4OUA.js} +1 -1
- package/dist/{chunk-KT5MDCII.js → chunk-U7ELUEH2.js} +1 -1
- package/dist/{chunk-KDBKEVCF.js → chunk-UBJYXNCN.js} +1 -1
- package/dist/{chunk-53IU36CL.js → chunk-UBX3HUMH.js} +1 -1
- package/dist/{chunk-4WGJUVXS.js → chunk-UCJ3NHJH.js} +3 -3
- package/dist/{chunk-GJ4A4QKE.js → chunk-UMZG254H.js} +1 -1
- package/dist/{chunk-VPY47DBW.js → chunk-UPTF2HK6.js} +1 -1
- package/dist/{chunk-WEWLPJK2.js → chunk-UXL2A5UK.js} +1 -1
- package/dist/chunk-V6UCVTJT.js +7 -0
- package/dist/{chunk-4VJ6YK7U.js → chunk-VFQW2QL2.js} +1 -1
- package/dist/{chunk-EULSSTWY.js → chunk-VM6EBNGR.js} +1 -1
- package/dist/chunk-VPRDI4TT.js +5 -0
- package/dist/{chunk-6K3AJTNO.js → chunk-VRO6QBVN.js} +1 -1
- package/dist/{chunk-LKQ3EJ6Z.js → chunk-WIBPVYPN.js} +1 -1
- package/dist/{chunk-IX4IGE5H.js → chunk-WJEVB67Y.js} +1 -1
- package/dist/chunk-WLGEAJBU.js +1705 -0
- package/dist/chunk-WSJ5PUK6.js +3 -0
- package/dist/chunk-WT2KJHUO.js +2 -0
- package/dist/{chunk-MK7MOLLI.js → chunk-WVQZOLZJ.js} +1 -1
- package/dist/chunk-X3KYRBGE.js +560 -0
- package/dist/{chunk-Z66ZSXKB.js → chunk-X4JCATEE.js} +1 -1
- package/dist/{chunk-IA3XNJ56.js → chunk-XH66VYZA.js} +1 -1
- package/dist/{chunk-PS2UVFHP.js → chunk-XNKAPGJD.js} +1 -1
- package/dist/chunk-XNP7PMGC.js +6 -0
- package/dist/{chunk-CNMJ6QXM.js → chunk-XRVMKP53.js} +3 -3
- package/dist/{chunk-YXDIHVPY.js → chunk-XSUX2XAW.js} +1 -1
- package/dist/{chunk-PE4TV5IJ.js → chunk-XZUL2HVC.js} +1 -1
- package/dist/{chunk-AFT6ABDE.js → chunk-Y6DYQWQK.js} +1 -1
- package/dist/{chunk-GFWXVO72.js → chunk-YAA7OGRM.js} +114 -114
- package/dist/{chunk-ELSDVDT7.js → chunk-YMS6RVE5.js} +1 -1
- package/dist/{chunk-VRH3HWYA.js → chunk-YUNINHOR.js} +1 -1
- package/dist/{chunk-QT367CYF.js → chunk-YY2JHCIG.js} +1 -1
- package/dist/chunk-YZKBG7UZ.js +3 -0
- package/dist/chunk-ZJ6DWT36.js +3 -0
- package/dist/{chunk-S2WUVD7V.js → chunk-ZLMXR2XV.js} +1 -1
- package/dist/{chunk-K63FW7Q7.js → chunk-ZYEGQSF5.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/doctor/instructions.js +1 -0
- package/dist/cli/commands/app/doctor.js +1 -0
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -0
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -0
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-QQ4DOFI3.js → conf-store-K65PEQF6.js} +1 -1
- package/dist/configs/all.yml +60 -0
- package/dist/configs/recommended.yml +60 -0
- package/dist/data/filters.json +31 -2
- package/dist/data/setting.json +129 -4
- package/dist/data/shopify_system_translations.json +154 -13
- package/dist/{deprecations-43ZQ5RCE.js → deprecations-2SG4PB2W.js} +1 -1
- package/dist/dist-L4A3SGNF.js +1 -0
- package/dist/dist-XXCZFNRC.js +1 -0
- package/dist/environments-B4OWPMPR.js +1 -0
- package/dist/{error-26WTDNKZ.js → error-5YQYW3V2.js} +1 -1
- package/dist/error-handler-3PBXTHYY.js +1 -0
- package/dist/{fs-Y7I3Y5IR.js → fs-FM6YDE2U.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 +14 -16
- package/dist/{is-global-WBIBPIVZ.js → is-global-3FFDTC2G.js} +1 -1
- package/dist/{local-HF4T3FFE.js → local-W73VIWHZ.js} +1 -1
- package/dist/{metadata-CSQPNQP2.js → metadata-OGQEI47Y.js} +1 -1
- package/dist/{node-package-manager-CVEU22N7.js → node-package-manager-GSHLPD5X.js} +1 -1
- package/dist/notifications-system-HQNQUKLF.js +1 -0
- package/dist/os-6HP4QG7V.js +1 -0
- package/dist/{output-E6OGPGXL.js → output-MG7RJ37P.js} +1 -1
- package/dist/{prettier-RVUAAWC7.js → prettier-EGVCP5CY.js} +1 -1
- package/dist/{system-ZETSJRKS.js → system-3HTWCGQH.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-7TVGGEWJ.js → ui-T22J7MQF.js} +1 -1
- package/dist/upgrade-FZ35KTBW.js +1 -0
- package/dist/{version-DL4Y6DRX.js → version-KWF3XRSN.js} +1 -1
- package/dist/version-LJOGYA5H.js +1 -0
- package/dist/{workerd-EHI5ZCEV.js → workerd-RB5ZS43X.js} +1 -1
- package/oclif.manifest.json +903 -133
- package/package.json +9 -8
- package/dist/analytics-5SII3GTA.js +0 -1
- package/dist/analytics-F56E2NGH.js +0 -1
- package/dist/chunk-4I7TUB3K.js +0 -1
- package/dist/chunk-4NXLDIW5.js +0 -1
- package/dist/chunk-5QZHJCZM.js +0 -1
- package/dist/chunk-6AV6GX5W.js +0 -2
- package/dist/chunk-6SM4RY3I.js +0 -5
- package/dist/chunk-76NEIDP5.js +0 -1
- package/dist/chunk-BI7LE6CZ.js +0 -1
- package/dist/chunk-DEMZRLX5.js +0 -7
- package/dist/chunk-ESPT6CGE.js +0 -1
- package/dist/chunk-FAXNGDWI.js +0 -11
- package/dist/chunk-FQQXU5IN.js +0 -2
- package/dist/chunk-GXOFJIKQ.js +0 -559
- package/dist/chunk-M5Q74UZM.js +0 -3
- package/dist/chunk-OQWMCJLY.js +0 -3
- package/dist/chunk-SPE2D366.js +0 -16
- package/dist/chunk-TP4Z5OZT.js +0 -1382
- package/dist/chunk-VI5FF6SW.js +0 -1
- package/dist/dist-E7EGYE4D.js +0 -1
- package/dist/dist-WRUROUNV.js +0 -1
- package/dist/environments-RG64VB5R.js +0 -1
- package/dist/error-handler-XFH47Y75.js +0 -1
- package/dist/notifications-system-L3FMN6EX.js +0 -1
- package/dist/os-VLZLRAHR.js +0 -1
- package/dist/upgrade-F77O4ZDT.js +0 -1
- package/dist/version-3L3ANUTL.js +0 -1
- /package/dist/{chunk-NJPL5BTN.js → chunk-YLQ3LNNY.js} +0 -0
- /package/dist/{morph-77RHJICZ.js → morph-BMYYMQNX.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as i}from"./chunk-WT2KJHUO.js";import{d as r}from"./chunk-WJEVB67Y.js";import{b as t}from"./chunk-HEWKCSY7.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var e=class extends t{static baseFlags=r;environmentsFilename(){return i.appEnvironments}};export{e as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./chunk-
|
|
1
|
+
import{b as a}from"./chunk-6T5AZZUI.js";import{b as s}from"./chunk-HEWKCSY7.js";import{Ia as i}from"./chunk-AINDVTMY.js";import{a as m}from"./chunk-CTNBSUVU.js";import{e as d,g as e}from"./chunk-VKWPEFWQ.js";e();var n=d(m(),1);var t=class c extends s{static description="List current notifications configured for the CLI.";static hidden=!0;static flags={"ignore-errors":n.Flags.boolean({hidden:!1,description:"Don't fail if an error occurs.",env:"SHOPIFY_FLAG_IGNORE_ERRORS"})};async run(){let{flags:f}=await this.parse(c);try{await a()}catch(r){let o="Error fetching notifications";if(r instanceof Error&&(o=o.concat(`: ${r.message}`)),await i(o,"expected_error"),!f["ignore-errors"])throw r}}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-HZDEDEAS.js";import{a as _,c as b}from"./chunk-SEGZQCXZ.js";import{a as h,b as I}from"./chunk-UXL2A5UK.js";import{e as y,q as F}from"./chunk-ZYEGQSF5.js";import{i as w,p as g,v as T}from"./chunk-7DJNASBC.js";import{b as u,f as v}from"./chunk-WJEVB67Y.js";import{E as p,z as d}from"./chunk-LIH7CQO7.js";import{a as C}from"./chunk-CTNBSUVU.js";import{U as c}from"./chunk-GYFRTLML.js";import{e as E,g as a}from"./chunk-VKWPEFWQ.js";a();a();async function O(t,e,r){let n=e.themes;e.development&&(n=[(await new D(t).find()).id.toString()]);let m=t.storeFqdn,i=await L(t,{...e,themes:n,development:!1});if(!e.force&&!r&&!await M(i,m))return;await Promise.all(i.map(o=>(y(o)&&w(),F(o.id,t))));let l=e.environment?[{subdued:`Environment: ${e.environment}
|
|
2
2
|
|
|
3
3
|
`}]:[];d({body:c(i,o=>[...l,`The following themes were deleted from ${m}:`,I(o)],o=>[...l,"The theme",...h(o),`was deleted from ${m}.`])})}async function L(t,e){if(e.selectTheme||e.themes.length>0)return b(t,e);let r=t.storeFqdn;return[await _(t,{header:`Select a theme to delete from ${r}`,filter:{development:e.development}})]}async function M(t,e){let n={message:c(t,m=>[`Delete the following themes from ${e}?`],m=>["Delete",...h(m),`from ${e}?`]),confirmationMessage:"Yes, confirm changes",cancellationMessage:"Cancel"};return t.length>1&&(n.infoTable={"":t.map(h)}),p(n)}var s=E(C(),1);var f=class extends T{static summary="Delete remote themes from the connected store. This command can't be undone.";static descriptionWithMarkdown=`Deletes a theme from your store.
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as p}from"./chunk-VPRDI4TT.js";import{a as r,b as c}from"./chunk-H7IQZNKR.js";import{d as s}from"./chunk-EDHR546O.js";import{a}from"./chunk-3NVQXPTU.js";import{wa as n}from"./chunk-YAA7OGRM.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var t=class d extends a{static hidden=!0;static summary="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.";static descriptionWithMarkdown="Schedules manual-billing subscriptions to migrate to Shopify-managed app pricing.\n\nWhen `--input` is omitted, the command reads CSV data from stdin. Use `--input <path>` to read from a file. `--input -` is also supported as an explicit stdin path.\n\n- Required CSV columns: `shop_id`, `target_plan_handle`, and `price_behavior`.\n- Optional CSV column: `notification`.\n- Example header: `shop_id,target_plan_handle,price_behavior,notification`.\n- Example row: `123456789,pro,HONOR_BILLING_PRICE,WHEN_REQUIRED`.\n\n`price_behavior` must be `HONOR_BILLING_PRICE` or `PLAN_PRICE`. `notification` can be `OPT_OUT` or `WHEN_REQUIRED` and defaults to `WHEN_REQUIRED` when omitted or blank.\n\nValidation is atomic: the command submits no operations unless the entire CSV is valid. Valid rows are submitted in batches of 250 shops. Preserve every operation GID printed by the command so you can check or cancel the submitted operations.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.\n\nUse `--force` to skip confirmation and immediately submit every valid row. With `--watch`, human-readable output shows accepted identifiers before polling begins, then displays operation progress and the final outcome. With `--json --watch`, the command outputs one structured JSON document after every operation reaches a terminal status.";static description=this.descriptionWithoutMarkdown();static examples=["<%= config.bin %> <%= command.id %> --input migrations.csv --force","cat migrations.csv | <%= config.bin %> <%= command.id %> --force","<%= config.bin %> <%= command.id %> --input migrations.csv --path ../my-app --config staging --force --json","<%= config.bin %> <%= command.id %> --input migrations.csv --client-id <client-id> --force","<%= config.bin %> <%= command.id %> --input - --force --watch"];static flags={...s};async run(){let{flags:i}=await this.parse(d),{app:m,remoteApp:l}=await n({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),u=await p({action:"schedule",input:i.input??"-",clientId:l.apiKey,skipConfirmation:i.force,watch:i.watch,...i.watch&&!i.json?{onSubmissionAccepted:r}:{}}),e=c(u,{json:i.json,watch:i.watch});return e!==0&&(process.exitCode=e),{app:m}}};export{t as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-3ACZB27E.js";import{p as m,v as a}from"./chunk-7DJNASBC.js";import{b as n}from"./chunk-WJEVB67Y.js";import{xa as t}from"./chunk-AINDVTMY.js";import{a as w}from"./chunk-CTNBSUVU.js";import{S as s}from"./chunk-GYFRTLML.js";import{e as u,g as i}from"./chunk-VKWPEFWQ.js";i();var r=u(w(),1);var o=class extends a{static summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";static descriptionWithMarkdown=`Uploads your theme as a new, unpublished theme in your theme library. The theme is given a randomized name.
|
|
2
2
|
|
|
3
3
|
This command returns a [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with others.`;static description=this.descriptionWithoutMarkdown();static flags={...n,...m,force:r.Flags.boolean({hidden:!0,char:"f",description:"Proceed without confirmation, if current directory does not seem to be theme directory.",env:"SHOPIFY_FLAG_FORCE"}),listing:r.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"})};static multiEnvironmentsFlags=["store","password","path"];async command(e,d,p,g,c){let l={environment:e.environment,force:e.force,noColor:e["no-color"],password:e.password,path:e.path,store:e.store,theme:s("creative"),unpublished:!0,listing:e.listing};t("theme-command:share"),await h(l,d,p,c),t("theme-command:share")}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as f,c as r,d as h}from"./chunk-
|
|
1
|
+
import{b as f,c as r,d as h}from"./chunk-3NYK63U4.js";import{a as l}from"./chunk-3NVQXPTU.js";import{a as c}from"./chunk-36OXWMXZ.js";import{wa as m}from"./chunk-YAA7OGRM.js";import{b as d}from"./chunk-WJEVB67Y.js";import{xb as e}from"./chunk-GYFRTLML.js";import{i as n}from"./chunk-B4OMIONW.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();var s=class g extends l{static summary="Watch and prints out changes to an app.";static hidden=!0;static flags={...d,...c};async run(){let{flags:t}=await this.parse(g),{app:o}=await m({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),i=new h(o);return await i.start(),e(`Watching for changes in ${o.name}...`),i.onEvent(async({app:y,extensionEvents:u,startTime:w,path:x})=>{e(`\u{1F195} Event [${f(w)}ms]`),e(` \u{1F4C2} ${x}`),u.forEach(a=>{switch(a.type){case r.Created:e(` \u2705 Extension created - ${n.green(a.extension.handle)}`);break;case r.Deleted:e(` \u274C Extension deleted: ${n.red(a.extension.handle)}`);break;case r.Updated:e(` \u{1F504} Updated: ${n.yellow(a.extension.handle)}`);break}})}),setInterval(()=>{},1<<30),{app:o}}};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-MA6QRENS.js";import{a as y}from"./chunk-HEIZ3RSD.js";import{a as h}from"./chunk-36OXWMXZ.js";import{g,xa as b}from"./chunk-YAA7OGRM.js";import{b as u}from"./chunk-WJEVB67Y.js";import{S as f,x as d,z as m}from"./chunk-LIH7CQO7.js";import{d as l}from"./chunk-VRO6QBVN.js";import{a as A}from"./chunk-CTNBSUVU.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();s();async function p(e,{web:i,stdout:t,stderr:a,signal:n,env:o={}}){let c=i.configuration.commands[e];if(!c)return;let[I,...v]=c.split(" ");await f(I,v,{cwd:i.directory,stdout:t,stderr:a,signal:n,env:o}),t.write("Web successfully built.")}async function S(e){!e.skipDependenciesInstallation&&!e.project.usesWorkspaces&&await y(e.project);let i={};e.apiKey&&(i.SHOPIFY_API_KEY=e.apiKey),await g(e.app),await d({processes:[...e.app.webs.map(t=>({prefix:["web",...t.configuration.roles].join("-"),action:async(a,n,o)=>{await p("build",{web:t,stdout:a,stderr:n,signal:o,env:i})}})),...e.app.allExtensions.map(t=>({prefix:t.localIdentifier,action:async(a,n,o)=>{await t.build({stdout:a,stderr:n,signal:o,app:e.app,environment:"production"})}}))],showTimestamps:!1}),m({headline:[{userInput:e.app.name},"built!"]})}var k=S;var x=_(A(),1);var r=class e extends w{static summary="Build the app, including extensions.";static descriptionWithMarkdown="This command executes the build script specified in the element's TOML file. You can specify a custom script in the file. To learn about configuration files in Shopify apps, refer to [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration).\n\n If you're building a [theme app extension](https://shopify.dev/docs/apps/online-store/theme-app-extensions), then running the `build` command runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) against your extension to ensure that it's valid.";static description=this.descriptionWithoutMarkdown();static flags={...u,...h,"skip-dependencies-installation":x.Flags.boolean({hidden:!1,description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1})};async run(){let{flags:i}=await this.parse(e),t=i["client-id"];await l(()=>({cmd_app_dependency_installation_skipped:i["skip-dependencies-installation"]}));let{app:a,project:n}=await b({directory:i.path,userProvidedConfigName:i.config});return await k({app:a,project:n,skipDependenciesInstallation:i["skip-dependencies-installation"],apiKey:t}),{app:a}}};export{r as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as i}from"./chunk-
|
|
1
|
+
import{O as i}from"./chunk-LIH7CQO7.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 +1 @@
|
|
|
1
|
-
import{c as u}from"./chunk-
|
|
1
|
+
import{c as u}from"./chunk-AXLLN6DZ.js";import{A as c}from"./chunk-LIH7CQO7.js";import{e as s}from"./chunk-VRO6QBVN.js";import{$a as d}from"./chunk-GYFRTLML.js";import{q as m}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();function o(e,n){n||c(e)}async function P(e,n,t){let r=await l(n,t);if(!r){o({body:"Environment file not found."},t?.silent);return}let a=(await u.read(r)).content.environments;if(!a){o({body:["No environments found in",{command:r},{char:"."}]},t?.silent);return}let i=a[e];if(!i){o({body:["Environment",{command:e},"not found."]},t?.silent);return}return await s(()=>({environmentFlags:JSON.stringify(i)})),i}async function l(e,n){let t=n?.from&&n.from!=="."?n.from:m();return d(e,{cwd:t,type:"file"})}export{P as a,l as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{W as X,ca as z,da as j,ea as v,fa as J,ga as A,ha as W,ia as k,ja as q,ka as N,la as B,ma as L,na as K,oa as R,pa as Q}from"./chunk-YAA7OGRM.js";import{c as H}from"./chunk-AXLLN6DZ.js";import{b as T,e as G,m as l}from"./chunk-WT2KJHUO.js";import{D as x,z as U}from"./chunk-LIH7CQO7.js";import{h as C,j as P}from"./chunk-PSUNX2YX.js";import{Ta as V,X as c,_ as b,qa as F,sb as $,wa as I,ya as D}from"./chunk-GYFRTLML.js";import{d as E,j as M}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function Y(e){switch(e){case d.Offsite:return v;case d.CreditCard:return L;case d.CustomCreditCard:return N;case d.CustomOnsite:return k;case d.Redeemable:return A;case d.CardPresent:return R}}var d;(function(e){e.Offsite="payments_app",e.CreditCard="payments_app_credit_card",e.CustomCreditCard="payments_app_custom_credit_card",e.CustomOnsite="payments_app_custom_onsite",e.Redeemable="payments_app_redeemable",e.CardPresent="payments_app_card_present"})(d||(d={}));function Z(e,t){let i=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);switch(i){case v:return w(e,t,J);case L:return w(e,t,K);case N:return w(e,t,B);case k:return w(e,t,q);case A:return w(e,t,W);case R:return w(e,t,Q);default:throw new Error(`Unsupported extension: ${i}`)}}function w(e,t,i){let n=(e.activeVersion??e.draftVersion)?.config;if(!n)throw new Error("No config found for extension");let r=JSON.parse(n),p=i(r,t);p&&delete p.api_version;let a=e.activeVersion?.context??e.draftVersion?.context??Y(e.type);return{api_version:r.api_version,extensions:[{name:e.title,type:"payments_extension",handle:c(e.title.substring(0,l)),...p,targeting:[{target:`${a}`}]}]}}s();s();var pe=new Map(j.map(e=>[e[1],e[0]])),fe=(e,t)=>{let i=pe.get(e.uiType);if(!i)throw new C(`Field type ${e.uiType} is not supported`);let o={key:e.name,description:e.description??void 0,type:i};return t==="flow_action_definition"&&(o.name=e.label,o.required=e.required),o},ue=(e,t)=>{let n={type:t==="flow_action_definition"?`${e.name.replace("_id","")}_reference`:`${e.uiType}_reference`};return t==="flow_action_definition"&&(n.required=e.required),e.uiType==="marketing-activity-id"&&(n.marketingActivityCreateUrl=e.marketingActivityCreateUrl,n.marketingActivityDeleteUrl=e.marketingActivityDeleteUrl),n},ee=(e,t)=>t?t.map(o=>o.uiType==="commerce-object-id"||o.uiType==="marketing-activity-id"||z.includes(o.uiType)?ue(o,e):fe(o,e)):[];function te(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=e.type==="flow_action_definition"?"https://url.com/api/execute":void 0,o;if(e.type==="flow_trigger_discovery_webhook"){let n=JSON.parse(t);o={extensions:[{type:"flow_trigger_lifecycle_callback",name:e.title,handle:c(e.title.substring(0,l)),url:n.url}]}}else{let n=JSON.parse(t),r=ee(e.type,n.fields??[]);o={extensions:[{type:e.type.replace("_definition",""),name:n.title,handle:c(e.title.substring(0,l)),description:n.description,runtime_url:n.url??i,config_page_url:n.custom_configuration_page_url,config_page_preview_url:n.custom_configuration_page_preview_url,validation_url:n.validation_url}],settings:(r?.length??0)>0?{fields:r}:void 0}}return o}s();s();var ie=e=>{let t=e.split("#");if(t.length!==2||t.some(p=>p===""||p===void 0))throw new Error("Invalid context");let i="admin",o=de(t[0]??""),n=me(t[1]??""),r="link";return n==="selection"?[i,`${o}-index`,`${n}-action`,r].join("."):[i,`${o}-${n}`,"action",r].join(".")},me=e=>{switch(e.toLocaleLowerCase()){case"show":return"details";case"index":return"index";case"action":return"selection";case"fulfilled_card":return"fulfilled-card";default:throw new Error(`Invalid context location: ${e}`)}},de=e=>e.toLocaleLowerCase()==="variants"?"product-variant":b(e.toLocaleLowerCase().replace(new RegExp("(s)$"),""));function ne(e,t,i){let o=e.activeVersion?.config??e.draftVersion?.config;if(!o)throw new Error("No config found for extension");let n=e.activeVersion?.context??e.draftVersion?.context;if(!n)throw new Error("No context found for link extension");let r=JSON.parse(o);if(i.embedded)try{let a=new URL(r.url),_=a.pathname.startsWith("/")?a.pathname.substring(1):a.pathname,u=new URL(`app://${_}`);u.search=a.search,u.hash=a.hash,r.url=u.toString()}catch{}return{extensions:[{type:"admin_link",name:r.text,handle:c(e.title.substring(0,l)),targeting:[{url:r.url,target:ie(n)}]}]}}s();var ge={facebook:"social",instagram:"social",google:"search",pinterest:"social",bing:"search",email:"email",snapchat:"social",sms:"sms",verizon_media:"display",ebay:"marketplace",tiktok:"social",flow:"email"},_e={facebook:"facebook.com",instagram:"instagram.com",google:"google.com",pinterest:"pinterest.com",bing:"bing.com",snapchat:"snapchat.com",verizon_media:null,email:null,sms:null,ebay:"ebay.com",tiktok:"tiktok.com",flow:null};function ye(e){let t=new URL(e);return t.pathname+t.search+t.hash}function oe(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"marketing_activity",name:e.title,handle:c(e.title.substring(0,l)),title:i.title,description:i.description,api_path:ye(i.app_api_url),tactic:i.tactic,marketing_channel:ge[i.platform]??"",referring_domain:_e[i.platform]??"",is_automation:i.is_automation,use_external_editor:i.use_external_editor,preview_data:i.preview_data,fields:i.fields.map(({id:n,...r})=>r)}]}}s();function re(e){let t=e.activeVersion?.config??e.draftVersion?.config;if(!t)throw new Error("No config found for extension");let i=JSON.parse(t);return{extensions:[{type:"subscription_link_extension",name:e.title,handle:c(e.title.substring(0,l)),pattern:i.pattern}]}}var O=[{label:"Payments Extensions",value:"payments",extensionTypes:["payments_app","payments_app_credit_card","payments_app_custom_credit_card","payments_app_custom_onsite","payments_app_redeemable","payments_extension"],buildExtensionConfig:Z},{label:"Flow Extensions",value:"flow",extensionTypes:["flow_action_definition","flow_trigger_definition","flow_trigger_discovery_webhook"],buildExtensionConfig:te},{label:"Marketing Activity Extensions",value:"marketing activity",extensionTypes:["marketing_activity_extension"],buildExtensionConfig:oe},{label:"Subscription Link Extensions",value:"subscription link",extensionTypes:["subscription_link","subscription_link_extension"],buildExtensionConfig:re},{label:"Admin Link extensions",value:"link extension",extensionTypes:["app_link","bulk_action"],buildExtensionConfig:ne}];function se(e){return O.filter(t=>t.extensionTypes.some(i=>e.some(o=>o.type.toLowerCase()===i.toLowerCase())))}async function ft(e){if(e.length===1&&e[0])return e[0];let t=e.map(n=>({label:n.label,value:n.value})),i=await x({message:"Extension type to migrate",choices:t}),o=e.find(n=>n.value===i);if(o===void 0)throw new C("Invalid migration choice");return o}s();var vt=O.flatMap(e=>e.extensionTypes),g;(function(e){e.Write="write",e.Skip="skip",e.Cancel="cancel"})(g||(g={}));async function Ee({name:e,app:t}){let i=b(e),o=E(t.directory,G.extensions.directoryName,i);if(await V(o)){let n=[{label:"Overwrite local TOML with remote configuration",value:g.Write},{label:"Keep local TOML",value:g.Skip},{label:"Cancel",value:g.Cancel}],r=await x({message:`Directory "${i}" already exists. What would you like to do?`,choices:n});if(r===g.Cancel)throw new P;return{directory:o,action:r}}return await I(o),await F(E(o,T.lockFile)),{directory:o,action:g.Write}}async function Ce(e){let{app:t,remoteApp:i,extensionTypes:o,extensions:n,buildExtensionConfig:r,all:p}=e,a=n.filter(f=>o.includes(f.type.toLowerCase()));if(a=we(t,a),a.length===0)throw new C("No extensions to migrate");if(!p){let f=a.map(y=>({label:y.title,value:y.uuid}));a.length>1&&f.push({label:"All",value:"All"});let m=await x({message:"Extensions to migrate",choices:f});m!=="All"&&(a=[a.find(y=>y?.uuid===m)])}let _={},u=a.map(async f=>{let{directory:m,action:y}=await Ee({app:t,name:f.title}),ae=c(f.title.substring(0,l));if(_[ae]=f.uuid,y===g.Write){let S=r(f,n,t.configuration),ce=E(m,"shopify.extension.toml");await new H(ce,S).replace(S);let le=E(m,T.lockFile);await D(le)}return{extension:f,directory:E("extensions",M(m))}}),h=await Promise.all(u);xe(h),await X({app:t,appApiKey:i.apiKey,extensionUuids:_,command:"import-extensions"})}function we(e,t){let i=e.dotenv?.variables??{},o=e.allExtensions.map(n=>i[n.idEnvironmentVariableName]);return t.filter(n=>!o.includes(n.uuid))}async function At(e){let t=se(e.extensions);await Promise.all(t.map(async i=>Ce({...e,extensionTypes:i.extensionTypes,buildExtensionConfig:i.buildExtensionConfig,all:!0})))}function xe(e){U({headline:["Imported the following extensions from the dashboard:"],body:e.map(t=>$`• "${t.extension.title}" at: ${t.directory}`.value).join(`
|
|
2
|
+
`)})}s();async function Lt({developerPlatformClient:e,apiKey:t,organizationId:i,extensionTypes:o,onlyDashboardManaged:n=!1}){let r=await e.appExtensionRegistrations({id:t,apiKey:t,organizationId:i}),{dashboardManagedExtensionRegistrations:p,extensionRegistrations:a}=r.app;return(n?p:a.concat(p)).filter(u=>{let h=o.includes(u.type.toLowerCase()),f=u.activeVersion&&u.activeVersion.config,m=u.draftVersion&&u.draftVersion.config;return h&&(f??m)})}export{se as a,ft as b,vt as c,Ce as d,we as e,At as f,Lt as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c}from"./chunk-
|
|
1
|
+
import{e as c}from"./chunk-RNFZJQVV.js";import{W as s}from"./chunk-AINDVTMY.js";import{h as p,k as a}from"./chunk-PSUNX2YX.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as x,c as D,f as M}from"./chunk-
|
|
1
|
+
import{b as x,c as D,f as M}from"./chunk-ZJ6DWT36.js";import{d as w}from"./chunk-AINDVTMY.js";import{D as s,G as h,J as e,z as y}from"./chunk-LIH7CQO7.js";import{a as o}from"./chunk-4IG7WG6V.js";import{ua as u,xb as _}from"./chunk-GYFRTLML.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();async function $(){let a=new Date,n=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")}`,i=w(),t=await s({message:"Type of message?",choices:[{label:"Info",value:"info"},{label:"Warning",value:"warning"},{label:"Error",value:"error"}]}),b=await e({message:"Title"}),E=await e({message:"Message"}),S=await s({message:"Frequency",choices:[{label:"Only once",value:"once"},{label:"Once a week",value:"once_a_week"},{label:"Once a day",value:"once_a_day"},{label:"Always",value:"always"}]}),r=await e({message:"Minimum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),l=await e({message:"Maximum CLI version (optional)",initialAnswer:o,allowEmpty:!0}),m=await e({message:"Minimum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),c=await e({message:"Maximum date in YYYY-MM-DD format (optional)",initialAnswer:n,allowEmpty:!0}),f=await e({message:"Surface. E.g.: app, theme, hydrogen, theme_app_extension... (optional)",allowEmpty:!0}),g=await e({message:"Comma separated list of commands. E.g.: app:generate:extension (optional)",allowEmpty:!0}),T=await e({message:"Slack channel of the team who will own this notification"}),d=await x(),v={id:i,type:t,title:b,frequency:S,message:E,minVersion:r.length===0?void 0:r,maxVersion:l.length===0?void 0:l,minDate:m.length===0?void 0:m,maxDate:c.length===0?void 0:c,surface:f.length===0?void 0:f,commands:g.length===0?void 0:g.split(",").map(N=>N.trim()),ownerChannel:T};d.notifications.push(v),await u("./notifications.json",JSON.stringify(d)),y({headline:"notifications.json file updated successfully."})}async function j(){let a=await D(),n={type:{header:"Type",color:"dim"},title:{header:"Title",color:"dim"},message:{header:"Message",color:"dim"},filters:{header:"Filters",color:"dim"}},i=a.notifications.map(t=>({type:t.type,title:t.title??"",message:t.message,filters:M(t)}));h({rows:i,columns:n}),_(`
|
|
2
2
|
`)}export{$ as a,j as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as n,B as i,C as t,G as s,y as e,z as o}from"./chunk-
|
|
1
|
+
import{A as n,B as i,C as t,G as s,y as e,z as o}from"./chunk-LIH7CQO7.js";import{h as d,k as l}from"./chunk-PSUNX2YX.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
|
|
2
2
|
Error: Unexpected error
|
|
3
3
|
at Module._compile (internal/modules/cjs/loader.js:1137:30)
|
|
4
4
|
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as J}from"./chunk-
|
|
1
|
+
import{c as J}from"./chunk-YZKBG7UZ.js";import{b as F}from"./chunk-4QXDDAMD.js";import{a as ae}from"./chunk-BMDCOBUR.js";import{a as ne}from"./chunk-3NVQXPTU.js";import{a as z}from"./chunk-36OXWMXZ.js";import{B as Z,D as ee,d as K,e as Q,wa as te}from"./chunk-YAA7OGRM.js";import{b as T,d as X,e as B}from"./chunk-WT2KJHUO.js";import{a as k}from"./chunk-RHJLAYNK.js";import{b as H,f as O}from"./chunk-WJEVB67Y.js";import{e as E}from"./chunk-AINDVTMY.js";import{C as G,p as P,x as L,y as _}from"./chunk-JLR6X5NA.js";import{D as q,F as U,H as b,J as V,z as $}from"./chunk-LIH7CQO7.js";import{h as m}from"./chunk-PSUNX2YX.js";import{a as xe}from"./chunk-CTNBSUVU.js";import{Oa as j,Ta as h,Ua as R,Wa as D,X as f,_ as M,ka as w,qa as N,rb as W,wa as g,ya as v}from"./chunk-GYFRTLML.js";import{e as Y}from"./chunk-VFQW2QL2.js";import{d as p,n as C}from"./chunk-773TIA5M.js";import{e as he,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function re(e,t,r,n={}){let{templates:a,groupOrder:i}=await e.templateSpecifications(t,n);return{templates:a.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}d();d();async function ie(e,t){let r=e?.path??"",n=p(t,r);if(!await h(n))throw new m(`
|
|
2
2
|
The extension is not available for ${e?.value}`);return n}async function oe({name:e,app:t}){let r=M(e),n=p(t.directory,B.extensions.directoryName,r);if(await h(n))throw new m(`
|
|
3
3
|
A directory with this name (${r}) already exists.
|
|
4
4
|
Choose a new name for your extension.`);return await g(n),await N(p(n,T.lockFile)),n}function A(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function se(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,n=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),a=await oe({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:a,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:n,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await J({repoUrl:o,destination:c,shallow:!0})})};return await we(s),{directory:C(a),extensionTemplate:e.extensionTemplate}}async function we(e){try{switch(e.type){case"theme":await ge(e);break;case"function":await ve(e);break;default:await Ee(e);break}let t=p(e.directory,T.lockFile);await v(t)}catch(t){throw await v(e.directory),t}}async function ge({directory:e,url:t,type:r,name:n,extensionFlavor:a,onGetTemplateRepository:i}){return w(async s=>{let o=await I(t,a,s,i);await F(o,e,{name:n,type:r,uid:E(f(n))})})}async function ve({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await w(async l=>{let u=await I(t,i,l,s);await F(u,e,{name:a,handle:f(a),flavor:i?.value,uid:E(f(a))})}),o==="javascript"){let l=ce(i?.value??"rust");await le(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{n.usesWorkspaces&&await P({packageManager:n.packageManager,directory:n.directory});let l=Fe(o);await _(l,{packageManager:n.packageManager,type:"prod",directory:n.usesWorkspaces?e:n.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await Q({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await b(c)}async function Ee({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[{title:"Generating extension",task:async()=>{let l=ce(i?.value??"vanilla-js");await w(async u=>{let y=await I(t,i,u,s);await F(y,e,{srcFileExtension:l,name:a,handle:f(a),flavor:i?.value??"",uid:E(f(a))})}),o==="javascript"&&await le(e,l)}},{title:"Installing dependencies",task:async()=>{let l=n.packageManager;if(n.usesWorkspaces)A(i?.value)==="javascript"&&await P({packageManager:l,directory:n.directory});else{await Te(n.directory,i?.value);let u=p(e,"package.json"),y=await ke(u);await _(y,{packageManager:l,type:"prod",directory:n.directory}),await v(u)}}}];c.push({title:"Update shared type definition",task:async()=>{await ee(r)}}),await b(c)}function ce(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function Fe(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${K}.0.0`}),t}async function le(e,t,r="*"){let n=await D(p(e,"src",r)),a=[];for(let i of n)a.push(j(i,`${i}.${t}`));await Promise.all(a)}async function Te(e,t){t==="typescript-react"&&await G(e,{"@types/react":X.reactTypes})}async function ke(e){if(!await h(e))return[];let t=await L(e);return Object.entries(t?.dependencies??{}).map(([r,n])=>({name:r,version:n}))}async function I(e,t,r,n){let a=p(r,"download");return await g(a),await n(e,a),ie(t,a)}d();function Pe(e,t=[]){let r=[...e.map(a=>({label:a.name,value:a.identifier,group:a.group||"Other",sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(a=>({label:`${a.name} (limit reached)`,value:a.identifier,group:a.group||"Other",disabled:!0,sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER}))],n=(a,i)=>a.sortPriority===i.sortPriority?a.label.localeCompare(i.label):a.sortPriority-i.sortPriority;return r.sort(n)}var _e=async e=>{let t=e.extensionTemplates,r=e.templateType,n=e.extensionFlavor;if(!r){if(n&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(n))),t.length===0)throw new m("You have reached the limit for the number of extensions you can create.");r=await U({message:"Type of extension?",choices:Pe(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let a=t.find(c=>c.identifier===r),i=e.name||await pe(e.directory,a.defaultName),s=e.extensionFlavor??await be(a);return{extensionTemplate:a,extensionContent:{name:i,flavor:s}}};async function pe(e,t,r=1){let n=t.includes(" ")?" ":"-",a=r<=1?t:`${t}${n}${r}`,i=p(e,f(a));return R(i)?pe(e,t,r+1):V({message:"Name your extension:",defaultValue:a})}async function be(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:q({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var de=_e;async function Oe(e){let{app:t,developerPlatformClient:r,remoteApp:n,specifications:a,template:i}=e,s=a.map(ye=>ye.identifier),{templates:o,groupOrder:c}=await re(r,n,s,{requestedTemplate:i}),l=await Ae(o,c,a,t,e),u=await de(l);await Se(u,i);let y=Ce(u,t,e,r),fe=await se(y);Me(fe,e.project.packageManager)}async function Ae(e,t,r,n,a){let i=await Re(a.template,n,e,r);Ne(i,a.flavor);let{validTemplates:s,templatesOverlimit:o}=Ie(e,r,n);return{templateType:i?.identifier,name:a.name,extensionFlavor:a.flavor,directory:p(a.directory,"extensions"),app:n,extensionTemplates:s??[],unavailableExtensions:o??[],reset:a.reset,groupOrder:t}}function Ie(e,t,r){return ae(e,a=>!ue(r,t,a)?"validTemplates":"templatesOverlimit")}function ue(e,t,r){let n=r.type,a=t.find(s=>s.identifier===n||s.externalIdentifier===n);return e.extensionsForType({identifier:n,externalIdentifier:n}).length>=(a?.registrationLimit??1)}async function Se(e,t){let{extensionContent:r}=e;return k.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Ce(e,t,r,n){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:n}}function Me(e,t){let r=je(e.extensionTemplate,e.directory,t);$(r)}function Ne(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(n=>n.value);if(!r.includes(t))throw new m("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function je(e,t,r){let n={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&n.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:W(r,"shopify app dev")}]),e.supportLinks[0]&&n.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),n}async function Re(e,t,r,n){if(!e)return;let a=r.find(i=>i.identifier===e);if(!a){let i=await Y(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new m(`Unknown extension type: ${e}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as I,b as w}from"./chunk-YY6TFARF.js";import{a as E}from"./chunk-HZDEDEAS.js";import{a as _}from"./chunk-SEGZQCXZ.js";import{f as a,g as l,p as S,v as b}from"./chunk-7DJNASBC.js";import{b as T,c as g}from"./chunk-WJEVB67Y.js";import{Aa as p,xa as s}from"./chunk-AINDVTMY.js";import{y as f}from"./chunk-LIH7CQO7.js";import{d as m}from"./chunk-QMYCJ2TM.js";import{h as v}from"./chunk-PSUNX2YX.js";import{a as x}from"./chunk-CTNBSUVU.js";import{wb as c}from"./chunk-GYFRTLML.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();function A(t,e){return{theme:{id:t.id,name:t.name,role:t.role,shop:e.storeFqdn,preview_url:I(t,e),editor_url:w(t,e)}}}function D(t){let{platform:e,arch:n}=m(),o=a(),r=null;return o&&(r=Number(l())||null),{store:o??"Not configured",development_theme_id:r,cli_version:t.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version}}async function O(t,e){let n;if(e.development)n=await new E(t).findOrCreate();else{let o={filter:{theme:e.theme}};n=await _(t,o)}return n?A(n,t):void 0}async function y(t){return[M(),await j(t)]}function M(){let t=a()??"Not configured",e=l();return p(`theme-command:info:dev-theme-loaded:${e}`),N("Theme Configuration",[["Store",t],["Development Theme ID",e?`#${e}`:{subdued:"Not set"}]])}async function j(t){let{platform:e,arch:n}=m();return N("Tooling and System",[["Shopify CLI",t.cliVersion],["OS",`${e}-${n}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}function N(t,e){return{title:t,body:{tabularData:e,firstColumnSubdued:!0}}}async function F(t,e){let n=Object.entries(t.theme).map(([o,r])=>{if(o==="editor_url"||o==="preview_url"){let C=String(r),$=o==="editor_url"?"Open in Theme Editor":"Preview Theme";return[u(o),{link:{url:C,label:$}}]}else return o==="id"?[u(o),`#${r}`]:[u(o),`${r}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function u(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var d=L(x(),1);var h=class extends b{static description="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";static flags={...T,...g,...S,development:d.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,n){if(s("theme-command:info"),e.theme||e.development){let o=await O(n,e);if(!o)throw new v("Theme not found!");if(e.json)return c(JSON.stringify(o,null,2));let r=await F(o,e);f(r)}else{if(e.json)return c(JSON.stringify(D({cliVersion:this.config.version}),null,2));let o=await y({cliVersion:this.config.version});f({customSections:o})}s("theme-command:info")}};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o}from"./chunk-
|
|
1
|
+
import{g as o}from"./chunk-WJEVB67Y.js";import{b as s}from"./chunk-HEWKCSY7.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends s{static description="Clear the CLI cache, used to store some API responses and handle notifications status";static hidden=!0;async run(){await o()}};export{t as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as oe}from"./chunk-PV6T52KB.js";import{d as ie}from"./chunk-IX4IGE5H.js";import{a as ne,b as se}from"./chunk-3WV7DQMM.js";import{Aa as V,C as w,J as C,S as L,a as K,xa as Q,za as U}from"./chunk-PK73ZSND.js";import{e as x}from"./chunk-AFT6ABDE.js";import{A as N,B as I,E as te,a as W,x as ee}from"./chunk-WSCSFFLH.js";import{d as X,e as Z}from"./chunk-6K3AJTNO.js";import{h as F,k as re}from"./chunk-BI7LE6CZ.js";import{a as Ie}from"./chunk-CTNBSUVU.js";import{Ab as h,Fa as J,Ua as _,qb as R,sb as l}from"./chunk-HQUWYKSJ.js";import{d as z,f as k,i as Y,q as $}from"./chunk-773TIA5M.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var q={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)?J(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: ${Y(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()=>$(),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=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ae="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var pe=new _e,ce,ue,me,de;function S(){return ce??=new x({projectName:"shopify-cli-theme-conf"}),ce}function O(){return ue??=new x({projectName:"shopify-cli-development-theme-config"}),ue}function j(){return me??=new x({projectName:"shopify-cli-repl-theme-config"}),me}function D(){return de??=new x({projectName:"shopify-cli-theme-store-password"}),de}function M(t=S()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),O().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),O().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),O().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),j().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),j().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),j().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),D().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),D().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),D().delete(e)}function v(t=S()){let e=M(t);if(!e)throw new re("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 he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??M();if(!e)throw Q(new F("A store is required",`Specify the store passing ${l`${R.genericShellCommand(`--${q.store.name}=example.myshopify.com`)}`.value} or set the ${l`${R.genericShellCommand(q.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.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.*"],mt=50;f();f();var B="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,ge;function P(){return ge??=new x({projectName:Fe}),ge}function b(t){return`${B}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(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 $e(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 Pe(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=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(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 s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function G(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${B}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=G(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=G(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=G(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var H=class extends se{static baseFlags=ie;environmentsFilename(){return Se}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(U(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){N({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(ne(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await oe(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),te(s)}async runConcurrent(e){let o=new W,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await ee({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await he(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();U(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
|
|
1
|
+
import{a as oe}from"./chunk-6633X2JU.js";import{d as ie}from"./chunk-WJEVB67Y.js";import{a as ne,b as se}from"./chunk-HEWKCSY7.js";import{Aa as U,Ba as V,D as w,K as C,T as L,b as K,ya as Q}from"./chunk-AINDVTMY.js";import{A as N,B as I,E as te,a as W,x as ee}from"./chunk-LIH7CQO7.js";import{e as x}from"./chunk-Y6DYQWQK.js";import{d as X,e as Z}from"./chunk-VRO6QBVN.js";import{h as F,k as re}from"./chunk-PSUNX2YX.js";import{a as Ie}from"./chunk-CTNBSUVU.js";import{Ab as h,Fa as J,Ua as _,qb as R,sb as l}from"./chunk-GYFRTLML.js";import{d as z,f as k,i as Y,q as $}from"./chunk-773TIA5M.js";import{e as Te,g as f}from"./chunk-VKWPEFWQ.js";f();var T=Te(Ie(),1);var q={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)?J(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: ${Y(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()=>$(),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=>w(t)}),environment:T.Flags.string({char:"e",description:"The environment to apply to the current command.",env:"SHOPIFY_FLAG_ENVIRONMENT",multiple:!0})},ae="Wrap the value in double quotes if you're using wildcards.",qe=t=>({only:T.Flags.string({char:"o",multiple:!0,description:`${t.charAt(0).toUpperCase()+t.slice(1)} only the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_ONLY"}),ignore:T.Flags.string({char:"x",multiple:!0,description:`Skip ${t}ing the specified files (Multiple flags allowed). ${ae}`,env:"SHOPIFY_FLAG_IGNORE"})});f();f();import{AsyncLocalStorage as _e}from"node:async_hooks";var pe=new _e,ce,ue,me,de;function S(){return ce??=new x({projectName:"shopify-cli-theme-conf"}),ce}function O(){return ue??=new x({projectName:"shopify-cli-development-theme-config"}),ue}function j(){return me??=new x({projectName:"shopify-cli-repl-theme-config"}),me}function D(){return de??=new x({projectName:"shopify-cli-theme-store-password"}),de}function M(t=S()){return pe.getStore()?.store??t.get("themeStore")}function fe(t,e=S()){e.set("themeStore",t)}function He(t=S()){return h(l`Getting development theme...`),O().get(v(t))}function ze(t,e=S()){h(l`Setting development theme...`),O().set(v(e),t)}function Ye(t=S()){h(l`Removing development theme...`),O().delete(v(t))}function Je(t=S()){return h(l`Getting REPL theme...`),j().get(v(t))}function We(t,e=S()){h(l`Setting REPL theme to ${t}...`),j().set(v(e),t)}function Ke(t=S()){h(l`Removing REPL theme...`),j().delete(v(t))}function Qe(t=S()){let e=v(t);return h(l`Getting storefront password for shop ${e}...`),D().get(e)}function Ve(t,e=S()){let o=v(e);h(l`Setting storefront password for shop ${o}...`),D().set(o,t)}function Xe(t=S()){let e=v(t);h(l`Removing storefront password for ${e}...`),D().delete(e)}function v(t=S()){let e=M(t);if(!e)throw new re("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 he(t,e){return pe.run({store:t},e)}function le(t){let e=t.store??M();if(!e)throw Q(new F("A store is required",`Specify the store passing ${l`${R.genericShellCommand(`--${q.store.name}=example.myshopify.com`)}`.value} or set the ${l`${R.genericShellCommand(q.store.env)}`.value} environment variable.`));return fe(e),e}f();f();var Se="shopify.theme.toml",ct=new Intl.DateTimeFormat(void 0,{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),ut=["**/.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.*"],mt=50;f();f();var B="7e9cb568cfd431c538f36d1ad3f2b4f6";var Fe="shopify-cli-store",be=240*1e3,ge;function P(){return ge??=new x({projectName:Fe}),ge}function b(t){return`${B}::${Ee(t)}`}function Ee(t){return t.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function d(t){return typeof t=="string"}function ke(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 $e(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 Pe(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=ke(e.associatedUser),r=e.kind==="preview"?"preview":"standard",n=r==="preview"?$e(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 s=b(t);if(!r||typeof r!="object"||Array.isArray(r)||typeof n!="string"){o.delete(s);return}let a=Object.fromEntries(Object.entries(r).flatMap(([u,c])=>{let p=Pe(c);return p?[[u,p]]:[]}));if(Object.keys(a).length!==Object.keys(r).length)if(a[n])o.set(s,{currentUserId:n,sessionsByUserId:a});else{o.delete(s);return}return{currentUserId:n,sessionsByUserId:a}}function G(t,e){return ye(t,e.get(b(t)),e)}function Ce(t){return t.config?.store??{}}function we(t=P()){let e=[],o=`${B}::`;for(let[r,n]of Object.entries(Ce(t))){if(!r.startsWith(o))continue;let i=ye(r.slice(o.length),n,t),s=i?.sessionsByUserId[i.currentUserId];s&&e.push(s)}return e}function Ae(t,e=P()){let o=w(t),r=G(o,e);if(!r)return;let n=r.sessionsByUserId[r.currentUserId];if(!n){e.delete(b(o));return}return n}function wt(t,e=P()){let o=b(t.store),r=G(t.store,e),n={currentUserId:t.userId,sessionsByUserId:{...r?.sessionsByUserId??{},[t.userId]:t}};e.set(o,n)}function At(t,e,o){let r=w(t),n=typeof e=="string"?e:void 0,i=(typeof e=="string"?o:e)??P(),s=b(r);if(!n){i.delete(s);return}let a=G(r,i);if(!a)return;let{[n]:u,...c}=a.sessionsByUserId,p=Object.keys(c);if(p.length===0){i.delete(s);return}i.set(s,{currentUserId:a.currentUserId===n?p[0]:a.currentUserId,sessionsByUserId:c})}function ve(t){if(!t.expiresAt)return!1;let e=new Date(t.expiresAt).getTime();return Number.isNaN(e)?!0:e-be<Date.now()}var H=class extends se{static baseFlags=ie;environmentsFilename(){return Se}async command(e,o,r=!1,n,i){}async run(e){let o=this.constructor,r=o.multiEnvironmentsFlags,{args:n,flags:i}=await this.parse(o),s="password"in o.flags,a=(Array.isArray(i.environment)?i.environment:[i.environment]).filter(Boolean),u=r!==null&&r.some(m=>Array.isArray(m)?m.includes("store"):m==="store");if(a.length<=1){if(a[0]&&!i.store&&u)throw new F("Please provide a valid environment.");let m=s?await this.createSession(i):void 0,A=this.constructor.name.toLowerCase();if(U(`theme-command:${A}:single-env:authenticated`),i.path&&!_(i.path))throw new F(`Path does not exist: ${i.path}`);try{await this.command(i,m,!1,n)}finally{await this.logAnalyticsData(m)}return}if(r===null){N({body:"This command does not support multiple environments."});return}let{flags:c}=await this.parse(ne(o),this.argv);if("path"in c){this.errorOnGlobalPath();return}let p=await this.loadEnvironments(a,i,c),g=await this.validateEnvironments(p,r,s);"force"in o.flags&&!i.force&&!await this.showConfirmation(this.constructor.name,r,g)||await this.runConcurrent(g.valid)}storeAuthScopes(){}async loadEnvironments(e,o,r){let n=new Map;for(let i of e){let s=await oe(i,"shopify.theme.toml",{from:o.path,silent:!0});s?.store&&typeof s.store=="string"&&(s.store=w(s.store)),s?.path&&typeof s.path=="string"&&(s.path=k(s.path)),n.set(i,{flags:{...o,...s,...r,environment:[i]},validationFlags:{...s,...r}})}return n}async validateEnvironments(e,o,r){let n=[],i=[],s=r?this.storeAuthSessionsForTheme(Array.from(e.values()).map(({validationFlags:u})=>u)):new Map,a=Array.from(e.entries()).map(([u,{flags:c,validationFlags:p}])=>({environmentName:u,flags:c,validationFlags:p,storeAuthSession:this.storeAuthSessionFromCache(p,s)}));for(let{environmentName:u,flags:c,validationFlags:p,storeAuthSession:g}of a){let y=this.validConfig(p,o,u,g);if(y!==!0){let m=y.join(", ");i.push({environment:u,reason:`Missing flags: ${m}`});continue}n.push({environment:u,flags:c,requiresAuth:r,storeAuthSession:g})}return{valid:n,invalid:i}}async showConfirmation(e,o,r){let s={message:[`Run ${e.toLowerCase()} in the following environments?`],confirmationMessage:"Yes, proceed",cancellationMessage:"Cancel"},a=[...r.valid.map(({environment:u,flags:c})=>{let p=o.map(g=>{let y=Array.isArray(g)?g.find(m=>c[m]):g;if(y==="password")return"password";if(y==="path"&&typeof c.path=="string"){let m=c.path.split(/[/\\]/);if(m.length===1)return`path: ${c.path}`;let A=m[0]===""?`/${m[1]}`:m[0],E=m.at(-1);return`path: ${A}/.../${E}`}return y&&`${y}: ${c[y]}`}).join(", ");return[u,{subdued:p||"No flags required"}]}),...r.invalid.map(({environment:u,reason:c})=>[u,{error:`Skipping | ${c}`}])];return s.infoTable={Environment:a},r.invalid.length>0&&(s.confirmationMessage="Proceed anyway (will skip invalid environments)"),te(s)}async runConcurrent(e){let o=new W,r=e.map(s=>s.flags.store),n=new Set(r),i=r.length===n.size?[e]:this.createSequentialGroups(e);for(let s of i)await ee({processes:s.map(({environment:a,flags:u,requiresAuth:c,storeAuthSession:p})=>({prefix:a,action:async(g,y,m)=>{try{let A=u.store;await he(A,async()=>{let E=c?await this.createSession(u,p):void 0,xe=this.constructor.name.toLowerCase();U(`theme-command:${xe}:multi-env:authenticated`);try{await this.command(u,E,!0,{},{stdout:g,stderr:y})}finally{await this.logAnalyticsData(E)}})}catch(A){A instanceof Error&&(A.message=`Environment ${a} failed:
|
|
2
2
|
|
|
3
3
|
${A.message}`,I({body:[A.message]}))}}})),abortSignal:o.signal,showTimestamps:!0,renderOptions:{stdout:process.stderr}})}createSequentialGroups(e){let o=[];return e.forEach(r=>{let n=o.find(i=>!i.some(s=>s.flags.store===r.flags.store));n?n.push(r):o.push([r])}),o}async createSession(e,o){let r=le({store:e.store}),n=e.password;return n?await L(r,n):o??await this.storeAuthSessionForTheme({store:r})??await L(r,n)}async storeAuthSessionForTheme(e){let o=this.storeAuthScopes();if(!o)return;let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!r||n)return;let i=w(r),s=Ae(i);if(s)return this.adminSessionFromStoreAuthSession(s,i,o)}storeAuthSessionsForTheme(e){let o=this.storeAuthScopes();if(!o)return new Map;let r=new Set(e.filter(({store:n,password:i})=>typeof n=="string"&&!i).map(({store:n})=>w(n)));return r.size===0?new Map:new Map(we().map(n=>{let i=w(n.store);if(!r.has(i))return;let s=this.adminSessionFromStoreAuthSession(n,i,o);return s?[i,s]:void 0}).filter(n=>n!==void 0))}storeAuthSessionFromCache(e,o){let r=typeof e.store=="string"?e.store:void 0,n=e.password;if(!(!r||n))return o.get(w(r))}adminSessionFromStoreAuthSession(e,o,r){if(ve(e)){h(`Ignoring stored store auth session for ${o}: it expired at ${e.expiresAt??"unknown"}.`);return}if(!this.hasRequiredStoreAuthScopes(e.scopes,r)){h(`Ignoring stored store auth session for ${o}: it is missing required scopes (has: ${e.scopes.join(", ")}; needs: ${r.join(", ")}).`);return}return h(`Using stored store auth session for ${o} (scopes: ${e.scopes.join(", ")}).`),C(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,o){let r=this.expandImpliedStoreAuthScopes(e);return o.every(n=>r.has(n))}validConfig(e,o,r,n){let i=o.filter(s=>Array.isArray(s)?!s.some(a=>this.hasRequiredFlag(e,a,n)):!this.hasRequiredFlag(e,s,n)).map(s=>Array.isArray(s)?s.join(" or "):s);return i.length>0?(N({body:[`Missing required flags in environment configuration${r?` for ${r}`:""}:`,{list:{items:i}}]}),i):!0}hasRequiredFlag(e,o,r){return o==="password"&&r?!0:!!e[o]}errorOnGlobalPath(){let e=z($(),"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=V();await X(()=>({store_fqdn_hash:K(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 Z(()=>({store_fqdn:e.storeFqdn}))}};export{B as a,we as b,Ae as c,wt as d,At as e,M as f,He as g,ze as h,Ye as i,Je as j,We as k,Ke as l,Qe as m,Ve as n,Xe as o,q as p,qe as q,le as r,ct as s,ut as t,mt as u,H as v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as d}from"./chunk-YY6TFARF.js";import{a as v}from"./chunk-SEGZQCXZ.js";import{a as y}from"./chunk-UXL2A5UK.js";import{p}from"./chunk-ZYEGQSF5.js";import{p as f,v as u}from"./chunk-7DJNASBC.js";import{b as l,f as m}from"./chunk-WJEVB67Y.js";import{E as c,z as s}from"./chunk-LIH7CQO7.js";import{a as g}from"./chunk-CTNBSUVU.js";import{e as b,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function w(o,t,i){let e=await v(o,{header:"Select a theme to publish",filter:{development:!1,live:!1,theme:t.theme}}),h=d({...e,role:"live"},o);!t.force&&!i&&!await c({message:`Do you want to make '${e.name}' the new live theme on ${o.storeFqdn}?`,confirmationMessage:`Yes, make '${e.name}' the new live theme`,cancellationMessage:"No, cancel publish"})||(await p(e.id,o),s({headline:t.environment?`Environment: ${t.environment}`:void 0,body:["The theme",...y(e),"is now live at",{link:{label:h,url:h}},{char:"."}]}))}var n=b(g(),1);var a=class extends u{static summary="Set a remote theme as the live theme.";static descriptionWithMarkdown=`Publishes an unpublished theme from your theme library.
|
|
2
2
|
|
|
3
3
|
If no theme ID is specified, then you're prompted to select the theme that you want to publish from the list of themes in your store.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d,b as f,c as g,d as x,g as C}from"./chunk-
|
|
1
|
+
import{a as d,b as f,c as g,d as x,g as C}from"./chunk-6HMTAB2V.js";import{a as c}from"./chunk-3NVQXPTU.js";import{a as l}from"./chunk-36OXWMXZ.js";import{wa as m}from"./chunk-YAA7OGRM.js";import{b as p}from"./chunk-WJEVB67Y.js";import{z as s}from"./chunk-LIH7CQO7.js";import{a as I}from"./chunk-CTNBSUVU.js";import{e as y,g as r}from"./chunk-VKWPEFWQ.js";r();var h=y(I(),1);var o=class u extends c{static description="Import dashboard-managed extensions into your app.";static flags={...p,...l,"client-id":h.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]})};async run(){let{flags:i}=await this.parse(u),e=await m({directory:i.path,clientId:i["client-id"],forceRelink:i.reset,userProvidedConfigName:i.config}),t=await C({developerPlatformClient:e.developerPlatformClient,apiKey:e.remoteApp.apiKey,organizationId:e.remoteApp.organizationId,extensionTypes:g}),n=d(t);if(n.length===0)s({headline:["No extensions to migrate."]});else{let a=await f(n);await x({...e,extensions:t,extensionTypes:a.extensionTypes,buildExtensionConfig:a.buildExtensionConfig})}return{app:e.app}}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as y}from"./chunk-
|
|
1
|
+
import{f as y}from"./chunk-WJEVB67Y.js";import{b as g}from"./chunk-HEWKCSY7.js";import{C as u,F as l,G as f,H as m,I as d,O as p}from"./chunk-AINDVTMY.js";import{D as S,J as h}from"./chunk-LIH7CQO7.js";import{j as n}from"./chunk-Y6DYQWQK.js";import{a as v}from"./chunk-CTNBSUVU.js";import{zb as w}from"./chunk-GYFRTLML.js";import{e as N,g as i}from"./chunk-VKWPEFWQ.js";i();i();var r="NEW_LOGIN";function C(s,t){let e=[],o=s[t];if(o)for(let[c,L]of Object.entries(o))e.push({label:L.identity.alias??c,value:c});return e}async function b(){let s=await p({},{forceNewSession:!0}),t=await f(s.userId);if(!t){let e=await h({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await m(s.userId,e),e}return t}async function x(){let s=await l(),t=await u(),e=[];return s&&e.push(...C(s,t)),e.length>0&&e.push({label:"Log in with a different account",value:r}),e}async function A(s){if(s){let o=await d(s);if(o)return n(o),s}let t=await x(),e=r;return t.length>0&&(e=await S({message:"Which account would you like to use?",choices:t})),e===r?b():(n(e),t.find(o=>o.value===e)?.label??e)}var I=N(v(),1);var a=class s extends g{static description="Logs you in to your Shopify account.";static flags={alias:y(I.Flags.string({description:"Alias of an existing session you want to use.",env:"SHOPIFY_FLAG_AUTH_ALIAS"}))};async run(){let{flags:t}=await this.parse(s),e=await A(t.alias);w(`Current account: ${e}.`)}};export{a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
1
|
+
import{a as f}from"./chunk-SEGZQCXZ.js";import{a as p}from"./chunk-UXL2A5UK.js";import{f as c,o as v}from"./chunk-ZYEGQSF5.js";import{p as l,v as d}from"./chunk-7DJNASBC.js";import{b as s,f as h}from"./chunk-WJEVB67Y.js";import{z as a}from"./chunk-LIH7CQO7.js";import{a as w}from"./chunk-CTNBSUVU.js";import{e as F,g as r}from"./chunk-VKWPEFWQ.js";r();r();async function u(e,n){let m=e.name??await c("New name for the theme"),i=await f(n,{header:"Select a theme to rename",filter:{theme:e.theme,development:e.development,live:e.live}});await v(i.id,{name:m},n),a({body:[...e.environment?[{subdued:`Environment: ${e.environment}
|
|
2
2
|
|
|
3
3
|
`}]:[],"The theme",...p(i),"was renamed to",`'${m}'`]})}var t=F(w(),1);var o=class extends d{static summary="Renames an existing theme.";static descriptionWithMarkdown=`Renames a theme in your store.
|
|
4
4
|
|