shopify 4.3.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-DMUNCDGT.js +1 -0
- package/dist/analytics-GAPN4I6R.js +1 -0
- package/dist/assets/hydrogen/routes/locale-check.ts +3 -3
- package/dist/assets/hydrogen/starter/CHANGELOG.md +106 -0
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +4 -2
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +8 -5
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +117 -23
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +24 -4
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/lib/context.ts +5 -0
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +14 -53
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +11 -4
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
- package/dist/assets/hydrogen/starter/package.json +9 -10
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +0 -11
- package/dist/assets/hydrogen/starter/vite.config.ts +10 -4
- package/dist/assets/hydrogen/vite/package.json +1 -2
- package/dist/assets/hydrogen/vite/vite.config.js +4 -3
- package/dist/bootstrap.js +1 -1
- package/dist/{chunk-3YDYZ232.js → chunk-235JVI2J.js} +8 -8
- package/dist/{chunk-2K7FGAT6.js → chunk-24RF5KN3.js} +1 -1
- package/dist/{chunk-GWHV62YT.js → chunk-2IPVQRMI.js} +1 -1
- package/dist/{chunk-QDVJJKLB.js → chunk-2MDFREEW.js} +1 -1
- package/dist/{chunk-JSOGPMWB.js → chunk-2MZACB7V.js} +1 -1
- package/dist/{chunk-LCZDC6EE.js → chunk-2ROG5NK3.js} +1 -1
- package/dist/{chunk-WVRGCNBZ.js → chunk-2VUG6LRN.js} +1 -1
- package/dist/{chunk-S22NCNAJ.js → chunk-32KQKGSY.js} +1 -1
- package/dist/chunk-3EQY5B4S.js +836 -0
- package/dist/{chunk-VRJTLVG3.js → chunk-3JAC5SI7.js} +1 -1
- package/dist/{chunk-G3JJLXPH.js → chunk-3JZKWK2V.js} +1 -1
- package/dist/chunk-3NMVMCOM.js +3 -0
- package/dist/chunk-3OE5HXHO.js +1 -0
- package/dist/{chunk-2RBIR3NM.js → chunk-4EYTWWYF.js} +1 -1
- package/dist/{chunk-G2OHWAY2.js → chunk-4LML2QWN.js} +1 -1
- package/dist/{chunk-UYSF234H.js → chunk-4Q54UDO3.js} +1 -1
- package/dist/{chunk-7572RLUP.js → chunk-4U3NC3UU.js} +1 -1
- package/dist/chunk-52H2R2FU.js +1 -0
- package/dist/{chunk-PMS4MNHB.js → chunk-57IRHKV3.js} +1 -1
- package/dist/{chunk-3AOQKI4B.js → chunk-5A7EMVAP.js} +1 -1
- package/dist/{chunk-T3ERXB7F.js → chunk-5EVFLUUA.js} +1 -1
- package/dist/{chunk-DYNH5SKT.js → chunk-5O7PY44R.js} +1 -1
- package/dist/chunk-63NFEXJR.js +275 -0
- package/dist/{chunk-PXHY753L.js → chunk-663TS34D.js} +1 -1
- package/dist/{chunk-JAWKLBOB.js → chunk-6I3FNLT3.js} +1 -1
- package/dist/{chunk-WA3YC5W4.js → chunk-6LTJMYUD.js} +2 -2
- package/dist/{chunk-5BKCIDMS.js → chunk-6V37CHBZ.js} +1 -1
- package/dist/{chunk-HOSFU6UP.js → chunk-74IG3ZE3.js} +3 -3
- package/dist/{chunk-4J32OHLY.js → chunk-7BVXGS44.js} +1 -1
- package/dist/{chunk-MRS6LAY7.js → chunk-7DYZVU7H.js} +1 -1
- package/dist/{chunk-YSIBRY6C.js → chunk-7EOQVQND.js} +1 -1
- package/dist/{chunk-3SPDFV5D.js → chunk-7HZG7FBK.js} +1 -1
- package/dist/{chunk-MIDYZPO4.js → chunk-7KHYEIA7.js} +1 -1
- package/dist/{chunk-5XDQ76DQ.js → chunk-7ZIO3X22.js} +1 -1
- package/dist/{chunk-6JKGUQRD.js → chunk-A2O3MBPH.js} +1 -1
- package/dist/{chunk-Q77MM2N2.js → chunk-ABCU552E.js} +1 -1
- package/dist/{chunk-N3CNWCC2.js → chunk-AP6FNGTA.js} +1 -1
- package/dist/chunk-AUZCENYI.js +1 -0
- package/dist/chunk-AYKRKE6O.js +2 -0
- package/dist/{chunk-PFGYC53K.js → chunk-AYSS2ERL.js} +1 -1
- package/dist/chunk-B367FOQA.js +7 -0
- package/dist/{chunk-PCCK4YTE.js → chunk-BBATKR3B.js} +1 -1
- package/dist/chunk-BCEWCYZD.js +1 -0
- package/dist/{chunk-2GU7OY3H.js → chunk-BH34ZLZ4.js} +1 -1
- package/dist/{chunk-ZM75DSIW.js → chunk-BLI7DUNV.js} +1 -1
- package/dist/{chunk-E7DHELFH.js → chunk-BNX4MZMV.js} +1 -1
- package/dist/{chunk-N5LVGFDS.js → chunk-BU7R7NFL.js} +1 -1
- package/dist/{chunk-NILXAUUT.js → chunk-BVHBMOIB.js} +1 -1
- package/dist/{chunk-7FQFEB33.js → chunk-BXDZX3BS.js} +34 -34
- package/dist/{chunk-MMIHHCMW.js → chunk-CVRAATZ5.js} +1 -1
- package/dist/{chunk-G3RWLAOG.js → chunk-DBBU6OVN.js} +1 -1
- package/dist/{chunk-G2LVUM7N.js → chunk-DKVU7LYY.js} +1 -1
- package/dist/{chunk-L2PC4MUV.js → chunk-DLZPP33V.js} +1 -1
- package/dist/{chunk-JEZ3PGVC.js → chunk-DQOS54HN.js} +1 -1
- package/dist/{chunk-OZBY45KT.js → chunk-E4GW6OXT.js} +1 -1
- package/dist/chunk-E64BQS4D.js +1 -0
- package/dist/chunk-F447QKVX.js +1 -0
- package/dist/{chunk-57PPQKJT.js → chunk-FA25RL4G.js} +1 -1
- package/dist/{chunk-TRYWVIVJ.js → chunk-FJOEHMXM.js} +1 -1
- package/dist/{chunk-NWXDOCL5.js → chunk-G6YOP2SJ.js} +1 -1
- package/dist/{chunk-YIRFEW5M.js → chunk-GOAKZ2IL.js} +1 -1
- package/dist/{chunk-AU5EZQW7.js → chunk-H2JU5BGK.js} +1 -1
- package/dist/{chunk-VJ6KDRZI.js → chunk-H3V6Y5JO.js} +1 -1
- package/dist/{chunk-GJXINXSU.js → chunk-HHA322FT.js} +46 -46
- package/dist/{chunk-HCTZN7L4.js → chunk-HP3NDE7S.js} +1 -1
- package/dist/{chunk-ANBOLDON.js → chunk-HX3TALXV.js} +1 -1
- package/dist/{chunk-OU3M32A2.js → chunk-I3Y6XTKN.js} +1 -1
- package/dist/{chunk-DCLUZFT7.js → chunk-ICHNVDFU.js} +1 -1
- package/dist/{chunk-RSRYC5ZF.js → chunk-ICXHUPP5.js} +1 -1
- package/dist/chunk-IE4SSSXU.js +593 -0
- package/dist/{chunk-5FVB7JHP.js → chunk-IFVYCKX5.js} +1 -1
- package/dist/{chunk-JUYJZUYU.js → chunk-J2ZES5K5.js} +1 -1
- package/dist/{chunk-JCIN73BE.js → chunk-J5U2FUIX.js} +1 -1
- package/dist/chunk-JC3PRJJS.js +1 -0
- package/dist/chunk-JGN7YG5X.js +3 -0
- package/dist/{chunk-ZGJ3DFTQ.js → chunk-JZVNNQWE.js} +1 -1
- package/dist/{chunk-CV5EQGES.js → chunk-K2CIMJJW.js} +1 -1
- package/dist/{chunk-T4NS63K4.js → chunk-K7I5BGFC.js} +1 -1
- package/dist/{chunk-33OHQUHZ.js → chunk-KESQOMEW.js} +1 -1
- package/dist/{chunk-4QTEPWEJ.js → chunk-KJQAJUDU.js} +4 -4
- package/dist/{chunk-TP7E54WN.js → chunk-KNEF6NAG.js} +1 -1
- package/dist/{chunk-S6B2ADVR.js → chunk-KUKYAIOR.js} +1 -1
- package/dist/{chunk-MEIEEENL.js → chunk-KZDI2BXR.js} +1 -1
- package/dist/chunk-LKZ7ARYS.js +18 -0
- package/dist/{chunk-W7DDV2EY.js → chunk-LMPD55L6.js} +1 -1
- package/dist/{chunk-YVQXEPHY.js → chunk-LXZM6Z4F.js} +1 -1
- package/dist/{chunk-S5IFJ737.js → chunk-MGPLKG23.js} +1 -1
- package/dist/chunk-MSJDZLZT.js +1 -0
- package/dist/{chunk-N3NE4MVN.js → chunk-N4LCWB56.js} +1 -1
- package/dist/{chunk-VI34CKV6.js → chunk-N5U5Q2MG.js} +1 -1
- package/dist/{chunk-JK3NIHTX.js → chunk-N5YIZJ4S.js} +1 -1
- package/dist/{chunk-CEHXOWA6.js → chunk-N625VE5T.js} +1 -1
- package/dist/{chunk-A5HKAMAC.js → chunk-NJLSZS27.js} +1 -1
- package/dist/{chunk-WHNWE7P2.js → chunk-O7OQK2OC.js} +1 -1
- package/dist/{chunk-5O43334U.js → chunk-P375IGKT.js} +1 -1
- package/dist/chunk-P3RGC53U.js +5 -0
- package/dist/{chunk-4FFPTEKD.js → chunk-P4243GCY.js} +1 -1
- package/dist/{chunk-FIYAECXH.js → chunk-PFEC2NUB.js} +1 -1
- package/dist/{chunk-JJ6RM54S.js → chunk-PH7F4BMG.js} +1 -1
- package/dist/chunk-PK6NOLT5.js +2 -0
- package/dist/chunk-PLHJQQVZ.js +1 -0
- package/dist/{chunk-AO3RFGNV.js → chunk-PVD544NN.js} +1 -1
- package/dist/chunk-Q3WOWDUU.js +1 -0
- package/dist/chunk-Q7BOSHWX.js +7 -0
- package/dist/{chunk-2XZBQZ5R.js → chunk-QAM7VCLV.js} +1 -1
- package/dist/{chunk-FOFJBRSL.js → chunk-QCBAFI6Z.js} +1 -1
- package/dist/{chunk-SSCYLDSX.js → chunk-QHWF3S7U.js} +1 -1
- package/dist/{chunk-EVZA2TCI.js → chunk-QJL3SXYA.js} +1 -1
- package/dist/{chunk-UB26DGTR.js → chunk-QRETBFXI.js} +1 -1
- package/dist/chunk-RBOYWA2D.js +1 -0
- package/dist/{chunk-N3YTDGFY.js → chunk-ROQXPIEZ.js} +1 -1
- package/dist/{chunk-ATSMK66C.js → chunk-RUKK4KXX.js} +1 -1
- package/dist/{chunk-PNP5OKNZ.js → chunk-RY2ESY3P.js} +1 -1
- package/dist/{chunk-HIQHYPLU.js → chunk-RY5CY3ZW.js} +1 -1
- package/dist/{chunk-Q73GEVSJ.js → chunk-S442LGHR.js} +1 -1
- package/dist/{chunk-OXJBYKMX.js → chunk-S5JJL3BP.js} +1 -1
- package/dist/{chunk-UU5P2IYU.js → chunk-SF53RKMO.js} +1 -1
- package/dist/{chunk-JAWOP4HJ.js → chunk-SY2AH7C2.js} +1 -1
- package/dist/{chunk-J5BRKYGE.js → chunk-TC3JOEMA.js} +1 -1
- package/dist/{chunk-M7YFD4EV.js → chunk-TEXYUUTD.js} +5 -5
- package/dist/chunk-TGM7L6RV.js +1 -0
- package/dist/{chunk-5H3VTG77.js → chunk-TKW3Z7XL.js} +1 -1
- package/dist/{chunk-HDC5V7RY.js → chunk-TM534QSE.js} +1 -1
- package/dist/{chunk-5FFHQTRC.js → chunk-U44HRKSU.js} +1 -1
- package/dist/{chunk-UTO4Z6P6.js → chunk-UEC23KAO.js} +1 -1
- package/dist/{chunk-RKDZGK5K.js → chunk-UFGDNIYX.js} +1 -1
- package/dist/{chunk-Q7C44DX5.js → chunk-UGGFSV7N.js} +1 -1
- package/dist/{chunk-USLYL5AC.js → chunk-UJVYIWUI.js} +1 -1
- package/dist/{chunk-OU4SKQTC.js → chunk-UP7H24B3.js} +2 -2
- package/dist/{chunk-YPBCSDFQ.js → chunk-UQZ7HZ47.js} +1 -1
- package/dist/{chunk-2EHBJWC6.js → chunk-UTLRP527.js} +1 -1
- package/dist/chunk-UTPJAU5S.js +1 -0
- package/dist/{chunk-DNXYKGV2.js → chunk-V66IHWQO.js} +1 -1
- package/dist/{chunk-YL3TYQGT.js → chunk-V774I3FW.js} +1 -1
- package/dist/{chunk-6KETAPWL.js → chunk-VKFDDZD3.js} +1 -1
- package/dist/{chunk-ZUKLGZOU.js → chunk-VNYKNAT5.js} +1 -1
- package/dist/{chunk-AERKD4TO.js → chunk-VUACOGOX.js} +1 -1
- package/dist/{chunk-KRQGLK2Q.js → chunk-WFB3FHKV.js} +1 -1
- package/dist/chunk-WPITBIL5.js +21 -0
- package/dist/{chunk-J3HX6ZGD.js → chunk-WTYH2O47.js} +1 -1
- package/dist/chunk-WU6GIY22.js +4 -0
- package/dist/{chunk-UC7KMA6W.js → chunk-XA5JA7DK.js} +1 -1
- package/dist/{chunk-2TMQG2UT.js → chunk-XSXX75VV.js} +1 -1
- package/dist/{chunk-7D45IAMQ.js → chunk-XXUWTD7A.js} +1 -1
- package/dist/chunk-XZWAX4FI.js +46 -0
- package/dist/{chunk-FQ5ZZX2G.js → chunk-YF4HKJB5.js} +1 -1
- package/dist/chunk-YJAX22JK.js +7 -0
- package/dist/{chunk-BL46CZ2M.js → chunk-YT3NPMWK.js} +1 -1
- package/dist/{chunk-NTRAWIEJ.js → chunk-YYLEWVO6.js} +3 -3
- package/dist/chunk-Z2Y6G2QF.js +1 -0
- package/dist/{chunk-M2YINBHF.js → chunk-Z66NZ2HC.js} +1 -1
- package/dist/{chunk-6LWOWDF4.js → chunk-ZFOWAMFK.js} +1 -1
- package/dist/{chunk-25HJX3L2.js → chunk-ZKBWEHIY.js} +1 -1
- package/dist/{chunk-2GAFKG64.js → chunk-ZZ3SMI2A.js} +1 -1
- package/dist/{chunk-TY6BZTG3.js → chunk-ZZWSMRKT.js} +1 -1
- package/dist/cli/commands/app/app-logs/sources.js +1 -1
- package/dist/cli/commands/app/build.js +1 -1
- package/dist/cli/commands/app/bulk/cancel.js +1 -1
- package/dist/cli/commands/app/bulk/execute.js +1 -1
- package/dist/cli/commands/app/bulk/status.js +1 -1
- package/dist/cli/commands/app/config/link.js +1 -1
- package/dist/cli/commands/app/config/pull.js +1 -1
- package/dist/cli/commands/app/config/use.js +1 -1
- package/dist/cli/commands/app/config/validate.js +1 -1
- package/dist/cli/commands/app/demo/watcher.js +1 -1
- package/dist/cli/commands/app/deploy.js +1 -1
- package/dist/cli/commands/app/dev/clean.js +1 -1
- package/dist/cli/commands/app/dev.js +1 -1
- package/dist/cli/commands/app/env/pull.js +1 -1
- package/dist/cli/commands/app/env/show.js +1 -1
- package/dist/cli/commands/app/execute.js +1 -1
- package/dist/cli/commands/app/function/build.js +1 -1
- package/dist/cli/commands/app/function/info.js +1 -1
- package/dist/cli/commands/app/function/replay.js +1 -1
- package/dist/cli/commands/app/function/run.js +1 -1
- package/dist/cli/commands/app/function/schema.js +1 -1
- package/dist/cli/commands/app/function/typegen.js +1 -1
- package/dist/cli/commands/app/generate/extension.js +1 -1
- package/dist/cli/commands/app/graphiql.js +1 -0
- package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
- package/dist/cli/commands/app/import-extensions.js +1 -1
- package/dist/cli/commands/app/info.js +1 -1
- package/dist/cli/commands/app/init.js +1 -1
- package/dist/cli/commands/app/logs.js +1 -1
- package/dist/cli/commands/app/release.js +1 -1
- package/dist/cli/commands/app/versions/list.js +1 -1
- package/dist/cli/commands/app/webhook/trigger.js +1 -1
- package/dist/cli/commands/auth/login.js +1 -1
- package/dist/cli/commands/auth/logout.js +1 -1
- package/dist/cli/commands/cache/clear.js +1 -1
- package/dist/cli/commands/config/autoupgrade/off.js +1 -1
- package/dist/cli/commands/config/autoupgrade/on.js +1 -1
- package/dist/cli/commands/config/autoupgrade/status.js +1 -1
- package/dist/cli/commands/debug/command-flags.js +1 -1
- package/dist/cli/commands/doc/fetch.js +1 -1
- package/dist/cli/commands/doc/search.js +1 -1
- package/dist/cli/commands/docs/generate.js +1 -1
- package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
- package/dist/cli/commands/doctor-release/theme/index.js +1 -1
- package/dist/cli/commands/help.js +1 -1
- package/dist/cli/commands/kitchen-sink/async.js +1 -1
- package/dist/cli/commands/kitchen-sink/index.js +1 -1
- package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
- package/dist/cli/commands/kitchen-sink/static.js +1 -1
- package/dist/cli/commands/notifications/generate.js +1 -1
- package/dist/cli/commands/notifications/list.js +1 -1
- package/dist/cli/commands/organization/list.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/theme/check.js +1 -1
- package/dist/cli/commands/theme/console.js +1 -1
- package/dist/cli/commands/theme/delete.js +1 -1
- package/dist/cli/commands/theme/dev.js +1 -1
- package/dist/cli/commands/theme/duplicate.js +1 -1
- package/dist/cli/commands/theme/info.js +1 -1
- package/dist/cli/commands/theme/init.js +1 -1
- package/dist/cli/commands/theme/language-server.js +1 -1
- package/dist/cli/commands/theme/list.js +1 -1
- package/dist/cli/commands/theme/metafields/pull.js +1 -1
- package/dist/cli/commands/theme/open.js +1 -1
- package/dist/cli/commands/theme/package.js +1 -1
- package/dist/cli/commands/theme/preview.js +1 -1
- package/dist/cli/commands/theme/profile.js +1 -1
- package/dist/cli/commands/theme/publish.js +1 -1
- package/dist/cli/commands/theme/pull.js +1 -1
- package/dist/cli/commands/theme/push.js +1 -1
- package/dist/cli/commands/theme/rename.js +1 -1
- package/dist/cli/commands/theme/share.js +1 -1
- package/dist/cli/commands/upgrade.js +1 -1
- package/dist/cli/commands/version.js +1 -1
- package/dist/cli/help.d.ts +38 -0
- package/dist/cli/help.js +2 -0
- package/dist/command-registry.js +1 -1
- package/dist/{conf-store-UY3MDGGA.js → conf-store-V6ILVUUO.js} +1 -1
- package/dist/{deprecations-KNUMDRIU.js → deprecations-MOEFN6OW.js} +1 -1
- package/dist/dist-2BL5GGMG.js +1 -0
- package/dist/dist-E6QKEULH.js +1 -0
- package/dist/environments-5KA3OBIZ.js +1 -0
- package/dist/error-NYYI6HVX.js +1 -0
- package/dist/error-handler-BOESDKZA.js +1 -0
- package/dist/{fs-LJWVNO4H.js → fs-XE6SBVBF.js} +1 -1
- package/dist/hooks/app-init.js +1 -1
- package/dist/hooks/did-you-mean.js +1 -1
- package/dist/hooks/hydrogen-init.js +1 -1
- package/dist/hooks/plugin-plugins.js +1 -1
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/hooks/public-metadata.js +1 -1
- package/dist/hooks/sensitive-metadata.js +1 -1
- package/dist/hooks/tunnel-provider.js +1 -1
- package/dist/hooks/tunnel-start.js +1 -1
- package/dist/index.js +23 -10
- package/dist/{is-global-W6ALVC5L.js → is-global-JOHCPSKZ.js} +1 -1
- package/dist/lib-NOROGV6N.js +1 -0
- package/dist/lib-UCG2DNMS.js +1 -0
- package/dist/{local-GKEWZAIV.js → local-BTQDUX72.js} +1 -1
- package/dist/local-storage-WUSIVDTQ.js +1 -0
- package/dist/{metadata-UEUN64TK.js → metadata-APVOKTBV.js} +1 -1
- package/dist/{morph-CGOZEPPZ.js → morph-CG6HEMCQ.js} +4 -4
- package/dist/{node-package-manager-4ASQQIIF.js → node-package-manager-AC34ZJZD.js} +1 -1
- package/dist/notifications-system-4ODOESG2.js +1 -0
- package/dist/{output-S6E37GJQ.js → output-EAPQ7OWD.js} +1 -1
- package/dist/{prettier-EGVCP5CY.js → prettier-6ZMB2MMO.js} +1 -1
- package/dist/system-D7CH26HU.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui-AXZBGWIQ.js +1 -0
- package/dist/upgrade-SLPJF6LD.js +1 -0
- package/dist/version-3IYH4V5U.js +1 -0
- package/dist/version-FAU37PQN.js +1 -0
- package/dist/{workerd-QOTT6UCO.js → workerd-XXPWKQOM.js} +1 -1
- package/oclif.manifest.json +712 -124
- package/package.json +15 -8
- package/dist/analytics-JH64XI2J.js +0 -1
- package/dist/analytics-MEGKKFGF.js +0 -1
- package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
- package/dist/chunk-762JWOWJ.js +0 -5
- package/dist/chunk-7LV55VWE.js +0 -1
- package/dist/chunk-A27NZMWB.js +0 -1
- package/dist/chunk-AVD3INWF.js +0 -1
- package/dist/chunk-AWEB5AQM.js +0 -1
- package/dist/chunk-AXNAGI32.js +0 -1
- package/dist/chunk-BQWK3C47.js +0 -278
- package/dist/chunk-CFOXXOO2.js +0 -1
- package/dist/chunk-DTIWUT2T.js +0 -18
- package/dist/chunk-DZQYG32N.js +0 -2
- package/dist/chunk-EH7ZTFS4.js +0 -613
- package/dist/chunk-EKVTNWHM.js +0 -1
- package/dist/chunk-G4OQABDT.js +0 -836
- package/dist/chunk-I22ZTRKK.js +0 -3
- package/dist/chunk-I4R7TML2.js +0 -7
- package/dist/chunk-J3H4LPN6.js +0 -18
- package/dist/chunk-JLE4NBMT.js +0 -1
- package/dist/chunk-LXVORHCQ.js +0 -1
- package/dist/chunk-MINZGZ4N.js +0 -1
- package/dist/chunk-S7F5KFQP.js +0 -1
- package/dist/chunk-T4IV643Z.js +0 -9
- package/dist/chunk-TPCG6DCA.js +0 -1
- package/dist/chunk-TUNUEOHO.js +0 -3
- package/dist/chunk-VPPWSKOY.js +0 -1
- package/dist/chunk-XVUHUA36.js +0 -1
- package/dist/chunk-YMAWEIUR.js +0 -1
- package/dist/dist-C5IV2YDQ.js +0 -1
- package/dist/dist-VL4KZWV2.js +0 -1
- package/dist/environments-YPRVO2CF.js +0 -1
- package/dist/error-XRBQTNFM.js +0 -1
- package/dist/error-handler-NI7D6GSY.js +0 -1
- package/dist/lib-AIKYSHWL.js +0 -1
- package/dist/lib-Q4PWEMFD.js +0 -1
- package/dist/local-storage-ZOZMA22B.js +0 -1
- package/dist/notifications-system-HLXJCAMG.js +0 -1
- package/dist/system-YQZNGSWB.js +0 -1
- package/dist/ui-D2FFWRK7.js +0 -1
- package/dist/upgrade-TVTCFMXM.js +0 -1
- package/dist/version-J6MDN7BZ.js +0 -1
- package/dist/version-RIRW5EXQ.js +0 -1
- /package/dist/{chunk-YLQ3LNNY.js → chunk-VDN6MEYI.js} +0 -0
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type {Route} from './+types/[robots.txt]';
|
|
2
|
-
import {parseGid} from '@shopify/hydrogen';
|
|
3
2
|
|
|
4
|
-
export
|
|
3
|
+
export function loader({request}: Route.LoaderArgs) {
|
|
5
4
|
const url = new URL(request.url);
|
|
6
|
-
|
|
7
|
-
const {shop} = await context.storefront.query(ROBOTS_QUERY);
|
|
8
|
-
|
|
9
|
-
const shopId = parseGid(shop.id).id;
|
|
10
|
-
const body = robotsTxtData({url: url.origin, shopId});
|
|
5
|
+
const body = robotsTxtData({url: url.origin});
|
|
11
6
|
|
|
12
7
|
return new Response(body, {
|
|
13
8
|
status: 200,
|
|
@@ -19,35 +14,31 @@ export async function loader({request, context}: Route.LoaderArgs) {
|
|
|
19
14
|
});
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
function robotsTxtData({url
|
|
17
|
+
function robotsTxtData({url}: {url?: string}) {
|
|
23
18
|
const sitemapUrl = url ? `${url}/sitemap.xml` : undefined;
|
|
24
19
|
|
|
25
20
|
return `
|
|
26
21
|
User-agent: *
|
|
27
|
-
${generalDisallowRules({sitemapUrl
|
|
22
|
+
${generalDisallowRules({sitemapUrl})}
|
|
28
23
|
|
|
29
24
|
# Google adsbot ignores robots.txt unless specifically named!
|
|
30
25
|
User-agent: adsbot-google
|
|
31
|
-
Disallow: /
|
|
32
|
-
Disallow: /
|
|
33
|
-
Disallow: /
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
${shopId ? `Disallow: /${shopId}/orders` : ''}
|
|
37
|
-
Disallow: /*?*oseid=*
|
|
38
|
-
Disallow: /*preview_theme_id*
|
|
39
|
-
Disallow: /*preview_script_id*
|
|
26
|
+
Disallow: /cart
|
|
27
|
+
Disallow: /account
|
|
28
|
+
Disallow: /search
|
|
29
|
+
Allow: /search/
|
|
30
|
+
Disallow: /search/?*
|
|
40
31
|
|
|
41
32
|
User-agent: Nutch
|
|
42
33
|
Disallow: /
|
|
43
34
|
|
|
44
35
|
User-agent: AhrefsBot
|
|
45
36
|
Crawl-delay: 10
|
|
46
|
-
${generalDisallowRules({sitemapUrl
|
|
37
|
+
${generalDisallowRules({sitemapUrl})}
|
|
47
38
|
|
|
48
39
|
User-agent: AhrefsSiteAudit
|
|
49
40
|
Crawl-delay: 10
|
|
50
|
-
${generalDisallowRules({sitemapUrl
|
|
41
|
+
${generalDisallowRules({sitemapUrl})}
|
|
51
42
|
|
|
52
43
|
User-agent: MJ12bot
|
|
53
44
|
Crawl-Delay: 10
|
|
@@ -61,21 +52,8 @@ Crawl-delay: 1
|
|
|
61
52
|
* This function generates disallow rules that generally follow what Shopify's
|
|
62
53
|
* Online Store has as defaults for their robots.txt
|
|
63
54
|
*/
|
|
64
|
-
function generalDisallowRules({
|
|
65
|
-
|
|
66
|
-
sitemapUrl,
|
|
67
|
-
}: {
|
|
68
|
-
shopId?: string;
|
|
69
|
-
sitemapUrl?: string;
|
|
70
|
-
}) {
|
|
71
|
-
return `Disallow: /admin
|
|
72
|
-
Disallow: /cart
|
|
73
|
-
Disallow: /orders
|
|
74
|
-
Disallow: /checkouts/
|
|
75
|
-
Disallow: /checkout
|
|
76
|
-
${shopId ? `Disallow: /${shopId}/checkouts` : ''}
|
|
77
|
-
${shopId ? `Disallow: /${shopId}/orders` : ''}
|
|
78
|
-
Disallow: /carts
|
|
55
|
+
function generalDisallowRules({sitemapUrl}: {sitemapUrl?: string}) {
|
|
56
|
+
return `Disallow: /cart
|
|
79
57
|
Disallow: /account
|
|
80
58
|
Disallow: /collections/*sort_by*
|
|
81
59
|
Disallow: /*/collections/*sort_by*
|
|
@@ -85,33 +63,16 @@ Disallow: /collections/*%2b*
|
|
|
85
63
|
Disallow: /*/collections/*+*
|
|
86
64
|
Disallow: /*/collections/*%2B*
|
|
87
65
|
Disallow: /*/collections/*%2b*
|
|
88
|
-
Disallow:
|
|
66
|
+
Disallow: /*/collections/*filter*&*filter*
|
|
89
67
|
Disallow: /blogs/*+*
|
|
90
68
|
Disallow: /blogs/*%2B*
|
|
91
69
|
Disallow: /blogs/*%2b*
|
|
92
70
|
Disallow: /*/blogs/*+*
|
|
93
71
|
Disallow: /*/blogs/*%2B*
|
|
94
72
|
Disallow: /*/blogs/*%2b*
|
|
95
|
-
Disallow: /*?*oseid=*
|
|
96
|
-
Disallow: /*preview_theme_id*
|
|
97
|
-
Disallow: /*preview_script_id*
|
|
98
73
|
Disallow: /policies/
|
|
99
|
-
Disallow: /*/*?*ls=*&ls=*
|
|
100
|
-
Disallow: /*/*?*ls%3D*%3Fls%3D*
|
|
101
|
-
Disallow: /*/*?*ls%3d*%3fls%3d*
|
|
102
74
|
Disallow: /search
|
|
103
75
|
Allow: /search/
|
|
104
76
|
Disallow: /search/?*
|
|
105
|
-
Disallow: /apple-app-site-association
|
|
106
|
-
Disallow: /.well-known/shopify/monorail
|
|
107
77
|
${sitemapUrl ? `Sitemap: ${sitemapUrl}` : ''}`;
|
|
108
78
|
}
|
|
109
|
-
|
|
110
|
-
const ROBOTS_QUERY = `#graphql
|
|
111
|
-
query StoreRobots($country: CountryCode, $language: LanguageCode)
|
|
112
|
-
@inContext(country: $country, language: $language) {
|
|
113
|
-
shop {
|
|
114
|
-
id
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
` as const;
|
|
@@ -83,7 +83,11 @@ function FeaturedCollection({
|
|
|
83
83
|
>
|
|
84
84
|
{image && (
|
|
85
85
|
<div className="featured-collection-image">
|
|
86
|
-
<Image
|
|
86
|
+
<Image
|
|
87
|
+
data={image}
|
|
88
|
+
sizes="100vw"
|
|
89
|
+
alt={image.altText || collection.title}
|
|
90
|
+
/>
|
|
87
91
|
</div>
|
|
88
92
|
)}
|
|
89
93
|
<h1>{collection.title}</h1>
|
|
@@ -97,8 +101,11 @@ function RecommendedProducts({
|
|
|
97
101
|
products: Promise<RecommendedProductsQuery | null>;
|
|
98
102
|
}) {
|
|
99
103
|
return (
|
|
100
|
-
<
|
|
101
|
-
|
|
104
|
+
<section
|
|
105
|
+
className="recommended-products"
|
|
106
|
+
aria-labelledby="recommended-products"
|
|
107
|
+
>
|
|
108
|
+
<h2 id="recommended-products">Recommended Products</h2>
|
|
102
109
|
<Suspense fallback={<div>Loading...</div>}>
|
|
103
110
|
<Await resolve={products}>
|
|
104
111
|
{(response) => (
|
|
@@ -113,7 +120,7 @@ function RecommendedProducts({
|
|
|
113
120
|
</Await>
|
|
114
121
|
</Suspense>
|
|
115
122
|
<br />
|
|
116
|
-
</
|
|
123
|
+
</section>
|
|
117
124
|
);
|
|
118
125
|
}
|
|
119
126
|
|
|
@@ -3,7 +3,7 @@ import type {Route} from './+types/account.$';
|
|
|
3
3
|
|
|
4
4
|
// fallback wild card for all unauthenticated routes in account section
|
|
5
5
|
export async function loader({context}: Route.LoaderArgs) {
|
|
6
|
-
context.customerAccount.handleAuthStatus();
|
|
6
|
+
await context.customerAccount.handleAuthStatus();
|
|
7
7
|
|
|
8
8
|
return redirect('/account');
|
|
9
9
|
}
|
|
@@ -32,7 +32,7 @@ export const meta: Route.MetaFunction = () => {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export async function loader({context}: Route.LoaderArgs) {
|
|
35
|
-
context.customerAccount.handleAuthStatus();
|
|
35
|
+
await context.customerAccount.handleAuthStatus();
|
|
36
36
|
|
|
37
37
|
return {};
|
|
38
38
|
}
|
|
@@ -468,7 +468,7 @@ export function AddressForm({
|
|
|
468
468
|
/>
|
|
469
469
|
<label htmlFor="territoryCode">Country Code*</label>
|
|
470
470
|
<input
|
|
471
|
-
aria-label="
|
|
471
|
+
aria-label="Country code"
|
|
472
472
|
autoComplete="country"
|
|
473
473
|
defaultValue={address?.territoryCode ?? ''}
|
|
474
474
|
id="territoryCode"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "skeleton",
|
|
3
3
|
"private": true,
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "2026.
|
|
5
|
+
"version": "2026.4.4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "shopify hydrogen build --codegen",
|
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
},
|
|
15
15
|
"prettier": "@shopify/prettier-config",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@shopify/hydrogen": "
|
|
17
|
+
"@shopify/hydrogen": "2026.4.4",
|
|
18
18
|
"graphql": "^16.10.0",
|
|
19
19
|
"graphql-tag": "^2.12.6",
|
|
20
20
|
"isbot": "^5.1.22",
|
|
21
21
|
"react": "^18.3.1",
|
|
22
22
|
"react-dom": "^18.3.1",
|
|
23
|
-
"react-router": "7.
|
|
24
|
-
"react-router-dom": "7.
|
|
23
|
+
"react-router": "7.16.0",
|
|
24
|
+
"react-router-dom": "7.16.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@eslint/compat": "^1.2.5",
|
|
28
28
|
"@eslint/eslintrc": "^3.2.0",
|
|
29
29
|
"@eslint/js": "^9.18.0",
|
|
30
30
|
"@graphql-codegen/cli": "5.0.2",
|
|
31
|
-
"@react-router/dev": "7.
|
|
32
|
-
"@react-router/fs-routes": "7.
|
|
33
|
-
"@shopify/cli": "3.
|
|
31
|
+
"@react-router/dev": "7.16.0",
|
|
32
|
+
"@react-router/fs-routes": "7.16.0",
|
|
33
|
+
"@shopify/cli": "3.93.2",
|
|
34
34
|
"@shopify/hydrogen-codegen": "0.3.3",
|
|
35
|
-
"@shopify/mini-oxygen": "4.0
|
|
35
|
+
"@shopify/mini-oxygen": "4.2.0",
|
|
36
36
|
"@shopify/oxygen-workers-types": "^4.1.6",
|
|
37
37
|
"@shopify/prettier-config": "^1.1.2",
|
|
38
38
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
@@ -54,8 +54,7 @@
|
|
|
54
54
|
"graphql-config": "^5.0.3",
|
|
55
55
|
"prettier": "^3.4.2",
|
|
56
56
|
"typescript": "^5.9.2",
|
|
57
|
-
"vite": "^
|
|
58
|
-
"vite-tsconfig-paths": "^4.3.1"
|
|
57
|
+
"vite": "^8.0.1"
|
|
59
58
|
},
|
|
60
59
|
"engines": {
|
|
61
60
|
"node": "^22 || ^24"
|
|
@@ -377,13 +377,6 @@ export type FooterQuery = {
|
|
|
377
377
|
>;
|
|
378
378
|
};
|
|
379
379
|
|
|
380
|
-
export type StoreRobotsQueryVariables = StorefrontAPI.Exact<{
|
|
381
|
-
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
|
|
382
|
-
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
|
|
383
|
-
}>;
|
|
384
|
-
|
|
385
|
-
export type StoreRobotsQuery = {shop: Pick<StorefrontAPI.Shop, 'id'>};
|
|
386
|
-
|
|
387
380
|
export type FeaturedCollectionFragment = Pick<
|
|
388
381
|
StorefrontAPI.Collection,
|
|
389
382
|
'id' | 'title' | 'handle'
|
|
@@ -1283,10 +1276,6 @@ interface GeneratedQueryTypes {
|
|
|
1283
1276
|
return: FooterQuery;
|
|
1284
1277
|
variables: FooterQueryVariables;
|
|
1285
1278
|
};
|
|
1286
|
-
'#graphql\n query StoreRobots($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n shop {\n id\n }\n }\n': {
|
|
1287
|
-
return: StoreRobotsQuery;
|
|
1288
|
-
variables: StoreRobotsQueryVariables;
|
|
1289
|
-
};
|
|
1290
1279
|
'#graphql\n fragment FeaturedCollection on Collection {\n id\n title\n image {\n id\n url\n altText\n width\n height\n }\n handle\n }\n query FeaturedCollection($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n collections(first: 1, sortKey: UPDATED_AT, reverse: true) {\n nodes {\n ...FeaturedCollection\n }\n }\n }\n': {
|
|
1291
1280
|
return: FeaturedCollectionQuery;
|
|
1292
1281
|
variables: FeaturedCollectionQueryVariables;
|
|
@@ -2,13 +2,15 @@ import {defineConfig} from 'vite';
|
|
|
2
2
|
import {hydrogen} from '@shopify/hydrogen/vite';
|
|
3
3
|
import {oxygen} from '@shopify/mini-oxygen/vite';
|
|
4
4
|
import {reactRouter} from '@react-router/dev/vite';
|
|
5
|
-
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
6
5
|
|
|
7
6
|
export default defineConfig({
|
|
8
|
-
plugins: [hydrogen(), oxygen(), reactRouter()
|
|
7
|
+
plugins: [hydrogen(), oxygen(), reactRouter()],
|
|
8
|
+
resolve: {
|
|
9
|
+
tsconfigPaths: true,
|
|
10
|
+
},
|
|
9
11
|
build: {
|
|
10
12
|
// Allow a strict Content-Security-Policy
|
|
11
|
-
//
|
|
13
|
+
// without inlining assets as base64:
|
|
12
14
|
assetsInlineLimit: 0,
|
|
13
15
|
},
|
|
14
16
|
ssr: {
|
|
@@ -23,7 +25,11 @@ export default defineConfig({
|
|
|
23
25
|
* Include 'example-dep' in the array below.
|
|
24
26
|
* @see https://vitejs.dev/config/dep-optimization-options
|
|
25
27
|
*/
|
|
26
|
-
include: [
|
|
28
|
+
include: [
|
|
29
|
+
'react-router > set-cookie-parser',
|
|
30
|
+
'react-router > cookie',
|
|
31
|
+
'react-router',
|
|
32
|
+
],
|
|
27
33
|
},
|
|
28
34
|
},
|
|
29
35
|
server: {
|
|
@@ -2,9 +2,11 @@ import {defineConfig} from 'vite';
|
|
|
2
2
|
import {hydrogen} from '@shopify/hydrogen/vite';
|
|
3
3
|
import {oxygen} from '@shopify/mini-oxygen/vite';
|
|
4
4
|
import {vitePlugin as remix} from '@remix-run/dev';
|
|
5
|
-
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
6
5
|
|
|
7
6
|
export default defineConfig({
|
|
7
|
+
resolve: {
|
|
8
|
+
tsconfigPaths: true,
|
|
9
|
+
},
|
|
8
10
|
plugins: [
|
|
9
11
|
hydrogen(),
|
|
10
12
|
oxygen(),
|
|
@@ -17,11 +19,10 @@ export default defineConfig({
|
|
|
17
19
|
v3_routeConfig: false,
|
|
18
20
|
},
|
|
19
21
|
}),
|
|
20
|
-
tsconfigPaths(),
|
|
21
22
|
],
|
|
22
23
|
build: {
|
|
23
24
|
// Allow a strict Content-Security-Policy
|
|
24
|
-
//
|
|
25
|
+
// without inlining assets as base64:
|
|
25
26
|
assetsInlineLimit: 0,
|
|
26
27
|
},
|
|
27
28
|
ssr: {
|
package/dist/bootstrap.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as p}from"./chunk-GDHD3TGC.js";import
|
|
1
|
+
import{a as p}from"./chunk-GDHD3TGC.js";import"./chunk-T7KHS6RF.js";import{a as e}from"./chunk-S5JJL3BP.js";import{a as s}from"./chunk-5O7PY44R.js";import"./chunk-NNOSZ447.js";import"./chunk-773TIA5M.js";import"./chunk-T6CC5WUU.js";import"./chunk-UQWFDL3F.js";import"./chunk-I5A6BPCP.js";import"./chunk-CX5CC6P5.js";import"./chunk-ET2CGROE.js";import"./chunk-TOLPNBZK.js";import"./chunk-CRALWNNO.js";import{e as m,g as t}from"./chunk-VKWPEFWQ.js";t();var r=m(p(),1);import n from"fs";(0,r.createGlobalProxyAgent)({environmentVariableNamespace:"SHOPIFY_",forceGlobalAgent:!0,socketConnectionTimeout:6e4});process.on("uncaughtException",async o=>{try{let{FatalError:c}=await import("./error-NYYI6HVX.js");if(o instanceof c){let{renderFatalError:i}=await import("./ui-AXZBGWIQ.js");i(o)}else n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
|
|
2
2
|
`)}catch{n.writeSync(process.stderr.fd,`${o.stack??o.message??o}
|
|
3
3
|
`)}process.exit(1)});var f=["SIGINT","SIGTERM","SIGQUIT"];f.forEach(o=>{process.on(o,()=>{process.exit(1)})});var a=Number(process.env.SHOPIFY_CLI_COLUMNS);isNaN(a)||(process.stdout.columns=a);async function l({development:o}){await e({moduleURL:import.meta.url,development:o,lazyCommandLoader:s})}var S=l;export{S as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{
|
|
1
|
+
import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{a as mt,b as ht,f as _e,g as ae,h as A,i as ce,k as yt,n as Et}from"./chunk-XZWAX4FI.js";import{a as M,l as ft,m as gt}from"./chunk-7ZIO3X22.js";import{s as ie,t as W}from"./chunk-JGN7YG5X.js";import{a as O,b as N,e as st,g as nt,i as rt,j as ot,k as it,n as at,p as ct,q as lt,r as oe,s as $,u as dt,w as pt}from"./chunk-Q7BOSHWX.js";import{aa as ut}from"./chunk-7BVXGS44.js";import{va as L,xa as H}from"./chunk-3EQY5B4S.js";import{b as Qe}from"./chunk-5C7HDTHJ.js";import{P as tt,u as Ke,w as _,x as te,y as et}from"./chunk-YYLEWVO6.js";import{d as se}from"./chunk-AUZCENYI.js";import{Fb as q,Hb as ne,Mb as re,O as Ve,Pb as F,Qb as D,Ta as v,Wa as C,_ as $e,bb as ke,ma as k,ua as be,wa as Xe,ya as Ze}from"./chunk-BXDZX3BS.js";import{d as E,g as V,j as Ge,k as j}from"./chunk-773TIA5M.js";import{e as Ye,g as h}from"./chunk-VKWPEFWQ.js";h();h();h();var ns=".shopifyignore",wt=/templates\/\*(\.(json|liquid))?$/,Tt=new Set;function Le(e,t={}){let s=t.ignoreFromFile??[],n=t.ignore??[],r=t.only??[],[o=[],i=[]]=Ie(s),[a=[],u=[]]=Ie(n),[m=[],c=[]]=Ie(r),l=e.filter(B(o,".shopifyignore"));return l=l.filter(B(a,"--ignore")),l=l.filter(B(m,"--only",!0)),i.length>0&&(l=l.concat(e.filter(B(i,".shopifyignore",!0)))),u.length>0&&(l=l.concat(e.filter(B(u,"--ignore",!0)))),c.length>0&&(l=l.filter(B(c,"--only"))),Ve(l,f=>f.key)}function B(e,t,s=!1){return({key:n})=>{if(e.length===0)return!0;let r=e.some(i=>rs(n,i)||as(i)&&is(n,cs(i)));return(s?!r:r)?(F(`Ignoring theme file ${n} via ${t}...`),!1):!0}}async function Rt(e){let t=E(e,ns);return await v(t)?(await k(t,{encoding:"utf8"})).split(/(\r\n|\r|\n)/).map(r=>r.trim()).filter(r=>r&&!r.startsWith("#")):[]}function Ie(e){let t=e.filter(n=>n.startsWith("!")).map(n=>n.slice(1));return[e.filter(n=>!n.startsWith("!")),t]}function rs(e,t){let s={matchBase:!0,noglobstar:!0};return ke(e,t,s)?!0:(!t.includes("*")&&t.endsWith("/")&&!Tt.has(t)&&(Tt.add(t),_({headline:"Directory pattern may be misleading.",body:`For more reliable matching, consider using "${t}*" or "${t}*.<file_extension>" instead.`})),os(t)?ke(e,t.replace(wt,"templates/**/*$1"),s):!1)}function os(e){return wt.test(e)}function is(e,t){return t.test(e)}function as(e){return e.startsWith("/")&&e.endsWith("/")}function cs(e){return new RegExp(e.slice(1,-1))}h();import St from"fs/promises";var le=class{constructor(t){this.notifyPath=t,this.isValidUrl=this.validateUrl(t),this.notifyPath===""&&D("Notification skipped: notifyPath is an empty string")}async notify(t){if(this.notifyPath!=="")try{F(`Notifying filechange listener at ${this.notifyPath}...`),this.isValidUrl?await this.notifyUrl(t):await this.notifyFile(t)}catch(s){L(s);let n=`Failed to notify filechange listener at ${this.notifyPath}`;s instanceof Error&&(n=n.concat(`: ${s.message}`)),D(n)}}async notifyUrl(t){let s=await fetch(this.notifyPath,{method:"POST",body:JSON.stringify({files:[t]}),headers:{"Content-Type":"application/json"}});if(!s.ok)throw new Error(s.statusText)}async notifyFile(t){await St.writeFile(this.notifyPath,t),await St.utimes(this.notifyPath,new Date,new Date)}validateUrl(t){try{let s=new URL(t);return s.protocol==="http:"||s.protocol==="https:"}catch{return!1}}};h();h();h();import ls from"node:events";var Ft=["assets/**/*.*","locales/**/*.json","blocks/**/*.liquid","snippets/**/*.liquid"];function vt(e){let t=new Map,s=new Set,n=new ls,r=(c,l)=>{n.emit(c,l)},o=async c=>{let l=await pe(e,c),p=de(c,l),f=typeof l=="string"?l:"",x=Buffer.isBuffer(l)?l.toString("base64"):"";return t.set(c,M({key:c,checksum:p,value:f,attachment:x})),l},i=C(Ft,{cwd:e,deep:3,ignore:W}).then(c=>Promise.all(c.map(o))),a=(c,l)=>{let p=V(e,l),f=o(p).then(()=>{let x=t.get(p);return s.add(x.key),x.value??x.attachment??""});tt(5).then(()=>{s.delete(p)}).catch(()=>{}),r(c,{fileKey:p,onContent:x=>{f.then(P=>{P&&x(P)}).catch(()=>{})},onSync:x=>{}})},u=c=>{let l=V(e,c);s.delete(l),t.delete(l),r("unlink",{fileKey:l,onSync:p=>p()})},m=new Set(Ft.map(c=>E(e,c.split("/").shift()??"")));return{root:e,files:t,unsyncedFileKeys:s,ready:async()=>i.then(()=>{}),delete:async c=>{t.delete(c)},write:async c=>{t.set(c.key,c)},read:o,addEventListener:(c,l)=>{n.on(c,l)},startWatcher:async()=>{let{default:c}=await import("./chokidar-VDIVGBZH.js");c.watch([...m],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}).on("add",a.bind(null,"add")).on("change",a.bind(null,"change")).on("unlink",u.bind(null))}}}h();h();var ds="https://unpkg.com/@shopify/polaris@13.9.2/build/esm/styles.css";function Pt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function $t(e){return(0,String.raw)`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<title>${e.title}</title>
|
|
@@ -66,13 +66,13 @@ import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{A as gt,C as _e,D as ae,E
|
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
68
|
</body>
|
|
69
|
-
</html>`}h();h();var ps=/<head(\s[^>]*)?>/i,je="https://cdn.shopify.com/storefront",us=`${je}/standard-events.js`,ms=`${je}/standard-events.dev.js`,bt=`${je}/standard-events-inspector.js`,kt="shopify-cli-standard-events-inspector",hs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${qe(kt)}["']|\\bsrc=["']${qe(bt)}["'])[^>]*>`,"i"),fs=new RegExp(qe(us),"g");function ue(e){return hs.test(e)?e:e.replace(ps,t=>`${t}<script id="${kt}" src="${bt}" defer></script>`)}function _t(e){return e.replace(fs,ms)}function qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}h();var It=80;function X(e,t,s){if(!gs(e)||s.type==="theme-extension")return;let n=e.path.length>It?`${e.path.substring(0,It)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=ys(t.status),u=e.method.padStart(6);re(ne`• ${
|
|
70
|
-
`)}))}):ce(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:Ae(s),replaceExtensionTemplates:fe(t),replaceTemplates:Oe(t,n,
|
|
69
|
+
</html>`}h();h();var ps=/<head(\s[^>]*)?>/i,je="https://cdn.shopify.com/storefront",us=`${je}/standard-events.js`,ms=`${je}/standard-events.dev.js`,bt=`${je}/standard-events-inspector.js`,kt="shopify-cli-standard-events-inspector",hs=new RegExp(`<script\\b[^>]*(?:\\bid=["']${qe(kt)}["']|\\bsrc=["']${qe(bt)}["'])[^>]*>`,"i"),fs=new RegExp(qe(us),"g");function ue(e){return hs.test(e)?e:e.replace(ps,t=>`${t}<script id="${kt}" src="${bt}" defer></script>`)}function _t(e){return e.replace(fs,ms)}function qe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}h();var It=80;function X(e,t,s){if(!gs(e)||s.type==="theme-extension")return;let n=e.path.length>It?`${e.path.substring(0,It)}...`:e.path,o=t.headers.get("server-timing")?.match(/cfRequestDuration;dur=([\d.]+)/)?.[1],i=o?`${Math.round(Number(o))}ms`:"",a=ys(t.status),u=e.method.padStart(6);re(ne`• ${ie.format(new Date)} Request ${q.raw("\xBB")} ${u} ${a(String(t.status))} ${n} ${q.gray(i)}`)}function gs(e){let t=[z,J,"/checkouts","/payments"],s=[".js",".css",".json",".map"];if(t.some(o=>e.path.startsWith(o)))return!1;let[n]=e.path.split("?"),r=j(n);return!s.includes(r)}function ys(e){return e<300?q.green:e<400?q.yellow:q.errorText}var J="/cdn/",z="/ext/cdn/",Ce="/api/collect",Es=/^\/cart\//,Lt=/^\/checkouts\/(?!internal\/)/,xs=/^\/account(\/login\/multipass(\/[^/]+)?|\/logout)?\/?$/,Ts=new RegExp(`^${J}`),ws=new RegExp(`^${z}`),Rs=/^\/api\/(unstable|\d{4}-\d{2})\/graphql\.json/,Ss=["/.well-known","/shopify/monorail","/mini-profiler-resources","/web-pixels-manager","/web-pixels@","/wpm","/services/",Ce,"/cdn-cgi/challenge-platform"],qt="_shopify_essential",Fs=new RegExp(`${qt}=([^;]*)(;|$)`);function jt(e,t){return $(async s=>{if(Ss.some(n=>s.path.startsWith(n)))return null;if(vs(s)){let n=s.path.split("?")[0]??"";return He(s,t).then(async r=>{if(X(s,r,t),r.ok){let o=n.split("/").at(-1)??"";if(t.localThemeFileSystem.files.has(`assets/${o}.liquid`)){let i=Z(await r.text(),t);return new Response(i,r)}}return r}).catch(async r=>{let{status:o,statusText:i,...a}=A(r,`Failed to proxy request to ${n}`);return o>=500&&!n.endsWith(".js.map")&&_(a),new Response(r.message,{status:o,statusText:i})})}})}function vs(e){if(e.method!=="GET"||e.path.match(Es)||e.path.match(Lt)||e.path.match(xs)||e.path.match(Ts)||e.path.match(ws))return!0;let[t]=e.path.split("?"),s=j(t),n=e.headers.get("accept")??"*/*";return s===".html"||n.includes("text/html")?!1:!!s||n!=="*/*"}function me(e){return e.session.storeFqdn.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function Ps(e){return Rs.test(e.path)}function Z(e,t){let s=e,n=`(data-shs-beacon-endpoint=["'])https://${me(t)}${Ce}`,r=new RegExp(n,"g");s=s.replace(r,`$1${Ce}`);let o=new RegExp(`(https?:)?//${me(t)}${J}`,"g");s=s.replace(o,J);let i=/(?:https?:)?\/\/cdn\.shopify\.com\/(.*?\/(assets\/[^?#"'`>\s]+))/g,a=c=>c.startsWith("assets/"),u=new Set([...t.localThemeFileSystem.files.keys()].filter(a)),m=new Set([...t.localThemeExtensionFileSystem.files.keys()].filter(a));return s=s.replace(i,(c,l,p)=>{let f=p&&u.has(p),x=p&&m.has(p)&&l.startsWith("extensions/");return U(p).startsWith("image/")?c:x?`${z}${l}`:f?`${J}${l}`:c}),t.options.standardEventsDevBundle&&(s=_t(s)),s}function $s(e,t){let s=`http://${t.options.host}:${t.options.port}`,n=new RegExp(`data-base-url=["']((?:https?:)?//${me(t)})[^"']*?["']`,"g");return e.replace(n,(r,o)=>r.replace(o,s))}function bs(e,t){let s=new RegExp(`Domain=${me(t)};\\s*`,"gi");return e.map(n=>n.replace(s,""))}async function Q(e,t,s){let n=At(e,t);if(n.status>=300&&n.status<400)return n;t.headers.get("content-type")?.includes("application/json")||n.headers.set("content-type","text/html; charset=utf-8");let i=await n.text();return i=Z(i,e),i=$s(i,e),e.options.standardEventsInspector&&(i=ue(i)),s&&(i=s(i)??i),new Response(i,n)}var Ct=["connection","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","expect","content-security-policy","host"];function At(e,t){let s=new Response(t.body,t);s.headers.delete("content-length"),s.headers.delete("content-encoding");for(let i of Ct)s.headers.delete(i);s.headers.delete("access-control-allow-origin"),s.headers.delete("access-control-allow-credentials"),s.headers.delete("access-control-allow-methods"),s.headers.delete("access-control-allow-headers"),s.headers.delete("access-control-expose-headers"),s.headers.delete("access-control-max-age");let n=s.headers.get("Link");n&&s.headers.set("Link",Z(n,e));let r=s.headers.get("Location");if(r){let i=new URL(r,"https://shopify.dev");Lt.test(i.pathname)||(i.searchParams.delete("_fd"),i.searchParams.delete("pb"),s.headers.set("Location",i.href.replace(i.origin,"")))}let o=s.headers.getSetCookie();if(o?.length){s.headers.set("Set-Cookie",bs(o,e).join(","));let i=o.join(",").match(Fs)?.[1];i&&(e.session.sessionCookies[qt]=i)}return s}function Ae(e){let t=st(e);for(let n of Ct)delete t[n];delete t["upgrade-insecure-requests"];let s=nt(e);return s&&(t["X-Forwarded-For"]=s),t}function He(e,t){let s=e.path.replace(new RegExp(z,"g"),"/"),n=e.path.startsWith(z)?"cdn.shopify.com":t.session.storeFqdn,r=new URL(s,`https://${n}`);if(r.hostname!==n)return Promise.reject(new Error(`Request failed: Hostname mismatch. Expected host: ${n}. Resulting URL hostname: ${r.hostname}`));let o=rt(e),i=Ae(e);return Ps(e)||(/\/assets\/[^/]+\.(css|js)$/.test(r.pathname)&&/\?\d+$/.test(r.search)&&(r.search=`?v=${Date.now()}`),r.searchParams.set("_fd","0"),r.searchParams.set("pb","0"),i=ht({...i,...mt(),...n===t.session.storeFqdn?t.session.crawlerSignatureHeaders:{},referer:r.origin,Cookie:yt(t.session,{headers:i}),...t.type==="theme"?{Authorization:`Bearer ${t.session.storefrontToken}`}:{}})),fetch(r,{method:e.method,body:o,duplex:o?"half":void 0,redirect:"manual",headers:i}).then(a=>At(t,a)).catch(a=>{throw ae(L(a),r)})}var De=0,ks=5;function Dt(e,t){return $(s=>{let[n="/",r=""]=s.path.split("?");return Is(s)&&(t.lastRequestedPath=s.path),t.options.errorOverlay!=="silent"&&t.localThemeFileSystem.uploadErrors.size>0?Ht(t,{status:500,statusText:"Internal Server Error"},{title:"Failed to Upload Theme Files",header:"Upload Errors",errors:Array.from(t.localThemeFileSystem.uploadErrors.entries()).map(([i,a])=>({message:i,code:a.join(`
|
|
70
|
+
`)}))}):ce(t.session,{method:s.method,path:n,query:[...new URLSearchParams(r)],themeId:String(e.id),sectionId:"",headers:Ae(s),replaceExtensionTemplates:fe(t),replaceTemplates:Oe(t,n,ot(s,"localization")?.toLowerCase())}).then(async i=>{if(i.status>=400&&i.status<500&&!_s(s)){let a=await Ls(s,t,i);if(a)return X(s,a,t),a}return X(s,i,t),Q(t,i,a=>(qs(i,a,String(e.id)),De=0,Ne(a,t)))}).catch(async i=>{if(i instanceof he&&(F(`Theme ID mismatch: expected ${i.getExpectedThemeId()} but got ${i.getActualThemeId()}; refreshing session...`),H("theme-service:error-page:theme-id-mismatch"),t.session.refresh)){De++,De>ks&&(et(new se(i.getMessage())),process.exit(1)),await t.session.refresh();let f=new URLSearchParams(r),x=new URLSearchParams([...f].filter(([ve])=>!ve.startsWith("__sfr"))),P=n+(x.toString()?`?${x}`:"");return new Response(null,{status:302,headers:{Location:P}})}let{status:a,statusText:u,cause:m,...c}=A(i,"Failed to render storefront"),[l,...p]=c.headline.split(`
|
|
71
71
|
`);return te(c),Ht(t,{status:a,statusText:u},{title:l,header:l,errors:[{message:[...p,m.message].join("<br>"),code:m.stack?.replace(`${m.message}
|
|
72
72
|
`,"")??""}]})})})}function Ht(e,t,s){let n=Ne($t(s),e);return e.options.standardEventsInspector&&(n=ue(n)),H("theme-service:error-page:rendered"),new Response(n,{...t,headers:t.headers??{"Content-Type":"text/html; charset=utf-8"}})}function _s(e){let t=new URLSearchParams(e.path.split("?")[1]);return["section_id","sections","app_block_id"].some(s=>t.has(s))}function Is(e){return e.headers.get("sec-fetch-mode")==="navigate"}async function Ls(e,t,s){F(`Render failed for ${e.path} with ${s.status} (x-request-id: ${s.headers.get("x-request-id")}), trying proxy...`);let n=await He(e,t).catch(r=>new Response(null,A(r)));if(n.status<400)return F(`Proxy status: ${n.status}. Returning proxy response.`),t.options.standardEventsInspector&&(n.headers.get("content-type")??"").includes("text/html")?Q(t,n):n;F(`Proxy status: ${n.status}. Returning render error.`)}function qs(e,t,s){let n=t.match(/Shopify\.theme\s*=\s*{[^}]+?"id":\s*"?(\d+)"?(}|,)/)?.[1];if(n&&n!==s)throw new he(s,n,e)}var he=class extends Error{constructor(t,s,n){super([`Theme ID mismatch: expected ${t} but got ${s}.`,`Request ID: ${n.headers.get("x-request-id")}`,`URL: ${n.url}`,"This is likely related to an issue in upstream Shopify APIs.","Please try again in a few minutes and report this issue:","https://community.shopify.dev/c/shopify-cli-libraries/14"].join(`
|
|
73
|
-
`)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};h();h();function ge(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}h();function ye(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var js={stylesheet:new Map,javascript:new Map};function Ot(e,t){return $(async s=>{if(s.method!=="GET")return;if(Ds(s,t))return Os(s,t);let{file:n,fileKey:r,isUnsynced:o}=Hs(s,t);if(!r)return;let i=U(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(
|
|
73
|
+
`)),this.response=n,this.expectedThemeId=t,this.actualThemeId=s}getMessage(){return this.message}getResponse(){return this.response}getExpectedThemeId(){return this.expectedThemeId}getActualThemeId(){return this.actualThemeId}};h();h();function ge(e,t){let s=new RegExp(`{%-?\\s*${t}\\s*-?%}`),n=new RegExp(`{%-?\\s*end${t}\\s*-?%}`),r=s.exec(e);if(!r)return;let o=r.index+r[0].length;n.lastIndex=o;let i=n.exec(e);if(!i)return;let a=i.index;return e.slice(o,a)}h();function ye(e){let{pathname:t,search:s,searchParams:n}=new URL(e.path,"http://e.c");return{pathname:t,search:s,searchParams:n}}var js={stylesheet:new Map,javascript:new Map};function Ot(e,t){return $(async s=>{if(s.method!=="GET")return;if(Ds(s,t))return Os(s,t);let{file:n,fileKey:r,isUnsynced:o}=Hs(s,t);if(!r)return;let i=U(r);if(i.startsWith("image/")&&s.path.includes("&")&&!o)return;if(at(s,"X-Local-Asset","true"),!n){o&&N(s,O({statusCode:404,statusMessage:"Not found"}));return}let a=n.value?Buffer.from(Z(n.value,t)):Buffer.from(n.attachment??"","base64");return oe(s,{getContents:()=>a,getMeta:()=>({type:i,size:a.length,mtime:n.stats?.mtime})})})}var Cs=/^(?:\/cdn\/(?!extensions\/).*?)?\/assets\/([^?]+)/,As=/^(?:\/(?:ext\/)?cdn\/extensions\/.*?)?\/assets\/([^?]+)/;function Hs(e,t){let s=(n,r)=>{let o=e.path.match(n)?.[1];if(o){let i=E("assets",o),a=r.files.get(i),u=r.unsyncedFileKeys.has(i);if(a||u)return{file:a,isUnsynced:u,fileKey:i}}};return s(Cs,t.localThemeFileSystem)??s(As,t.localThemeExtensionFileSystem)??{isUnsynced:!1,fileKey:void 0,file:void 0}}function Ds(e,t){return t.type==="theme"&&e.path.includes("/compiled_assets")}function Os(e,t){switch(ye(e).pathname.split("/").at(-1)){case"styles.css":return Ns(t,e);case"block-scripts.js":return We(t,e,"block");case"snippet-scripts.js":return We(t,e,"snippet");case"scripts.js":return We(t,e,"section");case void 0:break;default:break}}function Ns(e,t){let s=Ee(e,"section"),n=Ee(e,"block"),r=Ee(e,"snippet"),o=[`/*** GENERATED LOCALLY ***/
|
|
74
74
|
`];for(let[,a]of[...s,...n,...r]){let u=Nt(a,"stylesheet");u&&o.push(u)}let i=o.join(`
|
|
75
|
-
`);return
|
|
75
|
+
`);return oe(t,{getContents:()=>i,getMeta:()=>({type:"text/css",size:Buffer.byteLength(i),mtime:new Date})})}function We(e,t,s){let n=Ee(e,s),r=`${s}s`,o=[`
|
|
76
76
|
/*** GENERATED LOCALLY ***/
|
|
77
77
|
|
|
78
78
|
(function () {
|
|
@@ -95,9 +95,9 @@ import{a as U,b as xt}from"./chunk-KRZABRYT.js";import{A as gt,C as _e,D as ae,E
|
|
|
95
95
|
console.error(e);
|
|
96
96
|
}
|
|
97
97
|
})();`)}o.push("})();");let i=o.join(`
|
|
98
|
-
`);return
|
|
99
|
-
`);return s.set(e.key,{checksum:e.checksum,content:i}),i}}h();import*as Wt from"node:os";function Ws(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Wt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function Ms(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Mt(e,t){let s=Ws(e,t);return $(n=>{let r=n.node.req.headers.host,o=Ms(r);if(!o||!s.has(o))return M(n,W({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Ut(){return Bt()}function qr(){return Bt()}function Bt(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as Us}from"node:http";async function zr(e,t){let s=await Js(e,t);return await zs(e,s),Bs(e,s)}function Bs(e,t){let s=ft();s.use(Mt(t.options.host,t.options.port)),s.use(Jt(e,t)),s.use(Ot(e,t)),s.use(jt(e,t)),s.use(Dt(e,t));let n=Us(gt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function Js(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o}=t,i="127.0.0.1",a=r??9293,u=Ut(),m=vt(o);return await m.ready(),{session:await Et(e.id.toString(),s,void 0,n),localThemeFileSystem:u,localThemeExtensionFileSystem:m,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:i,port:a,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function zs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{xe(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function fe(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var we=Ye(st(),1);import Ys from"node:events";var Me=new Map,K=new Map;function zt(e,t){let s=(0,we.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?K.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):K.delete(e)}function Ue(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(j(e))}function Oe(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${E("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Ue(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(u){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function co(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=j(r);o(u=>{!Qs(r)&&Ue(r)&&a===".json"&&zt(r,u),xe(e,t,i,{type:"update",key:r,payload:Xs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),xe(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&zt(o,a)}else o.endsWith(".liquid")&&Xt(i)}))})}var Gs="1",Gt=new Ys;function Re(e){Gt.emit("hot-reload",{...e,version:Gs})}function Jt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=ht(s);return Gt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{_({headline:"Failed to send HotReload event.",body:a.stack})})}),Re({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,we.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?te(o):o.type==="warn"?_(o):o.type==="info"?Ke(o):_({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Vt)return k(Se()).then(o=>pt(s,o,"application/javascript")).catch(o=>M(s,W({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",u=s.path.split("?")[0]??"",m=new URLSearchParams(r);if(m.delete("section_key"),m.delete("section_id"),m.delete("app_block_id"),m.delete("_fd"),m.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let p=t.localThemeFileSystem.files.get(o)?.value;if(!p)return"";c[o]=p}for(let p of l)if(p.endsWith(".json")){for(let[f,x]of K.get(p)??[])if(i.endsWith(`__${x}`)){let P=t.localThemeFileSystem.files.get(p)?.value;P&&(c[p]=P);continue}}}return ce(t.session,{method:s.method,path:u??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:mt(s),replaceExtensionTemplates:fe(t)}).then(async l=>{if(!l.ok)throw H("theme-service:hot-reload:section:render-failed"),ae(l);return Q(t,l)}).catch(async l=>{let{status:p,statusText:f,...x}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||_(x),new Response(null,{status:p,statusText:f})})}})}var ee=(e,t)=>Re({themeId:String(e),type:"full",key:t});function xe(e,t,s,n){let r=()=>ee(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);Re({sync:"local",themeId:o,...n}),s(()=>Re({sync:"remote",themeId:o,...n}),r)}function Vs(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,we.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of K)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function Xs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Vs(e,t):[],replaceTemplates:Ue(e)?Oe(t):{},updatedFileParts:n&&Xt(n)}}var Te="hot-reload-client",Zs="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Yt=new RegExp(`<script id="${Te}"[^>]*>[^<]*</script>`),Vt="/@shopify/theme-hot-reload";function Ne(e,t){return t.options.liveReload==="off"?e.replace(Yt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Yt,"").replace(/<\/head>/,`<script id="${Te}" src="${Vt}" defer></script></head>`):e.includes(`<script id="${Te}"`)?e:e.replace(/<\/head>/,`<script id="${Te}" src="${Zs}" defer></script></head>`)}function Qs(e){return e.startsWith("assets/")}function Xt(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Me.get(e.key);if(o?.checksum===e.checksum||(Me.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,m=(c,l)=>{u=u.replace(l,"");let p=a(l),f=`${c}Tag`;n[f]=!o||p!==o[f],r[f]=p};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return u=a(u.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=u,n.liquid=!o||u!==o.liquid,Me.set(e.key,r),n}h();var Zt=Ye(st(),1);function Ks(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Qt(e,t,s){if(Ks(s)){let n=E(e,"listings",t,s);if(await v(n))return n}}async function Kt(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Zt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function go(e,t){let s=E(e,"listings"),n=E(s,t);if(await v(n))return;let o=[];await v(s)&&(o=await C("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${$e(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new se(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import en from"node:events";import{fileURLToPath as tn}from"node:url";var sn=250,es=["assets/**/*.*","config/**/*.json","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],b={layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function Co(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new en,a=(d,g)=>{i.emit(d,g)},u=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await rn(e,d,t.listing):await pe(e,d),y=de(d,g);return s.set(d,N({key:d,checksum:y,value:typeof g=="string"?g:"",attachment:Buffer.isBuffer(g)?g.toString("base64"):""})),g},c=C(es,{cwd:e,deep:3,ignore:O}).then(d=>Promise.all([wt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),p=d=>Le([{key:d}],o).length===0;function f(d,g,y,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===Se()){ee(g,T);return}let w=l(T);if(t?.listing&&w.startsWith(`listings/${t.listing}/`)){let R=w.replace(`listings/${t.listing}/`,"");if(R.startsWith("templates/")||R.startsWith("sections/"))w=R;else return}x(w).then(()=>{switch(d){case"add":case"change":return P(d,g,y,w);case"unlink":return ve(g,y,w,n)}}).catch(R=>{D(`Error handling file event for ${w}: ${R}`)})}function x(d){return u?.notify(d)??Promise.resolve()}let P=(d,g,y,T)=>{if(p(T))return;let w=s.get(T)?.checksum,R=m(T).then(async()=>{let S=s.get(T);if(S)return S.checksum!==w&&r.add(T),{value:S.value||void 0,attachment:S.attachment}}),I=R.then(S=>{if(S)return nn(r,n,T,g,y)(S)}).catch(_e(T,"upload"));a(d,{fileKey:T,onContent:S=>{R.then(Y=>{r.has(T)&&S(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(S,Y)=>{I.then(G=>{G?S():Y?.()}).catch(()=>{})}})},ve=(d,g,y,T)=>{if(p(y))return;T.delete(y),s.delete(y),r.add(y);let w=t?.noDelete?Promise.resolve():ot(Number(d),[y],g).then(async R=>{if(!R[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ts("delete",y),!0}).catch(R=>(_e(y,"delete")(R),!1));a("unlink",{fileKey:y,onSync:R=>{w.then(I=>{I&&R()}).catch(()=>{})}})},Pe=new Set(es.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&Pe.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&Pe.add(Se()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await on(e,d)},write:async d=>{let g=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&g){let y=E("listings",t.listing,d.key),T=E(e,y),w=await v(T);s.set(d.key,N({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),w?await Be(e,{...d,key:y}):await Be(e,d);return}s.set(d.key,N({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Be(e,d)},read:m,applyIgnoreFilters:d=>Le(d,o),addEventListener:(d,g)=>{i.on(d,g)},startWatcher:async(d,g)=>{let{default:y}=await import("./chokidar-VDIVGBZH.js"),T=y.watch([...Pe],{ignored:O,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),w=new Map,R=(I,S)=>{let G=`${l(S)}:${I}`,ze=w.get(G);ze&&clearTimeout(ze);let ss=setTimeout(()=>{w.delete(G),f(I,d,g,S)},sn);w.set(G,ss)};T.on("add",R.bind(null,"add")).on("change",R.bind(null,"change")).on("unlink",R.bind(null,"unlink")).on("error",I=>{D(`File watcher error: ${I}`),L("theme-service:file-watcher:error")})}}}function nn(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await it(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ee(n,s),new Error(a.join(`
|
|
100
|
-
`))}return t.delete(s)&&ee(n,s),e.delete(s),ts("update",s),!0}}async function Be(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await an(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function pe(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await v(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function rn(e,t,s){if(t==="config/settings_data.json")return Kt(e,s);let n=await Qt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return pe(e,t)}async function on(e,t){let s=E(e,t);if(!await v(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Ze(s)}function Ao(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],m=[],c=[],l=[];return e.forEach(p=>{let f=p.key;f.endsWith(".liquid")?b.sectionLiquidRegex.test(f)?t.push(p):b.blockLiquidRegex.test(f)?c.push(p):b.layoutLiquidRegex.test(f)?l.push(p):s.push(p):b.configSchemaRegex.test(f)?a.push(p):b.configDataRegex.test(f)?u.push(p):b.jsonRegex.test(f)?b.contextualizedJsonRegex.test(f)?i.push(p):b.sectionJsonRegex.test(f)?n.push(p):b.templateJsonRegex.test(f)?r.push(p):o.push(p):b.staticAssetRegex.test(f)&&m.push(p)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,staticAssetFiles:m,blockLiquidFiles:c,layoutFiles:l}}function Fe(e){return xt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml"].includes(U(e))}async function Ho(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","sections","templates"].every(n=>t.has(n))}async function an(e){let t=cn(e);await v(t)||await Xe(t)}function cn(e){let t=Ge(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ts(e,t){re(ne`• ${
|
|
98
|
+
`);return oe(t,{getContents:()=>i,getMeta:()=>({type:"text/javascript",size:Buffer.byteLength(i),mtime:new Date})})}function Ee(e,t){return[...e.localThemeFileSystem.files.entries()].filter(([s])=>s.endsWith(".liquid")&&s.startsWith(`${t}s/`)).sort(([s],[n])=>s.localeCompare(n))}function Nt(e,t){let s=js[t],n=s.get(e.key);if(n?.checksum===e.checksum)return n.content;if(s.delete(e.key),!e.value)return;let r=[`/* ${e.key} */`],o=ge(e.value??"",t)?.trimEnd();if(o&&r.push(o),r.length>1){let i=r.join(`
|
|
99
|
+
`);return s.set(e.key,{checksum:e.checksum,content:i}),i}}h();import*as Wt from"node:os";function Ws(e,t){let s=new Set,n=`:${t}`,r=e.toLowerCase().trim();if(s.add(`${r}${n}`),["localhost","127.0.0.1","::1","0.0.0.0"].includes(r)&&(s.add(`localhost${n}`),s.add(`127.0.0.1${n}`),s.add(`[::1]${n}`)),r==="0.0.0.0"||r==="::")for(let i of Object.values(Wt.networkInterfaces()))for(let a of i??[]){let u=a.address.toLowerCase().split("%")[0],c=a.family==="IPv6"?`[${u}]`:u;s.add(`${c}${n}`)}return s}function Ms(e){if(e)return e.toLowerCase().replace(/\.(?=:\d|$)/,"")}function Mt(e,t){let s=Ws(e,t);return $(n=>{let r=n.node.req.headers.host,o=Ms(r);if(!o||!s.has(o))return N(n,O({statusCode:400,statusMessage:"Bad Request",message:"Invalid Host header"}))})}h();function Ut(){return Bt()}function qr(){return Bt()}function Bt(){return{root:"",files:new Map,unsyncedFileKeys:new Set,uploadErrors:new Map,ready:()=>Promise.resolve(),delete:async e=>{},read:async e=>"",write:async e=>{},stat:async e=>({mtime:new Date,size:1}),addEventListener:()=>{},startWatcher:async()=>{}}}import{createServer as Us}from"node:http";async function zr(e,t){let s=await Js(e,t);return await zs(e,s),Bs(e,s)}function Bs(e,t){let s=dt();s.use(Mt(t.options.host,t.options.port)),s.use(Jt(e,t)),s.use(Ot(e,t)),s.use(jt(e,t)),s.use(Dt(e,t));let n=Us(pt(s));return{dispatch:s.handler.bind(s),start:async()=>new Promise(r=>n.listen({port:t.options.port,host:t.options.host},()=>r({close:async()=>{await Promise.all([new Promise(o=>{n.closeAllConnections(),n.close(o)})])}})))}}async function Js(e,t){let{adminSession:s,storefrontPassword:n,themeExtensionPort:r,themeExtensionDirectory:o,crawlerSignatureHeaders:i}=t,a="127.0.0.1",u=r??9293,m=Ut(),c=vt(o);return await c.ready(),{session:await Et(e.id.toString(),s,void 0,n,i),localThemeFileSystem:m,localThemeExtensionFileSystem:c,directory:o,type:"theme-extension",lastRequestedPath:"",options:{themeEditorSync:!1,noDelete:!1,ignore:[],only:[],host:a,port:u,liveReload:"hot-reload",standardEventsDevBundle:!1,standardEventsInspector:!1,open:!1,errorOverlay:"default"}}}async function zs(e,t){let s=t.localThemeExtensionFileSystem,n=({fileKey:r,onContent:o,onSync:i})=>{o(()=>{xe(e,t,i,{type:"update",key:r,payload:{isThemeExtension:!0}})})};return s.addEventListener("add",n),s.addEventListener("change",n),s.ready().then(async()=>s.startWatcher())}function fe(e){let t={},s=e.localThemeExtensionFileSystem;for(let n of s.unsyncedFileKeys){let r=s.files.get(n),o=r?.value??r?.attachment;o&&(t[n]=o)}return t}var Re=Ye(ut(),1);import Ys from"node:events";var Me=new Map,K=new Map;function zt(e,t){let s=(0,Re.parseJSON)(t,null,!0);if(!s)return;let n=s?.sections;n&&!e.startsWith("locales/")?K.set(e,Object.entries(n||{}).map(([r,{type:o}])=>[o,r])):K.delete(e)}function Ue(e){return!e.startsWith("assets/")&&[".liquid",".json"].includes(j(e))}function Oe(e,t,s){let n={},r=/^templates\/.+\.json$/,o=t?`${E("templates",t.replace(/^\//,"").replace(/\.html$/,"")||"index")}.json`:"",i=!!t&&e.localThemeFileSystem.files.has(o),a=/^locales\/.+\.json$/,u=!!s&&(e.localThemeFileSystem.files.has(`locales/${s}.json`)||e.localThemeFileSystem.files.has(`locales/${s}.default.json`));for(let m of e.localThemeFileSystem.unsyncedFileKeys)if(Ue(m)){if(i&&r.test(m)){if(m!==o)continue}else if(a.test(m)){if(u){if(!m.startsWith(`locales/${s}.`))continue}else if(!m.includes(".default."))continue}n[m]=e.localThemeFileSystem.files.get(m)?.value??""}return n}function co(e,t){let s=({fileKey:r,onContent:o,onSync:i})=>{let a=j(r);o(u=>{!Qs(r)&&Ue(r)&&a===".json"&&zt(r,u),xe(e,t,i,{type:"update",key:r,payload:Xs(r,t)})})},n=({fileKey:r,onSync:o})=>{K.delete(r),xe(e,t,o,{type:"delete",key:r})};return t.localThemeFileSystem.addEventListener("add",s),t.localThemeFileSystem.addEventListener("change",s),t.localThemeFileSystem.addEventListener("unlink",n),t.localThemeFileSystem.ready().then(async()=>{let r=[...t.localThemeFileSystem.files];return Promise.allSettled(r.map(async([o,i])=>{if(o.endsWith(".json")){let a=i.value??await t.localThemeFileSystem.read(o);a&&typeof a=="string"&&zt(o,a)}else o.endsWith(".liquid")&&Xt(i)}))})}var Gs="1",Gt=new Ys;function we(e){Gt.emit("hot-reload",{...e,version:Gs})}function Jt(e,t){return $(s=>{let n=s.headers.get("accept")==="text/event-stream",r=ye(s).searchParams;if(n){let o=lt(s);return Gt.on("hot-reload",i=>{o.push(JSON.stringify(i)).catch(a=>{_({headline:"Failed to send HotReload event.",body:a.stack})})}),we({type:"open",pid:String(process.pid),themeId:String(e.id)}),o.send().then(()=>o.flush())}if(r.has("hr-log")){let o=(0,Re.parseJSON)(r.get("hr-log")??"",null);return o&&(o.headline=`[HotReload] ${o.headline}`,o.type==="error"?te(o):o.type==="warn"?_(o):o.type==="info"?Ke(o):_({headline:`Unknown HotReload log type: ${o.type}`})),null}if(s.path===Vt)return k(Se()).then(o=>it(s,o,"application/javascript")).catch(o=>N(s,O({cause:o})));if(r.has("section_id")||r.has("app_block_id")){let o=r.get("section_key")??"",i=r.get("section_id")??"",a=r.get("app_block_id")??"",u=s.path.split("?")[0]??"",m=new URLSearchParams(r);if(m.delete("section_key"),m.delete("section_id"),m.delete("app_block_id"),m.delete("_fd"),m.delete("pb"),i===""&&a==="")return;let c={};if(i){let l=t.localThemeFileSystem.unsyncedFileKeys;if(l.has(o)){let p=t.localThemeFileSystem.files.get(o)?.value;if(!p)return"";c[o]=p}for(let p of l)if(p.endsWith(".json")){for(let[f,x]of K.get(p)??[])if(i.endsWith(`__${x}`)){let P=t.localThemeFileSystem.files.get(p)?.value;P&&(c[p]=P);continue}}}return ce(t.session,{method:s.method,path:u??"/",query:[...m.entries()],themeId:String(e.id),sectionId:i,appBlockId:a,replaceTemplates:c,headers:ct(s),replaceExtensionTemplates:fe(t)}).then(async l=>{if(!l.ok)throw H("theme-service:hot-reload:section:render-failed"),ae(l);return Q(t,l)}).catch(async l=>{let{status:p,statusText:f,...x}=A(L(l),"Failed to render section on Hot Reload");return H("theme-service:hot-reload:section:render-error"),a||_(x),new Response(null,{status:p,statusText:f})})}})}var ee=(e,t)=>we({themeId:String(e),type:"full",key:t});function xe(e,t,s,n){let r=()=>ee(e.id,n.key);if(t.options.liveReload==="off")return;if(t.options.liveReload==="full-page"){s(r);return}let o=String(e.id);we({sync:"local",themeId:o,...n}),s(()=>we({sync:"remote",themeId:o,...n}),r)}function Vs(e,t){let s=new Set;if(e.endsWith(".json")){let n=t.localThemeFileSystem.files.get(e)?.value;if(n){let r=(0,Re.parseJSON)(n,null,!0)?.sections;for(let o of Object.keys(r??{}))s.add(o)}}else{let n=e.match(/^sections\/(.+)\.liquid$/)?.[1];if(n)for(let[r,o]of K)for(let[i,a]of o)i===n&&s.add(a)}return[...s]}function Xs(e,t){let[s]=e.split("/"),n=t.localThemeFileSystem.files.get(e);return{sectionNames:s==="sections"?Vs(e,t):[],replaceTemplates:Ue(e)?Oe(t):{},updatedFileParts:n&&Xt(n)}}var Te="hot-reload-client",Zs="/cdn/shopifycloud/theme-hot-reload/theme-hot-reload.js",Yt=new RegExp(`<script id="${Te}"[^>]*>[^<]*</script>`),Vt="/@shopify/theme-hot-reload";function Ne(e,t){return t.options.liveReload==="off"?e.replace(Yt,""):process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD?e.replace(Yt,"").replace(/<\/head>/,`<script id="${Te}" src="${Vt}" defer></script></head>`):e.includes(`<script id="${Te}"`)?e:e.replace(/<\/head>/,`<script id="${Te}" src="${Zs}" defer></script></head>`)}function Qs(e){return e.startsWith("assets/")}function Xt(e){if(!(["sections/","snippets/","blocks/"].some(c=>e.key.startsWith(c))&&e.key.endsWith(".liquid")))return;let n={stylesheetTag:!1,javascriptTag:!1,schemaTag:!1,liquid:!1},r={checksum:e.checksum,liquid:"",stylesheetTag:"",javascriptTag:"",schemaTag:""},o=Me.get(e.key);if(o?.checksum===e.checksum||(Me.delete(e.key),!e.value))return n;let i=["stylesheet","javascript","schema"],a=c=>c?.replace(/\s+/g," ").trim(),u=e.value,m=(c,l)=>{u=u.replace(l,"");let p=a(l),f=`${c}Tag`;n[f]=!o||p!==o[f],r[f]=p};for(let c of i){let l=ge(e.value??"",c);l&&m(c,l)}return u=a(u.replace(/<!--[\s\S]*?-->/g,"").replace(/{%\s*comment\s*%}[\s\S]*?{%\s*endcomment\s*%}/g,"").replace(/{%\s*doc\s*%}[\s\S]*?{%\s*enddoc\s*%}/g,"")),r.liquid=u,n.liquid=!o||u!==o.liquid,Me.set(e.key,r),n}h();var Zt=Ye(ut(),1);function Ks(e){return(e.startsWith("templates/")||e.startsWith("sections/"))&&e.endsWith(".json")}async function Qt(e,t,s){if(Ks(s)){let n=E(e,"listings",t,s);if(await v(n))return n}}async function Kt(e,t){let s=E(e,"config","settings_data.json"),n=await k(s,{encoding:"utf8"}),r=(0,Zt.parseJSON)(n,null,!0);return r?(r.current=$e(t),JSON.stringify(r,null,2)):n}async function go(e,t){let s=E(e,"listings"),n=E(s,t);if(await v(n))return;let o=[];await v(s)&&(o=await C("*",{cwd:s,onlyDirectories:!0,deep:1}));let i=o.length>0?`Available presets: ${o.map(a=>`"${$e(a)}"`).join(", ")}`:'No presets found under "listings/"';throw new se(`Listing preset "${t}" was not found. ${i}.`,`Add the preset to config/settings_data.json and its corresponding "listings/${t}" folder, or remove the --listing flag to use the default theme settings.`)}import en from"node:events";import{fileURLToPath as tn}from"node:url";var sn=250,es=["assets/**/*.*","config/**/*.json","layout/**/*.liquid","locales/**/*.json","sections/**/*.{liquid,json}","blocks/**/*.liquid","snippets/**/*.liquid","templates/**/*.{liquid,json}","templates/customers/**/*.{liquid,json}"],b={layoutLiquidRegex:/^layout\/.+\.liquid$/,sectionLiquidRegex:/^sections\/.+\.liquid$/,blockLiquidRegex:/^blocks\/.+\.liquid$/,configSchemaRegex:/^config\/settings_schema\.json$/,configDataRegex:/^config\/settings_data\.json$/,sectionJsonRegex:/^sections\/.+\.json$/,templateJsonRegex:/^templates\/.+\.json$/,jsonRegex:/^(?!config\/).*\.json$/,contextualizedJsonRegex:/\.context\.[^.]+\.json$/i,staticAssetRegex:/^assets\/(?!.*\.liquid$)/};function Co(e,t){let s=new Map,n=new Map,r=new Set,o={ignoreFromFile:[],ignore:t?.filters?.ignore??[],only:t?.filters?.only??[]},i=new en,a=(d,g)=>{i.emit(d,g)},u=t?.notify?new le(t.notify):void 0,m=async d=>{let g=t?.listing?await rn(e,d,t.listing):await pe(e,d),y=de(d,g);return s.set(d,M({key:d,checksum:y,value:typeof g=="string"?g:"",attachment:Buffer.isBuffer(g)?g.toString("base64"):""})),g},c=C(es,{cwd:e,deep:3,ignore:W}).then(d=>Promise.all([Rt(e),...d.map(m)])).then(([d])=>{Array.isArray(d)&&o.ignoreFromFile.push(...d)}),l=d=>V(e,d),p=d=>Le([{key:d}],o).length===0;function f(d,g,y,T){if(process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&T===Se()){ee(g,T);return}let R=l(T);if(t?.listing&&R.startsWith(`listings/${t.listing}/`)){let w=R.replace(`listings/${t.listing}/`,"");if(w.startsWith("templates/")||w.startsWith("sections/"))R=w;else return}x(R).then(()=>{switch(d){case"add":case"change":return P(d,g,y,R);case"unlink":return ve(g,y,R,n)}}).catch(w=>{D(`Error handling file event for ${R}: ${w}`)})}function x(d){return u?.notify(d)??Promise.resolve()}let P=(d,g,y,T)=>{if(p(T))return;let R=s.get(T)?.checksum,w=m(T).then(async()=>{let S=s.get(T);if(S)return S.checksum!==R&&r.add(T),{value:S.value||void 0,attachment:S.attachment}}),I=w.then(S=>{if(S)return nn(r,n,T,g,y)(S)}).catch(_e(T,"upload"));a(d,{fileKey:T,onContent:S=>{w.then(Y=>{r.has(T)&&S(Y?.value??Y?.attachment??"")}).catch(()=>{})},onSync:(S,Y)=>{I.then(G=>{G?S():Y?.()}).catch(()=>{})}})},ve=(d,g,y,T)=>{if(p(y))return;T.delete(y),s.delete(y),r.add(y);let R=t?.noDelete?Promise.resolve():ft(Number(d),[y],g).then(async w=>{if(!w[0]?.success)throw new Error(`Failed to delete file "${y}" from remote theme.`);return r.delete(y),ts("delete",y),!0}).catch(w=>(_e(y,"delete")(w),!1));a("unlink",{fileKey:y,onSync:w=>{R.then(I=>{I&&w()}).catch(()=>{})}})},Pe=new Set(es.map(d=>E(e,d.split("/").shift()??"")));return t?.listing&&Pe.add(E(e,"listings",t.listing)),process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD&&Pe.add(Se()),{root:e,files:s,unsyncedFileKeys:r,uploadErrors:n,ready:()=>c,delete:async d=>{s.delete(d),await on(e,d)},write:async d=>{let g=(d.key.startsWith("templates/")||d.key.startsWith("sections/"))&&d.key.endsWith(".json");if(t?.listing&&g){let y=E("listings",t.listing,d.key),T=E(e,y),R=await v(T);s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),R?await Be(e,{...d,key:y}):await Be(e,d);return}s.set(d.key,M({key:d.key,checksum:d.checksum,value:d.value??"",attachment:d.attachment??""})),await Be(e,d)},read:m,applyIgnoreFilters:d=>Le(d,o),addEventListener:(d,g)=>{i.on(d,g)},startWatcher:async(d,g)=>{let{default:y}=await import("./chokidar-VDIVGBZH.js"),T=y.watch([...Pe],{ignored:W,persistent:!process.env.SHOPIFY_UNIT_TEST,ignoreInitial:!0}),R=new Map,w=(I,S)=>{let G=`${l(S)}:${I}`,ze=R.get(G);ze&&clearTimeout(ze);let ss=setTimeout(()=>{R.delete(G),f(I,d,g,S)},sn);R.set(G,ss)};T.on("add",w.bind(null,"add")).on("change",w.bind(null,"change")).on("unlink",w.bind(null,"unlink")).on("error",I=>{D(`File watcher error: ${I}`),L("theme-service:file-watcher:error")})}}}function nn(e,t,s,n,r){return async o=>{if(!e.has(s))return!1;let[i]=await gt(Number(n),[{key:s,...o}],r);if(!i?.success){let a=i?.errors?.asset??["Response was not successful."];throw t.set(s,a),ee(n,s),new Error(a.join(`
|
|
100
|
+
`))}return t.delete(s)&&ee(n,s),e.delete(s),ts("update",s),!0}}async function Be(e,{key:t,attachment:s,value:n}){let r=E(e,t);if(await an(r),s){let o=Buffer.from(s,"base64");await be(r,o,{encoding:"base64"})}else await be(r,n??"")}async function pe(e,t){let s=Fe(t)?{encoding:"utf8"}:{},n=E(e,t);if(!await v(n)){F(`File ${n} can't be read because it doesn't exist...`);return}return k(n,s)}async function rn(e,t,s){if(t==="config/settings_data.json")return Kt(e,s);let n=await Qt(e,s,t);if(n){let r=Fe(t)?{encoding:"utf8"}:{};return k(n,r)}return pe(e,t)}async function on(e,t){let s=E(e,t);if(!await v(s)){F(`File ${s} can't be removed because it doesn't exist...`);return}await Ze(s)}function Ao(e){let t=[],s=[],n=[],r=[],o=[],i=[],a=[],u=[],m=[],c=[],l=[];return e.forEach(p=>{let f=p.key;f.endsWith(".liquid")?b.sectionLiquidRegex.test(f)?t.push(p):b.blockLiquidRegex.test(f)?c.push(p):b.layoutLiquidRegex.test(f)?l.push(p):s.push(p):b.configSchemaRegex.test(f)?a.push(p):b.configDataRegex.test(f)?u.push(p):b.jsonRegex.test(f)?b.contextualizedJsonRegex.test(f)?i.push(p):b.sectionJsonRegex.test(f)?n.push(p):b.templateJsonRegex.test(f)?r.push(p):o.push(p):b.staticAssetRegex.test(f)&&m.push(p)}),{sectionLiquidFiles:t,otherLiquidFiles:s,sectionJsonFiles:n,templateJsonFiles:r,contextualizedJsonFiles:i,otherJsonFiles:o,configSchemaFile:a,configDataFile:u,staticAssetFiles:m,blockLiquidFiles:c,layoutFiles:l}}function Fe(e){return xt({liquid:"application/liquid",sass:"text/x-sass",scss:"text/x-scss"}),["application/javascript","application/json","application/liquid","text/css","text/x-sass","text/x-scss","image/svg+xml"].includes(U(e))}async function Ho(e){let t=new Set(await C("*",{cwd:e,deep:1,onlyDirectories:!0}));return["config","layout","sections","templates"].every(n=>t.has(n))}async function an(e){let t=cn(e);await v(t)||await Xe(t)}function cn(e){let t=Ge(e),s=e.lastIndexOf(t);return e.substring(0,s)}function ts(e,t){re(ne`• ${ie.format(new Date)} Synced ${q.raw("\xBB")} ${e} ${t}`)}function Se(){let e=process.env.SHOPIFY_CLI_LOCAL_HOT_RELOAD;return!e||e==="true"?E(tn(import.meta.url.split("/cli/")[0]??""),"theme-hot-reload/dist/theme-hot-reload.js"):e}function de(e,t){return t?Buffer.isBuffer(t)?Je(t):un(e)?ln(t):dn(e,t):""}function ln(e){let t=e;return t=t.replace(/\r\n/g,`
|
|
101
101
|
`),t=t.replace(/\/\*[\s\S]*?\*\//,""),t=pn(t),Je(t)}function dn(e,t){let s=t;return Fe(e)&&(s=s.replace(/\r\n/g,`
|
|
102
102
|
`)),Je(s)}function pn(e){let t=!1,s=!1,n="";for(let r of e)r==='"'&&!s&&(t=!t),!(!t&&(r===" "||r===`
|
|
103
103
|
`))&&(n+=r,s=r==="\\"&&!s);return n}function Je(e){let t=Buffer.isBuffer(e)?e:Buffer.from(e);return Qe(t)}function Mo(e){let t=new Set(e.filter(({key:s})=>s.startsWith("assets/")&&s.endsWith(".liquid")).map(({key:s})=>s));return e.filter(({key:s})=>s.startsWith("assets/")?!t.has(`${s}.liquid`):!0)}function un(e){return e.endsWith("/settings_data.json")}export{Mo as a,jt as b,Dt as c,Ot as d,Mt as e,qr as f,zr as g,co as h,Jt as i,ee as j,go as k,Co as l,Ao as m,Ho as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as l,C as f,D as m,E as d,J as p,y as u}from"./chunk-
|
|
1
|
+
import{B as l,C as f,D as m,E as d,J as p,y as u}from"./chunk-3EQY5B4S.js";import{h as n}from"./chunk-TM534QSE.js";import{b as g}from"./chunk-74IG3ZE3.js";import{F as S,z as h}from"./chunk-YYLEWVO6.js";import{Ob as w}from"./chunk-BXDZX3BS.js";import{r as C}from"./chunk-T6CC5WUU.js";import{e as L,g as i}from"./chunk-VKWPEFWQ.js";i();i();var r="NEW_LOGIN";function N(e,t){let s=[],o=e[t];if(o)for(let[c,I]of Object.entries(o))s.push({label:I.identity.alias??c,value:c});return s}async function b(){let e=await p({},{forceNewSession:!0}),t=await f(e.userId);if(!t){let s=await S({message:"Enter an alias for this account (e.g. your email or a nickname)"});return await m(e.userId,s),s}return t}async function v(){let e=await l(),t=await u(),s=[];return e&&s.push(...N(e,t)),s.length>0&&s.push({label:"Log in with a different account",value:r}),s}async function y(e){if(e){let o=await d(e);if(o)return n(o),e}let t=await v(),s=r;return t.length>0&&(s=await h({message:"Which account would you like to use?",choices:t})),s===r?b():(n(s),t.find(o=>o.value===s)?.label??s)}var A=L(C(),1);var a=class e extends g{static{this.description="Logs you in to your Shopify account."}static{this.flags={alias:A.Flags.string({description:"Alias of the session you want to login to.",env:"SHOPIFY_FLAG_AUTH_ALIAS"})}}async run(){let{flags:t}=await this.parse(e),s=await y(t.alias);w(`Current account: ${s}.`)}};export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,c as D,d as _,e as w}from"./chunk-
|
|
1
|
+
import{a as h,c as D,d as _,e as w}from"./chunk-J2ZES5K5.js";import{g as y,p as O,v as b}from"./chunk-JGN7YG5X.js";import{b as S,c as T}from"./chunk-S5JJL3BP.js";import{b as v}from"./chunk-BU7R7NFL.js";import{u as F}from"./chunk-YYLEWVO6.js";import{Hb as a,Lb as L,Pb as l}from"./chunk-BXDZX3BS.js";import{r as G}from"./chunk-T6CC5WUU.js";import{e as $,g as o}from"./chunk-VKWPEFWQ.js";o();o();o();var u;function p(){return u??(u=new v({projectName:"shopify-cli-host-theme-conf"})),u}function E(e){return l(a`Getting host theme...`),p().get(e)}function Y(e,t){l(a`Setting host theme...`),p().set(e,t)}function C(e){l(a`Removing host theme...`),p().delete(e)}function j(e,t){return{title:e,body:{tabularData:t}}}async function I(e,t){let n=t.storeFqdn,g=new w({...h.reduce((m,s)=>(m[s]=e.role===s,m),{}),theme:e.id?.toString()??e.name}),i=await D(t),x=y(),H=E(n);if(g.any()&&(i=_(n,i,g)),e.json)return L(JSON.stringify(i,null,2));let A=i.map(({id:m,name:s,role:d})=>{let f="";return d&&(f=`[${d}]`,[x,H].includes(`${m}`)&&(f+=" [current]")),[s,f,`#${m}`]}),R=[["name","role","id"],["\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500","\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"],...A];F({customSections:[...e.environment?[{title:`${n} theme library`,body:[{subdued:`Environment name: ${e.environment}`}]}]:[],j("",R)]})}var c=$(G(),1);var r=class extends b{async command(t,n){await I(t,n)}};r.description="Lists the themes in your store, along with their IDs and statuses.";r.flags={...S,...T,...O,role:c.Flags.custom({description:"Only list themes with the given role.",options:h,env:"SHOPIFY_FLAG_ROLE"})(),name:c.Flags.string({description:"Only list themes that contain the given name.",env:"SHOPIFY_FLAG_NAME"}),id:c.Flags.integer({description:"Only list theme with the given ID.",env:"SHOPIFY_FLAG_ID"})};r.multiEnvironmentsFlags=["store","password"];var oe=r;export{E as a,Y as b,C as c,oe as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-N5U5Q2MG.js";import{g as a}from"./chunk-VKWPEFWQ.js";a();var t=e({cmd_app_warning_api_key_deprecation_displayed:!1}),i=t;export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-G6YOP2SJ.js";import{b as ne,c as re}from"./chunk-4U3NC3UU.js";import{c as ee,d as te}from"./chunk-57IRHKV3.js";import{A as T}from"./chunk-ZKBWEHIY.js";import{a as Z}from"./chunk-PLHJQQVZ.js";import{a as Q}from"./chunk-6V37CHBZ.js";import{Fa as X}from"./chunk-KJQAJUDU.js";import{b as Y,c as V}from"./chunk-S5JJL3BP.js";import{B as q,a as S,i as K,j as U,k as b,p as C}from"./chunk-YYLEWVO6.js";import{a as J}from"./chunk-7HZG7FBK.js";import{d as M}from"./chunk-AUZCENYI.js";import{eb as O,fb as l,gb as s,ib as j,jb as G,kb as H,ma as N}from"./chunk-BXDZX3BS.js";import{f as z}from"./chunk-MGPLKG23.js";import{d as I}from"./chunk-773TIA5M.js";import{r as ye}from"./chunk-T6CC5WUU.js";import{e as R,g as c}from"./chunk-VKWPEFWQ.js";c();c();c();c();c();var y=R(O(),1);import{Writable as oe}from"stream";function ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:i}){let a={type:"functionRun",input:e.payload.input,output:e.payload.output,logs:e.payload.logs,name:e.source,size:0,memory_usage:0,instructions:e.payload.fuelConsumed},[u,f]=(0,y.useState)([]),[p,m]=(0,y.useState)([a,a]),[w,d]=(0,y.useState)(void 0),{input:E,export:$}=e.payload,[fe,L]=(0,y.useState)(`Watching for changes to ${e.source}...`);return(0,y.useEffect)(()=>{let A=new S;t.signal.addEventListener("abort",()=>{A.abort()});let B=async()=>{let F=await we(r,JSON.stringify(E),$);m(h=>[F,h[0]]),L(`Watching for changes to ${e.source}...`),f(h=>[...h,F])},de=async()=>{L("Replaying log with local function..."),await B()},ge=async()=>{i.onEvent(async h=>{let x=h.extensionEvents.find(v=>v.extension.handle===r.handle);if(!(!x||x.type!==ee.Updated)){if(x.buildResult?.status==="error"){d(`Error while reloading and building extension: ${x.buildResult?.error}`);return}d(void 0),L("Re-running with latest changes..."),await B()}});let F=new oe({write(h,x,v){f(he=>[...he,{type:"systemMessage",message:h.toString()}]),v()}});await i.start({stdout:F,stderr:F,signal:A.signal},!1)};return de().then(()=>{ge()}),()=>{A.abort()}},[E,$,o,r]),C(t.signal,async()=>{setTimeout(()=>{z()||J(process.pid,"SIGINT",!1,()=>{process.exit(0)})},2e3)}),{logs:u,statusMessage:fe,recentFunctionRuns:p,error:w}}async function we(e,t,o){let r="",i=new oe({write(u,f,p){r+=u,p()}});return await D({functionExtension:e,input:t,export:o,stdout:i,json:!0}),{...JSON.parse(r),type:"functionRun"}}var n=R(O(),1);var ae=({selectedRun:e,abortController:t,app:o,extension:r})=>{let{isAborted:i}=C(t.signal),{isRawModeSupported:a}=G(),u=new te(o),{logs:f,statusMessage:p,recentFunctionRuns:m,error:w}=ie({selectedRun:e,abortController:t,app:o,extension:r,appWatcher:u});return H((d,E)=>{U(d,E,()=>t.abort()),d==="q"&&t.abort()},{isActive:!!a}),n.default.createElement(n.default.Fragment,null,n.default.createElement(j,{items:f},(d,E)=>n.default.createElement(l,{key:`replayOutputScrollerLog${E}`,flexDirection:"column"},n.default.createElement(Se,{log:d}))),i?null:n.default.createElement(l,{marginY:1,paddingTop:1,flexDirection:"column",flexGrow:1,borderStyle:"single",borderBottom:!1,borderLeft:!1,borderRight:!1,borderTop:!0},a?n.default.createElement(l,{flexDirection:"column"},n.default.createElement(l,{flexDirection:"row"},n.default.createElement(s,null,b.pointerSmall," ",p)),n.default.createElement(Re,{recentFunctionRuns:m}),n.default.createElement(s,null,b.pointerSmall," Press ",n.default.createElement(s,{bold:!0},"q")," ",b.lineVertical," quit")):null,w?n.default.createElement(s,{color:"red"},w):null))};function k({title:e,backgroundColor:t}){let o=Math.max(Math.round((28-e.length)/2),0),r=" ".repeat(o);return n.default.createElement(s,{backgroundColor:t,color:"black"},`
|
|
2
2
|
|
|
3
3
|
`,r,e,r,`
|
|
4
4
|
`)}function Ee({input:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Input",backgroundColor:"yellow"}),n.default.createElement(s,null,T(e)))}function Fe({logs:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Logs",backgroundColor:"blueBright"}),n.default.createElement(s,null,e))}function xe({output:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Output",backgroundColor:"greenBright"}),n.default.createElement(s,null,T(e)))}function be({functionRun:e}){return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(k,{title:"Benchmark Results",backgroundColor:"green"}),n.default.createElement(s,null,"Name: ",e.name),n.default.createElement(s,null,"Linear Memory Usage: ",e.memory_usage,"KB"),n.default.createElement(s,null,"Instructions: ",e.instructions/1e3,"K"),n.default.createElement(s,null,"Size: ",e.size,"KB"))}function Re({recentFunctionRuns:e}){let t=e[0].instructions-e[1].instructions;return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(s,null,b.pointerSmall," Instruction count change: ",t>0?"+":"",t))}function Se({log:e}){switch(e.type){case"functionRun":return n.default.createElement(l,{flexDirection:"column"},n.default.createElement(Ee,{input:e.input}),n.default.createElement(Fe,{logs:e.logs}),n.default.createElement(xe,{output:e.output}),n.default.createElement(be,{functionRun:e}),n.default.createElement(s,null,"\xA0"));case"systemMessage":return n.default.createElement(s,null,e.message);default:return null}}var se=R(O(),1);async function ce({selectedRun:e,abortController:t,app:o,extension:r}){return K(se.default.createElement(ae,{selectedRun:e,abortController:t,app:o,extension:r}),{exitOnCtrlC:!1})}c();async function le(e){if(e.length===0)return;let t=i=>({label:`${i.logTimestamp} (${i.status}) - ${i.identifier}`,value:i}),o=e.map(t);return await q({message:"Which function run would you like to replay locally?",choices:o})}import{existsSync as Ce,readdirSync as De}from"fs";var _=100;async function ue(e){let{watch:t,extension:o,app:r}=e,i=new S;try{let a=r.getLogsDir(),u=e.log?await ke(a,o.handle,e.log):await Ae(a,o.handle),{input:f,export:p}=u.payload;t?await ce({selectedRun:u,abortController:i,app:r,extension:o}):await D({functionExtension:o,json:e.json,input:JSON.stringify(f),export:p})}catch(a){throw i.abort(),a}}async function ke(e,t,o){let r=await Le(e,t,o);if(r===void 0)throw new M(`No log found for '${o}'.
|