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,2 +1,2 @@
|
|
|
1
|
-
import{w as h}from"./chunk-
|
|
1
|
+
import{w as h}from"./chunk-ZKBWEHIY.js";import{a as d}from"./chunk-PLHJQQVZ.js";import{a as f}from"./chunk-6V37CHBZ.js";import{Fa as l}from"./chunk-KJQAJUDU.js";import{b as m}from"./chunk-S5JJL3BP.js";import{Lb as c,Xb as u}from"./chunk-BXDZX3BS.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();function g(p){let e=h(p),o=new Map;e.forEach(s=>{let r=s.split(".");if(r.length>=2){let i=r[0];o.has(i)||o.set(i,[]),o.set(i,[...o.get(i),s])}});for(let[s,r]of o)c(u(s,r.join(`
|
|
2
2
|
`)))}var a,t=class extends d{async run(){let{flags:e}=await this.parse(a),{app:o}=await l({directory:e.path,clientId:e["client-id"],forceRelink:e.reset,userProvidedConfigName:e.config});return o.errors.isEmpty()?g(o):process.exit(2),{app:o}}};a=t;t.summary="Print out a list of sources that may be used with the logs command.";t.descriptionWithMarkdown="The output source names can be used with the `--source` argument of `shopify app logs` to filter log output. Currently only function extensions are supported as sources.";t.description=a.descriptionWithoutMarkdown();t.flags={...m,...f};var N=t;export{N as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as W,l as B}from"./chunk-
|
|
1
|
+
import{j as W,l as B}from"./chunk-TM534QSE.js";import{O as v,a as O}from"./chunk-YYLEWVO6.js";import{f as h}from"./chunk-N5U5Q2MG.js";import{d as u,g as T}from"./chunk-AUZCENYI.js";import{$a as S,Bb as L,Fb as o,Hb as s,Pb as d,Ta as w,Ua as i,Wa as D,ma as x,ua as b}from"./chunk-BXDZX3BS.js";import{d as c,i as k}from"./chunk-773TIA5M.js";import{a as I}from"./chunk-CX5CC6P5.js";import{e as R,g}from"./chunk-VKWPEFWQ.js";g();g();function M(e,n){try{return JSON.parse(e)}catch(a){let r=a instanceof Error?a.message:String(a),t=n?` from ${n}`:"";throw new u(`Failed to parse JSON${t}.
|
|
2
2
|
${r}`)}}var l=R(I()),N="yarn.lock",j="package-lock.json",J="pnpm-lock.yaml",$="bun.lockb",C="bun.lock",V="pnpm-workspace.yaml",ke=[N,J,j,$,C],we={yarn:[N],npm:[j],pnpm:[J],bun:[$,C],homebrew:[],unknown:[]},E=["yarn","npm","pnpm","bun","homebrew","unknown"],_=class extends u{constructor(){super("Unknown package manager")}},y=class extends u{constructor(n){super(s`The directory ${o.path(n)} doesn't have a package.json.`)}},P=class extends T{constructor(n){super(s`Couldn't find a a package.json traversing directories from ${o.path(n)}`)}};function A(e=process.env){return e.npm_config_user_agent?.includes("yarn")?"yarn":e.npm_config_user_agent?.includes("pnpm")?"pnpm":e.npm_config_user_agent?.includes("bun")?"bun":e.npm_config_user_agent?.includes("npm")?"npm":"unknown"}function U(e){return i(c(e,$))||i(c(e,C))}function G(e){switch(e){case"yarn":case"npm":case"pnpm":case"bun":return e;case"homebrew":case"unknown":return"npm"}}function K(e,n,...a){switch(e){case"npm":return{command:"npm",args:["exec","--",n,...a]};case"pnpm":return{command:"pnpm",args:["exec",n,...a]};case"yarn":return{command:"yarn",args:["run",n,...a]};case"bun":return{command:"bun",args:["x",n,...a]}}}async function F(e){let n=e;for(d(s`Looking for a lockfile in ${o.path(n)}...`);;){if(i(c(n,N)))return"yarn";if(i(c(n,J))||i(c(n,V)))return"pnpm";if(U(n))return"bun";if(i(c(n,j)))return"npm";let r=k(n);if(r===n)break;n=r}let a=A();return a!=="unknown"?a:"npm"}async function he(e,n,...a){let r=G(await F(e));return K(r,n,...a)}async function ye(e){let n=await D(c(e.directory,"**/package.json"),{ignore:[c(e.directory,"node_modules/**/package.json")],cwd:e.directory,onlyFiles:!0,deep:e.deep}),a=new O;try{await Promise.all(n.map(async r=>{let t=k(r);await z({directory:t,packageManager:e.packageManager,stdout:void 0,stderr:void 0,signal:a.signal,args:[]})}))}catch(r){throw a.abort(),r}}async function z(e){let n={cwd:e.directory,stdin:void 0,stdout:e.stdout,stderr:e.stderr,signal:e.signal},a=["install"];e.args&&(a=a.concat(e.args)),await h("cmd_all_timing_network_ms")(async()=>{await v(e.packageManager,a,n)})}async function xe(e){return(await f(e)).name}async function be(e){return(await f(e)).version}async function H(e){let n=await f(e),a=n.dependencies??{},r=n.devDependencies??{};return{...a,...r}}async function ve(e){let n=c(e,"package.json"),a=await f(n),r=c(e,V);return!!a.workspaces||w(r)}async function Me(e,n,{cacheExpiryInHours:a=0}={}){let r=async()=>(d(s`Checking if there's a version of ${e} newer than ${n}`),ne(e)),t=`npm-package-${e}`,p;try{p=await W(t,r,a*3600*1e3)}catch{return}if(p&&new l.SemVer(n).compare(p)<0)return p}function _e(e,n){let a=`npm-package-${e}`,r=B(a)?.value;if(r&&new l.SemVer(n).compare(r)<0)return r}function Pe(e,n){return(0,l.satisfies)(e,n)}async function f(e){if(!await w(e))throw new y(k(e));return M(await x(e),e)}async function Y(e,n){d(s`Adding the following dependencies if needed:
|
|
3
3
|
${o.json(e)}
|
|
4
4
|
With options:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as s,u as e,v as o,w as n,x as i,y as t}from"./chunk-
|
|
1
|
+
import{C as s,u as e,v as o,w as n,x as i,y as t}from"./chunk-YYLEWVO6.js";import{d,g as l}from"./chunk-AUZCENYI.js";import{g as r}from"./chunk-VKWPEFWQ.js";r();async function u(){e({headline:"CLI update available.",body:["Run",{command:"npm run shopify upgrade"},{char:"."}]}),e({headline:["To connect this project to your shopify store cd into:",{filePath:"/my-store/hydrogen.config.js"},{char:"."}],body:["You can also try the following steps:",{list:{items:[["Run",{command:"shopify project connect"}],["Run",{command:"hydrogen start"}]]}}]}),e({headline:"About your app.",customSections:[{body:{tabularData:[["Configuration file",{filePath:"shopify.app.scalable-transaction-app.toml"}],["App name",{userInput:"scalable-transaction-app"}],["Access scopes","read_products,write_products"]],firstColumnSubdued:!0}}]}),e({headline:[{userInput:"my-app"},"initialized and ready to build."],nextSteps:[["Run",{command:"cd verification-app"}],["To preview your project, run",{command:"npm app dev"}],["To add extensions, run",{command:"npm generate extension"}]],reference:[["Run",{command:"npm shopify help"}],{link:{label:"Dev docs",url:"https://shopify.dev"}}],customSections:[{title:"Custom section",body:{list:{items:[{link:{label:"Item 1",url:"https://shopify.com"}},"Item 2",{link:{url:"https://community.shopify.com/"}}]}}},{title:"Custom section 2",body:{list:{items:["Item 1","Item 2","Item 3"]}}}]}),o({headline:"CLI updated.",body:"You are now running version 3.47."}),o({headline:"Deployment successful.",body:"Your extensions have been uploaded to your Shopify Partners Dashboard.",nextSteps:[{link:{label:"See your deployment and set it live",url:"https://partners.shopify.com/1797046/apps/4523695/deployments"}}]}),n({headline:"You have reached your limit of checkout extensions for this app.",body:"You can free up space for a new one by deleting an existing one."}),n({headline:"Required access scope update.",body:"The deadline for re-selecting your app scopes is May 1, 2022.",reference:[{link:{label:"Dev docs",url:"https://shopify.dev/app/scopes"}}]});let a=new l("Something went wrong.");a.stack=`
|
|
2
2
|
Error: Unexpected error
|
|
3
3
|
at Module._compile (internal/modules/cjs/loader.js:1137:30)
|
|
4
4
|
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-25HJX3L2.js";import{a as oe}from"./chunk-OZBY45KT.js";import{a as se}from"./chunk-EKVTNWHM.js";import{a as z}from"./chunk-5BKCIDMS.js";import{F as X,Fa as re,_ as ee,ba as te,m as W}from"./chunk-4QTEPWEJ.js";import{ea as Z}from"./chunk-UTO4Z6P6.js";import{z as G}from"./chunk-G4OQABDT.js";import{b as Y,c as K}from"./chunk-OXJBYKMX.js";import{i as H,u as Q}from"./chunk-NTRAWIEJ.js";import{d as _}from"./chunk-TPCG6DCA.js";import{r as _e}from"./chunk-T6CC5WUU.js";import{Lb as M,Mb as S,da as $,eb as F,fb as f,gb as o}from"./chunk-7FQFEB33.js";import{j as V}from"./chunk-773TIA5M.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(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 B=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 _(`${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=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({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,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({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 Fe({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>=v)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 be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({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 ne&&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 ie&&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 ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&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 Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(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&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({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 Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("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 _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
|
|
1
|
+
import{A as x,a as ne,b as ie,c as L,d as ae,e as le,g as P,i as v,j as ce,k as ue,m as pe,n as me,o as fe,r as de,s as ge,t as Ee,u as he,v as U,w as ye,x as Te,y as we,z as A}from"./chunk-ZKBWEHIY.js";import{a as oe}from"./chunk-E4GW6OXT.js";import{a as se}from"./chunk-PLHJQQVZ.js";import{a as z}from"./chunk-6V37CHBZ.js";import{F as X,Fa as re,_ as ee,ba as te,m as W}from"./chunk-KJQAJUDU.js";import{ea as Z}from"./chunk-UEC23KAO.js";import{z as G}from"./chunk-3EQY5B4S.js";import{b as Y,c as K}from"./chunk-S5JJL3BP.js";import{i as H,u as Q}from"./chunk-YYLEWVO6.js";import{d as _}from"./chunk-AUZCENYI.js";import{Lb as M,Mb as S,da as $,eb as F,fb as f,gb as o}from"./chunk-BXDZX3BS.js";import{j as V}from"./chunk-773TIA5M.js";import{r as _e}from"./chunk-T6CC5WUU.js";import{e as N,g as E}from"./chunk-VKWPEFWQ.js";E();E();E();E();E();E();var C=N(F(),1);function be(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 B=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 _(`${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=N(F(),1);async function Fe({jwtToken:t,cursor:s,filters:n,storeNameById:i,organizationId:l,setErrors:a,setAppLogOutputs:p,resubscribeCallback:u,developerPlatformClient:r}){let c=t,d=P,T=s,R=await B({pollOptions:{jwtToken:t,cursor:s,filters:n},developerPlatformClient:r,organizationId:l}),m="not_attempted",w=R;if(w.errors){let h=await U({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,k,q,j=i.get(g.shop_id.toString());if(j===void 0)continue;switch(g.log_type){case ue:y=de(g.payload),k=`export "${y.export}" executed in ${(y.fuelConsumed/ce).toFixed(4)}M instructions`;break;case pe:y=ge(g.payload),k="network access response retrieved from cache";break;case me:y=Ee(g.payload),k="network access request executing in background";break;case fe:y=he(g.payload),q=y.connectTimeMs&&y.writeReadTimeMs?y.connectTimeMs+y.writeReadTimeMs:null,k=`network access request executed${q?` in ${q} ms`:""}`;break;default:continue}let ke={status:g.status==="success"?"Success":"Failure",source:g.source,storeName:j,description:k,logTimestamp:$(g.log_timestamp)};y&&p(Ne=>[...Ne,{appLog:y,prefix:ke}])}}return{nextJwtToken:c,retryIntervalMs:d,cursor:T??s,resubscribeResult:m}}function Re({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 Fe({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>=v)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 be(w),{appLogOutputs:r,errors:p}}var e=N(F(),1);var Me=t=>{switch(t){case L.NoCachedResponse:return"No cached response available";case L.CacheAboutToExpire:return"Cache is about to expire";case L.Unknown:return"Unknown reason"}},xe=({pollOptions:{jwtToken:t,filters:s},resubscribeCallback:n,storeNameById:i,developerPlatformClient:l,organizationId:a})=>{let{appLogOutputs:p,errors:u}=Re({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 ne&&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 ie&&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 ae&&e.default.createElement(f,{flexDirection:"column"},e.default.createElement(o,null,"Reason: ",Me(r.reason)),e.default.createElement(o,null,"HTTP request:"),e.default.createElement(o,null,x(r.httpRequest))),r instanceof le&&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 Ie=N(F(),1);async function Se({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l}){let a=async()=>A(n,s,l);return H(Ie.default.createElement(xe,{pollOptions:t,resubscribeCallback:a,storeNameById:i,developerPlatformClient:n,organizationId:l}))}E();async function D({pollOptions:t,options:{variables:s,developerPlatformClient:n},storeNameById:i,organizationId:l,consecutiveResubscribeFailures:a=0}){let p=await B({pollOptions:t,developerPlatformClient:n,organizationId:l}),u=P,r=t.jwtToken,c=a,d=p;if(d.errors){let m=await U({response:d,onThrottle:w=>{S(JSON.stringify({message:"Request throttled while polling app logs.",retry_in_ms:w}))},onUnknownError:w=>{S(JSON.stringify({message:"Error while polling app logs.",retry_in_ms:w}))},onResubscribe:()=>A(n,s,l)});if(m.resubscribeResult==="failed"){if(c+=1,c>=v){S(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&&M(Te({appLog:m,appLogPayload:we(m.payload,m.log_type),storeName:w,prettyPrint:!1}))}),setTimeout(()=>{D({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 Ae(t){let{app:s,remoteApp:n,developerPlatformClient:i}=t,l=await Le(t),a=ye(s);if(a.length===0)throw new _("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 _(`Invalid sources: ${d.join(", ")}. Valid sources are: ${a.join(", ")}`)}let p={shopIds:l.storeIds.map(Number),apiKey:n.apiKey},u=await A(i,p,t.organization.id),r={status:t.status,sources:t.sources},c={jwtToken:u,filters:r};t.format==="json"?(M(JSON.stringify({subscribedToStores:t.storeFqdns})),S(JSON.stringify({message:"Waiting for app logs..."})),await D({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id})):(S(`Waiting for app logs...
|
|
2
2
|
`),await Se({options:{variables:p,developerPlatformClient:i},pollOptions:c,storeNameById:l.storeNameById,organizationId:t.organization.id}))}async function Le(t){let{app:s,remoteApp:n,developerPlatformClient:i,primaryStore:l,organization:a}=t,p=V(s.configPath);t.format==="text"&&Pe(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 Z(a,c,i);u.set(d.shopId,c)})),{storeIds:Array.from(u.keys()),storeNameById:u}}function Pe(t,s,n,i,l){let a=[];n&&n.length>0?n.forEach(u=>a.push(u)):a.push(s);let p=i?W(i):void 0;Q({headline:i?`Using ${p} for default values:`:"Using these settings:",body:ee({appName:t,org:l,devStores:a,messages:[te]})})}var O=N(_e(),1);var J,I=class extends se{async run(){let{flags:s}=await this.parse(J);await X(s.path);let n=await re({directory:s.path,clientId:s["client-id"],forceRelink:s.reset,userProvidedConfigName:s.config}),i=await oe({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 Ae(l),{app:n.app}}};J=I;I.summary="Stream detailed logs for your Shopify app.";I.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 ";I.description=J.descriptionWithoutMarkdown();I.flags={...Y,...z,...K,store:O.Flags.string({char:"s",description:"Store URL. Must be an existing development or Shopify Plus sandbox store.",env:"SHOPIFY_FLAG_STORE",multiple:!0,parse:async t=>G(t)}),source:O.Flags.string({description:"Filters output to the specified log source.",env:"SHOPIFY_FLAG_SOURCE",multiple:!0}),status:O.Flags.string({description:"Filters output to the specified status (success or failure).",options:["success","failure"],env:"SHOPIFY_FLAG_STATUS"})};var _t=I;export{_t as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as R}from"./chunk-VJEKDBGZ.js";import{e as l}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-VJEKDBGZ.js";import{e as l}from"./chunk-YYLEWVO6.js";import{f as I}from"./chunk-N5U5Q2MG.js";import{d as n}from"./chunk-AUZCENYI.js";import{Ea as b,Fb as a,Hb as s,Pb as f,Ta as G,Wa as C}from"./chunk-BXDZX3BS.js";import{a as k,r as w}from"./chunk-MGPLKG23.js";import{q as g}from"./chunk-773TIA5M.js";import{e as D,g as $}from"./chunk-VKWPEFWQ.js";$();var A=D(R());async function r(t,e){try{return(await l("git",t,{cwd:e})).stdout}catch(o){if(o instanceof Error){let i=new n(o.message);throw i.stack=o.stack,"exitCode"in o&&Object.assign(i,{exitCode:o.exitCode}),i}throw o}}async function K(t,e="main"){f(s`Initializing git repository at ${a.path(t)}...`),await h(),await r(["init"],t),await r(["checkout","-b",e],t)}async function Q(t,e){try{return(await r(["check-ignore",...e],t)).split(`
|
|
2
2
|
`).filter(Boolean)}catch(o){if(o instanceof n&&"exitCode"in o&&o.exitCode===1)return[];throw o}}async function V(t){return I("cmd_all_timing_network_ms")(async()=>{let{repoUrl:e,destination:o,shallow:i,latestTag:m}=t;if(f(s`Git-cloning repository ${e} into ${a.path(o)}...`),await h(),await G(o)){if(!await b(o))throw new n(s`Can't clone to ${a.path(o)}`,"The path exists but isn't a directory.");if((await C(["*",".*"],{cwd:o,deep:1,onlyFiles:!1})).length>0)throw new n(s`Directory ${a.path(o)} already exists and is not empty`,s`Choose a different name or remove the existing directory first.`)}let[v,d]=e.split("#");if(d&&m)throw new n("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(i&&m)throw new n("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let u=["clone","--recurse-submodules"];d&&u.push("--branch",d),i&&u.push("--depth","1"),k()||u.push("-c","core.askpass=true"),u.push(v,o);try{if(await l("git",u),m){let c=await S(o,e);await r(["checkout",c],o)}}catch(c){if(c instanceof n)throw c;if(c instanceof Error){let x=new n(c.message);throw x.stack=c.stack,x}throw c}})}async function S(t,e){let o=await F(t);if(!o)throw new n(`Couldn't obtain the most recent tag of the repository ${e}`);return o}async function X(t){let o=await r(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],t);if(!o.trim())throw new n("Must have at least one commit to run command",s`Run ${a.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let i=o.split("\0");return{hash:i[0],date:i[1],message:i[2],refs:i[3],body:i[4],author_name:i[5],author_email:i[6]}}async function Y(t){await r(["add","--all"],t)}async function Z(t,e){let o=["commit","-m",t];return e?.author&&o.push("--author",e.author),await r(o,e?.directory),(await r(["rev-parse","HEAD"],e?.directory)).trim()}async function h(){if(!await w())throw new n("Git is necessary in the environment to continue",s`Install ${a.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var p=class extends n{};async function N(t){if(await h(),!await E(t))throw new p(`${a.path(t??g())} is not a Git directory`)}async function tt(t){return await w()?E(t):!1}async function E(t){try{return await l("git",["rev-parse","--git-dir"],{cwd:t}),!0}catch(e){if(e instanceof Error&&"exitCode"in e&&e.exitCode===128)return!1;throw e}}var y=class extends n{};async function et(t){if(!await T(t))throw new y(`${a.path(t??g())} is not a clean Git directory`)}async function T(t){return(await r(["status","--porcelain"],t)).trim()===""}async function F(t){try{return(await r(["describe","--tags","--abbrev=0"],t)).trim()||void 0}catch(e){if(e instanceof n&&"exitCode"in e&&e.exitCode===128)return;throw e}}async function ot(t,e="origin"){if(f(s`Removing git remote ${e} from ${a.path(t)}...`),await h(),!(await r(["remote"],t)).split(`
|
|
3
3
|
`).filter(Boolean).includes(e)){f(s`Remote ${e} does not exist, no action needed`);return}await r(["remote","remove",e],t)}export{K as a,Q as b,V as c,X as d,Y as e,Z as f,N as g,tt as h,y as i,et as j,T as k,ot as l};
|