shopify 4.4.0 → 4.5.0
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-SOXP4UBD.js → analytics-DMUNCDGT.js} +1 -1
- package/dist/{analytics-DWUYMFHO.js → analytics-GAPN4I6R.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-2NWWMNU5.js → chunk-235JVI2J.js} +1 -1
- package/dist/{chunk-Y3WIZSRU.js → chunk-24RF5KN3.js} +1 -1
- package/dist/{chunk-OORCODNK.js → chunk-2IPVQRMI.js} +1 -1
- package/dist/{chunk-J5TNYNR5.js → chunk-2MDFREEW.js} +1 -1
- package/dist/{chunk-V3RZ3DTW.js → chunk-2MZACB7V.js} +1 -1
- package/dist/{chunk-WVHB2HCQ.js → chunk-2ROG5NK3.js} +1 -1
- package/dist/{chunk-NY5OGHM5.js → chunk-2VUG6LRN.js} +1 -1
- package/dist/{chunk-FZKKKGUJ.js → chunk-32KQKGSY.js} +1 -1
- package/dist/{chunk-5W443CKL.js → chunk-3EQY5B4S.js} +1 -1
- package/dist/{chunk-RF6NUGCU.js → chunk-3JAC5SI7.js} +1 -1
- package/dist/{chunk-LCPD2BYX.js → chunk-3JZKWK2V.js} +1 -1
- package/dist/{chunk-APN3VWN4.js → chunk-3NMVMCOM.js} +1 -1
- package/dist/{chunk-UYK6CXAU.js → chunk-3OE5HXHO.js} +1 -1
- package/dist/{chunk-45MEVWH5.js → chunk-4EYTWWYF.js} +1 -1
- package/dist/{chunk-X4DIJTIK.js → chunk-4LML2QWN.js} +1 -1
- package/dist/{chunk-4N6YTHFD.js → chunk-4Q54UDO3.js} +1 -1
- package/dist/{chunk-7UOPCYMV.js → chunk-4U3NC3UU.js} +1 -1
- package/dist/{chunk-J3HXFQ2L.js → chunk-52H2R2FU.js} +1 -1
- package/dist/{chunk-5JNEWYD5.js → chunk-57IRHKV3.js} +1 -1
- package/dist/{chunk-QPN2M26G.js → chunk-5A7EMVAP.js} +1 -1
- package/dist/{chunk-H6WN7GP4.js → chunk-5EVFLUUA.js} +1 -1
- package/dist/{chunk-TQUSREKP.js → chunk-5O7PY44R.js} +1 -1
- package/dist/{chunk-ZIXWWU2N.js → chunk-63NFEXJR.js} +2 -2
- package/dist/{chunk-RYGZCBO4.js → chunk-663TS34D.js} +1 -1
- package/dist/{chunk-DQ4HA72R.js → chunk-6I3FNLT3.js} +1 -1
- package/dist/{chunk-ZEENHLSC.js → chunk-6LTJMYUD.js} +1 -1
- package/dist/{chunk-ZAMDXIVC.js → chunk-6V37CHBZ.js} +1 -1
- package/dist/{chunk-UKK5P74A.js → chunk-74IG3ZE3.js} +3 -3
- package/dist/{chunk-T5GSCWN5.js → chunk-7BVXGS44.js} +1 -1
- package/dist/{chunk-GKRCTMWY.js → chunk-7DYZVU7H.js} +1 -1
- package/dist/{chunk-OAI7VSLW.js → chunk-7EOQVQND.js} +1 -1
- package/dist/{chunk-FPLUMESQ.js → chunk-7HZG7FBK.js} +1 -1
- package/dist/{chunk-VOJWKGCW.js → chunk-7KHYEIA7.js} +1 -1
- package/dist/{chunk-PJYNAUQB.js → chunk-7ZIO3X22.js} +1 -1
- package/dist/{chunk-I73E3BD5.js → chunk-A2O3MBPH.js} +1 -1
- package/dist/{chunk-JAW32T6G.js → chunk-ABCU552E.js} +1 -1
- package/dist/{chunk-YGKQCEVG.js → chunk-AP6FNGTA.js} +1 -1
- package/dist/{chunk-WKBVT5WG.js → chunk-AUZCENYI.js} +1 -1
- package/dist/{chunk-UUC5YKAS.js → chunk-AYKRKE6O.js} +1 -1
- package/dist/{chunk-WAGAC3YI.js → chunk-AYSS2ERL.js} +1 -1
- package/dist/{chunk-Z4LC3WE5.js → chunk-B367FOQA.js} +1 -1
- package/dist/{chunk-U73TPLFE.js → chunk-BBATKR3B.js} +1 -1
- package/dist/{chunk-O6KTFMCD.js → chunk-BCEWCYZD.js} +1 -1
- package/dist/{chunk-SP2WUATO.js → chunk-BH34ZLZ4.js} +1 -1
- package/dist/{chunk-LOQIRLTD.js → chunk-BLI7DUNV.js} +1 -1
- package/dist/{chunk-YYL356OX.js → chunk-BNX4MZMV.js} +1 -1
- package/dist/{chunk-47MGPVED.js → chunk-BU7R7NFL.js} +1 -1
- package/dist/{chunk-5GVXMNC4.js → chunk-BVHBMOIB.js} +1 -1
- package/dist/{chunk-DONEJHDG.js → chunk-BXDZX3BS.js} +3 -3
- package/dist/{chunk-SKLUHLS2.js → chunk-CVRAATZ5.js} +1 -1
- package/dist/{chunk-CD5O2BIT.js → chunk-DBBU6OVN.js} +1 -1
- package/dist/{chunk-B7S23DLF.js → chunk-DKVU7LYY.js} +1 -1
- package/dist/{chunk-HCN6HXA5.js → chunk-DLZPP33V.js} +1 -1
- package/dist/{chunk-733R5OKQ.js → chunk-DQOS54HN.js} +1 -1
- package/dist/{chunk-JOZXRV5K.js → chunk-E4GW6OXT.js} +1 -1
- package/dist/chunk-E64BQS4D.js +1 -0
- package/dist/{chunk-BCD4KTLJ.js → chunk-F447QKVX.js} +1 -1
- package/dist/{chunk-HZSAUZBX.js → chunk-FA25RL4G.js} +1 -1
- package/dist/{chunk-CZXGQ53M.js → chunk-FJOEHMXM.js} +1 -1
- package/dist/{chunk-HA6NISOZ.js → chunk-G6YOP2SJ.js} +1 -1
- package/dist/{chunk-WZVQHMGI.js → chunk-GOAKZ2IL.js} +1 -1
- package/dist/{chunk-VQW35HIQ.js → chunk-H2JU5BGK.js} +1 -1
- package/dist/{chunk-QMXKGSFH.js → chunk-H3V6Y5JO.js} +1 -1
- package/dist/{chunk-EKHWL542.js → chunk-HHA322FT.js} +1 -1
- package/dist/{chunk-GBZL4TTY.js → chunk-HP3NDE7S.js} +1 -1
- package/dist/{chunk-GW3VY3FZ.js → chunk-HX3TALXV.js} +1 -1
- package/dist/{chunk-POAICASX.js → chunk-I3Y6XTKN.js} +1 -1
- package/dist/{chunk-5QWYIBE6.js → chunk-ICHNVDFU.js} +1 -1
- package/dist/{chunk-MZMYBFZQ.js → chunk-ICXHUPP5.js} +1 -1
- package/dist/{chunk-CPE7XCC6.js → chunk-IE4SSSXU.js} +1 -1
- package/dist/{chunk-QS3FMN67.js → chunk-IFVYCKX5.js} +1 -1
- package/dist/{chunk-67KMRBSZ.js → chunk-J2ZES5K5.js} +1 -1
- package/dist/{chunk-7EJ4UVYI.js → chunk-J5U2FUIX.js} +1 -1
- package/dist/{chunk-DO2SHYFU.js → chunk-JC3PRJJS.js} +1 -1
- package/dist/{chunk-D6YDSGR4.js → chunk-JGN7YG5X.js} +1 -1
- package/dist/{chunk-HZYRCG4R.js → chunk-JZVNNQWE.js} +1 -1
- package/dist/{chunk-DZLA2RJP.js → chunk-K2CIMJJW.js} +1 -1
- package/dist/{chunk-IIOIDMG3.js → chunk-K7I5BGFC.js} +1 -1
- package/dist/{chunk-DHBYYHBT.js → chunk-KESQOMEW.js} +1 -1
- package/dist/{chunk-ATXODH6C.js → chunk-KJQAJUDU.js} +1 -1
- package/dist/{chunk-7SVMAJTR.js → chunk-KNEF6NAG.js} +1 -1
- package/dist/{chunk-XH6ZP7M5.js → chunk-KUKYAIOR.js} +1 -1
- package/dist/{chunk-2MMGFZDP.js → chunk-KZDI2BXR.js} +1 -1
- package/dist/{chunk-OQORDQLH.js → chunk-LMPD55L6.js} +1 -1
- package/dist/{chunk-ZULTG2D2.js → chunk-LXZM6Z4F.js} +1 -1
- package/dist/{chunk-KKUDXLK2.js → chunk-MGPLKG23.js} +1 -1
- package/dist/{chunk-2EROVVCL.js → chunk-MSJDZLZT.js} +1 -1
- package/dist/{chunk-ZQ5JVD5X.js → chunk-N4LCWB56.js} +1 -1
- package/dist/{chunk-WRRUFK4Y.js → chunk-N5U5Q2MG.js} +1 -1
- package/dist/{chunk-YQH2JHFA.js → chunk-N5YIZJ4S.js} +1 -1
- package/dist/{chunk-BIMOHK2P.js → chunk-N625VE5T.js} +1 -1
- package/dist/{chunk-J2WCMQZZ.js → chunk-NJLSZS27.js} +1 -1
- package/dist/{chunk-3CYHS4W2.js → chunk-O7OQK2OC.js} +1 -1
- package/dist/{chunk-V6ZSIUO3.js → chunk-P375IGKT.js} +1 -1
- package/dist/{chunk-3OZ6ZZ4T.js → chunk-P3RGC53U.js} +1 -1
- package/dist/{chunk-G2S346IS.js → chunk-P4243GCY.js} +1 -1
- package/dist/{chunk-MFLQRQQT.js → chunk-PFEC2NUB.js} +1 -1
- package/dist/{chunk-GTUKM3ZW.js → chunk-PH7F4BMG.js} +1 -1
- package/dist/{chunk-IX4KP6E3.js → chunk-PK6NOLT5.js} +1 -1
- package/dist/chunk-PLHJQQVZ.js +1 -0
- package/dist/{chunk-GFCLUGAG.js → chunk-PVD544NN.js} +1 -1
- package/dist/chunk-Q3WOWDUU.js +1 -0
- package/dist/{chunk-FA4K3JRN.js → chunk-QAM7VCLV.js} +1 -1
- package/dist/{chunk-AT2GDXN7.js → chunk-QCBAFI6Z.js} +1 -1
- package/dist/{chunk-J7UQBC45.js → chunk-QHWF3S7U.js} +1 -1
- package/dist/{chunk-TKG42KLM.js → chunk-QJL3SXYA.js} +1 -1
- package/dist/{chunk-C3CVLSLS.js → chunk-QRETBFXI.js} +1 -1
- package/dist/{chunk-4TST2MNC.js → chunk-RBOYWA2D.js} +1 -1
- package/dist/{chunk-NWDP5IZ2.js → chunk-ROQXPIEZ.js} +1 -1
- package/dist/{chunk-5QQN3SKH.js → chunk-RUKK4KXX.js} +1 -1
- package/dist/{chunk-Z74QYLNC.js → chunk-RY2ESY3P.js} +1 -1
- package/dist/{chunk-QJ7TI6CK.js → chunk-RY5CY3ZW.js} +1 -1
- package/dist/{chunk-IG6LPVS4.js → chunk-S442LGHR.js} +1 -1
- package/dist/{chunk-H5C3QTOO.js → chunk-S5JJL3BP.js} +1 -1
- package/dist/{chunk-ZZFZBFVM.js → chunk-SF53RKMO.js} +1 -1
- package/dist/{chunk-PETINPMX.js → chunk-SY2AH7C2.js} +1 -1
- package/dist/{chunk-WNWQSHEC.js → chunk-TEXYUUTD.js} +1 -1
- package/dist/{chunk-G24L7MB3.js → chunk-TGM7L6RV.js} +1 -1
- package/dist/{chunk-PMXCJIBP.js → chunk-TKW3Z7XL.js} +1 -1
- package/dist/{chunk-KN3FTJDU.js → chunk-TM534QSE.js} +1 -1
- package/dist/{chunk-TJGUNVRI.js → chunk-U44HRKSU.js} +1 -1
- package/dist/{chunk-442S5SDM.js → chunk-UEC23KAO.js} +1 -1
- package/dist/{chunk-G2I2ZUBV.js → chunk-UFGDNIYX.js} +1 -1
- package/dist/{chunk-75LJTY7F.js → chunk-UGGFSV7N.js} +1 -1
- package/dist/{chunk-F5QG42MA.js → chunk-UJVYIWUI.js} +1 -1
- package/dist/{chunk-DLNBTHKL.js → chunk-UP7H24B3.js} +1 -1
- package/dist/{chunk-VFWWZMOQ.js → chunk-UQZ7HZ47.js} +1 -1
- package/dist/{chunk-NADNFSKS.js → chunk-UTLRP527.js} +1 -1
- package/dist/{chunk-73W5BGAZ.js → chunk-UTPJAU5S.js} +1 -1
- package/dist/{chunk-3FBSBMSQ.js → chunk-V66IHWQO.js} +1 -1
- package/dist/{chunk-GUO7S4NW.js → chunk-V774I3FW.js} +1 -1
- package/dist/{chunk-PUAMSBXS.js → chunk-VKFDDZD3.js} +1 -1
- package/dist/{chunk-LOHUNOQ7.js → chunk-VNYKNAT5.js} +1 -1
- package/dist/{chunk-KSZ5K6LJ.js → chunk-VUACOGOX.js} +1 -1
- package/dist/{chunk-WLO5H255.js → chunk-WFB3FHKV.js} +1 -1
- package/dist/{chunk-HZMP62GK.js → chunk-WPITBIL5.js} +1 -1
- package/dist/{chunk-SXTDVUT3.js → chunk-WTYH2O47.js} +1 -1
- package/dist/{chunk-AY4GIVME.js → chunk-WU6GIY22.js} +1 -1
- package/dist/{chunk-6DIHOMCB.js → chunk-XA5JA7DK.js} +1 -1
- package/dist/{chunk-YLGSM42I.js → chunk-XSXX75VV.js} +1 -1
- package/dist/{chunk-XV3I45NA.js → chunk-XXUWTD7A.js} +1 -1
- package/dist/{chunk-6YPEONHB.js → chunk-XZWAX4FI.js} +1 -1
- package/dist/{chunk-IPQH2RHD.js → chunk-YF4HKJB5.js} +1 -1
- package/dist/{chunk-SWI3LCPE.js → chunk-YJAX22JK.js} +1 -1
- package/dist/{chunk-7LATYPLU.js → chunk-YT3NPMWK.js} +1 -1
- package/dist/{chunk-6EZ7JWBK.js → chunk-YYLEWVO6.js} +4 -4
- package/dist/chunk-Z2Y6G2QF.js +1 -0
- package/dist/{chunk-PZYP3MCL.js → chunk-Z66NZ2HC.js} +1 -1
- package/dist/{chunk-ZIREP3EZ.js → chunk-ZFOWAMFK.js} +1 -1
- package/dist/{chunk-6RL7FUPD.js → chunk-ZKBWEHIY.js} +1 -1
- package/dist/{chunk-Y66GQ6V2.js → chunk-ZZ3SMI2A.js} +1 -1
- package/dist/{chunk-B7BUEEBR.js → chunk-ZZWSMRKT.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-C2LOYIOU.js → conf-store-V6ILVUUO.js} +1 -1
- package/dist/{deprecations-QOHE6JG6.js → deprecations-MOEFN6OW.js} +1 -1
- package/dist/dist-2BL5GGMG.js +1 -0
- package/dist/{dist-FF6C4ZHS.js → dist-E6QKEULH.js} +1 -1
- package/dist/{environments-EGD263DV.js → environments-5KA3OBIZ.js} +1 -1
- package/dist/{error-66U2HJ37.js → error-NYYI6HVX.js} +1 -1
- package/dist/{error-handler-SW2ALZ5Z.js → error-handler-BOESDKZA.js} +1 -1
- package/dist/{fs-JPQRUGZI.js → fs-XE6SBVBF.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 +14 -14
- package/dist/{is-global-QWTDUPNR.js → is-global-JOHCPSKZ.js} +1 -1
- package/dist/{local-FRYN3NWL.js → local-BTQDUX72.js} +1 -1
- package/dist/{local-storage-DFH3LT5G.js → local-storage-WUSIVDTQ.js} +1 -1
- package/dist/{metadata-KZVLHQII.js → metadata-APVOKTBV.js} +1 -1
- package/dist/{node-package-manager-LVFBY4LY.js → node-package-manager-AC34ZJZD.js} +1 -1
- package/dist/notifications-system-4ODOESG2.js +1 -0
- package/dist/{output-NH4I5Y3C.js → output-EAPQ7OWD.js} +1 -1
- package/dist/{system-GNOF6HMI.js → system-D7CH26HU.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-QOGKADWB.js → ui-AXZBGWIQ.js} +1 -1
- package/dist/upgrade-SLPJF6LD.js +1 -0
- package/dist/version-3IYH4V5U.js +1 -0
- package/dist/{version-FJFTTOZU.js → version-FAU37PQN.js} +1 -1
- package/dist/{workerd-U6WWWY73.js → workerd-XXPWKQOM.js} +1 -1
- package/oclif.manifest.json +2 -6
- package/package.json +7 -7
- package/dist/chunk-FU232KQ7.js +0 -1
- package/dist/chunk-HM5H7WBE.js +0 -1
- package/dist/chunk-MQICT2LR.js +0 -1
- package/dist/chunk-UMT7DWR4.js +0 -1
- package/dist/dist-Q676YGVI.js +0 -1
- package/dist/notifications-system-DP443VTE.js +0 -1
- package/dist/upgrade-K4S6JW64.js +0 -1
- package/dist/version-ZI4GZX72.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-PK6NOLT5.js";import{a as c}from"./chunk-F447QKVX.js";import{a as u}from"./chunk-7KHYEIA7.js";import{a as y}from"./chunk-O7OQK2OC.js";import{d as f}from"./chunk-H3V6Y5JO.js";import{p,v as m}from"./chunk-JGN7YG5X.js";import{xa as h}from"./chunk-3EQY5B4S.js";import{b as l,d}from"./chunk-S5JJL3BP.js";import{r as O}from"./chunk-T6CC5WUU.js";import{e as F,g as a}from"./chunk-VKWPEFWQ.js";a();var t=F(O(),1);var w,o=class extends m{async command(r,n){let{ignore:g=[],only:_=[]}=r;h("theme-command:dev:single-env:authenticated");let i,e;if(r.theme){let s={filter:{theme:r.theme}};i=await u(n,s),e={...r,theme:i.id.toString(),store:n.storeFqdn}}else{i=await new c(n).findOrCreate();let s=r["theme-editor-sync"]&&i.createdAtRuntime;e={...r,theme:i.id.toString(),store:n.storeFqdn,"overwrite-json":s}}await f(i,"start development mode",r["allow-live"])&&(await v({adminSession:n,commandConfig:this.config,directory:e.path,store:e.store,password:e.password,storePassword:e["store-password"],theme:i,listing:e.listing,host:e.host,port:e.port,"live-reload":e["live-reload"],"error-overlay":e["error-overlay"],force:e.force,open:e.open,"theme-editor-sync":e["theme-editor-sync"],"standard-events-inspector":e["standard-events-inspector"],noDelete:e.nodelete,ignore:g,only:_,notify:e.notify}),await y({path:e.path,password:e.password,store:e.store,force:e.force,verbose:e.verbose,noColor:e["no-color"],silent:!0}))}};w=o;o.summary="Uploads the current theme as a development theme to the connected store, then prints theme editor and preview URLs to your terminal. While running, changes will push to the store in real time.";o.descriptionWithMarkdown=`
|
|
2
2
|
Uploads the current theme as the specified theme, or a [development theme](https://shopify.dev/docs/themes/tools/cli#development-themes), to a store so you can preview it.
|
|
3
3
|
|
|
4
4
|
This command returns the following information:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as w}from"./chunk-
|
|
1
|
+
import{a as h,b as w}from"./chunk-ZFOWAMFK.js";import{n as f}from"./chunk-3EQY5B4S.js";import{P as d}from"./chunk-YYLEWVO6.js";import{d as i}from"./chunk-AUZCENYI.js";import{Ga as m,na as p}from"./chunk-BXDZX3BS.js";import{d as u}from"./chunk-773TIA5M.js";import{g as l}from"./chunk-VKWPEFWQ.js";l();import{writeFile as g}from"fs/promises";var S=1024*1024,y=100,U=y*S,E=3,_=new Set([408,429,500,502,503,504]);async function j(o,e){let t=u(e,"manifest.json");await g(t,JSON.stringify(o,null,2))}var A=["!**/*.js.map","!**/*.metafile.json"];async function k(o,e,t){let n=t??["**/*",...A];e.endsWith(".br")?await w({inputDirectory:o,outputPath:e,matchFilePattern:n}):await h({inputDirectory:o,outputZipPath:e,matchFilePattern:n})}async function C(o,e){let t=await m(e);if(t>U){let s=`${(Math.ceil(t/S*100)/100).toFixed(2)} MB`;throw new i(`Your app bundle exceeds the ${y} MB upload limit (it is ${s}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let n=p(e),r;for(let s=1;s<=E;s++){if(r=await f(o,{method:"put",body:n},"slow-request"),r.ok)return;let T=s===E;if(_.has(r.status)&&!T){await r.text().catch(()=>{}),await d(2**s*.1);continue}break}let a=r?.status,c=(await r?.text().catch(()=>""))?.trim();throw new i(`Failed to upload your app bundle to storage${a?` (HTTP ${a})`:""}.`,"This is usually transient. Please try again, and check your network connection if it persists.",c?[`Storage responded with: ${c.slice(0,300)}`]:void 0)}async function D(o,e){let t=await o.generateSignedUploadUrl(e);if(!t.assetUrl||t.userErrors?.length>0){let n=t.userErrors.map(r=>r.message).join(", ");throw new i(n)}return t.assetUrl}export{j as a,A as b,k as c,C as d,D as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as r}from"./chunk-
|
|
1
|
+
import{b as r}from"./chunk-J5U2FUIX.js";import{b as a}from"./chunk-74IG3ZE3.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var i=class extends a{static{this.summary="Upgrades Shopify CLI."}static{this.descriptionWithMarkdown="Upgrades Shopify CLI using your package manager."}static{this.description=this.descriptionWithoutMarkdown()}async run(){await r()}};export{i as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fb as e,Hb as r,Pb as n,Ta as o,ua as g,wa as d}from"./chunk-
|
|
1
|
+
import{Fb as e,Hb as r,Pb as n,Ta as o,ua as g,wa as d}from"./chunk-BXDZX3BS.js";import{d as i}from"./chunk-773TIA5M.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var f=".shopify";async function E(p){let t=i(p,f),a=i(t,".gitignore"),[h,u]=await Promise.all([o(t),o(a)]);return h||(n(r`Creating hidden .shopify folder at ${e.path(t)}...`),await d(t)),u||(n(r`Creating .gitignore in ${e.path(t)}...`),await g(a,`# Ignore the entire ${f} directory
|
|
2
2
|
*`)),t}export{E as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-N4LCWB56.js";import{a as e}from"./chunk-RUKK4KXX.js";import{a as o}from"./chunk-I3Y6XTKN.js";import{b as i}from"./chunk-74IG3ZE3.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static{this.description="View all the available UI kit components"}static{this.hiddenAliases=["kitchen-sink all"]}static{this.hidden=!0}async run(){await o(),await e(),await s()}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as Yv}from"./chunk-D6YDSGR4.js";import{A as hy,B as ii,C as uy,D as Fn,E as py,F as my,G as za,H as fy,I as Oa,J as gy,K as rs,L as kT,M as by,N as Aa,O as is,P as os,Q as Pn,R as vy,S as sn,T as La,U as qa,V,W as CT,X as _T,a as ee,aa as Eu,b as Fa,c as Zv,d as Dn,e as ke,f as Pa,g as ey,h as ty,i as ny,j as ry,k as iy,l as ns,m as oy,n as Ma,o as K,p as Ia,q as sy,r as Na,s as Vt,t as ay,u as B,v as lt,w as kr,x as ly,y as cy,z as dy}from"./chunk-T5GSCWN5.js";import{b as Qv}from"./chunk-H5C3QTOO.js";import{a as jt,b as Z,c as w,d as Xv,e as $t,f as Bt,g as d}from"./chunk-VKWPEFWQ.js";var Ai=w(ct=>{"use strict";d();Object.defineProperty(ct,"__esModule",{value:!0});ct.stringArray=ct.array=ct.func=ct.error=ct.number=ct.string=ct.boolean=void 0;function TT(n){return n===!0||n===!1}ct.boolean=TT;function yy(n){return typeof n=="string"||n instanceof String}ct.string=yy;function RT(n){return typeof n=="number"||n instanceof Number}ct.number=RT;function ET(n){return n instanceof Error}ct.error=ET;function DT(n){return typeof n=="function"}ct.func=DT;function wy(n){return Array.isArray(n)}ct.array=wy;function FT(n){return wy(n)&&n.every(e=>yy(e))}ct.stringArray=FT});var Yu=w(j=>{"use strict";d();Object.defineProperty(j,"__esModule",{value:!0});j.Message=j.NotificationType9=j.NotificationType8=j.NotificationType7=j.NotificationType6=j.NotificationType5=j.NotificationType4=j.NotificationType3=j.NotificationType2=j.NotificationType1=j.NotificationType0=j.NotificationType=j.RequestType9=j.RequestType8=j.RequestType7=j.RequestType6=j.RequestType5=j.RequestType4=j.RequestType3=j.RequestType2=j.RequestType1=j.RequestType=j.RequestType0=j.AbstractMessageSignature=j.ParameterStructures=j.ResponseError=j.ErrorCodes=void 0;var oi=Ai(),Sy;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(Sy=j.ErrorCodes||(j.ErrorCodes={}));var Du=class n extends Error{constructor(e,t,r){super(t),this.code=oi.number(e)?e:Sy.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};j.ResponseError=Du;var Tt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};j.ParameterStructures=Tt;Tt.auto=new Tt("auto");Tt.byPosition=new Tt("byPosition");Tt.byName=new Tt("byName");var Ce=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Tt.auto}};j.AbstractMessageSignature=Ce;var Fu=class extends Ce{constructor(e){super(e,0)}};j.RequestType0=Fu;var Pu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType=Pu;var Mu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType1=Mu;var Iu=class extends Ce{constructor(e){super(e,2)}};j.RequestType2=Iu;var Nu=class extends Ce{constructor(e){super(e,3)}};j.RequestType3=Nu;var zu=class extends Ce{constructor(e){super(e,4)}};j.RequestType4=zu;var Ou=class extends Ce{constructor(e){super(e,5)}};j.RequestType5=Ou;var Au=class extends Ce{constructor(e){super(e,6)}};j.RequestType6=Au;var Lu=class extends Ce{constructor(e){super(e,7)}};j.RequestType7=Lu;var qu=class extends Ce{constructor(e){super(e,8)}};j.RequestType8=qu;var Wu=class extends Ce{constructor(e){super(e,9)}};j.RequestType9=Wu;var Hu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType=Hu;var Uu=class extends Ce{constructor(e){super(e,0)}};j.NotificationType0=Uu;var ju=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType1=ju;var $u=class extends Ce{constructor(e){super(e,2)}};j.NotificationType2=$u;var Bu=class extends Ce{constructor(e){super(e,3)}};j.NotificationType3=Bu;var Vu=class extends Ce{constructor(e){super(e,4)}};j.NotificationType4=Vu;var Gu=class extends Ce{constructor(e){super(e,5)}};j.NotificationType5=Gu;var Ku=class extends Ce{constructor(e){super(e,6)}};j.NotificationType6=Ku;var Ju=class extends Ce{constructor(e){super(e,7)}};j.NotificationType7=Ju;var Xu=class extends Ce{constructor(e){super(e,8)}};j.NotificationType8=Xu;var Qu=class extends Ce{constructor(e){super(e,9)}};j.NotificationType9=Qu;var PT;(function(n){function e(i){let o=i;return o&&oi.string(o.method)&&(oi.string(o.id)||oi.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&oi.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(oi.string(o.id)||oi.number(o.id)||o.id===null)}n.isResponse=r})(PT=j.Message||(j.Message={}))});var ep=w(Kn=>{"use strict";d();var xy;Object.defineProperty(Kn,"__esModule",{value:!0});Kn.LRUCache=Kn.LinkedMap=Kn.Touch=void 0;var ft;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(ft=Kn.Touch||(Kn.Touch={}));var Wa=class{constructor(){this[xy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=ft.None){let r=this._map.get(e);if(r)return t!==ft.None&&this.touch(r,t),r.value}set(e,t,r=ft.None){let i=this._map.get(e);if(i)i.value=t,r!==ft.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case ft.None:this.addItemLast(i);break;case ft.First:this.addItemFirst(i);break;case ft.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(xy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==ft.First&&t!==ft.Last)){if(t===ft.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===ft.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};Kn.LinkedMap=Wa;var Zu=class extends Wa{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=ft.AsNew){return super.get(e,t)}peek(e){return super.get(e,ft.None)}set(e,t){return super.set(e,t,ft.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Kn.LRUCache=Zu});var ky=w(ss=>{"use strict";d();Object.defineProperty(ss,"__esModule",{value:!0});ss.Disposable=void 0;var MT;(function(n){function e(t){return{dispose:t}}n.create=e})(MT=ss.Disposable||(ss.Disposable={}))});var Cr=w(rp=>{"use strict";d();Object.defineProperty(rp,"__esModule",{value:!0});var tp;function np(){if(tp===void 0)throw new Error("No runtime abstraction layer installed");return tp}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");tp=t}n.install=e})(np||(np={}));rp.default=np});var Li=w(si=>{"use strict";d();Object.defineProperty(si,"__esModule",{value:!0});si.Emitter=si.Event=void 0;var IT=Cr(),NT;(function(n){let e={dispose(){}};n.None=function(){return e}})(NT=si.Event||(si.Event={}));var ip=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,IT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ha=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new ip),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};si.Emitter=Ha;Ha._noop=function(){}});var ja=w(ai=>{"use strict";d();Object.defineProperty(ai,"__esModule",{value:!0});ai.CancellationTokenSource=ai.CancellationToken=void 0;var zT=Cr(),OT=Ai(),op=Li(),sp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:op.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:op.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||OT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(sp=ai.CancellationToken||(ai.CancellationToken={}));var AT=Object.freeze(function(n,e){let t=(0,zT.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Ua=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?AT:(this._emitter||(this._emitter=new op.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},ap=class{get token(){return this._token||(this._token=new Ua),this._token}cancel(){this._token?this._token.cancel():this._token=sp.Cancelled}dispose(){this._token?this._token instanceof Ua&&this._token.dispose():this._token=sp.None}};ai.CancellationTokenSource=ap});var Cy=w(qi=>{"use strict";d();Object.defineProperty(qi,"__esModule",{value:!0});qi.SharedArrayReceiverStrategy=qi.SharedArraySenderStrategy=void 0;var LT=ja(),as;(function(n){n.Continue=0,n.Cancelled=1})(as||(as={}));var lp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=as.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,as.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};qi.SharedArraySenderStrategy=lp;var cp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===as.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},dp=class{constructor(e){this.token=new cp(e)}cancel(){}dispose(){}},hp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new LT.CancellationTokenSource:new dp(t)}};qi.SharedArrayReceiverStrategy=hp});var pp=w($a=>{"use strict";d();Object.defineProperty($a,"__esModule",{value:!0});$a.Semaphore=void 0;var qT=Cr(),up=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,qT.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};$a.Semaphore=up});var _y=w(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReadableStreamMessageReader=Jn.AbstractMessageReader=Jn.MessageReader=void 0;var fp=Cr(),Wi=Ai(),mp=Li(),WT=pp(),HT;(function(n){function e(t){let r=t;return r&&Wi.func(r.listen)&&Wi.func(r.dispose)&&Wi.func(r.onError)&&Wi.func(r.onClose)&&Wi.func(r.onPartialMessage)}n.is=e})(HT=Jn.MessageReader||(Jn.MessageReader={}));var Ba=class{constructor(){this.errorEmitter=new mp.Emitter,this.closeEmitter=new mp.Emitter,this.partialMessageEmitter=new mp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Wi.string(e.message)?e.message:"unknown"}`)}};Jn.AbstractMessageReader=Ba;var gp;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,fp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(gp||(gp={}));var bp=class extends Ba{constructor(e,t){super(),this.readable=e,this.options=gp.fromOptions(t),this.buffer=(0,fp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new WT.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,fp.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Jn.ReadableStreamMessageReader=bp});var Dy=w(Xn=>{"use strict";d();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WriteableStreamMessageWriter=Xn.AbstractMessageWriter=Xn.MessageWriter=void 0;var Ty=Cr(),ls=Ai(),UT=pp(),Ry=Li(),jT="Content-Length: ",Ey=`\r
|
|
1
|
+
import{v as Yv}from"./chunk-JGN7YG5X.js";import{A as hy,B as ii,C as uy,D as Fn,E as py,F as my,G as za,H as fy,I as Oa,J as gy,K as rs,L as kT,M as by,N as Aa,O as is,P as os,Q as Pn,R as vy,S as sn,T as La,U as qa,V,W as CT,X as _T,a as ee,aa as Eu,b as Fa,c as Zv,d as Dn,e as ke,f as Pa,g as ey,h as ty,i as ny,j as ry,k as iy,l as ns,m as oy,n as Ma,o as K,p as Ia,q as sy,r as Na,s as Vt,t as ay,u as B,v as lt,w as kr,x as ly,y as cy,z as dy}from"./chunk-7BVXGS44.js";import{b as Qv}from"./chunk-S5JJL3BP.js";import{a as jt,b as Z,c as w,d as Xv,e as $t,f as Bt,g as d}from"./chunk-VKWPEFWQ.js";var Ai=w(ct=>{"use strict";d();Object.defineProperty(ct,"__esModule",{value:!0});ct.stringArray=ct.array=ct.func=ct.error=ct.number=ct.string=ct.boolean=void 0;function TT(n){return n===!0||n===!1}ct.boolean=TT;function yy(n){return typeof n=="string"||n instanceof String}ct.string=yy;function RT(n){return typeof n=="number"||n instanceof Number}ct.number=RT;function ET(n){return n instanceof Error}ct.error=ET;function DT(n){return typeof n=="function"}ct.func=DT;function wy(n){return Array.isArray(n)}ct.array=wy;function FT(n){return wy(n)&&n.every(e=>yy(e))}ct.stringArray=FT});var Yu=w(j=>{"use strict";d();Object.defineProperty(j,"__esModule",{value:!0});j.Message=j.NotificationType9=j.NotificationType8=j.NotificationType7=j.NotificationType6=j.NotificationType5=j.NotificationType4=j.NotificationType3=j.NotificationType2=j.NotificationType1=j.NotificationType0=j.NotificationType=j.RequestType9=j.RequestType8=j.RequestType7=j.RequestType6=j.RequestType5=j.RequestType4=j.RequestType3=j.RequestType2=j.RequestType1=j.RequestType=j.RequestType0=j.AbstractMessageSignature=j.ParameterStructures=j.ResponseError=j.ErrorCodes=void 0;var oi=Ai(),Sy;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(Sy=j.ErrorCodes||(j.ErrorCodes={}));var Du=class n extends Error{constructor(e,t,r){super(t),this.code=oi.number(e)?e:Sy.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};j.ResponseError=Du;var Tt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};j.ParameterStructures=Tt;Tt.auto=new Tt("auto");Tt.byPosition=new Tt("byPosition");Tt.byName=new Tt("byName");var Ce=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Tt.auto}};j.AbstractMessageSignature=Ce;var Fu=class extends Ce{constructor(e){super(e,0)}};j.RequestType0=Fu;var Pu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType=Pu;var Mu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType1=Mu;var Iu=class extends Ce{constructor(e){super(e,2)}};j.RequestType2=Iu;var Nu=class extends Ce{constructor(e){super(e,3)}};j.RequestType3=Nu;var zu=class extends Ce{constructor(e){super(e,4)}};j.RequestType4=zu;var Ou=class extends Ce{constructor(e){super(e,5)}};j.RequestType5=Ou;var Au=class extends Ce{constructor(e){super(e,6)}};j.RequestType6=Au;var Lu=class extends Ce{constructor(e){super(e,7)}};j.RequestType7=Lu;var qu=class extends Ce{constructor(e){super(e,8)}};j.RequestType8=qu;var Wu=class extends Ce{constructor(e){super(e,9)}};j.RequestType9=Wu;var Hu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType=Hu;var Uu=class extends Ce{constructor(e){super(e,0)}};j.NotificationType0=Uu;var ju=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType1=ju;var $u=class extends Ce{constructor(e){super(e,2)}};j.NotificationType2=$u;var Bu=class extends Ce{constructor(e){super(e,3)}};j.NotificationType3=Bu;var Vu=class extends Ce{constructor(e){super(e,4)}};j.NotificationType4=Vu;var Gu=class extends Ce{constructor(e){super(e,5)}};j.NotificationType5=Gu;var Ku=class extends Ce{constructor(e){super(e,6)}};j.NotificationType6=Ku;var Ju=class extends Ce{constructor(e){super(e,7)}};j.NotificationType7=Ju;var Xu=class extends Ce{constructor(e){super(e,8)}};j.NotificationType8=Xu;var Qu=class extends Ce{constructor(e){super(e,9)}};j.NotificationType9=Qu;var PT;(function(n){function e(i){let o=i;return o&&oi.string(o.method)&&(oi.string(o.id)||oi.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&oi.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(oi.string(o.id)||oi.number(o.id)||o.id===null)}n.isResponse=r})(PT=j.Message||(j.Message={}))});var ep=w(Kn=>{"use strict";d();var xy;Object.defineProperty(Kn,"__esModule",{value:!0});Kn.LRUCache=Kn.LinkedMap=Kn.Touch=void 0;var ft;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(ft=Kn.Touch||(Kn.Touch={}));var Wa=class{constructor(){this[xy]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=ft.None){let r=this._map.get(e);if(r)return t!==ft.None&&this.touch(r,t),r.value}set(e,t,r=ft.None){let i=this._map.get(e);if(i)i.value=t,r!==ft.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case ft.None:this.addItemLast(i);break;case ft.First:this.addItemFirst(i);break;case ft.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(xy=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==ft.First&&t!==ft.Last)){if(t===ft.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===ft.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};Kn.LinkedMap=Wa;var Zu=class extends Wa{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=ft.AsNew){return super.get(e,t)}peek(e){return super.get(e,ft.None)}set(e,t){return super.set(e,t,ft.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Kn.LRUCache=Zu});var ky=w(ss=>{"use strict";d();Object.defineProperty(ss,"__esModule",{value:!0});ss.Disposable=void 0;var MT;(function(n){function e(t){return{dispose:t}}n.create=e})(MT=ss.Disposable||(ss.Disposable={}))});var Cr=w(rp=>{"use strict";d();Object.defineProperty(rp,"__esModule",{value:!0});var tp;function np(){if(tp===void 0)throw new Error("No runtime abstraction layer installed");return tp}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");tp=t}n.install=e})(np||(np={}));rp.default=np});var Li=w(si=>{"use strict";d();Object.defineProperty(si,"__esModule",{value:!0});si.Emitter=si.Event=void 0;var IT=Cr(),NT;(function(n){let e={dispose(){}};n.None=function(){return e}})(NT=si.Event||(si.Event={}));var ip=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,IT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ha=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new ip),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};si.Emitter=Ha;Ha._noop=function(){}});var ja=w(ai=>{"use strict";d();Object.defineProperty(ai,"__esModule",{value:!0});ai.CancellationTokenSource=ai.CancellationToken=void 0;var zT=Cr(),OT=Ai(),op=Li(),sp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:op.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:op.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||OT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(sp=ai.CancellationToken||(ai.CancellationToken={}));var AT=Object.freeze(function(n,e){let t=(0,zT.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Ua=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?AT:(this._emitter||(this._emitter=new op.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},ap=class{get token(){return this._token||(this._token=new Ua),this._token}cancel(){this._token?this._token.cancel():this._token=sp.Cancelled}dispose(){this._token?this._token instanceof Ua&&this._token.dispose():this._token=sp.None}};ai.CancellationTokenSource=ap});var Cy=w(qi=>{"use strict";d();Object.defineProperty(qi,"__esModule",{value:!0});qi.SharedArrayReceiverStrategy=qi.SharedArraySenderStrategy=void 0;var LT=ja(),as;(function(n){n.Continue=0,n.Cancelled=1})(as||(as={}));var lp=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=as.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,as.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};qi.SharedArraySenderStrategy=lp;var cp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===as.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},dp=class{constructor(e){this.token=new cp(e)}cancel(){}dispose(){}},hp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new LT.CancellationTokenSource:new dp(t)}};qi.SharedArrayReceiverStrategy=hp});var pp=w($a=>{"use strict";d();Object.defineProperty($a,"__esModule",{value:!0});$a.Semaphore=void 0;var qT=Cr(),up=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,qT.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};$a.Semaphore=up});var _y=w(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReadableStreamMessageReader=Jn.AbstractMessageReader=Jn.MessageReader=void 0;var fp=Cr(),Wi=Ai(),mp=Li(),WT=pp(),HT;(function(n){function e(t){let r=t;return r&&Wi.func(r.listen)&&Wi.func(r.dispose)&&Wi.func(r.onError)&&Wi.func(r.onClose)&&Wi.func(r.onPartialMessage)}n.is=e})(HT=Jn.MessageReader||(Jn.MessageReader={}));var Ba=class{constructor(){this.errorEmitter=new mp.Emitter,this.closeEmitter=new mp.Emitter,this.partialMessageEmitter=new mp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Wi.string(e.message)?e.message:"unknown"}`)}};Jn.AbstractMessageReader=Ba;var gp;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,fp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(gp||(gp={}));var bp=class extends Ba{constructor(e,t){super(),this.readable=e,this.options=gp.fromOptions(t),this.buffer=(0,fp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new WT.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,fp.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Jn.ReadableStreamMessageReader=bp});var Dy=w(Xn=>{"use strict";d();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WriteableStreamMessageWriter=Xn.AbstractMessageWriter=Xn.MessageWriter=void 0;var Ty=Cr(),ls=Ai(),UT=pp(),Ry=Li(),jT="Content-Length: ",Ey=`\r
|
|
2
2
|
`,$T;(function(n){function e(t){let r=t;return r&&ls.func(r.dispose)&&ls.func(r.onClose)&&ls.func(r.onError)&&ls.func(r.write)}n.is=e})($T=Xn.MessageWriter||(Xn.MessageWriter={}));var Va=class{constructor(){this.errorEmitter=new Ry.Emitter,this.closeEmitter=new Ry.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${ls.string(e.message)?e.message:"unknown"}`)}};Xn.AbstractMessageWriter=Va;var vp;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,Ty.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,Ty.default)().applicationJson.encoder}}n.fromOptions=e})(vp||(vp={}));var yp=class extends Va{constructor(e,t){super(),this.writable=e,this.options=vp.fromOptions(t),this.errorCount=0,this.writeSemaphore=new UT.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(jT,r.byteLength.toString(),Ey),i.push(Ey),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};Xn.WriteableStreamMessageWriter=yp});var Fy=w(Ga=>{"use strict";d();Object.defineProperty(Ga,"__esModule",{value:!0});Ga.AbstractMessageBuffer=void 0;var BT=13,VT=10,GT=`\r
|
|
3
3
|
`,wp=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let c=this._chunks[r];for(i=0;i<c.length;){switch(c[i]){case BT:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case VT:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=c.byteLength,r++}if(t!==4)return;let s=this._read(o+i),a=new Map,l=this.toString(s,"ascii").split(GT);if(l.length<2)return a;for(let c=0;c<l.length-2;c++){let h=l[c],p=h.indexOf(":");if(p===-1)throw new Error("Message header must separate key and value using :");let f=h.substr(0,p),b=h.substr(p+1).trim();a.set(e?f.toLowerCase():f,b)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};Ga.AbstractMessageBuffer=wp});var Ay=w(U=>{"use strict";d();Object.defineProperty(U,"__esModule",{value:!0});U.createMessageConnection=U.ConnectionOptions=U.MessageStrategy=U.CancellationStrategy=U.CancellationSenderStrategy=U.CancellationReceiverStrategy=U.RequestCancellationReceiverStrategy=U.IdCancellationReceiverStrategy=U.ConnectionStrategy=U.ConnectionError=U.ConnectionErrors=U.LogTraceNotification=U.SetTraceNotification=U.TraceFormat=U.TraceValues=U.Trace=U.NullLogger=U.ProgressType=U.ProgressToken=void 0;var Py=Cr(),Pe=Ai(),J=Yu(),My=ep(),cs=Li(),Sp=ja(),hs;(function(n){n.type=new J.NotificationType("$/cancelRequest")})(hs||(hs={}));var Iy;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(Iy=U.ProgressToken||(U.ProgressToken={}));var ds;(function(n){n.type=new J.NotificationType("$/progress")})(ds||(ds={}));var xp=class{constructor(){}};U.ProgressType=xp;var kp;(function(n){function e(t){return Pe.func(t)}n.is=e})(kp||(kp={}));U.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var fe;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(fe=U.Trace||(U.Trace={}));var KT;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(KT=U.TraceValues||(U.TraceValues={}));(function(n){function e(r){if(!Pe.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(fe=U.Trace||(U.Trace={}));var an;(function(n){n.Text="text",n.JSON="json"})(an=U.TraceFormat||(U.TraceFormat={}));(function(n){function e(t){return Pe.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(an=U.TraceFormat||(U.TraceFormat={}));var Ny;(function(n){n.type=new J.NotificationType("$/setTrace")})(Ny=U.SetTraceNotification||(U.SetTraceNotification={}));var Cp;(function(n){n.type=new J.NotificationType("$/logTrace")})(Cp=U.LogTraceNotification||(U.LogTraceNotification={}));var Ka;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Ka=U.ConnectionErrors||(U.ConnectionErrors={}));var Hi=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};U.ConnectionError=Hi;var zy;(function(n){function e(t){let r=t;return r&&Pe.func(r.cancelUndispatched)}n.is=e})(zy=U.ConnectionStrategy||(U.ConnectionStrategy={}));var Rp;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Pe.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Pe.func(r.dispose))}n.is=e})(Rp=U.IdCancellationReceiverStrategy||(U.IdCancellationReceiverStrategy={}));var Oy;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Pe.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Pe.func(r.dispose))}n.is=e})(Oy=U.RequestCancellationReceiverStrategy||(U.RequestCancellationReceiverStrategy={}));var _p;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new Sp.CancellationTokenSource}});function e(t){return Rp.is(t)||Oy.is(t)}n.is=e})(_p=U.CancellationReceiverStrategy||(U.CancellationReceiverStrategy={}));var Tp;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(hs.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Pe.func(r.sendCancellation)&&Pe.func(r.cleanup)}n.is=e})(Tp=U.CancellationSenderStrategy||(U.CancellationSenderStrategy={}));var Ep;(function(n){n.Message=Object.freeze({receiver:_p.Message,sender:Tp.Message});function e(t){let r=t;return r&&_p.is(r.receiver)&&Tp.is(r.sender)}n.is=e})(Ep=U.CancellationStrategy||(U.CancellationStrategy={}));var Dp;(function(n){function e(t){let r=t;return r&&Pe.func(r.handleMessage)}n.is=e})(Dp=U.MessageStrategy||(U.MessageStrategy={}));var JT;(function(n){function e(t){let r=t;return r&&(Ep.is(r.cancellationStrategy)||zy.is(r.connectionStrategy)||Dp.is(r.messageStrategy))}n.is=e})(JT=U.ConnectionOptions||(U.ConnectionOptions={}));var ln;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(ln||(ln={}));function XT(n,e,t,r){let i=t!==void 0?t:U.NullLogger,o=0,s=0,a=0,l="2.0",c,h=new Map,p,f=new Map,b=new Map,C,D=new My.LinkedMap,P=new Map,A=new Set,S=new Map,y=fe.Off,R=an.Text,N,q=ln.New,Se=new cs.Emitter,De=new cs.Emitter,Wt=new cs.Emitter,Dt=new cs.Emitter,kt=new cs.Emitter,Ct=r&&r.cancellationStrategy?r.cancellationStrategy:Ep.Message;function wr(v){if(v===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+v.toString()}function ni(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function Ht(){return"not-"+(++s).toString()}function Ft(v,E){J.Message.isRequest(E)?v.set(wr(E.id),E):J.Message.isResponse(E)?v.set(ni(E.id),E):v.set(Ht(),E)}function Sr(v){}function Ut(){return q===ln.Listening}function Rn(){return q===ln.Closed}function pt(){return q===ln.Disposed}function xr(){(q===ln.New||q===ln.Listening)&&(q=ln.Closed,De.fire(void 0))}function Zo(v){Se.fire([v,void 0,void 0])}function Mi(v){Se.fire(v)}n.onClose(xr),n.onError(Zo),e.onClose(xr),e.onError(Mi);function Ii(){C||D.size===0||(C=(0,Py.default)().timer.setImmediate(()=>{C=void 0,ku()}))}function Ni(v){J.Message.isRequest(v)?Cu(v):J.Message.isNotification(v)?Tu(v):J.Message.isResponse(v)?_u(v):Da(v)}function ku(){if(D.size===0)return;let v=D.shift();try{let E=r?.messageStrategy;Dp.is(E)?E.handleMessage(v,Ni):Ni(v)}finally{Ii()}}let ri=v=>{try{if(J.Message.isNotification(v)&&v.method===hs.type.method){let E=v.params.id,I=wr(E),H=D.get(I);if(J.Message.isRequest(H)){let ge=r?.connectionStrategy,Ne=ge&&ge.cancelUndispatched?ge.cancelUndispatched(H,Sr):void 0;if(Ne&&(Ne.error!==void 0||Ne.result!==void 0)){D.delete(I),S.delete(E),Ne.id=H.id,G(Ne,v.method,Date.now()),e.write(Ne).catch(()=>i.error("Sending response for canceled message failed."));return}}let xe=S.get(E);if(xe!==void 0){xe.cancel(),_t(v);return}else A.add(E)}Ft(D,v)}finally{Ii()}};function Cu(v){if(pt())return;function E(ce,Fe,me){let Be={jsonrpc:l,id:v.id};ce instanceof J.ResponseError?Be.error=ce.toJson():Be.result=ce===void 0?null:ce,G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}function I(ce,Fe,me){let Be={jsonrpc:l,id:v.id,error:ce.toJson()};G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}function H(ce,Fe,me){ce===void 0&&(ce=null);let Be={jsonrpc:l,id:v.id,result:ce};G(Be,Fe,me),e.write(Be).catch(()=>i.error("Sending response failed."))}Re(v);let xe=h.get(v.method),ge,Ne;xe&&(ge=xe.type,Ne=xe.handler);let Oe=Date.now();if(Ne||c){let ce=v.id??String(Date.now()),Fe=Rp.is(Ct.receiver)?Ct.receiver.createCancellationTokenSource(ce):Ct.receiver.createCancellationTokenSource(v);v.id!==null&&A.has(v.id)&&Fe.cancel(),v.id!==null&&S.set(ce,Fe);try{let me;if(Ne)if(v.params===void 0){if(ge!==void 0&&ge.numberOfParams!==0){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines ${ge.numberOfParams} params but received none.`),v.method,Oe);return}me=Ne(Fe.token)}else if(Array.isArray(v.params)){if(ge!==void 0&&ge.parameterStructures===J.ParameterStructures.byName){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,Oe);return}me=Ne(...v.params,Fe.token)}else{if(ge!==void 0&&ge.parameterStructures===J.ParameterStructures.byPosition){I(new J.ResponseError(J.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,Oe);return}me=Ne(v.params,Fe.token)}else c&&(me=c(v.method,v.params,Fe.token));let Be=me;me?Be.then?Be.then(mt=>{S.delete(ce),E(mt,v.method,Oe)},mt=>{S.delete(ce),mt instanceof J.ResponseError?I(mt,v.method,Oe):mt&&Pe.string(mt.message)?I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${mt.message}`),v.method,Oe):I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Oe)}):(S.delete(ce),E(me,v.method,Oe)):(S.delete(ce),H(me,v.method,Oe))}catch(me){S.delete(ce),me instanceof J.ResponseError?E(me,v.method,Oe):me&&Pe.string(me.message)?I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${me.message}`),v.method,Oe):I(new J.ResponseError(J.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Oe)}}else I(new J.ResponseError(J.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,Oe)}function _u(v){if(!pt())if(v.id===null)v.error?i.error(`Received response message without id: Error is:
|
|
4
4
|
${JSON.stringify(v.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let E=v.id,I=P.get(E);if(yT(v,I),I!==void 0){P.delete(E);try{if(v.error){let H=v.error;I.reject(new J.ResponseError(H.code,H.message,H.data))}else if(v.result!==void 0)I.resolve(v.result);else throw new Error("Should never happen.")}catch(H){H.message?i.error(`Response handler '${I.method}' failed with message: ${H.message}`):i.error(`Response handler '${I.method}' failed unexpectedly.`)}}}}function Tu(v){if(pt())return;let E,I;if(v.method===hs.type.method){let H=v.params.id;A.delete(H),_t(v);return}else{let H=f.get(v.method);H&&(I=H.handler,E=H.type)}if(I||p)try{if(_t(v),I)if(v.params===void 0)E!==void 0&&E.numberOfParams!==0&&E.parameterStructures!==J.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${E.numberOfParams} params but received none.`),I();else if(Array.isArray(v.params)){let H=v.params;v.method===ds.type.method&&H.length===2&&Iy.is(H[0])?I({token:H[0],value:H[1]}):(E!==void 0&&(E.parameterStructures===J.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),E.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${E.numberOfParams} params but received ${H.length} arguments`)),I(...H))}else E!==void 0&&E.parameterStructures===J.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),I(v.params);else p&&p(v.method,v.params)}catch(H){H.message?i.error(`Notification handler '${v.method}' failed with message: ${H.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else Wt.fire(v)}function Da(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-H2JU5BGK.js";import{p as m,v as a}from"./chunk-JGN7YG5X.js";import{ua as t}from"./chunk-3EQY5B4S.js";import{b as s}from"./chunk-S5JJL3BP.js";import{T as n}from"./chunk-BXDZX3BS.js";import{r as f}from"./chunk-T6CC5WUU.js";import{e as w,g as i}from"./chunk-VKWPEFWQ.js";i();var o=w(f(),1);var d,e=class extends a{async command(r,p,c,y,l){let u={environment:r.environment,force:r.force,noColor:r["no-color"],password:r.password,path:r.path,store:r.store,theme:n("creative"),unpublished:!0,listing:r.listing};t("theme-command:share"),await h(u,p,c,l),t("theme-command:share")}};d=e;e.summary="Creates a shareable, unpublished, and new theme on your theme library with a randomized name.";e.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.`;e.description=d.descriptionWithoutMarkdown();e.flags={...s,...m,force:o.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:o.Flags.string({description:"The listing preset to use for multi-preset themes. Applies preset files from listings/[preset-name] directory.",env:"SHOPIFY_FLAG_LISTING"})};e.multiEnvironmentsFlags=["store","password","path"];var I=e;export{I as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as u}from"./chunk-
|
|
1
|
+
import{n as u}from"./chunk-3EQY5B4S.js";import{b as g}from"./chunk-S5JJL3BP.js";import{b as y}from"./chunk-74IG3ZE3.js";import{d as r}from"./chunk-AUZCENYI.js";import{Lb as v,Mb as w,ua as l,wa as m}from"./chunk-BXDZX3BS.js";import{f as p,i as h}from"./chunk-773TIA5M.js";import{r as R}from"./chunk-T6CC5WUU.js";import{e as A,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",L="X-Shopify-Surface",E="cli",F=["shopify.dev"];async function S(t,e){let c;try{c=new URL(t)}catch{throw new r(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new r(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await u(t,{headers:{Accept:U,[L]:E}});if(!i.ok)throw new r(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let f=await i.text();if(e){let o=p(e);await m(h(o)),await l(o,f),w(`Saved ${t} to ${o}`);return}v(f)}var n=A(R(),1),a=class t extends y{static{this.description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. For finding the relevant pieces of content across shopify.dev instead, use `doc search`."}static{this.examples=[`# fetch the Markdown version of a Shopify.dev page
|
|
2
2
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli`,`# save the document to a file instead of printing it
|
|
3
3
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --output docs/shopify-cli.md`]}static{this.flags={...g,url:n.Flags.string({description:"The shopify.dev URL to fetch.",env:"SHOPIFY_FLAG_URL",required:!0}),output:n.Flags.string({description:"Write the document to this file path instead of printing it to stdout.",env:"SHOPIFY_FLAG_OUTPUT"})}}async run(){let{flags:e}=await this.parse(t);await S(e.url,e.output)}};export{a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as qr}from"./chunk-KSZ5K6LJ.js";import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ir}from"./chunk-H6WN7GP4.js";import{a as Lr}from"./chunk-Z4LC3WE5.js";import{a as Mr}from"./chunk-4TST2MNC.js";import{a as kr}from"./chunk-J7UQBC45.js";import{a as Dr}from"./chunk-X4DIJTIK.js";import{b as Fr}from"./chunk-TKG42KLM.js";import{a as Or}from"./chunk-MFLQRQQT.js";import{a as Nr}from"./chunk-B7S23DLF.js";import{a as Pr}from"./chunk-FA4K3JRN.js";import{a as Er}from"./chunk-NADNFSKS.js";import{a as br}from"./chunk-PZYP3MCL.js";import{a as Sr}from"./chunk-DO2SHYFU.js";import{a as Ur}from"./chunk-6DIHOMCB.js";import{a as Rr}from"./chunk-LOHUNOQ7.js";import{a as Tr,b as Ar,c as _r,d as Cr}from"./chunk-OORCODNK.js";import{a as $r}from"./chunk-DQ4HA72R.js";import{g as xr}from"./chunk-2NWWMNU5.js";import{a as Lo,b as ko}from"./chunk-733R5OKQ.js";import{a as gr}from"./chunk-YGKQCEVG.js";import{a as vr}from"./chunk-HZSAUZBX.js";import{a as gt}from"./chunk-J3HXFQ2L.js";import{a as yr}from"./chunk-CZXGQ53M.js";import{c as ht,m as wt}from"./chunk-6YPEONHB.js";import{b as wr,g as je,j as ft}from"./chunk-PJYNAUQB.js";import{c as Yo}from"./chunk-NWDP5IZ2.js";import{a as fr,b as hr,c as Ye,d as Co,e as Pt,f as Io,g as Do}from"./chunk-CPE7XCC6.js";import{a as O,b as mt}from"./chunk-O6KTFMCD.js";import{a as cr,b as lr,d as Ee,f as pr,m as Ge,n as ee,s as W,u as ur,v as dr,w as mr}from"./chunk-Q7BOSHWX.js";import{c as Wr}from"./chunk-G2I2ZUBV.js";import{a as ir}from"./chunk-ZEENHLSC.js";import{a as bo,b as vt,c as te,d as So}from"./chunk-5JNEWYD5.js";import{a as $o,f as Mo,g as Fo,h as xt,i as Oo,j as No,k as qo,l as Wo,m as Ho,n as Bo,o as Go,p as jo,q as Ko,v as zo,x as Vo,z as Et}from"./chunk-6RL7FUPD.js";import{a as Uo,b as Ro,c as To,d as Ao,e as _o}from"./chunk-73W5BGAZ.js";import{a as Br}from"./chunk-2MMGFZDP.js";import{a as Eo}from"./chunk-JOZXRV5K.js";import{a as xo}from"./chunk-HM5H7WBE.js";import{a as Hr}from"./chunk-ZAMDXIVC.js";import{a as Qe}from"./chunk-U73TPLFE.js";import{Aa as Ve,F as no,Fa as Po,H as so,J as fe,R as ao,U as uo,V as mo,Z as fo,aa as ho,fa as go,g as Gr,i as Kr,ia as wo,j as zr,ja as yo,k as J,ka as vo,l as Vr,n as Yr,o as Qr,r as yt,s as Jr,u as Xr,v as Zr,w as eo,x as to,y as ro,z as oo,za as ze}from"./chunk-ATXODH6C.js";import{O as io,P as co,Z as lo,ca as po,e as Ke,j as be,p as jr}from"./chunk-442S5SDM.js";import{c as sr}from"./chunk-J2WCMQZZ.js";import{a as H}from"./chunk-J5TNYNR5.js";import{$ as Yt,N as Vt,Z as de,a as Wt,c as Ht,h as Bt,l as Gt,n as jt,q as Kt,t as zt,ta as Qt,u as ke,z as De}from"./chunk-5W443CKL.js";import{b as ar,d as Be}from"./chunk-H5C3QTOO.js";import{a as lt,c as qt}from"./chunk-5C7HDTHJ.js";import{D as Ne,H as Zt,J as Z,O as qe,P as xe,Q as dt,R as tr,T as rr,a as Nt,i as pt,j as $e,k as M,l as F,m as Me,n as ut,o as Xt,p as Fe,u as Oe,w as ne}from"./chunk-6EZ7JWBK.js";import{a as Zn}from"./chunk-7UNQOKZW.js";import{d as Jt}from"./chunk-WRRUFK4Y.js";import{d as _,g as me,l as er}from"./chunk-WKBVT5WG.js";import{$a as ve,Ea as Dt,Fb as U,Gb as nr,Hb as R,Mb as Q,Na as Ie,Pb as y,Q as ct,Qb as k,Ta as X,Wa as Le,cb as $t,eb as Pe,fb as L,gb as S,jb as le,kb as pe,ma as I,mb as Ft,nb as Ot,tb as ue,ua as _e,wa as Ce}from"./chunk-DONEJHDG.js";import{d as or,f as We,j as He}from"./chunk-KKUDXLK2.js";import{a as Re}from"./chunk-NNOSZ447.js";import{d as T,f as it,g as Te,i as ce,j as Lt,k as Ae,o as kt,p as ye}from"./chunk-773TIA5M.js";import{r as Xn}from"./chunk-T6CC5WUU.js";import{e as oe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var es=300*1e3,ts='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Qo(t,e,r=Date.now()){for(;await rs(t,e,r););}async function rs(t,e,r){let o=await je(t,e);if(!o||os(o,r))throw new _(ts);return await xe(3),o.processing}function os(t,e){return t.processing&&Date.now()-e>=es}var ns="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",ss="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",bt=3,Je=class extends yr{constructor(e,r={devPreview:!1}){super(e),this.context="App Ext. Host",this.themeId=Tr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??(e=this.devPreview?await this.createHostTheme():await this.create()),e}setTheme(e){Ar(this.adminSession.storeFqdn,e)}removeTheme(){_r(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:wr,name:this.generateThemeName(this.context),src:ns};for(let o=0;o<bt;o++){y(`Attempt ${o}/${bt}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await ft(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),y(`Waiting for theme with id "${n.id}" to be processed`),await Qo(n.id,this.adminSession),n;throw new Error}catch{y(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}y(`Theme creation failed after ${bt} retries. Creating theme using fallback theme zip`);let r=await ft({...e,src:ss},this.adminSession);if(!r)throw y("Theme creation failed. Exiting process."),new me(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var as={"theme:init":Ur,"theme:check":gr,"theme:console":vr,"theme:delete":Pr,"theme:dev":Er,"theme:duplicate":br,"theme:info":Sr,"theme:language-server":Rr,"theme:list":Cr,"theme:metafields:pull":$r,"theme:open":Ir,"theme:package":Lr,"theme:profile":kr,"theme:publish":Dr,"theme:preview":Mr,"theme:pull":Fr,"theme:push":Or,"theme:rename":Nr,"theme:share":qr},oi=as;async function Jo(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(v=>v.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[l,u]=await Promise.all([Vt(t.storeFqdn),ls(e)]),c=l.storeFqdn,[m,h]=await Promise.all([wt(l),ht(l)]),g=h?await gt(void 0,c,m):void 0,d=await cs(l,t.theme),f=d.id.toString();return Oe({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:u}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${c}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:is,options:{theme:d,adminSession:l,storefrontPassword:g,crawlerSignatureHeaders:m,themeExtensionDirectory:a,themeExtensionPort:i}}}var is=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await xr(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function cs(t,e){let r;if(e)y(`Fetching theme with provided id ${e}`),r=await je(parseInt(e,10),t);else{let o=new Je(t,{devPreview:!0});await Ne([{title:"Configuring host theme for theme app extension",task:async()=>{y("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new _("Could not find or create a host theme for theme app extensions");return r}async function ls(t){return t.developerPlatformClient?.clientName===lo.AppManagement?`https://${await ke()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await zt()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function ps(t){let e=T(t.directory,"locales");return Le([T(e,"*.json")])}async function Xo(t,e){let r=await ps(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),us(a,s,o,t,e)})),o.lastUpdated=Date.now(),y(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function us(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw k(i,n.stderr),new er.ExtendableError(i)}}p();function Xe(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}async function he(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Xo(t,r),l=await Vr(t),u=t.outputRelativePath?ce(n):n,c=await ds(t,s,u,o),m=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(m=t.configuration.metafields),{assets:{main:Se(c)&&c[0]?.assets?.main?c[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await Ie(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:Xe(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:c,localization:a??null,metafields:m,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:l?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function ds(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),Se(s)){let a=await ms(r);return Promise.all(s.map(async i=>{let{target:l,resource:u}=i,c={...i,surface:Ve(l),root:{url:`${e}/${l}`},resource:u||{url:""}},m=a?.[l];if(!m)return c;let g=await ys(m,{target:l,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...c,...g}}))}return s}async function ms(t){try{let e=T(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function fs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,l=e[s];if(typeof l=="string"){let g=await Ze(s,i,typeof a=="string"?a:l,r,o,n,typeof a=="string"?l:void 0);return{assets:{[g.name]:g}}}let c=e.build_manifest?.assets?.[s];if(c?.filepath){let m=await Ze(s,i,c.filepath,r,o,n,c.module);return{assets:{[m.name]:m}}}return{}}async function hs({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await Ie(T(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function gs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,l)=>{let u=i.schema,c=s[l]?.schema,m=typeof c=="string"?c:u,h=typeof c=="string"?u:void 0;return{...i,schema:await Ze("schema",`${t}/intents/${l}/schema`,m,r,o,n,h)}}))}:{}}async function ws({target:t,url:e,extension:r,resolver:o},n,s){let a=await Ze(n,`${t}/${n}`,s,e,r,o);return{assets:{[a.name]:a}}}async function ys(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return vs(o,n)?gs(e,n):Ps(o,n)?ws(e,o,n):xs(o,n)?hs(e,o,n):fs(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Se(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Ze(t,e,r,o,n,s,a){let i=`${e}${Ae(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await Ie(T(n.directory,a??r))??0}}function vs(t,e){return t==="intents"&&Array.isArray(e)}function Ps(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function xs(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as Es}from"events";var Ue;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(Ue||(Ue={}));async function Zo(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:Ye(t.storeFqdn,t.apiKey),mobileUrl:Io(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>he(n,e,t,r&&St(r,n.devUUID))))}}function St(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var et=class extends Es{constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=de(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(Se(n.extensionPoints)&&Se(o.extensionPoints)){let s=n.extensionPoints.reduce((l,u)=>({...l,[u.target]:u}),{});o.extensionPoints=de(o.extensionPoints,n.extensionPoints,l=>l.map(u=>{let c=s[u.target];return c?de(u,c,(m,h)=>h):u}));let{extensionPoints:a,...i}=n;return de(o,i)}return de(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){y(R`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await he(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},St(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await he(e,r,this.options,St(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(Ue.Update,e)}};p();p();var se;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(se||(se={}));function en(t,e){return(r,o,n)=>{r.url==="/extensions"&&(y("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,bs(t,e)))}}function bs(t,e){return r=>{y("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};y(R`Sending connected payload: ${U.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",As(t,e))}}function Ss(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?U.json(o).output():String(o)).join(" ");return R`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var Us={debug:t=>U.gray(t),warn:t=>U.yellow(t),error:t=>U.errorText(t)};function Rs({type:t,message:e}){let r=Ss(e);switch(t){case"debug":case"warn":case"error":return R`${Us[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function Ts(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(Rs(t))})}function As(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(y(R`Received websocket message with event type ${n} and data:
|
|
1
|
+
import{a as qr}from"./chunk-VUACOGOX.js";import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ir}from"./chunk-5EVFLUUA.js";import{a as Lr}from"./chunk-B367FOQA.js";import{a as Mr}from"./chunk-RBOYWA2D.js";import{a as kr}from"./chunk-QHWF3S7U.js";import{a as Dr}from"./chunk-4LML2QWN.js";import{b as Fr}from"./chunk-QJL3SXYA.js";import{a as Or}from"./chunk-PFEC2NUB.js";import{a as Nr}from"./chunk-DKVU7LYY.js";import{a as Pr}from"./chunk-QAM7VCLV.js";import{a as Er}from"./chunk-UTLRP527.js";import{a as br}from"./chunk-Z66NZ2HC.js";import{a as Sr}from"./chunk-JC3PRJJS.js";import{a as Ur}from"./chunk-XA5JA7DK.js";import{a as Rr}from"./chunk-VNYKNAT5.js";import{a as Tr,b as Ar,c as _r,d as Cr}from"./chunk-2IPVQRMI.js";import{a as $r}from"./chunk-6I3FNLT3.js";import{g as xr}from"./chunk-235JVI2J.js";import{a as Lo,b as ko}from"./chunk-DQOS54HN.js";import{a as gr}from"./chunk-AP6FNGTA.js";import{a as vr}from"./chunk-FA25RL4G.js";import{a as gt}from"./chunk-52H2R2FU.js";import{a as yr}from"./chunk-FJOEHMXM.js";import{c as ht,m as wt}from"./chunk-XZWAX4FI.js";import{b as wr,g as je,j as ft}from"./chunk-7ZIO3X22.js";import{c as Yo}from"./chunk-ROQXPIEZ.js";import{a as fr,b as hr,c as Ye,d as Co,e as Pt,f as Io,g as Do}from"./chunk-IE4SSSXU.js";import{a as O,b as mt}from"./chunk-BCEWCYZD.js";import{a as cr,b as lr,d as Ee,f as pr,m as Ge,n as ee,s as W,u as ur,v as dr,w as mr}from"./chunk-Q7BOSHWX.js";import{c as Wr}from"./chunk-UFGDNIYX.js";import{a as ir}from"./chunk-6LTJMYUD.js";import{a as bo,b as vt,c as te,d as So}from"./chunk-57IRHKV3.js";import{a as $o,f as Mo,g as Fo,h as xt,i as Oo,j as No,k as qo,l as Wo,m as Ho,n as Bo,o as Go,p as jo,q as Ko,v as zo,x as Vo,z as Et}from"./chunk-ZKBWEHIY.js";import{a as Uo,b as Ro,c as To,d as Ao,e as _o}from"./chunk-UTPJAU5S.js";import{a as Br}from"./chunk-KZDI2BXR.js";import{a as Eo}from"./chunk-E4GW6OXT.js";import{a as xo}from"./chunk-PLHJQQVZ.js";import{a as Hr}from"./chunk-6V37CHBZ.js";import{a as Qe}from"./chunk-BBATKR3B.js";import{Aa as Ve,F as no,Fa as Po,H as so,J as fe,R as ao,U as uo,V as mo,Z as fo,aa as ho,fa as go,g as Gr,i as Kr,ia as wo,j as zr,ja as yo,k as J,ka as vo,l as Vr,n as Yr,o as Qr,r as yt,s as Jr,u as Xr,v as Zr,w as eo,x as to,y as ro,z as oo,za as ze}from"./chunk-KJQAJUDU.js";import{O as io,P as co,Z as lo,ca as po,e as Ke,j as be,p as jr}from"./chunk-UEC23KAO.js";import{c as sr}from"./chunk-NJLSZS27.js";import{a as H}from"./chunk-2MDFREEW.js";import{$ as Yt,N as Vt,Z as de,a as Wt,c as Ht,h as Bt,l as Gt,n as jt,q as Kt,t as zt,ta as Qt,u as ke,z as De}from"./chunk-3EQY5B4S.js";import{b as ar,d as Be}from"./chunk-S5JJL3BP.js";import{a as lt,c as qt}from"./chunk-5C7HDTHJ.js";import{D as Ne,H as Zt,J as Z,O as qe,P as xe,Q as dt,R as tr,T as rr,a as Nt,i as pt,j as $e,k as M,l as F,m as Me,n as ut,o as Xt,p as Fe,u as Oe,w as ne}from"./chunk-YYLEWVO6.js";import{a as Zn}from"./chunk-7UNQOKZW.js";import{d as Jt}from"./chunk-N5U5Q2MG.js";import{d as _,g as me,l as er}from"./chunk-AUZCENYI.js";import{$a as ve,Ea as Dt,Fb as U,Gb as nr,Hb as R,Mb as Q,Na as Ie,Pb as y,Q as ct,Qb as k,Ta as X,Wa as Le,cb as $t,eb as Pe,fb as L,gb as S,jb as le,kb as pe,ma as I,mb as Ft,nb as Ot,tb as ue,ua as _e,wa as Ce}from"./chunk-BXDZX3BS.js";import{d as or,f as We,j as He}from"./chunk-MGPLKG23.js";import{a as Re}from"./chunk-NNOSZ447.js";import{d as T,f as it,g as Te,i as ce,j as Lt,k as Ae,o as kt,p as ye}from"./chunk-773TIA5M.js";import{r as Xn}from"./chunk-T6CC5WUU.js";import{e as oe,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var es=300*1e3,ts='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Qo(t,e,r=Date.now()){for(;await rs(t,e,r););}async function rs(t,e,r){let o=await je(t,e);if(!o||os(o,r))throw new _(ts);return await xe(3),o.processing}function os(t,e){return t.processing&&Date.now()-e>=es}var ns="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",ss="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",bt=3,Je=class extends yr{constructor(e,r={devPreview:!1}){super(e),this.context="App Ext. Host",this.themeId=Tr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??(e=this.devPreview?await this.createHostTheme():await this.create()),e}setTheme(e){Ar(this.adminSession.storeFqdn,e)}removeTheme(){_r(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:wr,name:this.generateThemeName(this.context),src:ns};for(let o=0;o<bt;o++){y(`Attempt ${o}/${bt}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await ft(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),y(`Waiting for theme with id "${n.id}" to be processed`),await Qo(n.id,this.adminSession),n;throw new Error}catch{y(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}y(`Theme creation failed after ${bt} retries. Creating theme using fallback theme zip`);let r=await ft({...e,src:ss},this.adminSession);if(!r)throw y("Theme creation failed. Exiting process."),new me(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var as={"theme:init":Ur,"theme:check":gr,"theme:console":vr,"theme:delete":Pr,"theme:dev":Er,"theme:duplicate":br,"theme:info":Sr,"theme:language-server":Rr,"theme:list":Cr,"theme:metafields:pull":$r,"theme:open":Ir,"theme:package":Lr,"theme:profile":kr,"theme:publish":Dr,"theme:preview":Mr,"theme:pull":Fr,"theme:push":Or,"theme:rename":Nr,"theme:share":qr},oi=as;async function Jo(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(v=>v.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[l,u]=await Promise.all([Vt(t.storeFqdn),ls(e)]),c=l.storeFqdn,[m,h]=await Promise.all([wt(l),ht(l)]),g=h?await gt(void 0,c,m):void 0,d=await cs(l,t.theme),f=d.id.toString();return Oe({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:u}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${c}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:is,options:{theme:d,adminSession:l,storefrontPassword:g,crawlerSignatureHeaders:m,themeExtensionDirectory:a,themeExtensionPort:i}}}var is=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await xr(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function cs(t,e){let r;if(e)y(`Fetching theme with provided id ${e}`),r=await je(parseInt(e,10),t);else{let o=new Je(t,{devPreview:!0});await Ne([{title:"Configuring host theme for theme app extension",task:async()=>{y("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new _("Could not find or create a host theme for theme app extensions");return r}async function ls(t){return t.developerPlatformClient?.clientName===lo.AppManagement?`https://${await ke()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await zt()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function ps(t){let e=T(t.directory,"locales");return Le([T(e,"*.json")])}async function Xo(t,e){let r=await ps(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),us(a,s,o,t,e)})),o.lastUpdated=Date.now(),y(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function us(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw k(i,n.stderr),new er.ExtendableError(i)}}p();function Xe(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}async function he(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Xo(t,r),l=await Vr(t),u=t.outputRelativePath?ce(n):n,c=await ds(t,s,u,o),m=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(m=t.configuration.metafields),{assets:{main:Se(c)&&c[0]?.assets?.main?c[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await Ie(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:Xe(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:c,localization:a??null,metafields:m,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:l?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function ds(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),Se(s)){let a=await ms(r);return Promise.all(s.map(async i=>{let{target:l,resource:u}=i,c={...i,surface:Ve(l),root:{url:`${e}/${l}`},resource:u||{url:""}},m=a?.[l];if(!m)return c;let g=await ys(m,{target:l,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...c,...g}}))}return s}async function ms(t){try{let e=T(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function fs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,l=e[s];if(typeof l=="string"){let g=await Ze(s,i,typeof a=="string"?a:l,r,o,n,typeof a=="string"?l:void 0);return{assets:{[g.name]:g}}}let c=e.build_manifest?.assets?.[s];if(c?.filepath){let m=await Ze(s,i,c.filepath,r,o,n,c.module);return{assets:{[m.name]:m}}}return{}}async function hs({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await Ie(T(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function gs({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,l)=>{let u=i.schema,c=s[l]?.schema,m=typeof c=="string"?c:u,h=typeof c=="string"?u:void 0;return{...i,schema:await Ze("schema",`${t}/intents/${l}/schema`,m,r,o,n,h)}}))}:{}}async function ws({target:t,url:e,extension:r,resolver:o},n,s){let a=await Ze(n,`${t}/${n}`,s,e,r,o);return{assets:{[a.name]:a}}}async function ys(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return vs(o,n)?gs(e,n):Ps(o,n)?ws(e,o,n):xs(o,n)?hs(e,o,n):fs(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Se(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Ze(t,e,r,o,n,s,a){let i=`${e}${Ae(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await Ie(T(n.directory,a??r))??0}}function vs(t,e){return t==="intents"&&Array.isArray(e)}function Ps(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function xs(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as Es}from"events";var Ue;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(Ue||(Ue={}));async function Zo(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:Ye(t.storeFqdn,t.apiKey),mobileUrl:Io(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>he(n,e,t,r&&St(r,n.devUUID))))}}function St(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var et=class extends Es{constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=de(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(Se(n.extensionPoints)&&Se(o.extensionPoints)){let s=n.extensionPoints.reduce((l,u)=>({...l,[u.target]:u}),{});o.extensionPoints=de(o.extensionPoints,n.extensionPoints,l=>l.map(u=>{let c=s[u.target];return c?de(u,c,(m,h)=>h):u}));let{extensionPoints:a,...i}=n;return de(o,i)}return de(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){y(R`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await he(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},St(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await he(e,r,this.options,St(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(Ue.Update,e)}};p();p();var se;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(se||(se={}));function en(t,e){return(r,o,n)=>{r.url==="/extensions"&&(y("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,bs(t,e)))}}function bs(t,e){return r=>{y("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};y(R`Sending connected payload: ${U.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",As(t,e))}}function Ss(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?U.json(o).output():String(o)).join(" ");return R`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var Us={debug:t=>U.gray(t),warn:t=>U.yellow(t),error:t=>U.errorText(t)};function Rs({type:t,message:e}){let r=Ss(e);switch(t){case"debug":case"warn":case"error":return R`${Us[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function Ts(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(Rs(t))})}function As(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(y(R`Received websocket message with event type ${n} and data:
|
|
2
2
|
${U.json(s)}
|
|
3
3
|
`,e.stdout),n===se.Update){let a=e.payloadStore.getRawPayload().app.apiKey,i=s.app?.apiKey;if(s.app){if(a!==i)return;e.payloadStore.updateApp(s.app)}s.extensions&&e.payloadStore.updateExtensions(s.extensions)}else if(n===se.Dispatch){let a=_s(o,e);rn(t,a,e)}else n===se.Log&&Ts(s,e)}}function tn(t,e){return r=>{let o={event:se.Update,version:e.manifestVersion,data:{...e.payloadStore.getRawPayloadFilteredByExtensionIds(r)}};y(R`Sending websocket update event to the websocket clients:
|
|
4
4
|
${U.json(o)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,d as t,l as h}from"./chunk-
|
|
1
|
+
import{c as u,d as t,l as h}from"./chunk-AUZCENYI.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();var o=e=>new a(e),s=e=>new n(e),a=class{constructor(r){this.value=r}isErr(){return!1}doOnOk(r){return r(this.value),o(this.value)}valueOrBug(){return this.value}valueOrAbort(){return this.value}map(r){return o(r(this.value))}mapError(r){return o(this.value)}},n=class{constructor(r){this.error=r}isErr(){return!0}doOnOk(r){return s(this.error)}valueOrBug(){throw this.error}valueOrAbort(){if(this.error instanceof u)throw this.error;if(this.error instanceof h.ExtendableError||this.error instanceof Error){let r=new t(this.error.message);throw r.stack=this.error.stack,r}else throw new t(`${this.error}`)}map(r){return s(this.error)}mapError(r){return s(r(this.error))}};export{o as a,s as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-E4GW6OXT.js";import{Fa as D}from"./chunk-KJQAJUDU.js";import{b as u,d as B}from"./chunk-TGM7L6RV.js";import{g as W,n as y}from"./chunk-3EQY5B4S.js";import{E as N,P as F,x as A}from"./chunk-YYLEWVO6.js";import{d as s,g as C}from"./chunk-AUZCENYI.js";import{Fb as m,Hb as o,Ta as _,ma as T}from"./chunk-BXDZX3BS.js";import{e as z,g as t}from"./chunk-VKWPEFWQ.js";t();var b=z(W(),1);function H(e){return e.startsWith("gid://")?e:/^\d+$/.test(e)?`gid://shopify/BulkOperation/${e}`:e}function J(e){return e.match(/^gid:\/\/shopify\/BulkOperation\/(\d+)$/)?.[1]??e}function g(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}if(n.definitions.filter(i=>i.kind==="OperationDefinition").length!==1)throw new s("GraphQL document must contain exactly one operation definition. Multiple operations are not supported.")}function X(e){let n;try{n=(0,b.parse)(e)}catch(i){throw i instanceof Error?new s(`Invalid GraphQL syntax: ${i.message}`):i}return n.definitions.find(i=>i.kind==="OperationDefinition")?.operation==="mutation"}async function Y(e){let{adminSession:n,userSpecifiedVersion:a,minimumDefaultVersion:i}=e;if(a==="unstable")return a;let r=await B(n);if(!a){let c=r.filter(v=>v.supported).map(v=>v.handle);i&&c.push(i);let f=c.sort().reverse()[0];if(!f)throw new s("No supported API versions available for this store.");return f}let l=r.map(c=>c.handle);if(l.includes(a))return a;let d=o`Invalid API version: ${a}`.value,k=o`Allowed versions: ${l.join(", ")}`.value;throw new s(d,k)}t();t();var p="2026-01";t();async function E(e){let n;if(e.query!==void 0){if(!e.query.trim())throw new s("The --query flag value is empty. Please provide a valid GraphQL query or mutation.");n=e.query}else if(e.queryFile){if(!await _(e.queryFile))throw new s(o`Query file not found at ${m.path(e.queryFile)}. Please check the path and try again.`);let a=await T(e.queryFile,{encoding:"utf8"});if(!a.trim())throw new s(o`Query file at ${m.path(e.queryFile)} is empty. Please provide a valid GraphQL query or mutation.`);n=a}else throw new C("Query should have been provided via --query or --query-file flags due to exactlyOne constraint. This indicates the oclif flag validation failed.");return g(n),n}t();t();var R={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunQuery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function Z(e){let{adminSession:n,query:a,version:i}=e;return(await u({query:R,session:n,variables:{query:a},...i&&{version:i}})).bulkOperationRunQuery}t();t();t();var L={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StagedUploadsCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"StagedUploadInput"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedUploadsCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"stagedTargets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"resourceUrl"}},{kind:"Field",name:{kind:"Name",value:"parameters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"value"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function h(e){let{adminSession:n,variablesJsonl:a}=e,i=Buffer.from(a??"","utf-8"),r="bulk-variables.jsonl",l=i.length,d=await ee(n,r,l),k=ne(d);return await ie(i,k.url,k.parameters,r),k.stagedUploadKey}async function ee(e,n,a){return u({query:L,session:e,variables:{input:[{filename:n,fileSize:a.toString(),httpMethod:"POST",mimeType:"text/jsonl",resource:"BULK_MUTATION_VARIABLES"}]}})}function ne(e){if(!e.stagedUploadsCreate)throw new s("No response received from stagedUploadsCreate mutation");if(e.stagedUploadsCreate.userErrors.length>0){let i=e.stagedUploadsCreate.userErrors.map(r=>r.message).join(", ");throw new s(`Failed to create staged upload: ${i}`)}let n=e.stagedUploadsCreate.stagedTargets?.[0];if(!n)throw new s("No staged upload target returned from Shopify");if(!n.url||!n.resourceUrl)throw new s("Invalid staged upload target: missing required URLs");let a=n.parameters.find(i=>i.name==="key")?.value;if(!a)throw new s("No key parameter found in staged upload target");return{url:n.url,resourceUrl:n.resourceUrl,parameters:n.parameters,stagedUploadKey:a}}async function ie(e,n,a,i){let r=new FormData;for(let d of a)r.append(d.name,d.value);r.append("file",new Blob([new Uint8Array(e)],{type:"text/jsonl"}),i);let l=await N({title:o`Uploading bulk operation variables`,task:async()=>y(n,{method:"POST",body:r},"slow-request"),renderOptions:{stdout:process.stderr}});if(!l.ok){let d=await l.text();throw new s(`Failed to upload file to staged URL: ${l.statusText}
|
|
2
2
|
${d}`)}}t();var U={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationRunMutation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"mutation"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationRunMutation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"mutation"},value:{kind:"Variable",name:{kind:"Name",value:"mutation"}}},{kind:"Argument",name:{kind:"Name",value:"stagedUploadPath"},value:{kind:"Variable",name:{kind:"Name",value:"stagedUploadPath"}}},{kind:"Argument",name:{kind:"Name",value:"clientIdentifier"},value:{kind:"Variable",name:{kind:"Name",value:"clientIdentifier"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function ae(e){let{adminSession:n,query:a,variablesJsonl:i,version:r}=e,l=await h({adminSession:n,variablesJsonl:i});return(await u({query:U,session:n,variables:{mutation:a,stagedUploadPath:l},...r&&{version:r}})).bulkOperationRunMutation}t();t();var S={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetBulkOperationById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};t();var q={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListBulkOperations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sortKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BulkOperationsSortKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"sortKey"},value:{kind:"Variable",name:{kind:"Name",value:"sortKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function te(e){let{adminSession:n,operationId:a,version:i}=e;return(await u({query:S,session:n,variables:{id:a},version:i??p})).bulkOperation}async function re(e){let{adminSession:n,version:a,sinceDays:i=7,first:r=100}=e,l=new Date(Date.now()-i*24*60*60*1e3).toISOString().split("T")[0];return(await u({query:q,session:n,variables:{query:`created_at:>=${l}`,first:r,sortKey:"CREATED_AT"},version:a??p})).bulkOperations.nodes}t();t();var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BulkOperationCancel"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperationCancel"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bulkOperation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"completedAt"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"fileSize"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"objectCount"}},{kind:"Field",name:{kind:"Name",value:"partialDataUrl"}},{kind:"Field",name:{kind:"Name",value:"query"}},{kind:"Field",name:{kind:"Name",value:"rootObjectCount"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};async function oe(e){let{adminSession:n,operationId:a,version:i}=e;return(await u({query:P,session:n,variables:{id:a},version:i??p})).bulkOperationCancel}t();t();function O(e){switch(e.status){case"RUNNING":return o`Bulk operation in progress${e.objectCount>0?m.gray(` (${String(e.objectCount)} objects ${e.type==="MUTATION"?"written":"read"})`):""}`;case"CREATED":return o`Starting`;case"COMPLETED":return o`Bulk operation succeeded: ${m.gray(`${String(e.objectCount)} objects`)}`;case"FAILED":return o`Bulk operation failed. ${m.errorText(`Error: ${e.errorCode??"unknown"}`)}`;case"CANCELING":return o`Bulk operation canceling...`;case"CANCELED":return o`Bulk operation canceled.`;case"EXPIRED":return o`Bulk operation expired.`;default:return o`Bulk operation status: ${e.status}`}}function le(e,n){let a=e.map(i=>o`${i.field?.join(".")??"unknown"}: ${i.message}`.value).join(`
|
|
3
3
|
`);A({headline:n,body:a})}function de(e){let n=O(e).value;switch(e.status){case"CANCELING":return{headline:"Bulk operation is being cancelled.",renderType:"success"};case"CANCELED":case"COMPLETED":case"FAILED":{let a=[o`ID: ${m.cyan(e.id)}`.value,o`Status: ${m.yellow(e.status)}`.value,o`Created at: ${m.gray(String(e.createdAt))}`.value,...e.completedAt?[o`Completed at: ${m.gray(String(e.completedAt))}`.value]:[]];return{headline:o`Bulk operation is already ${e.status.toLowerCase()}.`.value,body:o`This operation has already finished and can't be canceled.`.value,customSections:[{body:[{list:{items:a}}]}],renderType:"warning"}}case"CREATED":case"EXPIRED":case"RUNNING":return{headline:n,renderType:"info"}}}var se=["COMPLETED","FAILED","CANCELED","EXPIRED"],V=1,ue=5,M=10,$=3e3,Q=300;async function me(e,n){return N({title:o`Starting bulk operation`,task:async()=>{let a=Date.now(),i=j({adminSession:e,operationId:n,pollIntervalSeconds:Q/1e3,useAdaptivePolling:!1}),r;do{let{value:l,done:d}=await i.next();if(r=l,d)return r}while(Date.now()-a<$);return r},renderOptions:{stdout:process.stderr}})}async function ke(e,n,a,i){return N({title:o`Polling bulk operation`,task:async r=>{let l=j({adminSession:e,operationId:n,pollIntervalSeconds:ue,initialPollIntervalSeconds:V,initialPollCount:M,useAdaptivePolling:!0,abortSignal:a});for(;;){let{value:d,done:k}=await l.next();if(k)return d;r(O(d))}},onAbort:i,renderOptions:{stdout:process.stderr}})}async function*j({adminSession:e,operationId:n,pollIntervalSeconds:a,useAdaptivePolling:i=!1,initialPollIntervalSeconds:r=V,initialPollCount:l=M,abortSignal:d}){let k=0;for(;;){let c=await pe(e,n);if(!c.bulkOperation)throw new Error("bulk operation not found");let f=c.bulkOperation;if(se.includes(f.status)||d?.aborted)return f;yield f,k++;let v=a;if(i&&k<=l&&(v=r),d){let w,K=new Promise(G=>{let I=()=>G();d.addEventListener("abort",I,{once:!0}),w=()=>d.removeEventListener("abort",I)});await Promise.race([F(v),K]),w?.()}else await F(v)}}async function pe(e,n){return u({query:S,session:e,variables:{id:n},version:p})}t();async function ce(e){let n=await y(e);if(!n.ok)throw new s(`Failed to download bulk operation results: ${n.statusText}`);return n.text()}function ve(e){return e.trim().split(`
|
|
4
4
|
`).filter(a=>a.trim().length>0).some(a=>{let i;try{i=JSON.parse(a)}catch(l){if(l instanceof SyntaxError)return!1;throw l}if(!i.data)return!1;let r=Object.values(i.data)[0];return r?.userErrors!==void 0&&r.userErrors.length>0})}t();async function fe(e){let n=await D({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config}),a=await x({appContextResult:n,storeFqdn:e.store,forceReselectStore:e.reset,storeTypes:["APP_DEVELOPMENT","DEVELOPMENT","DEVELOPMENT_SUPERSET","PRODUCTION"]});return{appContextResult:n,store:a}}async function Jn(e){let n=await E({query:e.query,queryFile:e["query-file"]}),{appContextResult:a,store:i}=await fe(e);return{query:n,appContextResult:a,store:i}}export{p as a,H as b,J as c,g as d,X as e,Y as f,E as g,Z as h,ae as i,te as j,re as k,oe as l,O as m,le as n,de as o,me as p,ke as q,ce as r,ve as s,fe as t,Jn as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as _,v as R}from"./chunk-
|
|
1
|
+
import{p as _,v as R}from"./chunk-JGN7YG5X.js";import{c as g,l as P}from"./chunk-ICXHUPP5.js";import{b as N}from"./chunk-S5JJL3BP.js";import{D as w,F as v,R as L,w as T,z as C}from"./chunk-YYLEWVO6.js";import{d as F}from"./chunk-AUZCENYI.js";import{Aa as I,Ca as k,Ta as A,Va as E,ka as b,ma as f,ua as y}from"./chunk-BXDZX3BS.js";import{d as r}from"./chunk-773TIA5M.js";import{r as H}from"./chunk-T6CC5WUU.js";import{e as D,g as d}from"./chunk-VKWPEFWQ.js";d();d();var h="https://github.com/Shopify/skeleton-theme.git",q="https://github.com/Shopify/theme-liquid-docs.git",S={all:"All",github:"VS Code (GitHub Copilot)",cursor:"Cursor",claude:"Claude"};async function G(t,e){await U(t,e)}async function O(t,e){await U(t,e,!0)}async function U(t,e,o){await w([{title:`Cloning ${t} into ${e}`,task:async()=>{await g({repoUrl:t,destination:e,latestTag:o,shallow:!0}),await P(e),t===h&&(await Promise.all(Object.keys(S).map(async c=>x(r(e,`.${c}`)))),await x(r(e,".git")))}}])}async function x(t){await A(t)&&await k(t)}async function M(){return await C({message:"Which LLM instruction file would you like to include in your theme?",choices:[...Object.entries(S).map(([e,o])=>({label:o,value:e})),{label:"Skip",value:null}]})}async function $(t,e){let o=[];await w([{title:`Adding AI instructions into ${t}`,task:async()=>{await b(async c=>{await g({repoUrl:q,destination:c,shallow:!0});let l=e==="all"?Object.keys(S).filter(a=>a!=="all"):[e];try{let a=r(c,"ai","github","copilot-instructions.md"),s=await f(a),n=r(t,"AGENTS.md"),u=`# AGENTS.md
|
|
2
2
|
|
|
3
3
|
${s}`;await y(n,u),(await Promise.all(l.map(p=>W(t,n,p)))).forEach(p=>{p.copiedFile&&o.push(p.copiedFile)})}catch{throw new F("Failed to create AI instructions")}})}}]),o.length>0&&T({headline:"Files created instead of symlinks.",body:`Shopify CLI attempted to create symbolic links between AGENTS.md and ${o.join(", ")}, but your system doesn't have Developer Mode enabled or symlinks are disabled. Separate files were created instead.`})}async function W(t,e,o){if(o==="cursor")return{};let l={github:"copilot-instructions.md",claude:"CLAUDE.md"}[o],a=r(t,l);try{return await I(e,a),{}}catch(s){if(s instanceof Error){let n=await f(e);return await y(a,n),{copiedFile:l}}else throw s}}var m=D(H(),1);var j,i=class extends R{async command(e,o,c,l){let a=l.name??await this.promptName(e.path),s=e["clone-url"],n=r(e.path,a);if(e.latest?await O(s,n):await G(s,n),!L())return;let u=await M();u&&await $(n,u)}async promptName(e){let o=await E({suffix:"theme",directory:e,family:"creative"});return v({message:"Name of the new theme",defaultValue:o})}};j=i;i.summary="Clones a Git repository to use as a starting point for building a new theme.";i.descriptionWithMarkdown=`Clones a Git repository to your local machine to use as the starting point for building a theme.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as d,c as f}from"./chunk-
|
|
1
|
+
import{b as d,c as f}from"./chunk-4U3NC3UU.js";import{a as c}from"./chunk-Z2Y6G2QF.js";import{a as p}from"./chunk-6V37CHBZ.js";import{Ga as u,e as i}from"./chunk-KJQAJUDU.js";import{b as n}from"./chunk-S5JJL3BP.js";import{v as e}from"./chunk-YYLEWVO6.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var a,t=class extends c{async run(){let{flags:o}=await this.parse(a),{app:r}=await u({directory:o.path,userProvidedConfigName:o.config}),m=await f(r,o.path);return await i(m,{stdout:process.stdout,stderr:process.stderr,app:r}),e({headline:"GraphQL types generated successfully."}),{app:r}}};a=t;t.summary="Generate GraphQL types for a function.";t.descriptionWithMarkdown="Creates GraphQL types based on your [input query](https://shopify.dev/docs/apps/functions/input-output#input) for a function. Supports JavaScript functions out of the box, or any language via the `build.typegen_command` configuration.";t.description=a.descriptionWithoutMarkdown();t.flags={...n,...p,...d};var x=t;export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-N4LCWB56.js";import{b as a}from"./chunk-74IG3ZE3.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();var t=class extends a{static{this.description="View the UI kit components that process async tasks"}static{this.hidden=!0}async run(){await o()}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{k as P,t as F}from"./chunk-
|
|
1
|
+
import{k as P,t as F}from"./chunk-7ZIO3X22.js";import{a as N}from"./chunk-Q7BOSHWX.js";import{a as T}from"./chunk-TGM7L6RV.js";import{M as H,O as q,o as $,va as d,xa as h}from"./chunk-3EQY5B4S.js";import{a as x}from"./chunk-Q3WOWDUU.js";import{P as v,x as I,y as L}from"./chunk-YYLEWVO6.js";import{d as l}from"./chunk-AUZCENYI.js";import{Fb as C,Hb as U,Pb as c}from"./chunk-BXDZX3BS.js";import{u as O}from"./chunk-MGPLKG23.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();function D(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e.replaceTemplates??[]))t.append(`replace_templates[${r}]`,o);for(let[r,o]of Object.entries(e.replaceExtensionTemplates??[])){let n=r.split("/")[0];t.append(`replace_extension_templates[${n}][${r}]`,o)}return t.append("_method",e.method),t}function w(){return{"User-Agent":`Shopify CLI; v=${x}`}}function k(e){return delete e.cookie,delete e.authorization,e}p();function S(e){let t={};return e.split(";").forEach(r=>{let o=r.match(/(.*?)=(.*)$/)??[],n=o[1]?.trim(),s=o[2]?.trim()??"";n&&(t[n]=s)}),t}function E(e){return Object.entries(e).map(([t,r])=>`${t}=${r}`).join("; ")}var y=class extends l{};async function Re(e){return F(e)}async function be(e,t,r){let o=M(t),n=new URLSearchParams;n.append("form_type","storefront_password"),n.append("utf8","\u2713"),n.append("password",e??""),h("theme-service:storefront-session:check-storefront-password");let s={"cache-control":"no-cache","content-type":"application/x-www-form-urlencoded",...r},a=await $(`${o}/password`,{headers:s,body:n.toString(),method:"POST",redirect:"manual"});if(a.status===429)throw d(new l(`Too many incorrect password attempts. Please try again after ${a.headers.get("retry-after")} seconds.`));return B(a,o)}async function j(e,t,r,o,n={}){let s={},a=await G(e,r,n),i=M(t);if(s._shopify_essential=a,h(`theme-service:storefront-session:is-password-protected:${!!o}`),!o)return s;let u=await ee(a,e,i,o,n);return{...s,...u}}async function G(e,t,r,o=1){let n=new URLSearchParams({preview_theme_id:t,_fd:"0",pb:"0"}),s=`${e}?${n}`;h("theme-service:storefront-session:get-session-essential-cookie");let a={...r,...w()},i=await $(s,{method:"HEAD",redirect:"manual",headers:a}),u=i.headers.raw()["set-cookie"]??[],f=_(u,"_shopify_essential");if(!f){if(c(`Failed to obtain _shopify_essential cookie.
|
|
2
2
|
|
|
3
3
|
-Request ID: ${i.headers.get("x-request-id")??"unknown"}
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as k,b as i,c as F,d as L,e as _,f as M,g as H}from"./chunk-
|
|
1
|
+
import{a as k,b as i,c as F,d as L,e as _,f as M,g as H}from"./chunk-DQOS54HN.js";import{a as E}from"./chunk-PLHJQQVZ.js";import{a as P}from"./chunk-6V37CHBZ.js";import{Fa as I,ga as S}from"./chunk-KJQAJUDU.js";import{O as b,P as T,Q as A}from"./chunk-UEC23KAO.js";import{B as g,F as v,z as p}from"./chunk-YYLEWVO6.js";import{Nb as h,Qb as m,Sb as w}from"./chunk-BXDZX3BS.js";import{j as y}from"./chunk-773TIA5M.js";import{r as q}from"./chunk-T6CC5WUU.js";import{e as G,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!F(o,e))return`Invalid address.
|
|
2
2
|
${c(e)}`}})).trim()}function U(e){return e===i.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:e===i.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:e===i.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function c(e){return U(e).map(t=>` \xB7 ${w(t)}`).join(`
|
|
3
3
|
`)}async function O(e,t){let{clientSecret:r,clientId:o,remoteApp:s,app:l}=e;return r&&(o||t!==i.EVENTBRIDGE)?{clientSecret:r,apiKey:o}:(S({appName:s.title,configFile:y(l.configPath)}),{clientSecret:s.apiSecretKeys.find(f=>f.secret).secret,apiKey:s.apiKey})}async function x(e,t,r){let o=await T(e,r);return t?_(t,o):C(o)}async function B(e,t,r,o){let s=await A(e,t,o);return r?M(r,t,s):V(s)}async function Y(e,t){let r=e??H(t)??await R(),o=t??await D(r);return L(o,r)}async function N(e){let t=await W(e);await z(t)}async function W(e){let t=await x(e.developerPlatformClient,e.apiVersion,e.organizationId),r=await B(e.developerPlatformClient,t,e.topic,e.organizationId),[o,s]=await Y(e.deliveryMethod,e.address),l=await O(e,s);return{topic:r,apiVersion:t,deliveryMethod:s,address:o,apiKey:l.apiKey,clientSecret:l.clientSecret,developerPlatformClient:e.developerPlatformClient,organizationId:e.organizationId}}async function z(e){let t={topic:e.topic,api_version:e.apiVersion,address:e.address,delivery_method:e.deliveryMethod,shared_secret:e.clientSecret,api_key:e.apiKey},r=await b(e.developerPlatformClient,t,e.organizationId);if(!r.success){m(`Request errors:
|
|
4
4
|
${K(r.userErrors)}`);return}if(e.deliveryMethod===i.LOCALHOST){if(await k(e.address,r.samplePayload,r.headers)){h("Localhost delivery sucessful");return}m("Localhost delivery failed");return}r.samplePayload===JSON.stringify({})&&h("Webhook has been enqueued for delivery")}function K(e){try{return e.map(t=>JSON.parse(t.message).map(r=>` \xB7 ${r}`).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as X,b as H,c as K}from"./chunk-
|
|
1
|
+
import{a as X,b as H,c as K}from"./chunk-3OE5HXHO.js";import{a as M,c as P,e as h,f as T,h as q,i as V,m as U,p as _,q as F,r as j,s as z,u as Q}from"./chunk-WU6GIY22.js";import{a as W}from"./chunk-PLHJQQVZ.js";import{a as G,b as J}from"./chunk-6V37CHBZ.js";import{b as L}from"./chunk-S5JJL3BP.js";import{E as R,a as D,u as v,v as d,w as E,x as A}from"./chunk-YYLEWVO6.js";import{d as f,g as x}from"./chunk-AUZCENYI.js";import{Fb as r,Hb as s,Lb as N,Ta as $,ma as S,ua as I}from"./chunk-BXDZX3BS.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function oe(t,e){if(t)return t.join(`
|
|
2
2
|
`);if(e){if(!await $(e))throw new f(s`Variable file not found at ${r.path(e)}. Please check the path and try again.`);return S(e,{encoding:"utf8"})}else return}async function Z(t){let{organization:e,remoteApp:i,store:n,query:a,variables:p,variableFile:k,outputFile:B,watch:ee=!1,version:te}=t,{adminSession:c,version:w}=await R({title:s`Authenticating`,task:async()=>{let o=await X(i,n.shopDomain),u=await T({adminSession:o,userSpecifiedVersion:te,minimumDefaultVersion:M});return{adminSession:o,version:u}},renderOptions:{stdout:process.stderr}}),C=await oe(p,k);ae(a,C),K(a,n),v({headline:"Starting bulk operation.",body:[{list:{items:H({organization:e,remoteApp:i,storeFqdn:n.shopDomain,version:w})}}]});let y=h(a)?await V({adminSession:c,query:a,variablesJsonl:C,version:w}):await q({adminSession:c,query:a,version:w});if(y?.userErrors?.length){A({headline:"Error creating bulk operation.",body:{list:{items:y.userErrors.map(o=>o.field?`${o.field.join(".")}: ${o.message}`:o.message)}}});return}let g=y?.bulkOperation;if(g)if(ee){let o=new D,u=await F(c,g.id,o.signal,()=>o.abort());o.signal.aborted?v({headline:`Bulk operation ${u.id} is still running in the background.`,body:b(u.id)}):await Y(u,B)}else{let o=await _(c,g.id);["FAILED","CANCELED","EXPIRED"].includes(o.status)?await Y(o,B):d({headline:"Bulk operation is running.",body:b(o.id),customSections:[{body:[{list:{items:[s`ID: ${r.cyan(o.id)}`.value]}}]}]})}else throw E({headline:"Bulk operation not created successfully.",body:"This is an unexpected error. Please try again later."}),new x("Bulk operation response returned null with no error message.")}async function Y(t,e){let i=U(t).value,a=[{body:[{list:{items:[s`ID: ${r.cyan(t.id)}`.value,s`Status: ${r.yellow(t.status)}`.value,s`Created at: ${r.gray(String(t.createdAt))}`.value,...t.completedAt?[s`Completed at: ${r.gray(String(t.completedAt))}`.value]:[]]}}]}];switch(t.status){case"CREATED":d({headline:"Bulk operation started.",body:b(t.id),customSections:a});break;case"RUNNING":d({headline:"Bulk operation is running.",body:b(t.id),customSections:a});break;case"COMPLETED":if(t.url){let p=await j(t.url),k=z(p);e?await I(e,p):N(p),k?E({headline:"Bulk operation completed with errors.",body:e?`Results written to ${e}. Check file for error details.`:"Check results for error details.",customSections:a}):d({headline:i,body:e?[`Results written to ${e}`]:void 0,customSections:a})}else d({headline:i,customSections:a});break;case"CANCELED":case"CANCELING":case"EXPIRED":case"FAILED":A({headline:i,customSections:a});break}}function ae(t,e){if(h(t)&&!e)throw new f(s`Bulk mutations require variables. Provide a JSONL file with ${r.yellow("--variable-file")} or individual JSON objects with ${r.yellow("--variables")}.`);if(!h(t)&&e)throw new f(s`The ${r.yellow("--variables")} and ${r.yellow("--variable-file")} flags can only be used with mutations, not queries.`)}function b(t){return[`Monitor its progress with:
|
|
3
3
|
`,{command:`shopify app bulk status --id=${P(t)}`}]}var O,l=class extends W{async run(){let{flags:e}=await this.parse(O),{query:i,appContextResult:n,store:a}=await Q(e);return await Z({organization:n.organization,remoteApp:n.remoteApp,store:a,query:i,variables:e.variables,variableFile:e["variable-file"],watch:e.watch??!1,outputFile:e["output-file"],...e.version&&{version:e.version}}),{app:n.app}}};O=l;l.summary="Execute bulk operations.";l.descriptionWithMarkdown=`Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as T}from"./chunk-
|
|
1
|
+
import{n as T}from"./chunk-3EQY5B4S.js";import{a as N,b as $,c as w}from"./chunk-TKW3Z7XL.js";import{a as D,b}from"./chunk-WTYH2O47.js";import{O as P,P as k,a as F}from"./chunk-YYLEWVO6.js";import{g as A}from"./chunk-AUZCENYI.js";import{Ia as U,La as I,N as x,Pa as O,Pb as u,Ua as p,xa as y,za as _}from"./chunk-BXDZX3BS.js";import{f as h}from"./chunk-MGPLKG23.js";import{d as m,i as l,j as S}from"./chunk-773TIA5M.js";import{g as f}from"./chunk-VKWPEFWQ.js";f();f();import{fileURLToPath as q}from"url";import Y from"util";import{pipeline as j}from"stream";import{execSync as z,execFileSync as B}from"child_process";var H="2024.8.2",W=`https://github.com/cloudflare/cloudflared/releases/download/${H}/`,G={arm64:"cloudflared-linux-arm64",arm:"cloudflared-linux-arm",x64:"cloudflared-linux-amd64",ia32:"cloudflared-linux-386"},V={arm64:"cloudflared-darwin-arm64.tgz",x64:"cloudflared-darwin-amd64.tgz"},X={x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-amd64.exe"},v={linux:G,darwin:V,win32:X};function Z(r=process.platform,t=process.arch){if(!Object.keys(v).includes(r))throw new Error(`Unsupported system platform: ${r}`);let n=v[r][t];if(n===void 0)throw new Error(`Unsupported system arch: ${t}`);return W+n}function J(r=process.env,t=process.platform){return r.SHOPIFY_CLI_CLOUDFLARED_PATH?r.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(q(import.meta.url)),"..","bin",t==="win32"?"cloudflared.exe":"cloudflared")}async function g(r=process.env,t=process.platform,e=process.arch){if(r.SHOPIFY_CLI_IGNORE_CLOUDFLARED){u("Skipping cloudflared installation because SHOPIFY_CLI_IGNORE_CLOUDFLARED is set");return}let n=Z(t,e),o=J(r,t);if(p(o))try{let a=B(o,["--version"],{encoding:"utf8"}).split(" "),i=a.length>2?a[2]:"0.0.0";if(!K(H,i)){u("cloudflared already installed, skipping");return}}catch{u("version check failed, reinstalling")}if(t==="linux")await Q(n,o);else if(t==="darwin")await rt(n,o);else if(t==="win32")await tt(n,o);else throw new Error(`Unsupported platform: ${t}`)}function K(r,t){let[e,n,o]=r.split(".").map(Number),[a,i,c]=t.split(".").map(Number);return e!==a?(e??0)>(a??0):n!==i?(n??0)>(i??0):(o??0)>(c??0)}async function Q(r,t){await C(r,t),await O(t,"755")}async function tt(r,t){await C(r,t)}async function rt(r,t){await C(r,`${t}.tgz`);let e=S(`${t}.tgz`);z(`tar -xzf ${e}`,{cwd:l(t)}),U(`${t}.tgz`),await _(`${l(t)}/cloudflared`,t)}async function C(r,t){p(l(t))||y(l(t));let e=Y.promisify(j),n=await T(r,{redirect:"follow"},"slow-request");if(!n.ok||!n.body)throw new Error(`Couldn't download file ${r} (${n.status} ${n.statusText})`);let o=I(t);return await e(n.body,o),t}import{Writable as et}from"stream";import{fileURLToPath as nt}from"url";var $t=$({provider:w,action:it}),ot=h()?.2:40,st=5;async function it(r){try{let t=new R(r);return await t.startTunnel(),D(t)}catch(t){let e=new N("unknown",t.message);return b(e)}}var R=class{constructor(t){this.provider=w,this.currentStatus={status:"not-started"},this.abortController=void 0,this.port=t}async startTunnel(){try{await g(),this.tunnel()}catch(t){this.currentStatus={status:"error",message:t.message,tryMessage:d()}}}getTunnelStatus(){return this.currentStatus}stopTunnel(){this.abortController?.abort()}tunnel(t=0){this.abortController=new F;let e=!1;if(t>=st){e=!0,this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: max retries reached.",tryMessage:d()};return}let n=["tunnel","--url",`http://localhost:${this.port}`,"--no-autoupdate"],o=[],a=!1,i;this.currentStatus={status:"starting"},setTimeout(()=>{if(!e){e=!0;let s=x(o).slice(-5).join(`
|
|
2
2
|
`);s===""?this.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: unknown error.",tryMessage:d()}:this.currentStatus={status:"error",message:s,tryMessage:d()},this.abortController?.abort()}},ot*1e3);let c=this,E=new et({write(s,mt,M){if(u(s.toString()),e)return;i??(i=at(s)),ct(s)&&(a=!0),a&&(i?(e=!0,c.currentStatus={status:"connected",url:i}):c.currentStatus={status:"error",message:"Could not start Cloudflare tunnel: URL not found."});let L=lt(s);L&&o.push(L),M()}});P(dt(),n,{stdout:E,stderr:E,signal:this.abortController.signal,externalErrorHandler:async s=>{if(e)throw new A(`Could not start Cloudflare tunnel: process crashed after stablishing a connection: ${s.message}`,d());u(`Cloudflare tunnel crashed: ${s.message}, restarting...`),h()||await k(1),this.tunnel(t+1)}})}};function d(){return["You can run the command again, or try networking with Shopify via",{command:"--use-localhost"},"or",{command:"--tunnel-url <custom tunnel>"},".",{link:{label:"See documentation for details.",url:"https://shopify.dev/docs/apps/build/cli-for-apps/networking-options"}}]}function at(r){let t=new RegExp(`(https:\\/\\/[^\\s]+\\.${ft()})`),e=r.toString().match(t)??void 0;return e&&e[1]}function lt(r){if([/failed to request quick Tunnel/,/failed to unmarshal quick Tunnel/,/failed to parse quick Tunnel ID/,/failed to provision routing/,/ERR Couldn't start tunnel/,/ERR Failed to serve quic connection/,/ERR Failed to create new quic connection error/].some(n=>n.test(r.toString())))return`Could not start Cloudflare tunnel: ${ut(r.toString())}`}function ut(r){let t=/^[0-9TZ:-]+ (ERR )?/g,e=/connIndex.*/g;return r.replace(t,"").replace(e,"")}function ct(r){let t=r.toString().match(/(INF Registered tunnel connection|INF Connection)/)??void 0;return t&&t[0]}function dt(){return process.env.SHOPIFY_CLI_CLOUDFLARED_PATH?process.env.SHOPIFY_CLI_CLOUDFLARED_PATH:m(l(nt(import.meta.url)),"..","bin",process.platform==="win32"?"cloudflared.exe":"cloudflared")}function ft(){return process.env.SHOPIFY_CLI_CLOUDFLARED_DOMAIN??"trycloudflare.com"}export{$t as a};
|