shopify 4.7.0 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-5SII3GTA.js +1 -0
- package/dist/{analytics-6LI5GLWS.js → analytics-F56E2NGH.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-LDF4PQ3B.js → chunk-22NROZ5X.js} +1 -1
- package/dist/{chunk-XHZ5BWXL.js → chunk-22NWEE5U.js} +1 -1
- package/dist/{chunk-2CYVZUYT.js → chunk-26DH5P7S.js} +1 -1
- package/dist/{chunk-CIH6LPTG.js → chunk-27UEK3FU.js} +1 -1
- package/dist/{chunk-7JIQXGDE.js → chunk-2F2DXTRI.js} +1 -1
- package/dist/{chunk-TSLQZTXR.js → chunk-2S3GOPRL.js} +1 -1
- package/dist/{chunk-LWJA2DQG.js → chunk-3HCWJRL6.js} +1 -1
- package/dist/{chunk-OORWOTAP.js → chunk-3KM2GKXH.js} +1 -1
- package/dist/{chunk-Q5DQGV3M.js → chunk-3MN3WLA2.js} +1 -1
- package/dist/{chunk-RY2SJVWM.js → chunk-3WV7DQMM.js} +3 -3
- package/dist/{chunk-JQ2B3VHR.js → chunk-46BKAF3F.js} +1 -1
- package/dist/{chunk-YUVE2I3C.js → chunk-4FCS6PJY.js} +1 -1
- package/dist/{chunk-L67BU25M.js → chunk-4FI2YBRF.js} +1 -1
- package/dist/{chunk-H5KWM27L.js → chunk-4I7TUB3K.js} +1 -1
- package/dist/chunk-4NXLDIW5.js +1 -0
- package/dist/{chunk-XAOYKECS.js → chunk-4VJ6YK7U.js} +1 -1
- package/dist/{chunk-7DOWT5JZ.js → chunk-4WGJUVXS.js} +1 -1
- package/dist/{chunk-6WZYX5RO.js → chunk-53IU36CL.js} +1 -1
- package/dist/{chunk-LZ3GZ7NS.js → chunk-5JW4JQWZ.js} +1 -1
- package/dist/{chunk-SYADOUBB.js → chunk-5MD7GNEY.js} +1 -1
- package/dist/chunk-5QZHJCZM.js +1 -0
- package/dist/{chunk-XRT2W5Y2.js → chunk-5WGT45CO.js} +1 -1
- package/dist/{chunk-V5SC2RYQ.js → chunk-6AV6GX5W.js} +1 -1
- package/dist/{chunk-N6YTJXIS.js → chunk-6ELAWKMY.js} +1 -1
- package/dist/{chunk-CTRXLZAJ.js → chunk-6G5TDB45.js} +1 -1
- package/dist/{chunk-JQISGC7D.js → chunk-6K3AJTNO.js} +1 -1
- package/dist/{chunk-QBIVQXUJ.js → chunk-6QJIGFQJ.js} +1 -1
- package/dist/{chunk-EW55WWT7.js → chunk-6R62DGJG.js} +1 -1
- package/dist/{chunk-ZO74GSWC.js → chunk-6SM4RY3I.js} +1 -1
- package/dist/chunk-76NEIDP5.js +1 -0
- package/dist/{chunk-5CADTCJE.js → chunk-77AC3OJQ.js} +1 -1
- package/dist/{chunk-MLZLDL6B.js → chunk-7EUIO4ZO.js} +1 -1
- package/dist/{chunk-YHPBDS52.js → chunk-7JIYJMRN.js} +1 -1
- package/dist/{chunk-VRVP2GQL.js → chunk-7S73765P.js} +1 -1
- package/dist/{chunk-AGOEROAI.js → chunk-AFT6ABDE.js} +1 -1
- package/dist/{chunk-DMXQLI35.js → chunk-AIA7JVSJ.js} +1 -1
- package/dist/{chunk-GKOBFX4A.js → chunk-AWHS336T.js} +1 -1
- package/dist/{chunk-R2R6JDNH.js → chunk-BI7LE6CZ.js} +1 -1
- package/dist/{chunk-WHLGNDRE.js → chunk-CNMJ6QXM.js} +1 -1
- package/dist/{chunk-LJM2DUXN.js → chunk-CRP4PQU2.js} +1 -1
- package/dist/{chunk-AH2ZGMDM.js → chunk-CUUCRIGC.js} +1 -1
- package/dist/{chunk-PWSI275S.js → chunk-DEMZRLX5.js} +1 -1
- package/dist/{chunk-HLNJL4B6.js → chunk-DLSUDLXD.js} +1 -1
- package/dist/{chunk-PAAKBWSF.js → chunk-DMFEYI4G.js} +1 -1
- package/dist/{chunk-4W3UE2ZI.js → chunk-ELSDVDT7.js} +1 -1
- package/dist/{chunk-7AALWJAO.js → chunk-EMETQFFJ.js} +1 -1
- package/dist/chunk-ESPT6CGE.js +1 -0
- package/dist/{chunk-UPJLZHHR.js → chunk-EULSSTWY.js} +1 -1
- package/dist/{chunk-E2W5OYYM.js → chunk-EWS2RNM6.js} +1 -1
- package/dist/{chunk-6PDR2IUL.js → chunk-FAXNGDWI.js} +1 -1
- package/dist/{chunk-2JDCVEFK.js → chunk-FELV7GWY.js} +1 -1
- package/dist/{chunk-VKSR6MJG.js → chunk-FQQXU5IN.js} +1 -1
- package/dist/{chunk-ACTDYTAV.js → chunk-GFWXVO72.js} +1 -1
- package/dist/{chunk-2SZOPJYI.js → chunk-GJ4A4QKE.js} +1 -1
- package/dist/{chunk-KK24VGVE.js → chunk-GW4JHUIA.js} +1 -1
- package/dist/{chunk-XLURZ6GL.js → chunk-GXOFJIKQ.js} +1 -1
- package/dist/{chunk-X4XP2RQJ.js → chunk-HCQABTQL.js} +1 -1
- package/dist/{chunk-TY4W7AYX.js → chunk-HOVIGRE4.js} +1 -1
- package/dist/{chunk-Y34LWI3S.js → chunk-HQUWYKSJ.js} +3 -3
- package/dist/{chunk-MRCWOOSF.js → chunk-HRHNJFAA.js} +1 -1
- package/dist/{chunk-U6HYEGAE.js → chunk-HU4GFVEN.js} +1 -1
- package/dist/{chunk-JZMRBJH3.js → chunk-I2LNQKIJ.js} +2 -2
- package/dist/{chunk-I3N6NPHF.js → chunk-I6XH7XDX.js} +1 -1
- package/dist/{chunk-QKGZWOOY.js → chunk-IA3XNJ56.js} +1 -1
- package/dist/{chunk-KIYHEMHD.js → chunk-IENBHP2S.js} +2 -2
- package/dist/{chunk-D2K2ZBKH.js → chunk-IF6EYTHG.js} +2 -2
- package/dist/{chunk-ZCNIR6YU.js → chunk-IQT6LOA2.js} +1 -1
- package/dist/{chunk-JJJTPEMD.js → chunk-IX4IGE5H.js} +1 -1
- package/dist/{chunk-WCRZJY3P.js → chunk-J2VRPZFC.js} +1 -1
- package/dist/{chunk-P5MNNBSO.js → chunk-JJSV7HNM.js} +1 -1
- package/dist/{chunk-E5T4YRGW.js → chunk-JNIPCLAF.js} +1 -1
- package/dist/{chunk-HZIX3DIT.js → chunk-JNVCCE6M.js} +1 -1
- package/dist/{chunk-LQCR4TGH.js → chunk-JQUEW7CB.js} +1 -1
- package/dist/{chunk-GSCWZR22.js → chunk-K3VLFPPI.js} +1 -1
- package/dist/{chunk-4JY2P2A5.js → chunk-K63FW7Q7.js} +1 -1
- package/dist/{chunk-CZJZCJRX.js → chunk-KBBITJSF.js} +1 -1
- package/dist/{chunk-4LRG5YBS.js → chunk-KDBKEVCF.js} +1 -1
- package/dist/{chunk-FWPJEL6Q.js → chunk-KNVHXIEB.js} +1 -1
- package/dist/{chunk-CMYQXGLO.js → chunk-KRLEEYLL.js} +1 -1
- package/dist/{chunk-2U4P6UFZ.js → chunk-KT5MDCII.js} +1 -1
- package/dist/{chunk-U2Z5NMXV.js → chunk-LBREJXT6.js} +1 -1
- package/dist/{chunk-ZRLEAF7M.js → chunk-LKQ3EJ6Z.js} +1 -1
- package/dist/{chunk-HHVHVGRT.js → chunk-LKZQSER3.js} +1 -1
- package/dist/{chunk-ZSFAURIH.js → chunk-M5Q74UZM.js} +1 -1
- package/dist/{chunk-V2HCVJYF.js → chunk-MK7MOLLI.js} +1 -1
- package/dist/{chunk-JUKAWTYY.js → chunk-MTTBBZSR.js} +1 -1
- package/dist/{chunk-LRQYUWWB.js → chunk-N4KDWHT2.js} +1 -1
- package/dist/{chunk-XCBEYRQI.js → chunk-N7425436.js} +1 -1
- package/dist/{chunk-5CR5YJTU.js → chunk-NSZHEXZK.js} +1 -1
- package/dist/{chunk-RUFQCXBX.js → chunk-O4G6TE26.js} +1 -1
- package/dist/{chunk-XUEMMLXK.js → chunk-O4RHWBBM.js} +1 -1
- package/dist/{chunk-AMLWPYNA.js → chunk-O53YIDJL.js} +1 -1
- package/dist/{chunk-DHU57LKD.js → chunk-OF6CV5R4.js} +1 -1
- package/dist/{chunk-QEB3HUQE.js → chunk-OJSJWGP2.js} +1 -1
- package/dist/{chunk-QRT4A2RV.js → chunk-OQWMCJLY.js} +1 -1
- package/dist/{chunk-7MHANY34.js → chunk-P5OQUFH6.js} +1 -1
- package/dist/{chunk-DQCIORGH.js → chunk-P5WLH64A.js} +1 -1
- package/dist/{chunk-OE3F7XXU.js → chunk-PE4TV5IJ.js} +1 -1
- package/dist/{chunk-CZPGC2E7.js → chunk-PEHLR7XP.js} +1 -1
- package/dist/{chunk-YN6A26QL.js → chunk-PK73ZSND.js} +4 -4
- package/dist/{chunk-FULWTZS6.js → chunk-PQG7XSQP.js} +1 -1
- package/dist/{chunk-3K6VHXC2.js → chunk-PS2UVFHP.js} +1 -1
- package/dist/{chunk-T5JXQ7KO.js → chunk-PU3NATV4.js} +1 -1
- package/dist/{chunk-6VRXGEIW.js → chunk-PV6T52KB.js} +1 -1
- package/dist/{chunk-JQVXH26X.js → chunk-QASOHYDS.js} +1 -1
- package/dist/{chunk-MB7E5GEY.js → chunk-QHLY2IID.js} +1 -1
- package/dist/{chunk-SJMTETSU.js → chunk-QT367CYF.js} +1 -1
- package/dist/{chunk-2WJAAJVX.js → chunk-R2RULBBV.js} +1 -1
- package/dist/{chunk-QXHENYJH.js → chunk-R5EGWWZH.js} +1 -1
- package/dist/{chunk-KUNDCAQN.js → chunk-RA3WWB2S.js} +1 -1
- package/dist/{chunk-GLWQMLUC.js → chunk-RM3B7AFT.js} +1 -1
- package/dist/{chunk-UVQL7RUY.js → chunk-RXUOQZ32.js} +1 -1
- package/dist/{chunk-GZ64KWHX.js → chunk-RY4MPX5A.js} +1 -1
- package/dist/{chunk-5NO5OXYP.js → chunk-RY4YUBG3.js} +1 -1
- package/dist/{chunk-DKL6N3L2.js → chunk-S2WUVD7V.js} +1 -1
- package/dist/{chunk-SSJGWLCW.js → chunk-SCXL5UQ4.js} +1 -1
- package/dist/{chunk-YIZZ5LZN.js → chunk-SGIMJQEM.js} +1 -1
- package/dist/{chunk-KCS75ZM4.js → chunk-SJGPJDGH.js} +1 -1
- package/dist/{chunk-F5HCSUXC.js → chunk-SPE2D366.js} +1 -1
- package/dist/{chunk-CFWHR74L.js → chunk-SYF6LGQB.js} +1 -1
- package/dist/{chunk-PIFW2R3S.js → chunk-TP4Z5OZT.js} +1 -1
- package/dist/{chunk-6ENBE43F.js → chunk-U3F6GPCE.js} +1 -1
- package/dist/{chunk-SEVSMWNX.js → chunk-U46RPVQA.js} +1 -1
- package/dist/{chunk-CYOFLJ3Z.js → chunk-UAJBQEGE.js} +1 -1
- package/dist/{chunk-QZBSCOJV.js → chunk-UK4WXL4G.js} +1 -1
- package/dist/{chunk-CHMEDVDZ.js → chunk-ULR25PTO.js} +1 -1
- package/dist/{chunk-7WTNEG2F.js → chunk-USBP7H7J.js} +1 -1
- package/dist/{chunk-4HV6A6UH.js → chunk-UZV5H2JI.js} +1 -1
- package/dist/{chunk-6EBLULOC.js → chunk-UZVON6GP.js} +1 -1
- package/dist/{chunk-Z5K4J7HQ.js → chunk-VI5FF6SW.js} +1 -1
- package/dist/{chunk-6VGJVXZI.js → chunk-VPY47DBW.js} +1 -1
- package/dist/{chunk-S3P5WWJD.js → chunk-VRH3HWYA.js} +1 -1
- package/dist/{chunk-37TEEITE.js → chunk-VXX4EZ7G.js} +1 -1
- package/dist/{chunk-WKUGSFTB.js → chunk-VXYABRFY.js} +1 -1
- package/dist/{chunk-KOVAFUYN.js → chunk-WEWLPJK2.js} +1 -1
- package/dist/{chunk-TTAPXLI5.js → chunk-WMZS3Y4Z.js} +1 -1
- package/dist/{chunk-JZXA3H5K.js → chunk-WOIAYH5U.js} +1 -1
- package/dist/{chunk-6OFGSZD6.js → chunk-WR6LRE4I.js} +1 -1
- package/dist/{chunk-GMTNOCMS.js → chunk-WSCSFFLH.js} +2 -2
- package/dist/{chunk-K4KTNINH.js → chunk-WTES5ZXR.js} +1 -1
- package/dist/{chunk-BR6DBMQA.js → chunk-WXSDPMIZ.js} +1 -1
- package/dist/{chunk-YOO7DLOT.js → chunk-X5JQU6T7.js} +1 -1
- package/dist/{chunk-2HK4MFWP.js → chunk-XMJFT4WP.js} +1 -1
- package/dist/{chunk-63CIFL36.js → chunk-XMQFQUUK.js} +1 -1
- package/dist/{chunk-EOMCXBCS.js → chunk-XTXYS7LB.js} +1 -1
- package/dist/{chunk-QPWMD2VR.js → chunk-Y6UZW73M.js} +1 -1
- package/dist/{chunk-FCGKO2KY.js → chunk-YCU7ZCIG.js} +1 -1
- package/dist/{chunk-TYIGOVRQ.js → chunk-YFKEESYB.js} +1 -1
- package/dist/{chunk-U7R6LYPJ.js → chunk-YXDIHVPY.js} +1 -1
- package/dist/{chunk-TCTVI6PK.js → chunk-Z66ZSXKB.js} +1 -1
- package/dist/{chunk-PANGX7SA.js → chunk-ZBSC2KZ7.js} +1 -1
- package/dist/{chunk-5HPBQ6U5.js → chunk-ZDDLEFVO.js} +1 -1
- package/dist/{chunk-DQFSKPKL.js → chunk-ZULQKYJ6.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/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-OAGJBITE.js → conf-store-QQ4DOFI3.js} +1 -1
- package/dist/{deprecations-K3NPRKBF.js → deprecations-43ZQ5RCE.js} +1 -1
- package/dist/dist-E7EGYE4D.js +1 -0
- package/dist/dist-WRUROUNV.js +1 -0
- package/dist/{environments-ALH2N36U.js → environments-RG64VB5R.js} +1 -1
- package/dist/{error-YX56C43A.js → error-26WTDNKZ.js} +1 -1
- package/dist/error-handler-XFH47Y75.js +1 -0
- package/dist/{fs-SKHQZZTQ.js → fs-Y7I3Y5IR.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 +15 -15
- package/dist/{is-global-V5VORI3F.js → is-global-WBIBPIVZ.js} +1 -1
- package/dist/{local-GX5AN6ZS.js → local-HF4T3FFE.js} +1 -1
- package/dist/{metadata-XUJUTBTB.js → metadata-CSQPNQP2.js} +1 -1
- package/dist/{node-package-manager-3WIYU7Y3.js → node-package-manager-CVEU22N7.js} +1 -1
- package/dist/notifications-system-L3FMN6EX.js +1 -0
- package/dist/os-VLZLRAHR.js +1 -0
- package/dist/{output-X47P6ICP.js → output-E6OGPGXL.js} +1 -1
- package/dist/{system-SR5G7WEW.js → system-ZETSJRKS.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-VYWSLAQ6.js → ui-7TVGGEWJ.js} +1 -1
- package/dist/upgrade-F77O4ZDT.js +1 -0
- package/dist/version-3L3ANUTL.js +1 -0
- package/dist/{version-FK4ETQ22.js → version-DL4Y6DRX.js} +1 -1
- package/dist/{workerd-NAPS5TA7.js → workerd-EHI5ZCEV.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/analytics-UNRIIG4Y.js +0 -1
- package/dist/chunk-5CYJG63I.js +0 -1
- package/dist/chunk-NEMPLS7C.js +0 -1
- package/dist/chunk-OUZGGWFN.js +0 -1
- package/dist/chunk-RZFBGBNA.js +0 -1
- package/dist/dist-EXJEE23W.js +0 -1
- package/dist/dist-S62Z6IFV.js +0 -1
- package/dist/error-handler-FDCH72NH.js +0 -1
- package/dist/notifications-system-RHULO564.js +0 -1
- package/dist/os-M6X7KOR4.js +0 -1
- package/dist/upgrade-PFQ7JMXG.js +0 -1
- package/dist/version-U4GM2LNG.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as j}from"./chunk-
|
|
1
|
+
import{b as j}from"./chunk-6SM4RY3I.js";import{a as O}from"./chunk-ESPT6CGE.js";import{a as T}from"./chunk-RA3WWB2S.js";import{i as k,sa as N}from"./chunk-GFWXVO72.js";import{f as u}from"./chunk-SPE2D366.js";import{b as P,c as I}from"./chunk-IX4IGE5H.js";import{L as S,M as b}from"./chunk-PK73ZSND.js";import{y as E}from"./chunk-WSCSFFLH.js";import{d as v}from"./chunk-XTXYS7LB.js";import{a as m}from"./chunk-76NEIDP5.js";import{a as W}from"./chunk-CTNBSUVU.js";import{Hb as _,L as g,N as y,rb as C,sb as w,wb as A}from"./chunk-HQUWYKSJ.js";import{g as a,j as h}from"./chunk-773TIA5M.js";import{e as U,g as c}from"./chunk-VKWPEFWQ.js";c();c();async function x(n,e,t,o,i){return i.webEnv?F(n,e,t,i):R(n,e,o,i)}async function F(n,e,t,{format:o}){return j(n,e,t,o)}async function R(n,e,t,o){if(o.format==="json"){let i=$(n.allExtensions.filter(s=>s.isReturnedAsInfo())),r={...n,packageManager:t.packageManager,nodeDependencies:t.nodeDependencies,usesWorkspaces:t.usesWorkspaces,allExtensions:i};return"realExtensions"in r&&(r.realExtensions=$(r.realExtensions)),"specifications"in r&&(r={...r,specifications:r.specifications?.map(s=>D(s))}),w`${JSON.stringify(Object.fromEntries(Object.entries(r).filter(([s])=>s!=="configSchema")),null,2)}`}else return new l(n,e,t,o).output()}function D(n){if("schema"in n){let{schema:e,...t}=n;return t}return n}function $(n){return n.map(e=>{if("specification"in e&&e.specification){let t=e.specification,o=D(t);return{...e,specification:o}}else return e})}var M="unknown",f={subdued:"Not yet configured"},K="NOT LOADED",l=class{app;remoteApp;project;options;constructor(e,t,o,i){this.app=e,this.remoteApp=t,this.project=o,this.options=i}async output(){return[...await this.devConfigsSection(),this.projectSettingsSection(),...await this.appComponentsSection(),await this.systemInfoSection()]}async devConfigsSection(){let e=f;this.app.configuration.build?.automatically_update_urls_on_dev!==void 0&&(e=this.app.configuration.build.automatically_update_urls_on_dev?"Yes":"No");let t=["User","unknown"],o=await this.options.developerPlatformClient.accountInfo();return b(o)?t=["Service account",o.orgName]:S(o)&&(t[1]=o.email),[this.tableSection("Current app configuration",[["Configuration file",{filePath:h(this.app.configPath)||u.app}],["App name",this.remoteApp.title?{userInput:this.remoteApp.title}:f],["Client ID",this.remoteApp.apiKey||f],["Access scopes",k(this.app.configuration)],["Dev store",this.app.configuration.build?.dev_store_url??this.app.hiddenConfig.dev_store_url??f],["Update URLs",e],t],{isFirstItem:!0}),{body:["\u{1F4A1} To change these, run",{command:C(this.project.packageManager,"shopify app config link")}]}]}projectSettingsSection(){return this.tableSection("Your Project",[["Root location",{filePath:this.app.directory}]])}async appComponentsSection(){let e=this.webComponentsSection();return[{title:`
|
|
2
2
|
Directory components`.toUpperCase(),body:""},...e?[e]:[],...this.extensionsSections()]}webComponentsSection(){let e=[],t=[];if(this.app.webs[0])return this.app.webs.forEach(o=>{if(o.configuration)if(o.configuration.name){let{name:i,roles:r}=o.configuration,s=a(this.app.directory,o.directory);t.push([` \u{1F4C2} ${i}`,{filePath:s||"/"}]),r.length>0&&t.push([" roles",r.join(", ")])}else o.configuration.roles.forEach(i=>{t.push([` \u{1F4C2} ${i}`,{filePath:a(this.app.directory,o.directory)}])});else t.push([{subdued:` \u{1F4C2} ${M}`},{filePath:a(this.app.directory,o.directory)}]);if(!this.app.errors.isEmpty()){let i=this.app.errors.getErrors(`${o.directory}/${u.web}`);e.push(...i.map(r=>r.message))}}),this.subtableSection("web",[["\u{1F4C2} web",""],...t,...e.map(o=>[{error:"error"},{error:this.formattedError(o)}])])}extensionsSections(){let e=this.app.allExtensions.filter(i=>i.isReturnedAsInfo()),o=y(e.map(i=>i.type)).map(i=>{let r=e.filter(s=>s.type===i);if(r[0])return this.subtableSection(r[0].externalType,r.flatMap(s=>this.extensionSubSection(s)))});return g(o)}extensionSubSection(e){let t=e.configuration,o=[[`\u{1F4C2} ${e.handle||K}`,{filePath:a(this.app.directory,e.directory)}],[" config file",{filePath:a(e.directory,e.configurationPath)}]];t&&"metafields"in t&&Array.isArray(t.metafields)&&t.metafields.length>0&&o.push([" metafields",`${t.metafields.length}`]);let i=this.app.errors.getErrors(e.configurationPath);for(let r of i)o.push([{error:" error"},{error:this.formattedError(r.message)}]);return o}formattedError(e){let t=e.trim();if(_())return t;let[o,...i]=t.split(`
|
|
3
3
|
`);return[`! ${o}`,...i.map(r=>` ${r}`)].join(`
|
|
4
4
|
`)}async systemInfoSection(){let{platform:e,arch:t}=v();return this.tableSection("Tooling and System",[["Shopify CLI",m],["Package manager",this.project.packageManager],["OS",`${e}-${t}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}tableSection(e,t,{isFirstItem:o=!1}={}){return{title:`${o?"":`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-6R62DGJG.js";import{b as i}from"./chunk-3WV7DQMM.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static description="Generate a notifications.json file for the the CLI, appending a new notification to the current file.";static hidden=!0;async run(){await n()}};export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as x,a as oe,b as ne,c as M,d as ie,e as ae,g as L,i as P,j as le,k as ce,m as ue,n as pe,o as me,r as fe,s as de,t as ge,u as Ee,v,w as he,x as ye,y as Te,z as S}from"./chunk-U7R6LYPJ.js";import{a as se}from"./chunk-H5KWM27L.js";import{a as re}from"./chunk-NEMPLS7C.js";import{a as K}from"./chunk-KUNDCAQN.js";import{B as W,R as Z,T as ee,l as z,sa as te}from"./chunk-ACTDYTAV.js";import{ba as X}from"./chunk-F5HCSUXC.js";import{b as Q,c as Y}from"./chunk-JJJTPEMD.js";import{C as $}from"./chunk-YN6A26QL.js";import{d as _,e as f,f as o,l as G,y as H}from"./chunk-GMTNOCMS.js";import{h as N}from"./chunk-R2R6JDNH.js";import{a as Ne}from"./chunk-CTNBSUVU.js";import{ca as V,wb as F,xb as I}from"./chunk-Y34LWI3S.js";import{j}from"./chunk-773TIA5M.js";import{e as k,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=k(_(),1);function we(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new N(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=k(_(),1);async function _e({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=L,T=s,R=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await v({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,A,O,J=i.get(g.shop_id.toString());if(J===void 0)continue;switch(g.log_type){case ce:y=fe(g.payload),A=`export "${y.export}" executed in ${(y.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:y=de(g.payload),A="network access response retrieved from cache";break;case pe:y=ge(g.payload),A="network access request executing in background";break;case me:y=Ee(g.payload),O=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,A=`network access request executed${O?` in ${O} ms`:""}`;break;default:continue}let Ae={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:J,description:A,logTimestamp:V(g.log_timestamp)};y&&p(ke=>[...ke,{appLog:y,prefix:Ae}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function be({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await _e({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return we(w),{appLogOutputs:r,errors:p}}var e=k(_(),1);var Fe=t=>{switch(t){case M.NoCachedResponse:return"No cached response available";case M.CacheAboutToExpire:return"Cache is about to expire";case M.Unknown:return"Unknown reason"}},Re=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=be({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Fe(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(_(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>S(n,s,l);return G(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function q({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await U({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=L,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await v({response:d,onThrottle:w=>{I(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{I(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>S(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&F(ye({appLog:m,appLogPayload:Te(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{q({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Se(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Me(t),a=he(s);if(a.length===0)throw new N("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new N(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await S(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(F(JSON.stringify({subscribedToStores:t.storeFqdns})),I(JSON.stringify({message:"Waiting for app logs..."})),await q({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(I(`Waiting for app logs...
|
|
1
|
+
import{A as x,a as oe,b as ne,c as M,d as ie,e as ae,g as L,i as P,j as le,k as ce,m as ue,n as pe,o as me,r as fe,s as de,t as ge,u as Ee,v,w as he,x as ye,y as Te,z as S}from"./chunk-YXDIHVPY.js";import{a as se}from"./chunk-4I7TUB3K.js";import{a as re}from"./chunk-ESPT6CGE.js";import{a as K}from"./chunk-RA3WWB2S.js";import{B as W,R as Z,T as ee,l as z,sa as te}from"./chunk-GFWXVO72.js";import{ba as X}from"./chunk-SPE2D366.js";import{b as Q,c as Y}from"./chunk-IX4IGE5H.js";import{C as $}from"./chunk-PK73ZSND.js";import{d as _,e as f,f as o,l as G,y as H}from"./chunk-WSCSFFLH.js";import{h as N}from"./chunk-BI7LE6CZ.js";import{a as Ne}from"./chunk-CTNBSUVU.js";import{ca as V,wb as F,xb as I}from"./chunk-HQUWYKSJ.js";import{j}from"./chunk-773TIA5M.js";import{e as k,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=k(_(),1);function we(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new N(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=k(_(),1);async function _e({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=L,T=s,R=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await v({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,A,O,J=i.get(g.shop_id.toString());if(J===void 0)continue;switch(g.log_type){case ce:y=fe(g.payload),A=`export "${y.export}" executed in ${(y.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:y=de(g.payload),A="network access response retrieved from cache";break;case pe:y=ge(g.payload),A="network access request executing in background";break;case me:y=Ee(g.payload),O=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,A=`network access request executed${O?` in ${O} ms`:""}`;break;default:continue}let Ae={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:J,description:A,logTimestamp:V(g.log_timestamp)};y&&p(ke=>[...ke,{appLog:y,prefix:Ae}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function be({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await _e({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return we(w),{appLogOutputs:r,errors:p}}var e=k(_(),1);var Fe=t=>{switch(t){case M.NoCachedResponse:return"No cached response available";case M.CacheAboutToExpire:return"Cache is about to expire";case M.Unknown:return"Unknown reason"}},Re=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=be({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Fe(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(_(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>S(n,s,l);return G(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function q({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await U({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=L,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await v({response:d,onThrottle:w=>{I(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{I(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>S(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&F(ye({appLog:m,appLogPayload:Te(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{q({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Se(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Me(t),a=he(s);if(a.length===0)throw new N("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new N(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await S(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(F(JSON.stringify({subscribedToStores:t.storeFqdns})),I(JSON.stringify({message:"Waiting for app logs..."})),await q({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(I(`Waiting for app logs...
|
|
2
2
|
`),await Ie({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id}))}async function Me(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:l,organization:a}=t,p=j(s.configPath);t.format==="text"&&Le(n.title,l.shopDomain,t.storeFqdns,p,a.businessName);let u=new Map;return u.set(l.shopId,l.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let d=await X(a,c,i);u.set(d.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Le(t,s,n,i,l){let a=[];n&&n.length>0?n.forEach(u=>a.push(u)):a.push(s);let p=i?z(i):void 0;H({headline:i?`Using ${p} for default values:`:"Using these settings:",body:Z({appName:t,org:l,devStores:a,messages:[ee]})})}var B=k(Ne(),1);var D=class t extends re{static summary="Stream detailed logs for your Shopify app.";static descriptionWithMarkdown="\n Opens a real-time stream of detailed app logs from the selected app and store.\n Use the `--source` argument to limit output to a particular log source, such as a specific Shopify Function handle. Use the `shopify app logs sources` command to view a list of sources.\n Use the `--status` argument to filter on status, either `success` or `failure`.\n ```\n shopify app logs --status=success --source=extension.discount-function\n ```\n ";static description=this.descriptionWithoutMarkdown();static flags={...Q,...K,...Y,store:B.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async s=>$(s)}),source:B.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:B.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};async run(){let{flags:s}=await this.parse(t);await W(s.path);let n=await te({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await se({appContextResult:n,storeFqdn:s.store?.[0],forceReselectStore:s.reset}),l={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Se(l),{app:n.app}}};export{D as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D0,b as h0}from"./chunk-
|
|
1
|
+
import{a as D0,b as h0}from"./chunk-3HCWJRL6.js";import{b as d0,o as CB}from"./chunk-NJPL5BTN.js";import{a as vB}from"./chunk-VJEKDBGZ.js";import{a as p0}from"./chunk-QHLY2IID.js";import{$ as I0,A as Lc,B as gr,C as Te,D as di,E as Di,F as no,G as hi,H as _s,I as F0,J as Uc,K as E0,L as v0,M as kc,N as Vo,O as C0,P as w0,Q as b0,R as A0,S as S0,T as x0,U as P0,V as O0,X as T0,Y as Pd,Z as B0,aa as qc,c as f0,e as bd,f as jr,g as Wo,k as Nc,l as jc,m as Ad,n as Sd,p as $c,q as m0,r as pi,s as g0,t as xd,u as _0,v as Je,w as Ho,x as zo,y as y0,z as pn}from"./chunk-SPE2D366.js";import{aa as EB}from"./chunk-TP4Z5OZT.js";import{a as l0}from"./chunk-6G5TDB45.js";import{b as gs,c as Ct}from"./chunk-IENBHP2S.js";import{a as zy,b as Vy}from"./chunk-N4KDWHT2.js";import{a as c0}from"./chunk-OQWMCJLY.js";import{a as mr}from"./chunk-HU4GFVEN.js";import{$ as ky,C as Ry,L as jy,M as $y,O as Fd,R as Ly,X as mB,Y as Uy,Z as gB,_ as _B,a as ds,aa as yB,ba as fn,c as Sc,ca as Pc,d as xc,ea as qy,fa as vt,h as Oy,ha as Ds,ia as Wy,j as DB,m as li,ma as Hy,q as Ty,s as By,u as F,w as Iy}from"./chunk-PK73ZSND.js";import{m as Oc,n as Jy,s as Gy,t as Yy,w as Tc,x as Bc}from"./chunk-GW4JHUIA.js";import{d as hB,e as My,q as Ny}from"./chunk-AFT6ABDE.js";import{A as Ic,B as Zy,D as Qy,E as Mr,F as vd,H as e0,J as ms,K as t0,M as r0,S as fi,V as Rc,y as ro,z as hs}from"./chunk-WSCSFFLH.js";import{a as FB}from"./chunk-5HBIIYSK.js";import{a as hd}from"./chunk-76NEIDP5.js";import{f as Ed}from"./chunk-6K3AJTNO.js";import{a as Bn,b as to}from"./chunk-WMZS3Y4Z.js";import{h as k,j as In,k as Nr}from"./chunk-BI7LE6CZ.js";import{$a as ln,Ab as ce,Ba as wy,Bb as Rn,Db as s0,Ea as ci,Eb as a0,Fa as by,Ga as Cc,Ka as Ay,L as Qi,La as Sy,N as Bt,Oa as wc,Pa as xy,Q as pB,R as dB,T as Fy,Ta as X,Ua as Ut,V as ls,Wa as Ve,X as Lt,Xa as Py,Y as _d,_ as yd,aa as Ec,b as oB,bb as bc,c as uB,da as Ey,db as Ac,ea as qo,f as sB,gb as Ky,ha as vy,i as aB,k as cB,ka as fs,m as gy,ma as $e,n as _y,na as eo,oa as ps,pa as Ir,q as lB,qa as vc,qb as Ae,rb as Mc,sb as Se,u as yy,ua as mt,v as fB,va as Cy,w as gd,wa as Rr,xb as o0,zb as u0}from"./chunk-HQUWYKSJ.js";import{b as nB,c as iB,e as hy,f as my,i as Xy}from"./chunk-B4OMIONW.js";import{f as n0,k as Cd,l as wd,m as i0}from"./chunk-4VJ6YK7U.js";import{a as cs}from"./chunk-JD5P5RAJ.js";import{d as I,e as Zi,f as ot,g as Oe,h as fy,i as he,j as Re,k as yc,l as py,n as Fc,o as dy,s as Dy,t as md}from"./chunk-773TIA5M.js";import{a as ze,c as M,e as ai,f as rB,g as d}from"./chunk-VKWPEFWQ.js";var nF=M((Hc,rF)=>{d();(function(e,t){typeof Hc=="object"&&typeof rF<"u"?t(Hc,(dB(),rB(pB)),DB()):typeof define=="function"&&define.amd?define(["exports","tslib","graphql"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["graphql-tag"]={},e.tslib,e.graphql))})(Hc,(function(e,t,r){"use strict";var n=new Map,o=new Map,s=!0,a=!1;function l(q){return q.replace(/[\s,]+/g," ").trim()}function p(q){return l(q.source.body.substring(q.start,q.end))}function m(q){var G=new Set,Q=[];return q.definitions.forEach(function(fe){if(fe.kind==="FragmentDefinition"){var ye=fe.name.value,We=p(fe.loc),gt=o.get(ye);gt&&!gt.has(We)?s&&console.warn("Warning: fragment with name "+ye+` already exists.
|
|
2
2
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
3
3
|
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):gt||o.set(ye,gt=new Set),gt.add(We),G.has(We)||(G.add(We),Q.push(fe))}else Q.push(fe)}),t.__assign(t.__assign({},q),{definitions:Q})}function g(q){var G=new Set(q.definitions);G.forEach(function(fe){fe.loc&&delete fe.loc,Object.keys(fe).forEach(function(ye){var We=fe[ye];We&&typeof We=="object"&&G.add(We)})});var Q=q.loc;return Q&&(delete Q.startToken,delete Q.endToken),q}function E(q){var G=l(q);if(!n.has(G)){var Q=r.parse(q,{experimentalFragmentVariables:a,allowLegacyFragmentVariables:a,experimentalFragmentArguments:a});if(!Q||Q.kind!=="Document")throw new Error("Not a valid GraphQL document.");n.set(G,g(m(Q)))}return n.get(G)}function w(q){for(var G=[],Q=1;Q<arguments.length;Q++)G[Q-1]=arguments[Q];typeof q=="string"&&(q=[q]);var fe=q[0];return G.forEach(function(ye,We){ye&&ye.kind==="Document"?fe+=ye.loc.source.body:fe+=ye,fe+=q[We+1]}),E(fe)}function v(){n.clear(),o.clear()}function x(){s=!1}function O(){a=!0}function P(){a=!1}var B={gql:w,resetCaches:v,disableFragmentWarnings:x,enableExperimentalFragmentVariables:O,disableExperimentalFragmentVariables:P};(function(q){q.gql=B.gql,q.resetCaches=B.resetCaches,q.disableFragmentWarnings=B.disableFragmentWarnings,q.enableExperimentalFragmentVariables=B.enableExperimentalFragmentVariables,q.disableExperimentalFragmentVariables=B.disableExperimentalFragmentVariables})(w||(w={})),w.default=w;var U=w;e.default=U,e.disableExperimentalFragmentVariables=P,e.disableFragmentWarnings=x,e.enableExperimentalFragmentVariables=O,e.gql=w,e.resetCaches=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var oF=M((MH,iF)=>{d();iF.exports=nF().gql});var dF=M(pF=>{d();var qB=Object.create,zc=Object.defineProperty,WB=Object.getPrototypeOf,HB=Object.prototype.hasOwnProperty,zB=Object.getOwnPropertyNames,VB=Object.getOwnPropertyDescriptor,sF=e=>zc(e,"__esModule",{value:!0}),KB=(e,t)=>{sF(e);for(var r in t)zc(e,r,{get:t[r],enumerable:!0})},JB=(e,t,r)=>{if(sF(e),t&&typeof t=="object"||typeof t=="function")for(let n of zB(t))!HB.call(e,n)&&n!=="default"&&zc(e,n,{get:()=>t[n],enumerable:!(r=VB(t,n))||r.enumerable});return e},Vc=e=>e&&e.__esModule?e:JB(zc(e!=null?qB(WB(e)):{},"default",{value:e,enumerable:!0}),e);KB(pF,{default:()=>nI,generateContentsFromGraphqlString:()=>fF,generateGraphQLString:()=>cF});var GB=Vc(ze("fs")),YB=Vc(oF()),XB=Vc(ze("readline")),uF=Vc(ze("path")),aF=(e,t)=>{let r=t?t(e):e;return JSON.stringify(r,(n,o)=>o===void 0?"__undefined":o).replace(/"__undefined"/g,"undefined")},ZB=(e,t)=>{let r=new Set,n=[],o=s=>{r.has(s)||(r.add(s),s.imports.forEach(a=>{let l=t[a.absolutePath];o(l)}),n.unshift(s))};return e.forEach(o),n},QB=e=>new Promise(t=>{let r=XB.default.createInterface({input:GB.default.createReadStream(e)}),n="",o=[],s=!1,a=(l,p)=>{let m=p.replace(l,""),g=m.replace(/"|'/g,""),E=uF.default.join(uF.default.dirname(e),g);o.push({absolutePath:E,relativePath:m})};r.on("line",l=>{l.startsWith("#import ")?a("#import ",l):l.startsWith("# import ")?a("# import ",l):s?n+=l+`
|
|
4
4
|
`:l[0]!=="#"&&l!==""&&(s=!0,n+=l+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,b as p,c as d}from"./chunk-
|
|
1
|
+
import{a as c,b as p,c as d}from"./chunk-OF6CV5R4.js";import{a as r}from"./chunk-ESPT6CGE.js";import{a as n}from"./chunk-RA3WWB2S.js";import{sa as s}from"./chunk-GFWXVO72.js";import{b as a}from"./chunk-IX4IGE5H.js";import{a as y}from"./chunk-CTNBSUVU.js";import{e as g,g as i}from"./chunk-VKWPEFWQ.js";i();var f=g(y(),1);var o=class m extends r{static summary="Fetch the latest GraphQL schema for a function.";static descriptionWithMarkdown="Generates the latest [GraphQL schema](https://shopify.dev/docs/apps/functions/input-output#graphql-schema) for a function in your app. Run this command from the function directory.\n\n This command uses the API type and version of your function, as defined in your extension TOML file, to generate the latest GraphQL schema. The schema is written to the `schema.graphql` file.";static description=this.descriptionWithoutMarkdown();static flags={...a,...n,...p,stdout:f.Flags.boolean({description:"Output the schema to stdout instead of writing to a file.",required:!1,default:!1,env:"SHOPIFY_FLAG_STDOUT"})};async run(){let{flags:t}=await this.parse(m),{app:e,developerPlatformClient:h,organization:u}=await s({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),l=await d(e,t.path);return await c({app:e,extension:l,stdout:t.stdout,developerPlatformClient:h,orgId:u.id}),{app:e}}};export{o as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as O,n as W}from"./chunk-
|
|
1
|
+
import{l as O,n as W}from"./chunk-AFT6ABDE.js";import{S as v,a as S}from"./chunk-WSCSFFLH.js";import{f as y}from"./chunk-6K3AJTNO.js";import{h as u,k as L}from"./chunk-BI7LE6CZ.js";import{a as I}from"./chunk-CX5CC6P5.js";import{$a as F,Ab as d,Ta as w,Ua as i,Wa as D,jb as B,ma as x,qb as c,sb as s,ua as _}from"./chunk-HQUWYKSJ.js";import{d as r,i as k}from"./chunk-773TIA5M.js";import{e as R,g as f}from"./chunk-VKWPEFWQ.js";f();f();function b(e,n){try{return JSON.parse(e)}catch(a){let t=a instanceof Error?a.message:String(a),o=n?` from ${n}`:"";throw new u(`Failed to parse JSON${o}.
|
|
2
2
|
${t}`)}}var l=R(I(),1),N="yarn.lock",j="package-lock.json",$="pnpm-lock.yaml",C="bun.lockb",J="bun.lock",T="pnpm-workspace.yaml",we=[N,$,j,C,J],ye={yarn:[N],npm:[j],pnpm:[$],bun:[C,J],homebrew:[],unknown:[]},E=["yarn","npm","pnpm","bun","homebrew","unknown"],M=class extends u{constructor(){super("Unknown package manager")}},h=class extends u{constructor(n){super(s`The directory ${c.path(n)} doesn't have a package.json.`)}},P=class extends L{constructor(n){super(s`Couldn't find a a package.json traversing directories from ${c.path(n)}`)}};function V(e=process.env){let n=e.npm_config_user_agent;return["yarn","pnpm","bun","npm"].find(a=>n?.includes(a))??"unknown"}function U(e){return i(r(e,C))||i(r(e,J))}function G(e){switch(e){case"yarn":case"npm":case"pnpm":case"bun":return e;case"homebrew":case"unknown":return"npm"}}function K(e,n,...a){switch(e){case"npm":return{command:"npm",args:["exec","--",n,...a]};case"pnpm":return{command:"pnpm",args:["exec",n,...a]};case"yarn":return{command:"yarn",args:["run",n,...a]};case"bun":return{command:"bun",args:["x",n,...a]}}}async function A(e){let n=e;for(d(s`Looking for a lockfile in ${c.path(n)}...`);;){if(i(r(n,N)))return"yarn";if(i(r(n,$))||i(r(n,T)))return"pnpm";if(U(n))return"bun";if(i(r(n,j)))return"npm";let t=k(n);if(t===n)break;n=t}let a=V();return a!=="unknown"?a:"npm"}async function he(e,n,...a){let t=G(await A(e));return K(t,n,...a)}async function xe(e){let n=await D(r(e.directory,"**/package.json"),{ignore:[r(e.directory,"node_modules/**/package.json")],cwd:e.directory,onlyFiles:!0,deep:e.deep}),a=new S;try{await Promise.all(n.map(async t=>{let o=k(t);await z({directory:o,packageManager:e.packageManager,stdout:void 0,stderr:void 0,signal:a.signal,args:[]})}))}catch(t){throw a.abort(),t}}async function z(e){let n={cwd:e.directory,stdin:void 0,stdout:e.stdout,stderr:e.stderr,signal:e.signal},a=["install"];e.args&&(a=a.concat(e.args)),await y("cmd_all_timing_network_ms")(async()=>{await v(e.packageManager,a,n)})}async function ve(e){return(await m(e)).name}async function be(e){return(await m(e)).version}async function H(e){let n=await m(e),a=n.dependencies??{},t=n.devDependencies??{};return{...a,...t}}async function Me(e){let n=r(e,"package.json"),a=await m(n),t=r(e,T);return!!a.workspaces||w(t)}async function Pe(e,n,{cacheExpiryInHours:a=0}={}){let t=async()=>(d(s`Checking if there's a version of ${e} newer than ${n}`),ne(e)),o=`npm-package-${e}`,p;try{p=await O(o,t,a*3600*1e3)}catch{return}if(p&&new l.SemVer(n).compare(p)<0)return p}function Ne(e,n){let a=`npm-package-${e}`,t=W(a)?.value;if(t&&new l.SemVer(n).compare(t)<0)return t}function je(e,n){return(0,l.satisfies)(e,n)}async function m(e){if(!await w(e))throw new h(k(e));return b(await x(e),e)}async function Y(e,n){d(s`Adding the following dependencies if needed:
|
|
3
3
|
${c.json(e)}
|
|
4
4
|
With options:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as Yv}from"./chunk-OORWOTAP.js";import{A as hy,B as ri,C as uy,D as Fn,E as py,F as my,G as Na,H as fy,I as za,J as gy,K as ns,L as xT,M as by,N as Oa,O as rs,P as is,Q as Pn,R as vy,S as sn,T as Aa,U as La,V,W as kT,X as CT,a as ee,aa as Ru,b as Da,c as Zv,d as Dn,e as ke,f as Fa,g as ey,h as ty,i as ny,j as ry,k as iy,l as ts,m as oy,n as Pa,o as K,p as Ma,q as sy,r as Ia,s as Vt,t as ay,u as B,v as lt,w as xr,x as ly,y as cy,z as dy}from"./chunk-PIFW2R3S.js";import{b as Qv}from"./chunk-JJJTPEMD.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 Oi=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 _T(n){return n===!0||n===!1}ct.boolean=_T;function yy(n){return typeof n=="string"||n instanceof String}ct.string=yy;function TT(n){return typeof n=="number"||n instanceof Number}ct.number=TT;function RT(n){return n instanceof Error}ct.error=RT;function ET(n){return typeof n=="function"}ct.func=ET;function wy(n){return Array.isArray(n)}ct.array=wy;function DT(n){return wy(n)&&n.every(e=>yy(e))}ct.stringArray=DT});var Qu=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 ii=Oi(),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 Eu=class n extends Error{constructor(e,t,r){super(t),this.code=ii.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=Eu;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 Du=class extends Ce{constructor(e){super(e,0)}};j.RequestType0=Du;var Fu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType=Fu;var Pu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType1=Pu;var Mu=class extends Ce{constructor(e){super(e,2)}};j.RequestType2=Mu;var Iu=class extends Ce{constructor(e){super(e,3)}};j.RequestType3=Iu;var Nu=class extends Ce{constructor(e){super(e,4)}};j.RequestType4=Nu;var zu=class extends Ce{constructor(e){super(e,5)}};j.RequestType5=zu;var Ou=class extends Ce{constructor(e){super(e,6)}};j.RequestType6=Ou;var Au=class extends Ce{constructor(e){super(e,7)}};j.RequestType7=Au;var Lu=class extends Ce{constructor(e){super(e,8)}};j.RequestType8=Lu;var qu=class extends Ce{constructor(e){super(e,9)}};j.RequestType9=qu;var Wu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType=Wu;var Hu=class extends Ce{constructor(e){super(e,0)}};j.NotificationType0=Hu;var Uu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType1=Uu;var ju=class extends Ce{constructor(e){super(e,2)}};j.NotificationType2=ju;var $u=class extends Ce{constructor(e){super(e,3)}};j.NotificationType3=$u;var Bu=class extends Ce{constructor(e){super(e,4)}};j.NotificationType4=Bu;var Vu=class extends Ce{constructor(e){super(e,5)}};j.NotificationType5=Vu;var Gu=class extends Ce{constructor(e){super(e,6)}};j.NotificationType6=Gu;var Ku=class extends Ce{constructor(e){super(e,7)}};j.NotificationType7=Ku;var Ju=class extends Ce{constructor(e){super(e,8)}};j.NotificationType8=Ju;var Xu=class extends Ce{constructor(e){super(e,9)}};j.NotificationType9=Xu;var FT;(function(n){function e(i){let o=i;return o&&ii.string(o.method)&&(ii.string(o.id)||ii.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ii.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ii.string(o.id)||ii.number(o.id)||o.id===null)}n.isResponse=r})(FT=j.Message||(j.Message={}))});var Zu=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 qa=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=qa;var Yu=class extends qa{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=Yu});var ky=w(os=>{"use strict";d();Object.defineProperty(os,"__esModule",{value:!0});os.Disposable=void 0;var PT;(function(n){function e(t){return{dispose:t}}n.create=e})(PT=os.Disposable||(os.Disposable={}))});var kr=w(np=>{"use strict";d();Object.defineProperty(np,"__esModule",{value:!0});var ep;function tp(){if(ep===void 0)throw new Error("No runtime abstraction layer installed");return ep}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");ep=t}n.install=e})(tp||(tp={}));np.default=tp});var Ai=w(oi=>{"use strict";d();Object.defineProperty(oi,"__esModule",{value:!0});oi.Emitter=oi.Event=void 0;var MT=kr(),IT;(function(n){let e={dispose(){}};n.None=function(){return e}})(IT=oi.Event||(oi.Event={}));var rp=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,MT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Wa=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new rp),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)}};oi.Emitter=Wa;Wa._noop=function(){}});var Ua=w(si=>{"use strict";d();Object.defineProperty(si,"__esModule",{value:!0});si.CancellationTokenSource=si.CancellationToken=void 0;var NT=kr(),zT=Oi(),ip=Ai(),op;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ip.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ip.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||zT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(op=si.CancellationToken||(si.CancellationToken={}));var OT=Object.freeze(function(n,e){let t=(0,NT.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Ha=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?OT:(this._emitter||(this._emitter=new ip.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},sp=class{get token(){return this._token||(this._token=new Ha),this._token}cancel(){this._token?this._token.cancel():this._token=op.Cancelled}dispose(){this._token?this._token instanceof Ha&&this._token.dispose():this._token=op.None}};si.CancellationTokenSource=sp});var Cy=w(Li=>{"use strict";d();Object.defineProperty(Li,"__esModule",{value:!0});Li.SharedArrayReceiverStrategy=Li.SharedArraySenderStrategy=void 0;var AT=Ua(),ss;(function(n){n.Continue=0,n.Cancelled=1})(ss||(ss={}));var ap=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]=ss.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,ss.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Li.SharedArraySenderStrategy=ap;var lp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===ss.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},cp=class{constructor(e){this.token=new lp(e)}cancel(){}dispose(){}},dp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new AT.CancellationTokenSource:new cp(t)}};Li.SharedArrayReceiverStrategy=dp});var up=w(ja=>{"use strict";d();Object.defineProperty(ja,"__esModule",{value:!0});ja.Semaphore=void 0;var LT=kr(),hp=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,LT.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()}}};ja.Semaphore=hp});var _y=w(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReadableStreamMessageReader=Jn.AbstractMessageReader=Jn.MessageReader=void 0;var mp=kr(),qi=Oi(),pp=Ai(),qT=up(),WT;(function(n){function e(t){let r=t;return r&&qi.func(r.listen)&&qi.func(r.dispose)&&qi.func(r.onError)&&qi.func(r.onClose)&&qi.func(r.onPartialMessage)}n.is=e})(WT=Jn.MessageReader||(Jn.MessageReader={}));var $a=class{constructor(){this.errorEmitter=new pp.Emitter,this.closeEmitter=new pp.Emitter,this.partialMessageEmitter=new pp.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: ${qi.string(e.message)?e.message:"unknown"}`)}};Jn.AbstractMessageReader=$a;var fp;(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,mp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(fp||(fp={}));var gp=class extends $a{constructor(e,t){super(),this.readable=e,this.options=fp.fromOptions(t),this.buffer=(0,mp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new qT.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,mp.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=gp});var Dy=w(Xn=>{"use strict";d();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WriteableStreamMessageWriter=Xn.AbstractMessageWriter=Xn.MessageWriter=void 0;var Ty=kr(),as=Oi(),HT=up(),Ry=Ai(),UT="Content-Length: ",Ey=`\r
|
|
1
|
+
import{v as Yv}from"./chunk-3KM2GKXH.js";import{A as hy,B as ri,C as uy,D as Fn,E as py,F as my,G as Na,H as fy,I as za,J as gy,K as ns,L as xT,M as by,N as Oa,O as rs,P as is,Q as Pn,R as vy,S as sn,T as Aa,U as La,V,W as kT,X as CT,a as ee,aa as Ru,b as Da,c as Zv,d as Dn,e as ke,f as Fa,g as ey,h as ty,i as ny,j as ry,k as iy,l as ts,m as oy,n as Pa,o as K,p as Ma,q as sy,r as Ia,s as Vt,t as ay,u as B,v as lt,w as xr,x as ly,y as cy,z as dy}from"./chunk-TP4Z5OZT.js";import{b as Qv}from"./chunk-IX4IGE5H.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 Oi=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 _T(n){return n===!0||n===!1}ct.boolean=_T;function yy(n){return typeof n=="string"||n instanceof String}ct.string=yy;function TT(n){return typeof n=="number"||n instanceof Number}ct.number=TT;function RT(n){return n instanceof Error}ct.error=RT;function ET(n){return typeof n=="function"}ct.func=ET;function wy(n){return Array.isArray(n)}ct.array=wy;function DT(n){return wy(n)&&n.every(e=>yy(e))}ct.stringArray=DT});var Qu=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 ii=Oi(),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 Eu=class n extends Error{constructor(e,t,r){super(t),this.code=ii.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=Eu;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 Du=class extends Ce{constructor(e){super(e,0)}};j.RequestType0=Du;var Fu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType=Fu;var Pu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.RequestType1=Pu;var Mu=class extends Ce{constructor(e){super(e,2)}};j.RequestType2=Mu;var Iu=class extends Ce{constructor(e){super(e,3)}};j.RequestType3=Iu;var Nu=class extends Ce{constructor(e){super(e,4)}};j.RequestType4=Nu;var zu=class extends Ce{constructor(e){super(e,5)}};j.RequestType5=zu;var Ou=class extends Ce{constructor(e){super(e,6)}};j.RequestType6=Ou;var Au=class extends Ce{constructor(e){super(e,7)}};j.RequestType7=Au;var Lu=class extends Ce{constructor(e){super(e,8)}};j.RequestType8=Lu;var qu=class extends Ce{constructor(e){super(e,9)}};j.RequestType9=qu;var Wu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType=Wu;var Hu=class extends Ce{constructor(e){super(e,0)}};j.NotificationType0=Hu;var Uu=class extends Ce{constructor(e,t=Tt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};j.NotificationType1=Uu;var ju=class extends Ce{constructor(e){super(e,2)}};j.NotificationType2=ju;var $u=class extends Ce{constructor(e){super(e,3)}};j.NotificationType3=$u;var Bu=class extends Ce{constructor(e){super(e,4)}};j.NotificationType4=Bu;var Vu=class extends Ce{constructor(e){super(e,5)}};j.NotificationType5=Vu;var Gu=class extends Ce{constructor(e){super(e,6)}};j.NotificationType6=Gu;var Ku=class extends Ce{constructor(e){super(e,7)}};j.NotificationType7=Ku;var Ju=class extends Ce{constructor(e){super(e,8)}};j.NotificationType8=Ju;var Xu=class extends Ce{constructor(e){super(e,9)}};j.NotificationType9=Xu;var FT;(function(n){function e(i){let o=i;return o&&ii.string(o.method)&&(ii.string(o.id)||ii.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ii.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ii.string(o.id)||ii.number(o.id)||o.id===null)}n.isResponse=r})(FT=j.Message||(j.Message={}))});var Zu=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 qa=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=qa;var Yu=class extends qa{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=Yu});var ky=w(os=>{"use strict";d();Object.defineProperty(os,"__esModule",{value:!0});os.Disposable=void 0;var PT;(function(n){function e(t){return{dispose:t}}n.create=e})(PT=os.Disposable||(os.Disposable={}))});var kr=w(np=>{"use strict";d();Object.defineProperty(np,"__esModule",{value:!0});var ep;function tp(){if(ep===void 0)throw new Error("No runtime abstraction layer installed");return ep}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");ep=t}n.install=e})(tp||(tp={}));np.default=tp});var Ai=w(oi=>{"use strict";d();Object.defineProperty(oi,"__esModule",{value:!0});oi.Emitter=oi.Event=void 0;var MT=kr(),IT;(function(n){let e={dispose(){}};n.None=function(){return e}})(IT=oi.Event||(oi.Event={}));var rp=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,MT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Wa=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new rp),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)}};oi.Emitter=Wa;Wa._noop=function(){}});var Ua=w(si=>{"use strict";d();Object.defineProperty(si,"__esModule",{value:!0});si.CancellationTokenSource=si.CancellationToken=void 0;var NT=kr(),zT=Oi(),ip=Ai(),op;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ip.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ip.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||zT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(op=si.CancellationToken||(si.CancellationToken={}));var OT=Object.freeze(function(n,e){let t=(0,NT.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),Ha=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?OT:(this._emitter||(this._emitter=new ip.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},sp=class{get token(){return this._token||(this._token=new Ha),this._token}cancel(){this._token?this._token.cancel():this._token=op.Cancelled}dispose(){this._token?this._token instanceof Ha&&this._token.dispose():this._token=op.None}};si.CancellationTokenSource=sp});var Cy=w(Li=>{"use strict";d();Object.defineProperty(Li,"__esModule",{value:!0});Li.SharedArrayReceiverStrategy=Li.SharedArraySenderStrategy=void 0;var AT=Ua(),ss;(function(n){n.Continue=0,n.Cancelled=1})(ss||(ss={}));var ap=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]=ss.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,ss.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Li.SharedArraySenderStrategy=ap;var lp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===ss.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},cp=class{constructor(e){this.token=new lp(e)}cancel(){}dispose(){}},dp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new AT.CancellationTokenSource:new cp(t)}};Li.SharedArrayReceiverStrategy=dp});var up=w(ja=>{"use strict";d();Object.defineProperty(ja,"__esModule",{value:!0});ja.Semaphore=void 0;var LT=kr(),hp=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,LT.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()}}};ja.Semaphore=hp});var _y=w(Jn=>{"use strict";d();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReadableStreamMessageReader=Jn.AbstractMessageReader=Jn.MessageReader=void 0;var mp=kr(),qi=Oi(),pp=Ai(),qT=up(),WT;(function(n){function e(t){let r=t;return r&&qi.func(r.listen)&&qi.func(r.dispose)&&qi.func(r.onError)&&qi.func(r.onClose)&&qi.func(r.onPartialMessage)}n.is=e})(WT=Jn.MessageReader||(Jn.MessageReader={}));var $a=class{constructor(){this.errorEmitter=new pp.Emitter,this.closeEmitter=new pp.Emitter,this.partialMessageEmitter=new pp.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: ${qi.string(e.message)?e.message:"unknown"}`)}};Jn.AbstractMessageReader=$a;var fp;(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,mp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(fp||(fp={}));var gp=class extends $a{constructor(e,t){super(),this.readable=e,this.options=fp.fromOptions(t),this.buffer=(0,mp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new qT.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,mp.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=gp});var Dy=w(Xn=>{"use strict";d();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.WriteableStreamMessageWriter=Xn.AbstractMessageWriter=Xn.MessageWriter=void 0;var Ty=kr(),as=Oi(),HT=up(),Ry=Ai(),UT="Content-Length: ",Ey=`\r
|
|
2
2
|
`,jT;(function(n){function e(t){let r=t;return r&&as.func(r.dispose)&&as.func(r.onClose)&&as.func(r.onError)&&as.func(r.write)}n.is=e})(jT=Xn.MessageWriter||(Xn.MessageWriter={}));var Ba=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: ${as.string(e.message)?e.message:"unknown"}`)}};Xn.AbstractMessageWriter=Ba;var bp;(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})(bp||(bp={}));var vp=class extends Ba{constructor(e,t){super(),this.writable=e,this.options=bp.fromOptions(t),this.errorCount=0,this.writeSemaphore=new HT.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(UT,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=vp});var Fy=w(Va=>{"use strict";d();Object.defineProperty(Va,"__esModule",{value:!0});Va.AbstractMessageBuffer=void 0;var $T=13,BT=10,VT=`\r
|
|
3
3
|
`,yp=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 $T:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case BT: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(VT);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}};Va.AbstractMessageBuffer=yp});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=kr(),Pe=Oi(),J=Qu(),My=Zu(),ls=Ai(),wp=Ua(),ds;(function(n){n.type=new J.NotificationType("$/cancelRequest")})(ds||(ds={}));var Iy;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(Iy=U.ProgressToken||(U.ProgressToken={}));var cs;(function(n){n.type=new J.NotificationType("$/progress")})(cs||(cs={}));var Sp=class{constructor(){}};U.ProgressType=Sp;var xp;(function(n){function e(t){return Pe.func(t)}n.is=e})(xp||(xp={}));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 GT;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(GT=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 kp;(function(n){n.type=new J.NotificationType("$/logTrace")})(kp=U.LogTraceNotification||(U.LogTraceNotification={}));var Ga;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Ga=U.ConnectionErrors||(U.ConnectionErrors={}));var Wi=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};U.ConnectionError=Wi;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 Tp;(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})(Tp=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 Cp;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new wp.CancellationTokenSource}});function e(t){return Tp.is(t)||Oy.is(t)}n.is=e})(Cp=U.CancellationReceiverStrategy||(U.CancellationReceiverStrategy={}));var _p;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(ds.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Pe.func(r.sendCancellation)&&Pe.func(r.cleanup)}n.is=e})(_p=U.CancellationSenderStrategy||(U.CancellationSenderStrategy={}));var Rp;(function(n){n.Message=Object.freeze({receiver:Cp.Message,sender:_p.Message});function e(t){let r=t;return r&&Cp.is(r.receiver)&&_p.is(r.sender)}n.is=e})(Rp=U.CancellationStrategy||(U.CancellationStrategy={}));var Ep;(function(n){function e(t){let r=t;return r&&Pe.func(r.handleMessage)}n.is=e})(Ep=U.MessageStrategy||(U.MessageStrategy={}));var KT;(function(n){function e(t){let r=t;return r&&(Rp.is(r.cancellationStrategy)||zy.is(r.connectionStrategy)||Ep.is(r.messageStrategy))}n.is=e})(KT=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 JT(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 ls.Emitter,De=new ls.Emitter,Wt=new ls.Emitter,Dt=new ls.Emitter,kt=new ls.Emitter,Ct=r&&r.cancellationStrategy?r.cancellationStrategy:Rp.Message;function yr(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 ti(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(yr(E.id),E):J.Message.isResponse(E)?v.set(ti(E.id),E):v.set(Ht(),E)}function wr(v){}function Ut(){return q===ln.Listening}function Rn(){return q===ln.Closed}function pt(){return q===ln.Disposed}function Sr(){(q===ln.New||q===ln.Listening)&&(q=ln.Closed,De.fire(void 0))}function Yo(v){Se.fire([v,void 0,void 0])}function Pi(v){Se.fire(v)}n.onClose(Sr),n.onError(Yo),e.onClose(Sr),e.onError(Pi);function Mi(){C||D.size===0||(C=(0,Py.default)().timer.setImmediate(()=>{C=void 0,xu()}))}function Ii(v){J.Message.isRequest(v)?ku(v):J.Message.isNotification(v)?_u(v):J.Message.isResponse(v)?Cu(v):Ea(v)}function xu(){if(D.size===0)return;let v=D.shift();try{let E=r?.messageStrategy;Ep.is(E)?E.handleMessage(v,Ii):Ii(v)}finally{Mi()}}let ni=v=>{try{if(J.Message.isNotification(v)&&v.method===ds.type.method){let E=v.params.id,I=yr(E),H=D.get(I);if(J.Message.isRequest(H)){let ge=r?.connectionStrategy,Ne=ge&&ge.cancelUndispatched?ge.cancelUndispatched(H,wr):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{Mi()}};function ku(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=Tp.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 Cu(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(vT(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 _u(v){if(pt())return;let E,I;if(v.method===ds.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===cs.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 Ea(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b}from"./chunk-
|
|
1
|
+
import{b}from"./chunk-VXYABRFY.js";import{a as F}from"./chunk-P5WLH64A.js";import{j as c,l as f,o as T}from"./chunk-5JW4JQWZ.js";import{p as y,v as O}from"./chunk-3KM2GKXH.js";import{b as I}from"./chunk-IX4IGE5H.js";import{r as v,wa as w}from"./chunk-PK73ZSND.js";import{z as S}from"./chunk-WSCSFFLH.js";import{h as a}from"./chunk-BI7LE6CZ.js";import{a as A}from"./chunk-CTNBSUVU.js";import{Ua as l,ma as u,xb as _}from"./chunk-HQUWYKSJ.js";import{e as x,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function P({session:e,overridesContent:r,themeId:t}){w("theme-preview:create");let m=`${f(e)}/theme_preview.json?preview_theme_id=${t}`,o=await c(e,{headers:{"Content-Type":"application/json"}}),i=await v(m,{method:"POST",body:r,headers:o});if(!i.ok)throw new a(`Theme preview request failed with status ${i.status}: ${i.statusText}`);let n=await J(i);return w("theme-preview:create"),n}async function g({session:e,overridesContent:r,themeId:t,previewIdentifier:s}){w("theme-preview:update");let o=`${f(e)}/theme_preview.json?preview_theme_id=${t}&preview_identifier=${encodeURIComponent(s)}`,i=await c(e,{headers:{"Content-Type":"application/json"}}),n=await v(o,{method:"POST",body:r,headers:i});if(!n.ok)throw new a(`Theme preview request failed with status ${n.status}: ${n.statusText}`);let E=await J(n);return w("theme-preview:update"),E}async function J(e){let r=await e.json();if(r.error)throw new a(`Theme preview failed: ${r.error}`);if(!r.url||!r.preview_identifier)throw new a("Theme preview returned an unexpected response");return{url:r.url,preview_identifier:r.preview_identifier}}async function $(e){if(!l(e.overrideJson))throw new a(`Override file not found: ${e.overrideJson}`);let r=await u(e.overrideJson),t;try{t=JSON.parse(r)}catch(i){let n=i instanceof Error?i.message:String(i);throw new a(`Failed to parse override file: ${e.overrideJson}`,n)}let s=await T(e.themeId,e.adminSession,e.password),m=JSON.stringify(t),o=e.previewIdentifier?await g({session:s,overridesContent:m,themeId:e.themeId,previewIdentifier:e.previewIdentifier}):await P({session:s,overridesContent:m,themeId:e.themeId});e.json?_(JSON.stringify({url:o.url,preview_identifier:o.preview_identifier})):S({body:[{list:{title:e.previewIdentifier?"Preview updated":"Preview is ready",items:[{link:{url:o.url}},`Preview ID: ${o.preview_identifier}`]}}]}),e.open&&b(o.url,"theme preview")}var p=x(A(),1);var h=class extends O{static summary="Applies JSON overrides to a theme and returns a preview URL.";static descriptionWithMarkdown="Applies a JSON overrides file to a theme and creates or updates a preview. This lets you quickly preview changes.\n\n The command returns a preview URL and a preview identifier. You can reuse the preview identifier with `--preview-id` to update an existing preview instead of creating a new one.";static description=this.descriptionWithoutMarkdown();static flags={...I,...y,theme:p.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID",required:!0}),overrides:p.Flags.string({description:"Path to a JSON overrides file.",env:"SHOPIFY_FLAG_OVERRIDES",required:!0}),"preview-id":p.Flags.string({description:"An existing preview identifier to update instead of creating a new preview.",env:"SHOPIFY_FLAG_PREVIEW_ID"}),open:p.Flags.boolean({description:"Automatically launch the theme preview in your default web browser.",env:"SHOPIFY_FLAG_OPEN",default:!1}),json:p.Flags.boolean({description:"Output the preview URL and identifier as JSON.",env:"SHOPIFY_FLAG_JSON",default:!1})};static multiEnvironmentsFlags=null;async command(r,t){let s=await F(t,{filter:{theme:r.theme}});await $({adminSession:t,overrideJson:r.overrides,themeId:s.id.toString(),previewIdentifier:r["preview-id"],open:r.open,password:r.password,json:r.json})}};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as w}from"./chunk-
|
|
1
|
+
import{a as h,b as w}from"./chunk-IA3XNJ56.js";import{q as f}from"./chunk-PK73ZSND.js";import{T as d}from"./chunk-WSCSFFLH.js";import{h as i}from"./chunk-BI7LE6CZ.js";import{Ga as m,na as p}from"./chunk-HQUWYKSJ.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};
|