shopify 4.9.1 → 4.9.2
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-H2ANKZ2S.js +1 -0
- package/dist/analytics-Q6HJRPRX.js +1 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +14 -0
- package/dist/assets/hydrogen/starter/package.json +2 -2
- package/dist/bootstrap.js +1 -1
- package/dist/chunk-246AZCDT.js +1 -0
- package/dist/{chunk-NHEUJKAO.js → chunk-2NMICU24.js} +1 -1
- package/dist/{chunk-3MEL3WLG.js → chunk-2P5DUPT7.js} +1 -1
- package/dist/{chunk-C4QR7Z4N.js → chunk-2R2PKQQV.js} +1 -1
- package/dist/{chunk-X6Y3HDXN.js → chunk-2VDCTMLY.js} +1 -1
- package/dist/{chunk-NZRQKFUB.js → chunk-2X3HYG4B.js} +1 -1
- package/dist/{chunk-SHDGD2WJ.js → chunk-3ATOVFLZ.js} +1 -1
- package/dist/{chunk-VWYZCCRE.js → chunk-3E3MCY5O.js} +4 -4
- package/dist/{chunk-XY2SSJQD.js → chunk-3EEH3A27.js} +1 -1
- package/dist/{chunk-COFGQT76.js → chunk-3F42A3XV.js} +2 -2
- package/dist/{chunk-QEF43PR2.js → chunk-3NRGGEGU.js} +1 -1
- package/dist/{chunk-W6TPRWEE.js → chunk-3NUQGW57.js} +1 -1
- package/dist/{chunk-FJCNEHTH.js → chunk-3U2MYUWG.js} +1 -1
- package/dist/{chunk-Z6VWYOKN.js → chunk-3ZL4TDTH.js} +1 -1
- package/dist/{chunk-EVQPVO4P.js → chunk-4565O5TG.js} +1 -1
- package/dist/{chunk-4AXLWDKW.js → chunk-46U6C6C6.js} +1 -1
- package/dist/{chunk-JSGOBMF6.js → chunk-4QEALPWD.js} +1 -1
- package/dist/{chunk-3GVSG4S6.js → chunk-4S2WKMLJ.js} +1 -1
- package/dist/{chunk-N56BJ3F7.js → chunk-4TF7ER72.js} +1 -1
- package/dist/{chunk-7AD5YCLL.js → chunk-525BMYNR.js} +1 -1
- package/dist/{chunk-HT2JVMLK.js → chunk-55QTRPZ2.js} +1 -1
- package/dist/{chunk-ADIHYUQC.js → chunk-5BO5HCN6.js} +1 -1
- package/dist/{chunk-EYB45DUG.js → chunk-5JW2EYSE.js} +1 -1
- package/dist/{chunk-ZDRQUKLN.js → chunk-5TQOMAJS.js} +1 -1
- package/dist/{chunk-2QV5FHXJ.js → chunk-65I35VBS.js} +1 -1
- package/dist/{chunk-3WMFKHIM.js → chunk-6H3HVSO5.js} +1 -1
- package/dist/{chunk-C7YSU4R5.js → chunk-6NLGZGYE.js} +1 -1
- package/dist/{chunk-5KILOX2V.js → chunk-6SO5GA6P.js} +1 -1
- package/dist/{chunk-EDLID4PK.js → chunk-7ARGLS6W.js} +3 -3
- package/dist/chunk-7E4MJCVE.js +10 -0
- package/dist/{chunk-DUWS6Q7C.js → chunk-7EDXMGBQ.js} +1 -1
- package/dist/{chunk-S3J3BYQ3.js → chunk-7GJYJ6DU.js} +1 -1
- package/dist/{chunk-I4FS7HYY.js → chunk-7IRPE3M5.js} +1 -1
- package/dist/{chunk-S3IDGHAZ.js → chunk-7MMPQMU7.js} +1 -1
- package/dist/{chunk-NGQDG4CJ.js → chunk-7ZNR4YL4.js} +1 -1
- package/dist/{chunk-LAHZ6FO5.js → chunk-AKP4QAGL.js} +1 -1
- package/dist/{chunk-RFB7RXTA.js → chunk-ANHSOQTZ.js} +1 -1
- package/dist/{chunk-DREP3FRJ.js → chunk-AVOSD4NV.js} +1 -1
- package/dist/{chunk-B4YDR22W.js → chunk-B477XHLZ.js} +1 -1
- package/dist/{chunk-2RVMF4QP.js → chunk-BK4VCXDD.js} +1 -1
- package/dist/{chunk-55JDA75S.js → chunk-BLBJT7BM.js} +1 -1
- package/dist/{chunk-YFR53MWF.js → chunk-BLCR7BXU.js} +1 -1
- package/dist/{chunk-HQK6QRXN.js → chunk-BPVXYM6G.js} +1 -1
- package/dist/{chunk-OJ7KRWUH.js → chunk-BVR3GF2L.js} +1 -1
- package/dist/{chunk-QZDFPNYT.js → chunk-BVVYKX4D.js} +1 -1
- package/dist/{chunk-GRKZRK4G.js → chunk-C4GEP3CX.js} +1 -1
- package/dist/{chunk-K5KUOPEF.js → chunk-CDIKRQ6M.js} +1 -1
- package/dist/{chunk-6WGHVCYY.js → chunk-CGH5Y6XE.js} +1 -1
- package/dist/{chunk-F34MAI7X.js → chunk-CHRFYG6W.js} +1 -1
- package/dist/{chunk-MIMOKFDI.js → chunk-CNAMKKAK.js} +1 -1
- package/dist/{chunk-2TOIR7YQ.js → chunk-D2S566HF.js} +1 -1
- package/dist/{chunk-XW33ZO7F.js → chunk-DGOBYP74.js} +1 -1
- package/dist/{chunk-ZQKZC2KN.js → chunk-DH5E6NM3.js} +1 -1
- package/dist/{chunk-QEEA2KEN.js → chunk-DTGIMRBX.js} +1 -1
- package/dist/chunk-DV77BSKW.js +1 -0
- package/dist/{chunk-BATQEAGE.js → chunk-E64OFJHF.js} +1 -1
- package/dist/{chunk-WGBUSO27.js → chunk-EGJQEKAO.js} +1 -1
- package/dist/{chunk-2FHVYY3B.js → chunk-EJY4LA2S.js} +1 -1
- package/dist/{chunk-P6ID3ULA.js → chunk-ELJ34WWD.js} +1 -1
- package/dist/{chunk-OSA6BKSU.js → chunk-ELQ5NPPB.js} +1 -1
- package/dist/{chunk-RDCHRPKV.js → chunk-EMKLN75K.js} +1 -1
- package/dist/{chunk-ICFM55ZS.js → chunk-EMRUM6AA.js} +1 -1
- package/dist/{chunk-RNXWL6DS.js → chunk-EP5HIGAL.js} +1 -1
- package/dist/{chunk-JOEWOCHY.js → chunk-ER7ZTF26.js} +1 -1
- package/dist/{chunk-J4SJHG3M.js → chunk-EXKTQF26.js} +1 -1
- package/dist/{chunk-CUZQRXTV.js → chunk-EZ5F4ZFY.js} +3 -3
- package/dist/{chunk-7WWPAHVE.js → chunk-FICC6IFE.js} +1 -1
- package/dist/{chunk-MZJKZLCC.js → chunk-FNKTF2OF.js} +1 -1
- package/dist/{chunk-NTFIW3VK.js → chunk-FQKURDZR.js} +1 -1
- package/dist/{chunk-7ZONBOEZ.js → chunk-FU4UVINZ.js} +1 -1
- package/dist/{chunk-254XYKPN.js → chunk-G627WGIC.js} +2 -2
- package/dist/{chunk-FNITLQDL.js → chunk-GPJJA3FX.js} +1 -1
- package/dist/{chunk-VY7UGJZK.js → chunk-GS52MX5F.js} +1 -1
- package/dist/{chunk-23ITMFUO.js → chunk-HKZ75UKL.js} +1 -1
- package/dist/chunk-HVU3D3ZU.js +275 -0
- package/dist/{chunk-63GEZEYP.js → chunk-HYC3JXR4.js} +1 -1
- package/dist/{chunk-5ZSN73EA.js → chunk-HZJHGHLN.js} +1 -1
- package/dist/{chunk-XCXQPV5W.js → chunk-I2LILWDI.js} +1 -1
- package/dist/{chunk-JA2QZ635.js → chunk-I3J63RFV.js} +1 -1
- package/dist/{chunk-YQZPL4K3.js → chunk-I55L6FOM.js} +1 -1
- package/dist/{chunk-JCVQB6MX.js → chunk-IESHPQLC.js} +1 -1
- package/dist/{chunk-ET2CGROE.js → chunk-IGE4Y5SE.js} +1 -1
- package/dist/{chunk-QNR3U4IO.js → chunk-IJLD5UYC.js} +1 -1
- package/dist/{chunk-5I5HKOQU.js → chunk-IOS4IDZ2.js} +1 -1
- package/dist/{chunk-7H4IM6PX.js → chunk-IQIUFTR6.js} +1 -1
- package/dist/{chunk-NWBAD3AV.js → chunk-J66WAKXN.js} +1 -1
- package/dist/{chunk-PTS7J2JO.js → chunk-J7ZG6SO3.js} +1 -1
- package/dist/{chunk-YS5RZ6D5.js → chunk-JAX56OYG.js} +1 -1
- package/dist/{chunk-NSHKVJST.js → chunk-JAY7AGAG.js} +1 -1
- package/dist/{chunk-DUWU7CL7.js → chunk-JCKA3O5A.js} +1 -1
- package/dist/{chunk-GPRUQBQX.js → chunk-JCO2SDDR.js} +1 -1
- package/dist/{chunk-TOLPNBZK.js → chunk-JFBCE4HN.js} +1 -1
- package/dist/{chunk-UJD7OQ3I.js → chunk-JJHJYBPQ.js} +1 -1
- package/dist/{chunk-RX27ER4R.js → chunk-JKWB7WTO.js} +1 -1
- package/dist/{chunk-VXHLE5UQ.js → chunk-JLGXJHPX.js} +1 -1
- package/dist/{chunk-VEIZLSMG.js → chunk-JUCOIXG5.js} +1 -1
- package/dist/{chunk-HSTNTHWM.js → chunk-JUVJNIEA.js} +1 -1
- package/dist/{chunk-SKK7CPUY.js → chunk-JWDR66AS.js} +1 -1
- package/dist/chunk-KOYBR5MV.js +1 -0
- package/dist/{chunk-NYNSMHKY.js → chunk-KPNUSDCW.js} +1 -1
- package/dist/{chunk-7IS6Q756.js → chunk-KY36HSIB.js} +1 -1
- package/dist/{chunk-2NBNVDDA.js → chunk-KYBZ2MBA.js} +1 -1
- package/dist/{chunk-GHO2S3W3.js → chunk-LIQSNIB3.js} +1 -1
- package/dist/{chunk-OKX6PKAW.js → chunk-LWF4EV22.js} +1 -1
- package/dist/{chunk-ON3YXHON.js → chunk-M7QFZQ23.js} +1 -1
- package/dist/{chunk-QH5R32AA.js → chunk-MHZSSRHP.js} +1 -1
- package/dist/{chunk-YACDI6IK.js → chunk-MIP2Y34N.js} +1 -1
- package/dist/{chunk-MEFJND2V.js → chunk-MP5NZL7C.js} +1 -1
- package/dist/{chunk-IUUKRTKF.js → chunk-MQZPASSP.js} +1 -1
- package/dist/{chunk-3VXXYY6S.js → chunk-MW3HFOPD.js} +1 -1
- package/dist/{chunk-JF47WERF.js → chunk-N4AR2B6D.js} +1 -1
- package/dist/{chunk-JJ4MYCVU.js → chunk-NDMISEDF.js} +1 -1
- package/dist/{chunk-77QYKF34.js → chunk-NLKO2J7T.js} +1 -1
- package/dist/{chunk-RRBI2IRE.js → chunk-NS4FUSSK.js} +1 -1
- package/dist/{chunk-OVOOQFRY.js → chunk-OCQZ2ULI.js} +1 -1
- package/dist/{chunk-LOKVWZD2.js → chunk-OERMQ2FP.js} +2 -2
- package/dist/{chunk-WRVB4JCZ.js → chunk-OIQVPTNQ.js} +1 -1
- package/dist/{chunk-H3QLPW7Q.js → chunk-OMEWUFUL.js} +1 -1
- package/dist/{chunk-JCOQDVEB.js → chunk-OXN2DID2.js} +1 -1
- package/dist/{chunk-HKNFZUAM.js → chunk-P2MVR6CG.js} +107 -107
- package/dist/{chunk-CKLS5LTU.js → chunk-P6TOIMMF.js} +1 -1
- package/dist/{chunk-DYHRCMH6.js → chunk-PFIQR7XS.js} +1 -1
- package/dist/{chunk-AKSOCKVF.js → chunk-PG6XEOYF.js} +2 -2
- package/dist/{chunk-46IUD46F.js → chunk-PGE4HGLA.js} +1 -1
- package/dist/{chunk-3UZYLXCB.js → chunk-PI6FLLDD.js} +1 -1
- package/dist/{chunk-HDQXFGYG.js → chunk-PIZDYS7T.js} +60 -60
- package/dist/{chunk-WBTR5JZ6.js → chunk-PQCALXSD.js} +1 -1
- package/dist/{chunk-WR2MMFJO.js → chunk-PQH4U2XV.js} +1 -1
- package/dist/{chunk-TGUAZMI2.js → chunk-PQMKPXFV.js} +1 -1
- package/dist/{chunk-GF75CMTJ.js → chunk-PV5C6Q2P.js} +1 -1
- package/dist/{chunk-P676C7UT.js → chunk-PYILLIGT.js} +1 -1
- package/dist/{chunk-HVOYSAB3.js → chunk-Q26ES5T3.js} +1 -1
- package/dist/{chunk-2KBTFKSM.js → chunk-Q4TZD2M6.js} +1 -1
- package/dist/{chunk-QF6EH4HX.js → chunk-Q555FV2X.js} +1 -1
- package/dist/{chunk-UZTL2UET.js → chunk-Q7PF4VKI.js} +23 -23
- package/dist/{chunk-UVSXPMUN.js → chunk-QA2NOPXG.js} +1 -1
- package/dist/{chunk-5XO6PAMV.js → chunk-QLHPTMIH.js} +1 -1
- package/dist/{chunk-7UV53AU2.js → chunk-QMJZFKKU.js} +1 -1
- package/dist/{chunk-HJ3DOUAL.js → chunk-QN6SITWN.js} +1 -1
- package/dist/{chunk-STLYSBD5.js → chunk-R43LXE66.js} +1 -1
- package/dist/chunk-R6IJRVVM.js +70 -0
- package/dist/{chunk-5MJX7RKQ.js → chunk-RAQP66LR.js} +1 -1
- package/dist/{chunk-LRKJSNM3.js → chunk-RBPMV3KB.js} +1 -1
- package/dist/{chunk-KCHERKZO.js → chunk-RCYQPOJW.js} +88 -88
- package/dist/{chunk-VPH2AAHJ.js → chunk-RDO5IWB5.js} +1 -1
- package/dist/{chunk-FROK2K3X.js → chunk-RGZCV56L.js} +1 -1
- package/dist/{chunk-X3WFHNF5.js → chunk-RW2MONAS.js} +1 -1
- package/dist/{chunk-CPKLTBLZ.js → chunk-RY6TZDVV.js} +1 -1
- package/dist/{chunk-DEY5P63E.js → chunk-SDHDDNKM.js} +1 -1
- package/dist/{chunk-IQ4VOPT7.js → chunk-SHBB5GST.js} +1 -1
- package/dist/{chunk-ISIPFEFB.js → chunk-SQIESCOJ.js} +1 -1
- package/dist/{chunk-VL3XMULV.js → chunk-SRDKLZ4O.js} +1 -1
- package/dist/{chunk-VX2CDHRQ.js → chunk-SWNY3RUM.js} +1 -1
- package/dist/{chunk-WR6KP7RT.js → chunk-SYNCIFJ6.js} +1 -1
- package/dist/{chunk-DZS4GBQX.js → chunk-SZ2JOXTG.js} +1 -1
- package/dist/{chunk-OUSRNKZG.js → chunk-T3JUBPBU.js} +1 -1
- package/dist/{chunk-QPCDSJ4J.js → chunk-T6TYF72N.js} +1 -1
- package/dist/{chunk-U2WUTGPI.js → chunk-TEASB2WU.js} +1 -1
- package/dist/{chunk-3VOMVINB.js → chunk-THW6UDZH.js} +1 -1
- package/dist/{chunk-T7BUP75N.js → chunk-TPPBEVNQ.js} +1 -1
- package/dist/chunk-TQ7MHGY4.js +1 -0
- package/dist/{chunk-LQ7ENG4V.js → chunk-TQ7URMGS.js} +1 -1
- package/dist/{chunk-GILHUPUG.js → chunk-TUE67I2F.js} +1 -1
- package/dist/{chunk-2AZXDU2R.js → chunk-TWS34WUT.js} +1 -1
- package/dist/{chunk-5UDBNXNH.js → chunk-U5L2P36D.js} +1 -1
- package/dist/{chunk-IPWU2ALH.js → chunk-UB2LAIXS.js} +1 -1
- package/dist/{chunk-2AAHKMPP.js → chunk-UMSO6MOI.js} +1 -1
- package/dist/{chunk-33D7HGAI.js → chunk-UOKX3AME.js} +1 -1
- package/dist/{chunk-77QKJLBG.js → chunk-UVC3IXM3.js} +1 -1
- package/dist/chunk-UWHAOGO4.js +4 -0
- package/dist/{chunk-DP7SBNLN.js → chunk-UYRXUGLY.js} +1 -1
- package/dist/{chunk-RFDOSK57.js → chunk-VXGXK66W.js} +1 -1
- package/dist/{chunk-KVZXRZ7U.js → chunk-VZLEYZLX.js} +1 -1
- package/dist/{chunk-AZCPTV4A.js → chunk-W56I6HOT.js} +1 -1
- package/dist/{chunk-S6YUSGTF.js → chunk-WINVPFT5.js} +1 -1
- package/dist/{chunk-B7Y2LMPU.js → chunk-WNE2MZAZ.js} +1 -1
- package/dist/{chunk-TH4D7IGZ.js → chunk-WXT5AKZV.js} +1 -1
- package/dist/{chunk-DCSSFNW7.js → chunk-WZEKBD7B.js} +1 -1
- package/dist/{chunk-AJOTU26E.js → chunk-X6HLGOIV.js} +1 -1
- package/dist/{chunk-JWQBRHVY.js → chunk-XE5QH4D7.js} +1 -1
- package/dist/{chunk-KXSUEB4Y.js → chunk-XRJ2GQ24.js} +1 -1
- package/dist/{chunk-MDMKTILJ.js → chunk-XTKXBQVA.js} +1 -1
- package/dist/{chunk-LEFAUWKH.js → chunk-YIV3CWED.js} +1 -1
- package/dist/{chunk-LIB64ZJW.js → chunk-YKYJOUV7.js} +1 -1
- package/dist/{chunk-NE32WJR5.js → chunk-YXKMPCFH.js} +1 -1
- package/dist/{chunk-5CANB25O.js → chunk-Z57YWHOE.js} +1 -1
- package/dist/{chunk-LBBYCPZP.js → chunk-Z5SFLTH6.js} +1 -1
- package/dist/{chunk-VEQDI5AB.js → chunk-ZJ4H3XEL.js} +1 -1
- package/dist/{chunk-XUJURYN5.js → chunk-ZZ7SOJHH.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/channel-config.js +1 -1
- package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import/dashboard-extensions.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/security/check.js +1 -1
- package/dist/cli/commands/app/security/clean.js +1 -1
- package/dist/cli/commands/app/security/instructions.js +1 -1
- package/dist/cli/commands/app/security/record.js +1 -1
- package/dist/cli/commands/app/security/review.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
- package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/send-analytics.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/{command-json-schema-SU56F3T4.js → command-json-schema-HYYJSZAH.js} +1 -1
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-WDYDHG6V.js → conf-store-CDZ5YSQM.js} +1 -1
- package/dist/{custom-oclif-loader-CP4XJAPS.js → custom-oclif-loader-NVOK22CJ.js} +1 -1
- package/dist/{deprecations-CBSMNYL3.js → deprecations-33DG6ZUL.js} +1 -1
- package/dist/dist-DODCXJ2A.js +1 -0
- package/dist/dist-YXMAKIFS.js +1 -0
- package/dist/environments-KBRQNE4R.js +1 -0
- package/dist/{error-LNWX6IWE.js → error-V77H2UYX.js} +1 -1
- package/dist/error-handler-JY3ZKE2G.js +1 -0
- package/dist/{fs-Y33QBYY5.js → fs-SKH3XZU7.js} +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +1 -1
- package/dist/is-global-2G4BLF7H.js +1 -0
- package/dist/{json-error-UR2OILQ6.js → json-error-WSMAL66C.js} +1 -1
- package/dist/lib-55QUD4AJ.js +1 -0
- package/dist/lib-PH52G55H.js +1 -0
- package/dist/lib-TYM5B75S.js +1 -0
- package/dist/{local-77XQ4CX3.js → local-G2Z24BHM.js} +1 -1
- package/dist/{metadata-BC3BGHRY.js → metadata-Y3RKC4P2.js} +1 -1
- package/dist/{morph-42EXMN3K.js → morph-BABFBRSW.js} +1 -1
- package/dist/{node-package-manager-6UZUTDCP.js → node-package-manager-A7HTBJKY.js} +1 -1
- package/dist/notifications-system-E64OSVXF.js +1 -0
- package/dist/os-7VQXVZWF.js +1 -0
- package/dist/{output-GGY66WEM.js → output-ZFFHJGNK.js} +1 -1
- package/dist/system-ZLITSFDC.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typescript-ISACCMJN.js +1 -0
- package/dist/ui-YSFALYSL.js +1 -0
- package/dist/upgrade-I4JTR4LA.js +1 -0
- package/dist/version-AOVO47AW.js +1 -0
- package/dist/version-LQV54JBC.js +1 -0
- package/dist/{workerd-MEAM3XYI.js → workerd-RNDPF36Q.js} +1 -1
- package/oclif.manifest.json +2 -2
- package/package.json +8 -8
- package/dist/analytics-EPKJADE2.js +0 -1
- package/dist/analytics-TVCGKQGZ.js +0 -1
- package/dist/chunk-32B4LIKH.js +0 -1
- package/dist/chunk-7UZO72KN.js +0 -278
- package/dist/chunk-7Y7AZRL3.js +0 -10
- package/dist/chunk-A6OSIGQI.js +0 -1
- package/dist/chunk-F3TMLDLC.js +0 -1
- package/dist/chunk-MFXBSQDH.js +0 -12
- package/dist/chunk-MINDMVTH.js +0 -1
- package/dist/chunk-PCKWLJW2.js +0 -1
- package/dist/chunk-SMZ74TME.js +0 -64
- package/dist/dist-HI6AAP5V.js +0 -1
- package/dist/dist-W25ND3PJ.js +0 -1
- package/dist/environments-PUH6A5BU.js +0 -1
- package/dist/error-handler-24QGAUUD.js +0 -1
- package/dist/is-global-KY3QE3OZ.js +0 -1
- package/dist/lib-AD2G3QH3.js +0 -1
- package/dist/lib-VEVNMHDE.js +0 -1
- package/dist/lib-ZQW4E7QU.js +0 -1
- package/dist/notifications-system-4UDT72DQ.js +0 -1
- package/dist/os-U3LELTCV.js +0 -1
- package/dist/system-MCWAHFXK.js +0 -1
- package/dist/typescript-5R4Y7PXE.js +0 -1
- package/dist/ui-SYB4LLWY.js +0 -1
- package/dist/upgrade-V4GCQJBN.js +0 -1
- package/dist/version-HQPFW4QN.js +0 -1
- package/dist/version-VOSHQCYM.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ur}from"./chunk-ADIHYUQC.js";import{b as Tr}from"./chunk-5ZSN73EA.js";import{a as _r}from"./chunk-S3IDGHAZ.js";import{a as Cr}from"./chunk-UJD7OQ3I.js";import{a as Ir}from"./chunk-23ITMFUO.js";import{a as gr}from"./chunk-NWBAD3AV.js";import{a as wr}from"./chunk-W6TPRWEE.js";import{a as yr,b as vr,c as Pr,d as xr}from"./chunk-LEFAUWKH.js";import{a as Rr}from"./chunk-VEIZLSMG.js";import{a as Er}from"./chunk-F34MAI7X.js";import{a as br}from"./chunk-GILHUPUG.js";import{a as Ar}from"./chunk-GF75CMTJ.js";import{a as Sr}from"./chunk-JCOQDVEB.js";import{a as ar}from"./chunk-AZCPTV4A.js";import{a as lr}from"./chunk-NYNSMHKY.js";import{a as pr}from"./chunk-T7BUP75N.js";import{a as dr}from"./chunk-SKK7CPUY.js";import{g as ur}from"./chunk-LAHZ6FO5.js";import{a as Xe}from"./chunk-5UDBNXNH.js";import{c as Je,m as Ze}from"./chunk-3UZYLXCB.js";import{a as mr}from"./chunk-JCVQB6MX.js";import{a as fr}from"./chunk-OJ7KRWUH.js";import{a as cr}from"./chunk-FJCNEHTH.js";import{b as ir,g as _e,j as Qe}from"./chunk-NSHKVJST.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-UVSXPMUN.js";import{d as hr}from"./chunk-3GVSG4S6.js";import{a as nr,b as sr,c as ao,d as io,e as rt,f as co,g as fo}from"./chunk-ZDRQUKLN.js";import{a as M,b as Ye}from"./chunk-LRKJSNM3.js";import{a as Xt,b as Zt,d as Ae,f as er,m as Te,n as H,s as q,u as tr,v as rr,w as or}from"./chunk-Q7BOSHWX.js";import{a as Jt}from"./chunk-254XYKPN.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-QH5R32AA.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as vo,k as Po,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as Ao,x as To,z as nt}from"./chunk-55JDA75S.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-2FHVYY3B.js";import{a as Lr}from"./chunk-33D7HGAI.js";import{a as Xr}from"./chunk-STLYSBD5.js";import{a as Jr}from"./chunk-MINDMVTH.js";import{a as kr}from"./chunk-RFDOSK57.js";import{Ha as Qr,I as Br,K as Kr,M as Z,W as jr,X as zr,ha as Yr,i as $r,j as W,k as Mr,o as Dr,t as et,u as Or,v as Nr,w as qr,x as Wr,y as Hr,ya as Ie,z as Gr,za as ke}from"./chunk-AKSOCKVF.js";import{B as Fr,la as Vr,p as Ce,u as ie}from"./chunk-WBTR5JZ6.js";import{d as Yt}from"./chunk-LOKVWZD2.js";import{a as K}from"./chunk-7AD5YCLL.js";import{b as Qt,e as Re}from"./chunk-2KBTFKSM.js";import{J as It,V as J,X as kt,c as Rt,h as At,j as Tt,m as _t,na as Lt,o as Ct,p as we,u as ye}from"./chunk-VWYZCCRE.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as ze,V as Kt,X as jt,a as Ut,d as ve,e as k,f as $,h as Pe,i as xe,j as Ft,k as Dt,l as Ot,m as Nt,n as qt,o as F,p as Wt,q as je,r as Ve,s as Ht,t as Gt,y as Ee}from"./chunk-KCHERKZO.js";import{b as Ke,d as Et,f as bt,i as St}from"./chunk-YTJ3EPD3.js";import{a as In}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-WR2MMFJO.js";import{i as A,l as X}from"./chunk-XUJURYN5.js";import{a as _o}from"./chunk-QPCDSJ4J.js";import{Aa as fe,Cb as P,Eb as b,Ia as vt,Kb as B,Nb as g,Ob as C,Ra as he,T as Be,Xa as D,_a as ge,db as Pt,gb as xt,qa as L,ya as me}from"./chunk-COFGQT76.js";import{e as Vt,g as zt}from"./chunk-C4QR7Z4N.js";import{b as Cn}from"./chunk-JA2QZ635.js";import{a as ft}from"./chunk-JD5P5RAJ.js";import{d as S,f as Ge,g as ht,i as ue,j as gt,k as de,o as wt,p as yt}from"./chunk-3VYOLEQE.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,Ln='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Co(t,e,r=Date.now()){for(;await $n(t,e,r););}async function $n(t,e,r){let o=await _e(t,e);if(!o||Mn(o,r))throw new A(Ln);return await ae(3),o.processing}function Mn(t,e){return t.processing&&Date.now()-e>=kn}var Fn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",Dn="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",st=3,Le=class extends cr{context="App Ext. Host";devPreview;constructor(e,r={devPreview:!1}){super(e),this.themeId=yr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??=this.devPreview?await this.createHostTheme():await this.create(),e}setTheme(e){vr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Fn};for(let o=0;o<st;o++){g(`Attempt ${o}/${st}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Qe(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Co(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${st} retries. Creating theme using fallback theme zip`);let r=await Qe({...e,src:Dn},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new X(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var On={"theme:init":gr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":wr,"theme:list":xr,"theme:metafields:pull":Rr,"theme:open":Er,"theme:package":br,"theme:profile":Sr,"theme:publish":Ur,"theme:preview":Ar,"theme:pull":Tr,"theme:push":_r,"theme:rename":Cr,"theme:share":Ir},ka=On;async function Io(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([It(t.storeFqdn),Wn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),y=h?await Xe(t.storePassword,l,u):void 0,m=await qn(c,t.theme),f=m.id.toString();return Ee({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:Nn,options:{theme:m,adminSession:c,storefrontPassword:y,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var Nn=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await ur(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function qn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await _e(parseInt(e,10),t);else{let o=new Le(t,{devPreview:!0});await be([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new A("Could not find or create a host theme for theme app extensions");return r}async function Wn(t){return t.developerPlatformClient?.clientName===Vr.AppManagement?`https://${await we()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await Ct()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Hn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function ko(t,e){let r=await Hn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Gn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Gn(t,e,r,o,n){let s;try{s=await L(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new Error(i)}}p();function $e(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var at=".js.map";async function te(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await ko(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Bn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=Lo(t.configuration.metafields)),{assets:{main:ce(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await he(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:$e(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Bn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),ce(s)){let a=await Kn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l="metafields"in i?Lo(i.metafields??[]):void 0,u={...i,...l?{metafields:l}:{},surface:ke(c),root:{url:`${e}/${c}`},resource:d||{url:""}},h=a?.[c];if(!h)return u;let m=await Jn(h,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...u,...m}}))}return s}async function Kn(t){try{let e=S(t,"manifest.json"),r=await L(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function jn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let y=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[y.name]:y}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await Me(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function Vn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await he(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await Me("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Yn({target:t,url:e,extension:r,resolver:o},n,s){let a=await Me(n,`${t}/${n}`,s,e,r,o);return await Qn(t,s,r,o),{assets:{[a.name]:a}}}async function Qn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await D(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Jn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Xn(o,n)?zn(e,n):Zn(o,n)?Yn(e,o,n):es(o,n)?Vn(e,o,n):jn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Lo(t){return t.map(e=>({namespace:e.namespace,key:e.key,...e.owner_type===void 0?{}:{ownerType:e.owner_type.replaceAll("_","")}}))}function ce(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Me(t,e,r,o,n,s,a){let i=`${e}${de(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await he(S(n.directory,a??r))??0}}function Xn(t,e){return t==="intents"&&Array.isArray(e)}function Zn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function es(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as ts}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function $o(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:ao(t.storeFqdn,t.apiKey),mobileUrl:co(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>te(n,e,t,r&&it(r,n.devUUID))))}}function it(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var Fe=class extends ts{options;rawPayload;assetResolvers;constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=J(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(ce(n.extensionPoints)&&ce(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=J(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?J(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return J(o,i)}return J(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await te(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},it(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await te(e,r,this.options,it(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(le.Update,e)}};p();p();var j;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(j||(j={}));function Mo(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,rs(t,e)))}}function rs(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${P.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",is(t,e))}}function os(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?P.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var ns={debug:t=>P.gray(t),warn:t=>P.yellow(t),error:t=>P.errorText(t)};function ss({type:t,message:e}){let r=os(e);switch(t){case"debug":case"warn":case"error":return b`${ns[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function as(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ss(t))})}function is(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
|
|
1
|
+
import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Ur}from"./chunk-5BO5HCN6.js";import{b as Tr}from"./chunk-HZJHGHLN.js";import{a as _r}from"./chunk-7MMPQMU7.js";import{a as Cr}from"./chunk-JJHJYBPQ.js";import{a as Ir}from"./chunk-HKZ75UKL.js";import{a as gr}from"./chunk-J66WAKXN.js";import{a as wr}from"./chunk-3NUQGW57.js";import{a as yr,b as vr,c as Pr,d as xr}from"./chunk-YIV3CWED.js";import{a as Rr}from"./chunk-JUCOIXG5.js";import{a as Er}from"./chunk-CHRFYG6W.js";import{a as br}from"./chunk-TUE67I2F.js";import{a as Ar}from"./chunk-PV5C6Q2P.js";import{a as Sr}from"./chunk-OXN2DID2.js";import{a as ar}from"./chunk-W56I6HOT.js";import{a as lr}from"./chunk-KPNUSDCW.js";import{a as pr}from"./chunk-TPPBEVNQ.js";import{a as dr}from"./chunk-JWDR66AS.js";import{g as ur}from"./chunk-AKP4QAGL.js";import{a as Xe}from"./chunk-U5L2P36D.js";import{c as Je,m as Ze}from"./chunk-PI6FLLDD.js";import{a as mr}from"./chunk-IESHPQLC.js";import{a as fr}from"./chunk-BVR3GF2L.js";import{a as cr}from"./chunk-3U2MYUWG.js";import{b as ir,g as _e,j as Qe}from"./chunk-JAY7AGAG.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-QA2NOPXG.js";import{d as hr}from"./chunk-4S2WKMLJ.js";import{a as nr,b as sr,c as ao,d as io,e as rt,f as co,g as fo}from"./chunk-5TQOMAJS.js";import{a as M,b as Ye}from"./chunk-RBPMV3KB.js";import{a as Xt,b as Zt,d as Ae,f as er,m as Te,n as H,s as q,u as tr,v as rr,w as or}from"./chunk-Q7BOSHWX.js";import{a as Jt}from"./chunk-G627WGIC.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-MHZSSRHP.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as vo,k as Po,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as Ao,x as To,z as nt}from"./chunk-BLBJT7BM.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-EJY4LA2S.js";import{a as Lr}from"./chunk-UOKX3AME.js";import{a as Xr}from"./chunk-R43LXE66.js";import{a as Jr}from"./chunk-KOYBR5MV.js";import{a as kr}from"./chunk-VXGXK66W.js";import{Ha as Qr,I as Br,K as Kr,M as Z,W as jr,X as zr,ha as Yr,i as $r,j as W,k as Mr,o as Dr,t as et,u as Or,v as Nr,w as qr,x as Wr,y as Hr,ya as Ie,z as Gr,za as ke}from"./chunk-PG6XEOYF.js";import{B as Fr,la as Vr,p as Ce,u as ie}from"./chunk-PQCALXSD.js";import{d as Yt}from"./chunk-OERMQ2FP.js";import{a as K}from"./chunk-525BMYNR.js";import{b as Qt,e as Re}from"./chunk-Q4TZD2M6.js";import{J as It,V as J,X as kt,c as Rt,h as At,j as Tt,m as _t,na as Lt,o as Ct,p as we,u as ye}from"./chunk-3E3MCY5O.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as ze,V as Kt,X as jt,a as Ut,d as ve,e as k,f as $,h as Pe,i as xe,j as Ft,k as Dt,l as Ot,m as Nt,n as qt,o as F,p as Wt,q as je,r as Ve,s as Ht,t as Gt,y as Ee}from"./chunk-RCYQPOJW.js";import{b as Ke,d as Et,f as bt,i as St}from"./chunk-YTJ3EPD3.js";import{a as In}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-PQH4U2XV.js";import{i as A,l as X}from"./chunk-ZZ7SOJHH.js";import{a as _o}from"./chunk-T6TYF72N.js";import{Aa as fe,Cb as P,Eb as b,Ia as vt,Kb as B,Nb as g,Ob as C,Ra as he,T as Be,Xa as D,_a as ge,db as Pt,gb as xt,qa as L,ya as me}from"./chunk-3F42A3XV.js";import{e as Vt,g as zt}from"./chunk-2R2PKQQV.js";import{b as Cn}from"./chunk-I3J63RFV.js";import{a as ft}from"./chunk-JD5P5RAJ.js";import{d as S,f as Ge,g as ht,i as ue,j as gt,k as de,o as wt,p as yt}from"./chunk-3VYOLEQE.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,Ln='The host theme could not be created to host your theme app extension. Please try again or use the "--theme" flag to use an existing theme as the host theme.';async function Co(t,e,r=Date.now()){for(;await $n(t,e,r););}async function $n(t,e,r){let o=await _e(t,e);if(!o||Mn(o,r))throw new A(Ln);return await ae(3),o.processing}function Mn(t,e){return t.processing&&Date.now()-e>=kn}var Fn="https://codeload.github.com/Shopify/dawn/zip/refs/tags/v15.0.0",Dn="https://cdn.shopify.com/theme-store/uhrdefhlndzaoyrgylhto59sx2i7.jpg",st=3,Le=class extends cr{context="App Ext. Host";devPreview;constructor(e,r={devPreview:!1}){super(e),this.themeId=yr(e.storeFqdn),this.devPreview=r.devPreview}async findOrCreate(){let e=await this.fetch();return e??=this.devPreview?await this.createHostTheme():await this.create(),e}setTheme(e){vr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Fn};for(let o=0;o<st;o++){g(`Attempt ${o}/${st}: Creating theme with name "${e.name}" and role "${e.role}"`);try{let n=await Qe(e,this.adminSession);if(n)return this.setTheme(n.id.toString()),g(`Waiting for theme with id "${n.id}" to be processed`),await Co(n.id,this.adminSession),n;throw new Error}catch{g(`Failed to create theme with name "${e.name}" and role "${e.role}". Retrying...`)}}g(`Theme creation failed after ${st} retries. Creating theme using fallback theme zip`);let r=await Qe({...e,src:Dn},this.adminSession);if(!r)throw g("Theme creation failed. Exiting process."),new X(`Could not create theme with name "${e.name}" and role "${e.role}"`);return r}};p();var On={"theme:init":gr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":wr,"theme:list":xr,"theme:metafields:pull":Rr,"theme:open":Er,"theme:package":br,"theme:profile":Sr,"theme:publish":Ur,"theme:preview":Ar,"theme:pull":Tr,"theme:push":_r,"theme:rename":Cr,"theme:share":Ir},ka=On;async function Io(t){let{remoteApp:e,localApp:r}=t,n=r.allExtensions.filter(U=>U.isThemeExtension);if(n.length===0)return;let a=n[0].directory,i=t.themeExtensionPort??9293,[c,d]=await Promise.all([It(t.storeFqdn),Wn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),y=h?await Xe(t.storePassword,l,u):void 0,m=await qn(c,t.theme),f=m.id.toString();return Ee({headline:"The theme app extension development server is ready.",orderedNextSteps:!0,nextSteps:[[{link:{label:"Install your app in your development store",url:d}}],[{link:{label:"Setup your theme app extension in the host theme",url:`https://${l}/admin/themes/${f}/editor`}}],["Preview your theme app extension at",{link:{label:`http://127.0.0.1:${i}`,url:`http://127.0.0.1:${i}`}}]]}),{type:"theme-app-extensions",prefix:"theme-extensions",function:Nn,options:{theme:m,adminSession:c,storefrontPassword:y,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var Nn=async(t,{theme:e,adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})=>{await(await ur(e,{adminSession:r,storefrontPassword:o,crawlerSignatureHeaders:n,themeExtensionDirectory:s,themeExtensionPort:a})).start()};async function qn(t,e){let r;if(e)g(`Fetching theme with provided id ${e}`),r=await _e(parseInt(e,10),t);else{let o=new Le(t,{devPreview:!0});await be([{title:"Configuring host theme for theme app extension",task:async()=>{g("Finding or creating host theme for theme app extensions"),r=await o.findOrCreate()}}])}if(!r)throw new A("Could not find or create a host theme for theme app extensions");return r}async function Wn(t){return t.developerPlatformClient?.clientName===Vr.AppManagement?`https://${await we()}/?organization_id=${t.organizationId}&no_redirect=true&redirect=/oauth/redirect_from_developer_dashboard?client_id%3D${t.apiKey}`:`https://${await Ct()}/${t.organizationId}/apps/${t.id}/test`}p();p();p();p();p();p();async function Hn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function ko(t,e){let r=await Hn(t);if(!r.length)return{localization:void 0,status:""};let o=e.currentLocalizationPayload??{defaultLocale:"en",translations:{},lastUpdated:0},n="success";try{await Promise.all(r.map(async s=>{let[a,...i]=s.split("/").pop().split(".");if(a)return i[0]==="default"&&(o.defaultLocale=a),Gn(a,s,o,t,e)})),o.lastUpdated=Date.now(),g(`Parsed locales for extension ${t.handle} at ${t.directory}`,e.stdout)}catch{n="error"}return{localization:o,status:n}}async function Gn(t,e,r,o,n){let s;try{s=await L(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw C(i,n.stderr),new Error(i)}}p();function $e(t,e){switch(t){case"checkout_ui_extension":return{url:e.checkoutCartUrl};case"checkout_post_purchase":return{url:e.checkoutCartUrl};case"product_subscription":return{url:e.subscriptionProductUrl??""};default:return{url:""}}}var at=".js.map";async function te(t,e,r,o){return F({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await ko(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Bn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=Lo(t.configuration.metafields)),{assets:{main:ce(l)&&l[0]?.assets?.main?l[0].assets.main:{name:"main",url:`${s}/assets/${t.outputFileName}`,lastUpdated:await he(n)??0}},supportedFeatures:{runsOffline:t.configuration.supported_features?.runs_offline??!1},capabilities:{blockProgress:t.configuration.capabilities?.block_progress??!1,networkAccess:t.configuration.capabilities?.network_access??!1,apiAccess:t.configuration.capabilities?.api_access??!1,collectBuyerConsent:{smsMarketing:t.configuration.capabilities?.collect_buyer_consent?.sms_marketing??!1,customerPrivacy:t.configuration.capabilities?.collect_buyer_consent?.customer_privacy??!1},iframe:{sources:t.configuration.capabilities?.iframe?.sources??[]}},development:{...r.currentDevelopmentPayload,resource:$e(t.type,r),root:{url:s},hidden:r.currentDevelopmentPayload?.hidden??!1,localizationStatus:i,status:r.currentDevelopmentPayload?.status??"success",...r.currentDevelopmentPayload??{status:"success"}},extensionPoints:l,localization:a??null,metafields:u,type:t.type,externalType:t.externalType,uuid:t.devUUID,surface:t.surface,version:c?.version,title:t.name,handle:t.handle,name:t.name,description:t.configuration.description,apiVersion:t.configuration.api_version,approvalScopes:r.grantedScopes,settings:t.configuration.settings}})}async function Bn(t,e,r,o){let n=t.configuration,s=n.extension_points??n.targeting;if(t.type==="checkout_post_purchase"&&(s=[{target:"purchase.post.render"}]),ce(s)){let a=await Kn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l="metafields"in i?Lo(i.metafields??[]):void 0,u={...i,...l?{metafields:l}:{},surface:ke(c),root:{url:`${e}/${c}`},resource:d||{url:""}},h=a?.[c];if(!h)return u;let m=await Jn(h,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...u,...m}}))}return s}async function Kn(t){try{let e=S(t,"manifest.json"),r=await L(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function jn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let y=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[y.name]:y}}}let l=e.build_manifest?.assets?.[s];if(l?.filepath){let u=await Me(s,i,l.filepath,r,o,n,l.module);return{assets:{[u.name]:u}}}return{}}async function Vn({target:t,url:e,buildDirectory:r,resolver:o},n,s){if(s.length===0)return{};for(let i of s)o?.set(`${t}/${i}`,i);let a=await Promise.all(s.map(async i=>await he(S(r,i))??0));return{assets:{[n]:{name:n,url:`${e}/assets/${t}/`,lastUpdated:Math.max(...a)}}}}async function zn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s){return e.intents?{intents:await Promise.all(e.intents.map(async(i,c)=>{let d=i.schema,l=s[c]?.schema,u=typeof l=="string"?l:d,h=typeof l=="string"?d:void 0;return{...i,schema:await Me("schema",`${t}/intents/${c}/schema`,u,r,o,n,h)}}))}:{}}async function Yn({target:t,url:e,extension:r,resolver:o},n,s){let a=await Me(n,`${t}/${n}`,s,e,r,o);return await Qn(t,s,r,o),{assets:{[a.name]:a}}}async function Qn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await D(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Jn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Xn(o,n)?zn(e,n):Zn(o,n)?Yn(e,o,n):es(o,n)?Vn(e,o,n):jn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}function Lo(t){return t.map(e=>({namespace:e.namespace,key:e.key,...e.owner_type===void 0?{}:{ownerType:e.owner_type.replaceAll("_","")}}))}function ce(t){return Array.isArray(t)&&t.every(e=>typeof e=="object")}async function Me(t,e,r,o,n,s,a){let i=`${e}${de(r)}`;return s?.set(i,r),{name:t,url:`${o}/assets/${i}`,lastUpdated:await he(S(n.directory,a??r))??0}}function Xn(t,e){return t==="intents"&&Array.isArray(e)}function Zn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function es(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as ts}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function $o(t,e,r){return{app:{title:t.appName,apiKey:t.apiKey,url:ao(t.storeFqdn,t.apiKey),mobileUrl:co(t.storeFqdn,t.apiKey)},appId:t.id,version:t.manifestVersion,root:{url:new URL("/extensions",t.url).toString()},socket:{url:t.websocketURL},devConsole:{url:new URL("/extensions/dev-console",t.url).toString()},store:t.storeFqdn,extensions:await Promise.all(t.extensions.filter(n=>n.isPreviewable).map(n=>te(n,e,t,r&&it(r,n.devUUID))))}}function it(t,e){let r=t.get(e);return r||(r=new Map,t.set(e,r)),r}var Fe=class extends ts{options;rawPayload;assetResolvers;constructor(e,r,o=new Map){super(),this.rawPayload=e,this.options=r,this.assetResolvers=o}getAssetResolver(e){return this.assetResolvers.get(e)}getConnectedPayload(){let e=this.getRawPayload();return{app:e.app,appId:e.appId,store:e.store,extensions:e.extensions}}getRawPayloadFilteredByExtensionIds(e){return{...this.rawPayload,extensions:this.rawPayload.extensions.filter(r=>e.includes(r.uuid))}}getRawPayload(){return this.rawPayload}updateApp(e){this.rawPayload=J(this.rawPayload,{app:e}),this.emitUpdate([])}updateExtensions(e){let r=this.rawPayload.extensions.map(o=>{let n=e.find(s=>s.uuid===o.uuid);if(n){if(ce(n.extensionPoints)&&ce(o.extensionPoints)){let s=n.extensionPoints.reduce((c,d)=>({...c,[d.target]:d}),{});o.extensionPoints=J(o.extensionPoints,n.extensionPoints,c=>c.map(d=>{let l=s[d.target];return l?J(d,l,(u,h)=>h):d}));let{extensionPoints:a,...i}=n;return J(o,i)}return J(o,n)}return o});this.rawPayload={...this.rawPayload,extensions:r},this.emitUpdate(e.map(o=>o.uuid))}async updateExtension(e,r,o,n){let s=this.rawPayload.extensions,a=s.findIndex(i=>i.uuid===e.devUUID);if(a===-1){g(b`Could not updateExtension() for extension with uuid: ${e.devUUID}`,r.stderr);return}s[a]=await te(e,o,{...this.options,currentDevelopmentPayload:n??{status:s[a]?.development.status},currentLocalizationPayload:s[a]?.localization},it(this.assetResolvers,e.devUUID)),this.rawPayload.extensions=s,this.emitUpdate([e.devUUID])}deleteExtension(e){let r=this.rawPayload.extensions.findIndex(o=>o.uuid===e.devUUID);r!==-1&&(this.rawPayload.extensions.splice(r,1),this.assetResolvers.delete(e.devUUID),this.emitUpdate([e.devUUID]))}async addExtension(e,r){this.rawPayload.extensions.push(await te(e,r,this.options,it(this.assetResolvers,e.devUUID))),this.emitUpdate([e.devUUID])}emitUpdate(e){this.emit(le.Update,e)}};p();p();var j;(function(t){t.Update="update",t.Dispatch="dispatch",t.Log="log"})(j||(j={}));function Mo(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,rs(t,e)))}}function rs(t,e){return r=>{g("Websocket connection successfully established",e.stdout);let o={event:"connected",data:e.payloadStore.getConnectedPayload(),version:e.manifestVersion};g(b`Sending connected payload: ${P.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",is(t,e))}}function os(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?P.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var ns={debug:t=>P.gray(t),warn:t=>P.yellow(t),error:t=>P.errorText(t)};function ss({type:t,message:e}){let r=os(e);switch(t){case"debug":case"warn":case"error":return b`${ns[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function as(t,e){F({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ss(t))})}function is(t,e){return r=>{let o=JSON.parse(r.toString()),{event:n,data:s}=o;if(g(b`Received websocket message with event type ${n} and data:
|
|
2
2
|
${P.json(s)}
|
|
3
3
|
`,e.stdout),n===j.Update){let a=e.payloadStore.getRawPayload().app.apiKey,i=s.app?.apiKey;if(s.app){if(a!==i)return;e.payloadStore.updateApp(s.app)}s.extensions&&e.payloadStore.updateExtensions(s.extensions)}else if(n===j.Dispatch){let a=cs(o,e);Do(t,a,e)}else n===j.Log&&as(s,e)}}function Fo(t,e){return r=>{let o={event:j.Update,version:e.manifestVersion,data:{...e.payloadStore.getRawPayloadFilteredByExtensionIds(r)}};g(b`Sending websocket update event to the websocket clients:
|
|
4
4
|
${P.json(o)}
|
|
@@ -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 A}from"./chunk-55JDA75S.js";import{a as se}from"./chunk-STLYSBD5.js";import{a as re}from"./chunk-MINDMVTH.js";import{a as K}from"./chunk-RFDOSK57.js";import{Ha as te,I as z,aa as Z,ca as ee,l as X}from"./chunk-AKSOCKVF.js";import{sa as W}from"./chunk-WBTR5JZ6.js";import{b as Q,c as Y}from"./chunk-2KBTFKSM.js";import{u as $}from"./chunk-VWYZCCRE.js";import{d as N,e as m,f as o,l as H,y as G}from"./chunk-KCHERKZO.js";import{i as C}from"./chunk-XUJURYN5.js";import{Ib as F,Kb as I,ga as V}from"./chunk-COFGQT76.js";import{b as Ce}from"./chunk-JA2QZ635.js";import{j}from"./chunk-3VYOLEQE.js";import{e as k,g}from"./chunk-VKWPEFWQ.js";g();g();g();g();g();g();var _=k(N(),1);function be(t){let s=(0,_.useRef)(t);(0,_.useEffect)(()=>{s.current=t},[t]),(0,_.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:l})=>{l&&(n=setTimeout(i,l))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}g();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:a})=>{let l=await i.appLogs({jwtToken:t,cursor:s},a),{errors:f,status:u}=l;if(u!==200){if(u===401||u===429||u>=500)return{errors:f.map(y=>({status:u,message:y}))};throw new C(`${f.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=l,E=_e(c,n);return{cursor:r,appLogs:E}};function _e(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let a=s.status===void 0?!0:i.status===s.status,l=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return a&&l})),n}var R=k(N(),1);async function Ne({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:a,setErrors:l,setAppLogOutputs:f,resubscribeCallback:u,developerPlatformClient:r}){let c=t,E=L,y=s,b=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:a}),p="not_attempted",w=b;if(w.errors){let h=await v({response:w,onThrottle:d=>{l(["Request throttled while polling app logs.",`Retrying in ${d/1e3}s`])},onUnknownError:d=>{l(["Error while polling app logs",`Retrying in ${d/1e3}s`])},onResubscribe:()=>u()});p=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),E=h.retryIntervalMs}else{l(d=>d.length?[]:d);let{appLogs:h}=b;if(y=b.cursor,h)for(let d of h){let T,S,q,J=i.get(d.shop_id.toString());if(J===void 0)continue;switch(d.log_type){case ce:T=fe(d.payload),S=`export "${T.export}" executed in ${(T.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:T=de(d.payload),S="network access response retrieved from cache";break;case pe:T=ge(d.payload),S="network access request executing in background";break;case me:T=Ee(d.payload),q=T.connectTimeMs&&T.writeReadTimeMs?T.connectTimeMs+T.writeReadTimeMs:null,S=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let Se={status:d.status==="success"?"Success":"Failure",source:d.source,storeName:J,description:S,logTimestamp:V(d.log_timestamp)};T&&f(ke=>[...ke,{appLog:T,prefix:Se}])}}return{nextJwtToken:c,retryIntervalMs:E,cursor:y??s,resubscribeResult:p}}function we({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l}){let[f,u]=(0,R.useState)([]),[r,c]=(0,R.useState)([]),E=(0,R.useRef)(t),y=(0,R.useRef)(0),b=(0,R.useRef)(""),p=(0,R.useRef)(0),w=(0,R.useCallback)(async()=>{let h=await Ne({jwtToken:E.current,cursor:b.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:a,organizationId:l});if(h.resubscribeResult==="failed"){if(p.current+=1,p.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(p.current=0);return E.current=h.nextJwtToken,b.current=h.cursor,y.current=h.retryIntervalMs,{retryIntervalMs:y.current}},[]);return be(w),{appLogOutputs:r,errors:f}}var e=k(N(),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:a,organizationId:l})=>{let{appLogOutputs:f,errors:u}=we({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l});return e.default.createElement(e.default.Fragment,null,f.map(({appLog:r,prefix:c},E)=>e.default.createElement(m,{flexDirection:"column",key:E},e.default.createElement(m,{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(m,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(m,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(m,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(m,{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(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(m,{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(m,{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(m,{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(m,{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(m,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(m,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(N(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a}){let l=async()=>A(n,s,a);return H(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:l,storeNameById:i,developerPlatformClient:n,organizationId:a}))}g();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:l=0}){let f=await U({pollOptions:t,developerPlatformClient:n,organizationId:a}),u=L,r=t.jwtToken,c=l,E=f;if(E.errors){let p=await v({response:E,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:()=>A(n,s,a)});if(p.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else p.resubscribeResult==="succeeded"&&(c=0);p.nextJwtToken&&(r=p.nextJwtToken),u=p.retryIntervalMs}else c=0;let{cursor:y,appLogs:b}=f;b&&b.forEach(p=>{let w=i.get(p.shop_id?.toString());w!==void 0&&F(ye({appLog:p,appLogPayload:Te(p.payload,p.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:y??t.cursor,filters:t.filters},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:c}).catch(p=>{throw p})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,a=await Me(t),l=he(s);if(l.length===0)throw new C("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 y=t.sources.filter(b=>!l.includes(b));if(y.length)throw new C(`Invalid sources: ${y.join(", ")}. Valid sources are: ${l.join(", ")}`)}let f={shopIds:a.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,f,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(`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 A}from"./chunk-BLBJT7BM.js";import{a as se}from"./chunk-R43LXE66.js";import{a as re}from"./chunk-KOYBR5MV.js";import{a as K}from"./chunk-VXGXK66W.js";import{Ha as te,I as z,aa as Z,ca as ee,l as X}from"./chunk-PG6XEOYF.js";import{sa as W}from"./chunk-PQCALXSD.js";import{b as Q,c as Y}from"./chunk-Q4TZD2M6.js";import{u as $}from"./chunk-3E3MCY5O.js";import{d as N,e as m,f as o,l as H,y as G}from"./chunk-RCYQPOJW.js";import{i as C}from"./chunk-ZZ7SOJHH.js";import{Ib as F,Kb as I,ga as V}from"./chunk-3F42A3XV.js";import{b as Ce}from"./chunk-I3J63RFV.js";import{j}from"./chunk-3VYOLEQE.js";import{e as k,g}from"./chunk-VKWPEFWQ.js";g();g();g();g();g();g();var _=k(N(),1);function be(t){let s=(0,_.useRef)(t);(0,_.useEffect)(()=>{s.current=t},[t]),(0,_.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:l})=>{l&&(n=setTimeout(i,l))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}g();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:a})=>{let l=await i.appLogs({jwtToken:t,cursor:s},a),{errors:f,status:u}=l;if(u!==200){if(u===401||u===429||u>=500)return{errors:f.map(y=>({status:u,message:y}))};throw new C(`${f.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=l,E=_e(c,n);return{cursor:r,appLogs:E}};function _e(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let a=s.status===void 0?!0:i.status===s.status,l=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return a&&l})),n}var R=k(N(),1);async function Ne({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:a,setErrors:l,setAppLogOutputs:f,resubscribeCallback:u,developerPlatformClient:r}){let c=t,E=L,y=s,b=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:a}),p="not_attempted",w=b;if(w.errors){let h=await v({response:w,onThrottle:d=>{l(["Request throttled while polling app logs.",`Retrying in ${d/1e3}s`])},onUnknownError:d=>{l(["Error while polling app logs",`Retrying in ${d/1e3}s`])},onResubscribe:()=>u()});p=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),E=h.retryIntervalMs}else{l(d=>d.length?[]:d);let{appLogs:h}=b;if(y=b.cursor,h)for(let d of h){let T,S,q,J=i.get(d.shop_id.toString());if(J===void 0)continue;switch(d.log_type){case ce:T=fe(d.payload),S=`export "${T.export}" executed in ${(T.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:T=de(d.payload),S="network access response retrieved from cache";break;case pe:T=ge(d.payload),S="network access request executing in background";break;case me:T=Ee(d.payload),q=T.connectTimeMs&&T.writeReadTimeMs?T.connectTimeMs+T.writeReadTimeMs:null,S=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let Se={status:d.status==="success"?"Success":"Failure",source:d.source,storeName:J,description:S,logTimestamp:V(d.log_timestamp)};T&&f(ke=>[...ke,{appLog:T,prefix:Se}])}}return{nextJwtToken:c,retryIntervalMs:E,cursor:y??s,resubscribeResult:p}}function we({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l}){let[f,u]=(0,R.useState)([]),[r,c]=(0,R.useState)([]),E=(0,R.useRef)(t),y=(0,R.useRef)(0),b=(0,R.useRef)(""),p=(0,R.useRef)(0),w=(0,R.useCallback)(async()=>{let h=await Ne({jwtToken:E.current,cursor:b.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:a,organizationId:l});if(h.resubscribeResult==="failed"){if(p.current+=1,p.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(p.current=0);return E.current=h.nextJwtToken,b.current=h.cursor,y.current=h.retryIntervalMs,{retryIntervalMs:y.current}},[]);return be(w),{appLogOutputs:r,errors:f}}var e=k(N(),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:a,organizationId:l})=>{let{appLogOutputs:f,errors:u}=we({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:a,organizationId:l});return e.default.createElement(e.default.Fragment,null,f.map(({appLog:r,prefix:c},E)=>e.default.createElement(m,{flexDirection:"column",key:E},e.default.createElement(m,{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(m,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(m,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(m,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(m,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(m,{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(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(m,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(m,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(m,{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(m,{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(m,{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(m,{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(m,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(m,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(N(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a}){let l=async()=>A(n,s,a);return H(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:l,storeNameById:i,developerPlatformClient:n,organizationId:a}))}g();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:l=0}){let f=await U({pollOptions:t,developerPlatformClient:n,organizationId:a}),u=L,r=t.jwtToken,c=l,E=f;if(E.errors){let p=await v({response:E,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:()=>A(n,s,a)});if(p.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else p.resubscribeResult==="succeeded"&&(c=0);p.nextJwtToken&&(r=p.nextJwtToken),u=p.retryIntervalMs}else c=0;let{cursor:y,appLogs:b}=f;b&&b.forEach(p=>{let w=i.get(p.shop_id?.toString());w!==void 0&&F(ye({appLog:p,appLogPayload:Te(p.payload,p.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:y??t.cursor,filters:t.filters},storeNameById:i,organizationId:a,consecutiveResubscribeFailures:c}).catch(p=>{throw p})},u)}async function Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,a=await Me(t),l=he(s);if(l.length===0)throw new C("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 y=t.sources.filter(b=>!l.includes(b));if(y.length)throw new C(`Invalid sources: ${y.join(", ")}. Valid sources are: ${l.join(", ")}`)}let f={shopIds:a.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,f,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(`Waiting for app logs...
|
|
2
2
|
`),await(t.format==="json"?D:Ie)({options:{variables:f,developerPlatformClient:i},pollOptions:c,storeNameById:a.storeNameById,organizationId:t.organization.id})}async function Me(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:a,organization:l}=t,f=j(s.configPath);Le(n.title,a.shopDomain,t.storeFqdns,f,l.businessName);let u=new Map;return u.set(a.shopId,a.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let E=await W(l,c,i);u.set(E.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Le(t,s,n,i,a){let l=n&&n.length>0?n:[s],f=i?X(i):void 0;G({headline:i?`Using ${f} for default values:`:"Using these settings:",body:Z({appName:t,org:a,devStores:l,messages:[ee]})})}var O=k(Ce(),1);var B=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.descriptionForHelp();static flags={...Q,...K,...Y,store:O.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async s=>$(s)}),source:O.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:O.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};async run(){let{flags:s}=await this.parse(t);await z(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}),a={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Ae(a),{app:n.app}}};export{B as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Mc,e as jc,f as Bc}from"./chunk-
|
|
1
|
+
import{a as Mc,e as jc,f as Bc}from"./chunk-IOS4IDZ2.js";import{a as $c}from"./chunk-7IRPE3M5.js";import{c as Rc,i as Lc,o as hy}from"./chunk-YLQ3LNNY.js";import{b as fn}from"./chunk-EZ5F4ZFY.js";import{J as wc,L as Ec,M as bc,ba as Dc,fa as Cc,l as xc,u as cn}from"./chunk-3E3MCY5O.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-FQKURDZR.js";import{A as Xe,C as ln,D as tt,E as rt,H as Ic,J as Sr,v as Be,y as mt,z as Cr}from"./chunk-RCYQPOJW.js";import{a as ly}from"./chunk-WXT5AKZV.js";import{i as I,l as hn}from"./chunk-ZZ7SOJHH.js";import{Aa as on,Ab as Pc,Ca as an,Cb as gt,Db as Nc,Eb as Ar,Ga as fo,Ia as un,Kb as it,Nb as me,X as fc,Xa as U,_ as dc,_a as yc,aa as pc,ca as mc,db as vc,ma as uy,qa as X,ta as Dr,tb as Sc,ya as V,yb as Oc}from"./chunk-3F42A3XV.js";import{i as W}from"./chunk-B4OMIONW.js";import{a as cy,b as gc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as hc}from"./chunk-3VYOLEQE.js";import{a as uc,c as cc,d as uo,e as br,f as ey,g as co,h as ty,i as ry,j as lc,k as lo,m as sy,n as ho,p as oy,u as ay}from"./chunk-TR4OWSEX.js";import{b as Z0,c as et}from"./chunk-ZGASBRSQ.js";import{b as Q0}from"./chunk-I5A6BPCP.js";import{a as ny}from"./chunk-IGE4Y5SE.js";import{b as iy}from"./chunk-JFBCE4HN.js";import{a as F,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var py=e=>{process.stdout.write(e)},my=e=>{process.stderr.write(e)};mo.default={stderr:my,stdout:py}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=F("node:fs"),go=F("node:fs/promises"),gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=gy;var yy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=yy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function vy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=vy;async function xy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=xy;function wy(e){return(0,zc.existsSync)(e)}Ce.existsSync=wy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function Ey(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=Ey;function by(e){return e.filter(t=>!!t)}q.compact=by;function Dy(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=Dy;function Cy(e){if(e)return e.at(-1)}q.last=Cy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Sy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Sy;function Ay(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Ay;function _y(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=_y;function Fy(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=Fy;function ky(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=ky;function Ty(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=Ty;function Oy(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Oy;function Py(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Py;function Iy(e){return[...new Set(e)].sort()}q.uniq=Iy;function Ny(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Ny;function My(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function jy(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(My(r,t)??{})).reverse())}q.mergeNestedObjects=jy});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var By=F("node:url"),Wc=yt(),Ry=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,Ry.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new By.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ly=Vt({});ge.string=Ly});var Xc=E((sT,$y)=>{$y.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var qy=F("node:fs"),Uy=F("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,qy.readFileSync)((0,Uy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Hy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Hy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=F("node:fs/promises"),zy=F("node:path"),Jy=br(),Wy=()=>new Date().toISOString(),wo,Gy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Xy(e){return e.endsWith(`
|
|
2
2
|
`)?e.replace(/\n$/,""):e}var Eo=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await Gy(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,Kc.mkdir)((0,zy.dirname)(this.file),{recursive:!0}),await(0,Kc.appendFile)(this.file,r.join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`)}),await this.flushing}log(t){t=Jy(Xy(t));let r=t.split(`
|
|
@@ -151,7 +151,7 @@ See more help with --help`,Ym.default.getInstance().get("exitCodes")?.failedFlag
|
|
|
151
151
|
`)}}xF();O.Args=vr(Gc());O.ux=vr(Li());var wF=zn();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return wF.flush}});var fg=Ap();Object.defineProperty(O,"stderr",{enumerable:!0,get:function(){return fg.stderr}});Object.defineProperty(O,"stdout",{enumerable:!0,get:function(){return fg.stdout}});var EF=ag();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return EF.Command}});var dg=$s();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return dg.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return dg.Plugin}});O.Errors=vr($e());var bF=Bn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return bF.handle}});var DF=cg();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return DF.execute}});O.Flags=vr(os());var Ws=Ai();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return Ws.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return Ws.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return Ws.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return Ws.loadHelpClass}});O.Interfaces=vr(hg());var CF=Pu();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return CF.run}});O.ModuleLoader=vr(Ei());O.Parser=vr(_u());var SF=Yr();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return SF.Performance}});var AF=Pt();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return AF.settings}});var pg=Nr();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return pg.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return pg.toStandardizedId}})});y();import{createRequire as fy}from"node:module";import{pathToFileURL as qc}from"node:url";var Uc=fy(import.meta.url);async function Hc(e){let t;try{t=Uc.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(o){throw o instanceof Error&&o.code==="MODULE_NOT_FOUND"?new I("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):o}let r=await kc(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=N(le(r.path),i);return import(qc(n).href)}function dy(e,t){let r=Uc.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(qc(r).href)}y();var io=nn(Gs(),1);y();var ee=nn(Gs(),1);y();y();y();import{fileURLToPath as mg}from"node:url";import{existsSync as kF}from"node:fs";y();import{exec as _F}from"node:child_process";import{promisify as FF}from"node:util";var Qe=FF(_F);function $N(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var Nu=new URL("../../..",import.meta.url).pathname,Vi=(()=>{try{let e=N(le(Nu),"templates","skeleton");return kF(e)}catch{return!1}})(),VN=Vi?Nu:void 0,TF="assets/hydrogen",OF="starter",Ht="routes",Iu;async function PF(){if(Iu??=await vc("package.json",{cwd:mg(import.meta.url),type:"file"}),!Iu)throw new I("Could not find assets directory","Please report this error.");return Iu}async function Ze(e,...t){return N(le(await PF()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${TF}`,e??"",...t)}async function Yi(e,t){t??=await Mu();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?mg(r):r.toString()}function Mu(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Xs():Ze(OF)}function Xs(){if(!Vi)throw new I("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return N(le(Nu),"templates","skeleton")}function IF(){return N(Xs(),"node_modules")}async function gg(){if(Vi)return IF();let{stdout:e}=await Qe("npm root");return e.trim()}var ju=["tailwind","vanilla-extract","css-modules","postcss"];async function yg(e,t,r,i=(n,o)=>n){let n=await Ze(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let c=await X(N(n,o));await V(N(r,s),i(c,o))}))}async function vg(e,t,r){let i=Object.values(e).map(o=>U(N(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await rt({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as NF}from"node:fs/promises";y();hy();import*as xg from"fs/promises";import*as wg from"path";var Bu={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function ft(e=process.cwd()){let t=(await xg.lstat(e)).isFile()?e:wg.resolve(e,"prettier.file");try{return await Rc(t)||Bu}catch{return Bu}}async function zt(e,t=Bu,r=""){let i=sn(r);return Lc(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function ui(e,t,r){let i=await r(await X(e));if(typeof i=="string")return t&&(i=await zt(i,t,e)),V(e,i)}var MF=["tsx","ts","jsx","js","mjs","cjs"];async function be(e,t,r=MF){let i=await NF(e);if(i.includes(t)){let n=J(e,t);if(!await un(n))return{filepath:n};for(let o of["ts","js"]){let s=J(e,`${t}/index.${o}`);if(await U(J(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:J(e,o),extension:n,astType:s}}}return{}}var Eg=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Vs(e,t,r){let i=await po(N(t,"package.json")),n=await po(N(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(h=>!Eg.includes(h));for(let h of s){if(o.has(h))continue;let m=n[h],d=i[h],f=Array.isArray(m)&&Array.isArray(d)?[...d,...m]:typeof m=="object"&&typeof d=="object"?{...d,...m}:m;i[h]=f}let c=Object.entries(i.dependencies||{}).find(([h])=>h.startsWith("@remix-run/"))?.[1];for(let h of Eg)o.has(h)||n[h]&&(i[h]=[...new Set([...Object.keys(i[h]??{}),...Object.keys(n[h]??{})])].sort().reduce((m,d)=>{let f=n[h]?.[d]??i[h]?.[d];return d.startsWith("@remix-run/")&&c&&(f=c),m[d]=f,m},{}));await Tc(t,r?.onResult?.(i)??i)}y();y();async function Ki(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function bg(e,t,r){let{filepath:i,astType:n}=await be(e,"root");if(!i||!n)throw new I(`Could not find root file in ${e}`);await ui(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let h=(await Ki(n)).parse(o).root(),m=h.findAll({rule:{kind:"import_statement"}}).reverse(),d=m.find(l=>l.text().includes(".css"))||m.shift(),f=h.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!d||!f)throw new I('Could not find a "links" export in root file. Please add one and try again.');let p=d.text(),a=f.text(),u=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(p,p+`
|
|
152
152
|
`+s).replace(a,u+`
|
|
153
153
|
`+a)})}async function Ys(e,t,r,i){let{filepath:n,astType:o}=await be(e,"vite.config");if(!n||!o)throw new I(`Could not find vite.config file in ${e}`);await ui(n,t,async s=>{let c=`import ${r.isDefault?r.name:`{${r.name}}`} from '${r.path}';`;if(new RegExp(`['"]${r.path.replace("/","\\/")}['"]`).test(s))return;let m=(await Ki(o)).parse(s).root(),d=m.findAll({rule:{kind:"import_statement"}}).pop(),f=m.find(jF);if(!d||!f)throw new I('Could not find a "plugins" key in Vite config file. Please add one and try again.');let p=d.text(),a=f.text(),u=`${r.name}(${i?JSON.stringify(i):""})`;return s.replace(p,p+`
|
|
154
|
-
`+c).replace(a,a.replace("[",`[${u},`))})}var jF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Dg="styles/tailwind.css";async function Cg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":N(i,Dg)};if(!await vg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Vs(await Ze("tailwind"),e),yg("tailwind",n,e),ft(e).then(s=>Promise.all([bg(t,s,{name:"tailwindCss",path:`${Dg}?url`,isDefault:!0}),Ys(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Sg({rootDirectory:e}){return{workPromise:Promise.all([Vs(await Ze("vanilla-extract"),e),ft(e).then(r=>Ys(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var Ru=[...ju,"none"],Lu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},qM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Ag(e,t,r){switch(e){case"tailwind":return Cg(t,r);case"vanilla-extract":return Sg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function _g(e){let t=Object.entries({...Lu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-
|
|
154
|
+
`+c).replace(a,a.replace("[",`[${u},`))})}var jF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Dg="styles/tailwind.css";async function Cg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":N(i,Dg)};if(!await vg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Vs(await Ze("tailwind"),e),yg("tailwind",n,e),ft(e).then(s=>Promise.all([bg(t,s,{name:"tailwindCss",path:`${Dg}?url`,isDefault:!0}),Ys(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Sg({rootDirectory:e}){return{workPromise:Promise.all([Vs(await Ze("vanilla-extract"),e),ft(e).then(r=>Ys(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var Ru=[...ju,"none"],Lu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},qM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Ag(e,t,r){switch(e){case"tailwind":return Cg(t,r);case"vanilla-extract":return Sg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function _g(e){let t=Object.entries({...Lu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-BABFBRSW.js");return i(e,t,r)}y();var Fg={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},BF=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(Fg)]);function RF(e,t=!1){let r={compilerOptions:{...Fg}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of BF)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function $u(e,t=!0){let r=N(e,"app/routes.ts");if(await U(r)){let s=(await X(r)).replace("./layout.tsx","./layout.jsx");await V(r,s)}let i=await yc("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await ft();for(let o of i){if(o.endsWith(".d.ts")){t||await an(o);continue}let s=await X(o),c=await zt(await Jt(s,o,t),n);await an(o),await V(o.replace(/\.ts(x?)$/,".js$1"),c)}try{let o=N(e,"remix.config.js"),s=await X(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await V(o,s)}catch(o){me(`Could not change TS extensions in remix.config.js:
|
|
155
155
|
`+o.stack)}try{let o=N(e,"tsconfig.json"),s=await X(o),c=RF(JSON.parse(s.replace(/^\s*\/\/.*$/gm,"")),t);await an(o),await V(N(e,"jsconfig.json"),JSON.stringify(c,null,2))}catch(o){me(`Could not transpile tsconfig.json:
|
|
156
156
|
`+o.stack)}try{let o=JSON.parse(await X(N(e,"package.json")));delete o.scripts.typecheck;let s=/react-router typegen\s*&&\s*/g;for(let[c,h]of Object.entries(o.scripts||{}))typeof h=="string"&&h.includes("react-router typegen")&&(o.scripts[c]=h.replace(s,""));if(!t){delete o.devDependencies.typescript,delete o.devDependencies["@shopify/oxygen-workers-types"];for(let h of Object.keys(o.devDependencies))h.startsWith("@types/")&&delete o.devDependencies[h];let c=/\s*--codegen/;o.scripts?.dev&&(o.scripts.dev=o.scripts.dev.replace(c,"")),o.scripts?.build&&(o.scripts.build=o.scripts.build.replace(c,""))}await V(N(e,"package.json"),JSON.stringify(o,null,2))}catch(o){me(`Could not remove TS dependencies from package.json:
|
|
157
157
|
`+o.stack)}try{let{filepath:o=N(e,".eslintrc.cjs")}=await be(e,".eslintrc",["cjs","js"]),s=await X(o);t||(s=s.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),s=s.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await V(o,await zt(s,n))}catch(o){me(`Could not remove TS rules from .eslintrc:
|
|
@@ -356,4 +356,4 @@ Starting tunnel...
|
|
|
356
356
|
${fi({host:e})}`,`View server network requests:
|
|
357
357
|
${e}/subrequest-profiler`].map((t,r)=>({subdued:`${r===0?"":`
|
|
358
358
|
|
|
359
|
-
`}${t}`}))}export{Gs as a,Qe as b,$N as c,Vi as d,VN as e,Ze as f,Yi as g,Mu as h,
|
|
359
|
+
`}${t}`}))}export{Gs as a,Qe as b,$N as c,Vi as d,VN as e,Ze as f,Yi as g,Mu as h,ju as i,ft as j,zt as k,ui as l,Vs as m,Ki as n,Ru as o,Lu as p,qM as q,Ag as r,_g as s,qF as t,qu as u,Uu as v,Tg as w,Og as x,UF as y,HF as z,ci as A,Qi as B,Aj as C,_j as D,Hc as E,dy as F,uR as G,cR as H,lR as I,r0 as J,Zg as K,uk as L,Vu as M,e0 as N,dk as O,KB as P,Je as Q,Pg as R,Ks as S,hi as T,Ng as U,Mg as V,zj as W,Bg as X,Rg as Y,ke as Z,Jg as _,eo as $,DB as aa,to as ba,CB as ca,SB as da,AB as ea,jB as fa,At as ga,Kg as ha,$B as ia,xk as ja,s0 as ka,_k as la,XR as ma,VR as na,YR as oa,KR as pa,QR as qa,ZR as ra,eL as sa,tL as ta,rL as ua,iL as va,kk as wa,nL as xa,sL as ya,c0 as za,ec as Aa,h0 as Ba,qL as Ca,UL as Da,HL as Ea,zL as Fa,KL as Ga,QL as Ha,ZL as Ia,l3 as Ja,h3 as Ka,f3 as La,g0 as Ma,p0 as Na,m0 as Oa,A3 as Pa,Hk as Qa,H3 as Ra,z3 as Sa,E0 as Ta,J3 as Ua,W3 as Va,G3 as Wa};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{a as mD}from"./chunk-5HBIIYSK.js";import{b as hD,e as z,g as gD,h as I}from"./chunk-B4OMIONW.js";import{a as pD,c as g,d as BD,e as K,g as i}from"./chunk-VKWPEFWQ.js";var hu=g((Wt,Bu)=>{i();Bu.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Su=g((Qt,vu)=>{i();var PD=hD(),jD=function(){return PD.Date.now()};vu.exports=jD});var Ru=g((ur,$u)=>{i();var GD=/\s/;function qD(u){for(var D=u.length;D--&&GD.test(u.charAt(D)););return D}$u.exports=qD});var Lu=g((er,Nu)=>{i();var VD=Ru(),HD=/^\s+/;function UD(u){return u&&u.slice(0,VD(u)+1).replace(HD,"")}Nu.exports=UD});var Wu=g((rr,Ou)=>{i();var KD=Lu(),_u=z(),zD=gD(),Mu=NaN,YD=/^[-+]0x[0-9a-f]+$/i,JD=/^0b[01]+$/i,XD=/^0o[0-7]+$/i,QD=parseInt;function ZD(u){if(typeof u=="number")return u;if(zD(u))return Mu;if(_u(u)){var D=typeof u.valueOf=="function"?u.valueOf():u;u=_u(D)?D+"":D}if(typeof u!="string")return u===0?u:+u;u=KD(u);var e=JD.test(u);return e||XD.test(u)?QD(u.slice(2),e?2:8):YD.test(u)?Mu:+u}Ou.exports=ZD});var Pu=g((nr,ku)=>{i();var ue=z(),Q=Su(),Iu=Wu(),De="Expected a function",ee=Math.max,te=Math.min;function re(u,D,e){var t,r,F,o,n,s,C=0,x=!1,l=!1,p=!0;if(typeof u!="function")throw new TypeError(De);D=Iu(D)||0,ue(e)&&(x=!!e.leading,l="maxWait"in e,F=l?ee(Iu(e.maxWait)||0,D):F,p="trailing"in e?!!e.trailing:p);function c(d){var b=t,N=r;return t=r=void 0,C=d,o=u.apply(N,b),o}function B(d){return C=d,n=setTimeout(h,D),x?c(d):o}function f(d){var b=d-s,N=d-C,iu=D-b;return l?te(iu,F-N):iu}function m(d){var b=d-s,N=d-C;return s===void 0||b>=D||b<0||l&&N>=F}function h(){var d=Q();if(m(d))return W(d);n=setTimeout(h,f(d))}function W(d){return n=void 0,p&&t?c(d):(t=r=void 0,o)}function ou(){n!==void 0&&clearTimeout(n),C=0,t=s=r=n=void 0}function dD(){return n===void 0?o:W(Q())}function U(){var d=Q(),b=m(d);if(t=arguments,r=this,s=d,b){if(n===void 0)return B(s);if(l)return clearTimeout(n),n=setTimeout(h,D),c(s)}return n===void 0&&(n=setTimeout(h,D)),o}return U.cancel=ou,U.flush=dD,U}ku.exports=re});var se=g((ir,ju)=>{i();var Fe=Pu(),ne=z(),oe="Expected a function";function ie(u,D,e){var t=!0,r=!0;if(typeof u!="function")throw new TypeError(oe);return ne(e)&&(t="leading"in e?!!e.leading:t,r="trailing"in e?!!e.trailing:r),Fe(u,D,{leading:t,maxWait:D,trailing:r})}ju.exports=ie});var uD=g((kr,Du)=>{"use strict";i();var Zu=(u,D)=>{for(let e of Reflect.ownKeys(D))Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(D,e));return u};Du.exports=Zu;Du.exports.default=Zu});var eD=g((jr,V)=>{"use strict";i();var Ue=uD(),q=new WeakMap,DD=(u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let e,t=0,r=u.displayName||u.name||"<anonymous>",F=function(...o){if(q.set(F,++t),t===1)e=u.apply(this,o),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return e};return Ue(F,u),q.set(F,t),F};V.exports=DD;V.exports.default=DD;V.exports.callCount=u=>{if(!q.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return q.get(u)}});var iD=g((nF,nt)=>{nt.exports={single:{topLeft:"\u250C",top:"\u2500",topRight:"\u2510",right:"\u2502",bottomRight:"\u2518",bottom:"\u2500",bottomLeft:"\u2514",left:"\u2502"},double:{topLeft:"\u2554",top:"\u2550",topRight:"\u2557",right:"\u2551",bottomRight:"\u255D",bottom:"\u2550",bottomLeft:"\u255A",left:"\u2551"},round:{topLeft:"\u256D",top:"\u2500",topRight:"\u256E",right:"\u2502",bottomRight:"\u256F",bottom:"\u2500",bottomLeft:"\u2570",left:"\u2502"},bold:{topLeft:"\u250F",top:"\u2501",topRight:"\u2513",right:"\u2503",bottomRight:"\u251B",bottom:"\u2501",bottomLeft:"\u2517",left:"\u2503"},singleDouble:{topLeft:"\u2553",top:"\u2500",topRight:"\u2556",right:"\u2551",bottomRight:"\u255C",bottom:"\u2500",bottomLeft:"\u2559",left:"\u2551"},doubleSingle:{topLeft:"\u2552",top:"\u2550",topRight:"\u2555",right:"\u2502",bottomRight:"\u255B",bottom:"\u2550",bottomLeft:"\u2558",left:"\u2502"},classic:{topLeft:"+",top:"-",topRight:"+",right:"|",bottomRight:"+",bottom:"-",bottomLeft:"+",left:"|"},arrow:{topLeft:"\u2198",top:"\u2193",topRight:"\u2199",right:"\u2190",bottomRight:"\u2196",bottom:"\u2191",bottomLeft:"\u2197",left:"\u2192"}}});var ot=g((oF,Fu)=>{"use strict";i();var sD=iD();Fu.exports=sD;Fu.exports.default=sD});var CD=g((sF,aD)=>{"use strict";i();var it=/[|\\{}()[\]^$+*?.-]/g;aD.exports=u=>{if(typeof u!="string")throw new TypeError("Expected a string");return u.replace(it,"\\$&")}});var ct=g((CF,cD)=>{"use strict";i();var st=CD(),at=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",lD=[].concat(pD("module").builtinModules,"bootstrap_node","node").map(u=>new RegExp(`(?:\\((?:node:)?${u}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${u}(?:\\.js)?:\\d+:\\d+$)`));lD.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var nu=class u{constructor(D){D={ignoredPackages:[],...D},"internals"in D||(D.internals=u.nodeInternals()),"cwd"in D||(D.cwd=at),this._cwd=D.cwd.replace(/\\/g,"/"),this._internals=[].concat(D.internals,Ct(D.ignoredPackages)),this._wrapCallSite=D.wrapCallSite||!1}static nodeInternals(){return[...lD]}clean(D,e=0){e=" ".repeat(e),Array.isArray(D)||(D=D.split(`
|
|
2
|
+
`)),!/^\s*at /.test(D[0])&&/^\s*at /.test(D[1])&&(D=D.slice(1));let t=!1,r=null,F=[];return D.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(s=>s.test(o)))return;let n=/^\s*at /.test(o);t?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),n&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(n?(r&&(F.push(r),r=null),F.push(o)):(t=!0,r=o))}),F.map(o=>`${e}${o}
|
|
3
|
+
`).join("")}captureString(D,e=this.captureString){typeof D=="function"&&(e=D,D=1/0);let{stackTraceLimit:t}=Error;D&&(Error.stackTraceLimit=D);let r={};Error.captureStackTrace(r,e);let{stack:F}=r;return Error.stackTraceLimit=t,this.clean(F)}capture(D,e=this.capture){typeof D=="function"&&(e=D,D=1/0);let{prepareStackTrace:t,stackTraceLimit:r}=Error;Error.prepareStackTrace=(n,s)=>this._wrapCallSite?s.map(this._wrapCallSite):s,D&&(Error.stackTraceLimit=D);let F={};Error.captureStackTrace(F,e);let{stack:o}=F;return Object.assign(Error,{prepareStackTrace:t,stackTraceLimit:r}),o}at(D=this.at){let[e]=this.capture(1,D);if(!e)return{};let t={line:e.getLineNumber(),column:e.getColumnNumber()};ED(t,e.getFileName(),this._cwd),e.isConstructor()&&Object.defineProperty(t,"constructor",{value:!0,configurable:!0}),e.isEval()&&(t.evalOrigin=e.getEvalOrigin()),e.isNative()&&(t.native=!0);let r;try{r=e.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(t.type=r);let F=e.getFunctionName();F&&(t.function=F);let o=e.getMethodName();return o&&F!==o&&(t.method=o),t}parseLine(D){let e=D&&D.match(Et);if(!e)return null;let t=e[1]==="new",r=e[2],F=e[3],o=e[4],n=Number(e[5]),s=Number(e[6]),C=e[7],x=e[8],l=e[9],p=e[10]==="native",c=e[11]===")",B,f={};if(x&&(f.line=Number(x)),l&&(f.column=Number(l)),c&&C){let m=0;for(let h=C.length-1;h>0;h--)if(C.charAt(h)===")")m++;else if(C.charAt(h)==="("&&C.charAt(h-1)===" "&&(m--,m===-1&&C.charAt(h-1)===" ")){let W=C.slice(0,h-1);C=C.slice(h+1),r+=` (${W}`;break}}if(r){let m=r.match(lt);m&&(r=m[1],B=m[2])}return ED(f,C,this._cwd),t&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),F&&(f.evalOrigin=F,f.evalLine=n,f.evalColumn=s,f.evalFile=o&&o.replace(/\\/g,"/")),p&&(f.native=!0),r&&(f.function=r),B&&r!==B&&(f.method=B),f}};function ED(u,D,e){D&&(D=D.replace(/\\/g,"/"),D.startsWith(`${e}/`)&&(D=D.slice(e.length+1)),u.file=D)}function Ct(u){if(u.length===0)return[];let D=u.map(e=>st(e));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${D.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Et=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),lt=/^(.*?) \[as (.*?)\]$/;cD.exports=nu});i();i();i();i();var su=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],au=12288,Cu=65510,Eu=[12288,12288,65281,65376,65504,65510];var lu=4352,cu=262141,Y=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];i();var k=(u,D)=>{let e=0,t=Math.floor(u.length/2)-1;for(;e<=t;){let r=Math.floor((e+t)/2),F=r*2;if(D<u[F])t=r-1;else if(D>u[F+1])e=r+1;else return!0}return!1};var fu=19968,[bD,wD]=TD(Y);function TD(u){let D=u[0],e=u[1];for(let t=0;t<u.length;t+=2){let r=u[t],F=u[t+1];if(fu>=r&&fu<=F)return[r,F];F-r>e-D&&(D=r,e=F)}return[D,e]}var du=u=>u<161||u>1114109?!1:k(su,u),L=u=>u<au||u>Cu?!1:k(Eu,u);var _=u=>u>=bD&&u<=wD?!0:u<lu||u>cu?!1:k(Y,u);function yD(u){if(!Number.isSafeInteger(u))throw new TypeError(`Expected a code point, got \`${typeof u}\`.`)}function pu(u,{ambiguousAsWide:D=!1}={}){return yD(u),L(u)||_(u)||D&&du(u)?2:1}var gu=K(hu(),1),vD=new Intl.Segmenter,SD=/^\p{Default_Ignorable_Code_Point}$/u;function w(u,D={}){if(typeof u!="string"||u.length===0)return 0;let{ambiguousIsNarrow:e=!0,countAnsiEscapeCodes:t=!1}=D;if(t||(u=I(u)),u.length===0)return 0;let r=0,F={ambiguousAsWide:!e};for(let{segment:o}of vD.segment(u)){let n=o.codePointAt(0);if(!(n<=31||n>=127&&n<=159)&&!(n>=8203&&n<=8207||n===65279)&&!(n>=768&&n<=879||n>=6832&&n<=6911||n>=7616&&n<=7679||n>=8400&&n<=8447||n>=65056&&n<=65071)&&!(n>=55296&&n<=57343)&&!(n>=65024&&n<=65039)&&!SD.test(o)){if((0,gu.default)().test(o)){r+=2;continue}r+=pu(n,F)}}return r}i();i();var mu=(u=0)=>D=>`\x1B[${D+u}m`,Au=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,xu=(u=0)=>(D,e,t)=>`\x1B[${38+u};2;${D};${e};${t}m`,E={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},qt=Object.keys(E.modifier),$D=Object.keys(E.color),RD=Object.keys(E.bgColor),Vt=[...$D,...RD];function ND(){let u=new Map;for(let[D,e]of Object.entries(E)){for(let[t,r]of Object.entries(e))E[t]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},e[t]=E[t],u.set(r[0],r[1]);Object.defineProperty(E,D,{value:e,enumerable:!1})}return Object.defineProperty(E,"codes",{value:u,enumerable:!1}),E.color.close="\x1B[39m",E.bgColor.close="\x1B[49m",E.color.ansi=mu(),E.color.ansi256=Au(),E.color.ansi16m=xu(),E.bgColor.ansi=mu(10),E.bgColor.ansi256=Au(10),E.bgColor.ansi16m=xu(10),Object.defineProperties(E,{rgbToAnsi256:{value(D,e,t){return D===e&&e===t?D<8?16:D>248?231:Math.round((D-8)/247*24)+232:16+36*Math.round(D/255*5)+6*Math.round(e/255*5)+Math.round(t/255*5)},enumerable:!1},hexToRgb:{value(D){let e=/[a-f\d]{6}|[a-f\d]{3}/i.exec(D.toString(16));if(!e)return[0,0,0];let[t]=e;t.length===3&&(t=[...t].map(F=>F+F).join(""));let r=Number.parseInt(t,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:D=>E.rgbToAnsi256(...E.hexToRgb(D)),enumerable:!1},ansi256ToAnsi:{value(D){if(D<8)return 30+D;if(D<16)return 90+(D-8);let e,t,r;if(D>=232)e=((D-232)*10+8)/255,t=e,r=e;else{D-=16;let n=D%36;e=Math.floor(D/36)/5,t=Math.floor(n/6)/5,r=n%6/5}let F=Math.max(e,t,r)*2;if(F===0)return 30;let o=30+(Math.round(r)<<2|Math.round(t)<<1|Math.round(e));return F===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(D,e,t)=>E.ansi256ToAnsi(E.rgbToAnsi256(D,e,t)),enumerable:!1},hexToAnsi:{value:D=>E.ansi256ToAnsi(E.hexToAnsi256(D)),enumerable:!1}}),E}var LD=ND(),A=LD;var j=new Set(["\x1B","\x9B"]),_D=39,X="\x07",Tu="[",MD="]",yu="m",P=`${MD}8;;`,bu=u=>`${j.values().next().value}${Tu}${u}${yu}`,wu=u=>`${j.values().next().value}${P}${u}${X}`,OD=u=>u.split(" ").map(D=>w(D)),J=(u,D,e)=>{let t=[...D],r=!1,F=!1,o=w(I(u.at(-1)));for(let[n,s]of t.entries()){let C=w(s);if(o+C<=e?u[u.length-1]+=s:(u.push(s),o=0),j.has(s)&&(r=!0,F=t.slice(n+1,n+1+P.length).join("")===P),r){F?s===X&&(r=!1,F=!1):s===yu&&(r=!1);continue}o+=C,o===e&&n<t.length-1&&(u.push(""),o=0)}!o&&u.at(-1).length>0&&u.length>1&&(u[u.length-2]+=u.pop())},WD=u=>{let D=u.split(" "),e=D.length;for(;e>0&&!(w(D[e-1])>0);)e--;return e===D.length?u:D.slice(0,e).join(" ")+D.slice(e).join("")},ID=(u,D,e={})=>{if(e.trim!==!1&&u.trim()==="")return"";let t="",r,F,o=OD(u),n=[""];for(let[l,p]of u.split(" ").entries()){e.trim!==!1&&(n[n.length-1]=n.at(-1).trimStart());let c=w(n.at(-1));if(l!==0&&(c>=D&&(e.wordWrap===!1||e.trim===!1)&&(n.push(""),c=0),(c>0||e.trim===!1)&&(n[n.length-1]+=" ",c++)),e.hard&&o[l]>D){let B=D-c,f=1+Math.floor((o[l]-B-1)/D);Math.floor((o[l]-1)/D)<f&&n.push(""),J(n,p,D);continue}if(c+o[l]>D&&c>0&&o[l]>0){if(e.wordWrap===!1&&c<D){J(n,p,D);continue}n.push("")}if(c+o[l]>D&&e.wordWrap===!1){J(n,p,D);continue}n[n.length-1]+=p}e.trim!==!1&&(n=n.map(l=>WD(l)));let s=n.join(`
|
|
4
|
+
`),C=[...s],x=0;for(let[l,p]of C.entries()){if(t+=p,j.has(p)){let{groups:B}=new RegExp(`(?:\\${Tu}(?<code>\\d+)m|\\${P}(?<uri>.*)${X})`).exec(s.slice(x))||{groups:{}};if(B.code!==void 0){let f=Number.parseFloat(B.code);r=f===_D?void 0:f}else B.uri!==void 0&&(F=B.uri.length===0?void 0:B.uri)}let c=A.codes.get(Number(r));C[l+1]===`
|
|
5
|
+
`?(F&&(t+=wu("")),r&&c&&(t+=bu(c))):p===`
|
|
6
|
+
`&&(r&&c&&(t+=bu(r)),F&&(t+=wu(F))),x+=p.length}return t};function kD(u,D,e){return String(u).normalize().replaceAll(`\r
|
|
7
|
+
`,`
|
|
8
|
+
`).split(`
|
|
9
|
+
`).map(t=>ID(t,D,e)).join(`
|
|
10
|
+
`)}var Ju={};BD(Ju,{ConEmu:()=>Yu,beep:()=>ke,beginSynchronizedOutput:()=>Uu,clearScreen:()=>Ne,clearTerminal:()=>Me,clearViewport:()=>Le,cursorBackward:()=>pe,cursorDown:()=>fe,cursorForward:()=>de,cursorGetPosition:()=>ge,cursorHide:()=>xe,cursorLeft:()=>Vu,cursorMove:()=>ce,cursorNextLine:()=>me,cursorPrevLine:()=>Ae,cursorRestorePosition:()=>he,cursorSavePosition:()=>Be,cursorShow:()=>be,cursorTo:()=>le,cursorUp:()=>qu,endSynchronizedOutput:()=>Ku,enterAlternativeScreen:()=>Oe,eraseDown:()=>ve,eraseEndLine:()=>Te,eraseLine:()=>Hu,eraseLines:()=>we,eraseScreen:()=>G,eraseStartLine:()=>ye,eraseUp:()=>Se,exitAlternativeScreen:()=>We,iTerm:()=>zu,image:()=>je,link:()=>Pe,scrollDown:()=>Re,scrollUp:()=>$e,setCwd:()=>Ge,synchronizedOutput:()=>Ie});i();import v from"node:process";import ae from"node:os";i();var y=globalThis.window?.document!==void 0,ar=globalThis.process?.versions?.node!==void 0,Cr=globalThis.process?.versions?.bun!==void 0,Er=globalThis.Deno?.version?.deno!==void 0,lr=globalThis.process?.versions?.electron!==void 0,cr=globalThis.navigator?.userAgent?.includes("jsdom")===!0,fr=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,dr=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,pr=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Br=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,M=globalThis.navigator?.userAgentData?.platform,hr=M==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",gr=M==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",mr=M==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",Ar=M==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),xr=M==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var a="\x1B[",S="\x1B]",T="\x07",O=";",Gu=!y&&v.env.TERM_PROGRAM==="Apple_Terminal",Ce=!y&&v.platform==="win32",Ee=!y&&(v.env.TERM?.startsWith("screen")||v.env.TERM?.startsWith("tmux")||v.env.TMUX!==void 0),Z=y?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:v.cwd,$=u=>Ee?"\x1BPtmux;"+u.replaceAll("\x1B","\x1B\x1B")+"\x1B\\":u,le=(u,D)=>{if(typeof u!="number")throw new TypeError("The `x` argument is required");return typeof D!="number"?a+(u+1)+"G":a+(D+1)+O+(u+1)+"H"},ce=(u,D)=>{if(typeof u!="number")throw new TypeError("The `x` argument is required");let e="";return u<0?e+=a+-u+"D":u>0&&(e+=a+u+"C"),D<0?e+=a+-D+"A":D>0&&(e+=a+D+"B"),e},qu=(u=1)=>a+u+"A",fe=(u=1)=>a+u+"B",de=(u=1)=>a+u+"C",pe=(u=1)=>a+u+"D",Vu=a+"G",Be=Gu?"\x1B7":a+"s",he=Gu?"\x1B8":a+"u",ge=a+"6n",me=a+"E",Ae=a+"F",xe=a+"?25l",be=a+"?25h",we=u=>{let D="";for(let e=0;e<u;e++)D+=Hu+(e<u-1?qu():"");return u&&(D+=Vu),D},Te=a+"K",ye=a+"1K",Hu=a+"2K",ve=a+"J",Se=a+"1J",G=a+"2J",$e=a+"S",Re=a+"T",Ne="\x1Bc",Le=`${G}${a}H`,_e=()=>{if(y||!Ce)return!1;let u=ae.release().split("."),D=Number(u[0]),e=Number(u[2]??0);return D<10||D===10&&e<10586},Me=_e()?`${G}${a}0f`:`${G}${a}3J${a}H`,Oe=a+"?1049h",We=a+"?1049l",Uu=a+"?2026h",Ku=a+"?2026l",Ie=u=>Uu+u+Ku,ke=T,Pe=(u,D)=>{let e=$(`${S}8${O}${O}${D}${T}`),t=$(`${S}8${O}${O}${T}`);return e+u+t},je=(u,D={})=>{let e=`${S}1337;File=inline=1`;D.width&&(e+=`;width=${D.width}`),D.height&&(e+=`;height=${D.height}`),D.preserveAspectRatio===!1&&(e+=";preserveAspectRatio=0");let t=Buffer.from(u);return $(e+`;size=${t.byteLength}:`+t.toString("base64")+T)},zu={setCwd:(u=Z())=>$(`${S}50;CurrentDir=${u}${T}`),annotation(u,D={}){let e=`${S}1337;`,t=D.x!==void 0,r=D.y!==void 0;if((t||r)&&!(t&&r&&D.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return u=u.replaceAll("|",""),e+=D.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",D.length>0?e+=(t?[u,D.length,D.x,D.y]:[D.length,u]).join("|"):e+=u,$(e+T)}},Yu={setCwd:(u=Z())=>$(`${S}9;9;${u}${T}`)},Ge=(u=Z())=>zu.setCwd(u)+Yu.setCwd(u);i();i();var qe=u=>{let D=new Set;do for(let e of Reflect.ownKeys(u))D.add([u,e]);while((u=Reflect.getPrototypeOf(u))&&u!==Object.prototype);return D};function Ve(u,{include:D,exclude:e}={}){let t=r=>{let F=o=>typeof o=="string"?r===o:o.test(r);return D?D.some(F):e?!e.some(F):!0};for(let[r,F]of qe(u.constructor.prototype)){if(F==="constructor"||!t(F))continue;let o=Reflect.getOwnPropertyDescriptor(r,F);o&&typeof o.value=="function"&&(u[F]=u[F].bind(u))}return u}i();import{PassThrough as Xu}from"node:stream";var Qu=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],uu={},He=u=>{let D=new Xu,e=new Xu;D.write=r=>{u("stdout",r)},e.write=r=>{u("stderr",r)};let t=new console.Console(D,e);for(let r of Qu)uu[r]=console[r],console[r]=t[r];return()=>{for(let r of Qu)console[r]=uu[r];uu={}}},Or=He;i();import nD from"node:process";i();var tD=K(eD(),1),rD=K(mD(),1);import Ke from"node:process";var ze=(0,tD.default)(()=>{(0,rD.default)(()=>{Ke.stderr.write("\x1B[?25h")},{alwaysLast:!0})}),FD=ze;var H=!1,R={};R.show=(u=nD.stderr)=>{u.isTTY&&(H=!1,u.write("\x1B[?25h"))};R.hide=(u=nD.stderr)=>{u.isTTY&&(FD(),H=!0,u.write("\x1B[?25l"))};R.toggle=(u,D)=>{u!==void 0&&(H=u),H?R.show(D):R.hide(D)};var zr=R;i();function Ye(u,D=1,e={}){let{indent:t=" ",includeEmptyLines:r=!1}=e;if(typeof u!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof u}\``);if(typeof D!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof D}\``);if(D<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${D}\``);if(typeof t!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t}\``);if(D===0)return u;let F=r?/^/gm:/^(?!\s*$)/gm;return u.replace(F,t.repeat(D))}i();function eu(u){return Number.isInteger(u)?L(u)||_(u):!1}i();var Je=new Set([27,155]),Xe="0".codePointAt(0),Qe="9".codePointAt(0),Ze=19,ru=new Set,tu=new Map;for(let[u,D]of A.codes)ru.add(A.color.ansi(D)),tu.set(A.color.ansi(u),A.color.ansi(D));function ut(u){if(ru.has(u))return u;if(tu.has(u))return tu.get(u);u=u.slice(2),u.includes(";")&&(u=u[0]+"0");let D=A.codes.get(Number.parseInt(u,10));return D?A.color.ansi(D):A.reset.open}function Dt(u){for(let D=0;D<u.length;D++){let e=u.codePointAt(D);if(e>=Xe&&e<=Qe)return D}return-1}function et(u,D){u=u.slice(D,D+Ze);let e=Dt(u);if(e!==-1){let t=u.indexOf("m",e);return t===-1&&(t=u.length),u.slice(0,t+1)}}function tt(u,D=Number.POSITIVE_INFINITY){let e=[],t=0,r=0;for(;t<u.length;){let F=u.codePointAt(t);if(Je.has(F)){let s=et(u,t);if(s){e.push({type:"ansi",code:s,endCode:ut(s)}),t+=s.length;continue}}let o=eu(F),n=String.fromCodePoint(F);if(e.push({type:"character",value:n,isFullWidth:o}),t+=n.length,r+=o?2:n.length,r>=D)break}return e}function oD(u){let D=[];for(let e of u)e.code===A.reset.open?D=[]:ru.has(e.code)?D=D.filter(t=>t.endCode!==e.code):(D=D.filter(t=>t.endCode!==e.endCode),D.push(e));return D}function rt(u){return oD(u).map(({endCode:t})=>t).reverse().join("")}function Ft(u,D,e){let t=tt(u,e),r=[],F=0,o="",n=!1;for(let s of t){if(e!==void 0&&F>=e)break;s.type==="ansi"?(r.push(s),n&&(o+=s.code)):(!n&&F>=D&&(n=!0,r=oD(r),o=r.map(({code:C})=>C).join("")),n&&(o+=s.value),F+=s.isFullWidth?2:s.value.length)}return o+=rt(r),o}i();i();var ft=(u,D=2)=>u.replace(/^\t+/gm,e=>" ".repeat(e.length*D)),fD=ft;var dt=(u,D)=>{let e=[],t=u-D,r=u+D;for(let F=t;F<=r;F++)e.push(F);return e},pt=(u,D,e={})=>{var t;if(typeof u!="string")throw new TypeError("Source code is missing.");if(!D||D<1)throw new TypeError("Line number must start from `1`.");let r=fD(u).split(/\r?\n/);if(!(D>r.length))return dt(D,(t=e.around)!==null&&t!==void 0?t:3).filter(F=>r[F-1]!==void 0).map(F=>({line:F,value:r[F-1]}))},dF=pt;export{Ju as a,Ve as b,Or as c,pu as d,w as e,A as f,kD as g,eu as h,Ft as i,Ye as j,ot as k,zr as l,ct as m,dF as n,Pu as o,se as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-UB2LAIXS.js";import{b as i}from"./chunk-EZ5F4ZFY.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,4 +1,4 @@
|
|
|
1
|
-
import{b as N,c as S,d as A}from"./chunk-
|
|
1
|
+
import{b as N,c as S,d as A}from"./chunk-SHBB5GST.js";import{a as T}from"./chunk-246AZCDT.js";import{a as g}from"./chunk-VXGXK66W.js";import{Ia as x,b as P,c as y}from"./chunk-PG6XEOYF.js";import{b as d,c as b}from"./chunk-Q4TZD2M6.js";import{y as f}from"./chunk-RCYQPOJW.js";import{Cb as h,Eb as l,Ib as m}from"./chunk-3F42A3XV.js";import{d as p}from"./chunk-3VYOLEQE.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();s();function C(n,t){let o={};return n.targeting?.forEach(e=>{e.target&&(o[e.target]={...e.input_query&&{inputQueryPath:`${t}/${e.input_query}`},...e.export&&{export:e.export}})}),o}function I(n,t,o,e,r,i){return JSON.stringify({handle:t.handle,name:n.name,apiVersion:t.api_version,targeting:o,schemaPath:i,wasmPath:r,functionRunnerPath:e},null,2)}function w(n,t){return{title:`CONFIGURATION
|
|
2
2
|
`,body:{tabularData:[["Handle",n.handle??"N/A"],["Name",t??"N/A"],["API Version",n.api_version??"N/A"]],firstColumnSubdued:!0}}}function j(n){if(Object.keys(n).length===0)return null;let t=[];return Object.entries(n).forEach(([o,e])=>{t.push([l`${h.cyan(o)}`.value,""]),e.inputQueryPath&&t.push([{subdued:" Input Query Path"},{filePath:e.inputQueryPath}]),e.export&&t.push([{subdued:" Export"},e.export])}),{title:`
|
|
3
3
|
TARGETING
|
|
4
4
|
`,body:{tabularData:t}}}function O(n,t){return{title:`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as E}from"./chunk-
|
|
1
|
+
import{i as E}from"./chunk-ZZ7SOJHH.js";import{Cb as $,Eb as T,Nb as O,Xa as V,qa as N}from"./chunk-3F42A3XV.js";import{a as g,c as w,e as Y,g as m}from"./chunk-VKWPEFWQ.js";var I=w((z,R)=>{R.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var K=w((X,d)=>{m();var b=g("fs"),y=g("path"),q=g("os"),F=g("crypto"),P=I(),D=P.version,C=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function S(e){let n={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
2
2
|
`);let s;for(;(s=C.exec(r))!=null;){let a=s[1],t=s[2]||"";t=t.trim();let o=t[0];t=t.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),o==='"'&&(t=t.replace(/\\n/g,`
|
|
3
3
|
`),t=t.replace(/\\r/g,"\r")),n[a]=t}return n}function U(e){e=e||{};let n=x(e);e.path=n;let r=l.configDotenv(e);if(!r.parsed){let o=new Error(`MISSING_DATA: Cannot parse ${n} for an unknown reason`);throw o.code="MISSING_DATA",o}let s=A(e).split(","),a=s.length,t;for(let o=0;o<a;o++)try{let i=s[o].trim(),f=M(r,i);t=l.decrypt(f.ciphertext,f.key);break}catch(i){if(o+1>=a)throw i}return l.parse(t)}function B(e){console.log(`[dotenv@${D}][WARN] ${e}`)}function v(e){console.log(`[dotenv@${D}][DEBUG] ${e}`)}function j(e){console.log(`[dotenv@${D}] ${e}`)}function A(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function M(e,n){let r;try{r=new URL(n)}catch(i){if(i.code==="ERR_INVALID_URL"){let f=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw f.code="INVALID_DOTENV_KEY",f}throw i}let s=r.password;if(!s){let i=new Error("INVALID_DOTENV_KEY: Missing key part");throw i.code="INVALID_DOTENV_KEY",i}let a=r.searchParams.get("environment");if(!a){let i=new Error("INVALID_DOTENV_KEY: Missing environment part");throw i.code="INVALID_DOTENV_KEY",i}let t=`DOTENV_VAULT_${a.toUpperCase()}`,o=e.parsed[t];if(!o){let i=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${t} in your .env.vault file.`);throw i.code="NOT_FOUND_DOTENV_ENVIRONMENT",i}return{ciphertext:o,key:s}}function x(e){let n=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)b.existsSync(r)&&(n=r.endsWith(".vault")?r:`${r}.vault`);else n=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else n=y.resolve(process.cwd(),".env.vault");return b.existsSync(n)?n:null}function k(e){return e[0]==="~"?y.join(q.homedir(),e.slice(1)):e}function W(e){let n=!!(e&&e.debug),r=e&&"quiet"in e?e.quiet:!0;(n||!r)&&j("Loading env from encrypted .env.vault");let s=l._parseVault(e),a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),l.populate(a,s,e),{parsed:s}}function G(e){let n=y.resolve(process.cwd(),".env"),r="utf8",s=!!(e&&e.debug),a=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?r=e.encoding:s&&v("No encoding is specified. UTF-8 is used by default");let t=[n];if(e&&e.path)if(!Array.isArray(e.path))t=[k(e.path)];else{t=[];for(let u of e.path)t.push(k(u))}let o,i={};for(let u of t)try{let c=l.parse(b.readFileSync(u,{encoding:r}));l.populate(i,c,e)}catch(c){s&&v(`Failed to load ${u} ${c.message}`),o=c}let f=process.env;if(e&&e.processEnv!=null&&(f=e.processEnv),l.populate(f,i,e),s||!a){let u=Object.keys(i).length,c=[];for(let p of t)try{let h=y.relative(process.cwd(),p);c.push(h)}catch(h){s&&v(`Failed to load ${p} ${h.message}`),o=h}j(`injecting env (${u}) from ${c.join(",")}`)}return o?{parsed:i,error:o}:{parsed:i}}function J(e){if(A(e).length===0)return l.configDotenv(e);let n=x(e);return n?l._configVault(e):(B(`You set DOTENV_KEY but you are missing a .env.vault file at ${n}. Did you forget to build it?`),l.configDotenv(e))}function Q(e,n){let r=Buffer.from(n.slice(-64),"hex"),s=Buffer.from(e,"base64"),a=s.subarray(0,12),t=s.subarray(-16);s=s.subarray(12,-16);try{let o=F.createDecipheriv("aes-256-gcm",r,a);return o.setAuthTag(t),`${o.update(s)}${o.final()}`}catch(o){let i=o instanceof RangeError,f=o.message==="Invalid key length",u=o.message==="Unsupported state or unable to authenticate data";if(i||f){let c=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw c.code="INVALID_DOTENV_KEY",c}else if(u){let c=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw c.code="DECRYPTION_FAILED",c}else throw o}}function H(e,n,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof n!="object"){let t=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw t.code="OBJECT_REQUIRED",t}for(let t of Object.keys(n))Object.prototype.hasOwnProperty.call(e,t)?(a===!0&&(e[t]=n[t]),s&&v(a===!0?`"${t}" is already defined and WAS overwritten`:`"${t}" is already defined and was NOT overwritten`)):e[t]=n[t]}var l={configDotenv:G,_configVault:W,_parseVault:U,config:J,decrypt:Q,parse:S,populate:H};d.exports.configDotenv=l.configDotenv;d.exports._configVault=l._configVault;d.exports._parseVault=l._parseVault;d.exports.config=l.config;d.exports.decrypt=l.decrypt;d.exports.parse=l.parse;d.exports.populate=l.populate;d.exports=l});m();var L=Y(K());async function oe(e){if(O(T`Reading the .env file at ${$.path(e)}`),!await V(e))throw new E(`The environment file at ${e} does not exist.`);let n=await N(e);return{path:e,variables:(0,L.parse)(n)}}function se(e,n){let r=[],s=e===null?[]:e.split(`
|
|
4
4
|
`),a=[],t;for(let o of s){if(t){if(o.endsWith(t.quote)){let u=_(t.key,t.value+o.slice(0,-1),t.quote),c=n[t.key];c&&(a.push(t.key),u=_(t.key,c)),r.push(u),t=void 0}else t.value+=`${o}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-BLCR7BXU.js";import{p as n,q as m,v as l}from"./chunk-TWS34WUT.js";import{b as s,c as h}from"./chunk-Q4TZD2M6.js";import{oa as o}from"./chunk-3E3MCY5O.js";import{b as v}from"./chunk-I3J63RFV.js";import{e as u,g as r}from"./chunk-VKWPEFWQ.js";r();var e=u(v(),1);var i=class extends l{static summary="Uploads your local theme files to the connected store, overwriting the remote version if specified.";static usage=["theme push","theme push --unpublished --json"];static descriptionWithMarkdown=`Uploads your local theme files to Shopify, overwriting the remote version if specified.
|
|
2
2
|
|
|
3
3
|
If no theme is specified, then you're prompted to select the theme to overwrite from the list of the themes in your store.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./chunk-
|
|
1
|
+
import{b as t}from"./chunk-MP5NZL7C.js";import{b as a}from"./chunk-EZ5F4ZFY.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();var i=class extends a{static summary="Upgrades Shopify CLI.";static descriptionWithMarkdown="Upgrades Shopify CLI using your package manager.";static description=this.descriptionForHelp();async run(){await t()}};export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-
|
|
1
|
+
import{a as U,b as xt}from"./chunk-JLGA3B7P.js";import{a as ht,b as ft,f as Ie,g as ae,h as A,i as ce,k as Et,n as Tt}from"./chunk-PI6FLLDD.js";import{a as M,l as gt,m as yt}from"./chunk-JAY7AGAG.js";import{s as ie,t as W}from"./chunk-TWS34WUT.js";import{a as D,b as O,e as nt,g as rt,i as ot,j as it,k as at,n as ct,p as lt,q as dt,r as oe,s as b,u as ut,w as pt}from"./chunk-Q7BOSHWX.js";import{da as mt}from"./chunk-P2MVR6CG.js";import{pa as L,ra as H}from"./chunk-3E3MCY5O.js";import{A as I,B as te,C as tt,T as st,y as et}from"./chunk-RCYQPOJW.js";import{c as Ke}from"./chunk-YTJ3EPD3.js";import{i as se}from"./chunk-ZZ7SOJHH.js";import{Aa as Ze,Ca as Qe,Cb as j,Eb as ne,Kb as re,Nb as P,Ob as N,S as Xe,Xa as $,_a as C,ba as $e,fb as ke,qa as k,ya as be}from"./chunk-3F42A3XV.js";import{d as T,g as V,j as Ve,k as q}from"./chunk-3VYOLEQE.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var rs=".shopifyignore",Rt=/templates\/\*(\.(json|liquid))?$/,St=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=_e(s),[a=[],u=[]]=_e(n),[p=[],c=[]]=_e(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(p,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Xe(l,x=>x.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>os(n,i)||cs(i)&&as(n,ls(i)));return(s?!r:r)?(P(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function wt(e){let t=T(e,rs);return await $(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function _e(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function os(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!St.has(t)&&(St.add(t),I({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),is(t)?ke(e,t.replace(Rt,"templates/**/*$1"),s):!1)}function is(e){return Rt.test(e)}function as(e,t){return t.test(e)}function cs(e){return e.startsWith("/")&&e.endsWith("/")}function ls(e){return new RegExp(e.slice(1,-1))}h();import Ft from"fs/promises";var le=class{notifyPath;isValidUrl;constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&N("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{P(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),N(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await Ft.writeFile(this.notifyPath,t),await Ft.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ds from"node:events";var Pt=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ds,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await ue(e,c),m=de(c,l),x=typeof l=="string"?l:"",f=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:m,value:x,attachment:f})),l},i=C(Pt,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let m=V(e,l),x=o(m).then(()=>{let f=t.get(m);return s.add(f.key),f.value??f.attachment??""});st(5).then(()=>{s.delete(m)}).catch(()=>{}),r(c,{fileKey:m,onContent:f=>{x.then(g=>{g&&f(g)}).catch(()=>{})},onSync:f=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:m=>m()})},p=new Set(Pt.map(c=>T(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-5RWEYTNQ.js");c.watch([...p],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var us="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function $t(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function bt(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>${e.title}</title>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as J}from"./chunk-
|
|
1
|
+
import{c as J}from"./chunk-IOS4IDZ2.js";import{b as k}from"./chunk-G627WGIC.js";import{a as re}from"./chunk-TEASB2WU.js";import{a as ae}from"./chunk-KOYBR5MV.js";import{a as z}from"./chunk-VXGXK66W.js";import{Ha as ne,I as ee,K as te,d as Q,e as Z}from"./chunk-PG6XEOYF.js";import{q as F,s as X,t as K}from"./chunk-PQCALXSD.js";import{a as T}from"./chunk-525BMYNR.js";import{b as H,f as I}from"./chunk-Q4TZD2M6.js";import{C as $,p as b,x as G,y as _}from"./chunk-FQKURDZR.js";import{A as q,D as Y,F as V,H as O,J as W,z as U}from"./chunk-RCYQPOJW.js";import{e as E}from"./chunk-YTJ3EPD3.js";import{i as u}from"./chunk-ZZ7SOJHH.js";import{$ as f,Aa as w,Ca as v,Db as P,Sa as D,Xa as h,Ya as j,_a as L,ca as S,oa as g,ua as N}from"./chunk-3F42A3XV.js";import{f as B}from"./chunk-2R2PKQQV.js";import{b as ge}from"./chunk-I3J63RFV.js";import{d as p,n as R}from"./chunk-3VYOLEQE.js";import{e as xe,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();async function ie(e,t,r,n={}){let{templates:a,groupOrder:i}=await e.templateSpecifications(t,n);return{templates:a.filter(o=>r.includes(o.identifier)||r.includes(o.type)),groupOrder:i}}d();d();async function oe(e,t){let r=e?.path??"",n=p(t,r);if(!await h(n))throw new u(`
|
|
2
2
|
The extension is not available for ${e?.value}`);return n}async function se({name:e,app:t}){let r=S(e),n=p(t.directory,K.extensions.directoryName,r);if(await h(n))throw new u(`
|
|
3
3
|
A directory with this name (${r}) already exists.
|
|
4
4
|
Choose a new name for your extension.`);return await w(n),await N(p(n,F.lockFile)),n}function A(e){switch(e){case"vanilla-js":case"preact":case"react":case"typescript":case"typescript-react":return"javascript";case"rust":case"wasm":return e;case void 0:case"liquid":case"config-only":return}}async function ce(e){let t=e.extensionChoices.name,r=e.extensionChoices.flavor,n=e.extensionTemplate.supportedFlavors.find(o=>o.value===r),a=await se({app:e.app,name:t}),i=e.cloneUrl??e.extensionTemplate.url,s={directory:a,url:i,app:e.app,project:e.project,type:e.extensionTemplate.type,name:t,extensionFlavor:n,onGetTemplateRepository:e.onGetTemplateRepository??(async(o,c)=>{await J({repoUrl:o,destination:c,shallow:!0})})};return await we(s),{directory:R(a),extensionTemplate:e.extensionTemplate}}async function we(e){try{switch(e.type){case"theme":await Pe(e);break;case"function":await ke(e);break;default:await Fe(e);break}let t=p(e.directory,F.lockFile);await v(t)}catch(t){throw await ve(e.directory),e.project.packageManager==="pnpm"&&Ee(t)?new u("Your extension couldn't be generated because pnpm blocked the build scripts of some of its dependencies.",null,[["Run",{command:"pnpm approve-builds"},"in your app directory to approve the build scripts."],["Run",{command:P(e.project.packageManager,"shopify app generate extension")},"again."]]):t}}async function ve(e){try{await v(e,{maxRetries:10,retryDelay:100})}catch{q({headline:["Couldn't remove",{filePath:e},{char:"."}],body:"Delete this directory manually before generating an extension with the same name."})}}function Ee(e){return e instanceof Error&&e.message.includes("ERR_PNPM_IGNORED_BUILDS")}async function Pe({directory:e,url:t,type:r,name:n,extensionFlavor:a,onGetTemplateRepository:i}){return g(async s=>{let o=await M(t,a,s,i);await k(o,e,{name:n,type:r,uid:E(f(n))})})}async function ke({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[];c.push({title:"Generating function extension",task:async()=>{if(await g(async l=>{let m=await M(t,i,l,s);await k(m,e,{name:a,handle:f(a),flavor:i?.value,uid:E(f(a))})}),o==="javascript"){let l=le(i?.value??"rust");await pe(e,l,"!(*.graphql)")}}}),o==="javascript"&&c.push({title:"Installing additional dependencies",task:async()=>{n.usesWorkspaces&&await b({packageManager:n.packageManager,directory:n.directory});let l=Te(o);await _(l,{packageManager:n.packageManager,type:"prod",directory:n.usesWorkspaces?e:n.directory})}}),o==="javascript"&&c.push({title:"Building GraphQL types",task:async()=>{await Z({directory:e,isJavaScript:!0},{stdout:process.stdout,stderr:process.stderr,app:r})}}),await O(c)}async function Fe({directory:e,url:t,app:r,project:n,name:a,extensionFlavor:i,onGetTemplateRepository:s}){let o=A(i?.value),c=[{title:"Generating extension",task:async()=>{let l=le(i?.value??"vanilla-js");await g(async m=>{let y=await M(t,i,m,s);await k(y,e,{srcFileExtension:l,name:a,handle:f(a),flavor:i?.value??"",uid:E(f(a))})}),o==="javascript"&&await pe(e,l)}},{title:"Installing dependencies",task:async()=>{let l=n.packageManager;if(n.usesWorkspaces)A(i?.value)==="javascript"&&await b({packageManager:l,directory:n.directory});else{await be(n.directory,i?.value);let m=p(e,"package.json"),y=await _e(m);await _(y,{packageManager:l,type:"prod",directory:n.directory}),await v(m)}}}];c.push({title:"Update shared type definition",task:async()=>{await te(r)}}),await O(c)}function le(e){return{"vanilla-js":"js",preact:"jsx",react:"jsx",typescript:"ts","typescript-react":"tsx",rust:"rs",wasm:"wasm",liquid:"liquid","config-only":""}[e]??"js"}function Te(e){let t=[];return e==="javascript"&&t.push({name:"@shopify/shopify_function",version:`~${Q}.0.0`}),t}async function pe(e,t,r="*"){let n=await L(p(e,"src",r)),a=[];for(let i of n)a.push(D(i,`${i}.${t}`));await Promise.all(a)}async function be(e,t){t==="typescript-react"&&await $(e,{"@types/react":X.reactTypes})}async function _e(e){if(!await h(e))return[];let t=await G(e);return Object.entries(t?.dependencies??{}).map(([r,n])=>({name:r,version:n}))}async function M(e,t,r,n){let a=p(r,"download");return await w(a),await n(e,a),oe(t,a)}d();function Oe(e,t=[]){let r=[...e.map(a=>({label:a.name,value:a.identifier,group:a.group||"Other",sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER})),...t.map(a=>({label:`${a.name} (limit reached)`,value:a.identifier,group:a.group||"Other",disabled:!0,sortPriority:a.sortPriority??Number.MAX_SAFE_INTEGER}))],n=(a,i)=>a.sortPriority===i.sortPriority?a.label.localeCompare(i.label):a.sortPriority-i.sortPriority;return r.sort(n)}var Ie=async e=>{let t=e.extensionTemplates,r=e.templateType,n=e.extensionFlavor;if(!r){if(n&&(t=t.filter(c=>c.supportedFlavors.map(l=>l.value).includes(n))),t.length===0)throw new u("You have reached the limit for the number of extensions you can create.");r=await V({message:"Type of extension?",choices:Oe(t,e.unavailableExtensions),groupOrder:e.groupOrder})}let a=t.find(c=>c.identifier===r),i=e.name||await de(e.directory,a.defaultName),s=e.extensionFlavor??await Ae(a);return{extensionTemplate:a,extensionContent:{name:i,flavor:s}}};async function de(e,t,r=1){let n=t.includes(" ")?" ":"-",a=r<=1?t:`${t}${n}${r}`,i=p(e,f(a));return j(i)?de(e,t,r+1):W({message:"Name your extension:",defaultValue:a})}async function Ae(e){if(e.supportedFlavors.length!==0)return e.supportedFlavors.length===1&&e.supportedFlavors[0]?e.supportedFlavors[0].value:Y({message:"What would you like to work in?",choices:e.supportedFlavors.map(t=>({label:t.name,value:t.value})),defaultValue:"react"})}var ue=Ie;async function Me(e){let{app:t,developerPlatformClient:r,remoteApp:n,specifications:a,template:i}=e,s=a.map(he=>he.identifier),{templates:o,groupOrder:c}=await ie(r,n,s,{requestedTemplate:i}),l=await Ce(o,c,a,t,e),m=await ue(l);await Se(m,i);let y=Ne(m,t,e,r),ye=await ce(y);De(ye,e.project.packageManager)}async function Ce(e,t,r,n,a){let i=await Ge(a.template,n,e,r);je(i,a.flavor);let{validTemplates:s,templatesOverlimit:o}=Re(e,r,n);return{templateType:i?.identifier,name:a.name,extensionFlavor:a.flavor,directory:p(a.directory,"extensions"),app:n,extensionTemplates:s??[],unavailableExtensions:o??[],reset:a.reset,groupOrder:t}}function Re(e,t,r){return re(e,a=>!me(r,t,a)?"validTemplates":"templatesOverlimit")}function me(e,t,r){let n=r.type,a=t.find(s=>s.identifier===n||s.externalIdentifier===n);return e.extensionsForType({identifier:n,externalIdentifier:n}).length>=(a?.registrationLimit??1)}async function Se(e,t){let{extensionContent:r}=e;return T.addPublicMetadata(()=>({cmd_scaffold_template_flavor:r.flavor,cmd_scaffold_type:e.extensionTemplate.identifier,cmd_scaffold_used_prompts_for_type:!t}))}function Ne(e,t,r,n){return{app:t,project:r.project,cloneUrl:r.cloneUrl,extensionChoices:e.extensionContent,extensionTemplate:e.extensionTemplate,developerPlatformClient:n}}function De(e,t){let r=Le(e.extensionTemplate,e.directory,t);U(r)}function je(e,t){if(!t||!e)return;let r=e.supportedFlavors.map(n=>n.value);if(!r.includes(t))throw new u("Invalid template for extension type",`Expected template to be one of the following: ${r.join(", ")}.`)}function Le(e,t,r){let n={headline:["Your extension was created in",{filePath:t},{char:"."}],nextSteps:[],reference:[]};return e.type!=="function"&&n.nextSteps.push(["To preview this extension along with the rest of the project, run",{command:P(r,"shopify app dev")}]),e.supportLinks[0]&&n.reference.push(["For more details, see the",{link:{label:"docs",url:e.supportLinks[0]}}]),n}async function Ge(e,t,r,n){if(!e)return;let a=r.find(i=>i.identifier===e);if(!a){let i=await B(),s=r.map(c=>c.identifier),o=i?"You might need to enable some flags on your Organization or App":void 0;throw new u(`Unknown extension type: ${e}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-EZ5F4ZFY.js";import{y as t}from"./chunk-RCYQPOJW.js";import{k as r}from"./chunk-2R2PKQQV.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var e=class extends n{static description="Run CLI doctor-release tests";static hidden=!0;async run(){r()&&t({headline:"Shopify CLI Doctor Release.",body:["Available doctor-release commands:",""," shopify doctor-release theme -e <environment> Run all theme command tests","","The -e/--environment flag is required to specify the store configuration.","Use --help with any command for more options."]})}};export{e as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as A}from"./chunk-
|
|
1
|
+
import{b as A}from"./chunk-Q4TZD2M6.js";import{b as w}from"./chunk-EZ5F4ZFY.js";import{j as g}from"./chunk-3E3MCY5O.js";import{i as a}from"./chunk-ZZ7SOJHH.js";import{Aa as m,Ib as y,Kb as v,ya as u}from"./chunk-3F42A3XV.js";import{b as L}from"./chunk-I3J63RFV.js";import{f as h,i as f}from"./chunk-3VYOLEQE.js";import{e as x,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",b="X-Shopify-Surface",R="cli",F=["shopify.dev"];async function S(t,e,p){let c;try{c=new URL(t)}catch{throw new a(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new a(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await g(t,{headers:{Accept:U,[b]:R,...p?{"Accept-Language":p}:{}}});if(!i.ok)throw new a(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let l=await i.text();if(e){let o=h(e);await m(f(o)),await u(o,l),v(`Saved ${t} to ${o}`);return}y(l)}var n=x(L(),1),r=class t extends w{static description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. Pass `--language` for the language of the app you are building so code examples match your stack. For finding the relevant pieces of content across shopify.dev instead, use `doc search`.";static examples=[`# fetch the Markdown version of a Shopify.dev page
|
|
2
2
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli`,`# filter code examples to the language of the app you are building
|
|
3
3
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --language ruby`,`# save the document to a file instead of printing it
|
|
4
4
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --output docs/shopify-cli.md`];static flags={...A,url:n.Flags.string({description:"The shopify.dev URL to fetch.",env:"SHOPIFY_FLAG_URL",required:!0}),language:n.Flags.string({description:"Filter code examples in the returned Markdown to this language. Supply the language of the app you are building so examples match your stack. Optional \u2014 if omitted, or if shopify.dev does not recognize the language for a given page, the document includes examples in every language.",env:"SHOPIFY_FLAG_LANGUAGE",options:["javascript","typescript","python","ruby","php","rust","curl","liquid","graphql","html"]}),output:n.Flags.string({description:"Write the document to this file path instead of printing it to stdout.",env:"SHOPIFY_FLAG_OUTPUT"})};async run(){let{flags:e}=await this.parse(t);await S(e.url,e.output,e.language)}};export{r as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-HB3MJYBK.js";import{a as I}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-HB3MJYBK.js";import{a as I}from"./chunk-SYNCIFJ6.js";import{a as x}from"./chunk-SWNY3RUM.js";import{A as R,D as T,F,I as d,L as u,a as A,e as b,f as k,r as _,v}from"./chunk-Q7PF4VKI.js";import{b as S}from"./chunk-Q4TZD2M6.js";import{b as w}from"./chunk-EZ5F4ZFY.js";import{_ as y,z as g}from"./chunk-RCYQPOJW.js";import{i as a}from"./chunk-ZZ7SOJHH.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var B=5e6,$={readStdin:y,engineVersion:k,writeAgentFindings:v,recordMetadata:I};function E(t){return u(t.record)}function s(t,e){throw new a("The findings document was rejected. Nothing was recorded.",null,[["Fix every error, then run",{command:E(e)},"again."]],[{title:"Errors",body:{list:{items:t}}}])}async function z(t,e){try{return await e.readStdin()}catch(i){throw i instanceof a&&s([i.message],t),i}}async function V(t,e){let i=await z(t,e);if(i===void 0)throw new a("No findings document was piped on stdin.",null,[["Pipe the findings document on stdin:",{command:E(t)}]]);let n=Buffer.byteLength(i,"utf8");n>B&&s([`The findings document is ${n} bytes; the limit is 5 MB.`],t);try{return JSON.parse(i)}catch(o){let r=o instanceof Error?o.message:String(o);s([`The findings document is not valid JSON: ${r}`],t)}}async function f(t,e=$){let{selection:i}=t,n=d(i,t.path),o=await V(n,e),r=b(o,{engineVersion:e.engineVersion()});r.ok||s(r.errors,n);let h=R(r.document);h>_&&s([`The recorded findings would be stored as ${h} bytes; the limit is 5 MB. Shorten or remove findings.`],n);let C=await e.writeAgentFindings(i.appDirectory,T(i),r.document),l=r.document.checks.reduce((D,N)=>D+N.findings.length,0);return await e.recordMetadata({num_security_findings:l}),{path:C,checks:r.document.checks.length,findings:l}}function M(t,e,i){let n=d(e,i);g({headline:"Agent findings recorded.",body:[`Recorded ${m(t.checks,"check")} and ${m(t.findings,"finding")} in`,{filePath:t.path}],nextSteps:[["Run",{command:u(n.review)},"to see the results."]]})}var p=class t extends w{static summary="Record agent findings from an app security check.";static descriptionWithMarkdown="Reads a coding agent's complete findings document from stdin, validates it, and replaces `agent-findings.json` in the results directory, `.shopify/app-security/<results key>/`. The results key is `--client-id` when you pass it, and otherwise the name of the app configuration file without `.toml`. `--client-id` is checked against your Shopify account before anything is read, so it needs you to be logged in.\n\nThe document must include a `scope` with the `include_dirs`, `excludes` and `no_git_ignore` values of the `check` run it describes, exactly as typed. It's recorded as reported and never compared with the scan's files.\n\nThe document is recorded all or nothing: if anything is invalid, the command fails with every error, writes nothing, and exits with a non-zero code. It needs the results directory that `shopify app security check` creates.";static description=this.descriptionForHelp();static flags={...S,...A};async run(){let{flags:e}=await this.parse(t),i=await F({path:e.path,config:e.config,clientId:e["client-id"],withoutAppConfig:e["without-app-config"],allowPrompts:!1,validateClientIdFlag:!0});await x(i,e.path);let n=await f({selection:i,path:e.path});M(n,i,e.path)}};export{p as a};
|