@shopify/cli 4.8.1 → 4.8.3
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-AL5WLCEC.js +1 -0
- package/dist/{analytics-TQHJN5PY.js → analytics-VCJLTHBI.js} +1 -1
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-BMDCOBUR.js → chunk-2AFQC53K.js} +1 -1
- package/dist/{chunk-EIBQRJTQ.js → chunk-2C27YWUC.js} +1 -1
- package/dist/{chunk-IPSY5EEL.js → chunk-2E3JUVRC.js} +1 -1
- package/dist/{chunk-YUNINHOR.js → chunk-2NHLSPBM.js} +1 -1
- package/dist/{chunk-5PWJTOWK.js → chunk-34EOYW4N.js} +1 -1
- package/dist/{chunk-U42P3F7Y.js → chunk-34YS3IUO.js} +1 -1
- package/dist/chunk-3CFHLIBD.js +7 -0
- package/dist/{chunk-GTIBT4V6.js → chunk-3D3IYIZ7.js} +1 -1
- package/dist/{chunk-VPRDI4TT.js → chunk-3DXA7B3Y.js} +1 -1
- package/dist/{chunk-H6HILX7D.js → chunk-3U7O3PMX.js} +1 -1
- package/dist/{chunk-HKSRCMQ7.js → chunk-3X7XO4LN.js} +1 -1
- package/dist/{chunk-WVQZOLZJ.js → chunk-46ISGKTW.js} +1 -1
- package/dist/{chunk-J3PS4JF2.js → chunk-4CLJ6W23.js} +2 -2
- package/dist/chunk-4EHFK2OI.js +1 -0
- package/dist/{chunk-3R7OHZ4C.js → chunk-4XZJKSDD.js} +1 -1
- package/dist/{chunk-X3KYRBGE.js → chunk-4ZMWIIJV.js} +1 -1
- package/dist/{chunk-UCJ3NHJH.js → chunk-56362WJR.js} +1 -1
- package/dist/{chunk-MNTJZ6JO.js → chunk-5QCSJYJ4.js} +1 -1
- package/dist/{chunk-BKYTBTQ5.js → chunk-5QNB6464.js} +1 -1
- package/dist/{chunk-SEGZQCXZ.js → chunk-5VBEPL4S.js} +1 -1
- package/dist/{chunk-7CPYFKFK.js → chunk-5YSO5HRH.js} +1 -1
- package/dist/{chunk-CKZOLGWI.js → chunk-65DQFHSH.js} +1 -1
- package/dist/{chunk-LQGF3RKX.js → chunk-6ECS5KDX.js} +1 -1
- package/dist/{chunk-LJO22Z6S.js → chunk-6NO44HAQ.js} +1 -1
- package/dist/{chunk-XSUX2XAW.js → chunk-6QDI53VP.js} +1 -1
- package/dist/{chunk-4ASQQTCD.js → chunk-6TPUTSNR.js} +1 -1
- package/dist/{chunk-WT2KJHUO.js → chunk-6ZGCTTAD.js} +1 -1
- package/dist/{chunk-5THZTE44.js → chunk-777JJJYW.js} +1 -1
- package/dist/{chunk-PJTRZSH4.js → chunk-77QBDEU4.js} +1 -1
- package/dist/{chunk-SAKMJGXL.js → chunk-7W7RGEII.js} +1 -1
- package/dist/{chunk-GZEPWYMP.js → chunk-7YBBERPS.js} +1 -1
- package/dist/{chunk-TQNGFSCI.js → chunk-7YDT5AOW.js} +1 -1
- package/dist/{chunk-HZDEDEAS.js → chunk-AHJT2Z7G.js} +1 -1
- package/dist/{chunk-QH7QOLZK.js → chunk-ALDLKZJW.js} +1 -1
- package/dist/{chunk-PCL4UWAE.js → chunk-AQJEA33T.js} +1 -1
- package/dist/{chunk-QPT6DUMC.js → chunk-ASBTWQJO.js} +1 -1
- package/dist/{chunk-DS7OKDQN.js → chunk-AU2OGZBS.js} +1 -1
- package/dist/{chunk-F2DO3R6R.js → chunk-AURREHRU.js} +1 -1
- package/dist/{chunk-XRVMKP53.js → chunk-AWTBC3MC.js} +3 -3
- package/dist/{chunk-SIVRBIKH.js → chunk-B3GLHLAQ.js} +1 -1
- package/dist/{chunk-5CC4QYN4.js → chunk-B52JFWYO.js} +1 -1
- package/dist/{chunk-XNP7PMGC.js → chunk-BAUHOB76.js} +1 -1
- package/dist/{chunk-EDHR546O.js → chunk-BIV3GWMB.js} +1 -1
- package/dist/chunk-BJ3JF35I.js +6 -0
- package/dist/{chunk-O2X6EVXQ.js → chunk-BO45JVQ3.js} +1 -1
- package/dist/{chunk-XNKAPGJD.js → chunk-BQTD7UV2.js} +1 -1
- package/dist/{chunk-ZYEGQSF5.js → chunk-BR3GYG2H.js} +1 -1
- package/dist/{chunk-WJEVB67Y.js → chunk-BR5CFKIN.js} +1 -1
- package/dist/{chunk-VM6EBNGR.js → chunk-BU4EGAMH.js} +1 -1
- package/dist/{chunk-RNFZJQVV.js → chunk-BV4K7JX5.js} +1 -1
- package/dist/{chunk-JVXKDM2E.js → chunk-C2AA5NVP.js} +1 -1
- package/dist/{chunk-UBX3HUMH.js → chunk-CF3PBTFV.js} +1 -1
- package/dist/{chunk-PSH4QKUX.js → chunk-CM4QZI6V.js} +1 -1
- package/dist/{chunk-7DJNASBC.js → chunk-CNDB4VEM.js} +1 -1
- package/dist/{chunk-WIBPVYPN.js → chunk-CRSAEF22.js} +1 -1
- package/dist/{chunk-GCTCRKET.js → chunk-CSNXCRPY.js} +1 -1
- package/dist/{chunk-3A2HLI4D.js → chunk-CYSB5AJJ.js} +1 -1
- package/dist/{chunk-OBRMBYTG.js → chunk-DDWJRJWW.js} +1 -1
- package/dist/{chunk-U7ELUEH2.js → chunk-DE3HBSUU.js} +1 -1
- package/dist/{chunk-5AMPXLKT.js → chunk-DGZCOTKZ.js} +1 -1
- package/dist/{chunk-3ACZB27E.js → chunk-E2IUEX5H.js} +1 -1
- package/dist/{chunk-7JG3CKDE.js → chunk-E6DIK7Z7.js} +1 -1
- package/dist/{chunk-PPC3RJDZ.js → chunk-E767ITG2.js} +1 -1
- package/dist/{chunk-PVZE65R7.js → chunk-EIASA32Z.js} +1 -1
- package/dist/{chunk-6633X2JU.js → chunk-EIEPBDNX.js} +1 -1
- package/dist/chunk-ENEPD4BS.js +1 -0
- package/dist/{chunk-LTRJWOI6.js → chunk-EQ7HQXEK.js} +1 -1
- package/dist/{chunk-GVEJO3WM.js → chunk-ERMLZF2C.js} +1 -1
- package/dist/{chunk-LEPENRGG.js → chunk-ETHKJFFN.js} +1 -1
- package/dist/{chunk-NQRSFMS7.js → chunk-EWKIFVW3.js} +1 -1
- package/dist/{chunk-5G2W7QKA.js → chunk-F3FHSS7N.js} +1 -1
- package/dist/{chunk-3NYK63U4.js → chunk-F4S4ITHP.js} +1 -1
- package/dist/{chunk-7DLMETRR.js → chunk-FKW62ZUV.js} +1 -1
- package/dist/{chunk-7USNGNVI.js → chunk-FYVFGKCJ.js} +1 -1
- package/dist/{chunk-2R6KOKWG.js → chunk-G52SCW6W.js} +1 -1
- package/dist/{chunk-PGBXHL2G.js → chunk-GK23CIPB.js} +1 -1
- package/dist/{chunk-HFRWZQOF.js → chunk-GKRGXRD4.js} +1 -1
- package/dist/{chunk-RHJLAYNK.js → chunk-GO4KOSHA.js} +1 -1
- package/dist/{chunk-2BHYBR2F.js → chunk-GSYVQPMP.js} +1 -1
- package/dist/{chunk-D2R7HPCT.js → chunk-HEABWGTV.js} +1 -1
- package/dist/{chunk-ILHEVBNU.js → chunk-HG63NM4M.js} +1 -1
- package/dist/{chunk-TCP4OG3D.js → chunk-HHWZV7CG.js} +1 -1
- package/dist/{chunk-VRO6QBVN.js → chunk-HLLMMIIM.js} +1 -1
- package/dist/{chunk-HEIZ3RSD.js → chunk-HPGQGIPA.js} +1 -1
- package/dist/{chunk-6USL7BKQ.js → chunk-HZASAGTU.js} +1 -1
- package/dist/{chunk-RRQYOGEA.js → chunk-I44E5KLI.js} +1 -1
- package/dist/{chunk-OYFNB5RY.js → chunk-I7XKF22Z.js} +1 -1
- package/dist/{chunk-AINDVTMY.js → chunk-IAURXPUJ.js} +3 -3
- package/dist/{chunk-AXLLN6DZ.js → chunk-J6BXYZRY.js} +1 -1
- package/dist/{chunk-33PLVLCE.js → chunk-JGSHB34D.js} +1 -1
- package/dist/{chunk-TBEG57SV.js → chunk-JKWKFDP7.js} +1 -1
- package/dist/{chunk-NV4SPMQS.js → chunk-KIPKRAUB.js} +1 -1
- package/dist/{chunk-UMZG254H.js → chunk-KLI5Z5RC.js} +1 -1
- package/dist/{chunk-FH36PGZH.js → chunk-KSSPT7G5.js} +12 -12
- package/dist/{chunk-UPTF2HK6.js → chunk-LOSBZZHU.js} +1 -1
- package/dist/{chunk-5U4UTFA4.js → chunk-LUSG2EHB.js} +1 -1
- package/dist/{chunk-6T5AZZUI.js → chunk-LZSDOB4O.js} +1 -1
- package/dist/{chunk-565SON6A.js → chunk-M7YZJWY3.js} +1 -1
- package/dist/{chunk-XH66VYZA.js → chunk-MF2PINFC.js} +1 -1
- package/dist/{chunk-KAAC4VIW.js → chunk-MI5HPOXV.js} +1 -1
- package/dist/{chunk-T24RA3WI.js → chunk-MPO2T5YQ.js} +1 -1
- package/dist/{chunk-KEUMU5TQ.js → chunk-MQM3PRVN.js} +1 -1
- package/dist/{chunk-R4YJM7KY.js → chunk-N34YKDEK.js} +1 -1
- package/dist/{chunk-PROWADZL.js → chunk-NG5FY45G.js} +1 -1
- package/dist/{chunk-YAA7OGRM.js → chunk-NKSLEPE2.js} +2 -2
- package/dist/chunk-NNCLTG6A.js +1 -0
- package/dist/{chunk-TVQVZHNP.js → chunk-NS7QRCJF.js} +1 -1
- package/dist/{chunk-CSAVYME2.js → chunk-NTV746FL.js} +1 -1
- package/dist/{chunk-E7I5YT53.js → chunk-O2YFSYDR.js} +1 -1
- package/dist/{chunk-QMYCJ2TM.js → chunk-O4ZMMPEP.js} +1 -1
- package/dist/{chunk-YMS6RVE5.js → chunk-OI3MNE72.js} +1 -1
- package/dist/{chunk-F5BTQI5W.js → chunk-OSMT4BVT.js} +1 -1
- package/dist/{chunk-AICVQH4V.js → chunk-OZJBUWZK.js} +1 -1
- package/dist/{chunk-4QXDDAMD.js → chunk-PERAXNOY.js} +2 -2
- package/dist/chunk-PJH3JJEQ.js +1 -0
- package/dist/{chunk-HEWKCSY7.js → chunk-PUGAY4JP.js} +3 -3
- package/dist/{chunk-RAOMLN5A.js → chunk-PXAYMXQN.js} +1 -1
- package/dist/{chunk-AXMSJ46T.js → chunk-PXM3ENVN.js} +1 -1
- package/dist/{chunk-3LBHSZSR.js → chunk-PYCGZSME.js} +1 -1
- package/dist/{chunk-X4JCATEE.js → chunk-PZH4WAOO.js} +1 -1
- package/dist/{chunk-VFQW2QL2.js → chunk-QCMGYBFD.js} +1 -1
- package/dist/{chunk-3FTP36HH.js → chunk-QGYETVYA.js} +1 -1
- package/dist/{chunk-ODFOSJU3.js → chunk-QIGFVVLB.js} +1 -1
- package/dist/{chunk-WLGEAJBU.js → chunk-RAJX2CQP.js} +1 -1
- package/dist/{chunk-KPJRLS53.js → chunk-RFORHGOR.js} +1 -1
- package/dist/{chunk-LC2BDU4B.js → chunk-RIWEYVNK.js} +1 -1
- package/dist/{chunk-Y6DYQWQK.js → chunk-RM3XC2IX.js} +1 -1
- package/dist/{chunk-7DGVNVW3.js → chunk-RPM2BFMN.js} +1 -1
- package/dist/chunk-RV4UQZ2W.js +1 -0
- package/dist/{chunk-36OXWMXZ.js → chunk-RVEAQUUF.js} +1 -1
- package/dist/{chunk-4ARQFW35.js → chunk-SASKWPDJ.js} +1 -1
- package/dist/{chunk-S5FGFQHD.js → chunk-SLZ6UMVV.js} +1 -1
- package/dist/{chunk-6U4BOZ73.js → chunk-SUQF2LM7.js} +1 -1
- package/dist/{chunk-OTVZU5AQ.js → chunk-SVO2M3F5.js} +1 -1
- package/dist/{chunk-BHDFVO2R.js → chunk-SYJXM2RN.js} +1 -1
- package/dist/{chunk-XZUL2HVC.js → chunk-SZ2V5WT6.js} +1 -1
- package/dist/{chunk-LIH7CQO7.js → chunk-T3IMDY72.js} +3 -3
- package/dist/{chunk-PSYQTFPK.js → chunk-T5I2LEDJ.js} +1 -1
- package/dist/{chunk-UBJYXNCN.js → chunk-T7BQYKKT.js} +1 -1
- package/dist/{chunk-6HMTAB2V.js → chunk-TBC5FH2W.js} +1 -1
- package/dist/{chunk-FM6VJLE7.js → chunk-TEHDOYO2.js} +1 -1
- package/dist/{chunk-GYFRTLML.js → chunk-TNYPQ2UL.js} +3 -3
- package/dist/{chunk-562EV2EJ.js → chunk-TWTZLWO7.js} +1 -1
- package/dist/{chunk-3GAN6KS6.js → chunk-U5APMZGT.js} +1 -1
- package/dist/{chunk-OJE7S6D4.js → chunk-UCP6UA7M.js} +1 -1
- package/dist/{chunk-WSJ5PUK6.js → chunk-UI75K6AX.js} +1 -1
- package/dist/{chunk-JDEOBIXA.js → chunk-ULIXS6H7.js} +1 -1
- package/dist/{chunk-AVX7CIDJ.js → chunk-UU3VUYVX.js} +1 -1
- package/dist/{chunk-FZUPL5YO.js → chunk-VCJ252CK.js} +1 -1
- package/dist/{chunk-UXL2A5UK.js → chunk-VEXW766J.js} +1 -1
- package/dist/{chunk-32IIURQB.js → chunk-VTKZJ6MD.js} +1 -1
- package/dist/{chunk-22JJHQVU.js → chunk-WE72MX7V.js} +1 -1
- package/dist/{chunk-ZJ6DWT36.js → chunk-WKC5HDMY.js} +1 -1
- package/dist/{chunk-4QAM7ROJ.js → chunk-WXDINLQ6.js} +1 -1
- package/dist/{chunk-U63A4OUA.js → chunk-XBL6HWDC.js} +1 -1
- package/dist/{chunk-H7IQZNKR.js → chunk-XCTRPBWM.js} +1 -1
- package/dist/{chunk-IMSPA67L.js → chunk-XNMDPOYU.js} +1 -1
- package/dist/{chunk-YZKBG7UZ.js → chunk-XSFF6KEB.js} +1 -1
- package/dist/{chunk-6JC2PM43.js → chunk-YJCNZGPY.js} +1 -1
- package/dist/{chunk-B3I7OMRN.js → chunk-YKHDUKFK.js} +1 -1
- package/dist/{chunk-DQVNW6EQ.js → chunk-YSOLGBU3.js} +1 -1
- package/dist/{chunk-T74ECTO7.js → chunk-Z3JINOCM.js} +1 -1
- package/dist/{chunk-L6OBJDYK.js → chunk-Z6MS5OET.js} +1 -1
- package/dist/{chunk-YY2JHCIG.js → chunk-ZBMPFLOH.js} +1 -1
- package/dist/{chunk-LH7KQZDD.js → chunk-ZC7FWXYM.js} +1 -1
- package/dist/{chunk-ZLMXR2XV.js → chunk-ZRFOMQ2L.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/doctor/instructions.js +1 -1
- package/dist/cli/commands/app/doctor.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -1
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/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/command-registry.js +1 -1
- package/dist/{conf-store-K65PEQF6.js → conf-store-F4NCJPWK.js} +1 -1
- package/dist/{deprecations-2SG4PB2W.js → deprecations-PX5KIFDO.js} +1 -1
- package/dist/dist-WO24PYXH.js +1 -0
- package/dist/dist-X7YIFLSP.js +1 -0
- package/dist/{environments-B4OWPMPR.js → environments-TLO674UK.js} +1 -1
- package/dist/{error-5YQYW3V2.js → error-YLDXWEC5.js} +1 -1
- package/dist/error-handler-SY45FR6A.js +1 -0
- package/dist/{fs-FM6YDE2U.js → fs-CDN2NZJC.js} +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{is-global-3FFDTC2G.js → is-global-KBYTYD3Y.js} +1 -1
- package/dist/{local-W73VIWHZ.js → local-IBYCFEVA.js} +1 -1
- package/dist/{metadata-OGQEI47Y.js → metadata-LOCKHSUF.js} +1 -1
- package/dist/{node-package-manager-GSHLPD5X.js → node-package-manager-ESOHDRPJ.js} +1 -1
- package/dist/notifications-system-EMCOAF3T.js +1 -0
- package/dist/os-XLJNYIZF.js +1 -0
- package/dist/{output-MG7RJ37P.js → output-OAORC6TH.js} +1 -1
- package/dist/{system-3HTWCGQH.js → system-VNXEM5E7.js} +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-T22J7MQF.js → ui-CIZHMGKK.js} +1 -1
- package/dist/upgrade-AIZVY3E5.js +1 -0
- package/dist/version-CNIDTUMV.js +1 -0
- package/dist/{version-KWF3XRSN.js → version-JJYR4NOL.js} +1 -1
- package/dist/{workerd-RB5ZS43X.js → workerd-JWZNKSHU.js} +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +7 -7
- package/dist/analytics-32PK45SE.js +0 -1
- package/dist/chunk-3NVQXPTU.js +0 -1
- package/dist/chunk-4IG7WG6V.js +0 -1
- package/dist/chunk-E3FZRPNL.js +0 -1
- package/dist/chunk-JLR6X5NA.js +0 -6
- package/dist/chunk-MA6QRENS.js +0 -1
- package/dist/chunk-PSUNX2YX.js +0 -1
- package/dist/chunk-V6UCVTJT.js +0 -7
- package/dist/dist-L4A3SGNF.js +0 -1
- package/dist/dist-XXCZFNRC.js +0 -1
- package/dist/error-handler-3PBXTHYY.js +0 -1
- package/dist/notifications-system-HQNQUKLF.js +0 -1
- package/dist/os-6HP4QG7V.js +0 -1
- package/dist/upgrade-FZ35KTBW.js +0 -1
- package/dist/version-LJOGYA5H.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as ay}from"./chunk-7DJNASBC.js";import{A as wy,B as si,C as Sy,D as Pn,E as xy,F as ky,G as Oa,H as Cy,I as Aa,J as _y,K as rs,L as MT,M as Ty,N as La,O as is,P as os,Q as Mn,R as Ey,S as an,T as qa,U as Wa,V as G,W as IT,X as NT,a as Z,aa as Mu,b as Pa,c as ly,d as Fn,e as Ce,f as Ma,g as cy,h as dy,i as hy,j as uy,k as py,l as ns,m as my,n as Ia,o as J,p as Na,q as fy,r as za,s as Kt,t as gy,u as V,v as lt,w as Cr,x as by,y as vy,z as yy}from"./chunk-NQRSFMS7.js";import{b as sy}from"./chunk-WJEVB67Y.js";import{a as Bt,b as ee,c as w,d as oy,e as Vt,f as Gt,g as h}from"./chunk-VKWPEFWQ.js";var qi=w(ct=>{"use strict";h();Object.defineProperty(ct,"__esModule",{value:!0});ct.stringArray=ct.array=ct.func=ct.error=ct.number=ct.string=ct.boolean=void 0;function zT(n){return n===!0||n===!1}ct.boolean=zT;function Ry(n){return typeof n=="string"||n instanceof String}ct.string=Ry;function OT(n){return typeof n=="number"||n instanceof Number}ct.number=OT;function AT(n){return n instanceof Error}ct.error=AT;function LT(n){return typeof n=="function"}ct.func=LT;function Dy(n){return Array.isArray(n)}ct.array=Dy;function qT(n){return Dy(n)&&n.every(e=>Ry(e))}ct.stringArray=qT});var np=w($=>{"use strict";h();Object.defineProperty($,"__esModule",{value:!0});$.Message=$.NotificationType9=$.NotificationType8=$.NotificationType7=$.NotificationType6=$.NotificationType5=$.NotificationType4=$.NotificationType3=$.NotificationType2=$.NotificationType1=$.NotificationType0=$.NotificationType=$.RequestType9=$.RequestType8=$.RequestType7=$.RequestType6=$.RequestType5=$.RequestType4=$.RequestType3=$.RequestType2=$.RequestType1=$.RequestType=$.RequestType0=$.AbstractMessageSignature=$.ParameterStructures=$.ResponseError=$.ErrorCodes=void 0;var ai=qi(),Fy;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(Fy=$.ErrorCodes||($.ErrorCodes={}));var Iu=class n extends Error{constructor(e,t,r){super(t),this.code=ai.number(e)?e:Fy.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};$.ResponseError=Iu;var Rt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};$.ParameterStructures=Rt;Rt.auto=new Rt("auto");Rt.byPosition=new Rt("byPosition");Rt.byName=new Rt("byName");var _e=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Rt.auto}};$.AbstractMessageSignature=_e;var Nu=class extends _e{constructor(e){super(e,0)}};$.RequestType0=Nu;var zu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};$.RequestType=zu;var Ou=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};$.RequestType1=Ou;var Au=class extends _e{constructor(e){super(e,2)}};$.RequestType2=Au;var Lu=class extends _e{constructor(e){super(e,3)}};$.RequestType3=Lu;var qu=class extends _e{constructor(e){super(e,4)}};$.RequestType4=qu;var Wu=class extends _e{constructor(e){super(e,5)}};$.RequestType5=Wu;var Hu=class extends _e{constructor(e){super(e,6)}};$.RequestType6=Hu;var Uu=class extends _e{constructor(e){super(e,7)}};$.RequestType7=Uu;var ju=class extends _e{constructor(e){super(e,8)}};$.RequestType8=ju;var $u=class extends _e{constructor(e){super(e,9)}};$.RequestType9=$u;var Bu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};$.NotificationType=Bu;var Vu=class extends _e{constructor(e){super(e,0)}};$.NotificationType0=Vu;var Gu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};$.NotificationType1=Gu;var Ku=class extends _e{constructor(e){super(e,2)}};$.NotificationType2=Ku;var Ju=class extends _e{constructor(e){super(e,3)}};$.NotificationType3=Ju;var Xu=class extends _e{constructor(e){super(e,4)}};$.NotificationType4=Xu;var Qu=class extends _e{constructor(e){super(e,5)}};$.NotificationType5=Qu;var Yu=class extends _e{constructor(e){super(e,6)}};$.NotificationType6=Yu;var Zu=class extends _e{constructor(e){super(e,7)}};$.NotificationType7=Zu;var ep=class extends _e{constructor(e){super(e,8)}};$.NotificationType8=ep;var tp=class extends _e{constructor(e){super(e,9)}};$.NotificationType9=tp;var WT;(function(n){function e(i){let o=i;return o&&ai.string(o.method)&&(ai.string(o.id)||ai.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ai.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ai.string(o.id)||ai.number(o.id)||o.id===null)}n.isResponse=r})(WT=$.Message||($.Message={}))});var ip=w(Xn=>{"use strict";h();var Py;Object.defineProperty(Xn,"__esModule",{value:!0});Xn.LRUCache=Xn.LinkedMap=Xn.Touch=void 0;var gt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(gt=Xn.Touch||(Xn.Touch={}));var Ha=class{constructor(){this[Py]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=gt.None){let r=this._map.get(e);if(r)return t!==gt.None&&this.touch(r,t),r.value}set(e,t,r=gt.None){let i=this._map.get(e);if(i)i.value=t,r!==gt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case gt.None:this.addItemLast(i);break;case gt.First:this.addItemFirst(i);break;case gt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(Py=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==gt.First&&t!==gt.Last)){if(t===gt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===gt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};Xn.LinkedMap=Ha;var rp=class extends Ha{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=gt.AsNew){return super.get(e,t)}peek(e){return super.get(e,gt.None)}set(e,t){return super.set(e,t,gt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Xn.LRUCache=rp});var My=w(ss=>{"use strict";h();Object.defineProperty(ss,"__esModule",{value:!0});ss.Disposable=void 0;var HT;(function(n){function e(t){return{dispose:t}}n.create=e})(HT=ss.Disposable||(ss.Disposable={}))});var _r=w(ap=>{"use strict";h();Object.defineProperty(ap,"__esModule",{value:!0});var op;function sp(){if(op===void 0)throw new Error("No runtime abstraction layer installed");return op}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");op=t}n.install=e})(sp||(sp={}));ap.default=sp});var Wi=w(li=>{"use strict";h();Object.defineProperty(li,"__esModule",{value:!0});li.Emitter=li.Event=void 0;var UT=_r(),jT;(function(n){let e={dispose(){}};n.None=function(){return e}})(jT=li.Event||(li.Event={}));var lp=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,UT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ua=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new lp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};li.Emitter=Ua;Ua._noop=function(){}});var $a=w(ci=>{"use strict";h();Object.defineProperty(ci,"__esModule",{value:!0});ci.CancellationTokenSource=ci.CancellationToken=void 0;var $T=_r(),BT=qi(),cp=Wi(),dp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:cp.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:cp.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||BT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(dp=ci.CancellationToken||(ci.CancellationToken={}));var VT=Object.freeze(function(n,e){let t=(0,$T.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),ja=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?VT:(this._emitter||(this._emitter=new cp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},hp=class{get token(){return this._token||(this._token=new ja),this._token}cancel(){this._token?this._token.cancel():this._token=dp.Cancelled}dispose(){this._token?this._token instanceof ja&&this._token.dispose():this._token=dp.None}};ci.CancellationTokenSource=hp});var Iy=w(Hi=>{"use strict";h();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.SharedArrayReceiverStrategy=Hi.SharedArraySenderStrategy=void 0;var GT=$a(),as;(function(n){n.Continue=0,n.Cancelled=1})(as||(as={}));var up=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=as.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,as.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Hi.SharedArraySenderStrategy=up;var pp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===as.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},mp=class{constructor(e){this.token=new pp(e)}cancel(){}dispose(){}},fp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new GT.CancellationTokenSource:new mp(t)}};Hi.SharedArrayReceiverStrategy=fp});var bp=w(Ba=>{"use strict";h();Object.defineProperty(Ba,"__esModule",{value:!0});Ba.Semaphore=void 0;var KT=_r(),gp=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,KT.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Ba.Semaphore=gp});var Ny=w(Qn=>{"use strict";h();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ReadableStreamMessageReader=Qn.AbstractMessageReader=Qn.MessageReader=void 0;var yp=_r(),Ui=qi(),vp=Wi(),JT=bp(),XT;(function(n){function e(t){let r=t;return r&&Ui.func(r.listen)&&Ui.func(r.dispose)&&Ui.func(r.onError)&&Ui.func(r.onClose)&&Ui.func(r.onPartialMessage)}n.is=e})(XT=Qn.MessageReader||(Qn.MessageReader={}));var Va=class{constructor(){this.errorEmitter=new vp.Emitter,this.closeEmitter=new vp.Emitter,this.partialMessageEmitter=new vp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Ui.string(e.message)?e.message:"unknown"}`)}};Qn.AbstractMessageReader=Va;var wp;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,yp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(wp||(wp={}));var Sp=class extends Va{constructor(e,t){super(),this.readable=e,this.options=wp.fromOptions(t),this.buffer=(0,yp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new JT.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,yp.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Qn.ReadableStreamMessageReader=Sp});var Ly=w(Yn=>{"use strict";h();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.WriteableStreamMessageWriter=Yn.AbstractMessageWriter=Yn.MessageWriter=void 0;var zy=_r(),ls=qi(),QT=bp(),Oy=Wi(),YT="Content-Length: ",Ay=`\r
|
|
1
|
+
import{v as ay}from"./chunk-CNDB4VEM.js";import{A as wy,B as si,C as Sy,D as Pn,E as xy,F as ky,G as Oa,H as Cy,I as Aa,J as _y,K as rs,L as MT,M as Ty,N as La,O as is,P as os,Q as Mn,R as Ey,S as an,T as qa,U as Wa,V as G,W as IT,X as NT,a as Z,aa as Mu,b as Pa,c as ly,d as Fn,e as Ce,f as Ma,g as cy,h as dy,i as hy,j as uy,k as py,l as ns,m as my,n as Ia,o as J,p as Na,q as fy,r as za,s as Kt,t as gy,u as V,v as lt,w as Cr,x as by,y as vy,z as yy}from"./chunk-EWKIFVW3.js";import{b as sy}from"./chunk-BR5CFKIN.js";import{a as Bt,b as ee,c as w,d as oy,e as Vt,f as Gt,g as h}from"./chunk-VKWPEFWQ.js";var qi=w(ct=>{"use strict";h();Object.defineProperty(ct,"__esModule",{value:!0});ct.stringArray=ct.array=ct.func=ct.error=ct.number=ct.string=ct.boolean=void 0;function zT(n){return n===!0||n===!1}ct.boolean=zT;function Ry(n){return typeof n=="string"||n instanceof String}ct.string=Ry;function OT(n){return typeof n=="number"||n instanceof Number}ct.number=OT;function AT(n){return n instanceof Error}ct.error=AT;function LT(n){return typeof n=="function"}ct.func=LT;function Dy(n){return Array.isArray(n)}ct.array=Dy;function qT(n){return Dy(n)&&n.every(e=>Ry(e))}ct.stringArray=qT});var np=w($=>{"use strict";h();Object.defineProperty($,"__esModule",{value:!0});$.Message=$.NotificationType9=$.NotificationType8=$.NotificationType7=$.NotificationType6=$.NotificationType5=$.NotificationType4=$.NotificationType3=$.NotificationType2=$.NotificationType1=$.NotificationType0=$.NotificationType=$.RequestType9=$.RequestType8=$.RequestType7=$.RequestType6=$.RequestType5=$.RequestType4=$.RequestType3=$.RequestType2=$.RequestType1=$.RequestType=$.RequestType0=$.AbstractMessageSignature=$.ParameterStructures=$.ResponseError=$.ErrorCodes=void 0;var ai=qi(),Fy;(function(n){n.ParseError=-32700,n.InvalidRequest=-32600,n.MethodNotFound=-32601,n.InvalidParams=-32602,n.InternalError=-32603,n.jsonrpcReservedErrorRangeStart=-32099,n.serverErrorStart=-32099,n.MessageWriteError=-32099,n.MessageReadError=-32098,n.PendingResponseRejected=-32097,n.ConnectionInactive=-32096,n.ServerNotInitialized=-32002,n.UnknownErrorCode=-32001,n.jsonrpcReservedErrorRangeEnd=-32e3,n.serverErrorEnd=-32e3})(Fy=$.ErrorCodes||($.ErrorCodes={}));var Iu=class n extends Error{constructor(e,t,r){super(t),this.code=ai.number(e)?e:Fy.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,n.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};$.ResponseError=Iu;var Rt=class n{constructor(e){this.kind=e}static is(e){return e===n.auto||e===n.byName||e===n.byPosition}toString(){return this.kind}};$.ParameterStructures=Rt;Rt.auto=new Rt("auto");Rt.byPosition=new Rt("byPosition");Rt.byName=new Rt("byName");var _e=class{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return Rt.auto}};$.AbstractMessageSignature=_e;var Nu=class extends _e{constructor(e){super(e,0)}};$.RequestType0=Nu;var zu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};$.RequestType=zu;var Ou=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};$.RequestType1=Ou;var Au=class extends _e{constructor(e){super(e,2)}};$.RequestType2=Au;var Lu=class extends _e{constructor(e){super(e,3)}};$.RequestType3=Lu;var qu=class extends _e{constructor(e){super(e,4)}};$.RequestType4=qu;var Wu=class extends _e{constructor(e){super(e,5)}};$.RequestType5=Wu;var Hu=class extends _e{constructor(e){super(e,6)}};$.RequestType6=Hu;var Uu=class extends _e{constructor(e){super(e,7)}};$.RequestType7=Uu;var ju=class extends _e{constructor(e){super(e,8)}};$.RequestType8=ju;var $u=class extends _e{constructor(e){super(e,9)}};$.RequestType9=$u;var Bu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};$.NotificationType=Bu;var Vu=class extends _e{constructor(e){super(e,0)}};$.NotificationType0=Vu;var Gu=class extends _e{constructor(e,t=Rt.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};$.NotificationType1=Gu;var Ku=class extends _e{constructor(e){super(e,2)}};$.NotificationType2=Ku;var Ju=class extends _e{constructor(e){super(e,3)}};$.NotificationType3=Ju;var Xu=class extends _e{constructor(e){super(e,4)}};$.NotificationType4=Xu;var Qu=class extends _e{constructor(e){super(e,5)}};$.NotificationType5=Qu;var Yu=class extends _e{constructor(e){super(e,6)}};$.NotificationType6=Yu;var Zu=class extends _e{constructor(e){super(e,7)}};$.NotificationType7=Zu;var ep=class extends _e{constructor(e){super(e,8)}};$.NotificationType8=ep;var tp=class extends _e{constructor(e){super(e,9)}};$.NotificationType9=tp;var WT;(function(n){function e(i){let o=i;return o&&ai.string(o.method)&&(ai.string(o.id)||ai.number(o.id))}n.isRequest=e;function t(i){let o=i;return o&&ai.string(o.method)&&i.id===void 0}n.isNotification=t;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(ai.string(o.id)||ai.number(o.id)||o.id===null)}n.isResponse=r})(WT=$.Message||($.Message={}))});var ip=w(Xn=>{"use strict";h();var Py;Object.defineProperty(Xn,"__esModule",{value:!0});Xn.LRUCache=Xn.LinkedMap=Xn.Touch=void 0;var gt;(function(n){n.None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last})(gt=Xn.Touch||(Xn.Touch={}));var Ha=class{constructor(){this[Py]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=gt.None){let r=this._map.get(e);if(r)return t!==gt.None&&this.touch(r,t),r.value}set(e,t,r=gt.None){let i=this._map.get(e);if(i)i.value=t,r!==gt.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case gt.None:this.addItemLast(i);break;case gt.First:this.addItemFirst(i);break;case gt.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let r=this._state,i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.key,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}values(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:t.value,done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}entries(){let e=this._state,t=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){let i={value:[t.key,t.value],done:!1};return t=t.next,i}else return{value:void 0,done:!0}}};return r}[(Py=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(t!==gt.First&&t!==gt.Last)){if(t===gt.First){if(e===this._head)return;let r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===gt.Last){if(e===this._tail)return;let r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(let[t,r]of e)this.set(t,r)}};Xn.LinkedMap=Ha;var rp=class extends Ha{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=gt.AsNew){return super.get(e,t)}peek(e){return super.get(e,gt.None)}set(e,t){return super.set(e,t,gt.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Xn.LRUCache=rp});var My=w(ss=>{"use strict";h();Object.defineProperty(ss,"__esModule",{value:!0});ss.Disposable=void 0;var HT;(function(n){function e(t){return{dispose:t}}n.create=e})(HT=ss.Disposable||(ss.Disposable={}))});var _r=w(ap=>{"use strict";h();Object.defineProperty(ap,"__esModule",{value:!0});var op;function sp(){if(op===void 0)throw new Error("No runtime abstraction layer installed");return op}(function(n){function e(t){if(t===void 0)throw new Error("No runtime abstraction layer provided");op=t}n.install=e})(sp||(sp={}));ap.default=sp});var Wi=w(li=>{"use strict";h();Object.defineProperty(li,"__esModule",{value:!0});li.Emitter=li.Event=void 0;var UT=_r(),jT;(function(n){let e={dispose(){}};n.None=function(){return e}})(jT=li.Event||(li.Event={}));var lp=class{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e)if(this._contexts[i]===t){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];let t=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{t.push(r[o].apply(i[o],e))}catch(a){(0,UT.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Ua=class n{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new lp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=n._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};li.Emitter=Ua;Ua._noop=function(){}});var $a=w(ci=>{"use strict";h();Object.defineProperty(ci,"__esModule",{value:!0});ci.CancellationTokenSource=ci.CancellationToken=void 0;var $T=_r(),BT=qi(),cp=Wi(),dp;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:cp.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:cp.Event.None});function e(t){let r=t;return r&&(r===n.None||r===n.Cancelled||BT.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(dp=ci.CancellationToken||(ci.CancellationToken={}));var VT=Object.freeze(function(n,e){let t=(0,$T.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}}),ja=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?VT:(this._emitter||(this._emitter=new cp.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},hp=class{get token(){return this._token||(this._token=new ja),this._token}cancel(){this._token?this._token.cancel():this._token=dp.Cancelled}dispose(){this._token?this._token instanceof ja&&this._token.dispose():this._token=dp.None}};ci.CancellationTokenSource=hp});var Iy=w(Hi=>{"use strict";h();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.SharedArrayReceiverStrategy=Hi.SharedArraySenderStrategy=void 0;var GT=$a(),as;(function(n){n.Continue=0,n.Cancelled=1})(as||(as={}));var up=class{constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=as.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,as.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};Hi.SharedArraySenderStrategy=up;var pp=class{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===as.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},mp=class{constructor(e){this.token=new pp(e)}cancel(){}dispose(){}},fp=class{constructor(){this.kind="request"}createCancellationTokenSource(e){let t=e.$cancellationData;return t===void 0?new GT.CancellationTokenSource:new mp(t)}};Hi.SharedArrayReceiverStrategy=fp});var bp=w(Ba=>{"use strict";h();Object.defineProperty(Ba,"__esModule",{value:!0});Ba.Semaphore=void 0;var KT=_r(),gp=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,KT.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let t=e.thunk();t instanceof Promise?t.then(r=>{this._active--,e.resolve(r),this.runNext()},r=>{this._active--,e.reject(r),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};Ba.Semaphore=gp});var Ny=w(Qn=>{"use strict";h();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.ReadableStreamMessageReader=Qn.AbstractMessageReader=Qn.MessageReader=void 0;var yp=_r(),Ui=qi(),vp=Wi(),JT=bp(),XT;(function(n){function e(t){let r=t;return r&&Ui.func(r.listen)&&Ui.func(r.dispose)&&Ui.func(r.onError)&&Ui.func(r.onClose)&&Ui.func(r.onPartialMessage)}n.is=e})(XT=Qn.MessageReader||(Qn.MessageReader={}));var Va=class{constructor(){this.errorEmitter=new vp.Emitter,this.closeEmitter=new vp.Emitter,this.partialMessageEmitter=new vp.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${Ui.string(e.message)?e.message:"unknown"}`)}};Qn.AbstractMessageReader=Va;var wp;(function(n){function e(t){let r,i,o,s=new Map,a,l=new Map;if(t===void 0||typeof t=="string")r=t??"utf-8";else{if(r=t.charset??"utf-8",t.contentDecoder!==void 0&&(o=t.contentDecoder,s.set(o.name,o)),t.contentDecoders!==void 0)for(let c of t.contentDecoders)s.set(c.name,c);if(t.contentTypeDecoder!==void 0&&(a=t.contentTypeDecoder,l.set(a.name,a)),t.contentTypeDecoders!==void 0)for(let c of t.contentTypeDecoders)l.set(c.name,c)}return a===void 0&&(a=(0,yp.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}n.fromOptions=e})(wp||(wp={}));var Sp=class extends Va{constructor(e,t){super(),this.readable=e,this.options=wp.fromOptions(t),this.buffer=(0,yp.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new JT.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let t=this.buffer.tryReadBody(this.nextMessageLength);if(t===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(t):t,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,yp.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Qn.ReadableStreamMessageReader=Sp});var Ly=w(Yn=>{"use strict";h();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.WriteableStreamMessageWriter=Yn.AbstractMessageWriter=Yn.MessageWriter=void 0;var zy=_r(),ls=qi(),QT=bp(),Oy=Wi(),YT="Content-Length: ",Ay=`\r
|
|
2
2
|
`,ZT;(function(n){function e(t){let r=t;return r&&ls.func(r.dispose)&&ls.func(r.onClose)&&ls.func(r.onError)&&ls.func(r.write)}n.is=e})(ZT=Yn.MessageWriter||(Yn.MessageWriter={}));var Ga=class{constructor(){this.errorEmitter=new Oy.Emitter,this.closeEmitter=new Oy.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${ls.string(e.message)?e.message:"unknown"}`)}};Yn.AbstractMessageWriter=Ga;var xp;(function(n){function e(t){return t===void 0||typeof t=="string"?{charset:t??"utf-8",contentTypeEncoder:(0,zy.default)().applicationJson.encoder}:{charset:t.charset??"utf-8",contentEncoder:t.contentEncoder,contentTypeEncoder:t.contentTypeEncoder??(0,zy.default)().applicationJson.encoder}}n.fromOptions=e})(xp||(xp={}));var kp=class extends Ga{constructor(e,t){super(),this.writable=e,this.options=xp.fromOptions(t),this.errorCount=0,this.writeSemaphore=new QT.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(YT,r.byteLength.toString(),Ay),i.push(Ay),this.doWrite(e,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,e),Promise.reject(i)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};Yn.WriteableStreamMessageWriter=kp});var qy=w(Ka=>{"use strict";h();Object.defineProperty(Ka,"__esModule",{value:!0});Ka.AbstractMessageBuffer=void 0;var e0=13,t0=10,n0=`\r
|
|
3
3
|
`,Cp=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e=="string"?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let t=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let c=this._chunks[r];for(i=0;i<c.length;){switch(c[i]){case e0:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case t0:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}o+=c.byteLength,r++}if(t!==4)return;let s=this._read(o+i),a=new Map,l=this.toString(s,"ascii").split(n0);if(l.length<2)return a;for(let c=0;c<l.length-2;c++){let d=l[c],p=d.indexOf(":");if(p===-1)throw new Error("Message header must separate key and value using :");let m=d.substr(0,p),g=d.substr(p+1).trim();a.set(e?m.toLowerCase():m,g)}return a}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(o)}if(this._chunks[0].byteLength>e){let o=this._chunks[0],s=this.asNative(o,e);return this._chunks[0]=o.slice(e),this._totalLength-=e,s}let t=this.allocNative(e),r=0,i=0;for(;e>0;){let o=this._chunks[i];if(o.byteLength>e){let s=o.slice(0,e);t.set(s,r),r+=e,this._chunks[i]=o.slice(e),this._totalLength-=e,e-=e}else t.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,e-=o.byteLength}return t}};Ka.AbstractMessageBuffer=Cp});var Vy=w(j=>{"use strict";h();Object.defineProperty(j,"__esModule",{value:!0});j.createMessageConnection=j.ConnectionOptions=j.MessageStrategy=j.CancellationStrategy=j.CancellationSenderStrategy=j.CancellationReceiverStrategy=j.RequestCancellationReceiverStrategy=j.IdCancellationReceiverStrategy=j.ConnectionStrategy=j.ConnectionError=j.ConnectionErrors=j.LogTraceNotification=j.SetTraceNotification=j.TraceFormat=j.TraceValues=j.Trace=j.NullLogger=j.ProgressType=j.ProgressToken=void 0;var Wy=_r(),Me=qi(),X=np(),Hy=ip(),cs=Wi(),_p=$a(),hs;(function(n){n.type=new X.NotificationType("$/cancelRequest")})(hs||(hs={}));var Uy;(function(n){function e(t){return typeof t=="string"||typeof t=="number"}n.is=e})(Uy=j.ProgressToken||(j.ProgressToken={}));var ds;(function(n){n.type=new X.NotificationType("$/progress")})(ds||(ds={}));var Tp=class{constructor(){}};j.ProgressType=Tp;var Ep;(function(n){function e(t){return Me.func(t)}n.is=e})(Ep||(Ep={}));j.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var fe;(function(n){n[n.Off=0]="Off",n[n.Messages=1]="Messages",n[n.Compact=2]="Compact",n[n.Verbose=3]="Verbose"})(fe=j.Trace||(j.Trace={}));var r0;(function(n){n.Off="off",n.Messages="messages",n.Compact="compact",n.Verbose="verbose"})(r0=j.TraceValues||(j.TraceValues={}));(function(n){function e(r){if(!Me.string(r))return n.Off;switch(r=r.toLowerCase(),r){case"off":return n.Off;case"messages":return n.Messages;case"compact":return n.Compact;case"verbose":return n.Verbose;default:return n.Off}}n.fromString=e;function t(r){switch(r){case n.Off:return"off";case n.Messages:return"messages";case n.Compact:return"compact";case n.Verbose:return"verbose";default:return"off"}}n.toString=t})(fe=j.Trace||(j.Trace={}));var ln;(function(n){n.Text="text",n.JSON="json"})(ln=j.TraceFormat||(j.TraceFormat={}));(function(n){function e(t){return Me.string(t)?(t=t.toLowerCase(),t==="json"?n.JSON:n.Text):n.Text}n.fromString=e})(ln=j.TraceFormat||(j.TraceFormat={}));var jy;(function(n){n.type=new X.NotificationType("$/setTrace")})(jy=j.SetTraceNotification||(j.SetTraceNotification={}));var Rp;(function(n){n.type=new X.NotificationType("$/logTrace")})(Rp=j.LogTraceNotification||(j.LogTraceNotification={}));var Ja;(function(n){n[n.Closed=1]="Closed",n[n.Disposed=2]="Disposed",n[n.AlreadyListening=3]="AlreadyListening"})(Ja=j.ConnectionErrors||(j.ConnectionErrors={}));var ji=class n extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,n.prototype)}};j.ConnectionError=ji;var $y;(function(n){function e(t){let r=t;return r&&Me.func(r.cancelUndispatched)}n.is=e})($y=j.ConnectionStrategy||(j.ConnectionStrategy={}));var Pp;(function(n){function e(t){let r=t;return r&&(r.kind===void 0||r.kind==="id")&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(Pp=j.IdCancellationReceiverStrategy||(j.IdCancellationReceiverStrategy={}));var By;(function(n){function e(t){let r=t;return r&&r.kind==="request"&&Me.func(r.createCancellationTokenSource)&&(r.dispose===void 0||Me.func(r.dispose))}n.is=e})(By=j.RequestCancellationReceiverStrategy||(j.RequestCancellationReceiverStrategy={}));var Dp;(function(n){n.Message=Object.freeze({createCancellationTokenSource(t){return new _p.CancellationTokenSource}});function e(t){return Pp.is(t)||By.is(t)}n.is=e})(Dp=j.CancellationReceiverStrategy||(j.CancellationReceiverStrategy={}));var Fp;(function(n){n.Message=Object.freeze({sendCancellation(t,r){return t.sendNotification(hs.type,{id:r})},cleanup(t){}});function e(t){let r=t;return r&&Me.func(r.sendCancellation)&&Me.func(r.cleanup)}n.is=e})(Fp=j.CancellationSenderStrategy||(j.CancellationSenderStrategy={}));var Mp;(function(n){n.Message=Object.freeze({receiver:Dp.Message,sender:Fp.Message});function e(t){let r=t;return r&&Dp.is(r.receiver)&&Fp.is(r.sender)}n.is=e})(Mp=j.CancellationStrategy||(j.CancellationStrategy={}));var Ip;(function(n){function e(t){let r=t;return r&&Me.func(r.handleMessage)}n.is=e})(Ip=j.MessageStrategy||(j.MessageStrategy={}));var i0;(function(n){function e(t){let r=t;return r&&(Mp.is(r.cancellationStrategy)||$y.is(r.connectionStrategy)||Ip.is(r.messageStrategy))}n.is=e})(i0=j.ConnectionOptions||(j.ConnectionOptions={}));var cn;(function(n){n[n.New=1]="New",n[n.Listening=2]="Listening",n[n.Closed=3]="Closed",n[n.Disposed=4]="Disposed"})(cn||(cn={}));function o0(n,e,t,r){let i=t!==void 0?t:j.NullLogger,o=0,s=0,a=0,l="2.0",c,d=new Map,p,m=new Map,g=new Map,S,F=new Hy.LinkedMap,P=new Map,N=new Set,x=new Map,y=fe.Off,E=ln.Text,O,W=cn.New,xe=new cs.Emitter,Fe=new cs.Emitter,Ut=new cs.Emitter,Mt=new cs.Emitter,_t=new cs.Emitter,Tt=r&&r.cancellationStrategy?r.cancellationStrategy:Mp.Message;function Sr(v){if(v===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+v.toString()}function ii(v){return v===null?"res-unknown-"+(++a).toString():"res-"+v.toString()}function jt(){return"not-"+(++s).toString()}function It(v,R){X.Message.isRequest(R)?v.set(Sr(R.id),R):X.Message.isResponse(R)?v.set(ii(R.id),R):v.set(jt(),R)}function xr(v){}function $t(){return W===cn.Listening}function Rn(){return W===cn.Closed}function mt(){return W===cn.Disposed}function kr(){(W===cn.New||W===cn.Listening)&&(W=cn.Closed,Fe.fire(void 0))}function Zo(v){xe.fire([v,void 0,void 0])}function Ni(v){xe.fire(v)}n.onClose(kr),n.onError(Zo),e.onClose(kr),e.onError(Ni);function zi(){S||F.size===0||(S=(0,Wy.default)().timer.setImmediate(()=>{S=void 0,Eu()}))}function Oi(v){X.Message.isRequest(v)?Ru(v):X.Message.isNotification(v)?Fu(v):X.Message.isResponse(v)?Du(v):Fa(v)}function Eu(){if(F.size===0)return;let v=F.shift();try{let R=r?.messageStrategy;Ip.is(R)?R.handleMessage(v,Oi):Oi(v)}finally{zi()}}let oi=v=>{try{if(X.Message.isNotification(v)&&v.method===hs.type.method){let R=v.params.id,z=Sr(R),U=F.get(z);if(X.Message.isRequest(U)){let be=r?.connectionStrategy,ze=be&&be.cancelUndispatched?be.cancelUndispatched(U,xr):void 0;if(ze&&(ze.error!==void 0||ze.result!==void 0)){F.delete(z),x.delete(R),ze.id=U.id,K(ze,v.method,Date.now()),e.write(ze).catch(()=>i.error("Sending response for canceled message failed."));return}}let ke=x.get(R);if(ke!==void 0){ke.cancel(),Et(v);return}else N.add(R)}It(F,v)}finally{zi()}};function Ru(v){if(mt())return;function R(ce,Pe,me){let Ve={jsonrpc:l,id:v.id};ce instanceof X.ResponseError?Ve.error=ce.toJson():Ve.result=ce===void 0?null:ce,K(Ve,Pe,me),e.write(Ve).catch(()=>i.error("Sending response failed."))}function z(ce,Pe,me){let Ve={jsonrpc:l,id:v.id,error:ce.toJson()};K(Ve,Pe,me),e.write(Ve).catch(()=>i.error("Sending response failed."))}function U(ce,Pe,me){ce===void 0&&(ce=null);let Ve={jsonrpc:l,id:v.id,result:ce};K(Ve,Pe,me),e.write(Ve).catch(()=>i.error("Sending response failed."))}Re(v);let ke=d.get(v.method),be,ze;ke&&(be=ke.type,ze=ke.handler);let Ae=Date.now();if(ze||c){let ce=v.id??String(Date.now()),Pe=Pp.is(Tt.receiver)?Tt.receiver.createCancellationTokenSource(ce):Tt.receiver.createCancellationTokenSource(v);v.id!==null&&N.has(v.id)&&Pe.cancel(),v.id!==null&&x.set(ce,Pe);try{let me;if(ze)if(v.params===void 0){if(be!==void 0&&be.numberOfParams!==0){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines ${be.numberOfParams} params but received none.`),v.method,Ae);return}me=ze(Pe.token)}else if(Array.isArray(v.params)){if(be!==void 0&&be.parameterStructures===X.ParameterStructures.byName){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by name but received parameters by position`),v.method,Ae);return}me=ze(...v.params,Pe.token)}else{if(be!==void 0&&be.parameterStructures===X.ParameterStructures.byPosition){z(new X.ResponseError(X.ErrorCodes.InvalidParams,`Request ${v.method} defines parameters by position but received parameters by name`),v.method,Ae);return}me=ze(v.params,Pe.token)}else c&&(me=c(v.method,v.params,Pe.token));let Ve=me;me?Ve.then?Ve.then(ft=>{x.delete(ce),R(ft,v.method,Ae)},ft=>{x.delete(ce),ft instanceof X.ResponseError?z(ft,v.method,Ae):ft&&Me.string(ft.message)?z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${ft.message}`),v.method,Ae):z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Ae)}):(x.delete(ce),R(me,v.method,Ae)):(x.delete(ce),U(me,v.method,Ae))}catch(me){x.delete(ce),me instanceof X.ResponseError?R(me,v.method,Ae):me&&Me.string(me.message)?z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed with message: ${me.message}`),v.method,Ae):z(new X.ResponseError(X.ErrorCodes.InternalError,`Request ${v.method} failed unexpectedly without providing any details.`),v.method,Ae)}}else z(new X.ResponseError(X.ErrorCodes.MethodNotFound,`Unhandled method ${v.method}`),v.method,Ae)}function Du(v){if(!mt())if(v.id===null)v.error?i.error(`Received response message without id: Error is:
|
|
4
4
|
${JSON.stringify(v.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let R=v.id,z=P.get(R);if(RT(v,z),z!==void 0){P.delete(R);try{if(v.error){let U=v.error;z.reject(new X.ResponseError(U.code,U.message,U.data))}else if(v.result!==void 0)z.resolve(v.result);else throw new Error("Should never happen.")}catch(U){U.message?i.error(`Response handler '${z.method}' failed with message: ${U.message}`):i.error(`Response handler '${z.method}' failed unexpectedly.`)}}}}function Fu(v){if(mt())return;let R,z;if(v.method===hs.type.method){let U=v.params.id;N.delete(U),Et(v);return}else{let U=m.get(v.method);U&&(z=U.handler,R=U.type)}if(z||p)try{if(Et(v),z)if(v.params===void 0)R!==void 0&&R.numberOfParams!==0&&R.parameterStructures!==X.ParameterStructures.byName&&i.error(`Notification ${v.method} defines ${R.numberOfParams} params but received none.`),z();else if(Array.isArray(v.params)){let U=v.params;v.method===ds.type.method&&U.length===2&&Uy.is(U[0])?z({token:U[0],value:U[1]}):(R!==void 0&&(R.parameterStructures===X.ParameterStructures.byName&&i.error(`Notification ${v.method} defines parameters by name but received parameters by position`),R.numberOfParams!==v.params.length&&i.error(`Notification ${v.method} defines ${R.numberOfParams} params but received ${U.length} arguments`)),z(...U))}else R!==void 0&&R.parameterStructures===X.ParameterStructures.byPosition&&i.error(`Notification ${v.method} defines parameters by position but received parameters by name`),z(v.params);else p&&p(v.method,v.params)}catch(U){U.message?i.error(`Notification handler '${v.method}' failed with message: ${U.message}`):i.error(`Notification handler '${v.method}' failed unexpectedly.`)}else Ut.fire(v)}function Fa(v){if(!v){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Mt}from"./chunk-UOHNRH6E.js";import{a as Er}from"./chunk-V6UCVTJT.js";import{a as Rr}from"./chunk-TVQVZHNP.js";import{a as br}from"./chunk-FM6VJLE7.js";import{a as Sr}from"./chunk-7DLMETRR.js";import{b as Tr}from"./chunk-3FTP36HH.js";import{a as Ar}from"./chunk-4QAM7ROJ.js";import{a as _r}from"./chunk-AICVQH4V.js";import{a as Cr}from"./chunk-5G2W7QKA.js";import{a as dr}from"./chunk-LC2BDU4B.js";import{a as mr}from"./chunk-YY2JHCIG.js";import{a as fr}from"./chunk-7CPYFKFK.js";import{a as hr}from"./chunk-TQNGFSCI.js";import{a as gr}from"./chunk-X3KYRBGE.js";import{a as wr,b as yr,c as Pr,d as vr}from"./chunk-S5FGFQHD.js";import{a as Ur}from"./chunk-UBJYXNCN.js";import{g as ur}from"./chunk-FH36PGZH.js";import{a as xr}from"./chunk-HFRWZQOF.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-PSH4QKUX.js";import{a as ar}from"./chunk-ODFOSJU3.js";import{a as lr}from"./chunk-ILHEVBNU.js";import{a as Xe}from"./chunk-SIVRBIKH.js";import{c as Je,m as Ze}from"./chunk-GCTCRKET.js";import{a as pr}from"./chunk-5AMPXLKT.js";import{a as cr}from"./chunk-YMS6RVE5.js";import{b as ir,g as _e,j as Qe}from"./chunk-ZYEGQSF5.js";import{c as kr}from"./chunk-F5BTQI5W.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-33PLVLCE.js";import{a as $,b as Ve}from"./chunk-PGBXHL2G.js";import{a as Xt,b as Zt,d as Te,f as er,m as Ae,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-4QXDDAMD.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-3NYK63U4.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as Po,k as vo,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as To,x as Ao,z as nt}from"./chunk-XSUX2XAW.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-E7I5YT53.js";import{a as Lr}from"./chunk-HEIZ3RSD.js";import{a as Xr}from"./chunk-LJO22Z6S.js";import{a as Jr}from"./chunk-3NVQXPTU.js";import{a as Ir}from"./chunk-36OXWMXZ.js";import{$ as Vr,B as Br,D as Kr,F as Z,P as jr,Q as Yr,i as $r,j as W,k as Mr,m as Fr,p as et,q as Or,qa as ke,r as Nr,ra as Ie,s as qr,t as Wr,u as Hr,v as Gr,wa as Qr}from"./chunk-YAA7OGRM.js";import{y as zr}from"./chunk-MNTJZ6JO.js";import{c as Vt}from"./chunk-AXLLN6DZ.js";import{a as Ce,f as ie,m as Dr}from"./chunk-WT2KJHUO.js";import{a as K}from"./chunk-RHJLAYNK.js";import{b as Qt,e as Re}from"./chunk-WJEVB67Y.js";import{D as ye,S as kt,b as Ke,ca as J,d as bt,ea as It,f as St,h as Ut,l as Rt,p as Tt,r as At,u as _t,wa as Lt,x as Ct,y as we}from"./chunk-AINDVTMY.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as Ye,V as Kt,X as jt,a as Et,d as Pe,e as k,f as L,h as ve,i as xe,j as Dt,k as Ft,l as Ot,m as Nt,n as qt,o as D,p as Wt,q as je,r as ze,s as Ht,t as Gt,y as Ee}from"./chunk-LIH7CQO7.js";import{a as Cn}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-VRO6QBVN.js";import{h as T,k as X}from"./chunk-PSUNX2YX.js";import{a as _n}from"./chunk-CTNBSUVU.js";import{a as _o}from"./chunk-LQGF3RKX.js";import{$a as vt,Ab as g,Bb as C,Ea as Pt,Na as he,P as Be,Ta as F,Wa as ge,cb as xt,ma as I,qb as v,sb as b,ua as me,wa as fe,xb as B}from"./chunk-GYFRTLML.js";import{d as zt,f as Yt}from"./chunk-VFQW2QL2.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-773TIA5M.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,In='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 Ln(t,e,r););}async function Ln(t,e,r){let o=await _e(t,e);if(!o||$n(o,r))throw new T(In);return await ae(3),o.processing}function $n(t,e){return t.processing&&Date.now()-e>=kn}var Mn="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=wr(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){yr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Mn};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 Fn={"theme:init":hr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":gr,"theme:list":vr,"theme:metafields:pull":Ur,"theme:open":xr,"theme:package":Er,"theme:profile":br,"theme:publish":Sr,"theme:preview":Rr,"theme:pull":Tr,"theme:push":Ar,"theme:rename":_r,"theme:share":Cr},ka=Fn;async function ko(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([kt(t.storeFqdn),qn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),w=h?await Xe(t.storePassword,l,u):void 0,m=await Nn(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:On,options:{theme:m,adminSession:c,storefrontPassword:w,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var On=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 Nn(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 T("Could not find or create a host theme for theme app extensions");return r}async function qn(t){return t.developerPlatformClient?.clientName===zr.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 Wn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function Io(t,e){let r=await Wn(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),Hn(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 Hn(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw 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 D({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Io(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Gn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=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 Gn(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 Bn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l={...i,surface:Ie(c),root:{url:`${e}/${c}`},resource:d||{url:""}},u=a?.[c];if(!u)return l;let w=await Qn(u,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...l,...w}}))}return s}async function Bn(t){try{let e=S(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function Kn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let w=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[w.name]:w}}}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 jn({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 Vn(t,s,r,o),{assets:{[a.name]:a}}}async function Vn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await F(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Qn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Jn(o,n)?zn(e,n):Xn(o,n)?Yn(e,o,n):Zn(o,n)?jn(e,o,n):Kn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}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 Jn(t,e){return t==="intents"&&Array.isArray(e)}function Xn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function Zn(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as es}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function Lo(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 De=class extends es{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 $o(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,ts(t,e)))}}function ts(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: ${v.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",as(t,e))}}function rs(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?v.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var os={debug:t=>v.gray(t),warn:t=>v.yellow(t),error:t=>v.errorText(t)};function ns({type:t,message:e}){let r=rs(e);switch(t){case"debug":case"warn":case"error":return b`${os[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function ss(t,e){D({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ns(t))})}function as(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 Er}from"./chunk-3CFHLIBD.js";import{a as Rr}from"./chunk-NS7QRCJF.js";import{a as br}from"./chunk-TEHDOYO2.js";import{a as Sr}from"./chunk-FKW62ZUV.js";import{b as Tr}from"./chunk-QGYETVYA.js";import{a as Ar}from"./chunk-WXDINLQ6.js";import{a as _r}from"./chunk-OZJBUWZK.js";import{a as Cr}from"./chunk-F3FHSS7N.js";import{a as dr}from"./chunk-RIWEYVNK.js";import{a as mr}from"./chunk-ZBMPFLOH.js";import{a as fr}from"./chunk-5YSO5HRH.js";import{a as hr}from"./chunk-7YDT5AOW.js";import{a as gr}from"./chunk-4ZMWIIJV.js";import{a as wr,b as yr,c as Pr,d as vr}from"./chunk-SLZ6UMVV.js";import{a as Ur}from"./chunk-T7BQYKKT.js";import{g as ur}from"./chunk-KSSPT7G5.js";import{a as xr}from"./chunk-GKRGXRD4.js";import{a as lo,b as po,c as uo,d as mo}from"./chunk-CM4QZI6V.js";import{a as ar}from"./chunk-QIGFVVLB.js";import{a as lr}from"./chunk-HG63NM4M.js";import{a as Xe}from"./chunk-B3GLHLAQ.js";import{c as Je,m as Ze}from"./chunk-CSNXCRPY.js";import{a as pr}from"./chunk-DGZCOTKZ.js";import{a as cr}from"./chunk-OI3MNE72.js";import{b as ir,g as _e,j as Qe}from"./chunk-BR3GYG2H.js";import{c as kr}from"./chunk-OSMT4BVT.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-JGSHB34D.js";import{a as $,b as Ve}from"./chunk-GK23CIPB.js";import{a as Xt,b as Zt,d as Te,f as er,m as Ae,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-PERAXNOY.js";import{a as Zr,b as tt,c as ee,d as eo}from"./chunk-F4S4ITHP.js";import{a as ho,f as go,g as wo,h as ot,i as yo,j as Po,k as vo,l as xo,m as Eo,n as bo,o as So,p as Uo,q as Ro,v as To,x as Ao,z as nt}from"./chunk-6QDI53VP.js";import{a as to,b as ro,c as oo,d as no,e as so}from"./chunk-O2YFSYDR.js";import{a as Lr}from"./chunk-HPGQGIPA.js";import{a as Xr}from"./chunk-6NO44HAQ.js";import{a as Jr}from"./chunk-NNCLTG6A.js";import{a as Ir}from"./chunk-RVEAQUUF.js";import{$ as Vr,B as Br,D as Kr,F as Z,P as jr,Q as Yr,i as $r,j as W,k as Mr,m as Fr,p as et,q as Or,qa as ke,r as Nr,ra as Ie,s as qr,t as Wr,u as Hr,v as Gr,wa as Qr}from"./chunk-NKSLEPE2.js";import{y as zr}from"./chunk-5QCSJYJ4.js";import{c as Vt}from"./chunk-J6BXYZRY.js";import{a as Ce,f as ie,m as Dr}from"./chunk-6ZGCTTAD.js";import{a as K}from"./chunk-GO4KOSHA.js";import{b as Qt,e as Re}from"./chunk-BR5CFKIN.js";import{D as ye,S as kt,b as Ke,ca as J,d as bt,ea as It,f as St,h as Ut,l as Rt,p as Tt,r as At,u as _t,wa as Lt,x as Ct,y as we}from"./chunk-IAURXPUJ.js";import{A as se,H as be,L as Bt,N as Se,S as Ue,T as ae,U as Ye,V as Kt,X as jt,a as Et,d as Pe,e as k,f as L,h as ve,i as xe,j as Dt,k as Ft,l as Ot,m as Nt,n as qt,o as D,p as Wt,q as je,r as ze,s as Ht,t as Gt,y as Ee}from"./chunk-T3IMDY72.js";import{a as Cn}from"./chunk-7UNQOKZW.js";import{d as $t}from"./chunk-HLLMMIIM.js";import{h as T,k as X}from"./chunk-4EHFK2OI.js";import{a as _n}from"./chunk-CTNBSUVU.js";import{a as _o}from"./chunk-6ECS5KDX.js";import{$a as vt,Ab as g,Bb as C,Ea as Pt,Na as he,P as Be,Ta as F,Wa as ge,cb as xt,ma as I,qb as v,sb as b,ua as me,wa as fe,xb as B}from"./chunk-TNYPQ2UL.js";import{d as zt,f as Yt}from"./chunk-QCMGYBFD.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-773TIA5M.js";import{e as Q,g as p}from"./chunk-VKWPEFWQ.js";p();p();p();p();p();p();var kn=300*1e3,In='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 Ln(t,e,r););}async function Ln(t,e,r){let o=await _e(t,e);if(!o||$n(o,r))throw new T(In);return await ae(3),o.processing}function $n(t,e){return t.processing&&Date.now()-e>=kn}var Mn="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=wr(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){yr(this.adminSession.storeFqdn,e)}removeTheme(){Pr(this.adminSession.storeFqdn)}async createHostTheme(){let e={role:ir,name:this.generateThemeName(this.context),src:Mn};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 Fn={"theme:init":hr,"theme:check":ar,"theme:console":lr,"theme:delete":pr,"theme:dev":dr,"theme:duplicate":mr,"theme:info":fr,"theme:language-server":gr,"theme:list":vr,"theme:metafields:pull":Ur,"theme:open":xr,"theme:package":Er,"theme:profile":br,"theme:publish":Sr,"theme:preview":Rr,"theme:pull":Tr,"theme:push":Ar,"theme:rename":_r,"theme:share":Cr},ka=Fn;async function ko(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([kt(t.storeFqdn),qn(e)]),l=c.storeFqdn,[u,h]=await Promise.all([Ze(c),Je(c)]),w=h?await Xe(t.storePassword,l,u):void 0,m=await Nn(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:On,options:{theme:m,adminSession:c,storefrontPassword:w,crawlerSignatureHeaders:u,themeExtensionDirectory:a,themeExtensionPort:i}}}var On=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 Nn(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 T("Could not find or create a host theme for theme app extensions");return r}async function qn(t){return t.developerPlatformClient?.clientName===zr.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 Wn(t){let e=S(t.directory,"locales");return ge([S(e,"*.json")])}async function Io(t,e){let r=await Wn(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),Hn(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 Hn(t,e,r,o,n){let s;try{s=await I(e),r.translations[t]=JSON.parse(s)}catch(a){let i=`Error parsing ${t} locale for ${o.handle} at ${e}: ${a.message}`;throw 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 D({outputPrefix:t.outputPrefix},async()=>{o?.clear();let n=t.getOutputPathForDirectory(e),s=`${r.url}/extensions/${t.devUUID}`,{localization:a,status:i}=await Io(t,r),c=await Mr(t),d=t.outputRelativePath?ue(n):n,l=await Gn(t,s,d,o),u=null;return"metafields"in t.configuration&&Array.isArray(t.configuration.metafields)&&t.configuration.metafields.length>0&&(u=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 Gn(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 Bn(r);return Promise.all(s.map(async i=>{let{target:c,resource:d}=i,l={...i,surface:Ie(c),root:{url:`${e}/${c}`},resource:d||{url:""}},u=a?.[c];if(!u)return l;let w=await Qn(u,{target:c,extensionPoint:i,url:e,extension:t,buildDirectory:r,resolver:o});return{...l,...w}}))}return s}async function Bn(t){try{let e=S(t,"manifest.json"),r=await I(e);return JSON.parse(r)}catch(e){if(e instanceof SyntaxError)throw new Error(`Invalid manifest.json in ${t}: ${e.message}`);return null}}async function Kn({target:t,extensionPoint:e,url:r,extension:o,resolver:n},s,a){let i=`${t}/${s}`,c=e[s];if(typeof c=="string"){let w=await Me(s,i,typeof a=="string"?a:c,r,o,n,typeof a=="string"?c:void 0);return{assets:{[w.name]:w}}}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 jn({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 Vn(t,s,r,o),{assets:{[a.name]:a}}}async function Vn(t,e,r,o){if(!o)return;let n=`${e}.map`;n.endsWith(at)&&await F(S(r.directory,n))&&o.set(`${t}/${gt(n)}`,n)}async function Qn(t,e){return(await Promise.all(Object.keys(t).map(async o=>{let n=t[o];return Jn(o,n)?zn(e,n):Xn(o,n)?Yn(e,o,n):Zn(o,n)?jn(e,o,n):Kn(e,o,n)}))).reduce((o,n)=>({...o,...n,assets:{...o.assets,...n.assets}}),{})}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 Jn(t,e){return t==="intents"&&Array.isArray(e)}function Xn(t,e){return(t==="main"||t==="should_render")&&typeof e=="string"}function Zn(t,e){return t==="assets"&&Array.isArray(e)&&e.every(r=>typeof r=="string")}import{EventEmitter as es}from"events";var le;(function(t){t.Update="PayloadUpdatedEvent:UPDATE"})(le||(le={}));async function Lo(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 De=class extends es{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 $o(t,e){return(r,o,n)=>{r.url==="/extensions"&&(g("Upgrading HTTP request to a websocket connection",e.stdout),t.handleUpgrade(r,o,n,ts(t,e)))}}function ts(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: ${v.json(o)}`,e.stdout),r.send(JSON.stringify(o)),r.on("message",as(t,e))}}function rs(t){try{let e=JSON.parse(t);if(!Array.isArray(e))return t;let r=e.map(o=>typeof o=="object"&&o!==null?v.json(o).output():String(o)).join(" ");return b`${r}`.value}catch(e){if(e instanceof SyntaxError)return t;throw e}}var os={debug:t=>v.gray(t),warn:t=>v.yellow(t),error:t=>v.errorText(t)};function ns({type:t,message:e}){let r=rs(e);switch(t){case"debug":case"warn":case"error":return b`${os[t](t.toUpperCase())}: ${r}`.value;case"log":case"info":return r;default:return`${t.toUpperCase()}: ${r}`}}function ss(t,e){D({outputPrefix:t.extensionName,stripAnsi:!1},()=>{e.stdout.write(ns(t))})}function as(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
|
${v.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=is(o,e);Do(t,a,e)}else n===j.Log&&ss(s,e)}}function Mo(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
|
${v.json(o)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as h,C,D as V,F as Le,I as $e,a as Me,h as J,u as _}from"./chunk-
|
|
1
|
+
import{A as h,C,D as V,F as Le,I as $e,a as Me,h as J,u as _}from"./chunk-6ZGCTTAD.js";import{c as we}from"./chunk-LUSG2EHB.js";import{A as Fe,B,D as w,M as De,N as _e,Q as H,U as F,ea as Ve,g as Ne,ga as W,j as Se,la as y,ma as E,n as ge,pa as I,qa as Ae,r as ye,ra as D,s as he,v as u,z as b}from"./chunk-IAURXPUJ.js";import{b as Te}from"./chunk-ZDF5N422.js";import{w as j}from"./chunk-BJ3JF35I.js";import{D as ze,E as xe,F as Re,I as qe,J as Pe,T as Ee,z as Ie}from"./chunk-T3IMDY72.js";import{a as ke}from"./chunk-RV4UQZ2W.js";import{b as be}from"./chunk-RM3XC2IX.js";import{h as p,k as z}from"./chunk-4EHFK2OI.js";import{Ab as G,N as A,Ta as fe,ma as ve,qb as Ue,sb as x,wb as Oe}from"./chunk-TNYPQ2UL.js";import{i as K}from"./chunk-B4OMIONW.js";import{f as Ce}from"./chunk-QCMGYBFD.js";import{e as P,g as r}from"./chunk-VKWPEFWQ.js";r();r();r();function Be(n){return ge`
|
|
2
2
|
query OrganizationBetaFlags($organizationId: OrganizationID!) {
|
|
3
3
|
organization(organizationId: $organizationId) {
|
|
4
4
|
id
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as g}from"./chunk-
|
|
1
|
+
import{b as g}from"./chunk-BR5CFKIN.js";import{b as y}from"./chunk-PUGAY4JP.js";import{r as u}from"./chunk-IAURXPUJ.js";import{h as r}from"./chunk-4EHFK2OI.js";import{a as R}from"./chunk-CTNBSUVU.js";import{ua as l,wa as m,wb as v,xb as w}from"./chunk-TNYPQ2UL.js";import{f as p,i as h}from"./chunk-773TIA5M.js";import{e as A,g as s}from"./chunk-VKWPEFWQ.js";s();s();var U="text/markdown",L="X-Shopify-Surface",E="cli",F=["shopify.dev"];async function S(t,e){let c;try{c=new URL(t)}catch{throw new r(`Invalid URL: ${t}`)}let{hostname:d}=c;if(!F.some(o=>d===o||d.endsWith(`.${o}`)))throw new r(`Only documents from the following hosts can be fetched: ${F.join(", ")}.`);let i=await u(t,{headers:{Accept:U,[L]:E}});if(!i.ok)throw new r(`Failed to fetch ${t}: ${i.status} ${i.statusText}`);let f=await i.text();if(e){let o=p(e);await m(h(o)),await l(o,f),w(`Saved ${t} to ${o}`);return}v(f)}var n=A(R(),1),a=class t extends y{static description="Download a complete document from shopify.dev. Every page on shopify.dev has a Markdown version, and that is what this tool returns. Use this to pull an entire document verbatim \u2014 for example, a set of instructions an agent follows like a centrally-served skill. For finding the relevant pieces of content across shopify.dev instead, use `doc search`.";static examples=[`# fetch the Markdown version of a Shopify.dev page
|
|
2
2
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli`,`# save the document to a file instead of printing it
|
|
3
3
|
shopify doc fetch --url https://shopify.dev/docs/api/shopify-cli --output docs/shopify-cli.md`];static flags={...g,url:n.Flags.string({description:"The shopify.dev URL to fetch.",env:"SHOPIFY_FLAG_URL",required:!0}),output:n.Flags.string({description:"Write the document to this file path instead of printing it to stdout.",env:"SHOPIFY_FLAG_OUTPUT"})};async run(){let{flags:e}=await this.parse(t);await S(e.url,e.output)}};export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,d as f,e as p}from"./chunk-
|
|
1
|
+
import{c as m,d as f,e as p}from"./chunk-N34YKDEK.js";import{d as c,f as w,j as T}from"./chunk-BR3GYG2H.js";import{g as d}from"./chunk-CNDB4VEM.js";import{F as u}from"./chunk-T3IMDY72.js";import{h as l}from"./chunk-4EHFK2OI.js";import{T as i}from"./chunk-TNYPQ2UL.js";import{g as s}from"./chunk-VKWPEFWQ.js";s();async function A(e,r){let n=await m(e),t=new p(r.filter),a=e.storeFqdn;if(t.any())return f(a,n,t)[0];let y=r.header??"",h=n.map(o=>{let S=o.id.toString()===d()?" [current]":"";return{value:async()=>o,label:`${o.name}${S}`,group:i(o.role)}});return r.create&&h.unshift(g(e)),(await u({message:y,choices:h}))()}async function B(e,r){return(await m(e)).find(t=>t.id.toString()===r)}async function C(e,r){let n=await m(e),t=new p(r),a=e.storeFqdn;return t.any()?f(a,n,t):[]}function g(e){return{value:async()=>{let r=c,n=await w("Name of the new theme"),t=await T({name:n,role:r},e);if(!t)throw new l("The theme could not be created.");return t},label:"[Create a new theme]",group:i(c)}}export{A as a,B as b,C as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as I,b as w}from"./chunk-YY6TFARF.js";import{a as E}from"./chunk-
|
|
1
|
+
import{a as I,b as w}from"./chunk-YY6TFARF.js";import{a as E}from"./chunk-AHJT2Z7G.js";import{a as _}from"./chunk-5VBEPL4S.js";import{f as a,g as l,p as S,v as b}from"./chunk-CNDB4VEM.js";import{b as T,c as g}from"./chunk-BR5CFKIN.js";import{Aa as p,xa as s}from"./chunk-IAURXPUJ.js";import{y as f}from"./chunk-T3IMDY72.js";import{d as m}from"./chunk-O4ZMMPEP.js";import{h as v}from"./chunk-4EHFK2OI.js";import{a as x}from"./chunk-CTNBSUVU.js";import{wb as c}from"./chunk-TNYPQ2UL.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();function A(t,e){return{theme:{id:t.id,name:t.name,role:t.role,shop:e.storeFqdn,preview_url:I(t,e),editor_url:w(t,e)}}}function D(t){let{platform:e,arch:n}=m(),o=a(),r=null;return o&&(r=Number(l())||null),{store:o??"Not configured",development_theme_id:r,cli_version:t.cliVersion,os:`${e}-${n}`,shell:process.env.SHELL??"unknown",node_version:process.version}}async function O(t,e){let n;if(e.development)n=await new E(t).findOrCreate();else{let o={filter:{theme:e.theme}};n=await _(t,o)}return n?A(n,t):void 0}async function y(t){return[M(),await j(t)]}function M(){let t=a()??"Not configured",e=l();return p(`theme-command:info:dev-theme-loaded:${e}`),N("Theme Configuration",[["Store",t],["Development Theme ID",e?`#${e}`:{subdued:"Not set"}]])}async function j(t){let{platform:e,arch:n}=m();return N("Tooling and System",[["Shopify CLI",t.cliVersion],["OS",`${e}-${n}`],["Shell",process.env.SHELL??"unknown"],["Node version",process.version]])}function N(t,e){return{title:t,body:{tabularData:e,firstColumnSubdued:!0}}}async function F(t,e){let n=Object.entries(t.theme).map(([o,r])=>{if(o==="editor_url"||o==="preview_url"){let C=String(r),$=o==="editor_url"?"Open in Theme Editor":"Preview Theme";return[u(o),{link:{url:C,label:$}}]}else return o==="id"?[u(o),`#${r}`]:[u(o),`${r}`]});return{customSections:[...e.environment?[{title:"Theme information",body:[{subdued:`Environment name: ${e.environment}`}]}]:[],{title:"Theme Details",body:{tabularData:n,firstColumnSubdued:!0}}]}}function u(t){return t.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var d=L(x(),1);var h=class extends b{static description="Displays information about your theme environment, including your current store. Can also retrieve information about a specific theme.";static flags={...T,...g,...S,development:d.Flags.boolean({char:"d",description:"Retrieve info from your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),theme:d.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};static multiEnvironmentsFlags=["store","password"];async command(e,n){if(s("theme-command:info"),e.theme||e.development){let o=await O(n,e);if(!o)throw new v("Theme not found!");if(e.json)return c(JSON.stringify(o,null,2));let r=await F(o,e);f(r)}else{if(e.json)return c(JSON.stringify(D({cliVersion:this.config.version}),null,2));let o=await y({cliVersion:this.config.version});f({customSections:o})}s("theme-command:info")}};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
1
|
+
import{b as c}from"./chunk-PUGAY4JP.js";import{V as r}from"./chunk-IAURXPUJ.js";import{yb as a}from"./chunk-TNYPQ2UL.js";import{g as t}from"./chunk-VKWPEFWQ.js";t();var o=class extends c{static description="Logs you out of the Shopify account or Partner account and store.";async run(){await r(),a("Logged out from all the accounts")}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-PXAYMXQN.js";import{g as d}from"./chunk-VKWPEFWQ.js";d();var m=!1;function v(){return m}function y(){let t=0,e=!1,i=setInterval(()=>{if(!e){if(v()||t>=12e4){e=!0,clearInterval(i),u(process.pid,"SIGINT",!1,()=>{process.exit(0)});return}t+=100}},100)}var k=async({config:a,Command:o})=>{await I(o);let t=await import("./metadata-LOCKHSUF.js"),{commandStartOptions:e}=t.getAllSensitiveMetadata();e&&await t.addSensitiveMetadata(()=>({commandStartOptions:{...e,endTime:new Date().getTime()}}));let{postrun:i}=await import("./deprecations-PX5KIFDO.js");i(o);let{outputDebug:n}=await import("./output-OAORC6TH.js"),r=o.id.replace(/:/g," ");n(`Completed command ${r}`),!r.includes("notifications")&&!r.includes("upgrade")&&!r.includes("send-analytics")&&await M();let{reportAnalyticsEvent:c}=await import("./analytics-VCJLTHBI.js");await c({config:a,exitMode:"ok"}),m=!0};async function M(){let{versionToAutoUpgrade:a,warnIfUpgradeAvailable:o}=await import("./upgrade-AIZVY3E5.js"),t=a();if(!t){await o();return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")await l(t);else{let{runAtMinimumInterval:i}=await import("./conf-store-F4NCJPWK.js");await i("auto-upgrade",{days:1},async()=>{await l(t)})}}async function l(a){let[{CLI_KIT_VERSION:o},{isMajorVersionChange:t},{outputWarn:e,outputDebug:i},{getOutputUpdateCLIReminder:n,runCLIUpgrade:r,hasBlockingAutoUpgradeNotification:c},s]=await Promise.all([import("./version-CNIDTUMV.js"),import("./version-JJYR4NOL.js"),import("./output-OAORC6TH.js"),import("./upgrade-AIZVY3E5.js"),import("./metadata-LOCKHSUF.js")]);if(t(o,a)){e(n(a,!0)),await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"major_version"}));return}if(await c()){await s.addPublicMetadata(()=>({env_auto_upgrade_skipped_reason:"blocked_by_notification"}));return}try{await r({autoupgrade:!0}),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!0}))}catch(f){let p=`Auto-upgrade failed: ${f}`;i(p),e(n(a)),await s.addPublicMetadata(()=>({env_auto_upgrade_success:!1}));let[{sendErrorToBugsnag:g},{inferPackageManagerForGlobalCLI:w}]=await Promise.all([import("./error-handler-SY45FR6A.js"),import("./is-global-KBYTYD3Y.js")]),_=Object.assign(new Error(p),{packageManager:w(),platform:process.platform,cliVersion:o});await g(_,"expected_error")}}async function I(a){let o=new Date().getTime();if(a&&"analyticsStopCommand"in a&&typeof a.analyticsStopCommand=="function"){let t=a.analyticsStopCommand();if(t){let e=await import("./metadata-LOCKHSUF.js"),{commandStartOptions:i}=e.getAllSensitiveMetadata();if(!i)return;await e.addSensitiveMetadata(()=>({commandStartOptions:{...i,startTime:o,startCommand:t}}))}}}export{y as a,k as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as A,I as O,J as z,L as P,N as x}from"./chunk-
|
|
1
|
+
import{H as A,I as O,J as z,L as P,N as x}from"./chunk-NKSLEPE2.js";import{B as L,F as D,g as $,y as l}from"./chunk-5QCSJYJ4.js";import{a as F}from"./chunk-GO4KOSHA.js";import{D as R,b as E}from"./chunk-IAURXPUJ.js";import{H as N,M as v,T as y,y as g,z as k}from"./chunk-T3IMDY72.js";import{f as _,h as d}from"./chunk-4EHFK2OI.js";import{g as p}from"./chunk-VKWPEFWQ.js";p();p();p();async function b(e,t){if(t.clientName!==l.AppManagement||!t.devStoreCapReached)return!1;try{return await t.devStoreCapReached(e)}catch{return!1}}async function M(e,t,o,i="disabled"){let c=o.clientName===l.AppManagement,s=async f=>o.devStoresForOrg(t.id,f),n=i!=="disabled"&&o.clientName===l.AppManagement,r=async()=>{if(await b(t.id,o))throw new d(U,W(t.id));let f=await A(),w=await O(),u=await z(),T=await $({name:f,plan:w,withDemoData:u,organization:t,json:!1,summary:!1}),S=await I(t,T,o);return k({headline:`Dev store "${S.shopName}" created successfully.`}),S},a,h;if(n&&e.stores.length===0){if(await b(t.id,o))throw new d(U,W(t.id));if(v()===!1)throw new d("No development store was specified.",H(t.id));a=async()=>(g({body:Y(t)}),r())}else if(n&&i==="selection-option"){if(v()===!1&&(e.stores.length>1||e.hasMorePages))throw new d("No development store was specified.","Run `shopify app dev --store <store-domain>` to select a development store.");v()&&!await b(t.id,o)&&(h=r)}let m=await P({onSearchForStoresByName:s,...e,showDomainOnPrompt:c,...a?{onCreateStoreWhenEmpty:a}:{},...h?{onCreateStore:h}:{}});if(!m){if(a)throw new _;if(g({body:await o.getCreateDevStoreLink(t)}),await y(5),!await x(t))throw new _;let w=await B(t.id,o);m=await M({stores:w,hasMorePages:!1},t,o,i)}return C(m),m}async function I(e,t,o){let s;if(await N([{title:"Fetching organization data",task:async()=>{for(let r=0;r<10;r++){try{let a=await D(e,t,o);if(a){s=a;return}}catch(a){if(!(a instanceof L))throw a}await y(3)}}}]),!s)throw new d(`The newly created development store (${t}) is not available yet.`,`Run \`shopify app dev --store ${t}\` to select it when it is ready.`);return s}async function B(e,t){let c=[];return await N([{title:"Fetching organization data",task:async()=>{for(let n=0;n<10;n++){let{stores:r}=await t.devStoresForOrg(e);if(r.length>0){c=r;return}await y(3)}}}]),c}var U="Your organization has reached its development store limit.";function Y(e){return`You don't have any dev stores associated with ${e.businessName}'s Dev Dashboard. Let's create one.`}function q(e){return`shopify store create dev --organization-id ${e} --name <store-name> --plan <plan>`}function H(e){return`Create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function W(e){return`Make a development store slot available in Dev Dashboard. Then create a development store with \`${q(e)}\`, then run \`shopify app dev --store <store-domain>\`.`}function C(e){if(!e.transferDisabled)throw!e.transferDisabled&&!e.convertableToPartnerTest?new d(`The store you specified (${e.shopDomain}) is not a dev store`,"Run dev --reset and select an eligible dev store."):new d(`The store you specified (${e.shopDomain}) is not transfer-disabled`,"Run dev --reset and select a transfer-disabled dev store.")}async function fe({appContextResult:e,storeFqdn:t,forceReselectStore:o,storeTypes:i=["APP_DEVELOPMENT"],storeCreationMode:c="disabled"}){let{app:s,organization:n,developerPlatformClient:r}=e,a,h=s.configuration.build?.dev_store_url,m=s.hiddenConfig.dev_store_url,f=h??m,u=t??(o?void 0:f),T=i.length===1&&i[0]==="APP_DEVELOPMENT";if(u)a=await D(n,u,r,i),T&&C(a);else{let S=await r.devStoresForOrg(n.id);a=await M(S,n,r,c)}return a.shopDomain=R(a.shopDomain),await V(a,o),(a.shopDomain!==f||!m)&&await s.updateHiddenConfig({dev_store_url:a.shopDomain}),await r.ensureUserAccessToStore(n.id,a),a}async function V(e,t){await F.addPublicMetadata(()=>({cmd_app_reset_used:t,store_fqdn_hash:E(e.shopDomain),store_domain:e.shopDomain})),await F.addSensitiveMetadata(()=>({store_fqdn:e.shopDomain}))}export{fe as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as R}from"./chunk-
|
|
1
|
+
import{o as R}from"./chunk-T3IMDY72.js";import{h as E}from"./chunk-4EHFK2OI.js";import{Ab as i,Bb as m,Y as b,ca as N}from"./chunk-TNYPQ2UL.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();c();var l=class{export;input;inputBytes;output;outputBytes;logs;functionId;fuelConsumed;target;errorMessage;errorType;inputQueryVariablesMetafieldValue;inputQueryVariablesMetafieldNamespace;inputQueryVariablesMetafieldKey;constructor({export:e,input:r,inputBytes:o,output:n,outputBytes:s,logs:a,functionId:h,fuelConsumed:u,target:A,errorMessage:S,errorType:g,inputQueryVariablesMetafieldValue:w,inputQueryVariablesMetafieldNamespace:M,inputQueryVariablesMetafieldKey:I}){this.export=e,this.input=r,this.inputBytes=o,this.output=n,this.outputBytes=s,this.logs=a,this.functionId=h,this.fuelConsumed=u,this.target=A,this.errorMessage=S,this.errorType=g,this.inputQueryVariablesMetafieldValue=w,this.inputQueryVariablesMetafieldNamespace=M,this.inputQueryVariablesMetafieldKey=I}},f=class{cacheEntryEpochMs;cacheTtlMs;httpRequest;httpResponse;constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:o,httpResponse:n}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=o,this.httpResponse=n}},_;(function(t){t[t.NoCachedResponse=0]="NoCachedResponse",t[t.CacheAboutToExpire=1]="CacheAboutToExpire",t[t.Unknown=2]="Unknown"})(_||(_={}));var d=class{reason;httpRequest;constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},y=class{attempt;connectTimeMs;writeReadTimeMs;httpRequest;httpResponse;error;constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:o,httpRequest:n,httpResponse:s,error:a}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=o,this.httpRequest=n,this.httpResponse=s,this.error=a}};c();function O(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function C(t,e){return e?.deep&&O(t)||e?.deep&&Array.isArray(t)?p(t,e):t}function p(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?p(r,e):r);if(O(t)){let r={};for(let[o,n]of Object.entries(t))r[b(o)]=C(n,e);return r}return t}var L=450,P=5*1e3,T=60*1e3,H=5,W=1e6,V="function_run",z="function_network_access",U="function_network_access.response_from_cache",q="function_network_access.request_execution_in_background",J="function_network_access.request_execution",Z="no_cached_response",ee="cached_response_about_to_expire";function te(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&x(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function re(t){let e=JSON.parse(t);return new f({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var Q={no_cached_response:_.NoCachedResponse,cached_response_about_to_expire:_.CacheAboutToExpire};function se(t){let e=JSON.parse(t);return new d({reason:Q[e.reason]??_.Unknown,httpRequest:e.http_request})}function oe(t){let e=JSON.parse(t);return new y({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ne=async t=>{let{errors:e}=t.response,r=L,o=null,n="not_attempted";if(e.length>0)if(i(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{o=await t.onResubscribe(),n="succeeded"}catch(s){i(`Failed to resubscribe to app logs: ${s}`),r=T,n="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=T,t.onThrottle(r)):(r=P,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:o,resubscribeResult:n}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var ie=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:o=!0})=>{let{cursor:n,...s}=t,a=p({...s,payload:e,localTime:N(t.log_timestamp),storeName:r});return e instanceof l&&(a.payload.logs=e.logs.split(`
|
|
2
2
|
`).filter(Boolean),a.payload.inputQueryVariablesMetafieldValue&&(a.payload.inputQueryVariablesMetafieldValue=x(a.payload.inputQueryVariablesMetafieldValue))),o?JSON.stringify(a,null,2):JSON.stringify(a)},pe=(t,e)=>{let r=p(JSON.parse(t));return e===V?new l(r):e===U?new f(r):e===q?new d(r):e===J?new y(r):r},ue=async(t,e,r,o)=>{let n=await t.subscribeToAppLogs(e,r);if(!n.appLogsSubscribe)throw new E("Failed to subscribe to app logs: No response received");let{jwtToken:s,success:a,errors:h}=n.appLogsSubscribe;if(i(`Token: ${s}
|
|
3
3
|
`),i(`API Key: ${e.apiKey}
|
|
4
4
|
`),h&&h.length>0){let u=h.join(", ");throw await R({stripAnsi:!1},()=>{m(`Errors subscribing to app logs: ${u}`,o),m("App log streaming is not available in this session.",o)}),new E(u)}else{if(!s)throw new E("Failed to subscribe to app logs: No response received");let u=Array.isArray(e.shopIds)?e.shopIds:[e.shopIds];i(`Subscribed to App Events for shop ID(s) ${u.join(", ")}`),a!==void 0&&i(`Success: ${a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-LZSDOB4O.js";import{b as i}from"./chunk-PUGAY4JP.js";import{g as e}from"./chunk-VKWPEFWQ.js";e();var t=class extends i{static description="Generate a notifications.json file for the the CLI, appending a new notification to the current file.";static hidden=!0;async run(){await n()}};export{t as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ga as y,ha as S,v as e}from"./chunk-
|
|
1
|
+
import{ga as y,ha as S,v as e}from"./chunk-IAURXPUJ.js";import{h as l,k as x}from"./chunk-4EHFK2OI.js";import{T as h,Wa as b,fa as _}from"./chunk-TNYPQ2UL.js";import{d as g,j as u}from"./chunk-773TIA5M.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();function v(t,{httpsOnly:n=!1,message:o="Invalid URL"}={}){return t.refine(a=>A(a,n),{message:o}).refine(a=>!a.includes(`
|
|
2
2
|
`),{message:o})}function _e(t,{message:n="URL must be HTTPS URL or start with /"}={}){return t.refine(o=>o.startsWith("/")||A(o,!0),{message:n})}function A(t,n){try{let o=new URL(t);return n?o.protocol==="https:":["http:","https:"].includes(o.protocol)}catch{return!1}}function be(t){return typeof t=="string"&&!t.startsWith("/")?`/${t}`:t}var H=30;function ye(t){return t.length<=H}r();var ve={skipEsbuildReactDedeuplication:"SHOPIFY_CLI_SKIP_ESBUILD_REACT_DEDUPLICATION",disableGraphiQLExplorer:"SHOPIFY_CLI_DISABLE_GRAPHIQL",useDynamicConfigSpecifications:"SHOPIFY_CLI_DYNAMIC_CONFIG",enableAppLogPolling:"SHOPIFY_CLI_ENABLE_APP_LOG_POLLING",templatesJsonPath:"SHOPIFY_CLI_APP_TEMPLATES_JSON_PATH",mkcertBinaryPath:"SHOPIFY_CLI_MKCERT_BINARY",disableMinificationOnDev:"SHOPIFY_CLI_DISABLE_MINIFICATION_ON_DEV"},O={app:"shopify.app.toml",web:"shopify.web.toml",appEnvironments:"shopify.environments.toml",lockFile:".shopify.lock",hiddenConfig:"project.json",hiddenFolder:".shopify"},Ae={production:".env"},Le={reactTypes:"17.0.30"},L={extensions:{directoryName:"extensions",defaultRegistrationLimit:1},web:{directoryName:"web",configurationName:O.web}},Ce={graphiql:3457,localhost:3458},Ie=/^([a-zA-Z_$])([a-zA-Z0-9_$])*$/;r();var C=50,I=250,V=e.object({namespace:e.string(),key:e.string()}),$=e.object({sms_marketing:e.boolean().optional(),customer_privacy:e.boolean().optional()}),z=e.object({sources:e.array(e.string()).optional()}),B=e.object({network_access:e.boolean().optional(),block_progress:e.boolean().optional(),api_access:e.boolean().optional(),collect_buyer_consent:$.optional(),iframe:z.optional(),bundle_size_exception:e.boolean().optional()}),q=e.object({runs_offline:e.boolean().optional()}),Ue=e.object({type:e.string().optional(),extensions:e.array(e.any()).optional()}),Y=e.object({event:e.string(),blocking:e.boolean().default(!1),applies_to:e.array(e.string()).optional()}),G=e.object({allow_direct_linking:e.boolean().optional(),intercepts:e.array(Y).optional()}),Z=e.object({module:e.string()}),X=e.object({target:e.string(),module:e.string(),should_render:Z.optional(),tools:e.string().optional(),instructions:e.string().optional(),intents:e.array(e.object({type:e.string(),action:e.string(),schema:e.string(),name:e.string().optional(),description:e.string().optional()})).optional(),metafields:e.array(V).optional(),default_placement:e.string().optional(),urls:e.object({edit:e.string().optional()}).optional(),capabilities:G.optional(),preloads:e.object({chat:e.string().optional()}).optional(),assets:e.string().optional()}),Te=e.array(X),R=e.string(),J=e.object({key:e.string().optional(),name:e.string().optional(),description:e.string().optional(),required:e.boolean().optional(),default_value:e.any().optional(),type:e.string(),validations:e.array(e.any()).optional(),marketingActivityCreateUrl:e.string().optional(),marketingActivityDeleteUrl:e.string().optional()}),j=e.object({fields:e.array(J).optional()}),w=e.string().trim().nonempty("Handle can't be empty").max(C,`Handle can't exceed ${C} characters`).regex(/^[a-zA-Z0-9-]*$/,"Handle can only contain alphanumeric characters and hyphens").refine(t=>!t.startsWith("-")&&!t.endsWith("-"),"Handle can't start or end with a hyphen"),K=e.string().trim().nonempty("UID can't be empty").max(I,`UID can't exceed ${I} characters`).regex(/^[a-zA-Z0-9-${}.()_`]*$/,"UID can only contain alphanumeric characters and hyphens").refine(t=>!t.startsWith("-")&&!t.endsWith("-"),"UID can't start or end with a hyphen"),d=e.object({name:e.string().optional(),type:e.string().optional(),handle:w.optional(),uid:K.optional(),description:e.string().optional(),api_version:R.optional(),extension_points:e.any().optional(),capabilities:B.optional(),supported_features:q.optional(),settings:j.optional()}),Ee=d.extend({handle:w}),U=d.omit({handle:!0}),Pe=e.object({api_version:R.optional(),description:e.string().optional(),extensions:e.array(e.any()),settings:j.optional()});r();r();import{isUtf8 as Q}from"node:buffer";import T from"fs";async function E(t,n){let o=await b(g(t,"locales/*.json"));if(!o||o.length===0)return{};let a=ee(o);if(a.length===0)throw new l(`Missing default language in ${n} configuration`,"Make sure to have a {locale}.default.json file in your locales directory");if(a.length>1)throw new l(`Error loading ${n}`,'There must be one (and only one) locale identified as the default locale: e.g. "en.default.json"');for(let i of o)if(T.statSync(i).size===0)throw new l(`Error loading ${n}`,`Locale file ${i} can't be empty`);return{default_locale:a[0],translations:te(o,n)}}function ee(t){return t.filter(o=>u(o).endsWith(".default.json")).map(o=>u(o).split(".")[0])}function te(t,n){let o={};for(let a of t){let i=oe(u(a).split(".")[0],"Locale code is unset"),s=T.readFileSync(a);if(!Q(s))throw new l(`Error loading ${n}`,`Locale file ${a} contains invalid UTF-8 byte sequences. Re-save the file using UTF-8 encoding.`);o[i]=s.toString("base64")}return o}function oe(t,n){if(t===void 0)throw new x(n);return t}function ne(t){return t.experience==="configuration"}var P;(function(t){t.ShouldRender="should_render",t.Main="main",t.Tools="tools",t.Instructions="instructions",t.Intents="intents"})(P||(P={}));function D(t){let o={...{externalIdentifier:`${t.identifier}_external`,additionalIdentifiers:[],externalName:h(t.identifier.replace(/_/g," ")),surface:"test-surface",partnersWebIdentifier:t.identifier,schema:d,registrationLimit:L.extensions.defaultRegistrationLimit,transform:t.transformLocalToRemote,reverseTransform:t.transformRemoteToLocal,experience:t.experience??"extension",uidStrategy:t.uidStrategy??(t.experience==="configuration"?"single":"uuid"),getDevSessionUpdateMessages:t.getDevSessionUpdateMessages,clientSteps:t.clientSteps},...t};return{...o,contributeToAppConfigurationSchema:a=>{let i=ne(o),s=o.schema._def.shape!==void 0,c=o.uidStrategy==="single";return i&&s&&c?a.merge(o.schema):a},parseConfigurationObject:a=>{let i=o.schema.safeParse(a);return i.success?{state:"ok",data:i.data,errors:void 0}:{state:"error",data:void 0,errors:i.error.errors}}}}function N(t){let n=t.appModuleFeatures??(()=>[]);return D({identifier:t.identifier,schema:t.schema,appModuleFeatures:n,transformLocalToRemote:ae(t.transformConfig),transformRemoteToLocal:ie(t.schema,t.transformConfig),experience:"configuration",uidStrategy:t.uidStrategy??"single",clientSteps:t.clientSteps,getDevSessionUpdateMessages:t.getDevSessionUpdateMessages,patchWithAppDevURLs:t.patchWithAppDevURLs})}function Ze(t){return D({identifier:t.identifier,schema:e.any({}),appModuleFeatures:t.appModuleFeatures,experience:t.experience,clientSteps:t.clientSteps,uidStrategy:t.uidStrategy,transformRemoteToLocal:t.transformRemoteToLocal,devSessionWatchConfig:t.devSessionWatchConfig,deployConfig:async(n,o)=>{let a=re(n);if(t.appModuleFeatures().includes("localization")){let i=await E(o,t.identifier);a={...a,localization:i}}return a}})}function ae(t){return Object.keys(t).includes("forward")?t.forward:n=>F(n,t)}function ie(t,n){return n?Object.keys(n).includes("reverse")?n.reverse:o=>F(o,n,!0):o=>k(t,o)}function F(t,n,o=!1){let a={};for(let[i,s]of Object.entries(n)){let c=o?i:s,f=o?s:i,m=y(t,c);m!==void 0&&S(a,f,m)}return a}function k(t,n){return Object.keys(t._def.shape()).reduce((o,a)=>{let i=t._def.shape()[a];return i instanceof e.ZodOptional&&(i=i._def.innerType),i instanceof e.ZodObject?o[a]=k(i,n):(n[a]!==void 0&&(o[a]=n[a]),delete n[a]),o},{})}function re(t){let{type:n,handle:o,uid:a,path:i,extensions:s,...c}=t;return c}r();var se=/^(https:\/\/)/,ce=/^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/,le=/^arn:aws:events:(?<aws_region>[a-z]{2}-[a-z]+-[0-9]+)::event-source\/aws\.partner\/shopify\.com(\.test)?\/(?<api_client_id>\d+)\/(?<event_source_name>.+)$/,pe=/^kafka:\/\/(?<kafka_topic>[a-zA-Z0-9_.-]+)$/;function M(t){return typeof t=="string"&&t.endsWith("/")?t.replace(/\/+$/,""):t}var W=e.string({invalid_type_error:"Value must be string"}).refine(t=>t.startsWith("/")?!0:se.test(t)||ce.test(t)||le.test(t)||pe.test(t),{message:"URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id}, kafka://{topic-id} or Eventbridge ARN"});r();var p;(function(t){t.CustomersRedact="customers/redact",t.CustomersDataRequest="customers/data_request",t.ShopRedact="shop/redact"})(p||(p={}));var nt=e.object({topics:e.array(e.string({invalid_type_error:"Values within array must be a string"}),{invalid_type_error:"Value must be string[]"}).optional(),actions:e.array(e.string({invalid_type_error:"Value must be a string"})).optional(),uri:e.preprocess(t=>M(t),W,{required_error:"Missing value at"}),include_fields:e.array(e.string({invalid_type_error:"Value must be a string"})).optional(),filter:e.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:e.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:e.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional(),compliance_topics:e.array(e.enum([p.CustomersRedact,p.CustomersDataRequest,p.ShopRedact]),{invalid_type_error:"Value must be an array containing values: customers/redact, customers/data_request or shop/redact"}).optional()});r();var ue=e.object({scopes:e.string().transform(t=>_(t)??"").optional(),required_scopes:e.array(e.string()).optional(),optional_scopes:e.array(e.string()).optional(),use_legacy_install_flow:e.boolean().optional()}),de=e.object({redirect_urls:e.array(v(e.string()))}),fe=U.extend({access:e.object({admin:e.object({direct_api_mode:e.union([e.literal("online"),e.literal("offline")]).optional(),embedded_app_direct_api_access:e.boolean().optional()}).optional()}).optional(),access_scopes:ue.optional(),auth:de}),me="app_access",ge={access:"access",scopes:"access_scopes.scopes",required_scopes:"access_scopes.required_scopes",optional_scopes:"access_scopes.optional_scopes",use_legacy_install_flow:"access_scopes.use_legacy_install_flow",redirect_url_allowlist:"auth.redirect_urls"},he=N({identifier:me,schema:fe,transformConfig:ge,getDevSessionUpdateMessages:async t=>{let n=t.access_scopes!==void 0,o=t.access_scopes?.use_legacy_install_flow===!0,a=t.access_scopes?.scopes==null&&t.access_scopes?.required_scopes==null;if(o||n&&a)return["Using legacy install flow - access scopes are not auto-granted"];let i=t.access_scopes?.scopes?t.access_scopes.scopes.split(",").map(s=>s.trim()).join(", "):t.access_scopes?.required_scopes?.join(", ");return i?[`Access scopes auto-granted: ${i}`]:["App has been installed"]},patchWithAppDevURLs:(t,n)=>{n.redirectUrlWhitelist&&(t.auth={redirect_urls:n.redirectUrlWhitelist})}}),ut=he;export{ve as a,O as b,Ae as c,Le as d,L as e,Ce as f,Ie as g,v as h,_e as i,be as j,H as k,ye as l,C as m,I as n,V as o,Ue as p,Te as q,J as r,d as s,Ee as t,U as u,Pe as v,E as w,ne as x,P as y,D as z,N as A,Ze as B,M as C,W as D,p as E,nt as F,ue as G,de as H,me as I,ut as J};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-ENEPD4BS.js";import{a as y}from"./chunk-HPGQGIPA.js";import{a as h}from"./chunk-RVEAQUUF.js";import{g,xa as b}from"./chunk-NKSLEPE2.js";import{b as u}from"./chunk-BR5CFKIN.js";import{S as f,x as d,z as m}from"./chunk-T3IMDY72.js";import{d as l}from"./chunk-HLLMMIIM.js";import{a as A}from"./chunk-CTNBSUVU.js";import{e as _,g as s}from"./chunk-VKWPEFWQ.js";s();s();s();async function p(e,{web:i,stdout:t,stderr:a,signal:n,env:o={}}){let c=i.configuration.commands[e];if(!c)return;let[I,...v]=c.split(" ");await f(I,v,{cwd:i.directory,stdout:t,stderr:a,signal:n,env:o}),t.write("Web successfully built.")}async function S(e){!e.skipDependenciesInstallation&&!e.project.usesWorkspaces&&await y(e.project);let i={};e.apiKey&&(i.SHOPIFY_API_KEY=e.apiKey),await g(e.app),await d({processes:[...e.app.webs.map(t=>({prefix:["web",...t.configuration.roles].join("-"),action:async(a,n,o)=>{await p("build",{web:t,stdout:a,stderr:n,signal:o,env:i})}})),...e.app.allExtensions.map(t=>({prefix:t.localIdentifier,action:async(a,n,o)=>{await t.build({stdout:a,stderr:n,signal:o,app:e.app,environment:"production"})}}))],showTimestamps:!1}),m({headline:[{userInput:e.app.name},"built!"]})}var k=S;var x=_(A(),1);var r=class e extends w{static summary="Build the app, including extensions.";static descriptionWithMarkdown="This command executes the build script specified in the element's TOML file. You can specify a custom script in the file. To learn about configuration files in Shopify apps, refer to [App configuration](https://shopify.dev/docs/apps/tools/cli/configuration).\n\n If you're building a [theme app extension](https://shopify.dev/docs/apps/online-store/theme-app-extensions), then running the `build` command runs [Theme Check](https://shopify.dev/docs/themes/tools/theme-check) against your extension to ensure that it's valid.";static description=this.descriptionWithoutMarkdown();static flags={...u,...h,"skip-dependencies-installation":x.Flags.boolean({hidden:!1,description:"Skips the installation of dependencies. Deprecated, use workspaces instead.",env:"SHOPIFY_FLAG_SKIP_DEPENDENCIES_INSTALLATION",default:!1})};async run(){let{flags:i}=await this.parse(e),t=i["client-id"];await l(()=>({cmd_app_dependency_installation_skipped:i["skip-dependencies-installation"]}));let{app:a,project:n}=await b({directory:i.path,userProvidedConfigName:i.config});return await k({app:a,project:n,skipDependenciesInstallation:i["skip-dependencies-installation"],apiKey:t}),{app:a}}};export{r as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as M}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-NNCLTG6A.js";import{a as b}from"./chunk-RVEAQUUF.js";import{A as x,w as S,wa as V,x as A,z as C}from"./chunk-NKSLEPE2.js";import{a as f}from"./chunk-GO4KOSHA.js";import{b as j,c as E}from"./chunk-BR5CFKIN.js";import{B as u,z as v}from"./chunk-T3IMDY72.js";import{h as g,j as n}from"./chunk-4EHFK2OI.js";import{Db as w,Gb as h,wb as l}from"./chunk-TNYPQ2UL.js";import{j as p}from"./chunk-773TIA5M.js";import{g as m}from"./chunk-VKWPEFWQ.js";m();m();async function N(s,t){let e=new Set(t.map(r=>r.file)).size;await f.addPublicMetadata(()=>({cmd_app_validate_valid:s,cmd_app_validate_issue_count:t.length,cmd_app_validate_file_count:e}))}async function P(s,t={json:!1}){let e=s.errors;if(!e||e.isEmpty()){if(await N(!0,[]),t.json){l(JSON.stringify({valid:!0,issues:[]},null,2));return}v({headline:`App configuration '${p(s.configPath)}' is valid.`});return}let r=e.getErrors();if(await N(!1,r),t.json){let d=r.map(({file:c,message:a,path:i,code:o})=>({file:c,message:a,path:i,code:o}));throw l(JSON.stringify({valid:!1,issues:d},null,2)),new n}throw u({headline:"Validation errors found.",body:r.map(d=>`\u2022 ${x(d)}`).join(`
|
|
2
2
|
`)}),new n}async function _(s,t){await f.addPublicMetadata(()=>({cmd_app_validate_valid:!1,cmd_app_validate_issue_count:s,cmd_app_validate_file_count:t}))}var y=class s extends M{static summary="Validate your app configuration and extensions.";static descriptionWithMarkdown="Validates the selected app configuration file and all extension configurations against their schemas and reports any errors found.";static description=this.descriptionWithoutMarkdown();static flags={...j,...b,...E};async run(){let{flags:t}=await this.parse(s);await f.addPublicMetadata(()=>({cmd_app_validate_json:t.json}));let e;try{e=await S.load(t.path)}catch(a){if(a instanceof g&&t.json){await _(1,1);let i=h(w(a.message)).trim();throw l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n}throw a}let r;try{r=await C(e,t.config,{clientId:t["client-id"],skipPrompts:!!t["client-id"]})}catch(a){if(a instanceof g&&t.json){await _(1,1);let i=h(w(a.message)).trim();throw l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n}throw a}let d=A(e,r.file);if(d.length>0){let a=d.map(o=>({file:o.path,message:o.message})),i=new Set(d.map(o=>o.path)).size;throw await _(a.length,i),t.json?(l(JSON.stringify({valid:!1,issues:a},null,2)),new n):(u({headline:"Validation errors found.",body:a.map(o=>`\u2022 ${o.message}`).join(`
|
|
3
3
|
`)}),new n)}let c;try{c=(await V({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config??(t["client-id"]?p(r.file.path):void 0),unsafeTolerateErrors:!0})).app}catch(a){let i=a instanceof g?h(w(a.message)).trim():"";throw i.startsWith("Validation errors in ")&&t.json?(await _(1,1),l(JSON.stringify({valid:!1,issues:[{message:i}]},null,2)),new n):a}return await P(c,{json:t.json}),{app:c}}};export{y as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as x,a as oe,b as ne,c as M,d as ie,e as ae,g as L,i as P,j as le,k as ce,m as ue,n as pe,o as me,r as fe,s as de,t as ge,u as Ee,v,w as he,x as ye,y as Te,z as S}from"./chunk-XSUX2XAW.js";import{a as se}from"./chunk-LJO22Z6S.js";import{a as re}from"./chunk-3NVQXPTU.js";import{a as K}from"./chunk-36OXWMXZ.js";import{B as W,V as Z,X as ee,l as z,wa as te}from"./chunk-YAA7OGRM.js";import{F as X}from"./chunk-MNTJZ6JO.js";import{b as Q,c as Y}from"./chunk-WJEVB67Y.js";import{D as $}from"./chunk-AINDVTMY.js";import{d as _,e as f,f as o,l as G,y as H}from"./chunk-LIH7CQO7.js";import{h as N}from"./chunk-PSUNX2YX.js";import{a as Ne}from"./chunk-CTNBSUVU.js";import{ca as V,wb as F,xb as I}from"./chunk-GYFRTLML.js";import{j}from"./chunk-773TIA5M.js";import{e as k,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=k(_(),1);function we(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new N(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=k(_(),1);async function _e({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=L,T=s,R=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await v({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,A,O,J=i.get(g.shop_id.toString());if(J===void 0)continue;switch(g.log_type){case ce:y=fe(g.payload),A=`export "${y.export}" executed in ${(y.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:y=de(g.payload),A="network access response retrieved from cache";break;case pe:y=ge(g.payload),A="network access request executing in background";break;case me:y=Ee(g.payload),O=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,A=`network access request executed${O?` in ${O} ms`:""}`;break;default:continue}let Ae={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:J,description:A,logTimestamp:V(g.log_timestamp)};y&&p(ke=>[...ke,{appLog:y,prefix:Ae}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function be({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await _e({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return we(w),{appLogOutputs:r,errors:p}}var e=k(_(),1);var Fe=t=>{switch(t){case M.NoCachedResponse:return"No cached response available";case M.CacheAboutToExpire:return"Cache is about to expire";case M.Unknown:return"Unknown reason"}},Re=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=be({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Fe(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(_(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>S(n,s,l);return G(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function q({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await U({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=L,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await v({response:d,onThrottle:w=>{I(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{I(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>S(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&F(ye({appLog:m,appLogPayload:Te(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{q({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Se(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Me(t),a=he(s);if(a.length===0)throw new N("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new N(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await S(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(F(JSON.stringify({subscribedToStores:t.storeFqdns})),I(JSON.stringify({message:"Waiting for app logs..."})),await q({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(I(`Waiting for app logs...
|
|
1
|
+
import{A as x,a as oe,b as ne,c as M,d as ie,e as ae,g as L,i as P,j as le,k as ce,m as ue,n as pe,o as me,r as fe,s as de,t as ge,u as Ee,v,w as he,x as ye,y as Te,z as S}from"./chunk-6QDI53VP.js";import{a as se}from"./chunk-6NO44HAQ.js";import{a as re}from"./chunk-NNCLTG6A.js";import{a as K}from"./chunk-RVEAQUUF.js";import{B as W,V as Z,X as ee,l as z,wa as te}from"./chunk-NKSLEPE2.js";import{F as X}from"./chunk-5QCSJYJ4.js";import{b as Q,c as Y}from"./chunk-BR5CFKIN.js";import{D as $}from"./chunk-IAURXPUJ.js";import{d as _,e as f,f as o,l as G,y as H}from"./chunk-T3IMDY72.js";import{h as N}from"./chunk-4EHFK2OI.js";import{a as Ne}from"./chunk-CTNBSUVU.js";import{ca as V,wb as F,xb as I}from"./chunk-TNYPQ2UL.js";import{j}from"./chunk-773TIA5M.js";import{e as k,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=k(_(),1);function we(t){let s=(0,C.useRef)(t);(0,C.useEffect)(()=>{s.current=t},[t]),(0,C.useEffect)(()=>{let n;function i(){s.current().then(({retryIntervalMs:a})=>{a&&(n=setTimeout(i,a))}).catch(()=>{})}return n=setTimeout(i,0),()=>n&&clearTimeout(n)},[])}E();var U=async({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:i,organizationId:l})=>{let a=await i.appLogs({jwtToken:t,cursor:s},l),{errors:p,status:u}=a;if(u!==200){if(u===401||u===429||u>=500)return{errors:p.map(T=>({status:u,message:T}))};throw new N(`${p.join(", ")} while fetching app logs`)}let{cursor:r,app_logs:c}=a,d=Ce(c,n);return{cursor:r,appLogs:d}};function Ce(t,s){let n=t;return(s.status!==void 0||s.sources!==void 0)&&(n=n.filter(i=>{let l=s.status===void 0?!0:i.status===s.status,a=s.sources===void 0?!0:s.sources.includes(`${i.source_namespace}.${i.source}`);return l&&a})),n}var b=k(_(),1);async function _e({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=L,T=s,R=await U({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await v({response:w,onThrottle:g=>{a(["Request throttled while polling app logs.",`Retrying in ${g/1e3}s`])},onUnknownError:g=>{a(["Error while polling app logs",`Retrying in ${g/1e3}s`])},onResubscribe:()=>u()});m=h.resubscribeResult,h.nextJwtToken&&(c=h.nextJwtToken),d=h.retryIntervalMs}else{a(g=>g.length?[]:g);let{appLogs:h}=R;if(T=R.cursor,h)for(let g of h){let y,A,O,J=i.get(g.shop_id.toString());if(J===void 0)continue;switch(g.log_type){case ce:y=fe(g.payload),A=`export "${y.export}" executed in ${(y.fuelConsumed/le).toFixed(4)}M instructions`;break;case ue:y=de(g.payload),A="network access response retrieved from cache";break;case pe:y=ge(g.payload),A="network access request executing in background";break;case me:y=Ee(g.payload),O=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,A=`network access request executed${O?` in ${O} ms`:""}`;break;default:continue}let Ae={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:J,description:A,logTimestamp:V(g.log_timestamp)};y&&p(ke=>[...ke,{appLog:y,prefix:Ae}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function be({initialJwt:t,filters:s,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a}){let[p,u]=(0,b.useState)([]),[r,c]=(0,b.useState)([]),d=(0,b.useRef)(t),T=(0,b.useRef)(0),R=(0,b.useRef)(""),m=(0,b.useRef)(0),w=(0,b.useCallback)(async()=>{let h=await _e({jwtToken:d.current,cursor:R.current,filters:s,storeNameById:i,setErrors:u,setAppLogOutputs:c,resubscribeCallback:n,developerPlatformClient:l,organizationId:a});if(h.resubscribeResult==="failed"){if(m.current+=1,m.current>=P)return u(["App log streaming session has expired. Please restart your dev session."]),{retryIntervalMs:0}}else h.resubscribeResult==="succeeded"&&(m.current=0);return d.current=h.nextJwtToken,R.current=h.cursor,T.current=h.retryIntervalMs,{retryIntervalMs:T.current}},[]);return we(w),{appLogOutputs:r,errors:p}}var e=k(_(),1);var Fe=t=>{switch(t){case M.NoCachedResponse:return"No cached response available";case M.CacheAboutToExpire:return"Cache is about to expire";case M.Unknown:return"Unknown reason"}},Re=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=be({filters:s,initialJwt:t,resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a});return e.default.createElement(e.default.Fragment,null,p.map(({appLog:r,prefix:c},d)=>e.default.createElement(f,{flexDirection:"column",key:d},e.default.createElement(f,{flexDirection:"row",gap:1},e.default.createElement(o,null,e.default.createElement(o,{color:"green"},c.logTimestamp," "),e.default.createElement(o,{color:"blueBright"},`${c.storeName.split(".")[0]}`," "),e.default.createElement(o,{color:"blueBright"},c.source," "),e.default.createElement(o,{color:c.status==="Success"?"green":"red"},c.status," "),e.default.createElement(o,null,c.description))),e.default.createElement(f,{flexDirection:"column",marginLeft:4},r instanceof oe&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,r.logs),r.inputQueryVariablesMetafieldKey&&r.inputQueryVariablesMetafieldNamespace?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input Query Variables:"),e.default.createElement(f,{flexDirection:"row",marginLeft:1,marginTop:1},e.default.createElement(o,{dimColor:!0},"Namespace:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldNamespace)),e.default.createElement(f,{flexDirection:"row",marginLeft:1},e.default.createElement(o,{dimColor:!0},"Key:"),e.default.createElement(o,null," ",r.inputQueryVariablesMetafieldKey)),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.inputQueryVariablesMetafieldValue)??e.default.createElement(o,{color:"red"},"Metafield is not set")))):null,r.input?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Input ",e.default.createElement(o,{dimColor:!0},"(",r.inputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.input)))):null,r.output?e.default.createElement(f,{flexDirection:"column",marginTop:1},e.default.createElement(o,{bold:!0},"Output ",e.default.createElement(o,{dimColor:!0},"(",r.outputBytes," bytes):")),e.default.createElement(f,{marginLeft:1,marginTop:1},e.default.createElement(o,null,x(r.output)))):null),r instanceof ne&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Cache write time: ",new Date(r.cacheEntryEpochMs).toISOString()),e.default.createElement(o,null,"Cache TTL: ",r.cacheTtlMs/1e3," s"),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))),r instanceof ie&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Fe(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Attempt: ",r.attempt),r.connectTimeMs?e.default.createElement(o,null,"Connect time: ",r.connectTimeMs," ms"):null,r.writeReadTimeMs?e.default.createElement(o,null,"Write read time: ",r.writeReadTimeMs," ms"):null,e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest)),r.httpResponse?e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"HTTP response:"),e.default.createElement(o,null,x(r.httpResponse))):null,r.error?e.default.createElement(o,null,"Error: ",r.error):null)))),u.length>0&&e.default.createElement(f,{flexDirection:"column"},u.map((r,c)=>e.default.createElement(f,{key:c},e.default.createElement(o,{color:"red"},r)))))};var xe=k(_(),1);async function Ie({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>S(n,s,l);return G(xe.default.createElement(Re,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function q({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await U({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=L,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await v({response:d,onThrottle:w=>{I(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{I(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>S(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=P){I(JSON.stringify({message:"App log streaming session has expired. Please restart your dev session."}));return}}else m.resubscribeResult==="succeeded"&&(c=0);m.nextJwtToken&&(r=m.nextJwtToken),u=m.retryIntervalMs}else c=0;let{cursor:T,appLogs:R}=p;R&&R.forEach(m=>{let w=i.get(m.shop_id?.toString());w!==void 0&&F(ye({appLog:m,appLogPayload:Te(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{q({options:{variables:s,developerPlatformClient:n},pollOptions:{jwtToken:r||t.jwtToken,cursor:T??t.cursor,filters:t.filters},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:c}).catch(m=>{throw m})},u)}async function Se(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Me(t),a=he(s);if(a.length===0)throw new N("This app has no log sources. Learn more about app logs at https://shopify.dev/docs/api/shopify-cli/app/app-logs");if(t.sources){let d=t.sources.filter(T=>!a.includes(T));if(d.length)throw new N(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await S(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(F(JSON.stringify({subscribedToStores:t.storeFqdns})),I(JSON.stringify({message:"Waiting for app logs..."})),await q({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(I(`Waiting for app logs...
|
|
2
2
|
`),await Ie({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id}))}async function Me(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:l,organization:a}=t,p=j(s.configPath);t.format==="text"&&Le(n.title,l.shopDomain,t.storeFqdns,p,a.businessName);let u=new Map;return u.set(l.shopId,l.shopDomain),t.storeFqdns&&t.storeFqdns.length>1&&await Promise.all(t.storeFqdns?.slice(1).map(async c=>{let d=await X(a,c,i);u.set(d.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Le(t,s,n,i,l){let a=[];n&&n.length>0?n.forEach(u=>a.push(u)):a.push(s);let p=i?z(i):void 0;H({headline:i?`Using ${p} for default values:`:"Using these settings:",body:Z({appName:t,org:l,devStores:a,messages:[ee]})})}var B=k(Ne(),1);var D=class t extends re{static summary="Stream detailed logs for your Shopify app.";static descriptionWithMarkdown="\n Opens a real-time stream of detailed app logs from the selected app and store.\n Use the `--source` argument to limit output to a particular log source, such as a specific Shopify Function handle. Use the `shopify app logs sources` command to view a list of sources.\n Use the `--status` argument to filter on status, either `success` or `failure`.\n ```\n shopify app logs --status=success --source=extension.discount-function\n ```\n ";static description=this.descriptionWithoutMarkdown();static flags={...Q,...K,...Y,store:B.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async s=>$(s)}),source:B.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:B.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};async run(){let{flags:s}=await this.parse(t);await W(s.path);let n=await te({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await se({appContextResult:n,storeFqdn:s.store?.[0],forceReselectStore:s.reset}),l={...n,primaryStore:i,storeFqdns:s.store,sources:s.source,status:s.status,format:s.json?"json":"text"};return await Se(l),{app:n.app}}};export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-Z3JINOCM.js";import{a as e}from"./chunk-CYSB5AJJ.js";import{a as o}from"./chunk-SUQF2LM7.js";import{b as i}from"./chunk-PUGAY4JP.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=class extends i{static description="View all the available UI kit components";static hiddenAliases=["kitchen-sink all"];static hidden=!0;async run(){await o(),await e(),await s()}};export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as _,v as R}from"./chunk-
|
|
1
|
+
import{p as _,v as R}from"./chunk-CNDB4VEM.js";import{c as w,l as P}from"./chunk-XSFF6KEB.js";import{b as N}from"./chunk-BR5CFKIN.js";import{A as T,D as C,H as y,J as F,V as L}from"./chunk-T3IMDY72.js";import{h as v}from"./chunk-4EHFK2OI.js";import{a as D}from"./chunk-CTNBSUVU.js";import{Aa as I,Ca as k,Ta as A,Va as E,ka as b,ma as h,ua as f}from"./chunk-TNYPQ2UL.js";import{d as n}from"./chunk-773TIA5M.js";import{e as j,g as p}from"./chunk-VKWPEFWQ.js";p();p();var d="https://github.com/Shopify/skeleton-theme.git",H="https://github.com/Shopify/theme-liquid-docs.git",g={all:"All",github:"VS Code (GitHub Copilot)",cursor:"Cursor",claude:"Claude"};async function G(e,t){await U(e,t)}async function O(e,t){await U(e,t,!0)}async function U(e,t,o){await y([{title:`Cloning ${e} into ${t}`,task:async()=>{await w({repoUrl:e,destination:t,latestTag:o,shallow:!0}),await P(t),e===d&&(await Promise.all(Object.keys(g).map(async s=>x(n(t,`.${s}`)))),await x(n(t,".git")))}}])}async function x(e){await A(e)&&await k(e)}async function M(){return await C({message:"Which LLM instruction file would you like to include in your theme?",choices:[...Object.entries(g).map(([t,o])=>({label:o,value:t})),{label:"Skip",value:null}]})}async function $(e,t){let o=[];await y([{title:`Adding AI instructions into ${e}`,task:async()=>{await b(async s=>{await w({repoUrl:H,destination:s,shallow:!0});let c=t==="all"?Object.keys(g).filter(i=>i!=="all"):[t];try{let i=n(s,"ai","github","copilot-instructions.md"),r=await h(i),a=n(e,"AGENTS.md"),m=`# AGENTS.md
|
|
2
2
|
|
|
3
3
|
${r}`;await f(a,m),(await Promise.all(c.map(u=>q(e,a,u)))).forEach(u=>{u.copiedFile&&o.push(u.copiedFile)})}catch{throw new v("Failed to create AI instructions")}})}}]),o.length>0&&T({headline:"Files created instead of symlinks.",body:`Shopify CLI attempted to create symbolic links between AGENTS.md and ${o.join(", ")}, but your system doesn't have Developer Mode enabled or symlinks are disabled. Separate files were created instead.`})}async function q(e,t,o){if(o==="cursor")return{};let c={github:"copilot-instructions.md",claude:"CLAUDE.md"}[o],i=n(e,c);try{return await I(t,i),{}}catch(r){if(r instanceof Error){let a=await h(t);return await f(i,a),{copiedFile:c}}else throw r}}var l=j(D(),1);var S=class extends R{static summary="Clones a Git repository to use as a starting point for building a new theme.";static descriptionWithMarkdown=`Clones a Git repository to your local machine to use as the starting point for building a theme.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-OI3MNE72.js";import{g as r,h as n,i as h}from"./chunk-CNDB4VEM.js";import{h as m}from"./chunk-4EHFK2OI.js";import{g as o}from"./chunk-VKWPEFWQ.js";o();var c=t=>`Development theme #${t} could not be found. Please create a new development theme.`,E="No development theme ID has been set. Please create a development theme first.",p=class extends s{context="Development";constructor(e){super(e),this.themeId=r()}async find(){let e=await this.fetch();if(!e)throw new m(this.themeId?c(this.themeId):E);return e}setTheme(e){n(e)}removeTheme(){h()}};export{p as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as A,b as S,c as E,d as i,e as k,f as F,g as L,h as M,i as _}from"./chunk-
|
|
1
|
+
import{a as A,b as S,c as E,d as i,e as k,f as F,g as L,h as M,i as _}from"./chunk-CM4QZI6V.js";import{a as I}from"./chunk-NNCLTG6A.js";import{a as b}from"./chunk-RVEAQUUF.js";import{aa as P,wa as T}from"./chunk-NKSLEPE2.js";import{f as l}from"./chunk-BR5CFKIN.js";import{D as p,F as g,J as v}from"./chunk-T3IMDY72.js";import{a as G}from"./chunk-CTNBSUVU.js";import{Bb as u,Db as w,yb as h}from"./chunk-TNYPQ2UL.js";import{j as y}from"./chunk-773TIA5M.js";import{e as q,g as a}from"./chunk-VKWPEFWQ.js";a();a();a();a();async function H(e,t,r){let o={api_version:t},{webhookTopics:s}=await e.topics(o,r);return s}a();async function V(e){let t=e.map(o=>({label:o,value:o}));return await g({message:"Webhook Topic",choices:t})}async function C(e){return p({message:"Webhook ApiVersion",choices:e.map(t=>({label:t,value:t}))})}async function R(){return p({message:"Delivery method",choices:[{label:"HTTP",value:i.HTTP},{label:"Google Pub/Sub",value:i.PUBSUB},{label:"Amazon EventBridge",value:i.EVENTBRIDGE}]})}async function D(e){return(await v({message:"Address for delivery",validate:r=>{let o=r.trim();if(o.length===0)return"Address can't be empty";if(!k(o,e))return`Invalid address.
|
|
2
2
|
${d(e)}`}})).trim()}function U(e){return e===i.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:e===i.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:e===i.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function d(e){return U(e).map(t=>` \xB7 ${w(t)}`).join(`
|
|
3
3
|
`)}async function x(e,t){let{clientSecret:r,clientId:o,remoteApp:s,app:c}=e;return r&&(o||t!==i.EVENTBRIDGE)?{clientSecret:r,apiKey:o}:(P({appName:s.title,configFile:y(c.configPath)}),{clientSecret:s.apiSecretKeys.find(f=>f.secret).secret,apiKey:s.apiKey})}async function O(e,t,r){let o=await A(e,r);return t?L(t,o):C(o)}async function B(e,t,r,o){let s=await H(e,t,o);return r?M(r,t,s):V(s)}async function N(e,t){let r=e??_(t)??await R(),o=t??await D(r);return F(o,r)}async function Y(e){let t=await W(e);await z(t)}async function W(e){let t=await O(e.developerPlatformClient,e.apiVersion,e.organizationId),r=await B(e.developerPlatformClient,t,e.topic,e.organizationId),[o,s]=await N(e.deliveryMethod,e.address),c=await x(e,s);return{topic:r,apiVersion:t,deliveryMethod:s,address:o,apiKey:c.apiKey,clientSecret:c.clientSecret,developerPlatformClient:e.developerPlatformClient,organizationId:e.organizationId}}async function z(e){let t={topic:e.topic,api_version:e.apiVersion,address:e.address,delivery_method:e.deliveryMethod,shared_secret:e.clientSecret,api_key:e.apiKey},r=await S(e.developerPlatformClient,t,e.organizationId);if(!r.success){u(`Request errors:
|
|
4
4
|
${K(r.userErrors)}`);return}if(e.deliveryMethod===i.LOCALHOST){if(await E(e.address,r.samplePayload,r.headers)){h("Localhost delivery sucessful");return}u("Localhost delivery failed");return}r.samplePayload===JSON.stringify({})&&h("Webhook has been enqueued for delivery")}function K(e){try{return e.map(t=>JSON.parse(t.message).map(r=>` \xB7 ${r}`).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-MQM3PRVN.js";import{b as F,c as P,d as w}from"./chunk-3U7O3PMX.js";import{a as y}from"./chunk-ENEPD4BS.js";import{a as m}from"./chunk-RVEAQUUF.js";import{xa as x}from"./chunk-NKSLEPE2.js";import{b as d,c as h}from"./chunk-BR5CFKIN.js";import{F as g,M as l}from"./chunk-T3IMDY72.js";import{a as _}from"./chunk-CTNBSUVU.js";import{Ab as n}from"./chunk-TNYPQ2UL.js";import{e as U,g as u}from"./chunk-VKWPEFWQ.js";u();var i=U(_(),1);var a="_start",s=class v extends y{static summary="Run a function locally for testing.";static descriptionWithMarkdown="Runs the function from your current directory for [testing purposes](https://shopify.dev/docs/apps/functions/testing-and-debugging). To learn how you can monitor and debug functions when errors occur, refer to [Shopify Functions error handling](https://shopify.dev/docs/api/functions/errors).";static description=this.descriptionWithoutMarkdown();static flags={...d,...m,...F,...h,input:i.Flags.string({char:"i",description:"The input JSON to pass to the function. If omitted, standard input is used.",env:"SHOPIFY_FLAG_INPUT"}),export:i.Flags.string({char:"e",hidden:!1,description:"Name of the WebAssembly export to invoke.",env:"SHOPIFY_FLAG_EXPORT"}),profile:i.Flags.boolean({description:"Generate a WebAssembly performance profile for the function run. The profile can be viewed in Speedscope.",env:"SHOPIFY_FLAG_PROFILE"})};async run(){let{flags:t}=await this.parse(v),o=a,{app:p}=await x({directory:t.path,userProvidedConfigName:t.config}),e=await P(p,t.path);if(t.export!==void 0)n(`Using export ${t.export} from the --export flag.`),o=t.export;else if(e.configuration.targeting!==void 0&&e.configuration.targeting.length>0){let r=e.configuration.targeting;if(r.length>1&&l({})){let O=r.map(f=>({label:f.target,value:f.export||a}));o=await g({message:"Which target would you like to execute?",choices:O})}else o=r?.[0]?.export||a,n(`Using export '${o}'. Use the --export flag or an interactive terminal to select a different export.`)}else n(`No targeting information found. Using the default export '${o}'. Use the --export flag or an interactive terminal to select a different export.`);let c=e?.configuration.targeting?.[0]?.input_query,T=c&&`${e?.directory}/${c}`,A=await w(e,t.path,t["client-id"],t.reset,t.config);return await b({functionExtension:e,json:t.json,inputPath:t.input,export:o,stdin:"inherit",schemaPath:A,queryPath:T,profile:t.profile}),{app:p}}};export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
1
|
+
import{b as m}from"./chunk-PUGAY4JP.js";import{G as f}from"./chunk-T3IMDY72.js";import{a as N}from"./chunk-CTNBSUVU.js";import{wb as c}from"./chunk-TNYPQ2UL.js";import{e as v,g}from"./chunk-VKWPEFWQ.js";g();var d=v(N(),1),i=class h extends m{static description="View all the available command flags";static hidden=!0;static flags={csv:d.Flags.boolean({description:"Output as CSV",env:"SHOPIFY_FLAG_OUTPUT_CSV",default:!1})};async run(){let{flags:p}=await this.parse(h),s=[];for(let[t,a]of this.config.plugins)for(let o of a.commands){let l=await o.load(),n;a.name.startsWith("@shopify")?n=a.name.substring(9):n=a.name.startsWith("@oclif")?a.name.substring(7):a.name;let e=l.flags;if(e)for(let[u,r]of Object.entries(e))s.push({pluginName:n,command:o.id,flagName:`--${u}`,flagChar:r.char?`-${r.char}`:"",flagEnv:r.env})}if(p.csv){let t=["pluginName","command","flagName","flagChar","flagEnv"],a=`${t.join(",")}
|
|
2
2
|
`,o=s.map(n=>t.map(e=>n[e]).join(",")).join(`
|
|
3
3
|
`),l=`${a}${o}
|
|
4
4
|
`;c(l)}else f({rows:s,columns:{pluginName:{header:"plugin",color:"red"},command:{},flagName:{header:"long flag",color:"green"},flagChar:{header:"short flag",color:"green"},flagEnv:{header:"env variable",color:"blueBright"}}})}};export{i as a};
|